From b672a8160755bab07fb3c13dbc43dcc26525a7b7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Mon, 19 Feb 2018 20:04:06 +0100 Subject: gnu: Graft glibc to allow execution on Linux 2.6.32. * gnu/packages/patches/glibc-allow-kernel-2.6.32.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/base.scm (glibc/linux)[replacement]: New field. (glibc-2.26-patched): New variable. --- gnu/packages/base.scm | 11 +++++++++++ 1 file changed, 11 insertions(+) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index b2c1d232fb..23107a823e 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -12,6 +12,7 @@ ;;; Copyright © 2017 Mathieu Othacehe ;;; Copyright © 2017 Marius Bakke ;;; Copyright © 2017 Eric Bavier +;;; Copyright © 2018 Ricardo Wurmus ;;; ;;; This file is part of GNU Guix. ;;; @@ -537,6 +538,7 @@ store.") ;; Note: Always use a dot after the minor version since various places rely ;; on "version-major+minor" to determine where locales are found. (version "2.26.105-g0890d5379c") + (replacement glibc-2.26-patched) (source (origin (method url-fetch) (uri (string-append "https://alpha.gnu.org/gnu/guix/mirror/" @@ -839,6 +841,15 @@ GLIBC/HURD for a Hurd host" ;; Below are old libc versions, which we use mostly to build locale data in ;; the old format (which the new libc cannot cope with.) +(define glibc-2.26-patched + (package + (inherit glibc) + (replacement #f) + (source (origin + (inherit (package-source glibc)) + (patches (cons (search-patch "glibc-allow-kernel-2.6.32.patch") + (origin-patches (package-source glibc)))))))) + (define-public glibc-2.25 (package (inherit glibc) -- cgit v1.2.3 From 036ed3a8305ba0fb113666d52989cb4b009c5b72 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 7 Mar 2018 21:34:18 +0100 Subject: gnu: glibc-2.26-patch: Remove unneeded 'replacement' field. * gnu/packages/base.scm (glibc-2.26-patched): Remove unneeded 'replacement' field. --- gnu/packages/base.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 23107a823e..e91f7d43ef 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -844,7 +844,6 @@ GLIBC/HURD for a Hurd host" (define glibc-2.26-patched (package (inherit glibc) - (replacement #f) (source (origin (inherit (package-source glibc)) (patches (cons (search-patch "glibc-allow-kernel-2.6.32.patch") -- cgit v1.2.3 From 42958b5e0feff1000ba17a353bb58fdf45f20716 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 13 Mar 2018 22:34:43 +0100 Subject: gnu: Use patched static bash in glibc replacement. * gnu/packages/base.scm (glibc-2.26-patched): Rename... (glibc-2.26-patched-boot): ...to this. (patched-static-bash, glibc-2.26-patched): New variables. --- gnu/packages/base.scm | 27 ++++++++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index e91f7d43ef..56f79f5801 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -841,7 +841,7 @@ GLIBC/HURD for a Hurd host" ;; Below are old libc versions, which we use mostly to build locale data in ;; the old format (which the new libc cannot cope with.) -(define glibc-2.26-patched +(define glibc-2.26-patched-boot (package (inherit glibc) (source (origin @@ -849,6 +849,31 @@ GLIBC/HURD for a Hurd host" (patches (cons (search-patch "glibc-allow-kernel-2.6.32.patch") (origin-patches (package-source glibc)))))))) +(define patched-static-bash + (package + (inherit static-bash) + (arguments + (substitute-keyword-arguments (package-arguments static-bash) + ((#:configure-flags flags '()) + ;; Add a '-L' flag so that the pseudo-cross-ld of + ;; BINUTILS-BOOT0 can find libc.a. + `(append ,flags + (list (string-append "LDFLAGS=-static -L" + (assoc-ref %build-inputs + "libc-patched:static") + "/lib")))))) + (native-inputs + `(("libc-patched" ,glibc-2.26-patched-boot) + ("libc-patched:static" ,glibc-2.26-patched-boot "static"))))) + +(define glibc-2.26-patched + (package + (inherit glibc-2.26-patched-boot) + (inputs `(("static-bash" ,patched-static-bash) + ,@(alist-delete + "static-bash" + (package-inputs glibc-2.26-patched-boot)))))) + (define-public glibc-2.25 (package (inherit glibc) -- cgit v1.2.3 From 911e66f922f2316f061656a6edf5f243342735b7 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 14 Mar 2018 12:46:57 +0100 Subject: gnu: Add missing module to (gnu packages base). This is a follow-up to commit 42958b5e0feff1000ba17a353bb58fdf45f20716. Reported by pmikkelsen on IRC. * gnu/packages/base.scm: Use srfi-1 for alist-delete. --- gnu/packages/base.scm | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 56f79f5801..a242baf787 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -53,6 +53,7 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (ice-9 match) + #:use-module (srfi srfi-1) #:export (glibc libiconv-if-needed)) -- cgit v1.2.3 From 9c9912cf5bffa9c7e2cb3e05ca7649ea295fa3ca Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 14 Mar 2018 16:26:22 +0100 Subject: Revert "gnu: Add missing module to (gnu packages base)." This reverts commit 911e66f922f2316f061656a6edf5f243342735b7. --- gnu/packages/base.scm | 1 - 1 file changed, 1 deletion(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index a242baf787..56f79f5801 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -53,7 +53,6 @@ #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (ice-9 match) - #:use-module (srfi srfi-1) #:export (glibc libiconv-if-needed)) -- cgit v1.2.3 From 441010a2d1f77b15f9becfac622e9b1d76b7b1fd Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Wed, 14 Mar 2018 16:26:24 +0100 Subject: Revert "gnu: Use patched static bash in glibc replacement." This reverts commit 42958b5e0feff1000ba17a353bb58fdf45f20716. --- gnu/packages/base.scm | 27 +-------------------------- 1 file changed, 1 insertion(+), 26 deletions(-) (limited to 'gnu/packages/base.scm') diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 56f79f5801..e91f7d43ef 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -841,7 +841,7 @@ GLIBC/HURD for a Hurd host" ;; Below are old libc versions, which we use mostly to build locale data in ;; the old format (which the new libc cannot cope with.) -(define glibc-2.26-patched-boot +(define glibc-2.26-patched (package (inherit glibc) (source (origin @@ -849,31 +849,6 @@ GLIBC/HURD for a Hurd host" (patches (cons (search-patch "glibc-allow-kernel-2.6.32.patch") (origin-patches (package-source glibc)))))))) -(define patched-static-bash - (package - (inherit static-bash) - (arguments - (substitute-keyword-arguments (package-arguments static-bash) - ((#:configure-flags flags '()) - ;; Add a '-L' flag so that the pseudo-cross-ld of - ;; BINUTILS-BOOT0 can find libc.a. - `(append ,flags - (list (string-append "LDFLAGS=-static -L" - (assoc-ref %build-inputs - "libc-patched:static") - "/lib")))))) - (native-inputs - `(("libc-patched" ,glibc-2.26-patched-boot) - ("libc-patched:static" ,glibc-2.26-patched-boot "static"))))) - -(define glibc-2.26-patched - (package - (inherit glibc-2.26-patched-boot) - (inputs `(("static-bash" ,patched-static-bash) - ,@(alist-delete - "static-bash" - (package-inputs glibc-2.26-patched-boot)))))) - (define-public glibc-2.25 (package (inherit glibc) -- cgit v1.2.3