From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp0 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id eB3oE1W9vmFLPwAAgWs5BA (envelope-from ) for ; Sun, 19 Dec 2021 06:04:21 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp0 with LMTPS id oAmhD1W9vmGuXwAA1q6Kng (envelope-from ) for ; Sun, 19 Dec 2021 05:04:21 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 0F90033774 for ; Sun, 19 Dec 2021 06:04:21 +0100 (CET) Received: from localhost ([::1]:46108 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1myoMu-0003PM-9L for larch@yhetil.org; Sun, 19 Dec 2021 00:04:20 -0500 Received: from eggs.gnu.org ([209.51.188.92]:56790) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1myoIm-0007v5-Lo for guix-patches@gnu.org; Sun, 19 Dec 2021 00:00:08 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:33155) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1myoIm-0003xy-C1 for guix-patches@gnu.org; Sun, 19 Dec 2021 00:00:04 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1myoIm-0002IL-B5 for guix-patches@gnu.org; Sun, 19 Dec 2021 00:00:04 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52174] [PATCH v2 6/6] gnu: add podman Resent-From: Timmy Douglas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Sun, 19 Dec 2021 05:00:04 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 52174 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 52174@debbugs.gnu.org Cc: ludo@gnu.org, mail@timmydouglas.com Received: via spool by 52174-submit@debbugs.gnu.org id=B52174.16398899988708 (code B ref 52174); Sun, 19 Dec 2021 05:00:04 +0000 Received: (at 52174) by debbugs.gnu.org; 19 Dec 2021 04:59:58 +0000 Received: from localhost ([127.0.0.1]:44696 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myoIg-0002GO-AI for submit@debbugs.gnu.org; Sat, 18 Dec 2021 23:59:58 -0500 Received: from out0.migadu.com ([94.23.1.103]:14955) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1myoIY-0002Fq-PB for 52174@debbugs.gnu.org; Sat, 18 Dec 2021 23:59:51 -0500 X-Report-Abuse: Please report any abuse attempt to abuse@migadu.com and include these headers. DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=timmydouglas.com; s=key1; t=1639889990; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=UPqIzWwJYWjGadP57UanotjJm3E1aNKeFpSjM8tQucg=; b=WCrOLLdyL2PH4GnTXUDSTjJQ1hh/LEZ5EJIgpIV5Stvb4vGv2hlWVWro1hQ0KHoB33ZPeU ZYGuXqDy/VybPcJ4Lfb6u+KZSZ97Ei0j86Z4NdJ2fAeWfrLFwtTPwFo5GLcwJGy5cN7JMv TbCLFnXle0IM0Oauu/SI16KakIRItEE= Date: Sat, 18 Dec 2021 20:58:31 -0800 Message-Id: <5d39e8142d916df8da9d317bf7a3781c0513ad77.1639889841.git.mail@timmydouglas.com> In-Reply-To: <874k75pzi7.fsf@gnu.org> References: <874k75pzi7.fsf@gnu.org> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" Reply-to: Timmy Douglas X-ACL-Warn: , Timmy Douglas via Guix-patches From: Timmy Douglas via Guix-patches via X-Migadu-Flow: FLOW_IN X-Migadu-Country: US ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1639890261; h=from:from:sender:sender:reply-to:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post:dkim-signature; bh=UPqIzWwJYWjGadP57UanotjJm3E1aNKeFpSjM8tQucg=; b=Je/JDD+KUUMPtMeE5ozdjqlJBind9Oj/eY/JH6Kts2NBjk9lLZy9+zsSNPpF6ogdWlsNCw TDXyFJtaAlmligKmO187cOzwuluUbdG6JG2oklRgCWihI6EQVydVH2OlIUWAbZT6iK59JD OZen5BcUWSetLFWTuEHJtE5pvVlt2Ais0qNmkkhklbf6daIFe6oC4Xc9XFZXYPZxtC5Cpt v31HOyf9j8bsHOfYSz5Q0wjtUp98XLe3nada1S6Q2IPrSH5tAIOBiSyMEinVexHWvBMRGT kfEW4Hk0D7PbgE07zZzS6jKYrBKI+PaPyeMq1AmWMhEc71qLdBKq91Ci+/bT/A== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1639890261; a=rsa-sha256; cv=none; b=SegRU6nStLGtjx3VKO+DkKNpMmee18JPNTJmS2NVsuFHfJeTAhntM+cflOK4NWd3gce9OF Rr5pknpVCE2MIO0tMB/WK9jFVxNcqU1zD3/UqLmrfaYITnZlDuru58Kn7dIyyeUKwu23ex uBMe0aA5qwJk0hnuhIiziVIiHGmkza08fuDQpdRAHsfshyPRtepbWPhaLVV8usTr+wtCBE zGebai8G0pXL/q6Fm0ZOhJsCaD7oLflRJDCU4IBn0iZs08JD3xTiBzZ48sJknbFFzuukk/ 15uFmjznNQDiNiD11SRJ8NFUuuowWojO2zZUynyDqv+AB9y/ad8S4odK78NNxg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=timmydouglas.com header.s=key1 header.b=WCrOLLdy; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Spam-Score: -3.61 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=timmydouglas.com header.s=key1 header.b=WCrOLLdy; dmarc=pass (policy=none) header.from=gnu.org; spf=pass (aspmx1.migadu.com: domain of "guix-patches-bounces+larch=yhetil.org@gnu.org" designates 209.51.188.17 as permitted sender) smtp.mailfrom="guix-patches-bounces+larch=yhetil.org@gnu.org" X-Migadu-Queue-Id: 0F90033774 X-Spam-Score: -3.61 X-Migadu-Scanner: scn0.migadu.com X-TUID: JkvkrXt4Wr++ * 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