[SM-Commit] GIT changes to master grimoire by Ladislav Hagara (e9e64a190f6c30ead14a38945f76b290e6f88be9)

Ladislav Hagara scm at sourcemage.org
Mon Mar 12 18:31:49 EDT 2012


GIT changes to master grimoire by Ladislav Hagara <hgr at vabo.cz>:

 utils/grep/DETAILS         |    2 +-
 utils/grep/HISTORY         |    4 ++++
 utils/grep/PRE_BUILD       |    9 ++++-----
 utils/grep/grep-2.11.patch |   39 +++++++++++++++++++++++++++++++++++++++
 4 files changed, 48 insertions(+), 6 deletions(-)

New commits:
commit e9e64a190f6c30ead14a38945f76b290e6f88be9
Author: Ladislav Hagara <hgr at vabo.cz>
Commit: Ladislav Hagara <hgr at vabo.cz>

    grep 2.11

diff --git a/utils/grep/DETAILS b/utils/grep/DETAILS
index f2d1c58..5c3ba5e 100755
--- a/utils/grep/DETAILS
+++ b/utils/grep/DETAILS
@@ -1,5 +1,5 @@
            SPELL=grep
-         VERSION=2.10
+         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 07a9302..14142f8 100644
--- a/utils/grep/HISTORY
+++ b/utils/grep/HISTORY
@@ -1,3 +1,7 @@
+2012-03-12 Ladislav Hagara <hgr at vabo.cz>
+	* DETAILS: 2.11
+	* PRE_BUILD, grep-2.11.patch: official patch added
+
 2011-11-18 Ladislav Hagara <hgr at vabo.cz>
 	* DETAILS: 2.10, tar.gz -> tar.xz
 	* DEPENDS, PRE_BUILD: updated to process xz tarball
diff --git a/utils/grep/PRE_BUILD b/utils/grep/PRE_BUILD
index 6f54504..b53ca9c 100755
--- a/utils/grep/PRE_BUILD
+++ b/utils/grep/PRE_BUILD
@@ -1,5 +1,4 @@
-mk_source_dir $SOURCE_DIRECTORY &&
-cd $BUILD_DIRECTORY &&
-verify_file '' &&
-xz -dc $SOURCE_CACHE/$SOURCE | tar -xf -
-cd $SOURCE_DIRECTORY
+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 0000000..d0c5f90
--- /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 at 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


More information about the SM-Commit mailing list