aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/base.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/base.scm')
-rw-r--r--gnu/packages/base.scm227
1 files changed, 142 insertions, 85 deletions
diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm
index 5fcfc90e56..92acbd3640 100644
--- a/gnu/packages/base.scm
+++ b/gnu/packages/base.scm
@@ -10,6 +10,7 @@
;;; Copyright © 2017 Rene Saavedra <rennes@openmailbox.org>
;;; Copyright © 2017 Mathieu Othacehe <m.othacehe@gmail.com>
;;; Copyright © 2017 Marius Bakke <mbakke@fastmail.com>
+;;; Copyright © 2017 Eric Bavier <bavier@member.fsf.org>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -82,16 +83,15 @@ command-line arguments, multiple languages, and so on.")
(define-public grep
(package
(name "grep")
- (version "3.0")
+ (version "3.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/grep/grep-"
version ".tar.xz"))
(sha256
(base32
- "1dcasjp3a578nrvzrcn38mpizb8w1q6mvfzhjmcqqgkf0nsivj72"))
- (patches (search-patches "grep-timing-sensitive-test.patch"
- "grep-gnulib-lock.patch"))))
+ "0zm0ywmyz9g8vn1plw14mn8kj74yipx5qsljndbyfgmvndx5qqnv"))
+ (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)))
@@ -240,7 +240,8 @@ differences.")
version ".tar.xz"))
(sha256
(base32
- "1mivg0fy3a6fcn535ln8nkgfj6vxh5hsxxs5h6692wxmsjyyh8fn"))))
+ "1mivg0fy3a6fcn535ln8nkgfj6vxh5hsxxs5h6692wxmsjyyh8fn"))
+ (patches (search-patches "diffutils-getopt.patch"))))
(build-system gnu-build-system)
(synopsis "Comparing and merging files")
(description
@@ -265,11 +266,17 @@ interactive means to merge two files.")
"178nn4dl7wbcw499czikirnkniwnx36argdnqgz4ik9i6zvwkm6y"))
(patches (search-patches
"findutils-localstatedir.patch"
- "findutils-test-xargs.patch"
- ;; test-lock has performance issues on multi-core
- ;; machines, it hangs or takes a long time to complete.
- ;; This is a commit from gnulib to fix this issue.
- "findutils-gnulib-multi-core.patch"))))
+ "findutils-test-xargs.patch"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ ;; The gnulib test-lock test is prone to writer starvation
+ ;; with our glibc@2.25, which prefers readers, so disable it.
+ ;; The gnulib commit b20e8afb0b2 should fix this once
+ ;; incorporated here.
+ (substitute* "tests/Makefile.in"
+ (("test-lock\\$\\(EXEEXT\\) ") ""))
+ #t))))
(build-system gnu-build-system)
(arguments
`(#:configure-flags (list
@@ -295,15 +302,14 @@ used to apply commands with arbitrarily long arguments.")
(define-public coreutils
(package
(name "coreutils")
- (version "8.27")
+ (version "8.28")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/coreutils/coreutils-"
version ".tar.xz"))
(sha256
(base32
- "0sv547572iq8ayy8klir4hnngnx92a9nsazmf1wgzfc7xr4x74c8"))
- (patches (search-patches "coreutils-cut-huge-range-test.patch"))))
+ "0r8c1bgm68kl70j1lgd0rv12iykw6143k4m9a56xip9rc2hv25qi"))))
(build-system gnu-build-system)
(inputs `(("acl" ,acl) ; TODO: add SELinux
("gmp" ,gmp) ;bignums in 'expr', yay!
@@ -324,21 +330,24 @@ used to apply commands with arbitrarily long arguments.")
(outputs '("out" "debug"))
(arguments
`(#:parallel-build? #f ; help2man may be called too early
- #:phases (alist-cons-before
- 'build 'patch-shell-references
- (lambda* (#:key inputs #:allow-other-keys)
- (let ((bash (assoc-ref inputs "bash")))
- ;; 'split' uses either $SHELL or /bin/sh. Set $SHELL so
- ;; that tests pass, since /bin/sh isn't in the chroot.
- (setenv "SHELL" (which "sh"))
-
- (substitute* (find-files "gnulib-tests" "\\.c$")
- (("/bin/sh")
- (format #f "~a/bin/sh" bash)))
- (substitute* (find-files "tests" "\\.sh$")
- (("#!/bin/sh")
- (format #f "#!~a/bin/sh" bash)))))
- %standard-phases)))
+ #:phases (modify-phases %standard-phases
+ (add-before 'build 'patch-shell-references
+ (lambda _
+ ;; 'split' uses either $SHELL or /bin/sh. Set $SHELL so
+ ;; that tests pass, since /bin/sh isn't in the chroot.
+ (setenv "SHELL" (which "sh"))
+
+ (substitute* (find-files "gnulib-tests" "\\.c$")
+ (("/bin/sh") (which "sh")))
+ (substitute* (find-files "tests" "\\.sh$")
+ (("#!/bin/sh") (which "sh")))
+ #t)))
+
+ ;; Work around a cross-compilation bug whereby libcoreutils.a would
+ ;; provide '__mktime_internal', which conflicts with the one in libc.a.
+ ,@(if (%current-target-system)
+ `(#:configure-flags '("gl_cv_func_working_mktime=yes"))
+ '())))
(synopsis "Core GNU utilities (file, text, shell)")
(description
"GNU Coreutils includes all of the basic command-line tools that are
@@ -396,16 +405,15 @@ change. GNU make offers many powerful extensions over the standard utility.")
(define-public binutils
(package
- (replacement binutils/fixed)
(name "binutils")
- (version "2.28")
+ (version "2.28.1")
(source (origin
(method url-fetch)
(uri (string-append "mirror://gnu/binutils/binutils-"
version ".tar.bz2"))
(sha256
(base32
- "0wiasgns7i8km8nrxas265sh2dfpsw93b3qw195ipc90w4z475v2"))
+ "1sj234nd05cdgga1r36zalvvdkvpfbr12g5mir2n8i1dwsdrj939"))
(patches (search-patches "binutils-ld-new-dtags.patch"
"binutils-loongson-workaround.patch"))))
(build-system gnu-build-system)
@@ -438,19 +446,6 @@ included.")
(license gpl3+)
(home-page "https://www.gnu.org/software/binutils/")))
-(define binutils/fixed
- (package
- (inherit binutils)
- ;; 2.28.1 is two characters longer than 2.28, so grafting fails due to
- ;; mismatched lengths of filenames, so we have to force it to the same length.
- (version "2281")
- (source
- (origin (inherit (package-source binutils))
- (uri "mirror://gnu/binutils/binutils-2.28.1.tar.bz2")
- (sha256
- (base32
- "1sj234nd05cdgga1r36zalvvdkvpfbr12g5mir2n8i1dwsdrj939"))))))
-
(define* (make-ld-wrapper name #:key
(target (const #f))
binutils
@@ -529,15 +524,26 @@ store.")
(define-public glibc/linux
(package
(name "glibc")
- (version "2.25")
- (replacement glibc/fixed)
+ ;; Glibc has stable branches that continuously pick fixes for each supported
+ ;; release. Unfortunately they do not do point-releases, so we are stuck
+ ;; with copying almost all patches, or use a snapshot of the release branch.
+ ;;
+ ;; This version number corresponds to the output of `git describe` and the
+ ;; archive can be generated by checking out the commit ID and running:
+ ;; git archive --prefix=$(git describe)/ HEAD | xz > $(git describe).tar.xz
+ ;; See <https://bugs.gnu.org/29406> for details.
+ ;;
+ ;; 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")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://gnu/glibc/glibc-"
- version ".tar.xz"))
+ (uri (string-append "https://alpha.gnu.org/gnu/guix/mirror/"
+ "glibc-" (version-major+minor version) "-"
+ (caddr (string-split version #\.)) ".tar.xz"))
(sha256
(base32
- "1813dzkgw6v8q8q1m4v96yfis7vjqc9pslqib6j9mrwh6fxxjyq6"))
+ "1jck0c1i248sn02rvsfjykk77qncma34bjq89dyy2irwm50d7s3g"))
(snippet
;; Disable 'ldconfig' and /etc/ld.so.cache. The latter is
;; required on LFS distros to avoid loading the distro's libc.so
@@ -548,19 +554,15 @@ store.")
(modules '((guix build utils)))
(patches (search-patches "glibc-ldd-x86_64.patch"
"glibc-versioned-locpath.patch"
- "glibc-o-largefile.patch"
- "glibc-memchr-overflow-i686.patch"
- "glibc-vectorized-strcspn-guards.patch"
- "glibc-CVE-2017-1000366-pt1.patch"
- "glibc-CVE-2017-1000366-pt2.patch"
- "glibc-CVE-2017-1000366-pt3.patch"))))
+ "glibc-o-largefile.patch"))))
(build-system gnu-build-system)
;; Glibc's <limits.h> refers to <linux/limit.h>, for instance, so glibc
;; users should automatically pull Linux headers as well.
(propagated-inputs `(("kernel-headers" ,linux-libre-headers)))
- (outputs '("out" "debug"))
+ (outputs '("out" "debug"
+ "static")) ;9 MiB of .a files
(arguments
`(#:out-of-source? #t
@@ -571,6 +573,11 @@ store.")
;; RUNPATH checks.
#:validate-runpath? #f
+ #:modules ((ice-9 ftw)
+ (srfi srfi-26)
+ (guix build utils)
+ (guix build gnu-build-system))
+
#:configure-flags
(list "--enable-add-ons"
"--sysconfdir=/etc"
@@ -591,7 +598,7 @@ store.")
;; `--localedir' is not honored, so work around it.
;; See <http://sourceware.org/ml/libc-alpha/2013-03/msg00093.html>.
(string-append "libc_cv_complocaledir=/run/current-system/locale/"
- ,version)
+ ,(version-major+minor version))
(string-append "--with-headers="
(assoc-ref ,(if (%current-target-system)
@@ -600,10 +607,10 @@ store.")
"kernel-headers")
"/include")
- ;; This is the default for most architectures as of GNU libc 2.21,
+ ;; This is the default for most architectures as of GNU libc 2.26,
;; but we specify it explicitly for clarity and consistency. See
;; "kernel-features.h" in the GNU libc for details.
- "--enable-kernel=2.6.32"
+ "--enable-kernel=3.2.0"
;; Use our Bash instead of /bin/sh.
(string-append "BASH_SHELL="
@@ -675,7 +682,46 @@ store.")
;; "bilingual" eval/exec magic at the top of the file.
"")
(("exec @PERL@")
- "exec perl"))))))))
+ "exec perl")))))
+
+ (add-after 'install 'move-static-libs
+ (lambda* (#:key outputs #:allow-other-keys)
+ ;; Move static libraries to the "static" output.
+ (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"))))
+
+ (define (linker-script? file)
+ ;; Guess whether FILE, a ".a" file, is actually a
+ ;; linker script.
+ (and (not (ar-file? file))
+ (not (elf-file? file))))
+
+ (let* ((out (assoc-ref outputs "out"))
+ (lib (string-append out "/lib"))
+ (files (scandir lib static-library?))
+ (static (assoc-ref outputs "static"))
+ (slib (string-append static "/lib")))
+ (mkdir-p slib)
+ (for-each (lambda (base)
+ (rename-file (string-append lib "/" base)
+ (string-append slib "/" base)))
+ files)
+
+ ;; Usually libm.a is a linker script so we need to
+ ;; change the file names in there to refer to STATIC
+ ;; instead of OUT.
+ (for-each (lambda (ld-script)
+ (substitute* ld-script
+ ((out) static)))
+ (filter linker-script?
+ (map (cut string-append slib "/" <>)
+ files)))
+ #t))))))
(inputs `(("static-bash" ,static-bash)))
@@ -789,17 +835,28 @@ GLIBC/HURD for a Hurd host"
(define-syntax glibc
(identifier-syntax (glibc-for-target)))
-(define glibc/fixed
+;; 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.25
(package
(inherit glibc)
+ (version "2.25")
(source (origin
(inherit (package-source glibc))
- (patches (append
- (origin-patches (package-source glibc))
- (search-patches "glibc-CVE-2017-15670-15671.patch")))))))
-
-;; Below are old libc versions, which we use mostly to build locale data in
-;; the old format (which the new libc cannot cope with.)
+ (uri (string-append "mirror://gnu/glibc/glibc-"
+ version ".tar.xz"))
+ (sha256
+ (base32
+ "1813dzkgw6v8q8q1m4v96yfis7vjqc9pslqib6j9mrwh6fxxjyq6"))
+ (patches (search-patches "glibc-ldd-x86_64.patch"
+ "glibc-versioned-locpath.patch"
+ "glibc-o-largefile.patch"
+ "glibc-vectorized-strcspn-guards.patch"
+ "glibc-CVE-2015-5180.patch"
+ "glibc-CVE-2017-1000366-pt1.patch"
+ "glibc-CVE-2017-1000366-pt2.patch"
+ "glibc-CVE-2017-1000366-pt3.patch"))))))
(define-public glibc-2.24
(package
@@ -817,7 +874,6 @@ GLIBC/HURD for a Hurd host"
"glibc-o-largefile.patch"
"glibc-vectorized-strcspn-guards.patch"
"glibc-CVE-2015-5180.patch"
- "glibc-CVE-2017-15670-15671.patch"
"glibc-CVE-2017-1000366-pt1.patch"
"glibc-CVE-2017-1000366-pt2.patch"
"glibc-CVE-2017-1000366-pt3.patch"))))))
@@ -841,7 +897,6 @@ GLIBC/HURD for a Hurd host"
"glibc-CVE-2016-3075.patch"
"glibc-CVE-2016-3706.patch"
"glibc-CVE-2016-4429.patch"
- "glibc-CVE-2017-15670-15671.patch"
"glibc-CVE-2017-1000366-pt1.patch"
"glibc-CVE-2017-1000366-pt2.patch"
"glibc-CVE-2017-1000366-pt3.patch"))))))
@@ -864,7 +919,6 @@ GLIBC/HURD for a Hurd host"
"glibc-CVE-2016-3075.patch"
"glibc-CVE-2016-3706.patch"
"glibc-CVE-2016-4429.patch"
- "glibc-CVE-2017-15670-15671.patch"
"glibc-CVE-2017-1000366-pt1.patch"
"glibc-CVE-2017-1000366-pt2.patch"
"glibc-CVE-2017-1000366-pt3.patch"))))
@@ -903,14 +957,16 @@ the 'share/locale' sub-directory of this package.")
(lambda _
(zero? (system* "make" "localedata/install-locales"
"-j" (number->string (parallel-job-count))))))
- (delete 'install)))
+ (delete 'install)
+ (delete 'move-static-libs)))
((#:configure-flags flags)
`(append ,flags
;; Use $(libdir)/locale/X.Y as is the case by default.
(list (string-append "libc_cv_complocaledir="
(assoc-ref %outputs "out")
"/lib/locale/"
- ,(package-version glibc))))))))))
+ ,(version-major+minor
+ (package-version glibc)))))))))))
(define-public glibc-utf8-locales
(package
@@ -928,7 +984,7 @@ the 'share/locale' sub-directory of this package.")
(gzip (assoc-ref %build-inputs "gzip"))
(out (assoc-ref %outputs "out"))
(localedir (string-append out "/lib/locale/"
- ,version)))
+ ,(version-major+minor version))))
;; 'localedef' needs 'gzip'.
(setenv "PATH" (string-append libc "/bin:" gzip "/bin"))
@@ -1025,7 +1081,7 @@ command.")
(define-public tzdata
(package
(name "tzdata")
- (version "2017b")
+ (version "2017c")
(source (origin
(method url-fetch)
(uri (string-append
@@ -1033,7 +1089,7 @@ command.")
version ".tar.gz"))
(sha256
(base32
- "11l0s43vx33dcs78p80122i8s5s9l1sjwkzzwh66njd35r92l97q"))))
+ "02yrrfj0p7ar885ja41ylijzbr8wc6kz6kzlw8c670i9m693ym6n"))))
(build-system gnu-build-system)
(arguments
'(#:tests? #f
@@ -1081,7 +1137,7 @@ command.")
version ".tar.gz"))
(sha256
(base32
- "0h1d567gn8l3iqgyadcswwdy2yh07nhz3lfl8ds8saz2ajxka5sd"))))))
+ "1dvrq0b2hz7cjqdyd7x21wpy4qcng3rvysr61ij0c2g64fyb9s41"))))))
(home-page "https://www.iana.org/time-zones")
(synopsis "Database of current and historical time zones")
(description "The Time Zone Database (often called tz or zoneinfo)
@@ -1091,13 +1147,14 @@ reflect changes made by political bodies to time zone boundaries, UTC offsets,
and daylight-saving rules.")
(license public-domain)))
-;;; A "fixed" version of tzdata, which is used in the test suites of
-;;; glib and R. We can update this whenever we are able to rebuild
-;;; thousands of packages (for example, in a core-updates rebuild).
-(define-public tzdata-2017a
- (package
- (inherit tzdata)
- (version "2017a")
+;;; A "fixed" version of tzdata, which is used in the test suites of glib and R
+;;; and a few other places. We can update this whenever we are able to rebuild
+;;; thousands of packages (for example, in a core-updates rebuild). This package
+;;; will typically be obsolete and should never be referred to by a built
+;;; package.
+(define-public tzdata-for-tests
+ (hidden-package (package (inherit tzdata)
+ (version "2017c")
(source
(origin
(method url-fetch)
@@ -1105,7 +1162,7 @@ and daylight-saving rules.")
"/releases/tzdata" version ".tar.gz"))
(sha256
(base32
- "1mmv4rvcs12lrvgghw4fidczvb69yv69cmzknghcvw1c196mqfnz"))))
+ "02yrrfj0p7ar885ja41ylijzbr8wc6kz6kzlw8c670i9m693ym6n"))))
(inputs `(("tzcode" ,(origin
(method url-fetch)
(uri (string-append
@@ -1113,7 +1170,7 @@ and daylight-saving rules.")
version ".tar.gz"))
(sha256
(base32
- "1b1q7gnlsh5hjgs5065pvajd37rmbc3k9b8cgzad1vcrifswdwh2"))))))))
+ "1dvrq0b2hz7cjqdyd7x21wpy4qcng3rvysr61ij0c2g64fyb9s41")))))))))
(define-public libiconv