* [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
* Re: [PATCH] gnu: grep: Fix for gnulib library.
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
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2017-03-11 11:31 UTC (permalink / raw)
To: rennes; +Cc: guix-devel
Hi!
rennes@openmailbox.org skribis:
> 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.
Looks like we missed this ‘core-updates’ cycle. :-/
To apply it without triggering a full rebuild, you could instead add a
phase that invokes ‘patch’ to apply it, only when the cross-compilation
target or system is GNU/Hurd.
Like:
,@(if (gnu/hurd?)
`((add-before 'configure 'patch …))
'()) ;nothing
Could you try that?
Also please avoid reindenting the package at the same time as it makes
the patch a bit noisier. :-)
Thanks,
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: grep: Fix for gnulib library.
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:31 ` Efraim Flashner
0 siblings, 2 replies; 8+ messages in thread
From: Manolis Ragkousis @ 2017-03-11 15:37 UTC (permalink / raw)
To: Ludovic Courtès, rennes; +Cc: guix-devel
Hello Ludo,
On 03/11/2017 01:31 PM, Ludovic Courtès wrote:
> Hi!
>
> rennes@openmailbox.org skribis:
>
>> 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.
>
> Looks like we missed this ‘core-updates’ cycle. :-/
>
> To apply it without triggering a full rebuild, you could instead add a
> phase that invokes ‘patch’ to apply it, only when the cross-compilation
> target or system is GNU/Hurd.
>
> Like:
>
> ,@(if (gnu/hurd?)
> `((add-before 'configure 'patch …))
> '()) ;nothing
>
> Could you try that?
Even though this would work, maybe we should wait for the next
core-updates circle in order to avoid more (if (hurd)..) patches.
Rene WDYT?
Manolis
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: grep: Fix for gnulib library.
2017-03-11 15:37 ` Manolis Ragkousis
@ 2017-03-11 15:56 ` rennes
2017-03-13 8:27 ` Ludovic Courtès
2017-03-13 8:31 ` Efraim Flashner
1 sibling, 1 reply; 8+ messages in thread
From: rennes @ 2017-03-11 15:56 UTC (permalink / raw)
To: Ludovic Courtès; +Cc: guix-devel
Hello Ludovic, Manolis,
>> Looks like we missed this ‘core-updates’ cycle. :-/
>>
>> To apply it without triggering a full rebuild, you could instead add a
>> phase that invokes ‘patch’ to apply it, only when the
>> cross-compilation
>> target or system is GNU/Hurd.
>>
>> Like:
>>
>> ,@(if (gnu/hurd?)
>> `((add-before 'configure 'patch …))
>> '()) ;nothing
>>
>> Could you try that?
>
> Even though this would work, maybe we should wait for the next
> core-updates circle in order to avoid more (if (hurd)..) patches.
>
Yes, we can wait for the next cycle.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: grep: Fix for gnulib library.
2017-03-11 15:56 ` rennes
@ 2017-03-13 8:27 ` Ludovic Courtès
2017-04-08 16:14 ` Manolis Ragkousis
0 siblings, 1 reply; 8+ messages in thread
From: Ludovic Courtès @ 2017-03-13 8:27 UTC (permalink / raw)
To: rennes; +Cc: guix-devel
rennes@openmailbox.org skribis:
> Hello Ludovic, Manolis,
>
>>> Looks like we missed this ‘core-updates’ cycle. :-/
>>>
>>> To apply it without triggering a full rebuild, you could instead add a
>>> phase that invokes ‘patch’ to apply it, only when the
>>> cross-compilation
>>> target or system is GNU/Hurd.
>>>
>>> Like:
>>>
>>> ,@(if (gnu/hurd?)
>>> `((add-before 'configure 'patch …))
>>> '()) ;nothing
>>>
>>> Could you try that?
>>
>> Even though this would work, maybe we should wait for the next
>> core-updates circle in order to avoid more (if (hurd)..) patches.
>>
>
> Yes, we can wait for the next cycle.
Sure, either way is fine with me.
Ludo’.
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: grep: Fix for gnulib library.
2017-03-11 15:37 ` Manolis Ragkousis
2017-03-11 15:56 ` rennes
@ 2017-03-13 8:31 ` Efraim Flashner
2017-03-13 8:35 ` Manolis Ragkousis
1 sibling, 1 reply; 8+ messages in thread
From: Efraim Flashner @ 2017-03-13 8:31 UTC (permalink / raw)
To: Manolis Ragkousis; +Cc: guix-devel, rennes
[-- Attachment #1: Type: text/plain, Size: 1679 bytes --]
On Sat, Mar 11, 2017 at 05:37:13PM +0200, Manolis Ragkousis wrote:
> Hello Ludo,
>
> On 03/11/2017 01:31 PM, Ludovic Courtès wrote:
> > Hi!
> >
> > rennes@openmailbox.org skribis:
> >
> >> 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.
> >
> > Looks like we missed this ‘core-updates’ cycle. :-/
> >
> > To apply it without triggering a full rebuild, you could instead add a
> > phase that invokes ‘patch’ to apply it, only when the cross-compilation
> > target or system is GNU/Hurd.
> >
> > Like:
> >
> > ,@(if (gnu/hurd?)
> > `((add-before 'configure 'patch …))
> > '()) ;nothing
> >
> > Could you try that?
>
> Even though this would work, maybe we should wait for the next
> core-updates circle in order to avoid more (if (hurd)..) patches.
>
> Rene WDYT?
>
> Manolis
>
more (if (hurd ...)) patches does also make it easier to merge in
changes for those not using hurd when the time comes, and it allows
those actively using hurd to make changes to more low-level packages
without worrying about how it affects the other architectures/kernels.
--
Efraim Flashner <efraim@flashner.co.il> אפרים פלשנר
GPG key = A28B F40C 3E55 1372 662D 14F7 41AA E7DC CA3D 8351
Confidentiality cannot be guaranteed on emails sent or received unencrypted
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]
^ permalink raw reply [flat|nested] 8+ messages in thread
* Re: [PATCH] gnu: grep: Fix for gnulib library.
2017-03-13 8:31 ` Efraim Flashner
@ 2017-03-13 8:35 ` Manolis Ragkousis
0 siblings, 0 replies; 8+ messages in thread
From: Manolis Ragkousis @ 2017-03-13 8:35 UTC (permalink / raw)
To: Efraim Flashner; +Cc: guix-devel, rennes
On 03/13/17 10:31, Efraim Flashner wrote:
> more (if (hurd ...)) patches does also make it easier to merge in
> changes for those not using hurd when the time comes, and it allows
> those actively using hurd to make changes to more low-level packages
> without worrying about how it affects the other architectures/kernels.
>
Yes I agree, but here we have an upstream grep patch, which in the next
version will be in. No need to add unnecessary if statements.
Also I think it's a good idea to keep things kernel agnostic as much as
possible.
Manolis
^ permalink raw reply [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.