Package: perdition Severity: normal Tags: patch User: ubuntu-de...@lists.ubuntu.com Usertags: origin-ubuntu noble ubuntu-patch X-Debbugs-Cc: michael.hud...@ubuntu.com
Dear Maintainer, In Ubuntu, the attached patch was applied to achieve the following: * d/patches/remove-strcasestr.patch: remove implementation of strcasestr that conflicts with that provided by glibc. which causes a ftbfs in Ubuntu. I'm not sure why Debian is not affected -- we have a newer version of glibc though, so it's probably that. Thanks for considering the patch. I doubt upstream would be happy with it! Cheers, mwh -- System Information: Debian Release: trixie/sid APT prefers mantic-updates APT policy: (500, 'mantic-updates'), (500, 'mantic-security'), (500, 'mantic'), (100, 'mantic-backports') Architecture: amd64 (x86_64) Foreign Architectures: i386 Kernel: Linux 6.5.0-25-generic (SMP w/16 CPU threads; PREEMPT) Kernel taint flags: TAINT_PROPRIETARY_MODULE, TAINT_OOT_MODULE Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_NZ.UTF-8:en Shell: /bin/sh linked to /usr/bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled
diff -Nru perdition-2.2/debian/patches/remove-strcasestr.patch perdition-2.2/debian/patches/remove-strcasestr.patch --- perdition-2.2/debian/patches/remove-strcasestr.patch 1970-01-01 12:00:00.000000000 +1200 +++ perdition-2.2/debian/patches/remove-strcasestr.patch 2024-03-21 16:23:27.000000000 +1300 @@ -0,0 +1,68 @@ +--- a/perdition/str.c ++++ b/perdition/str.c +@@ -705,37 +705,6 @@ + } + + /********************************************************************** +- * strcasestring +- * Find the first occurrence of string in a string, case insensitively +- * pre: haystack: string to search in +- * needle: string to search for +- * return: pointer to the first occurrence of needle +- * NULL on error +- * +- * Note: returns a const char* rather than a char * like strstr(). +- * This seems more logical given the type of the inputs. +- * +- * strcasestr() exists in gcc (and returns char *) but this +- * is a GNU extension. As an implementation is needed for when +- * perdition is compiled against other libcs, it may as be used all +- * the time. +- **********************************************************************/ +- +-const char *strcasestr(const char *haystack, const char *needle) +-{ +- size_t i, haystack_len, needle_len; +- +- haystack_len = strlen(haystack); +- needle_len = strlen(needle); +- +- for (i = 0; haystack_len - i >= needle_len; i++) +- if (!strcasecmp(haystack + i, needle)) +- return haystack + i; +- +- return NULL; +-} +- +-/********************************************************************** + * strcasedelimword + * Find the first occurrence of a word in a string + * That is, find a needle in a haystack and make sure that; +--- a/perdition/str.h ++++ b/perdition/str.h +@@ -335,25 +335,6 @@ + char *str_replace(char *str, size_t n, ...); + + /********************************************************************** +- * strcasestring +- * Find the first occurrence of string in a string, case insensitively +- * pre: haystack: string to search in +- * needle: string to search for +- * return: pointer to the first occurrence of needle +- * NULL on error +- * +- * Note: returns a const char* rather than a char * like strstr(). +- * This seems more logical given the type of the inputs. +- * +- * strcasestr() exists in gcc (and returns char *) but this +- * is a GNU extension. As an implementation is needed for when +- * perdition is compiled against other libcs, it may as be used all +- * the time. +- **********************************************************************/ +- +-const char *strcasestr(const char *haystack, const char *needle); +- +-/********************************************************************** + * strcasedelimword + * Find the first occurrence of a word in a string + * That is, find a needle in a haystack and make sure that; diff -Nru perdition-2.2/debian/patches/series perdition-2.2/debian/patches/series --- perdition-2.2/debian/patches/series 2019-08-02 23:10:52.000000000 +1200 +++ perdition-2.2/debian/patches/series 2024-03-21 16:23:13.000000000 +1300 @@ -1 +1,2 @@ fix-build.patch +remove-strcasestr.patch