Package: release.debian.org Severity: normal Tags: trixie X-Debbugs-Cc: [email protected] Control: affects -1 + src:gnustep-base User: [email protected] Usertags: pu
[ Reason ] I would like to update the gnustep-base package in trixie to fix #1150228 (severity: important). It was reported by one of the sogo maintainers, it is fixed in unstable/testing and affects also stable. [ Impact ] There are at least two UI regressions in sogo/5.12.1-3+deb13u3 (DSA-6561-1) due to this bug and they will remain unfixed. They are descibed at #1150228. [ Tests ] The upstream change includes test cases. The NSRegularExpression class is seldom used so I rely on them and on runtime tests performed by sogo maintainers/users. [ Risks ] The change is pretty straightforward and I would classify it as low risk. [ 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 stable [X] the issue is verified as fixed in unstable
diff -Nru gnustep-base-1.31.1/debian/changelog gnustep-base-1.31.1/debian/changelog --- gnustep-base-1.31.1/debian/changelog 2025-03-25 07:49:59.000000000 +0200 +++ gnustep-base-1.31.1/debian/changelog 2026-10-17 21:29:27.000000000 +0300 @@ -1,3 +1,11 @@ +gnustep-base (1.31.1-3+deb13u1) trixie; urgency=medium + + * debian/patches/NSRegularExpression-test-ICU-success.patch: New; + backport upstream fix to test for ICU success (Closes: #1150228). + * debian/gbp.conf: Set debian-branch to trixie. + + -- Yavor Doganov <[email protected]> Sat, 17 Oct 2026 21:29:27 +0300 + gnustep-base (1.31.1-3) unstable; urgency=medium * debian/templates/control.m4 (libgnustep-base`'SOV_BASE) <Depends>: Add diff -Nru gnustep-base-1.31.1/debian/gbp.conf gnustep-base-1.31.1/debian/gbp.conf --- gnustep-base-1.31.1/debian/gbp.conf 2025-02-28 07:17:42.000000000 +0200 +++ gnustep-base-1.31.1/debian/gbp.conf 2026-10-17 21:28:12.000000000 +0300 @@ -1,2 +1,3 @@ [DEFAULT] pristine-tar = True +debian-branch = trixie diff -Nru gnustep-base-1.31.1/debian/patches/NSRegularExpression-test-ICU-success.patch gnustep-base-1.31.1/debian/patches/NSRegularExpression-test-ICU-success.patch --- gnustep-base-1.31.1/debian/patches/NSRegularExpression-test-ICU-success.patch 1970-01-01 02:00:00.000000000 +0200 +++ gnustep-base-1.31.1/debian/patches/NSRegularExpression-test-ICU-success.patch 2026-10-17 21:19:15.000000000 +0300 @@ -0,0 +1,179 @@ +Description: NSRegularExpression: Fix tests for ICU success. +Bug-Debian: https://bugs.debian.org/1150228 +Bug: https://github.com/gnustep/libs-base/issues/800 +Origin: upstream, commit:188b2a3 +Forwarded: not-needed +Last-Update: 2026-10-07 +--- + +--- gnustep-base.orig/Source/NSRegularExpression.m ++++ gnustep-base/Source/NSRegularExpression.m +@@ -605,7 +605,7 @@ + } + if (opts & NSMatchingAnchored) + { +- if (uregex_lookingAt(r, -1, &s) && (0 == s)) ++ if (uregex_lookingAt(r, -1, &s) && U_SUCCESS(s)) + { + // FIXME: Factor all of this out into prepareResult() + uint32_t flags; +@@ -622,7 +622,7 @@ + } + else + { +- while (!stop && uregex_findNext(r, &s) && (0 == s)) ++ while (!stop && uregex_findNext(r, &s) && U_SUCCESS(s)) + { + uint32_t flags; + NSTextCheckingResult *result; +@@ -668,7 +668,7 @@ + } + if (opts & NSMatchingAnchored) + { +- if (uregex_lookingAt(r, -1, &s) && (0 == s)) ++ if (uregex_lookingAt(r, -1, &s) && U_SUCCESS(s)) + { + // FIXME: Factor all of this out into prepareResult() + uint32_t flags; +@@ -685,7 +685,7 @@ + } + else + { +- while (!stop && uregex_findNext(r, &s) && (0 == s)) ++ while (!stop && uregex_findNext(r, &s) && U_SUCCESS(s)) + { + uint32_t flags; + NSTextCheckingResult *result; +@@ -959,7 +959,7 @@ + [template getCharacters: replacement range: NSMakeRange(0, replLength)]; + + outLength = uregex_replaceAll(r, replacement, replLength, NULL, 0, &s); +- if (0 == s || U_BUFFER_OVERFLOW_ERROR == s) ++ if (U_SUCCESS(s) || U_BUFFER_OVERFLOW_ERROR == s) + { + unichar *output; + +@@ -968,7 +968,7 @@ + output = NSZoneMalloc(0, (outLength + 1) * sizeof(unichar)); + uregex_replaceAll(r, replacement, replLength, + output, outLength + 1, &s); +- if (0 == s) ++ if (U_SUCCESS(s)) + { + NSString *out; + +@@ -1011,7 +1011,7 @@ + [template getCharacters: replacement range: NSMakeRange(0, replLength)]; + + outLength = uregex_replaceAll(r, replacement, replLength, NULL, 0, &s); +- if (0 == s || U_BUFFER_OVERFLOW_ERROR == s) ++ if (U_SUCCESS(s) || U_BUFFER_OVERFLOW_ERROR == s) + { + unichar *output; + +@@ -1019,7 +1019,7 @@ + + output = NSZoneMalloc(0, (outLength + 1) * sizeof(unichar)); + uregex_replaceAll(r, replacement, replLength, output, outLength + 1, &s); +- if (0 == s) ++ if (U_SUCCESS(s)) + { + result = AUTORELEASE([[NSString alloc] + initWithCharactersNoCopy: output +@@ -1060,7 +1060,7 @@ + [template getCharacters: replacement range: NSMakeRange(0, replLength)]; + + outLength = uregex_replaceFirst(r, replacement, replLength, NULL, 0, &s); +- if (0 == s || U_BUFFER_OVERFLOW_ERROR == s) ++ if (U_SUCCESS(s) || U_BUFFER_OVERFLOW_ERROR == s) + { + unichar *output; + +@@ -1068,7 +1068,7 @@ + output = NSZoneMalloc(0, (outLength + 1) * sizeof(unichar)); + uregex_replaceFirst(r, replacement, replLength, + output, outLength + 1, &s); +- if (0 == s) ++ if (U_SUCCESS(s)) + { + str = AUTORELEASE([[NSString alloc] + initWithCharactersNoCopy: output +--- gnustep-base.orig/Tests/base/NSRegularExpression/basic.m ++++ gnustep-base/Tests/base/NSRegularExpression/basic.m +@@ -12,6 +12,48 @@ + #import <Foundation/NSError.h> + #import <Foundation/FoundationErrors.h> + ++static void ++testReplace(NSString *pattern, NSString *input, NSString *template, ++ NSString *expect, NSUInteger count) ++{ ++ NSRegularExpression *re; ++ NSRange range; ++ NSString *result; ++ NSMutableString *mutable; ++ NSString *msg; ++ NSUInteger n; ++ ++ msg = [NSString stringWithFormat: ++ @"Replacing '%@' in string '%@' with '%@' gives '%@'", ++ pattern, input, template, expect]; ++ ++ re = [NSRegularExpression regularExpressionWithPattern: pattern ++ options: 0 ++ error: NULL]; ++ range = NSMakeRange(0, input.length); ++ result = [re stringByReplacingMatchesInString: input ++ options: 0 ++ range: range ++ withTemplate: template]; ++ ++ PASS_EQUAL(result, expect, "%s", [msg UTF8String]) ++ ++ mutable = AUTORELEASE([input mutableCopy]); ++ n = [re replaceMatchesInString: mutable ++ options: 0 ++ range: range ++ withTemplate:template]; ++ ++ msg = [NSString stringWithFormat: ++ @"Replacing '%@' in mutable string '%@' with '%@' gives '%@'", ++ pattern, template, input, expect]; ++ PASS_EQUAL(mutable, expect, "%s", [msg UTF8String]) ++ msg = [NSString stringWithFormat: ++ @"Replacing '%@' in mutable string '%@' with '%@' match count is %u", ++ pattern, template, input, (unsigned)count]; ++ PASS(n == count, "%s", [msg UTF8String]) ++} ++ + @interface DegeneratePatternTest : NSObject + { + NSRegularExpression *expression; +@@ -52,10 +94,8 @@ + } + @end + +- + int main() + { +- NSAutoreleasePool *arp = [NSAutoreleasePool new]; + START_SET("NSRegularExpression") + + #if !(__APPLE__ || GS_USE_ICU) +@@ -200,7 +240,15 @@ + + #endif + ++ testReplace(@"a", @"aaa", @"", @"", 3); // every character removed ++ testReplace(@"a+", @"aaa", @"", @"", 1); // one match for whole string ++ testReplace(@"a", @"", @"", @"", 0); // empty input, no match ++ testReplace(@"x", @"", @"", @"", 0); // empty input, can't match ++ testReplace(@"a", @"bab", @"", @"bb", 1); // partial removal ++ testReplace(@"x", @"abc", @"", @"abc", 0); // no match ++ testReplace(@"a", @"aaa", @"b", @"bbb", 3); // non-empty result ++ + END_SET("NSRegularExpression") +- [arp release]; arp = nil; ++ + return 0; + } diff -Nru gnustep-base-1.31.1/debian/patches/series gnustep-base-1.31.1/debian/patches/series --- gnustep-base-1.31.1/debian/patches/series 2025-03-05 22:26:29.000000000 +0200 +++ gnustep-base-1.31.1/debian/patches/series 2026-10-17 21:15:08.000000000 +0300 @@ -8,3 +8,4 @@ no-etc-timezone.patch multiarch+cross.patch no-builtin-tz.patch +NSRegularExpression-test-ICU-success.patch

