Control: tags -1 patch

I am uploading a NMU to DELAYED/10 to fix this.
Please find the debdiff attached.
diff -Nru libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/changelog 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/changelog
--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/changelog        
2024-02-28 20:13:45.000000000 +0100
+++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/changelog        
2025-06-11 11:14:46.000000000 +0200
@@ -1,3 +1,14 @@
+libsynthesis (3.4.0.47.5+syncevolution-1.5.3-1.3) unstable; urgency=medium
+
+  * Non-maintainer upload.
+  * d/control: Move Vcs-* fields to salsa.
+  * Drop gitpkg related stuff.
+
+  [ Yavor Doganov ]
+  * Port to PCRE2. (Closes: #1000047)
+
+ -- Bastian Germann <[email protected]>  Wed, 11 Jun 2025 11:30:32 +0200
+
 libsynthesis (3.4.0.47.5+syncevolution-1.5.3-1.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -Nru libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/control 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/control
--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/control  2024-02-28 
20:13:45.000000000 +0100
+++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/control  2025-06-11 
00:42:25.000000000 +0200
@@ -1,15 +1,15 @@
 Source: libsynthesis
 Priority: optional
 Maintainer: Tino Mettler <[email protected]>
-Build-Depends: dpkg-dev (>= 1.22.5), debhelper (>= 11),  libpcre3-dev, 
libsqlite3-dev,
+Build-Depends: dpkg-dev (>= 1.22.5), debhelper (>= 11),  libpcre2-dev, 
libsqlite3-dev,
  libexpat1-dev, zlib1g-dev, libtool, automake, intltool, pkg-config,
  libical-dev,
  libboost-dev
 Standards-Version: 4.1.3
 Section: libs
 Homepage: http://www.synthesis.ch/indefero/index.php/p/libsynthesis/
-Vcs-Git: git://anonscm.debian.org/git/collab-maint/libsynthesis
-Vcs-Browser: http://anonscm.debian.org/cgit/collab-maint/libsynthesis.git
+Vcs-Git: https://salsa.debian.org/debian/libsynthesis.git
+Vcs-Browser: https://salsa.debian.org/debian/libsynthesis
 
 Package: libsynthesis-dev
 Section: libdevel
diff -Nru 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/0002-pcre2.patch 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/0002-pcre2.patch
--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/0002-pcre2.patch 
1970-01-01 01:00:00.000000000 +0100
+++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/0002-pcre2.patch 
2025-06-11 00:36:49.000000000 +0200
@@ -0,0 +1,112 @@
+Description: Port to PCRE2.
+Bug-Debian: https://bugs.debian.org/1000047
+Author: Milan Crha
+Forwarded: no
+Last-Update: 2023-12-09
+---
+
+--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3.orig/configure.in
++++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/configure.in
+@@ -70,9 +70,9 @@
+               [enable_regex=$enableval],
+               [enable_regex="yes"])
+ if test "$enable_regex" == "yes"; then
+-    PKG_CHECK_MODULES(PCRE, libpcre,
++    PKG_CHECK_MODULES(PCRE, libpcre2-8,
+                       [HAVE_PCRE=1],
+-                      [AC_ERROR([libpcre not found, required for 
--enable-regex])])
++                      [AC_ERROR([libpcre2 not found, required for 
--enable-regex])])
+     HAVE_PCRE=1
+ else
+     HAVE_PCRE=0
+--- 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3.orig/src/sysync/scriptcontext.cpp
++++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/src/sysync/scriptcontext.cpp
+@@ -24,7 +24,8 @@
+ #include "vtimezone.h" // for SETTIMEZONE
+ #include "mimediritemtype.h" // for AlldayCount/MakeAllday
+ #ifdef REGEX_SUPPORT
+-  #include "pcre.h" // for RegEx functions
++  #define PCRE2_CODE_UNIT_WIDTH 8
++  #include "pcre2.h" // for RegEx functions
+ #endif
+ 
+ #include <stdio.h>
+@@ -1323,7 +1324,7 @@
+   // Returns:          > 0 => success; value is the number of elements filled 
in
+   //                   = 0 => success, but offsets is not big enough
+   //                    -1 => failed to match
+-  //                    -2 => PCRE_ERROR_NULL => did not compile, error 
reported to aDbgLogger
++  //                    -2 => PCRE2_ERROR_NULL => did not compile, error 
reported to aDbgLogger
+   //                  < -2 => some kind of unexpected problem
+   static int run_pcre(cAppCharP aRegEx, cAppCharP aSubject, stringSize 
aSubjLen, stringSize aSubjStart, int *aOutVec, int aOVSize, TDebugLogger 
*aDbgLogger)
+   {
+@@ -1351,11 +1352,11 @@
+             cAppCharP o = p++;
+             while (*o) {
+               switch (*o) {
+-                case 'i' : options |= PCRE_CASELESS; break;
+-                case 'm' : options |= PCRE_MULTILINE; break;
+-                case 's' : options |= PCRE_DOTALL; break;
+-                case 'x' : options |= PCRE_EXTENDED; break;
+-                case 'U' : options |= PCRE_UNGREEDY; break;
++                case 'i' : options |= PCRE2_CASELESS; break;
++                case 'm' : options |= PCRE2_MULTILINE; break;
++                case 's' : options |= PCRE2_DOTALL; break;
++                case 'x' : options |= PCRE2_EXTENDED; break;
++                case 'U' : options |= PCRE2_UNGREEDY; break;
+               }
+               o++;
+             }
+@@ -1369,23 +1370,43 @@
+       } // while chars in regex
+     } // if regex with delimiter
+     // - compile regex
+-    pcre *regex;
+-    cAppCharP errMsg=NULL;
+-    int errOffs=0;
+-    regex = pcre_compile(aRegEx, options | PCRE_UTF8, &errMsg, &errOffs, 
NULL);
++    pcre2_code *regex;
++    int errNum=0;
++    size_t errOffs=0;
++    regex = pcre2_compile((PCRE2_SPTR) aRegEx, options | PCRE2_UTF | 
PCRE2_ZERO_TERMINATED, 0, &errNum, &errOffs, NULL);
+     if (regex==NULL) {
++      PCRE2_UCHAR buffer[256] = { 0 };
++      pcre2_get_error_message(errNum, buffer, sizeof(buffer));
+       // error, display it in log if script logging is on
+       PLOGDEBUGPRINTFX(aDbgLogger,DBG_SCRIPTS+DBG_ERROR,(
+         "RegEx error at pattern pos %d: %s ",
+-        errOffs,
+-        errMsg ? errMsg : "<unknown>"
++        (int) errOffs,
++        *buffer ? (const char *) buffer : "<unknown>"
+       ));
+-      return PCRE_ERROR_NULL; // -2, regexp did not compile
++      return PCRE2_ERROR_NULL; // -2, regexp did not compile
+     }
+     else {
++      pcre2_match_data *match_data;
+       // regExp is ok and can be executed against subject
+-      int r = pcre_exec(regex, NULL, aSubject, aSubjLen, aSubjStart, 0, 
aOutVec, aOVSize);
+-      pcre_free(regex);
++      match_data = pcre2_match_data_create_from_pattern(regex, NULL);
++      int r = pcre2_match(regex, (PCRE2_SPTR) aSubject, aSubjLen, 0, 0, 
match_data, NULL);
++      if (r > 0 && aOutVec != NULL) {
++        PCRE2_SIZE *ovector;
++      ovector = pcre2_get_ovector_pointer(match_data);
++      if (ovector[0] > ovector[1]) {
++          aOutVec[0] = ovector[1];
++        r = 1;
++        } else {
++           int ii;
++           for (ii = 0; ii < r && ii < aOVSize; ii++) {
++              aOutVec[ii] = (int) ovector[ii];
++           }
++           if (r > ii)
++              r = ii;
++        }
++      }
++      pcre2_match_data_free(match_data);
++      pcre2_code_free(regex);
+       return r;
+     }
+   } // run_pcre
diff -Nru libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/series 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/series
--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/series   
2018-01-27 22:27:13.000000000 +0100
+++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/patches/series   
2025-06-11 00:38:40.000000000 +0200
@@ -1,2 +1,3 @@
 # debian/source/git-patches exported from git by quilt-patches-deb-export-hook
 0001-Make-sorting-independent-of-locale.patch
