From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id yAKcEQfZwmHBHwEAgWs5BA (envelope-from ) for ; Wed, 22 Dec 2021 08:51:35 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:bcc0::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id WFtODQfZwmGCHgAAbx9fmQ (envelope-from ) for ; Wed, 22 Dec 2021 07:51:35 +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 E17632AE60 for ; Wed, 22 Dec 2021 08:51:34 +0100 (CET) Received: from localhost ([::1]:54418 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mzwPO-0007Ut-1P for larch@yhetil.org; Wed, 22 Dec 2021 02:51:34 -0500 Received: from eggs.gnu.org ([209.51.188.92]:36934) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mzwAM-0005Wn-E1 for guix-patches@gnu.org; Wed, 22 Dec 2021 02:36:06 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:44995) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mzwAM-0000It-4P for guix-patches@gnu.org; Wed, 22 Dec 2021 02:36:02 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mzwAM-0002tG-2d for guix-patches@gnu.org; Wed, 22 Dec 2021 02:36:02 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#52174] [PATCH v3 6/6] gnu: add podman Resent-From: Timmy Douglas Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Wed, 22 Dec 2021 07:36:02 +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.164015851911051 (code B ref 52174); Wed, 22 Dec 2021 07:36:02 +0000 Received: (at 52174) by debbugs.gnu.org; 22 Dec 2021 07:35:19 +0000 Received: from localhost ([127.0.0.1]:56540 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzw9e-0002sB-Oq for submit@debbugs.gnu.org; Wed, 22 Dec 2021 02:35:19 -0500 Received: from out1.migadu.com ([91.121.223.63]:27188) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mzw9c-0002s1-SC for 52174@debbugs.gnu.org; Wed, 22 Dec 2021 02:35:17 -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=1640158516; 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=KtuMHLwJCxfwEW9ONl0gobA2BLSvXOUQXXRb9L82Y5U=; b=CmqMVrLUKLXuUzYIQADTGq9/JyJwAyEwcT3Ip0I4VV2nlza4RNBjFLoYNq4Vt5LQy3HZg7 LHcpG+4T3RHz+iliMVtigEswMit9oQmfvENE2/XqfXfyLVu0fYj4+5HzMqX9rU8oLpvE7V TqbyBOQJcH7arK8vy3IAIZu3uIpCEjg= Date: Tue, 21 Dec 2021 23:33:56 -0800 Message-Id: In-Reply-To: <87sfunjtfi.fsf@gnu.org> References: <87sfunjtfi.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=1640159495; 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=KtuMHLwJCxfwEW9ONl0gobA2BLSvXOUQXXRb9L82Y5U=; b=RbE7RPXfsHVz7QYD50Bms9b1gmoq9MKLRLwwTOqiGwBUzUkMz2VI85l+ARA9NVvxHRL4Q5 qWW81VROsqhE02dGADRWfpmkYp+kJnU886LwzHFac2NBx3tEn3HUqFoBAiTXyszyvWGWf3 JEvRf+/L2CyVFjPy7AT+z5g07wnTaZIH9VhX60oTaAP3ZwMwlgU1s1ayqLQvKE5VKnO+0M fPHo+f4d8mP/Edth0prEpThKJpvFZK1JZUQHsKl8QzSL1EK+vvdXL2G60sG9k3KYElm0tE wbVM9oajyIVef6n3xY4YKPvfQcDBFX30t6zeIWS4I7LjGcBbb50oiNQm6KHKYQ== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1640159495; a=rsa-sha256; cv=none; b=G4m+J/AIwkMiWqxHiKYgNropmA92vooSV3CEDBWBntv/fyln80XGMmEheA8lBwG5xpaicP 92wgWQbmMzsL+O3P6Ic8JIYImq6sRj7ZsPgq6IZh3l8QxM4qtN594vjK4yRPqtbz/qz2WO BtBkeMTyS03Zaso7r5SWxL0nxgaZUVYi8Kr7gOUICGmEHwO+GWp/doTBuvkY3i/uqsHx59 rp3JK+gmyKPO3WEfkUY6RgooVqNt3FByvS9BLQ4Z36ZCgt7xqDWoJJGrpshVRAwB8lGtOg tLjcOaBG2WYnzcvYEiYwzqetoo4sVeXi0PvTXKYxyHERKSWmCrY9ljKGkTXTZw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=timmydouglas.com header.s=key1 header.b=CmqMVrLU; 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.93 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=timmydouglas.com header.s=key1 header.b=CmqMVrLU; 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: E17632AE60 X-Spam-Score: -3.93 X-Migadu-Scanner: scn0.migadu.com X-TUID: itwas8FneO5K * gnu/packages/containers.scm (podman): New variable. --- sending a v3 with some cleanup. I left some comments next to the tests to try to explain the issues I was running into. Let me know if you have suggestions. thanks gnu/packages/containers.scm | 78 +++++++++++++++++++++++++++++++++++++ 1 file changed, 78 insertions(+) diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index 2789dcfc7c..5656de616a 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -258,3 +258,81 @@ (define-public cni-plugins "Some Container Network Interface (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 ; /sys/fs/cgroup not set up in guix sandbox + #:test-target "test" + #: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"))) + (replace 'check + (lambda* (#:key tests? #:allow-other-keys) + (when tests? + (invoke "strace" "-f" "bin/podman" "version") + (invoke "make" "localsystem") + (invoke "make" "remotesystem")))) + (add-after 'unpack 'fix-hardcoded-paths + (lambda _ + (substitute* (find-files "libpod" "\\.go") + (("exec.LookPath[(][\"]slirp4netns[\"][)]") + (string-append "exec.LookPath(\"" (which "slirp4netns") "\")"))) + (substitute* "hack/install_catatonit.sh" + (("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 (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")))))))) + (inputs + (list btrfs-progs + cni-plugins + conmon + crun + gpgme + go-github-com-go-md2man + iptables + libassuan + libseccomp + libselinux + slirp4netns)) + (native-inputs + (list bats + git + go + ; strace ; XXX debug + 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