Added group-separator, no-group-separator options decription

- Aligned output of built-in help
- Defuzzified gnulib-tests-rm-f patch
This commit is contained in:
Jaroslav Škarvada 2013-07-09 11:35:39 +02:00
parent 60b424a9f8
commit ce6250744b
4 changed files with 122 additions and 19 deletions

View File

@ -1,7 +1,8 @@
diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tests/test-update-copyright.sh diff --git a/gnulib-tests/test-update-copyright.sh b/gnulib-tests/test-update-copyright.sh
--- grep-2.9/gnulib-tests/test-update-copyright.sh.orig 2011-01-03 21:57:35.000000000 +0100 index 80b8c5a..c746a9b 100755
+++ grep-2.9/gnulib-tests/test-update-copyright.sh 2011-07-11 11:39:18.000000000 +0200 --- a/gnulib-tests/test-update-copyright.sh
@@ -231,7 +231,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, +++ b/gnulib-tests/test-update-copyright.sh
@@ -228,7 +228,7 @@ Copyright (C) 1990-2005, 2007-2009 Acme, Inc.
# Software Foundation, Inc. # Software Foundation, Inc.
EOF EOF
@ -10,7 +11,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## -------------- ## ## -------------- ##
## Current year. ## ## Current year. ##
@@ -257,7 +257,7 @@ compare /dev/null $TMP-stderr || exit 1 @@ -254,7 +254,7 @@ compare /dev/null $TMP-stderr || exit 1
compare - $TMP <<EOF || exit 1 compare - $TMP <<EOF || exit 1
'\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc. '\" Copyright (C) 2006, $YEAR Free Software Foundation, Inc.
EOF EOF
@ -19,7 +20,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## ------------------ ## ## ------------------ ##
## Surrounding text. ## ## Surrounding text. ##
@@ -281,7 +281,7 @@ dnl Undisturbed text. @@ -278,7 +278,7 @@ dnl Undisturbed text.
dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc. dnl Copyright (C) 1989, 2010 Free Software Foundation, Inc.
dnl Undisturbed text. dnl Undisturbed text.
EOF EOF
@ -28,7 +29,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## --------------- ## ## --------------- ##
## Widest prefix. ## ## Widest prefix. ##
@@ -310,7 +310,7 @@ compare - $TMP <<EOF || exit 1 @@ -307,7 +307,7 @@ compare - $TMP <<EOF || exit 1
#### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software #### Copyright (C) 1976-1988, 1999-2008, 2010-2011 Free Software
#### Foundation, Inc. #### Foundation, Inc.
EOF EOF
@ -37,7 +38,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## ------------------- ## ## ------------------- ##
## Prefix too large. ## ## Prefix too large. ##
@@ -333,7 +333,7 @@ compare - $TMP <<EOF || exit 1 @@ -330,7 +330,7 @@ compare - $TMP <<EOF || exit 1
#### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, #### 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
#### 2008 Free Software Foundation, Inc. #### 2008 Free Software Foundation, Inc.
EOF EOF
@ -46,7 +47,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## ------------- ## ## ------------- ##
## Blank lines. ## ## Blank lines. ##
@@ -368,7 +368,7 @@ Copyright (C) 1976, 1977, 1978, 1979, 19 @@ -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, 1986, 1987, 1988, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
2008 Free Software Foundation, Inc. 2008 Free Software Foundation, Inc.
EOF EOF
@ -55,7 +56,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## -------------- ## ## -------------- ##
## Leading tabs. ## ## Leading tabs. ##
@@ -397,7 +397,7 @@ compare - $TMP <<EOF || exit 1 @@ -394,7 +394,7 @@ compare - $TMP <<EOF || exit 1
Copyright (C) 1987-1988, 1991-2011 Free Software Foundation, Copyright (C) 1987-1988, 1991-2011 Free Software Foundation,
Inc. Inc.
EOF EOF
@ -64,7 +65,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## -------------------- ## ## -------------------- ##
## Unusual whitespace. ## ## Unusual whitespace. ##
@@ -434,7 +434,7 @@ compare - $TMP <<EOF || exit 1 @@ -431,7 +431,7 @@ compare /dev/null $TMP-stderr || exit 1
compare - $TMP <<EOF || exit 1 compare - $TMP <<EOF || exit 1
# Copyright (C) 1987-2011 Free Software Foundation, Inc. # Copyright (C) 1987-2011 Free Software Foundation, Inc.
EOF EOF
@ -73,7 +74,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## --------- ## ## --------- ##
## DOS EOL. ## ## DOS EOL. ##
@@ -449,7 +449,7 @@ Rem 1998, 1999, 2000, 2001, 2002, 2003, @@ -453,7 +453,7 @@ Rem 1998, 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,@
Rem 2009, 2010 Free Software Foundation, Inc.@ Rem 2009, 2010 Free Software Foundation, Inc.@
EOF EOF
compare $TMP-exp $TMP || exit 1 compare $TMP-exp $TMP || exit 1
@ -82,7 +83,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## --------------- ## ## --------------- ##
## Omitted "(C)". ## ## Omitted "(C)". ##
@@ -470,7 +470,7 @@ compare - $TMP <<EOF || exit 1 @@ -474,7 +474,7 @@ compare - $TMP <<EOF || exit 1
1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008, 2009, 2010
Free Software Foundation, Inc. Free Software Foundation, Inc.
EOF EOF
@ -91,7 +92,7 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
## ------------------ ## ## ------------------ ##
## C-style comments. ## ## C-style comments. ##
@@ -532,6 +532,6 @@ compare - $TMP.extra-text-space <<EOF || @@ -536,6 +536,6 @@ compare - $TMP.extra-text-space <<EOF || exit 1
Inc. *** Inc. ***
* End of comments. */ * End of comments. */
EOF EOF
@ -99,9 +100,10 @@ diff -up grep-2.9/gnulib-tests/test-update-copyright.sh.orig grep-2.9/gnulib-tes
+rm -f $TMP* +rm -f $TMP*
exit 0 exit 0
diff -up grep-2.9/gnulib-tests/test-version-etc.sh.orig grep-2.9/gnulib-tests/test-version-etc.sh diff --git a/gnulib-tests/test-version-etc.sh b/gnulib-tests/test-version-etc.sh
--- grep-2.9/gnulib-tests/test-version-etc.sh.orig 2011-01-03 21:57:35.000000000 +0100 index 945383b..7c322e7 100755
+++ grep-2.9/gnulib-tests/test-version-etc.sh 2011-07-11 11:40:12.706055333 +0200 --- a/gnulib-tests/test-version-etc.sh
+++ b/gnulib-tests/test-version-etc.sh
@@ -38,6 +38,6 @@ EOT @@ -38,6 +38,6 @@ EOT
tr -d '\015' | tr -d '\015' |
diff -c $TMP - || ERR=1 diff -c $TMP - || ERR=1

