emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#61682: closed ([PATCH] gnu: buildah: Add 'buildah' package)


From: GNU bug Tracking System
Subject: bug#61682: closed ([PATCH] gnu: buildah: Add 'buildah' package)
Date: Thu, 08 Jun 2023 21:28:02 +0000

Your message dated Thu, 08 Jun 2023 23:27:39 +0200
with message-id <87edmlzltg.fsf_-_@gnu.org>
and subject line Re: bug#61682: [PATCH] gnu: buildah: Add 'buildah' package
has caused the debbugs.gnu.org bug report #61682,
regarding [PATCH] gnu: buildah: Add 'buildah' package
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
61682: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=61682
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH] gnu: buildah: Add 'buildah' package Date: Tue, 21 Feb 2023 14:35:19 +0000
* gnu/packages/containers.scm: New 'buildah' package

Signed-off-by: Zongyuan Li <zongyuan.li@c0x0o.me>
---
 gnu/packages/containers.scm | 68 +++++++++++++++++++++++++++++++++++++
 1 file changed, 68 insertions(+)

diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 80c4aaa400..731a56075c 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)
@@ -405,3 +406,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-building-tools
+                          (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.37.1 (Apple Git-137.1)





--- End Message ---
--- Begin Message --- Subject: Re: bug#61682: [PATCH] gnu: buildah: Add 'buildah' package Date: Thu, 08 Jun 2023 23:27:39 +0200 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/28.2 (gnu/linux)
Hi,

Zongyuan Li <zongyuan.li@c0x0o.me> skribis:

> gnu: buildah: Add 'buildah' package
>
> Introduce new 'buildah' package
>
> * gnu/packages/containers.scm: New 'buildah' package

Finally applied with the changes below, most of which were suggested by
Liliana.

Thanks,
Ludo’.

diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 839d81cd0e..eb7699c505 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -414,8 +414,10 @@ (define-public buildah
     (arguments
      (list #:import-path "github.com/containers/buildah/cmd/buildah"
            #:unpack-path "github.com/containers/buildah"
-            ; Some dependencies require go-1.18 to build
+
+           ;; Some dependencies require go-1.18 to build.
            #:go go-1.18
+
            #:tests? #f
            #:install-source? #f
            #:phases
@@ -433,14 +435,12 @@ (define-public buildah
                      (("/usr/local") (string-append #$output)))))
                (add-after 'build 'build-docs
                  (lambda* (#:key unpack-path #:allow-other-keys)
-                    (let*
-                      ((doc-path (string-append "src/" unpack-path "/docs")))
-                      (invoke "make" "-C" doc-path))))
+                   (let ((doc (string-append "src/" unpack-path "/docs")))
+                     (invoke "make" "-C" doc))))
                (add-after 'install 'install-docs
                  (lambda* (#:key unpack-path #:allow-other-keys)
-                    (let*
-                      ((doc-path (string-append "src/" unpack-path "/docs")))
-                      (invoke "make" "-C" doc-path "install")))))))
+                   (let ((doc (string-append "src/" unpack-path "/docs")))
+                     (invoke "make" "-C" doc "install")))))))
     (inputs (list btrfs-progs
                   cni-plugins
                   conmon
@@ -455,10 +455,23 @@ (define-public buildah
      (list go-github-com-go-md2man
            gnu-make
            pkg-config))
-    (synopsis
-     "Build Open Container Initiative images")
+    (synopsis "Build @acronym{OCI, Open Container Initiative} images")
     (description
-     "Buildah is used to build Open Container Initiative
-@acronym{OCI, Open Container Initiative} compatible containers.")
+     "Buildah is a command-line tool to build @acronym{OCI, Open Container
+Initiative} container images.  More generally, it can be used to:
+
+@itemize
+@item
+create a working container, either from scratch or using an image as a
+starting point;
+@item
+create an image, either from a working container or via the instructions
+in a @file{Dockerfile};
+@item
+mount a working container's root filesystem for manipulation;
+@item
+use the updated contents of a container's root filesystem as a filesystem
+layer to create a new image.
+@end itemize")
     (home-page "https://buildah.io";)
     (license license:asl2.0)))

--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]