Package: release.debian.org
Severity: normal
Tags: trixie
X-Debbugs-Cc: [email protected], [email protected]
Control: affects -1 + src:awffull
User: [email protected]
Usertags: pu

[ Reason ]
Please approve this update to fix #1129599, a regression that
unfortunately sneaked into a stable release.

[ Impact ]
The package is barely usable as it is -- statistics about visits/pages
is an important part of a web server log analysis program and this
functionality doesn't work ATM.

[ Tests ]
No automated tests; I've been running it for a few days on a trixie
machine, watching when the timer triggers and examining the generated
statistics page.  No problems found.

Additionally, I've been running the unstable version on an unstable
machine since when the bug was fixed there (20 Jul).  There are no
other code changes between the trixie and the unstable version; only
cosmetic packaging fixes.

[ Risks ]
The change is trivial/straightforward: pcre2_match requires a non-NULL
pcre2_match_data argument as opposed to the same function from the old
API pcre_exec, which allowed a NULL ovector argument.  So without this
change, pcre2_match was returning early with an error (PCRE2_ERROR_NULL).

This is a bug I introduced when porting the package to PCRE2.

[ Checklist ]
  [X] *all* changes are documented in the d/changelog
  [X] I reviewed all changes and I approve them
  [X] attach debdiff against the package in (old)stable
  [X] the issue is verified as fixed in unstable
diff -Nru awffull-3.10.2/debian/changelog awffull-3.10.2/debian/changelog
--- awffull-3.10.2/debian/changelog	2025-12-04 11:57:05.000000000 +0200
+++ awffull-3.10.2/debian/changelog	2026-09-01 17:16:19.000000000 +0300
@@ -1,3 +1,11 @@
+awffull (3.10.2-10+deb13u2) trixie; urgency=medium
+
+  * QA upload.
+  * debian/patches/pcre2.patch: Fix Visits/Pages statistics, thanks Martin
+    Argalas / CyberFoundry.net (Closes: #1129599).
+
+ -- Yavor Doganov <[email protected]>  Tue, 01 Sep 2026 17:16:19 +0300
+
 awffull (3.10.2-10+deb13u1) trixie; urgency=medium
 
   * QA upload.
diff -Nru awffull-3.10.2/debian/patches/pcre2.patch awffull-3.10.2/debian/patches/pcre2.patch
--- awffull-3.10.2/debian/patches/pcre2.patch	2025-11-16 11:31:10.000000000 +0200
+++ awffull-3.10.2/debian/patches/pcre2.patch	2026-09-01 17:14:22.000000000 +0300
@@ -1,8 +1,9 @@
 Description: Port to PCRE2.
 Bug-Debian: https://bugs.debian.org/1000027
+Bug-Debian: https://bugs.debian.org/1129599
 Author: Yavor Doganov <[email protected]>
 Forwarded: no
-Last-Update: 2023-11-21
+Last-Update: 2026-07-19
 ---
 
 --- awffull.orig/configure.ac
@@ -373,12 +374,13 @@
      return (1);
  }
  