+0002-pcre2.patch
diff -Nru libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/README.source 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/README.source
--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/README.source    
2018-01-27 22:27:13.000000000 +0100
+++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/README.source    
1970-01-01 01:00:00.000000000 +0100
@@ -1,36 +0,0 @@
-Building libsynthesis for Debian
---------------------------------
-
-The source package needs no special instructions; the discussion here
-is about working with the git repository.
-
-Patches are exported based on debian/source/git-patches; each line is
-an argument to git-format-patch. The variables $DEB_VERSION and
-$UPSTREAM_VERSION are the Debian and upstream version being exported.
-You can either use git-format-patch manually, or install gitpkg
-version 0.17 or later.
-
-1) To have the patches automatically exported at source package creation time
-
-  a) to setup gitpkg, run
-  
-     % git config gitpkg.deb-export-hook 
/usr/share/gitpkg/hooks/quilt-patches-deb-export-hook
-
-  b) run 
-    
-      % gitpkg master
-
-     to make a source package.
-
-2) To manually export patches, run
-
-       % ./debian/rules export-patches
-
-The original source tarballs are stored in the git repo using
-pristine-tar.  You can (optionally) check out the current tarball by
-
-    git branch pristine-tar origin/pristine-tar
-    # UPSTREAM should be the current upstream version
-    pristine-tar checkout ../libsynthesis_$(UPSTREAM).orig.tar.gz
-
- -- David Bremner <[email protected]>, Tue,  8 Mar 2011 19:28:27 -0400
diff -Nru libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/rules 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/rules
--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/rules    2021-11-03 
18:31:03.000000000 +0100
+++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/rules    2025-06-11 
00:48:39.000000000 +0200
@@ -1,9 +1,6 @@
 #!/usr/bin/make -f
 # -*- makefile -*-
 
