From dfc8ccbf5da96a67eb1cade499f0def21e7fdb02 Mon Sep 17 00:00:00 2001 From: Mathieu Othacehe Date: Tue, 31 Dec 2019 09:56:51 +0100 Subject: system: Stop using canonical-package. Usage of canonical-package outside of thunked fields breaks cross-compilation, see: https://lists.gnu.org/archive/html/guix-devel/2019-12/msg00410.html. * gnu/installer.scm (installer-program): Remove canonical-package. * gnu/services/base.scm (): Ditto, (%base-services): ditto. * gnu/services/xorg.scm: Remove useless canonical-package import. * gnu/system.scm (%base-packages): Remove canonical-package. * gnu/system/install.scm (%installation-services): Ditto, (installation-os): ditto. * gnu/system/locale.scm (single-locale-directory): Ditto. --- gnu/services/base.scm | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'gnu/services/base.scm') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 0c154d1c4e..6988edc249 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -45,7 +45,7 @@ #:select (alsa-utils crda eudev e2fsprogs fuse gpm kbd lvm2 rng-tools)) #:use-module (gnu packages bash) #:use-module ((gnu packages base) - #:select (canonical-package coreutils glibc glibc-utf8-locales)) + #:select (coreutils glibc glibc-utf8-locales)) #:use-module (gnu packages package-management) #:use-module ((gnu packages gnupg) #:select (guile-gcrypt)) #:use-module (gnu packages linux) @@ -1212,7 +1212,7 @@ the tty to run, among other things." (name-services nscd-configuration-name-services ;list of (default '())) (glibc nscd-configuration-glibc ; - (default (canonical-package glibc)))) + (default glibc))) (define-record-type* nscd-cache make-nscd-cache nscd-cache? @@ -2445,9 +2445,7 @@ to handle." (rules (list lvm2 fuse alsa-utils crda)))) (service special-files-service-type - `(("/bin/sh" ,(file-append (canonical-package bash) - "/bin/sh")) - ("/usr/bin/env" ,(file-append (canonical-package coreutils) - "/bin/env")))))) + `(("/bin/sh" ,(file-append bash "/bin/sh")) + ("/usr/bin/env" ,(file-append coreutils "/bin/env")))))) ;;; base.scm ends here -- cgit 1.4.1 From d594963856690f1aacf228c8a83e406d33bc44ce Mon Sep 17 00:00:00 2001 From: Marius Bakke Date: Sat, 14 Mar 2020 13:19:06 +0100 Subject: gnu: eudev: Remove bugfix variant. * gnu/packages/linux.scm (eudev/btrfs-fix): Remove variable. (eudev)[arguments]: Add phase patch-bindir-in-btrfs-rules. * gnu/services/base.scm (, udev-service): Refer to EUDEV instead of EUDEV/BTRFS-FIX. --- gnu/packages/linux.scm | 30 ++++++++++-------------------- gnu/services/base.scm | 4 ++-- 2 files changed, 12 insertions(+), 22 deletions(-) (limited to 'gnu/services/base.scm') diff --git a/gnu/packages/linux.scm b/gnu/packages/linux.scm index 04788d2f8a..b0600642d5 100644 --- a/gnu/packages/linux.scm +++ b/gnu/packages/linux.scm @@ -2871,6 +2871,16 @@ to the in-kernel OOM killer.") (or native-inputs inputs) "xsltproc") "/bin/xsltproc"))) #t)) + (add-before 'configure 'patch-bindir-in-btrfs-rules + (lambda* (#:key outputs #:allow-other-keys) + ;; The "@bindir@" substitution incorrectly expands to a literal + ;; "${exec_prefix}" (see ). Work + ;; around it. + (let ((out (assoc-ref outputs "out"))) + (substitute* "rules/64-btrfs.rules.in" + (("@bindir@") + (string-append out "/bin"))) + #t))) (add-after 'install 'move-static-library (lambda* (#:key outputs #:allow-other-keys) (let* ((out (assoc-ref outputs "out")) @@ -2927,26 +2937,6 @@ device nodes from /dev/, handles hotplug events and loads drivers at boot time.") (license license:gpl2+))) -;; TODO: Merge with eudev on the next rebuild cycle. -(define-public eudev/btrfs-fix - (package/inherit - eudev - (version (string-append (package-version eudev) "-1")) - (arguments - (substitute-keyword-arguments (package-arguments eudev) - ((#:phases phases '%standard-phases) - `(modify-phases ,phases - (add-before 'configure 'patch-bindir-in-btrfs-rules - (lambda* (#:key outputs #:allow-other-keys) - ;; The "@bindir@" substitution incorrectly expands to a literal - ;; "${exec_prefix}" (see ). Work - ;; around it. - (let ((out (assoc-ref outputs "out"))) - (substitute* "rules/64-btrfs.rules.in" - (("@bindir@") - (string-append out "/bin"))) - #t))))))))) - (define-public eudev-with-hwdb (deprecated-package "eudev-with-hwdb" eudev)) diff --git a/gnu/services/base.scm b/gnu/services/base.scm index ceb6374bfc..b39d0f6610 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1918,7 +1918,7 @@ archive}). If that is not the case, the service will fail to start." udev-configuration make-udev-configuration udev-configuration? (udev udev-configuration-udev ; - (default eudev/btrfs-fix)) + (default eudev)) (rules udev-configuration-rules ;list of (default '()))) @@ -2116,7 +2116,7 @@ the udev rules in use.") directory dynamically. Get extra rules from the packages listed in the @code{rules} field of its value, @code{udev-configuration} object."))) -(define* (udev-service #:key (udev eudev/btrfs-fix) (rules '())) +(define* (udev-service #:key (udev eudev) (rules '())) "Run @var{udev}, which populates the @file{/dev} directory dynamically. Get extra rules from the packages listed in @var{rules}." (service udev-service-type -- cgit 1.4.1 From 4c0cc7bed3de2c0e2d3a6e95b88693941e839eec Mon Sep 17 00:00:00 2001 From: Diego Nicola Barbato Date: Tue, 28 Apr 2020 13:31:54 +0200 Subject: services: syslog: Simplify 'start' method. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This is a followup to d7113bb655ff80a868a9e624c913f9d23e6c63ad and e3358a831e7d5d9e8dc614340e49ea5aeb11a7ff. * gnu/services/base.scm (syslog-service-type): Change 'start' method to set umask using the #:file-creation-mask parameter of 'make-forkexec-constructor' introduced in version 0.8.0 of the Shepherd. Signed-off-by: Ludovic Courtès --- gnu/services/base.scm | 18 +++++++----------- 1 file changed, 7 insertions(+), 11 deletions(-) (limited to 'gnu/services/base.scm') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 2913478e4a..0f119cc2f9 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1316,17 +1316,13 @@ Service Switch}, for an example." (documentation "Run the syslog daemon (syslogd).") (provision '(syslogd)) (requirement '(user-processes)) - (start #~(let ((spawn (make-forkexec-constructor - (list #$(syslog-configuration-syslogd config) - "--rcfile" - #$(syslog-configuration-config-file config)) - #:pid-file "/var/run/syslog.pid"))) - (lambda () - ;; Set the umask such that file permissions are #o640. - (let ((mask (umask #o137)) - (pid (spawn))) - (umask mask) - pid)))) + (start #~(make-forkexec-constructor + (list #$(syslog-configuration-syslogd config) + "--rcfile" + #$(syslog-configuration-config-file config)) + ;; Set the umask such that file permissions are #o640. + #:file-creation-mask #o137 + #:pid-file "/var/run/syslog.pid")) (stop #~(make-kill-destructor)))))) ;; Snippet adapted from the GNU inetutils manual. -- cgit 1.4.1 From ec4fea69df8969ec61fcb554255a0a7f02421c74 Mon Sep 17 00:00:00 2001 From: Giacomo Leidi Date: Mon, 4 May 2020 16:58:24 +0200 Subject: services: For "sddm" pam service, include "limits.conf". * gnu/services/base.scm (pam-limits-service-type): For "sddm" pam service, include "limits.conf". Signed-off-by: Marius Bakke --- gnu/services/base.scm | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'gnu/services/base.scm') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index 0f119cc2f9..a031ccc04b 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1379,7 +1379,7 @@ information on the configuration file syntax." (module "pam_limits.so") (arguments '("conf=/etc/security/limits.conf"))))) (if (member (pam-service-name pam) - '("login" "su" "slim" "gdm-password")) + '("login" "su" "slim" "gdm-password" "sddm")) (pam-service (inherit pam) (session (cons pam-limits -- cgit 1.4.1 From 5aa4d2dcf2f4f8786358feb45338893ed08a4cd9 Mon Sep 17 00:00:00 2001 From: Ludovic Courtès Date: Thu, 7 May 2020 12:45:43 +0200 Subject: Revert "services: syslog: Simplify 'start' method." This reverts commit 4c0cc7bed3de2c0e2d3a6e95b88693941e839eec. Fixes . Reported by Alex Sassmannshausen . The problem is that reconfiguring on a system running Shepherd < 0.8.0 would lead to an error, due to #:file-creation-mask not being supported. The error is rather harmless: it prevents service upgrade but the system itself is upgraded. We can reinstate that commit eventually, once #:file-creation-mask has become widespread. --- gnu/services/base.scm | 18 +++++++++++------- 1 file changed, 11 insertions(+), 7 deletions(-) (limited to 'gnu/services/base.scm') diff --git a/gnu/services/base.scm b/gnu/services/base.scm index a031ccc04b..b14bbcc3cd 100644 --- a/gnu/services/base.scm +++ b/gnu/services/base.scm @@ -1316,13 +1316,17 @@ Service Switch}, for an example." (documentation "Run the syslog daemon (syslogd).") (provision '(syslogd)) (requirement '(user-processes)) - (start #~(make-forkexec-constructor - (list #$(syslog-configuration-syslogd config) - "--rcfile" - #$(syslog-configuration-config-file config)) - ;; Set the umask such that file permissions are #o640. - #:file-creation-mask #o137 - #:pid-file "/var/run/syslog.pid")) + (start #~(let ((spawn (make-forkexec-constructor + (list #$(syslog-configuration-syslogd config) + "--rcfile" + #$(syslog-configuration-config-file config)) + #:pid-file "/var/run/syslog.pid"))) + (lambda () + ;; Set the umask such that file permissions are #o640. + (let ((mask (umask #o137)) + (pid (spawn))) + (umask mask) + pid)))) (stop #~(make-kill-destructor)))))) ;; Snippet adapted from the GNU inetutils manual. -- cgit 1.4.1