* [bug#69744] [PATCH 0/2] gnu: distrobox: Fix package and update.
@ 2024-03-12 11:51 Jean-Pierre De Jesus DIAZ
2024-03-12 12:26 ` [bug#69744] [PATCH 1/2] gnu: distrobox: Update to 1.7.0 Jean-Pierre De Jesus DIAZ
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Jean-Pierre De Jesus DIAZ @ 2024-03-12 11:51 UTC (permalink / raw)
To: 69744; +Cc: Jean-Pierre De Jesus DIAZ
Hi,
Previously the distrobox package wasn't working for me, while I didn't
find the cause of it I tried rewriting the definition and applied some
recommendations I've found when the package was added first.
So it now uses wrap-script to patch the scripts and un-patches the
shebang of scripts that are only used inside of the containers.
Also updated the package to 1.7.0.
Thanks,
Jean-Pierre De Jesus DIAZ (2):
gnu: distrobox: Update to 1.7.0.
gnu: distrobox: Fix dependency usage.
gnu/packages/containers.scm | 50 +++++++++++++++++++++++++++++--------
1 file changed, 40 insertions(+), 10 deletions(-)
base-commit: 1e5e3d8e24e8ed0b071fcd4b95d2a0a05c80c546
--
2.41.0
^ permalink raw reply [flat|nested] 4+ messages in thread
* [bug#69744] [PATCH 1/2] gnu: distrobox: Update to 1.7.0.
2024-03-12 11:51 [bug#69744] [PATCH 0/2] gnu: distrobox: Fix package and update Jean-Pierre De Jesus DIAZ
@ 2024-03-12 12:26 ` Jean-Pierre De Jesus DIAZ
2024-03-12 12:26 ` [bug#69744] [PATCH 2/2] gnu: distrobox: Fix dependency usage Jean-Pierre De Jesus DIAZ
2024-03-22 10:38 ` bug#69744: [PATCH 0/2] gnu: distrobox: Fix package and update Ludovic Courtès
2 siblings, 0 replies; 4+ messages in thread
From: Jean-Pierre De Jesus DIAZ @ 2024-03-12 12:26 UTC (permalink / raw)
To: 69744; +Cc: Jean-Pierre De Jesus DIAZ
* gnu/packages/containers.scm (distrobox): Update to 1.7.0.
Change-Id: Ie62683317f6c984e5a64ce5436a17c8f2b7fbcf9
---
gnu/packages/containers.scm | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index aa270a25f3..21bd7e64bc 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -149,7 +149,7 @@ (define-public conmon
(define-public distrobox
(package
(name "distrobox")
- (version "1.5.0.2")
+ (version "1.7.0")
(source
(origin
(method git-fetch)
@@ -157,7 +157,7 @@ (define-public distrobox
(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
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [bug#69744] [PATCH 2/2] gnu: distrobox: Fix dependency usage.
2024-03-12 11:51 [bug#69744] [PATCH 0/2] gnu: distrobox: Fix package and update Jean-Pierre De Jesus DIAZ
2024-03-12 12:26 ` [bug#69744] [PATCH 1/2] gnu: distrobox: Update to 1.7.0 Jean-Pierre De Jesus DIAZ
@ 2024-03-12 12:26 ` Jean-Pierre De Jesus DIAZ
2024-03-22 10:38 ` bug#69744: [PATCH 0/2] gnu: distrobox: Fix package and update Ludovic Courtès
2 siblings, 0 replies; 4+ messages in thread
From: Jean-Pierre De Jesus DIAZ @ 2024-03-12 12:26 UTC (permalink / raw)
To: 69744; +Cc: Jean-Pierre De Jesus DIAZ
* gnu/packages/containers.scm (distrobox): Use WRAP-SCRIPT to patch the
scripts to use system wget and podman.
Change-Id: Ida9affcb212f64892e85dfa8bc4dd4d59f832f4f
---
gnu/packages/containers.scm | 46 ++++++++++++++++++++++++++++++-------
1 file changed, 38 insertions(+), 8 deletions(-)
diff --git a/gnu/packages/containers.scm b/gnu/packages/containers.scm
index 21bd7e64bc..d93ca04960 100644
--- a/gnu/packages/containers.scm
+++ b/gnu/packages/containers.scm
@@ -6,6 +6,7 @@
;;; Copyright © 2023 Zongyuan Li <zongyuan.li@c0x0o.me>
;;; Copyright © 2023 Ricardo Wurmus <rekado@elephly.net>
;;; Copyright © 2024 Tomas Volf <~@wolfsden.cz>
+;;; Copyright © 2024 Foundation Devices, Inc. <hello@foundation.xyz>
;;;
;;; This file is part of GNU Guix.
;;;
@@ -43,6 +44,7 @@ (define-module (gnu packages containers)
#: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 @@ (define-public distrobox
(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
--
2.41.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* bug#69744: [PATCH 0/2] gnu: distrobox: Fix package and update.
2024-03-12 11:51 [bug#69744] [PATCH 0/2] gnu: distrobox: Fix package and update Jean-Pierre De Jesus DIAZ
2024-03-12 12:26 ` [bug#69744] [PATCH 1/2] gnu: distrobox: Update to 1.7.0 Jean-Pierre De Jesus DIAZ
2024-03-12 12:26 ` [bug#69744] [PATCH 2/2] gnu: distrobox: Fix dependency usage Jean-Pierre De Jesus DIAZ
@ 2024-03-22 10:38 ` Ludovic Courtès
2 siblings, 0 replies; 4+ messages in thread
From: Ludovic Courtès @ 2024-03-22 10:38 UTC (permalink / raw)
To: Jean-Pierre De Jesus DIAZ; +Cc: 69744-done
Hi,
Jean-Pierre De Jesus DIAZ <jean@foundation.xyz> skribis:
> gnu: distrobox: Update to 1.7.0.
> gnu: distrobox: Fix dependency usage.
Applied, thanks!
Ludo’.
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2024-03-22 10:54 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2024-03-12 11:51 [bug#69744] [PATCH 0/2] gnu: distrobox: Fix package and update Jean-Pierre De Jesus DIAZ
2024-03-12 12:26 ` [bug#69744] [PATCH 1/2] gnu: distrobox: Update to 1.7.0 Jean-Pierre De Jesus DIAZ
2024-03-12 12:26 ` [bug#69744] [PATCH 2/2] gnu: distrobox: Fix dependency usage Jean-Pierre De Jesus DIAZ
2024-03-22 10:38 ` bug#69744: [PATCH 0/2] gnu: distrobox: Fix package and update Ludovic Courtès
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/guix.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).