From dc20709ace1f15c3bf5e6cfda07f4d86ac0d97a9 Mon Sep 17 00:00:00 2001 From: Arun Isaac Date: Wed, 21 Dec 2022 13:30:24 +0000 Subject: Separate out sudo into a variable. * genenetwork-development.scm (genenetwork-projects): Separate out "/run/setuid-programs/sudo" into ... (sudo): ... new variable. --- genenetwork-development.scm | 17 +++++++---------- 1 file changed, 7 insertions(+), 10 deletions(-) diff --git a/genenetwork-development.scm b/genenetwork-development.scm index 2e7c728..8176d0d 100644 --- a/genenetwork-development.scm +++ b/genenetwork-development.scm @@ -71,6 +71,11 @@ (define %guix-daemon-uri "/var/host-guix/daemon-socket/socket") +;; We cannot refer to sudo in the store since that sudo does not have +;; the setuid bit set. See "(guix) Setuid Programs". +(define sudo + "/run/setuid-programs/sudo") + (define (manifest-cons package onto-manifest) "Return a manifest with PACKAGE and all packages in ONTO-MANIFEST." (manifest (cons (package->manifest-entry package) @@ -222,11 +227,7 @@ command to be executed." #~(begin (use-modules (guix build utils)) (when (string=? (getenv "RESULT") "success") - ;; We cannot refer to sudo in the - ;; store since that sudo does not have - ;; the setuid bit set. See "(guix) - ;; Setuid Programs". - (invoke "/run/setuid-programs/sudo" + (invoke #$sudo #$(file-append shepherd "/bin/herd") "restart" "genenetwork2") (invoke #$(file-append laminar "/bin/laminarc") @@ -256,11 +257,7 @@ command to be executed." #~(begin (use-modules (guix build utils)) (when (string=? (getenv "RESULT") "success") - ;; We cannot refer to sudo in the - ;; store since that sudo does not have - ;; the setuid bit set. See "(guix) - ;; Setuid Programs". - (invoke "/run/setuid-programs/sudo" + (invoke #$sudo #$(file-append shepherd "/bin/herd") "restart" "genenetwork3") (invoke #$(file-append laminar "/bin/laminarc") -- cgit v1.2.3