New version

Resolves: rhbz#2175526
Added sources verification
This commit is contained in:
Jaroslav Škarvada 2023-03-07 16:33:37 +01:00
parent 090a9ef808
commit 1d8b4cd378
5 changed files with 3660 additions and 58 deletions

1
.gitignore vendored
View File

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

View File

@ -1,46 +0,0 @@
Work around a recent regression in C99 compatibility in autoconf.
The configure script was generated with an autoconf prerelease,
and the issue has been fixed upstream with this commit:
commit bf5a75953b6d504f0405b1ca33b039b8dd39eef4
Author: Zack Weinberg <zackw@panix.com>
Date: Thu Nov 10 12:05:30 2022 -0500
More fixes for compilers that reject K&R function definitions.
This fixes all of the remaining failures exposed by running the
testsuite with GCC 12 and
CC='cc -Wimplicit-function-declaration -Wold-style-definition
-Wimplicit-int -Werror'
.
* lib/autoconf/c.m4 (_AC_C_C89_TEST_GLOBALS): Dont use K&R function
definitions.
* lib/autoconf/specific.m4 (AC_SYS_RESTARTABLE_SYSCALLS): Likewise.
(AC_FUNC_MKTIME): Declare functions taking no arguments as fn (void)
not fn ().
* lib/autoconf/c.m4 (_AC_C_C99_TEST_GLOBALS): Declare free().
diff --git a/configure b/configure
index 51bd10995a6f57e8..4bdd3ecca7d2c793 100755
--- a/configure
+++ b/configure
@@ -3954,9 +3954,7 @@ struct stat;
/* Most of the following tests are stolen from RCS 5.7 src/conf.sh. */
struct buf { int x; };
struct buf * (*rcsopen) (struct buf *, struct stat *, int);
-static char *e (p, i)
- char **p;
- int i;
+static char *e (char **p, int i)
{
return p[i];
}
@@ -4007,6 +4005,7 @@ extern int puts (const char *);
extern int printf (const char *, ...);
extern int dprintf (int, const char *, ...);
extern void *malloc (size_t);
+extern void free (void *);
// Check varargs macros. These examples are taken from C99 6.10.3.5.
// dprintf is used instead of fprintf to avoid needing to declare

3637
grep-keyring.gpg Normal file

File diff suppressed because it is too large Load Diff

View File

@ -1,18 +1,20 @@
Summary: Pattern matching utilities
Name: grep
Version: 3.8
Release: 3%{?dist}
Version: 3.9
Release: 1%{?dist}
License: GPLv3+
URL: https://www.gnu.org/software/grep/
Source: https://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz
Source1: colorgrep.sh
Source2: colorgrep.csh
Source3: GREP_COLORS
Source4: grepconf.sh
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
# upstream ticket 39445
Patch0: grep-3.5-help-align.patch
Patch1: grep-configure-c99.patch
BuildRequires: gcc
BuildRequires: pcre2-devel
@ -24,6 +26,7 @@ Buildrequires: glibc-all-langpacks
BuildRequires: perl(FileHandle)
BuildRequires: make
BuildRequires: libsigsegv-devel
BuildRequires: gnupg2
# https://fedorahosted.org/fpc/ticket/174
Provides: bundled(gnulib)
# for backward compatibility (rhbz#1540485)
@ -39,6 +42,7 @@ 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
%build
@ -63,9 +67,9 @@ GNU grep is needed by many scripts, so it shall be installed on every system.
gzip $RPM_BUILD_ROOT%{_infodir}/grep*
rm -f $RPM_BUILD_ROOT%{_infodir}/dir
mkdir -p $RPM_BUILD_ROOT%{_sysconfdir}/profile.d
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
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
%find_lang %name
@ -84,6 +88,11 @@ make check
%{_libexecdir}/grepconf.sh
%changelog
* 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

View File

@ -1 +1,2 @@
SHA512 (grep-3.8.tar.xz) = 2014519a80c6dcd799837e1bd7d9d5ebe8729ec54b0dc76981dac4755a9a8a9f200470cdcc911e2825bed8162e61da39e3dd60289f7393b48bf67314077d0c79
SHA512 (grep-3.9.tar.xz) = 38aaa28bded9f6d1d527356e9e63bb1dafb4ec8f09e83f2d3bc86c1d6af1a5a8cb9895067375b5b8929ec2cba6ab71c369ed4c6e2a0f7a01dec3c11a6f4c1836
SHA512 (grep-3.9.tar.xz.sig) = d50e11d0d333c09a6afcae511c93cfb54d9dd0a6600f271abf5e103cbf8bdcf9b8606924d7c71770e20c35df5d5468dc339cea1f05d257776734e17f8378d891