gnu: skopeo: Update to 1.15.0.
The package is also converted to gnu-build-system in order to take advantage
of already existing Makefile instead of reinventing (parts) of it in Guile.
* gnu/packages/virtualization.scm (skopeo)[version]: Update to 1.15.0.
[build-system]: Use gnu-build-system.
[native-inputs]: Add go-1.21, sort.
[inputs]: Add bash-minimal.
[arguments]<#:import-path, #:install-source?>: Delete.
<#:make-flags, #:test-target, #:imported-modules>: New arguments.
<#:phases>{'configure}: Delete.
{'set-env, 'cc-to-gcc, 'wrap-skopeo, 'remove-go-references}: New phases.
Change-Id: I1010e1f4fbdc093646c2879bdf30125ab2e88bdd
Signed-off-by: Christopher Baines <mail@cbaines.net>
This commit is contained in:
parent
869fa14b78
commit
142e1c2cf0
1 changed files with 55 additions and 26 deletions
|
|
@ -151,6 +151,7 @@
|
||||||
#:use-module (guix gexp)
|
#:use-module (guix gexp)
|
||||||
#:use-module (guix git-download)
|
#:use-module (guix git-download)
|
||||||
#:use-module (guix packages)
|
#:use-module (guix packages)
|
||||||
|
#:use-module (guix modules)
|
||||||
#:use-module (guix utils)
|
#:use-module (guix utils)
|
||||||
#:use-module (srfi srfi-1)
|
#:use-module (srfi srfi-1)
|
||||||
#:use-module (srfi srfi-26)
|
#:use-module (srfi srfi-26)
|
||||||
|
|
@ -2257,7 +2258,7 @@ Open Container Initiative (OCI) image layout and its tagged images.")
|
||||||
(define-public skopeo
|
(define-public skopeo
|
||||||
(package
|
(package
|
||||||
(name "skopeo")
|
(name "skopeo")
|
||||||
(version "1.2.3")
|
(version "1.15.0")
|
||||||
(source (origin
|
(source (origin
|
||||||
(method git-fetch)
|
(method git-fetch)
|
||||||
(uri (git-reference
|
(uri (git-reference
|
||||||
|
|
@ -2266,12 +2267,15 @@ Open Container Initiative (OCI) image layout and its tagged images.")
|
||||||
(file-name (git-file-name name version))
|
(file-name (git-file-name name version))
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0n22sdif437ddg5ch0ipwim3fg0n6ihc9bfi52qkhy3r1grz04hs"))))
|
"1f9n3ysdmll7vq8dmgpv03m8aqq3w9cfvbmxxpwmnv1nlfc67ihq"))))
|
||||||
(build-system go-build-system)
|
(build-system gnu-build-system)
|
||||||
(native-inputs
|
(native-inputs
|
||||||
(list pkg-config go-github-com-go-md2man))
|
(list go-1.21
|
||||||
|
go-github-com-go-md2man
|
||||||
|
pkg-config))
|
||||||
(inputs
|
(inputs
|
||||||
(list btrfs-progs
|
(list bash-minimal
|
||||||
|
btrfs-progs
|
||||||
eudev
|
eudev
|
||||||
libassuan
|
libassuan
|
||||||
libselinux
|
libselinux
|
||||||
|
|
@ -2280,27 +2284,52 @@ Open Container Initiative (OCI) image layout and its tagged images.")
|
||||||
glib
|
glib
|
||||||
gpgme))
|
gpgme))
|
||||||
(arguments
|
(arguments
|
||||||
'(#:import-path "github.com/containers/skopeo"
|
(list
|
||||||
#:install-source? #f
|
#:make-flags
|
||||||
#:tests? #f ; The tests require Docker
|
#~(list (string-append "CC=" #$(cc-for-target))
|
||||||
#:phases
|
"PREFIX="
|
||||||
(modify-phases %standard-phases
|
(string-append "DESTDIR=" #$output)
|
||||||
(replace 'build
|
(string-append "GOMD2MAN="
|
||||||
(lambda* (#:key import-path #:allow-other-keys)
|
#$go-github-com-go-md2man "/bin/go-md2man"))
|
||||||
(with-directory-excursion (string-append "src/" import-path)
|
#:tests? #f ; The tests require Docker
|
||||||
(invoke "make" "bin/skopeo"))))
|
#:test-target "test-unit"
|
||||||
(add-after 'build 'build-docs
|
#:imported-modules
|
||||||
(lambda* (#:key import-path #:allow-other-keys)
|
(source-module-closure `(,@%gnu-build-system-modules
|
||||||
(with-directory-excursion (string-append "src/" import-path)
|
(guix build go-build-system)))
|
||||||
(invoke "make" "docs"))))
|
#:phases
|
||||||
(replace 'install
|
#~(modify-phases %standard-phases
|
||||||
(lambda* (#:key import-path outputs #:allow-other-keys)
|
(delete 'configure)
|
||||||
(with-directory-excursion (string-append "src/" import-path)
|
(add-after 'unpack 'set-env
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(lambda _
|
||||||
(install-file "default-policy.json"
|
;; When running go, things fail because HOME=/homeless-shelter.
|
||||||
(string-append out "/etc/containers"))
|
(setenv "HOME" "/tmp")
|
||||||
(invoke "make" "install-binary" "install-completions" "install-docs"
|
;; Required for detecting btrfs in hack/btrfs* due to bug in GNU
|
||||||
(string-append "PREFIX=" out)))))))))
|
;; Make <4.4 causing CC not to be propagated into $(shell ...)
|
||||||
|
;; calls. Can be removed once we update to >4.3.
|
||||||
|
;;
|
||||||
|
;; This techically does nothing *now*, but after upstream
|
||||||
|
;; issue[1] is solved and 'cc-to-gcc phase is removed, it will
|
||||||
|
;; start being required.
|
||||||
|
;; 1: https://github.com/containers/skopeo/issues/2278
|
||||||
|
(setenv "CC" #$(cc-for-target))))
|
||||||
|
(add-after 'unpack 'cc-to-gcc
|
||||||
|
(lambda _
|
||||||
|
(for-each (lambda (file)
|
||||||
|
(substitute* file
|
||||||
|
(("^cc( -.*)" all rest)
|
||||||
|
(string-append "\"$CC\"" rest))))
|
||||||
|
'("hack/btrfs_tag.sh"
|
||||||
|
"hack/btrfs_installed_tag.sh"
|
||||||
|
"hack/libdm_tag.sh"
|
||||||
|
"hack/libsubid_tag.sh"))))
|
||||||
|
(add-after 'install 'wrap-skopeo
|
||||||
|
(lambda _
|
||||||
|
(wrap-program (string-append #$output "/bin/skopeo")
|
||||||
|
`("PATH" suffix
|
||||||
|
;; We need at least newuidmap, newgidmap and mount.
|
||||||
|
("/run/setuid-programs")))))
|
||||||
|
(add-after 'install 'remove-go-references
|
||||||
|
(@@ (guix build go-build-system) remove-go-references)))))
|
||||||
(home-page "https://github.com/containers/skopeo")
|
(home-page "https://github.com/containers/skopeo")
|
||||||
(synopsis "Interact with container images and container image registries")
|
(synopsis "Interact with container images and container image registries")
|
||||||
(description
|
(description
|
||||||
|
|
|
||||||
Reference in a new issue