diff options
| author | Ludovic Courtès <ludo@gnu.org> | 2020-10-16 14:32:50 +0200 |
|---|---|---|
| committer | Ludovic Courtès <ludo@gnu.org> | 2020-10-16 15:00:50 +0200 |
| commit | e39e8d97c17c7e7a008a4f4e125ae6b3844cc03a (patch) | |
| tree | 2b7e1715bffc11e7dc7dc2b16e8c039dd43e0317 /gnu/packages/virtualization.scm | |
| parent | 9a4c83bdb61d046617e87ad9b4c0e1d6b55b1810 (diff) | |
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.
Diffstat (limited to 'gnu/packages/virtualization.scm')
| -rw-r--r-- | gnu/packages/virtualization.scm | 45 |
1 files changed, 24 insertions, 21 deletions
diff --git a/gnu/packages/virtualization.scm b/gnu/packages/virtualization.scm index f536616126f..ac062dfa15d 100644 --- a/gnu/packages/virtualization.scm +++ b/gnu/packages/virtualization.scm | |||
| @@ -1518,18 +1518,19 @@ monitor/GPU.") | |||
| 1518 | "-xvf" source)))) | 1518 | "-xvf" source)))) |
| 1519 | (replace 'build | 1519 | (replace 'build |
| 1520 | (lambda* (#:key import-path #:allow-other-keys) | 1520 | (lambda* (#:key import-path #:allow-other-keys) |
| 1521 | (chdir (string-append "src/" import-path)) | 1521 | (with-directory-excursion (string-append "src/" import-path) |
| 1522 | ;; XXX: requires 'go-md2man'. | 1522 | ;; XXX: requires 'go-md2man'. |
| 1523 | ;; (invoke "make" "man") | 1523 | ;; (invoke "make" "man") |
| 1524 | (invoke "make"))) | 1524 | (invoke "make")))) |
| 1525 | ;; (replace 'check | 1525 | ;; (replace 'check |
| 1526 | ;; (lambda _ | 1526 | ;; (lambda _ |
| 1527 | ;; (invoke "make" "localunittest"))) | 1527 | ;; (invoke "make" "localunittest"))) |
| 1528 | (replace 'install | 1528 | (replace 'install |
| 1529 | (lambda* (#:key outputs #:allow-other-keys) | 1529 | (lambda* (#:key import-path outputs #:allow-other-keys) |
| 1530 | (let ((out (assoc-ref outputs "out"))) | 1530 | (with-directory-excursion (string-append "src/" import-path) |
| 1531 | (invoke "make" "install" "install-bash" | 1531 | (let ((out (assoc-ref outputs "out"))) |
| 1532 | (string-append "PREFIX=" out)))))))) | 1532 | (invoke "make" "install" "install-bash" |
| 1533 | (string-append "PREFIX=" out))))))))) | ||
| 1533 | (native-inputs | 1534 | (native-inputs |
| 1534 | `(("pkg-config" ,pkg-config))) | 1535 | `(("pkg-config" ,pkg-config))) |
| 1535 | (inputs | 1536 | (inputs |
| @@ -1573,14 +1574,15 @@ Open Container Initiative specification.") | |||
| 1573 | "-xvf" source)))) | 1574 | "-xvf" source)))) |
| 1574 | (replace 'build | 1575 | (replace 'build |
| 1575 | (lambda* (#:key import-path #:allow-other-keys) | 1576 | (lambda* (#:key import-path #:allow-other-keys) |
| 1576 | (chdir (string-append "src/" import-path)) | 1577 | (with-directory-excursion (string-append "src/" import-path) |
| 1577 | ;; TODO: build manpages with 'go-md2man'. | 1578 | ;; TODO: build manpages with 'go-md2man'. |
| 1578 | (invoke "make" "SHELL=bash"))) | 1579 | (invoke "make" "SHELL=bash")))) |
| 1579 | (replace 'install | 1580 | (replace 'install |
| 1580 | (lambda* (#:key outputs #:allow-other-keys) | 1581 | (lambda* (#:key import-path outputs #:allow-other-keys) |
| 1581 | (let* ((out (assoc-ref outputs "out")) | 1582 | (let* ((out (assoc-ref outputs "out")) |
| 1582 | (bindir (string-append out "/bin"))) | 1583 | (bindir (string-append out "/bin"))) |
| 1583 | (install-file "umoci" bindir) | 1584 | (install-file (string-append "src/" import-path "/umoci") |
| 1585 | bindir) | ||
| 1584 | #t)))))) | 1586 | #t)))))) |
| 1585 | (home-page "https://umo.ci/") | 1587 | (home-page "https://umo.ci/") |
| 1586 | (synopsis "Tool for modifying Open Container images") | 1588 | (synopsis "Tool for modifying Open Container images") |
| @@ -1617,19 +1619,20 @@ Open Container Initiative (OCI) image layout and its tagged images.") | |||
| 1617 | (arguments | 1619 | (arguments |
| 1618 | '(#:import-path "github.com/containers/skopeo" | 1620 | '(#:import-path "github.com/containers/skopeo" |
| 1619 | #:install-source? #f | 1621 | #:install-source? #f |
| 1620 | #:tests? #f ; The tests require Docker | 1622 | #:tests? #f ; The tests require Docker |
| 1621 | #:phases | 1623 | #:phases |
| 1622 | (modify-phases %standard-phases | 1624 | (modify-phases %standard-phases |
| 1623 | (replace 'build | 1625 | (replace 'build |
| 1624 | (lambda* (#:key import-path #:allow-other-keys) | 1626 | (lambda* (#:key import-path #:allow-other-keys) |
| 1625 | (chdir (string-append "src/" import-path)) | 1627 | (with-directory-excursion (string-append "src/" import-path) |
| 1626 | ;; TODO: build manpages with 'go-md2man'. | 1628 | ;; TODO: build manpages with 'go-md2man'. |
| 1627 | (invoke "make" "bin/skopeo"))) | 1629 | (invoke "make" "bin/skopeo")))) |
| 1628 | (replace 'install | 1630 | (replace 'install |
| 1629 | (lambda* (#:key outputs #:allow-other-keys) | 1631 | (lambda* (#:key import-path outputs #:allow-other-keys) |
| 1630 | (let ((out (assoc-ref outputs "out"))) | 1632 | (with-directory-excursion (string-append "src/" import-path) |
| 1631 | (invoke "make" "install-binary" "install-completions" | 1633 | (let ((out (assoc-ref outputs "out"))) |
| 1632 | (string-append "PREFIX=" out)))))))) | 1634 | (invoke "make" "install-binary" "install-completions" |
| 1635 | (string-append "PREFIX=" out))))))))) | ||
| 1633 | (home-page "https://github.com/containers/skopeo") | 1636 | (home-page "https://github.com/containers/skopeo") |
| 1634 | (synopsis "Interact with container images and container image registries") | 1637 | (synopsis "Interact with container images and container image registries") |
| 1635 | (description | 1638 | (description |
