[med-svn] [Git][med-team/gdcm][master] 3 commits: Salsa CI: Update default config

Jeremy Bícha (@jbicha) gitlab at salsa.debian.org
Mon Aug 3 16:29:21 BST 2026



Jeremy Bícha pushed to branch master at Debian Med / gdcm


Commits:
58ff7b77 by Jeremy Bícha at 2026-08-03T17:04:19+02:00
Salsa CI: Update default config

- - - - -
837a3769 by Nadzeya Hutsko at 2026-08-03T17:05:51+02:00
Add patch to fix build with poppler 26.07

LP: #2161630
Closes: #1142648

- - - - -
17eadf8a by Jeremy Bícha at 2026-08-03T17:07:25+02:00
releasing package gdcm version 3.0.24-13

- - - - -


4 changed files:

- debian/changelog
- + debian/patches/fix-ftbfs-with-poppler-26.07.patch
- debian/patches/series
- debian/salsa-ci.yml


Changes:

=====================================
debian/changelog
=====================================
@@ -1,3 +1,9 @@
+gdcm (3.0.24-13) unstable; urgency=medium
+
+  * Add patch to fix build with poppler 26.07 (LP: #2161630) (Closes: #1142648)
+
+ -- Nadzeya Hutsko <nadzeya at ubuntu.com>  Thu, 23 Jul 2026 14:45:34 +0200
+
 gdcm (3.0.24-12) unstable; urgency=medium
 
   * Team upload.


=====================================
debian/patches/fix-ftbfs-with-poppler-26.07.patch
=====================================
@@ -0,0 +1,215 @@
+Description: Fix FTBFS with poppler >= 26.02
+ Three poppler API changes break the build: 26.02 made the PDFDoc stream
+ constructor take std::unique_ptr<BaseStream>, which also breaks the
+ LIBPOPPLER_PDFDOC_HAS_OPTIONAL configure probe (it tested the removed raw
+ pointer variant), and 26.04 changed Object::getString() to return
+ const std::string& instead of const GooString*
+ .
+ Re-test the optional-passwords probe via PDFDocFactory, add probes for the
+ two new APIs, and add code branches for them. All checks are
+ compile-probe-based, so older poppler still builds
+Author: Nadzeya Hutsko <nadzeya at ubuntu.com>
+Bug-Ubuntu: https://bugs.launchpad.net/bugs/2161630
+Bug-Debian: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1142648
+Forwarded: no
+Last-Update: 2026-07-23
+--- a/Applications/Cxx/CMakeLists.txt
++++ b/Applications/Cxx/CMakeLists.txt
+@@ -117,12 +117,24 @@
+     list(APPEND libpoppler_flags -DLIBPOPPLER_UNICODEMAP_HAS_CONSTMAPUNICODE)
+   endif()
+   CHECK_CXX_SOURCE_COMPILES(
+-    "\#include <poppler/PDFDoc.h>\nint main() { std::optional<GooString> ownerPW, userPW; PDFDoc d((BaseStream*)nullptr,ownerPW,userPW); return 0;}"
++    "\#include <poppler/PDFDocFactory.h>\nint main() { std::optional<GooString> ownerPW, userPW; GooString fileName; PDFDocFactory().createPDFDoc(fileName,ownerPW,userPW); return 0;}"
+     LIBPOPPLER_PDFDOC_HAS_OPTIONAL)
+   if(LIBPOPPLER_PDFDOC_HAS_OPTIONAL)
+     list(APPEND libpoppler_flags -DLIBPOPPLER_PDFDOC_HAS_OPTIONAL)
+   endif()
+   CHECK_CXX_SOURCE_COMPILES(
++    "\#include <poppler/PDFDoc.h>\nint main() { std::optional<GooString> ownerPW, userPW; PDFDoc d(std::unique_ptr<BaseStream>{},ownerPW,userPW); return 0;}"
++    LIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM)
++  if(LIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM)
++    list(APPEND libpoppler_flags -DLIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM)
++  endif()
++  CHECK_CXX_SOURCE_COMPILES(
++    "\#include <poppler/Object.h>\nint main() { Object o; const std::string &s = o.getString(); (void)s; return 0; }"
++    LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING)
++  if(LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING)
++    list(APPEND libpoppler_flags -DLIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING)
++  endif()
++  CHECK_CXX_SOURCE_COMPILES(
+     "\#include <poppler/goo/GooString.h>\nint main() { GooString gs; gs.size(); return 0; }"
+     LIBPOPPLER_GOOSTRING_HAS_SIZE)
+   if(LIBPOPPLER_GOOSTRING_HAS_SIZE)
+--- a/Applications/Cxx/gdcminfo.cxx
++++ b/Applications/Cxx/gdcminfo.cxx
+@@ -201,6 +201,9 @@
+   if (infoDict->lookup((char*)key, &obj)->isString())
+ #endif
+     {
++#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
++    s = obj.getString().c_str();
++#else
+ #ifndef LIBPOPPLER_GOOSTRING_HAS_GETCSTRING
+     const
+ #endif
+@@ -210,6 +213,7 @@
+ #else
+     s = gs->c_str();
+ #endif
++#endif
+     if (s[0] == 'D' && s[1] == ':')
+       {
+       s += 2;
+@@ -268,11 +272,13 @@
+ #endif
+ {
+   Object obj;
++#ifndef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
+ #ifdef LIBPOPPLER_GOOSTRING_HAS_CONSTGETCHAR
+   const GooString *s1;
+ #else
+   GooString *s1;
+ #endif
++#endif
+   bool isUnicode;
+   Unicode u;
+   char buf[8];
+@@ -285,6 +291,37 @@
+   if (infoDict->lookup((char*)key, &obj)->isString())
+ #endif
+     {
++#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
++    const std::string &s1 = obj.getString();
++    if ((s1[0] & 0xff) == 0xfe &&
++      (s1[1] & 0xff) == 0xff)
++      {
++      isUnicode = true;
++      i = 2;
++      }
++    else
++      {
++      isUnicode = false;
++      i = 0;
++      }
++    while (i < (int)s1.size())
++      {
++      if (isUnicode)
++        {
++        u = ((s1[i] & 0xff) << 8) |
++          (s1[i+1] & 0xff);
++        i += 2;
++        }
++      else
++        {
++        u = pdfDocEncoding[s1[i] & 0xff];
++        ++i;
++        }
++      n = uMap->mapUnicode(u, buf, sizeof(buf));
++      //fwrite(buf,1,n,stdout);
++      out.append( std::string(buf, n) );
++      }
++#else
+     s1 = obj.getString();
+     if ((s1->getChar(0) & 0xff) == 0xfe &&
+       (s1->getChar(1) & 0xff) == 0xff)
+@@ -318,6 +355,7 @@
+       //fwrite(buf,1,n,stdout);
+       out.append( std::string(buf, n) );
+       }
++#endif
+     }
+ #ifndef LIBPOPPLER_NEW_OBJECT_API
+   obj.free();
+@@ -514,7 +552,11 @@
+ #endif
+ 
+     PDFDoc *doc;
++#ifdef LIBPOPPLER_PDFDOC_HAS_UNIQUEPTR_STREAM
++    doc = new PDFDoc(std::unique_ptr<BaseStream>(appearStream), ownerPW, userPW);
++#else
+     doc = new PDFDoc(appearStream, ownerPW, userPW);
++#endif
+ 
+     std::string title;
+     std::string subject;
+--- a/Applications/Cxx/gdcmpdf.cxx
++++ b/Applications/Cxx/gdcmpdf.cxx
+@@ -52,6 +52,9 @@
+   if (infoDict->lookup((char*)key, &obj)->isString())
+ #endif
+     {
++#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
++    s = obj.getString().c_str();
++#else
+ #ifndef LIBPOPPLER_GOOSTRING_HAS_GETCSTRING
+     const
+ #endif
+@@ -61,6 +64,7 @@
+ #else
+     s = gs->c_str();
+ #endif
++#endif
+     if (s[0] == 'D' && s[1] == ':')
+       {
+       s += 2;
+@@ -119,11 +123,13 @@
+ #endif
+ {
+   Object obj;
++#ifndef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
+ #ifdef LIBPOPPLER_GOOSTRING_HAS_CONSTGETCHAR
+   const GooString *s1;
+ #else
+   GooString *s1;
+ #endif
++#endif
+   bool isUnicode = false;
+   Unicode u;
+   char buf[8];
+@@ -136,6 +142,37 @@
+   if (infoDict->lookup((char*)key, &obj)->isString())
+ #endif
+     {
++#ifdef LIBPOPPLER_OBJECT_GETSTRING_IS_STDSTRING
++    const std::string &s1 = obj.getString();
++    if ((s1[0] & 0xff) == 0xfe &&
++      (s1[1] & 0xff) == 0xff)
++      {
++      isUnicode = true;
++      i = 2;
++      }
++    else
++      {
++      isUnicode = false;
++      i = 0;
++      }
++    while (i < (int)s1.size())
++      {
++      if (isUnicode)
++        {
++        u = ((s1[i] & 0xff) << 8) |
++          (s1[i+1] & 0xff);
++        i += 2;
++        }
++      else
++        {
++        u = pdfDocEncoding[s1[i] & 0xff];
++        ++i;
++        }
++      n = uMap->mapUnicode(u, buf, sizeof(buf));
++      //fwrite(buf,1,n,stdout);
++      out.append( std::string(buf, n) );
++      }
++#else
+     s1 = obj.getString();
+     if ((s1->getChar(0) & 0xff) == 0xfe &&
+       (s1->getChar(1) & 0xff) == 0xff)
+@@ -169,6 +206,7 @@
+       //fwrite(buf,1,n,stdout);
+       out.append( std::string(buf, n) );
+       }
++#endif
+     }
+ #ifndef LIBPOPPLER_NEW_OBJECT_API
+   obj.free();


=====================================
debian/patches/series
=====================================
@@ -15,3 +15,4 @@ CVE-2025-53618_CVE-2025-53619.patch
 CVE-2025-48429.patch
 CVE-2026-3650.patch
 fix-ftbfs-with-vtk-9.6-and-gcc-15.patch
+fix-ftbfs-with-poppler-26.07.patch


=====================================
debian/salsa-ci.yml
=====================================
@@ -1,4 +1,3 @@
 ---
 include:
-  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/salsa-ci.yml
-  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/pipeline-jobs.yml
+  - https://salsa.debian.org/salsa-ci-team/pipeline/raw/master/recipes/debian.yml



View it on GitLab: https://salsa.debian.org/med-team/gdcm/-/compare/046b86af93cef3a51575efc3aee1ff9cc2aba3da...17eadf8afb910f92c961d38aece092ce5d6f93c9

-- 
View it on GitLab: https://salsa.debian.org/med-team/gdcm/-/compare/046b86af93cef3a51575efc3aee1ff9cc2aba3da...17eadf8afb910f92c961d38aece092ce5d6f93c9
You're receiving this email because of your account on salsa.debian.org. Manage all notifications: https://salsa.debian.org/-/profile/notifications | Help: https://salsa.debian.org/help


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://alioth-lists.debian.net/pipermail/debian-med-commit/attachments/20260803/5141e1a4/attachment-0001.htm>


More information about the debian-med-commit mailing list