From bd8584a266a1f14312315442a639917681cec29fc83d0647ccdc9d15022f907c Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 10 Apr 2024 09:04:40 +0000 Subject: [PATCH 1/5] =?UTF-8?q?-=20split=20the=20deprecated=20egrep/fgrep?= =?UTF-8?q?=20into=20a=20deprecated=20subpackage=20=20=20to=20be=20able=20?= =?UTF-8?q?to=20identify=20remaining=20usages=20=20=20=20=20also=20match?= =?UTF-8?q?=20e.g.,=20the=20Arabic=20digits:=20=D9=A0=D9=A1=D9=A2=D9=A3?= =?UTF-8?q?=D9=A4=D9=A5=D9=A6=D9=A7=D9=A8=D9=A9.=20=20=20*=20The=20-s=20op?= =?UTF-8?q?tion=20no=20longer=20suppresses=20"binary=20file=20matches"=20-?= =?UTF-8?q?=20use=20release=20keyring=20rather=20than=20full=20one=20for?= =?UTF-8?q?=20validation=20-=20Make=20profiling=20deterministic=20(bsc#104?= =?UTF-8?q?0589,=20SLE-24115)=20=20=20*=20--files-without-match=20(-L)=20b?= =?UTF-8?q?ehavior=20reverted=20to=20again=20succeed=20=20=20*=20When=20st?= =?UTF-8?q?andard=20output=20is=20/dev/null,=20grep=20no=20longer=20fails?= =?UTF-8?q?=20when=20-=20Drop=20upstreamed=20proc-lseek-glitch.patch=20=20?= =?UTF-8?q?=20=20=20an=20invalid=20regular=20expression=20that=20was=20rea?= =?UTF-8?q?d=20from=20an=20=20=20*=20grep=20-z=20would=20match=20strings?= =?UTF-8?q?=20it=20should=20not.=20=20To=20trigger=20the=20bug,=20=20=20?= =?UTF-8?q?=20=20you'd=20have=20to=20use=20a=20regular=20expression=20incl?= =?UTF-8?q?uding=20an=20anchor=20=20=20=20=20(^=20or=20$)=20and=20a=20feat?= =?UTF-8?q?ure=20like=20a=20range=20or=20a=20backreference,=20causing=20?= =?UTF-8?q?=20=20=20=20With=20a=20multibyte=20locale,=20that=20matcher=20c?= =?UTF-8?q?ould=20mistakenly=20match=20a=20=20=20=20=20string=20containing?= =?UTF-8?q?=20a=20newline.=20For=20example,=20this=20command:=20=20=20=20?= =?UTF-8?q?=20would=20mistakenly=20match=20and=20print=20all=20four=20inpu?= =?UTF-8?q?t=20bytes.=20=20After=20=20=20*=20grep=20-Pz=20now=20diagnoses?= =?UTF-8?q?=20attempts=20to=20use=20patterns=20containing=20^=20=20=20=20?= =?UTF-8?q?=20and=20$,=20instead=20of=20mishandling=20these=20patterns.=20?= =?UTF-8?q?=20This=20problem=20=20=20=20=20seems=20to=20be=20inherent=20to?= =?UTF-8?q?=20the=20PCRE=20API;=20removing=20this=20limitation=20=20=20=20?= =?UTF-8?q?=20is=20on=20PCRE's=20maint/README=20wish=20list.=20=20Patterns?= =?UTF-8?q?=20can=20continue=20to=20=20=20=20=20match=20literal=20^=20and?= =?UTF-8?q?=20$=20by=20escaping=20them=20with=20\=20(now=20needed=20even?= =?UTF-8?q?=20=20=20*=20Binary=20files=20are=20now=20less=20likely=20to=20?= =?UTF-8?q?generate=20diagnostics=20and=20=20=20=20=20more=20likely=20to?= =?UTF-8?q?=20yield=20text=20matches.=20=20grep=20now=20reports=20"Binary?= =?UTF-8?q?=20=20=20=20=20file=20FOO=20matches"=20and=20suppresses=20furth?= =?UTF-8?q?er=20output=20instead=20of=20=20=20=20=20outputting=20a=20line?= =?UTF-8?q?=20containing=20an=20encoding=20error;=20hence=20grep=20can=20?= =?UTF-8?q?=20=20=20=20now=20report=20matching=20text=20before=20a=20later?= =?UTF-8?q?=20binary=20match.=20=20=20=20=20Formerly,=20grep=20reported=20?= =?UTF-8?q?FOO=20to=20be=20binary=20when=20it=20found=20an=20=20=20=20=20e?= =?UTF-8?q?ncoding=20error=20in=20FOO=20before=20generating=20output=20for?= =?UTF-8?q?=20FOO,=20which=20=20=20=20=20meant=20it=20never=20reported=20b?= =?UTF-8?q?oth=20matching=20text=20and=20matching=20binary=20=20=20=20=20d?= =?UTF-8?q?ata;=20this=20was=20less=20useful=20for=20searching=20text=20co?= =?UTF-8?q?ntaining?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=140 --- grep.changes | 156 ++++++++++++++++++++++++++------------------------- grep.spec | 32 ++++++++--- 2 files changed, 106 insertions(+), 82 deletions(-) diff --git a/grep.changes b/grep.changes index 93629c6..f72f338 100644 --- a/grep.changes +++ b/grep.changes @@ -1,3 +1,9 @@ +------------------------------------------------------------------- +Fri Jan 26 10:05:59 UTC 2024 - Dirk Müller + +- split the deprecated egrep/fgrep into a deprecated subpackage + to be able to identify remaining usages + ------------------------------------------------------------------- Wed Aug 16 14:21:13 UTC 2023 - Dominique Leuenberger @@ -24,7 +30,7 @@ Thu Mar 30 07:41:18 UTC 2023 - Dirk Müller * With -P, \d now matches only ASCII digits, regardless of PCRE options/modes. The changes in grep-3.9 to make ^H and \w work properly had the undesirable side effect of making \d - also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. + also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. With grep-3.9, -P '\d+' would match that ten-digit (20-byte) string. Now, to match such a digit, you would use \p{Nd}. Similarly, \D is now mapped to [^0-9]. @@ -63,7 +69,7 @@ Sun Sep 4 10:13:04 UTC 2022 - Andreas Stieger POSIXLY_CORRECT is set, since POSIX now allows the GNU behavior * In locales using UTF-8 encoding, the regular expression '.' no longer sometimes fails to match Unicode characters - * The -s option no longer suppresses "binary file matches" + * The -s option no longer suppresses "binary file matches" messages. - doc: fix man page syntax errors (bsc#1201001) @@ -75,7 +81,7 @@ Wed Aug 3 12:26:44 UTC 2022 - Andreas Schwab ------------------------------------------------------------------- Tue May 24 19:42:42 UTC 2022 - Dirk Müller -- use release keyring rather than full one for validation +- use release keyring rather than full one for validation ------------------------------------------------------------------- Tue May 24 14:15:24 UTC 2022 - Stephan Kulow @@ -85,7 +91,7 @@ Tue May 24 14:15:24 UTC 2022 - Stephan Kulow ------------------------------------------------------------------- Tue Mar 15 21:51:41 UTC 2022 - Bernhard Wiedemann -- Make profiling deterministic (bsc#1040589) +- Make profiling deterministic (bsc#1040589, SLE-24115) ------------------------------------------------------------------- Sat Feb 12 13:40:18 UTC 2022 - Dirk Müller @@ -136,7 +142,7 @@ Mon Sep 28 08:54:47 UTC 2020 - Andreas Stieger - grep 3.5: * message for matching binary files now sent to stderr, and changed - * --files-without-match (-L) behavior reverted to again succeed + * --files-without-match (-L) behavior reverted to again succeed when a line is selected, not when a file is listed * various bug fixes - drop gnulib-test-avoid-FP-perror-strerror.patch, upstream @@ -251,12 +257,12 @@ Wed Feb 8 09:56:26 UTC 2017 - mpluskal@suse.com * Improve performance for -E or -G pattern lists that are easily converted to -F format. * Fix performance regression with multiple patterns. - * When standard output is /dev/null, grep no longer fails when + * When standard output is /dev/null, grep no longer fails when standard input is a file in the Linux /proc file system, or when standard input is a pipe and standard output is in append mode. * When grep -Fo finds matches of differing length, it could mistakenly print a shorter one. Now it prints a longest one. -- Drop upstreamed proc-lseek-glitch.patch +- Drop upstreamed proc-lseek-glitch.patch ------------------------------------------------------------------- Mon Dec 12 16:51:24 UTC 2016 - schwab@suse.de @@ -305,7 +311,7 @@ Fri Oct 28 13:01:39 UTC 2016 - astieger@suse.com * In multibyte locales, grep now handles leading "." in patterns more efficiently. * grep now prints a "FILENAME:LINENO: " prefix when diagnosing - an invalid regular expression that was read from an + an invalid regular expression that was read from an '-f'-specified file. ------------------------------------------------------------------- @@ -324,56 +330,56 @@ Fri Apr 22 13:49:18 UTC 2016 - astieger@suse.com Fri Mar 11 09:30:02 UTC 2016 - mpluskal@suse.com - Update to 2.24 - * grep -z would match strings it should not. To trigger the bug, - you'd have to use a regular expression including an anchor - (^ or $) and a feature like a range or a backreference, causing + * grep -z would match strings it should not. To trigger the bug, + you'd have to use a regular expression including an anchor + (^ or $) and a feature like a range or a backreference, causing grep to forego its DFA matcher and resort to using re_search. - With a multibyte locale, that matcher could mistakenly match a - string containing a newline. For example, this command: + With a multibyte locale, that matcher could mistakenly match a + string containing a newline. For example, this command: printf 'a\nb\0' | LC_ALL=en_US.utf-8 grep -z '^[a-b]*b' - would mistakenly match and print all four input bytes. After + would mistakenly match and print all four input bytes. After the fix, there is no match, as expected. [bug introduced in grep-2.7] - * grep -Pz now diagnoses attempts to use patterns containing ^ - and $, instead of mishandling these patterns. This problem - seems to be inherent to the PCRE API; removing this limitation - is on PCRE's maint/README wish list. Patterns can continue to - match literal ^ and $ by escaping them with \ (now needed even + * grep -Pz now diagnoses attempts to use patterns containing ^ + and $, instead of mishandling these patterns. This problem + seems to be inherent to the PCRE API; removing this limitation + is on PCRE's maint/README wish list. Patterns can continue to + match literal ^ and $ by escaping them with \ (now needed even inside [...]). [bug introduced in grep-2.5] ------------------------------------------------------------------- Fri Feb 5 08:01:46 UTC 2016 - mpluskal@suse.com - Update to 2.23 - * Binary files are now less likely to generate diagnostics and - more likely to yield text matches. grep now reports "Binary - file FOO matches" and suppresses further output instead of - outputting a line containing an encoding error; hence grep can - now report matching text before a later binary match. - Formerly, grep reported FOO to be binary when it found an - encoding error in FOO before generating output for FOO, which - meant it never reported both matching text and matching binary - data; this was less useful for searching text containing - encoding errors in non-matching lines. [bug introduced in + * Binary files are now less likely to generate diagnostics and + more likely to yield text matches. grep now reports "Binary + file FOO matches" and suppresses further output instead of + outputting a line containing an encoding error; hence grep can + now report matching text before a later binary match. + Formerly, grep reported FOO to be binary when it found an + encoding error in FOO before generating output for FOO, which + meant it never reported both matching text and matching binary + data; this was less useful for searching text containing + encoding errors in non-matching lines. [bug introduced in grep-2.21] - * grep -c no longer stops counting when finding binary data. + * grep -c no longer stops counting when finding binary data. [bug introduced in grep-2.21] - * grep no longer outputs encoding errors in unibyte locales. For + * grep no longer outputs encoding errors in unibyte locales. For example, if the byte '\x81' is not a valid character in a - unibyte locale, grep treats the byte as binary data. [bug + unibyte locale, grep treats the byte as binary data. [bug introduced in grep-2.21] - * grep -oP is no longer susceptible to an infinite loop when - processing invalid UTF8 just before a match. [bug introduced in + * grep -oP is no longer susceptible to an infinite loop when + processing invalid UTF8 just before a match. [bug introduced in grep-2.22] - * --exclude and related options are now matched against trailing + * --exclude and related options are now matched against trailing parts of command-line arguments, not against the entire - arguments. This partly reverts the --exclude-related change + arguments. This partly reverts the --exclude-related change in 2.22. [bug introduced in grep-2.22] - * --line-buffer is no longer ineffective when combined with -l. + * --line-buffer is no longer ineffective when combined with -l. [bug introduced in grep-2.5] - * -xw is now equivalent to -x more consistently, with -P and + * -xw is now equivalent to -x more consistently, with -P and with backrefs. [bug only partially fixed in grep-2.19] -- Update info handling scriplets +- Update info handling scriplets * move from postun to preun * add dependeny for preun - Refresh partially upstreamed patch @@ -429,7 +435,7 @@ Fri Nov 28 15:49:19 UTC 2014 - andreas.stieger@gmx.de * performance improved for rejecting data that cannot match even the first part of a nontrivial pattern. * performance improved for very long strings in patterns. - * If a file contains data improperly encoded for the current + * If a file contains data improperly encoded for the current locale, and this is discovered before any of the file's contents are output, grep now treats the file as binary. * -P no longer reports an error and exits when given invalid UTF-8 @@ -440,9 +446,9 @@ Fri Nov 28 15:49:19 UTC 2014 - andreas.stieger@gmx.de * grep in a non-UTF8 multibyte locale could mistakenly match in the middle of a multibyte character when using a '^'-anchored alternate in a pattern, leading it to print non-matching lines. - * grep -F Y no longer fails to match in non-UTF8 multibyte locales + * grep -F Y no longer fails to match in non-UTF8 multibyte locales * grep -E rejected unmatched ')', instead of treating it like '\)'. - + - Changes in behavior: * The GREP_OPTIONS environment variable is now obsolescent * In locales with multibyte character encodings other than UTF-8, @@ -491,7 +497,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de patterns the same way the GNU regular expression matcher treats them, with respect to whether the errors can match parts of multibyte characters in data. - * grep -w no longer mishandles a potential match adjacent to a + * grep -w no longer mishandles a potential match adjacent to a letter that takes up two or more bytes in a multibyte encoding. Similarly, the patterns '\<', '\>', '\b', and '\B' no longer mishandle word-boundary matches in multibyte locales. @@ -501,7 +507,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de * grep -P now works with -w and -x and backreferences. Before, echo aa|grep -Pw '(.)\1' would fail to match, yet echo aa|grep -Pw '(.)\2' would match. - * grep -Pw now works like grep -w in that the matched string has + * grep -Pw now works like grep -w in that the matched string has to be preceded and followed by non-word components or the beginning and end of the line (as opposed to word boundaries before). Before, this @@ -510,7 +516,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de per the documentation on how grep's -w works. * grep -i no longer mishandles patterns containing titlecase characters. For example, in a locale containing the titlecase - character 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER + character 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER J), 'grep -i Lj' now matches both 'LJ' (U+01C7 LATIN CAPITAL LETTER LJ) and 'lj' (U+01C9 LATIN SMALL LETTER LJ). - remove mb-non-UTF8-performance.patch, committed upstream @@ -532,7 +538,7 @@ Sat Feb 22 19:19:46 UTC 2014 - andreas.stieger@gmx.de ------------------------------------------------------------------- Wed Feb 19 10:32:43 UTC 2014 - mvyskocil@suse.com -- update to 2.17 +- update to 2.17 * grep -i in a multibyte locale is now typically 10 times faster for patterns that do not contain \ or [ * grep (without -i) in a multibyte locale is now up to 7 times faster @@ -617,7 +623,7 @@ Fri Aug 24 20:29:59 CEST 2012 - pth@suse.de no output. E.g., seq 2 | LC_ALL=en_US.utf8 grep -il '^$' would mistakenly print "(standard input)". Related, seq 9 | LC_ALL=en_US.utf8 grep -in '^$' would print "2:4:6:8:10:12:14:16" - and exit 0. Now it prints nothing and exits with status of 1. + and exit 0. Now it prints nothing and exits with status of 1. [bug introduced in grep-2.6] * 'grep' no longer falsely reports text files as being binary on @@ -660,21 +666,21 @@ Mon May 21 18:19:15 UTC 2012 - tabraham@novell.com - Update to 2.12: * "echp P|grep --devices=skip P" once again prints P, as it did in 2.10 [bug introduced in grep-2.11] - * grep no longer segfaults with -r --exclude-dir and no file + * grep no longer segfaults with -r --exclude-dir and no file operand. I.e., ":|grep -r --exclude-dir=D PAT" would segfault. [bug introduced in grep-2.11] * Recursive grep now uses fts for directory traversal, so it can - handle much-larger directories without reporting things like - "Filename too long", and it can run much faster when dealing - with large directory hierarchies. [bug present since the + handle much-larger directories without reporting things like + "Filename too long", and it can run much faster when dealing + with large directory hierarchies. [bug present since the beginning] - * grep -E 'a{1000000000}' now reports an overflow error rather + * grep -E 'a{1000000000}' now reports an overflow error rather than silently acting like grep -E 'a\{1000000000}'. * The -R option now has a long-option alias --dereference-recursive. - * The -r (--recursive) option now follows only command-line - symlinks. Also, by default -r now reads a device only if it is - named on the command line; this can be overridden with --devices. - -R acts as before, so use -R if you prefer the old behavior of + * The -r (--recursive) option now follows only command-line + symlinks. Also, by default -r now reads a device only if it is + named on the command line; this can be overridden with --devices. + -R acts as before, so use -R if you prefer the old behavior of following all symlinks and defaulting to reading all devices. ------------------------------------------------------------------- @@ -686,11 +692,11 @@ Thu Apr 19 17:43:06 CEST 2012 - meissner@suse.de Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com - Update to 2.11: - * grep no longer dumps core on lines whose lengths do not fit in + * grep no longer dumps core on lines whose lengths do not fit in 'int'. (e.g., lines longer than 2 GiB on a typical 64-bit host). Instead, grep either works as expected, or reports an error. - An error can occur if not enough main memory is available, or if - the GNU C library's regular expression functions cannot handle + An error can occur if not enough main memory is available, or if + the GNU C library's regular expression functions cannot handle such long lines. [bug present since "the beginning"] * The -m, -A, -B, and -C options no longer mishandle context line counts that do not fit in 'int'. Also, grep -c's counts are now @@ -700,14 +706,14 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com as if it were a text file. For example, "grep x ." now reports a read error on most systems; formerly, it ignored the error. [bug introduced in grep-2.5] - * grep now exits with status 2 if a directory loop is found, instead - of possibly exiting with status 0 or 1. [bug introduced in + * grep now exits with status 2 if a directory loop is found, instead + of possibly exiting with status 0 or 1. [bug introduced in grep-2.3] - * The -s option now suppresses certain input error diagnostics that - it formerly failed to suppress. These include errors when closing - the input, when lseeking the input, and when the input is also the + * The -s option now suppresses certain input error diagnostics that + it formerly failed to suppress. These include errors when closing + the input, when lseeking the input, and when the input is also the output. [bug introduced in grep-2.4] - * On POSIX systems, commands like "grep PAT < FILE >> FILE" now report + * On POSIX systems, commands like "grep PAT < FILE >> FILE" now report an error instead of looping. [bug present since "the beginning"] * The --include, --exclude, and --exclude-dir options now handle command-line arguments more consistently. --include and --exclude @@ -717,7 +723,7 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com * grep no longer rejects "grep -qr . > out", i.e., when run with -q and an input file is the same as the output file, since with -q grep generates no output, so there is no risk of infinite loop or - of an output-affecting race condition. Thus, the use of the + of an output-affecting race condition. Thus, the use of the following options also disables the input-equals-output failure: --max-count=N (-m) (for N >= 2) --files-with-matches (-l) @@ -727,7 +733,7 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com invoked with the -r option. * grep no longer misinterprets some alternations involving anchors (^, $, \< \> \B, \b). For example, grep -E "(^|\B)a" no - longer reports a match for the string "x a". [bug present since + longer reports a match for the string "x a". [bug present since "the beginning"] * If no file operand is given, and a command-line -r or equivalent option is given, grep now searches the working directory. Formerly @@ -745,11 +751,11 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com - changes from 2.10: * grep no longer mishandles high-bit-set pattern bytes on systems - where "char" is a signed type. [bug appears to affect only + where "char" is a signed type. [bug appears to affect only MS-Windows] - * On POSIX systems, grep now rejects a command like - "grep -r pattern . > out", in which the output file is also one - of the inputs, because it can result in an "infinite" disk-filling + * On POSIX systems, grep now rejects a command like + "grep -r pattern . > out", in which the output file is also one + of the inputs, because it can result in an "infinite" disk-filling loop. [bug present since "the beginning"] - removed fix-testsuite.diff obsoleted by this release @@ -784,7 +790,7 @@ Tue Sep 27 12:42:54 CEST 2011 - dmueller@suse.de ------------------------------------------------------------------- Wed Aug 10 03:17:41 UTC 2011 - crrodriguez@opensuse.org -- Upgrade to version 2.9 +- Upgrade to version 2.9 * grep no longer clobbers heap for an ERE like '(^| )*( |$)'' )' * grep -P no longer aborts when PCRE's backtracking limit is exceeded * grep's interpretation of range expression is now more consistent @@ -848,7 +854,7 @@ Thu Jun 11 21:46:26 CEST 2009 - coolo@novell.com ------------------------------------------------------------------- Thu Jun 4 17:41:19 CEST 2009 - crrodriguez@suse.de -- link pcre library dynamically +- link pcre library dynamically ------------------------------------------------------------------- Wed Feb 11 14:09:00 CET 2009 - schwab@suse.de @@ -991,7 +997,7 @@ Mon Jul 21 17:02:26 CEST 2003 - schwab@suse.de ------------------------------------------------------------------- Fri Jun 20 02:29:15 CEST 2003 - ro@suse.de -- build with current gettext +- build with current gettext ------------------------------------------------------------------- Wed Apr 30 18:35:32 CEST 2003 - schwab@suse.de @@ -1042,7 +1048,7 @@ Wed Apr 3 16:46:19 CEST 2002 - schwab@suse.de ------------------------------------------------------------------- Wed Apr 3 16:21:16 CEST 2002 - ro@suse.de -- build with current autoconf/automake +- build with current autoconf/automake ------------------------------------------------------------------- Tue Feb 5 10:57:56 CET 2002 - schwab@suse.de diff --git a/grep.spec b/grep.spec index 8dd63e4..f5935cc 100644 --- a/grep.spec +++ b/grep.spec @@ -1,7 +1,7 @@ # # spec file for package grep # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,13 +33,27 @@ Patch0: efgrep-warning.patch BuildRequires: fdupes BuildRequires: glibc-locale BuildRequires: makeinfo +BuildRequires: pkgconfig BuildRequires: pkgconfig(libpcre2-8) +Recommends: grep-deprecated = %{version} Provides: base:%{_bindir}/grep %description The grep command searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines. +%package deprecated +Summary: Grep - deprecated aliases +Provides: grep:%{_bindir}/egrep +Requires: %{NAME} = %{version} + +%description deprecated +The grep command searches one or more input files for lines containing a +match to a specified pattern. By default, grep prints the matching lines. + +This package provides the deprecated aliases "egrep" and "fgrep". please +use "grep -E" and "grep -F" going forward. + %lang_package %prep @@ -71,7 +85,7 @@ echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow %install %make_install -%if 0%{?suse_version} < 1550 +%if 0%{?suse_version} && 0%{?suse_version} < 1550 install -d %{buildroot}/bin ln -sf %{_bindir}/egrep %{buildroot}/bin/egrep ln -sf %{_bindir}/fgrep %{buildroot}/bin/fgrep @@ -83,17 +97,21 @@ ln -sf %{_bindir}/grep %{buildroot}/bin/grep %files %license COPYING %doc README AUTHORS NEWS THANKS TODO ChangeLog* -%if 0%{?suse_version} < 1550 -/bin/egrep -/bin/fgrep +%if 0%{?suse_version} && 0%{?suse_version} < 1550 /bin/grep %endif -%{_bindir}/egrep -%{_bindir}/fgrep %{_bindir}/grep %{_mandir}/man1/grep.1%{?ext_man} %{_infodir}/grep.info%{?ext_info} +%files deprecated +%if 0%{?suse_version} && 0%{?suse_version} < 1550 +/bin/egrep +/bin/fgrep +%endif +%{_bindir}/egrep +%{_bindir}/fgrep + %files lang -f %{name}.lang %changelog From 73755957287ce8dad2b33516126b965b71c908bd8646c6acafa148903de16c3e Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 10 Apr 2024 09:05:04 +0000 Subject: [PATCH 2/5] osc copypac from project:openSUSE:Factory package:grep revision:90, using expand OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=141 --- grep.changes | 156 +++++++++++++++++++++++++-------------------------- grep.spec | 32 +++-------- 2 files changed, 82 insertions(+), 106 deletions(-) diff --git a/grep.changes b/grep.changes index f72f338..93629c6 100644 --- a/grep.changes +++ b/grep.changes @@ -1,9 +1,3 @@ -------------------------------------------------------------------- -Fri Jan 26 10:05:59 UTC 2024 - Dirk Müller - -- split the deprecated egrep/fgrep into a deprecated subpackage - to be able to identify remaining usages - ------------------------------------------------------------------- Wed Aug 16 14:21:13 UTC 2023 - Dominique Leuenberger @@ -30,7 +24,7 @@ Thu Mar 30 07:41:18 UTC 2023 - Dirk Müller * With -P, \d now matches only ASCII digits, regardless of PCRE options/modes. The changes in grep-3.9 to make ^H and \w work properly had the undesirable side effect of making \d - also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. + also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. With grep-3.9, -P '\d+' would match that ten-digit (20-byte) string. Now, to match such a digit, you would use \p{Nd}. Similarly, \D is now mapped to [^0-9]. @@ -69,7 +63,7 @@ Sun Sep 4 10:13:04 UTC 2022 - Andreas Stieger POSIXLY_CORRECT is set, since POSIX now allows the GNU behavior * In locales using UTF-8 encoding, the regular expression '.' no longer sometimes fails to match Unicode characters - * The -s option no longer suppresses "binary file matches" + * The -s option no longer suppresses "binary file matches" messages. - doc: fix man page syntax errors (bsc#1201001) @@ -81,7 +75,7 @@ Wed Aug 3 12:26:44 UTC 2022 - Andreas Schwab ------------------------------------------------------------------- Tue May 24 19:42:42 UTC 2022 - Dirk Müller -- use release keyring rather than full one for validation +- use release keyring rather than full one for validation ------------------------------------------------------------------- Tue May 24 14:15:24 UTC 2022 - Stephan Kulow @@ -91,7 +85,7 @@ Tue May 24 14:15:24 UTC 2022 - Stephan Kulow ------------------------------------------------------------------- Tue Mar 15 21:51:41 UTC 2022 - Bernhard Wiedemann -- Make profiling deterministic (bsc#1040589, SLE-24115) +- Make profiling deterministic (bsc#1040589) ------------------------------------------------------------------- Sat Feb 12 13:40:18 UTC 2022 - Dirk Müller @@ -142,7 +136,7 @@ Mon Sep 28 08:54:47 UTC 2020 - Andreas Stieger - grep 3.5: * message for matching binary files now sent to stderr, and changed - * --files-without-match (-L) behavior reverted to again succeed + * --files-without-match (-L) behavior reverted to again succeed when a line is selected, not when a file is listed * various bug fixes - drop gnulib-test-avoid-FP-perror-strerror.patch, upstream @@ -257,12 +251,12 @@ Wed Feb 8 09:56:26 UTC 2017 - mpluskal@suse.com * Improve performance for -E or -G pattern lists that are easily converted to -F format. * Fix performance regression with multiple patterns. - * When standard output is /dev/null, grep no longer fails when + * When standard output is /dev/null, grep no longer fails when standard input is a file in the Linux /proc file system, or when standard input is a pipe and standard output is in append mode. * When grep -Fo finds matches of differing length, it could mistakenly print a shorter one. Now it prints a longest one. -- Drop upstreamed proc-lseek-glitch.patch +- Drop upstreamed proc-lseek-glitch.patch ------------------------------------------------------------------- Mon Dec 12 16:51:24 UTC 2016 - schwab@suse.de @@ -311,7 +305,7 @@ Fri Oct 28 13:01:39 UTC 2016 - astieger@suse.com * In multibyte locales, grep now handles leading "." in patterns more efficiently. * grep now prints a "FILENAME:LINENO: " prefix when diagnosing - an invalid regular expression that was read from an + an invalid regular expression that was read from an '-f'-specified file. ------------------------------------------------------------------- @@ -330,56 +324,56 @@ Fri Apr 22 13:49:18 UTC 2016 - astieger@suse.com Fri Mar 11 09:30:02 UTC 2016 - mpluskal@suse.com - Update to 2.24 - * grep -z would match strings it should not. To trigger the bug, - you'd have to use a regular expression including an anchor - (^ or $) and a feature like a range or a backreference, causing + * grep -z would match strings it should not. To trigger the bug, + you'd have to use a regular expression including an anchor + (^ or $) and a feature like a range or a backreference, causing grep to forego its DFA matcher and resort to using re_search. - With a multibyte locale, that matcher could mistakenly match a - string containing a newline. For example, this command: + With a multibyte locale, that matcher could mistakenly match a + string containing a newline. For example, this command: printf 'a\nb\0' | LC_ALL=en_US.utf-8 grep -z '^[a-b]*b' - would mistakenly match and print all four input bytes. After + would mistakenly match and print all four input bytes. After the fix, there is no match, as expected. [bug introduced in grep-2.7] - * grep -Pz now diagnoses attempts to use patterns containing ^ - and $, instead of mishandling these patterns. This problem - seems to be inherent to the PCRE API; removing this limitation - is on PCRE's maint/README wish list. Patterns can continue to - match literal ^ and $ by escaping them with \ (now needed even + * grep -Pz now diagnoses attempts to use patterns containing ^ + and $, instead of mishandling these patterns. This problem + seems to be inherent to the PCRE API; removing this limitation + is on PCRE's maint/README wish list. Patterns can continue to + match literal ^ and $ by escaping them with \ (now needed even inside [...]). [bug introduced in grep-2.5] ------------------------------------------------------------------- Fri Feb 5 08:01:46 UTC 2016 - mpluskal@suse.com - Update to 2.23 - * Binary files are now less likely to generate diagnostics and - more likely to yield text matches. grep now reports "Binary - file FOO matches" and suppresses further output instead of - outputting a line containing an encoding error; hence grep can - now report matching text before a later binary match. - Formerly, grep reported FOO to be binary when it found an - encoding error in FOO before generating output for FOO, which - meant it never reported both matching text and matching binary - data; this was less useful for searching text containing - encoding errors in non-matching lines. [bug introduced in + * Binary files are now less likely to generate diagnostics and + more likely to yield text matches. grep now reports "Binary + file FOO matches" and suppresses further output instead of + outputting a line containing an encoding error; hence grep can + now report matching text before a later binary match. + Formerly, grep reported FOO to be binary when it found an + encoding error in FOO before generating output for FOO, which + meant it never reported both matching text and matching binary + data; this was less useful for searching text containing + encoding errors in non-matching lines. [bug introduced in grep-2.21] - * grep -c no longer stops counting when finding binary data. + * grep -c no longer stops counting when finding binary data. [bug introduced in grep-2.21] - * grep no longer outputs encoding errors in unibyte locales. For + * grep no longer outputs encoding errors in unibyte locales. For example, if the byte '\x81' is not a valid character in a - unibyte locale, grep treats the byte as binary data. [bug + unibyte locale, grep treats the byte as binary data. [bug introduced in grep-2.21] - * grep -oP is no longer susceptible to an infinite loop when - processing invalid UTF8 just before a match. [bug introduced in + * grep -oP is no longer susceptible to an infinite loop when + processing invalid UTF8 just before a match. [bug introduced in grep-2.22] - * --exclude and related options are now matched against trailing + * --exclude and related options are now matched against trailing parts of command-line arguments, not against the entire - arguments. This partly reverts the --exclude-related change + arguments. This partly reverts the --exclude-related change in 2.22. [bug introduced in grep-2.22] - * --line-buffer is no longer ineffective when combined with -l. + * --line-buffer is no longer ineffective when combined with -l. [bug introduced in grep-2.5] - * -xw is now equivalent to -x more consistently, with -P and + * -xw is now equivalent to -x more consistently, with -P and with backrefs. [bug only partially fixed in grep-2.19] -- Update info handling scriplets +- Update info handling scriplets * move from postun to preun * add dependeny for preun - Refresh partially upstreamed patch @@ -435,7 +429,7 @@ Fri Nov 28 15:49:19 UTC 2014 - andreas.stieger@gmx.de * performance improved for rejecting data that cannot match even the first part of a nontrivial pattern. * performance improved for very long strings in patterns. - * If a file contains data improperly encoded for the current + * If a file contains data improperly encoded for the current locale, and this is discovered before any of the file's contents are output, grep now treats the file as binary. * -P no longer reports an error and exits when given invalid UTF-8 @@ -446,9 +440,9 @@ Fri Nov 28 15:49:19 UTC 2014 - andreas.stieger@gmx.de * grep in a non-UTF8 multibyte locale could mistakenly match in the middle of a multibyte character when using a '^'-anchored alternate in a pattern, leading it to print non-matching lines. - * grep -F Y no longer fails to match in non-UTF8 multibyte locales + * grep -F Y no longer fails to match in non-UTF8 multibyte locales * grep -E rejected unmatched ')', instead of treating it like '\)'. - + - Changes in behavior: * The GREP_OPTIONS environment variable is now obsolescent * In locales with multibyte character encodings other than UTF-8, @@ -497,7 +491,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de patterns the same way the GNU regular expression matcher treats them, with respect to whether the errors can match parts of multibyte characters in data. - * grep -w no longer mishandles a potential match adjacent to a + * grep -w no longer mishandles a potential match adjacent to a letter that takes up two or more bytes in a multibyte encoding. Similarly, the patterns '\<', '\>', '\b', and '\B' no longer mishandle word-boundary matches in multibyte locales. @@ -507,7 +501,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de * grep -P now works with -w and -x and backreferences. Before, echo aa|grep -Pw '(.)\1' would fail to match, yet echo aa|grep -Pw '(.)\2' would match. - * grep -Pw now works like grep -w in that the matched string has + * grep -Pw now works like grep -w in that the matched string has to be preceded and followed by non-word components or the beginning and end of the line (as opposed to word boundaries before). Before, this @@ -516,7 +510,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de per the documentation on how grep's -w works. * grep -i no longer mishandles patterns containing titlecase characters. For example, in a locale containing the titlecase - character 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER + character 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER J), 'grep -i Lj' now matches both 'LJ' (U+01C7 LATIN CAPITAL LETTER LJ) and 'lj' (U+01C9 LATIN SMALL LETTER LJ). - remove mb-non-UTF8-performance.patch, committed upstream @@ -538,7 +532,7 @@ Sat Feb 22 19:19:46 UTC 2014 - andreas.stieger@gmx.de ------------------------------------------------------------------- Wed Feb 19 10:32:43 UTC 2014 - mvyskocil@suse.com -- update to 2.17 +- update to 2.17 * grep -i in a multibyte locale is now typically 10 times faster for patterns that do not contain \ or [ * grep (without -i) in a multibyte locale is now up to 7 times faster @@ -623,7 +617,7 @@ Fri Aug 24 20:29:59 CEST 2012 - pth@suse.de no output. E.g., seq 2 | LC_ALL=en_US.utf8 grep -il '^$' would mistakenly print "(standard input)". Related, seq 9 | LC_ALL=en_US.utf8 grep -in '^$' would print "2:4:6:8:10:12:14:16" - and exit 0. Now it prints nothing and exits with status of 1. + and exit 0. Now it prints nothing and exits with status of 1. [bug introduced in grep-2.6] * 'grep' no longer falsely reports text files as being binary on @@ -666,21 +660,21 @@ Mon May 21 18:19:15 UTC 2012 - tabraham@novell.com - Update to 2.12: * "echp P|grep --devices=skip P" once again prints P, as it did in 2.10 [bug introduced in grep-2.11] - * grep no longer segfaults with -r --exclude-dir and no file + * grep no longer segfaults with -r --exclude-dir and no file operand. I.e., ":|grep -r --exclude-dir=D PAT" would segfault. [bug introduced in grep-2.11] * Recursive grep now uses fts for directory traversal, so it can - handle much-larger directories without reporting things like - "Filename too long", and it can run much faster when dealing - with large directory hierarchies. [bug present since the + handle much-larger directories without reporting things like + "Filename too long", and it can run much faster when dealing + with large directory hierarchies. [bug present since the beginning] - * grep -E 'a{1000000000}' now reports an overflow error rather + * grep -E 'a{1000000000}' now reports an overflow error rather than silently acting like grep -E 'a\{1000000000}'. * The -R option now has a long-option alias --dereference-recursive. - * The -r (--recursive) option now follows only command-line - symlinks. Also, by default -r now reads a device only if it is - named on the command line; this can be overridden with --devices. - -R acts as before, so use -R if you prefer the old behavior of + * The -r (--recursive) option now follows only command-line + symlinks. Also, by default -r now reads a device only if it is + named on the command line; this can be overridden with --devices. + -R acts as before, so use -R if you prefer the old behavior of following all symlinks and defaulting to reading all devices. ------------------------------------------------------------------- @@ -692,11 +686,11 @@ Thu Apr 19 17:43:06 CEST 2012 - meissner@suse.de Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com - Update to 2.11: - * grep no longer dumps core on lines whose lengths do not fit in + * grep no longer dumps core on lines whose lengths do not fit in 'int'. (e.g., lines longer than 2 GiB on a typical 64-bit host). Instead, grep either works as expected, or reports an error. - An error can occur if not enough main memory is available, or if - the GNU C library's regular expression functions cannot handle + An error can occur if not enough main memory is available, or if + the GNU C library's regular expression functions cannot handle such long lines. [bug present since "the beginning"] * The -m, -A, -B, and -C options no longer mishandle context line counts that do not fit in 'int'. Also, grep -c's counts are now @@ -706,14 +700,14 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com as if it were a text file. For example, "grep x ." now reports a read error on most systems; formerly, it ignored the error. [bug introduced in grep-2.5] - * grep now exits with status 2 if a directory loop is found, instead - of possibly exiting with status 0 or 1. [bug introduced in + * grep now exits with status 2 if a directory loop is found, instead + of possibly exiting with status 0 or 1. [bug introduced in grep-2.3] - * The -s option now suppresses certain input error diagnostics that - it formerly failed to suppress. These include errors when closing - the input, when lseeking the input, and when the input is also the + * The -s option now suppresses certain input error diagnostics that + it formerly failed to suppress. These include errors when closing + the input, when lseeking the input, and when the input is also the output. [bug introduced in grep-2.4] - * On POSIX systems, commands like "grep PAT < FILE >> FILE" now report + * On POSIX systems, commands like "grep PAT < FILE >> FILE" now report an error instead of looping. [bug present since "the beginning"] * The --include, --exclude, and --exclude-dir options now handle command-line arguments more consistently. --include and --exclude @@ -723,7 +717,7 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com * grep no longer rejects "grep -qr . > out", i.e., when run with -q and an input file is the same as the output file, since with -q grep generates no output, so there is no risk of infinite loop or - of an output-affecting race condition. Thus, the use of the + of an output-affecting race condition. Thus, the use of the following options also disables the input-equals-output failure: --max-count=N (-m) (for N >= 2) --files-with-matches (-l) @@ -733,7 +727,7 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com invoked with the -r option. * grep no longer misinterprets some alternations involving anchors (^, $, \< \> \B, \b). For example, grep -E "(^|\B)a" no - longer reports a match for the string "x a". [bug present since + longer reports a match for the string "x a". [bug present since "the beginning"] * If no file operand is given, and a command-line -r or equivalent option is given, grep now searches the working directory. Formerly @@ -751,11 +745,11 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com - changes from 2.10: * grep no longer mishandles high-bit-set pattern bytes on systems - where "char" is a signed type. [bug appears to affect only + where "char" is a signed type. [bug appears to affect only MS-Windows] - * On POSIX systems, grep now rejects a command like - "grep -r pattern . > out", in which the output file is also one - of the inputs, because it can result in an "infinite" disk-filling + * On POSIX systems, grep now rejects a command like + "grep -r pattern . > out", in which the output file is also one + of the inputs, because it can result in an "infinite" disk-filling loop. [bug present since "the beginning"] - removed fix-testsuite.diff obsoleted by this release @@ -790,7 +784,7 @@ Tue Sep 27 12:42:54 CEST 2011 - dmueller@suse.de ------------------------------------------------------------------- Wed Aug 10 03:17:41 UTC 2011 - crrodriguez@opensuse.org -- Upgrade to version 2.9 +- Upgrade to version 2.9 * grep no longer clobbers heap for an ERE like '(^| )*( |$)'' )' * grep -P no longer aborts when PCRE's backtracking limit is exceeded * grep's interpretation of range expression is now more consistent @@ -854,7 +848,7 @@ Thu Jun 11 21:46:26 CEST 2009 - coolo@novell.com ------------------------------------------------------------------- Thu Jun 4 17:41:19 CEST 2009 - crrodriguez@suse.de -- link pcre library dynamically +- link pcre library dynamically ------------------------------------------------------------------- Wed Feb 11 14:09:00 CET 2009 - schwab@suse.de @@ -997,7 +991,7 @@ Mon Jul 21 17:02:26 CEST 2003 - schwab@suse.de ------------------------------------------------------------------- Fri Jun 20 02:29:15 CEST 2003 - ro@suse.de -- build with current gettext +- build with current gettext ------------------------------------------------------------------- Wed Apr 30 18:35:32 CEST 2003 - schwab@suse.de @@ -1048,7 +1042,7 @@ Wed Apr 3 16:46:19 CEST 2002 - schwab@suse.de ------------------------------------------------------------------- Wed Apr 3 16:21:16 CEST 2002 - ro@suse.de -- build with current autoconf/automake +- build with current autoconf/automake ------------------------------------------------------------------- Tue Feb 5 10:57:56 CET 2002 - schwab@suse.de diff --git a/grep.spec b/grep.spec index f5935cc..8dd63e4 100644 --- a/grep.spec +++ b/grep.spec @@ -1,7 +1,7 @@ # # spec file for package grep # -# Copyright (c) 2024 SUSE LLC +# Copyright (c) 2023 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed @@ -33,27 +33,13 @@ Patch0: efgrep-warning.patch BuildRequires: fdupes BuildRequires: glibc-locale BuildRequires: makeinfo -BuildRequires: pkgconfig BuildRequires: pkgconfig(libpcre2-8) -Recommends: grep-deprecated = %{version} Provides: base:%{_bindir}/grep %description The grep command searches one or more input files for lines containing a match to a specified pattern. By default, grep prints the matching lines. -%package deprecated -Summary: Grep - deprecated aliases -Provides: grep:%{_bindir}/egrep -Requires: %{NAME} = %{version} - -%description deprecated -The grep command searches one or more input files for lines containing a -match to a specified pattern. By default, grep prints the matching lines. - -This package provides the deprecated aliases "egrep" and "fgrep". please -use "grep -E" and "grep -F" going forward. - %lang_package %prep @@ -85,7 +71,7 @@ echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow %install %make_install -%if 0%{?suse_version} && 0%{?suse_version} < 1550 +%if 0%{?suse_version} < 1550 install -d %{buildroot}/bin ln -sf %{_bindir}/egrep %{buildroot}/bin/egrep ln -sf %{_bindir}/fgrep %{buildroot}/bin/fgrep @@ -97,21 +83,17 @@ ln -sf %{_bindir}/grep %{buildroot}/bin/grep %files %license COPYING %doc README AUTHORS NEWS THANKS TODO ChangeLog* -%if 0%{?suse_version} && 0%{?suse_version} < 1550 +%if 0%{?suse_version} < 1550 +/bin/egrep +/bin/fgrep /bin/grep %endif +%{_bindir}/egrep +%{_bindir}/fgrep %{_bindir}/grep %{_mandir}/man1/grep.1%{?ext_man} %{_infodir}/grep.info%{?ext_info} -%files deprecated -%if 0%{?suse_version} && 0%{?suse_version} < 1550 -/bin/egrep -/bin/fgrep -%endif -%{_bindir}/egrep -%{_bindir}/fgrep - %files lang -f %{name}.lang %changelog From 9db2b6928b27ee443c44b69ed71101a088d3da37c6bacf4953c657a771a5b734 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 10 Apr 2024 09:05:21 +0000 Subject: [PATCH 3/5] =?UTF-8?q?also=20match=20e.g.,=20the=20Arabic=20digit?= =?UTF-8?q?s:=20=D9=A0=D9=A1=D9=A2=D9=A3=D9=A4=D9=A5=D9=A6=D9=A7=D9=A8?= =?UTF-8?q?=D9=A9.=20=20=20*=20The=20-s=20option=20no=20longer=20suppresse?= =?UTF-8?q?s=20"binary=20file=20matches"=20-=20use=20release=20keyring=20r?= =?UTF-8?q?ather=20than=20full=20one=20for=20validation=20-=20Make=20profi?= =?UTF-8?q?ling=20deterministic=20(bsc#1040589,=20SLE-24115)=20=20=20*=20-?= =?UTF-8?q?-files-without-match=20(-L)=20behavior=20reverted=20to=20again?= =?UTF-8?q?=20succeed=20=20=20*=20When=20standard=20output=20is=20/dev/nul?= =?UTF-8?q?l,=20grep=20no=20longer=20fails=20when=20-=20Drop=20upstreamed?= =?UTF-8?q?=20proc-lseek-glitch.patch=20=20=20=20=20an=20invalid=20regular?= =?UTF-8?q?=20expression=20that=20was=20read=20from=20an=20=20=20*=20grep?= =?UTF-8?q?=20-z=20would=20match=20strings=20it=20should=20not.=20=20To=20?= =?UTF-8?q?trigger=20the=20bug,=20=20=20=20=20you'd=20have=20to=20use=20a?= =?UTF-8?q?=20regular=20expression=20including=20an=20anchor=20=20=20=20?= =?UTF-8?q?=20(^=20or=20$)=20and=20a=20feature=20like=20a=20range=20or=20a?= =?UTF-8?q?=20backreference,=20causing=20=20=20=20=20With=20a=20multibyte?= =?UTF-8?q?=20locale,=20that=20matcher=20could=20mistakenly=20match=20a=20?= =?UTF-8?q?=20=20=20=20string=20containing=20a=20newline.=20For=20example,?= =?UTF-8?q?=20this=20command:=20=20=20=20=20would=20mistakenly=20match=20a?= =?UTF-8?q?nd=20print=20all=20four=20input=20bytes.=20=20After=20=20=20*?= =?UTF-8?q?=20grep=20-Pz=20now=20diagnoses=20attempts=20to=20use=20pattern?= =?UTF-8?q?s=20containing=20^=20=20=20=20=20and=20$,=20instead=20of=20mish?= =?UTF-8?q?andling=20these=20patterns.=20=20This=20problem=20=20=20=20=20s?= =?UTF-8?q?eems=20to=20be=20inherent=20to=20the=20PCRE=20API;=20removing?= =?UTF-8?q?=20this=20limitation=20=20=20=20=20is=20on=20PCRE's=20maint/REA?= =?UTF-8?q?DME=20wish=20list.=20=20Patterns=20can=20continue=20to=20=20=20?= =?UTF-8?q?=20=20match=20literal=20^=20and=20$=20by=20escaping=20them=20wi?= =?UTF-8?q?th=20\=20(now=20needed=20even=20=20=20*=20Binary=20files=20are?= =?UTF-8?q?=20now=20less=20likely=20to=20generate=20diagnostics=20and=20?= =?UTF-8?q?=20=20=20=20more=20likely=20to=20yield=20text=20matches.=20=20g?= =?UTF-8?q?rep=20now=20reports=20"Binary=20=20=20=20=20file=20FOO=20matche?= =?UTF-8?q?s"=20and=20suppresses=20further=20output=20instead=20of=20=20?= =?UTF-8?q?=20=20=20outputting=20a=20line=20containing=20an=20encoding=20e?= =?UTF-8?q?rror;=20hence=20grep=20can=20=20=20=20=20now=20report=20matchin?= =?UTF-8?q?g=20text=20before=20a=20later=20binary=20match.=20=20=20=20=20F?= =?UTF-8?q?ormerly,=20grep=20reported=20FOO=20to=20be=20binary=20when=20it?= =?UTF-8?q?=20found=20an=20=20=20=20=20encoding=20error=20in=20FOO=20befor?= =?UTF-8?q?e=20generating=20output=20for=20FOO,=20which=20=20=20=20=20mean?= =?UTF-8?q?t=20it=20never=20reported=20both=20matching=20text=20and=20matc?= =?UTF-8?q?hing=20binary=20=20=20=20=20data;=20this=20was=20less=20useful?= =?UTF-8?q?=20for=20searching=20text=20containing=20=20=20=20=20encoding?= =?UTF-8?q?=20errors=20in=20non-matching=20lines.=20[bug=20introduced=20in?= =?UTF-8?q?=20=20=20*=20grep=20-c=20no=20longer=20stops=20counting=20when?= =?UTF-8?q?=20finding=20binary=20data.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=142 --- grep.changes | 150 +++++++++++++++++++++++++-------------------------- grep.spec | 2 +- 2 files changed, 76 insertions(+), 76 deletions(-) diff --git a/grep.changes b/grep.changes index 93629c6..a89faf0 100644 --- a/grep.changes +++ b/grep.changes @@ -24,7 +24,7 @@ Thu Mar 30 07:41:18 UTC 2023 - Dirk Müller * With -P, \d now matches only ASCII digits, regardless of PCRE options/modes. The changes in grep-3.9 to make ^H and \w work properly had the undesirable side effect of making \d - also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. + also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. With grep-3.9, -P '\d+' would match that ten-digit (20-byte) string. Now, to match such a digit, you would use \p{Nd}. Similarly, \D is now mapped to [^0-9]. @@ -63,7 +63,7 @@ Sun Sep 4 10:13:04 UTC 2022 - Andreas Stieger POSIXLY_CORRECT is set, since POSIX now allows the GNU behavior * In locales using UTF-8 encoding, the regular expression '.' no longer sometimes fails to match Unicode characters - * The -s option no longer suppresses "binary file matches" + * The -s option no longer suppresses "binary file matches" messages. - doc: fix man page syntax errors (bsc#1201001) @@ -75,7 +75,7 @@ Wed Aug 3 12:26:44 UTC 2022 - Andreas Schwab ------------------------------------------------------------------- Tue May 24 19:42:42 UTC 2022 - Dirk Müller -- use release keyring rather than full one for validation +- use release keyring rather than full one for validation ------------------------------------------------------------------- Tue May 24 14:15:24 UTC 2022 - Stephan Kulow @@ -85,7 +85,7 @@ Tue May 24 14:15:24 UTC 2022 - Stephan Kulow ------------------------------------------------------------------- Tue Mar 15 21:51:41 UTC 2022 - Bernhard Wiedemann -- Make profiling deterministic (bsc#1040589) +- Make profiling deterministic (bsc#1040589, SLE-24115) ------------------------------------------------------------------- Sat Feb 12 13:40:18 UTC 2022 - Dirk Müller @@ -136,7 +136,7 @@ Mon Sep 28 08:54:47 UTC 2020 - Andreas Stieger - grep 3.5: * message for matching binary files now sent to stderr, and changed - * --files-without-match (-L) behavior reverted to again succeed + * --files-without-match (-L) behavior reverted to again succeed when a line is selected, not when a file is listed * various bug fixes - drop gnulib-test-avoid-FP-perror-strerror.patch, upstream @@ -251,12 +251,12 @@ Wed Feb 8 09:56:26 UTC 2017 - mpluskal@suse.com * Improve performance for -E or -G pattern lists that are easily converted to -F format. * Fix performance regression with multiple patterns. - * When standard output is /dev/null, grep no longer fails when + * When standard output is /dev/null, grep no longer fails when standard input is a file in the Linux /proc file system, or when standard input is a pipe and standard output is in append mode. * When grep -Fo finds matches of differing length, it could mistakenly print a shorter one. Now it prints a longest one. -- Drop upstreamed proc-lseek-glitch.patch +- Drop upstreamed proc-lseek-glitch.patch ------------------------------------------------------------------- Mon Dec 12 16:51:24 UTC 2016 - schwab@suse.de @@ -305,7 +305,7 @@ Fri Oct 28 13:01:39 UTC 2016 - astieger@suse.com * In multibyte locales, grep now handles leading "." in patterns more efficiently. * grep now prints a "FILENAME:LINENO: " prefix when diagnosing - an invalid regular expression that was read from an + an invalid regular expression that was read from an '-f'-specified file. ------------------------------------------------------------------- @@ -324,56 +324,56 @@ Fri Apr 22 13:49:18 UTC 2016 - astieger@suse.com Fri Mar 11 09:30:02 UTC 2016 - mpluskal@suse.com - Update to 2.24 - * grep -z would match strings it should not. To trigger the bug, - you'd have to use a regular expression including an anchor - (^ or $) and a feature like a range or a backreference, causing + * grep -z would match strings it should not. To trigger the bug, + you'd have to use a regular expression including an anchor + (^ or $) and a feature like a range or a backreference, causing grep to forego its DFA matcher and resort to using re_search. - With a multibyte locale, that matcher could mistakenly match a - string containing a newline. For example, this command: + With a multibyte locale, that matcher could mistakenly match a + string containing a newline. For example, this command: printf 'a\nb\0' | LC_ALL=en_US.utf-8 grep -z '^[a-b]*b' - would mistakenly match and print all four input bytes. After + would mistakenly match and print all four input bytes. After the fix, there is no match, as expected. [bug introduced in grep-2.7] - * grep -Pz now diagnoses attempts to use patterns containing ^ - and $, instead of mishandling these patterns. This problem - seems to be inherent to the PCRE API; removing this limitation - is on PCRE's maint/README wish list. Patterns can continue to - match literal ^ and $ by escaping them with \ (now needed even + * grep -Pz now diagnoses attempts to use patterns containing ^ + and $, instead of mishandling these patterns. This problem + seems to be inherent to the PCRE API; removing this limitation + is on PCRE's maint/README wish list. Patterns can continue to + match literal ^ and $ by escaping them with \ (now needed even inside [...]). [bug introduced in grep-2.5] ------------------------------------------------------------------- Fri Feb 5 08:01:46 UTC 2016 - mpluskal@suse.com - Update to 2.23 - * Binary files are now less likely to generate diagnostics and - more likely to yield text matches. grep now reports "Binary - file FOO matches" and suppresses further output instead of - outputting a line containing an encoding error; hence grep can - now report matching text before a later binary match. - Formerly, grep reported FOO to be binary when it found an - encoding error in FOO before generating output for FOO, which - meant it never reported both matching text and matching binary - data; this was less useful for searching text containing - encoding errors in non-matching lines. [bug introduced in + * Binary files are now less likely to generate diagnostics and + more likely to yield text matches. grep now reports "Binary + file FOO matches" and suppresses further output instead of + outputting a line containing an encoding error; hence grep can + now report matching text before a later binary match. + Formerly, grep reported FOO to be binary when it found an + encoding error in FOO before generating output for FOO, which + meant it never reported both matching text and matching binary + data; this was less useful for searching text containing + encoding errors in non-matching lines. [bug introduced in grep-2.21] - * grep -c no longer stops counting when finding binary data. + * grep -c no longer stops counting when finding binary data. [bug introduced in grep-2.21] - * grep no longer outputs encoding errors in unibyte locales. For + * grep no longer outputs encoding errors in unibyte locales. For example, if the byte '\x81' is not a valid character in a - unibyte locale, grep treats the byte as binary data. [bug + unibyte locale, grep treats the byte as binary data. [bug introduced in grep-2.21] - * grep -oP is no longer susceptible to an infinite loop when - processing invalid UTF8 just before a match. [bug introduced in + * grep -oP is no longer susceptible to an infinite loop when + processing invalid UTF8 just before a match. [bug introduced in grep-2.22] - * --exclude and related options are now matched against trailing + * --exclude and related options are now matched against trailing parts of command-line arguments, not against the entire - arguments. This partly reverts the --exclude-related change + arguments. This partly reverts the --exclude-related change in 2.22. [bug introduced in grep-2.22] - * --line-buffer is no longer ineffective when combined with -l. + * --line-buffer is no longer ineffective when combined with -l. [bug introduced in grep-2.5] - * -xw is now equivalent to -x more consistently, with -P and + * -xw is now equivalent to -x more consistently, with -P and with backrefs. [bug only partially fixed in grep-2.19] -- Update info handling scriplets +- Update info handling scriplets * move from postun to preun * add dependeny for preun - Refresh partially upstreamed patch @@ -429,7 +429,7 @@ Fri Nov 28 15:49:19 UTC 2014 - andreas.stieger@gmx.de * performance improved for rejecting data that cannot match even the first part of a nontrivial pattern. * performance improved for very long strings in patterns. - * If a file contains data improperly encoded for the current + * If a file contains data improperly encoded for the current locale, and this is discovered before any of the file's contents are output, grep now treats the file as binary. * -P no longer reports an error and exits when given invalid UTF-8 @@ -440,9 +440,9 @@ Fri Nov 28 15:49:19 UTC 2014 - andreas.stieger@gmx.de * grep in a non-UTF8 multibyte locale could mistakenly match in the middle of a multibyte character when using a '^'-anchored alternate in a pattern, leading it to print non-matching lines. - * grep -F Y no longer fails to match in non-UTF8 multibyte locales + * grep -F Y no longer fails to match in non-UTF8 multibyte locales * grep -E rejected unmatched ')', instead of treating it like '\)'. - + - Changes in behavior: * The GREP_OPTIONS environment variable is now obsolescent * In locales with multibyte character encodings other than UTF-8, @@ -491,7 +491,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de patterns the same way the GNU regular expression matcher treats them, with respect to whether the errors can match parts of multibyte characters in data. - * grep -w no longer mishandles a potential match adjacent to a + * grep -w no longer mishandles a potential match adjacent to a letter that takes up two or more bytes in a multibyte encoding. Similarly, the patterns '\<', '\>', '\b', and '\B' no longer mishandle word-boundary matches in multibyte locales. @@ -501,7 +501,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de * grep -P now works with -w and -x and backreferences. Before, echo aa|grep -Pw '(.)\1' would fail to match, yet echo aa|grep -Pw '(.)\2' would match. - * grep -Pw now works like grep -w in that the matched string has + * grep -Pw now works like grep -w in that the matched string has to be preceded and followed by non-word components or the beginning and end of the line (as opposed to word boundaries before). Before, this @@ -510,7 +510,7 @@ Sat May 24 16:50:50 UTC 2014 - andreas.stieger@gmx.de per the documentation on how grep's -w works. * grep -i no longer mishandles patterns containing titlecase characters. For example, in a locale containing the titlecase - character 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER + character 'Lj' (U+01C8 LATIN CAPITAL LETTER L WITH SMALL LETTER J), 'grep -i Lj' now matches both 'LJ' (U+01C7 LATIN CAPITAL LETTER LJ) and 'lj' (U+01C9 LATIN SMALL LETTER LJ). - remove mb-non-UTF8-performance.patch, committed upstream @@ -532,7 +532,7 @@ Sat Feb 22 19:19:46 UTC 2014 - andreas.stieger@gmx.de ------------------------------------------------------------------- Wed Feb 19 10:32:43 UTC 2014 - mvyskocil@suse.com -- update to 2.17 +- update to 2.17 * grep -i in a multibyte locale is now typically 10 times faster for patterns that do not contain \ or [ * grep (without -i) in a multibyte locale is now up to 7 times faster @@ -617,7 +617,7 @@ Fri Aug 24 20:29:59 CEST 2012 - pth@suse.de no output. E.g., seq 2 | LC_ALL=en_US.utf8 grep -il '^$' would mistakenly print "(standard input)". Related, seq 9 | LC_ALL=en_US.utf8 grep -in '^$' would print "2:4:6:8:10:12:14:16" - and exit 0. Now it prints nothing and exits with status of 1. + and exit 0. Now it prints nothing and exits with status of 1. [bug introduced in grep-2.6] * 'grep' no longer falsely reports text files as being binary on @@ -660,21 +660,21 @@ Mon May 21 18:19:15 UTC 2012 - tabraham@novell.com - Update to 2.12: * "echp P|grep --devices=skip P" once again prints P, as it did in 2.10 [bug introduced in grep-2.11] - * grep no longer segfaults with -r --exclude-dir and no file + * grep no longer segfaults with -r --exclude-dir and no file operand. I.e., ":|grep -r --exclude-dir=D PAT" would segfault. [bug introduced in grep-2.11] * Recursive grep now uses fts for directory traversal, so it can - handle much-larger directories without reporting things like - "Filename too long", and it can run much faster when dealing - with large directory hierarchies. [bug present since the + handle much-larger directories without reporting things like + "Filename too long", and it can run much faster when dealing + with large directory hierarchies. [bug present since the beginning] - * grep -E 'a{1000000000}' now reports an overflow error rather + * grep -E 'a{1000000000}' now reports an overflow error rather than silently acting like grep -E 'a\{1000000000}'. * The -R option now has a long-option alias --dereference-recursive. - * The -r (--recursive) option now follows only command-line - symlinks. Also, by default -r now reads a device only if it is - named on the command line; this can be overridden with --devices. - -R acts as before, so use -R if you prefer the old behavior of + * The -r (--recursive) option now follows only command-line + symlinks. Also, by default -r now reads a device only if it is + named on the command line; this can be overridden with --devices. + -R acts as before, so use -R if you prefer the old behavior of following all symlinks and defaulting to reading all devices. ------------------------------------------------------------------- @@ -686,11 +686,11 @@ Thu Apr 19 17:43:06 CEST 2012 - meissner@suse.de Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com - Update to 2.11: - * grep no longer dumps core on lines whose lengths do not fit in + * grep no longer dumps core on lines whose lengths do not fit in 'int'. (e.g., lines longer than 2 GiB on a typical 64-bit host). Instead, grep either works as expected, or reports an error. - An error can occur if not enough main memory is available, or if - the GNU C library's regular expression functions cannot handle + An error can occur if not enough main memory is available, or if + the GNU C library's regular expression functions cannot handle such long lines. [bug present since "the beginning"] * The -m, -A, -B, and -C options no longer mishandle context line counts that do not fit in 'int'. Also, grep -c's counts are now @@ -700,14 +700,14 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com as if it were a text file. For example, "grep x ." now reports a read error on most systems; formerly, it ignored the error. [bug introduced in grep-2.5] - * grep now exits with status 2 if a directory loop is found, instead - of possibly exiting with status 0 or 1. [bug introduced in + * grep now exits with status 2 if a directory loop is found, instead + of possibly exiting with status 0 or 1. [bug introduced in grep-2.3] - * The -s option now suppresses certain input error diagnostics that - it formerly failed to suppress. These include errors when closing - the input, when lseeking the input, and when the input is also the + * The -s option now suppresses certain input error diagnostics that + it formerly failed to suppress. These include errors when closing + the input, when lseeking the input, and when the input is also the output. [bug introduced in grep-2.4] - * On POSIX systems, commands like "grep PAT < FILE >> FILE" now report + * On POSIX systems, commands like "grep PAT < FILE >> FILE" now report an error instead of looping. [bug present since "the beginning"] * The --include, --exclude, and --exclude-dir options now handle command-line arguments more consistently. --include and --exclude @@ -717,7 +717,7 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com * grep no longer rejects "grep -qr . > out", i.e., when run with -q and an input file is the same as the output file, since with -q grep generates no output, so there is no risk of infinite loop or - of an output-affecting race condition. Thus, the use of the + of an output-affecting race condition. Thus, the use of the following options also disables the input-equals-output failure: --max-count=N (-m) (for N >= 2) --files-with-matches (-l) @@ -727,7 +727,7 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com invoked with the -r option. * grep no longer misinterprets some alternations involving anchors (^, $, \< \> \B, \b). For example, grep -E "(^|\B)a" no - longer reports a match for the string "x a". [bug present since + longer reports a match for the string "x a". [bug present since "the beginning"] * If no file operand is given, and a command-line -r or equivalent option is given, grep now searches the working directory. Formerly @@ -745,11 +745,11 @@ Tue Mar 13 18:18:23 UTC 2012 - tabraham@novell.com - changes from 2.10: * grep no longer mishandles high-bit-set pattern bytes on systems - where "char" is a signed type. [bug appears to affect only + where "char" is a signed type. [bug appears to affect only MS-Windows] - * On POSIX systems, grep now rejects a command like - "grep -r pattern . > out", in which the output file is also one - of the inputs, because it can result in an "infinite" disk-filling + * On POSIX systems, grep now rejects a command like + "grep -r pattern . > out", in which the output file is also one + of the inputs, because it can result in an "infinite" disk-filling loop. [bug present since "the beginning"] - removed fix-testsuite.diff obsoleted by this release @@ -784,7 +784,7 @@ Tue Sep 27 12:42:54 CEST 2011 - dmueller@suse.de ------------------------------------------------------------------- Wed Aug 10 03:17:41 UTC 2011 - crrodriguez@opensuse.org -- Upgrade to version 2.9 +- Upgrade to version 2.9 * grep no longer clobbers heap for an ERE like '(^| )*( |$)'' )' * grep -P no longer aborts when PCRE's backtracking limit is exceeded * grep's interpretation of range expression is now more consistent @@ -848,7 +848,7 @@ Thu Jun 11 21:46:26 CEST 2009 - coolo@novell.com ------------------------------------------------------------------- Thu Jun 4 17:41:19 CEST 2009 - crrodriguez@suse.de -- link pcre library dynamically +- link pcre library dynamically ------------------------------------------------------------------- Wed Feb 11 14:09:00 CET 2009 - schwab@suse.de @@ -991,7 +991,7 @@ Mon Jul 21 17:02:26 CEST 2003 - schwab@suse.de ------------------------------------------------------------------- Fri Jun 20 02:29:15 CEST 2003 - ro@suse.de -- build with current gettext +- build with current gettext ------------------------------------------------------------------- Wed Apr 30 18:35:32 CEST 2003 - schwab@suse.de @@ -1042,7 +1042,7 @@ Wed Apr 3 16:46:19 CEST 2002 - schwab@suse.de ------------------------------------------------------------------- Wed Apr 3 16:21:16 CEST 2002 - ro@suse.de -- build with current autoconf/automake +- build with current autoconf/automake ------------------------------------------------------------------- Tue Feb 5 10:57:56 CET 2002 - schwab@suse.de diff --git a/grep.spec b/grep.spec index 8dd63e4..e0dfdd5 100644 --- a/grep.spec +++ b/grep.spec @@ -1,7 +1,7 @@ # # spec file for package grep # -# Copyright (c) 2023 SUSE LLC +# Copyright (c) 2024 SUSE LLC # # All modifications and additions to the file contributed by third parties # remain the property of their copyright owners, unless otherwise agreed From 4ccf627561aea630e68b9ed2bfd66f8babf8112600968d17b77b8f6470c4b1ca Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 10 Apr 2024 09:08:11 +0000 Subject: [PATCH 4/5] - GNU grep 3.8 (jsc#PED-6579): OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=143 --- grep.changes | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/grep.changes b/grep.changes index a89faf0..4c97004 100644 --- a/grep.changes +++ b/grep.changes @@ -51,7 +51,7 @@ Tue Sep 20 08:29:41 UTC 2022 - Andreas Schwab ------------------------------------------------------------------- Sun Sep 4 10:13:04 UTC 2022 - Andreas Stieger -- GNU grep 3.8: +- GNU grep 3.8 (jsc#PED-6579): * The -P option is now based on PCRE2 instead of the older PCRE (boo#1201803) * egrep and fgrep commands, deprecated since release 2.5.3 (2007), now From 30c4adfb72d87ac25535d72158bc3525f08da843d806be45bd418625e77d91f9 Mon Sep 17 00:00:00 2001 From: Dirk Mueller Date: Wed, 10 Apr 2024 20:20:23 +0000 Subject: [PATCH 5/5] - restore texinfo macros for SLE15 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=144 --- grep.changes | 5 +++++ grep.spec | 12 ++++++++++++ 2 files changed, 17 insertions(+) diff --git a/grep.changes b/grep.changes index 4c97004..13016fb 100644 --- a/grep.changes +++ b/grep.changes @@ -1,3 +1,8 @@ +------------------------------------------------------------------- +Wed Apr 10 20:20:08 UTC 2024 - Dirk Müller + +- restore texinfo macros for SLE15 + ------------------------------------------------------------------- Wed Aug 16 14:21:13 UTC 2023 - Dominique Leuenberger diff --git a/grep.spec b/grep.spec index e0dfdd5..7d48b4b 100644 --- a/grep.spec +++ b/grep.spec @@ -34,6 +34,10 @@ BuildRequires: fdupes BuildRequires: glibc-locale BuildRequires: makeinfo BuildRequires: pkgconfig(libpcre2-8) +%if 0%{?suse_version} < 1550 +Requires(pre): %{install_info_prereq} +Requires(preun): %{install_info_prereq} +%endif Provides: base:%{_bindir}/grep %description @@ -80,6 +84,14 @@ ln -sf %{_bindir}/grep %{buildroot}/bin/grep %fdupes -s %{buildroot} %find_lang %{name} +%if 0%{?suse_version} < 1550 +%post +%install_info --info-dir=%{_infodir} %{_infodir}/grep.info%{ext_info} + +%preun +%install_info_delete --info-dir=%{_infodir} %{_infodir}/grep.info%{ext_info} +%endif + %files %license COPYING %doc README AUTHORS NEWS THANKS TODO ChangeLog*