diff options
Diffstat (limited to 'gnu/packages/containers.scm')
-rw-r--r-- | gnu/packages/containers.scm | 58 |
1 files changed, 28 insertions, 30 deletions
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index c57f249ebd..a80596aa53 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -7,6 +7,7 @@ ;;; Copyright © 2023 Ricardo Wurmus <rekado@elephly.net> ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> ;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz> +;;; Copyright © 2024 Jean-Pierre De Jesus DIAZ <jean@foundation.xyz> ;;; ;;; This file is part of GNU Guix. ;;; @@ -159,7 +160,7 @@ runtime (like runc or crun) for a single container.") (define-public distrobox (package (name "distrobox") - (version "1.7.0") + (version "1.7.2.1") (source (origin (method git-fetch) @@ -167,12 +168,20 @@ runtime (like runc or crun) for a single container.") (url "https://github.com/89luca89/distrobox") (commit version))) (sha256 - (base32 "1g14q1sm3026h9n85v1gc3m2v9sgrac2mr9yrkh98qg5yahzmpc3")) + (base32 "0q0m3x1984kc5g7pihlwmnmrnnxnx6c0givx7wf91q91rlmdws0z")) (file-name (git-file-name name version)))) (build-system copy-build-system) (arguments (list #:phases #~(modify-phases %standard-phases + ;; This script creates desktop files but when the store path for + ;; distrobox changes it leaves the stale path on the desktop + ;; file, so remove the path to use the profile's current + ;; distrobox. + (add-after 'unpack 'patch-distrobox-generate-entry + (lambda _ + (substitute* "distrobox-generate-entry" + (("\\$\\{distrobox_path\\}/distrobox") "distrobox")))) ;; Use WRAP-SCRIPT to wrap all of the scripts of distrobox, ;; excluding the host side ones. (add-after 'install 'wrap-scripts @@ -392,12 +401,15 @@ configure network interfaces in Linux containers.") (list #:make-flags `(list ,(string-append "GIT_VERSION=v" version)) #:test-target "test" - #:imported-modules - (source-module-closure `(,@%gnu-build-system-modules - (guix build go-build-system))) #:phases #~(modify-phases %standard-phases (delete 'configure) + ;; Add -trimpath flag to avoid keeping references to go package + ;; in the store. + (add-after 'unpack 'patch-go-reference + (lambda _ + (substitute* "Makefile" + (("go build") "go build -trimpath")))) (add-before 'build 'setenv (lambda _ ;; For golang toolchain. @@ -408,9 +420,7 @@ configure network interfaces in Linux containers.") (invoke "rm" "-r" "test"))) (replace 'install (lambda _ - (install-file "bin/gvproxy" (string-append #$output "/bin")))) - (add-after 'install 'remove-go-references - (@@ (guix build go-build-system) remove-go-references))))) + (install-file "bin/gvproxy" (string-append #$output "/bin"))))))) (native-inputs (list go-1.20)) (home-page "https://github.com/containers/gvisor-tap-vsock") (synopsis "Network stack for virtualization based on gVisor") @@ -454,7 +464,7 @@ Its main purpose is to support the key usage by @code{docker-init}: (define-public podman (package (name "podman") - (version "5.1.0") + (version "5.1.2") (source (origin (method git-fetch) @@ -462,7 +472,7 @@ Its main purpose is to support the key usage by @code{docker-init}: (url "https://github.com/containers/podman") (commit (string-append "v" version)))) (sha256 - (base32 "0ldzrrz8jba6ka1xfs8msiy08iz4m674xhfxbcdsnc9lmxi3ys4f")) + (base32 "1v0qqzfl0nqkqmqimv89nrggb7n1ryhqpdi8v7yn2c7m0dm8xq91")) (file-name (git-file-name name version)))) (build-system gnu-build-system) (arguments @@ -472,12 +482,10 @@ Its main purpose is to support the key usage by @code{docker-init}: (string-append "PREFIX=" #$output) (string-append "HELPER_BINARIES_DIR=" #$output "/_guix") (string-append "GOMD2MAN=" - #$go-github-com-go-md2man "/bin/go-md2man")) + #$go-github-com-go-md2man "/bin/go-md2man") + (string-append "BUILDFLAGS=-trimpath")) #:tests? #f ; /sys/fs/cgroup not set up in guix sandbox #:test-target "test" - #:imported-modules - (source-module-closure `(,@%gnu-build-system-modules - (guix build go-build-system))) #:phases #~(modify-phases %standard-phases (delete 'configure) @@ -529,17 +537,6 @@ Its main purpose is to support the key usage by @code{docker-init}: ,(string-append #$passt "/bin") ,(string-append #$procps "/bin") ; ps "/run/setuid-programs"))))) - (add-after 'install 'remove-go-references - (lambda* (#:key inputs #:allow-other-keys) - (let ((go (assoc-ref inputs "go"))) - (for-each - (lambda (file) - (when (executable-file? file) - ((@@ (guix build go-build-system) remove-store-reference) - file go))) - (append (find-files (string-append #$output "/bin")) - (find-files (string-append #$output "/libexec")) - (find-files (string-append #$output "/lib"))))))) (add-after 'install 'install-completions (lambda _ (invoke "make" "install.completions" @@ -629,9 +626,6 @@ being rootless and not requiring any daemon to be running.") #$go-github-com-go-md2man "/bin/go-md2man")) #:tests? #f ; /sys/fs/cgroup not set up in guix sandbox #:test-target "test-unit" - #:imported-modules - (source-module-closure `(,@%gnu-build-system-modules - (guix build go-build-system))) #:phases #~(modify-phases %standard-phases (delete 'configure) @@ -643,6 +637,12 @@ being rootless and not requiring any daemon to be running.") ;; Make <4.4 causing CC not to be propagated into $(shell ...) ;; calls. Can be removed once we update to >4.3. (setenv "CC" #$(cc-for-target)))) + ;; Add -trimpath to build flags to avoid keeping references to go + ;; packages. + (add-after 'set-env 'patch-buildflags + (lambda _ + (substitute* "Makefile" + (("BUILDFLAGS :=") "BUILDFLAGS := -trimpath ")))) (replace 'check (lambda* (#:key tests? #:allow-other-keys) (when tests? @@ -670,8 +670,6 @@ being rootless and not requiring any daemon to be running.") ,(string-append #$gcc "/bin") ; cpp ,(string-append #$passt "/bin") "/run/setuid-programs"))))) - (add-after 'install 'remove-go-references - (@@ (guix build go-build-system) remove-go-references)) (add-after 'install 'install-completions (lambda _ (invoke "make" "install.completions" |