diff options
26 files changed, 329 insertions, 212 deletions
diff --git a/gnu-system.am b/gnu-system.am index 8ffc671142..ef4db3c302 100644 --- a/gnu-system.am +++ b/gnu-system.am @@ -450,6 +450,7 @@ dist_patch_DATA = \ gnu/packages/patches/duplicity-test_selection-tmp.patch \ gnu/packages/patches/elfutils-tests-ptrace.patch \ gnu/packages/patches/emacs-exec-path.patch \ + gnu/packages/patches/emacs-source-date-epoch.patch \ gnu/packages/patches/eudev-rules-directory.patch \ gnu/packages/patches/evilwm-lost-focus-bug.patch \ gnu/packages/patches/expat-CVE-2015-1283.patch \ @@ -489,14 +490,12 @@ dist_patch_DATA = \ gnu/packages/patches/glibc-locale-incompatibility.patch \ gnu/packages/patches/glibc-o-largefile.patch \ gnu/packages/patches/glibc-versioned-locpath.patch \ - gnu/packages/patches/gmp-arm-asm-nothumb.patch \ gnu/packages/patches/gmp-faulty-test.patch \ gnu/packages/patches/gnucash-price-quotes-perl.patch \ gnu/packages/patches/gnutls-doc-fix.patch \ gnu/packages/patches/gobject-introspection-absolute-shlib-path.patch \ gnu/packages/patches/gobject-introspection-cc.patch \ gnu/packages/patches/gobject-introspection-girepository.patch \ - gnu/packages/patches/grep-CVE-2015-1345.patch \ gnu/packages/patches/grub-gets-undeclared.patch \ gnu/packages/patches/grub-freetype.patch \ gnu/packages/patches/guile-1.8-cpp-4.5.patch \ @@ -527,6 +526,7 @@ dist_patch_DATA = \ gnu/packages/patches/liba52-link-with-libm.patch \ gnu/packages/patches/liba52-set-soname.patch \ gnu/packages/patches/liba52-use-mtune-not-mcpu.patch \ + gnu/packages/patches/libarchive-bsdtar-test.patch \ gnu/packages/patches/libarchive-CVE-2013-0211.patch \ gnu/packages/patches/libarchive-fix-lzo-test-case.patch \ gnu/packages/patches/libarchive-mtree-filename-length-fix.patch \ @@ -626,7 +626,6 @@ dist_patch_DATA = \ gnu/packages/patches/plotutils-libpng-jmpbuf.patch \ gnu/packages/patches/polkit-drop-test.patch \ gnu/packages/patches/portaudio-audacity-compat.patch \ - gnu/packages/patches/procps-make-3.82.patch \ gnu/packages/patches/pt-scotch-build-parallelism.patch \ gnu/packages/patches/pulseaudio-fix-mult-test.patch \ gnu/packages/patches/pulseaudio-longer-test-timeout.patch \ diff --git a/gnu/packages/backup.scm b/gnu/packages/backup.scm index 40cfc4ee14..aa8ccbce69 100644 --- a/gnu/packages/backup.scm +++ b/gnu/packages/backup.scm @@ -148,7 +148,8 @@ backups (called chunks) to allow easy burning to CD/DVD.") (patches (list (search-patch "libarchive-mtree-filename-length-fix.patch") (search-patch "libarchive-fix-lzo-test-case.patch") - (search-patch "libarchive-CVE-2013-0211.patch"))))) + (search-patch "libarchive-CVE-2013-0211.patch") + (search-patch "libarchive-bsdtar-test.patch"))))) (build-system gnu-build-system) ;; TODO: Add -L/path/to/nettle in libarchive.pc. (inputs diff --git a/gnu/packages/base.scm b/gnu/packages/base.scm index 61eeba3cee..fb3cbb4bc2 100644 --- a/gnu/packages/base.scm +++ b/gnu/packages/base.scm @@ -73,15 +73,14 @@ command-line arguments, multiple languages, and so on.") (define-public grep (package (name "grep") - (version "2.21") + (version "2.22") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/grep/grep-" version ".tar.xz")) (sha256 (base32 - "1pp5n15qwxrw1pibwjhhgsibyv5cafhamf8lwzjygs6y00fa2i2j")) - (patches (list (search-patch "grep-CVE-2015-1345.patch"))))) + "1srn321x7whlhs5ks36zlcrrmj4iahll8fxwsh1vbz3v04px54fa")))) (build-system gnu-build-system) (synopsis "Print lines matching a pattern") (description diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index bdb5a760f7..a2d76b9673 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2012, 2013, 2014, 2015 Ludovic Courtès <ludo@gnu.org> ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> +;;; Copyright © 2015 Leo Famulari <leo@famulari.name> ;;; ;;; This file is part of GNU Guix. ;;; @@ -143,17 +144,18 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." ;; guile-bash expect. (let ((include (string-append (assoc-ref outputs "include") "/include/bash")) + (includes "^\\./include/[^/]+\\.h$") (headers "^\\./(builtins/|lib/glob/|lib/tilde/|)[^/]+\\.h$")) (mkdir-p include) (for-each (lambda (file) - (when ((@ (ice-9 regex) string-match) headers file) - (let ((directory (string-append include "/" - (dirname file)))) - (mkdir-p directory) - (copy-file file - (string-append directory "/" - (basename file)))))) + (when (string-match includes file) + (install-file file include)) + (when (string-match headers file) + (install-file file + (string-append include "/" + (dirname file))))) (find-files "." "\\.h$")) + (delete-file (string-append include "/" "y.tab.h")) #t))) (version "4.3")) (package @@ -199,6 +201,10 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." ;; for now. #:tests? #f + #:modules ((ice-9 regex) + (guix build utils) + (guix build gnu-build-system)) + #:phases (modify-phases %standard-phases (add-after 'install 'post-install ,post-install-phase) (add-after 'install 'install-headers diff --git a/gnu/packages/commencement.scm b/gnu/packages/commencement.scm index 73b0ce4364..1b0497227f 100644 --- a/gnu/packages/commencement.scm +++ b/gnu/packages/commencement.scm @@ -204,7 +204,8 @@ "--disable-libssp" "--disable-libquadmath" "--disable-decimal-float") - (remove (cut string-match "--enable-languages.*" <>) + (remove (cut string-match + "--(with-system-zlib|enable-languages.*)" <>) ,flags))) ((#:phases phases) `(alist-cons-after @@ -526,7 +527,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (arguments `(#:guile ,%bootstrap-guile #:implicit-inputs? #f - + #:allowed-references ("out") #:out-of-source? #t #:phases (alist-cons-before 'configure 'chdir @@ -548,6 +549,25 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (propagated-inputs '()) (synopsis "GNU C++ standard library (intermediate)")))) +(define zlib-final + ;; Zlib used by GCC-FINAL. + (package-with-bootstrap-guile + (package + (inherit zlib) + (arguments + `(#:guile ,%bootstrap-guile + #:implicit-inputs? #f + #:allowed-references ("out" ,glibc-final) + ,@(package-arguments zlib))) + (inputs %boot2-inputs)))) + +(define ld-wrapper-boot3 + ;; A linker wrapper that uses the bootstrap Guile. + (make-ld-wrapper "ld-wrapper-boot3" + #:binutils binutils-final + #:guile %bootstrap-guile + #:bash (car (assoc-ref %boot2-inputs "bash")))) + (define gcc-final ;; The final GCC. (package (inherit gcc-boot0) @@ -562,7 +582,7 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" `(#:guile ,%bootstrap-guile #:implicit-inputs? #f - #:allowed-references ("out" "lib" + #:allowed-references ("out" "lib" ,zlib-final ,glibc-final ,static-bash-for-glibc) ;; Things like libasan.so and libstdc++.so NEED ld.so for some @@ -582,18 +602,16 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" ((_ rest ...) (loop rest))))) ((#:make-flags flags) - ;; Since $LIBRARY_PATH and $CPATH are not honored, add the - ;; relevant flags. - `(cons (string-append "CPPFLAGS=-I" - (assoc-ref %build-inputs "libstdc++") - "/include") - (map (lambda (flag) - (if (string-prefix? "LDFLAGS=" flag) - (string-append flag " -L" - (assoc-ref %build-inputs "libstdc++") - "/lib") - flag)) - ,flags))) + ;; Since $LIBRARY_PATH is not honored, add the relevant flags. + `(let ((zlib (assoc-ref %build-inputs "zlib"))) + (map (lambda (flag) + (if (string-prefix? "LDFLAGS=" flag) + (string-append flag " -L" + (assoc-ref %build-inputs "libstdc++") + "/lib -L" zlib "/lib -Wl,-rpath=" + zlib "/lib") + flag)) + ,flags))) ((#:phases phases) `(alist-delete 'symlink-libgcc_eh ,phases))))) @@ -608,17 +626,12 @@ exec ~a/bin/~a-~a -B~a/lib -Wl,-dynamic-linker -Wl,~a/~a \"$@\"~%" (inputs `(("gmp-source" ,(bootstrap-origin (package-source gmp))) ("mpfr-source" ,(package-source mpfr)) ("mpc-source" ,(package-source mpc)) + ("ld-wrapper" ,ld-wrapper-boot3) ("binutils" ,binutils-final) ("libstdc++" ,libstdc++) + ("zlib" ,zlib-final) ,@%boot2-inputs)))) -(define ld-wrapper-boot3 - ;; A linker wrapper that uses the bootstrap Guile. - (make-ld-wrapper "ld-wrapper-boot3" - #:binutils binutils-final - #:guile %bootstrap-guile - #:bash (car (assoc-ref %boot2-inputs "bash")))) - (define %boot3-inputs ;; 4th stage inputs. `(("gcc" ,gcc-final) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index fd3a9ce98e..41d9b0d8d7 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -260,7 +260,7 @@ compressed with pbzip2 can be decompressed with bzip2).") (define-public xz (package (name "xz") - (version "5.0.4") + (version "5.2.2") (source (origin (method url-fetch) (uri (list (string-append "http://tukaani.org/xz/xz-" version @@ -269,7 +269,7 @@ compressed with pbzip2 can be decompressed with bzip2).") version ".tar.gz"))) (sha256 (base32 - "1dl35ca8fdss9z2d6y234gxh24ixq904xksizrjmjr5dimwhax6n")))) + "18h2k4jndhzjs8ln3a54qdnfv59y6spxiwh9gpaqniph6iflvpvk")))) (build-system gnu-build-system) (synopsis "General-purpose data compression") (description diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 1eccad59fc..f45e3a5f1b 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2014, 2015 Mark H Weaver <mhw@netris.org> ;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Sou Bunnbu <iyzsong@gmail.com> +;;; Copyright © 2015 Leo Famulari <leo@famulari.name> ;;; ;;; This file is part of GNU Guix. ;;; @@ -24,6 +25,7 @@ (define-module (gnu packages databases) #:use-module (gnu packages) + #:use-module (gnu packages bash) #:use-module (gnu packages perl) #:use-module (gnu packages language) #:use-module (gnu packages linux) @@ -308,16 +310,18 @@ pictures, sounds, or video.") ;; Running tests in parallel leads to test failures and crashes in ;; torture/utils. - (arguments '(#:parallel-tests? #f)) + (arguments '(#:parallel-tests? #f + #:configure-flags + (list (string-append "--with-bash-headers=" + (assoc-ref %build-inputs "bash:include") + "/include/bash")))) (native-inputs `(("emacs" ,emacs-no-x) ("bc" ,bc) + ("bash:include" ,bash "include") ("libuuid", util-linux))) ;; TODO: Add more optional inputs. - ;; FIXME: Our Bash doesn't have development headers (need for the 'readrec' - ;; built-in command), but it's not clear how to get them installed. - ;; See <https://lists.gnu.org/archive/html/bug-bash/2014-03/msg00125.html>. (inputs `(("curl" ,curl) ("libgcrypt" ,libgcrypt) ("check" ,check))) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index 7d95f55327..947c7e282c 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -70,7 +70,8 @@ (sha256 (base32 "0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx")) - (patches (list (search-patch "emacs-exec-path.patch"))))) + (patches (list (search-patch "emacs-exec-path.patch") + (search-patch "emacs-source-date-epoch.patch"))))) (build-system glib-or-gtk-build-system) (arguments '(#:phases (alist-cons-before diff --git a/gnu/packages/file.scm b/gnu/packages/file.scm index 161df544de..90e9a70626 100644 --- a/gnu/packages/file.scm +++ b/gnu/packages/file.scm @@ -27,14 +27,14 @@ (define-public file (package (name "file") - (version "5.22") + (version "5.25") (source (origin (method url-fetch) (uri (string-append "ftp://ftp.astron.com/pub/file/file-" version ".tar.gz")) (sha256 (base32 - "02zw14hw3gqlw91w2f2snbirvyrp7r83irvnnkjcb25q9kjaiqy4")))) + "1jhfi5mivdnqvry5la5q919l503ahwdwbf3hjhiv97znccakhd9p")))) (build-system gnu-build-system) ;; When cross-compiling, this package depends upon a native install of diff --git a/gnu/packages/gcc.scm b/gnu/packages/gcc.scm index 8465859c24..178ea20420 100644 --- a/gnu/packages/gcc.scm +++ b/gnu/packages/gcc.scm @@ -98,6 +98,7 @@ where the OS part is overloaded to denote a specific ABI---into GCC '("--enable-plugin" "--enable-languages=c,c++" "--disable-multilib" + "--with-system-zlib" ;; No pre-compiled libstdc++ headers, to save space. "--disable-libstdcxx-pch" diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 146d3f563b..c5eea22845 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -251,10 +251,10 @@ dynamic loading, and an object system.") ("cairo" ,cairo) ("flex" ,flex) ("glib" ,glib) - ("pkg-config" ,pkg-config) ("python-2" ,python-2))) (native-inputs - `(("glib" ,glib "bin"))) + `(("glib" ,glib "bin") + ("pkg-config" ,pkg-config))) (propagated-inputs `(;; In practice, GIR users will need libffi when using ;; gobject-introspection. diff --git a/gnu/packages/haskell.scm b/gnu/packages/haskell.scm index 277bdebed0..c0e968ba38 100644 --- a/gnu/packages/haskell.scm +++ b/gnu/packages/haskell.scm @@ -246,6 +246,12 @@ (string-append ghc-bootstrap-path "/ghc-7.8.4") (zero? (system* "make" "install")))) %standard-phases))))))) + (native-search-paths (list (search-path-specification + (variable "GHC_PACKAGE_PATH") + (files (list + (string-append "lib/ghc-" version))) + (file-pattern ".*\\.conf\\.d$") + (file-type 'directory)))) (home-page "https://www.haskell.org/ghc") (synopsis "The Glasgow Haskell Compiler") (description diff --git a/gnu/packages/ld-wrapper.in b/gnu/packages/ld-wrapper.in index c3d6fa1005..c92ed1dcc7 100644 --- a/gnu/packages/ld-wrapper.in +++ b/gnu/packages/ld-wrapper.in @@ -137,52 +137,61 @@ exec @GUILE@ -c "(load-compiled \"@SELF@.go\") (apply $main (cdr (command-line)) (string-every (char-set-union (char-set #\.) char-set:digit) (string-drop file (+ index 3))))))) -(define (library-files-linked args) - ;; Return the file names of shared libraries explicitly linked against via - ;; `-l' or with an absolute file name in ARGS. - (define path+files+args +(define (library-search-path args) + ;; Return the library search path as a list of directory names. The GNU ld + ;; manual notes that "[a]ll `-L' options apply to all `-l' options, + ;; regardless of the order in which the options appear", so we must compute + ;; the search path independently of the -l options. + (let loop ((args args) + (path '())) + (match args + (() + (reverse path)) + (("-L" directory . rest) + (loop rest (cons directory path))) + ((argument . rest) + (if (string-prefix? "-L" argument) ;augment the search path + (loop rest + (cons (string-drop argument 2) path)) + (loop rest path)))))) + +(define (library-files-linked args library-path) + ;; Return the absolute file names of shared libraries explicitly linked + ;; against via `-l' or with an absolute file name in ARGS, looking them up + ;; in LIBRARY-PATH. + (define files+args (fold (lambda (argument result) (match result - ((library-path library-files - ((and flag - (or "-dynamic-linker" "-plugin")) - . rest)) + ((library-files ((and flag + (or "-dynamic-linker" "-plugin")) + . rest)) ;; When passed '-dynamic-linker ld.so', ignore 'ld.so'; when ;; passed '-plugin liblto_plugin.so', ignore ;; 'liblto_plugin.so'. See <http://bugs.gnu.org/20102>. - (list library-path - library-files + (list library-files (cons* argument flag rest))) - ((library-path library-files previous-args) - (cond ((string-prefix? "-L" argument) ;augment the search path - (list (append library-path - (list (string-drop argument 2))) - library-files - (cons argument previous-args))) - ((string-prefix? "-l" argument) ;add library + ((library-files previous-args) + (cond ((string-prefix? "-l" argument) ;add library (let* ((lib (string-append "lib" (string-drop argument 2) ".so")) (full (search-path library-path lib))) - (list library-path - (if full + (list (if full (cons full library-files) library-files) (cons argument previous-args)))) ((and (string-prefix? %store-directory argument) (shared-library? argument)) ;add library - (list library-path - (cons argument library-files) + (list (cons argument library-files) (cons argument previous-args))) (else - (list library-path - library-files + (list library-files (cons argument previous-args))))))) - (list '() '() '()) + (list '() '()) args)) - (match path+files+args - ((path files arguments) + (match files+args + ((files arguments) (reverse files)))) (define (rpath-arguments library-files) @@ -211,10 +220,13 @@ impure library ~s~%" (define (ld-wrapper . args) ;; Invoke the real `ld' with ARGS, augmented with `-rpath' switches. - (let* ((libs (library-files-linked args)) + (let* ((path (library-search-path args)) + (libs (library-files-linked args path)) (args (append args (rpath-arguments libs)))) (when %debug? (format (current-error-port) + "ld-wrapper: library search path: ~s~%" path) + (format (current-error-port) "ld-wrapper: libraries linked: ~s~%" libs) (format (current-error-port) "ld-wrapper: invoking `~a' with ~s~%" diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 503f9c3368..08533742ff 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -462,62 +462,34 @@ block devices, UUIDs, TTYs, and many other tools.") (define-public procps (package (name "procps") - (version "3.2.8") + (version "3.3.11") (source (origin - (method url-fetch) - ;; A mirror://sourceforge URI doesn't work, presumably becuase - ;; the SourceForge project is misconfigured. - (uri (string-append "http://procps.sourceforge.net/procps-" - version ".tar.gz")) - (sha256 - (base32 - "0d8mki0q4yamnkk4533kx8mc0jd879573srxhg6r2fs3lkc6iv8i")) - (patches (list (search-patch "procps-make-3.82.patch"))))) + (method url-fetch) + (uri (string-append "mirror://sourceforge/procps-ng/Production/" + "procps-ng-" version ".tar.xz")) + (sha256 + (base32 + "1va4n0mpsq327ca9dqp4hnrpgs6821rp0f2m0jyc1bfjl9lk2jg9")))) (build-system gnu-build-system) - (inputs `(("ncurses" ,ncurses))) (arguments '(#:modules ((guix build utils) (guix build gnu-build-system) (srfi srfi-1) (srfi srfi-26)) - #:phases (alist-replace - 'configure - (lambda* (#:key outputs #:allow-other-keys) - ;; No `configure', just a single Makefile. - (let ((out (assoc-ref outputs "out"))) - (substitute* "Makefile" - (("/usr/") "/") - (("--(owner|group) 0") "") - (("ldconfig") "true") - (("^LDFLAGS[[:blank:]]*:=(.*)$" _ value) - ;; Add libproc to the RPATH. - (string-append "LDFLAGS := -Wl,-rpath=" - out "/lib" value)))) - (setenv "CC" "gcc")) - (alist-replace - 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((out (assoc-ref outputs "out"))) - (and (zero? - (system* "make" "install" - (string-append "DESTDIR=" out))) - - ;; Remove commands and man pages redundant with - ;; Coreutils. - (let ((dup (append-map (cut find-files out <>) - '("^kill" "^uptime")))) - (for-each delete-file dup) - #t) - - ;; Sanity check. - (zero? - (system* (string-append out "/bin/ps") - "--version"))))) - %standard-phases)) - - ;; What did you expect? Tests? - #:tests? #f)) - (home-page "http://procps.sourceforge.net/") + #:phases + (modify-phases %standard-phases + (add-after + 'install 'post-install + ;; Remove commands and man pages redudant with + ;; Coreutils. + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (dup (append-map (cut find-files out <>) + '("^kill" "^uptime")))) + (for-each delete-file dup) + #t)))))) + (inputs `(("ncurses" ,ncurses))) + (home-page "https://gitlab.com/procps-ng/procps/") (synopsis "Utilities that give information about processes") (description "Procps is the package that has a bunch of small useful utilities diff --git a/gnu/packages/multiprecision.scm b/gnu/packages/multiprecision.scm index ee74c03700..008d8c074f 100644 --- a/gnu/packages/multiprecision.scm +++ b/gnu/packages/multiprecision.scm @@ -30,7 +30,7 @@ (define-public gmp (package (name "gmp") - (version "6.0.0a") + (version "6.1.0") (source (origin (method url-fetch) (uri @@ -38,10 +38,9 @@ version ".tar.xz")) (sha256 (base32 - "0r5pp27cy7ch3dg5v0rsny8bib1zfvrza6027g2mp5f6v8pd6mli")) + "12b9s4jn48gbar6dbs5qrlmljdmnq43xy3ji9yjzic0mwp6dmnk8")) (patches (map search-patch - '("gmp-arm-asm-nothumb.patch" - "gmp-faulty-test.patch"))))) + '("gmp-faulty-test.patch"))))) (build-system gnu-build-system) (native-inputs `(("m4" ,m4))) (outputs '("out" "debug")) diff --git a/gnu/packages/patches/emacs-source-date-epoch.patch b/gnu/packages/patches/emacs-source-date-epoch.patch new file mode 100644 index 0000000000..41c03ef514 --- /dev/null +++ b/gnu/packages/patches/emacs-source-date-epoch.patch @@ -0,0 +1,20 @@ +Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated +"autoloads" files. + +--- a/lisp/emacs-lisp/autoload.el ++++ b/lisp/emacs-lisp/autoload.el +@@ -378,8 +378,12 @@ + "Insert the section-header line, + which lists the file name and which functions are in it, etc." + (insert generate-autoload-section-header) +- (prin1 `(autoloads ,autoloads ,load-name ,file ,time) +- outbuf) ++ (let* ((env (getenv "SOURCE_DATE_EPOCH")) ++ (time (if env ++ (seconds-to-time (string-to-number env)) ++ time))) ++ (prin1 `(autoloads ,autoloads ,load-name ,file ,time) ++ outbuf)) + (terpri outbuf) + ;; Break that line at spaces, to avoid very long lines. + ;; Make each sub-line into a comment. diff --git a/gnu/packages/patches/gmp-arm-asm-nothumb.patch b/gnu/packages/patches/gmp-arm-asm-nothumb.patch deleted file mode 100644 index 666cf58cf6..0000000000 --- a/gnu/packages/patches/gmp-arm-asm-nothumb.patch +++ /dev/null @@ -1,21 +0,0 @@ - -# HG changeset patch -# User Torbjorn Granlund <tege@gmplib.org> -# Date 1396602422 -7200 -# Node ID 676e2d0f0e4dd301a7066079d2c9326c25c34a40 -# Parent 0194a75b56b21a9196626430af86c5bd9110c42d -Conditionalise ARM asm on !__thumb__. - -diff -r 0194a75b56b2 -r 676e2d0f0e4d mpn/generic/div_qr_1n_pi1.c ---- a/mpn/generic/div_qr_1n_pi1.c Thu Apr 03 23:58:51 2014 +0200 -+++ b/mpn/generic/div_qr_1n_pi1.c Fri Apr 04 11:07:02 2014 +0200 -@@ -130,7 +130,7 @@ - "%2" ((UDItype)(a0)), "r" ((UDItype)(b0)) __CLOBBER_CC) - #endif - --#if defined (__arm__) && W_TYPE_SIZE == 32 -+#if defined (__arm__) && !defined (__thumb__) && W_TYPE_SIZE == 32 - #define add_mssaaaa(m, sh, sl, ah, al, bh, bl) \ - __asm__ ( "adds %2, %5, %6\n\t" \ - "adcs %1, %3, %4\n\t" \ - diff --git a/gnu/packages/patches/grep-CVE-2015-1345.patch b/gnu/packages/patches/grep-CVE-2015-1345.patch deleted file mode 100644 index b0d0c8e5dc..0000000000 --- a/gnu/packages/patches/grep-CVE-2015-1345.patch +++ /dev/null @@ -1,17 +0,0 @@ -Fix CVE-2015-1345. From upstream commit -83a95bd8c8561875b948cadd417c653dbe7ef2e2 -by Yuliy Pisetsky <ypisetsky@fb.com>. - -diff --git a/src/kwset.c b/src/kwset.c -index 4003c8d..376f7c3 100644 ---- a/src/kwset.c -+++ b/src/kwset.c -@@ -643,6 +643,8 @@ bmexec_trans (kwset_t kwset, char const *text, size_t size) - if (! tp) - return -1; - tp++; -+ if (ep <= tp) -+ break; - } - } - } diff --git a/gnu/packages/patches/libarchive-bsdtar-test.patch b/gnu/packages/patches/libarchive-bsdtar-test.patch new file mode 100644 index 0000000000..6a533a9a07 --- /dev/null +++ b/gnu/packages/patches/libarchive-bsdtar-test.patch @@ -0,0 +1,74 @@ +commit b539b2e597b566fe3c4b49cb61c9eef83e5e052d +Author: Pavel Raiskup <praiskup@redhat.com> +Date: Thu Jun 27 16:01:30 2013 +0200 + + Use ustar format in the test_option_b test + + .. because the ustar archive does not store SELinux context. As the default + format for bsdtar is "restricted pax" (trying to store xattrs and other + things by default), the test failed on Fedora because our files have by + default SELinux context set. This results in additional data in tested + archive ~> and the test failed because the archive was unexpectedly big: + + tar/test/test_option_b.c:41: File archive1.tar has size 3072, expected 2048 + + Reviewed by Konrad Kleine <konrad.wilhelm.kleine@gmail.com> + +diff --git a/tar/test/test_option_b.c b/tar/test/test_option_b.c +index be2ae65..6fea474 100644 +--- a/tar/test/test_option_b.c ++++ b/tar/test/test_option_b.c +@@ -25,8 +25,14 @@ + #include "test.h" + __FBSDID("$FreeBSD$"); + ++#define USTAR_OPT " --format=ustar" ++ + DEFINE_TEST(test_option_b) + { ++ char *testprog_ustar = malloc(strlen(testprog) + sizeof(USTAR_OPT) + 1); ++ strcpy(testprog_ustar, testprog); ++ strcat(testprog_ustar, USTAR_OPT); ++ + assertMakeFile("file1", 0644, "file1"); + if (systemf("cat file1 > test_cat.out 2> test_cat.err") != 0) { + skipping("Platform doesn't have cat"); +@@ -36,7 +42,7 @@ DEFINE_TEST(test_option_b) + /* + * Bsdtar does not pad if the output is going directly to a disk file. + */ +- assertEqualInt(0, systemf("%s -cf archive1.tar file1 >test1.out 2>test1.err", testprog)); ++ assertEqualInt(0, systemf("%s -cf archive1.tar file1 >test1.out 2>test1.err", testprog_ustar)); + failure("bsdtar does not pad archives written directly to regular files"); + assertFileSize("archive1.tar", 2048); + assertEmptyFile("test1.out"); +@@ -46,24 +52,24 @@ DEFINE_TEST(test_option_b) + * Bsdtar does pad to the block size if the output is going to a socket. + */ + /* Default is -b 20 */ +- assertEqualInt(0, systemf("%s -cf - file1 2>test2.err | cat >archive2.tar ", testprog)); ++ assertEqualInt(0, systemf("%s -cf - file1 2>test2.err | cat >archive2.tar ", testprog_ustar)); + failure("bsdtar does pad archives written to pipes"); + assertFileSize("archive2.tar", 10240); + assertEmptyFile("test2.err"); + +- assertEqualInt(0, systemf("%s -cf - -b 20 file1 2>test3.err | cat >archive3.tar ", testprog)); ++ assertEqualInt(0, systemf("%s -cf - -b 20 file1 2>test3.err | cat >archive3.tar ", testprog_ustar)); + assertFileSize("archive3.tar", 10240); + assertEmptyFile("test3.err"); + +- assertEqualInt(0, systemf("%s -cf - -b 10 file1 2>test4.err | cat >archive4.tar ", testprog)); ++ assertEqualInt(0, systemf("%s -cf - -b 10 file1 2>test4.err | cat >archive4.tar ", testprog_ustar)); + assertFileSize("archive4.tar", 5120); + assertEmptyFile("test4.err"); + +- assertEqualInt(0, systemf("%s -cf - -b 1 file1 2>test5.err | cat >archive5.tar ", testprog)); ++ assertEqualInt(0, systemf("%s -cf - -b 1 file1 2>test5.err | cat >archive5.tar ", testprog_ustar)); + assertFileSize("archive5.tar", 2048); + assertEmptyFile("test5.err"); + +- assertEqualInt(0, systemf("%s -cf - -b 8192 file1 2>test6.err | cat >archive6.tar ", testprog)); ++ assertEqualInt(0, systemf("%s -cf - -b 8192 file1 2>test6.err | cat >archive6.tar ", testprog_ustar)); + assertFileSize("archive6.tar", 4194304); + assertEmptyFile("test6.err"); + diff --git a/gnu/packages/patches/procps-make-3.82.patch b/gnu/packages/patches/procps-make-3.82.patch deleted file mode 100644 index 7bf53e2ccc..0000000000 --- a/gnu/packages/patches/procps-make-3.82.patch +++ /dev/null @@ -1,14 +0,0 @@ -Fix compilation with GNU Make 3.82 (patch from Nixpkgs). - -diff --git a/Makefile b/Makefile -index 09fb3ed..59eba16 100644 ---- a/Makefile -+++ b/Makefile -@@ -174,7 +174,7 @@ INSTALL := $(BINFILES) $(MANFILES) - # want this rule first, use := on ALL, and ALL not filled in yet - all: do_all - ---include */module.mk -+-include proc/module.mk ps/module.mk - - do_all: $(ALL) diff --git a/gnu/packages/pulseaudio.scm b/gnu/packages/pulseaudio.scm index d5e8aba272..fe976a92f4 100644 --- a/gnu/packages/pulseaudio.scm +++ b/gnu/packages/pulseaudio.scm @@ -58,8 +58,9 @@ (inputs `(("libvorbis" ,libvorbis) ("libogg" ,libogg) - ("flac" ,flac) - ("pkg-config" ,pkg-config))) + ("flac" ,flac))) + (native-inputs + `(("pkg-config" ,pkg-config))) (home-page "http://www.mega-nerd.com/libsndfile/") (synopsis "Reading and writing files containing sampled sound") (description @@ -87,7 +88,8 @@ for reading and writing new sound file formats.") (base32 "01hw5xjbjavh412y63brcslj5hi9wdgkjd3h9csx5rnm8vglpdck")))) (build-system gnu-build-system) - (inputs `(("pkg-config" ,pkg-config))) + (native-inputs + `(("pkg-config" ,pkg-config))) (propagated-inputs `(("libsndfile" ,libsndfile) ("fftw" ,fftw))) @@ -162,13 +164,14 @@ rates.") ("dbus" ,dbus) ("glib" ,glib) ("intltool" ,intltool) - ("pkg-config" ,pkg-config) ("m4" ,m4) ("libltdl" ,libltdl) ("fftwf" ,fftwf) ("avahi" ,avahi) ("eudev" ,eudev) ;for the detection of hardware audio devices ("check" ,check))) + (native-inputs + `(("pkg-config" ,pkg-config))) (propagated-inputs ;; 'libpulse*.la' contain `-lgdbm' and `-lcap', so propagate them. `(("libcap" ,libcap) diff --git a/gnu/packages/texinfo.scm b/gnu/packages/texinfo.scm index 591fb1f298..cc53293221 100644 --- a/gnu/packages/texinfo.scm +++ b/gnu/packages/texinfo.scm @@ -43,7 +43,6 @@ (build-system gnu-build-system) (native-inputs `(("procps" ,procps))) ;one of the tests needs pgrep (inputs `(("ncurses" ,ncurses) - ("xz" ,xz) ("perl" ,perl))) (native-search-paths diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm index ff7646b22c..92e15d131e 100644 --- a/guix/build/gnu-build-system.scm +++ b/guix/build/gnu-build-system.scm @@ -576,6 +576,9 @@ in order. Return #t if all the PHASES succeeded, #f otherwise." ;; Encoding/decoding errors shouldn't be silent. (fluid-set! %default-port-conversion-strategy 'error) + ;; Avoid non-determinism related to generated timestamps. + (setenv "SOURCE_DATE_EPOCH" "1") + ;; The trick is to #:allow-other-keys everywhere, so that each procedure in ;; PHASES can pick the keyword arguments it's interested in. (every (match-lambda diff --git a/guix/build/haskell-build-system.scm b/guix/build/haskell-build-system.scm index 4506e96af9..8e2aee381d 100644 --- a/guix/build/haskell-build-system.scm +++ b/guix/build/haskell-build-system.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Federico Beffa <beffa@fbengineering.ch> +;;; Copyright © 2015 Eric Bavier <bavier@member.fsf.org> ;;; Copyright © 2015 Paul van der Walt <paul@denknerd.org> ;;; ;;; This file is part of GNU Guix. @@ -25,6 +26,7 @@ #:use-module (ice-9 rdelim) #:use-module (ice-9 regex) #:use-module (ice-9 match) + #:use-module (ice-9 vlist) #:export (%standard-phases haskell-build)) @@ -78,6 +80,7 @@ and parameters ~s~%" (((_ . dir) ...) dir) (_ '()))) + (ghc-path (getenv "GHC_PACKAGE_PATH")) (params (append `(,(string-append "--prefix=" out)) `(,(string-append "--libdir=" (or lib out) "/lib")) `(,(string-append "--bindir=" (or bin out) "/bin")) @@ -97,6 +100,10 @@ and parameters ~s~%" '("--enable-tests") '()) configure-flags))) + ;; Cabal errors if GHC_PACKAGE_PATH is set during 'configure', so unset + ;; and restore it. + (unsetenv "GHC_PACKAGE_PATH") + ;; For packages where the Cabal build-type is set to "Configure", ;; ./configure will be executed. In these cases, the following ;; environment variable is needed to be able to find the shell executable. @@ -105,7 +112,9 @@ and parameters ~s~%" ;; <https://www.haskell.org/cabal/users-guide/developing-packages.html>. (when (file-exists? "configure") (setenv "CONFIG_SHELL" "sh")) - (run-setuphs "configure" params))) + (run-setuphs "configure" params) + + (setenv "GHC_PACKAGE_PATH" ghc-path))) (define* (build #:rest empty) "Build a given Haskell package." @@ -143,6 +152,12 @@ first match and return the content of the group." (format #t "Compiler ~a not supported~%" name-version))))) +;;; TODO: Move this to (guix build utils)? +(define-syntax-rule (with-null-error-port exp) + "Evaluate EXP with the error port pointing to the bit bucket." + (with-error-to-port (%make-void-port "w") + (lambda () exp))) + (define (make-ghc-package-database system inputs outputs) "Generate the GHC package database." (let* ((haskell (assoc-ref inputs "haskell")) @@ -150,44 +165,89 @@ first match and return the content of the group." (((_ . dir) ...) dir) (_ '()))) - (conf-dirs (search-path-as-list - `(,(string-append "lib/" - (package-name-version haskell) - "/package.conf.d")) - input-dirs)) + ;; Silence 'find-files' (see 'evaluate-search-paths') + (conf-dirs (with-null-error-port + (search-path-as-list + `(,(string-append "lib/" (package-name-version haskell))) + input-dirs #:pattern ".*\\.conf.d$"))) (conf-files (append-map (cut find-files <> "\\.conf$") conf-dirs))) (mkdir-p %tmp-db-dir) (for-each (lambda (file) - (copy-file file - (string-append %tmp-db-dir "/" (basename file)))) + (let ((dest (string-append %tmp-db-dir "/" (basename file)))) + (unless (file-exists? dest) + (copy-file file dest)))) conf-files) (zero? (system* "ghc-pkg" (string-append "--package-db=" %tmp-db-dir) "recache")))) (define* (register #:key name system inputs outputs #:allow-other-keys) - "Generate the compiler registration file for a given Haskell package. Don't -generate the cache as it would clash in user profiles." + "Generate the compiler registration and binary package database files for a +given Haskell package." + + (define (conf-depends conf-file) + ;; Return a list of pkg-ids from the "depends" field in CONF-FILE + (let ((port (open-input-file conf-file)) + (field-rx (make-regexp "^(.*):"))) + (let loop ((collecting #f) + (deps '())) + (let* ((line (read-line port)) + (field (and=> (regexp-exec field-rx line) + (cut match:substring <> 1)))) + (cond + ((and=> field (cut string=? <> "depends")) + ;; The first dependency is listed on the same line as "depends:", + ;; so drop those characters. A line may list more than one .conf. + (let ((d (string-tokenize (string-drop line 8)))) + (loop #t (append d deps)))) + ((and collecting field) + (begin + (close-port port) + (reverse! deps))) + (collecting + (loop #t (append (string-tokenize line) deps))) + (else (loop #f deps))))))) + + (define (install-transitive-deps conf-file src dest) + ;; Copy .conf files from SRC to DEST for dependencies in CONF-FILE, and + ;; their dependencies, etc. + (let loop ((seen vlist-null) + (lst (conf-depends conf-file))) + (match lst + (() #t) ;done + ((id . tail) + (if (not (vhash-assoc id seen)) + (let ((dep-conf (string-append src "/" id ".conf")) + (dep-conf* (string-append dest "/" id ".conf"))) + (copy-file dep-conf dep-conf*) ;XXX: maybe symlink instead? + (loop (vhash-cons id #t seen) + (append lst (conf-depends dep-conf)))) + (loop seen tail)))))) + (let* ((out (assoc-ref outputs "out")) (haskell (assoc-ref inputs "haskell")) (lib (string-append out "/lib")) (config-dir (string-append lib "/" (package-name-version haskell) - "/package.conf.d")) + "/" name ".conf.d")) (id-rx (make-regexp "^id: *(.*)$")) (config-file (string-append out "/" name ".conf")) (params (list (string-append "--gen-pkg-config=" config-file)))) (run-setuphs "register" params) ;; The conf file is created only when there is a library to register. - (when (file-exists? config-file) - (mkdir-p config-dir) - (let ((config-file-name+id - (call-with-ascii-input-file config-file (cut grep id-rx <>)))) - (rename-file config-file - (string-append config-dir "/" config-file-name+id - ".conf")))) - #t)) + (or (not (file-exists? config-file)) + (begin + (mkdir-p config-dir) + (let* ((config-file-name+id + (call-with-ascii-input-file config-file (cut grep id-rx <>)))) + (install-transitive-deps config-file %tmp-db-dir config-dir) + (rename-file config-file + (string-append config-dir "/" + config-file-name+id ".conf")) + (zero? (system* "ghc-pkg" + (string-append "--package-db=" config-dir) + "recache"))))))) (define* (check #:key tests? test-target #:allow-other-keys) "Run the test suite of a given Haskell package." diff --git a/guix/build/utils.scm b/guix/build/utils.scm index e3f9edc5b5..2988193fce 100644 --- a/guix/build/utils.scm +++ b/guix/build/utils.scm @@ -385,10 +385,13 @@ for under the directories designated by FILES. For example: (append-map (lambda (input) (append-map (lambda (file) (let ((file (string-append input "/" file))) - ;; XXX: By using 'find-files', we implicitly - ;; assume #:type 'regular. (if pattern - (find-files file pattern) + (find-files file (lambda (file stat) + (and stat + (eq? type (stat:type stat)) + ((file-name-predicate pattern) file stat))) + #:stat stat + #:directories? #t) (let ((stat (stat file #f))) (if (and stat (eq? type (stat:type stat))) (list file) diff --git a/guix/search-paths.scm b/guix/search-paths.scm index 7fd15d440c..7a6fe67959 100644 --- a/guix/search-paths.scm +++ b/guix/search-paths.scm @@ -139,12 +139,6 @@ report only settings not already effective." (let* ((values (or (and=> (getenv variable) (cut string-tokenize* <> separator)) '())) - ;; Add a trailing slash to force symlinks to be treated as - ;; directories when 'find-files' traverses them. - (files (if pattern - (map (cut string-append <> "/") files) - files)) - ;; XXX: Silence 'find-files' when it stumbles upon non-existent ;; directories (see ;; <http://lists.gnu.org/archive/html/guix-devel/2015-01/msg00269.html>.) |