summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSharlatan Hellseher <sharlatanus@gmail.com>2025-07-22 23:52:52 +0100
committerSharlatan Hellseher <sharlatanus@gmail.com>2025-08-22 16:12:03 +0100
commit11e6f935d6245e9e8a7e456c254fbd3ccbc3bf13 (patch)
tree18b46827c1277e5ddc430d8a6da512e0d150507d
parent3b3d1dc1f2174becdf498dec3d9350c4278191f4 (diff)
gnu: umoci: Update to 0.5.0.
* gnu/packages/virtualization.scm (umoci): Update to 0.5.0. [source]: Switch to git-fetch and build from source. <snippet>: Delete vendor directory. [arguments] <import-path>: Adjust it. <unpack-path>: Add it. <test-flags>: Skip 2 tests. <test-subdirs>: Step up from import-path. <build-flags>: Set version. <phases>: Use default 'unpack, 'build and 'install. [native-inputs]: Add go-github-com-adalogics-go-fuzz-headers, go-github-com-apex-log, go-github-com-blang-semver-v4, go-github-com-cyphar-filepath-securejoin, go-github-com-docker-go-units, go-github-com-klauspost-compress, go-github-com-klauspost-pgzip, go-github-com-moby-sys-user, go-github-com-moby-sys-userns, go-github-com-mohae-deepcopy, go-github-com-opencontainers-go-digest, go-github-com-opencontainers-image-spec-1.0.2, go-github-com-opencontainers-runtime-spec, go-github-com-rootless-containers-proto-go-proto, go-github-com-stretchr-testify, go-github-com-urfave-cli, go-github-com-vbatts-go-mtree, go-golang-org-x-sys, and go-google-golang-org-protobuf. Change-Id: I456287403ccca4807119db2df1756dd7aacd4ded
-rw-r--r--gnu/packages/virtualization.scm75
1 files changed, 45 insertions, 30 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index 06ef12348d..7b3cf12d60 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -2418,43 +2418,58 @@ Open Container Initiative specification.")
(define-public umoci
(package
(name "umoci")
- (version "0.4.7")
- ;; XXX: Source contain vendor, consider to pack all missing dependencies.
+ (version "0.5.0")
(source
(origin
- (method url-fetch)
- (uri (string-append
- "https://github.com/opencontainers/umoci/releases/download/v"
- version "/umoci.tar.xz"))
- (file-name (string-append "umoci-" version ".tar.xz"))
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/opencontainers/umoci")
+ (commit (string-append "v" version))))
+ (file-name (git-file-name name version))
(sha256
- (base32 "0fvljj9k4f83wbqzd8nbijz0p1zaq633f8yxyvl5sy3wjf03ffk9"))))
+ (base32 "10pxiqk4194nbnvlvfvlbk31wp8k35in3g694y20f9261nn0qx6n"))
+ (snippet
+ #~(begin
+ (use-modules (guix build utils))
+ (delete-file-recursively "vendor")))))
(build-system go-build-system)
(arguments
(list
#:install-source? #f
- #:import-path "github.com/opencontainers/umoci"
- #:test-subdirs #~(list ".")
- #: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)
- (with-directory-excursion (string-append "src/" import-path)
- ;; TODO: build manpages with 'go-md2man'.
- (invoke "make" "SHELL=bash"))))
- (replace 'install
- (lambda* (#:key import-path outputs #:allow-other-keys)
- (let ((bindir (string-append #$output "/bin")))
- (install-file (string-append "src/" import-path "/umoci")
- bindir)))))))
+ #:import-path "github.com/opencontainers/umoci/cmd/umoci"
+ #:unpack-path "github.com/opencontainers/umoci"
+ #:test-flags
+ ;; Two tests fail with error: unpack config.json: convert spec to
+ ;; rootless: inspecting mount flags of /etc/resolv.conf: no such file or
+ ;; directory
+ #~(list "-skip" (string-append "TestUnpackManifestCustomLayer"
+ "|TestUnpackStartFromDescriptor"))
+ #:test-subdirs #~(list "../../...") ;test the whole libary
+ #:build-flags
+ #~(list (string-append "-ldflags="
+ "-X github.com/opencontainers/umoci.version="
+ #$version))))
+ ;; TODO: build manpages from <doc/man> with 'go-md2man'.
+ (native-inputs
+ (list go-github-com-adalogics-go-fuzz-headers
+ go-github-com-apex-log
+ go-github-com-blang-semver-v4
+ go-github-com-cyphar-filepath-securejoin
+ go-github-com-docker-go-units
+ go-github-com-klauspost-compress
+ go-github-com-klauspost-pgzip
+ go-github-com-moby-sys-user
+ go-github-com-moby-sys-userns
+ go-github-com-mohae-deepcopy
+ go-github-com-opencontainers-go-digest
+ go-github-com-opencontainers-image-spec-1.0.2
+ go-github-com-opencontainers-runtime-spec
+ go-github-com-rootless-containers-proto-go-proto
+ go-github-com-stretchr-testify
+ go-github-com-urfave-cli
+ go-github-com-vbatts-go-mtree
+ go-golang-org-x-sys
+ go-google-golang-org-protobuf))
(home-page "https://umo.ci/")
(synopsis "Tool for modifying Open Container images")
(description