Compare commits

..

No commits in common. "rawhide" and "f26" have entirely different histories.

12 changed files with 117 additions and 3908 deletions

View file

@ -1 +0,0 @@
1

3
.gitignore vendored
View file

@ -1,2 +1 @@
/grep-*.tar.xz
/grep-*.tar.xz.sig
grep-*.tar.xz

View file

@ -7,5 +7,5 @@ if ( $status == 1 ) then
endif
alias grep 'grep --color=auto'
alias egrep 'grep -E --color=auto'
alias fgrep 'grep -F --color=auto'
alias egrep 'egrep --color=auto'
alias fgrep 'fgrep --color=auto'

View file

@ -3,5 +3,5 @@
/usr/libexec/grepconf.sh -c || return
alias grep='grep --color=auto' 2>/dev/null
alias egrep='grep -E --color=auto' 2>/dev/null
alias fgrep='grep -F --color=auto' 2>/dev/null
alias egrep='egrep --color=auto' 2>/dev/null
alias fgrep='fgrep --color=auto' 2>/dev/null

View file

@ -1,16 +0,0 @@
--- !Policy
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_testing]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}
#gating rawhide
--- !Policy
product_versions:
- fedora-*
decision_contexts: [bodhi_update_push_stable]
subject_type: koji_build
rules:
- !PassingTestCaseRule {test_case_name: fedora-ci.koji-build.tier0.functional}

View file

