gnu: runc, skopeo, docker-cli, umoci: Don't 'chdir' in build phases.
This fixes breaks the 'install-license-files' phase added in
6b793fa662
and is generally not good
practice.
Reported by divoplade on #guix.
* gnu/packages/virtualization.scm (runc)[arguments]: Use
'with-directory-excursion' instead of 'chdir' in build phases.
(skopeo)[arguments]: Likewise.
(umoci)[arguments]: Likewise.
* gnu/packages/docker.scm (docker-cli)[arguments]: In 'install' phase,
remove call to 'chdir' and adjust 'install-file' argument accordingly.
master
parent
9a4c83bdb6
commit
e39e8d97c1
|
@ -1518,18 +1518,19 @@ monitor/GPU.")
|
||||||
"-xvf" source))))
|
"-xvf" source))))
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key import-path #:allow-other-keys)
|
(lambda* (#:key import-path #:allow-other-keys)
|
||||||
(chdir (string-append "src/" import-path))
|
(with-directory-excursion (string-append "src/" import-path)
|
||||||
;; XXX: requires 'go-md2man'.
|
;; XXX: requires 'go-md2man'.
|
||||||
;; (invoke "make" "man")
|
;; (invoke "make" "man")
|
||||||
(invoke "make")))
|
(invoke "make"))))
|
||||||
;; (replace 'check
|
;; (replace 'check
|
||||||
;; (lambda _
|
;; (lambda _
|
||||||
;; (invoke "make" "localunittest")))
|
;; (invoke "make" "localunittest")))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key import-path outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(with-directory-excursion (string-append "src/" import-path)
|
||||||
(invoke "make" "install" "install-bash"
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(string-append "PREFIX=" out))))))))
|
(invoke "make" "install" "install-bash"
|
||||||
|
(string-append "PREFIX=" out)))))))))
|
||||||
(native-inputs
|
(native-inputs
|
||||||
`(("pkg-config" ,pkg-config)))
|
`(("pkg-config" ,pkg-config)))
|
||||||
(inputs
|
(inputs
|
||||||
|
@ -1573,14 +1574,15 @@ Open Container Initiative specification.")
|
||||||
"-xvf" source))))
|
"-xvf" source))))
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key import-path #:allow-other-keys)
|
(lambda* (#:key import-path #:allow-other-keys)
|
||||||
(chdir (string-append "src/" import-path))
|
(with-directory-excursion (string-append "src/" import-path)
|
||||||
;; TODO: build manpages with 'go-md2man'.
|
;; TODO: build manpages with 'go-md2man'.
|
||||||
(invoke "make" "SHELL=bash")))
|
(invoke "make" "SHELL=bash"))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key import-path outputs #:allow-other-keys)
|
||||||
(let* ((out (assoc-ref outputs "out"))
|
(let* ((out (assoc-ref outputs "out"))
|
||||||
(bindir (string-append out "/bin")))
|
(bindir (string-append out "/bin")))
|
||||||
(install-file "umoci" bindir)
|
(install-file (string-append "src/" import-path "/umoci")
|
||||||
|
bindir)
|
||||||
#t))))))
|
#t))))))
|
||||||
(home-page "https://umo.ci/")
|
(home-page "https://umo.ci/")
|
||||||
(synopsis "Tool for modifying Open Container images")
|
(synopsis "Tool for modifying Open Container images")
|
||||||
|
@ -1617,19 +1619,20 @@ Open Container Initiative (OCI) image layout and its tagged images.")
|
||||||
(arguments
|
(arguments
|
||||||
'(#:import-path "github.com/containers/skopeo"
|
'(#:import-path "github.com/containers/skopeo"
|
||||||
#:install-source? #f
|
#:install-source? #f
|
||||||
#:tests? #f ; The tests require Docker
|
#:tests? #f ; The tests require Docker
|
||||||
#:phases
|
#:phases
|
||||||
(modify-phases %standard-phases
|
(modify-phases %standard-phases
|
||||||
(replace 'build
|
(replace 'build
|
||||||
(lambda* (#:key import-path #:allow-other-keys)
|
(lambda* (#:key import-path #:allow-other-keys)
|
||||||
(chdir (string-append "src/" import-path))
|
(with-directory-excursion (string-append "src/" import-path)
|
||||||
;; TODO: build manpages with 'go-md2man'.
|
;; TODO: build manpages with 'go-md2man'.
|
||||||
(invoke "make" "bin/skopeo")))
|
(invoke "make" "bin/skopeo"))))
|
||||||
(replace 'install
|
(replace 'install
|
||||||
(lambda* (#:key outputs #:allow-other-keys)
|
(lambda* (#:key import-path outputs #:allow-other-keys)
|
||||||
(let ((out (assoc-ref outputs "out")))
|
(with-directory-excursion (string-append "src/" import-path)
|
||||||
(invoke "make" "install-binary" "install-completions"
|
(let ((out (assoc-ref outputs "out")))
|
||||||
(string-append "PREFIX=" out))))))))
|
(invoke "make" "install-binary" "install-completions"
|
||||||
|
(string-append "PREFIX=" out)))))))))
|
||||||
(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 New Issue