guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

01/03: services: Fix 'mkdir-p' in activation scripts.


From: Ludovic Courtès
Subject: 01/03: services: Fix 'mkdir-p' in activation scripts.
Date: Wed, 25 Jan 2017 13:34:48 +0000 (UTC)

civodul pushed a commit to branch master
in repository guix.

commit e57bd0bed86caac304e5f37c5653e6b13858c7c5
Author: Clément Lassieur <address@hidden>
Date:   Tue Jan 24 23:50:33 2017 +0100

    services: Fix 'mkdir-p' in activation scripts.
    
    * gnu/services/cups.scm (%cups-activation): Import (guix build utils).
    * gnu/services/mail.scm (opensmtpd-activation): Idem.
    * gnu/services/networking.scm (ntp-service-activation): Idem.
    * gnu/services/spice.scm (spice-vdagent-activation): Idem.
    * gnu/services/ssh.scm (openssh-activation): Idem.
      (dropbear-activation): Idem.
    * gnu/services/vpn.scm (%openvpn-activation): Idem.
    
    Signed-off-by: Ludovic Courtès <address@hidden>
---
 gnu/services/cups.scm       |    2 ++
 gnu/services/mail.scm       |    2 ++
 gnu/services/networking.scm |    2 ++
 gnu/services/spice.scm      |    5 ++++-
 gnu/services/ssh.scm        |    3 +++
 gnu/services/vpn.scm        |    5 ++++-
 6 files changed, 17 insertions(+), 2 deletions(-)

diff --git a/gnu/services/cups.scm b/gnu/services/cups.scm
index df1843e..70b8584 100644
--- a/gnu/services/cups.scm
+++ b/gnu/services/cups.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 Andy Wingo <address@hidden>
+;;; Copyright © 2017 Clément Lassieur <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -811,6 +812,7 @@ IPP specifications.")
   ;; Activation gexp.
   (with-imported-modules '((guix build utils))
     #~(begin
+        (use-modules (guix build utils))
         (define (mkdir-p/perms directory owner perms)
           (mkdir-p directory)
           (chown "/var/run/cups" (passwd:uid owner) (passwd:gid owner))
diff --git a/gnu/services/mail.scm b/gnu/services/mail.scm
index c138140..30b1672 100644
--- a/gnu/services/mail.scm
+++ b/gnu/services/mail.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2015 Andy Wingo <address@hidden>
+;;; Copyright © 2017 Clément Lassieur <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -1601,6 +1602,7 @@ accept from local for any relay
     (($ <opensmtpd-configuration> package config-file)
      (let ((smtpd (file-append package "/sbin/smtpd")))
        #~(begin
+           (use-modules (guix build utils))
            ;; Create mbox and spool directories.
            (mkdir-p "/var/mail")
            (mkdir-p "/var/spool/smtpd")
diff --git a/gnu/services/networking.scm b/gnu/services/networking.scm
index 8f136f0..f7412ff 100644
--- a/gnu/services/networking.scm
+++ b/gnu/services/networking.scm
@@ -3,6 +3,7 @@
 ;;; Copyright © 2015 Mark H Weaver <address@hidden>
 ;;; Copyright © 2016 Efraim Flashner <address@hidden>
 ;;; Copyright © 2016 John Darrington <address@hidden>
+;;; Copyright © 2017 Clément Lassieur <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -332,6 +333,7 @@ restrict -6 ::1\n"))
   "Return the activation gexp for CONFIG."
   (with-imported-modules '((guix build utils))
     #~(begin
+        (use-modules (guix build utils))
         (define %user
           (getpw "ntpd"))
 
diff --git a/gnu/services/spice.scm b/gnu/services/spice.scm
index bd0a538..2f9dfd5 100644
--- a/gnu/services/spice.scm
+++ b/gnu/services/spice.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2016 David Craven <address@hidden>
+;;; Copyright © 2017 Clément Lassieur <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -35,7 +36,9 @@
 
 (define (spice-vdagent-activation config)
   "Return the activation gexp for CONFIG."
-  #~(mkdir-p "/var/run/spice-vdagentd"))
+  #~(begin
+      (use-modules (guix build utils))
+      (mkdir-p "/var/run/spice-vdagentd")))
 
 (define (spice-vdagent-shepherd-service config)
   "Return a <shepherd-service> for spice-vdagentd with CONFIG."
diff --git a/gnu/services/ssh.scm b/gnu/services/ssh.scm
index 6da612d..58c35c9 100644
--- a/gnu/services/ssh.scm
+++ b/gnu/services/ssh.scm
@@ -2,6 +2,7 @@
 ;;; Copyright © 2014, 2015, 2016 Ludovic Courtès <address@hidden>
 ;;; Copyright © 2016 David Craven <address@hidden>
 ;;; Copyright © 2016 Julien Lepiller <address@hidden>
+;;; Copyright © 2017 Clément Lassieur <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -292,6 +293,7 @@ The other options should be self-descriptive."
 (define (openssh-activation config)
   "Return the activation GEXP for CONFIG."
   #~(begin
+      (use-modules (guix build utils))
       (mkdir-p "/etc/ssh")
       (mkdir-p (dirname #$(openssh-configuration-pid-file config)))
 
@@ -388,6 +390,7 @@ The other options should be self-descriptive."
 (define (dropbear-activation config)
   "Return the activation gexp for CONFIG."
   #~(begin
+      (use-modules (guix build utils))
       (mkdir-p "/etc/dropbear")))
 
 (define (dropbear-shepherd-service config)
diff --git a/gnu/services/vpn.scm b/gnu/services/vpn.scm
index f577e08..844a11b 100644
--- a/gnu/services/vpn.scm
+++ b/gnu/services/vpn.scm
@@ -1,5 +1,6 @@
 ;;; GNU Guix --- Functional package management for GNU
 ;;; Copyright © 2017 Julien Lepiller <address@hidden>
+;;; Copyright © 2017 Clément Lassieur <address@hidden>
 ;;;
 ;;; This file is part of GNU Guix.
 ;;;
@@ -444,7 +445,9 @@ is trunkated and rewritten every minute.")
          (shell (file-append shadow "/sbin/nologin")))))
 
 (define %openvpn-activation
-  #~(mkdir-p "/var/run/openvpn"))
+  #~(begin
+      (use-modules (guix build utils))
+      (mkdir-p "/var/run/openvpn")))
 
 (define openvpn-server-service-type
   (service-type (name 'openvpn-server)



reply via email to

[Prev in Thread] Current Thread [Next in Thread]