From ad6cf3d4adddf39fbd8318b96756abd933ff6735 Mon Sep 17 00:00:00 2001 From: Zhu Zihao Date: Mon, 7 Dec 2020 22:29:58 +0800 Subject: gnu: Add xcb-imdkit. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/fcitx5.scm: New file. * gnu/local.mk (GNU_SYSTEM_MODULES): Add it. Signed-off-by: 宋文武 --- gnu/local.mk | 1 + 1 file changed, 1 insertion(+) (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f59d2543cd..90df6f3966 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -205,6 +205,7 @@ GNU_SYSTEM_MODULES = \ %D%/packages/erlang.scm \ %D%/packages/fabric-management.scm \ %D%/packages/fcitx.scm \ + %D%/packages/fcitx5.scm \ %D%/packages/figlet.scm \ %D%/packages/file.scm \ %D%/packages/file-systems.scm \ -- cgit v1.2.3 From 3d85c3ec652feb22824f355538b51e6955ded361 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Wed, 9 Dec 2020 13:55:46 +0100 Subject: gnu: pciutils: Fix compilation error on GNU/Hurd. * gnu/packages/patches/pciutils-hurd-fix.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it. * gnu/packages/pciutils.scm (pciutils)[arguments]: Add 'apply-hurd-patch' phase when (hurd-target?) is true. [inputs]: Add "hurd-patch" entry when (hurd-target?) is true. --- gnu/local.mk | 1 + gnu/packages/patches/pciutils-hurd-fix.patch | 23 +++++++++++++++++++++++ gnu/packages/pciutils.scm | 15 +++++++++++++-- 3 files changed, 37 insertions(+), 2 deletions(-) create mode 100644 gnu/packages/patches/pciutils-hurd-fix.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 90df6f3966..67482b8226 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1435,6 +1435,7 @@ dist_patch_DATA = \ %D%/packages/patches/pam-krb5-CVE-2020-10595.patch \ %D%/packages/patches/pango-skip-libthai-test.patch \ %D%/packages/patches/pciutils-hurd-configure.patch \ + %D%/packages/patches/pciutils-hurd-fix.patch \ %D%/packages/patches/plasma-framework-fix-KF5PlasmaMacros.cmake.patch \ %D%/packages/patches/ppsspp-disable-upgrade-and-gold.patch \ %D%/packages/patches/samba-fix-fcntl-hint-detection.patch \ diff --git a/gnu/packages/patches/pciutils-hurd-fix.patch b/gnu/packages/patches/pciutils-hurd-fix.patch new file mode 100644 index 0000000000..f1979d4352 --- /dev/null +++ b/gnu/packages/patches/pciutils-hurd-fix.patch @@ -0,0 +1,23 @@ +Fix a build error on GNU/Hurd for pciutils 3.7.0. + +commit 053cf6c8b2acafadf828912828336d90fe9b8696 +Author: Martin Mares +Date: Sun May 31 11:53:28 2020 +0200 + + HURD backend should compile again + + Fixes a bug introduced by commit 82c06b47dea5a38075ce9d56f743360bc47b4c78. + +diff --git a/lib/hurd.c b/lib/hurd.c +index 7b3b2ae..ccd92f6 100644 +--- a/lib/hurd.c ++++ b/lib/hurd.c +@@ -307,7 +307,6 @@ hurd_fill_regions(struct pci_dev *d) + d->base_addr[i] |= regions[i].is_64 << 2; + d->base_addr[i] |= regions[i].is_prefetchable << 3; + +- if (flags & PCI_FILL_SIZES) +- d->size[i] = regions[i].size; ++ d->size[i] = regions[i].size; + } + } diff --git a/gnu/packages/pciutils.scm b/gnu/packages/pciutils.scm index a5ed121c85..d7d224b292 100644 --- a/gnu/packages/pciutils.scm +++ b/gnu/packages/pciutils.scm @@ -1,5 +1,5 @@ ;;; GNU Guix --- Functional package management for GNU -;;; Copyright © 2014, 2015, 2017 Ludovic Courtès +;;; Copyright © 2014, 2015, 2017, 2020 Ludovic Courtès ;;; Copyright © 2016 Efraim Flashner ;;; Copyright © 2018 Tobias Geerinckx-Rice ;;; Copyright © 2019 Mathieu Othacehe @@ -92,7 +92,15 @@ (replace 'install (lambda* (#:key outputs #:allow-other-keys) ;; Install the commands, library, and .pc files. - (invoke "make" "install" "install-lib")))) + (invoke "make" "install" "install-lib"))) + + ,@(if (hurd-target?) + '((add-after 'unpack 'apply-hurd-patch + (lambda* (#:key inputs #:allow-other-keys) + (let ((patch (assoc-ref inputs "hurd-patch"))) + (invoke "patch" "-p1" "--batch" "-i" + patch))))) + '())) ;; Make sure programs have an RPATH so they can find libpciutils.so. #:make-flags (list (string-append "LDFLAGS=-Wl,-rpath=" @@ -109,6 +117,9 @@ (package-supported-systems kmod)) `(("kmod" ,kmod)) '()) + ,@(if (hurd-target?) + `(("hurd-patch" ,(search-patch "pciutils-hurd-fix.patch"))) + '()) ("zlib" ,zlib))) (home-page "https://mj.ucw.cz/sw/pciutils/") (synopsis "Programs for inspecting and manipulating PCI devices") -- cgit v1.2.3 From 8f330aebee504269d4d7188daa85e95503f71888 Mon Sep 17 00:00:00 2001 From: Efraim Flashner Date: Fri, 11 Dec 2020 12:04:15 +0200 Subject: gnu: busybox: Update to 1.32.0. * gnu/packages/busybox.scm (busybox): Update to 1.32.0. [source]: Remove patch. * gnu/packates/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/busybox.scm | 11 ++-- .../busybox-1.31.1-fix-build-with-glibc-2.31.patch | 68 ---------------------- 3 files changed, 4 insertions(+), 76 deletions(-) delete mode 100644 gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 67482b8226..b32ebf4e3b 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -857,7 +857,6 @@ dist_patch_DATA = \ %D%/packages/patches/blender-2.79-python-3.7-fix.patch \ %D%/packages/patches/blender-2.79-python-3.8-fix.patch \ %D%/packages/patches/bpftrace-disable-bfd-disasm.patch \ - %D%/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch \ %D%/packages/patches/byobu-writable-status.patch \ %D%/packages/patches/calibre-no-updates-dialog.patch \ %D%/packages/patches/calibre-remove-test-sqlite.patch \ diff --git a/gnu/packages/busybox.scm b/gnu/packages/busybox.scm index 0a93c6475e..c931a2f2f7 100644 --- a/gnu/packages/busybox.scm +++ b/gnu/packages/busybox.scm @@ -1,6 +1,6 @@ ;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2014 John Darrington -;;; Copyright © 2016, 2017, 2018, 2019 Efraim Flashner +;;; Copyright © 2016, 2017, 2018, 2019, 2020 Efraim Flashner ;;; Copyright © 2018, 2019, 2020 Tobias Geerinckx-Rice ;;; ;;; This file is part of GNU Guix. @@ -32,7 +32,7 @@ (define-public busybox (package (name "busybox") - (version "1.31.1") + (version "1.32.0") (source (origin (method url-fetch) (uri (string-append @@ -40,10 +40,7 @@ version ".tar.bz2")) (sha256 (base32 - "1659aabzp8w4hayr4z8kcpbk2z1q2wqhw7i1yb0l72b45ykl1yfh")) - (patches - (search-patches - "busybox-1.31.1-fix-build-with-glibc-2.31.patch")))) + "12g63zsvzfz04wbyga8riyl8ils05riw4xf26cyiaasbs3qqfpf3")))) (build-system gnu-build-system) (arguments '(#:phases @@ -90,7 +87,7 @@ ;; true in guix build environment (substitute* "testsuite/pidof.tests" (("-s init") "-s $(cat /proc/1/comm)")) - + ;; This test cannot possibly pass. ;; It is trying to test that "which ls" returns "/bin/ls" when PATH is not set. ;; However, this relies on /bin/ls existing. Which it does not in guix. diff --git a/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch b/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch deleted file mode 100644 index 1518df067f..0000000000 --- a/gnu/packages/patches/busybox-1.31.1-fix-build-with-glibc-2.31.patch +++ /dev/null @@ -1,68 +0,0 @@ -See: https://bugs.gentoo.org/708350 -Author: Patrick McLean -Date: 2020-02-06 23:06:22 +0000 -diff --git a/coreutils/date.c b/coreutils/date.c -index 3414d38ae..4ade6abb4 100644 ---- a/coreutils/date.c -+++ b/coreutils/date.c -@@ -279,6 +279,9 @@ int date_main(int argc UNUSED_PARAM, char **argv) - time(&ts.tv_sec); - #endif - } -+#if !ENABLE_FEATURE_DATE_NANO -+ ts.tv_nsec = 0; -+#endif - localtime_r(&ts.tv_sec, &tm_time); - - /* If date string is given, update tm_time, and maybe set date */ -@@ -301,9 +304,10 @@ int date_main(int argc UNUSED_PARAM, char **argv) - if (date_str[0] != '@') - tm_time.tm_isdst = -1; - ts.tv_sec = validate_tm_time(date_str, &tm_time); -+ ts.tv_nsec = 0; - - /* if setting time, set it */ -- if ((opt & OPT_SET) && stime(&ts.tv_sec) < 0) { -+ if ((opt & OPT_SET) && clock_settime(CLOCK_REALTIME, &ts) < 0) { - bb_perror_msg("can't set date"); - } - } -diff --git a/libbb/missing_syscalls.c b/libbb/missing_syscalls.c -index 87cf59b3d..dc40d9155 100644 ---- a/libbb/missing_syscalls.c -+++ b/libbb/missing_syscalls.c -@@ -15,14 +15,6 @@ pid_t getsid(pid_t pid) - return syscall(__NR_getsid, pid); - } - --int stime(const time_t *t) --{ -- struct timeval tv; -- tv.tv_sec = *t; -- tv.tv_usec = 0; -- return settimeofday(&tv, NULL); --} -- - int sethostname(const char *name, size_t len) - { - return syscall(__NR_sethostname, name, len); -diff --git a/util-linux/rdate.c b/util-linux/rdate.c -index 70f829e7f..878375d78 100644 ---- a/util-linux/rdate.c -+++ b/util-linux/rdate.c -@@ -95,9 +95,13 @@ int rdate_main(int argc UNUSED_PARAM, char **argv) - if (!(flags & 2)) { /* no -p (-s may be present) */ - if (time(NULL) == remote_time) - bb_error_msg("current time matches remote time"); -- else -- if (stime(&remote_time) < 0) -+ else { -+ struct timespec ts; -+ ts.tv_sec = remote_time; -+ ts.tv_nsec = 0; -+ if (clock_settime(CLOCK_REALTIME, &ts) < 0) - bb_perror_msg_and_die("can't set time of day"); -+ } - } - - if (flags != 1) /* not lone -s */ -- cgit v1.2.3 From 6e301c3a53270301bf2685f59b470a88b521105f Mon Sep 17 00:00:00 2001 From: Guillaume Le Vaillant Date: Fri, 11 Dec 2020 18:08:00 +0100 Subject: gnu: sbcl-geco: Update to 2.1.1. * gnu/packages/lisp-xyz.scm (sbcl-geco): Update to 2.1.1. [source]: Fetch from Github. [home-page]: Update to author's page. * gnu/packages/patches/sbcl-geco-fix-organism-class.patch: Remove file. * gnu/local.mk (dist_patch_DATA): Remove it. --- gnu/local.mk | 1 - gnu/packages/lisp-xyz.scm | 15 ++++++++------- gnu/packages/patches/sbcl-geco-fix-organism-class.patch | 13 ------------- 3 files changed, 8 insertions(+), 21 deletions(-) delete mode 100644 gnu/packages/patches/sbcl-geco-fix-organism-class.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index b32ebf4e3b..f94725b1e5 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1596,7 +1596,6 @@ dist_patch_DATA = \ %D%/packages/patches/rust-openssl-sys-no-vendor.patch \ %D%/packages/patches/rxvt-unicode-escape-sequences.patch \ %D%/packages/patches/sbcl-clml-fix-types.patch \ - %D%/packages/patches/sbcl-geco-fix-organism-class.patch \ %D%/packages/patches/scalapack-blacs-mpi-deprecations.patch \ %D%/packages/patches/scheme48-tests.patch \ %D%/packages/patches/scotch-build-parallelism.patch \ diff --git a/gnu/packages/lisp-xyz.scm b/gnu/packages/lisp-xyz.scm index 68adff3169..747617fdda 100644 --- a/gnu/packages/lisp-xyz.scm +++ b/gnu/packages/lisp-xyz.scm @@ -11234,17 +11234,18 @@ XML to Lisp structures or s-expressions and back.") (define-public sbcl-geco (package (name "sbcl-geco") - (version "2.01a") + (version "2.1.1") (source (origin - (method url-fetch) - (uri (string-append "https://common-lisp.net/project/geco/download/" - "geco-" version ".tar.gz")) + (method git-fetch) + (uri (git-reference + (url "https://github.com/gpwwjr/GECO") + (commit (string-append "v" version)))) + (file-name (git-file-name "geco" version)) (sha256 - (base32 "0kk0bzr1019cfmf2b1jl1rk9shv3gx5z1znifxllg9mb98yqsgw0")) - (patches (search-patches "sbcl-geco-fix-organism-class.patch")))) + (base32 "1rc8a4mk40hjx5qy980hjylv6xxqdbq38hg8c4w30y93abfd519s")))) (build-system asdf-build-system/sbcl) - (home-page "https://common-lisp.net/project/geco/") + (home-page "http://hiwaay.net/~gpw/geco/geco.html") (synopsis "Genetic algorithm toolkit for Common Lisp") (description "GECO (Genetic Evolution through Combination of Objects) is an extensible, diff --git a/gnu/packages/patches/sbcl-geco-fix-organism-class.patch b/gnu/packages/patches/sbcl-geco-fix-organism-class.patch deleted file mode 100644 index 817596241e..0000000000 --- a/gnu/packages/patches/sbcl-geco-fix-organism-class.patch +++ /dev/null @@ -1,13 +0,0 @@ -Fix the ORGANISM class so that SBCL >= 2.0.9 can compile it without error. - ---- a/classes.lisp 2020-10-28 12:11:10.725659464 +0100 -+++ b/classes.lisp 2020-10-31 17:34:36.822752447 +0100 -@@ -148,7 +148,7 @@ - :accessor score - :initarg :score - :initform 'nil -- :type number) -+ :type (or number null)) - (NORMALIZED-SCORE - :accessor normalized-score - :initarg :normalized-score -- cgit v1.2.3 From 8361817bf693742757b096468198626f297bb09e Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Fri, 4 Dec 2020 11:33:16 +0100 Subject: install: Discover local substitute servers. * gnu/installer/substitutes.scm: New file. * gnu/installer/newt/substitutes.scm: New file. * gnu/local.mk (INSTALLER_MODULES): Add them. * po/guix/POTFILES.in: Add gnu/installer/newt/substitutes.scm. * gnu/installer/proxy.scm (with-silent-shepherd): Move to ... * gnu/installer/utils.scm: ... here. * gnu/installer/record.scm ()[substitutes-page]: New field. * gnu/installer/newt.scm (substitutes-page): New procedure, (newt-installer): register it. * gnu/installer.scm (installer-steps): Add "substitutes-page" step. * gnu/system/install.scm (%installation-services): Add avahi-service-type and enable substitute server discover in guix-service-type. []: Set it to %mdns-host-lookup-nss. --- gnu/installer.scm | 7 +++++++ gnu/installer/newt.scm | 5 +++++ gnu/installer/newt/substitutes.scm | 43 ++++++++++++++++++++++++++++++++++++++ gnu/installer/proxy.scm | 6 +----- gnu/installer/record.scm | 3 +++ gnu/installer/substitutes.scm | 41 ++++++++++++++++++++++++++++++++++++ gnu/installer/utils.scm | 11 +++++++++- gnu/local.mk | 2 ++ gnu/system/install.scm | 6 ++++++ po/guix/POTFILES.in | 1 + 10 files changed, 119 insertions(+), 6 deletions(-) create mode 100644 gnu/installer/newt/substitutes.scm create mode 100644 gnu/installer/substitutes.scm (limited to 'gnu/local.mk') diff --git a/gnu/installer.scm b/gnu/installer.scm index f401b242f8..7863edbb67 100644 --- a/gnu/installer.scm +++ b/gnu/installer.scm @@ -266,6 +266,13 @@ selected keymap." (compute (lambda _ ((installer-network-page current-installer))))) + ;; Ask whether to enable substitute server discovery. + (installer-step + (id 'substitutes) + (description (G_ "Substitute server discovery")) + (compute (lambda _ + ((installer-substitutes-page current-installer))))) + ;; Prompt for users (name, group and home directory). (installer-step (id 'user) diff --git a/gnu/installer/newt.scm b/gnu/installer/newt.scm index a1cbeca49a..4f7fc6f4dc 100644 --- a/gnu/installer/newt.scm +++ b/gnu/installer/newt.scm @@ -30,6 +30,7 @@ #:use-module (gnu installer newt page) #:use-module (gnu installer newt partition) #:use-module (gnu installer newt services) + #:use-module (gnu installer newt substitutes) #:use-module (gnu installer newt timezone) #:use-module (gnu installer newt user) #:use-module (gnu installer newt utils) @@ -101,6 +102,9 @@ problem. The backtrace is displayed below. Please report it by email to \ (define (network-page) (run-network-page)) +(define (substitutes-page) + (run-substitutes-page)) + (define (hostname-page) (run-hostname-page)) @@ -130,6 +134,7 @@ problem. The backtrace is displayed below. Please report it by email to \ (locale-page locale-page) (menu-page menu-page) (network-page network-page) + (substitutes-page substitutes-page) (timezone-page timezone-page) (hostname-page hostname-page) (user-page user-page) diff --git a/gnu/installer/newt/substitutes.scm b/gnu/installer/newt/substitutes.scm new file mode 100644 index 0000000000..938cb1a53b --- /dev/null +++ b/gnu/installer/newt/substitutes.scm @@ -0,0 +1,43 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Mathieu Othacehe +;;; +;;; 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 installer newt substitutes) + #:use-module (gnu installer substitutes) + #:use-module (gnu installer utils) + #:use-module (guix i18n) + #:use-module (newt) + #:use-module (ice-9 match) + #:export (run-substitutes-page)) + +(define* (run-substitutes-page) + (match (current-clients) + (() + (case (choice-window + (G_ "Substitute server discovery.") + (G_ "Enable") (G_ "Disable") + (G_ " By turning this option on, you allow Guix to fetch \ +substitutes (pre-built binaries) during installation from servers \ +discovered on your local area network (LAN) in addition to the official \ +server. This can increase download throughput. + + There are no security risks: only genuine substitutes may be retrieved from \ +those servers. However, eavesdroppers on your LAN may be able to see what \ +software you are installing.")) + ((1) (enable-discovery)) + ((2) (disable-discovery)))) + (_ #f))) diff --git a/gnu/installer/proxy.scm b/gnu/installer/proxy.scm index befaf3ab0a..86c827294e 100644 --- a/gnu/installer/proxy.scm +++ b/gnu/installer/proxy.scm @@ -17,15 +17,11 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu installer proxy) + #:use-module (gnu installer utils) #:use-module (gnu services herd) #:export (set-http-proxy clear-http-proxy)) -(define-syntax-rule (with-silent-shepherd exp ...) - (parameterize ((shepherd-message-port - (%make-void-port "w"))) - exp ...)) - (define (set-http-proxy proxy) (with-silent-shepherd (with-shepherd-action 'guix-daemon diff --git a/gnu/installer/record.scm b/gnu/installer/record.scm index 6ebd87f6a6..0b34318c45 100644 --- a/gnu/installer/record.scm +++ b/gnu/installer/record.scm @@ -33,6 +33,7 @@ installer-locale-page installer-menu-page installer-network-page + installer-substitutes-page installer-timezone-page installer-hostname-page installer-user-page @@ -73,6 +74,8 @@ (menu-page installer-menu-page) ;; procedure void -> void (network-page installer-network-page) + ;; procedure void -> void + (substitutes-page installer-substitutes-page) ;; procedure (zonetab) -> posix-timezone (timezone-page installer-timezone-page) ;; procedure void -> void diff --git a/gnu/installer/substitutes.scm b/gnu/installer/substitutes.scm new file mode 100644 index 0000000000..c9a7418f89 --- /dev/null +++ b/gnu/installer/substitutes.scm @@ -0,0 +1,41 @@ +;;; GNU Guix --- Functional package management for GNU +;;; Copyright © 2020 Mathieu Othacehe +;;; +;;; 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 installer substitutes) + #:use-module (gnu installer utils) + #:use-module (gnu services herd) + #:export (enable-discovery + disable-discovery)) + +(define (enable-discovery) + (with-silent-shepherd + (with-shepherd-action 'guix-daemon + ('discover "on") + result + result))) + +(define (disable-discovery) + (with-silent-shepherd + (with-shepherd-action 'guix-daemon + ('discover "off") + result + result))) + +;; Local Variables: +;; eval: (put 'with-silent-shepherd 'scheme-indent-function 0) +;; End: diff --git a/gnu/installer/utils.scm b/gnu/installer/utils.scm index a7fa66a199..bb97bc5560 100644 --- a/gnu/installer/utils.scm +++ b/gnu/installer/utils.scm @@ -18,6 +18,7 @@ ;;; along with GNU Guix. If not, see . (define-module (gnu installer utils) + #:use-module (gnu services herd) #:use-module (guix utils) #:use-module (guix build utils) #:use-module (guix i18n) @@ -43,7 +44,9 @@ with-server-socket current-server-socket current-clients - send-to-clients)) + send-to-clients + + with-silent-shepherd)) (define* (read-lines #:optional (port (current-input-port))) "Read lines from PORT and return them as a list." @@ -233,3 +236,9 @@ accepting socket." (current-clients (reverse remainder)) exp) + +(define-syntax-rule (with-silent-shepherd exp ...) + "Evaluate EXP while discarding shepherd messages." + (parameterize ((shepherd-message-port + (%make-void-port "w"))) + exp ...)) diff --git a/gnu/local.mk b/gnu/local.mk index f94725b1e5..4cca7671a8 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -717,6 +717,7 @@ INSTALLER_MODULES = \ %D%/installer/record.scm \ %D%/installer/services.scm \ %D%/installer/steps.scm \ + %D%/installer/substitutes.scm \ %D%/installer/tests.scm \ %D%/installer/timezone.scm \ %D%/installer/user.scm \ @@ -733,6 +734,7 @@ INSTALLER_MODULES = \ %D%/installer/newt/page.scm \ %D%/installer/newt/partition.scm \ %D%/installer/newt/services.scm \ + %D%/installer/newt/substitutes.scm \ %D%/installer/newt/timezone.scm \ %D%/installer/newt/user.scm \ %D%/installer/newt/utils.scm \ diff --git a/gnu/system/install.scm b/gnu/system/install.scm index 7701297411..a6b9e3d952 100644 --- a/gnu/system/install.scm +++ b/gnu/system/install.scm @@ -34,6 +34,7 @@ #:use-module ((guix store) #:select (%store-prefix)) #:use-module (gnu installer) #:use-module (gnu system locale) + #:use-module (gnu services avahi) #:use-module (gnu services dbus) #:use-module (gnu services networking) #:use-module (gnu services shepherd) @@ -335,6 +336,10 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m ;; The usual services. (syslog-service) + ;; Use the Avahi daemon to discover substitute servers on the local + ;; network. It can be faster than fetching from remote servers. + (service avahi-service-type) + ;; The build daemon. Register the default substitute server key(s) ;; as trusted to allow the installation process to use substitutes by ;; default. @@ -435,6 +440,7 @@ Access documentation at any time by pressing Alt-F2.\x1b[0m (host-name "gnu") (timezone "Europe/Paris") (locale "en_US.utf8") + (name-service-switch %mdns-host-lookup-nss) (bootloader (bootloader-configuration (bootloader grub-bootloader) (target "/dev/sda"))) diff --git a/po/guix/POTFILES.in b/po/guix/POTFILES.in index 5afb13ffdb..1aec3bef3c 100644 --- a/po/guix/POTFILES.in +++ b/po/guix/POTFILES.in @@ -25,6 +25,7 @@ gnu/installer/newt/network.scm gnu/installer/newt/page.scm gnu/installer/newt/partition.scm gnu/installer/newt/services.scm +gnu/installer/newt/substitutes.scm gnu/installer/newt/timezone.scm gnu/installer/newt/user.scm gnu/installer/newt/utils.scm -- cgit v1.2.3 From 7eb920351abc7757ee9711ac147e63d6936e5ee8 Mon Sep 17 00:00:00 2001 From: Simon South Date: Fri, 11 Dec 2020 15:16:47 -0500 Subject: gnu: knot-resolver: Update to 5.2.1. * gnu/packages/dns.scm (knot-resolver): Update to 5.2.1. [source]: Remove obsolete patch. * gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch: Delete file. * gnu/local.mk (dist_patch_DATA): Remove it. Signed-off-by: Tobias Geerinckx-Rice --- gnu/local.mk | 1 - gnu/packages/dns.scm | 7 +- .../knot-resolver-fix-map-command-on-32-bit.patch | 146 --------------------- 3 files changed, 2 insertions(+), 152 deletions(-) delete mode 100644 gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index 4cca7671a8..f8c615a83d 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1223,7 +1223,6 @@ dist_patch_DATA = \ %D%/packages/patches/kmail-Fix-missing-link-libraries.patch \ %D%/packages/patches/kmod-module-directory.patch \ %D%/packages/patches/kmscon-runtime-keymap-switch.patch \ - %D%/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch \ %D%/packages/patches/kpackage-allow-external-paths.patch \ %D%/packages/patches/kpackage-fix-KF5PackageMacros.cmake.patch \ %D%/packages/patches/kmplayer-aarch64.patch \ diff --git a/gnu/packages/dns.scm b/gnu/packages/dns.scm index d59fe57ade..403ebd3d8b 100644 --- a/gnu/packages/dns.scm +++ b/gnu/packages/dns.scm @@ -937,17 +937,14 @@ synthesis, and on-the-fly re-configuration.") (define-public knot-resolver (package (name "knot-resolver") - (version "5.2.0") + (version "5.2.1") (source (origin (method url-fetch) (uri (string-append "https://secure.nic.cz/files/knot-resolver/" "knot-resolver-" version ".tar.xz")) (sha256 (base32 - "0cwlipib3x88dr6cijqv2aps13b4ijv524wc85ns07rkldy2c948")) - (patches - (search-patches - "knot-resolver-fix-map-command-on-32-bit.patch")))) + "09jqy23q1pgj76y2qd1xfk72wwmypnyawm3span3gx00qi2bfdxa")))) (build-system meson-build-system) (outputs '("out" "doc")) (arguments diff --git a/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch b/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch deleted file mode 100644 index 02c0fbcb70..0000000000 --- a/gnu/packages/patches/knot-resolver-fix-map-command-on-32-bit.patch +++ /dev/null @@ -1,146 +0,0 @@ -commit e01979620025666633250b3e2d545fe59c629f73 -Author: Vladimír Čunát -Date: Fri Nov 13 14:16:32 2020 +0100 - - fix map() command on 32-bit platforms; regressed in 5.2.0 - - LuaJIT FFI was using opendir() (etc.) variants with 32-bit inodes - but the C parts was using them as 64-bit inode variants. - Consequently the `struct dirent` layout didn't match and we were getting - filenames shifted by eight bytes. - - Now the whole dir-listing lua function is written in C. - -diff --git a/.luacheckrc b/.luacheckrc -index 0cf0b884..67bc18f6 100644 ---- a/.luacheckrc -+++ b/.luacheckrc -@@ -20,6 +20,7 @@ new_read_globals = { - 'user', - 'verbose', - 'worker', -+ 'kluautil_list_dir', - -- Sandbox declarations - 'kB', - 'MB', -diff --git a/NEWS b/NEWS -index 2eae3082..9d8cde99 100644 ---- a/NEWS -+++ b/NEWS -@@ -1,6 +1,10 @@ - Knot Resolver X.Y.X (yyyy-mm-dd) - ================================ - -+Bugfixes -+-------- -+- fix map() command on 32-bit platforms; regressed in 5.2.0 (!1093) -+ - - Knot Resolver 5.2.0 (2020-11-11) - ================================ -diff --git a/daemon/bindings/impl.c b/daemon/bindings/impl.c -index d10f4525..d9ad0774 100644 ---- a/daemon/bindings/impl.c -+++ b/daemon/bindings/impl.c -@@ -2,6 +2,7 @@ - * SPDX-License-Identifier: GPL-3.0-or-later - */ - -+#include - #include - #include - #include -@@ -29,6 +30,29 @@ const char * lua_table_checkindices(lua_State *L, const char *keys[]) - return NULL; - } - -+/** Return table listing filenames in a given directory (ls -A). */ -+static int kluautil_list_dir(lua_State *L) -+{ -+ lua_newtable(L); // empty table even on errors -+ -+ const char *path = lua_tolstring(L, 1, NULL); -+ if (!path) return 1; -+ DIR *dir = opendir(path); -+ if (!dir) return 1; -+ -+ struct dirent *entry; -+ int lua_i = 1; -+ while ((entry = readdir(dir)) != NULL) { -+ if (strcmp(entry->d_name, ".") && strcmp(entry->d_name, "..")) { -+ lua_pushstring(L, entry->d_name); -+ lua_rawseti(L, -2, lua_i++); -+ } -+ } -+ -+ closedir(dir); -+ return 1; -+} -+ - - /* Each of these just creates the correspondingly named lua table of functions. */ - int kr_bindings_cache (lua_State *L); /* ./cache.c */ -@@ -44,6 +68,9 @@ void kr_bindings_register(lua_State *L) - kr_bindings_modules(L); - kr_bindings_net(L); - kr_bindings_worker(L); -+ -+ /* Finally some lua utils *written in C*, not really a binding. */ -+ lua_register(L, "kluautil_list_dir", kluautil_list_dir); - } - - void lua_error_p(lua_State *L, const char *fmt, ...) -diff --git a/daemon/lua/kluautil.lua b/daemon/lua/kluautil.lua -index 57912e7b..e73e952c 100644 ---- a/daemon/lua/kluautil.lua -+++ b/daemon/lua/kluautil.lua -@@ -1,6 +1,5 @@ - -- SPDX-License-Identifier: GPL-3.0-or-later - --local ffi = require('ffi') - local kluautil = {} - - -- Get length of table -@@ -28,14 +27,6 @@ function kluautil.kr_table_unpack(tab) - return unpack(tab, 1, tab.n) - end - --ffi.cdef([[ -- typedef struct __dirstream DIR; -- DIR *opendir(const char *name); -- struct dirent *readdir(DIR *dirp); -- int closedir(DIR *dirp); -- char *strerror(int errnum); --]]) -- - -- Fetch over HTTPS - function kluautil.kr_https_fetch(url, out_file, ca_file) - local http_ok, http_request = pcall(require, 'http.request') -@@ -88,26 +79,6 @@ function kluautil.kr_https_fetch(url, out_file, ca_file) - return true - end - ---- List directory --function kluautil.list_dir (path) -- local results = {} -- local dir = ffi.C.opendir(path) -- if dir == nil then -- return results -- end -- -- local entry = ffi.C.readdir(dir) -- while entry ~= nil do -- local entry_name = ffi.string(ffi.C.kr_dirent_name(entry)) -- if entry_name ~= '.' and entry_name ~= '..' then -- table.insert(results, entry_name) -- end -- entry = ffi.C.readdir(dir) -- end -- -- ffi.C.closedir(dir) -- -- return results --end -+kluautil.list_dir = kluautil_list_dir - - return kluautil -- cgit v1.2.3 From 1592491c39af02a2f651ccd4d0d9cf97104e352f Mon Sep 17 00:00:00 2001 From: Leo Prikler Date: Thu, 10 Dec 2020 20:03:12 +0100 Subject: gnu: renpy: Use system fribidi and drop generated sources. * gnu/packages/patches/renpy-use-system-fribidi.patch: New file. * gnu/local.mk (dist_patch_DATA): Add it here. * gnu/packages/game-development.scm (renpy)[source] Use it here. : Add (guix build utils). : Drop generated sources and fribidi sources. (arguments)[phases]: Add fix-include-paths. (inputs): Add fribidi. Signed-off-by: Nicolas Goaziou --- gnu/local.mk | 1 + gnu/packages/game-development.scm | 21 ++++++++- .../patches/renpy-use-system-fribidi.patch | 52 ++++++++++++++++++++++ 3 files changed, 73 insertions(+), 1 deletion(-) create mode 100644 gnu/packages/patches/renpy-use-system-fribidi.patch (limited to 'gnu/local.mk') diff --git a/gnu/local.mk b/gnu/local.mk index f8c615a83d..18a2389514 100644 --- a/gnu/local.mk +++ b/gnu/local.mk @@ -1569,6 +1569,7 @@ dist_patch_DATA = \ %D%/packages/patches/rct-add-missing-headers.patch \ %D%/packages/patches/readline-link-ncurses.patch \ %D%/packages/patches/readline-6.2-CVE-2014-2524.patch \ + %D%/packages/patches/renpy-use-system-fribidi.patch \ %D%/packages/patches/reposurgeon-add-missing-docbook-files.patch \ %D%/packages/patches/r-httpuv-1.5.4-unvendor-libuv.patch \ %D%/packages/patches/ri-li-modernize_cpp.patch \ diff --git a/gnu/packages/game-development.scm b/gnu/packages/game-development.scm index 557f02f564..21f7f7e880 100644 --- a/gnu/packages/game-development.scm +++ b/gnu/packages/game-development.scm @@ -1120,7 +1120,18 @@ developed mainly for Ren'py.") (method url-fetch) (uri (string-append "https://www.renpy.org/dl/" version "/renpy-" version "-source.tar.bz2")) - (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")))) + (sha256 (base32 "1anr5cfbvbsbik4v4rvrkdkciwhg700k4lydfbs4n85raimz9mw4")) + (modules '((guix build utils))) + (patches + (search-patches + "renpy-use-system-fribidi.patch")) + (snippet + '(with-directory-excursion "module" + ;; drop generated sources + (delete-file-recursively "gen") + ;; drop fribidi sources + (delete-file-recursively "fribidi-src") + #t)))) (build-system python-build-system) (arguments `(#:tests? #f ; Ren'py doesn't seem to package tests @@ -1133,6 +1144,13 @@ developed mainly for Ren'py.") (("xdg-open") (which "xdg-open"))) #t)) + (add-after 'unpack 'fix-include-paths + (lambda* (#:key inputs #:allow-other-keys) + (substitute* "module/setup.py" + (("/usr/include/fribidi") + (string-append (assoc-ref inputs "fribidi") + "/include/fribidi"))) + #t)) (add-after 'set-paths 'set-build-vars (lambda* (#:key inputs #:allow-other-keys) (setenv "RENPY_CYTHON" @@ -1170,6 +1188,7 @@ developed mainly for Ren'py.") (inputs `(("ffmpeg" ,ffmpeg) ("freetype" ,freetype) + ("fribidi" ,fribidi) ("glew" ,glew) ("libpng" ,libpng) ("python2-pygame" ,python2-pygame-sdl2) diff --git a/gnu/packages/patches/renpy-use-system-fribidi.patch b/gnu/packages/patches/renpy-use-system-fribidi.patch new file mode 100644 index 0000000000..1437274bcc --- /dev/null +++ b/gnu/packages/patches/renpy-use-system-fribidi.patch @@ -0,0 +1,52 @@ +See also [Arch] and [Gentoo] for similar patches in other distros. +[Arch] https://github.com/archlinux/svntogit-community/blob/packages/renpy/trunk/renpy-system-fribidi.patch +[Gentoo] https://gitweb.gentoo.org/repo/gentoo.git/tree/games-engines/renpy/files/renpy-7.3.5-use-system-fribidi.patch + +Index: renpy-7.3.5-source/module/renpybidicore.c +=================================================================== +--- renpy-7.3.5-source.orig/module/renpybidicore.c ++++ renpy-7.3.5-source/module/renpybidicore.c +@@ -1,5 +1,5 @@ + #include +-#include ++#include + #include + + #ifndef alloca +Index: renpy-7.3.5-source/module/setup.py +=================================================================== +--- renpy-7.3.5-source.orig/module/setup.py ++++ renpy-7.3.5-source/module/setup.py +@@ -119,30 +119,13 @@ cython( + sdl + [ png, 'z', 'm' ]) + + FRIBIDI_SOURCES = """ +-fribidi-src/lib/fribidi.c +-fribidi-src/lib/fribidi-arabic.c +-fribidi-src/lib/fribidi-bidi.c +-fribidi-src/lib/fribidi-bidi-types.c +-fribidi-src/lib/fribidi-deprecated.c +-fribidi-src/lib/fribidi-joining.c +-fribidi-src/lib/fribidi-joining-types.c +-fribidi-src/lib/fribidi-mem.c +-fribidi-src/lib/fribidi-mirroring.c +-fribidi-src/lib/fribidi-run.c +-fribidi-src/lib/fribidi-shape.c + renpybidicore.c + """.split() + cython( + "_renpybidi", + FRIBIDI_SOURCES, +- includes=[ +- BASE + "/fribidi-src/", +- BASE + "/fribidi-src/lib/", +- ], +- define_macros=[ +- ("FRIBIDI_ENTRY", ""), +- ("HAVE_CONFIG_H", "1"), +- ]) ++ includes=["/usr/include/fribidi"], ++ libs=["fribidi"]) + + + cython("_renpysteam", language="c++", compile_if=steam_sdk, libs=["steam_api"]) -- cgit v1.2.3