From ca66f636001d46385a1918436929dc8f7a367d71 Mon Sep 17 00:00:00 2001 From: Tomas Volf <~@wolfsden.cz> Date: Tue, 12 Mar 2024 20:27:19 +0100 Subject: gnu: cni-plugins: Update to 1.4.1. * gnu/packages/containers.scm (cni-plugins): Update to 1.4.1. Change-Id: I770504d4f3cf2c74cb14ce8ea37055742529db94 Signed-off-by: Christopher Baines --- gnu/packages/containers.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/containers.scm') diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index aa270a25f3..6d4877460d 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -291,7 +291,7 @@ Layer-4 sockets.") (define-public cni-plugins (package (name "cni-plugins") - (version "1.0.1") + (version "1.4.1") (source (origin (method git-fetch) @@ -299,7 +299,7 @@ Layer-4 sockets.") (url "https://github.com/containernetworking/plugins") (commit (string-append "v" version)))) (sha256 - (base32 "1j91in0mg4nblpdccyq63ncbnn2pc2zzjp1fh3jy0bsndllgv0nc")) + (base32 "0l6f4z762n8blak41wcxdmdhm92gqw2qcxcqd3s4wiql3d7273kj")) (file-name (git-file-name name version)))) (build-system go-build-system) (arguments -- cgit v1.2.3 From 93af6aecd9e32d1592fb4297faebd7739653319d Mon Sep 17 00:00:00 2001 From: Tomas Volf <~@wolfsden.cz> Date: Wed, 6 Mar 2024 00:48:56 +0100 Subject: gnu: Add gvisor-tap-vsock. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/containers.scm (gvisor-tap-vsock): New variable. Change-Id: I50c51613509e84998f17b4be593ce80c16002778 Signed-off-by: Ludovic Courtès --- gnu/packages/containers.scm | 44 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 44 insertions(+) (limited to 'gnu/packages/containers.scm') diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index 6d4877460d..61c7e74c78 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -336,6 +336,50 @@ Layer-4 sockets.") configure network interfaces in Linux containers.") (license license:asl2.0))) +(define-public gvisor-tap-vsock + (package + (name "gvisor-tap-vsock") + (version "0.7.3") + (source (origin + (method git-fetch) + (uri (git-reference + (url "https://github.com/containers/gvisor-tap-vsock") + (commit (string-append "v" version)))) + (file-name (git-file-name name version)) + (sha256 + (base32 + "1q1zism0c63k2aq6yhkjqc3b2zsm4lwn0bk39p2kl79h798wfyp4")))) + (build-system gnu-build-system) + (arguments + (list + #:make-flags `(list ,(string-append "GIT_VERSION=v" version)) + #:test-target "test" + #:phases + #~(modify-phases %standard-phases + (delete 'configure) + (add-before 'build 'setenv + (lambda _ + ;; For golang toolchain. + (setenv "HOME" "/tmp"))) + (add-before 'check 'prune-tests + (lambda _ + ;; Requires internet connection to fetch QEMU image. + (invoke "rm" "-r" "test"))) + (replace 'install + (lambda _ + (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") + (description "This package provides a replacement for @code{libslirp} and +@code{VPNKit}, written in pure Go. It is based on the network stack of gVisor +and brings a configurable DNS server and dynamic port forwarding. + +It can be used with QEMU, Hyperkit, Hyper-V and User-Mode Linux. + +The binary is called @command{gvproxy}.") + (license license:asl2.0))) + ;; For podman to work, the user needs to run ;; `sudo mount -t cgroup2 none /sys/fs/cgroup` -- cgit v1.2.3 From af1759bb9c5aff6279eda1429a73b60b0161960d Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Tue, 12 Mar 2024 13:26:01 +0100 Subject: gnu: distrobox: Update to 1.7.0. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/containers.scm (distrobox): Update to 1.7.0. Change-Id: Ie62683317f6c984e5a64ce5436a17c8f2b7fbcf9 Signed-off-by: Ludovic Courtès --- gnu/packages/containers.scm | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'gnu/packages/containers.scm') diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index 61c7e74c78..7ac9e1b871 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -149,7 +149,7 @@ runtime (like runc or crun) for a single container.") (define-public distrobox (package (name "distrobox") - (version "1.5.0.2") + (version "1.7.0") (source (origin (method git-fetch) @@ -157,7 +157,7 @@ runtime (like runc or crun) for a single container.") (url "https://github.com/89luca89/distrobox") (commit version))) (sha256 - (base32 "0h6rpgbcmg33vriyzh9nkdxj8yhfn0y35i1wh1zmb7zss3ik9kxj")) + (base32 "1g14q1sm3026h9n85v1gc3m2v9sgrac2mr9yrkh98qg5yahzmpc3")) (file-name (git-file-name name version)))) (build-system copy-build-system) (inputs -- cgit v1.2.3 From f094e4351062b2b6ee50c50bdbc7a2b176816143 Mon Sep 17 00:00:00 2001 From: Jean-Pierre De Jesus DIAZ Date: Tue, 12 Mar 2024 13:26:02 +0100 Subject: gnu: distrobox: Fix dependency usage. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * gnu/packages/containers.scm (distrobox): Use WRAP-SCRIPT to patch the scripts to use system wget and podman. Change-Id: Ida9affcb212f64892e85dfa8bc4dd4d59f832f4f Signed-off-by: Ludovic Courtès --- gnu/packages/containers.scm | 46 +++++++++++++++++++++++++++++++++++++-------- 1 file changed, 38 insertions(+), 8 deletions(-) (limited to 'gnu/packages/containers.scm') diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm index 7ac9e1b871..31260c5c0a 100644 --- a/gnu/packages/containers.scm +++ b/gnu/packages/containers.scm @@ -6,6 +6,7 @@ ;;; Copyright © 2023 Zongyuan Li ;;; Copyright © 2023 Ricardo Wurmus ;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz> +;;; Copyright © 2024 Foundation Devices, Inc. ;;; ;;; This file is part of GNU Guix. ;;; @@ -43,6 +44,7 @@ #:use-module (gnu packages glib) #:use-module (gnu packages gnupg) #:use-module (gnu packages golang) + #:use-module (gnu packages guile) #:use-module (gnu packages linux) #:use-module (gnu packages python) #:use-module (gnu packages networking) @@ -160,20 +162,48 @@ runtime (like runc or crun) for a single container.") (base32 "1g14q1sm3026h9n85v1gc3m2v9sgrac2mr9yrkh98qg5yahzmpc3")) (file-name (git-file-name name version)))) (build-system copy-build-system) - (inputs - (list podman wget)) (arguments (list #:phases #~(modify-phases %standard-phases - (add-before 'install 'refer-to-inputs - (lambda* (#:key inputs #:allow-other-keys) - (substitute* (find-files "." "^distrobox[^.]*[^1]$") - (("podman") (search-input-file inputs "/bin/podman")) - (("wget") (search-input-file inputs "/bin/wget")) - (("command -v") "test -x")))) + ;; Use WRAP-SCRIPT to wrap all of the scripts of distrobox, + ;; excluding the host side ones. + (add-after 'install 'wrap-scripts + (lambda _ + (let ((path (search-path-as-list + (list "bin") + (list #$(this-package-input "podman") + #$(this-package-input "wget"))))) + (for-each (lambda (script) + (wrap-script + (string-append #$output "/bin/distrobox-" + script) + `("PATH" ":" prefix ,path))) + '("assemble" + "create" + "enter" + "ephemeral" + "generate-entry" + "list" + "rm" + "stop" + "upgrade"))))) + ;; These scripts are used in the container side and the + ;; /gnu/store path is not shared with the containers. + (add-after 'patch-shebangs 'unpatch-shebangs + (lambda _ + (for-each (lambda (script) + (substitute* + (string-append #$output "/bin/distrobox-" + script) + (("#!.*/bin/sh") "#!/bin/sh\n"))) + '("export" "host-exec" "init")))) (replace 'install (lambda _ (invoke "./install" "--prefix" #$output)))))) + (inputs + (list guile-3.0 ; for wrap-script + podman + wget)) (home-page "https://distrobox.privatedns.org/") (synopsis "Create and start containers highly integrated with the hosts") (description -- cgit v1.2.3