[arch-commits] Commit in grep/repos (8 files)

Allan McRae allan at archlinux.org
Mon Mar 12 05:51:20 EDT 2012


    Date: Monday, March 12, 2012 @ 05:51:20
  Author: allan
Revision: 153237

archrelease: copy trunk to testing-i686, testing-x86_64

Added:
  grep/repos/testing-i686/
  grep/repos/testing-i686/PKGBUILD
    (from rev 153236, grep/trunk/PKGBUILD)
  grep/repos/testing-i686/grep-2.11-exclude-dir-crash.patch
    (from rev 153236, grep/trunk/grep-2.11-exclude-dir-crash.patch)
  grep/repos/testing-i686/grep.install
    (from rev 153236, grep/trunk/grep.install)
  grep/repos/testing-x86_64/
  grep/repos/testing-x86_64/PKGBUILD
    (from rev 153236, grep/trunk/PKGBUILD)
  grep/repos/testing-x86_64/grep-2.11-exclude-dir-crash.patch
    (from rev 153236, grep/trunk/grep-2.11-exclude-dir-crash.patch)
  grep/repos/testing-x86_64/grep.install
    (from rev 153236, grep/trunk/grep.install)

--------------------------------------------------+
 testing-i686/PKGBUILD                            |   40 +++++++++++++++++++
 testing-i686/grep-2.11-exclude-dir-crash.patch   |   44 +++++++++++++++++++++
 testing-i686/grep.install                        |   21 ++++++++++
 testing-x86_64/PKGBUILD                          |   40 +++++++++++++++++++
 testing-x86_64/grep-2.11-exclude-dir-crash.patch |   44 +++++++++++++++++++++
 testing-x86_64/grep.install                      |   21 ++++++++++
 6 files changed, 210 insertions(+)

Copied: grep/repos/testing-i686/PKGBUILD (from rev 153236, grep/trunk/PKGBUILD)
===================================================================
--- testing-i686/PKGBUILD	                        (rev 0)
+++ testing-i686/PKGBUILD	2012-03-12 09:51:20 UTC (rev 153237)
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Allan McRae <allan at archlinux.org>
+# Contributor: judd <jvinet at zeroflux.org>
+
+pkgname=grep
+pkgver=2.11
+pkgrel=2
+pkgdesc="A string search utility"
+arch=('i686' 'x86_64')
+license=('GPL3')
+url="http://www.gnu.org/software/grep/grep.html"
+groups=('base')
+depends=('glibc' 'pcre' 'sh')
+makedepends=('texinfo')
+install=${pkgname}.install
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
+        grep-2.11-exclude-dir-crash.patch)
+md5sums=('ad9c6dbdeab93e50d2bc380f10ed3643'
+         '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
+}
+
+check() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+  make check
+}
+
+package() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  
+  install -dm755 ${pkgdir}/bin
+  ln -s /usr/bin/grep ${pkgdir}/bin/grep
+}

Copied: grep/repos/testing-i686/grep-2.11-exclude-dir-crash.patch (from rev 153236, grep/trunk/grep-2.11-exclude-dir-crash.patch)
===================================================================
--- testing-i686/grep-2.11-exclude-dir-crash.patch	                        (rev 0)
+++ testing-i686/grep-2.11-exclude-dir-crash.patch	2012-03-12 09:51:20 UTC (rev 153237)
@@ -0,0 +1,44 @@
+From 12c957f786b12a4dd116f9c40a715d671d17fa16 Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan at 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
+

Copied: grep/repos/testing-i686/grep.install (from rev 153236, grep/trunk/grep.install)
===================================================================
--- testing-i686/grep.install	                        (rev 0)
+++ testing-i686/grep.install	2012-03-12 09:51:20 UTC (rev 153237)
@@ -0,0 +1,21 @@
+infodir=usr/share/info
+filelist=(grep.info)
+
+post_install() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}
+

Copied: grep/repos/testing-x86_64/PKGBUILD (from rev 153236, grep/trunk/PKGBUILD)
===================================================================
--- testing-x86_64/PKGBUILD	                        (rev 0)
+++ testing-x86_64/PKGBUILD	2012-03-12 09:51:20 UTC (rev 153237)
@@ -0,0 +1,40 @@
+# $Id$
+# Maintainer: Allan McRae <allan at archlinux.org>
+# Contributor: judd <jvinet at zeroflux.org>
+
+pkgname=grep
+pkgver=2.11
+pkgrel=2
+pkgdesc="A string search utility"
+arch=('i686' 'x86_64')
+license=('GPL3')
+url="http://www.gnu.org/software/grep/grep.html"
+groups=('base')
+depends=('glibc' 'pcre' 'sh')
+makedepends=('texinfo')
+install=${pkgname}.install
+source=(ftp://ftp.gnu.org/gnu/$pkgname/$pkgname-$pkgver.tar.xz{,.sig}
+        grep-2.11-exclude-dir-crash.patch)
+md5sums=('ad9c6dbdeab93e50d2bc380f10ed3643'
+         '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
+}
+
+check() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+  make check
+}
+
+package() {
+  cd ${srcdir}/${pkgname}-${pkgver}
+  make DESTDIR=${pkgdir} install
+  
+  install -dm755 ${pkgdir}/bin
+  ln -s /usr/bin/grep ${pkgdir}/bin/grep
+}

Copied: grep/repos/testing-x86_64/grep-2.11-exclude-dir-crash.patch (from rev 153236, grep/trunk/grep-2.11-exclude-dir-crash.patch)
===================================================================
--- testing-x86_64/grep-2.11-exclude-dir-crash.patch	                        (rev 0)
+++ testing-x86_64/grep-2.11-exclude-dir-crash.patch	2012-03-12 09:51:20 UTC (rev 153237)
@@ -0,0 +1,44 @@
+From 12c957f786b12a4dd116f9c40a715d671d17fa16 Mon Sep 17 00:00:00 2001
+From: Allan McRae <allan at 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
+

Copied: grep/repos/testing-x86_64/grep.install (from rev 153236, grep/trunk/grep.install)
===================================================================
--- testing-x86_64/grep.install	                        (rev 0)
+++ testing-x86_64/grep.install	2012-03-12 09:51:20 UTC (rev 153237)
@@ -0,0 +1,21 @@
+infodir=usr/share/info
+filelist=(grep.info)
+
+post_install() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}
+
+post_upgrade() {
+  post_install $1
+}
+
+pre_remove() {
+  [ -x usr/bin/install-info ] || return 0
+  for file in ${filelist[@]}; do
+    install-info --delete $infodir/$file.gz $infodir/dir 2> /dev/null
+  done
+}
+



More information about the arch-commits mailing list