summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVlad Glagolev2012-06-14 18:31:35 +0400
committerVlad Glagolev2012-06-14 18:34:18 +0400
commitdbf12fda25804387f9f3f7ef8c332b325f38c5f0 (patch)
tree249bdc3d87d3460f7a9b14febcb1fc3da5da9604
parent6a11e6ad6184245262bd713ad0f88eb83df53985 (diff)
Revert "grep: => 2.12"
This reverts commit 31424fbd0984fae9e9e2a5e7db3dd46358557222. (cherry picked from commit 8c6ea96fbce391596ede500b711e3e189e372bef)
-rwxr-xr-xutils/grep/DETAILS2
-rw-r--r--utils/grep/HISTORY4
-rwxr-xr-xutils/grep/PRE_BUILD4
-rw-r--r--utils/grep/grep-2.11.patch39
4 files changed, 44 insertions, 5 deletions
diff --git a/utils/grep/DETAILS b/utils/grep/DETAILS
index a441b3c4e8..5c3ba5e6f4 100755
--- a/utils/grep/DETAILS
+++ b/utils/grep/DETAILS
@@ -1,5 +1,5 @@
SPELL=grep
- VERSION=2.12
+ VERSION=2.11
SOURCE=$SPELL-$VERSION.tar.xz
SOURCE2=$SOURCE.sig
SOURCE_DIRECTORY=$BUILD_DIRECTORY/$SPELL-$VERSION
diff --git a/utils/grep/HISTORY b/utils/grep/HISTORY
index 4048f61848..14142f8f17 100644
--- a/utils/grep/HISTORY
+++ b/utils/grep/HISTORY
@@ -1,7 +1,3 @@
-2012-04-26 Treeve Jelbert <treeve@sourcemage.org>
- * DETAILS: version 2.12
- * PRE_BUILD, grep-2.11.patch: deleted
-
2012-03-12 Ladislav Hagara <hgr@vabo.cz>
* DETAILS: 2.11
* PRE_BUILD, grep-2.11.patch: official patch added
diff --git a/utils/grep/PRE_BUILD b/utils/grep/PRE_BUILD
new file mode 100755
index 0000000000..b53ca9ce0e
--- /dev/null
+++ b/utils/grep/PRE_BUILD
@@ -0,0 +1,4 @@
+default_pre_build &&
+cd "$SOURCE_DIRECTORY" &&
+
+patch -p1 < "$SPELL_DIRECTORY/grep-2.11.patch"
diff --git a/utils/grep/grep-2.11.patch b/utils/grep/grep-2.11.patch
new file mode 100644
index 0000000000..d0c5f903aa
--- /dev/null
+++ b/utils/grep/grep-2.11.patch
@@ -0,0 +1,39 @@
+From 12c957f786b12a4dd116f9c40a715d671d17fa16 Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan@archlinux.org>
+Date: Mon, 12 Mar 2012 08:28:01 +0000
+Subject: grep: fix segfault with -r --exclude-dir and no file operand
+
+* src/main.c (grepdir): Don't invoke excluded_file_name on NULL.
+* NEWS (Bug fixes): Mention it.
+---
+diff --git a/NEWS b/NEWS
+index d0a63d5..d4d70f5 100644
+--- a/NEWS
++++ b/NEWS
+@@ -2,6 +2,11 @@ GNU grep NEWS -*- outline -*-
+
+ * Noteworthy changes in release ?.? (????-??-??) [?]
+
++** Bug fixes
++
++ grep no longer segfaults with -r --exclude-dir and no file operand.
++ I.e., ":|grep -r --exclude-dir=D PAT" would segfault.
++
+
+ * Noteworthy changes in release 2.11 (2012-03-02) [stable]
+
+diff --git a/src/main.c b/src/main.c
+index 2f6c761..f4f1235 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -1361,7 +1361,7 @@ grepdir (char const *dir, struct stats const *stats)
+ struct stats const *ancestor;
+ char *name_space;
+ int status = 1;
+- if (excluded_directory_patterns
++ if (dir && excluded_directory_patterns
+ && excluded_file_name (excluded_directory_patterns, dir))
+ return 1;
+
+--
+cgit v0.9.0.2