From: Timmy Douglas via Guix-patches via <guix-patches@gnu.org>
To: 52174@debbugs.gnu.org
Cc: ludo@gnu.org, mail@timmydouglas.com
Subject: [bug#52174] [PATCH v2 6/6] gnu: add podman
Date: Sat, 18 Dec 2021 20:58:31 -0800 [thread overview]
Message-ID: <5d39e8142d916df8da9d317bf7a3781c0513ad77.1639889841.git.mail@timmydouglas.com> (raw)
In-Reply-To: <874k75pzi7.fsf@gnu.org>
* gnu/packages/containers.scm: add podman
---
Thanks for the review Ludo! Hopefully this v2 fixes the issues you
pointed out.
gnu/packages/containers.scm | 60 +++++++++++++++++++++++++++++++++++++
1 file changed, 60 insertions(+)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 8810ecb8c8..389ef42092 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -214,3 +214,63 @@ (define-public cni-plugins
(description
"Some CNI network plugins, maintained by the containernetworking team.")
(license license:asl2.0)))
+
+;; For podman to work, the user needs to run
+;; `sudo mount -t cgroup2 none /sys/fs/cgroup`
+
+(define-public podman
+ (package
+ (name "podman")
+ (version "3.4.4")
+ (source
+ (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/containers/podman")
+ (commit (string-append "v" version))))
+ (sha256
+ (base32 "1q09qsl1wwiiy5njvb97n1j5f5jin4ckmzj5xbdfs28czb2kx3g5"))
+ (file-name (git-file-name name version))))
+
+ (build-system gnu-build-system)
+ (arguments
+ `(#:make-flags (list ,(string-append "CC=" (cc-for-target))
+ (string-append "PREFIX=" %output))
+ #:tests? #f ; need to setup ginkgo
+ #:phases (modify-phases %standard-phases
+ (delete 'configure)
+ (add-after 'unpack 'set-env
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; when running go, things fail because
+ ;; HOME=/homeless-shelter.
+ (setenv "HOME" "/tmp")))
+ (add-after 'unpack 'fix-hardcoded-paths
+ (lambda _
+ (substitute* (find-files "libpod" "\\.go")
+ (("exec.LookPath[(][\"]slirp4netns[\"][)]")
+ (string-append "exec.LookPath(\"" (which "slirp4netns") "\")")))
+ (substitute* "vendor/github.com/containers/common/pkg/config/config_linux.go"
+ (("/usr/local/libexec/podman")
+ (string-append (assoc-ref %outputs "out") "/bin")))
+ (substitute* "vendor/github.com/containers/common/pkg/config/default.go"
+ (("/usr/libexec/podman/conmon") (which "conmon"))
+ (("/usr/local/libexec/cni")
+ (string-append (assoc-ref %build-inputs "cni-plugins") "/bin"))
+ (("/usr/bin/crun") (which "crun")))
+ #true))
+ (replace 'check
+ (lambda* (#:key tests? #:allow-other-keys)
+ (when tests?
+ (invoke "make" "test")))))))
+ (inputs
+ (list btrfs-progs cni-plugins conmon crun gpgme go-github-com-go-md2man
+ iptables libassuan libseccomp libselinux slirp4netns))
+ (native-inputs
+ (list git go pkg-config))
+ (home-page "https://podman.io")
+ (synopsis "Manage containers, images, pods, and their volumes")
+ (description
+ "Podman (the POD MANager) is a tool for managing containers and images,
+volumes mounted into those containers, and pods made from groups of
+containers.")
+ (license license:asl2.0)))
--
2.34.0
prev parent reply other threads:[~2021-12-19 5:04 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-11-29 6:46 [bug#52174] [PATCH] gnu: Add podman Timmy Douglas via Guix-patches via
2021-12-18 17:57 ` Ludovic Courtès
2021-12-19 4:58 ` [bug#52174] [PATCH v2 1/6] gnu: add crun Timmy Douglas via Guix-patches via
[not found] ` <875yrjl8a5.fsf@gnu.org>
2021-12-21 20:17 ` Timmy Douglas via Guix-patches via
2021-12-24 15:23 ` Ludovic Courtès
2021-12-25 0:22 ` Timmy Douglas via Guix-patches via
2022-01-01 18:11 ` bug#52174: [PATCH] gnu: Add podman Ludovic Courtès
2022-01-01 19:59 ` [bug#52174] " Timmy Douglas via Guix-patches via
2022-01-03 11:14 ` Ludovic Courtès
2021-12-19 4:58 ` [bug#52174] [PATCH v2 2/6] gnu: add conmon Timmy Douglas via Guix-patches via
[not found] ` <87wnjzjtk2.fsf@gnu.org>
2021-12-21 22:42 ` Timmy Douglas via Guix-patches via
2021-12-24 15:25 ` Ludovic Courtès
2021-12-19 4:58 ` [bug#52174] [PATCH v2 3/6] gnu: add libslirp Timmy Douglas via Guix-patches via
[not found] ` <871r27l87f.fsf@gnu.org>
2021-12-21 22:37 ` Timmy Douglas via Guix-patches via
2021-12-24 15:24 ` Ludovic Courtès
2021-12-19 4:58 ` [bug#52174] [PATCH v2 4/6] gnu: add slirp4netns Timmy Douglas via Guix-patches via
2021-12-19 4:58 ` [bug#52174] [PATCH v2 5/6] gnu: add cni-plugins Timmy Douglas via Guix-patches via
2021-12-19 4:58 ` Timmy Douglas via Guix-patches via [this message]
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=5d39e8142d916df8da9d317bf7a3781c0513ad77.1639889841.git.mail@timmydouglas.com \
--to=guix-patches@gnu.org \
--cc=52174@debbugs.gnu.org \
--cc=ludo@gnu.org \
--cc=mail@timmydouglas.com \
/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.