From 29d37e999c495431eafde90027d2b97b16d0db4e Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Tue, 27 Feb 2018 22:46:04 +0100 Subject: gnu: make-bootstrap: Build grep without PCRE support. Partly fixes . Reported by Chris Marusich . This fixes cross-compilation of the statically-linked grep. * gnu/packages/make-bootstrap.scm (%static-inputs): Add 'inputs' field for grep. --- gnu/packages/make-bootstrap.scm | 24 +++++++++++++----------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index 07ac93686a..f1c4bf7bc5 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -197,6 +197,18 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (("/bin/sh") "sh") (("execv ") "execvp ")) #t))))))) + ;; We don't want to retain a reference to /gnu/store in the bootstrap + ;; versions of egrep/fgrep, so we remove the custom phase added since + ;; grep@2.25. The effect is 'egrep' and 'fgrep' look for 'grep' in + ;; $PATH. + (grep (package + (inherit grep) + (inputs '()) ;remove PCRE, which is optional + (arguments + (substitute-keyword-arguments (package-arguments grep) + ((#:phases phases) + `(modify-phases ,phases + (delete 'fix-egrep-and-fgrep))))))) (finalize (compose static-package package-with-relocatable-glibc))) `(,@(map (match-lambda @@ -209,17 +221,7 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ("patch" ,patch) ("coreutils" ,coreutils) ("sed" ,sed) - ;; We don't want to retain a reference to /gnu/store in the - ;; bootstrap versions of egrep/fgrep, so we remove the custom - ;; phase added since grep@2.25. The effect is 'egrep' and - ;; 'fgrep' look for 'grep' in $PATH. - ("grep" ,(package - (inherit grep) - (arguments - (substitute-keyword-arguments (package-arguments grep) - ((#:phases phases) - `(modify-phases ,phases - (delete 'fix-egrep-and-fgrep))))))) + ("grep" ,grep) ("gawk" ,gawk))) ("bash" ,static-bash)))) -- cgit v1.2.3 From 63e48300d19b848dfe75880581338c2c73b7b0df Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 28 Feb 2018 16:43:59 +0100 Subject: gnu: guile-static-stripped: Remove dependency on bash-minimal. Previously guile-static-stripped, which is embedded in the initrd, would depend on 'bash-minimal' and 'glibc'; the closure size was 77 MiB. Now the closure size is down to 45.7 MiB. Reported by Danny Milosavljevic in . * gnu/packages/make-bootstrap.scm (%guile-static): Remove the 'pre-configure' phase. (%guile-static-stripped)[arguments]: Add #:allowed-references. --- gnu/packages/make-bootstrap.scm | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) (limited to 'gnu/packages/make-bootstrap.scm') diff --git a/gnu/packages/make-bootstrap.scm b/gnu/packages/make-bootstrap.scm index f1c4bf7bc5..779b7ef5aa 100644 --- a/gnu/packages/make-bootstrap.scm +++ b/gnu/packages/make-bootstrap.scm @@ -532,6 +532,13 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." ''("LDFLAGS=-ldl")) ((#:phases phases '%standard-phases) `(modify-phases ,phases + + ;; Do not record the absolute file name of 'sh' in + ;; (ice-9 popen). This makes 'open-pipe' unusable in + ;; a build chroot ('open-pipe*' is fine) but avoids + ;; keeping a reference to Bash. + (delete 'pre-configure) + (add-before 'configure 'static-guile (lambda _ (substitute* "libguile/Makefile.in" @@ -557,7 +564,9 @@ for `sh' in $PATH, and without nscd, and with static NSS modules." (name "guile-static-stripped") (build-system trivial-build-system) (arguments - `(#:modules ((guix build utils)) + ;; The end result should depend on nothing but itself. + `(#:allowed-references ("out") + #:modules ((guix build utils)) #:builder (let () (use-modules (guix build utils)) -- cgit v1.2.3