[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
07/10: gnu: runc, skopeo, docker-cli, umoci: Don't 'chdir' in build phas
From: |
guix-commits |
Subject: |
07/10: gnu: runc, skopeo, docker-cli, umoci: Don't 'chdir' in build phases. |
Date: |
Fri, 16 Oct 2020 09:03:23 -0400 (EDT) |
civodul pushed a commit to branch master
in repository guix.
commit e39e8d97c17c7e7a008a4f4e125ae6b3844cc03a
Author: Ludovic Courtès <ludo@gnu.org>
AuthorDate: Fri Oct 16 14:32:50 2020 +0200
gnu: runc, skopeo, docker-cli, umoci: Don't 'chdir' in build phases.
This fixes breaks the 'install-license-files' phase added in
6b793fa66218337a1f638466753cd5326a6a6c18 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.
---
gnu/packages/virtualization.scm | 45 ++++++++++++++++++++++-------------------
1 file changed, 24 insertions(+), 21 deletions(-)
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm
index f536616..ac062df 100644
--- a/gnu/packages/virtualization.scm
+++ b/gnu/packages/virtualization.scm
@@ -1518,18 +1518,19 @@ monitor/GPU.")
"-xvf" source))))
(replace 'build
(lambda* (#:key import-path #:allow-other-keys)
- (chdir (string-append "src/" import-path))
- ;; XXX: requires 'go-md2man'.
- ;; (invoke "make" "man")
- (invoke "make")))
+ (with-directory-excursion (string-append "src/" import-path)
+ ;; XXX: requires 'go-md2man'.
+ ;; (invoke "make" "man")
+ (invoke "make"))))
;; (replace 'check
;; (lambda _
;; (invoke "make" "localunittest")))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (invoke "make" "install" "install-bash"
- (string-append "PREFIX=" out))))))))
+ (lambda* (#:key import-path outputs #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "make" "install" "install-bash"
+ (string-append "PREFIX=" out)))))))))
(native-inputs
`(("pkg-config" ,pkg-config)))
(inputs
@@ -1573,14 +1574,15 @@ Open Container Initiative specification.")
"-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")))
+ (with-directory-excursion (string-append "src/" import-path)
+ ;; TODO: build manpages with 'go-md2man'.
+ (invoke "make" "SHELL=bash"))))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
+ (lambda* (#:key import-path outputs #:allow-other-keys)
(let* ((out (assoc-ref outputs "out"))
(bindir (string-append out "/bin")))
- (install-file "umoci" bindir)
+ (install-file (string-append "src/" import-path "/umoci")
+ bindir)
#t))))))
(home-page "https://umo.ci/")
(synopsis "Tool for modifying Open Container images")
@@ -1617,19 +1619,20 @@ Open Container Initiative (OCI) image layout and its
tagged images.")
(arguments
'(#:import-path "github.com/containers/skopeo"
#:install-source? #f
- #:tests? #f ; The tests require Docker
+ #:tests? #f ; The tests require Docker
#:phases
(modify-phases %standard-phases
(replace 'build
(lambda* (#:key import-path #:allow-other-keys)
- (chdir (string-append "src/" import-path))
- ;; TODO: build manpages with 'go-md2man'.
- (invoke "make" "bin/skopeo")))
+ (with-directory-excursion (string-append "src/" import-path)
+ ;; TODO: build manpages with 'go-md2man'.
+ (invoke "make" "bin/skopeo"))))
(replace 'install
- (lambda* (#:key outputs #:allow-other-keys)
- (let ((out (assoc-ref outputs "out")))
- (invoke "make" "install-binary" "install-completions"
- (string-append "PREFIX=" out))))))))
+ (lambda* (#:key import-path outputs #:allow-other-keys)
+ (with-directory-excursion (string-append "src/" import-path)
+ (let ((out (assoc-ref outputs "out")))
+ (invoke "make" "install-binary" "install-completions"
+ (string-append "PREFIX=" out)))))))))
(home-page "https://github.com/containers/skopeo")
(synopsis "Interact with container images and container image registries")
(description
- branch master updated (83fc59b -> 27913a6), guix-commits, 2020/10/16
- 01/10: nls: Update., guix-commits, 2020/10/16
- 04/10: guix-install.sh: Check the service 'nscd' and suggest it., guix-commits, 2020/10/16
- 05/10: .guix-authorizations: Add m1gu3l., guix-commits, 2020/10/16
- 06/10: gnu: julia: Update to 1.5.2., guix-commits, 2020/10/16
- 03/10: guix-install.sh: Add symbolic links for supported shell completions., guix-commits, 2020/10/16
- 07/10: gnu: runc, skopeo, docker-cli, umoci: Don't 'chdir' in build phases.,
guix-commits <=
- 10/10: gnu: gnuzilla: Use 'assume-valid-file-name' where appropriate., guix-commits, 2020/10/16
- 08/10: gexp: Add 'assume-valid-file-name' syntax for use with 'local-file'., guix-commits, 2020/10/16
- 09/10: services: provenance: Wrap config file name in 'assume-valid-file-name'., guix-commits, 2020/10/16
- 02/10: nls: Update manual translations., guix-commits, 2020/10/16