-include /usr/share/dpkg/pkg-info.mk
-ORIG=${DEB_SOURCE}_${DEB_VERSION_UPSTREAM}
-
 export DEB_BUILD_MAINT_OPTIONS = hardening=+all
 
 # TODO: patch code to support C0017 (see bug#984209)
@@ -16,9 +13,6 @@
        sh ./autogen.sh
        dh_auto_configure -- --prefix=/usr
 
-get-orig-source:
-       git archive --format=tar upstream/${DEB_VERSION_UPSTREAM} 
--prefix=${ORIG}/ | gzip -9 > ../${ORIG}.orig.tar.gz
-
 override_dh_strip:
        dh_strip --dbgsym-migration='libsynthesis-dbg'
 
@@ -29,10 +23,3 @@
        rm -f src/CLIENT_FILES src/EXCLUDE_FILES src/EXTRA_FILES 
src/SDK_EXCLUDE_FILES src/SDK_FILES src/SERVER_FILES
        rm -rf src/synthesis
        dh_auto_clean
-
-PATCH_EXPORT_SCRIPT=/usr/share/gitpkg/hooks/quilt-patches-deb-export-hook
-export-patches:
-       [ ! -r debian/patches ] || \
-       grep "^\#*$(notdir $(PATCH_EXPORT_SCRIPT))" debian/patches/series
-       rm -rf debian/patches
-       sh $(PATCH_EXPORT_SCRIPT)
diff -Nru libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/source/git-patches 
libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/source/git-patches
--- libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/source/git-patches       
2018-01-27 22:27:13.000000000 +0100
+++ libsynthesis-3.4.0.47.5+syncevolution-1.5.3/debian/source/git-patches       
1970-01-01 01:00:00.000000000 +0100
@@ -1,2 +0,0 @@
-upstream/${UPSTREAM_REF}..patches/${DEB_REF}
-

Reply via email to