From 6ffb0b4f6a99f6f1d601418af6e87566957c0031 Mon Sep 17 00:00:00 2001 From: Nicolas Goaziou Date: Wed, 11 Dec 2019 23:23:30 +0100 Subject: gnu: Add emacs-modus-themes. * gnu/packages/emacs-xyz.scm (emacs-modus-themes): New variable. --- gnu/packages/emacs-xyz.scm | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index c7da8b9556..1a49ff4172 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -19816,6 +19816,33 @@ (define-public emacs-doom-themes (home-page "https://github.com/hlissner/emacs-doom-themes") (license license:expat))) +(define-public emacs-modus-themes + (package + (name "emacs-modus-themes") + (version "0.1.0") + (source + (origin + (method git-fetch) + (uri (git-reference + (url "https://gitlab.com/protesilaos/modus-themes.git") + (commit version))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "15g63675c5df2p0kk2sqj2c8qriyh69lcbggknqlaxapr13giz4x")))) + (build-system emacs-build-system) + (home-page "https://gitlab.com/protesilaos/modus-themes") + (synopsis "Emacs themes designed for colour-contrast accessibility") + (description + "This is a set of accessible themes for GNU Emacs. The contrast ratio +between foreground and background values should always be >= 7:1, which +conforms with the WCAG AAA accessibility standard. + +The Modus themes project consists of two standalone items, one where dark text +is cast on a light backdrop (Modus Operandi) and another where light text is +displayed against a dark background (Modus Vivendi).") + (license license:gpl3+))) + (define-public emacs-elixir-mode (package (name "emacs-elixir-mode") -- cgit v1.2.3 From dcb7ce500bd025455982d74c3384c707f35bbb46 Mon Sep 17 00:00:00 2001 From: Clément Lassieur Date: Thu, 12 Dec 2019 01:06:14 +0100 Subject: doc: Add missing MKDIR call. * doc/guix.texi (G-Expressions): Add missing MKDIR call. --- doc/guix.texi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/guix.texi b/doc/guix.texi index 25efba118f..01980bf2d3 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -39,7 +39,7 @@ Copyright @copyright{} 2016, 2017, 2018, 2019 Jan Nieuwenhuizen@* Copyright @copyright{} 2016 Julien Lepiller@* Copyright @copyright{} 2016 Alex ter Weele@* Copyright @copyright{} 2016, 2017, 2018, 2019 Christopher Baines@* -Copyright @copyright{} 2017, 2018 Clément Lassieur@* +Copyright @copyright{} 2017, 2018, 2019 Clément Lassieur@* Copyright @copyright{} 2017, 2018 Mathieu Othacehe@* Copyright @copyright{} 2017 Federico Beffa@* Copyright @copyright{} 2017, 2018 Carlo Zancanaro@* @@ -7457,6 +7457,7 @@ native package build: (gexp->derivation "vi" #~(begin (mkdir #$output) + (mkdir (string-append #$output "/bin")) (system* (string-append #+coreutils "/bin/ln") "-s" (string-append #$emacs "/bin/emacs") -- cgit v1.2.3 From e3ce8fbfd36b85f7baa3a5a1ee29e9ab89b6f413 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 3 Dec 2019 19:46:13 +0100 Subject: gnu: remind: Update to 3.1.17. * gnu/packages/calendar.scm (remind): Update to 3.1.17. --- gnu/packages/calendar.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/calendar.scm b/gnu/packages/calendar.scm index 6c60008ec7..5e7ac66260 100644 --- a/gnu/packages/calendar.scm +++ b/gnu/packages/calendar.scm @@ -155,7 +155,7 @@ (define-public khal (define-public remind (package (name "remind") - (version "3.1.16") + (version "3.1.17") (source (origin (method url-fetch) @@ -166,7 +166,7 @@ (define-public remind ".") ".tar.gz")) (sha256 - (base32 "14yavwqmimba8rdpwx3wlav9sfb0v5rcd1iyzqrs08wx07a9pdzf")))) + (base32 "0lgyc2j69aqqk4knywr8inz4fsnni0zq54dgqh7p4s6kzybc2mf9")))) (build-system gnu-build-system) (arguments '(#:tests? #f)) ; no "check" target -- cgit v1.2.3 From 58ec1e4bb8a3539975a0d9a0ccc953101e0f9af3 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 3 Dec 2019 22:04:58 +0100 Subject: gnu: libcdio-paranoia: Update to 10.2+2.0.1. * gnu/packages/cdrom.scm (libcdio-paranoia): Update to 10.2+2.0.1. --- gnu/packages/cdrom.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/cdrom.scm b/gnu/packages/cdrom.scm index dcbf4c5f0b..b13b4b3a66 100644 --- a/gnu/packages/cdrom.scm +++ b/gnu/packages/cdrom.scm @@ -134,14 +134,14 @@ (define-public libcdio (define-public libcdio-paranoia (package (name "libcdio-paranoia") - (version "10.2+2.0.0") + (version "10.2+2.0.1") (source (origin (method url-fetch) (uri (string-append "mirror://gnu/libcdio/libcdio-paranoia-" version ".tar.bz2")) (sha256 (base32 - "1h8k8z9r75h3p697f77z9j1blwb6gf2d5rik6z2q6420my6c2ra5")))) + "12hfnrq7amv9qjzc92cr265m7kh0a1hpasck8cxx1gygbhqczc9k")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) (propagated-inputs `(("libcdio" ,libcdio))) -- cgit v1.2.3 From 3190e967c6c06fbbb24836c045691c496eea739b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 4 Dec 2019 01:55:26 +0100 Subject: gnu: gx: Update to 0.14.2. * gnu/packages/ipfs.scm (gx): Update to 0.14.2. --- gnu/packages/ipfs.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/packages/ipfs.scm b/gnu/packages/ipfs.scm index 39c22262c1..49612425fb 100644 --- a/gnu/packages/ipfs.scm +++ b/gnu/packages/ipfs.scm @@ -104,7 +104,7 @@ (define-public go-github-com-ipfs-go-ipfs-api (define-public gx (package (name "gx") - (version "0.14.1") + (version "0.14.2") (source (origin (method git-fetch) @@ -113,8 +113,7 @@ (define-public gx (commit (string-append "v" version)))) (file-name (git-file-name name version)) (sha256 - (base32 - "0pfx2p59xdbmqzfbgaf8xvlnzh8m05hkg596glq5kvl8ib65i4ha")))) + (base32 "048bx6khzcwxnvz3lf7kgp6fkg8mxqcqchxh0jxm9fg2iwizsi0k")))) (build-system go-build-system) (arguments '(#:import-path "github.com/whyrusleeping/gx")) -- cgit v1.2.3 From 8d73e6a2448d43a7f10d56289fc901d500300dbf Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 4 Dec 2019 01:55:47 +0100 Subject: gnu: graphicsmagick: Update to 1.3.33. * gnu/packages/imagemagick.scm (graphicsmagick): Update to 1.3.33. --- gnu/packages/imagemagick.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/packages/imagemagick.scm b/gnu/packages/imagemagick.scm index 74fbf9158a..b8189c8ca8 100644 --- a/gnu/packages/imagemagick.scm +++ b/gnu/packages/imagemagick.scm @@ -170,7 +170,7 @@ (define-public perl-image-magick (define-public graphicsmagick (package (name "graphicsmagick") - (version "1.3.32") + (version "1.3.33") (source (origin (method url-fetch) @@ -182,8 +182,7 @@ (define-public graphicsmagick "GraphicsMagick/" (version-major+minor version) "/GraphicsMagick-" version ".tar.xz"))) (sha256 - (base32 - "1qclp9i31idpcbbqswmnq2q11lmv0a7cvdb1y72xcky8sshaahmq")))) + (base32 "0y67dl6xbk1pxndppa93hhlq9i6bpcjw39gb4i8hnn1klqqb630k")))) (build-system gnu-build-system) (arguments `(#:configure-flags -- cgit v1.2.3 From 2665ff41e9875b13258827c43e971e099102b607 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 4 Dec 2019 05:10:53 +0100 Subject: gnu: bogofilter: Update to 1.2.5. * gnu/packages/mail.scm (bogofilter): Update to 1.2.5. [license]: Upgrade to GPL3+. --- gnu/packages/mail.scm | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 555fe70de4..4450e9676b 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -555,15 +555,14 @@ (define-public gmime-2.6 (define-public bogofilter (package (name "bogofilter") - (version "1.2.4") - (source (origin - (method url-fetch) - (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-" - version "/bogofilter-" - version ".tar.bz2")) - (sha256 - (base32 - "1d56n2m9inm8gnzm88aa27xl2a7sp7aff3484vmflpqkinjqf0p1")))) + (version "1.2.5") + (source + (origin + (method url-fetch) + (uri (string-append "mirror://sourceforge/bogofilter/bogofilter-stable/" + "bogofilter-" version ".tar.xz")) + (sha256 + (base32 "1sl9xrnnlk2sn8gmibhn8li09vnansjbxb9l1182qmgz7cvs2j1j")))) (build-system gnu-build-system) (arguments '(#:phases @@ -583,7 +582,7 @@ (define-public bogofilter (non-spam) by a statistical analysis of the message's header and content (body). The program is able to learn from the user's classifications and corrections. It is based on a Bayesian filter.") - (license gpl2))) + (license gpl3+))) (define-public offlineimap (package -- cgit v1.2.3 From 0ba5755868894d298fc521da9c500389fa5aa24a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 4 Dec 2019 05:11:26 +0100 Subject: gnu: bogofilter: Use HTTPS home page. * gnu/packages/mail.scm (bogofilter)[home-page]: Use HTTPS. --- gnu/packages/mail.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/mail.scm b/gnu/packages/mail.scm index 4450e9676b..1dcc013a7a 100644 --- a/gnu/packages/mail.scm +++ b/gnu/packages/mail.scm @@ -575,7 +575,7 @@ (define-public bogofilter #t))))) (native-inputs `(("flex" ,flex))) (inputs `(("bdb" ,bdb))) - (home-page "http://bogofilter.sourceforge.net/") + (home-page "https://bogofilter.sourceforge.io/") (synopsis "Mail classifier based on a Bayesian filter") (description "Bogofilter is a mail filter that classifies mail as spam or ham -- cgit v1.2.3 From 0b223139a8eb265ee4209742c9b19bf8b25b95ef Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 4 Dec 2019 05:26:53 +0100 Subject: gnu: libwpd: Update to 0.10.3. * gnu/packages/libreoffice.scm (libwpd): Update to 0.10.3. --- gnu/packages/libreoffice.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/libreoffice.scm b/gnu/packages/libreoffice.scm index 4476e5a4ad..761e75072d 100644 --- a/gnu/packages/libreoffice.scm +++ b/gnu/packages/libreoffice.scm @@ -174,14 +174,14 @@ (define-public librevenge (define-public libwpd (package (name "libwpd") - (version "0.10.2") + (version "0.10.3") (source (origin (method url-fetch) (uri (string-append "mirror://sourceforge/libwpd/libwpd/" "libwpd-" version "/libwpd-" version ".tar.xz")) (sha256 (base32 - "0436gnidx45a9vx114hhh216jrh57mqb9zyssyjfadagmyz6hgrj")))) + "02fx8bngslcj7i5g1gx2kiign4vp09wrmp5wpvix9igxcavb0r94")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--disable-werror"))) -- cgit v1.2.3 From 78fee44e32ddb4d5bd88e733af1b89460cede378 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Wed, 4 Dec 2019 13:15:14 +0100 Subject: gnu: muse-sequencer: Don't use NAME in source URI. * gnu/packages/music.scm (muse-sequencer)[source]: Hard-code NAME. --- gnu/packages/music.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/music.scm b/gnu/packages/music.scm index 54f2638f57..134fe7ed51 100644 --- a/gnu/packages/music.scm +++ b/gnu/packages/music.scm @@ -3924,7 +3924,7 @@ (define-public muse-sequencer (string-map (lambda (c) (if (char=? c #\.) #\_ c)) version))))) - (file-name (string-append name "-" version "-checkout")) + (file-name (git-file-name name version)) (sha256 (base32 "1nninz8qyqlxxjdnrm79y3gr3056pga9l2fsqh674jd3cjvafya3")))) -- cgit v1.2.3 From 00d3c3e9b8d27a39922245a9fe9d02d610ff1ce8 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 7 Dec 2019 05:19:08 +0100 Subject: gnu: fio: Update to 3.16. * gnu/packages/benchmark.scm (fio): Update to 3.16. --- gnu/packages/benchmark.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index 8e347879dd..7f8e4580dc 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -43,14 +43,14 @@ (define-module (gnu packages benchmark) (define-public fio (package (name "fio") - (version "3.14") + (version "3.16") (source (origin (method url-fetch) (uri (string-append "http://brick.kernel.dk/snaps/" "fio-" version ".tar.bz2")) (sha256 (base32 - "047y53nyhnmnxcrsfbsf0gcpxw7bli3n19ycscpxy9974j0fck0v")))) + "17hi6cd4wahghh7kgvxcvmrhcqlmqag3a07id90hhzwd3zhvdxbp")))) (build-system gnu-build-system) (arguments '(#:test-target "test" -- cgit v1.2.3 From 2dffd9c6731870cb9ea01a9617d2ca8e87da322b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Sat, 7 Dec 2019 05:19:39 +0100 Subject: gnu: fio: Download over HTTPS. * gnu/packages/benchmark.scm (fio)[source]: Use HTTPS. --- gnu/packages/benchmark.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/benchmark.scm b/gnu/packages/benchmark.scm index 7f8e4580dc..f9e819460e 100644 --- a/gnu/packages/benchmark.scm +++ b/gnu/packages/benchmark.scm @@ -46,7 +46,7 @@ (define-public fio (version "3.16") (source (origin (method url-fetch) - (uri (string-append "http://brick.kernel.dk/snaps/" + (uri (string-append "https://brick.kernel.dk/snaps/" "fio-" version ".tar.bz2")) (sha256 (base32 -- cgit v1.2.3 From 4a27b0f1cf5ac7164113d44bad6c549d11fd170a Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 10 Dec 2019 15:43:20 +0100 Subject: gnu: nftables: Use HTTPS for www.nftables.org. * gnu/packages/linux.scm (nftables)[source, home-page]: Use HTTPS. --- 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 383698b400..8b5969c4fa 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -5257,7 +5257,7 @@ (define-public nftables (source (origin (method url-fetch) - (uri (string-append "http://www.nftables.org/projects/nftables" + (uri (string-append "https://www.nftables.org/projects/nftables" "/files/nftables-" version ".tar.bz2")) (sha256 (base32 @@ -5272,7 +5272,7 @@ (define-public nftables ("libnftnl" ,libnftnl) ("readline" ,readline))) (native-inputs `(("pkg-config" ,pkg-config))) - (home-page "http://www.nftables.org") + (home-page "https://www.nftables.org") (synopsis "Userspace utility for Linux packet filtering") (description "nftables is the project that aims to replace the existing {ip,ip6,arp,eb}tables framework. Basically, this project provides a new packet -- cgit v1.2.3 From 79a392535591fc4224280ade6a87910793ca6688 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 10 Dec 2019 16:28:42 +0100 Subject: gnu: libnftnl: Update to 1.1.5. * gnu/packages/linux.scm (libnftnl): Update to 1.1.5. [source]: Add patch. * gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. --- gnu/local.mk | 1 + gnu/packages/linux.scm | 6 ++- .../libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch | 47 ++++++++++++++++++++++ 3 files changed, 52 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch diff --git a/gnu/local.mk b/gnu/local.mk index 00ff3b8d61..7f8715235d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1012,6 +1012,7 @@ dist_patch_DATA = \ %D%/packages/patches/java-xerces-xjavac_taskdef.patch \ %D%/packages/patches/jbig2dec-ignore-testtest.patch \ %D%/packages/patches/kdbusaddons-kinit-file-name.patch \ + %D%/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch \ %D%/packages/patches/libvirt-create-machine-cgroup.patch \ %D%/packages/patches/libziparchive-add-includes.patch \ %D%/packages/patches/localed-xorg-keyboard.patch \ diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 8b5969c4fa..024c6e5617 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -5229,14 +5229,16 @@ (define-public libmnl (define-public libnftnl (package (name "libnftnl") - (version "1.1.4") + (version "1.1.5") (source (origin (method url-fetch) (uri (string-append "mirror://netfilter.org/libnftnl/" "libnftnl-" version ".tar.bz2")) (sha256 - (base32 "087dfc2n4saf2k68hyi4byvgz5grwpw5kfjvmkpn3wmd8y1riiy8")))) + (base32 "1wqlxf76bkqf3qhka9sw32qhb2ni20q1k6rn3iril2kw482lvpk6")) + (patches + (search-patches "libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config))) diff --git a/gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch b/gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch new file mode 100644 index 0000000000..df0571bf2b --- /dev/null +++ b/gnu/packages/patches/libnftnl-dont-check-NFTNL_FLOWTABLE_SIZE.patch @@ -0,0 +1,47 @@ +From: Tobias Geerinckx-Rice +Date: Tue, 10 Dec 2019 16:20:40 +0100 +Subject: gnu: libnftnl: Don't check NFTNL_FLOWTABLE_SIZE. + +Taken verbatim from the upstream commit[0] directly following the 1.1.5 +release. + +[0]: https://git.netfilter.org/libnftnl/commit/?id=b2388765e0c4405442faa13845419f6a35d0134c + +From b2388765e0c4405442faa13845419f6a35d0134c Mon Sep 17 00:00:00 2001 +From: Phil Sutter +Date: Mon, 2 Dec 2019 18:29:56 +0100 +Subject: tests: flowtable: Don't check NFTNL_FLOWTABLE_SIZE + +Marshalling code around that attribute has been dropped by commit +d1c4b98c733a5 ("flowtable: remove NFTA_FLOWTABLE_SIZE") so it's value is +lost during the test. + +Assuming that NFTNL_FLOWTABLE_SIZE will receive kernel support at a +later point, leave the test code in place but just comment it out. + +Fixes: d1c4b98c733a5 ("flowtable: remove NFTA_FLOWTABLE_SIZE") +Signed-off-by: Phil Sutter +Acked-by: Pablo Neira Ayuso +--- + tests/nft-flowtable-test.c | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/tests/nft-flowtable-test.c b/tests/nft-flowtable-test.c +index 3edb00d..8ab8d4c 100644 +--- a/tests/nft-flowtable-test.c ++++ b/tests/nft-flowtable-test.c +@@ -33,9 +33,11 @@ static void cmp_nftnl_flowtable(struct nftnl_flowtable *a, struct nftnl_flowtabl + if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_USE) != + nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_USE)) + print_err("Flowtable use mismatches"); ++#if 0 + if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_SIZE) != + nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_SIZE)) + print_err("Flowtable size mismatches"); ++#endif + if (nftnl_flowtable_get_u32(a, NFTNL_FLOWTABLE_FLAGS) != + nftnl_flowtable_get_u32(b, NFTNL_FLOWTABLE_FLAGS)) + print_err("Flowtable flags mismatches"); +-- +cgit v1.2.1 + -- cgit v1.2.3 From e221e9a7bce12789214066075bda2910106b6c32 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 10 Dec 2019 16:31:35 +0100 Subject: gnu: nftables: Prefer mirror://netfilter sources. * gnu/packages/linux.scm (nftables)[source]: Add a mirror:// URI. --- gnu/packages/linux.scm | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 024c6e5617..97cb6fffbf 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -5259,8 +5259,10 @@ (define-public nftables (source (origin (method url-fetch) - (uri (string-append "https://www.nftables.org/projects/nftables" - "/files/nftables-" version ".tar.bz2")) + (uri (list (string-append "mirror://netfilter.org/nftables/nftables-" + version ".tar.bz2") + (string-append "https://www.nftables.org/projects/nftables" + "/files/nftables-" version ".tar.bz2"))) (sha256 (base32 "1x8kalbggjq44j4916i6vyv1rb20dlh1dcsf9xvzqsry2j063djw")))) -- cgit v1.2.3 From 31e6ef05156b2e952d2b2f86433f7e39e1ef71e0 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 10 Dec 2019 16:31:44 +0100 Subject: gnu: nftables: Update to 0.9.3. * gnu/packages/linux.scm (nftables): Update to 0.9.3. --- gnu/packages/linux.scm | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 97cb6fffbf..48c8448a9d 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -5255,7 +5255,7 @@ (define-public libnftnl (define-public nftables (package (name "nftables") - (version "0.9.2") + (version "0.9.3") (source (origin (method url-fetch) @@ -5264,8 +5264,7 @@ (define-public nftables (string-append "https://www.nftables.org/projects/nftables" "/files/nftables-" version ".tar.bz2"))) (sha256 - (base32 - "1x8kalbggjq44j4916i6vyv1rb20dlh1dcsf9xvzqsry2j063djw")))) + (base32 "0y6vbqp6x8w165q65h4n9sba1406gaz0d4744gqszbm7w9f92swm")))) (build-system gnu-build-system) (arguments `(#:configure-flags '("--disable-man-doc"))) ; FIXME: Needs docbook2x. -- cgit v1.2.3 From 968dd994474d83354f43947a2666b7f4d8f2793b Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Tue, 10 Dec 2019 20:49:27 +0100 Subject: gnu: iptables: Update to 1.8.4. * gnu/packages/linux.scm (iptables): Update to 1.8.4. --- 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 48c8448a9d..0a3f7957c5 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -1674,7 +1674,7 @@ (define-public alsa-plugins (define-public iptables (package (name "iptables") - (version "1.6.2") + (version "1.8.4") (source (origin (method url-fetch) (uri (string-append @@ -1682,7 +1682,7 @@ (define-public iptables version ".tar.bz2")) (sha256 (base32 - "0crp0lvh5m2f15pr8cw97h8yb8zjj10x95zj06j46cr68vx2vl2m")))) + "0z0mgs1ghvn3slc868mgbf2g26njgrzcy5ggyb5w4i55j1a3lflr")))) (build-system gnu-build-system) (native-inputs `(("pkg-config" ,pkg-config) -- cgit v1.2.3 From 336afa17e37a4ef2ab13efa24a25805d37a11cc8 Mon Sep 17 00:00:00 2001 From: Tobias Geerinckx-Rice Date: Thu, 12 Dec 2019 14:29:47 +0100 Subject: gnu: wireguard: Update to 0.0.20191212. * gnu/packages/vpn.scm (wireguard): Update to 0.0.20191212. --- gnu/packages/vpn.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/vpn.scm b/gnu/packages/vpn.scm index 1c2228c426..6d780dc8cd 100644 --- a/gnu/packages/vpn.scm +++ b/gnu/packages/vpn.scm @@ -456,14 +456,14 @@ (define-public badvpn (define-public wireguard (package (name "wireguard") - (version "0.0.20191127") + (version "0.0.20191212") (source (origin (method url-fetch) (uri (string-append "https://git.zx2c4.com/WireGuard/snapshot/" "WireGuard-" version ".tar.xz")) (sha256 (base32 - "01ixdhbvx5yiq07msd60f98685wdksss4pfhdn1d8r25z2k80kkx")))) + "0wdhl7i4zkb7yf0jj03ig2ks7bsfz9if8x9dy6r2523s1ww1imxh")))) (build-system gnu-build-system) (outputs '("out" ; The WireGuard userspace tools "kernel-patch")) ; A patch to build Linux with WireGuard support -- cgit v1.2.3 From 55e21617d68073077fdc9f35307e94859ec7a6c4 Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Mon, 2 Dec 2019 21:15:50 +0100 Subject: linux-boot: Don't ignore flags when mounting root file system. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/build/linux-boot.scm (mount-root-file-system): Add the 'flags' keyword argument and use it when mounting the root file system. (boot-system): Pass the root file system flags to 'mount-root-file-system'. Signed-off-by: Ludovic Courtès --- gnu/build/linux-boot.scm | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/gnu/build/linux-boot.scm b/gnu/build/linux-boot.scm index 950a3507f2..3d40a7d05d 100644 --- a/gnu/build/linux-boot.scm +++ b/gnu/build/linux-boot.scm @@ -358,10 +358,10 @@ (define (pidof program) (filter-map string->number (scandir "/proc"))))) (define* (mount-root-file-system root type - #:key volatile-root? options) - "Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROOT? -is true, mount ROOT read-only and make it an overlay with a writable tmpfs -using the kernel built-in overlayfs. OPTIONS indicates the options to use + #:key volatile-root? (flags 0) options) + "Mount the root file system of type TYPE at device ROOT. If VOLATILE-ROOT? is +true, mount ROOT read-only and make it an overlay with a writable tmpfs using +the kernel built-in overlayfs. FLAGS and OPTIONS indicates the options to use to mount ROOT." (if volatile-root? @@ -384,7 +384,7 @@ (define* (mount-root-file-system root type "lowerdir=/real-root,upperdir=/rw-root/upper,workdir=/rw-root/work")) (begin (check-file-system root type) - (mount root "/root" type 0 options))) + (mount root "/root" type flags options))) ;; Make sure /root/etc/mtab is a symlink to /proc/self/mounts. (false-if-exception @@ -474,6 +474,13 @@ (define root-fs-type mounts) "ext4")) + (define root-fs-flags + (mount-flags->bit-mask (or (any (lambda (fs) + (and (root-mount-point? fs) + (file-system-flags fs))) + mounts) + '()))) + (define root-fs-options (any (lambda (fs) (and (root-mount-point? fs) @@ -533,6 +540,7 @@ (define root-fs-options (mount-root-file-system (canonicalize-device-spec root) root-fs-type #:volatile-root? volatile-root? + #:flags root-fs-flags #:options root-fs-options)) (mount "none" "/root" "tmpfs")) -- cgit v1.2.3 From 12c1afcdbdc984c760d00932bce64288b385bbc9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 4 Dec 2019 22:05:31 +0100 Subject: serialization: Add 'fold-archive'. * guix/serialization.scm (read-contents): Remove. (read-file-type, fold-archive): New procedures. (restore-file): Rewrite in terms of 'fold-archive'. * tests/nar.scm ("write-file-tree + fold-archive") ("write-file-tree + fold-archive, flat file"): New tests. --- guix/serialization.scm | 134 +++++++++++++++++++++++++++++-------------------- tests/nar.scm | 74 +++++++++++++++++++++++++++ 2 files changed, 153 insertions(+), 55 deletions(-) diff --git a/guix/serialization.scm b/guix/serialization.scm index e14b7d1b9f..cf263d321e 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -48,6 +48,7 @@ (define-module (guix serialization) write-file write-file-tree + fold-archive restore-file)) ;;; Comment: @@ -226,38 +227,25 @@ (define (write-contents-from-port input output size) (dump input output size)) (write-padding size output)) -(define (read-contents in out) - "Read the contents of a file from the Nar at IN, write it to OUT, and return -the size in bytes." - (define executable? - (match (read-string in) - ("contents" - #f) - ("executable" - (match (list (read-string in) (read-string in)) - (("" "contents") #t) - (x (raise - (condition (&message - (message "unexpected executable file marker")) - (&nar-read-error (port in) - (file #f) - (token x)))))) - #t) - (x - (raise - (condition (&message (message "unsupported nar file type")) - (&nar-read-error (port in) (file #f) (token x))))))) - - (let ((size (read-long-long in))) - ;; Note: `sendfile' cannot be used here because of port buffering on IN. - (dump in out size) - - (when executable? - (chmod out #o755)) - (let ((m (modulo size 8))) - (unless (zero? m) - (get-bytevector-n* in (- 8 m)))) - size)) +(define (read-file-type port) + "Read the file type tag from PORT, and return either 'regular or +'executable." + (match (read-string port) + ("contents" + 'regular) + ("executable" + (match (list (read-string port) (read-string port)) + (("" "contents") 'executable) + (x (raise + (condition (&message + (message "unexpected executable file marker")) + (&nar-read-error (port port) + (file #f) + (token x))))))) + (x + (raise + (condition (&message (message "unsupported nar file type")) + (&nar-read-error (port port) (file #f) (token x))))))) (define %archive-version-1 ;; Magic cookie for Nix archives. @@ -383,9 +371,14 @@ (define-values (type size) (define port-conversion-strategy (fluid->parameter %default-port-conversion-strategy)) -(define (restore-file port file) - "Read a file (possibly a directory structure) in Nar format from PORT. -Restore it as FILE." +(define (fold-archive proc seed port file) + "Read a file (possibly a directory structure) in Nar format from PORT. Call +PROC on each file or directory read from PORT using: + + (PROC FILE TYPE CONTENTS RESULT) + +using SEED as the first RESULT. TYPE is a symbol like 'regular, and CONTENTS +depends on TYPE." (parameterize ((currently-restored-file file) ;; Error out if we can convert file names to the current @@ -401,7 +394,8 @@ (define (restore-file port file) (token signature) (file #f)))))) - (let restore ((file file)) + (let read ((file file) + (result seed)) (define (read-eof-marker) (match (read-string port) (")" #t) @@ -414,40 +408,49 @@ (define (read-eof-marker) (match (list (read-string port) (read-string port) (read-string port)) (("(" "type" "regular") - (call-with-output-file file (cut read-contents port <>)) - (read-eof-marker)) + (let* ((type (read-file-type port)) + (size (read-long-long port)) + + ;; The caller must read exactly SIZE bytes from PORT. + (result (proc file type `(,port . ,size) result))) + (let ((m (modulo size 8))) + (unless (zero? m) + (get-bytevector-n* port (- 8 m)))) + (read-eof-marker) + result)) (("(" "type" "symlink") (match (list (read-string port) (read-string port)) (("target" target) - (symlink target file) - (read-eof-marker)) + (let ((result (proc file 'symlink target result))) + (read-eof-marker) + result)) (x (raise (condition (&message (message "invalid symlink tokens")) (&nar-read-error (port port) (file file) (token x))))))) (("(" "type" "directory") (let ((dir file)) - (mkdir dir) - (let loop ((prefix (read-string port))) + (let loop ((prefix (read-string port)) + (result (proc file 'directory #f result))) (match prefix ("entry" (match (list (read-string port) (read-string port) (read-string port) (read-string port)) (("(" "name" file "node") - (restore (string-append dir "/" file)) - (match (read-string port) - (")" #t) - (x - (raise - (condition - (&message - (message "unexpected directory entry termination")) - (&nar-read-error (port port) - (file file) - (token x)))))) - (loop (read-string port))))) - (")" #t) ; done with DIR + (let ((result (read (string-append dir "/" file) result))) + (match (read-string port) + (")" #f) + (x + (raise + (condition + (&message + (message "unexpected directory entry termination")) + (&nar-read-error (port port) + (file file) + (token x)))))) + (loop (read-string port) result))))) + (")" result) ;done with DIR (x (raise (condition @@ -459,6 +462,27 @@ (define (read-eof-marker) (&message (message "unsupported nar entry type")) (&nar-read-error (port port) (file file) (token x))))))))) +(define (restore-file port file) + "Read a file (possibly a directory structure) in Nar format from PORT. +Restore it as FILE." + (fold-archive (lambda (file type content result) + (match type + ('directory + (mkdir file)) + ('symlink + (symlink content file)) + ((or 'regular 'executable) + (match content + ((input . size) + (call-with-output-file file + (lambda (output) + (dump input output size) + (when (eq? type 'executable) + (chmod output #o755))))))))) + #t + port + file)) + ;;; Local Variables: ;;; eval: (put 'call-with-binary-input-file 'scheme-indent-function 1) ;;; End: diff --git a/tests/nar.scm b/tests/nar.scm index bfc71c69a8..aeff3d3330 100644 --- a/tests/nar.scm +++ b/tests/nar.scm @@ -214,6 +214,80 @@ (define-values (port get-bytevector) (lambda () (false-if-exception (rm-rf %test-dir)))))) +(test-equal "write-file-tree + fold-archive" + '(("R" directory #f) + ("R/dir" directory #f) + ("R/dir/exe" executable "1234") + ("R/foo" regular "abcdefg") + ("R/lnk" symlink "foo")) + + (let () + (define-values (port get-bytevector) + (open-bytevector-output-port)) + (write-file-tree "root" port + #:file-type+size + (match-lambda + ("root" + (values 'directory 0)) + ("root/foo" + (values 'regular 7)) + ("root/lnk" + (values 'symlink 0)) + ("root/dir" + (values 'directory 0)) + ("root/dir/exe" + (values 'executable 4))) + #:file-port + (match-lambda + ("root/foo" (open-input-string "abcdefg")) + ("root/dir/exe" (open-input-string "1234"))) + #:symlink-target + (match-lambda + ("root/lnk" "foo")) + #:directory-entries + (match-lambda + ("root" '("foo" "dir" "lnk")) + ("root/dir" '("exe")))) + (close-port port) + + (reverse + (fold-archive (lambda (file type contents result) + (let ((contents (if (memq type '(regular executable)) + (utf8->string + (get-bytevector-n (car contents) + (cdr contents))) + contents))) + (cons `(,file ,type ,contents) + result))) + '() + (open-bytevector-input-port (get-bytevector)) + "R")))) + +(test-equal "write-file-tree + fold-archive, flat file" + '(("R" regular "abcdefg")) + + (let () + (define-values (port get-bytevector) + (open-bytevector-output-port)) + (write-file-tree "root" port + #:file-type+size + (match-lambda + ("root" (values 'regular 7))) + #:file-port + (match-lambda + ("root" (open-input-string "abcdefg")))) + (close-port port) + + (reverse + (fold-archive (lambda (file type contents result) + (let ((contents (utf8->string + (get-bytevector-n (car contents) + (cdr contents))))) + (cons `(,file ,type ,contents) result))) + '() + (open-bytevector-input-port (get-bytevector)) + "R")))) + (test-assert "write-file supports non-file output ports" (let ((input (string-append (dirname (search-path %load-path "guix.scm")) "/guix")) -- cgit v1.2.3 From 044277f610b02c3821afa0afdc2b2b140bb92cb4 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 4 Dec 2019 22:54:05 +0100 Subject: guix archive: Add '--list'. * guix/scripts/archive.scm (show-help, %options): Add '--list'. (list-contents): New procedure. (guix-archive): Honor the '--list' option. * tests/guix-archive.sh: Test it. * doc/guix.texi (Invoking guix archive): Document it. --- doc/guix.texi | 12 ++++++++++++ guix/scripts/archive.scm | 45 ++++++++++++++++++++++++++++++++++++++++++++- tests/guix-archive.sh | 7 ++++++- 3 files changed, 62 insertions(+), 2 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 01980bf2d3..cb51878004 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -4598,6 +4598,18 @@ unsafe. The primary purpose of this operation is to facilitate inspection of archive contents coming from possibly untrusted substitute servers. +@item --list +@itemx -t +Read a single-item archive as served by substitute servers +(@pxref{Substitutes}) and print the list of files it contains, as in +this example: + +@example +$ wget -O - \ + https://@value{SUBSTITUTE-SERVER}/nar/lzip/@dots{}-emacs-26.3 \ + | lzip -d | guix archive -t +@end example + @end table diff --git a/guix/scripts/archive.scm b/guix/scripts/archive.scm index 3318ef0889..2b4d39c7b8 100644 --- a/guix/scripts/archive.scm +++ b/guix/scripts/archive.scm @@ -21,7 +21,8 @@ (define-module (guix scripts archive) #:use-module (guix utils) #:use-module (guix combinators) #:use-module ((guix build utils) #:select (mkdir-p)) - #:use-module ((guix serialization) #:select (restore-file)) + #:use-module ((guix serialization) + #:select (fold-archive restore-file)) #:use-module (guix store) #:use-module ((guix status) #:select (with-status-verbosity)) #:use-module (guix grafts) @@ -43,6 +44,7 @@ (define-module (guix scripts archive) #:use-module (srfi srfi-26) #:use-module (srfi srfi-37) #:use-module (ice-9 binary-ports) + #:use-module (rnrs bytevectors) #:export (guix-archive options->derivations+files)) @@ -76,6 +78,8 @@ (define (show-help) --missing print the files from stdin that are missing")) (display (G_ " -x, --extract=DIR extract the archive on stdin to DIR")) + (display (G_ " + -t, --list list the files in the archive on stdin")) (newline) (display (G_ " --generate-key[=PARAMETERS] @@ -137,6 +141,9 @@ (define %options (option '("extract" #\x) #t #f (lambda (opt name arg result) (alist-cons 'extract arg result))) + (option '("list" #\t) #f #f + (lambda (opt name arg result) + (alist-cons 'list #t result))) (option '("generate-key") #f #t (lambda (opt name arg result) (catch 'gcry-error @@ -319,6 +326,40 @@ (define (read-key) (with-atomic-file-output %acl-file (cut write-acl acl <>))))) +(define (list-contents port) + "Read a nar from PORT and print the list of files it contains to the current +output port." + (define (consume-input port size) + (let ((bv (make-bytevector 32768))) + (let loop ((total size)) + (unless (zero? total) + (let ((n (get-bytevector-n! port bv 0 + (min total (bytevector-length bv))))) + (loop (- total n))))))) + + (fold-archive (lambda (file type content result) + (match type + ('directory + (format #t "D ~a~%" file)) + ('symlink + (format #t "S ~a -> ~a~%" file content)) + ((or 'regular 'executable) + (match content + ((input . size) + (format #t "~a ~60a ~10h B~%" + (if (eq? type 'executable) + "x" "r") + file size) + (consume-input input size)))))) + #t + port + "")) + + +;;; +;;; Entry point. +;;; + (define (guix-archive . args) (define (lines port) ;; Return lines read from PORT. @@ -353,6 +394,8 @@ (define (lines port) (missing (remove (cut valid-path? store <>) files))) (format #t "~{~a~%~}" missing))) + ((assoc-ref opts 'list) + (list-contents (current-input-port))) ((assoc-ref opts 'extract) => (lambda (target) diff --git a/tests/guix-archive.sh b/tests/guix-archive.sh index fdaeb98ad2..4c5eea05cf 100644 --- a/tests/guix-archive.sh +++ b/tests/guix-archive.sh @@ -1,5 +1,5 @@ # GNU Guix --- Functional package management for GNU -# Copyright © 2013, 2014, 2015 Ludovic Courtès +# Copyright © 2013, 2014, 2015, 2019 Ludovic Courtès # # This file is part of GNU Guix. # @@ -74,5 +74,10 @@ guix archive -x "$tmpdir" < "$archive" test -x "$tmpdir/bin/guile" test -d "$tmpdir/lib/guile" +# Check '--list'. +guix archive -t < "$archive" | grep "^D /share/guile" +guix archive -t < "$archive" | grep "^x /bin/guile" +guix archive -t < "$archive" | grep "^r /share/guile.*/boot-9\.scm" + if echo foo | guix archive --authorize then false; else true; fi -- cgit v1.2.3 From 4736d06f78e09883bdd24186c396cdd4e6a74a6f Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 4 Dec 2019 23:07:03 +0100 Subject: challenge: Report the best narinfo URI. * guix/scripts/substitute.scm (select-uri): Rename to... (narinfo-best-uri): ... this, and make public. Update callers. * guix/scripts/challenge.scm (summarize-report): Use 'narinfo-best-uri' instead of (first (narinfo-uris ...)). --- guix/scripts/challenge.scm | 2 +- guix/scripts/substitute.scm | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm index 17e87f0291..aabb2ee549 100644 --- a/guix/scripts/challenge.scm +++ b/guix/scripts/challenge.scm @@ -192,7 +192,7 @@ (define (report-hashes item local narinfos) (report (G_ " no local build for '~a'~%") item)) (for-each (lambda (narinfo) (report (G_ " ~50a: ~a~%") - (uri->string (first (narinfo-uris narinfo))) + (uri->string (narinfo-best-uri narinfo)) (hash->string (narinfo-hash->sha256 (narinfo-hash narinfo))))) narinfos)) diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index b6034a75d2..4802fbd1fe 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -80,6 +80,7 @@ (define-module (guix scripts substitute) narinfo-signature narinfo-hash->sha256 + narinfo-best-uri lookup-narinfos lookup-narinfos/diverse @@ -913,7 +914,7 @@ (define (display-narinfo-data narinfo) (for-each (cute format #t "~a/~a~%" (%store-prefix) <>) (narinfo-references narinfo)) - (let-values (((uri compression file-size) (select-uri narinfo))) + (let-values (((uri compression file-size) (narinfo-best-uri narinfo))) (format #t "~a\n~a\n" (or file-size 0) (or (narinfo-size narinfo) 0)))) @@ -967,7 +968,7 @@ (define (compresses-better? compression1 compression2) (_ (or (string=? compression2 "none") (string=? compression2 "gzip"))))) -(define (select-uri narinfo) +(define (narinfo-best-uri narinfo) "Select the \"best\" URI to download NARINFO's nar, and return three values: the URI, its compression method (a string), and the compressed file size." (define choices @@ -1008,7 +1009,7 @@ (define narinfo store-item)) (let-values (((uri compression file-size) - (select-uri narinfo))) + (narinfo-best-uri narinfo))) ;; Tell the daemon what the expected hash of the Nar itself is. (format #t "~a~%" (narinfo-hash narinfo)) -- cgit v1.2.3 From 1d9a4456a83a197a47bf2bdebc6b60ae78e00cfc Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 6 Dec 2019 00:20:54 +0100 Subject: serialization: Remove unused procedure. * guix/serialization.scm (write-contents): Remove. --- guix/serialization.scm | 18 ------------------ 1 file changed, 18 deletions(-) diff --git a/guix/serialization.scm b/guix/serialization.scm index cf263d321e..f793feb53d 100644 --- a/guix/serialization.scm +++ b/guix/serialization.scm @@ -199,24 +199,6 @@ (define buf (make-bytevector buf-size)) (put-bytevector out buf 0 read) (loop (- left read)))))))) -(define (write-contents file p size) - "Write SIZE bytes from FILE to output port P." - (define (call-with-binary-input-file file proc) - ;; Open FILE as a binary file. This avoids scan-for-encoding, and thus - ;; avoids any initial buffering. Disable file name canonicalization to - ;; avoid stat'ing like crazy. - (with-fluids ((%file-port-name-canonicalization #f)) - (let ((port (open-file file "rb"))) - (dynamic-wind - (const #t) - (cut proc port) - (lambda () - (close-port port)))))) - - (call-with-binary-input-file file - (lambda (input) - (write-contents-from-port input p size)))) - (define (write-contents-from-port input output size) "Write SIZE bytes from port INPUT to port OUTPUT." (write-string "contents" output) -- cgit v1.2.3 From 22f06a212879369bd1d7f3aa5b19f8f89a8c6693 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Fri, 6 Dec 2019 00:40:41 +0100 Subject: progress: Add 'progress-report-port'. * guix/scripts/substitute.scm (progress-report-port): Move to... * guix/progress.scm (progress-report-port): ... here. New procedure. --- guix/progress.scm | 31 +++++++++++++++++++++++++++++++ guix/scripts/substitute.scm | 29 ----------------------------- 2 files changed, 31 insertions(+), 29 deletions(-) diff --git a/guix/progress.scm b/guix/progress.scm index 349637dbcf..c7567a35fd 100644 --- a/guix/progress.scm +++ b/guix/progress.scm @@ -40,6 +40,7 @@ (define-module (guix progress) progress-reporter/file progress-reporter/bar progress-reporter/trace + progress-report-port display-download-progress erase-current-line @@ -342,3 +343,33 @@ (define buffer (put-bytevector out buffer 0 bytes) (report total) (loop total (get-bytevector-n! in buffer 0 buffer-size)))))))) + +(define (progress-report-port reporter port) + "Return a port that continuously reports the bytes read from PORT using +REPORTER, which should be a object." + (match reporter + (($ start report stop) + (let* ((total 0) + (read! (lambda (bv start count) + (let ((n (match (get-bytevector-n! port bv start count) + ((? eof-object?) 0) + (x x)))) + (set! total (+ total n)) + (report total) + n)))) + (start) + (make-custom-binary-input-port "progress-port-proc" + read! #f #f + (lambda () + ;; XXX: Kludge! When used through + ;; 'decompressed-port', this port ends + ;; up being closed twice: once in a + ;; child process early on, and at the + ;; end in the parent process. Ignore + ;; the early close so we don't output + ;; a spurious "download-succeeded" + ;; trace. + (unless (zero? total) + (stop)) + (close-port port))))))) + diff --git a/guix/scripts/substitute.scm b/guix/scripts/substitute.scm index 4802fbd1fe..7eca2c6874 100755 --- a/guix/scripts/substitute.scm +++ b/guix/scripts/substitute.scm @@ -823,35 +823,6 @@ (define* (cached-narinfo-files #:optional (= (string-length file) 32))))) (narinfo-cache-directories directory))) -(define (progress-report-port reporter port) - "Return a port that continuously reports the bytes read from PORT using -REPORTER, which should be a object." - (match reporter - (($ start report stop) - (let* ((total 0) - (read! (lambda (bv start count) - (let ((n (match (get-bytevector-n! port bv start count) - ((? eof-object?) 0) - (x x)))) - (set! total (+ total n)) - (report total) - n)))) - (start) - (make-custom-binary-input-port "progress-port-proc" - read! #f #f - (lambda () - ;; XXX: Kludge! When used through - ;; 'decompressed-port', this port ends - ;; up being closed twice: once in a - ;; child process early on, and at the - ;; end in the parent process. Ignore - ;; the early close so we don't output - ;; a spurious "download-succeeded" - ;; trace. - (unless (zero? total) - (stop)) - (close-port port))))))) - (define-syntax with-networking (syntax-rules () "Catch DNS lookup errors and TLS errors and gracefully exit." -- cgit v1.2.3 From 5208db3a526e3fcdb8473d9bab8afe498c5f3f76 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 7 Dec 2019 15:10:39 +0100 Subject: challenge: Add "--diff". * guix/scripts/challenge.scm (dump-port*): New variable. (archive-contents, store-item-contents, narinfo-contents) (differing-files, report-differing-files): New procedures. (summarize-report): Add #:report-differences and call it. (show-help, %options): Add "--diff". (%default-options): Add 'difference-report' key. (report-differing-files): Parameterize CURRENT-TERMINAL-COLUMNS and pass #:report-differences to 'summarize-report'. * guix/tests/http.scm (%local-url): Add optional argument. (call-with-http-server): Fix docstring typo. * tests/challenge.scm (query-path-size, make-narinfo): New procedures. ("differing-files"): New test. * doc/guix.texi (Invoking guix challenge): Document "--diff". --- doc/guix.texi | 24 +++++++ guix/scripts/challenge.scm | 156 +++++++++++++++++++++++++++++++++++++++++++-- guix/tests/http.scm | 6 +- tests/challenge.scm | 67 ++++++++++++++++++- 4 files changed, 242 insertions(+), 11 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index cb51878004..80d67a44fa 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10321,14 +10321,23 @@ updating list of substitutes from 'https://guix.example.org'... 100.0% local hash: 0725l22r5jnzazaacncwsvp9kgf42266ayyp814v7djxs7nk963q https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-openssl-1.0.2d: 0725l22r5jnzazaacncwsvp9kgf42266ayyp814v7djxs7nk963q https://guix.example.org/nar/@dots{}-openssl-1.0.2d: 1zy4fmaaqcnjrzzajkdn3f5gmjk754b43qkq47llbyak9z0qjyim + differing files: + /lib/libcrypto.so.1.1 + /lib/libssl.so.1.1 + /gnu/store/@dots{}-git-2.5.0 contents differ: local hash: 00p3bmryhjxrhpn2gxs2fy0a15lnip05l97205pgbk5ra395hyha https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-git-2.5.0: 069nb85bv4d4a6slrwjdy8v1cn4cwspm3kdbmyb81d6zckj3nq9f https://guix.example.org/nar/@dots{}-git-2.5.0: 0mdqa9w1p6cmli6976v4wi0sw9r4p5prkj7lzfd1877wk11c9c73 + differing file: + /libexec/git-core/git-fsck + /gnu/store/@dots{}-pius-2.1.1 contents differ: local hash: 0k4v3m9z1zp8xzzizb7d8kjj72f9172xv078sq4wl73vnq9ig3ax https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-pius-2.1.1: 0k4v3m9z1zp8xzzizb7d8kjj72f9172xv078sq4wl73vnq9ig3ax https://guix.example.org/nar/@dots{}-pius-2.1.1: 1cy25x1a4fzq5rk0pmvc8xhwyffnqz95h2bpvqsz2mpvlbccy0gs + differing file: + /share/man/man1/pius.1.gz @dots{} @@ -10414,6 +10423,21 @@ The one option that matters is: Consider @var{urls} the whitespace-separated list of substitute source URLs to compare to. +@item --diff=@var{mode} +Upon mismatches, show differences according to @var{mode}, one of: + +@table @asis +@item @code{simple} (the default) +Show the list of files that differ. + +@item @code{none} +Do not show further details about the differences. +@end table + +Thus, unless @code{--diff=none} is passed, @command{guix challenge} +downloads the store items from the given substitute servers so that it +can compare them. + @item --verbose @itemx -v Show details about matches (identical contents) in addition to diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm index aabb2ee549..277eec9a5d 100644 --- a/guix/scripts/challenge.scm +++ b/guix/scripts/challenge.scm @@ -25,17 +25,23 @@ (define-module (guix scripts challenge) #:use-module (guix monads) #:use-module (guix base32) #:use-module (guix packages) + #:use-module (guix progress) #:use-module (guix serialization) #:use-module (guix scripts substitute) #:use-module (rnrs bytevectors) + #:autoload (guix http-client) (http-fetch) + #:use-module ((guix build syscalls) #:select (terminal-columns)) + #:use-module (gcrypt hash) #:use-module (srfi srfi-1) #:use-module (srfi srfi-9) + #:use-module (srfi srfi-11) #:use-module (srfi srfi-26) #:use-module (srfi srfi-34) #:use-module (srfi srfi-37) #:use-module (ice-9 match) #:use-module (ice-9 vlist) #:use-module (ice-9 format) + #:use-module (ice-9 ftw) #:use-module (web uri) #:export (compare-contents @@ -49,6 +55,8 @@ (define-module (guix scripts challenge) comparison-report-mismatch? comparison-report-inconclusive? + differing-files + guix-challenge)) ;;; Commentary: @@ -179,13 +187,128 @@ (define (select-reference item narinfos urls) items local)))) + +;;; +;;; Reporting. +;;; + +(define dump-port* ;FIXME: deduplicate + (@@ (guix serialization) dump)) + +(define (port-sha256* port size) + ;; Like 'port-sha256', but limited to SIZE bytes. + (let-values (((out get) (open-sha256-port))) + (dump-port* port out size) + (close-port out) + (get))) + +(define (archive-contents port) + "Return a list representing the files contained in the nar read from PORT." + (fold-archive (lambda (file type contents result) + (match type + ((or 'regular 'executable) + (match contents + ((port . size) + (cons `(,file ,type ,(port-sha256* port size)) + result)))) + ('directory result) + ('symlink + (cons `(,file ,type ,contents) result)))) + '() + port + "")) + +(define (store-item-contents item) + "Return a list of files and contents for ITEM in the same format as +'archive-contents'." + (file-system-fold (const #t) ;enter? + (lambda (file stat result) ;leaf + (define short + (string-drop file (string-length item))) + + (match (stat:type stat) + ('regular + (let ((size (stat:size stat)) + (type (if (zero? (logand (stat:mode stat) + #o100)) + 'regular + 'executable))) + (cons `(,short ,type + ,(call-with-input-file file + (cut port-sha256* <> size))) + result))) + ('symlink + (cons `(,short symlink ,(readlink file)) + result)))) + (lambda (directory stat result) result) ;down + (lambda (directory stat result) result) ;up + (lambda (file stat result) result) ;skip + (lambda (file stat errno result) result) ;error + '() + item + lstat)) + +(define (narinfo-contents narinfo) + "Fetch the nar described by NARINFO and return a list representing the file +it contains." + (let*-values (((uri compression size) + (narinfo-best-uri narinfo)) + ((port response) + (http-fetch uri))) + (define reporter + (progress-reporter/file (narinfo-path narinfo) size + #:abbreviation (const (uri-host uri)))) + + (define result + (call-with-decompressed-port (string->symbol compression) + (progress-report-port reporter port) + archive-contents)) + + (close-port port) + (erase-current-line (current-output-port)) + result)) + +(define (differing-files comparison-report) + "Return a list of files that differ among the nars and possibly the local +store item specified in COMPARISON-REPORT." + (define contents + (map narinfo-contents + (comparison-report-narinfos comparison-report))) + + (define local-contents + (and (comparison-report-local-sha256 comparison-report) + (store-item-contents (comparison-report-item comparison-report)))) + + (match (apply lset-difference equal? + (take (delete-duplicates + (if local-contents + (cons local-contents contents) + contents)) + 2)) + (((files _ ...) ...) + files))) + +(define (report-differing-files comparison-report) + "Report differences among the nars and possibly the local store item +specified in COMPARISON-REPORT." + (match (differing-files comparison-report) + (() + #t) + ((files ...) + (format #t (N_ " differing file:~%" + " differing files:~%" + (length files))) + (format #t "~{ ~a~%~}" files)))) + (define* (summarize-report comparison-report #:key + (report-differences (const #f)) (hash->string bytevector->nix-base32-string) verbose?) - "Write to the current error port a summary of REPORT, a -object. When VERBOSE?, display matches in addition to mismatches and -inconclusive reports." + "Write to the current error port a summary of COMPARISON-REPORT, a + object. When VERBOSE?, display matches in addition to +mismatches and inconclusive reports. Upon mismatch, call REPORT-DIFFERENCES +with COMPARISON-REPORT." (define (report-hashes item local narinfos) (if local (report (G_ " local hash: ~a~%") (hash->string local)) @@ -200,7 +323,8 @@ (define (report-hashes item local narinfos) (match comparison-report (($ item 'mismatch local (narinfos ...)) (report (G_ "~a contents differ:~%") item) - (report-hashes item local narinfos)) + (report-hashes item local narinfos) + (report-differences comparison-report)) (($ item 'inconclusive #f narinfos) (warning (G_ "could not challenge '~a': no local build~%") item)) (($ item 'inconclusive locals ()) @@ -237,6 +361,8 @@ (define (show-help) compare build results with those at URLS")) (display (G_ " -v, --verbose show details about successful comparisons")) + (display (G_ " + --diff=MODE show differences according to MODE")) (newline) (display (G_ " -h, --help display this help and exit")) @@ -254,6 +380,18 @@ (define %options (lambda args (show-version-and-exit "guix challenge"))) + (option '("diff") #t #f + (lambda (opt name arg result . rest) + (define mode + (match arg + ("none" (const #t)) + ("simple" report-differing-files) + (_ (leave (G_ "~a: unknown diff mode~%") arg)))) + + (apply values + (alist-cons 'difference-report mode result) + rest))) + (option '("substitute-urls") #t #f (lambda (opt name arg result . rest) (apply values @@ -269,7 +407,8 @@ (define %options (define %default-options `((system . ,(%current-system)) - (substitute-urls . ,%default-substitute-urls))) + (substitute-urls . ,%default-substitute-urls) + (difference-report . ,report-differing-files))) ;;; @@ -286,12 +425,14 @@ (define (guix-challenge . args) opts)) (system (assoc-ref opts 'system)) (urls (assoc-ref opts 'substitute-urls)) + (diff (assoc-ref opts 'difference-report)) (verbose? (assoc-ref opts 'verbose?))) (leave-on-EPIPE (with-store store ;; Disable grafts since substitute servers normally provide only ;; ungrafted stuff. - (parameterize ((%graft? #f)) + (parameterize ((%graft? #f) + (current-terminal-columns (terminal-columns))) (let ((files (match files (() (filter (cut locally-built? store <>) @@ -305,7 +446,8 @@ (define (guix-challenge . args) (mlet* %store-monad ((items (mapm %store-monad ensure-store-item files)) (reports (compare-contents items urls))) - (for-each (cut summarize-report <> #:verbose? verbose?) + (for-each (cut summarize-report <> #:verbose? verbose? + #:report-differences diff) reports) (report "\n") (summarize-report-list reports) diff --git a/guix/tests/http.scm b/guix/tests/http.scm index 05ce39bca2..4119e9ce01 100644 --- a/guix/tests/http.scm +++ b/guix/tests/http.scm @@ -65,14 +65,14 @@ (define (http-server-can-listen?) (close-port socket) #t))) -(define (%local-url) +(define* (%local-url #:optional (port (%http-server-port))) ;; URL to use for 'home-page' tests. - (string-append "http://localhost:" (number->string (%http-server-port)) + (string-append "http://localhost:" (number->string port) "/foo/bar")) (define* (call-with-http-server responses+data thunk) "Call THUNK with an HTTP server running and returning RESPONSES+DATA on HTTP -requests. Each elements of RESPONSES+DATA must be a tuple containing a +requests. Each element of RESPONSES+DATA must be a tuple containing a response and a string, or an HTTP response code and a string." (define responses (map (match-lambda diff --git a/tests/challenge.scm b/tests/challenge.scm index c962800f3f..a2782abcbd 100644 --- a/tests/challenge.scm +++ b/tests/challenge.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2015, 2017 Ludovic Courtès +;;; Copyright © 2015, 2017, 2019 Ludovic Courtès ;;; ;;; This file is part of GNU Guix. ;;; @@ -18,22 +18,32 @@ (define-module (test-challenge) #:use-module (guix tests) + #:use-module (guix tests http) #:use-module (gcrypt hash) #:use-module (guix store) #:use-module (guix monads) #:use-module (guix derivations) + #:use-module (guix serialization) + #:use-module (guix packages) #:use-module (guix gexp) + #:use-module (guix base32) #:use-module (guix scripts challenge) #:use-module (guix scripts substitute) + #:use-module (gnu packages bootstrap) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) #:use-module (srfi srfi-64) #:use-module (rnrs bytevectors) + #:use-module (rnrs io ports) #:use-module (ice-9 match)) (define query-path-hash* (store-lift query-path-hash)) +(define (query-path-size item) + (mlet %store-monad ((info (query-path-info* item))) + (return (path-info-nar-size info)))) + (define* (call-with-derivation-narinfo* drv thunk hash) (lambda (store) (with-derivation-narinfo drv (sha256 => hash) @@ -138,7 +148,62 @@ (define-syntax with-derivation-narinfo* (bytevector=? (narinfo-hash->sha256 (narinfo-hash narinfo)) hash)))))))))))) +(define (make-narinfo item size hash) + (format #f "StorePath: ~a +Compression: none +URL: nar/aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa-foo +NarSize: ~d +NarHash: sha256:~a +References: ~%" item size (bytevector->nix-base32-string hash))) +(test-assertm "differing-files" + ;; Pretend we have two different results for the same store item, ITEM, + ;; with "/bin/guile" differing between the two nars, and make sure + ;; 'differing-files' returns it. + (mlet* %store-monad + ((drv1 (package->derivation %bootstrap-guile)) + (drv2 (gexp->derivation + "broken-guile" + (with-imported-modules '((guix build utils)) + #~(begin + (use-modules (guix build utils)) + (copy-recursively #$drv1 #$output) + (chmod (string-append #$output "/bin/guile") + #o755) + (call-with-output-file (string-append + #$output + "/bin/guile") + (lambda (port) + (display "corrupt!" port))))))) + (out1 -> (derivation->output-path drv1)) + (out2 -> (derivation->output-path drv2)) + (item -> (string-append (%store-prefix) "/" + (make-string 32 #\a) "-foo"))) + (mbegin %store-monad + (built-derivations (list drv1 drv2)) + (mlet* %store-monad ((size1 (query-path-size out1)) + (size2 (query-path-size out2)) + (hash1 (query-path-hash* out1)) + (hash2 (query-path-hash* out2)) + (nar1 -> (call-with-bytevector-output-port + (lambda (port) + (write-file out1 port)))) + (nar2 -> (call-with-bytevector-output-port + (lambda (port) + (write-file out2 port))))) + (parameterize ((%http-server-port 9000)) + (with-http-server `((200 ,(make-narinfo item size1 hash1)) + (200 ,nar1)) + (parameterize ((%http-server-port 9001)) + (with-http-server `((200 ,(make-narinfo item size2 hash2)) + (200 ,nar2)) + (mlet* %store-monad ((urls -> (list (%local-url 9000) + (%local-url 9001))) + (reports (compare-contents (list item) + urls))) + (pk 'report reports) + (return (equal? (differing-files (car reports)) + '("/bin/guile")))))))))))) (test-end) -- cgit v1.2.3 From 828a39da68a9169ef1d9f9ff02a1c66b1bcbe884 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Sat, 7 Dec 2019 17:37:08 +0100 Subject: challenge: Support "--diff=diffoscope". * guix/scripts/challenge.scm (call-with-nar): New procedure. (narinfo-contents): Express in terms of 'call-with-nar'. (call-with-mismatches, report-differing-files/external): New procedures. (%diffoscope-command): New variable. (%options): Support "diffoscope" and a string starting with "/". * tests/challenge.scm (call-mismatch-test): New procedure. ("differing-files"): Rewrite in terms of 'call-mismatch-test'. ("call-with-mismatches"): New test. * doc/guix.texi (Invoking guix challenge): Document it. --- doc/guix.texi | 24 ++++++++++++++-- guix/scripts/challenge.scm | 70 +++++++++++++++++++++++++++++++++++++++++++--- tests/challenge.scm | 51 +++++++++++++++++++++++++-------- 3 files changed, 128 insertions(+), 17 deletions(-) diff --git a/doc/guix.texi b/doc/guix.texi index 80d67a44fa..a5cff4cab2 100644 --- a/doc/guix.texi +++ b/doc/guix.texi @@ -10366,8 +10366,20 @@ results, the inclusion of random numbers, and directory listings sorted by inode number. See @uref{https://reproducible-builds.org/docs/}, for more information. -To find out what is wrong with this Git binary, we can do something along -these lines (@pxref{Invoking guix archive}): +To find out what is wrong with this Git binary, the easiest approach is +to run: + +@example +guix challenge git \ + --diff=diffoscope \ + --substitute-urls="https://@value{SUBSTITUTE-SERVER} https://guix.example.org" +@end example + +This automatically invokes @command{diffoscope}, which displays detailed +information about files that differ. + +Alternately, we can do something along these lines (@pxref{Invoking guix +archive}): @example $ wget -q -O - https://@value{SUBSTITUTE-SERVER}/nar/@dots{}-git-2.5.0 \ @@ -10430,6 +10442,14 @@ Upon mismatches, show differences according to @var{mode}, one of: @item @code{simple} (the default) Show the list of files that differ. +@item @code{diffoscope} +@itemx @var{command} +Invoke @uref{https://diffoscope.org/, Diffoscope}, passing it +two directories whose contents do not match. + +When @var{command} is an absolute file name, run @var{command} instead +of Diffoscope. + @item @code{none} Do not show further details about the differences. @end table diff --git a/guix/scripts/challenge.scm b/guix/scripts/challenge.scm index 277eec9a5d..51e8d3e4e3 100644 --- a/guix/scripts/challenge.scm +++ b/guix/scripts/challenge.scm @@ -56,6 +56,7 @@ (define-module (guix scripts challenge) comparison-report-inconclusive? differing-files + call-with-mismatches guix-challenge)) @@ -248,9 +249,9 @@ (define short item lstat)) -(define (narinfo-contents narinfo) - "Fetch the nar described by NARINFO and return a list representing the file -it contains." +(define (call-with-nar narinfo proc) + "Call PROC with an input port from which it can read the nar pointed to by +NARINFO." (let*-values (((uri compression size) (narinfo-best-uri narinfo)) ((port response) @@ -262,12 +263,17 @@ (define reporter (define result (call-with-decompressed-port (string->symbol compression) (progress-report-port reporter port) - archive-contents)) + proc)) (close-port port) (erase-current-line (current-output-port)) result)) +(define (narinfo-contents narinfo) + "Fetch the nar described by NARINFO and return a list representing the file +it contains." + (call-with-nar narinfo archive-contents)) + (define (differing-files comparison-report) "Return a list of files that differ among the nars and possibly the local store item specified in COMPARISON-REPORT." @@ -300,6 +306,58 @@ (define (report-differing-files comparison-report) (length files))) (format #t "~{ ~a~%~}" files)))) +(define (call-with-mismatches comparison-report proc) + "Call PROC with two directories containing the mismatching store items." + (define local-hash + (comparison-report-local-sha256 comparison-report)) + + (define narinfos + (comparison-report-narinfos comparison-report)) + + (call-with-temporary-directory + (lambda (directory1) + (call-with-temporary-directory + (lambda (directory2) + (define narinfo1 + (if local-hash + (find (lambda (narinfo) + (not (string=? (narinfo-hash narinfo) + local-hash))) + narinfos) + (first (comparison-report-narinfos comparison-report)))) + + (define narinfo2 + (and (not local-hash) + (find (lambda (narinfo) + (not (eq? narinfo narinfo1))) + narinfos))) + + (rmdir directory1) + (call-with-nar narinfo1 (cut restore-file <> directory1)) + (when narinfo2 + (rmdir directory2) + (call-with-nar narinfo2 (cut restore-file <> directory2))) + (proc directory1 + (if local-hash + (comparison-report-item comparison-report) + directory2))))))) + +(define %diffoscope-command + ;; Default external diff command. Pass "--exclude-directory-metadata" so + ;; that the mtime/ctime differences are ignored. + '("diffoscope" "--exclude-directory-metadata=yes")) + +(define* (report-differing-files/external comparison-report + #:optional + (command %diffoscope-command)) + "Run COMMAND to show the file-level differences for the mismatches in +COMPARISON-REPORT." + (call-with-mismatches comparison-report + (lambda (directory1 directory2) + (apply system* + (append command + (list directory1 directory2)))))) + (define* (summarize-report comparison-report #:key (report-differences (const #f)) @@ -386,6 +444,10 @@ (define mode (match arg ("none" (const #t)) ("simple" report-differing-files) + ("diffoscope" report-differing-files/external) + ((and (? (cut string-prefix? "/" <>)) command) + (cute report-differing-files/external <> + (string-tokenize command))) (_ (leave (G_ "~a: unknown diff mode~%") arg)))) (apply values diff --git a/tests/challenge.scm b/tests/challenge.scm index a2782abcbd..bb5633a3eb 100644 --- a/tests/challenge.scm +++ b/tests/challenge.scm @@ -29,6 +29,7 @@ (define-module (test-challenge) #:use-module (guix base32) #:use-module (guix scripts challenge) #:use-module (guix scripts substitute) + #:use-module ((guix build utils) #:select (find-files)) #:use-module (gnu packages bootstrap) #:use-module (srfi srfi-1) #:use-module (srfi srfi-26) @@ -156,10 +157,12 @@ (define (make-narinfo item size hash) NarHash: sha256:~a References: ~%" item size (bytevector->nix-base32-string hash))) -(test-assertm "differing-files" - ;; Pretend we have two different results for the same store item, ITEM, - ;; with "/bin/guile" differing between the two nars, and make sure - ;; 'differing-files' returns it. +(define (call-mismatch-test proc) + "Pass PROC a for a mismatch and return its return +value." + + ;; Pretend we have two different results for the same store item, ITEM, with + ;; "/bin/guile" differing between the two nars. (mlet* %store-monad ((drv1 (package->derivation %bootstrap-guile)) (drv2 (gexp->derivation @@ -178,7 +181,10 @@ (define (make-narinfo item size hash) (out1 -> (derivation->output-path drv1)) (out2 -> (derivation->output-path drv2)) (item -> (string-append (%store-prefix) "/" - (make-string 32 #\a) "-foo"))) + (bytevector->nix-base32-string + (random-bytevector 32)) + "-foo" + (number->string (current-time) 16)))) (mbegin %store-monad (built-derivations (list drv1 drv2)) (mlet* %store-monad ((size1 (query-path-size out1)) @@ -186,11 +192,11 @@ (define (make-narinfo item size hash) (hash1 (query-path-hash* out1)) (hash2 (query-path-hash* out2)) (nar1 -> (call-with-bytevector-output-port - (lambda (port) - (write-file out1 port)))) + (lambda (port) + (write-file out1 port)))) (nar2 -> (call-with-bytevector-output-port - (lambda (port) - (write-file out2 port))))) + (lambda (port) + (write-file out2 port))))) (parameterize ((%http-server-port 9000)) (with-http-server `((200 ,(make-narinfo item size1 hash1)) (200 ,nar1)) @@ -202,8 +208,31 @@ (define (make-narinfo item size hash) (reports (compare-contents (list item) urls))) (pk 'report reports) - (return (equal? (differing-files (car reports)) - '("/bin/guile")))))))))))) + (return (proc (car reports)))))))))))) + +(test-assertm "differing-files" + (call-mismatch-test + (lambda (report) + (equal? (differing-files report) '("/bin/guile"))))) + +(test-assertm "call-with-mismatches" + (call-mismatch-test + (lambda (report) + (call-with-mismatches + report + (lambda (directory1 directory2) + (let* ((files1 (find-files directory1)) + (files2 (find-files directory2)) + (files (map (cute string-drop <> (string-length directory1)) + files1))) + (and (equal? files + (map (cute string-drop <> (string-length directory2)) + files2)) + (equal? (remove (lambda (file) + (file=? (string-append directory1 "/" file) + (string-append directory2 "/" file))) + files) + '("/bin/guile"))))))))) (test-end) -- cgit v1.2.3 From 16b92d0e6e0dcf8e12aeefce2f7f4a0dc0b6c8f8 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 12 Dec 2019 18:17:23 +0100 Subject: news: Add entry for "guix challenge --diff". * etc/news.scm: Add entry for "guix challenge --diff". --- etc/news.scm | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/etc/news.scm b/etc/news.scm index 71753b397a..4fffa58493 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -9,6 +9,16 @@ (channel-news (version 0) + (entry (commit "828a39da68a9169ef1d9f9ff02a1c66b1bcbe884") + (title (en "New @option{--diff} option for @command{guix challenge}")) + (body (en "The @command{guix challenge} command, which compares +binaries provided by different substitute servers as well as those built +locally, has a new @option{--diff} option. With @option{--diff=simple} (the +default), @command{guix challenge} automatically downloads binaries and +reports the list of differing files; @option{--diff=diffoscope} instructs it +to pass them to @command{diffoscope}, which simplifies the comparison process. +Run @command{info \"(guix) Invoking guix challenge\"}, for more info."))) + (entry (commit "f675f8dec73d02e319e607559ed2316c299ae8c7") (title (en "New command @command{guix time-machine}") (de "Neuer Befehl @command{guix time-machine}") -- cgit v1.2.3 From d8421fef1db92908719dfa92b78fce7952319abb Mon Sep 17 00:00:00 2001 From: Florian Pelz Date: Thu, 12 Dec 2019 18:59:43 +0100 Subject: news: Add 'de' translation. * etc/news.scm: Add 'de' translation. --- etc/news.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/etc/news.scm b/etc/news.scm index 4fffa58493..e0894ca7ab 100644 --- a/etc/news.scm +++ b/etc/news.scm @@ -10,14 +10,24 @@ (version 0) (entry (commit "828a39da68a9169ef1d9f9ff02a1c66b1bcbe884") - (title (en "New @option{--diff} option for @command{guix challenge}")) + (title (en "New @option{--diff} option for @command{guix challenge}") + (de "Neue @option{--diff}-Option für @command{guix challenge}")) (body (en "The @command{guix challenge} command, which compares binaries provided by different substitute servers as well as those built locally, has a new @option{--diff} option. With @option{--diff=simple} (the default), @command{guix challenge} automatically downloads binaries and reports the list of differing files; @option{--diff=diffoscope} instructs it to pass them to @command{diffoscope}, which simplifies the comparison process. -Run @command{info \"(guix) Invoking guix challenge\"}, for more info."))) +Run @command{info \"(guix) Invoking guix challenge\"}, for more info.") + (de "Der Befehl @command{guix challenge}, mit dem Binärdateien +von unterschiedlichen Substitut-Servern oder lokale Erstellungen miteinander +verglichen werden können, hat eine neue Befehlszeilenoption @option{--diff} +bekommen. Bei @option{--diff=simple} (der Voreinstellung) lädt @command{guix +challenge} automatisch Binärdateien herunter und listet sich unterscheidende +Dateien auf; wird @option{--diff=diffoscope} angegeben, werden sie an +@command{diffoscope} geschickt, was deren Vergleich erleichtert. Führen Sie +@command{info \"(guix.de) Aufruf von guix challenge\"} aus, um nähere +Informationen zu erhalten."))) (entry (commit "f675f8dec73d02e319e607559ed2316c299ae8c7") (title (en "New command @command{guix time-machine}") -- cgit v1.2.3 From 4d6d88bb7e7c8fd1a406c063eb7771343a18ad4a Mon Sep 17 00:00:00 2001 From: Julien Lepiller Date: Thu, 12 Dec 2019 19:38:09 +0100 Subject: gnu: coq: Split coqide. * gnu/packages/coq.scm (coq)[outputs]: Add "ide" output. --- gnu/packages/coq.scm | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) diff --git a/gnu/packages/coq.scm b/gnu/packages/coq.scm index 75b9831d39..7b2cdfec5d 100644 --- a/gnu/packages/coq.scm +++ b/gnu/packages/coq.scm @@ -58,6 +58,7 @@ (define-public coq (variable "COQPATH") (files (list "lib/coq/user-contrib"))))) (build-system ocaml-build-system) + (outputs '("out" "ide")) (inputs `(("lablgtk" ,lablgtk) ("python" ,python-2) @@ -72,6 +73,13 @@ (define-public coq (lambda _ (for-each make-file-writable (find-files ".")) #t)) + (add-after 'unpack 'remove-lablgtk-references + (lambda _ + ;; This is not used anywhere, but creates a reference to lablgtk in + ;; every binary + (substitute* '("config/coq_config.mli" "configure.ml") + ((".*coqideincl.*") "")) + #t)) (replace 'configure (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -88,6 +96,23 @@ (define-public coq "-j" (number->string (parallel-job-count)) "world"))) (delete 'check) + (add-after 'install 'remove-duplicate + (lambda* (#:key outputs #:allow-other-keys) + (let* ((out (assoc-ref outputs "out")) + (bin (string-append out "/bin"))) + ;; These are exact copies of the version without the .opt suffix. + ;; Remove them to save 35 MiB in the result + (delete-file (string-append bin "/coqtop.opt")) + (delete-file (string-append bin "/coqidetop.opt"))) + #t)) + (add-after 'install 'install-ide + (lambda* (#:key outputs #:allow-other-keys) + (let ((out (assoc-ref outputs "out")) + (ide (assoc-ref outputs "ide"))) + (mkdir-p (string-append ide "/bin")) + (rename-file (string-append out "/bin/coqide") + (string-append ide "/bin/coqide"))) + #t)) (add-after 'install 'check (lambda _ (with-directory-excursion "test-suite" -- cgit v1.2.3 From 9705e40071e4f7f3e97a434ee65985a3716834f2 Mon Sep 17 00:00:00 2001 From: Christopher Baines Date: Thu, 12 Dec 2019 22:11:37 +0000 Subject: gnu: guix-data-service: Update to 0.0.1-7.156b7ee. * gnu/packages/web.scm (guix-data-service): Update to 0.0.1-7.156b7ee. [arguments]: Add guix-data-service-manage-build-servers to the list of scripts. --- gnu/packages/web.scm | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/gnu/packages/web.scm b/gnu/packages/web.scm index 1fbd3dcb7a..749bc06fa9 100644 --- a/gnu/packages/web.scm +++ b/gnu/packages/web.scm @@ -4194,8 +4194,8 @@ (define-public python2-feedparser (package-with-python2 python-feedparser)) (define-public guix-data-service - (let ((commit "af1324855e1ecaf9b1dd7afcc714d09aaa38f081") - (revision "6")) + (let ((commit "156b7eea7e7d538e332d8cfcf482c5ebec0a25c0") + (revision "7")) (package (name "guix-data-service") (version (string-append "0.0.1-" revision "." (string-take commit 7))) @@ -4207,7 +4207,7 @@ (define-public guix-data-service (file-name (git-file-name name version)) (sha256 (base32 - "1qxs1sbyx894njw4f898wzc5shjj85h9kgz95p8mq1acmazhlhkv")))) + "1cg7jzk7pabfp3mgnkpycasv7fs522xp3nqdvna1y76aif3pd3zh")))) (build-system gnu-build-system) (arguments '(#:modules ((guix build utils) @@ -4251,6 +4251,7 @@ (define-public guix-data-service "guix-data-service-process-branch-updated-mbox" "guix-data-service-process-job" "guix-data-service-process-jobs" + "guix-data-service-manage-build-servers" "guix-data-service-query-build-servers")) #t))) (delete 'strip)))) ; As the .go files aren't compatible -- cgit v1.2.3 From d057c52f951d92460a987770fef0881a300c07cf Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Thu, 12 Dec 2019 18:41:17 -0600 Subject: gnu: emacs-telega: Update to 0.5.2. * gnu/packages/emacs-xyz.scm (emacs-telega): Update to 0.5.2. --- gnu/packages/emacs-xyz.scm | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 1a49ff4172..2b8c143d4a 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -20073,9 +20073,9 @@ (define-public emacs-helm-fish-completion (license license:gpl3+)))) (define-public emacs-telega - (let ((commit "56aef884921d99e5170d5425dbe0fce645620511") - (revision "2") - (version "0.4.4")) + (let ((commit "57fb6089aac3c7bd84fd9a2d9ccb1937c9836275") + (revision "1") + (version "0.5.2")) (package (name "emacs-telega") (version (git-version version revision commit)) @@ -20087,7 +20087,7 @@ (define-public emacs-telega (commit commit))) (sha256 (base32 - "0a8k3j20nz4xwswg9qp9xpaakk3q3ibiz8mkryk92zmrdmaah5mi")) + "0v46jnkphsd7glndcxz05b3xbgyw0i8zl0ybzbrjx24764svn69f")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From e34e02707d6bd38c79ce7bec776fcdc528548a0d Mon Sep 17 00:00:00 2001 From: Maxim Cournoyer Date: Fri, 13 Dec 2019 10:33:42 +0900 Subject: emacs-build-system: Ensure the core libraries appear last in the load path. Fixes bug #38568 (see: https://bugs.gnu.org/38568). * guix/build/emacs-build-system.scm (add-source-to-load-path): Ensure the core libraries appear last in the load path. Reported-by: Jelle Licht --- guix/build/emacs-build-system.scm | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/guix/build/emacs-build-system.scm b/guix/build/emacs-build-system.scm index 52c1ea177e..09de244993 100644 --- a/guix/build/emacs-build-system.scm +++ b/guix/build/emacs-build-system.scm @@ -76,8 +76,18 @@ (define* (unpack #:key source #:allow-other-keys) (define* (add-source-to-load-path #:key dummy #:allow-other-keys) "Augment the EMACSLOADPATH environment variable with the source directory." (let* ((source-directory (getcwd)) - (emacs-load-path-value (string-append source-directory ":" - (getenv "EMACSLOADPATH")))) + (emacs-load-path (string-split (getenv "EMACSLOADPATH") #\:)) + ;; XXX: Make sure the Emacs core libraries appear at the end of + ;; EMACSLOADPATH, to avoid shadowing any other libraries depended + ;; upon. + (emacs-load-path-non-core (filter (cut string-contains <> + "/share/emacs/site-lisp") + emacs-load-path)) + (emacs-load-path-value (string-append + (string-join (cons source-directory + emacs-load-path-non-core) + ":") + ":"))) (setenv "EMACSLOADPATH" emacs-load-path-value) (format #t "source directory ~s prepended to the `EMACSLOADPATH' \ environment variable\n" source-directory))) -- cgit v1.2.3 From b45af175b1671eaaeb9519a1b069e0a256da2a7d Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Thu, 12 Dec 2019 20:51:28 -0600 Subject: gnu: emacs-telega: Add sticker support. * gnu/packages/emacs-xyz.scm (emacs-telega)[propagated-inputs]: Add libwebp to the propagated-inputs in order to emit stickers properly. --- gnu/packages/emacs-xyz.scm | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 2b8c143d4a..0f3bc2a868 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -20169,7 +20169,8 @@ (define-public emacs-telega (add-after 'emacs-build 'emacs-make-autoloads (assoc-ref emacs:%standard-phases 'make-autoloads))))) (propagated-inputs - `(("emacs-visual-fill-column" ,emacs-visual-fill-column))) + `(("emacs-visual-fill-column" ,emacs-visual-fill-column) + ("libwebp" ,libwebp))) ; sticker support. (native-inputs `(("tdlib" ,tdlib) ("emacs" ,emacs-minimal) -- cgit v1.2.3 From 7afb0b25df649e814ded611bdb656d802b821a73 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Thu, 12 Dec 2019 20:55:16 -0600 Subject: gnu: emacs-telega: Modify description. * gnu/packages/emacs-xyz.scm (emacs-telega)[description]: Modify the description to be easier to read. --- gnu/packages/emacs-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 0f3bc2a868..487e0f3e83 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -20177,8 +20177,8 @@ (define-public emacs-telega ("python" ,python))) (synopsis "GNU Emacs client for the Telegram messenger") (description - "Telega is full-featured, unofficial client for the Telegram messaging -platform for GNU Emacs.") + "Telega is a full-featured, unofficial GNU Emacs-based client for the +Telegram messaging platform.") (home-page "https://github.com/zevlg/telega.el") (license license:gpl3+)))) -- cgit v1.2.3 From f85c0f1878e08a08f5e4fcea2aeb7add24cbe3e3 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Thu, 12 Dec 2019 20:55:59 -0600 Subject: gnu: emacs-telega: Update to 0.5.2-2. * gnu/packages/emacs-xyz.scm (emacs-telega): Update to 0.5.2-2. Adds support for I18N. --- gnu/packages/emacs-xyz.scm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 487e0f3e83..668a34b3b8 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -20073,8 +20073,8 @@ (define-public emacs-helm-fish-completion (license license:gpl3+)))) (define-public emacs-telega - (let ((commit "57fb6089aac3c7bd84fd9a2d9ccb1937c9836275") - (revision "1") + (let ((commit "6184e76990db395bea02f7b5d3169e746111e1ad") + (revision "2") (version "0.5.2")) (package (name "emacs-telega") @@ -20087,7 +20087,7 @@ (define-public emacs-telega (commit commit))) (sha256 (base32 - "0v46jnkphsd7glndcxz05b3xbgyw0i8zl0ybzbrjx24764svn69f")) + "1kfmmfc9dv3r2wxm1njflgas51qm0j8sj7yr7vfvwaz5sz7p121b")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments -- cgit v1.2.3 From eb8aad6a23442cf7b23e0df88b89b4cd030dfbf5 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Thu, 12 Dec 2019 21:24:54 -0600 Subject: gnu: emacs-telega: Add MP4/GIF support. * gnu/packages/emacs-xyz.scm (emacs-telega)[propagated-inputs]: Pass ffmpeg in propagated-inputs to support playback of inline MP4 and GIF files. --- gnu/packages/emacs-xyz.scm | 1 + 1 file changed, 1 insertion(+) diff --git a/gnu/packages/emacs-xyz.scm b/gnu/packages/emacs-xyz.scm index 668a34b3b8..ae7e7a64cc 100644 --- a/gnu/packages/emacs-xyz.scm +++ b/gnu/packages/emacs-xyz.scm @@ -20170,6 +20170,7 @@ (define-public emacs-telega (assoc-ref emacs:%standard-phases 'make-autoloads))))) (propagated-inputs `(("emacs-visual-fill-column" ,emacs-visual-fill-column) + ("ffmpeg" ,ffmpeg) ; mp4/gif support. ("libwebp" ,libwebp))) ; sticker support. (native-inputs `(("tdlib" ,tdlib) -- cgit v1.2.3 From da31e7d9ec11081807c6710f0f86def2372a7aff Mon Sep 17 00:00:00 2001 From: Pierre Neidhardt Date: Fri, 13 Dec 2019 13:31:00 +0100 Subject: doc: Link to "Building from Git" instead of quoting command to build Guix. * doc/contributing.texi (Submitting Patches): Remove example. Add link to "Building from Git" section. --- doc/contributing.texi | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/doc/contributing.texi b/doc/contributing.texi index 4ecff0a2dd..3c13005413 100644 --- a/doc/contributing.texi +++ b/doc/contributing.texi @@ -962,11 +962,8 @@ the URL: it is not very useful and if the name changes, the URL will probably be wrong. @item -See if Guix builds with -@example -guix environment --pure guix -- make -@end example -and look for warnings, especially those about use of undefined symbols. +Check if Guix builds (@pxref{Building from Git}) and address the +warnings, especially those about use of undefined symbols. @item Make sure your changes do not break Guix and simulate a @code{guix pull} with: -- cgit v1.2.3 From 9e6794a7f46d83cdd3a9f2ba1634ea2bf29ee9ec Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 06:46:11 -0600 Subject: gnu: python-acme: Update to 1.0.0. * gnu/packages/tls.scm (python-acme): Update to 1.0.0. --- gnu/packages/tls.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index 6d91989b19..e95069da95 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -553,13 +553,13 @@ (define-public python-acme (package (name "python-acme") ;; Remember to update the hash of certbot when updating python-acme. - (version "0.40.1") + (version "1.0.0") (source (origin (method url-fetch) (uri (pypi-uri "acme" version)) (sha256 (base32 - "1z2zibs9lyxi5gxw9bny1127bjliwsp476kai1wnnnwd8238dgrk")))) + "1hl62dnh8zsipa5azzpy5kwgjgb5vflinhna1fsn7rcchhpz223a")))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.2.3 From c08dc8d593b6d14443205c15fb2e55cd6fabbe3d Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 06:47:03 -0600 Subject: gnu: certbot: Update to 1.0.0. * gnu/packages/tls.scm (certbot): Update to 1.0.0. --- gnu/packages/tls.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/gnu/packages/tls.scm b/gnu/packages/tls.scm index e95069da95..10d864348c 100644 --- a/gnu/packages/tls.scm +++ b/gnu/packages/tls.scm @@ -610,7 +610,7 @@ (define-public certbot (uri (pypi-uri "certbot" version)) (sha256 (base32 - "1l8h7ggq75h59246mmzigmjr5jvzi29hihrnz9aiqh6g8hq1pj4d")))) + "0aih7sir5byy8ah9lrgzwcaga7hjw98qj8bb1pxzzzqrvcqjvf46")))) (build-system python-build-system) (arguments `(,@(substitute-keyword-arguments (package-arguments python-acme) -- cgit v1.2.3 From 594280b103479bfcb6189d17dd89db40e3ed602e Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 06:54:05 -0600 Subject: gnu: python-semver: Update to 2.9.0. * gnu/packages/python-xyz.scm (python-semver): Update to 2.9.0. --- gnu/packages/python-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 03dddcde43..3705e81d3d 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14327,14 +14327,14 @@ (define-public python2-activepapers (define-public python-semver (package (name "python-semver") - (version "2.7.9") + (version "2.9.0") (source (origin (method url-fetch) (uri (pypi-uri "semver" version)) (sha256 (base32 - "0hhgqppchv59rqj0yzi1prdg2nfsywqmjsqy2rycyxm0hvxmbyqz")))) + "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd")))) (build-system python-build-system) (arguments `(#:phases -- cgit v1.2.3 From c587482dcb513f9800db27cb8de21ec21adee399 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 06:54:23 -0600 Subject: gnu: python-semver: Do not patch virtualenv for tests. * gnu/packages/python-xyz.scm (python-semver)[arguments]: The substitution case for patching virtualenv versioning is no longer requireed. --- gnu/packages/python-xyz.scm | 9 --------- 1 file changed, 9 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 3705e81d3d..a66b1bbe5b 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14336,15 +14336,6 @@ (define-public python-semver (base32 "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd")))) (build-system python-build-system) - (arguments - `(#:phases - (modify-phases %standard-phases - (add-after 'unpack 'patch-test-requirements - (lambda _ - (substitute* "setup.py" - ;; Our Python is new enough. - (("'virtualenv<14\\.0\\.0'") "'virtualenv'")) - #t))))) (native-inputs `(("python-tox" ,python-tox) ("python-virtualenv" ,python-virtualenv))) -- cgit v1.2.3 From 2ecbba24082c6cf9e8ea40563433fe94f905ad07 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 06:56:12 -0600 Subject: gnu: python-semver: Adjust indentation. * gnu/packages/python-xyz.scm (python-semver): Adjust indentation. --- gnu/packages/python-xyz.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index a66b1bbe5b..3d1f8c0e01 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14329,12 +14329,12 @@ (define-public python-semver (name "python-semver") (version "2.9.0") (source - (origin - (method url-fetch) - (uri (pypi-uri "semver" version)) - (sha256 - (base32 - "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd")))) + (origin + (method url-fetch) + (uri (pypi-uri "semver" version)) + (sha256 + (base32 + "183kg1rhzz3hqizvphkd8hlbf1zxfx8737zhfkmqzxi71jmdw7pd")))) (build-system python-build-system) (native-inputs `(("python-tox" ,python-tox) -- cgit v1.2.3 From 5076c13b490bc798294119609688e8f2bf0e0cf5 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 07:06:27 -0600 Subject: gnu: python-blessings: Update to 1.7. * gnu/packages/terminals.scm (python-blessings): Update to 1.7. --- gnu/packages/terminals.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index 75c0092064..e1f3307ba4 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -16,6 +16,7 @@ ;;; Copyright © 2018, 2019 Eric Bavier ;;; Copyright © 2019 Julien Lepiller ;;; Copyright © 2019 Pierre Langlois +;;; Copyright © 2019 Brett Gilio ;;; ;;; This file is part of GNU Guix. ;;; @@ -828,14 +829,14 @@ (define-public python2-pyte (define-public python-blessings (package (name "python-blessings") - (version "1.6.1") + (version "1.7") (source (origin (method url-fetch) (uri (pypi-uri "blessings" version)) (sha256 (base32 - "1smngy65p8mi62lgm04icasx22v976szhs2aq95y2ljmi1srb4bl")))) + "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq")))) (build-system python-build-system) (arguments ;; TODO: For py3, 2to2 is used to convert the code, but test-suite fails -- cgit v1.2.3 From d1efb11a0cfeb4cd18b8dca14683a6ebaf2c52ea Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 07:06:39 -0600 Subject: gnu: python-blessings: Update comment on test suite. * gnu/packages/terminals.scm (python-blessings): Test suite has been revised. [arguments]: Change comment to reflect change in test suite regarding TTY. [native-inputs]: Pass python-six, which is required for test suite. --- gnu/packages/terminals.scm | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/gnu/packages/terminals.scm b/gnu/packages/terminals.scm index e1f3307ba4..a385e62630 100644 --- a/gnu/packages/terminals.scm +++ b/gnu/packages/terminals.scm @@ -839,10 +839,11 @@ (define-public python-blessings "0z8mgkbmisxs10rz88qg46l1c9a8n08k8cy2iassal2zh16qbrcq")))) (build-system python-build-system) (arguments - ;; TODO: For py3, 2to2 is used to convert the code, but test-suite fails + ;; FIXME: Test suite is unable to detect TTY conditions. `(#:tests? #f)) (native-inputs - `(("python-nose" ,python-nose))) + `(("python-nose" ,python-nose) + ("python-six" ,python-six))) (home-page "https://github.com/erikrose/blessings") (synopsis "Python module to manage terminal color, styling, and positioning") -- cgit v1.2.3 From 19ba75dc02c4ff072f96296543a00737bcf24bf9 Mon Sep 17 00:00:00 2001 From: Brett Gilio Date: Fri, 13 Dec 2019 07:30:13 -0600 Subject: gnu: python-yapf: Update to 0.29.0. * gnu/packages/python-xyz.scm (python-yapf): Update to 0.29.0. --- gnu/packages/python-xyz.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/gnu/packages/python-xyz.scm b/gnu/packages/python-xyz.scm index 3d1f8c0e01..9fac87648a 100644 --- a/gnu/packages/python-xyz.scm +++ b/gnu/packages/python-xyz.scm @@ -14555,14 +14555,14 @@ (define-public python2-send2trash (define-public python-yapf (package (name "python-yapf") - (version "0.24.0") + (version "0.29.0") (source (origin (method url-fetch) (uri (pypi-uri "yapf" version)) (sha256 (base32 - "0anwby0ydmyzcsgjc5dn1ryddwvii4dq61vck447q0n96npnzfyf")))) + "1pj3xzblmbssshi889b6n9hwqbjpabw6j0fimlng2sshd3226bki")))) (build-system python-build-system) (home-page "https://github.com/google/yapf") (synopsis "Formatter for Python code") -- cgit v1.2.3