@ -1,38 +0,0 @@
diff --git a/tests/Makefile.am b/tests/Makefile.am
index 223088f..315ced7 100644
--- a/tests/Makefile.am
+++ b/tests/Makefile.am
@@ -195,7 +195,6 @@ TESTS = \
word-delim-multibyte \
word-multi-file \
word-multibyte \
- write-error-msg \
y2038-vs-32-bit \
yesno \
z-anchor-newline
diff --git a/tests/Makefile.in b/tests/Makefile.in
index 3270d30..33dcd8a 100644
--- a/tests/Makefile.in
+++ b/tests/Makefile.in
@@ -2729,7 +2729,6 @@ TESTS = \
word-delim-multibyte \
word-multi-file \
word-multibyte \
- write-error-msg \
y2038-vs-32-bit \
yesno \
z-anchor-newline
@@ -3970,13 +3969,6 @@ word-multibyte.log: word-multibyte
--log-file $$b.log --trs-file $$b.trs \
$(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
"$$tst" $(AM_TESTS_FD_REDIRECT)
-write-error-msg.log: write-error-msg
- @p='write-error-msg'; \
- b='write-error-msg'; \
- $(am__check_pre) $(LOG_DRIVER) --test-name "$$f" \
- --log-file $$b.log --trs-file $$b.trs \
- $(am__common_driver_flags) $(AM_LOG_DRIVER_FLAGS) $(LOG_DRIVER_FLAGS) -- $(LOG_COMPILE) \
- "$$tst" $(AM_TESTS_FD_REDIRECT)
y2038-vs-32-bit.log: y2038-vs-32-bit
@p='y2038-vs-32-bit'; \
b='y2038-vs-32-bit'; \

View file

@ -1,8 +1,8 @@
diff --git a/src/grep.c b/src/grep.c
index a530988..b6f6ee3 100644
index a2de03d..fd1b3a9 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -2023,7 +2023,8 @@ Output control:\n\
@@ -1962,17 +1962,20 @@ Output control:\n\
-D, --devices=ACTION how to handle devices, FIFOs and sockets;\n\
ACTION is 'read' or 'skip'\n\
-r, --recursive like --directories=recurse\n\
@ -11,9 +11,16 @@ index a530988..b6f6ee3 100644
+ likewise, but follow all symlinks\n\
"));
printf (_("\
--include=GLOB search only files that match GLOB (a file pattern)"
@@ -2033,7 +2034,7 @@ Output control:\n\
--exclude-dir=GLOB skip directories that match GLOB\n\
- --include=FILE_PATTERN search only files that match FILE_PATTERN\n\
- --exclude=FILE_PATTERN skip files and directories matching\
+ --include=FILE_PATTERN\n\
+ search only files that match FILE_PATTERN\n\
+ --exclude=FILE_PATTERN\n\
+ skip files and directories matching\
FILE_PATTERN\n\
--exclude-from=FILE skip files matching any file pattern from FILE\n\
- --exclude-dir=PATTERN directories that match PATTERN will be skipped.\n\
+ --exclude-dir=PATTERN directories that match PATTERN will be skipped.\n\
"));
printf (_("\
- -L, --files-without-match print only names of FILEs with no selected lines\n\

View file

@ -0,0 +1,61 @@
diff --git a/doc/grep.in.1 b/doc/grep.in.1
index 40c9586..a4e89eb 100644
--- a/doc/grep.in.1
+++ b/doc/grep.in.1
@@ -335,7 +335,7 @@ Print
.I NUM
lines of trailing context after matching lines.
Places a line containing a group separator
-.RB ( \-\^\- )
+.RB "(described under " \-\^\-group\-separator )
between contiguous groups of matches.
With the
.B \-o
@@ -348,7 +348,7 @@ Print
.I NUM
lines of leading context before matching lines.
Places a line containing a group separator
-.RB ( \-\^\- )
+.RB "(described under " \-\^\-group\-separator )
between contiguous groups of matches.
With the
.B \-o
@@ -361,13 +361,24 @@ Print
.I NUM
lines of output context.
Places a line containing a group separator
-.RB ( \-\^\- )
+.RB "(described under " \-\^\-group\-separator )
between contiguous groups of matches.
With the
.B \-o
or
.B \-\^\-only\-matching
option, this has no effect and a warning is given.
+.TP
+.BI \-\^\-group\-separator= SEP
+Use
+.I SEP
+as a group separator. By default
+.I SEP
+is double hyphen
+.RB ( \-\^\- ).
+.TP
+.B \-\^\-no\-group-separator
+Use empty string as a group separator.
.SS "File and Directory Selection"
.TP
.BR \-a ", " \-\^\-text
diff --git a/src/grep.c b/src/grep.c
index 8d22aec..a2de03d 100644
--- a/src/grep.c
+++ b/src/grep.c
@@ -1986,6 +1986,8 @@ Context control:\n\
"));
printf (_("\
-NUM same as --context=NUM\n\
+ --group-separator=SEP use SEP as a group separator\n\
+ --no-group-separator use empty string as a group separator\n\
--color[=WHEN],\n\
--colour[=WHEN] use markers to highlight the matching strings;\n\
WHEN is 'always', 'never', or 'auto'\n\

File diff suppressed because it is too large Load diff

235
grep.spec
View file

@ -1,43 +1,29 @@
%define _bindir /bin
Summary: Pattern matching utilities
Name: grep
Version: 3.12
Release: 2%{?dist}
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
URL: https://www.gnu.org/software/grep/
Source0: https://ftp.gnu.org/pub/gnu/%{name}/%{name}-%{version}.tar.xz
Source1: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
Source2: https://savannah.gnu.org/project/release-gpgkeys.php?group=grep&download=1'#/grep-keyring.gpg
Source3: colorgrep.sh
Source4: colorgrep.csh
Source5: GREP_COLORS
Source6: grepconf.sh
Version: 3.1
Release: 1%{?dist}
License: GPLv3+
URL: http://www.gnu.org/software/grep/
Group: Applications/Text
Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz
Source1: colorgrep.sh
Source2: colorgrep.csh
Source3: GREP_COLORS
Source4: grepconf.sh
# upstream ticket 39444
Patch0: grep-3.31-man-fix-gs.patch
# upstream ticket 39445
Patch: grep-3.5-help-align.patch
# upstream ticket 77800
Patch: grep-3.12-test-write-error-msg-drop.patch
Patch1: grep-3.31-help-align.patch
Requires(post): /sbin/install-info
Requires(preun): /sbin/install-info
BuildRequires: gcc
BuildRequires: pcre2-devel
BuildRequires: texinfo
BuildRequires: gettext
BuildRequires: autoconf
BuildRequires: automake
# temporal for the gnulib patch
BuildRequires: gettext-devel
Buildrequires: glibc-all-langpacks
BuildRequires: perl(FileHandle)
BuildRequires: make
BuildRequires: gnupg2
BuildRequires: pcre-devel >= 3.9-10, texinfo, gettext
BuildRequires: autoconf automake
# https://fedorahosted.org/fpc/ticket/174
Provides: bundled(gnulib)
# for backward compatibility (rhbz#1540485)
Provides: /bin/grep
Provides: /bin/fgrep
Provides: /bin/egrep
%description
The GNU versions of commonly used grep utilities. Grep searches through
@ -47,8 +33,9 @@ prints the matching lines. GNU's grep utilities include grep, egrep and fgrep.
GNU grep is needed by many scripts, so it shall be installed on every system.
%prep
%{gpgverify} --keyring='%{SOURCE2}' --signature='%{SOURCE1}' --data='%{SOURCE0}'
%autosetup -p1
%setup -q
%patch0 -p1 -b .man-fix-gs
%patch1 -p1 -b .help-align
%build
%global BUILD_FLAGS $RPM_OPT_FLAGS
@ -60,25 +47,35 @@ GNU grep is needed by many scripts, so it shall be installed on every system.
%global BUILD_FLAGS %{BUILD_FLAGS} -mlong-double-64
%endif
%configure --without-included-regex --disable-silent-rules CFLAGS="%{BUILD_FLAGS}"
%make_build
%configure --without-included-regex --disable-silent-rules \
CPPFLAGS="-I%{_includedir}/pcre" CFLAGS="%{BUILD_FLAGS}"
make %{?_smp_mflags}
%install
%make_install
make %{?_smp_mflags} DESTDIR=$RPM_BUILD_ROOT install
gzip $RPM_BUILD_ROOT%{_infodir}/grep*
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -pm 644 %{SOURCE3} %{SOURCE4} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -pm 644 %{SOURCE5} $RPM_BUILD_ROOT%{_sysconfdir}
install -Dpm 755 %{SOURCE6} $RPM_BUILD_ROOT%{_libexecdir}/grepconf.sh
install -pm 644 %{SOURCE1} %{SOURCE2} $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
install -pm 644 %{SOURCE3} $RPM_BUILD_ROOT%{_sysconfdir}
install -Dpm 755 %{SOURCE4} $RPM_BUILD_ROOT%{_libexecdir}/grepconf.sh
%find_lang %name
%check
make check
%post
/sbin/install-info --quiet --info-dir=%{_infodir} %{_infodir}/grep.info.gz || :
%preun
if [ $1 = 0 ]; then
/sbin/install-info --quiet --info-dir=%{_infodir} --delete %{_infodir}/grep.info.gz || :
fi
%files -f %{name}.lang
%doc AUTHORS THANKS TODO NEWS README
%{!?_licensedir:%global license %%doc}
%license COPYING
%{_bindir}/*
@ -89,162 +86,6 @@ make check
%{_libexecdir}/grepconf.sh
%changelog
* Thu Jul 24 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.12-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_43_Mass_Rebuild
* Mon Apr 14 2025 Jaroslav Škarvada <jskarvad@redhat.com> - 3.12-1
- New version
Resolves: rhbz#2358901
* Fri Jan 17 2025 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_42_Mass_Rebuild
* Thu Jul 18 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
* Mon Apr 29 2024 Lukáš Zaoral <lzaoral@redhat.com> - 3.11-8
- remove redundant dependency on libsigsegv (RHEL-34664)
* Wed Jan 24 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Sat Jan 20 2024 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_40_Mass_Rebuild
* Thu Aug 10 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 3.11-5
- Updated SPDX license expression
* Wed Aug 9 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 3.11-4
- Converted license to SPDX
* Thu Jul 20 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.11-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_39_Mass_Rebuild
* Thu Jul 13 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 3.11-2
- Fixed egrep/fgrep aliases
Resolves: rhbz#2215713
* Tue Jun 6 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 3.11-1
- New version
Resolves: rhbz#2181063
* Thu Mar 23 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 3.10-1
- New version
Resolves: rhbz#2181063
* Tue Mar 7 2023 Jaroslav Škarvada <jskarvad@redhat.com> - 3.9-1
- New version
Resolves: rhbz#2175526
- Added sources verification
* Thu Jan 19 2023 Fedora Release Engineering <releng@fedoraproject.org> - 3.8-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild
* Tue Jan 3 2023 Florian Weimer <fweimer@redhat.com> - 3.8-2
- Fix C99 compatibility issue in the configure script
* Mon Sep 5 2022 Jaroslav Škarvada <jskarvad@redhat.com> - 3.8-1
- New version
Resolves: rhbz#2123935
- Switchd to pcre2
Resolves: rhbz#1755491
* Thu Jul 21 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild
* Fri Apr 8 2022 Davide Cavalca <dcavalca@fedoraproject.org> - 3.7-3
- Gate perl-FileHandle dependency to f33 onwards
* Thu Jan 20 2022 Fedora Release Engineering <releng@fedoraproject.org> - 3.7-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild
* Mon Aug 16 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 3.7-1
- New version
Resolves: rhbz#1993631
- Temporarily switch to the included regex until glibc bug (glibc#11053)
is fixed
* Thu Jul 22 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild
* Wed Jun 23 2021 Jaroslav Škarvada <jskarvad@redhat.com> - 3.6-3
- Fixed stack overflow detection
* Tue Jan 26 2021 Fedora Release Engineering <releng@fedoraproject.org> - 3.6-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_34_Mass_Rebuild
* Mon Nov 9 2020 Jaroslav Škarvada <jskarvad@redhat.com> - 3.6-1
- New version
Resolves: rhbz#1895797
* Wed Sep 30 2020 Jaroslav Škarvada <jskarvad@redhat.com> - 3.5-1
- New version
Resolves: rhbz#1883086
* Wed Aug 26 2020 Adam Williamson <awilliam@redhat.com> - 3.4-5
- Backport fix for upstream #28105 to fix zgrep
Resolves: rhbz#1872913
- Remove some non-portable tests that fail on armv7hl (Paul Eggert)
Resolves: rhbz#1863830
* Sat Aug 01 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-4
- Second attempt - Rebuilt for
https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Tue Jul 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.4-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_33_Mass_Rebuild
* Mon Jul 13 2020 Tom Stellard <tstellar@redhat.com> - 3.4-2
- Use make macros
- https://fedoraproject.org/wiki/Changes/UseMakeBuildInstallMacro
* Wed Apr 1 2020 Jaroslav Škarvada <jskarvad@redhat.com> - 3.4-1
- New version
Resolves: rhbz#1818417
- Added all glibc langpacks to allow more locale sensitive tests to run
- Added perl-FileHandle requirement for the filename-lineno.pl test
* Wed Jan 29 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
* Thu Jul 25 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Wed Apr 24 2019 Björn Esser <besser82@fedoraproject.org> - 3.3-2
- Remove hardcoded gzip suffix from GNU info pages
* Wed Apr 10 2019 Jaroslav Škarvada <jskarvad@redhat.com> - 3.3-1
- New version
Resolves: rhbz#1698044
- Updated patches
- Dropped glibc-2.28-fix patch (not needed)
* Fri Feb 01 2019 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-9
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Aug 9 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 3.1-8
- Fixed FTBFS with glibc-2.28
Resolves: rhbz#1604263
* Fri Jul 13 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Tue Jun 19 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 3.1-6
- Dropped install-info
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-5
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Fri Feb 2 2018 Jaroslav Škarvada <jskarvad@redhat.com> - 3.1-4
- Moved binaries to /usr/bin
Resolves: rhbz#1540485
* Wed Aug 02 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Binutils_Mass_Rebuild
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 3.1-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Mon Jul 3 2017 Jaroslav Škarvada <jskarvad@redhat.com> - 3.1-1
- New version
Related: rhbz#1421129

View file

@ -1,6 +0,0 @@
summary: Test plan with all Fedora tests
discover:
how: fmf
url: https://src.fedoraproject.org/tests/grep.git
execute:
how: tmt

View file

@ -1,2 +1 @@
SHA512 (grep-3.12.tar.xz) = c54b4db5a8b9afe098c088decd94977746305284d716666a60bac82b4edc0fae4acf828970b5b6fc7d58ecd549f638e17e6958f33a71fedcc7d7415b9228b161
SHA512 (grep-3.12.tar.xz.sig) = 333755fd9e5879436789a19e9593667d6fb96c2d1b876a1c391eb9cd75d10bb7fbc10215db9838280e6006790c818ef4583b1ae22318a833a5b69264ca15dbf1
SHA512 (grep-3.1.tar.xz) = 05494381c7dd8aad7e2ee4c17450de8d7b969a99dcfe17747db60df3475bf02d5323d091e896e8343e4f3251c29dc7f0b7a9f93c575c9d58ee2a57014c2c9d26