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 new file mode 100644 index 0000000000000000000000000000000000000000..85a2ef2917b2da1bfd91fe3b1b7d59243f62f86a --- /dev/null +++ b/backport-Fix-recognition-of-cs_CZ.UTF-8-locale-on-FreeBSD.patch @@ -0,0 +1,42 @@ +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 new file mode 100644 index 0000000000000000000000000000000000000000..9a12d830c5dc5a7133eebfd10d28e1d271bb5943 --- /dev/null +++ b/backport-Fix-troff-typos-found-by-mandoc-and-groff.patch @@ -0,0 +1,53 @@ +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/grep.spec b/grep.spec index 4cb0f94fb98f31ccb4a2a1f9d9c23f94d187ba41..59f98eb5e26ee74c520a1404df2b1001aa8e41e4 100644 --- a/grep.spec +++ b/grep.spec @@ -1,8 +1,8 @@ Name: grep Version: 3.11 -Release: 3 +Release: 4 Summary: A string search utility -License: GPL-3.0-or-later AND LGPL-3.0-or-later AND LGPL-2.1-or-later AND GPL-2.0-or-later AND LGPL-2.0-or-later AND GFDL-1.3-no-invariants-or-later +License: GPLv3+ URL: https://www.gnu.org/software/grep Source0: https://ftp.gnu.org/gnu/grep/grep-%{version}.tar.xz Source1: color_grep.sh @@ -10,6 +10,8 @@ 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) @@ -50,6 +52,10 @@ install -Dpm 755 %{SOURCE3} $RPM_BUILD_ROOT%{_libexecdir}/grepconf.sh %{_mandir}/man1/*grep.1* %changelog +* Mon Aug 26 2024 guojunding - 3.11-4 +- fix troff typos +- fix recognition of cs_CZ.UTF-8 locale on FreeBSD + * Tue Jul 30 2024 Funda Wang - 3.11-3 - fix lang file declaration