all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* [PATCH] gnu: grep: Fix for gnulib library.
@ 2017-02-22 12:59 rennes
  2017-03-11 11:31 ` Ludovic Courtès
  0 siblings, 1 reply; 8+ messages in thread
From: rennes @ 2017-02-22 12:59 UTC (permalink / raw)
  To: guix-devel

[-- Attachment #1: Type: text/plain, Size: 207 bytes --]

Hello
This patch fix error on 'gnulib' library required to build 'grep' 
package on GNU/Hurd.

The error was fixed on upstream, this is the report:
https://debbugs.gnu.org/cgi/bugreport.cgi?bug=25821

Thanks

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-gnu-grep-Fix-for-gnulib-library.patch --]
[-- Type: text/x-diff; name=0001-gnu-grep-Fix-for-gnulib-library.patch, Size: 7447 bytes --]

From f76585a44afdc41187df768eec79fb723713cf0c Mon Sep 17 00:00:00 2001
From: rennes <rennes@openmailbox.org>
Date: Tue, 21 Feb 2017 23:21:49 -0600
Subject: [PATCH] gnu: grep: Fix for gnulib library.

* gnu/packages/patches/grep-gnulib-lock.patch: New file.                                                  
* gnu/local.mk (dist_patch_DATA): Add it.
---
 gnu/local.mk                                |  3 +-
 gnu/packages/base.scm                       | 62 +++++++++++++++--------------
 gnu/packages/patches/grep-gnulib-lock.patch | 32 +++++++++++++++
 3 files changed, 66 insertions(+), 31 deletions(-)
 create mode 100644 gnu/packages/patches/grep-gnulib-lock.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 82d9a31bd..806a776f9 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -5,7 +5,7 @@
 # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver <mhw@netris.org>
 # Copyright © 2016 Chris Marusich <cmmarusich@gmail.com>
 # Copyright © 2016, 2017 Kei Kebreau <kei@openmailbox.org>
-# Copyright © 2016 Rene Saavedra <rennes@openmailbox.org>
+# Copyright © 2016, 2017 Rene Saavedra <rennes@openmailbox.org>
 # Copyright © 2016 Adonay "adfeno" Felipe Nogueira <https://libreplanet.org/wiki/User:Adfeno> <adfeno@openmailbox.org>
 # Copyright © 2016, 2017 Ricardo Wurmus <rekado@elephly.net>
 # Copyright © 2016 Ben Woodcroft <donttrustben@gmail.com>
@@ -604,6 +604,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/gobject-introspection-absolute-shlib-path.patch \
   %D%/packages/patches/gobject-introspection-cc.patch		\
   %D%/packages/patches/gobject-introspection-girepository.patch	\
+  %D%/packages/patches/grep-gnulib-lock.patch			\
   %D%/packages/patches/grep-timing-sensitive-test.patch		\
   %D%/packages/patches/grub-CVE-2015-8370.patch			\
   %D%/packages/patches/grub-gets-undeclared.patch		\
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 8be9c88ab..f748c7b5c 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -7,6 +7,7 @@
 ;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <manolis837@gmail.com>
 ;;; Copyright © 2016 Efraim Flashner <efraim@flashner.co.il>
 ;;; Copyright © 2016 Jan Nieuwenhuizen <janneke@gnu.org>
+;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -77,34 +78,35 @@ command-line arguments, multiple languages, and so on.")
 
 (define-public grep
   (package
-   (name "grep")
-   (version "3.0")
-   (source (origin
-            (method url-fetch)
-            (uri (string-append "mirror://gnu/grep/grep-"
-                                version ".tar.xz"))
-            (sha256
-             (base32
-              "1dcasjp3a578nrvzrcn38mpizb8w1q6mvfzhjmcqqgkf0nsivj72"))
-            (patches (search-patches "grep-timing-sensitive-test.patch"))))
-   (build-system gnu-build-system)
-   (native-inputs `(("perl" ,perl)))             ;some of the tests require it
-   (arguments
-    `(#:phases
-      (modify-phases %standard-phases
-        (add-after 'install 'fix-egrep-and-fgrep
-          ;; Patch 'egrep' and 'fgrep' to execute 'grep' via its
-          ;; absolute file name instead of searching for it in $PATH.
-          (lambda* (#:key outputs #:allow-other-keys)
-            (let* ((out (assoc-ref outputs "out"))
-                   (bin (string-append out "/bin")))
-              (substitute* (list (string-append bin "/egrep")
-                                 (string-append bin "/fgrep"))
-                (("^exec grep")
-                 (string-append "exec " bin "/grep")))
-              #t))))))
-   (synopsis "Print lines matching a pattern")
-   (description
+    (name "grep")
+    (version "3.0")
+    (source (origin
+              (method url-fetch)
+              (uri (string-append "mirror://gnu/grep/grep-"
+                                  version ".tar.xz"))
+              (sha256
+               (base32
+                "1dcasjp3a578nrvzrcn38mpizb8w1q6mvfzhjmcqqgkf0nsivj72"))
+              (patches (search-patches "grep-timing-sensitive-test.patch"
+                                       "grep-gnulib-lock.patch"))))
+    (build-system gnu-build-system)
+    (native-inputs `(("perl" ,perl)))             ;some of the tests require it
+    (arguments
+     `(#:phases
+       (modify-phases %standard-phases
+         (add-after 'install 'fix-egrep-and-fgrep
+                    ;; Patch 'egrep' and 'fgrep' to execute 'grep' via its
+                    ;; absolute file name instead of searching for it in $PATH.
+                    (lambda* (#:key outputs #:allow-other-keys)
+                      (let* ((out (assoc-ref outputs "out"))
+                             (bin (string-append out "/bin")))
+                        (substitute* (list (string-append bin "/egrep")
+                                           (string-append bin "/fgrep"))
+                          (("^exec grep")
+                           (string-append "exec " bin "/grep")))
+                        #t))))))
+    (synopsis "Print lines matching a pattern")
+    (description
      "grep is a tool for finding text inside files.  Text is found by
 matching a pattern provided by the user in one or many files.  The pattern
 may be provided as a basic or extended regular expression, or as fixed
@@ -112,8 +114,8 @@ strings.  By default, the matching text is simply printed to the screen,
 however the output can be greatly customized to include, for example, line
 numbers.  GNU grep offers many extensions over the standard utility,
 including, for example, recursive directory searching.")
-   (license gpl3+)
-   (home-page "http://www.gnu.org/software/grep/")))
+    (license gpl3+)
+    (home-page "http://www.gnu.org/software/grep/")))
 
 (define-public sed
   (package
diff --git a/gnu/packages/patches/grep-gnulib-lock.patch b/gnu/packages/patches/grep-gnulib-lock.patch
new file mode 100644
index 000000000..68c33f103
--- /dev/null
+++ b/gnu/packages/patches/grep-gnulib-lock.patch
@@ -0,0 +1,32 @@
+This patch fix error on 'gnulib' library required to build
+'grep' package on GNU/Hurd.
+The patch was adapted from upstream source repository:
+'<http://git.savannah.gnu.org/gitweb/?p=gnulib.git;a=commit;h=4084b3a1094372b960ce4a97634e08f4538c8bdd>'
+
+Commit: 4084b3a1094372b960ce4a97634e08f4538c8bdd
+
+diff --git a/lib/glthread/lock.c b/lib/glthread/lock.c
+index 061562b..afc86f4 100644
+--- a/lib/glthread/lock.c
++++ b/lib/glthread/lock.c
+@@ -30,7 +30,7 @@
+ 
+ /* ------------------------- gl_rwlock_t datatype ------------------------- */
+ 
+-# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1))
++# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
+ 
+ #  ifdef PTHREAD_RWLOCK_INITIALIZER
+ 
+diff --git a/lib/glthread/lock.h b/lib/glthread/lock.h
+index ec16d39..67932aa 100644
+--- a/lib/glthread/lock.h
++++ b/lib/glthread/lock.h
+@@ -179,7 +179,7 @@ typedef pthread_mutex_t gl_lock_t;
+ 
+ /* ------------------------- gl_rwlock_t datatype ------------------------- */
+ 
+-# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (__GNU_LIBRARY__ > 1))
++# if HAVE_PTHREAD_RWLOCK && (HAVE_PTHREAD_RWLOCK_RDLOCK_PREFER_WRITER || (defined PTHREAD_RWLOCK_WRITER_NONRECURSIVE_INITIALIZER_NP && (__GNU_LIBRARY__ > 1)))
+ 
+ #  ifdef PTHREAD_RWLOCK_INITIALIZER
-- 
2.11.0


^ permalink raw reply related	[flat|nested] 8+ messages in thread

end of thread, other threads:[~2017-04-08 16:14 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2017-02-22 12:59 [PATCH] gnu: grep: Fix for gnulib library rennes
2017-03-11 11:31 ` Ludovic Courtès
2017-03-11 15:37   ` Manolis Ragkousis
2017-03-11 15:56     ` rennes
2017-03-13  8:27       ` Ludovic Courtès
2017-04-08 16:14         ` Manolis Ragkousis
2017-03-13  8:31     ` Efraim Flashner
2017-03-13  8:35       ` Manolis Ragkousis

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.