-@@ -382,10 +432,10 @@
+@@ -382,10 +432,11 @@
  parse_check_not_page(char *url)
  {
      char regex_page[MAX_RE_LENGTH + 1] = "";    /* Hold the PAGE RE */
 -    static pcre *cmp_regex_page = NULL;         /* NotPage compiled RE */
 +    static pcre2_code *cmp_regex_page = NULL;   /* NotPage compiled RE */
++    pcre2_match_data *md;
  
 -    const char *error;                          /* RE error pointer, offset */
 -    int erroffset;                              /* RE error value */
@@ -387,7 +389,7 @@
      int str_length, tmp_length;
      int rc;                                     /* RE Check return value */
      static int max_type_length = 0;
-@@ -412,7 +462,7 @@
+@@ -412,7 +463,7 @@
          VPRINT(VERBOSE2, "PCRE: New NotPAGE RegEx: '%s',  Max: %d\n", regex_page, max_type_length);
  
          /* Compile the RegEx */
@@ -396,21 +398,24 @@
          VPRINT(VERBOSE2, "PCRE: Compile PAGE%s", "\n");
          if (cmp_regex_page == NULL) {
              re_compile_failed(erroffset, error, regex_page);
-@@ -429,7 +479,7 @@
+@@ -429,7 +480,9 @@
      }
      VPRINT(VERBOSE4, "  Was: '%s', Is: %s\n", url, str_start);
  
 -    rc = pcre_exec(cmp_regex_page, NULL, str_start, tmp_length, 0, 0, NULL, 0);
-+    rc = pcre2_match(cmp_regex_page, str_start, tmp_length, 0, 0, NULL, NULL);
++    md = pcre2_match_data_create_from_pattern(cmp_regex_page, NULL);
++    rc = pcre2_match(cmp_regex_page, str_start, tmp_length, 0, 0, md, NULL);
++    pcre2_match_data_free(md);
      /* check for RE matching */
      if (rc >= 0) {
          /* Have matched! */
-@@ -466,10 +516,10 @@
+@@ -466,10 +519,11 @@
  parse_is_page(char *url)
  {
      char regex_page[MAX_RE_LENGTH + 1] = "";    /* Hold the PAGE RE */
 -    static pcre *cmp_regex_page = NULL;         /* Page compiled RE */
 +    static pcre2_code *cmp_regex_page = NULL;   /* Page compiled RE */
++    pcre2_match_data *md;
  
 -    const char *error;                          /* RE error pointer, offset */
 -    int erroffset;                              /* RE error value */
@@ -419,7 +424,7 @@
      int str_length;
      int rc;                                     /* RE Check return value */
      char reverse[MAXURL + 1] = "";
-@@ -508,7 +558,7 @@
+@@ -508,7 +562,7 @@
          VPRINT(VERBOSE2, "PCRE: New PAGE RegEx: '%s'\n", regex_page);
  
          /* Compile the RegEx */
@@ -428,16 +433,18 @@
          VPRINT(VERBOSE2, "PCRE: Compile PAGE%s", "\n");
          if (cmp_regex_page == NULL) {
              re_compile_failed(erroffset, error, regex_page);
-@@ -524,7 +574,7 @@
+@@ -524,7 +578,9 @@
      }
      *(reverse + j) = '\0';                      /* Probably not needed as we provide the length... */
  
 -    rc = pcre_exec(cmp_regex_page, NULL, reverse, str_length, 0, 0, NULL, 0);
-+    rc = pcre2_match(cmp_regex_page, reverse, str_length, 0, 0, NULL, NULL);
++    md = pcre2_match_data_create_from_pattern(cmp_regex_page, NULL);
++    rc = pcre2_match(cmp_regex_page, reverse, str_length, 0, 0, md, NULL);
++    pcre2_match_data_free(md);
      /* check for RE matching */
      if (rc >= 0) {
          /* Have matched! */
-@@ -546,7 +596,7 @@
+@@ -546,7 +602,7 @@
  static int
  identify_log_format(char *buffer)
  {
@@ -446,7 +453,7 @@
      int rc;                                     /* RE Check return value */
      int buffer_length;
  
-@@ -554,43 +604,49 @@
+@@ -554,43 +610,49 @@
      buffer_length = (int) strlen(buffer);
  
      /* Check for COMBINED */
@@ -501,7 +508,7 @@
          /* Invalid tables for this log type. Zero them away and hence not display. */
          g_settings.top.agents = 0;
          g_settings.top.refs = 0;
-@@ -598,6 +654,7 @@
+@@ -598,6 +660,7 @@
      }
  
      VPRINT(VERBOSE1, "%s\n", _("Unrecognised Log Format"));
@@ -509,7 +516,7 @@
      return (-1);                                /* Failed to match any, unknown format */
  }
  
-@@ -623,46 +680,46 @@
+@@ -623,46 +686,46 @@
      char log_regexp_squid[MAX_RE_LENGTH] = PATTERN_SQUID;
      char log_regexp_domino[MAX_RE_LENGTH] = PATTERN_DOMINO;
  
@@ -564,7 +571,7 @@
      VPRINT(VERBOSE2, "PCRE: Compile PATTERN_COMBINED_DOMINO%s", "\n");
      if (cmp_log_regexp_domino == NULL) {
          re_compile_failed(erroffset, error, log_regexp_domino);
-@@ -683,7 +740,7 @@
+@@ -683,7 +746,7 @@
  
      /* Matching failed: handle error cases */
      switch (err) {
@@ -573,7 +580,7 @@
          ERRVPRINT(VERBOSE1, "%s", _("Warning: No Regular Expression Match. "));
          break;
          /*  Leave out the more explicit failure messages - we show the number, so can be found.
-@@ -716,9 +773,12 @@
+@@ -716,9 +779,12 @@
   * FATAL failure. Will exit the run.                                    *
   ************************************************************************/
  static void
@@ -588,7 +595,7 @@
      ERRVPRINT(VERBOSE0, "%s %s\n", _("  Using Regular Expression:"), re_str);
      exit(1);                                    /* FIXME - table of exit codes! */
  }
-@@ -735,10 +795,10 @@
+@@ -735,10 +801,10 @@
  {
      ERRVPRINT(VERBOSE1, "%s %d\n", _("Error: Failed to extract substring:"), substr_idx);
      switch (err) {

Reply via email to