From cc0349ac7cfd894637a5254c4e83400c34c93cefd3a54b9e47186f8f0a3d638b Mon Sep 17 00:00:00 2001 From: Andreas Schwab Date: Mon, 16 Aug 2021 12:20:25 +0000 Subject: [PATCH] Accepting request 912392 from home:Andreas_Schwab:Factory - Update to grep 3.7 * Preprocessing N patterns would take at least O(N^2) time when too many patterns hashed to too few buckets - werror-return-type.patch, gnulib-c-stack.patch: Removed - Skip stack overflow tests in qemu build OBS-URL: https://build.opensuse.org/request/show/912392 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=114 --- gnulib-c-stack.patch | 170 --------------------------------------- grep-3.6.tar.xz | 3 - grep-3.6.tar.xz.sig | 16 ---- grep-3.7.tar.xz | 3 + grep-3.7.tar.xz.sig | 16 ++++ grep.changes | 9 +++ grep.keyring | 5 ++ grep.spec | 14 ++-- profile.sh | 6 +- werror-return-type.patch | 58 ------------- 10 files changed, 44 insertions(+), 256 deletions(-) delete mode 100644 gnulib-c-stack.patch delete mode 100644 grep-3.6.tar.xz delete mode 100644 grep-3.6.tar.xz.sig create mode 100644 grep-3.7.tar.xz create mode 100644 grep-3.7.tar.xz.sig delete mode 100644 werror-return-type.patch diff --git a/gnulib-c-stack.patch b/gnulib-c-stack.patch deleted file mode 100644 index 05c6c40..0000000 --- a/gnulib-c-stack.patch +++ /dev/null @@ -1,170 +0,0 @@ -Index: grep-3.6/configure -=================================================================== ---- grep-3.6.orig/configure -+++ grep-3.6/configure -@@ -8603,13 +8603,11 @@ else - # include - # include - #endif -- #ifndef SIGSTKSZ -- # define SIGSTKSZ 16384 -- #endif -+ #define alt_SIGSTKSZ 16384 - - static union - { -- char buffer[2 * SIGSTKSZ]; -+ char buffer[2 * alt_SIGSTKSZ]; - long double ld; - long u; - void *p; -@@ -8630,8 +8628,8 @@ else - - st.ss_flags = 0; - /* Use the midpoint to avoid Irix sigaltstack bug. */ -- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; -- st.ss_size = SIGSTKSZ; -+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ; -+ st.ss_size = alt_SIGSTKSZ; - r = sigaltstack (&st, 0); - if (r != 0) - return 1; -@@ -8721,9 +8719,7 @@ else - #if HAVE_SYS_SIGNAL_H - # include - #endif --#ifndef SIGSTKSZ --# define SIGSTKSZ 16384 --#endif -+#define alt_SIGSTKSZ 16384 - volatile char *stack_lower_bound; - volatile char *stack_upper_bound; - static void check_stack_location (volatile char *addr) -@@ -8740,12 +8736,12 @@ static void stackoverflow_handler (int s - } - int main () - { -- char mystack[2 * SIGSTKSZ]; -+ char mystack[2 * alt_SIGSTKSZ]; - stack_t altstack; - struct sigaction action; - /* Install the alternate stack. */ -- altstack.ss_sp = mystack + SIGSTKSZ; -- altstack.ss_size = SIGSTKSZ; -+ altstack.ss_sp = mystack + alt_SIGSTKSZ; -+ altstack.ss_size = alt_SIGSTKSZ; - stack_lower_bound = (char *) altstack.ss_sp; - stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1; - altstack.ss_flags = 0; /* no SS_DISABLE */ -@@ -8809,13 +8805,11 @@ else - # include - # include - #endif -- #ifndef SIGSTKSZ -- # define SIGSTKSZ 16384 -- #endif -+ #define alt_SIGSTKSZ 16384 - - static union - { -- char buffer[2 * SIGSTKSZ]; -+ char buffer[2 * alt_SIGSTKSZ]; - long double ld; - long u; - void *p; -@@ -8865,8 +8859,8 @@ else - - st.ss_flags = 0; - /* Use the midpoint to avoid Irix sigaltstack bug. */ -- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; -- st.ss_size = SIGSTKSZ; -+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ; -+ st.ss_size = alt_SIGSTKSZ; - r = sigaltstack (&st, 0); - if (r != 0) - return 1; -Index: grep-3.6/m4/c-stack.m4 -=================================================================== ---- grep-3.6.orig/m4/c-stack.m4 -+++ grep-3.6/m4/c-stack.m4 -@@ -44,13 +44,11 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR - # include - # include - #endif -- #ifndef SIGSTKSZ -- # define SIGSTKSZ 16384 -- #endif -+ #define alt_SIGSTKSZ 16384 - - static union - { -- char buffer[2 * SIGSTKSZ]; -+ char buffer[2 * alt_SIGSTKSZ]; - long double ld; - long u; - void *p; -@@ -71,8 +69,8 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR - - st.ss_flags = 0; - /* Use the midpoint to avoid Irix sigaltstack bug. */ -- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; -- st.ss_size = SIGSTKSZ; -+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ; -+ st.ss_size = alt_SIGSTKSZ; - r = sigaltstack (&st, 0); - if (r != 0) - return 1; -@@ -149,9 +147,7 @@ AC_DEFUN([AC_SYS_XSI_STACK_OVERFLOW_HEUR - #if HAVE_SYS_SIGNAL_H - # include - #endif --#ifndef SIGSTKSZ --# define SIGSTKSZ 16384 --#endif -+#define alt_SIGSTKSZ 16384 - volatile char *stack_lower_bound; - volatile char *stack_upper_bound; - static void check_stack_location (volatile char *addr) -@@ -168,12 +164,12 @@ static void stackoverflow_handler (int s - } - int main () - { -- char mystack[2 * SIGSTKSZ]; -+ char mystack[2 * alt_SIGSTKSZ]; - stack_t altstack; - struct sigaction action; - /* Install the alternate stack. */ -- altstack.ss_sp = mystack + SIGSTKSZ; -- altstack.ss_size = SIGSTKSZ; -+ altstack.ss_sp = mystack + alt_SIGSTKSZ; -+ altstack.ss_size = alt_SIGSTKSZ; - stack_lower_bound = (char *) altstack.ss_sp; - stack_upper_bound = (char *) altstack.ss_sp + altstack.ss_size - 1; - altstack.ss_flags = 0; /* no SS_DISABLE */ -@@ -223,13 +219,11 @@ int main () - # include - # include - #endif -- #ifndef SIGSTKSZ -- # define SIGSTKSZ 16384 -- #endif -+ #define alt_SIGSTKSZ 16384 - - static union - { -- char buffer[2 * SIGSTKSZ]; -+ char buffer[2 * alt_SIGSTKSZ]; - long double ld; - long u; - void *p; -@@ -279,8 +273,8 @@ int main () - - st.ss_flags = 0; - /* Use the midpoint to avoid Irix sigaltstack bug. */ -- st.ss_sp = alternate_signal_stack.buffer + SIGSTKSZ; -- st.ss_size = SIGSTKSZ; -+ st.ss_sp = alternate_signal_stack.buffer + alt_SIGSTKSZ; -+ st.ss_size = alt_SIGSTKSZ; - r = sigaltstack (&st, 0); - if (r != 0) - return 1; diff --git a/grep-3.6.tar.xz b/grep-3.6.tar.xz deleted file mode 100644 index 8a75322..0000000 --- a/grep-3.6.tar.xz +++ /dev/null @@ -1,3 +0,0 @@ -version https://git-lfs.github.com/spec/v1 -oid sha256:667e15e8afe189e93f9f21a7cd3a7b3f776202f417330b248c2ad4f997d9373e -size 1589412 diff --git a/grep-3.6.tar.xz.sig b/grep-3.6.tar.xz.sig deleted file mode 100644 index d4b61be..0000000 --- a/grep-3.6.tar.xz.sig +++ /dev/null @@ -1,16 +0,0 @@ ------BEGIN PGP SIGNATURE----- - -iQIzBAABCgAdFiEEFV0/xQDINEhtHupnf9n8ywAL7u4FAl+oyCMACgkQf9n8ywAL -7u5mThAAgXsovlzYwyFw+CdP1bRD/eSDuafq41rD4Q0wBhazfQz85jyCkr9GP/2U -Duc4jLUJhRhkQy8yAmRIdF+jKZeJMaXyjs9w2YIsD7YU23zhOw3ewxlPss2q416w -kGAfswp41A3WenuMx8F1ueS5nLDi6L+Z0TD+IsjiRrTVqtrzxLZHrFto7prJfOsJ -pnRVVuVHgNDutLkB4vp7XChsTsYdYF7OLl0Q0t9Pv4evQXWkbCLjJJ34ynDlQSJ7 -rSNpFlV5Q1JGIksHpISYoPJHpilpkFwJODV+HMEHDyOyCEyqMsWr77zIvPGcOiaj -56uCSpOHRlSrR15Wiw/9bGXyOtN86qbnbWBjeHor/bcf9C2YqCR95LM1viDhPZF6 -L9GrdXvy7bakpuxS4wloZjCkwFhXfqE0VrkQZMhsPInraALrqcAT2hAr1/ES3dhO -cieSq4Tk09OoBXzHy0uQn+UwGgl+A4rrzS/MSOjbnt0cDKzXmP1pw9JJX8ns1/gd -8VPZ+BuX3LvOPlin/tY0uuNIwsV4QSlTTPorju0jXmlaaq3sCsKKmtkNxYXzSE+h -+Orl6vM51OwhR886NjnjztbyZJq03qvOU4/tWFps4AIOJCztZbuDj2g1eBQ3IXID -ZdvNUGA2zLF1fJlgj05fmOcwrubr2gdVODmXXk/pfvqWW8d+yfE= -=1J42 ------END PGP SIGNATURE----- diff --git a/grep-3.7.tar.xz b/grep-3.7.tar.xz new file mode 100644 index 0000000..490ecd3 --- /dev/null +++ b/grep-3.7.tar.xz @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:5c10da312460aec721984d5d83246d24520ec438dd48d7ab5a05dbc0d6d6823c +size 1641196 diff --git a/grep-3.7.tar.xz.sig b/grep-3.7.tar.xz.sig new file mode 100644 index 0000000..57576d8 --- /dev/null +++ b/grep-3.7.tar.xz.sig @@ -0,0 +1,16 @@ +-----BEGIN PGP SIGNATURE----- + +iQIzBAABCgAdFiEEFV0/xQDINEhtHupnf9n8ywAL7u4FAmEYH+0ACgkQf9n8ywAL +7u6eEA/8Cs/kVlnWvMUECPHEH5N18ga0uwZfiHC0TAL7TEqR3yakVRbiST0gPzSW +q99S6jZN8CSOCnMselyEpXjMgdb72iaSBXRxmUuXR036OIfkaHBmt0jeEd2dBadf +ATrsN+3kblWedvwh7vRERXnMRxMBysi2an4rAujOs4XIlYVZdVMW7fNmgZp3JppZ +L40fJ7VaDm4sqBQZC0IHi6dVAdrySBShtQjF59DhiWh+P2cpFDQmIqm9S3ncuuKQ +8QTsQi98mfUoyXFYeyz3cjECso2cPQgyJ7nHMyTzt2fgWuS0DYL+kvhZf2GfK5e5 +U2DjXcLhV0jSmDly1IwMyXR1uEMGwrCkGPu797DpTQdUHwfyachQ6YTOKVhXnL2/ +dw+IIffqi9govVw7hCfqg4tet/YRDR5+pmH2k3ArykX40ok91NqRPgFBR8vKZcTl +uJiO8kWdU4WMwNMWnvDaDFh7B0n2V6JxqElvXEE0TQCyJi15blwOGwY7cbLSYJyL +Ws+Sd8pOKCB9Q8TkaJQo1NyvAlpshag7dbmi39wLXc2bSmzjYwgXyvl2+UN7Ym3v +n65JP7OMjV0TgdFWklSMVg56W7bp2ZjlKQFGUPpAht0L6EdIShKhs3927ZoXEvJO +m/Fv063z9yVOUbyQVp10NLcEYcuxb9oVyfau1ykqHswMMHFMz5U= +=nTRi +-----END PGP SIGNATURE----- diff --git a/grep.changes b/grep.changes index 5df875e..1d33395 100644 --- a/grep.changes +++ b/grep.changes @@ -1,3 +1,12 @@ +------------------------------------------------------------------- +Mon Aug 16 12:05:52 UTC 2021 - Andreas Schwab + +- Update to grep 3.7 + * Preprocessing N patterns would take at least O(N^2) time when too many + patterns hashed to too few buckets +- werror-return-type.patch, gnulib-c-stack.patch: Removed +- Skip stack overflow tests in qemu build + ------------------------------------------------------------------- Tue Aug 3 12:17:24 UTC 2021 - Andreas Schwab diff --git a/grep.keyring b/grep.keyring index dfd5237..8775d53 100644 --- a/grep.keyring +++ b/grep.keyring @@ -1,3 +1,8 @@ +Member GPG keyring of grep group. + +Note that this keyring is not intended for checking releases of that group. +Use Group Release Keyring instead. + GPG keys of Bernhard Rosenkraenzer -----BEGIN PGP PUBLIC KEY BLOCK----- Version: GnuPG v2.0.0 (GNU/Linux) diff --git a/grep.spec b/grep.spec index 50d7b10..9c31914 100644 --- a/grep.spec +++ b/grep.spec @@ -17,7 +17,7 @@ Name: grep -Version: 3.6 +Version: 3.7 Release: 0 Summary: Print lines matching a pattern License: GPL-3.0-or-later @@ -28,8 +28,6 @@ Source2: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig Source3: https://savannah.gnu.org/project/memberlist-gpgkeys.php?group=grep&download=1#/%{name}.keyring Source4: profile.sh Source5: %{name}-rpmlintrc -Patch0: werror-return-type.patch -Patch1: gnulib-c-stack.patch BuildRequires: fdupes BuildRequires: makeinfo BuildRequires: pcre-devel @@ -44,12 +42,9 @@ match to a specified pattern. By default, grep prints the matching lines. %prep %autosetup -p1 -touch aclocal.m4 configure Makefile.in config.hin - %build %configure \ --disable-silent-rules \ - --without-included-regex \ %{nil} %if 0%{?do_profiling} %make_build CFLAGS="%{optflags} %{cflags_profile_generate}" @@ -61,6 +56,13 @@ touch aclocal.m4 configure Makefile.in config.hin %endif %check +%if 0%{?qemu_user_space_build} +echo exit 77 > tests/stack-overflow +echo exit 77 > tests/pcre-jitstack +echo exit 77 > gnulib-tests/test-c-stack.sh +echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow1.c +echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow2.c +%endif %make_build check %install diff --git a/profile.sh b/profile.sh index 5569668..bc14be4 100644 --- a/profile.sh +++ b/profile.sh @@ -8,7 +8,7 @@ grep=src/grep t=COPYING exec > /dev/null -for param in "" "-v" "-i" "-h" "-H" "-l" "-L" "-q" "-n" "-Z" "-E" "-F" "-P" "-e" "-w" "-c" "-o" ; do - $grep $param "GNU" $t - $grep $param "G.*U" $t +for param in "" -v -i -h -H -l -L -q -n -Z -E -F -P -e -w -c -o; do + $grep $param "GNU" $t + $grep $param "G.*U" $t done diff --git a/werror-return-type.patch b/werror-return-type.patch deleted file mode 100644 index a68fd6c..0000000 --- a/werror-return-type.patch +++ /dev/null @@ -1,58 +0,0 @@ -From f60dd0747ad75c2971cc314111c8fc2b8a38ce19 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Sat, 21 Nov 2020 18:09:29 -0800 -Subject: [PATCH] nl_langinfo-tests: work around GCC bug 44511 - -* tests/test-nl_langinfo-mt.c: Ignore -Wreturn-type, to work -around a GCC bug . -Problem reported for GNU grep by Andreas Schwab -. - -Index: grep-3.6/gnulib-tests/test-nl_langinfo-mt.c -=================================================================== ---- grep-3.6.orig/gnulib-tests/test-nl_langinfo-mt.c -+++ grep-3.6/gnulib-tests/test-nl_langinfo-mt.c -@@ -18,6 +18,11 @@ - - #include - -+/* Work around GCC bug 44511. */ -+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) -+# pragma GCC diagnostic ignored "-Wreturn-type" -+#endif -+ - #if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS - - /* Specification. */ -Index: grep-3.6/gnulib-tests/test-setlocale_null-mt-all.c -=================================================================== ---- grep-3.6.orig/gnulib-tests/test-setlocale_null-mt-all.c -+++ grep-3.6/gnulib-tests/test-setlocale_null-mt-all.c -@@ -18,6 +18,11 @@ - - #include - -+/* Work around GCC bug 44511. */ -+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) -+# pragma GCC diagnostic ignored "-Wreturn-type" -+#endif -+ - #if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS - - /* Specification. */ -Index: grep-3.6/gnulib-tests/test-setlocale_null-mt-one.c -=================================================================== ---- grep-3.6.orig/gnulib-tests/test-setlocale_null-mt-one.c -+++ grep-3.6/gnulib-tests/test-setlocale_null-mt-one.c -@@ -18,6 +18,11 @@ - - #include - -+/* Work around GCC bug 44511. */ -+#if 4 < __GNUC__ + (3 <= __GNUC_MINOR__) -+# pragma GCC diagnostic ignored "-Wreturn-type" -+#endif -+ - #if USE_ISOC_THREADS || USE_POSIX_THREADS || USE_ISOC_AND_POSIX_THREADS || USE_WINDOWS_THREADS - - /* Specification. */