diff --git a/grep-2.11-gnulib-tests-rm-f.patch b/grep-2.11-gnulib-tests-rm-f.patch deleted file mode 100644 index 9754013..0000000 --- a/grep-2.11-gnulib-tests-rm-f.patch +++ /dev/null @@ -1,112 +0,0 @@ -diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tests/test-update-copyright.sh ---- grep-2.9/gnulib-tests/test-update-copyright.sh.orig 2011-01-03 21:57:35.000000000 +0100 -+++ grep-2.9/gnulib-tests/test-update-copyright.sh 2011-07-11 11:39:18.000000000 +0200 -@@ -231,7 +231,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, - # Software Foundation, Inc. - EOF - --rm $TMP* -+rm -f $TMP* - - ## -------------- ## - ## Current year. ## -@@ -257,7 +257,7 @@ compare /dev/null $TMP-stderr || exit 1 - compare - $TMP <<EOF || exit 1 - '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc. - EOF --rm $TMP* -+rm -f $TMP* - - ## ------------------ ## - ## Surrounding text. ## -@@ -281,7 +281,7 @@ dnl Undisturbed text. - dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc. - dnl Undisturbed text. - EOF --rm $TMP* -+rm -f $TMP* - - ## --------------- ## - ## Widest prefix. ## -@@ -310,7 +310,7 @@ compare - $TMP <<EOF || exit 1 - #### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software - #### Foundation, Inc. - EOF --rm $TMP* -+rm -f $TMP* - - ## ------------------- ## - ## Prefix too large. ## -@@ -333,7 +333,7 @@ compare - $TMP <<EOF || exit 1 - #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - #### 2008 Free Software Foundation, Inc. - EOF --rm $TMP* -+rm -f $TMP* - - ## ------------- ## - ## Blank lines. ## -@@ -368,7 +368,7 @@ Copyright (C) 1976, 1977, 1978, 1979, 19 - 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, - 2008 Free Software Foundation, Inc. - EOF --rm $TMP* -+rm -f $TMP* - - ## -------------- ## - ## Leading tabs. ## -@@ -397,7 +397,7 @@ compare - $TMP <<EOF || exit 1 - Copyright (C) 1987-1988, 1991-2011 Free Software Foundation, - Inc. - EOF --rm $TMP* -+rm -f $TMP* - - ## -------------------- ## - ## Unusual whitespace. ## -@@ -434,7 +434,7 @@ compare - $TMP <<EOF || exit 1 - compare - $TMP <<EOF || exit 1 - # Copyright (C) 1987-2011 Free Software Foundation, Inc. - EOF --rm $TMP* -+rm -f $TMP* - - ## --------- ## - ## DOS EOL. ## -@@ -449,7 +449,7 @@ Rem 1998, 1999, 2000, 2001, 2002, 2003, - Rem 2009, 2010 Free Software Foundation, Inc.@ - EOF - compare $TMP-exp $TMP || exit 1 --rm $TMP* -+rm -f $TMP* - - ## --------------- ## - ## Omitted "(C)". ## -@@ -470,7 +470,7 @@ compare - $TMP <<EOF || exit 1 - 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 - Free Software Foundation, Inc. - EOF --rm $TMP* -+rm -f $TMP* - - ## ------------------ ## - ## C-style comments. ## -@@ -532,6 +532,6 @@ compare - $TMP.extra-text-space <<EOF || - Inc. *** - * End of comments. */ - EOF --rm $TMP* -+rm -f $TMP* - - exit 0 -diff -up grep-2.9/gnulib-tests/test-version-etc.sh.orig grep-2.9/gnulib-tests/test-version-etc.sh ---- grep-2.9/gnulib-tests/test-version-etc.sh.orig 2011-01-03 21:57:35.000000000 +0100 -+++ grep-2.9/gnulib-tests/test-version-etc.sh 2011-07-11 11:40:12.706055333 +0200 -@@ -38,6 +38,6 @@ EOT - tr -d '\015' | - diff -c $TMP - || ERR=1 - --rm $TMP -+rm -f $TMP - - exit $ERR diff --git a/grep-2.14-gnulib-tests-rm-f.patch b/grep-2.14-gnulib-tests-rm-f.patch new file mode 100644 index 0000000..29c15d8 --- /dev/null +++ b/grep-2.14-gnulib-tests-rm-f.patch @@ -0,0 +1,114 @@ +diff --git a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh +index 80b8c5a..c746a9b 100755 +--- a/gnulib-tests/test-update-copyright.sh ++++ b/gnulib-tests/test-update-copyright.sh +@@ -228,7 +228,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc. + # Software Foundation, Inc. + EOF + +-rm $TMP* ++rm -f $TMP* + + ## -------------- ## + ## Current year. ## +@@ -254,7 +254,7 @@ compare /dev/null $TMP-stderr || exit 1 + compare - $TMP <<EOF || exit 1 + '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc. + EOF +-rm $TMP* ++rm -f $TMP* + + ## ------------------ ## + ## Surrounding text. ## +@@ -278,7 +278,7 @@ dnl Undisturbed text. + dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc. + dnl Undisturbed text. + EOF +-rm $TMP* ++rm -f $TMP* + + ## --------------- ## + ## Widest prefix. ## +@@ -307,7 +307,7 @@ compare - $TMP <<EOF || exit 1 + #### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software + #### Foundation, Inc. + EOF +-rm $TMP* ++rm -f $TMP* + + ## ------------------- ## + ## Prefix too large. ## +@@ -330,7 +330,7 @@ compare - $TMP <<EOF || exit 1 + #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, + #### 2008 Free Software Foundation, Inc. + EOF +-rm $TMP* ++rm -f $TMP* + + ## ------------- ## + ## Blank lines. ## +@@ -365,7 +365,7 @@ Copyright (C) 1976, 1977, 1978, 1979, 1980, 1981, 1982, 1983, 1984, 1985, + 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, + 2008 Free Software Foundation, Inc. + EOF +-rm $TMP* ++rm -f $TMP* + + ## -------------- ## + ## Leading tabs. ## +@@ -394,7 +394,7 @@ compare - $TMP <<EOF || exit 1 + Copyright (C) 1987-1988, 1991-2011 Free Software Foundation, + Inc. + EOF +-rm $TMP* ++rm -f $TMP* + + ## -------------------- ## + ## Unusual whitespace. ## +@@ -431,7 +431,7 @@ compare /dev/null $TMP-stderr || exit 1 + compare - $TMP <<EOF || exit 1 + # Copyright (C) 1987-2011 Free Software Foundation, Inc. + EOF +-rm $TMP* ++rm -f $TMP* + + ## --------- ## + ## DOS EOL. ## +@@ -453,7 +453,7 @@ Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@ + Rem 2009, 2010 Free Software Foundation, Inc.@ + EOF + compare $TMP-exp $TMP || exit 1 +-rm $TMP* ++rm -f $TMP* + + ## --------------- ## + ## Omitted "(C)". ## +@@ -474,7 +474,7 @@ compare - $TMP <<EOF || exit 1 + 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 + Free Software Foundation, Inc. + EOF +-rm $TMP* ++rm -f $TMP* + + ## ------------------ ## + ## C-style comments. ## +@@ -536,6 +536,6 @@ compare - $TMP.extra-text-space <<EOF || exit 1 + Inc. *** + * End of comments. */ + EOF +-rm $TMP* ++rm -f $TMP* + + exit 0 +diff --git a/gnulib-tests/test-version-etc.sh b/gnulib-tests/test-version-etc.sh +index 945383b..7c322e7 100755 +--- a/gnulib-tests/test-version-etc.sh ++++ b/gnulib-tests/test-version-etc.sh +@@ -38,6 +38,6 @@ EOT + tr -d '\015' | + diff -c $TMP - || ERR=1 + +-rm $TMP ++rm -f $TMP + + exit $ERR diff --git a/grep-2.14-help-align.patch b/grep-2.14-help-align.patch new file mode 100644 index 0000000..9ee7f81 --- /dev/null +++ b/grep-2.14-help-align.patch @@ -0,0 +1,29 @@ +diff --git a/src/main.c b/src/main.c +index 145d6a1..c174472 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1590,16 +1590,19 @@ 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\ +- -R, --dereference-recursive likewise, but follow all symlinks\n\ ++ -R, --dereference-recursive\n\ ++ likewise, but follow all symlinks\n\ + ")); + printf (_("\ +- --include=FILE_PATTERN search only files that match FILE_PATTERN\n\ +- --exclude=FILE_PATTERN skip files and directories matching FILE_PATTERN\n\ ++ --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 containing no match\n\ ++ -L, --files-without-match print only names of FILEs containing no match\n\ + -l, --files-with-matches print only names of FILEs containing matches\n\ + -c, --count print only a count of matching lines per FILE\n\ + -T, --initial-tab make tabs line up (if needed)\n\ diff --git a/grep-2.14-man-fix-gs.patch b/grep-2.14-man-fix-gs.patch new file mode 100644 index 0000000..ee06674 --- /dev/null +++ b/grep-2.14-man-fix-gs.patch @@ -0,0 +1,61 @@ +diff --git a/doc/grep.in.1 b/doc/grep.in.1 +index f2d4362..f3e416b 100644 +--- a/doc/grep.in.1 ++++ b/doc/grep.in.1 +@@ -377,7 +377,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 +@@ -390,7 +390,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 +@@ -403,13 +403,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/main.c b/src/main.c +index e3b5186..145d6a1 100644 +--- a/src/main.c ++++ b/src/main.c +@@ -1613,6 +1613,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\ diff --git a/grep.spec b/grep.spec index cc3c50d..6decd44 100644 --- a/grep.spec +++ b/grep.spec @@ -3,15 +3,19 @@ Summary: Pattern matching utilities Name: grep Version: 2.14 -Release: 3%{?dist} +Release: 4%{?dist} License: GPLv3+ Group: Applications/Text Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz Source1: colorgrep.sh Source2: colorgrep.csh Source3: GREP_COLORS -Patch1: grep-2.11-gnulib-tests-rm-f.patch +Patch1: grep-2.14-gnulib-tests-rm-f.patch Patch2: grep-2.14-man-fix-R.patch +# upstream ticket 39444 +Patch3: grep-2.14-man-fix-gs.patch +# upstream ticket 39445 +Patch4: grep-2.14-help-align.patch URL: http://www.gnu.org/software/grep/ Requires(post): /sbin/install-info Requires(preun): /sbin/install-info @@ -32,6 +36,8 @@ GNU grep is needed by many scripts, so it shall be installed on every system. %setup -q %patch1 -p1 -b .gnulib-tests-rm-f %patch2 -p1 -b .man-fix-R +%patch3 -p1 -b .man-fix-gs +%patch4 -p1 -b .help-align %build %global BUILD_FLAGS $RPM_OPT_FLAGS @@ -83,6 +89,11 @@ fi %{_mandir}/*/* %changelog +* Tue Jul 9 2013 Jaroslav Škarvada <jskarvad@redhat.com> - 2.14-4 +- Added group-separator, no-group-separator options decription +- Aligned output of built-in help +- Defuzzified gnulib-tests-rm-f patch + * Thu Feb 14 2013 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 2.14-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild