From b35d5fa3741e664f7b6b7ca4ce5b99fc1eb889c7 Mon Sep 17 00:00:00 2001 From: CentOS Sources Date: Mar 05 2015 13:20:49 +0000 Subject: import grep-2.20-1.el7 --- diff --git a/.gitignore b/.gitignore index 4f24c1c..b22ef91 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1 @@ -SOURCES/grep-2.16.tar.xz +SOURCES/grep-2.20.tar.xz diff --git a/.grep.metadata b/.grep.metadata index 069a1f0..c128006 100644 --- a/.grep.metadata +++ b/.grep.metadata @@ -1 +1 @@ -4ab9c1f8a5934734d3e01dc32ee1a8ae0f974359 SOURCES/grep-2.16.tar.xz +55aac6158b51baa505669cf8f86440bcc106ec65 SOURCES/grep-2.20.tar.xz diff --git a/SOURCES/colorgrep.csh b/SOURCES/colorgrep.csh index 0b76c97..b3152a6 100644 --- a/SOURCES/colorgrep.csh +++ b/SOURCES/colorgrep.csh @@ -1,13 +1,9 @@ # color-grep initialization -if ( -r /etc/GREP_COLORS ) then - set color_none=`sed -n '/^COLOR.*none/Ip' < /etc/GREP_COLORS` - if ( "$color_none" != '' ) then - unset color_none - exit - endif - unset color_none +/usr/libexec/grepconf.sh -c +if ( $status == 1 ) then + exit endif alias grep 'grep --color=auto' diff --git a/SOURCES/colorgrep.sh b/SOURCES/colorgrep.sh index 9b23d61..cd0539c 100644 --- a/SOURCES/colorgrep.sh +++ b/SOURCES/colorgrep.sh @@ -1,11 +1,6 @@ # color-grep initialization -# Skip the rest for noninteractive shells. -[ -z "$PS1" ] && return - -if [ -r /etc/GREP_COLORS ]; then - grep -qi "^COLOR.*none" /etc/GREP_COLORS >/dev/null 2>/dev/null && return -fi +/usr/libexec/grepconf.sh -c || return alias grep='grep --color=auto' 2>/dev/null alias egrep='egrep --color=auto' 2>/dev/null diff --git a/SOURCES/grep-2.16-gnulib-tests-rm-f.patch b/SOURCES/grep-2.16-gnulib-tests-rm-f.patch deleted file mode 100644 index 190a670..0000000 --- a/SOURCES/grep-2.16-gnulib-tests-rm-f.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -upr a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh ---- a/gnulib-tests/test-update-copyright.sh 2014-01-02 02:32:07.000000000 +0100 -+++ b/gnulib-tests/test-update-copyright.sh 2014-02-04 11:49:27.000000000 +0100 -@@ -228,7 +228,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, - # Software Foundation, Inc. - EOF - --rm $TMP* -+rm -f $TMP* - - ## -------------- ## - ## Current year. ## -@@ -254,7 +254,7 @@ compare /dev/null $TMP-stderr || exit 1 - compare - $TMP <&2 "Invalid / no option passed, so far only -c | --interactive-color is supported." + exit 1 + ;; +esac diff --git a/SPECS/grep.spec b/SPECS/grep.spec index b3c7b8d..1a9490f 100644 --- a/SPECS/grep.spec +++ b/SPECS/grep.spec @@ -2,7 +2,7 @@ Summary: Pattern matching utilities Name: grep -Version: 2.16 +Version: 2.20 Release: 1%{?dist} License: GPLv3+ Group: Applications/Text @@ -10,11 +10,11 @@ Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz Source1: colorgrep.sh Source2: colorgrep.csh Source3: GREP_COLORS -Patch1: grep-2.16-gnulib-tests-rm-f.patch +Source4: grepconf.sh # upstream ticket 39444 -Patch2: grep-2.16-man-fix-gs.patch +Patch0: grep-2.20-man-fix-gs.patch # upstream ticket 39445 -Patch3: grep-2.16-help-align.patch +Patch1: grep-2.20-help-align.patch URL: http://www.gnu.org/software/grep/ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -33,9 +33,8 @@ GNU grep is needed by many scripts, so it shall be installed on every system. %prep %setup -q -%patch1 -p1 -b .gnulib-tests-rm-f -%patch2 -p1 -b .man-fix-gs -%patch3 -p1 -b .help-align +%patch0 -p1 -b .man-fix-gs +%patch1 -p1 -b .help-align %build %global BUILD_FLAGS $RPM_OPT_FLAGS @@ -59,6 +58,7 @@ 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 %find_lang %name @@ -85,9 +85,14 @@ fi %config(noreplace) %{_sysconfdir}/GREP_COLORS %{_infodir}/*.info*.gz %{_mandir}/*/* +%{_libexecdir}/grepconf.sh %changelog -* Tue Feb 04 2014 Jan Grulich - 2.20-1 +- New version + Resolves: rhbz#1123005 + +* Tue Feb 04 2014 Jan Grulich - 2.16-1 - Update to 2.16 - Resolves: rhbz#1050916 - Resolves: rhbz#1050919