grep/grep.spec

112 lines
3.1 KiB
RPMSpec
Raw Permalink Normal View History

#
# spec file for package grep
#
also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. * The -s option no longer suppresses "binary file matches" - use release keyring rather than full one for validation - Make profiling deterministic (bsc#1040589, SLE-24115) * --files-without-match (-L) behavior reverted to again succeed * When standard output is /dev/null, grep no longer fails when - Drop upstreamed proc-lseek-glitch.patch an invalid regular expression that was read from an * 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 With a multibyte locale, that matcher could mistakenly match a string containing a newline. For example, this command: would mistakenly match and print all four input bytes. After * 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 * 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 -c no longer stops counting when finding binary data. OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=142
2024-04-10 11:05:21 +02:00
# 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
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.
# Please submit bugfixes or comments via https://bugs.opensuse.org/
#
Name: grep
Version: 3.11
Release: 0
Summary: Print lines matching a pattern
License: GPL-3.0-or-later
Group: Productivity/Text/Utilities
URL: https://www.gnu.org/software/grep/
Source0: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz
Source2: https://ftp.gnu.org/gnu/%{name}/%{name}-%{version}.tar.xz.sig
# Taken from https://savannah.gnu.org/project/release-gpgkeys.php?group=grep&download=1
Source3: %{name}.keyring
Source4: profile.sh
Source5: %{name}-rpmlintrc
Patch0: efgrep-warning.patch
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
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.
%lang_package
%prep
%autosetup -p1
%build
export CONFIG_SHELL=/bin/sh
%configure \
--disable-silent-rules \
%{nil}
%if 0%{?do_profiling}
%make_build CFLAGS="%{optflags} %{cflags_profile_generate}"
setarch -R sh %{SOURCE4} # profiling run
%make_build clean
%make_build CFLAGS="%{optflags} %{cflags_profile_feedback}"
%else
%make_build
%endif
%check
%if 0%{?qemu_user_space_build}
echo exit 77 > tests/stack-overflow
echo exit 77 > tests/pcre-jitstack
echo exit 77 > gnulib-tests/test-c-stack.sh
echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow1.c
echo 'int main() { return 77; }' > gnulib-tests/test-sigsegv-catch-stackoverflow2.c
%endif
%make_build check
%install
%make_install
%if 0%{?suse_version} < 1550
install -d %{buildroot}/bin
ln -sf %{_bindir}/egrep %{buildroot}/bin/egrep
ln -sf %{_bindir}/fgrep %{buildroot}/bin/fgrep
ln -sf %{_bindir}/grep %{buildroot}/bin/grep
%endif
%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*
%if 0%{?suse_version} < 1550
- split the deprecated egrep/fgrep into a deprecated subpackage to be able to identify remaining usages also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. * The -s option no longer suppresses "binary file matches" - use release keyring rather than full one for validation - Make profiling deterministic (bsc#1040589, SLE-24115) * --files-without-match (-L) behavior reverted to again succeed * When standard output is /dev/null, grep no longer fails when - Drop upstreamed proc-lseek-glitch.patch an invalid regular expression that was read from an * 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 With a multibyte locale, that matcher could mistakenly match a string containing a newline. For example, this command: would mistakenly match and print all four input bytes. After * 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 * 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 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=140
2024-04-10 11:04:40 +02:00
/bin/egrep
/bin/fgrep
/bin/grep
- split the deprecated egrep/fgrep into a deprecated subpackage to be able to identify remaining usages also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. * The -s option no longer suppresses "binary file matches" - use release keyring rather than full one for validation - Make profiling deterministic (bsc#1040589, SLE-24115) * --files-without-match (-L) behavior reverted to again succeed * When standard output is /dev/null, grep no longer fails when - Drop upstreamed proc-lseek-glitch.patch an invalid regular expression that was read from an * 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 With a multibyte locale, that matcher could mistakenly match a string containing a newline. For example, this command: would mistakenly match and print all four input bytes. After * 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 * 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 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=140
2024-04-10 11:04:40 +02:00
%endif
%{_bindir}/egrep
%{_bindir}/fgrep
%{_bindir}/grep
%{_mandir}/man1/grep.1%{?ext_man}
%{_infodir}/grep.info%{?ext_info}
- split the deprecated egrep/fgrep into a deprecated subpackage to be able to identify remaining usages also match e.g., the Arabic digits: ٠١٢٣٤٥٦٧٨٩. * The -s option no longer suppresses "binary file matches" - use release keyring rather than full one for validation - Make profiling deterministic (bsc#1040589, SLE-24115) * --files-without-match (-L) behavior reverted to again succeed * When standard output is /dev/null, grep no longer fails when - Drop upstreamed proc-lseek-glitch.patch an invalid regular expression that was read from an * 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 With a multibyte locale, that matcher could mistakenly match a string containing a newline. For example, this command: would mistakenly match and print all four input bytes. After * 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 * 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 OBS-URL: https://build.opensuse.org/package/show/Base:System/grep?expand=0&rev=140
2024-04-10 11:04:40 +02:00
%files lang -f %{name}.lang
%changelog