diff --git a/backport-Fix-recognition-of-cs_CZ.UTF-8-locale-on-FreeBSD.patch b/backport-Fix-recognition-of-cs_CZ.UTF-8-locale-on-FreeBSD.patch deleted file mode 100644 index 85a2ef2917b2da1bfd91fe3b1b7d59243f62f86a..0000000000000000000000000000000000000000 --- a/backport-Fix-recognition-of-cs_CZ.UTF-8-locale-on-FreeBSD.patch +++ /dev/null @@ -1,42 +0,0 @@ -From eda769be72def8a14098af968e04cc6952fc53a3 Mon Sep 17 00:00:00 2001 -From: Bruno Haible -Date: Mon, 8 Jul 2024 14:06:16 +0200 -Subject: tests: Fix recognition of cs_CZ.UTF-8 locale on FreeBSD. - -* tests/fmbtest: Use 'locale charmap' to determine the locale's encoding. -* tests/foad1: Likewise. - ---- - tests/fmbtest | 2 +- - tests/foad1 | 2 +- - 2 files changed, 2 insertions(+), 2 deletions(-) - -diff --git a/tests/fmbtest b/tests/fmbtest -index e64b6ba..ddc25d9 100644 ---- a/tests/fmbtest -+++ b/tests/fmbtest -@@ -10,7 +10,7 @@ - cz=cs_CZ.UTF-8 - - # If cs_CZ.UTF-8 locale doesn't work, skip this test. --LC_ALL=$cz locale -k LC_CTYPE 2>/dev/null | grep -q charmap.*UTF-8 \ -+test "`LC_ALL=$cz locale charmap 2>/dev/null`" = UTF-8 \ - || skip_ this system lacks the $cz locale - - # If matching is done in single-byte mode, skip this test too -diff --git a/tests/foad1 b/tests/foad1 -index f10c1d7..3e87656 100644 ---- a/tests/foad1 -+++ b/tests/foad1 -@@ -150,7 +150,7 @@ Exit $failures - # The rest of this file is meant to be executed under this locale. - LC_ALL=cs_CZ.UTF-8; export LC_ALL - # If the UTF-8 locale doesn't work, skip these tests silently. --locale -k LC_CTYPE 2>/dev/null | grep -q "charmap.*UTF-8" || Exit $failures -+test "`locale charmap 2>/dev/null`" = UTF-8 || Exit $failures - - # Test character class erroneously matching a '[' character. - grep_test "[/" "" "[[:alpha:]]" -E --- -2.9.3.windows.1 - diff --git a/backport-Fix-troff-typos-found-by-mandoc-and-groff.patch b/backport-Fix-troff-typos-found-by-mandoc-and-groff.patch deleted file mode 100644 index 9a12d830c5dc5a7133eebfd10d28e1d271bb5943..0000000000000000000000000000000000000000 --- a/backport-Fix-troff-typos-found-by-mandoc-and-groff.patch +++ /dev/null @@ -1,53 +0,0 @@ -From 53b889155f5ee53404a9873f48300fe5b50321d9 Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Tue, 21 May 2024 09:50:43 -0700 -Subject: doc: fix troff typos - -* doc/grep.in.1: Fix troff typos found by mandoc and groff. -Problem reported by Bjarni Ingi Gislason (bug#71087). ---- - doc/grep.in.1 | 7 ++++--- - 1 file changed, 4 insertions(+), 3 deletions(-) - -diff --git a/doc/grep.in.1 b/doc/grep.in.1 -index 236791e..eb6a5d9 100644 ---- a/doc/grep.in.1 -+++ b/doc/grep.in.1 -@@ -23,6 +23,7 @@ - . \} - .\} - . -+.as la - .if !\w|\*(la| \{\ - .\" groff an-ext.tmac does not seem to be in use, so define the parts of - .\" it that are used below. For a copy of groff an-ext.tmac, please see: -@@ -245,7 +246,7 @@ If this option is used multiple times or is combined with the - option, search for all patterns given. - The empty file contains zero patterns, and therefore matches nothing. - If --.IR FILE -+.I FILE - is - .B \- - , read patterns from standard input. -@@ -674,7 +675,7 @@ whose base name matches - Ignore any redundant trailing slashes in - .IR GLOB . - .TP --.BR \-I -+.B \-I - Process a binary file as if it did not contain matching data; this is - equivalent to the - .B \-\^\-binary\-files=without\-match -@@ -749,7 +750,7 @@ Like the - or - .B \-\^\-null - option, this option can be used with commands like --.B sort -z -+.B "sort \-z" - to process arbitrary file names. - . - .SH "REGULAR EXPRESSIONS" --- -2.9.3.windows.1 - diff --git a/fix-grep-m2-pattern.patch b/fix-grep-m2-pattern.patch deleted file mode 100644 index 2bed6784c2cd6d474ea34065ed0c6f719720d14d..0000000000000000000000000000000000000000 --- a/fix-grep-m2-pattern.patch +++ /dev/null @@ -1,62 +0,0 @@ -From b9a8047099d2388c15e6ad39e7b8c91c6633096c Mon Sep 17 00:00:00 2001 -From: Paul Eggert -Date: Fri, 9 Feb 2024 01:06:49 -0800 -Subject: =?UTF-8?q?grep:=20fix=20=E2=80=98grep=20-m2=20pattern=20?= - =?UTF-8?q?/dev/null=E2=80=99?= -MIME-Version: 1.0 -Content-Type: text/plain; charset=UTF-8 -Content-Transfer-Encoding: 8bit - -Problem reported by Grisha Levit . -* src/grep.c (grep, main): Don’t set done_on_match if -m is used. -* tests/max-count-overread: Add a test case. ---- - src/grep.c | 9 +++++++-- - tests/max-count-overread | 6 ++++++ - 2 files changed, 13 insertions(+), 2 deletions(-) - -diff --git a/src/grep.c b/src/grep.c -index dab3be7..1256dfd 100644 ---- a/src/grep.c -+++ b/src/grep.c -@@ -1558,7 +1558,11 @@ grep (int fd, struct stat const *st, bool *ineof) - if (binary_files == WITHOUT_MATCH_BINARY_FILES) - return 0; - if (!count_matches) -- done_on_match = out_quiet = true; -+ { -+ out_quiet = true; -+ if (max_count == INTMAX_MAX) -+ done_on_match = true; -+ } - nlines_first_null = nlines; - nul_zapper = eol; - skip_nuls = skip_empty_lines; -@@ -2897,7 +2901,8 @@ main (int argc, char **argv) - if ((exit_on_match | dev_null_output) || list_files != LISTFILES_NONE) - { - count_matches = false; -- done_on_match = true; -+ if (max_count == INTMAX_MAX) -+ done_on_match = true; - } - out_quiet = count_matches | done_on_match; - -diff --git a/tests/max-count-overread b/tests/max-count-overread -index 23c45cb..f829cc5 100755 ---- a/tests/max-count-overread -+++ b/tests/max-count-overread -@@ -12,4 +12,10 @@ echo x > exp || framework_failure_ - yes x | timeout 10 grep -m1 x > out || fail=1 - compare exp out || fail=1 - -+# Make sure -m2 stops reading even when output is /dev/null. -+# In grep 3.11, it would continue reading. -+printf 'x\nx\nx\n' >in || framework_failure -+(grep -m2 x >/dev/null && head -n1) out || fail=1 -+compare exp out || fail=1 -+ - Exit $fail --- -cgit v1.1 - diff --git a/grep-3.11.tar.xz b/grep-3.11.tar.xz deleted file mode 100644 index f1ea6baa49fdb8304206119a4eabb5c425dcd4ae..0000000000000000000000000000000000000000 Binary files a/grep-3.11.tar.xz and /dev/null differ diff --git a/grep-3.12.tar.xz b/grep-3.12.tar.xz new file mode 100644 index 0000000000000000000000000000000000000000..8548a369ad3b72b77d484f321282364fefc07939 Binary files /dev/null and b/grep-3.12.tar.xz differ diff --git a/grep.spec b/grep.spec index 59f98eb5e26ee74c520a1404df2b1001aa8e41e4..8dad5a4dac648173692d40f0daec090f5e9a0d07 100644 --- a/grep.spec +++ b/grep.spec @@ -1,18 +1,14 @@ Name: grep -Version: 3.11 -Release: 4 +Version: 3.12 +Release: 1 Summary: A string search utility -License: GPLv3+ +License: GPL-3.0-or-later URL: https://www.gnu.org/software/grep Source0: https://ftp.gnu.org/gnu/grep/grep-%{version}.tar.xz Source1: color_grep.sh Source2: colorgrep.csh Source3: grepconf.sh -Patch0001: fix-grep-m2-pattern.patch -Patch0002: backport-Fix-troff-typos-found-by-mandoc-and-groff.patch -Patch0003: backport-Fix-recognition-of-cs_CZ.UTF-8-locale-on-FreeBSD.patch - BuildRequires: gcc pcre2-devel texinfo gettext automake Provides: /bin/egrep /bin/fgrep /bin/grep bundled(gnulib) @@ -52,6 +48,9 @@ install -Dpm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_libexecdir}/grepconf.sh %{_mandir}/man1/*grep.1* %changelog +* Fri Apr 11 2025 Funda Wang - 3.12-1 +- update to 3.12 + * Mon Aug 26 2024 guojunding - 3.11-4 - fix troff typos - fix recognition of cs_CZ.UTF-8 locale on FreeBSD