From feeeee241868e39d102f074805b38d6621435f25 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 2 Feb 2017 16:46:16 +0100 Subject: [PATCH 001/135] gnu: gst-plugins-base: Fix build on 32bit. * gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/gstreamer.scm (gst-plugins-base)[source]: Use it. --- gnu/local.mk | 1 + gnu/packages/gstreamer.scm | 4 ++- .../gst-plugins-base-fix-test-on-32bit.patch | 32 +++++++++++++++++++ 3 files changed, 36 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch diff --git a/gnu/local.mk b/gnu/local.mk index 7377e5122f..d405fce182 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -602,6 +602,7 @@ dist_patch_DATA = \ %D%/packages/patches/grub-gets-undeclared.patch \ %D%/packages/patches/grub-freetype.patch \ %D%/packages/patches/gsl-test-i686.patch \ + %D%/packages/patches/gst-plugins-base-fix-test-on-32bit.patch \ %D%/packages/patches/guile-1.8-cpp-4.5.patch \ %D%/packages/patches/guile-arm-fixes.patch \ %D%/packages/patches/guile-default-utf8.patch \ diff --git a/gnu/packages/gstreamer.scm b/gnu/packages/gstreamer.scm index 840892d2ed..e3e009300f 100644 --- a/gnu/packages/gstreamer.scm +++ b/gnu/packages/gstreamer.scm @@ -154,7 +154,9 @@ This package provides the core library and elements.") name "-" version ".tar.xz")) (sha256 (base32 - "040pifl4cgsqqz2si4s1y5khj3zwm39w21siagxwp805swbrcag6")))) + "040pifl4cgsqqz2si4s1y5khj3zwm39w21siagxwp805swbrcag6")) + (patches + (search-patches "gst-plugins-base-fix-test-on-32bit.patch")))) (build-system gnu-build-system) (outputs '("out" "doc")) (propagated-inputs diff --git a/gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch b/gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch new file mode 100644 index 0000000000..4c6c7ed06e --- /dev/null +++ b/gnu/packages/patches/gst-plugins-base-fix-test-on-32bit.patch @@ -0,0 +1,32 @@ +This fixes a test failure on i686. + +Patch copied from upstream source repository: + +https://cgit.freedesktop.org/gstreamer/gst-plugins-base/commit/?id=5e2e111627871c566ffc6607eda8f4ef4699d040 + +From 5e2e111627871c566ffc6607eda8f4ef4699d040 Mon Sep 17 00:00:00 2001 +From: =?UTF-8?q?Sebastian=20Dr=C3=B6ge?= +Date: Thu, 2 Feb 2017 14:56:39 +0200 +Subject: [PATCH] multifdsink: Make sure to use a 64 bit integer for the + units-max property + +--- + tests/check/elements/multifdsink.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/tests/check/elements/multifdsink.c b/tests/check/elements/multifdsink.c +index af138cc92..951b1b9fa 100644 +--- a/tests/check/elements/multifdsink.c ++++ b/tests/check/elements/multifdsink.c +@@ -869,7 +869,7 @@ GST_START_TEST (test_client_kick) + gint i, initial_buffers = 3, num_buffers = 0; + + sink = setup_multifdsink (); +- g_object_set (sink, "units-max", initial_buffers, NULL); ++ g_object_set (sink, "units-max", (gint64) initial_buffers, NULL); + + fail_if (pipe (pfd1) == -1); + fail_if (pipe (pfd2) == -1); +-- +2.11.0 + From 0f31d4f07f8203305c486da76cdeee57ae8a4efc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 2 Feb 2017 11:34:48 +0100 Subject: [PATCH 002/135] gnu: guile-json: Texinfoify description. * gnu/packages/guile.scm (guile-json)[description]: Use Texinfo markup. --- gnu/packages/guile.scm | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) diff --git a/gnu/packages/guile.scm b/gnu/packages/guile.scm index ba45a6389b..7307823457 100644 --- a/gnu/packages/guile.scm +++ b/gnu/packages/guile.scm @@ -637,12 +637,15 @@ for Guile\".") (home-page "http://savannah.nongnu.org/projects/guile-json/") (synopsis "JSON module for Guile") (description - "Guile-json supports parsing and building JSON documents according to the -http:://json.org specification. These are the main features: -- Strictly complies to http://json.org specification. -- Build JSON documents programmatically via macros. -- Unicode support for strings. -- Allows JSON pretty printing.") + "Guile-JSON supports parsing and building JSON documents according to the +specification. These are the main features: + +@itemize +@item Strictly complies to @uref{http://json.org, specification}. +@item Build JSON documents programmatically via macros. +@item Unicode support for strings. +@item Allows JSON pretty printing. +@end itemize\n") (license lgpl3+))) (define-public guile2.2-json From d2a5e6982ddcbe1e5479bda62a72b3a94570855a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 3 Feb 2017 00:20:40 +0100 Subject: [PATCH 003/135] file-systems: Add 'file-system-mapping->bind-mount'. * gnu/system/file-systems.scm (file-system-mapping->bind-mount): New procedure. * gnu/system/linux-container.scm (mapping->file-system): Remove. (containerized-operating-system)[mapping->fs]: Use 'file-system-mapping->bind-mount' instead of 'mapping->file-system'. * guix/scripts/environment.scm (launch-environment/container): Likewise. --- gnu/system/file-systems.scm | 17 +++++++++++++++++ gnu/system/linux-container.scm | 21 +++------------------ guix/scripts/environment.scm | 3 ++- 3 files changed, 22 insertions(+), 19 deletions(-) diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index fa56853fd1..b2721f2389 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -63,6 +63,8 @@ file-system-mapping-target file-system-mapping-writable? + file-system-mapping->bind-mount + %store-mapping)) ;;; Commentary: @@ -352,6 +354,21 @@ TARGET in the other system." (writable? file-system-mapping-writable? ;Boolean (default #f))) +(define (file-system-mapping->bind-mount mapping) + "Return a file system that realizes MAPPING, a , using +a bind mount." + (match mapping + (($ source target writable?) + (file-system + (mount-point target) + (device source) + (type "none") + (flags (if writable? + '(bind-mount) + '(bind-mount read-only))) + (check? #f) + (create-mount-point? #t))))) + (define %store-mapping ;; Mapping of the host's store into the guest. (file-system-mapping diff --git a/gnu/system/linux-container.scm b/gnu/system/linux-container.scm index 24e61c3ead..bceea41332 100644 --- a/gnu/system/linux-container.scm +++ b/gnu/system/linux-container.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson -;;; Copyright © 2016 Ludovic Courtès +;;; Copyright © 2016, 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -30,25 +30,10 @@ #:use-module (gnu services) #:use-module (gnu system) #:use-module (gnu system file-systems) - #:export (mapping->file-system - system-container + #:export (system-container containerized-operating-system container-script)) -(define (mapping->file-system mapping) - "Return a file system that realizes MAPPING." - (match mapping - (($ source target writable?) - (file-system - (mount-point target) - (device source) - (type "none") - (flags (if writable? - '(bind-mount) - '(bind-mount read-only))) - (check? #f) - (create-mount-point? #t))))) - (define (containerized-operating-system os mappings) "Return an operating system based on OS for use in a Linux container environment. MAPPINGS is a list of to realize in the @@ -66,7 +51,7 @@ containerized OS." (operating-system-file-systems os))) (define (mapping->fs fs) - (file-system (inherit (mapping->file-system fs)) + (file-system (inherit (file-system-mapping->bind-mount fs)) (needed-for-boot? #t))) (operating-system (inherit os) diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 8a3a935a10..0a1205d087 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -433,7 +433,8 @@ host file systems to mount inside the container." (writable? #f))) reqs))) (file-systems (append %container-file-systems - (map mapping->file-system mappings)))) + (map file-system-mapping->bind-mount + mappings)))) (exit/status (call-with-container file-systems (lambda () From 2d1ac1d1b0ebdd884eb19b4aea2b5e4e9223a698 Mon Sep 17 00:00:00 2001 From: Eric Bavier Date: Wed, 1 Feb 2017 20:19:37 -0600 Subject: [PATCH 004/135] gnu: thefuck: Fix execution. Follow-up to 4a6b2a21bf36a6d0170d7568073f0a03ef3004f3 * gnu/packages/admin.scm (thefuck): Fix 'inputs' -> 'native-inputs'. --- gnu/packages/admin.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 96aececbbf..be03f64302 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -1712,7 +1712,7 @@ throughput (in the same interval).") ("python-decorator" ,python-decorator) ("python-psutil" ,python-psutil) ("python-six" ,python-six))) - (inputs + (native-inputs ;; Requires setuptools >= 17.1 due to some features used, while our ;; python currently only includes 12.0. TODO: Remove this input. `(("python-setuptools" ,python-setuptools))) From 345504c79d2b412f1036ff0cbd964e344a24b162 Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 2 Feb 2017 14:32:14 +0000 Subject: [PATCH 005/135] gnu: Add no-more-secrets. * gnu/packages/games.scm (no-more-secrets): New variable. Signed-off-by: Eric Bavier --- gnu/packages/games.scm | 38 +++++++++++++++++++++++++++++++++++++- 1 file changed, 37 insertions(+), 1 deletion(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index 98a4d69013..c3514feaca 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -17,7 +17,7 @@ ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2016 Rodger Fox ;;; Copyright © 2016 Manolis Fragkiskos Ragkousis -;;; Copyright © 2016 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Albin Söderqvist ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Alex Griffin @@ -3102,3 +3102,39 @@ inspired by the history of human civilization. The game commences in prehistory and your mission is to lead your tribe from the Stone Age to the Space Age.") (license license:gpl2+))) + +(define-public no-more-secrets + (package + (name "no-more-secrets") + (version "0.3.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/bartobri/no-more-secrets/" + "archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "038flwqr0kqv55im2v76xjn01zbvvkb3nzb5ridwm2kbnk9cgg4v")))) + (build-system gnu-build-system) + (arguments + `(#:tests? #f + #:make-flags (list "CC=gcc" "all-ncurses" + (string-append "prefix=" + (assoc-ref %outputs "out"))) + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (inputs + `(("ncurses" ,ncurses))) + (home-page "https://github.com/bartobri/no-more-secrets") + (synopsis "Recreation of data decryption effect in \"Sneakers\"") + (description + "@code{No More Secrets} provides a command line tool called \"nms\" +that recreates the famous data decryption effect seen on screen in the 1992 +movie \"Sneakers\". + +This command works on piped data. Pipe any ASCII or UTF-8 text to nms, and +it will apply the hollywood effect, initially showing encrypted data, then +starting a decryption sequence to reveal the original plaintext characters.") + (license license:expat))) From 942f38ea7f020d9651f9d3f32a4ce8f143a3e623 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 3 Feb 2017 00:48:55 -0500 Subject: [PATCH 006/135] gnu: linux-libre@4.4: Update to 4.4.46. * gnu/packages/linux.scm (linux-libre-4.4): Update to 4.4.46. --- gnu/packages/linux.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index def4be52cd..0356ce028a 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -341,8 +341,8 @@ It has been modified to remove all non-free binary blobs.") #:configuration-file kernel-config)) (define-public linux-libre-4.4 - (make-linux-libre "4.4.45" - "1c6nigbl8yrqpaz89954la956lshr3p0llm52phxq2h06zblsp87" + (make-linux-libre "4.4.46" + "0b1gc95spdb989zrb1ww04ik5xgbaxj906ka1dspnvxhz471zcf3" %intel-compatible-systems #:configuration-file kernel-config)) From 883aab6462c49d4f4846a6f22168325e70227663 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Fri, 3 Feb 2017 00:50:04 -0500 Subject: [PATCH 007/135] gnu: linux-libre: Update to 4.9.7. * gnu/packages/linux.scm (%linux-libre-version, %linux-libre-hash) (linux-libre): Update to 4.9.7. --- gnu/packages/linux.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 0356ce028a..35b0750966 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -335,8 +335,8 @@ It has been modified to remove all non-free binary blobs.") (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) (define-public linux-libre - (make-linux-libre "4.9.6" - "0mafa628la5qj26rff014mmih2widl5k2sjxg152lmpgijmf6qhd" + (make-linux-libre "4.9.7" + "1qhdgniwfa3f57pmrc8jzhypr2fzfilag3gwvi0c4nf2sfgp2670" %intel-compatible-systems #:configuration-file kernel-config)) @@ -353,8 +353,8 @@ It has been modified to remove all non-free binary blobs.") #:configuration-file kernel-config)) ;; Avoid rebuilding kernel variants when there is a minor version bump. -(define %linux-libre-version "4.9.6") -(define %linux-libre-hash "0mafa628la5qj26rff014mmih2widl5k2sjxg152lmpgijmf6qhd") +(define %linux-libre-version "4.9.7") +(define %linux-libre-hash "1qhdgniwfa3f57pmrc8jzhypr2fzfilag3gwvi0c4nf2sfgp2670") (define-public linux-libre-arm-generic (make-linux-libre %linux-libre-version From 89eb56f05fa1561b09d1050147d968b98a16b07a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Fri, 3 Feb 2017 15:06:08 +0100 Subject: [PATCH 008/135] gnu: fish: Update to 2.5.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/shells.scm (fish): Update to 2.5.0. [native-inputs]: Add autoconf, automake, and libtool. [arguments]: Add ‘bootstrap’ phase. --- gnu/packages/shells.scm | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index 4ed1f4696b..a9b2e74c95 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -83,14 +83,14 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") (define-public fish (package (name "fish") - (version "2.4.0") + (version "2.5.0") (source (origin (method url-fetch) (uri (string-append "https://fishshell.com/files/" version "/fish-" version ".tar.gz")) (sha256 (base32 - "1iggr6ah0siyak073v2w4sx1man19q8jsxns8i09qhv06crb5fq6")) + "0kn2n9qr9cksg2cl78f3w0yd24368d35djhi6w5x3gbdxk23ywq3")) (modules '((guix build utils))) ;; Don't try to install /etc/fish/config.fish. (snippet @@ -98,7 +98,12 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") ((".*INSTALL.*sysconfdir.*fish.*") ""))))) (build-system gnu-build-system) (native-inputs - `(("doxygen" ,doxygen))) + `(("doxygen" ,doxygen) + ;; XXX These are needed to bootstrap the 2.5.0 tarball, and can probably + ;; be removed along with the ‘bootstrap’ phase on the next update. + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) (inputs `(("bc" ,bc) ("ncurses" ,ncurses) @@ -119,7 +124,10 @@ direct descendant of NetBSD's Almquist Shell (@command{ash}).") "/bin/bc"))) (substitute* "share/functions/fish_update_completions.fish" (("python") (which "python"))) - #t))))) + #t)) + (add-before 'configure 'bootstrap + (lambda _ + (zero? (system* "autoreconf" "-vfi"))))))) (synopsis "The friendly interactive shell") (description "Fish (friendly interactive shell) is a shell focused on interactive use, From effd7198b91f85b1bf36ab87392068b3597b6ca8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Feb 2017 19:17:47 +0200 Subject: [PATCH 009/135] gnu: zpaq: Tune for 'generic-armv7-a' on armhf. * gnu/packages/compression.scm (zpaq)[arguments]: Change the CXXFLAGS so on armhf-linux we build with '-mtune=generic-armv7-a' and not '-mtune=generic'. --- gnu/packages/compression.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 73a35030e9..fbbc32197a 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -7,7 +7,7 @@ ;;; Copyright © 2015, 2016 Ricardo Wurmus ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2015 Jeff Mickey -;;; Copyright © 2015, 2016 Efraim Flashner +;;; Copyright © 2015, 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2016 Danny Milosavljevic ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice @@ -1034,11 +1034,12 @@ functionality in a C++ iostream.") (_ " -DNOJIT"))) ;; These should be safe, lowest-common-denominator instruction sets, ;; allowing for some optimisation while remaining reproducible. - (string-append "CXXFLAGS=-O3 -mtune=generic -DNDEBUG" + (string-append "CXXFLAGS=-O3 -DNDEBUG" ,(match (or (%current-target-system) (%current-system)) - ("x86_64-linux" " -march=nocona") - ("i686-linux" " -march=i686") + ("x86_64-linux" " -march=nocona -mtune=generic") + ("i686-linux" " -march=i686 -mtune=generic") + ("armhf-linux" " -mtune=generic-armv7-a") (_ ""))) (string-append "PREFIX=" (assoc-ref %outputs "out"))))) From f2de078a10fd18cab204cca81d398d3903b95341 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Feb 2017 19:54:30 +0200 Subject: [PATCH 010/135] gnu: git: Update to 2.11.1. * gnu/packages/version-control.scm (git): Update to 2.11.1. --- gnu/packages/version-control.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index 03ae398bd2..ef83746f29 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -112,14 +112,14 @@ as well as the classic centralized workflow.") (define-public git (package (name "git") - (version "2.11.0") + (version "2.11.1") (source (origin (method url-fetch) (uri (string-append "mirror://kernel.org/software/scm/git/git-" version ".tar.xz")) (sha256 (base32 - "02zx368id8rys0bh2sjrxz0ln2l2wm5nf1vhp1rj72clsilqszky")))) + "05b4jw86w77c3pyh3nm6aw31vhxwzvhnx2x0bcfqmm15wg57k9y0")))) (build-system gnu-build-system) (native-inputs `(("native-perl" ,perl) @@ -132,7 +132,7 @@ as well as the classic centralized workflow.") version ".tar.xz")) (sha256 (base32 - "1n18jnpi0z3skwc1ckrm7zdld6i3zvn0g95cg9r9pdn0564fglxk")))))) + "0cfa3c2r7d86ksswxdl0jqdka9mai3446gg8380921gf779nwj39")))))) (inputs `(("curl" ,curl) ("expat" ,expat) From 37337699d7d6069ccd38aae6cc25bdbf4a6e56fc Mon Sep 17 00:00:00 2001 From: Raoul Jean Pierre Bonnal Date: Fri, 3 Feb 2017 19:50:00 +0100 Subject: [PATCH 011/135] gnu: Add r-randomforest. * gnu/packages/statistics.scm (r-randomforest): New variable. Signed-off-by: Kei Kebreau --- gnu/packages/statistics.scm | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 596c2baf5c..80f0b99b86 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 Pjotr Prins ;;; Copyright © 2016 Roel Janssen ;;; Copyright © 2016 Ben Woodcroft -;;; Copyright © 2016 Raoul Bonnal +;;; Copyright © 2016, 2017 Raoul Bonnal ;;; ;;; This file is part of GNU Guix. ;;; @@ -4145,3 +4145,25 @@ regression.") perform @dfn{independent component analysis} (ICA) and projection pursuit.") ;; Any GPL version. (license license:gpl3+))) + +(define-public r-randomforest + (package + (name "r-randomforest") + (version "4.6-12") + (source + (origin + (method url-fetch) + (uri (cran-uri "randomForest" version)) + (sha256 + (base32 + "1i43idaihhl6nwqw42v9dqpl6f8z3ykcn2in32lh2755i27jylbf")))) + (properties `((upstream-name . "randomForest"))) + (build-system r-build-system) + (home-page "https://www.stat.berkeley.edu/~breiman/RandomForests/") + (native-inputs + `(("gfortran" ,gfortran))) + (synopsis "Breiman and Cutler's random forests for classification and regression") + (description +"This package provides the Breiman and Cutler's random forests algorithm, based on a +forest of trees using random inputs, for classification and regression.") + (license license:gpl2+))) From c6dced88f262f7e781288f32cc3a376b929a6214 Mon Sep 17 00:00:00 2001 From: Raoul Jean Pierre Bonnal Date: Sat, 14 Jan 2017 01:52:09 +0100 Subject: [PATCH 012/135] gnu: Add r-rann. * gnu/packages/statistics.scm (r-rann): New variable. Signed-off-by: Kei Kebreau --- gnu/packages/statistics.scm | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index 80f0b99b86..b4d95bdb71 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -4006,6 +4006,27 @@ dispersion modeling and Tweedie power-law families.") ;; Statmod is distributed under either license (license (list license:gpl2 license:gpl3)))) +(define-public r-rann + (package + (name "r-rann") + (version "2.5") + (source (origin + (method url-fetch) + (uri (cran-uri "RANN" version)) + (sha256 + (base32 + "007cgqg9bybg2zlljbv5m6cmlm3r6i251018rpgjcn0xnm9sjsj7")))) + (properties + `((upstream-name . "RANN"))) + (build-system r-build-system) + (home-page "https://github.com/jefferis/RANN") + (synopsis "Fast nearest neighbour search") + (description + "This package finds the k nearest neighbours for every point in a given +dataset in O(N log N) time using Arya and Mount's ANN library. Provides +approximate, exact searches, fixed radius searches, bd and kb trees.") + (license license:gpl3+))) + (define-public r-fivethirtyeight (package (name "r-fivethirtyeight") From efc12a81ad399acd93b223bca46a3c0d739e082a Mon Sep 17 00:00:00 2001 From: Adonay Felipe Nogueira Date: Sat, 14 Jan 2017 16:42:05 -0200 Subject: [PATCH 013/135] gnu: abbaye: Update to 2.0.1. * gnu/packages/games.scm: (abbaye): Update to 2.0.1. [snippet]: Delete the bundled fonts. [arguments]: Adjust 'patch-makefile' phase to patch only Makefile. Add "CC" make flag. [inputs]: Use only required sdl2 packages. [home-page]: Update to the new location. [license]: Use the proper license. Signed-off-by: Alex Kost --- gnu/packages/games.scm | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gnu/packages/games.scm b/gnu/packages/games.scm index c3514feaca..0867089d5a 100644 --- a/gnu/packages/games.scm +++ b/gnu/packages/games.scm @@ -24,6 +24,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Steve Webber +;;; Copyright © 2017 Adonay "adfeno" Felipe Nogueira ;;; ;;; This file is part of GNU Guix. ;;; @@ -177,22 +178,23 @@ scriptable with Guile.") (define-public abbaye (package (name "abbaye") - (version "1.13") + (version "2.0.1") (source (origin (method url-fetch) - (uri (string-append "https://storage.googleapis.com/" - "google-code-archive-downloads/v2/code.google.com/" - "abbaye-for-linux/abbaye-for-linux-src-" - version ".tar.gz")) + (uri (string-append "https://github.com/nevat/abbayedesmorts-gpl/" + "archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1wgvckgqa2084rbskxif58wbb83xbas8s1i8s7d57xbj08ryq8rk")))) + "1a67b0hq6271dd7pvwndjq29cwn2n8gawwz17xafa3k1hrhf8vw3")) + (modules '((guix build utils))) + (snippet + ;; Unbundle fonts. + '(delete-file-recursively "fonts")))) (build-system gnu-build-system) (arguments - '(#:modules ((ice-9 match) - (guix build gnu-build-system) - (guix build utils)) + '(#:make-flags '("CC=gcc") #:phases (modify-phases %standard-phases (add-after 'set-paths 'set-sdl-paths (lambda* (#:key inputs #:allow-other-keys) @@ -202,10 +204,8 @@ scriptable with Guile.") (add-after 'patch-source-shebangs 'patch-makefile (lambda* (#:key outputs #:allow-other-keys) ;; Replace /usr with package output directory. - (for-each (lambda (file) - (substitute* file - (("/usr") (assoc-ref outputs "out")))) - '("makefile" "src/pantallas.c" "src/comun.h")))) + (substitute* "Makefile" + (("/usr") (assoc-ref outputs "out"))))) (add-before 'install 'make-install-dirs (lambda* (#:key outputs #:allow-other-keys) (let ((prefix (assoc-ref outputs "out"))) @@ -217,15 +217,15 @@ scriptable with Guile.") (delete 'configure)) #:tests? #f)) ;; No check target. (native-inputs `(("pkg-config" ,pkg-config))) - (inputs `(("sdl-union" ,(sdl-union)))) - (home-page "http://code.google.com/p/abbaye-for-linux/") + (inputs `(("sdl-union" ,(sdl-union (list sdl2 sdl2-image sdl2-mixer))))) + (home-page "https://github.com/nevat/abbayedesmorts-gpl") (synopsis "GNU/Linux port of the indie game \"l'Abbaye des Morts\"") (description "L'Abbaye des Morts is a 2D platform game set in 13th century France. The Cathars, who preach about good Christian beliefs, were being expelled by the Catholic Church out of the Languedoc region in France. One of them, called Jean Raymond, found an old church in which to hide, not knowing that beneath its ruins lay buried an ancient evil.") - (license license:gpl3+))) + (license license:gpl3))) (define-public pingus (package From 3e9750c368cb2d0b02e3546083273f29b3cdb948 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert Date: Tue, 24 Jan 2017 09:41:42 +0100 Subject: [PATCH 014/135] gnu: Add emacs-mew. * gnu/packages/mail.scm (emacs-mew): New variable. Co-authored-by: Alex Kost --- gnu/packages/mail.scm | 53 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 5434687749..a9b2cb3ec9 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2016 Arun Isaac ;;; Copyright © 2016 John Darrington ;;; Copyright © 2016 Marius Bakke +;;; Copyright © 2017 Thomas Danckaert ;;; ;;; This file is part of GNU Guix. ;;; @@ -79,6 +80,7 @@ #:use-module (gnu packages flex) #:use-module (gnu packages gdb) #:use-module (gnu packages man) + #:use-module (gnu packages ruby) #:use-module (gnu packages samba) #:use-module (gnu packages screen) #:use-module (gnu packages tls) @@ -455,6 +457,57 @@ can read the same mailbox from multiple computers. It supports IMAP as REMOTE repository and Maildir/IMAP as LOCAL repository.") (license gpl2+))) +(define-public emacs-mew + (package + (name "emacs-mew") + (version "6.7") + (source (origin + (method url-fetch) + (uri (string-append "http://mew.org/Release/mew-" + version ".tar.gz")) + (sha256 + (base32 + "03fzky2kz73vgx4cbps2psbbnrgqgkk5q7jwfldisymkzr9iz03y")))) + (native-inputs + `(("emacs" ,emacs))) + (propagated-inputs + `(("ruby-sqlite3" ,ruby-sqlite3) ; optional for the database of messages + ("ruby" ,ruby))) ; to set GEM_PATH so ruby-sqlite3 is found at runtime + (build-system gnu-build-system) + (arguments + (let ((elisp-dir "/share/emacs/site-lisp/guix.d/mew") + (icon-dir "/share/mew")) + `(#:modules ((guix build gnu-build-system) + (guix build utils) + (guix build emacs-utils)) + #:imported-modules (,@%gnu-build-system-modules + (guix build emacs-utils)) + #:configure-flags + (list (string-append "--with-elispdir=" %output ,elisp-dir) + (string-append "--with-etcdir=" %output ,icon-dir)) + #:phases + (modify-phases %standard-phases + (add-after 'configure 'patch-mew-icon-directory + (lambda* (#:key outputs #:allow-other-keys) + (emacs-substitute-sexps "mew-key.el" + ("(def.* mew-icon-directory" + `(progn + (add-to-list 'image-load-path 'mew-icon-directory) + ,(string-append (assoc-ref outputs "out") ,icon-dir)))) + #t)) + (add-after 'install 'generate-autoloads + (lambda* (#:key outputs #:allow-other-keys) + (emacs-generate-autoloads + "mew" (string-append (assoc-ref outputs "out") ,elisp-dir)) + #t))) + #:tests? #f))) + (home-page "http://www.mew.org") + (synopsis "Emacs e-mail client") + (description "Mew (Messaging in the Emacs World) is a user interface +for text messages, multimedia messages (MIME), news articles and +security functionality including PGP, S/MIME, SSH, and SSL.") + (license bsd-3))) + (define-public mu (package (name "mu") From b352b57655197d335e4dddcbc837e44a38b646b8 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Feb 2017 21:53:14 +0200 Subject: [PATCH 015/135] gnu: qemu: Patch CVE-2017-{2615, 5578, 5579, 5856}. * gnu/packages/qemu.scm (qemu)[source]: Add patches. * gnu/packages/patches/qemu-CVE-2017-2615, gnu/packages/patches/qemu-CVE-2017-5578, gnu/packages/patches/qemu-CVE-2017-5579, gnu/packages/patches/qemu-CVE-2017-5856: New files. * gnu/local.mk (dist_patch_DATA): Register them. --- gnu/local.mk | 4 ++ gnu/packages/patches/qemu-CVE-2017-2615.patch | 52 ++++++++++++++ gnu/packages/patches/qemu-CVE-2017-5578.patch | 39 +++++++++++ gnu/packages/patches/qemu-CVE-2017-5579.patch | 44 ++++++++++++ gnu/packages/patches/qemu-CVE-2017-5856.patch | 68 +++++++++++++++++++ gnu/packages/qemu.scm | 6 +- 6 files changed, 212 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/qemu-CVE-2017-2615.patch create mode 100644 gnu/packages/patches/qemu-CVE-2017-5578.patch create mode 100644 gnu/packages/patches/qemu-CVE-2017-5579.patch create mode 100644 gnu/packages/patches/qemu-CVE-2017-5856.patch diff --git a/gnu/local.mk b/gnu/local.mk index d405fce182..b0f6a9d432 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -860,9 +860,13 @@ dist_patch_DATA = \ %D%/packages/patches/python2-pygobject-2-gi-info-type-error-domain.patch \ %D%/packages/patches/python-pygpgme-fix-pinentry-tests.patch \ %D%/packages/patches/qemu-CVE-2016-10155.patch \ + %D%/packages/patches/qemu-CVE-2017-2615.patch \ %D%/packages/patches/qemu-CVE-2017-5525.patch \ %D%/packages/patches/qemu-CVE-2017-5526.patch \ %D%/packages/patches/qemu-CVE-2017-5552.patch \ + %D%/packages/patches/qemu-CVE-2017-5578.patch \ + %D%/packages/patches/qemu-CVE-2017-5579.patch \ + %D%/packages/patches/qemu-CVE-2017-5856.patch \ %D%/packages/patches/qt4-ldflags.patch \ %D%/packages/patches/quickswitch-fix-dmenu-check.patch \ %D%/packages/patches/rapicorn-isnan.patch \ diff --git a/gnu/packages/patches/qemu-CVE-2017-2615.patch b/gnu/packages/patches/qemu-CVE-2017-2615.patch new file mode 100644 index 0000000000..ede1f8c89d --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2017-2615.patch @@ -0,0 +1,52 @@ +http://git.qemu.org/?p=qemu.git;a=patch;h=62d4c6bd5263bb8413a06c80144fc678df6dfb64 +this patch is from qemu-git. + + +From 62d4c6bd5263bb8413a06c80144fc678df6dfb64 Mon Sep 17 00:00:00 2001 +From: Li Qiang +Date: Wed, 1 Feb 2017 09:35:01 +0100 +Subject: [PATCH] cirrus: fix oob access issue (CVE-2017-2615) + +When doing bitblt copy in backward mode, we should minus the +blt width first just like the adding in the forward mode. This +can avoid the oob access of the front of vga's vram. + +Signed-off-by: Li Qiang + +{ kraxel: with backward blits (negative pitch) addr is the topmost + address, so check it as-is against vram size ] + +Cc: qemu-stable@nongnu.org +Cc: P J P +Cc: Laszlo Ersek +Cc: Paolo Bonzini +Cc: Wolfgang Bumiller +Fixes: d3532a0db02296e687711b8cdc7791924efccea0 (CVE-2014-8106) +Signed-off-by: Gerd Hoffmann +Message-id: 1485938101-26602-1-git-send-email-kraxel@redhat.com +Reviewed-by: Laszlo Ersek +--- + hw/display/cirrus_vga.c | 7 +++---- + 1 file changed, 3 insertions(+), 4 deletions(-) + +diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c +index 7db6409dc5..16f27e8ac5 100644 +--- a/hw/display/cirrus_vga.c ++++ b/hw/display/cirrus_vga.c +@@ -274,10 +274,9 @@ static bool blit_region_is_unsafe(struct CirrusVGAState *s, + { + if (pitch < 0) { + int64_t min = addr +- + ((int64_t)s->cirrus_blt_height-1) * pitch; +- int32_t max = addr +- + s->cirrus_blt_width; +- if (min < 0 || max > s->vga.vram_size) { ++ + ((int64_t)s->cirrus_blt_height - 1) * pitch ++ - s->cirrus_blt_width; ++ if (min < -1 || addr >= s->vga.vram_size) { + return true; + } + } else { +-- +2.11.0 + diff --git a/gnu/packages/patches/qemu-CVE-2017-5578.patch b/gnu/packages/patches/qemu-CVE-2017-5578.patch new file mode 100644 index 0000000000..05655bcd98 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2017-5578.patch @@ -0,0 +1,39 @@ +http://git.qemu.org/?p=qemu.git;a=patch;h=204f01b30975923c64006f8067f0937b91eea68b +this patch is from qemu-git. + + +From 204f01b30975923c64006f8067f0937b91eea68b Mon Sep 17 00:00:00 2001 +From: Li Qiang +Date: Thu, 29 Dec 2016 04:28:41 -0500 +Subject: [PATCH] virtio-gpu: fix memory leak in resource attach backing + +In the resource attach backing function, everytime it will +allocate 'res->iov' thus can leading a memory leak. This +patch avoid this. + +Signed-off-by: Li Qiang +Message-id: 1483003721-65360-1-git-send-email-liq3ea@gmail.com +Signed-off-by: Gerd Hoffmann +--- + hw/display/virtio-gpu.c | 5 +++++ + 1 file changed, 5 insertions(+) + +diff --git a/hw/display/virtio-gpu.c b/hw/display/virtio-gpu.c +index 6a26258cac..ca88cf478d 100644 +--- a/hw/display/virtio-gpu.c ++++ b/hw/display/virtio-gpu.c +@@ -714,6 +714,11 @@ virtio_gpu_resource_attach_backing(VirtIOGPU *g, + return; + } + ++ if (res->iov) { ++ cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC; ++ return; ++ } ++ + ret = virtio_gpu_create_mapping_iov(&ab, cmd, &res->addrs, &res->iov); + if (ret != 0) { + cmd->error = VIRTIO_GPU_RESP_ERR_UNSPEC; +-- +2.11.0 + diff --git a/gnu/packages/patches/qemu-CVE-2017-5579.patch b/gnu/packages/patches/qemu-CVE-2017-5579.patch new file mode 100644 index 0000000000..7630012d54 --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2017-5579.patch @@ -0,0 +1,44 @@ +http://git.qemu.org/?p=qemu.git;a=patch;h=8409dc884a201bf74b30a9d232b6bbdd00cb7e2b +this patch is from qemu-git. + + +From 8409dc884a201bf74b30a9d232b6bbdd00cb7e2b Mon Sep 17 00:00:00 2001 +From: Li Qiang +Date: Wed, 4 Jan 2017 00:43:16 -0800 +Subject: [PATCH] serial: fix memory leak in serial exit + +The serial_exit_core function doesn't free some resources. +This can lead memory leak when hotplug and unplug. This +patch avoid this. + +Signed-off-by: Li Qiang +Message-Id: <586cb5ab.f31d9d0a.38ac3.acf2@mx.google.com> +Signed-off-by: Paolo Bonzini +--- + hw/char/serial.c | 10 ++++++++++ + 1 file changed, 10 insertions(+) + +diff --git a/hw/char/serial.c b/hw/char/serial.c +index ffbacd8227..67b18eda12 100644 +--- a/hw/char/serial.c ++++ b/hw/char/serial.c +@@ -906,6 +906,16 @@ void serial_realize_core(SerialState *s, Error **errp) + void serial_exit_core(SerialState *s) + { + qemu_chr_fe_deinit(&s->chr); ++ ++ timer_del(s->modem_status_poll); ++ timer_free(s->modem_status_poll); ++ ++ timer_del(s->fifo_timeout_timer); ++ timer_free(s->fifo_timeout_timer); ++ ++ fifo8_destroy(&s->recv_fifo); ++ fifo8_destroy(&s->xmit_fifo); ++ + qemu_unregister_reset(serial_reset, s); + } + +-- +2.11.0 + diff --git a/gnu/packages/patches/qemu-CVE-2017-5856.patch b/gnu/packages/patches/qemu-CVE-2017-5856.patch new file mode 100644 index 0000000000..bee0824c0a --- /dev/null +++ b/gnu/packages/patches/qemu-CVE-2017-5856.patch @@ -0,0 +1,68 @@ +http://git.qemu.org/?p=qemu.git;a=patch;h=765a707000e838c30b18d712fe6cb3dd8e0435f3 +this patch is from qemu-git. + + +From 765a707000e838c30b18d712fe6cb3dd8e0435f3 Mon Sep 17 00:00:00 2001 +From: Paolo Bonzini +Date: Mon, 2 Jan 2017 11:03:33 +0100 +Subject: [PATCH] megasas: fix guest-triggered memory leak + +If the guest sets the sglist size to a value >=2GB, megasas_handle_dcmd +will return MFI_STAT_MEMORY_NOT_AVAILABLE without freeing the memory. +Avoid this by returning only the status from map_dcmd, and loading +cmd->iov_size in the caller. + +Reported-by: Li Qiang +Signed-off-by: Paolo Bonzini +--- + hw/scsi/megasas.c | 11 ++++++----- + 1 files changed, 6 insertions(+), 5 deletions(-) + +diff --git a/hw/scsi/megasas.c b/hw/scsi/megasas.c +index 67fc1e7..6233865 100644 +--- a/hw/scsi/megasas.c ++++ b/hw/scsi/megasas.c +@@ -683,14 +683,14 @@ static int megasas_map_dcmd(MegasasState *s, MegasasCmd *cmd) + trace_megasas_dcmd_invalid_sge(cmd->index, + cmd->frame->header.sge_count); + cmd->iov_size = 0; +- return -1; ++ return -EINVAL; + } + iov_pa = megasas_sgl_get_addr(cmd, &cmd->frame->dcmd.sgl); + iov_size = megasas_sgl_get_len(cmd, &cmd->frame->dcmd.sgl); + pci_dma_sglist_init(&cmd->qsg, PCI_DEVICE(s), 1); + qemu_sglist_add(&cmd->qsg, iov_pa, iov_size); + cmd->iov_size = iov_size; +- return cmd->iov_size; ++ return 0; + } + + static void megasas_finish_dcmd(MegasasCmd *cmd, uint32_t iov_size) +@@ -1559,19 +1559,20 @@ static const struct dcmd_cmd_tbl_t { + + static int megasas_handle_dcmd(MegasasState *s, MegasasCmd *cmd) + { +- int opcode, len; ++ int opcode; + int retval = 0; ++ size_t len; + const struct dcmd_cmd_tbl_t *cmdptr = dcmd_cmd_tbl; + + opcode = le32_to_cpu(cmd->frame->dcmd.opcode); + trace_megasas_handle_dcmd(cmd->index, opcode); +- len = megasas_map_dcmd(s, cmd); +- if (len < 0) { ++ if (megasas_map_dcmd(s, cmd) < 0) { + return MFI_STAT_MEMORY_NOT_AVAILABLE; + } + while (cmdptr->opcode != -1 && cmdptr->opcode != opcode) { + cmdptr++; + } ++ len = cmd->iov_size; + if (cmdptr->opcode == -1) { + trace_megasas_dcmd_unhandled(cmd->index, opcode, len); + retval = megasas_dcmd_dummy(s, cmd); +-- +1.7.0.4 + diff --git a/gnu/packages/qemu.scm b/gnu/packages/qemu.scm index 1c10ab9aee..b4920cfc25 100644 --- a/gnu/packages/qemu.scm +++ b/gnu/packages/qemu.scm @@ -78,9 +78,13 @@ (base32 "0qjy3rcrn89n42y5iz60kgr0rrl29hpnj8mq2yvbc1wrcizmvzfs")) (patches (search-patches "qemu-CVE-2016-10155.patch" + "qemu-CVE-2017-2615.patch" "qemu-CVE-2017-5525.patch" "qemu-CVE-2017-5526.patch" - "qemu-CVE-2017-5552.patch")))) + "qemu-CVE-2017-5552.patch" + "qemu-CVE-2017-5578.patch" + "qemu-CVE-2017-5579.patch" + "qemu-CVE-2017-5856.patch")))) (build-system gnu-build-system) (arguments '(;; Running tests in parallel can occasionally lead to failures, like: From 1ac675a5831e39968be3c137a4ff448c9f65f48e Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Feb 2017 22:17:41 +0200 Subject: [PATCH 016/135] gnu: p7zip: Fix CVE-2016-9256. * gnu/packages/compression.scm (p7zip)[source]: Add patch. * gnu/packages/patches/p7zip-CVE-2016-9296.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 1 + gnu/packages/compression.scm | 3 ++- .../patches/p7zip-CVE-2016-9296.patch | 24 +++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/p7zip-CVE-2016-9296.patch diff --git a/gnu/local.mk b/gnu/local.mk index b0f6a9d432..0948321c9c 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -797,6 +797,7 @@ dist_patch_DATA = \ %D%/packages/patches/openssl-c-rehash-in.patch \ %D%/packages/patches/orpheus-cast-errors-and-includes.patch \ %D%/packages/patches/ots-no-include-missing-file.patch \ + %D%/packages/patches/p7zip-CVE-2016-9296.patch \ %D%/packages/patches/p7zip-remove-unused-code.patch \ %D%/packages/patches/patchelf-page-size.patch \ %D%/packages/patches/patchelf-rework-for-arm.patch \ diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index fbbc32197a..9ef255a42d 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -924,7 +924,8 @@ for most inputs, but the resulting compressed files are anywhere from 20% to (delete-file-recursively "CPP/7zip/Archive/Rar") (delete-file-recursively "CPP/7zip/Compress/Rar") #t)) - (patches (search-patches "p7zip-remove-unused-code.patch")))) + (patches (search-patches "p7zip-CVE-2016-9296.patch" + "p7zip-remove-unused-code.patch")))) (build-system gnu-build-system) (arguments `(#:make-flags diff --git a/gnu/packages/patches/p7zip-CVE-2016-9296.patch b/gnu/packages/patches/p7zip-CVE-2016-9296.patch new file mode 100644 index 0000000000..3fa80377ad --- /dev/null +++ b/gnu/packages/patches/p7zip-CVE-2016-9296.patch @@ -0,0 +1,24 @@ +From: Robert Luberda +Date: Sat, 19 Nov 2016 08:48:08 +0100 +Subject: Fix nullptr dereference (CVE-2016-9296) + +Patch taken from https://sourceforge.net/p/p7zip/bugs/185/ +This patch file taken from Debian's patch set for p7zip +--- + CPP/7zip/Archive/7z/7zIn.cpp | 3 ++- + 1 file changed, 2 insertions(+), 1 deletion(-) + +diff --git a/CPP/7zip/Archive/7z/7zIn.cpp b/CPP/7zip/Archive/7z/7zIn.cpp +index b0c6b98..7c6dde2 100644 +--- a/CPP/7zip/Archive/7z/7zIn.cpp ++++ b/CPP/7zip/Archive/7z/7zIn.cpp +@@ -1097,7 +1097,8 @@ HRESULT CInArchive::ReadAndDecodePackedStreams( + if (CrcCalc(data, unpackSize) != folders.FolderCRCs.Vals[i]) + ThrowIncorrect(); + } +- HeadersSize += folders.PackPositions[folders.NumPackStreams]; ++ if (folders.PackPositions) ++ HeadersSize += folders.PackPositions[folders.NumPackStreams]; + return S_OK; + } + From dfb493ceed7078c7815e8ab5bd7bc4f5163acf9b Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 3 Feb 2017 22:33:49 +0200 Subject: [PATCH 017/135] gnu: abcde: Update to 2.8.1. * gnu/packages/cdrom.scm (abcde): Update to 2.8.1. --- gnu/packages/cdrom.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm index 44f4eb035a..293bf16ade 100644 --- a/gnu/packages/cdrom.scm +++ b/gnu/packages/cdrom.scm @@ -3,7 +3,7 @@ ;;; Copyright © 2013, 2014 Andreas Enge ;;; Copyright © 2015 Taylan Ulrich Bayırlı/Kammer ;;; Copyright © 2015 Paul van der Walt -;;; Copyright © 2015, 2016 Efraim Flashner +;;; Copyright © 2015, 2016, 2017 Efraim Flashner ;;; Copyright © 2016 Alex Kost ;;; Copyright © 2016 Marius Bakke ;;; @@ -294,7 +294,7 @@ from an audio CD.") (define-public abcde (package (name "abcde") - (version "2.7.2") + (version "2.8.1") (home-page "https://abcde.einval.com/") (source (origin (method url-fetch) @@ -302,7 +302,7 @@ from an audio CD.") version ".tar.gz")) (sha256 (base32 - "1pakpi41k8yd780mfp0snhia6mmwjwxk9lcrq6gynimch8b8hfda")) + "0f9bjs0phk23vry7gvh0cll9vl6kmc1y4fwwh762scfdvpbp3774")) (modules '((guix build utils))) (snippet '(substitute* "Makefile" From 33f7b5d20e6c983c6d57048f552d9c055996e9cf Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 4 Feb 2017 00:27:31 +0100 Subject: [PATCH 018/135] gnu: vim: Update to 8.0.0300. * gnu/packages/vim.scm (vim): Update to 8.0.0300. --- gnu/packages/vim.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/vim.scm b/gnu/packages/vim.scm index 1b8b962d7c..f042aba931 100644 --- a/gnu/packages/vim.scm +++ b/gnu/packages/vim.scm @@ -57,7 +57,7 @@ (define-public vim (package (name "vim") - (version "8.0.0257") + (version "8.0.0300") (source (origin (method url-fetch) (uri (string-append "https://github.com/vim/vim/archive/v" @@ -65,7 +65,7 @@ (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "05vz59iw77lmhnywfv9ihd0d895axqf2y81ddpjkn1qdspvw8ijj")))) + "04samk2bakyixbxyc3p0g6ypls45105sikibg0wc6lmak9bqjs85")))) (build-system gnu-build-system) (arguments `(#:test-target "test" From cf98d342b0899be3b72438d2dd5a2350f0f78f33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 3 Feb 2017 09:50:09 +0100 Subject: [PATCH 019/135] activation: Set the right owner for home directories. This fixes a regression introduced in ae763b5b0b7d5e7316a3d0efe991fe8ab2261031 whereby home directories and skeletons would be root-owned. * gnu/build/activation.scm (copy-account-skeletons): Make 'directory' a keyword parameter. Add #:uid and #:gid and honor them. [set-owner]: New procedure. (activate-user-home): Add call to 'getpw' and 'chown'. Pass UID and GID to 'copy-account-skeletons'. * gnu/tests/base.scm (run-basic-test)["skeletons in home directories"]: Test file ownership under HOME. --- gnu/build/activation.scm | 26 +++++++++++++++++++++----- gnu/tests/base.scm | 36 ++++++++++++++++++++++++++++-------- 2 files changed, 49 insertions(+), 13 deletions(-) diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index cff176e82a..e58304e83b 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -85,16 +85,27 @@ (chmod file (logior #o600 (stat:perms stat))))) (define* (copy-account-skeletons home - #:optional (directory %skeleton-directory)) - "Copy the account skeletons from DIRECTORY to HOME." + #:key + (directory %skeleton-directory) + uid gid) + "Copy the account skeletons from DIRECTORY to HOME. When UID is an integer, +make it the owner of all the files created; likewise for GID." + (define (set-owner file) + (when (or uid gid) + (chown file (or uid -1) (or gid -1)))) + (let ((files (scandir directory (negate dot-or-dot-dot?) string Date: Fri, 3 Feb 2017 11:26:25 +0100 Subject: [PATCH 020/135] file-systems: Remove dependency on (guix store). (gnu system file-systems) is used on the "build" side since commit 5970e8e248f6327c41c83b86bb2c89be7c3b1b4e. * gnu/system/file-systems.scm: Remove dependency on (guix store). (%store-prefix): New procedure. * tests/file-systems.scm ("does not pull (guix config)"): New test. --- gnu/system/file-systems.scm | 15 ++++++++++++++- tests/file-systems.scm | 8 ++++++++ 2 files changed, 22 insertions(+), 1 deletion(-) diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index b2721f2389..708d53d0a1 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -19,7 +19,6 @@ (define-module (gnu system file-systems) #:use-module (ice-9 match) #:use-module (guix records) - #:use-module (guix store) #:use-module ((gnu build file-systems) #:select (string->uuid uuid->string)) #:re-export (string->uuid @@ -97,6 +96,20 @@ (dependencies file-system-dependencies ; list of (default '()))) ; or +;; Note: This module is used both on the build side and on the host side. +;; Arrange not to pull (guix store) and (guix config) because the latter +;; differs from user to user. +(define (%store-prefix) + "Return the store prefix." + (cond ((resolve-module '(guix store) #:ensure #f) + => + (lambda (store) + ((module-ref store '%store-prefix)))) + ((getenv "NIX_STORE") + => identity) + (else + "/gnu/store"))) + (define %not-slash (char-set-complement (char-set #\/))) diff --git a/tests/file-systems.scm b/tests/file-systems.scm index fd1599e132..467ee8ca5d 100644 --- a/tests/file-systems.scm +++ b/tests/file-systems.scm @@ -18,6 +18,7 @@ (define-module (test-file-systems) #:use-module (guix store) + #:use-module (guix modules) #:use-module (gnu system file-systems) #:use-module (srfi srfi-64) #:use-module (rnrs bytevectors)) @@ -72,4 +73,11 @@ (device "/foo") (flags '(bind-mount read-only))))))))) +(test-assert "does not pull (guix config)" + ;; This module is meant both for the host side and "build side", so make + ;; sure it doesn't pull in (guix config), which depends on the user's + ;; config. + (not (member '(guix config) + (source-module-closure '((gnu system file-systems)))))) + (test-end) From 182dde82edd9e532c2a90616127cb09056648914 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Sat, 4 Feb 2017 15:26:26 +1000 Subject: [PATCH 021/135] gnu: cddlib: Fix source URI. * gnu/packages/maths.scm (cddlib)[source]: Update source URI. --- gnu/packages/maths.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index 8892ab0c56..c9de4f4210 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -313,7 +313,7 @@ integer programming problems and computes Markov bases for statistics.") (source (origin (method url-fetch) - (uri (string-append "ftp://ftp.ifor.math.ethz.ch/pub/fukuda/cdd/cddlib-" + (uri (string-append "ftp://ftp.math.ethz.ch/users/fukudak/cdd/cddlib-" (string-delete #\. version) ".tar.gz")) (sha256 (base32 From 38eefbb185289cd0e69b2749adc5440dada04a05 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 4 Feb 2017 10:14:43 +0100 Subject: [PATCH 022/135] gnu: wget: Update to 1.19. * gnu/packages/wget.scm (wget): Update to 1.19. [home-page]: Use HTTPS. --- gnu/packages/wget.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/wget.scm b/gnu/packages/wget.scm index 72aab86c14..962d689ebf 100644 --- a/gnu/packages/wget.scm +++ b/gnu/packages/wget.scm @@ -33,7 +33,7 @@ (define-public wget (package (name "wget") - (version "1.18") + (version "1.19") (source (origin (method url-fetch) @@ -41,7 +41,7 @@ version ".tar.xz")) (sha256 (base32 - "1hcwx8ww3sxzdskkx3l7q70a7wd6569yrnjkw9pw013cf9smpddm")))) + "1133c14g19ysv74j7am66jwgwrr0rdn0rdyxw7rikbnsyjxmf48g")))) (build-system gnu-build-system) (inputs `(("gnutls" ,gnutls) @@ -53,7 +53,7 @@ ("python" ,python) ;for testenv suite ("perl-http-daemon" ,perl-http-daemon) ("perl-io-socket-ssl" ,perl-io-socket-ssl))) - (home-page "http://www.gnu.org/software/wget/") + (home-page "https://www.gnu.org/software/wget/") (synopsis "Non-interactive command-line utility for downloading files") (description "GNU Wget is a non-interactive tool for fetching files using the HTTP, From 744dcb4910183e2e62e7976dd63d28473d57057b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 4 Feb 2017 10:43:45 +0100 Subject: [PATCH 023/135] gnu: redshift: Remove uneeded input. This is a followup to b4c400a75c9f432820146dfe24fcebdfbc276e4b. * gnu/packages/xdisorg.scm (redshift): Remove LIBJPEG. --- gnu/packages/xdisorg.scm | 1 - 1 file changed, 1 deletion(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index ee83934ca0..d687d3a180 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -844,7 +844,6 @@ the X.Org X Server version 1.7 and later (X11R7.5 or later).") ("libx11" ,libx11) ("libxcb" ,libxcb) ("libxxf86vm" ,libxxf86vm) - ("libjpeg" ,libjpeg) ("glib" ,glib))) ;for Geoclue2 support (home-page "https://github.com/jonls/redshift") (synopsis "Adjust the color temperature of your screen") From 706998e73ad451368e443c94fe001ef0c64e08df Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 4 Feb 2017 10:45:41 +0100 Subject: [PATCH 024/135] gnu: xscreensaver: Update license URI. * gnu/packages/xdisorg.scm (xscreensaver)[license]: Point to current URL. --- gnu/packages/xdisorg.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/xdisorg.scm b/gnu/packages/xdisorg.scm index d687d3a180..510684a6c4 100644 --- a/gnu/packages/xdisorg.scm +++ b/gnu/packages/xdisorg.scm @@ -919,7 +919,7 @@ demos. It also acts as a nice screen locker.") (license (license:non-copyleft (string-append "http://metadata.ftp-master.debian.org/changelogs/" - "/main/x/xscreensaver/xscreensaver_5.34-2_copyright"))))) + "/main/x/xscreensaver/xscreensaver_5.36-1_copyright"))))) (define-public xdpyprobe (package From 1ae60db842b13fb3057d78058757e649657f8980 Mon Sep 17 00:00:00 2001 From: ng0 Date: Fri, 3 Feb 2017 16:56:24 +0000 Subject: [PATCH 025/135] gnu: Add python-lz4. * gnu/packages/compression.scm (python-lz4): New variable. --- gnu/packages/compression.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 9ef255a42d..09dac4d7b0 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -14,6 +14,7 @@ ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Marius Bakke +;;; Copyright © 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -38,6 +39,7 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system perl) + #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages assembly) #:use-module (gnu packages autotools) @@ -45,6 +47,7 @@ #:use-module (gnu packages base) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) + #:use-module (gnu packages python) #:use-module (gnu packages valgrind) #:use-module (ice-9 match) #:use-module ((srfi srfi-1) #:select (last))) @@ -633,6 +636,31 @@ time for compression ratio.") ;; line interface programs (lz4, fullbench, fuzzer, datagen) are GPL2+. (license (list license:bsd-2 license:gpl2+)))) +(define-public python-lz4 + (package + (name "python-lz4") + (version "0.8.2") + (source + (origin + (method url-fetch) + (uri (pypi-uri "lz4" version)) + (sha256 + (base32 + "1irad4sq4hdr30fr53smvv3zzk4rddcf9b4jx19w8s9xsxhr1x3b")))) + (build-system python-build-system) + (native-inputs + `(("python-nose" ,python-nose))) + (home-page "https://github.com/python-lz4/python-lz4") + (synopsis "LZ4 Bindings for Python") + (description + "This package provides python bindings for the lz4 compression library +by Yann Collet. The project contains bindings for the LZ4 block format and +the LZ4 frame format.") + (license license:bsd-3))) + +(define-public python2-lz4 + (package-with-python2 python-lz4)) + (define-public squashfs-tools (package (name "squashfs-tools") From 1a0a5509dd169cc87c611c6c5fe38c787d1afe89 Mon Sep 17 00:00:00 2001 From: ng0 Date: Fri, 3 Feb 2017 16:56:25 +0000 Subject: [PATCH 026/135] gnu: Add python-lzo. * gnu/packages/compression.scm (python-lzo): New variable. Co-authored-by: Danny Milosavljevic --- gnu/packages/compression.scm | 38 ++++++++++++++++++++++++++++++++++++ 1 file changed, 38 insertions(+) diff --git a/gnu/packages/compression.scm b/gnu/packages/compression.scm index 09dac4d7b0..9897883184 100644 --- a/gnu/packages/compression.scm +++ b/gnu/packages/compression.scm @@ -365,6 +365,44 @@ LZO is written in ANSI C. Both the source code and the compressed data format are designed to be portable across platforms.") (license license:gpl2+))) +(define-public python-lzo + (package + (name "python-lzo") + (version "1.11") + (source + (origin + (method url-fetch) + (uri (pypi-uri "python-lzo" version)) + (sha256 + (base32 + "11p3ifg14p086byhhin6azx5svlkg8dzw2b5abixik97xd6fm81q")))) + (build-system python-build-system) + (arguments + `(#:test-target "check" + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-setuppy + (lambda _ + (substitute* "setup.py" + (("include_dirs.append\\(.*\\)") + (string-append "include_dirs.append('" + (assoc-ref %build-inputs "lzo") + "/include/lzo" + "')"))) + #t))))) + (inputs + `(("lzo" ,lzo))) + (home-page "https://github.com/jd-boyd/python-lzo") + (synopsis "Python bindings for the LZO data compression library") + (description + "Python-LZO provides Python bindings for LZO, i.e. you can access +the LZO library from your Python scripts thereby compressing ordinary +Python strings.") + (license license:gpl2+))) + +(define-public python2-lzo + (package-with-python2 python-lzo)) + (define-public lzop (package (name "lzop") From d1606983195a95963ea6cc0ca8c963b5df1e0b61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jos=C3=A9=20Miguel=20S=C3=A1nchez=20Garc=C3=ADa?= Date: Sat, 4 Feb 2017 13:52:00 +0100 Subject: [PATCH 027/135] gnu: youtube-dl: Update to 2017.02.01 * gnu/packages/video.scm (youtube-dl): Update to 2017.02.01. --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index ccc5760632..8cbbb9d76d 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -970,7 +970,7 @@ access to mpv's powerful playback capabilities.") (define-public youtube-dl (package (name "youtube-dl") - (version "2017.01.29") + (version "2017.02.01") (source (origin (method url-fetch) (uri (string-append "https://yt-dl.org/downloads/" @@ -978,7 +978,7 @@ access to mpv's powerful playback capabilities.") version ".tar.gz")) (sha256 (base32 - "0visxc4rb6kw4hjcgcv5llis08z0syhian1m5hr1fdbz4w73hx9l")))) + "1jkra0kgqg9ks76hwfcfsdaiknr9w8vavja0rc81ia644085axzz")))) (build-system python-build-system) (arguments ;; The problem here is that the directory for the man page and completion From f719fe52190ae06bf0e9c751706a086f182f009e Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 5 Feb 2017 01:20:55 -0500 Subject: [PATCH 028/135] gnu: linux-libre@4.4: Update to 4.4.47. * gnu/packages/linux.scm (linux-libre-4.4): Update to 4.4.47. --- gnu/packages/linux.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 35b0750966..9f1854fa05 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -341,8 +341,8 @@ It has been modified to remove all non-free binary blobs.") #:configuration-file kernel-config)) (define-public linux-libre-4.4 - (make-linux-libre "4.4.46" - "0b1gc95spdb989zrb1ww04ik5xgbaxj906ka1dspnvxhz471zcf3" + (make-linux-libre "4.4.47" + "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs" %intel-compatible-systems #:configuration-file kernel-config)) From 2b742c2bb0651c46853dda0272d909e849e8632b Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Sun, 5 Feb 2017 01:22:44 -0500 Subject: [PATCH 029/135] gnu: linux-libre: Update to 4.9.8. * gnu/packages/linux.scm (%linux-libre-version, %linux-libre-hash) (linux-libre): Update to 4.9.8. --- gnu/packages/linux.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 9f1854fa05..08d8c50fd4 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -335,8 +335,8 @@ It has been modified to remove all non-free binary blobs.") (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) (define-public linux-libre - (make-linux-libre "4.9.7" - "1qhdgniwfa3f57pmrc8jzhypr2fzfilag3gwvi0c4nf2sfgp2670" + (make-linux-libre "4.9.8" + "09cx8l0bbccz14ajbawqaq4ah9jpld44pkb61483xwdp9v2sihm3" %intel-compatible-systems #:configuration-file kernel-config)) @@ -353,8 +353,8 @@ It has been modified to remove all non-free binary blobs.") #:configuration-file kernel-config)) ;; Avoid rebuilding kernel variants when there is a minor version bump. -(define %linux-libre-version "4.9.7") -(define %linux-libre-hash "1qhdgniwfa3f57pmrc8jzhypr2fzfilag3gwvi0c4nf2sfgp2670") +(define %linux-libre-version "4.9.8") +(define %linux-libre-hash "09cx8l0bbccz14ajbawqaq4ah9jpld44pkb61483xwdp9v2sihm3") (define-public linux-libre-arm-generic (make-linux-libre %linux-libre-version From 0418ff7a37c02b314eda67db177565db24ca34f4 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 4 Feb 2017 17:08:01 +0100 Subject: [PATCH 030/135] gnu: libidn2: Update to 0.16. * gnu/packages/libidn.scm (libidn2): Update to 0.16. [inputs]: Add libunistring. --- gnu/packages/libidn.scm | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/gnu/packages/libidn.scm b/gnu/packages/libidn.scm index bc67387b29..3af19b1c70 100644 --- a/gnu/packages/libidn.scm +++ b/gnu/packages/libidn.scm @@ -19,6 +19,7 @@ (define-module (gnu packages libidn) #:use-module (gnu packages) + #:use-module (gnu packages libunistring) #:use-module (guix licenses) #:use-module (guix packages) #:use-module (guix download) @@ -51,14 +52,16 @@ Java libraries.") (define-public libidn2 (package (name "libidn2") - (version "0.11") + (version "0.16") (source (origin (method url-fetch) (uri (string-append "ftp://alpha.gnu.org/gnu/libidn/libidn2-" version ".tar.gz")) (sha256 (base32 - "1zxzhzx14q2b1xkx746pz4lawvqd8d055yy84n52ndwb4pf7nfax")))) + "13v8kh4d5nfkymai88zlw3h7k4x9khrpdpv97waf4ah8ykzrxb9g")))) + (inputs + `(("libunistring" ,libunistring))) (build-system gnu-build-system) (synopsis "Internationalized domain name library for IDNA2008") (description "Libidn2 is an internationalized domain library implementing From dd2c73f6a0ee6365849e6b442e9d8768a77c0599 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Sat, 4 Feb 2017 17:08:27 +0100 Subject: [PATCH 031/135] gnu: wget: Use libidn2. Suggested by Efraim Flashner . Fixes support for internationalized domain names. * gnu/packages/wget.scm (wget)[inputs]: Replace libidn with libidn2. --- gnu/packages/wget.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/wget.scm b/gnu/packages/wget.scm index 962d689ebf..a1612f5f7d 100644 --- a/gnu/packages/wget.scm +++ b/gnu/packages/wget.scm @@ -45,7 +45,7 @@ (build-system gnu-build-system) (inputs `(("gnutls" ,gnutls) - ("libidn" ,libidn) + ("libidn2" ,libidn2) ("libpsl" ,libpsl))) (native-inputs `(("pkg-config" ,pkg-config) From 2d92eca15499b6a1aaaac3ecd63cdd2e5c39308f Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 6 Feb 2017 03:11:51 +0100 Subject: [PATCH 032/135] gnu: imagemagick: Update to 6.9.7-7. * gnu/packages/imagemagick.scm (imagemagick): Update to 6.9.7-7. --- gnu/packages/imagemagick.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index f956f9cb36..a58e83d725 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm @@ -46,14 +46,14 @@ ;; The 7 release series has an incompatible API, while the 6 series is still ;; maintained. Don't update to 7 until we've made sure that the ImageMagick ;; users are ready for the 7-series API. - (version "6.9.7-5") + (version "6.9.7-7") (source (origin (method url-fetch) (uri (string-append "mirror://imagemagick/ImageMagick-" version ".tar.xz")) (sha256 (base32 - "013f3g9pvvqgxchdkjxx4nr80sfq51nmkc3ij39m2xzyc438bq8c")))) + "02x463z31j449pfm8czb7jlpkd3nx4a3yyjxq3bhpjfq13i20d62")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--with-frozenpaths" "--without-gcc-arch") From 40c4e3bbdaec62ea27eded7bbdd90d0522ddbc97 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 1 Feb 2017 16:16:52 +0100 Subject: [PATCH 033/135] gnu: u-boot: Use scandir. * gnu/packages/u-boot.scm (make-u-boot-package): Modify. --- gnu/packages/u-boot.scm | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm index 3468fe5a78..685a258516 100644 --- a/gnu/packages/u-boot.scm +++ b/gnu/packages/u-boot.scm @@ -93,7 +93,8 @@ also initializes the boards (RAM etc).") ("cross-binutils" ,(cross-binutils triplet)) ,@(package-native-inputs u-boot))) (arguments - `(#:test-target "test" + `(#:modules ((ice-9 ftw) (guix build utils) (guix build gnu-build-system)) + #:test-target "test" #:make-flags (list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-")) #:phases @@ -105,14 +106,14 @@ also initializes the boards (RAM etc).") (zero? (apply system* "make" `(,@make-flags ,config-name))) (begin (display "Invalid board name. Valid board names are:") - (let ((dir (opendir "configs")) - (suffix-length (string-length "_defconfig"))) - (do ((file-name (readdir dir) (readdir dir))) - ((eof-object? file-name)) - (when (string-suffix? "_defconfig" file-name) - (format #t "- ~A\n" - (string-drop-right file-name suffix-length)))) - (closedir dir)) + (let ((suffix-len (string-length "_defconfig"))) + (scandir "configs" + (lambda (file-name) + (when (string-suffix? "_defconfig" file-name) + (format #t + "- ~A\n" + (string-drop-right file-name + suffix-len)))))) #f))))) (replace 'install (lambda* (#:key outputs make-flags #:allow-other-keys) From 15308f6dc38c2f429c8be671c2ba3c565571bff7 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 6 Feb 2017 10:00:24 +0100 Subject: [PATCH 034/135] gnu: u-boot: Update to 2017.01. * gnu/packages/u-boot.scm (u-boot): Update to 2017.01. --- gnu/packages/u-boot.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm index 685a258516..bcfe059ee1 100644 --- a/gnu/packages/u-boot.scm +++ b/gnu/packages/u-boot.scm @@ -63,7 +63,7 @@ tree binary files. These are board description files used by Linux and BSD.") (define u-boot (package (name "u-boot") - (version "2016.07") + (version "2017.01") (source (origin (method url-fetch) (uri (string-append @@ -71,7 +71,7 @@ tree binary files. These are board description files used by Linux and BSD.") "u-boot-" version ".tar.bz2")) (sha256 (base32 - "0lqj4ckmfqiap8mc6z2d5albs3g2h5mzccbn60hsgxhabhibfkwp")))) + "1wpc51jm3zyibgcr78jng2yksqvrya76bxgsr4pcyjrsz5sm2hkc")))) (native-inputs `(("bc" ,bc) ("dtc" ,dtc) From e69dc545594d9a16de2c6cff4f41598cc3600d3c Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 6 Feb 2017 10:24:24 +0100 Subject: [PATCH 035/135] gnu: xonsh: Update to 0.5.3. * gnu/packages/shell.scm (xonsh): Update to 0.5.3. --- gnu/packages/shells.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/shells.scm b/gnu/packages/shells.scm index a9b2e74c95..a7a7fbce52 100644 --- a/gnu/packages/shells.scm +++ b/gnu/packages/shells.scm @@ -349,14 +349,14 @@ ksh, and tcsh.") (define-public xonsh (package (name "xonsh") - (version "0.5.2") + (version "0.5.3") (source (origin (method url-fetch) (uri (pypi-uri "xonsh" version)) (sha256 (base32 - "13ndyq9cal2j93qqbjyp2jn3cshiavdxsaj2qjzm6mas0gzywmf0")) + "1pb1am26wl21g798lpl091j95900py7jj4g98rs9qkhywiln4z4q")) (modules '((guix build utils))) (snippet `(begin From 168aba297866295d96779239e9662821ce9e66ae Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 4 Feb 2017 18:10:14 +0100 Subject: [PATCH 036/135] linux-container: Do not rely on 'isatty?'. This avoids problems where 'isatty?' return #t but 'ttyname' fails with ENOTTY or such. * gnu/build/linux-container.scm (mount-file-systems): Remove call of 'isatty?'. Directly call 'ttyname' and catch 'system-error'. --- gnu/build/linux-container.scm | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index b71d6a5f88..cd71239527 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm @@ -128,13 +128,19 @@ for the process." "/dev/fuse")) ;; Setup the container's /dev/console by bind mounting the pseudo-terminal - ;; associated with standard input. - (let ((in (current-input-port)) - (console (scope "/dev/console"))) - (when (isatty? in) + ;; associated with standard input when there is one. + (let* ((in (current-input-port)) + (tty (catch 'system-error + (lambda () + ;; This call throws if IN does not correspond to a tty. + ;; This is more reliable than 'isatty?'. + (ttyname in)) + (const #f))) + (console (scope "/dev/console"))) + (when tty (touch console) (chmod console #o600) - (bind-mount (ttyname in) console))) + (bind-mount tty console))) ;; Setup standard input/output/error. (symlink "/proc/self/fd" (scope "/dev/fd")) From 36c4917c910f434524aae32725582d5bc51a44e0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Sat, 4 Feb 2017 18:14:12 +0100 Subject: [PATCH 037/135] linux-container: Add comment on exception handling. * gnu/build/linux-container.scm (run-container): Add note about writing the exceptions. --- gnu/build/linux-container.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index cd71239527..dd56a79232 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm @@ -235,6 +235,8 @@ host user identifiers to map into the user namespace." namespaces))) (lambda args ;; Forward the exception to the parent process. + ;; FIXME: SRFI-35 conditions and non-trivial objects + ;; cannot be 'read' so they shouldn't be written as is. (write args child) (primitive-exit 3)))) ;; TODO: Manage capabilities. From 1ca0f20a7ded5de185f6dee93f6da30eb62a9188 Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sat, 4 Feb 2017 17:40:34 +0000 Subject: [PATCH 038/135] config-daemon.ac: detect host AR MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The problem is seen when we try to use explicit host: ./configure --prefix=/usr --localstatedir=/var/lib --host=x86_64-pc-linux-gnu make V=1 Before the change: ar cru libstore.a nix/libstore/libstore_a-gc.o After the change: x86_64-pc-linux-gnu-ar cru libstore.a * config-daemon.ac: use AM_PROG_AR to detect host AR Signed-off-by: Sergei Trofimovich Signed-off-by: Ludovic Courtès --- config-daemon.ac | 1 + 1 file changed, 1 insertion(+) diff --git a/config-daemon.ac b/config-daemon.ac index 056c939e39..42b59819d3 100644 --- a/config-daemon.ac +++ b/config-daemon.ac @@ -5,6 +5,7 @@ AC_MSG_RESULT([$guix_build_daemon]) dnl C++ environment. This macro must be used unconditionnaly. AC_PROG_CXX +AM_PROG_AR AC_LANG([C++]) if test "x$guix_build_daemon" = "xyes"; then From cc1c3977d54728280ec6649e1883912b1226e63f Mon Sep 17 00:00:00 2001 From: Sergei Trofimovich Date: Sun, 5 Feb 2017 10:34:47 +0000 Subject: [PATCH 039/135] gnu: Add re2c. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/re2c.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add re2c.scm. CC: ng0 Signed-off-by: Sergei Trofimovich Signed-off-by: Ludovic Courtès --- gnu/local.mk | 1 + gnu/packages/re2c.scm | 47 +++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 48 insertions(+) create mode 100644 gnu/packages/re2c.scm diff --git a/gnu/local.mk b/gnu/local.mk index 0948321c9c..5c1634e021 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -318,6 +318,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/ratpoison.scm \ %D%/packages/rdesktop.scm \ %D%/packages/rdf.scm \ + %D%/packages/re2c.scm \ %D%/packages/readline.scm \ %D%/packages/regex.scm \ %D%/packages/rrdtool.scm \ diff --git a/gnu/packages/re2c.scm b/gnu/packages/re2c.scm new file mode 100644 index 0000000000..c7f2966384 --- /dev/null +++ b/gnu/packages/re2c.scm @@ -0,0 +1,47 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Sergei Trofimovich +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu packages re2c) + #:use-module (guix licenses) + #:use-module (guix packages) + #:use-module (guix download) + #:use-module (guix build-system gnu)) + +(define-public re2c + (package + (name "re2c") + (version "0.16") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/skvadrik/" name + "/releases/download/" version "/" + name "-" version ".tar.gz")) + (sha256 + (base32 + "114y0s4vmzip4hkf4cbz4yv8s498gzaylnphbzmwqhbn55j2bha8")))) + (build-system gnu-build-system) + (home-page "http://re2c.org/") + (synopsis "Lexer generator for C/C++") + (description + "@code{re2c} generates minimalistic hard-coded state machine (as opposed +to full-featured table-based lexers). Flexible API allows generated code +to be wired into virtually any environment. Instead of exposing traditional +@code{yylex()} style API, re2c exposes its internals. Be sure to take a look +at examples, they cover a lot of real-world cases and shed some light on dark +corners of re2c API.") + (license public-domain))) From 416c57f0711295a83dbde37b69e42fd899d08b47 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 6 Feb 2017 11:58:23 +0100 Subject: [PATCH 040/135] gnu: ddrescue: Update to 1.22. * gnu/packages/disk.scm (ddrescue): Update to 1.22. [home-page]: Use HTTPS. --- gnu/packages/disk.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index a4bb0be134..90e68c2916 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -154,7 +154,7 @@ tables.") (define-public ddrescue (package (name "ddrescue") - (version "1.21") + (version "1.22") (source (origin (method url-fetch) @@ -162,9 +162,9 @@ tables.") version ".tar.lz")) (sha256 (base32 - "1b71hb42lh33y9843nd1mxlwkk9qh9ajvnz6ivzd1jq9lav4x7ph")))) + "19qhx9ggkkjl0g3a88g501wmybkj1y4n5lm5kp0km0blh0p7p189")))) (build-system gnu-build-system) - (home-page "http://www.gnu.org/software/ddrescue/ddrescue.html") + (home-page "https://www.gnu.org/software/ddrescue/ddrescue.html") (synopsis "Data recovery utility") (native-inputs `(("lzip" ,lzip))) (description From 6edc15798df14145c154b91c29847eb5a77f6b43 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 6 Feb 2017 13:02:20 +0100 Subject: [PATCH 041/135] gnu: tcpdump: Fetch source from tcpdump.org. * gnu/packages/admin.scm (tcpdump)[source]: Remove temporary alternate URL. --- gnu/packages/admin.scm | 14 ++------------ 1 file changed, 2 insertions(+), 12 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index be03f64302..16cecd9b8a 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -636,18 +636,8 @@ network statistics collection, security monitoring, network debugging, etc.") (version "4.9.0") (source (origin (method url-fetch) - ;; We use this Debian URL while the upstream URL is still - ;; officially private. This is the result of a botched - ;; coordinated release of tcpdump 4.9.0. I verified with - ;; the tcpdump maintainers that the upstream URL provides - ;; the same data as this Debian URL. - (uri - (list - (string-append "http://http.debian.net/debian/pool/main/t/" - name "/" name "_" version ".orig.tar.gz") - (string-append "http://www.tcpdump.org/release/tcpdump-" - version ".tar.gz"))) - (file-name (string-append name "-" version ".tar.gz")) + (uri (string-append "http://www.tcpdump.org/release/tcpdump-" + version ".tar.gz")) (sha256 (base32 "0pjsxsy8l71i813sa934cwf1ryp9xbr7nxwsvnzavjdirchq3sga")))) From 686d425904f53af1c6e0f1fa7282fd00343a5725 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Fri, 3 Feb 2017 15:03:36 +0100 Subject: [PATCH 042/135] gnu: certbot, python-acme: Update to 0.11.1. * gnu/packages/tls.scm (python-acme, python2-acme): Update to 0.11.1. (certbot): Update to 0.11.1. [version]: Use python-acme's version. --- gnu/packages/tls.scm | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 5253381830..b28eb164b0 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -506,13 +506,14 @@ security, and applying best practice development processes.") (define-public python-acme (package (name "python-acme") - (version "0.10.2") + ;; Remember to update the hash of certbot when updating python-acme. + (version "0.11.1") (source (origin (method url-fetch) (uri (pypi-uri "acme" version)) (sha256 (base32 - "0y6y8d66yvwdcby96g0dlqqwy72b81yh6hws4va8r7w4aribcrb4")))) + "0kk95iqxygrg0cd66kq8kbyalg2x5pz9hn1175cgwgf1vy72adfv")))) (build-system python-build-system) (arguments `(#:phases @@ -555,13 +556,15 @@ security, and applying best practice development processes.") (define-public certbot (package (name "certbot") - (version "0.10.2") + ;; Certbot and python-acme are developed in the same repository, and their + ;; versions should remain synchronized. + (version (package-version python-acme)) (source (origin (method url-fetch) (uri (pypi-uri name version)) (sha256 (base32 - "0c8nidbbq8p4rjhcrw31saw04n5rz4zgr08chbch17gw03hrqwik")))) + "1wis5kgqcsrs60kkcmbrbx8z9yasmwa6lg9ir5im232hdm4285vc")))) (build-system python-build-system) (arguments `(#:python ,python-2 From d846834fc2b2f76aa2e258685bc211edd31866c5 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 6 Feb 2017 12:18:38 +0100 Subject: [PATCH 043/135] gnu: grub: Update to 2.02rc1. * gnu/packages/grub.scm (grub, grub-efi): Update to 2.02rc1. [arguments]: Don't disable grub_func_test. Remove #:configure-flags. --- gnu/packages/grub.scm | 19 +++++-------------- 1 file changed, 5 insertions(+), 14 deletions(-) diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 3658f221ce..25c2d8076b 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -3,6 +3,7 @@ ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2016 Jan Nieuwenhuizen +;;; Copyright © 2016, 2017 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -52,23 +53,20 @@ (define-public grub (package (name "grub") - (version "2.02beta3") + (version "2.02rc1") (source (origin (method url-fetch) (uri (string-append "ftp://alpha.gnu.org/gnu/grub/grub-" - "2.02~beta3" + "2.02~rc1" ".tar.xz")) (file-name (string-append name "-" version ".tar.xz")) (sha256 (base32 - "18ddwnw0vxs7zigvah0g6a5z5vvlz0p8fjglxv1h59sjbrakvv1h")))) + "0y02v19x9sb5jvj740f604vvi5j1rx8pily1jk0l64bdp7lkjlj4")))) (build-system gnu-build-system) (arguments - '(;; Two warnings: suggest braces, signed/unsigned comparison. - #:configure-flags '("--disable-werror") - - #:phases (modify-phases %standard-phases + '(#:phases (modify-phases %standard-phases (add-after 'unpack 'patch-stuff (lambda* (#:key inputs #:allow-other-keys) (substitute* "grub-core/Makefile.in" @@ -87,13 +85,6 @@ ;; Make the font visible. (copy-file (assoc-ref inputs "unifont") "unifont.bdf.gz") (system* "gunzip" "unifont.bdf.gz") - - ;; We hit an assertion failure in - ;; grub-core/tests/video_checksum.c, as reported at - ;; . - ;; Disable this test for now. - (substitute* "tests/grub_func_test.in" - (("set -e") "exit 77\nset -e")) #t))))) (inputs `(("gettext" ,gettext-minimal) From 5f0f368630ba4c69e902aeab64edeb3d9f94b9b5 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 6 Feb 2017 12:54:57 +0100 Subject: [PATCH 044/135] gnu: dosfstools: Update to 4.1. * gnu/packages/disk.scm (dosfstools): Update to 4.1. [arguments]: Enable tests. [native-inputs]: Add VIM. --- gnu/packages/disk.scm | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/gnu/packages/disk.scm b/gnu/packages/disk.scm index 90e68c2916..4cf9607a43 100644 --- a/gnu/packages/disk.scm +++ b/gnu/packages/disk.scm @@ -6,7 +6,7 @@ ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016 Roel Janssen -;;; Copyright © 2016 Marius Bakke +;;; Copyright © 2016, 2017 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +45,7 @@ #:use-module (gnu packages readline) #:use-module (gnu packages guile) #:use-module (gnu packages compression) + #:use-module (gnu packages vim) #:use-module (gnu packages xml)) (define-public parted @@ -177,7 +178,7 @@ to recover data more efficiently by only reading the necessary blocks.") (define-public dosfstools (package (name "dosfstools") - (version "4.0") + (version "4.1") (source (origin (method url-fetch) @@ -186,12 +187,13 @@ to recover data more efficiently by only reading the necessary blocks.") name "-" version ".tar.xz")) (sha256 (base32 - "1bvxbv1w6vhbx0nx7ygp700wq5k2hjv0hm7w0kz1x7amaf4p6dwh")))) + "0wy13i3i4x2bw1hf5m4fd0myh61f9bcrs035fdlf6gyc1jksrcp6")))) (build-system gnu-build-system) (arguments `(#:make-flags (list (string-append "PREFIX=" %output) - "CC=gcc") - #:tests? #f)) ;no tests + "CC=gcc"))) + (native-inputs + `(("xxd" ,vim))) ; for tests (home-page "https://github.com/dosfstools/dosfstools") (synopsis "Utilities for making and checking MS-DOS FAT file systems") (description From a24fda8114eb49595adb6f08bdb44da0a135e0cd Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Mon, 6 Feb 2017 17:14:53 +0100 Subject: [PATCH 045/135] gnu: bdb: Correct license. * gnu/packages/databases.scm (bdb)[license]: Replace with up-to-date information. Move previous contents to ... (bdb-5.3)[license]: ... here. --- gnu/packages/databases.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 38fcaa1e6d..8972c283de 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -65,7 +65,7 @@ #:use-module (gnu packages jemalloc) #:use-module ((guix licenses) #:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft - bsd-2 bsd-3 public-domain asl2.0)) + agpl3+ bsd-2 bsd-3 public-domain asl2.0)) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -194,8 +194,9 @@ and provides interfaces to the traditional file format.") (description "Berkeley DB is an embeddable database allowing developers the choice of SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") - (license (non-copyleft "file://LICENSE" - "See LICENSE in the distribution.")) + ;; Starting with version 6, BDB is distributed under AGPL3. Many individual + ;; files are covered by the 3-clause BSD license. + (license (list agpl3+ bsd-3)) (home-page "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html"))) @@ -203,6 +204,8 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") (package (inherit bdb) (name "bdb") (version "5.3.28") + (license (non-copyleft "file://LICENSE" + "See LICENSE in the distribution.")) (source (origin (method url-fetch) (uri (string-append "http://download.oracle.com/berkeley-db/db-" From 7597478e2e731c09890b25ff0b817d2d7c45d01f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 15:42:00 +0100 Subject: [PATCH 046/135] file-systems: Add '%network-configuration-files' and '%network-file-mappings'. * gnu/system/file-systems.scm (%network-configuration-files) (%network-file-mappings): New variables. * guix/scripts/environment.scm (%network-configuration-files): Remove. (launch-environment/container): Refer to '%network-file-mappings' instead of calling 'filter-map'. --- gnu/system/file-systems.scm | 24 +++++++++++++++++++++++- guix/scripts/environment.scm | 23 +---------------------- 2 files changed, 24 insertions(+), 23 deletions(-) diff --git a/gnu/system/file-systems.scm b/gnu/system/file-systems.scm index 708d53d0a1..7011a279d3 100644 --- a/gnu/system/file-systems.scm +++ b/gnu/system/file-systems.scm @@ -18,6 +18,7 @@ (define-module (gnu system file-systems) #:use-module (ice-9 match) + #:use-module (srfi srfi-1) #:use-module (guix records) #:use-module ((gnu build file-systems) #:select (string->uuid uuid->string)) @@ -64,7 +65,9 @@ file-system-mapping->bind-mount - %store-mapping)) + %store-mapping + %network-configuration-files + %network-file-mappings)) ;;; Commentary: ;;; @@ -389,4 +392,23 @@ a bind mount." (target (%store-prefix)) (writable? #f))) +(define %network-configuration-files + ;; List of essential network configuration files. + '("/etc/resolv.conf" + "/etc/nsswitch.conf" + "/etc/services" + "/etc/hosts")) + +(define %network-file-mappings + ;; List of file mappings for essential network files. + (filter-map (lambda (file) + (file-system-mapping + (source file) + (target file) + ;; XXX: On some GNU/Linux systems, /etc/resolv.conf is a + ;; symlink to a file in a tmpfs which, for an unknown reason, + ;; cannot be bind mounted read-only within the container. + (writable? (string=? file "/etc/resolv.conf")))) + %network-configuration-files)) + ;;; file-systems.scm ends here diff --git a/guix/scripts/environment.scm b/guix/scripts/environment.scm index 0a1205d087..44f490043c 100644 --- a/guix/scripts/environment.scm +++ b/guix/scripts/environment.scm @@ -60,12 +60,6 @@ directories in PROFILE, the store path of a profile." (define %default-shell (or (getenv "SHELL") "/bin/sh")) -(define %network-configuration-files - '("/etc/resolv.conf" - "/etc/nsswitch.conf" - "/etc/services" - "/etc/hosts")) - (define (purify-environment) "Unset almost all environment variables. A small number of variables such as 'HOME' and 'USER' are left untouched." @@ -408,22 +402,7 @@ host file systems to mount inside the container." ;; When in Rome, do as Nix build.cc does: Automagically ;; map common network configuration files. (if network? - (filter-map (lambda (file) - (and (file-exists? file) - (file-system-mapping - (source file) - (target file) - ;; XXX: On some GNU/Linux - ;; systems, /etc/resolv.conf is a - ;; symlink to a file in a tmpfs - ;; which, for an unknown reason, - ;; cannot be bind mounted - ;; read-only within the - ;; container. - (writable? - (string=? file - "/etc/resolv.conf"))))) - %network-configuration-files) + %network-file-mappings '()) ;; Mappings for the union closure of all inputs. (map (lambda (dir) From 3454f7edf9eb2901115cab522d980df712fa4078 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 15:55:08 +0100 Subject: [PATCH 047/135] bash completion: Complete 'guix gc' with file names. Reported by a couple of cool folks at a bar in Brussels. * etc/completion/bash/guix (_guix_complete): Use '_guix_complete_file' for 'guix gc'. This fixes completion of 'guix gc -d'. --- etc/completion/bash/guix | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index c92f8915c9..01b0e20394 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2015, 2016 Ludovic Courtès +# Copyright © 2015, 2016, 2017 Ludovic Courtès # # This file is part of GNU Guix. # @@ -158,7 +158,7 @@ _guix_complete () elif _guix_is_command "import" then _guix_complete_subcommand - elif _guix_is_command "hash" + elif _guix_is_command "hash" || _guix_is_command "gc" then _guix_complete_file else From e109ed3922f2a3ff68a77f727ead27f2eb4a82ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 16:50:07 +0100 Subject: [PATCH 048/135] bash completion: Complete file names after 'guix system COMMAND'. * etc/completion/bash/guix (_guix_complete): When the command is "system" and $COMP_CWORD > 2, use _guix_complete_file. --- etc/completion/bash/guix | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index 01b0e20394..9c851e3717 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -154,7 +154,10 @@ _guix_complete () fi elif _guix_is_command "system" then - _guix_complete_subcommand + case $COMP_CWORD in + 2) _guix_complete_subcommand;; + *) _guix_complete_file;; # TODO: restrict to *.scm + esac elif _guix_is_command "import" then _guix_complete_subcommand From a93c1c59218aac49382c35fe23d1e0f021e6e676 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 17:05:34 +0100 Subject: [PATCH 049/135] bash completion: Properly complete 'guix container exec'. * etc/completion/bash/guix (_guix_complete_pid): New function. (_guix_complete): Add case for "container". --- etc/completion/bash/guix | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index 9c851e3717..00c3dfaf49 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -113,6 +113,12 @@ _guix_complete_file () COMPREPLY=() } +_guix_complete_pid () +{ + local pids="$(cd /proc; echo [0-9]*)" + COMPREPLY=($(compgen -W "$pids" -- "$1")) +} + declare _guix_subcommands _guix_complete () @@ -158,6 +164,13 @@ _guix_complete () 2) _guix_complete_subcommand;; *) _guix_complete_file;; # TODO: restrict to *.scm esac + elif _guix_is_command "container" + then + case $COMP_CWORD in + 2) _guix_complete_subcommand;; + 3) _guix_complete_pid "$word_at_point";; + *) _guix_complete_file;; + esac elif _guix_is_command "import" then _guix_complete_subcommand From f2c66fbe1f01b720741e0fe2bfa619ca2862a6b8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 17:08:35 +0100 Subject: [PATCH 050/135] bash completion: Complete subcommands for the current word. * etc/completion/bash/guix (_guix_complete_subcommand): Refer to the $COMP_CWORD element instead of the last element. --- etc/completion/bash/guix | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/etc/completion/bash/guix b/etc/completion/bash/guix index 00c3dfaf49..6a5f281c4f 100644 --- a/etc/completion/bash/guix +++ b/etc/completion/bash/guix @@ -26,7 +26,7 @@ _guix_complete_subcommand () local subcommands="$(${COMP_WORDS[0]} $command --help 2> /dev/null \ | grep '^ [a-z]' \ | sed -e's/^ \+\([a-z-]\+\).*$/\1/g')" - COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[${#COMP_WORDS[*]} - 1]}")) + COMPREPLY=($(compgen -W "$subcommands" -- "${COMP_WORDS[$COMP_CWORD]}")) } _guix_complete_available_package () From b9a5efa59673dc9061714a9b0b15b43696bfd38c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 17:58:10 +0100 Subject: [PATCH 051/135] services: bitlbee: Read the PID file. * gnu/services/networking.scm (bitlbee-shepherd-service): Pass #:pid-file to 'make-forkexec-constructor'. --- gnu/services/networking.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index 766d979f3e..ba04a96d6d 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -629,7 +629,8 @@ project's documentation} for more information." (requirement '(user-processes loopback)) (start #~(make-forkexec-constructor (list (string-append #$bitlbee "/sbin/bitlbee") - "-n" "-F" "-u" "bitlbee" "-c" #$conf))) + "-n" "-F" "-u" "bitlbee" "-c" #$conf) + #:pid-file "/var/run/bitlbee.pid")) (stop #~(make-kill-destructor)))))))) (define %bitlbee-accounts From c90db25f4cf1f98f3f4f3af38d175a14ffb8c32a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 23:45:00 +0100 Subject: [PATCH 052/135] linux-container: Add 'container-excursion*'. * gnu/build/linux-container.scm (container-excursion*): New procedure. * tests/containers.scm ("container-excursion*") ("container-excursion*, same namespaces"): New tests. --- gnu/build/linux-container.scm | 22 +++++++++++++++++++++- tests/containers.scm | 27 +++++++++++++++++++++++++++ 2 files changed, 48 insertions(+), 1 deletion(-) diff --git a/gnu/build/linux-container.scm b/gnu/build/linux-container.scm index dd56a79232..95bfd92dde 100644 --- a/gnu/build/linux-container.scm +++ b/gnu/build/linux-container.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 David Thompson +;;; Copyright © 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -32,7 +33,8 @@ %namespaces run-container call-with-container - container-excursion)) + container-excursion + container-excursion*)) (define (user-namespace-supported?) "Return #t if user namespaces are supported on this system." @@ -326,3 +328,21 @@ return the exit status." (match (waitpid pid) ((_ . status) (status:exit-val status)))))) + +(define (container-excursion* pid thunk) + "Like 'container-excursion', but return the return value of THUNK." + (match (pipe) + ((in . out) + (match (container-excursion pid + (lambda () + (close-port in) + (write (thunk) out))) + (0 + (close-port out) + (let ((result (read in))) + (close-port in) + result)) + (_ ;maybe PID died already + (close-port out) + (close-port in) + #f))))) diff --git a/tests/containers.scm b/tests/containers.scm index 745b56b710..0b3a4be12b 100644 --- a/tests/containers.scm +++ b/tests/containers.scm @@ -180,4 +180,31 @@ (lambda () (primitive-exit 42)))) +(skip-if-unsupported) +(test-assert "container-excursion*" + (call-with-temporary-directory + (lambda (root) + (define (namespaces pid) + (let ((pid (number->string pid))) + (map (lambda (ns) + (readlink (string-append "/proc/" pid "/ns/" ns))) + '("user" "ipc" "uts" "net" "pid" "mnt")))) + + (let* ((pid (run-container root '() + %namespaces 1 + (lambda () + (sleep 100)))) + (result (container-excursion* pid + (lambda () + (namespaces 1))))) + (kill pid SIGKILL) + (equal? result (namespaces pid)))))) + +(skip-if-unsupported) +(test-equal "container-excursion*, same namespaces" + 42 + (container-excursion* (getpid) + (lambda () + (* 6 7)))) + (test-end) From 63302a4e55241a41eab4c21d7af9fbd0d5817459 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 23:47:09 +0100 Subject: [PATCH 053/135] Add (gnu build shepherd). * gnu/build/shepherd.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. --- gnu/build/shepherd.scm | 177 +++++++++++++++++++++++++++++++++++++++++ gnu/local.mk | 1 + 2 files changed, 178 insertions(+) create mode 100644 gnu/build/shepherd.scm diff --git a/gnu/build/shepherd.scm b/gnu/build/shepherd.scm new file mode 100644 index 0000000000..8fc74bc482 --- /dev/null +++ b/gnu/build/shepherd.scm @@ -0,0 +1,177 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Ludovic Courtès +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (gnu build shepherd) + #:use-module (gnu system file-systems) + #:use-module (gnu build linux-container) + #:use-module (guix build utils) + #:use-module (srfi srfi-1) + #:use-module (ice-9 match) + #:export (make-forkexec-constructor/container)) + +;;; Commentary: +;;; +;;; This module provides extensions to the GNU Shepherd. In particular, it +;;; provides a helper to start services in a container. +;;; +;;; Code: + +(define (clean-up file) + (when file + (catch 'system-error + (lambda () + (delete-file file)) + (lambda args + (unless (= ENOENT (system-error-errno args)) + (apply throw args)))))) + +(define-syntax-rule (catch-system-error exp) + (catch 'system-error + (lambda () + exp) + (const #f))) + +(define (default-namespaces args) + ;; Most daemons are here to talk to the network, and most of them expect to + ;; run under a non-zero UID. + (fold delq %namespaces '(net user))) + +(define* (default-mounts #:key (namespaces (default-namespaces '()))) + (define (tmpfs directory) + (file-system + (device "none") + (title 'device) + (mount-point directory) + (type "tmpfs") + (check? #f))) + + (define passwd + ;; This is for processes in the default user namespace but living in a + ;; different mount namespace, so that they can lookup users. + (file-system-mapping + (source "/etc/passwd") (target source))) + + (define nscd-socket + (file-system-mapping + (source "/var/run/nscd") (target source) + (writable? #t))) + + (append (cons (tmpfs "/tmp") %container-file-systems) + (let ((mappings `(,@(if (memq 'net namespaces) + '() + (cons nscd-socket + %network-file-mappings)) + ,@(if (and (memq 'mnt namespaces) + (not (memq 'user namespaces))) + (list passwd) + '()) + ,%store-mapping))) ;XXX: coarse-grain + (map file-system-mapping->bind-mount + (filter (lambda (mapping) + (file-exists? (file-system-mapping-source mapping))) + mappings))))) + +;; XXX: Lazy-bind the Shepherd to avoid a compile-time dependency. +(module-autoload! (current-module) + '(shepherd service) '(read-pid-file exec-command)) + +(define* (read-pid-file/container pid pid-file #:key (max-delay 5)) + "Read PID-FILE in the container namespaces of PID, which exists in a +separate mount and PID name space. Return the \"outer\" PID. " + (match (container-excursion* pid + (lambda () + (read-pid-file pid-file + #:max-delay max-delay))) + (#f + (catch-system-error (kill pid SIGTERM)) + #f) + ((? integer? container-pid) + ;; XXX: When COMMAND is started in a separate PID namespace, its + ;; PID is always 1, but that's not what Shepherd needs to know. + pid))) + +(define* (make-forkexec-constructor/container command + #:key + (namespaces + (default-namespaces args)) + (mappings '()) + (user #f) + (group #f) + (log-file #f) + pid-file + (pid-file-timeout 5) + (directory "/") + (environment-variables + (environ)) + #:rest args) + "This is a variant of 'make-forkexec-constructor' that starts COMMAND in +NAMESPACES, a list of Linux namespaces such as '(mnt ipc). MAPPINGS is the +list of to make in the case of a separate mount +namespace, in addition to essential bind-mounts such /proc." + (define container-directory + (match command + ((program _ ...) + (string-append "/var/run/containers/" (basename program))))) + + (define auto-mappings + `(,@(if log-file + (list (file-system-mapping + (source log-file) + (target source) + (writable? #t))) + '()))) + + (define mounts + (append (map file-system-mapping->bind-mount + (append auto-mappings mappings)) + (default-mounts #:namespaces namespaces))) + + (lambda args + (mkdir-p container-directory) + + (when log-file + ;; Create LOG-FILE so we can map it in the container. + (unless (file-exists? log-file) + (call-with-output-file log-file (const #t)))) + + (let ((pid (run-container container-directory + mounts namespaces 1 + (lambda () + (mkdir-p "/var/run") + (clean-up pid-file) + (clean-up log-file) + + (exec-command command + #:user user + #:group group + #:log-file log-file + #:directory directory + #:environment-variables + environment-variables))))) + (if pid-file + (if (or (memq 'mnt namespaces) (memq 'pid namespaces)) + (read-pid-file/container pid pid-file + #:max-delay pid-file-timeout) + (read-pid-file pid-file #:max-delay pid-file-timeout)) + pid)))) + +;; Local Variables: +;; eval: (put 'container-excursion* 'scheme-indent-function 1) +;; End: + +;;; shepherd.scm ends here diff --git a/gnu/local.mk b/gnu/local.mk index 5c1634e021..63ce3af713 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -451,6 +451,7 @@ GNU_SYSTEM_MODULES = \ %D%/build/linux-initrd.scm \ %D%/build/linux-modules.scm \ %D%/build/marionette.scm \ + %D%/build/shepherd.scm \ %D%/build/svg.scm \ %D%/build/vm.scm \ \ From a062b6ca99ad61c9df473fe49a93d69f9698c59d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Mon, 6 Feb 2017 23:48:48 +0100 Subject: [PATCH 054/135] services: bitlbee: Run in a container. * gnu/services/networking.scm (bitlbee-shepherd-service): Wrap in 'with-imported-modules' and add 'modules' field. Use 'make-forkexec-constructor/container' and pass #:mappings. --- gnu/services/networking.scm | 32 ++++++++++++++++++++++++-------- 1 file changed, 24 insertions(+), 8 deletions(-) diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm index ba04a96d6d..b63888cadb 100644 --- a/gnu/services/networking.scm +++ b/gnu/services/networking.scm @@ -36,6 +36,7 @@ #:use-module (gnu packages gnome) #:use-module (guix gexp) #:use-module (guix records) + #:use-module (guix modules) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) #:use-module (srfi srfi-26) @@ -624,14 +625,29 @@ project's documentation} for more information." DaemonPort = " (number->string port) " " extra-settings)))) - (list (shepherd-service - (provision '(bitlbee)) - (requirement '(user-processes loopback)) - (start #~(make-forkexec-constructor - (list (string-append #$bitlbee "/sbin/bitlbee") - "-n" "-F" "-u" "bitlbee" "-c" #$conf) - #:pid-file "/var/run/bitlbee.pid")) - (stop #~(make-kill-destructor)))))))) + (with-imported-modules (source-module-closure + '((gnu build shepherd) + (gnu system file-systems))) + (list (shepherd-service + (provision '(bitlbee)) + + ;; Note: If networking is not up, then /etc/resolv.conf + ;; doesn't get mapped in the container, hence the dependency + ;; on 'networking'. + (requirement '(user-processes networking)) + + (modules '((gnu build shepherd) + (gnu system file-systems))) + (start #~(make-forkexec-constructor/container + (list #$(file-append bitlbee "/sbin/bitlbee") + "-n" "-F" "-u" "bitlbee" "-c" #$conf) + + #:pid-file "/var/run/bitlbee.pid" + #:mappings (list (file-system-mapping + (source "/var/lib/bitlbee") + (target source) + (writable? #t))))) + (stop #~(make-kill-destructor))))))))) (define %bitlbee-accounts ;; User group and account to run BitlBee. From 6f48d9db10231857f523f1cb467ee903fd956fcb Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Mon, 6 Feb 2017 22:25:18 -0500 Subject: [PATCH 055/135] gnu: epiphany: Update to 3.22.6 [security update]. See . * gnu/packages/gnome.scm (epiphany): Update to 3.22.6. [arguments]: Add #:configure-flags '("CFLAGS=-std=gnu99"). --- gnu/packages/gnome.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index f6f7aae696..cd115f1f0c 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -3634,7 +3634,7 @@ work and the interface is well tested.") (define-public epiphany (package (name "epiphany") - (version "3.22.4") + (version "3.22.6") (source (origin (method url-fetch) (uri (string-append "mirror://gnome/sources/" name "/" @@ -3642,7 +3642,7 @@ work and the interface is well tested.") name "-" version ".tar.xz")) (sha256 (base32 - "0skdsma9rmq01703andigmpbdn2rl34y3lqny19a93v1ph3jb9qk")))) + "1hpwjwiviwh9dgc9cwq0gmr5jy40rvigjcq0cbg2nw2hqiyshzny")))) (build-system glib-or-gtk-build-system) (arguments ;; FIXME: tests run under Xvfb, but fail with: @@ -3650,7 +3650,8 @@ work and the interface is well tested.") ;; ** (test-ephy-bookmarks:19591): WARNING **: Unable to start Zeroconf ;; subsystem ;; FAIL - '(#:tests? #f)) + '(#:tests? #f + #:configure-flags '("CFLAGS=-std=gnu99"))) (propagated-inputs `(("dconf" ,dconf))) (native-inputs From ef753a1a8f9e7c971957abfda9b672a7728cd073 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 7 Feb 2017 11:14:09 +0100 Subject: [PATCH 056/135] gnu: grub-efi: Really build the EFI variant. Fixes a regression introduced in d846834fc2b2f76aa2e258685bc211edd31866c5 where '--with-platform=efi' would no longer be passed. * gnu/packages/grub.scm (grub-efi)[arguments]: Provide a default value for #:configure-flags. --- gnu/packages/grub.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 25c2d8076b..c6716a2f6f 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2013, 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2015 Mark H Weaver ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2016 Jan Nieuwenhuizen @@ -139,8 +139,8 @@ menu to select one of the installed operating systems.") ;; Search for 'OVMF' in "tests/util/grub-shell.in". #:tests? #f ,@(substitute-keyword-arguments (package-arguments grub) - ((#:configure-flags flags) `(cons* "--with-platform=efi" - ,flags)) + ((#:configure-flags flags ''()) + `(cons "--with-platform=efi" ,flags)) ((#:phases phases) `(modify-phases ,phases (add-after 'patch-stuff 'use-absolute-efibootmgr-path From 328f7cbe435d79d61f57129d9e3ee90404d6bfda Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 7 Feb 2017 14:44:55 +0100 Subject: [PATCH 057/135] daemon: Define 'NIX_STORE' before invoking 'guix perform-download'. Reported by rohit yadav at . This fixes a regression whereby 'guix perform-download' would always see NIX_STORE as unset and thus use "/gnu/store", leading it to miscompute the hydra.gnu.org content-addressed URLs when the store file name is not "/gnu/store". * nix/libstore/builtins.cc (builtinDownload): Add 'setenv' call for 'NIX_STORE'. --- nix/libstore/builtins.cc | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/nix/libstore/builtins.cc b/nix/libstore/builtins.cc index 7ed75e5079..a5ebb47737 100644 --- a/nix/libstore/builtins.cc +++ b/nix/libstore/builtins.cc @@ -21,6 +21,7 @@ #include #include +#include namespace nix { @@ -41,6 +42,11 @@ static void builtinDownload(const Derivation &drv, "download", drvPath.c_str(), output.c_str(), NULL }; + /* Tell the script what the store file name is, so that + 'strip-store-file-name' (used for instance to determine the URL of + content-addressed mirrors) works correctly. */ + setenv("NIX_STORE", settings.nixStore.c_str(), 1); + /* XXX: Hack our way to use the 'download' script from 'LIBEXECDIR/guix' or just 'LIBEXECDIR', depending on whether we're running uninstalled or not. */ From d480ed7edb7ad787829fd8220c86220ca34ce8ac Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Tue, 7 Feb 2017 14:53:24 +0100 Subject: [PATCH 058/135] build: Warn about lack of substitutes for non-standard stores. * configure.ac: Emit a warning when $storedir is not "/gnu/store". --- configure.ac | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/configure.ac b/configure.ac index 9079a142dc..06b0618b43 100644 --- a/configure.ac +++ b/configure.ac @@ -236,6 +236,15 @@ dnl Emacs (optional), for 'etc/indent-package.el'. AC_PATH_PROG([EMACS], [emacs], [/usr/bin/emacs]) AC_SUBST([EMACS]) +case "$storedir" in + /gnu/store) + ;; + *) + AC_MSG_WARN([Using a store directory other than '/gnu/store' will prevent you]) + AC_MSG_WARN([from downloading substitutes from gnu.org.]) + ;; +esac + AC_CONFIG_FILES([Makefile po/guix/Makefile.in po/packages/Makefile.in From 189d8422573bdcb9392dad76426ab3e9518017ec Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Boskovits=2C=20G=C3=A1bor?= Date: Tue, 7 Feb 2017 00:13:10 +0100 Subject: [PATCH 059/135] gnu: Add lshw. * gnu/packages/linux.scm (lshw): New variable. Signed-off-by: Marius Bakke --- gnu/packages/linux.scm | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 08d8c50fd4..5f0db58009 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -20,6 +20,7 @@ ;;; Copyright © 2016 ng0 ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2017 José Miguel Sánchez García +;;; Copyright © 2017 Gábor Boskovits ;;; ;;; This file is part of GNU Guix. ;;; @@ -3407,3 +3408,32 @@ set the screen to be pitch black at a vaĺue of 0 (or higher). Light is the successor of lightscript.") (license license:gpl3+))) + +(define-public lshw + (package + (name "lshw") + (version "B.02.18") + (source (origin + (method url-fetch) + (uri (string-append "https://www.ezix.org/software/" + "files/lshw-" version + ".tar.gz")) + (sha256 + (base32 + "0brwra4jld0d53d7jsgca415ljglmmx1l2iazpj4ndilr48yy8mf")))) + (build-system gnu-build-system) + (arguments + `(#:phases (modify-phases %standard-phases (delete 'configure)) + #:tests? #f ; no tests + #:make-flags + (list (string-append "PREFIX=" (assoc-ref %outputs "out"))))) + (synopsis "List hardware information") + (description + "@command{lshw} (Hardware Lister) is a small tool to provide +detailed information on the hardware configuration of the machine. +It can report exact memory configuration, firmware version, mainboard +configuration, CPU version and speed, cache configuration, bus speed, +and more on DMI-capable x86 or EFI (IA-64) systems and on some PowerPC +machines (PowerMac G4 is known to work).") + (home-page "https://www.ezix.org/project/wiki/HardwareLiSter") + (license license:gpl2+))) From 33a8687a2a465efd516e3a3fb742fd0e1aa49f05 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 4 Feb 2017 12:36:03 +0100 Subject: [PATCH 060/135] gnu: mcelog: Update to 148. * gnu/packages/linux.scm (mcelog): Update to 148. --- gnu/packages/linux.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5f0db58009..dc4d37920b 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -3120,14 +3120,14 @@ the default @code{nsswitch} and the experimental @code{umich_ldap}.") (define-public mcelog (package (name "mcelog") - (version "147") + (version "148") (source (origin (method url-fetch) (uri (string-append "https://git.kernel.org/cgit/utils/cpu/mce/" "mcelog.git/snapshot/v" version ".tar.gz")) (sha256 (base32 - "10xxmqpd348ifbs7w8j0m53agp28r6imv237ha3kmhp632hmyf1d")) + "1d5g09ndfsnl56vyhb5xw0zxspnh0f937biw3agqhdfbvw40j9jr")) (file-name (string-append name "-" version ".tar.gz")) (modules '((guix build utils))) (snippet From 4dcb3db0eebf50b85bfafbcea438ff5e29d4b89f Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sun, 5 Feb 2017 11:35:21 +0100 Subject: [PATCH 061/135] gnu: fonts: Use install-file where appropriate. * gnu/packages/fonts.scm (font-wqy-microhei, font-google-roboto)[arguments]: Substitute the simpler INSTALL-FILE for every COPY-FILE invoked with redundant arguments. --- gnu/packages/fonts.scm | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 1f6d1d0c36..43991d1034 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -525,13 +525,11 @@ ko (Korean) locales for @code{fontconfig}.") (let ((PATH (string-append (assoc-ref %build-inputs "tar") "/bin:" (assoc-ref %build-inputs "gzip") "/bin")) (font-dir (string-append (assoc-ref %outputs "out") - "/share/fonts/wenquanyi/"))) - (setenv "PATH" PATH) + "/share/fonts/wenquanyi"))) (mkdir-p font-dir) + (setenv "PATH" PATH) (system* "tar" "xvf" (assoc-ref %build-inputs "source")) - (chdir "wqy-microhei") - (copy-file "wqy-microhei.ttc" - (string-append font-dir "wqy-microhei.ttc")))))) + (install-file "wqy-microhei/wqy-microhei.ttc" font-dir))))) (native-inputs `(("gzip" ,gzip) ("tar" ,tar))) @@ -760,8 +758,7 @@ display all Unicode symbols.") (mkdir-p font-dir) (chdir "roboto-hinted") (for-each (lambda (ttf) - (copy-file ttf - (string-append font-dir "/" ttf))) + (install-file ttf font-dir)) (find-files "." "\\.ttf$")))))) (home-page "https://github.com/google/roboto") (synopsis "The Roboto family of fonts") From 22a7abf7e53ccfa71dc03f06164f2c1761814354 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 7 Feb 2017 18:55:46 +0100 Subject: [PATCH 062/135] gnu: youtube-dl: Update to 2017.02.07. * gnu/packages/video.scm (youtube-dl): Update to 2017.02.07. --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 8cbbb9d76d..0b3361e8f7 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -970,7 +970,7 @@ access to mpv's powerful playback capabilities.") (define-public youtube-dl (package (name "youtube-dl") - (version "2017.02.01") + (version "2017.02.07") (source (origin (method url-fetch) (uri (string-append "https://yt-dl.org/downloads/" @@ -978,7 +978,7 @@ access to mpv's powerful playback capabilities.") version ".tar.gz")) (sha256 (base32 - "1jkra0kgqg9ks76hwfcfsdaiknr9w8vavja0rc81ia644085axzz")))) + "1grq3aqa1zc0xdq1y6vqnk0y0vcd1j2jjn85696hw98mi0w1am73")))) (build-system python-build-system) (arguments ;; The problem here is that the directory for the man page and completion From 98d403bb4594c857729d64eaaafaf4a0ca51d7b3 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Thu, 26 Jan 2017 19:27:06 +0100 Subject: [PATCH 063/135] gnu: Add python-pyodbc-c. * gnu/packages/databases.scm (python-pyodbc-c, python2-pyodbc-c): New variables. Signed-off-by: Kei Kebreau --- gnu/packages/databases.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 8972c283de..a358340baf 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -1404,3 +1404,31 @@ development.") ;; test/crypto.test are licensed under a 3-clause BSD license. All other ;; source files are in the public domain. (license (list license:public-domain license:bsd-3)))) + +(define-public python-pyodbc-c + (package + (name "python-pyodbc-c") + (version "3.1.2") + (source + (origin + (method url-fetch) + (uri (string-append "https://gitlab.com/daym/pyodbc-c/repository/" + "archive.tar.gz?ref=v" version)) + (sha256 + (base32 + "0nl11n3mgrcfnhimjqgv48rxqnb21l5m6s7p8ps2fa4nn4z6rzy0")) + (file-name (string-append name "-" version ".tar.gz")))) + (build-system python-build-system) + (inputs + `(("unixodbc" ,unixodbc))) + (arguments + `(;; No unit tests exist. + #:tests? #f)) + (home-page "https://github.com/mkleehammer/pyodbc") + (synopsis "Python ODBC Library") + (description "@code{python-pyodbc-c} provides a Python DB-API driver +for ODBC.") + (license (license:x11-style "file://LICENSE.TXT")))) + +(define-public python2-pyodbc-c + (package-with-python2 python-pyodbc-c)) From 4621acfd8272fa93d0530faa5f015b26a194b587 Mon Sep 17 00:00:00 2001 From: Ricardo Wurmus Date: Tue, 7 Feb 2017 20:00:10 +0100 Subject: [PATCH 064/135] gnu: r: Build default packages reproducibly. This is a follow-up to commit de643f0c15677665acce73db9c28c5488e623633. * gnu/packages/statistics.scm (r)[arguments]: Set the built timestamp for core packages to the epoch; add phase "build-recommended-packages-reproducibly". --- gnu/packages/statistics.scm | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/gnu/packages/statistics.scm b/gnu/packages/statistics.scm index b4d95bdb71..133ce41c43 100644 --- a/gnu/packages/statistics.scm +++ b/gnu/packages/statistics.scm @@ -116,7 +116,9 @@ be output in text, PostScript, PDF or HTML.") `(#:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" (assoc-ref %outputs "out") - "/lib/R/lib")) + "/lib/R/lib") + ;; This affects the embedded timestamp of only the core packages. + "PKG_BUILT_STAMP=1970-01-01") #:phases (modify-phases %standard-phases (add-before 'configure 'patch-uname @@ -126,8 +128,13 @@ be output in text, PostScript, PDF or HTML.") (substitute* "src/scripts/R.sh.in" (("uname") uname-bin))) #t)) - (add-before - 'configure 'set-default-pager + (add-after 'unpack 'build-recommended-packages-reproducibly + (lambda _ + (substitute* "src/library/Recommended/Makefile.in" + (("INSTALL_OPTS =.*" line) + (string-append line " --built-timestamp=1970-01-01"))) + #t)) + (add-before 'configure 'set-default-pager ;; Set default pager to "cat", because otherwise it is "false", ;; making "help()" print nothing at all. (lambda _ (setenv "PAGER" "cat") #t)) From f0d0c5bb188455e0b82ee3089ba103ef71877c87 Mon Sep 17 00:00:00 2001 From: Leo Famulari Date: Mon, 23 Jan 2017 00:57:46 -0500 Subject: [PATCH 065/135] etc: The pre-push hook says which commits failed the signature check. * etc/git/pre-push: Check each commit's signature individually so that we can report which commits fail the check. --- etc/git/pre-push | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/etc/git/pre-push b/etc/git/pre-push index c894c5a9ec..9206a2dfe5 100755 --- a/etc/git/pre-push +++ b/etc/git/pre-push @@ -40,17 +40,29 @@ do else if [ "$remote_sha" = $z40 ] then - # New branch, examine all commits - range="$local_sha" + # We are pushing a new branch. To prevent wasting too + # much time for this relatively rare case, we examine + # all commits since the first signed commit, rather than + # the full history. This check *will* fail, and the user + # will need to temporarily disable the hook to push the + # new branch. + range="e3d0fcbf7e55e8cbe8d0a1c5a24d73f341d7243b..$local_sha" else # Update to existing branch, examine new commits range="$remote_sha..$local_sha" fi # Verify the signatures of all commits being pushed. - git verify-commit $(git rev-list $range) >/dev/null 2>&1 - - exit $? + ret=0 + for commit in $(git rev-list $range) + do + if ! git verify-commit $commit >/dev/null 2>&1 + then + printf "%s failed signature check\n" $commit + ret=1 + fi + done + exit $ret fi done From 6bd9ad6942d29163b87ca732ce562a098147513b Mon Sep 17 00:00:00 2001 From: ng0 Date: Sat, 4 Feb 2017 16:34:58 +0000 Subject: [PATCH 066/135] gnu: python-dateutil-2: Update to 2.5.3. * gnu/packages/python.scm (python-dateutil-2): Update to 2.5.3. --- gnu/packages/python.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index d53eea1893..5b4d2b09cf 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -23,7 +23,7 @@ ;;; Copyright © 2016 Daniel Pimentel ;;; Copyright © 2016 Sou Bunnbu ;;; Copyright © 2016 Troy Sankey -;;; Copyright © 2016 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Dylan Jeffers ;;; Copyright © 2016 David Craven ;;; Copyright © 2016, 2017 Marius Bakke @@ -1063,14 +1063,14 @@ Python file, so it can be easily copied into your project.") (define-public python-dateutil-2 (package (name "python-dateutil") - (version "2.5.2") + (version "2.5.3") (source (origin (method url-fetch) (uri (pypi-uri "python-dateutil" version)) (sha256 (base32 - "0jrfpcgvgya6hs45dhrd9yiqgdgz9qp9aa07zsw8gqgn8zphff86")))) + "1v9j9fmf8g911yg6k01xa2db6dx3wv73zkk7fncsj7vagjqgs20l")))) (build-system python-build-system) (propagated-inputs `(("python-six" ,python-six))) From 06d7d1190e1101ff73351d0324ae23bbd3997795 Mon Sep 17 00:00:00 2001 From: Ying Huang Date: Wed, 8 Feb 2017 20:10:46 +0800 Subject: [PATCH 067/135] profiles: gtk-im-modules: Fix for gtk3. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Gtk+3 now have multiple outputs, so the gtk-query-immodules-3.0 should be find in output "bin" instead of "out". * guix/profiles.scm (gtk-im-modules): Pass the path of gtk-query-immodules-x.x as 'query' argument to the 'build' procedure. Signed-off-by: 宋文武 --- guix/profiles.scm | 26 +++++++++++++++++++------- 1 file changed, 19 insertions(+), 7 deletions(-) diff --git a/guix/profiles.scm b/guix/profiles.scm index 495a9e2e7c..de82eae348 100644 --- a/guix/profiles.scm +++ b/guix/profiles.scm @@ -739,7 +739,7 @@ for both major versions of GTK+." (mlet %store-monad ((gtk+ (manifest-lookup-package manifest "gtk+" "3")) (gtk+-2 (manifest-lookup-package manifest "gtk+" "2"))) - (define (build gtk gtk-version) + (define (build gtk gtk-version query) (let ((major (string-take gtk-version 1))) (with-imported-modules '((guix build utils) (guix build union) @@ -756,8 +756,6 @@ for both major versions of GTK+." (let* ((prefix (string-append "/lib/gtk-" #$major ".0/" #$gtk-version)) - (query (string-append #$gtk "/bin/gtk-query-immodules-" - #$major ".0")) (destdir (string-append #$output prefix)) (moddirs (cons (string-append #$gtk prefix "/immodules") (filter file-exists? @@ -768,7 +766,7 @@ for both major versions of GTK+." ;; Generate a new immodules cache file. (mkdir-p (string-append #$output prefix)) - (let ((pipe (apply open-pipe* OPEN_READ query modules)) + (let ((pipe (apply open-pipe* OPEN_READ #$query modules)) (outfile (string-append #$output prefix "/immodules-gtk" #$major ".cache"))) (dynamic-wind @@ -783,9 +781,23 @@ for both major versions of GTK+." (close-pipe pipe))))))))) ;; Don't run the hook when there's nothing to do. - (let ((gexp #~(begin - #$(if gtk+ (build gtk+ "3.0.0") #t) - #$(if gtk+-2 (build gtk+-2 "2.10.0") #t)))) + (let* ((pkg-gtk+ (module-ref ; lazy reference + (resolve-interface '(gnu packages gtk)) 'gtk+)) + (gexp #~(begin + #$(if gtk+ + (build + gtk+ "3.0.0" + ;; Use 'gtk-query-immodules-3.0' from the 'bin' + ;; output of latest gtk+ package. + #~(string-append + #$pkg-gtk+:bin "/bin/gtk-query-immodules-3.0")) + #t) + #$(if gtk+-2 + (build + gtk+-2 "2.10.0" + #~(string-append + #$gtk+-2 "/bin/gtk-query-immodules-2.0")) + #t)))) (if (or gtk+ gtk+-2) (gexp->derivation "gtk-im-modules" gexp #:local-build? #t From 618739b063dd0f8f33d0618cf64567aaaf86f4d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=AE=8B=E6=96=87=E6=AD=A6?= Date: Wed, 8 Feb 2017 20:54:42 +0800 Subject: [PATCH 068/135] gnu: nix: Update to 1.11.6. * gnu/packages/package-management.scm (nix): Update to 1.11.6. --- gnu/packages/package-management.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 92787d76cc..26802e0c62 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -329,14 +329,14 @@ out) and returning a package that uses that as its 'source'." (define-public nix (package (name "nix") - (version "1.11.2") + (version "1.11.6") (source (origin (method url-fetch) (uri (string-append "http://nixos.org/releases/nix/nix-" version "/nix-" version ".tar.xz")) (sha256 (base32 - "1mk9z75gklxcv6kzwwz1h5r2ci5kjy6bh7qwk4m5lf5v9s0k64pw")))) + "18xjg7cfvqzhsmvir6xmw95jxvl2w7icphbbll462xbnj9ddaag7")))) (build-system gnu-build-system) ;; XXX: Should we pass '--with-store-dir=/gnu/store'? But then we'd also ;; need '--localstatedir=/var'. But then! The thing would use /var/nix From 387e175492f960d7d86f34f3b2e43938fa72dbf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 8 Feb 2017 15:32:28 +0100 Subject: [PATCH 069/135] services: Add 'special-files-service-type'. * gnu/build/activation.scm (activate-/bin/sh): Remove. (activate-special-files): New procedure. * gnu/services.scm (activation-script): Remove call to 'activate-/bin/sh'. (special-files-service-type): New variable. (extra-special-file): New procedure. * gnu/services/base.scm (%base-services): Add SPECIAL-FILES-SERVICE-TYPE instance. * gnu/tests/base.scm (run-basic-test)[special-files]: New variables. ["special files"]: New test. --- doc/guix.texi | 44 ++++++++++++++++++++++++++++++++++++++++ gnu/build/activation.scm | 23 ++++++++++++++++----- gnu/services.scm | 25 +++++++++++++++++++---- gnu/services/base.scm | 7 ++++++- gnu/tests/base.scm | 17 ++++++++++++++++ 5 files changed, 106 insertions(+), 10 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 6acde6621b..21082aece4 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -8272,6 +8272,50 @@ this: @end example @end defvr +@defvr {Scheme Variable} special-files-service-type +This is the service that sets up ``special files'' such as +@file{/bin/sh}; an instance of it is part of @code{%base-services}. + +The value associated with @code{special-files-service-type} services +must be a list of tuples where the first element is the ``special file'' +and the second element is its target. By default it is: + +@cindex @file{/bin/sh} +@cindex @file{sh}, in @file{/bin} +@example +`(("/bin/sh" ,(file-append @var{bash} "/bin/sh"))) +@end example + +@cindex @file{/usr/bin/env} +@cindex @file{env}, in @file{/usr/bin} +If you want to add, say, @code{/usr/bin/env} to your system, you can +change it to: + +@example +`(("/bin/sh" ,(file-append @var{bash} "/bin/sh")) + ("/usr/bin/env" ,(file-append @var{coreutils} "/bin/env"))) +@end example + +Since this is part of @code{%base-services}, you can use +@code{modify-services} to customize the set of special files +(@pxref{Service Reference, @code{modify-services}}). But the simple way +to add a special file is @i{via} the @code{extra-special-file} procedure +(see below.) +@end defvr + +@deffn {Scheme Procedure} extra-special-file @var{file} @var{target} +Use @var{target} as the ``special file'' @var{file}. + +For example, adding the following lines to the @code{services} field of +your operating system declaration leads to a @file{/usr/bin/env} +symlink: + +@example +(extra-special-file "/usr/bin/env" + (file-append coreutils "/bin/env")) +@end example +@end deffn + @deffn {Scheme Procedure} host-name-service @var{name} Return a service that sets the host name to @var{name}. @end deffn diff --git a/gnu/build/activation.scm b/gnu/build/activation.scm index e58304e83b..c4ed40e0de 100644 --- a/gnu/build/activation.scm +++ b/gnu/build/activation.scm @@ -28,7 +28,7 @@ activate-user-home activate-etc activate-setuid-programs - activate-/bin/sh + activate-special-files activate-modprobe activate-firmware activate-ptrace-attach @@ -383,10 +383,23 @@ copy SOURCE to TARGET." (for-each make-setuid-program programs)) -(define (activate-/bin/sh shell) - "Change /bin/sh to point to SHELL." - (symlink shell "/bin/sh.new") - (rename-file "/bin/sh.new" "/bin/sh")) +(define (activate-special-files special-files) + "Install the files listed in SPECIAL-FILES. Each element of SPECIAL-FILES +is a pair where the first element is the name of the special file and the +second element is the name it should appear at, such as: + + ((\"/bin/sh\" \"/gnu/store/…-bash/bin/sh\") + (\"/usr/bin/env\" \"/gnu/store/…-coreutils/bin/env\")) +" + (define install-special-file + (match-lambda + ((target file) + (let ((pivot (string-append target ".new"))) + (mkdir-p (dirname target)) + (symlink file pivot) + (rename-file pivot target))))) + + (for-each install-special-file special-files)) (define (activate-modprobe modprobe) "Tell the kernel to use MODPROBE to load modules." diff --git a/gnu/services.scm b/gnu/services.scm index e645889d30..6ac4f1322d 100644 --- a/gnu/services.scm +++ b/gnu/services.scm @@ -72,6 +72,8 @@ activation-service-type activation-service->script %linux-bare-metal-service + special-files-service-type + extra-special-file etc-service-type etc-directory setuid-program-service-type @@ -336,10 +338,6 @@ ACTIVATION-SCRIPT-TYPE." #~(begin (use-modules (gnu build activation)) - ;; Make sure /bin/sh is valid and current. - (activate-/bin/sh - (string-append #$(canonical-package bash) "/bin/sh")) - ;; Make sure the user accounting database exists. If it ;; does not exist, 'setutxent' does not create it and ;; thus there is no accounting at all. @@ -413,6 +411,25 @@ ACTIVATION-SCRIPT-TYPE." ;; necessary or impossible in a container. (service linux-bare-metal-service-type #f)) +(define special-files-service-type + ;; Service to install "special files" such as /bin/sh and /usr/bin/env. + (service-type + (name 'special-files) + (extensions + (list (service-extension activation-service-type + (lambda (files) + #~(activate-special-files '#$files))))) + (compose concatenate) + (extend append))) + +(define (extra-special-file file target) + "Use TARGET as the \"special file\" FILE. For example, TARGET might be + (file-append coreutils \"/bin/env\") +and FILE could be \"/usr/bin/env\"." + (simple-service (string->symbol (string-append "special-file-" file)) + special-files-service-type + `((,file ,target)))) + (define (etc-directory service) "Return the directory for SERVICE, a service of type ETC-SERVICE-TYPE." (files->etc-directory (service-parameters service))) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index d9f3a1445e..57601eab85 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -36,6 +36,7 @@ #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools)) #:use-module ((gnu packages base) #:select (canonical-package glibc)) + #:use-module (gnu packages bash) #:use-module (gnu packages package-management) #:use-module (gnu packages lsof) #:use-module (gnu packages terminals) @@ -1558,6 +1559,10 @@ This service is not part of @var{%base-services}." ;; The LVM2 rules are needed as soon as LVM2 or the device-mapper is ;; used, so enable them by default. The FUSE and ALSA rules are ;; less critical, but handy. - (udev-service #:rules (list lvm2 fuse alsa-utils crda)))) + (udev-service #:rules (list lvm2 fuse alsa-utils crda)) + + (service special-files-service-type + `(("/bin/sh" ,(file-append (canonical-package bash) + "/bin/sh")))))) ;;; base.scm ends here diff --git a/gnu/tests/base.scm b/gnu/tests/base.scm index 8a6a7a1568..000a4ddecb 100644 --- a/gnu/tests/base.scm +++ b/gnu/tests/base.scm @@ -77,6 +77,11 @@ When INITIALIZATION is true, it must be a one-argument procedure that is passed a gexp denoting the marionette, and it must return gexp that is inserted before the first test. This is used to introduce an extra initialization step, such as entering a LUKS passphrase." + (define special-files + (service-parameters + (fold-services (operating-system-services os) + #:target-type special-files-service-type))) + (define test (with-imported-modules '((gnu build marionette) (guix build syscalls)) @@ -120,6 +125,18 @@ grep --version info --version") marionette))) + (test-equal "special files" + '#$special-files + (marionette-eval + '(begin + (use-modules (ice-9 match)) + + (map (match-lambda + ((file target) + (list file (readlink file)))) + '#$special-files)) + marionette)) + (test-assert "accounts" (let ((users (marionette-eval '(begin (use-modules (ice-9 match)) From 750a423996f3471aa4807609256f686c8ebf5584 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= Date: Sun, 5 Feb 2017 19:58:53 +0100 Subject: [PATCH 070/135] services: shepherd: Replace spaces with hyphens in file names. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This fixes a bug whereby names of files defining services would be invalid if 'provisions' contained more than one element. * gnu/services/shepherd.scm (shepherd-service-file-name): Update 'match-lambda' accordingly. Signed-off-by: Ludovic Courtès --- gnu/services/shepherd.scm | 2 ++ 1 file changed, 2 insertions(+) diff --git a/gnu/services/shepherd.scm b/gnu/services/shepherd.scm index d8d5006abf..5831220541 100644 --- a/gnu/services/shepherd.scm +++ b/gnu/services/shepherd.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2017 Clément Lassieur ;;; ;;; This file is part of GNU Guix. ;;; @@ -195,6 +196,7 @@ stored." (string-append "shepherd-" (string-map (match-lambda (#\/ #\-) + (#\ #\-) (chr chr)) provisions) ".scm"))) From 4eaac4b722b180b433b75127a30b871aaf9f0913 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Wed, 8 Feb 2017 15:58:36 +0100 Subject: [PATCH 071/135] import: pypi: Correctly handle multiple-URL origins. Fixes . Reported by Sergei Trofimovich . * guix/import/pypi.scm (guix-package->pypi-name)[url->pypi-name]: New procedure. Rewrite body to match lists in addition to strings. * tests/pypi.scm ("guix-package->pypi-name, several URLs"): New test. --- guix/import/pypi.scm | 13 ++++++++++--- tests/pypi.scm | 10 ++++++++++ 2 files changed, 20 insertions(+), 3 deletions(-) diff --git a/guix/import/pypi.scm b/guix/import/pypi.scm index ed0d4297a4..1e433e3fb3 100644 --- a/guix/import/pypi.scm +++ b/guix/import/pypi.scm @@ -1,7 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 David Thompson ;;; Copyright © 2015 Cyril Roelandt -;;; Copyright © 2015, 2016 Ludovic Courtès +;;; Copyright © 2015, 2016, 2017 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -89,9 +89,16 @@ package." (define (guix-package->pypi-name package) "Given a Python PACKAGE built from pypi.python.org, return the name of the package on PyPI." - (let ((source-url (and=> (package-source package) origin-uri))) + (define (url->pypi-name url) (hyphen-package-name->name+version - (basename (file-sans-extension source-url))))) + (basename (file-sans-extension url)))) + + (match (and=> (package-source package) origin-uri) + ((? string? url) + (url->pypi-name url)) + ((lst ...) + (any url->pypi-name lst)) + (#f #f))) (define (wheel-url->extracted-directory wheel-url) (match (string-split (basename wheel-url) #\-) diff --git a/tests/pypi.scm b/tests/pypi.scm index 447c23ee95..a132900566 100644 --- a/tests/pypi.scm +++ b/tests/pypi.scm @@ -22,6 +22,7 @@ #:use-module (guix base32) #:use-module (guix hash) #:use-module (guix tests) + #:use-module (guix build-system python) #:use-module ((guix build utils) #:select (delete-file-recursively which)) #:use-module (srfi srfi-64) #:use-module (ice-9 match)) @@ -90,6 +91,15 @@ baz > 13.37") (uri "https://pypi.python.org/packages/a2/3b/4756e6a0ceb14e084042a2a65c615d68d25621c6fd446d0fc10d14c4ce7d/certbot-0.8.1.tar.gz")))))) +(test-equal "guix-package->pypi-name, several URLs" + "cram" + (guix-package->pypi-name + (dummy-package "foo" + (source + (dummy-origin + (uri (list "https://bitheap.org/cram/cram-0.7.tar.gz" + (pypi-uri "cram" "0.7")))))))) + (test-assert "pypi->guix-package" ;; Replace network resources with sample data. (mock ((guix import utils) url-fetch From 2149d3e3e58894795b582f2d113a879b00540722 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert Date: Mon, 6 Feb 2017 17:19:06 +0100 Subject: [PATCH 072/135] gnu: Add freerdp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/rdesktop.scm (freerdp): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/rdesktop.scm | 73 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 72 insertions(+), 1 deletion(-) diff --git a/gnu/packages/rdesktop.scm b/gnu/packages/rdesktop.scm index e40852b4ec..3eb82f22f3 100644 --- a/gnu/packages/rdesktop.scm +++ b/gnu/packages/rdesktop.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2015 Ludovic Courtès +;;; Copyright © 2017 Thomas Danckaert ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,9 +21,19 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) + #:use-module (guix build-system cmake) #:use-module (guix build-system gnu) + #:use-module (gnu packages compression) + #:use-module (gnu packages cups) + #:use-module (gnu packages gstreamer) + #:use-module (gnu packages linux) + #:use-module (gnu packages pkg-config) + #:use-module (gnu packages pulseaudio) #:use-module (gnu packages tls) - #:use-module (gnu packages xorg)) + #:use-module (gnu packages video) + #:use-module (gnu packages xorg) + #:use-module (gnu packages xml)) (define-public rdesktop (package @@ -57,3 +68,63 @@ capable of natively speaking Remote Desktop Protocol (RDP). It allows users to remotely control a user's Windows desktop.") (license license:gpl3+))) + +(define-public freerdp + (package + (name "freerdp") + (version "1.2.0-beta1+android9") + (source (origin + (method git-fetch) + (uri (git-reference + (url "git://github.com/FreeRDP/FreeRDP.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 "1m0lzrr7hkxfvc5f9p8snimv0rmin2463zhg25mv36wig8g5k7l3")))) + (build-system cmake-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("xmlto" ,xmlto))) + (inputs + `(("libx11" ,libx11) + ("libxkbfile" ,libxkbfile) + ("libxcursor" ,libxcursor) + ("libxext" ,libxext) + ("libxi" ,libxi) + ("libxv" ,libxv) + ("libxrandr" ,libxrandr) + ("libxrender" ,libxrender) + ("libxinerama" ,libxinerama) + ("libxshmfence" ,libxshmfence) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt) + ("cups" ,cups) + ("ffmpeg" ,ffmpeg) + ("pulseaudio" ,pulseaudio) + ("alsa-lib" ,alsa-lib) + ("gstreamer" ,gstreamer) + ("gst-plugins-base" ,gst-plugins-base) + ("zlib" ,zlib) + ("openssl" ,openssl))) + (arguments + `(#:configure-flags + '("-DCMAKE_INSTALL_LIBDIR=lib" + "-DWITH_PULSE=ON" + "-DWITH_CUPS=ON") + #:phases + (modify-phases %standard-phases + (add-before 'configure 'patch-cmakelists + (lambda _ + ;; CMake would return an error on REMOVE_DUPLICATES because this + ;; list is empty. + (substitute* "channels/client/CMakeLists.txt" + (("list\\(REMOVE_DUPLICATES CHANNEL_STATIC_CLIENT_ENTRIES\\)") + ""))))) + #:tests? #f)) ; no 'test' target + (home-page "https://www.freerdp.com") + (synopsis "Remote Desktop Protocol implementation") + (description "FreeRDP implements Microsoft's Remote Desktop Protocol. It +consists of the @code{xfreerdp} client, libraries for client and server +functionality, and Windows Portable Runtime (WinPR), a portable implementation +of parts of the Windows API.") + (license license:asl2.0))) From cce0da5e8d97528f5c556237b5085aa38dc151b6 Mon Sep 17 00:00:00 2001 From: Thomas Danckaert Date: Mon, 6 Feb 2017 18:44:51 +0100 Subject: [PATCH 073/135] gnu: Add vinagre. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/gnome.scm (vinagre): New variable. Co-authored-by: Ludovic Courtès --- gnu/packages/gnome.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index cd115f1f0c..0c41618d27 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -22,6 +22,7 @@ ;;; Copyright © 2016 ng0 ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Tobias Geerinckx-Rice +;;; Copyright © 2017 Thomas Danckaert ;;; ;;; This file is part of GNU Guix. ;;; @@ -96,11 +97,13 @@ #:use-module (gnu packages pkg-config) #:use-module (gnu packages pulseaudio) #:use-module (gnu packages python) + #:use-module (gnu packages rdesktop) #:use-module (gnu packages scanner) #:use-module (gnu packages ssh) #:use-module (gnu packages xml) #:use-module (gnu packages gl) #:use-module (gnu packages compression) + #:use-module (gnu packages spice) #:use-module (gnu packages tex) #:use-module (gnu packages tls) #:use-module (gnu packages web) @@ -1900,6 +1903,43 @@ selection and URL hints."))) `(("gtk+" ,gtk+-2) ; required by libvte.pc ("ncurses" ,ncurses))))) ; required by libvte.la +(define-public vinagre + (package + (name "vinagre") + (version "3.22.0") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "10jya3jyrm18nbw3v410gbkc7677bqamax44pzgd3j15randn76d")))) + (build-system glib-or-gtk-build-system) + (native-inputs + `(("pkg-config" ,pkg-config) + ("intltool" ,intltool) + ("itstool" ,itstool) + ("glib-bin" ,glib "bin") ;for glib-compile-schemas + ("gtk+-bin" ,gtk+ "bin"))) ;for gtk-update-icon-cache + (inputs + `(("libxml2" ,libxml2) + ("gtk-vnc" ,gtk-vnc) + ("gnome-keyring" ,gnome-keyring) + ("libsecret" ,libsecret) + ("freerdp" ,freerdp) + ("spice" ,spice) + ("spice-gtk" ,spice-gtk) + ("telepathy-glib" ,telepathy-glib) + ("vte" ,vte))) + (arguments + `(#:configure-flags '("--enable-rdp"))) + (home-page "https://wiki.gnome.org/Apps/Vinagre") + (synopsis "Remote desktop viewer for GNOME") + (description "Vinagre is a remote display client supporting the VNC, SPICE +and RDP protocols.") + (license license:gpl3+))) + (define-public dconf (package (name "dconf") From bafd5bea97569f82922bfc8c053c1b60d7660604 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Feb 2017 00:32:23 +0100 Subject: [PATCH 074/135] gnu: bind: Update to 9.10.4-P6. * gnu/packages/dns.scm (bind): Update to 9.10.4-P6. --- gnu/packages/dns.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index 643b5fe1e8..541979f587 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -82,7 +82,7 @@ and BOOTP/TFTP for network booting of diskless machines.") (define-public bind (package (name "bind") - (version "9.10.4-P5") + (version "9.10.4-P6") (source (origin (method url-fetch) (uri (string-append @@ -90,7 +90,7 @@ and BOOTP/TFTP for network booting of diskless machines.") version ".tar.gz")) (sha256 (base32 - "1sqg7wg05h66vdjc8j215r04f8pg7lphkb93nsqxvzhk6r0ppi49")))) + "0rgffdm0h6dks0np4h9q4kd8nyb3azrdxw2skqnjzd8ws78vzpx1")))) (build-system gnu-build-system) (outputs `("out" "utils")) (inputs From 507809be152049dff26bffdb58e1a90b638f046b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 4 Feb 2017 15:51:50 +0100 Subject: [PATCH 075/135] gnu: weechat: Make sure it finds the correct python. Fixes . * gnu/packages/irc.scm (weechat)[arguments]: Drop 'set-python-file-name' phase in favor of a 'wrap' phase. --- gnu/packages/irc.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gnu/packages/irc.scm b/gnu/packages/irc.scm index 82eb103688..1a1f748b4c 100644 --- a/gnu/packages/irc.scm +++ b/gnu/packages/irc.scm @@ -4,6 +4,7 @@ ;;; Copyright © 2015 Ludovic Courtès ;;; Copyright © 2015, 2016 Efraim Flashner ;;; Copyright © 2016 ng0 +;;; Copyright © 2017 Marius Bakke ;;; ;;; This file is part of GNU Guix. ;;; @@ -180,14 +181,13 @@ SILC and ICB protocols via plugins.") (add-before 'configure 'autogen (lambda _ (zero? (system* "./autogen.sh")))) - (add-before 'build 'set-python-file-name - (lambda* (#:key inputs #:allow-other-keys) - (substitute* "src/plugins/python/weechat-python.c" - (("python2_bin = weechat_python_get_python2_bin.*;") - (string-append "python2_bin = strdup (\"" - (assoc-ref inputs "python") - "/bin/python\");\n"))) - #t))))) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (py2 (assoc-ref inputs "python"))) + (wrap-program (string-append out "/bin/weechat") + `("PATH" ":" prefix (,(string-append py2 "/bin")))) + #t)))))) (synopsis "Extensible chat client") (description "WeeChat (Wee Enhanced Environment for Chat) is an Internet Relay Chat client, which is designed to be light and fast. From 77e52190fa0cad22884bd7b59a69f9115ac82c3b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Feb 2017 19:56:03 +0100 Subject: [PATCH 076/135] gnu: rocksdb: Update to 5.1.2. * gnu/packages/databases.scm (rocksdb): Update to 5.1.2. [native-inputs]: Add WHICH. --- gnu/packages/databases.scm | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index a358340baf..1ff6559883 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -35,6 +35,7 @@ #:use-module (gnu packages) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) + #:use-module (gnu packages base) #:use-module (gnu packages bash) #:use-module (gnu packages boost) #:use-module (gnu packages crypto) @@ -518,7 +519,7 @@ types are supported, as is encryption.") (define-public rocksdb (package (name "rocksdb") - (version "5.0.2") + (version "5.1.2") (source (origin (method url-fetch) (uri (string-append "https://github.com/facebook/rocksdb" @@ -526,7 +527,7 @@ types are supported, as is encryption.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1jj8b50w8jr3bnyjzk2hmlzq9x49yihjilx3xlq2rfdx3q9x4fay")) + "1qdbs13al7g45xc2j44wzx0ywrg32q1gsdhk5j6j4952xg91rfmh")) (modules '((guix build utils))) (snippet '(begin @@ -581,7 +582,8 @@ types are supported, as is encryption.") `(("parallel" ,parallel) ("perl" ,perl) ("procps" ,procps) - ("python" ,python-2))) + ("python" ,python-2) + ("which" ,which))) (inputs `(("bzip2" ,bzip2) ("gflags" ,gflags) From 06a035db42fcd660a680310e84a49af7490c70d3 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Feb 2017 20:11:17 +0100 Subject: [PATCH 077/135] gnu: databases.scm: Sort package imports. * gnu/packages/databases.scm (gnu): Sort module imports. --- gnu/packages/databases.scm | 32 ++++++++++++++++---------------- 1 file changed, 16 insertions(+), 16 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 1ff6559883..41efd9f2d8 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -33,37 +33,37 @@ (define-module (gnu packages databases) #:use-module (gnu packages) + #:use-module (gnu packages algebra) #:use-module (gnu packages autotools) #:use-module (gnu packages avahi) #:use-module (gnu packages base) #:use-module (gnu packages bash) + #:use-module (gnu packages bison) #:use-module (gnu packages boost) - #:use-module (gnu packages crypto) - #:use-module (gnu packages gettext) - #:use-module (gnu packages glib) - #:use-module (gnu packages perl) - #:use-module (gnu packages language) - #:use-module (gnu packages linux) - #:use-module (gnu packages tcl) - #:use-module (gnu packages tls) - #:use-module (gnu packages compression) - #:use-module (gnu packages ncurses) - #:use-module (gnu packages readline) - #:use-module (gnu packages emacs) #:use-module (gnu packages check) - #:use-module (gnu packages algebra) + #:use-module (gnu packages compression) + #:use-module (gnu packages crypto) #:use-module (gnu packages curl) #:use-module (gnu packages cyrus-sasl) + #:use-module (gnu packages emacs) + #:use-module (gnu packages gettext) + #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) - #:use-module (gnu packages python) + #:use-module (gnu packages jemalloc) + #:use-module (gnu packages language) + #:use-module (gnu packages linux) + #:use-module (gnu packages ncurses) #:use-module (gnu packages parallel) #:use-module (gnu packages pcre) + #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages popt) + #:use-module (gnu packages python) #:use-module (gnu packages rdf) + #:use-module (gnu packages readline) + #:use-module (gnu packages tcl) + #:use-module (gnu packages tls) #:use-module (gnu packages xml) - #:use-module (gnu packages bison) - #:use-module (gnu packages jemalloc) #:use-module ((guix licenses) #:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft agpl3+ bsd-2 bsd-3 public-domain asl2.0)) From ba8b9f8de0b17f473bf7e8b8860500d92a867646 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Wed, 8 Feb 2017 20:17:36 +0100 Subject: [PATCH 078/135] gnu: databases.scm: Use license: prefix. * gnu/packages/databases.scm (4store, gdbm, bdb, bdb-5.3, mysql, mariadb, postgresql, qdbm, rocksdb, sparql-query, sqlite, perl-dbi, redis, unixodbc, kyotocabinet, wiredtiger): Use license: prefix. --- gnu/packages/databases.scm | 41 ++++++++++++++++++-------------------- 1 file changed, 19 insertions(+), 22 deletions(-) diff --git a/gnu/packages/databases.scm b/gnu/packages/databases.scm index 41efd9f2d8..b74551c5bc 100644 --- a/gnu/packages/databases.scm +++ b/gnu/packages/databases.scm @@ -64,9 +64,6 @@ #:use-module (gnu packages tcl) #:use-module (gnu packages tls) #:use-module (gnu packages xml) - #:use-module ((guix licenses) - #:select (gpl2 gpl3 gpl3+ lgpl2.1+ lgpl3+ x11-style non-copyleft - agpl3+ bsd-2 bsd-3 public-domain asl2.0)) #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) @@ -121,7 +118,7 @@ (synopsis "Clustered RDF storage and query engine") (description "4store is a RDF/SPARQL store written in C, supporting either single machines or networked clusters.") - (license gpl3+))) + (license license:gpl3+))) (define-public gdbm (package @@ -143,7 +140,7 @@ either single machines or networked clusters.") "GDBM is a library for manipulating hashed databases. It is used to store key/value pairs in a file in a manner similar to the Unix dbm library and provides interfaces to the traditional file format.") - (license gpl3+))) + (license license:gpl3+))) (define-public bdb (package @@ -197,7 +194,7 @@ and provides interfaces to the traditional file format.") SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") ;; Starting with version 6, BDB is distributed under AGPL3. Many individual ;; files are covered by the 3-clause BSD license. - (license (list agpl3+ bsd-3)) + (license (list license:agpl3+ license:bsd-3)) (home-page "http://www.oracle.com/us/products/database/berkeley-db/overview/index.html"))) @@ -205,8 +202,8 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") (package (inherit bdb) (name "bdb") (version "5.3.28") - (license (non-copyleft "file://LICENSE" - "See LICENSE in the distribution.")) + (license (license:non-copyleft "file://LICENSE" + "See LICENSE in the distribution.")) (source (origin (method url-fetch) (uri (string-append "http://download.oracle.com/berkeley-db/db-" @@ -251,7 +248,7 @@ SQL, Key/Value, XML/XQuery or Java Object storage for their data model.") (description "LevelDB is a fast key-value storage library that provides an ordered mapping from string keys to string values.") - (license bsd-3))) + (license license:bsd-3))) (define-public mysql (package @@ -326,7 +323,7 @@ mapping from string keys to string values.") "MySQL is a fast, reliable, and easy to use relational database management system that supports the standardized Structured Query Language.") - (license gpl2))) + (license license:gpl2))) (define-public mariadb (package @@ -394,7 +391,7 @@ Language.") (description "MariaDB is a multi-user and multi-threaded SQL database server, designed as a drop-in replacement of MySQL.") - (license gpl2))) + (license license:gpl2))) (define-public postgresql (package @@ -430,7 +427,7 @@ stored procedures (in multiple languages). It includes most SQL:2008 data types, including INTEGER, NUMERIC, BOOLEAN, CHAR, VARCHAR, DATE, INTERVAL, and TIMESTAMP. It also supports storage of binary large objects, including pictures, sounds, or video.") - (license (x11-style "file://COPYRIGHT")))) + (license (license:x11-style "file://COPYRIGHT")))) (define-public qdbm (package @@ -513,7 +510,7 @@ manipulating text-based, human-editable databases. Despite being text-based, databases created with Recutils carry all of the expected features such as unique fields, primary keys, time stamps and more. Many different field types are supported, as is encryption.") - (license gpl3+) + (license license:gpl3+) (home-page "http://www.gnu.org/software/recutils/"))) (define-public rocksdb @@ -602,7 +599,7 @@ between @dfn{Write-Amplification-Factor} (WAF), @dfn{Read-Amplification-Factor} compactions, making it specially suitable for storing multiple terabytes of data in a single database. RocksDB is partially based on @code{LevelDB}.") ;; RocksDB is BSD-3 and the JNI adapter is Apache 2.0. - (license (list bsd-3 asl2.0)))) + (license (list license:bsd-3 license:asl2.0)))) (define-public sparql-query (package @@ -663,7 +660,7 @@ edit previous queries, even across sessions. It can be used non-interactively, for example from a shell script.") ;; Some files (like scan-sparql.c) contain a GPLv3+ license header, while ;; others (like sparql-query.c) contain a GPLv2+ license header. - (license (list gpl3+)))) + (license (list license:gpl3+)))) (define-public sqlite (package @@ -717,7 +714,7 @@ for example from a shell script.") zero-configuration, transactional SQL database engine. SQLite is the most widely deployed SQL database engine in the world. The source code for SQLite is in the public domain.") - (license public-domain))) + (license license:public-domain))) (define-public sqlite-3.15.1 (package (inherit sqlite) @@ -774,7 +771,7 @@ is in the public domain.") and BSD's DB except that it allows multiple simultaneous writers and uses locking internally to keep writers from trampling on each other. TDB is also extremely small.") - (license lgpl3+))) + (license license:lgpl3+))) (define-public perl-dbi (package @@ -1119,7 +1116,7 @@ valid SQL query.") (description "Unixodbc is a library providing an API with which to access data sources. Data sources include SQL Servers and any software with an ODBC Driver.") - (license lgpl2.1+) + (license license:lgpl2.1+) ;; COPYING contains copy of lgpl2.1 - but copyright notices just say "LGPL" (home-page "http://www.unixodbc.org"))) @@ -1147,7 +1144,7 @@ self-contained, serverless, zero-configuration, transactional NoSQL database engine. UnQLite is a document store database similar to MongoDB, Redis, CouchDB, etc. as well as a standard Key/Value store similar to BerkeleyDB, LevelDB, etc.") - (license bsd-2))) + (license license:bsd-2))) (define-public redis (package @@ -1175,7 +1172,7 @@ similar to BerkeleyDB, LevelDB, etc.") supports many data structures including strings, hashes, lists, sets, sorted sets, bitmaps and hyperloglogs.") (home-page "http://redis.io/") - (license bsd-3))) + (license license:bsd-3))) (define-public kyotocabinet (package @@ -1202,7 +1199,7 @@ sets, bitmaps and hyperloglogs.") "Kyoto Cabinet is a standalone file-based database that supports Hash and B+ Tree data storage models. It is a fast key-value lightweight database and supports many programming languages. It is a NoSQL database.") - (license gpl3+))) + (license license:gpl3+))) (define-public wiredtiger (package @@ -1238,7 +1235,7 @@ row-oriented storage (where all columns of a row are stored together), column-oriented storage (where columns are stored in groups, allowing for more efficient access and storage of column subsets) and log-structured merge trees (LSM), for sustained throughput under random insert workloads.") - (license gpl3) ; or GPL-2 + (license license:gpl3) ; or GPL-2 ;; configure.ac: WiredTiger requires a 64-bit build. (supported-systems '("x86_64-linux" "mips64el-linux")))) From 3548b83de16fb87a18a5fc6f0fba46d3dd9c8bc9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 9 Feb 2017 10:53:52 +0200 Subject: [PATCH 079/135] gnu: isc-dhcp: Update bundled bind to 9.9.9-P6. * gnu/packages/admin.scm (isc-dhcp): Update bundled bind to 9.9.9-P6. --- gnu/packages/admin.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/admin.scm b/gnu/packages/admin.scm index 16cecd9b8a..e021e6b2be 100644 --- a/gnu/packages/admin.scm +++ b/gnu/packages/admin.scm @@ -471,7 +471,7 @@ connection alive.") (bind-minor-version "9") (bind-patch-version "9") (bind-release-type "-P") ; for patch release, use "-P" - (bind-release-version "5") ; for patch release, e.g. "4" + (bind-release-version "6") ; for patch release, e.g. "6" (bind-version (string-append bind-major-version "." bind-minor-version @@ -587,7 +587,7 @@ connection alive.") "/bind-" bind-version ".tar.gz")) (sha256 (base32 - "1yn15chkfqf4d7961ip2x10jm27a9wqymz2xqh0a2g89arrirkaw")))) + "1qf9j0nyqx0qy871mj22xh4dg0n1pqlv94lpiijb8vr7n7m3svhr")))) ;; When cross-compiling, we need the cross Coreutils and sed. ;; Otherwise just use those from %FINAL-INPUTS. From f4b7cb88a48d793bd91c9fef624968ce4de7fea9 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 9 Feb 2017 11:22:14 +0200 Subject: [PATCH 080/135] gnu: ffmpeg: Update to 3.2.3. * gnu/packages/video.scm (ffmpeg): Update to 3.2.3. --- gnu/packages/video.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 0b3361e8f7..d72041cdeb 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -442,14 +442,14 @@ standards (MPEG-2, MPEG-4 ASP/H.263, MPEG-4 AVC/H.264, and VC-1/VMW3).") (define-public ffmpeg (package (name "ffmpeg") - (version "3.2.2") + (version "3.2.3") (source (origin (method url-fetch) (uri (string-append "https://ffmpeg.org/releases/ffmpeg-" version ".tar.xz")) (sha256 (base32 - "1z7d5y5crhsl5fm74236rdwbkd4jj5frx1l4iizjfym1w4gvs09z")))) + "1ifwjh68zw0mwq9swmfjqk2ck84gysi0w8hrkw2yddqhr8m51kjl")))) (build-system gnu-build-system) (inputs `(("fontconfig" ,fontconfig) From 98c8b963f410ed4833e593f056249483157f5a4f Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Thu, 9 Feb 2017 12:15:05 +0200 Subject: [PATCH 081/135] gnu: mpv: Disable build date. * gnu/packages/video.scm (mpv)[arguments]: Add '--disable-build-date' to the configure-flags. --- gnu/packages/video.scm | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index d72041cdeb..d6c62c73c3 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -891,7 +891,9 @@ SVCD, DVD, 3ivx, DivX 3/4/5, WMV and H.264 movies.") (lambda* (#:key inputs #:allow-other-keys) (copy-file (assoc-ref inputs "waf") "waf") (setenv "CC" "gcc")))) - #:configure-flags (list "--enable-libmpv-shared" "--enable-zsh-comp") + #:configure-flags (list "--enable-libmpv-shared" + "--enable-zsh-comp" + "--disable-build-date") ;; No check function defined. #:tests? #f)) (home-page "https://mpv.io/") From c8916c3336154f1933a59883d4e1da9f23249a09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Carlos=20S=C3=A1nchez=20de=20La=20Lama?= Date: Tue, 18 Oct 2016 18:07:29 +0200 Subject: [PATCH 082/135] gnu: bash-minimal: Assume getcwd works correctly when cross-compiling * gnu/packages/bash.scm (bash-minimal): Assume getcwd works correctly when cross compiling. Signed-off-by: Efraim Flashner --- gnu/packages/bash.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index d328d711d1..d59170d53c 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -207,7 +207,8 @@ without modification.") "ac_cv_func_dlopen=no" ,@(if (%current-target-system) - '("bash_cv_job_control_missing=no") + '("bash_cv_job_control_missing=no" + "bash_cv_getcwd_malloc=yes") '()))) ((#:phases phases) `(modify-phases ,phases From 206af46fe1cc0627e4846167aa5e7c095b21afe3 Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Thu, 9 Feb 2017 21:13:39 +1000 Subject: [PATCH 083/135] gnu: vsearch: Update to 2.4.0. * gnu/packages/bioinformatics.scm (vsearch): Update to 2.4.0. [source]: Convert most operations in the snippet to patch form and adjust for 2.4.0. * gnu/packages/patches/vsearch-unbundle-cityhash.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/packages/bioinformatics.scm | 29 ++------ .../patches/vsearch-unbundle-cityhash.patch | 73 +++++++++++++++++++ 2 files changed, 78 insertions(+), 24 deletions(-) create mode 100644 gnu/packages/patches/vsearch-unbundle-cityhash.patch diff --git a/gnu/packages/bioinformatics.scm b/gnu/packages/bioinformatics.scm index d7089959ea..a448b51c6c 100644 --- a/gnu/packages/bioinformatics.scm +++ b/gnu/packages/bioinformatics.scm @@ -5748,7 +5748,7 @@ track. The database is exposed as a @code{TxDb} object.") (define-public vsearch (package (name "vsearch") - (version "2.3.4") + (version "2.4.0") (source (origin (method url-fetch) @@ -5758,31 +5758,12 @@ track. The database is exposed as a @code{TxDb} object.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1xyraxmhyx62mxx8z7c8waygvcijwkh48ms1ar60w2cv2y2sn4al")) - (modules '((guix build utils))) + "007q9a50hdw4vs2iajabvbw7qccml4r8cbqzyi5ipkkf42jk3vnr")) + (patches (search-patches "vsearch-unbundle-cityhash.patch")) (snippet '(begin - ;; Remove bundled cityhash and '-mtune=native'. - (substitute* "src/Makefile.am" - (("^AM_CXXFLAGS=-I\\$\\{srcdir\\}/cityhash \ --O3 -mtune=native -Wall -Wsign-compare") - (string-append "AM_CXXFLAGS=-lcityhash" - " -O3 -Wall -Wsign-compare")) - (("^__top_builddir__bin_vsearch_SOURCES = city.h \\\\") - "__top_builddir__bin_vsearch_SOURCES = \\") - (("^city.h \\\\") "\\") - (("^citycrc.h \\\\") "\\") - (("^libcityhash_a.*") "") - (("noinst_LIBRARIES = libcpu_sse2.a libcpu_ssse3.a \ -libcityhash.a") - "noinst_LIBRARIES = libcpu_sse2.a libcpu_ssse3.a") - (("__top_builddir__bin_vsearch_LDADD = libcpu_ssse3.a \ -libcpu_sse2.a libcityhash.a") - "__top_builddir__bin_vsearch_LDADD = libcpu_ssse3.a \ -libcpu_sse2.a -lcityhash")) - (substitute* "src/vsearch.h" - (("^\\#include \"city.h\"") "#include ") - (("^\\#include \"citycrc.h\"") "#include ")) + ;; Remove bundled cityhash sources. The vsearch source is adjusted + ;; for this in the patch. (delete-file "src/city.h") (delete-file "src/citycrc.h") (delete-file "src/city.cc") diff --git a/gnu/packages/patches/vsearch-unbundle-cityhash.patch b/gnu/packages/patches/vsearch-unbundle-cityhash.patch new file mode 100644 index 0000000000..b1ecb1f063 --- /dev/null +++ b/gnu/packages/patches/vsearch-unbundle-cityhash.patch @@ -0,0 +1,73 @@ +diff --git a/src/Makefile.am b/src/Makefile.am +index e56a8a2..4adcc48 100644 +--- a/src/Makefile.am ++++ b/src/Makefile.am +@@ -3,7 +3,7 @@ bin_PROGRAMS = $(top_builddir)/bin/vsearch + if TARGET_PPC + AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -mcpu=power8 + else +-AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g ++AM_CXXFLAGS=-Wall -Wsign-compare -O3 -g -lcityhash + endif + + AM_CFLAGS=$(AM_CXXFLAGS) +@@ -18,8 +18,6 @@ allpairs.h \ + arch.h \ + bitmap.h \ + chimera.h \ +-city.h \ +-citycrc.h \ + cluster.h \ + cpu.h \ + db.h \ +@@ -59,31 +57,26 @@ xstring.h + + if TARGET_PPC + libcpu_a_SOURCES = cpu.cc $(VSEARCHHEADERS) +-noinst_LIBRARIES = libcpu.a libcityhash.a ++noinst_LIBRARIES = libcpu.a + else + libcpu_sse2_a_SOURCES = cpu.cc $(VSEARCHHEADERS) + libcpu_sse2_a_CXXFLAGS = $(AM_CXXFLAGS) -msse2 + libcpu_ssse3_a_SOURCES = cpu.cc $(VSEARCHHEADERS) + libcpu_ssse3_a_CXXFLAGS = $(AM_CXXFLAGS) -mssse3 -DSSSE3 +-noinst_LIBRARIES = libcpu_sse2.a libcpu_ssse3.a libcityhash.a ++noinst_LIBRARIES = libcpu_sse2.a libcpu_ssse3.a + endif + +-libcityhash_a_SOURCES = city.cc city.h +- + if TARGET_WIN + +-libcityhash_a_CXXFLAGS = -Wall -Wno-sign-compare -O3 -g -D_MSC_VER +-__top_builddir__bin_vsearch_LDFLAGS = -static +-__top_builddir__bin_vsearch_LDADD = libregex.a libcityhash.a libcpu_ssse3.a libcpu_sse2.a ++__top_builddir__bin_vsearch_LDFLAGS = -static -lcityhash ++__top_builddir__bin_vsearch_LDADD = libregex.a libcpu_ssse3.a libcpu_sse2.a + + else + +-libcityhash_a_CXXFLAGS = -Wall -Wno-sign-compare -O3 -g +- + if TARGET_PPC +-__top_builddir__bin_vsearch_LDADD = libcityhash.a libcpu.a ++__top_builddir__bin_vsearch_LDADD = libcpu.a + else +-__top_builddir__bin_vsearch_LDADD = libcityhash.a libcpu_ssse3.a libcpu_sse2.a ++__top_builddir__bin_vsearch_LDADD = libcpu_ssse3.a libcpu_sse2.a + endif + + endif +diff --git a/src/vsearch.h b/src/vsearch.h +index f2c244b..5f51bbe 100644 +--- a/src/vsearch.h ++++ b/src/vsearch.h +@@ -148,7 +148,7 @@ + #include + #endif + +-#include "city.h" ++#include + #include "md5.h" + #include "sha1.h" + From 65064909ed2c30f45048f85cf02771316d6c6cfc Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Feb 2017 14:58:54 +0100 Subject: [PATCH 084/135] gnu: libvpx: Update to 1.6.1. * gnu/packages/video.scm (libvpx): Update to 1.6.1. * gnu/packages/patches/libvpx-CVE-2016-2818.patch: Adjust to indentation changes. --- .../patches/libvpx-CVE-2016-2818.patch | 21 ++++++++++--------- gnu/packages/video.scm | 4 ++-- 2 files changed, 13 insertions(+), 12 deletions(-) diff --git a/gnu/packages/patches/libvpx-CVE-2016-2818.patch b/gnu/packages/patches/libvpx-CVE-2016-2818.patch index 1fdf01cbca..bef3448b81 100644 --- a/gnu/packages/patches/libvpx-CVE-2016-2818.patch +++ b/gnu/packages/patches/libvpx-CVE-2016-2818.patch @@ -9,15 +9,15 @@ Patch contents copied from Mozilla esr45 changeset 312077:7ebfe49f001c --- libvpx-1.5.0/vp8/vp8_cx_iface.c.orig 2015-11-09 17:12:38.000000000 -0500 +++ libvpx-1.5.0/vp8/vp8_cx_iface.c 2016-06-08 08:48:46.037213092 -0400 -@@ -925,11 +925,19 @@ - { - res = image2yuvconfig(img, &sd); +@@ -860,11 +860,20 @@ + if (img != NULL) { + res = image2yuvconfig(img, &sd); -- if (vp8_receive_raw_frame(ctx->cpi, ctx->next_frame_flag | lib_flags, -- &sd, dst_time_stamp, dst_end_time_stamp)) -- { -- VP8_COMP *cpi = (VP8_COMP *)ctx->cpi; -- res = update_error_state(ctx, &cpi->common.error); +- if (vp8_receive_raw_frame(ctx->cpi, ctx->next_frame_flag | lib_flags, &sd, +- dst_time_stamp, dst_end_time_stamp)) { +- VP8_COMP *cpi = (VP8_COMP *)ctx->cpi; +- res = update_error_state(ctx, &cpi->common.error); +- } + if (sd.y_width != ctx->cfg.g_w || sd.y_height != ctx->cfg.g_h) { + /* from vp8_encoder.h for g_w/g_h: + "Note that the frames passed as input to the encoder must have this resolution" @@ -31,6 +31,7 @@ Patch contents copied from Mozilla esr45 changeset 312077:7ebfe49f001c + VP8_COMP *cpi = (VP8_COMP *)ctx->cpi; + res = update_error_state(ctx, &cpi->common.error); + } - } ++ } - /* reset for next frame */ + /* reset for next frame */ + ctx->next_frame_flag = 0; diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index d6c62c73c3..5c5d91d86c 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -934,7 +934,7 @@ access to mpv's powerful playback capabilities.") (define-public libvpx (package (name "libvpx") - (version "1.6.0") + (version "1.6.1") (source (origin (method url-fetch) (uri (string-append "http://storage.googleapis.com/" @@ -942,7 +942,7 @@ access to mpv's powerful playback capabilities.") name "-" version ".tar.bz2")) (sha256 (base32 - "1basd6dda5di9p7jhc0f4f52wzm9c3hsravqspw6ibpcn5gbpbyh")) + "06d8hqjkfs6wl45qf4pwh1kpbvkx6cwywd5y8d4lgagvjwm0qb0w")) (patches (search-patches "libvpx-CVE-2016-2818.patch")))) (build-system gnu-build-system) (arguments From 233a0c943736ed8958a16ca162afc174b0853cfe Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Feb 2017 14:59:11 +0100 Subject: [PATCH 085/135] gnu: lua: Update to 5.3.4. * gnu/packages/lua.scm (lua): Update to 5.3.4. --- gnu/packages/lua.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/lua.scm b/gnu/packages/lua.scm index 8bb9a401a6..5016732b7a 100644 --- a/gnu/packages/lua.scm +++ b/gnu/packages/lua.scm @@ -43,13 +43,13 @@ (define-public lua (package (name "lua") - (version "5.3.3") + (version "5.3.4") (source (origin (method url-fetch) (uri (string-append "https://www.lua.org/ftp/lua-" version ".tar.gz")) (sha256 - (base32 "18mcfbbmjyp8f2l9yy7n6dzk066nq6man0kpwly4bppphilc04si")) + (base32 "0320a8dg3aci4hxla380dx1ifkw8gj4gbw5c4dz41g1kh98sm0gn")) (patches (search-patches "lua-pkgconfig.patch" "lua-liblua-so.patch")))) (build-system gnu-build-system) From e0c752f969b06f2364e284df3a4395484c8296b8 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Feb 2017 15:16:28 +0100 Subject: [PATCH 086/135] gnu: xf86-input-libinput: Update to 0.24.0. * gnu/packages/xorg.scm (xf86-input-libinput): Update to 0.24.0. --- gnu/packages/xorg.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index 97df44cebf..ecfdbcb8b0 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -2386,7 +2386,7 @@ including most mice, keyboards, tablets and touchscreens.") (define-public xf86-input-libinput (package (name "xf86-input-libinput") - (version "0.23.0") + (version "0.24.0") (source (origin (method url-fetch) (uri (string-append @@ -2394,7 +2394,7 @@ including most mice, keyboards, tablets and touchscreens.") name "-" version ".tar.bz2")) (sha256 (base32 - "1p596v3kbmjpdz3kz8z19bnd79l860f1pbwjvma7bz7qx3gynlqb")))) + "0a1nn65qq71bbfhxq39zdb4b1h6ickzv98cjdacv4ngd18shgjyx")))) (build-system gnu-build-system) (arguments '(#:configure-flags From 3a44c7bbdc45616acb4e24d4ddfdc84cdb85d480 Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 9 Feb 2017 13:37:00 +0000 Subject: [PATCH 087/135] gnu: Add libmp4v2. * gnu/packages/video.scm (libmp4v2): New variable. Signed-off-by: Kei Kebreau --- gnu/packages/video.scm | 63 +++++++++++++++++++++++++++++++++++++++++- 1 file changed, 62 insertions(+), 1 deletion(-) diff --git a/gnu/packages/video.scm b/gnu/packages/video.scm index 5c5d91d86c..3acd2bf91a 100644 --- a/gnu/packages/video.scm +++ b/gnu/packages/video.scm @@ -11,7 +11,7 @@ ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 Dmitry Nikolaev ;;; Copyright © 2016 Andy Patterson -;;; Copyright © 2016 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Eric Bavier ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; @@ -57,6 +57,7 @@ #:use-module (gnu packages compression) #:use-module (gnu packages curl) #:use-module (gnu packages databases) + #:use-module (gnu packages dejagnu) #:use-module (gnu packages elf) #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) @@ -75,6 +76,7 @@ #:use-module (gnu packages linux) #:use-module (gnu packages lua) #:use-module (gnu packages m4) + #:use-module (gnu packages man) #:use-module (gnu packages mp3) #:use-module (gnu packages ncurses) #:use-module (gnu packages ocr) @@ -1864,3 +1866,62 @@ of modern, widely supported codecs.") (description "Openh264 is a library which can decode H264 video streams.") (license license:bsd-2))) + +(define-public libmp4v2 + (package + (name "libmp4v2") + (version "2.0.0") + (source + (origin + (method url-fetch) + ;; XXX: The new location of upstream is uncertain and will become relevant the + ;; moment when the googlecode archive shuts down. It is past the date it + ;; should've been turned off. I tried to communicate with upstream, but this + ;; wasn't very responsive and not very helpful. The short summary is, it is + ;; chaos when it comes to the amount of forks and only time will tell where + ;; the new upstream location is. + (uri (string-append "https://storage.googleapis.com/google-" + "code-archive-downloads/v2/" + "code.google.com/mp4v2/mp4v2-" version ".tar.bz2")) + (file-name (string-append name "-" version ".tar.bz2")) + (sha256 + (base32 + "0f438bimimsvxjbdp4vsr8hjw2nwggmhaxgcw07g2z361fkbj683")))) + (build-system gnu-build-system) + (outputs '("out" + "static")) ; 3.7MiB .a file + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'unpack 'remove-dates + (lambda _ + ;; Make the build reproducible. + (substitute* "configure" + (("PROJECT_build=\"`date`\"") "PROJECT_build=\"\"") + (("ac_abs_top_builddir=$ac_pwd") "ac_abs_top_builddir=\"\"")) + #t)) + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + ;; Move static libraries to the "static" output. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (file) + (install-file file slib) + (delete-file file)) + (find-files lib "\\.a$")) + #t)))))) + (native-inputs + `(("help2man" ,help2man) + ("dejagnu" ,dejagnu))) + (home-page "https://code.google.com/archive/p/mp4v2/") + (synopsis "API to create and modify mp4 files") + (description + "The MP4v2 library provides an API to create and modify mp4 files as defined by +ISO-IEC:14496-1:2001 MPEG-4 Systems. This file format is derived from Apple's QuickTime +file format that has been used as a multimedia file format in a variety of platforms and +applications. It is a very powerful and extensible format that can accommodate +practically any type of media.") + (license license:mpl1.1))) From 1ad3c7f2e61dc7c284280f3f47e11cb86124ebef Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 9 Feb 2017 13:37:01 +0000 Subject: [PATCH 088/135] gnu: Add tidy-html. * gnu/packages/web.scm (tidy-html): New variable. Signed-off-by: Kei Kebreau --- gnu/packages/web.scm | 50 +++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 49 insertions(+), 1 deletion(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 8cc80a2c45..4d138b79fc 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -13,7 +13,7 @@ ;;; Copyright © 2016 Rene Saavedra ;;; Copyright © 2016 Ben Woodcroft ;;; Copyright © 2016 Clément Lassieur -;;; Copyright © 2016 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; Copyright © 2016 Arun Isaac ;;; Copyright © 2016 Tobias Geerinckx-Rice ;;; Copyright © 2016 Bake Timmons @@ -4018,3 +4018,51 @@ service for that request. Requests are made using port numbers as identifiers and xinetd usually launches another daemon to handle the request. It can be used to start services with both privileged and non-privileged port numbers.") (license (l:fsf-free "file://COPYRIGHT")))) + +(define-public tidy-html + (package + (name "tidy-html") + (version "5.2.0") + (source + (origin + (method url-fetch) + (uri (string-append "https://github.com/htacg/tidy-html5/archive/" + version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0kbwzh15dlapp3s3vff2qgz0yfcf8hwsnx5q4igwa6pimhak8lw0")))) + (build-system cmake-build-system) + (outputs '("out" + "static")) ; 1.0MiB of .a files + (arguments + `(#:tests? #f ; No tests available + #:configure-flags (list "-DCMAKE_BUILD_TYPE=Release") + #:phases + (modify-phases %standard-phases + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + ;; Move static libraries to the "static" output. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (file) + (install-file file slib) + (delete-file file)) + (find-files lib "\\.a$")) + #t)))))) + (native-inputs + `(("libxslt" ,libxslt))) + (home-page "http://www.html-tidy.org/") + (synopsis "HTML Tidy with HTML5 support") + (description + "Tidy is a console application which corrects and cleans up +HTML and XML documents by fixing markup errors and upgrading +legacy code to modern standards. + +Tidy also provides @code{libtidy}, a C static and dynamic library that +developers can integrate into their applications to make use of the +functions of Tidy.") + (license l:bsd-3))) From a4f05b46205d5b4375c5fc243dacbbec7029247b Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 9 Feb 2017 13:37:02 +0000 Subject: [PATCH 089/135] gnu: Add libsmf. * gnu/packages/music.scm (libsmf): New variable. Signed-off-by: Kei Kebreau --- gnu/packages/music.scm | 49 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index b8b97eb141..ce874ac436 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -8,6 +8,7 @@ ;;; Copyright © 2016 Kei Kebreau ;;; Copyright © 2016 John J. Foerch ;;; Copyright © 2016 Alex Griffin +;;; Copyright © 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -2769,3 +2770,51 @@ collections and wantlists, inventory, and orders.") (define-public python2-discogs-client (package-with-python2 python-discogs-client)) + +(define-public libsmf + (package + (name "libsmf") + (version "1.3") + (source + (origin + (method url-fetch) + ;; SF download page says development moved, but the link it points to + ;; is gone (https://github.com/nilsgey/libsmf). Someone else adopted + ;; it but made no release so far (https://github.com/stump/libsmf). + (uri (string-append "mirror://sourceforge/libsmf/libsmf/" + version "/libsmf-" version ".tar.gz")) + (sha256 + (base32 + "16c0n40h0r56gzbh5ypxa4dwp296dan3jminml2qkb4lvqarym6k")))) + (build-system gnu-build-system) + (outputs '("out" + "static")) ; 88KiB of .a files + (arguments + `(#:phases + (modify-phases %standard-phases + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + ;; Move static libraries to the "static" output. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (file) + (install-file file slib) + (delete-file file)) + (find-files lib "\\.a$")) + #t)))))) + (inputs + `(("readline" ,readline) + ("glib" ,glib))) + (native-inputs + `(("doxygen" ,doxygen) + ("pkg-config" ,pkg-config))) + (home-page "http://libsmf.sourceforge.net/") + (synopsis "Standard MIDI File format library") + (description + "LibSMF is a C library for handling SMF (\"*.mid\") files. It transparently handles +conversions between time and pulses, tempo map handling and more. The only dependencies +are a C compiler and glib. Full API documentation and examples are included.") + (license license:bsd-2))) From b0a2adddc8d2beeb9b3d20a433954ea10be7a8c0 Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 9 Feb 2017 13:37:03 +0000 Subject: [PATCH 090/135] gnu: libextractor: Add dependencies. * gnu/packages/gnunet.scm (libextractor): Add dependencies: tidy-html, libmp4v2, libsmf, bzip2. [arguments](configure-flags): Add "--with-libtidy". * Adjust the FIXME comment section accordingly. Signed-off-by: Kei Kebreau --- gnu/packages/gnunet.scm | 17 +++++++++++------ 1 file changed, 11 insertions(+), 6 deletions(-) diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index 27e1ffb4e0..f7da12ad5c 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -5,7 +5,7 @@ ;;; Copyright © 2015 Efraim Flashner ;;; Copyright © 2016 Ricardo Wurmus ;;; Copyright © 2016 Mark H Weaver -;;; Copyright © 2016 ng0 +;;; Copyright © 2016, 2017 ng0 ;;; ;;; This file is part of GNU Guix. ;;; @@ -44,7 +44,9 @@ #:use-module (gnu packages libunistring) #:use-module (gnu packages maths) #:use-module (gnu packages multiprecision) + #:use-module (gnu packages music) #:use-module (gnu packages ncurses) + #:use-module (gnu packages package-management) #:use-module (gnu packages pkg-config) #:use-module (gnu packages perl) #:use-module (gnu packages pulseaudio) @@ -87,13 +89,11 @@ ;; The following dependencies are all optional, but should be ;; available for maximum coverage: ;; * libmagic (file) - ;; * libmp4v2 ; package it - ;; * librpm ; package it - ;; * libsmf ; package it - ;; * libtidy ; package it + ;; * librpm (rpm) ; investigate failure ;; * libgif (giflib) ; investigate failure (inputs `(("exiv2" ,exiv2) + ("bzip2" ,bzip2) ("flac" ,flac) ("ffmpeg" ,ffmpeg) ("file" ,file) ;libmagic, for the MIME plug-in @@ -106,6 +106,9 @@ ("libjpeg" ,libjpeg) ("libltdl" ,libltdl) ("libmpeg2" ,libmpeg2) + ("libmp4v2" ,libmp4v2) + ("libsmf" ,libsmf) + ("tidy-html" ,tidy-html) ("libogg" ,libogg) ("libtiff" ,libtiff) ("libvorbis" ,libvorbis) @@ -115,7 +118,9 @@ (arguments `(#:configure-flags (list (string-append "--with-ltdl=" - (assoc-ref %build-inputs "libltdl"))) + (assoc-ref %build-inputs "libltdl")) + (string-append "--with-tidy=" + (assoc-ref %build-inputs "tidy-html"))) #:parallel-tests? #f)) (synopsis "Library to extract meta-data from media files") (description From ff71196067a97bd378a4f1b0ae2b78384b78377d Mon Sep 17 00:00:00 2001 From: ng0 Date: Thu, 9 Feb 2017 13:37:04 +0000 Subject: [PATCH 091/135] gnu: libextractor: Move .a files to output "static". * gnu/packages/gnunet.scm (libextractor): Move .a files to "static" output. [arguments](phases): New phase for moving .a files to output "static". Signed-off-by: Kei Kebreau --- gnu/packages/gnunet.scm | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/gnu/packages/gnunet.scm b/gnu/packages/gnunet.scm index f7da12ad5c..a4514a7f41 100644 --- a/gnu/packages/gnunet.scm +++ b/gnu/packages/gnunet.scm @@ -115,13 +115,30 @@ ("zlib" ,zlib))) (native-inputs `(("pkg-config" ,pkg-config))) + (outputs '("out" + "static")) ; 396 KiB .a files (arguments `(#:configure-flags (list (string-append "--with-ltdl=" (assoc-ref %build-inputs "libltdl")) (string-append "--with-tidy=" (assoc-ref %build-inputs "tidy-html"))) - #:parallel-tests? #f)) + #:parallel-tests? #f + #:phases + (modify-phases %standard-phases + (add-after 'install 'move-static-libraries + (lambda* (#:key outputs #:allow-other-keys) + ;; Move static libraries to the "static" output. + (let* ((out (assoc-ref outputs "out")) + (lib (string-append out "/lib")) + (static (assoc-ref outputs "static")) + (slib (string-append static "/lib"))) + (mkdir-p slib) + (for-each (lambda (file) + (install-file file slib) + (delete-file file)) + (find-files lib "\\.a$")) + #t)))))) (synopsis "Library to extract meta-data from media files") (description "GNU libextractor is a library for extracting metadata from files. It From 4554813936a00ce33b4c80df4dc9e1092bf79470 Mon Sep 17 00:00:00 2001 From: Paul Garlick Date: Wed, 1 Feb 2017 15:12:59 +0000 Subject: [PATCH 092/135] gnu: gmsh: Propagate opencascade-oce. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/maths.scm (gmsh)[propagated-inputs]: Add opencascade-oce. [arguments]: Remove #:phases parameter for component8_in_a_box test Signed-off-by: Ludovic Courtès --- gnu/packages/maths.scm | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index c9de4f4210..b362fbe8f7 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1035,6 +1035,7 @@ Open CASCADE library.") ("lapack" ,lapack) ("mesa" ,mesa) ("glu" ,glu) + ("opencascade-oce" ,opencascade-oce) ("libx11" ,libx11) ("libxext" ,libxext))) (inputs @@ -1043,15 +1044,7 @@ Open CASCADE library.") (arguments `(#:configure-flags `("-DENABLE_METIS:BOOL=OFF" "-DENABLE_BUILD_SHARED:BOOL=ON" - "-DENABLE_BUILD_DYNAMIC:BOOL=ON") - #:phases (modify-phases %standard-phases - (replace - 'check - (lambda _ - (zero? (system* "make" "test" - ;; Disable this test. See - ;; https://geuz.org/trac/gmsh/ticket/271 - "ARGS=-E component8_in_a_box"))))))) + "-DENABLE_BUILD_DYNAMIC:BOOL=ON"))) (home-page "http://www.geuz.org/gmsh/") (synopsis "3D finite element grid generator") (description "Gmsh is a 3D finite element grid generator with a built-in From 81e0bc1834490a1a8092c75a0733b15c2b407285 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Sun, 5 Feb 2017 14:42:10 +0100 Subject: [PATCH 093/135] import: json: Explicitly ask for JSON data. * guix/import/json.scm (json-fetch): Add #:headers to http-fetch call. --- guix/import/json.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/guix/import/json.scm b/guix/import/json.scm index 5940f5e48f..c76bc9313c 100644 --- a/guix/import/json.scm +++ b/guix/import/json.scm @@ -29,7 +29,8 @@ (guard (c ((and (http-get-error? c) (= 404 (http-get-error-code c))) #f)) ;"expected" if package is unknown - (let* ((port (http-fetch url)) + (let* ((port (http-fetch url #:headers '((user-agent . "GNU Guile") + (Accept . "application/json")))) (result (hash-table->alist (json->scm port)))) (close-port port) result))) From bc5844d14955c09330d47984d930e1e9aa8c0ee0 Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Mon, 6 Feb 2017 18:19:26 +0100 Subject: [PATCH 094/135] import: Add stackage importer and updater. * guix/import/stackage.scm: New file. * guix/scripts/import/stackage.scm: New file. * Makefile.am (MODULES): Add new files. * guix/scripts/import.scm (importers): Add "stackage". * guix/scripts/refresh.scm (%updaters): Add %stackage-updater. * doc/guix.texi (Invoking 'guix import'): Document the importer. (Invoking 'guix refresh'): Add stackage to option --type valid values. * guix/import/hackage.scm (guix-package->hackage-name, hackage-fetch, hackage-source-url, hackage-cabal-url, hackage-package?): Export them. --- Makefile.am | 2 + doc/guix.texi | 33 +++++++- guix/import/hackage.scm | 8 +- guix/import/stackage.scm | 135 +++++++++++++++++++++++++++++++ guix/scripts/import.scm | 3 +- guix/scripts/import/stackage.scm | 115 ++++++++++++++++++++++++++ guix/scripts/refresh.scm | 1 + 7 files changed, 294 insertions(+), 3 deletions(-) create mode 100644 guix/import/stackage.scm create mode 100644 guix/scripts/import/stackage.scm diff --git a/Makefile.am b/Makefile.am index 360c356f10..18501bddfc 100644 --- a/Makefile.am +++ b/Makefile.am @@ -126,6 +126,7 @@ MODULES = \ guix/import/cabal.scm \ guix/import/cran.scm \ guix/import/hackage.scm \ + guix/import/stackage.scm \ guix/import/elpa.scm \ guix/scripts.scm \ guix/scripts/download.scm \ @@ -147,6 +148,7 @@ MODULES = \ guix/scripts/import/gnu.scm \ guix/scripts/import/nix.scm \ guix/scripts/import/hackage.scm \ + guix/scripts/import/stackage.scm \ guix/scripts/import/elpa.scm \ guix/scripts/environment.scm \ guix/scripts/publish.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index 21082aece4..eca2d99487 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -31,7 +31,8 @@ Copyright @copyright{} 2016 Jan Nieuwenhuizen@* Copyright @copyright{} 2016 Julien Lepiller@* Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2017 Clément Lassieur@* -Copyright @copyright{} 2017 Mathieu Othacehe +Copyright @copyright{} 2017 Mathieu Othacehe@* +Copyright @copyright{} 2017 Federico Beffa Permission is granted to copy, distribute and/or modify this document under the terms of the GNU Free Documentation License, Version 1.3 or @@ -5340,6 +5341,34 @@ package name by an at-sign and a version number as in the following example: guix import hackage mtl@@2.1.3.1 @end example +@item stackage +@cindex stackage +The @code{stackage} importer is a wrapper around the @code{hackage} one. +It takes a package name, looks up the package version included in a +long-term support (LTS) @uref{https://www.stackage.org, Stackage} +release and uses the @code{hackage} importer to retrieve its metadata. +Note that it is up to you to select an LTS release compatible with the +GHC compiler used by Guix. + +Specific command-line options are: + +@table @code +@item --no-test-dependencies +@itemx -t +Do not include dependencies required only by the test suites. +@item --lts-version=@var{version} +@itemx -r @var{version} +@var{version} is the desired LTS release version. If omitted the latest +release is used. +@end table + +The command below imports metadata for the @code{HTTP} Haskell package +included in the LTS Stackage release version 7.18: + +@example +guix import stackage --lts-version=7.18 HTTP +@end example + @item elpa @cindex elpa Import metadata from an Emacs Lisp Package Archive (ELPA) package @@ -5504,6 +5533,8 @@ the updater for @uref{https://rubygems.org, RubyGems} packages. the updater for @uref{https://github.com, GitHub} packages. @item hackage the updater for @uref{https://hackage.haskell.org, Hackage} packages. +@item stackage +the updater for @uref{https://www.stackage.org, Stackage} packages. @item crate the updater for @uref{https://crates.io, Crates} packages. @end table diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 9af78ea888..4d01ed23ea 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -37,7 +37,13 @@ #:use-module (guix packages) #:use-module ((guix utils) #:select (call-with-temporary-output-file)) #:export (hackage->guix-package - %hackage-updater)) + %hackage-updater + + guix-package->hackage-name + hackage-fetch + hackage-source-url + hackage-cabal-url + hackage-package?)) (define ghc-standard-libraries ;; List of libraries distributed with ghc (7.10.2). We include GHC itself as diff --git a/guix/import/stackage.scm b/guix/import/stackage.scm new file mode 100644 index 0000000000..542b718083 --- /dev/null +++ b/guix/import/stackage.scm @@ -0,0 +1,135 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Federico Beffa +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix import stackage) + #:use-module (ice-9 match) + #:use-module (ice-9 regex) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:use-module (guix import json) + #:use-module (guix import hackage) + #:use-module (guix memoization) + #:use-module (guix packages) + #:use-module (guix upstream) + #:use-module (guix ui) + #:export (stackage->guix-package + %stackage-updater)) + + +;;; +;;; Stackage info fetcher and access functions +;;; + +(define %stackage-url "http://www.stackage.org") + +(define (lts-info-ghc-version lts-info) + "Retruns the version of the GHC compiler contained in LTS-INFO." + (match lts-info + ((("snapshot" ("ghc" . version) _ _) _) version) + (_ #f))) + +(define (lts-info-packages lts-info) + "Retruns the alist of packages contained in LTS-INFO." + (match lts-info + ((_ ("packages" pkg ...)) pkg) + (_ '()))) + +(define stackage-lts-info-fetch + ;; "Retrieve the information about the LTS Stackage release VERSION." + (memoize + (lambda* (#:optional (version "")) + (let* ((url (if (string=? "" version) + (string-append %stackage-url "/lts") + (string-append %stackage-url "/lts-" version))) + (lts-info (json-fetch url))) + (if lts-info + (reverse lts-info) + (leave (_ "LTS release version not found: ~A~%") version)))))) + +(define (stackage-package-name pkg-info) + (assoc-ref pkg-info "name")) + +(define (stackage-package-version pkg-info) + (assoc-ref pkg-info "version")) + +(define (lts-package-version pkgs-info name) + "Return the version of the package with upstream NAME included in PKGS-INFO." + (let ((pkg (find (lambda (pkg) (string=? (stackage-package-name pkg) name)) + pkgs-info))) + (stackage-package-version pkg))) + + +;;; +;;; Importer entry point +;;; + +(define (hackage-name-version name version) + (and version (string-append name "@" version))) + +(define* (stackage->guix-package package-name ; upstream name + #:key + (include-test-dependencies? #t) + (lts-version "") + (packages-info + (lts-info-packages + (stackage-lts-info-fetch lts-version)))) + "Fetch Cabal file for PACKAGE-NAME from hackage.haskell.org. The retrieved +vesion corresponds to the version of PACKAGE-NAME specified in the LTS-VERSION +release at stackage.org. Return the `package' S-expression corresponding to +that package, or #f on failure. PACKAGES-INFO is the alist with the packages +included in the Stackage LTS release." + (let* ((version (lts-package-version packages-info package-name)) + (name-version (hackage-name-version package-name version))) + (if name-version + (hackage->guix-package name-version + #:include-test-dependencies? + include-test-dependencies?) + (leave (_ "package not found: ~A~%") package-name)))) + + +;;; +;;; Updater +;;; + +(define latest-lts-release + (let ((pkgs-info (mlambda () (lts-info-packages (stackage-lts-info-fetch))))) + (lambda* (package) + "Return an for the latest Stackage LTS release of +PACKAGE or #f it the package is not inlucded in the Stackage LTS release." + (let* ((hackage-name (guix-package->hackage-name package)) + (version (lts-package-version (pkgs-info) hackage-name)) + (name-version (hackage-name-version hackage-name version))) + (match (and=> name-version hackage-fetch) + (#f (format (current-error-port) + "warning: failed to parse ~a~%" + (hackage-cabal-url hackage-name)) + #f) + (_ (let ((url (hackage-source-url hackage-name version))) + (upstream-source + (package (package-name package)) + (version version) + (urls (list url)))))))))) + +(define %stackage-updater + (upstream-updater + (name 'stackage) + (description "Updater for Stackage LTS packages") + (pred hackage-package?) + (latest latest-lts-release))) + +;;; stackage.scm ends here diff --git a/guix/scripts/import.scm b/guix/scripts/import.scm index 4d07e0fd69..8c2f705738 100644 --- a/guix/scripts/import.scm +++ b/guix/scripts/import.scm @@ -73,7 +73,8 @@ rather than \\n." ;;; Entry point. ;;; -(define importers '("gnu" "nix" "pypi" "cpan" "hackage" "elpa" "gem" "cran" "crate")) +(define importers '("gnu" "nix" "pypi" "cpan" "hackage" "stackage" "elpa" "gem" + "cran" "crate")) (define (resolve-importer name) (let ((module (resolve-interface diff --git a/guix/scripts/import/stackage.scm b/guix/scripts/import/stackage.scm new file mode 100644 index 0000000000..cf47bff259 --- /dev/null +++ b/guix/scripts/import/stackage.scm @@ -0,0 +1,115 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2017 Federico Beffa +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix scripts import stackage) + #:use-module (guix ui) + #:use-module (guix utils) + #:use-module (guix packages) + #:use-module (guix scripts) + #:use-module (guix import stackage) + #:use-module (guix scripts import) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-11) + #:use-module (srfi srfi-37) + #:use-module (ice-9 match) + #:use-module (ice-9 format) + #:export (guix-import-stackage)) + + +;;; +;;; Command-line options. +;;; + +(define %default-options + `((lts-version . "") + (include-test-dependencies? . #t))) + +(define (show-help) + (display (_ "Usage: guix import stackage PACKAGE-NAME +Import and convert the LTS Stackage package for PACKAGE-NAME.\n")) + (display (_ " + -r VERSION, --lts-version=VERSION + specify the LTS version to use")) + (display (_ " + -h, --help display this help and exit")) + (display (_ " + -t, --no-test-dependencies don't include test-only dependencies")) + (display (_ " + -V, --version display version information and exit")) + (newline) + (show-bug-report-information)) + +(define %options + ;; Specification of the command-line options. + (cons* (option '(#\h "help") #f #f + (lambda args + (show-help) + (exit 0))) + (option '(#\V "version") #f #f + (lambda args + (show-version-and-exit "guix import stackage"))) + (option '(#\t "no-test-dependencies") #f #f + (lambda (opt name arg result) + (alist-cons 'include-test-dependencies? #f + (alist-delete 'include-test-dependencies? + result)))) + (option '(#\r "lts-version") #t #f + (lambda (opt name arg result) + (alist-cons 'lts-version arg + (alist-delete 'lts-version + result)))) + %standard-import-options)) + + +;;; +;;; Entry point. +;;; + +(define (guix-import-stackage . args) + (define (parse-options) + ;; Return the alist of option values. + (args-fold* args %options + (lambda (opt name arg result) + (leave (_ "~A: unrecognized option~%") name)) + (lambda (arg result) + (alist-cons 'argument arg result)) + %default-options)) + + (let* ((opts (parse-options)) + (args (filter-map (match-lambda + (('argument . value) + value) + (_ #f)) + (reverse opts)))) + (match args + ((package-name) + (let ((sexp (stackage->guix-package + package-name + #:include-test-dependencies? + (assoc-ref opts 'include-test-dependencies?) + #:lts-version (assoc-ref opts 'lts-version)))) + (unless sexp + (leave (_ "failed to download cabal file for package '~a'~%") + package-name)) + sexp)) + (() + (leave (_ "too few arguments~%"))) + ((many ...) + (leave (_ "too many arguments~%")))))) + +;;; stackage.scm ends here diff --git a/guix/scripts/refresh.scm b/guix/scripts/refresh.scm index 0dd7eee974..4d3c695aaf 100644 --- a/guix/scripts/refresh.scm +++ b/guix/scripts/refresh.scm @@ -205,6 +205,7 @@ unavailable optional dependencies such as Guile-JSON." %elpa-updater %cran-updater %bioconductor-updater + ((guix import stackage) => %stackage-updater) %hackage-updater ((guix import cpan) => %cpan-updater) ((guix import pypi) => %pypi-updater) From a4824c60ef5ffc0cae3771a16524287904a1c8bd Mon Sep 17 00:00:00 2001 From: Federico Beffa Date: Thu, 9 Feb 2017 17:05:41 +0100 Subject: [PATCH 095/135] import: hackage: Handle unknown packages gracefully. * guix/import/hackage.scm (hackage-fetch): Add 'guard'. --- guix/import/hackage.scm | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/guix/import/hackage.scm b/guix/import/hackage.scm index 4d01ed23ea..2c9df073d3 100644 --- a/guix/import/hackage.scm +++ b/guix/import/hackage.scm @@ -21,6 +21,7 @@ (define-module (guix import hackage) #:use-module (ice-9 match) #:use-module (ice-9 regex) + #:use-module (srfi srfi-34) #:use-module (srfi srfi-26) #:use-module (srfi srfi-11) #:use-module (srfi srfi-1) @@ -115,12 +116,15 @@ version is returned." "Return the Cabal file for the package NAME-VERSION, or #f on failure. If the version part is omitted from the package name, then return the latest version." - (let-values (((name version) (package-name->name+version name-version))) - (let* ((url (hackage-cabal-url name version)) - (port (http-fetch url)) - (result (read-cabal (canonical-newline-port port)))) - (close-port port) - result))) + (guard (c ((and (http-get-error? c) + (= 404 (http-get-error-code c))) + #f)) ;"expected" if package is unknown + (let-values (((name version) (package-name->name+version name-version))) + (let* ((url (hackage-cabal-url name version)) + (port (http-fetch url)) + (result (read-cabal (canonical-newline-port port)))) + (close-port port) + result)))) (define string->license ;; List of valid values from From 6554be68b43d5b240c8075cdbb479c66a9780f59 Mon Sep 17 00:00:00 2001 From: Mathieu Lirzin Date: Sun, 29 Jan 2017 00:34:48 +0100 Subject: [PATCH 096/135] git-download: Add 'git-predicate'. * guix/git-download.scm (git-predicate): New procedure. * gnu/packages/package-management.scm (current-guix): Use it. (make-git-predicate): Remove. --- gnu/packages/package-management.scm | 37 +------------------------ guix/git-download.scm | 43 ++++++++++++++++++++++++++++- 2 files changed, 43 insertions(+), 37 deletions(-) diff --git a/gnu/packages/package-management.scm b/gnu/packages/package-management.scm index 26802e0c62..8291740998 100644 --- a/gnu/packages/package-management.scm +++ b/gnu/packages/package-management.scm @@ -25,7 +25,6 @@ #:use-module (guix utils) #:use-module (guix build-system gnu) #:use-module (guix build-system python) - #:use-module ((guix build utils) #:select (with-directory-excursion)) #:use-module ((guix licenses) #:select (gpl2+ gpl3+ lgpl2.1+ asl2.0)) #:use-module (gnu packages) #:use-module (gnu packages guile) @@ -53,10 +52,6 @@ #:use-module (gnu packages tls) #:use-module (gnu packages ssh) #:use-module (gnu packages vim) - #:use-module (srfi srfi-1) - #:use-module (srfi srfi-26) - #:use-module (ice-9 popen) - #:use-module (ice-9 rdelim) #:use-module (ice-9 match)) (define (boot-guile-uri arch) @@ -275,38 +270,8 @@ generated file." (_ #t))) -(define (make-git-predicate directory) - "Return a predicate that returns true if a file is part of the Git checkout -living at DIRECTORY. Upon Git failure, return #f instead of a predicate." - (define (parent-directory? thing directory) - ;; Return #t if DIRECTORY is the parent of THING. - (or (string-suffix? thing directory) - (and (string-index thing #\/) - (parent-directory? (dirname thing) directory)))) - - (let* ((pipe (with-directory-excursion directory - (open-pipe* OPEN_READ "git" "ls-files"))) - (files (let loop ((lines '())) - (match (read-line pipe) - ((? eof-object?) - (reverse lines)) - (line - (loop (cons line lines)))))) - (status (close-pipe pipe))) - (and (zero? status) - (lambda (file stat) - (match (stat:type stat) - ('directory - ;; 'git ls-files' does not list directories, only regular files, - ;; so we need this special trick. - (any (cut parent-directory? <> file) files)) - ((or 'regular 'symlink) - (any (cut string-suffix? <> file) files)) - (_ - #f)))))) - (define-public current-guix - (let ((select? (delay (or (make-git-predicate + (let ((select? (delay (or (git-predicate (string-append (current-source-directory) "/../..")) source-file?)))) diff --git a/guix/git-download.scm b/guix/git-download.scm index 62e625c715..5d86ab2b62 100644 --- a/guix/git-download.scm +++ b/guix/git-download.scm @@ -1,5 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2017 Mathieu Lirzin ;;; ;;; This file is part of GNU Guix. ;;; @@ -17,6 +18,7 @@ ;;; along with GNU Guix. If not, see . (define-module (guix git-download) + #:use-module (guix build utils) #:use-module (guix gexp) #:use-module (guix store) #:use-module (guix monads) @@ -24,6 +26,9 @@ #:use-module (guix packages) #:autoload (guix build-system gnu) (standard-packages) #:use-module (ice-9 match) + #:use-module (ice-9 popen) + #:use-module (ice-9 rdelim) + #:use-module (srfi srfi-1) #:export (git-reference git-reference? git-reference-url @@ -32,7 +37,8 @@ git-fetch git-version - git-file-name)) + git-file-name + git-predicate)) ;;; Commentary: ;;; @@ -119,4 +125,39 @@ HASH-ALGO (a symbol). Use NAME as the file name, or a generic name if #f." "Return the file-name for packages using git-download." (string-append name "-" version "-checkout")) +(define (git-predicate directory) + "Return a predicate that returns true if a file is part of the Git checkout +living at DIRECTORY. Upon Git failure, return #f instead of a predicate. + +The returned predicate takes two arguments FILE and STAT where FILE is an +absolute file name and STAT is the result of 'lstat'." + (define (parent-directory? thing directory) + ;; Return #t if DIRECTORY is the parent of THING. + (or (string-suffix? thing directory) + (and (string-index thing #\/) + (parent-directory? (dirname thing) directory)))) + + (let* ((pipe (with-directory-excursion directory + (open-pipe* OPEN_READ "git" "ls-files"))) + (files (let loop ((lines '())) + (match (read-line pipe) + ((? eof-object?) + (reverse lines)) + (line + (loop (cons line lines)))))) + (status (close-pipe pipe))) + (and (zero? status) + (lambda (file stat) + (match (stat:type stat) + ('directory + ;; 'git ls-files' does not list directories, only regular files, + ;; so we need this special trick. + (any (lambda (f) (parent-directory? f file)) + files)) + ((or 'regular 'symlink) + (any (lambda (f) (string-suffix? f file)) + files)) + (_ + #f)))))) + ;;; git-download.scm ends here From 890795c7094eeb00781bb0cbe2ca3823e6bd30c8 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Feb 2017 16:52:39 +0100 Subject: [PATCH 097/135] gnu: vte-ng: Update to 0.46.1.a. * gnu/packages/gnome.scm (vte-ng): Update to 0.46.1.a. --- gnu/packages/gnome.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 0c41618d27..5f14d109ea 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -1827,7 +1827,7 @@ editors, IDEs, etc.") (package (inherit vte) (name "vte-ng") - (version "0.44.1.b") + (version "0.46.1.a") (native-inputs `(("gtk-doc" ,gtk-doc) ("gperf" ,gperf) @@ -1842,7 +1842,7 @@ editors, IDEs, etc.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "1mhz4i1qkdlrs49vgm7nsrb60lry9v6wsgwsmji7fln1nyrp1pag")))) + "1c0czhsn28b5h4pk3kx89jjbdc5d2qkxhl4ywqvxfivphf2nicbp")))) (arguments `(#:configure-flags '("CXXFLAGS=-Wformat=0") #:phases (modify-phases %standard-phases From c09fbf20584c64e2c0c7061c4ff571a624354d8b Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Thu, 9 Feb 2017 22:02:35 +0100 Subject: [PATCH 098/135] gnu: xf86-video-intel: Update to 2.99.917-3-e4fe79c. * gnu/packages/xorg.scm (xf86-video-intel): Update to 2.99.917-3-e4fe79c. --- gnu/packages/xorg.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/xorg.scm b/gnu/packages/xorg.scm index ecfdbcb8b0..2d6e98b43e 100644 --- a/gnu/packages/xorg.scm +++ b/gnu/packages/xorg.scm @@ -2805,10 +2805,10 @@ X server.") (define-public xf86-video-intel - (let ((commit "9fe04af4bce3057e3e94a6bf36a3d8d2e48d592c")) + (let ((commit "e4fe79cf0d9a05ee3f3a027148ef0aeb2b1b34e1")) (package (name "xf86-video-intel") - (version (string-append "2.99.917-2-" (string-take commit 7))) + (version (string-append "2.99.917-3-" (string-take commit 7))) (source (origin ;; there's no current tarball @@ -2818,7 +2818,7 @@ X server.") (commit commit))) (sha256 (base32 - "06nnm9kjvmwxazp2ki0i5x1xv03bysfgpw30nd2jlf71qllybxml")) + "0hf3fxv5jchyh820h449c1ld9x19gc8081w1yk98mab6zr89zswp")) (file-name (string-append name "-" version)))) (build-system gnu-build-system) (inputs `(("mesa" ,mesa) From 1a917fc9de503d0d8b436c5c1467a34d29427178 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Thu, 9 Feb 2017 20:48:32 +0300 Subject: [PATCH 099/135] gnu: Add python-rst2ansi. * gnu/packages/python.scm (python-rst2ansi): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 5b4d2b09cf..a8bf99b8fe 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -35,6 +35,7 @@ ;;; Copyright © 2016, 2017 Tobias Geerinckx-Rice ;;; Copyright © 2016 Thomas Danckaert ;;; Copyright © 2017 Carlo Zancanaro +;;; Copyright © 2017 Frederick M. Muriithi ;;; ;;; This file is part of GNU Guix. ;;; @@ -12536,3 +12537,24 @@ console.") This implementation is slow (hence the project name) but still useful when faster ones are not available.") (license license:asl2.0))) + +(define-public python-rst2ansi + (package + (name "python-rst2ansi") + (version "0.1.5") + (source + (origin + (method url-fetch) + (uri (pypi-uri "rst2ansi" version)) + (sha256 + (base32 + "0vzy6gd60l79ff750scl0sz48r1laalkl6md6dwzah4dcadgn5qv")))) + (build-system python-build-system) + (propagated-inputs + `(("python-docutils" ,python-docutils))) + (home-page "https://github.com/Snaipe/python-rst-to-ansi") + (synopsis "Convert RST to ANSI-decorated console output") + (description + "Python module dedicated to rendering RST (reStructuredText) documents +to ansi-escaped strings suitable for display in a terminal.") + (license license:expat))) From 1f42d824c1fb3790da93ef2596776e23dc57c0c9 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Thu, 9 Feb 2017 20:48:33 +0300 Subject: [PATCH 100/135] gnu: Add python-flake8-polyfill. * gnu/packages/python.scm (python-flake8-polyfill, python2-flake8-polyfill): New variables. Signed-off-by: Marius Bakke --- gnu/packages/python.scm | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a8bf99b8fe..da6deb51c2 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -5993,6 +5993,28 @@ complexity of Python source code.") (define-public python2-flake8-2.2.4 (package-with-python2 python-flake8-2.2.4)) +(define-public python-flake8-polyfill + (package + (name "python-flake8-polyfill") + (version "1.0.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "flake8-polyfill" version)) + (sha256 + (base32 + "02gn2wxvh9vnf7m7dld7ca4l60mg5c370hv3swwppkngwaqmcw67")))) + (build-system python-build-system) + (home-page "https://gitlab.com/pycqa/flake8-polyfill") + (synopsis "Polyfill package for Flake8 plugins") + (description + "This package that provides some compatibility helpers for Flake8 +plugins that intend to support Flake8 2.x and 3.x simultaneously.") + (license license:expat))) + +(define-public python2-flake8-polyfill + (package-with-python2 python-flake8-polyfill)) + (define-public python-mistune (package (name "python-mistune") From 2f4623dbd85bab738056e5898ea9a2aadfc49733 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Thu, 9 Feb 2017 20:48:34 +0300 Subject: [PATCH 101/135] gnu: Add python-ddt. * gnu/packages/python.scm (python-ddt, python2-ddt): New variables. Signed-off-by: Marius Bakke --- gnu/packages/python.scm | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index da6deb51c2..7ee9376f21 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -12580,3 +12580,31 @@ faster ones are not available.") "Python module dedicated to rendering RST (reStructuredText) documents to ansi-escaped strings suitable for display in a terminal.") (license license:expat))) + +(define-public python-ddt + (package + (name "python-ddt") + (version "1.1.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ddt" version)) + (sha256 + (base32 + "1c00ikkxr7lha97c81k938bzhgd4pbwamkjn0h4nkhr3xk00zp6n")))) + (build-system python-build-system) + (native-inputs + `(("python-mock" ,python-mock) + ("python-nose" ,python-nose))) + (propagated-inputs + `(("python-six" ,python-six) + ("python-pyyaml" ,python-pyyaml))) + (home-page "https://github.com/txels/ddt") + (synopsis "Data-Driven Tests") + (description + "DDT (Data-Driven Tests) allows you to multiply one test case by running +it with different test data, and make it appear as multiple test cases.") + (license license:expat))) + +(define-public python2-ddt + (package-with-python2 python-ddt)) From 2299b13738ae819a9c34ebe396bd2adfe426b0ba Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Thu, 9 Feb 2017 20:48:35 +0300 Subject: [PATCH 102/135] gnu: Add python-pycosat. * gnu/packages/python.scm (python-pycosat, python2-pycosat): New variables. Signed-off-by: Marius Bakke --- gnu/packages/python.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index 7ee9376f21..a4f5edc7ea 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -12608,3 +12608,28 @@ it with different test data, and make it appear as multiple test cases.") (define-public python2-ddt (package-with-python2 python-ddt)) + +(define-public python-pycosat + (package + (name "python-pycosat") + (version "0.6.1") + (source + (origin + (method url-fetch) + (uri (pypi-uri "pycosat" version)) + (sha256 + (base32 + "1kl3wh1f47rc712n4bmwplbx3fqz3x9i1b587jrbpmvdva4c8f6l")))) + ;; TODO: Unundle picosat. http://fmv.jku.at/picosat/ + (build-system python-build-system) + (home-page "https://github.com/ContinuumIO/pycosat") + (synopsis "Bindings to picosat (a SAT solver)") + (description + "This package provides efficient Python bindings to @code{picosat} on +the C level. When importing pycosat, the @code{picosat} solver becomes part +of the Python process itself. @code{picosat} is a @dfn{Boolean Satisfiability +Problem} (SAT) solver.") + (license license:expat))) + +(define-public python2-pycosat + (package-with-python2 python-pycosat)) From 8fd6850436eb1b291d099b8b5c84f00c5d67e242 Mon Sep 17 00:00:00 2001 From: Muriithi Frederick Muriuki Date: Thu, 9 Feb 2017 20:48:36 +0300 Subject: [PATCH 103/135] gnu: Add python2-ruamel.ordereddict. * gnu/packages/python.scm (python2-ruamel.ordereddict): New variable. Signed-off-by: Marius Bakke --- gnu/packages/python.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/python.scm b/gnu/packages/python.scm index a4f5edc7ea..a049454c48 100644 --- a/gnu/packages/python.scm +++ b/gnu/packages/python.scm @@ -12633,3 +12633,37 @@ Problem} (SAT) solver.") (define-public python2-pycosat (package-with-python2 python-pycosat)) + +(define-public python2-ruamel.ordereddict + (package + (name "python2-ruamel.ordereddict") + (version "0.4.9") + (source + (origin + (method url-fetch) + (uri (pypi-uri "ruamel.ordereddict" version)) + (sha256 + (base32 + "1xmkl8v9l9inm2pyxgc1fm5005yxm7fkd5gv74q7lj1iy5qc8n3h")))) + (build-system python-build-system) + (arguments + `(#:python ,python-2 + #:phases + (modify-phases %standard-phases + (delete 'check) + (add-after 'install 'check + (lambda* (#:key inputs outputs #:allow-other-keys) + (add-installed-pythonpath inputs outputs) + (zero? (system* "python" "test/testordereddict.py"))))))) + (home-page "https://bitbucket.org/ruamel/ordereddict") + (synopsis "Version of dict that keeps keys in insertion order") + (description + "This is an implementation of an ordered dictionary with @dfn{Key +Insertion Order} (KIO: updates of values do not affect the position of the +key), @dfn{Key Value Insertion Order} (KVIO, an existing key's position is +removed and put at the back). The standard library module @code{OrderedDict}, +implemented later, implements a subset of @code{ordereddict} functionality. +Sorted dictionaries are also provided. Currently only with @dfn{Key Sorted +Order} (KSO, no sorting function can be specified, but a transform can be +specified to apply on the key before comparison (e.g. @code{string.lower})).") + (license license:expat))) From dc7010911dd3285fe9089352e92c77501595d100 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Thu, 9 Feb 2017 23:10:49 +0100 Subject: [PATCH 104/135] gnu: emacs: Adjust 'tramp-remote-path' for remote GuixSD machines. * gnu/packages/emacs.scm (emacs)[source](snippet): Patch 'net/tramp-sh.el'. --- gnu/packages/emacs.scm | 13 ++++++++++++- 1 file changed, 12 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm index dfdf324960..b361fcc4a5 100644 --- a/gnu/packages/emacs.scm +++ b/gnu/packages/emacs.scm @@ -110,7 +110,18 @@ (find-files "." "loaddefs\\.el$") ;; This is the only "autoloads" file that ;; does not have "*loaddefs.el" name. - '("eshell/esh-groups.el"))))))) + '("eshell/esh-groups.el"))) + + ;; Make sure Tramp looks for binaries in the right places on + ;; remote GuixSD machines, where 'getconf PATH' returns + ;; something bogus. + (substitute* "net/tramp-sh.el" + ;; Patch the line after "(defcustom tramp-remote-path". + (("\\(tramp-default-remote-path") + (format #f "(tramp-default-remote-path ~s ~s ~s ~s " + "~/.guix-profile/bin" "~/.guix-profile/sbin" + "/run/current-system/profile/bin" + "/run/current-system/profile/sbin"))))))) (build-system glib-or-gtk-build-system) (arguments `(#:phases From c7adafa7c177fe1ac3fee4964ba7561f70aecc62 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 31 Jan 2017 22:01:18 +0100 Subject: [PATCH 105/135] gnu: Add tlp. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/linux (tlp): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/linux.scm | 97 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 97 insertions(+) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index dc4d37920b..5203674ee1 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -21,6 +21,7 @@ ;;; Copyright © 2017 Leo Famulari ;;; Copyright © 2017 José Miguel Sánchez García ;;; Copyright © 2017 Gábor Boskovits +;;; Copyright © 2017 Mathieu Othacehe ;;; ;;; This file is part of GNU Guix. ;;; @@ -45,6 +46,7 @@ #:use-module (gnu packages attr) #:use-module (gnu packages autotools) #:use-module (gnu packages base) + #:use-module (gnu packages bash) #:use-module (gnu packages bison) #:use-module (gnu packages calendar) #:use-module (gnu packages check) @@ -66,6 +68,7 @@ #:use-module (gnu packages man) #:use-module (gnu packages maths) #:use-module (gnu packages ncurses) + #:use-module (gnu packages networking) #:use-module (gnu packages perl) #:use-module (gnu packages pciutils) #:use-module (gnu packages pkg-config) @@ -3409,6 +3412,100 @@ set the screen to be pitch black at a vaĺue of 0 (or higher). Light is the successor of lightscript.") (license license:gpl3+))) +(define-public tlp + (package + (name "tlp") + (version "0.9") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/linrunner/" + (string-upcase name) + "/archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0xksm8ar6dbq0azbfz8qs9yyzqg1j333lyd5znc074rz8inj4yw8")))) + (inputs `(("bash" ,bash) + ("dbus" ,dbus) + ("ethtool" ,ethtool) + ("eudev" ,eudev) + ("grep" ,grep) + ("hdparm" ,hdparm) + ("inetutils" ,inetutils) + ("iw" ,iw) + ("kmod" ,kmod) + ("pciutils" ,pciutils) + ("perl" ,perl) + ("rfkill" ,rfkill) + ("sed" ,sed) + ("usbutils" ,usbutils) + ("util-linux" ,util-linux) + ("wireless-tools" ,wireless-tools))) + (build-system gnu-build-system) + (arguments + `(#:phases + (modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'setenv + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (setenv "TLP_WITH_SYSTEMD" "0") + (setenv "TLP_NO_INIT" "1") + (setenv "TLP_NO_PMUTILS" "1") + (setenv "TLP_SBIN" (string-append out "/bin")) + (setenv "TLP_BIN" (string-append out "/bin")) + (setenv "TLP_TLIB" (string-append out "/share/tlp-pm")) + (setenv "TLP_ULIB" (string-append out "/lib/udev")) + (setenv "TLP_CONF" (string-append out "/etc/tlp")) + (setenv "TLP_SHCPL" + (string-append out "/share/bash-completion/completions")) + (setenv "TLP_MAN" (string-append out "/share/man"))))) + (delete 'check) + (replace 'install + (lambda _ + (system "make install-tlp install-man"))) + (add-after 'install 'wrap + (lambda* (#:key inputs outputs #:allow-other-keys) + (let* ((bin (string-append (assoc-ref outputs "out") "/bin")) + (bin-files (find-files bin ".*"))) + (define (bin-directory input-name) + (string-append (assoc-ref inputs input-name) "/bin")) + (define (sbin-directory input-name) + (string-append (assoc-ref inputs input-name) "/sbin")) + (for-each (lambda (program) + (wrap-program program + `("PATH" ":" prefix + ,(append + (map bin-directory '("bash" + "coreutils" + "dbus" + "eudev" + "grep" + "inetutils" + "kmod" + "perl" + "sed" + "usbutils" + "util-linux")) + (map sbin-directory '("ethtool" + "hdparm" + "iw" + "pciutils" + "rfkill" + "wireless-tools")))))) + bin-files))))))) + (home-page "http://linrunner.de/en/tlp/tlp.html") + (synopsis "Power management tool for Linux") + (description "TLP is a power management tool for Linux. It comes with +a default configuration already optimized for battery life. Nevertheless, +TLP is customizable to fulfil system requirements. TLP settings are applied +every time the power supply source is changed.") + + ;; 'COPYING' is a custom version that says that one file is GPLv3+ and the + ;; rest is GPLv2+. + (license (list license:gpl2+ license:gpl3+)))) + (define-public lshw (package (name "lshw") From 69ff1794b305df8293580f7ed967d09a8bde3aeb Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 9 Feb 2017 18:28:06 -0500 Subject: [PATCH 106/135] gnu: linux-libre@4.4: Update to 4.4.48. * gnu/packages/linux.scm (linux-libre-4.4): Update to 4.4.48. --- gnu/packages/linux.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 5203674ee1..36206b7654 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -345,8 +345,8 @@ It has been modified to remove all non-free binary blobs.") #:configuration-file kernel-config)) (define-public linux-libre-4.4 - (make-linux-libre "4.4.47" - "00zdq7swhvzbbnnhzizq6m34q5k4fycpcp215bmkbxh1ic76v7bs" + (make-linux-libre "4.4.48" + "0g7ram0b5b7p0c6v5m5im6m5pwa348mhkhf67rs036lzvcw1bvyk" %intel-compatible-systems #:configuration-file kernel-config)) From 76e62ef723fa228e455ec6326aaec87925bd5cf2 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 9 Feb 2017 18:33:36 -0500 Subject: [PATCH 107/135] gnu: linux-libre: Use %linux-libre-{version,hash} in package definition. * gnu/packages/linux.scm (%linux-libre-version, %linux-libre-hash): Move above definition of 'linux-libre'. Remove comment about avoiding minor version bumps. (linux-libre): Use %linux-libre-version and %linux-libre-hash to avoid duplicate copies of that information. --- gnu/packages/linux.scm | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 36206b7654..6fbbd1dfe5 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -338,9 +338,12 @@ It has been modified to remove all non-free binary blobs.") (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) +(define %linux-libre-version "4.9.8") +(define %linux-libre-hash "09cx8l0bbccz14ajbawqaq4ah9jpld44pkb61483xwdp9v2sihm3") + (define-public linux-libre - (make-linux-libre "4.9.8" - "09cx8l0bbccz14ajbawqaq4ah9jpld44pkb61483xwdp9v2sihm3" + (make-linux-libre %linux-libre-version + %linux-libre-hash %intel-compatible-systems #:configuration-file kernel-config)) @@ -356,10 +359,6 @@ It has been modified to remove all non-free binary blobs.") %intel-compatible-systems #:configuration-file kernel-config)) -;; Avoid rebuilding kernel variants when there is a minor version bump. -(define %linux-libre-version "4.9.8") -(define %linux-libre-hash "09cx8l0bbccz14ajbawqaq4ah9jpld44pkb61483xwdp9v2sihm3") - (define-public linux-libre-arm-generic (make-linux-libre %linux-libre-version %linux-libre-hash From b2b02ba3ef4336744d114e2e4013f77b18e8a4d4 Mon Sep 17 00:00:00 2001 From: Mark H Weaver Date: Thu, 9 Feb 2017 18:36:07 -0500 Subject: [PATCH 108/135] gnu: linux-libre: Update to 4.9.9. * gnu/packages/linux.scm (%linux-libre-version): Update to 4.9.9. (%linux-libre-hash): Update hash. --- gnu/packages/linux.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 6fbbd1dfe5..313d0775cc 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -338,8 +338,8 @@ It has been modified to remove all non-free binary blobs.") (define %intel-compatible-systems '("x86_64-linux" "i686-linux")) -(define %linux-libre-version "4.9.8") -(define %linux-libre-hash "09cx8l0bbccz14ajbawqaq4ah9jpld44pkb61483xwdp9v2sihm3") +(define %linux-libre-version "4.9.9") +(define %linux-libre-hash "0grk94jym0wz581c7pimia0rszq4h2xqjmf818i4l4qrjd0bnqvk") (define-public linux-libre (make-linux-libre %linux-libre-version From 1a82ba660e88e731841882523084e5d878267b53 Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Thu, 9 Feb 2017 22:27:51 -0500 Subject: [PATCH 109/135] gnu: ntfs-3g: Fix CVE-2017-0358. * gnu/packages/linux.scm (ntfs-3g)[source]: Add patch. * gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch: New file. * gnu/local.mk (dist_patch_DATA): Register it. --- gnu/local.mk | 3 +- gnu/packages/linux.scm | 1 + .../patches/ntfs-3g-CVE-2017-0358.patch | 42 +++++++++++++++++++ 3 files changed, 45 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch diff --git a/gnu/local.mk b/gnu/local.mk index 63ce3af713..1fc49bbd61 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -4,7 +4,7 @@ # Copyright © 2016 Mathieu Lirzin # Copyright © 2013, 2014, 2015, 2016 Mark H Weaver # Copyright © 2016 Chris Marusich -# Copyright © 2016 Kei Kebreau +# Copyright © 2016, 2017 Kei Kebreau # Copyright © 2016 Rene Saavedra # Copyright © 2016 Adonay "adfeno" Felipe Nogueira # Copyright © 2016, 2017 Ricardo Wurmus @@ -777,6 +777,7 @@ dist_patch_DATA = \ %D%/packages/patches/ninja-zero-mtime.patch \ %D%/packages/patches/node-9077.patch \ %D%/packages/patches/nss-pkgconfig.patch \ + %D%/packages/patches/ntfs-3g-CVE-2017-0358.patch \ %D%/packages/patches/nvi-assume-preserve-path.patch \ %D%/packages/patches/nvi-dbpagesize-binpower.patch \ %D%/packages/patches/nvi-db4.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 313d0775cc..541e4b9c1c 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2908,6 +2908,7 @@ from userspace.") (base32 "180y5y09h30ryf2vim8j30a2npwz1iv9ly5yjmh3wjdkwh2jrdyp")) (modules '((guix build utils))) + (patches (search-patches "ntfs-3g-CVE-2017-0358.patch")) (snippet ;; Install under $prefix. '(substitute* '("src/Makefile.in" "ntfsprogs/Makefile.in") diff --git a/gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch b/gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch new file mode 100644 index 0000000000..6edd676e38 --- /dev/null +++ b/gnu/packages/patches/ntfs-3g-CVE-2017-0358.patch @@ -0,0 +1,42 @@ +Fix CVE-2017-0358: +http://seclists.org/oss-sec/2017/q1/259 +This patch was copied from the above URL. + +diff -ur ntfs-3g.old/src/lowntfs-3g.c ntfs-3g/src/lowntfs-3g.c +--- ntfs-3g.old/src/lowntfs-3g.c 2017-02-09 15:01:04.074331542 -0500 ++++ ntfs-3g/src/lowntfs-3g.c 2017-02-09 15:06:35.757580937 -0500 +@@ -3827,13 +3827,14 @@ + struct stat st; + pid_t pid; + const char *cmd = "/sbin/modprobe"; ++ char *env = (char*)NULL; + struct timespec req = { 0, 100000000 }; /* 100 msec */ + fuse_fstype fstype; + + if (!stat(cmd, &st) && !geteuid()) { + pid = fork(); + if (!pid) { +- execl(cmd, cmd, "fuse", NULL); ++ execle(cmd, cmd, "fuse", NULL, &env); + _exit(1); + } else if (pid != -1) + waitpid(pid, NULL, 0); +diff -ur ntfs-3g.old/src/ntfs-3g.c ntfs-3g/src/ntfs-3g.c +--- ntfs-3g.old/src/ntfs-3g.c 2017-02-09 15:01:04.074331542 -0500 ++++ ntfs-3g/src/ntfs-3g.c 2017-02-09 15:06:26.077252571 -0500 +@@ -3612,13 +3612,14 @@ + struct stat st; + pid_t pid; + const char *cmd = "/sbin/modprobe"; ++ char *env = (char*)NULL; + struct timespec req = { 0, 100000000 }; /* 100 msec */ + fuse_fstype fstype; + + if (!stat(cmd, &st) && !geteuid()) { + pid = fork(); + if (!pid) { +- execl(cmd, cmd, "fuse", NULL); ++ execle(cmd, cmd, "fuse", NULL, &env); + _exit(1); + } else if (pid != -1) + waitpid(pid, NULL, 0); From beffaf9a124e846eddd1519020c08ec6628fcd78 Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 1 Feb 2017 10:51:31 +0100 Subject: [PATCH 110/135] gnu: ldc: Rename ldc 0.17.2 to ldc-bootstrap. * gnu/packages/ldc.scm (ldc): Rename to... (ldc-bootstrap): ... this. (ldc-1.1.0-beta6): Replace ldc by ldc-bootstrap. [native-inputs]: Replace ldc by ldc-bootstrap. --- gnu/packages/ldc.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 4b10ac25e0..778809968e 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -77,7 +77,7 @@ minimize the amount of work necessary. Unlike make, rdmd tracks dependencies and freshness without requiring additional information from the user.") (license license:boost1.0)))) -(define-public ldc +(define-public ldc-bootstrap (package (name "ldc") (version "0.17.2") @@ -182,7 +182,7 @@ latest DMD frontend and uses LLVM as backend.") ;; variable to hold this variable. (let ((older-version "1.1.0-beta4")) (package - (inherit ldc) + (inherit ldc-bootstrap) (name "ldc") (version "1.1.0-beta6") ;; Beta version needed to compile various scientific tools that require @@ -227,7 +227,7 @@ latest DMD frontend and uses LLVM as backend.") (native-inputs `(("llvm" ,llvm) ("clang" ,clang) - ("ldc" ,ldc) + ("ldc" ,ldc-bootstrap) ("python-lit" ,python-lit) ("python-wrapper" ,python-wrapper) ("unzip" ,unzip) From 836cbd9f72fa3e2bcd4102c3db1b6f3c0671ed2f Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Wed, 1 Feb 2017 10:51:32 +0100 Subject: [PATCH 111/135] gnu: ldc: Update to 1.1.0. * gnu/packages/ldc.scm (ldc-1.1.0-beta6): Rename to... (ldc): ... this. [version]: Modify. [source]: Modify. (ldc-beta): Modify. --- gnu/packages/ldc.scm | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index 778809968e..eabd02827c 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -176,15 +176,15 @@ latest DMD frontend and uses LLVM as backend.") license:boost1.0)))) -(define-public ldc-1.1.0-beta6 +(define-public ldc ;; The phobos, druntime and dmd-testsuite dependencies do not have a newer ;; release than 1.1.0-beta4, hence the need to make use of the older-version ;; variable to hold this variable. - (let ((older-version "1.1.0-beta4")) + (let ((older-version "1.1.0")) (package (inherit ldc-bootstrap) (name "ldc") - (version "1.1.0-beta6") + (version "1.1.0") ;; Beta version needed to compile various scientific tools that require ;; the newer beta versions, and won't compile successfully with the ;; older stable version. @@ -196,7 +196,7 @@ latest DMD frontend and uses LLVM as backend.") (file-name (string-append name "-" version ".tar.gz")) (sha256 (base32 - "0n53brlkm86jjkppy9xmzx7nyxykzj68kcxgv8q7d10s5hfscxs8")))) + "10zkrmx9bcmhfxvgykm3fkjamzc8js96wm032bv0fyil5c9ja2y1")))) (arguments `(#:phases (modify-phases %standard-phases @@ -240,7 +240,7 @@ latest DMD frontend and uses LLVM as backend.") older-version ".tar.gz")) (sha256 (base32 - "1iwy5rs0rqkicj1zfsa5yqvk8ard99bfr8g69qmhlbzb98q0kpks")) + "0z5v55b9s1ppf0c2ivjq7sbmq688c37c92ihc3qwrbxnqvkkvrlk")) ;; This patch deactivates some tests that depend on network access ;; to pass. It also deactivates some tests that have some reliance ;; on timezone. @@ -259,7 +259,7 @@ latest DMD frontend and uses LLVM as backend.") older-version ".tar.gz")) (sha256 (base32 - "1qsiw5lz1pr8ms9myjf8b94nqi7f1781k226jvxwnhkjg11d0s63")))) + "07qvrqj6vgakd6qr4x5f70w6zwkzd1li5x8i1b5ywnds1z5lnfp6")))) ("dmd-testsuite-src" ,(origin (method url-fetch) @@ -268,13 +268,13 @@ latest DMD frontend and uses LLVM as backend.") older-version ".tar.gz")) (sha256 (base32 - "0jp54hyi75i9g41rvgmm3zg21yzv57q8dghrhb432rb0n9j15mbp")) + "12cak7yqmsgjlflx0dp6fwmwb9dac25amgi86n0bb95ard3547wy")) ;; Remove the gdb tests that fails with a "Error: No such file or ;; directory" error, despite the files being present in the debug ;; files left with the --keep-failed flag to guix build. (patches (search-patches "ldc-1.1.0-disable-dmd-tests.patch"))))))))) -(define-public ldc-beta ldc-1.1.0-beta6) +(define-public ldc-beta ldc) (define-public dub (package From fa73a7c1b3d9b56395152a0284e10171b4fefaed Mon Sep 17 00:00:00 2001 From: Ben Woodcroft Date: Tue, 31 Jan 2017 21:01:59 +1000 Subject: [PATCH 112/135] gnu: rustc: Add native-search-paths. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/rust.scm (rust)[native-search-paths]: New field. Co-authored-by: Ludovic Courtès --- gnu/packages/rust.scm | 3 +++ 1 file changed, 3 insertions(+) diff --git a/gnu/packages/rust.scm b/gnu/packages/rust.scm index ae04530041..fb284102da 100644 --- a/gnu/packages/rust.scm +++ b/gnu/packages/rust.scm @@ -2,6 +2,7 @@ ;;; Copyright © 2016 David Craven ;;; Copyright © 2016 Eric Le Bihan ;;; Copyright © 2016 ng0 +;;; Copyright © 2017 Ben Woodcroft ;;; ;;; This file is part of GNU Guix. ;;; @@ -272,6 +273,8 @@ rustc-bootstrap and cargo-bootstrap packages.") (wrap-program (string-append out "/bin/rustc") `("PATH" ":" prefix (,(string-append ld-wrapper "/bin"))) `("LIBRARY_PATH" ":" suffix (,(string-append libc "/lib")))))))))) + ;; rustc invokes gcc, so we need to set its search paths accordingly. + (native-search-paths (package-native-search-paths gcc)) (synopsis "Compiler for the Rust progamming language") (description "Rust is a systems programming language that provides memory safety and thread safety guarantees.") From f23052a6385961a65a786d00d74fdf254043aa25 Mon Sep 17 00:00:00 2001 From: David Craven Date: Wed, 1 Feb 2017 19:51:53 +0100 Subject: [PATCH 113/135] gnu: mutter: Update to HEAD. * gnu/packages/gnome.scm (mutter): Update to HEAD. [native-inputs]: Add autoconf, automake and libtool. [arguments]: Add autoreconf phase. --- gnu/packages/gnome.scm | 30 +++++++++++++++++++++--------- 1 file changed, 21 insertions(+), 9 deletions(-) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index 5f14d109ea..c1ebc19c2a 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -4244,17 +4244,20 @@ to display dialog boxes from the commandline and shell scripts.") (license license:lgpl2.0+))) (define-public mutter + ;; Uses the gnome 3.22 branch that only contains bug fixes. + (let ((commit "23c315ea7121e9bd108e2837d0b4beeba53c5e18")) (package (name "mutter") - (version "3.22.2") + (version (git-version "3.22.2" "1" commit)) (source (origin - (method url-fetch) - (uri (string-append "mirror://gnome/sources/" name "/" - (version-major+minor version) "/" - name "-" version ".tar.xz")) + (method git-fetch) + (uri (git-reference + (url "git://git.gnome.org/mutter") + (commit commit))) + (file-name (git-file-name name version)) (sha256 (base32 - "18lj80klfnkwh0cb3ab0i1vfvzbp0zjl73x9d7pna4dsdhsmi6ym")))) + "1v1f9xyzjr1ihmfwpq9kzlv2lyr9qn63ck8zny699mbp5hsi11mb")))) ;; NOTE: Since version 3.21.x, mutter now bundles and exports forked ;; versions of cogl and clutter. As a result, many of the inputs, ;; propagated-inputs, and configure flags used in cogl and clutter are @@ -4277,12 +4280,21 @@ to display dialog boxes from the commandline and shell scripts.") "--enable-cogl-gst" (string-append "--with-gl-libname=" (assoc-ref %build-inputs "mesa") - "/lib/libGL.so")))) + "/lib/libGL.so")) + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'autoreconf + (lambda _ + (zero? (system* "autoreconf" "-vfi"))))))) (native-inputs `(("glib:bin" ,glib "bin") ; for glib-compile-schemas, etc. ("gobject-introspection" ,gobject-introspection) ("intltool" ,intltool) - ("pkg-config" ,pkg-config))) + ("pkg-config" ,pkg-config) + ;; For git build + ("autoconf" ,autoconf) + ("automake" ,automake) + ("libtool" ,libtool))) (propagated-inputs `(;; libmutter.pc refers to these: ("gsettings-desktop-schemas" ,gsettings-desktop-schemas) @@ -4328,7 +4340,7 @@ to display dialog boxes from the commandline and shell scripts.") desktop via OpenGL. Mutter combines a sophisticated display engine using the Clutter toolkit with solid window-management logic inherited from the Metacity window manager.") - (license license:gpl2+))) + (license license:gpl2+)))) (define-public gnome-online-accounts (package From 53ff54958cc08a3c126654ab449d5c5fbeb9d37c Mon Sep 17 00:00:00 2001 From: David Craven Date: Wed, 1 Feb 2017 20:33:46 +0100 Subject: [PATCH 114/135] gnu: Add git-crypt. * gnu/packages/version-control.scm (git-crypt): New variable. --- gnu/packages/version-control.scm | 41 ++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index ef83746f29..a5e3669107 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -367,6 +367,47 @@ write native speed custom Git applications in any language with bindings.") ;; GPLv2 with linking exception (license license:gpl2))) +(define-public git-crypt + (package + (name "git-crypt") + (version "0.5.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/AGWA/git-crypt" + "/archive/" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "0454fdmgm5f3razkn8n03lfqm5zyzvr4r2528zmlxiwba9518l2i")))) + (build-system gnu-build-system) + (inputs + `(("git" ,git) + ("openssl" ,openssl))) + (arguments + `(#:tests? #f ; No tests. + #:phases + (modify-phases %standard-phases + (delete 'configure) + (replace 'build + (lambda _ + (zero? (system* "make")))) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out"))) + (zero? (system* "make" "install" + (string-append "PREFIX=" out))))))))) + (home-page "https://www.agwa.name/projects/git-crypt") + (synopsis "Transparent encryption of files in a git repository") + (description "git-crypt enables transparent encryption and decryption of +files in a git repository. Files which you choose to protect are encrypted when +committed, and decrypted when checked out. git-crypt lets you freely share a +repository containing a mix of public and private content. git-crypt gracefully +degrades, so developers without the secret key can still clone and commit to a +repository with encrypted files. This lets you store your secret material (such +as keys or passwords) in the same repository as your code, without requiring you +to lock down your entire repository.") + (license license:gpl3+))) + (define-public cgit (package (name "cgit") From 7b83b695d303c2b90f746758eb0429369bf993ed Mon Sep 17 00:00:00 2001 From: David Craven Date: Wed, 7 Sep 2016 21:13:06 +0200 Subject: [PATCH 115/135] gnu: Add appstream-glib. * gnu/packages/glib.scm (appstream-glib): New variable. --- gnu/packages/glib.scm | 46 ++++++++++++++++++++++++++++++++++++++++++- 1 file changed, 45 insertions(+), 1 deletion(-) diff --git a/gnu/packages/glib.scm b/gnu/packages/glib.scm index 7c61ab3d21..9dd46d60b1 100644 --- a/gnu/packages/glib.scm +++ b/gnu/packages/glib.scm @@ -30,6 +30,7 @@ #:use-module (guix build-system python) #:use-module (gnu packages) #:use-module (gnu packages base) + #:use-module (gnu packages backup) #:use-module (gnu packages bison) #:use-module (gnu packages compression) #:use-module (gnu packages enlightenment) @@ -39,6 +40,7 @@ #:use-module (gnu packages gtk) #:use-module (gnu packages libffi) #:use-module (gnu packages linux) + #:use-module (gnu packages nettle) #:use-module (gnu packages pcre) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) @@ -665,7 +667,6 @@ many applications simultaneously. This package provides the library for GLib applications.") (license license:lgpl2.1+))) - (define-public dbus-c++ (package (name "dbus-c++") @@ -705,3 +706,46 @@ programming langauage. It also contains the utility @command{dbuscxx-xml2cpp}.") (home-page "https://sourceforge.net/projects/dbus-cplusplus/") (license license:lgpl2.1+))) + +(define-public appstream-glib + (package + (name "appstream-glib") + (version "0.6.7") + (source (origin + (method url-fetch) + (uri (string-append "https://people.freedesktop.org/~hughsient/" + "appstream-glib/releases/" + "appstream-glib-" version ".tar.xz")) + (sha256 + (base32 + "08mrf4k0jhnpdd4fig2grmi2vbxkgdhrwk0d0zq0j1wp5ip7arwp")))) + (build-system gnu-build-system) + (native-inputs + `(("pkg-config" ,pkg-config))) + (inputs + `(("gdk-pixbuf" ,gdk-pixbuf) + ("glib" ,glib) + ("gtk+" ,gtk+) + ("json-glib" ,json-glib) + ("libarchive" ,libarchive) + ("libsoup" ,libsoup) + ("nettle" ,nettle) + ("util-linux" ,util-linux))) + (arguments + `(#:configure-flags + '("--disable-firmware" "--disable-dep11") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-tests + (lambda _ + (substitute* "libappstream-glib/as-self-test.c" + (("g_test_add_func.*as_test_store_local_appdata_func);") "") + (("g_test_add_func.*as_test_store_speed_appdata_func);") "") + (("g_test_add_func.*as_test_store_speed_desktop_func);") "")) + #t))))) + (home-page "https://github.com/hughsie/appstream-glib") + (synopsis "Library for reading and writing AppStream metadata") + (description "This library provides objects and helper methods to help +reading and writing @uref{https://www.freedesktop.org/wiki/Distributions/AppStream,AppStream} +metadata.") + (license license:lgpl2.1+))) From 6c4f7022c6a731b4efb4a0bf3e6811759a540d65 Mon Sep 17 00:00:00 2001 From: David Craven Date: Mon, 30 Jan 2017 17:24:33 +0100 Subject: [PATCH 116/135] gnu: Add gnome-disk-utility. * gnu/packages/gnome.scm (gnome-disk-utility): New variable. --- gnu/packages/gnome.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/gnome.scm b/gnu/packages/gnome.scm index c1ebc19c2a..8c099ee0df 100644 --- a/gnu/packages/gnome.scm +++ b/gnu/packages/gnome.scm @@ -324,6 +324,43 @@ Gnome project. It includes xml2po tool which makes it easier to translate and keep up to date translations of documentation.") (license license:gpl2+))) ; xslt under lgpl +(define-public gnome-disk-utility + (package + (name "gnome-disk-utility") + (version "3.22.1") + (source (origin + (method url-fetch) + (uri (string-append "mirror://gnome/sources/" name "/" + (version-major+minor version) "/" + name "-" version ".tar.xz")) + (sha256 + (base32 + "1hqynlcgwm72il2rdml98gcarz0alsgxs5xf6ww2x0czaj3s3953")))) + (build-system gnu-build-system) + (native-inputs + `(("glib:bin" ,glib "bin") + ("intltool" ,intltool) + ("pkg-config" ,pkg-config) + ("docbook-xml" ,docbook-xml) + ("docbook-xsl" ,docbook-xsl) + ("libxml2" ,libxml2) + ("libxslt" ,libxslt))) + (inputs + `(("glib" ,glib) + ("appstream-glib" ,appstream-glib) + ("gnome-settings-daemon" ,gnome-settings-daemon) + ("gtk+" ,gtk+) + ("libcanberra" ,libcanberra) + ("libdvdread" ,libdvdread) + ("libnotify" ,libnotify) + ("libpwquality" ,libpwquality) + ("libsecret" ,libsecret) + ("udisks" ,udisks))) + (home-page "https://git.gnome.org/browse/gnome-disk-utility") + (synopsis "Disk management utility for GNOME") + (description "Disk management utility for GNOME.") + (license license:gpl2+))) + (define-public gcr (package (name "gcr") From 72524ae843170b7af006388ebd87fc1eb60792e5 Mon Sep 17 00:00:00 2001 From: David Craven Date: Mon, 30 Jan 2017 20:52:00 +0100 Subject: [PATCH 117/135] system: install: Add gptfdisk to installation os. * gnu/system/install.scm (installation-os)[packages]: Add gptfdisk. --- gnu/system/install.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index ad234fd9c1..944d9f7e72 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -388,7 +388,7 @@ Use Alt-F2 for documentation. (base-pam-services #:allow-empty-passwords? #t)) (packages (cons* (canonical-package glibc) ;for 'tzselect' & co. - parted ddrescue + parted gptfdisk ddrescue grub ;mostly so xrefs to its manual work cryptsetup mdadm From 82de2655a16dcc7a8e3b992b4afd34ec32c244a6 Mon Sep 17 00:00:00 2001 From: David Craven Date: Fri, 10 Feb 2017 12:21:08 +0100 Subject: [PATCH 118/135] gnu: git: Add GIT_EXEC_PATH search-path-specification. Enables git plugins to be found when in they're in the system profile. * gnu/packages/version-control.scm (git)[native-search-paths]: Add GIT_EXEC_PATH. Remove git wrapper and outdated comment. --- gnu/packages/version-control.scm | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/gnu/packages/version-control.scm b/gnu/packages/version-control.scm index a5e3669107..976584fa73 100644 --- a/gnu/packages/version-control.scm +++ b/gnu/packages/version-control.scm @@ -275,16 +275,7 @@ as well as the classic centralized workflow.") (wrap-program git-sm `("PATH" ":" prefix (,(string-append (assoc-ref inputs "perl") - "/bin")))) - - ;; Tell 'git' to look for core programs in the user's profile. - ;; This allows user to install other outputs of this package and - ;; have them transparently taken into account. There's a - ;; 'GIT_EXEC_PATH' environment variable, but it's supposed to - ;; specify a single directory, not a search path. - (wrap-program (string-append out "/bin/git") - `("PATH" ":" prefix - ("$HOME/.guix-profile/libexec/git-core")))))) + "/bin"))))))) (add-after 'split 'install-man-pages (lambda* (#:key inputs outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -301,7 +292,10 @@ as well as the classic centralized workflow.") (list (search-path-specification (variable "GIT_SSL_CAINFO") (file-type 'regular) - (files '("etc/ssl/certs/ca-certificates.crt"))))) + (files '("etc/ssl/certs/ca-certificates.crt"))) + (search-path-specification + (variable "GIT_EXEC_PATH") + (files '("libexec/git-core"))))) (synopsis "Distributed version control system") (description From 01ceca26589ff7a08d5045c98c7f4174527684cc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cl=C3=A9ment=20Lassieur?= Date: Wed, 8 Feb 2017 21:12:00 +0100 Subject: [PATCH 119/135] build: Add build-aux/ar-lib to .gitignore. * .gitignore: Add entry for the above file which is created by './bootstrap'. Signed-off-by: David Craven --- .gitignore | 1 + 1 file changed, 1 insertion(+) diff --git a/.gitignore b/.gitignore index c64326e60e..0897c95f3e 100644 --- a/.gitignore +++ b/.gitignore @@ -11,6 +11,7 @@ /INSTALL /aclocal.m4 /autom4te.cache +/build-aux/ar-lib /build-aux/compile /build-aux/config.guess /build-aux/config.rpath From 5533071407881db57eddead051e7c261a519d16c Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Fri, 10 Feb 2017 12:19:07 +0100 Subject: [PATCH 120/135] gnu: rdmd: Update to 2.073.0. * gnu/packages/ldc.scm (rdmd): Remove local variable "commit". [version]: Modify. [source]: Modify. --- gnu/packages/ldc.scm | 67 +++++++++++++++++++++----------------------- 1 file changed, 32 insertions(+), 35 deletions(-) diff --git a/gnu/packages/ldc.scm b/gnu/packages/ldc.scm index eabd02827c..b7f593712b 100644 --- a/gnu/packages/ldc.scm +++ b/gnu/packages/ldc.scm @@ -37,45 +37,42 @@ #:use-module (gnu packages zip)) (define-public rdmd - (let ((commit "da0a2e0a379b08294015eec9d531f1e5dd4226f0")) - (package - (name "rdmd") - (version (string-append "v2.070.0-1." (string-take commit 7))) - (source (origin - (method git-fetch) - (uri (git-reference - (url "https://github.com/D-Programming-Language/tools.git") - (commit commit))) - (file-name (string-append name "-" version "-checkout")) - (sha256 - (base32 - "1pcx5lyqzrip86f4vv60x292rpvnwsq2hvl1znm9x9rn68f34m45")))) - (build-system gnu-build-system) - (arguments - '(#:phases - (modify-phases %standard-phases - (delete 'configure) - (delete 'check) ; There is no Makefile, so there's no 'make check'. - (replace - 'build - (lambda _ - (zero? (system* "ldc2" "rdmd.d")))) - (replace - 'install - (lambda* (#:key outputs #:allow-other-keys) - (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) - (install-file "rdmd" bin))))))) - (native-inputs - `(("ldc" ,ldc))) - (home-page "https://github.com/D-Programming-Language/tools/") - (synopsis "Specialized equivalent to 'make' for the D language") - (description - "rdmd is a companion to the dmd compiler that simplifies the typical + (package + (name "rdmd") + (version "2.073.0") + (source (origin + (method url-fetch) + (uri (string-append "https://github.com/dlang/tools/archive/v" version ".tar.gz")) + (file-name (string-append name "-" version ".tar.gz")) + (sha256 + (base32 + "01if3ivnb7g2myfhymp4d9346s4vmvcl82i1kxfs5iza45almh7v")))) + (build-system gnu-build-system) + (arguments + '(#:phases + (modify-phases %standard-phases + (delete 'configure) + (delete 'check) ; There is no Makefile, so there's no 'make check'. + (replace + 'build + (lambda _ + (zero? (system* "ldc2" "rdmd.d")))) + (replace + 'install + (lambda* (#:key outputs #:allow-other-keys) + (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) + (install-file "rdmd" bin))))))) + (native-inputs + `(("ldc" ,ldc))) + (home-page "https://github.com/D-Programming-Language/tools/") + (synopsis "Specialized equivalent to 'make' for the D language") + (description + "rdmd is a companion to the dmd compiler that simplifies the typical edit-compile-link-run or edit-make-run cycle to a rapid edit-run cycle. Like make and other tools, rdmd uses the relative dates of the files involved to minimize the amount of work necessary. Unlike make, rdmd tracks dependencies and freshness without requiring additional information from the user.") - (license license:boost1.0)))) + (license license:boost1.0))) (define-public ldc-bootstrap (package From 65e862d1a2914ad61201236c155058bcf33b5b9c Mon Sep 17 00:00:00 2001 From: Danny Milosavljevic Date: Mon, 6 Feb 2017 16:45:08 +0100 Subject: [PATCH 121/135] gnu: Add dub-build-system. * guix/build-system/dub.scm: New file. * guix/build/dub-build-system.scm: New file. * Makefile.am (MODULES): Add them. * doc/guix.texi: Add section for dub-build-system. --- Makefile.am | 2 + doc/guix.texi | 10 +++ guix/build-system/dub.scm | 147 ++++++++++++++++++++++++++++++++ guix/build/dub-build-system.scm | 125 +++++++++++++++++++++++++++ 4 files changed, 284 insertions(+) create mode 100644 guix/build-system/dub.scm create mode 100644 guix/build/dub-build-system.scm diff --git a/Makefile.am b/Makefile.am index 18501bddfc..8fe22d48ad 100644 --- a/Makefile.am +++ b/Makefile.am @@ -64,6 +64,7 @@ MODULES = \ guix/build-system/ant.scm \ guix/build-system/cargo.scm \ guix/build-system/cmake.scm \ + guix/build-system/dub.scm \ guix/build-system/emacs.scm \ guix/build-system/asdf.scm \ guix/build-system/glib-or-gtk.scm \ @@ -88,6 +89,7 @@ MODULES = \ guix/build/download.scm \ guix/build/cargo-build-system.scm \ guix/build/cmake-build-system.scm \ + guix/build/dub-build-system.scm \ guix/build/emacs-build-system.scm \ guix/build/asdf-build-system.scm \ guix/build/git.scm \ diff --git a/doc/guix.texi b/doc/guix.texi index eca2d99487..50cab274af 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -3438,6 +3438,16 @@ Which Haskell compiler is used can be specified with the @code{#:haskell} parameter which defaults to @code{ghc}. @end defvr +@defvr {Scheme Variable} dub-build-system +This variable is exported by @code{(guix build-system dub)}. It +implements the Dub build procedure used by D packages, which +involves running @code{dub build} and @code{dub run}. +Installation is done by copying the files manually. + +Which D compiler is used can be specified with the @code{#:ldc} +parameter which defaults to @code{ldc}. +@end defvr + @defvr {Scheme Variable} emacs-build-system This variable is exported by @code{(guix build-system emacs)}. It implements an installation procedure similar to the packaging system diff --git a/guix/build-system/dub.scm b/guix/build-system/dub.scm new file mode 100644 index 0000000000..13c89e8648 --- /dev/null +++ b/guix/build-system/dub.scm @@ -0,0 +1,147 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2013 Andreas Enge +;;; Copyright © 2013 Nikita Karetnikov +;;; Copyright © 2016 David Craven +;;; Copyright © 2016 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build-system dub) + #:use-module (guix search-paths) + #:use-module (guix store) + #:use-module (guix utils) + #:use-module (guix derivations) + #:use-module (guix packages) + #:use-module (guix build-system) + #:use-module (guix build-system gnu) + #:use-module (ice-9 match) + #:use-module (srfi srfi-26) + #:export (dub-build-system)) + +(define (default-ldc) + "Return the default ldc package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((ldc (resolve-interface '(gnu packages ldc)))) + (module-ref ldc 'ldc))) + +(define (default-dub) + "Return the default dub package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((ldc (resolve-interface '(gnu packages ldc)))) + (module-ref ldc 'dub))) + +(define (default-pkg-config) + "Return the default pkg-config package." + ;; Lazily resolve the binding to avoid a circular dependency. + (let ((pkg-config (resolve-interface '(gnu packages pkg-config)))) + (module-ref pkg-config 'pkg-config))) + +(define %dub-build-system-modules + ;; Build-side modules imported by default. + `((guix build dub-build-system) + (guix build syscalls) + ,@%gnu-build-system-modules)) + +(define* (dub-build store name inputs + #:key + (tests? #t) + (test-target #f) + (dub-build-flags ''()) + (phases '(@ (guix build dub-build-system) + %standard-phases)) + (outputs '("out")) + (search-paths '()) + (system (%current-system)) + (guile #f) + (imported-modules %dub-build-system-modules) + (modules '((guix build dub-build-system) + (guix build utils)))) + "Build SOURCE using DUB, and with INPUTS." + (define builder + `(begin + (use-modules ,@modules) + (dub-build #:name ,name + #:source ,(match (assoc-ref inputs "source") + (((? derivation? source)) + (derivation->output-path source)) + ((source) + source) + (source + source)) + #:system ,system + #:test-target ,test-target + #:dub-build-flags ,dub-build-flags + #:tests? ,tests? + #:phases ,phases + #:outputs %outputs + #:search-paths ',(map search-path-specification->sexp + search-paths) + #:inputs %build-inputs))) + + (define guile-for-build + (match guile + ((? package?) + (package-derivation store guile system #:graft? #f)) + (#f ; the default + (let* ((distro (resolve-interface '(gnu packages commencement))) + (guile (module-ref distro 'guile-final))) + (package-derivation store guile system #:graft? #f))))) + + (build-expression->derivation store name builder + #:inputs inputs + #:system system + #:modules imported-modules + #:outputs outputs + #:guile-for-build guile-for-build)) + +(define* (lower name + #:key source inputs native-inputs outputs system target + (ldc (default-ldc)) + (dub (default-dub)) + (pkg-config (default-pkg-config)) + #:allow-other-keys + #:rest arguments) + "Return a bag for NAME." + + (define private-keywords + '(#:source #:target #:ldc #:dub #:pkg-config #:inputs #:native-inputs #:outputs)) + + (and (not target) ;; TODO: support cross-compilation + (bag + (name name) + (system system) + (target target) + (host-inputs `(,@(if source + `(("source" ,source)) + '()) + ,@inputs + + ;; Keep the standard inputs of 'gnu-build-system' + ,@(standard-packages))) + (build-inputs `(("ldc" ,ldc) + ("dub" ,dub) + ,@native-inputs)) + (outputs outputs) + (build dub-build) + (arguments (strip-keyword-arguments private-keywords arguments))))) + +(define dub-build-system + (build-system + (name 'dub) + (description + "DUB build system, to build D packages") + (lower lower))) diff --git a/guix/build/dub-build-system.scm b/guix/build/dub-build-system.scm new file mode 100644 index 0000000000..7c7cd8803c --- /dev/null +++ b/guix/build/dub-build-system.scm @@ -0,0 +1,125 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2016 David Craven +;;; Copyright © 2017 Danny Milosavljevic +;;; +;;; This file is part of GNU Guix. +;;; +;;; GNU Guix is free software; you can redistribute it and/or modify it +;;; under the terms of the GNU General Public License as published by +;;; the Free Software Foundation; either version 3 of the License, or (at +;;; your option) any later version. +;;; +;;; GNU Guix is distributed in the hope that it will be useful, but +;;; WITHOUT ANY WARRANTY; without even the implied warranty of +;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;;; GNU General Public License for more details. +;;; +;;; You should have received a copy of the GNU General Public License +;;; along with GNU Guix. If not, see . + +(define-module (guix build dub-build-system) + #:use-module ((guix build gnu-build-system) #:prefix gnu:) + #:use-module (guix build syscalls) + #:use-module (guix build utils) + #:use-module (ice-9 popen) + #:use-module (ice-9 rdelim) + #:use-module (ice-9 ftw) + #:use-module (ice-9 format) + #:use-module (ice-9 match) + #:use-module (rnrs io ports) + #:use-module (srfi srfi-1) + #:use-module (srfi srfi-26) + #:export (%standard-phases + dub-build)) + +;; Commentary: +;; +;; Builder-side code of the DUB (the build tool for D) build system. +;; +;; Code: + +;; FIXME: Needs to be parsed from url not package name. +(define (package-name->d-package-name name) + "Return the package name of NAME." + (match (string-split name #\-) + (("d" rest ...) + (string-join rest "-")) + (_ #f))) + +(define* (configure #:key inputs #:allow-other-keys) + "Prepare one new directory with all the required dependencies. + It's necessary to do this (instead of just using /gnu/store as the + directory) because we want to hide the libraries in subdirectories + lib/dub/... instead of polluting the user's profile root." + (let* ((dir (mkdtemp! "/tmp/dub.XXXXXX")) + (vendor-dir (string-append dir "/vendor"))) + (setenv "HOME" dir) + (mkdir vendor-dir) + (for-each + (match-lambda + ((name . path) + (let* ((d-package (package-name->d-package-name name)) + (d-basename (basename path))) + (when (and d-package path) + (match (string-split (basename path) #\-) + ((_ ... version) + (symlink (string-append path "/lib/dub/" d-basename) + (string-append vendor-dir "/" d-basename)))))))) + inputs) + (zero? (system* "dub" "add-path" vendor-dir)))) + +(define (grep string file-name) + "Find the first occurence of STRING in the file named FILE-NAME. + Return the position of this occurence, or #f if none was found." + (string-contains (call-with-input-file file-name get-string-all) + string)) + +(define (grep* string file-name) + "Find the first occurence of STRING in the file named FILE-NAME. + Return the position of this occurence, or #f if none was found. + If the file named FILE-NAME doesn't exist, return #f." + (catch 'system-error + (lambda () + (grep string file-name)) + (lambda args + #f))) + +(define* (build #:key (dub-build-flags '()) + #:allow-other-keys) + "Build a given DUB package." + (if (or (grep* "sourceLibrary" "package.json") + (grep* "sourceLibrary" "dub.sdl") ; note: format is different! + (grep* "sourceLibrary" "dub.json")) + #t + (let ((status (zero? (apply system* `("dub" "build" ,@dub-build-flags))))) + (system* "dub" "run") ; might fail for "targetType": "library" + status))) + +(define* (check #:key tests? #:allow-other-keys) + (if tests? + (zero? (system* "dub" "test")) + #t)) + +(define* (install #:key inputs outputs #:allow-other-keys) + "Install a given DUB package." + (let* ((out (assoc-ref outputs "out")) + (outbin (string-append out "/bin")) + (outlib (string-append out "/lib/dub/" (basename out)))) + (mkdir-p outbin) + ;; TODO remove "-test-application" + (copy-recursively "bin" outbin) + (mkdir-p outlib) + (copy-recursively "." (string-append outlib)) + #t)) + +(define %standard-phases + (modify-phases gnu:%standard-phases + (replace 'configure configure) + (replace 'build build) + (replace 'check check) + (replace 'install install))) + +(define* (dub-build #:key inputs (phases %standard-phases) + #:allow-other-keys #:rest args) + "Build the given DUB package, applying all of PHASES in order." + (apply gnu:gnu-build #:inputs inputs #:phases phases args)) From 5c2af89985f73d984120fd0e4c49d8a733f3dda1 Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 10 Feb 2017 16:14:05 +0100 Subject: [PATCH 122/135] gnu: lvm2: Update to 2.02.168. * gnu/packages/linux.scm (lvm2): Update to 2.02.168. --- gnu/packages/linux.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 541e4b9c1c..d53f5487ba 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1763,14 +1763,14 @@ time.") (define-public lvm2 (package (name "lvm2") - (version "2.02.166") + (version "2.02.168") (source (origin (method url-fetch) (uri (string-append "ftp://sources.redhat.com/pub/lvm2/releases/LVM2." version ".tgz")) (sha256 (base32 - "150v0mawd2swdvypcmkjd3h3s4n5i1220h6sxx94a8jvp1kb0871")) + "03b62hcsj9z37ckd8c21wwpm07s9zblq7grfh58yzcs1vp6x38r3")) (modules '((guix build utils))) (snippet '(begin From d0d878493bf43a2dc8f13ec7fe2b9d32fa9f6f1f Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Fri, 10 Feb 2017 16:31:34 +0100 Subject: [PATCH 123/135] gnu: webkitgtk: Update to 2.14.4 [security fixes]. Fixes CVE-2017-{2350,2354,2355,2356,2362,2363,2364,2365,2366,2369,2371,2373}. * gnu/packages/webkit.scm (webkitgtk): Update to 2.14.4. --- gnu/packages/webkit.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index 4742322360..30dde65631 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -53,14 +53,14 @@ (define-public webkitgtk (package (name "webkitgtk") - (version "2.14.3") + (version "2.14.4") (source (origin (method url-fetch) (uri (string-append "https://www.webkitgtk.org/releases/" name "-" version ".tar.xz")) (sha256 (base32 - "0v0hkvggxi38cdb3v672qwr0m0y3x2rmnwh8j3q28869li8d9shb")))) + "1b73rcyfqjyg5rqw6f4760b2h1kixwva88clp2wl9vnl3psjvbni")))) (build-system cmake-build-system) (arguments '(#:tests? #f ; no tests From afd532337821f4bdfe9d1f0b6387a1c26df1f458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 10 Feb 2017 10:33:08 +0100 Subject: [PATCH 124/135] gnu: bash: Update patch URL to 4.4. * gnu/packages/bash.scm (patch-url): Change "43" to "44". --- gnu/packages/bash.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index d59170d53c..dcf771aef0 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2012, 2013, 2014, 2015, 2016 Ludovic Courtès +;;; Copyright © 2012, 2013, 2014, 2015, 2016, 2017 Ludovic Courtès ;;; Copyright © 2014, 2015 Mark H Weaver ;;; Copyright © 2015 Leo Famulari ;;; @@ -38,7 +38,7 @@ (define (patch-url seqno) "Return the URL of Bash patch number SEQNO." - (format #f "mirror://gnu/bash/bash-4.3-patches/bash43-~3,'0d" seqno)) + (format #f "mirror://gnu/bash/bash-4.4-patches/bash44-~3,'0d" seqno)) (define (bash-patch seqno sha256) "Return the origin of Bash patch SEQNO, with expected hash SHA256" From 50b8a527efe375ac5377670ff0f159fbbce45312 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ludovic=20Court=C3=A8s?= Date: Fri, 10 Feb 2017 10:34:33 +0100 Subject: [PATCH 125/135] gnu: bash: Add graft for patch #7 [fixes CVE-2017-5932]. * gnu/packages/bash.scm (bash)[replacement]: New field. (bash-minimal): Likewise. (url-fetch/reset-patch-level): New procedure. (bash/fixed): New variable. --- gnu/packages/bash.scm | 42 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 42 insertions(+) diff --git a/gnu/packages/bash.scm b/gnu/packages/bash.scm index dcf771aef0..c121fd84d6 100644 --- a/gnu/packages/bash.scm +++ b/gnu/packages/bash.scm @@ -28,6 +28,9 @@ #:use-module (guix packages) #:use-module (guix download) #:use-module (guix utils) + #:use-module (guix gexp) + #:use-module (guix monads) + #:use-module (guix store) #:use-module (guix build-system gnu) #:autoload (guix gnupg) (gnupg-verify*) #:autoload (guix hash) (port-sha256) @@ -95,6 +98,7 @@ number/base32-hash tuples, directly usable in the 'patch-series' form." (version "4.4")) (package (name "bash") + (replacement bash/fixed) (source (origin (method url-fetch) (uri (string-append @@ -181,6 +185,7 @@ without modification.") ;; A stripped-down Bash for non-interactive use. (package (inherit bash) (name "bash-minimal") + (replacement #f) ;not vulnerable to CVE-2017-5932 since it lacks completion (inputs '()) ; no readline, no curses ;; No "include" output because there's no support for loadable modules. @@ -236,6 +241,43 @@ without modification.") (delete-file-recursively (string-append out "/share")) #t)))))))))) +(define* (url-fetch/reset-patch-level url hash-algo hash + #:optional name + #:key (system (%current-system)) guile) + "Fetch the Bash patch from URL and reset its 'PATCHLEVEL' definition so it +can apply to a patch-level 0 Bash." + (mlet* %store-monad ((name -> (or name (basename url))) + (patch (url-fetch url hash-algo hash + (string-append name ".orig") + #:system system + #:guile guile))) + (gexp->derivation name + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (copy-file #$patch #$output) + (substitute* #$output + (("PATCHLEVEL [0-6]+") + "PATCHLEVEL 0")))) + #:guile-for-build guile + #:system system))) + +(define bash/fixed ;CVE-2017-5932 (RCE with completion) + (package + (inherit bash) + (version "4.4.A") ;4.4.0 + patch #7 + (replacement #f) + (source + (origin + (inherit (package-source bash)) + (patches (cons (origin + (method url-fetch/reset-patch-level) + (uri (patch-url 7)) + (sha256 + (base32 + "1bzdsnqaf05gdbqpsixhan8vygjxpcxlz1dd8d9f5jdznw3wq76y"))) + (origin-patches (package-source bash)))))))) + (define-public bash-completion (package (name "bash-completion") From 29da15738cdca2cfd8ffb60b99ee023d0cd9b21f Mon Sep 17 00:00:00 2001 From: Kei Kebreau Date: Fri, 10 Feb 2017 10:38:51 -0500 Subject: [PATCH 126/135] gnu: wxmaxima: Update to 16.12.2. * gnu/packages/maths.scm (wxmaxima): Update to 16.12.2. --- gnu/packages/maths.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/maths.scm b/gnu/packages/maths.scm index b362fbe8f7..43b0d0a72a 100644 --- a/gnu/packages/maths.scm +++ b/gnu/packages/maths.scm @@ -1985,7 +1985,7 @@ point numbers.") (define-public wxmaxima (package (name "wxmaxima") - (version "16.12.0") + (version "16.12.2") (source (origin (method url-fetch) @@ -1993,7 +1993,7 @@ point numbers.") version "/" name "-" version ".tar.gz")) (sha256 (base32 - "01kas9viqabw5id6crbhz8ahjimmv78gqzizs5hgnj9kngrgrm1h")))) + "0y22zhyhyxj2cbhzvs9c4pxr44i55ryfy5xi96d39bg2nbgs9h22")))) (build-system gnu-build-system) (inputs `(("wxwidgets" ,wxwidgets) From 3f73aa1a5a4335d536b9afea752689c8e3d95e7c Mon Sep 17 00:00:00 2001 From: David Craven Date: Mon, 16 Jan 2017 20:17:46 +0100 Subject: [PATCH 127/135] gnu: Use 'license:' prefix in (gnu packages grub). * gnu/packages/grub.scm (grub): Add prefix. --- gnu/packages/grub.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index c6716a2f6f..292d353738 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -24,7 +24,7 @@ #:use-module (guix download) #:use-module (guix packages) #:use-module (guix utils) - #:use-module ((guix licenses) #:select (gpl3+)) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix build-system gnu) #:use-module (gnu packages) #:use-module (gnu packages flex) @@ -122,7 +122,7 @@ then goes on to load the rest of the operating system. As a multiboot bootloader, GRUB handles the presence of multiple operating systems installed on the same computer; upon booting the computer, the user is presented with a menu to select one of the installed operating systems.") - (license gpl3+) + (license license:gpl3+) (properties '((cpe-name . "grub2"))))) (define-public grub-efi From 96b714f5fdfadfa93865fe3151233b0b5beec1c1 Mon Sep 17 00:00:00 2001 From: David Craven Date: Thu, 9 Feb 2017 19:21:22 +0100 Subject: [PATCH 128/135] gnu: Add syslinux. * gnu/packages/grub.scm (syslinux): New variable. --- gnu/packages/grub.scm | 63 +++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 63 insertions(+) diff --git a/gnu/packages/grub.scm b/gnu/packages/grub.scm index 292d353738..4d9dc819b7 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/grub.scm @@ -33,6 +33,8 @@ #:use-module (gnu packages gettext) #:use-module (gnu packages fontutils) #:use-module (gnu packages linux) + #:use-module (gnu packages perl) + #:use-module (gnu packages python) #:use-module (gnu packages qemu) #:use-module (gnu packages man) #:use-module (gnu packages texinfo) @@ -150,3 +152,64 @@ menu to select one of the installed operating systems.") (string-append (assoc-ref inputs "efibootmgr") "/sbin/efibootmgr"))) #t))))))))) + +(define-public syslinux + (let ((commit "bb41e935cc83c6242de24d2271e067d76af3585c")) + (package + (name "syslinux") + (version (git-version "6.04-pre" "1" commit)) + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/geneC/syslinux") + (commit commit))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "0k8dvafd6410kqxf3kyr4y8jzmpmrih6wbjqg6gklak7945yflrc")))) + (build-system gnu-build-system) + (native-inputs + `(("nasm" ,nasm) + ("perl" ,perl) + ("python-2" ,python-2))) + (inputs + `(("libuuid" ,util-linux))) + (arguments + `(#:parallel-build? #f + #:make-flags + (list (string-append "BINDIR=" %output "/bin") + (string-append "SBINDIR=" %output "/sbin") + (string-append "LIBDIR=" %output "/lib") + (string-append "INCDIR=" %output "/include") + (string-append "DATADIR=" %output "/share") + (string-append "MANDIR=" %output "/share/man") + "PERL=perl" + "bios") + #:phases + (modify-phases %standard-phases + (add-after 'unpack 'patch-files + (lambda _ + (substitute* (find-files "." "Makefile.*|ppmtolss16") + (("/bin/pwd") (which "pwd")) + (("/bin/echo") (which "echo")) + (("/usr/bin/perl") (which "perl"))) + #t)) + (delete 'configure) + (add-before 'build 'set-permissions + (lambda _ + (zero? (system* "chmod" "a+w" "utils/isohybrid.in")))) + (replace 'check + (lambda _ + (setenv "CC" "gcc") + (substitute* "tests/unittest/include/unittest/unittest.h" + ;; Don't look up headers under /usr. + (("/usr/include/") "")) + (zero? (system* "make" "unittest"))))))) + (home-page "http://www.syslinux.org") + (synopsis "Lightweight Linux bootloader") + (description "Syslinux is a lightweight Linux bootloader.") + (license (list license:gpl2+ + license:bsd-3 ; gnu-efi/* + license:bsd-4 ; gnu-efi/inc/* gnu-efi/lib/* + ;; Also contains: + license:expat license:isc license:zlib))))) From 862e38d551801426e2f4953d13588d504d21381b Mon Sep 17 00:00:00 2001 From: David Craven Date: Thu, 9 Feb 2017 19:46:47 +0100 Subject: [PATCH 129/135] gnu: Move (gnu packages grub) and (gnu packages u-boot) ... to (gnu packages bootloaders). * gnu/packages/grub.scm: Rename to bootloaders.scm. * gnu/packages/u-boot.scm: Move to bootloaders.scm. * gnu/local.mk (GNU_SYSTEM_MODULES): Add bootloaders.scm, remove grub.scm and u-boot.scm; * gnu/system/grub.scm: Import (gnu packages bootloaders). * gnu/system/install.scm: Import (gnu packages bootloaders). * gnu/system/vm.scm: Import (gnu packages bootloaders). --- gnu/local.mk | 3 +- gnu/packages/{grub.scm => bootloaders.scm} | 137 ++++++++++++++++++-- gnu/packages/u-boot.scm | 138 --------------------- gnu/system/grub.scm | 4 +- gnu/system/install.scm | 2 +- gnu/system/vm.scm | 2 +- 6 files changed, 132 insertions(+), 154 deletions(-) rename gnu/packages/{grub.scm => bootloaders.scm} (64%) delete mode 100644 gnu/packages/u-boot.scm diff --git a/gnu/local.mk b/gnu/local.mk index 1fc49bbd61..4d6e4b05d4 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -64,6 +64,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/bittorrent.scm \ %D%/packages/bison.scm \ %D%/packages/boost.scm \ + %D%/packages/bootloaders.scm \ %D%/packages/bootstrap.scm \ %D%/packages/busybox.scm \ %D%/packages/c.scm \ @@ -170,7 +171,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/graphics.scm \ %D%/packages/graphviz.scm \ %D%/packages/groff.scm \ - %D%/packages/grub.scm \ %D%/packages/gsasl.scm \ %D%/packages/gstreamer.scm \ %D%/packages/gtk.scm \ @@ -373,7 +373,6 @@ GNU_SYSTEM_MODULES = \ %D%/packages/unrtf.scm \ %D%/packages/upnp.scm \ %D%/packages/uucp.scm \ - %D%/packages/u-boot.scm \ %D%/packages/valgrind.scm \ %D%/packages/version-control.scm \ %D%/packages/video.scm \ diff --git a/gnu/packages/grub.scm b/gnu/packages/bootloaders.scm similarity index 64% rename from gnu/packages/grub.scm rename to gnu/packages/bootloaders.scm index 4d9dc819b7..16cb7b4c0b 100644 --- a/gnu/packages/grub.scm +++ b/gnu/packages/bootloaders.scm @@ -4,6 +4,8 @@ ;;; Copyright © 2015 Leo Famulari ;;; Copyright © 2016 Jan Nieuwenhuizen ;;; Copyright © 2016, 2017 Marius Bakke +;;; Copyright © 2016, 2017 Danny Milosavljevic +;;; Copyright © 2016, 2017 David Craven ;;; ;;; This file is part of GNU Guix. ;;; @@ -20,26 +22,33 @@ ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . -(define-module (gnu packages grub) - #:use-module (guix download) - #:use-module (guix packages) - #:use-module (guix utils) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (guix build-system gnu) +(define-module (gnu packages bootloaders) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module ((gnu packages algebra) #:select (bc)) + #:use-module (gnu packages assembly) #:use-module (gnu packages flex) #:use-module (gnu packages disk) #:use-module (gnu packages bison) - #:use-module (gnu packages gettext) + #:use-module (gnu packages cdrom) + #:use-module (gnu packages cross-base) + #:use-module (gnu packages disk) + #:use-module (gnu packages flex) #:use-module (gnu packages fontutils) + #:use-module (gnu packages gettext) #:use-module (gnu packages linux) + #:use-module (gnu packages man) + #:use-module (gnu packages ncurses) #:use-module (gnu packages perl) #:use-module (gnu packages python) #:use-module (gnu packages qemu) - #:use-module (gnu packages man) #:use-module (gnu packages texinfo) - #:use-module (gnu packages ncurses) - #:use-module (gnu packages cdrom)) + #:use-module (guix build-system gnu) + #:use-module (guix download) + #:use-module (guix git-download) + #:use-module ((guix licenses) #:prefix license:) + #:use-module (guix packages) + #:use-module (guix utils)) (define unifont ;; GNU Unifont, . @@ -213,3 +222,111 @@ menu to select one of the installed operating systems.") license:bsd-4 ; gnu-efi/inc/* gnu-efi/lib/* ;; Also contains: license:expat license:isc license:zlib))))) + +(define-public dtc + (package + (name "dtc") + (version "1.4.2") + (source (origin + (method url-fetch) + (uri (string-append + "https://www.kernel.org/pub/software/utils/dtc/" + "dtc-" version ".tar.xz")) + (sha256 + (base32 + "1b7si8niyca4wxbfah3qw4p4wli81mc1qwfhaswvrfqahklnwi8k")))) + (build-system gnu-build-system) + (native-inputs + `(("bison" ,bison) + ("flex" ,flex))) + (arguments + `(#:make-flags + (list "CC=gcc" + (string-append "PREFIX=" (assoc-ref %outputs "out")) + "INSTALL=install") + #:phases + (modify-phases %standard-phases + (delete 'configure)))) + (home-page "https://www.devicetree.org") + (synopsis "Compiles device tree source files") + (description "@command{dtc} compiles +@uref{http://elinux.org/Device_Tree_Usage, device tree source files} to device +tree binary files. These are board description files used by Linux and BSD.") + (license license:gpl2+))) + +(define u-boot + (package + (name "u-boot") + (version "2017.01") + (source (origin + (method url-fetch) + (uri (string-append + "ftp://ftp.denx.de/pub/u-boot/" + "u-boot-" version ".tar.bz2")) + (sha256 + (base32 + "1wpc51jm3zyibgcr78jng2yksqvrya76bxgsr4pcyjrsz5sm2hkc")))) + (native-inputs + `(("bc" ,bc) + ("dtc" ,dtc) + ("python-2" ,python-2))) + (build-system gnu-build-system) + (home-page "http://www.denx.de/wiki/U-Boot/") + (synopsis "ARM bootloader") + (description "U-Boot is a bootloader used mostly for ARM boards. It +also initializes the boards (RAM etc).") + (license license:gpl2+))) + +(define (make-u-boot-package board triplet) + "Returns a u-boot package for BOARD cross-compiled for TRIPLET." + (package + (inherit u-boot) + (name (string-append "u-boot-" (string-downcase board))) + (native-inputs + `(("cross-gcc" ,(cross-gcc triplet)) + ("cross-binutils" ,(cross-binutils triplet)) + ,@(package-native-inputs u-boot))) + (arguments + `(#:modules ((ice-9 ftw) (guix build utils) (guix build gnu-build-system)) + #:test-target "test" + #:make-flags + (list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-")) + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda* (#:key outputs make-flags #:allow-other-keys) + (let ((config-name (string-append ,board "_defconfig"))) + (if (file-exists? (string-append "configs/" config-name)) + (zero? (apply system* "make" `(,@make-flags ,config-name))) + (begin + (display "Invalid board name. Valid board names are:") + (let ((suffix-len (string-length "_defconfig"))) + (scandir "configs" + (lambda (file-name) + (when (string-suffix? "_defconfig" file-name) + (format #t + "- ~A\n" + (string-drop-right file-name + suffix-len)))))) + #f))))) + (replace 'install + (lambda* (#:key outputs make-flags #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (libexec (string-append out "/libexec")) + (uboot-files (find-files "." ".*\\.(bin|efi|spl)$"))) + (mkdir-p libexec) + (for-each + (lambda (file) + (let ((target-file (string-append libexec "/" file))) + (mkdir-p (dirname target-file)) + (copy-file file target-file))) + uboot-files))))))))) + +(define-public u-boot-vexpress + (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf")) + +(define-public u-boot-malta + (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) + +(define-public u-boot-beagle-bone-black + (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf")) diff --git a/gnu/packages/u-boot.scm b/gnu/packages/u-boot.scm deleted file mode 100644 index bcfe059ee1..0000000000 --- a/gnu/packages/u-boot.scm +++ /dev/null @@ -1,138 +0,0 @@ -;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2016 Danny Milosavljevic -;;; Copyright © 2016 David Craven -;;; -;;; This file is part of GNU Guix. -;;; -;;; GNU Guix is free software; you can redistribute it and/or modify it -;;; under the terms of the GNU General Public License as published by -;;; the Free Software Foundation; either version 3 of the License, or (at -;;; your option) any later version. -;;; -;;; GNU Guix is distributed in the hope that it will be useful, but -;;; WITHOUT ANY WARRANTY; without even the implied warranty of -;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the -;;; GNU General Public License for more details. -;;; -;;; You should have received a copy of the GNU General Public License -;;; along with GNU Guix. If not, see . - -(define-module (gnu packages u-boot) - #:use-module (guix build-system gnu) - #:use-module (guix download) - #:use-module (guix packages) - #:use-module ((guix licenses) #:prefix license:) - #:use-module (gnu packages) - #:use-module ((gnu packages algebra) #:select (bc)) - #:use-module (gnu packages bison) - #:use-module (gnu packages cross-base) - #:use-module (gnu packages flex) - #:use-module (gnu packages python)) - -(define-public dtc - (package - (name "dtc") - (version "1.4.2") - (source (origin - (method url-fetch) - (uri (string-append - "https://www.kernel.org/pub/software/utils/dtc/" - "dtc-" version ".tar.xz")) - (sha256 - (base32 - "1b7si8niyca4wxbfah3qw4p4wli81mc1qwfhaswvrfqahklnwi8k")))) - (build-system gnu-build-system) - (native-inputs - `(("bison" ,bison) - ("flex" ,flex))) - (arguments - `(#:make-flags - (list "CC=gcc" - (string-append "PREFIX=" (assoc-ref %outputs "out")) - "INSTALL=install") - #:phases - (modify-phases %standard-phases - (delete 'configure)))) - (home-page "https://www.devicetree.org") - (synopsis "Compiles device tree source files") - (description "@command{dtc} compiles -@uref{http://elinux.org/Device_Tree_Usage, device tree source files} to device -tree binary files. These are board description files used by Linux and BSD.") - (license license:gpl2+))) - -(define u-boot - (package - (name "u-boot") - (version "2017.01") - (source (origin - (method url-fetch) - (uri (string-append - "ftp://ftp.denx.de/pub/u-boot/" - "u-boot-" version ".tar.bz2")) - (sha256 - (base32 - "1wpc51jm3zyibgcr78jng2yksqvrya76bxgsr4pcyjrsz5sm2hkc")))) - (native-inputs - `(("bc" ,bc) - ("dtc" ,dtc) - ("python-2" ,python-2))) - (build-system gnu-build-system) - (home-page "http://www.denx.de/wiki/U-Boot/") - (synopsis "ARM bootloader") - (description "U-Boot is a bootloader used mostly for ARM boards. It -also initializes the boards (RAM etc).") - (license license:gpl2+))) - -(define (make-u-boot-package board triplet) - "Returns a u-boot package for BOARD cross-compiled for TRIPLET." - (package - (inherit u-boot) - (name (string-append "u-boot-" (string-downcase board))) - (native-inputs - `(("cross-gcc" ,(cross-gcc triplet)) - ("cross-binutils" ,(cross-binutils triplet)) - ,@(package-native-inputs u-boot))) - (arguments - `(#:modules ((ice-9 ftw) (guix build utils) (guix build gnu-build-system)) - #:test-target "test" - #:make-flags - (list "HOSTCC=gcc" (string-append "CROSS_COMPILE=" ,triplet "-")) - #:phases - (modify-phases %standard-phases - (replace 'configure - (lambda* (#:key outputs make-flags #:allow-other-keys) - (let ((config-name (string-append ,board "_defconfig"))) - (if (file-exists? (string-append "configs/" config-name)) - (zero? (apply system* "make" `(,@make-flags ,config-name))) - (begin - (display "Invalid board name. Valid board names are:") - (let ((suffix-len (string-length "_defconfig"))) - (scandir "configs" - (lambda (file-name) - (when (string-suffix? "_defconfig" file-name) - (format #t - "- ~A\n" - (string-drop-right file-name - suffix-len)))))) - #f))))) - (replace 'install - (lambda* (#:key outputs make-flags #:allow-other-keys) - (let* ((out (assoc-ref outputs "out")) - (libexec (string-append out "/libexec")) - (uboot-files (find-files "." ".*\\.(bin|efi|spl)$"))) - (mkdir-p libexec) - (for-each - (lambda (file) - (let ((target-file (string-append libexec "/" file))) - (mkdir-p (dirname target-file)) - (copy-file file target-file))) - uboot-files))))))))) - -(define-public u-boot-vexpress - (make-u-boot-package "vexpress_ca9x4" "arm-linux-gnueabihf")) - -(define-public u-boot-malta - (make-u-boot-package "malta" "mips64el-linux-gnuabi64")) - -(define-public u-boot-beagle-bone-black - (make-u-boot-package "am335x_boneblack" "arm-linux-gnueabihf")) diff --git a/gnu/system/grub.scm b/gnu/system/grub.scm index 7df7d4615a..b18b8be6d7 100644 --- a/gnu/system/grub.scm +++ b/gnu/system/grub.scm @@ -27,7 +27,7 @@ #:use-module (guix download) #:use-module (gnu artwork) #:use-module (gnu system file-systems) - #:autoload (gnu packages grub) (grub) + #:autoload (gnu packages bootloaders) (grub) #:autoload (gnu packages compression) (gzip) #:autoload (gnu packages gtk) (guile-cairo guile-rsvg) #:use-module (ice-9 match) @@ -108,7 +108,7 @@ denoting a file name." grub-configuration make-grub-configuration grub-configuration? (grub grub-configuration-grub ; package - (default (@ (gnu packages grub) grub))) + (default (@ (gnu packages bootloaders) grub))) (device grub-configuration-device) ; string (menu-entries grub-configuration-menu-entries ; list (default '())) diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 944d9f7e72..3ec343570a 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -28,11 +28,11 @@ #:use-module (gnu services shepherd) #:use-module (gnu packages admin) #:use-module (gnu packages bash) + #:use-module (gnu packages bootloaders) #:use-module (gnu packages linux) #:use-module (gnu packages cryptsetup) #:use-module (gnu packages package-management) #:use-module (gnu packages disk) - #:use-module (gnu packages grub) #:use-module (gnu packages texinfo) #:use-module (gnu packages compression) #:use-module (gnu packages nvi) diff --git a/gnu/system/vm.scm b/gnu/system/vm.scm index 1e680b85a2..8a35f7fbc5 100644 --- a/gnu/system/vm.scm +++ b/gnu/system/vm.scm @@ -31,6 +31,7 @@ #:use-module ((gnu build vm) #:select (qemu-command)) #:use-module (gnu packages base) + #:use-module (gnu packages bootloaders) #:use-module (gnu packages guile) #:use-module (gnu packages gawk) #:use-module (gnu packages bash) @@ -38,7 +39,6 @@ #:use-module (gnu packages qemu) #:use-module (gnu packages disk) #:use-module (gnu packages zile) - #:use-module (gnu packages grub) #:use-module (gnu packages linux) #:use-module (gnu packages package-management) #:use-module ((gnu packages make-bootstrap) From ce03b4535ae0b5459cf0fbfcbb549585cfd020b8 Mon Sep 17 00:00:00 2001 From: David Craven Date: Fri, 10 Feb 2017 14:52:57 +0100 Subject: [PATCH 130/135] gnu: Use 'license:' prefix in (gnu packages firmware). * gnu/packages/firmware.scm (ath9k-htc-firmware, b43-tools, openfwwf-firmware): Add prefix. --- gnu/packages/firmware.scm | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index 443c38e944..e7d1ce49cb 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -1,6 +1,7 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès ;;; Copyright © 2016 Eric Bavier +;;; Copyright © 2017 David Craven ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,7 +19,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu packages firmware) - #:use-module (guix licenses) + #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) #:use-module (guix git-download) @@ -85,7 +86,7 @@ "This is the firmware for the Qualcomm Atheros AR7010 and AR9271 USB 802.11n NICs (aka Wi-Fi USB dongles). It is used by the ath9k driver of Linux-libre.") - (license (non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD")))) + (license (license:non-copyleft "http://directory.fsf.org/wiki/License:ClearBSD")))) (define-public b43-tools (let ((commit "8dce53297966b31b6c70a7a03c2433978dd9f288") @@ -143,7 +144,7 @@ Linux-libre.") "The b43 firmware tools is a collection of firmware extractor, assembler, disassembler, and debugging tools for the Linux kernel b43 wireless driver.") - (license gpl2)))) + (license license:gpl2)))) (define-public openfwwf-firmware (package @@ -173,4 +174,4 @@ driver.") "This is firmware from Open FirmWare for WiFi networks (OpenFWWF) for the Broadcom/AirForce chipset BCM43xx with Wireless-Core Revision 5. It is used by the b43-open driver of Linux-libre.") - (license gpl2))) + (license license:gpl2))) From 1b533badfaf50be3d67f9a888e544b522f3080d6 Mon Sep 17 00:00:00 2001 From: David Craven Date: Mon, 16 Jan 2017 20:23:11 +0100 Subject: [PATCH 131/135] gnu: Add seabios. * gnu/packages/firmware.scm (seabios): New variable. --- gnu/packages/firmware.scm | 44 ++++++++++++++++++++++++++++++++++++++- 1 file changed, 43 insertions(+), 1 deletion(-) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index e7d1ce49cb..ff4ea14826 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -29,7 +29,8 @@ #:use-module (gnu packages cmake) #:use-module (gnu packages cross-base) #:use-module (gnu packages flex) - #:use-module (gnu packages perl)) + #:use-module (gnu packages perl) + #:use-module (gnu packages python)) (define-public ath9k-htc-firmware (package @@ -175,3 +176,44 @@ driver.") Broadcom/AirForce chipset BCM43xx with Wireless-Core Revision 5. It is used by the b43-open driver of Linux-libre.") (license license:gpl2))) + +(define-public seabios + (package + (name "seabios") + (version "1.10.1") + (source (origin + (method url-fetch) + (uri (string-append "https://code.coreboot.org/p/seabios/downloads/get/" + "seabios-" version ".tar.gz")) + (sha256 + (base32 + "1jyjl719drnl1v0gf0l5q6qjjmkyqcqkka6s28dfdi0yqsxdsqsh")))) + (build-system gnu-build-system) + (native-inputs + `(("python-2" ,python-2))) + (arguments + `(#:tests? #f ; No check target. + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda _ + (setenv "CC" "gcc") + #t)) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (fmw (string-append out "/share/firmware"))) + (mkdir-p fmw) + (copy-file "out/bios.bin" (string-append fmw "/bios.bin")))))))) + (home-page "https://www.seabios.org/SeaBIOS") + (synopsis "x86 BIOS implementation") + (description "SeaBIOS is an open source implementation of a 16bit x86 BIOS. +SeaBIOS can run in an emulator or it can run natively on X86 hardware with the +use of coreboot.") + ;; Dual licensed. + (license (list license:gpl3+ license:lgpl3+ + ;; src/fw/acpi-dsdt.dsl is lgpl2 + license:lgpl2.1 + ;; src/fw/lzmadecode.c and src/fw/lzmadecode.h are lgpl3+ and + ;; cpl with a linking exception. + license:cpl1.0)))) From a5bc3dfeaac3b5f04702a0e24c99b0c44a2422af Mon Sep 17 00:00:00 2001 From: David Craven Date: Mon, 16 Jan 2017 23:37:21 +0100 Subject: [PATCH 132/135] gnu: Add ovmf. * gnu/packages/grub.scm (edk2-commit, edk2-version, edk2-origin, ovmf): New variables. --- gnu/packages/firmware.scm | 83 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 83 insertions(+) diff --git a/gnu/packages/firmware.scm b/gnu/packages/firmware.scm index ff4ea14826..9106eec4ab 100644 --- a/gnu/packages/firmware.scm +++ b/gnu/packages/firmware.scm @@ -25,10 +25,13 @@ #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (gnu packages) + #:use-module (gnu packages admin) + #:use-module (gnu packages assembly) #:use-module (gnu packages bison) #:use-module (gnu packages cmake) #:use-module (gnu packages cross-base) #:use-module (gnu packages flex) + #:use-module (gnu packages linux) #:use-module (gnu packages perl) #:use-module (gnu packages python)) @@ -217,3 +220,83 @@ use of coreboot.") ;; src/fw/lzmadecode.c and src/fw/lzmadecode.h are lgpl3+ and ;; cpl with a linking exception. license:cpl1.0)))) + +;; OVMF is part of the edk2 source tree. +(define edk2-commit "13a50a6fe1dcfa6600c38456ee24e0f9ecf51b5f") +(define edk2-version (git-version "20170116" "1" edk2-commit)) +(define edk2-origin + (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/tianocore/edk2") + (commit edk2-commit))) + (file-name (git-file-name "edk2" edk2-version)) + (sha256 + (base32 + "1gy2332kdqk8bjzpcsripx10896rbvgl0ic7r344kmpiwdgm948b")))) + +(define-public ovmf + (package + (name "ovmf") + (version edk2-version) + (source edk2-origin) + (build-system gnu-build-system) + (native-inputs + `(("acpica" ,acpica) + ("nasm" ,nasm) + ("python-2" ,python-2) + ("util-linux" ,util-linux))) + (arguments + `(#:tests? #f ; No check target. + #:phases + (modify-phases %standard-phases + (replace 'configure + (lambda _ + (let* ((cwd (getcwd)) + (tools (string-append cwd "/BaseTools")) + (bin (string-append tools "/BinWrappers/PosixLike"))) + (setenv "WORKSPACE" cwd) + (setenv "EDK_TOOLS_PATH" tools) + (setenv "PATH" (string-append (getenv "PATH") ":" bin)) + (system* "bash" "edksetup.sh" "BaseTools") + (substitute* "Conf/target.txt" + (("^TARGET[ ]*=.*$") "TARGET = RELEASE\n") + (("^TOOL_CHAIN_TAG[ ]*=.*$") "TOOL_CHAIN_TAG = GCC49\n") + (("^MAX_CONCURRENT_THREAD_NUMBER[ ]*=.*$") + (format #f "MAX_CONCURRENT_THREAD_NUMBER = ~a~%" + (number->string (parallel-job-count))))) + ;; Build build support. + (setenv "BUILD_CC" "gcc") + (zero? (system* "make" "-C" (string-append tools "/Source/C")))))) + (add-after 'build 'build-ia32 + (lambda _ + (substitute* "Conf/target.txt" + (("^TARGET_ARCH[ ]*=.*$") "TARGET_ARCH = IA32\n") + (("^ACTIVE_PLATFORM[ ]*=.*$") + "ACTIVE_PLATFORM = OvmfPkg/OvmfPkgIa32.dsc\n")) + (zero? (system* "build")))) + (add-after 'build 'build-x64 + (lambda _ + (substitute* "Conf/target.txt" + (("^TARGET_ARCH[ ]*=.*$") "TARGET_ARCH = X64\n") + (("^ACTIVE_PLATFORM[ ]*=.*$") + "ACTIVE_PLATFORM = OvmfPkg/OvmfPkgX64.dsc\n")) + (zero? (system* "build")))) + (delete 'build) + (replace 'install + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (fmw (string-append out "/share/firmware"))) + (mkdir-p fmw) + (copy-file "Build/OvmfIa32/RELEASE_GCC49/FV/OVMF.fd" + (string-append fmw "/ovmf_ia32.bin")) + (copy-file "Build/OvmfX64/RELEASE_GCC49/FV/OVMF.fd" + (string-append fmw "/ovmf_x64.bin"))) + #t))))) + (supported-systems '("x86_64-linux" "i686-linux")) + (home-page "http://www.tianocore.org") + (synopsis "UEFI firmware for QEMU") + (description "OVMF is an EDK II based project to enable UEFI support for +Virtual Machines. OVMF contains a sample UEFI firmware for QEMU and KVM.") + (license (list license:expat + license:bsd-2 license:bsd-3 license:bsd-4)))) From 446e1d5196a2f297aee2989d0ca5410eaeccf68f Mon Sep 17 00:00:00 2001 From: Alex Griffin Date: Thu, 9 Feb 2017 14:25:24 -0600 Subject: [PATCH 133/135] gnu: Add font-comic-neue. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/fonts.scm (font-comic-neue): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/fonts.scm | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index 43991d1034..fdda81c2b9 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2016 Toni Reina ;;; Copyright © 2017 Tobias Geerinckx-Rice ;;; Copyright © 2017 José Miguel Sánchez García +;;; Copyright © 2017 Alex Griffin ;;; ;;; This file is part of GNU Guix. ;;; @@ -1031,3 +1032,39 @@ designed to work well in user interface environments.") "Font Awesome is a full suite of pictographic icons for easy scalable vector graphics.") (license license:silofl1.1))) + +(define-public font-comic-neue + (package + (name "font-comic-neue") + (version "2.3") + (source (origin + (method url-fetch) + (uri (string-append + "http://www.comicneue.com/comic-neue-" version ".zip")) + (sha256 + (base32 + "1695hkpd8kqnr2a88p8xs496slgzxjjkzpa9aa33ml3pnh7519zk")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((font-dir (string-append %output + "/share/fonts/truetype")) + (source (assoc-ref %build-inputs "source")) + (unzip (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip"))) + (mkdir-p font-dir) + (system* unzip source) + (with-directory-excursion + (string-append "Web") + (for-each (lambda (ttf) + (install-file ttf font-dir)) + (find-files "." "\\.ttf$"))))))) + (native-inputs `(("unzip" ,unzip))) + (home-page "http://www.comicneue.com/") + (synopsis "Font that fixes the shortcomings of Comic Sans") + (description + "Comic Neue is a font that attempts to create a respectable casual +typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.") + (license license:silofl1.1))) From de191cafce922640acb1c280c5a19fd575bb2c8b Mon Sep 17 00:00:00 2001 From: Alex Griffin Date: Thu, 9 Feb 2017 14:26:41 -0600 Subject: [PATCH 134/135] gnu: Add font-iosevka. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/fonts.scm (font-iosevka): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/fonts.scm | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index fdda81c2b9..d74c1fb2b3 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -1068,3 +1068,37 @@ vector graphics.") "Comic Neue is a font that attempts to create a respectable casual typeface, by mimicking Comic Sans while fixing its most obvious shortcomings.") (license license:silofl1.1))) + +(define-public font-iosevka + (package + (name "font-iosevka") + (version "1.11.0") + (source (origin + (method url-fetch) + (uri (string-append + "https://github.com/be5invis/Iosevka/releases/download/v" + version "/iosevka-pack-" version ".zip")) + (sha256 + (base32 + "0d8prdk7s5z94sdfd0y92cvqq531yqrlg7hnadbnhd7fs9jqr5hj")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((font-dir (string-append %output + "/share/fonts/truetype")) + (source (assoc-ref %build-inputs "source")) + (unzip (string-append (assoc-ref %build-inputs "unzip") + "/bin/unzip"))) + (mkdir-p font-dir) + (system* unzip "-d" font-dir source))))) + (native-inputs `(("unzip" ,unzip))) + (home-page "https://be5invis.github.io/Iosevka/") + (synopsis "Coders' typeface, built from code") + (description + "Iosevka is a slender monospace sans-serif or slab-serif typeface inspired +by Pragmata Pro, M+, and PF DIN Mono, designed to be the ideal font for +programming. Iosevka is completely generated from its source code.") + (license (list license:silofl1.1 ; build artifacts (i.e. the fonts) + license:bsd-3)))) ; supporting code From 49dbae548e92e0521ae125239282a04d8ea924cf Mon Sep 17 00:00:00 2001 From: Alex Griffin Date: Thu, 9 Feb 2017 14:27:12 -0600 Subject: [PATCH 135/135] gnu: Add font-go. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/fonts.scm (font-go): New variable. Signed-off-by: Ludovic Courtès --- gnu/packages/fonts.scm | 40 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/gnu/packages/fonts.scm b/gnu/packages/fonts.scm index d74c1fb2b3..4105449c89 100644 --- a/gnu/packages/fonts.scm +++ b/gnu/packages/fonts.scm @@ -39,11 +39,13 @@ #:use-module ((guix licenses) #:prefix license:) #:use-module (guix packages) #:use-module (guix download) + #:use-module (guix git-download) #:use-module (guix build-system gnu) #:use-module (guix build-system trivial) #:use-module (gnu packages base) #:use-module (gnu packages compression) #:use-module (gnu packages fontutils) + #:use-module (gnu packages golang) #:use-module (gnu packages perl) #:use-module (gnu packages pkg-config) #:use-module (gnu packages python) @@ -1102,3 +1104,41 @@ by Pragmata Pro, M+, and PF DIN Mono, designed to be the ideal font for programming. Iosevka is completely generated from its source code.") (license (list license:silofl1.1 ; build artifacts (i.e. the fonts) license:bsd-3)))) ; supporting code + +(define-public font-go + (let ((commit "b7f8df6bc082334698d4505fb85fa05e99156b72") + (revision "1")) + (package + (name "font-go") + (version (string-append "20161115-" revision "." (string-take commit 7))) + (source (origin + (file-name (string-append "go-image-" version "-checkout")) + (method git-fetch) + (uri (git-reference + (url "https://go.googlesource.com/image") + (commit commit))) + (sha256 + (base32 + "1ywxs6dmcyzwwsmnan3qqza7znprnbvmdi260x6sjmydz6dyq2zs")))) + (build-system trivial-build-system) + (arguments + `(#:modules ((guix build utils)) + #:builder (begin + (use-modules (guix build utils)) + (let ((font-dir (string-append %output + "/share/fonts/truetype")) + (source (assoc-ref %build-inputs "source"))) + (mkdir-p font-dir) + (with-directory-excursion + (string-append source "/font/gofont/ttfs") + (for-each (lambda (ttf) + (install-file ttf font-dir)) + (find-files "." "\\.ttf$"))))))) + (home-page "https://blog.golang.org/go-fonts") + (synopsis "The Go font family") + (description + "The Go font family is a set of WGL4 TrueType fonts from the Bigelow & +Holmes type foundry, released under the same license as the Go programming +language. It includes a set of proportional, sans-serif fonts, and a set of +monospace, slab-serif fonts.") + (license (package-license go-1.4)))))