GNU bug report logs - #61682
[PATCH] gnu: buildah: Add 'buildah' package

Previous Next

Package: guix-patches;

Reported by: Zongyuan Li <zongyuan.li <at> c0x0o.me>

Date: Tue, 21 Feb 2023 14:58:03 UTC

Severity: normal

Tags: patch

Done: Ludovic Courtès <ludo <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


Message #14 received at 61682 <at> debbugs.gnu.org (full text, mbox):

From: Zongyuan Li <zongyuan.li <at> c0x0o.me>
To: 61682 <at> debbugs.gnu.org
Cc: Zongyuan Li <zongyuan.li <at> c0x0o.me>
Subject: [PATCH v2] gnu: buildah: Add 'buildah' package
Date: Thu, 23 Feb 2023 11:31:29 +0000
Introduce new 'buildah' package

Changes since v1:

   * fix phase-name typo in modify-phases

* gnu/packages/containers.scm: New 'buildah' package
---
 gnu/packages/containers.scm | 68 +++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 50dfa88421..3844e4e700 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -41,6 +41,7 @@ (define-module (gnu packages containers)
   #:use-module (gnu packages gnupg)
   #:use-module (gnu packages golang)
   #:use-module (gnu packages linux)
+  #:use-module (gnu packages perl)
   #:use-module (gnu packages python)
   #:use-module (gnu packages networking)
   #:use-module (gnu packages pkg-config)
@@ -406,3 +407,70 @@ (define-public podman
 volumes mounted into those containers, and pods made from groups of
 containers.")
     (license license:asl2.0)))
+
+(define-public buildah
+  (package
+    (name "buildah")
+    (version "1.29.0")
+    (source (origin
+              (method git-fetch)
+              (uri (git-reference
+                    (url "https://github.com/containers/buildah")
+                    (commit (string-append "v" version))))
+              (file-name (git-file-name name version))
+              (sha256
+               (base32
+                "16kc19m5in819624c3np4aqb9hkjc93d34y4958jqy1k3p2p5rir"))))
+    (build-system gnu-build-system)
+    (arguments
+     (list #:make-flags #~(list #$(string-append "CC="
+                                                 (cc-for-target))
+                                (string-append "PREFIX="
+                                               #$output))
+           #:tests? #f
+           #:phases #~(modify-phases %standard-phases
+                        (delete 'configure)
+                        (add-after 'unpack 'set-env
+                          (lambda* (#:key inputs #:allow-other-keys)
+                            (setenv "HOME" "/tmp")))
+                        (add-after 'unpack 'avoid-building-tools
+                          (lambda _
+                            (substitute* "Makefile"
+                              (("^docs: install\\.tools")
+                               "docs:"))))
+                        (add-after 'unpack 'avoid-unnecessary-targets
+                          (lambda _
+                            (substitute* "Makefile"
+                              (("^all: .*")
+                               "all: bin/buildah docs"))))
+                        (add-after 'unpack 'use-doc-tools
+                          (lambda _
+                            (substitute* "docs/Makefile"
+                              (("../tests/tools/build/go-md2man")
+                               (which "go-md2man")))))
+                        (add-after 'install 'install-completions
+                          (lambda _
+                            (invoke "make" "install.completions"
+                                    (string-append "PREFIX="
+                                                   #$output)))))))
+    (inputs (list btrfs-progs
+                  cni-plugins
+                  conmon
+                  eudev
+                  glib
+                  go-github-com-go-md2man
+                  gpgme
+                  libassuan
+                  libseccomp
+                  lvm2
+                  runc))
+    (native-inputs (list bats git go-1.18 perl pkg-config))
+    (synopsis
+     "Facilitates building Open Container Initiative (OCI) container images")
+    (description
+     "Buildah is an open source, Linux-based tool used to build Open Container
+Initiative (OCI)-compatible containers.  With Buildah, you can use your
+favorite tools to create efficient container images from an existing base image
+or from scratch using an empty image.")
+    (home-page "https://buildah.io")
+    (license license:asl2.0)))
--
2.39.1






This bug report was last modified 2 years and 46 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.