diff options
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r-- | gnu/packages/base.scm | 274 |
1 files changed, 123 insertions, 151 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index ea2e102c15..b7864f67fe 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020 Ludovic Courtès <ludo@gnu.org> +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017, 2018, 2019, 2020, 2021 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2019 Andreas Enge <andreas@enge.fr> ;;; Copyright © 2012 Nikita Karetnikov <nikita@karetnikov.org> ;;; Copyright © 2014, 2015, 2016, 2018 Mark H Weaver <mhw@netris.org> @@ -17,6 +17,7 @@ ;;; Copyright © 2020 Vitaliy Shatrov <D0dyBo0D0dyBo0@protonmail.com> ;;; Copyright © 2020 Chris Marusich <cmmarusich@gmail.com> ;;; Copyright © 2021 Leo Le Bouter <lle-bout@zaclys.net> +;;; Copyright © 2021 Maxime Devos <maximedevos@telenet.be> ;;; ;;; This file is part of GNU Guix. ;;; @@ -39,6 +40,7 @@ #:use-module (gnu packages) #:use-module (gnu packages acl) #:use-module (gnu packages algebra) + #:use-module (gnu packages attr) #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages ed) @@ -98,18 +100,18 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "3.4") + (version "3.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "1yy33kiwrxrwj2nxa4fg15bvmwyghqbs8qwkdvy5phm784f7brjq")) + "0gipv6bzkm1aihj0ncqpyh164xrzgcxcv9r1kwzyk2g1mzl1azk6")) (patches (search-patches "grep-timing-sensitive-test.patch")))) (build-system gnu-build-system) - (native-inputs `(("perl" ,perl))) ;some of the tests require it - (inputs `(("pcre" ,pcre))) + (native-inputs (list perl)) ;some of the tests require it + (inputs (list pcre)) (arguments `(#:phases (modify-phases %standard-phases @@ -122,8 +124,7 @@ command-line arguments, multiple languages, and so on.") (substitute* (list (string-append bin "/egrep") (string-append bin "/fgrep")) (("^exec grep") - (string-append "exec " bin "/grep"))) - #t)))))) + (string-append "exec " bin "/grep"))))))))) (synopsis "Print lines matching a pattern") (description "grep is a tool for finding text inside files. Text is found by @@ -146,27 +147,22 @@ including, for example, recursive directory searching.") ".tar.gz")) (sha256 (base32 - "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk")))) + "0alqagh0nliymz23kfjg6g9w3cr086k0sfni56gi8fhzqwa3xksk")) + ;; Remove this snippet once upstream releases a fixed version. + ;; This snippet changes Makefile.in, even though the upstream + ;; patch changes testsuite/local.mk, since we build sed from a + ;; release tarball. See: https://bugs.gnu.org/36150 + (snippet + '(begin + (substitute* "Makefile.in" + (("^ abs_srcdir='\\$\\(abs_srcdir\\)'.*" previous-line) + (string-append + previous-line + " CONFIG_HEADER='$(CONFIG_HEADER)'\t\t\\\n"))))) + (modules '((guix build utils))))) (build-system gnu-build-system) - (arguments - ;; TODO: When merging this into core-updates, keep the version of - ;; this code (with comment!) applied as a snippet. - `(,@(if (string-prefix? "powerpc64le" (or (%current-target-system) - (%current-system))) - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'allow-building-on-selinux-systems - (lambda _ - (substitute* "Makefile.in" - (("^ abs_srcdir='\\$\\(abs_srcdir\\)'.*" previous-line) - (string-append - previous-line - " CONFIG_HEADER='$(CONFIG_HEADER)'\t\t\\\n"))) - #t)))) - '()))) (synopsis "Stream editor") - (native-inputs - `(("perl" ,perl))) ;for tests + (native-inputs (list perl)) ;for tests (description "Sed is a non-interactive, text stream editor. It receives a text input from a file or from standard input and it then applies a series of text @@ -179,14 +175,14 @@ implementation offers several extensions over the standard utility.") (define-public tar (package (name "tar") - (version "1.32") + (version "1.34") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/tar/tar-" version ".tar.xz")) (sha256 (base32 - "1n7xy657ii0sa42zx6944v2m4v9qrh6sqgmw17l3nch3y43sxlyh")) + "0a0x87anh9chbi2cgcyy7pmnm5hzk4yd1w2j8gm1wplwhwkbvgk3")) (patches (search-patches "tar-skip-unreliable-tests.patch" "tar-remove-wholesparse-check.patch")))) (build-system gnu-build-system) @@ -214,13 +210,12 @@ implementation offers several extensions over the standard utility.") (let ((bash (assoc-ref inputs "bash"))) (substitute* "src/system.c" (("/bin/sh") - (string-append bash "/bin/sh"))) - #t)))))) + (string-append bash "/bin/sh"))))))))) ;; When cross-compiling, the 'set-shell-file-name' phase needs to be able ;; to refer to the target Bash. (inputs (if (%current-target-system) - `(("bash" ,bash)) + (list bash) '())) (synopsis "Managing tar archives") @@ -253,7 +248,7 @@ standard utility.") (if (%current-target-system) `(#:configure-flags '("gl_cv_func_working_mktime=yes")) '())) - (native-inputs `(("ed" ,ed))) + (native-inputs (list ed)) (synopsis "Apply differences to originals, with optional backups") (description "Patch is a program that applies changes to files based on differences @@ -276,7 +271,7 @@ differences.") (base32 "09isrg0isjinv8c535nxsi1s86wfdfzml80dbw41dj9x3hiad9xk")))) (build-system gnu-build-system) - (native-inputs `(("perl" ,perl))) + (native-inputs (list perl)) (synopsis "Comparing and merging files") (description "GNU Diffutils is a package containing tools for finding the @@ -290,16 +285,15 @@ interactive means to merge two files.") (define-public findutils (package (name "findutils") - (version "4.7.0") + (version "4.8.0") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/findutils/findutils-" version ".tar.xz")) (sha256 (base32 - "16kqz9yz98dasmj70jwf5py7jk558w96w0vgp3zf9xsqk3gzpzn5")) - (patches (search-patches "findutils-localstatedir.patch" - "findutils-test-rwlock-threads.patch")))) + "0r3i72hnw0a30khlczi9k2c51aamaj6kfmp5mk3844nrjxz7n4jp")) + (patches (search-patches "findutils-localstatedir.patch")))) (build-system gnu-build-system) (arguments `(#:configure-flags (list @@ -311,8 +305,7 @@ interactive means to merge two files.") (substitute* '("tests/xargs/verbose-quote.sh" "tests/find/exec-plus-last-file.sh") (("#!/bin/sh") - (string-append "#!" (which "sh")))) - #t))))) + (string-append "#!" (which "sh"))))))))) (synopsis "Operating on files matching given criteria") (description "Findutils supplies the basic file directory searching utilities of the @@ -335,18 +328,20 @@ used to apply commands with arbitrarily long arguments.") (sha256 (base32 "1yjcrh5hw70c0yn8zw55pd6j51dj90anpq8mmg649ps9g3gdhn24")) - (patches (search-patches "coreutils-ls.patch")))) + (patches (search-patches "coreutils-ls.patch" + "coreutils-gnulib-tests.patch")))) (build-system gnu-build-system) - (inputs `(("acl" ,acl) ; TODO: add SELinux - ("gmp" ,gmp) ;bignums in 'expr', yay! + (inputs `(,acl ;TODO: add SELinux + ,attr ;for xattrs in ls, mv, etc + ,gmp ;bignums in 'expr', yay! ;; Do not use libcap when cross-compiling since it's not quite ;; cross-compilable; and use it only for supported systems. ,@(if (and (not (%current-target-system)) (member (%current-system) (package-supported-systems libcap))) - `(("libcap" ,libcap-2.31)) ;capability support in 'ls', etc. - '()))) + `(,libcap) ;capability support in 'ls', etc. + '()))) (native-inputs ;; Perl is needed to run tests in native builds, and to run the bundled ;; copy of help2man. However, don't pass it when cross-compiling since @@ -354,7 +349,7 @@ used to apply commands with arbitrarily long arguments.") ;; for help2man. (if (%current-target-system) '() - `(("perl" ,perl)))) + (list perl))) (outputs '("out" "debug")) (arguments `(#:parallel-build? #f ; help2man may be called too early @@ -383,16 +378,18 @@ used to apply commands with arbitrarily long arguments.") (substitute* (find-files "gnulib-tests" "\\.c$") (("/bin/sh") (which "sh"))) (substitute* (find-files "tests" "\\.sh$") - (("#!/bin/sh") (string-append "#!" (which "sh")))) - #t)) - ,@(if (hurd-target?) - `((add-after 'unpack 'remove-tests - (lambda _ - (substitute* "Makefile.in" + (("#!/bin/sh") (string-append "#!" (which "sh")))))) + (add-after 'unpack 'remove-tests + (lambda _ + ,@(if (hurd-target?) + '((substitute* "Makefile.in" ;; this test hangs - (("^ *tests/misc/timeout-group.sh.*") "")) - #t))) - '())))) + (("^ *tests/misc/timeout-group.sh.*") ""))) + '()) + (substitute* "Makefile.in" + ;; fails on filesystems where inotify cannot be used, + ;; more info in #47935 + (("^ *tests/tail-2/inotify-dir-recreate.sh.*") ""))))))) (synopsis "Core GNU utilities (file, text, shell)") (description "GNU Coreutils package includes all of the basic command-line tools that @@ -436,8 +433,7 @@ standard.") ;; specific issue, but "env-S.pl" is not adjusted for build ;; environments with long prefixes (/tmp/guix-build-...). (substitute* "Makefile" - (("^.*tests/misc/env-S.pl.*$") "")) - #t))))))))) + (("^.*tests/misc/env-S.pl.*$") ""))))))))))) (define-public gnu-make (package @@ -452,8 +448,8 @@ standard.") "06cfqzpqsvdnsxbysl5p2fgdgxgl9y4p7scpnrfa8z2zgkjdspz0")) (patches (search-patches "make-impure-dirs.patch")))) (build-system gnu-build-system) - (native-inputs `(("pkg-config" ,pkg-config))) ; to detect Guile - (inputs `(("guile" ,guile-3.0))) + (native-inputs (list pkg-config)) ;to detect Guile + (inputs (list guile-3.0)) (outputs '("out" "debug")) (arguments `(,@(if (hurd-target?) @@ -469,8 +465,7 @@ standard.") (substitute* "src/job.c" (("default_shell =.*$") (format #f "default_shell = \"~a/bin/sh\";\n" - bash))) - #t)))))) + bash))))))))) (synopsis "Remake files automatically") (description "Make is a program that is used to control the production of @@ -504,21 +499,21 @@ change. GNU make offers many powerful extensions over the standard utility.") (substitute* "job.c" (("default_shell =.*$") (format #f "default_shell = \"~a/bin/sh\";\n" - bash))) - #t)))))))) + bash))))))))))) (define-public binutils (package (name "binutils") - (version "2.34") + (version "2.36.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/binutils/binutils-" version ".tar.bz2")) (sha256 (base32 - "1rin1f5c7wm4n3piky6xilcrpf2s0n3dd5vqq8irrxkcic3i1w49")) - (patches (search-patches "binutils-loongson-workaround.patch")))) + "18ypqr5y48vxqg9mkz1c47798jp1xb1d4vfpmfq8vkihkvkx4jsv")) + (patches (search-patches "binutils-libiberty-endianness-bug.patch" + "binutils-loongson-workaround.patch")))) (build-system gnu-build-system) ;; TODO: Add dependency on zlib + those for Gold. @@ -542,17 +537,7 @@ change. GNU make offers many powerful extensions over the standard utility.") ;; Make sure 'ar' and 'ranlib' produce archives in a ;; deterministic fashion. - "--enable-deterministic-archives") - - ;; XXX: binutils 2.34 was mistakenly released without generated manuals: - ;; <https://sourceware.org/bugzilla/show_bug.cgi?id=25491>. 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 so that users who install binutils get the - ;; version with documentation defined below. - (properties '((hidden? . #t))) + "--enable-deterministic-archives"))) (synopsis "Binary utilities: bfd gas gprof ld") (description @@ -565,18 +550,6 @@ included.") (license gpl3+) (home-page "https://www.gnu.org/software/binutils/"))) -;; Work around a problem with binutils 2.34 whereby manuals are missing from -;; the release tarball. Remove this and the related code above when updating. -(define-public binutils+documentation - (package/inherit - binutils - (native-inputs - `(("texinfo" ,texinfo))) - (arguments - (substitute-keyword-arguments (package-arguments binutils) - ((#:make-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. @@ -597,7 +570,7 @@ included.") (properties '()))) (define-public binutils-gold - (package/inherit binutils+documentation + (package/inherit binutils (name "binutils-gold") (arguments `(#:phases @@ -605,8 +578,7 @@ included.") (add-after 'patch-source-shebangs 'patch-more-shebangs (lambda _ (substitute* "gold/Makefile.in" - (("/bin/sh") (which "sh"))) - #t))) + (("/bin/sh") (which "sh")))))) ,@(substitute-keyword-arguments (package-arguments binutils) ; Upstream is aware of unrelocatable test failures on arm*. ((#:tests? _ #f) @@ -705,32 +677,27 @@ the store.") ;; version 2.28, GNU/Hurd used a different glibc branch. (package (name "glibc") - (version "2.31") + (version "2.33") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) (sha256 (base32 - "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj")) - (snippet - ;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is - ;; required on LFS distros to avoid loading the distro's libc.so - ;; instead of ours. - '(begin - (substitute* "sysdeps/unix/sysv/linux/configure" - (("use_ldconfig=yes") - "use_ldconfig=no")) - #t)) - (modules '((guix build utils))) - (patches (search-patches "glibc-ldd-x86_64.patch" + "1zvp0qdfbdyqrzydz18d9zg3n5ygy8ps7cmny1bvsp8h1q05c99f")) + (patches (search-patches "glibc-ldd-powerpc.patch" + "glibc-ldd-x86_64.patch" + "glibc-dl-cache.patch" "glibc-hidden-visibility-ldconfig.patch" "glibc-versioned-locpath.patch" "glibc-allow-kernel-2.6.32.patch" "glibc-reinstate-prlimit64-fallback.patch" "glibc-supported-locales.patch" + "glibc-cross-objdump.patch" + "glibc-cross-objcopy.patch" ;must come 2nd "glibc-hurd-clock_t_centiseconds.patch" "glibc-hurd-clock_gettime_monotonic.patch" - "glibc-hurd-signal-sa-siginfo.patch")))) + "glibc-hurd-mach-print.patch" + "glibc-hurd-gettyent.patch")))) (build-system gnu-build-system) ;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc @@ -803,6 +770,11 @@ the store.") '("--disable-werror") '())) + ;; Arrange so that /etc/rpc & co. go to $out/etc. + #:make-flags (list (string-append "sysconfdir=" + (assoc-ref %outputs "out") + "/etc")) + #:tests? #f ; XXX #:phases (modify-phases %standard-phases (add-before @@ -830,6 +802,11 @@ the store.") ;; 4.7.1. ((" -lgcc_s") "")) + ;; Tell the ld.so cache code where the store is. + (substitute* "elf/dl-cache.c" + (("@STORE_DIRECTORY@") + (string-append "\"" (%store-directory) "\""))) + ;; Have `system' use that Bash. (substitute* "sysdeps/posix/system.c" (("#define[[:blank:]]+SHELL_PATH.*$") @@ -865,9 +842,7 @@ the store.") ;; "bilingual" eval/exec magic at the top of the file. "") (("exec @PERL@") - "exec perl")) - - #t))) + "exec perl"))))) (add-after 'install 'move-static-libs (lambda* (#:key outputs #:allow-other-keys) @@ -905,17 +880,8 @@ the store.") ((out) static))) (filter linker-script? (map (cut string-append slib "/" <>) - files))) - #t))) - - ,@(if (target-powerpc?) - '((add-after 'unpack 'apply-patch - (lambda* (#:key inputs #:allow-other-keys) - (let ((patch (assoc-ref inputs - "powerpc64le-patch"))) - (invoke "patch" "--force" "-p1" - "-i" patch))))) - '()) + files)))))) + ,@(if (hurd-target?) '((add-after 'install 'augment-libc.so (lambda* (#:key outputs #:allow-other-keys) @@ -923,8 +889,7 @@ the store.") (substitute* (string-append out "/lib/libc.so") (("/[^ ]+/lib/libc.so.0.3") (string-append out "/lib/libc.so.0.3" - " libmachuser.so libhurduser.so")))) - #t))) + " libmachuser.so libhurduser.so"))))))) '())))) (inputs `(("static-bash" ,static-bash))) @@ -937,10 +902,6 @@ the store.") ("gettext" ,gettext-minimal) ("python" ,python-minimal) - ,@(if (target-powerpc?) - `(("powerpc64le-patch" ,@(search-patches - "glibc-ldd-powerpc.patch"))) - '()) ,@(if (hurd-target?) `(("mig" ,mig) ("perl" ,perl)) @@ -969,6 +930,17 @@ with the Linux kernel.") ;; 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-public glibc-2.31 + (package + (inherit glibc) + (version "2.31") + (source (origin + (inherit (package-source glibc)) + (uri (string-append "mirror://gnu/glibc/glibc-" version ".tar.xz")) + (sha256 + (base32 + "05zxkyz9bv3j9h0xyid1rhvh3klhsmrpkf3bcs6frvlgyr2gwilj")))))) + (define-public glibc-2.30 (package (inherit glibc) @@ -1126,8 +1098,7 @@ to the @code{share/locale} sub-directory of this package.") (string-append (dirname directory) "/" name "." normalized))))) - locales) - #t))) + locales)))) (delete 'install) (delete 'move-static-libs))) ((#:configure-flags flags) @@ -1184,8 +1155,7 @@ to the @code{share/locale} sub-directory of this package.") locale ".UTF-8"))) ',locales) #t)))) - (native-inputs `(("glibc" ,glibc) - ("gzip" ,gzip))) + (native-inputs (list glibc gzip)) (synopsis (if default-locales? (P_ "Small sample of UTF-8 locales") (P_ "Customized sample of UTF-8 locales"))) @@ -1238,17 +1208,15 @@ command.") (package (inherit glibc) (name "glibc-hurd-headers") (outputs '("out")) - (propagated-inputs `(("gnumach-headers" ,gnumach-headers) - ("hurd-headers" ,hurd-headers))) + (propagated-inputs (list gnumach-headers hurd-headers)) (native-inputs - `(("mig" ,(if (%current-target-system) - ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG, - ;; hence this hack. - (package - (inherit mig) - (arguments `(#:system "i686-linux"))) - mig)) - ,@(package-native-inputs glibc))) + (modify-inputs (package-native-inputs glibc) + (prepend (if (%current-target-system) + ;; XXX: When targeting i586-pc-gnu, we need a 32-bit MiG, + ;; hence this hack. + (package (inherit mig) + (arguments `(#:system "i686-linux"))) + mig)))) (arguments (substitute-keyword-arguments (package-arguments glibc) ;; We just pass the flags really needed to build the headers. @@ -1267,8 +1235,7 @@ command.") (let ((out (assoc-ref outputs "out"))) (close-port (open-output-file - (string-append out "/include/gnu/stubs.h")))) - #t)) + (string-append out "/include/gnu/stubs.h")))))) (delete 'build))))))) ; nothing to build (define-public tzdata @@ -1288,6 +1255,14 @@ command.") (build-system gnu-build-system) (arguments `(#:tests? #f + ;; This consists purely of (architecture-independent) data, + ;; so ‘cross-compilation’ is pointless here! + ;; (The binaries zic, dump, and tzselect are deleted in the post-install + ;; phase.) + #:target #f + ;; share/zoneinfo/posix is a symlink to share/zoneinfo, + ;; so include the package itself in #:allowed-references. + #:allowed-references ("out") #:make-flags (let ((out (assoc-ref %outputs "out")) (tmp (getenv "TMPDIR"))) (list (string-append "TOPDIR=" out) @@ -1334,8 +1309,7 @@ command.") (copy-recursively (string-append out "/share/zoneinfo-leaps") (string-append out "/share/zoneinfo/right")) (delete-file-recursively - (string-append out "/share/zoneinfo-leaps")) - #t))) + (string-append out "/share/zoneinfo-leaps"))))) (delete 'configure)))) (inputs `(("tzcode" ,(origin (method url-fetch) @@ -1363,7 +1337,7 @@ and daylight-saving rules.") (hidden-package (package (inherit tzdata) - (version "2019c") + (version "2020d") (source (origin (method url-fetch) (uri (string-append @@ -1371,7 +1345,7 @@ and daylight-saving rules.") version ".tar.gz")) (sha256 (base32 - "0z7w1yv37cfk8yhix2cillam091vgp1j4g8fv84261q9mdnq1ivr")))) + "1wxskk9mh1x2073n99qna2mq58mgi648mbq5dxlqfcrnvrbkk0cd")))) (inputs `(("tzcode" ,(origin (method url-fetch) @@ -1380,7 +1354,7 @@ and daylight-saving rules.") version ".tar.gz")) (sha256 (base32 - "1m3y2rnf1nggxxhxplab5zdd5whvar3ijyrv7lifvm82irkd7szn"))))))))) + "1mgsckixmmk9qxzsflfxnp3999qi3ls72bgksclk01g852x51w3c"))))))))) (define-public libiconv (package @@ -1397,11 +1371,9 @@ and daylight-saving rules.") (snippet ;; Work around "declared gets" error on glibc systems (fixed by ;; Gnulib commit 66712c23388e93e5c518ebc8515140fa0c807348.) - '(begin - (substitute* "srclib/stdio.in.h" - (("^#undef gets") "") - (("^_GL_WARN_ON_USE \\(gets.*") "")) - #t)))) + '(substitute* "srclib/stdio.in.h" + (("^#undef gets") "") + (("^_GL_WARN_ON_USE \\(gets.*") ""))))) (build-system gnu-build-system) (synopsis "Character set conversion library") (description |