summaryrefslogtreecommitdiff
path: root/core/grep
diff options
context:
space:
mode:
authorMichał Masłowski <mtjm@mtjm.eu>2012-03-16 10:34:49 +0100
committerMichał Masłowski <mtjm@mtjm.eu>2012-03-16 10:34:49 +0100
commitf24ad15758f8eebcc46cb0c210f888491869d3f0 (patch)
tree85c74dd33e056502de7a306161d28f5b15b274c2 /core/grep
parent5f4568c7f7ba204bc047d2c74a5721f23024b339 (diff)
parent636ce8849a9c82c1787c2919ffcfe6685cb799d3 (diff)
Merge branch 'master' of ssh://parabolagnulinux.org:1863/home/parabola/abslibre-pre-mips64el
Conflicts: community/chmsee/PKGBUILD community/darkstat/PKGBUILD community/dbmail/PKGBUILD community/dvdisaster/PKGBUILD community/epic4/PKGBUILD community/fb-client/PKGBUILD community/fcrackzip/PKGBUILD community/fdupes/PKGBUILD community/flobopuyo/PKGBUILD community/intel-tbb/PKGBUILD community/openbsd-netcat/PKGBUILD community/sunpinyin/PKGBUILD community/tinc/PKGBUILD community/uudeview/PKGBUILD community/zathura/PKGBUILD core/libedit/PKGBUILD core/mkinitcpio-busybox/PKGBUILD core/openssl/PKGBUILD core/util-linux/PKGBUILD extra/lua/PKGBUILD gnome-unstable/pidgin/PKGBUILD testing/openssl/PKGBUILD testing/sudo/PKGBUILD testing/udev/PKGBUILD testing/util-linux/PKGBUILD
Diffstat (limited to 'core/grep')
-rw-r--r--core/grep/PKGBUILD11
-rw-r--r--core/grep/grep-2.11-exclude-dir-crash.patch44
2 files changed, 51 insertions, 4 deletions
diff --git a/core/grep/PKGBUILD b/core/grep/PKGBUILD
index 34c43a1f8..2a2fda2cf 100644
--- a/core/grep/PKGBUILD
+++ b/core/grep/PKGBUILD
@@ -1,10 +1,10 @@
-# $Id: PKGBUILD 151831 2012-03-03 08:49:06Z allan $
+# $Id: PKGBUILD 153418 2012-03-13 08:24:31Z allan $
# Maintainer: Allan McRae <allan@archlinux.org>
# Contributor: judd <jvinet@zeroflux.org>
pkgname=grep
pkgver=2.11
-pkgrel=1
+pkgrel=2
pkgdesc="A string search utility"
arch=('i686' 'x86_64' 'mips64el')
license=('GPL3')
@@ -13,12 +13,15 @@ groups=('base')
depends=('glibc' 'pcre' 'sh')
makedepends=('texinfo')
install=${pkgname}.install
-source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig})
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
+ grep-2.11-exclude-dir-crash.patch)
md5sums=('ad9c6dbdeab93e50d2bc380f10ed3643'
- 'e4fea5e355973c951f93f48bc86f92fa')
+ 'e4fea5e355973c951f93f48bc86f92fa'
+ 'e882644cf8c1a4e37da7ba8c0867e70b')
build() {
cd ${srcdir}/${pkgname}-${pkgver}
+ patch -p1 -i $srcdir/grep-2.11-exclude-dir-crash.patch
./configure --prefix=/usr --without-included-regex
make
}
diff --git a/core/grep/grep-2.11-exclude-dir-crash.patch b/core/grep/grep-2.11-exclude-dir-crash.patch
new file mode 100644
index 000000000..6b1731768
--- /dev/null
+++ b/core/grep/grep-2.11-exclude-dir-crash.patch
@@ -0,0 +1,44 @@
+From 12c957f786b12a4dd116f9c40a715d671d17fa16 Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan@archlinux.org>
+Date: Mon, 12 Mar 2012 09:28:01 +0100
+Subject: [PATCH] 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.
+---
+ NEWS | 5 +++++
+ src/main.c | 2 +-
+ 2 files changed, 6 insertions(+), 1 deletion(-)
+
+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;
+
+--
+1.7.9.3
+