[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
04/09: self: Install 'guix-daemon.cil'.
From: |
guix-commits |
Subject: |
04/09: self: Install 'guix-daemon.cil'. |
Date: |
Thu, 25 May 2023 06:52:52 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit ca1ea6373ab6faeab729c8767e62ede63b8e9f9a
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Thu May 25 12:31:33 2023 +0200
self: Install 'guix-daemon.cil'.
* guix/self.scm (selinux-policy): New procedure.
(miscellaneous-files): Add 'daemon' parameter. Add 'guix-daemon.cil'.
(compiled-guix): Adjust call to 'miscellaneous-files'.
---
guix/self.scm | 28 +++++++++++++++++++++++++---
1 file changed, 25 insertions(+), 3 deletions(-)
diff --git a/guix/self.scm b/guix/self.scm
index 9e0aa82698..81a36e007f 100644
--- a/guix/self.scm
+++ b/guix/self.scm
@@ -654,7 +654,26 @@ load path."
;; Use a 'guile' variant that doesn't complain about locales.
#:guile (quiet-guile guile)))
-(define (miscellaneous-files source)
+(define (selinux-policy source daemon)
+ "Return the SELinux policy file taken from SOURCE and adjusted to refer to
+DAEMON and to the current configuration variables."
+ (define build
+ (with-imported-modules '((guix build utils))
+ #~(begin
+ (use-modules (guix build utils))
+
+ (copy-file #+(file-append* source "/etc/guix-daemon.cil.in")
+ "guix-daemon.cil")
+ (substitute* "guix-daemon.cil"
+ (("@guix_sysconfdir@") #$%sysconfdir)
+ (("@guix_localstatedir@") #$%localstatedir)
+ (("@storedir@") #$%storedir)
+ (("@prefix@") #$daemon))
+ (copy-file "guix-daemon.cil" #$output))))
+
+ (computed-file "guix-daemon.cil" build))
+
+(define (miscellaneous-files source daemon)
"Return data files taken from SOURCE."
(file-mapping "guix-misc"
`(("etc/bash_completion.d/guix"
@@ -665,6 +684,8 @@ load path."
,(file-append* source "/etc/completion/zsh/_guix"))
("share/fish/vendor_completions.d/guix.fish"
,(file-append* source "/etc/completion/fish/guix.fish"))
+ ("share/selinux/guix-daemon.cil"
+ ,(selinux-policy source daemon))
("share/guix/berlin.guix.gnu.org.pub"
,(file-append* source
"/etc/substitutes/berlin.guix.gnu.org.pub"))
@@ -1023,6 +1044,7 @@ itself."
(cond ((= 1 pull-version)
;; The whole package, with a standard file hierarchy.
(let* ((modules (built-modules (compose list node-source+compiled)))
+ (daemon (specification->package "guix-daemon"))
(command (guix-command modules
#:source source
#:dependencies
@@ -1038,10 +1060,10 @@ itself."
;; Include 'guix-daemon'. XXX: Here we inject an
;; older snapshot of guix-daemon, but that's a good
;; enough approximation for now.
- #:daemon (specification->package "guix-daemon")
+ #:daemon daemon
#:info (info-manual source)
- #:miscellany (miscellaneous-files source)
+ #:miscellany (miscellaneous-files source daemon)
#:guile-version guile-version)))
((= 0 pull-version)
;; Legacy 'guix pull': return the .scm and .go files as one
- branch master updated (0b0c2ef638 -> a9cde26133), guix-commits, 2023/05/25
- 02/09: guix-install.sh: Install SELinux policy and relabel file systems if needed., guix-commits, 2023/05/25
- 01/09: etc: SELinux: Update policy file., guix-commits, 2023/05/25
- 03/09: doc: Tweak SELinux instructions., guix-commits, 2023/05/25
- 04/09: self: Install 'guix-daemon.cil'.,
guix-commits <=
- 05/09: gnu: encfs: Depend on OpenSSL v1.1 to fix test segfault., guix-commits, 2023/05/25
- 06/09: gnu: yt-dlp: Fix substitution for ffmpeg path., guix-commits, 2023/05/25
- 08/09: gnu: tinyproxy: Update to 1.11.1., guix-commits, 2023/05/25
- 09/09: gnu: Add mouseloupe., guix-commits, 2023/05/25
- 07/09: gnu: Add dialect., guix-commits, 2023/05/25