From: Giacomo Leidi via Guix-patches via <guix-patches@gnu.org>
To: 75049@debbugs.gnu.org
Cc: Giacomo Leidi <goodoldpaul@autistici.org>
Subject: [bug#75049] [PATCH] services: rootless-podman: Fix PATH lookup for Shepherd services.
Date: Mon, 23 Dec 2024 15:33:20 +0100 [thread overview]
Message-ID: <99a0c9bc2073bfe2f3bc21da3b1e84c15e0d6462.1734964400.git.goodoldpaul@autistici.org> (raw)
One-shot Shepherd services required to correctly setup Podman in the
Guix System, are failing to find executables upon boot. This patch
changes the executable references to absolute paths to avoid PATH
lookup.
* gnu/services/containers.scm (cgroups-fs-owner-entrypoint): Hardcode
bash path;
(rootless-podman-cgroups-fs-owner-service): Ditto;
(rootless-podman-fs-entrypoint): Hardcode mount path.
Change-Id: Id6a27cadf51326ce57af93f57809b77e28dbeaef
---
gnu/services/containers.scm | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/gnu/services/containers.scm b/gnu/services/containers.scm
index 03f0649c0d..d8f533f44c 100644
--- a/gnu/services/containers.scm
+++ b/gnu/services/containers.scm
@@ -17,6 +17,7 @@
;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>.
(define-module (gnu services containers)
+ #:use-module (gnu packages bash)
#:use-module (gnu packages containers)
#:use-module (gnu packages file-systems)
#:use-module (gnu services)
@@ -134,7 +135,7 @@ (define (cgroups-fs-owner-entrypoint config)
(rootless-podman-configuration-group-name config))
(program-file "cgroups2-fs-owner-entrypoint"
#~(system*
- "bash" "-c"
+ (string-append #+bash-minimal "/bin/bash") "-c"
(string-append "echo Setting /sys/fs/cgroup "
"group ownership to " #$group " && chown -v "
"root:" #$group " /sys/fs/cgroup && "
@@ -166,7 +167,7 @@ (define (rootless-podman-cgroups-fs-owner-service config)
(define cgroups-limits-entrypoint
(program-file "cgroups2-limits-entrypoint"
#~(system*
- "bash" "-c"
+ (string-append #+bash-minimal "/bin/bash") "-c"
(string-append "echo Setting cgroups v2 limits && "
"echo +cpu +cpuset +memory +pids"
" >> /sys/fs/cgroup/cgroup.subtree_control"))))
@@ -194,7 +195,7 @@ (define (rootless-podman-cgroups-limits-service config)
(define rootless-podman-shared-root-fs-entrypoint
(program-file "rootless-podman-shared-root-fs-entrypoint"
#~(system*
- "mount" "--make-shared" "/")))
+ "/run/privileged/bin/mount" "--make-shared" "/")))
(define (rootless-podman-shared-root-fs-service config)
(shepherd-service (provision '(rootless-podman-shared-root-fs))
base-commit: 1a55fa23d881a1816ebd05ebdacc55746a8c8ab9
--
2.46.0
reply other threads:[~2024-12-23 14:34 UTC|newest]
Thread overview: [no followups] expand[flat|nested] mbox.gz Atom feed
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=99a0c9bc2073bfe2f3bc21da3b1e84c15e0d6462.1734964400.git.goodoldpaul@autistici.org \
--to=guix-patches@gnu.org \
--cc=75049@debbugs.gnu.org \
--cc=goodoldpaul@autistici.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/guix.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.