GNU bug report logs - #40601
guix-install.sh: port to other distros & init systems

Previous Next

Package: guix-patches;

Reported by: Vincent Legoll <vincent.legoll <at> gmail.com>

Date: Mon, 13 Apr 2020 16:05:01 UTC

Severity: normal

Tags: patch

Done: Vincent Legoll <vincent.legoll <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Vincent Legoll <vincent.legoll <at> gmail.com>
To: 40601 <at> debbugs.gnu.org
Cc: Vincent Legoll <vincent.legoll <at> gmail.com>
Subject: [bug#40601] [PATCH 4/5] guix-install.sh: Handle local binary tarball file.
Date: Mon, 13 Apr 2020 18:07:39 +0200
* etc/guix-install.sh (REQUIRE): add realpath.
(main): Handle local binary tarball file path passed as first arg.
---
 etc/guix-install.sh | 14 ++++++++++----
 1 file changed, 10 insertions(+), 4 deletions(-)

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 4fa9664cf5..0d15a05cb4 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -4,6 +4,7 @@
 # Copyright © 2018 Ricardo Wurmus <rekado <at> elephly.net>
 # Copyright © 2018 Efraim Flashner <efraim <at> flashner.co.il>
 # Copyright © 2019 Tobias Geerinckx-Rice <me <at> tobias.gr>
+# Copyright © 2020 Vincent Legoll <vincent.legoll <at> gmail.com>
 #
 # This file is part of GNU Guix.
 #
@@ -47,6 +48,7 @@ REQUIRE=(
     "uname"
     "groupadd"
     "tail"
+    "realpath"
     "tr"
     "xz"
 )
@@ -482,10 +484,14 @@ main()
     umask 0022
     tmp_path="$(mktemp -t -d guix.XXX)"
 
-    guix_get_bin_list "${GNU_URL}"
-    guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
-
-    sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}"
+    if [ -z "$1" ]; then
+        guix_get_bin_list "${GNU_URL}"
+        guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
+        TARBALL="${BIN_VER}.tar.xz"
+    else
+        TARBALL="$(realpath $1)"
+    fi
+    sys_create_store "${TARBALL}" "${tmp_path}"
     sys_create_build_user
     sys_enable_guix_daemon
     sys_authorize_build_farms
-- 
2.26.0





This bug report was last modified 345 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.