summaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm128
1 files changed, 99 insertions, 29 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index fa5f1ef32b..520c2093f3 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -5,12 +5,12 @@
;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <[email protected]>
;;; Copyright © 2014 Alex Kost <[email protected]>
;;; Copyright © 2014, 2015 Manolis Fragkiskos Ragkousis <[email protected]>
-;;; Copyright © 2016, 2017, 2019, 2020, 2021 Efraim Flashner <[email protected]>
+;;; Copyright © 2016, 2017, 2019-2023 Efraim Flashner <[email protected]>
;;; Copyright © 2016, 2020 Jan (janneke) Nieuwenhuizen <[email protected]>
;;; Copyright © 2016, 2018 Alex Vong <[email protected]>
;;; Copyright © 2017 Rene Saavedra <[email protected]>
;;; Copyright © 2017, 2020 Mathieu Othacehe <[email protected]>
-;;; Copyright © 2017, 2018, 2020 Marius Bakke <[email protected]>
+;;; Copyright © 2017, 2018, 2020, 2022 Marius Bakke <[email protected]>
;;; Copyright © 2017 Eric Bavier <[email protected]>
;;; Copyright © 2018 Tobias Geerinckx-Rice <[email protected]>
;;; Copyright © 2018, 2019, 2022 Ricardo Wurmus <[email protected]>
@@ -20,6 +20,7 @@
;;; Copyright © 2021 Maxime Devos <[email protected]>
;;; Copyright © 2021 Guillaume Le Vaillant <[email protected]>
;;; Copyright © 2021 Maxim Cournoyer <[email protected]>
+;;; Copyright © 2022 zamfofex <[email protected]>
;;; Copyright © 2022 John Kehayias <[email protected]>
;;;
;;; This file is part of GNU Guix.
@@ -106,14 +107,14 @@ command-line arguments, multiple languages, and so on.")
(define-public grep
(package
(name "grep")
- (version "3.6")
+ (version "3.8")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
- "0gipv6bzkm1aihj0ncqpyh164xrzgcxcv9r1kwzyk2g1mzl1azk6"))
+ "10n3mc9n1xmg85hpxyr4wiqzfp27ffxzwhvkv021j27vnk0pr3a9"))
(patches (search-patches "grep-timing-sensitive-test.patch"))))
(build-system gnu-build-system)
(native-inputs (list perl)) ;some of the tests require it
@@ -215,9 +216,10 @@ implementation offers several extensions over the standard utility.")
(build-system gnu-build-system)
;; Note: test suite requires ~1GiB of disk space.
(arguments
- `(,@(if (hurd-target?)
- '(#:make-flags
- (list (string-append
+ `(,@(cond
+ ((hurd-target?)
+ '(#:make-flags
+ (list (string-append
"TESTSUITEFLAGS= -k '"
"!sparse"
",!renamed dirs in incrementals"
@@ -230,8 +232,13 @@ implementation offers several extensions over the standard utility.")
",!renamed subdirectories"
",!chained renames"
",!Directory"
- "'")))
- '())
+ "'"))))
+ ;; https://lists.gnu.org/archive/html/bug-tar/2021-10/msg00007.html
+ ;; tar-1.34 isn't aware of 64-bit time_t and upstream suggests
+ ;; skipping the test for this release on 32-bit systems.
+ ((not (target-64bit?))
+ '(#:make-flags (list "TESTSUITEFLAGS= -k '!tricky time stamps'")))
+ (else '()))
#:phases (modify-phases %standard-phases
(add-before 'build 'set-shell-file-name
(lambda* (#:key inputs #:allow-other-keys)
@@ -319,14 +326,14 @@ interactive means to merge two files.")
(define-public findutils
(package
(name "findutils")
- (version "4.8.0")
+ (version "4.9.0")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/findutils/findutils-"
version ".tar.xz"))
(sha256
(base32
- "0r3i72hnw0a30khlczi9k2c51aamaj6kfmp5mk3844nrjxz7n4jp"))
+ "1zk2sighc26bfdsm97bv7cd1cnvq7r4gll4zqpnp0rs3kp0bigx2"))
(patches (search-patches "findutils-localstatedir.patch"))))
(build-system gnu-build-system)
(arguments
@@ -357,16 +364,14 @@ used to apply commands with arbitrarily long arguments.")
(define-public coreutils
(package
(name "coreutils")
- (version "8.32")
+ (version "9.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/coreutils/coreutils-"
version ".tar.xz"))
(sha256
(base32
- "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24"))
- (patches (search-patches "coreutils-ls.patch"
- "coreutils-gnulib-tests.patch"))))
+ "08q4b0w7mwfxbqjs712l6wrwl2ijs7k50kssgbryg9wbsw8g98b1"))))
(build-system gnu-build-system)
(inputs `(,acl ;TODO: add SELinux
,attr ;for xattrs in ls, mv, etc
@@ -411,6 +416,10 @@ used to apply commands with arbitrarily long arguments.")
" test-renameatu"
" test-utimensat")))
'())
+ ,@(if (not (target-64bit?))
+ ;; Not all software is ready for 64bit time_t.
+ '(#:configure-flags (list "--disable-year2038"))
+ '())
#:phases (modify-phases %standard-phases
(add-before 'build 'patch-shell-references
(lambda _
@@ -554,17 +563,15 @@ change. GNU make offers many powerful extensions over the standard utility.")
(define-public binutils
(package
(name "binutils")
- (version "2.37")
+ (version "2.38")
(source
(origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
- (base32 "1m3b2rdfv1dmdpd0bzg1hy7i8a2qng53szc6livyi3nh6101mz37"))
- (patches (search-patches "binutils-loongson-workaround.patch"
- "binutils-2.37-file-descriptor-leak.patch"
- "binutils-CVE-2021-45078.patch"))))
+ (base32 "1y0fb4qgxaxfyf81x9fqq9w5609mkah0b7wm1f7ab9kpy0fcf3h7"))
+ (patches (search-patches "binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
(arguments
`(#:out-of-source? #t ;recommended in the README
@@ -593,7 +600,16 @@ change. GNU make offers many powerful extensions over the standard utility.")
"--enable-compressed-debug-sections=all"
"--enable-lto"
"--enable-separate-code"
- "--enable-threads")))
+ "--enable-threads")
+ ;; XXX: binutils 2.38 was released without generated manuals:
+ ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=28909>. To avoid
+ ;; a circular dependency on texinfo, prevent the build system from
+ ;; creating the manuals by calling "true" instead of "makeinfo" ...
+ #:make-flags '("MAKEINFO=true")))
+
+ ;; ... and "hide" this package such that users who install binutils get
+ ;; the version with documentation defined below.
+ (properties '((hidden? . #t)))
(synopsis "Binary utilities: bfd gas gprof ld")
(description
@@ -606,6 +622,16 @@ included.")
(license gpl3+)
(home-page "https://www.gnu.org/software/binutils/")))
+(define-public binutils+documentation
+ (package/inherit binutils
+ (native-inputs
+ (list texinfo))
+ (arguments
+ (substitute-keyword-arguments (package-arguments binutils)
+ ((#:make-flags flags ''())
+ ''())))
+ (properties '())))
+
;; FIXME: ath9k-firmware-htc-binutils.patch do not apply on 2.34 because of a
;; big refactoring of xtensa-modules.c (commit 567607c11fbf7105 upstream).
;; Keep this version around until the patch is updated.
@@ -627,7 +653,7 @@ included.")
(properties '())))
(define-public binutils-gold
- (package/inherit binutils
+ (package/inherit binutils+documentation
(name "binutils-gold")
(arguments
(substitute-keyword-arguments (package-arguments binutils)
@@ -729,18 +755,29 @@ the store.")
(home-page "https://www.gnu.org/software/guix//")
(license gpl3+)))
+(define-public %glibc/hurd-configure-flags
+ ;; 'configure' in glibc 2.35 omits to pass '-ffreestanding' when detecting
+ ;; Mach headers. This is fixed in glibc commits
+ ;; 8b8c768e3c701ed1993789bb46acb8a12c7a93df and
+ ;; 7685630b98ca2a3f5de86eadf130993e6cf998a0; as a workaround, bypass those
+ ;; tests.
+ '("ac_cv_header_mach_mach_types_defs=yes"
+ "ac_cv_header_mach_mach_types_h=yes"
+ "ac_cv_header_mach_machine_ndr_def_h=no"
+ "libc_cv_mach_task_creation_time=yes"))
+
(define-public glibc
;; This is the GNU C Library, used on GNU/Linux and GNU/Hurd. Prior to
;; version 2.28, GNU/Hurd used a different glibc branch.
(package
(name "glibc")
- (version "2.33")
+ (version "2.35")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz"))
(sha256
(base32
- "1zvp0qdfbdyqrzydz18d9zg3n5ygy8ps7cmny1bvsp8h1q05c99f"))
+ "0bpm1kfi09dxl4c6aanc5c9951fmf6ckkzay60cx7k37dcpp68si"))
(patches (search-patches "glibc-ldd-powerpc.patch"
"glibc-ldd-x86_64.patch"
"glibc-dl-cache.patch"
@@ -778,10 +815,15 @@ the store.")
#:validate-runpath? #f
#:modules ((ice-9 ftw)
+ (srfi srfi-1)
(srfi srfi-26)
(guix build utils)
(guix build gnu-build-system))
+ ;; Strip binaries but preserve the symbol table needed by Valgrind:
+ ;; <https://lists.gnu.org/archive/html/help-guix/2022-03/msg00036.html>.
+ #:strip-flags '("--strip-debug")
+
#:configure-flags
(list "--sysconfdir=/etc"
@@ -823,7 +865,8 @@ the store.")
;; On GNU/Hurd we get discarded-qualifiers warnings for
;; 'device_write_inband' among other things. Ignore them.
,@(if (hurd-target?)
- '("--disable-werror")
+ `("--disable-werror"
+ ,@%glibc/hurd-configure-flags)
'()))
#:tests? #f ; XXX
@@ -888,13 +931,34 @@ the store.")
(add-after 'install 'move-static-libs
(lambda* (#:key outputs #:allow-other-keys)
;; Move static libraries to the "static" output.
+ ;; Note: As of GNU libc 2.34, the contents of some ".a"
+ ;; files have been moved into "libc.so", and *both* empty
+ ;; ".so" and ".a" files have been introduced to avoid
+ ;; breaking existing executables and existing builds
+ ;; respectively. The intent of the seemingly redundant
+ ;; empty ".a" files is to avoid newly-compiled executables
+ ;; from having dependencies on the empty shared libraries,
+ ;; and as such, it is useful to have these ".a" files in
+ ;; OUT in addition to STATIC.
+
+ ;; XXX: It might be better to determine whether a static
+ ;; library is empty by some criterion (such as their file
+ ;; size equaling eight bytes) rather than hardcoding them
+ ;; by name.
+ (define empty-static-libraries
+ '("libpthread.a" "libdl.a" "libutil.a" "libanl.a"))
+ (define (empty-static-library? file)
+ (any (lambda (s)
+ (string=? file s)) empty-static-libraries))
+
(define (static-library? file)
;; Return true if FILE is a static library. The
;; "_nonshared.a" files are referred to by libc.so,
;; libpthread.so, etc., which are in fact linker
;; scripts.
(and (string-suffix? ".a" file)
- (not (string-contains file "_nonshared"))))
+ (not (string-contains file "_nonshared"))
+ (not (empty-static-library? file))))
(define (linker-script? file)
;; Guess whether FILE, a ".a" file, is actually a
@@ -905,6 +969,7 @@ the store.")
(let* ((out (assoc-ref outputs "out"))
(lib (string-append out "/lib"))
(files (scandir lib static-library?))
+ (empty (scandir lib empty-static-library?))
(static (assoc-ref outputs "static"))
(slib (string-append static "/lib")))
(mkdir-p slib)
@@ -912,6 +977,10 @@ the store.")
(rename-file (string-append lib "/" base)
(string-append slib "/" base)))
files)
+ (for-each (lambda (base)
+ (copy-file (string-append lib "/" base)
+ (string-append slib "/" base)))
+ empty)
;; Usually libm.a is a linker script so we need to
;; change the file names in there to refer to STATIC
@@ -1335,9 +1404,10 @@ command.")
(arguments
(substitute-keyword-arguments (package-arguments glibc)
;; We just pass the flags really needed to build the headers.
- ((#:configure-flags _)
+ ((#:configure-flags flags)
`(list "--enable-add-ons"
- "--host=i586-pc-gnu"))
+ "--host=i586-pc-gnu"
+ ,@%glibc/hurd-configure-flags))
((#:phases _)
'(modify-phases %standard-phases
(replace 'install
@@ -1488,7 +1558,7 @@ package needs iconv ,@(libiconv-if-needed) should be added."
;; POSIX C libraries provide iconv. Platforms with an incomplete libc
;; without iconv, such as MinGW, must return the then clause.
(if (target-mingw? target)
- `(("libiconv" ,libiconv))
+ (list libiconv)
'()))
(define-public (canonical-package package)