View File

@ -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\

View File

@ -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\

View File

@ -3,15 +3,19 @@
Summary: Pattern matching utilities Summary: Pattern matching utilities
Name: grep Name: grep
Version: 2.14 Version: 2.14
Release: 3%{?dist} Release: 4%{?dist}
License: GPLv3+ License: GPLv3+
Group: Applications/Text Group: Applications/Text
Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz Source: ftp://ftp.gnu.org/pub/gnu/grep/grep-%{version}.tar.xz
Source1: colorgrep.sh Source1: colorgrep.sh
Source2: colorgrep.csh Source2: colorgrep.csh
Source3: GREP_COLORS 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 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/ URL: http://www.gnu.org/software/grep/
Requires(post): /sbin/install-info Requires(post): /sbin/install-info
Requires(preun): /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 %setup -q
%patch1 -p1 -b .gnulib-tests-rm-f %patch1 -p1 -b .gnulib-tests-rm-f
%patch2 -p1 -b .man-fix-R %patch2 -p1 -b .man-fix-R
%patch3 -p1 -b .man-fix-gs
%patch4 -p1 -b .help-align
%build %build
%global BUILD_FLAGS $RPM_OPT_FLAGS %global BUILD_FLAGS $RPM_OPT_FLAGS
@ -83,6 +89,11 @@ fi
%{_mandir}/*/* %{_mandir}/*/*
%changelog %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 * 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 - Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild