From unknown Sun Jun 22 04:13:11 2025 X-Loop: help-debbugs@gnu.org Subject: [bug#75049] [PATCH] services: rootless-podman: Fix PATH lookup for Shepherd services. Resent-From: Giacomo Leidi Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 23 Dec 2024 14:34:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 75049 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 75049@debbugs.gnu.org Cc: Giacomo Leidi X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.1734964417628 (code B ref -1); Mon, 23 Dec 2024 14:34:02 +0000 Received: (at submit) by debbugs.gnu.org; 23 Dec 2024 14:33:37 +0000 Received: from localhost ([127.0.0.1]:53841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPjV2-0000A3-4F for submit@debbugs.gnu.org; Mon, 23 Dec 2024 09:33:36 -0500 Received: from lists.gnu.org ([209.51.188.17]:59818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPjV0-00009u-0i for submit@debbugs.gnu.org; Mon, 23 Dec 2024 09:33:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPjUz-0007nL-HW for guix-patches@gnu.org; Mon, 23 Dec 2024 09:33:33 -0500 Received: from confino.investici.org ([93.190.126.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPjUx-0007xW-Ad for guix-patches@gnu.org; Mon, 23 Dec 2024 09:33:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1734964406; bh=VbVRc3EEQXNrOfgczgR/E0vFn9QBfvWXrPXYk9q5lBc=; h=From:To:Cc:Subject:Date:From; b=uGGyBxfRqDh55WElSldM7CSW6kNE45lLHrOwlommPlZlqhtITznGhDhxg7pQbNOum CdHkqq2jdPNuxfAlV7UPzSTDVu0slOkiAQa4l4LHm38Dhh9rSc9E5O9wFF+gWmbvyD +w3SIGzhUoDy8mzGwAh68wwW/2h8E9rXRBZCkUL8= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4YH0r62TJjz10xQ; Mon, 23 Dec 2024 14:33:26 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4YH0r61Jsdz10xF; Mon, 23 Dec 2024 14:33:26 +0000 (UTC) From: Giacomo Leidi Date: Mon, 23 Dec 2024 15:33:20 +0100 Message-ID: <99a0c9bc2073bfe2f3bc21da3b1e84c15e0d6462.1734964400.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=93.190.126.19; envelope-from=goodoldpaul@autistici.org; helo=confino.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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 . (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 From unknown Sun Jun 22 04:13:11 2025 MIME-Version: 1.0 X-Mailer: MIME-tools 5.505 (Entity 5.505) X-Loop: help-debbugs@gnu.org From: help-debbugs@gnu.org (GNU bug Tracking System) To: Giacomo Leidi Subject: bug#75049: closed (Re: [bug#75049] [PATCH] services: rootless-podman: Fix PATH lookup for Shepherd services.) Message-ID: References: <875xn72xzw.fsf@gnu.org> <99a0c9bc2073bfe2f3bc21da3b1e84c15e0d6462.1734964400.git.goodoldpaul@autistici.org> X-Gnu-PR-Message: they-closed 75049 X-Gnu-PR-Package: guix-patches X-Gnu-PR-Keywords: patch Reply-To: 75049@debbugs.gnu.org Date: Wed, 25 Dec 2024 22:35:02 +0000 Content-Type: multipart/mixed; boundary="----------=_1735166102-18206-1" This is a multi-part message in MIME format... ------------=_1735166102-18206-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Your bug report #75049: [PATCH] services: rootless-podman: Fix PATH lookup for Shepherd ser= vices. which was filed against the guix-patches package, has been closed. The explanation is attached below, along with your original report. If you require more details, please reply to 75049@debbugs.gnu.org. --=20 75049: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=3D75049 GNU Bug Tracking System Contact help-debbugs@gnu.org with problems ------------=_1735166102-18206-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at 75049-done) by debbugs.gnu.org; 25 Dec 2024 22:34:22 +0000 Received: from localhost ([127.0.0.1]:39290 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQZxO-0004iT-9G for submit@debbugs.gnu.org; Wed, 25 Dec 2024 17:34:22 -0500 Received: from eggs.gnu.org ([209.51.188.92]:39946) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tQZxL-0004iG-UW for 75049-done@debbugs.gnu.org; Wed, 25 Dec 2024 17:34:20 -0500 Received: from fencepost.gnu.org ([2001:470:142:3::e]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tQZxF-0001hD-9P; Wed, 25 Dec 2024 17:34:13 -0500 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org; s=fencepost-gnu-org; h=MIME-Version:Date:References:In-Reply-To:Subject:To: From; bh=wQR1pkxYGLNgItDrDYxWmKL79Gd1Ehuphi5w45M19uM=; b=gXqopvZasalcv+3t3Rwz DOcSWJySJBdpZnUkQOGEvrUrSBZ3OZNsoMNXjRDhDlaLopbncboIKk5GY2KhIz66whXXvJ1AYWU/T 81/nJVi95R7p1rOrQQPQ1LsjMQCzGLEmi6bEbMmJxWKLO3taAUvxjEIuxej9JBxsQ/1uPs/rMqgzO z98BkJzWTl6pwDj6jaiCw1VD3ANzhUXYiuMLH7zcSEYmu1x7yRpkWFxNdnPjt4P9ra0UQ22EdGMOu Qzv3dKabK3L//eTS9OePpy0V56POLAxboQUJ3cRM3pp6oZhqQ72YeuM3cfhgBWojXxy4KwO3MBF3P fwO6oESrFS9gUg==; From: =?utf-8?Q?Ludovic_Court=C3=A8s?= To: Giacomo Leidi Subject: Re: [bug#75049] [PATCH] services: rootless-podman: Fix PATH lookup for Shepherd services. In-Reply-To: <99a0c9bc2073bfe2f3bc21da3b1e84c15e0d6462.1734964400.git.goodoldpaul@autistici.org> (Giacomo Leidi's message of "Mon, 23 Dec 2024 15:33:20 +0100") References: <99a0c9bc2073bfe2f3bc21da3b1e84c15e0d6462.1734964400.git.goodoldpaul@autistici.org> Date: Wed, 25 Dec 2024 23:34:11 +0100 Message-ID: <875xn72xzw.fsf@gnu.org> User-Agent: Gnus/5.13 (Gnus v5.13) MIME-Version: 1.0 Content-Type: text/plain X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 75049-done Cc: 75049-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) Giacomo Leidi skribis: > 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 Applied, thanks! ------------=_1735166102-18206-1 Content-Type: message/rfc822 Content-Disposition: inline Content-Transfer-Encoding: 7bit Received: (at submit) by debbugs.gnu.org; 23 Dec 2024 14:33:37 +0000 Received: from localhost ([127.0.0.1]:53841 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPjV2-0000A3-4F for submit@debbugs.gnu.org; Mon, 23 Dec 2024 09:33:36 -0500 Received: from lists.gnu.org ([209.51.188.17]:59818) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1tPjV0-00009u-0i for submit@debbugs.gnu.org; Mon, 23 Dec 2024 09:33:34 -0500 Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPjUz-0007nL-HW for guix-patches@gnu.org; Mon, 23 Dec 2024 09:33:33 -0500 Received: from confino.investici.org ([93.190.126.19]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1tPjUx-0007xW-Ad for guix-patches@gnu.org; Mon, 23 Dec 2024 09:33:33 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=autistici.org; s=stigmate; t=1734964406; bh=VbVRc3EEQXNrOfgczgR/E0vFn9QBfvWXrPXYk9q5lBc=; h=From:To:Cc:Subject:Date:From; b=uGGyBxfRqDh55WElSldM7CSW6kNE45lLHrOwlommPlZlqhtITznGhDhxg7pQbNOum CdHkqq2jdPNuxfAlV7UPzSTDVu0slOkiAQa4l4LHm38Dhh9rSc9E5O9wFF+gWmbvyD +w3SIGzhUoDy8mzGwAh68wwW/2h8E9rXRBZCkUL8= Received: from mx1.investici.org (unknown [127.0.0.1]) by confino.investici.org (Postfix) with ESMTP id 4YH0r62TJjz10xQ; Mon, 23 Dec 2024 14:33:26 +0000 (UTC) Received: from [93.190.126.19] (mx1.investici.org [93.190.126.19]) (Authenticated sender: goodoldpaul@autistici.org) by localhost (Postfix) with ESMTPSA id 4YH0r61Jsdz10xF; Mon, 23 Dec 2024 14:33:26 +0000 (UTC) From: Giacomo Leidi To: guix-patches@gnu.org Subject: [PATCH] services: rootless-podman: Fix PATH lookup for Shepherd services. Date: Mon, 23 Dec 2024 15:33:20 +0100 Message-ID: <99a0c9bc2073bfe2f3bc21da3b1e84c15e0d6462.1734964400.git.goodoldpaul@autistici.org> X-Mailer: git-send-email 2.46.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Received-SPF: pass client-ip=93.190.126.19; envelope-from=goodoldpaul@autistici.org; helo=confino.investici.org X-Spam_score_int: -27 X-Spam_score: -2.8 X-Spam_bar: -- X-Spam_report: (-2.8 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_VALIDITY_RPBL_BLOCKED=0.001, RCVD_IN_VALIDITY_SAFE_BLOCKED=0.001, SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.4 (-) X-Debbugs-Envelope-To: submit Cc: Giacomo Leidi X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.4 (--) 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 . (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 ------------=_1735166102-18206-1--