[PATCH 2/3] gnu: Add umoci.

  • Done
  • quality assurance status badge
Details
2 participants
  • ???
  • Ludovic Courtès
Owner
unassigned
Submitted by
???
Severity
normal
?
(address . guix-patches@gnu.org)(name . ???)(address . iyzsong@member.fsf.org)
20180609112100.18807-2-iyzsong@member.fsf.org
* gnu/packages/virtualization.scm (umoci): New variable.
---
gnu/packages/virtualization.scm | 45 +++++++++++++++++++++++++++++++++
1 file changed, 45 insertions(+)

Toggle diff (55 lines)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index d2419df98..d5be45b1e 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -864,3 +864,48 @@ packaged according to the
Container Initiative (OCI) format} and is a compliant implementation of the
Open Container Initiative specification.")
(license asl2.0)))
+
+(define-public umoci
+ (package
+ (name "umoci")
+ (version "0.4.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append
+ "https://github.com/openSUSE/umoci/releases/download/v"
+ version "/umoci.tar.xz"))
+ (file-name (string-append "umoci-" version ".tar.xz"))
+ (sha256
+ (base32
+ "0hg7hs4dagj2fgymm4b4s68k1v2k2093s3jg0d94j0ixhfmyg9nd"))))
+ (build-system go-build-system)
+ (arguments
+ '(#:import-path "github.com/openSUSE/umoci"
+ #:install-source? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'unpack
+ (lambda* (#:key source import-path #:allow-other-keys)
+ ;; Unpack the tarball into 'umoci' instead of "runc-${version}".
+ (let ((dest (string-append "src/" import-path)))
+ (mkdir-p dest)
+ (invoke "tar" "-C" (string-append "src/" import-path)
+ "--strip-components=1"
+ "-xvf" source))))
+ (replace 'build
+ (lambda* (#:key import-path #:allow-other-keys)
+ (chdir (string-append "src/" import-path))
+ ;; TODO: build manpages with 'go-md2man'.
+ (invoke "make" "SHELL=bash")))
+ (replace 'install
+ (lambda* (#:key outputs #:allow-other-keys)
+ (let* ((out (assoc-ref outputs "out"))
+ (bindir (string-append out "/bin")))
+ (install-file "umoci" bindir)
+ #t))))))
+ (home-page "https://umo.ci/")
+ (synopsis "Tool for modifying Open Container images")
+ (description
+ "@command{umoci} is a tool that allows for high-level modification of an
+OCI image layout and its tagged images.")
+ (license asl2.0)))
--
2.17.1
L
L
Ludovic Courtès wrote on 11 Jun 2018 14:24
(name . ???)(address . iyzsong@member.fsf.org)(address . 31767@debbugs.gnu.org)
87muw1ik9o.fsf@gnu.org
??? <iyzsong@member.fsf.org> skribis:

Toggle quote (2 lines)
> * gnu/packages/virtualization.scm (umoci): New variable.

[...]

Toggle quote (6 lines)
> + (home-page "https://umo.ci/")
> + (synopsis "Tool for modifying Open Container images")
> + (description
> + "@command{umoci} is a tool that allows for high-level modification of an
> +OCI image layout and its tagged images.")

Maybe s/OCI/Open Container Image (OCI)/.

Otherwise LGTM, thanks!

Ludo’.
?
(name . Ludovic Courtès)(address . ludo@gnu.org)(address . 31767-done@debbugs.gnu.org)
87k1r4jkz4.fsf@member.fsf.org
ludo@gnu.org (Ludovic Courtès) writes:

Toggle quote (14 lines)
> ??? <iyzsong@member.fsf.org> skribis:
>
>> * gnu/packages/virtualization.scm (umoci): New variable.
>
> [...]
>
>> + (home-page "https://umo.ci/")
>> + (synopsis "Tool for modifying Open Container images")
>> + (description
>> + "@command{umoci} is a tool that allows for high-level modification of an
>> +OCI image layout and its tagged images.")
>
> Maybe s/OCI/Open Container Image (OCI)/.

Okay.
Toggle quote (3 lines)
>
> Otherwise LGTM, thanks!

Pushed, thanks!
Closed
?