Subject: [PATCH 0/3] catatonit for podman

  • Done
  • quality assurance status badge
Details
3 participants
  • Jack Hill
  • Wilke Schwiedop
  • Simon Tournier
Owner
unassigned
Submitted by
Wilke Schwiedop
Severity
normal
W
W
Wilke Schwiedop wrote on 1 Nov 2023 19:23
(name . guix-patches@gnu.org)(address . guix-patches@gnu.org)
DB9P190MB1985EACDCB1AD8D10E7807F19EA7A@DB9P190MB1985.EURP190.PROD.OUTLOOK.COM
Add catatonit package and include it in podman.
catatonit is required for rootless `podman play kube` command to work
as podman will just abort if the catatonit binary cannot be found.

Wilke Schwiedop (3):
gnu: Add catatonit
gnu: podman: Use catatonit
remove outdated comment

gnu/packages/containers.scm | 42 ++++++++++++++++++++++++++++++-------
1 file changed, 35 insertions(+), 7 deletions(-)


base-commit: 2b5c6e1a41e4ddcf4cfa53a319ed784a856eac5d
--
2.41.0
W
W
Wilke Schwiedop wrote on 1 Nov 2023 19:45
Subject: [PATCH 1/3] gnu: Add catatonit
(name . 66887@debbugs.gnu.org)(address . 66887@debbugs.gnu.org)
DB9P190MB1985CD50B0ED6017C3F248E19EA7A@DB9P190MB1985.EURP190.PROD.OUTLOOK.COM
* gnu/packages/containers.scm (catatonit): New variable.
---
gnu/packages/containers.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (34 lines)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index a3aa9ac1db..e26b5acf21 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -309,6 +309,27 @@ (define-public cni-plugins
;; For podman to work, the user needs to run
;; `sudo mount -t cgroup2 none /sys/fs/cgroup`
+(define-public catatonit
+ (package
+ (name "catatonit")
+ (version "0.1.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/openSUSE/catatonit")
+ ; include fix for a build error that was merged shortly after 0.1.7
+ (commit "cf1fd8a1cc9a40a2c66019d9546891912419d747")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ac3vfs5d1ka6q21wr4cya9ka8w4c3z1syzdq9sgrks7qnnkxm2h"))))
+ (build-system gnu-build-system)
+ (native-inputs (list autoconf automake libtool))
+ (synopsis "Container init")
+ (description "A container init that is so simple it's effectively brain-dead.")
+ (home-page "https://github.com/openSUSE/catatonit")
+ (license license:gpl3)))
(define-public podman
(package
--
2.41.0
W
W
Wilke Schwiedop wrote on 1 Nov 2023 19:47
Subject: [PATCH 2/3] gnu: podman: Use catatonit
(name . 66887@debbugs.gnu.org)(address . 66887@debbugs.gnu.org)
DB9P190MB1985F6B5C65B67E6ACA7DE939EA7A@DB9P190MB1985.EURP190.PROD.OUTLOOK.COM
defaultHelperBinariesDir is a string array of paths searched by the
FindHelperBinary function. This patch inserts new entries at the
beginning of array instead of modifying individual elements. This will
make it easier to include additional helper binaries, e.g. aardvark,
netavark and pasta.
---
gnu/packages/containers.scm | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index e26b5acf21..c00394af2b 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -381,22 +381,31 @@ (define-public podman
(("CATATONIT_PATH=\"[^\"]+\"")
(string-append "CATATONIT_PATH=" (which "true"))))
(substitute* "vendor/github.com/containers/common/pkg/config/config_linux.go"
- (("/usr/local/libexec/podman")
- (string-append #$output "/libexec/podman"))
- (("/usr/local/lib/podman")
- (string-append #$output "/bin")))
+ (("var defaultHelperBinariesDir = ..string." all)
+ (string-append
+ all
+ (string-join
+ (map (lambda (s) (string-append "\n\"" s "\","))
+ (list
+ (string-append #$output "/libexec/podman")
+ (string-append #$output "/bin")
+ (string-append #$(this-package-input "catatonit") "/bin")))))))
(substitute* "vendor/github.com/containers/common/pkg/config/default.go"
(("/usr/libexec/podman/conmon") (which "conmon"))
(("/usr/local/libexec/cni")
(string-append #$(this-package-input "cni-plugins")
"/bin"))
- (("/usr/bin/crun") (which "crun")))))
+ (("/usr/bin/crun") (which "crun"))
+ (("/usr/libexec/podman/catatonit") (which "catatonit")))
+ (substitute* "pkg/rootless/rootless_linux.c"
+ (("/usr/bin/catatonit") (which "catatonit")))))
(add-after 'install 'install-completions
(lambda _
(invoke "make" "install.completions"
(string-append "PREFIX=" #$output)))))))
(inputs
(list btrfs-progs
+ catatonit
cni-plugins
conmon
crun
--
2.41.0
W
W
Wilke Schwiedop wrote on 1 Nov 2023 19:47
Subject: [PATCH 3/3] remove outdated comment
(name . 66887@debbugs.gnu.org)(address . 66887@debbugs.gnu.org)
DB9P190MB1985765353F0FB4D0817E9E29EA7A@DB9P190MB1985.EURP190.PROD.OUTLOOK.COM
cgroup2 is now the default in guix
---
gnu/packages/containers.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index c00394af2b..b864f83dcf 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -307,8 +307,6 @@ (define-public cni-plugins
configure network interfaces in Linux containers.")
(license license:asl2.0)))
-;; For podman to work, the user needs to run
-;; `sudo mount -t cgroup2 none /sys/fs/cgroup`
(define-public catatonit
(package
(name "catatonit")
--
2.41.0
J
J
Jack Hill wrote on 8 Nov 2023 18:22
[PATCH v2 0/3] resending catatonit patches for QA
(name . Wilke Schwiedop)(address . wilke.schwiedop@agfa.com)(address . 66887@debbugs.gnu.org)
df488964-c300-85d7-52e1-bf2768effa16@jackhill.us
Hi Guix,

I'm resending the catatonit series because it wasn't picked up properly by
patchwork/QA the first time. I haven't done a review of the patches, but
it does look like the commit messages will need to be re-worded to fit our
style.

Best,
Jack

Wilke Schwiedop (3):
gnu: Add catatonit.
gnu: podman: Use catatonit.
remove outdated comment

gnu/packages/containers.scm | 42 ++++++++++++++++++++++++++++++-------
1 file changed, 35 insertions(+), 7 deletions(-)


base-commit: 00fd6895322d0b1fd774e79494cfcad721b50b8d
--
2.41.0
J
J
Jack Hill wrote on 8 Nov 2023 18:24
[PATCH v2 1/3] gnu: Add catatonit.
(address . 66887@debbugs.gnu.org)(name . Wilke Schwiedop)(address . wilke.schwiedop@agfa.com)
2ff6efd2cef5ad6755c45b4397a9ec9f7ac5c1fc.1699464297.git.jackhill@jackhill.us
From: Wilke Schwiedop <wilke.schwiedop@agfa.com>

* gnu/packages/containers.scm (catatonit): New variable.

Change-Id: Ib6948bde8204426a8cb008982cb7cc9302f9e6d6
---
gnu/packages/containers.scm | 21 +++++++++++++++++++++
1 file changed, 21 insertions(+)

Toggle diff (36 lines)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index a3aa9ac1db..e26b5acf21 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -309,6 +309,27 @@ (define-public cni-plugins
;; For podman to work, the user needs to run
;; `sudo mount -t cgroup2 none /sys/fs/cgroup`
+(define-public catatonit
+ (package
+ (name "catatonit")
+ (version "0.1.7")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/openSUSE/catatonit")
+ ; include fix for a build error that was merged shortly after 0.1.7
+ (commit "cf1fd8a1cc9a40a2c66019d9546891912419d747")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "0ac3vfs5d1ka6q21wr4cya9ka8w4c3z1syzdq9sgrks7qnnkxm2h"))))
+ (build-system gnu-build-system)
+ (native-inputs (list autoconf automake libtool))
+ (synopsis "Container init")
+ (description "A container init that is so simple it's effectively brain-dead.")
+ (home-page "https://github.com/openSUSE/catatonit")
+ (license license:gpl3)))
(define-public podman
(package

base-commit: 00fd6895322d0b1fd774e79494cfcad721b50b8d
--
2.41.0
J
J
Jack Hill wrote on 8 Nov 2023 18:24
[PATCH v2 2/3] gnu: podman: Use catatonit.
(address . 66887@debbugs.gnu.org)(name . Wilke Schwiedop)(address . wilke.schwiedop@agfa.com)
4ca22003bd312ce469ecd843e8101402f9cf4177.1699464297.git.jackhill@jackhill.us
From: Wilke Schwiedop <wilke.schwiedop@agfa.com>

defaultHelperBinariesDir is a string array of paths searched by the
FindHelperBinary function. This patch inserts new entries at the
beginning of array instead of modifying individual elements. This will
make it easier to include additional helper binaries, e.g. aardvark,
netavark and pasta.

Change-Id: I2f988b9225f3fcee7f00c48ba3aedc9289ba9d47
---
gnu/packages/containers.scm | 19 ++++++++++++++-----
1 file changed, 14 insertions(+), 5 deletions(-)

Toggle diff (43 lines)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index e26b5acf21..c00394af2b 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -381,22 +381,31 @@ (define-public podman
(("CATATONIT_PATH=\"[^\"]+\"")
(string-append "CATATONIT_PATH=" (which "true"))))
(substitute* "vendor/github.com/containers/common/pkg/config/config_linux.go"
- (("/usr/local/libexec/podman")
- (string-append #$output "/libexec/podman"))
- (("/usr/local/lib/podman")
- (string-append #$output "/bin")))
+ (("var defaultHelperBinariesDir = ..string." all)
+ (string-append
+ all
+ (string-join
+ (map (lambda (s) (string-append "\n\"" s "\","))
+ (list
+ (string-append #$output "/libexec/podman")
+ (string-append #$output "/bin")
+ (string-append #$(this-package-input "catatonit") "/bin")))))))
(substitute* "vendor/github.com/containers/common/pkg/config/default.go"
(("/usr/libexec/podman/conmon") (which "conmon"))
(("/usr/local/libexec/cni")
(string-append #$(this-package-input "cni-plugins")
"/bin"))
- (("/usr/bin/crun") (which "crun")))))
+ (("/usr/bin/crun") (which "crun"))
+ (("/usr/libexec/podman/catatonit") (which "catatonit")))
+ (substitute* "pkg/rootless/rootless_linux.c"
+ (("/usr/bin/catatonit") (which "catatonit")))))
(add-after 'install 'install-completions
(lambda _
(invoke "make" "install.completions"
(string-append "PREFIX=" #$output)))))))
(inputs
(list btrfs-progs
+ catatonit
cni-plugins
conmon
crun
--
2.41.0
J
J
Jack Hill wrote on 8 Nov 2023 18:24
[PATCH v2 3/3] remove outdated comment
(address . 66887@debbugs.gnu.org)(name . Wilke Schwiedop)(address . wilke.schwiedop@agfa.com)
c8722552f367c3c69381480e69e92c5561288e34.1699464297.git.jackhill@jackhill.us
From: Wilke Schwiedop <wilke.schwiedop@agfa.com>

cgroup2 is now the default in guix

Change-Id: I58ab46ec4b16f6e458c363a4a914ccac088e71ba
---
gnu/packages/containers.scm | 2 --
1 file changed, 2 deletions(-)

Toggle diff (15 lines)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index c00394af2b..b864f83dcf 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -307,8 +307,6 @@ (define-public cni-plugins
configure network interfaces in Linux containers.")
(license license:asl2.0)))
-;; For podman to work, the user needs to run
-;; `sudo mount -t cgroup2 none /sys/fs/cgroup`
(define-public catatonit
(package
(name "catatonit")
--
2.41.0
W
W
Wilke Schwiedop wrote on 19 Nov 2023 12:45
RE: [PATCH v2 0/3] resending catatonit patches for QA
(name . 66887@debbugs.gnu.org)(address . 66887@debbugs.gnu.org)
DB9P190MB19858DB33994E037EA512FC19EB5A@DB9P190MB1985.EURP190.PROD.OUTLOOK.COM
Hello Jack,

thank you for re-submitting the patch-series. Is there any progress on the review of these patches or is there anything that can be done from my end?
W
W
Wilke Schwiedop wrote on 1 Apr 17:23 +0200
Superceded by #70112
(name . 66887@debbugs.gnu.org)(address . 66887@debbugs.gnu.org)
AS4P190MB1999C85683429AF7C97DB7A79E3F2@AS4P190MB1999.EURP190.PROD.OUTLOOK.COM
Issue can be closed as changes have been incorporated in #70112
Attachment: file
S
S
Simon Tournier wrote on 22 May 16:01 +0200
87y1822bec.fsf@gmail.com
Hi,

On lun., 01 avril 2024 at 15:23, Wilke Schwiedop via Guix-patches via <guix-patches@gnu.org> wrote:

Toggle quote (2 lines)
> Issue can be closed as changes have been incorporated in #70112

So closing.

Cheers,
simon
Closed
?
Your comment

This issue is archived.

To comment on this conversation send an email to 66887@debbugs.gnu.org

To respond to this issue using the mumi CLI, first switch to it
mumi current 66887
Then, you may apply the latest patchset in this issue (with sign off)
mumi am -- -s
Or, compose a reply to this issue
mumi compose
Or, send patches to this issue
mumi send-email *.patch