[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
06/08: gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardles
From: |
Efraim Flashner |
Subject: |
06/08: gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardless of $PATH. |
Date: |
Mon, 20 Feb 2017 06:05:18 -0500 (EST) |
efraim pushed a commit to branch core-updates
in repository guix.
commit 653add37af10b0d5dbc20c8bc7ce30eec8cf4ae7
Author: Efraim Flashner <address@hidden>
Date: Sun Nov 13 11:48:23 2016 +0200
gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardless of $PATH.
This is the bootstrap version of 1063d325ea76aa2b00dfcd3d436b16e412103df1
* gnu/packages/bootstrap.scm (%bootstrap-coreutils&co)[source]: Patch
the absolute location of 'grep' when called from 'egrep' or 'fgrep'.
---
gnu/packages/bootstrap.scm | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/gnu/packages/bootstrap.scm b/gnu/packages/bootstrap.scm
index 3be6e12..251d1fe 100644
--- a/gnu/packages/bootstrap.scm
+++ b/gnu/packages/bootstrap.scm
@@ -28,6 +28,7 @@
#:use-module ((guix store) #:select (add-to-store add-text-to-store))
#:use-module ((guix derivations) #:select (derivation))
#:use-module ((guix utils) #:select (gnu-triplet->nix-system))
+ #:use-module ((guix build utils) #:select (elf-file?))
#:use-module (guix memoization)
#:use-module (srfi srfi-1)
#:use-module (srfi srfi-26)
@@ -325,6 +326,13 @@ $out/bin/guile --version~%"
(chmod "bin" #o755)
(patch-shebang "bin/egrep" path)
(patch-shebang "bin/fgrep" path)
+ ;; Starting with address@hidden 'egrep' and 'fgrep'
are shell files
+ ;; that call 'grep'. If the bootstrap 'egrep' and
'fgrep'
+ ;; are not binaries then patch them to execute
'grep' via its
+ ;; absolute file name instead of searching for it
in $PATH.
+ (if (not (elf-file? "bin/egrep"))
+ (substitute* '("bin/egrep" "bin/fgrep")
+ (("^exec grep") (string-append (getcwd)
"/bin/grep"))))
(chmod "bin" #o555)
#t)))
- branch core-updates updated (8f8f250 -> 3b88f37), Efraim Flashner, 2017/02/20
- 03/08: gnu: coreutils: Don't run tests in parallel., Efraim Flashner, 2017/02/20
- 01/08: gnu: libpng: Update source urls., Efraim Flashner, 2017/02/20
- 04/08: gnu: bash: Update to patch level 12., Efraim Flashner, 2017/02/20
- 06/08: gnu: %bootstrap-coreutils&co: Patch egrep/fgrep to work regardless of $PATH.,
Efraim Flashner <=
- 05/08: Merge remote-tracking branch 'origin/master' into core-updates, Efraim Flashner, 2017/02/20
- 02/08: gnu: libpng: Update to 1.6.28., Efraim Flashner, 2017/02/20
- 08/08: gnu: Add bootstrap-binaries for 'aarch64-linux'., Efraim Flashner, 2017/02/20
- 07/08: daemon: Ensure proper alignment on the stack., Efraim Flashner, 2017/02/20