diff mbox series

[bug#40601,04/28] guix-install.sh: Handle local binary tarball file.

Message ID 20200517171725.732-4-vincent.legoll@gmail.com
State Under Review
Delegated to: Christopher Baines
Headers show
Series guix-install.sh: port to other distros & init systems | expand

Checks

Context Check Description
cbaines/applying patch fail View Laminar job

Commit Message

Vincent Legoll May 17, 2020, 5:17 p.m. UTC
* 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(-)

Comments

jbranso--- via Guix-patches via May 23, 2020, 1:42 p.m. UTC | #1
Vincent,

I've pushed the first three patches with some commit message 
tweaks.

Vincent Legoll 写道:
> * etc/guix-install.sh (REQUIRE): add realpath.
> (main): Handle local binary tarball file path passed as first 
> arg.

‘file name’, ‘argument’.

I'm OK with this change in general but it needs to be documented 
*somewhere*: in (guix)Binary Installation and/or a (new) --help 
message and/or an ‘Invocation:’ comment at the top of the script.

I notice you ran out of commit message energy halfway through the 
series :-)  While I've come to love Guix's discipline, I 
sympathise, but what's the plan?

Thanks,

T G-R
Vincent Legoll May 23, 2020, 9:37 p.m. UTC | #2
On 23/05/2020 15:42, Tobias Geerinckx-Rice wrote:
> Vincent,
> 
> I've pushed the first three patches with some commit message tweaks.

Thanks & thanks

> Vincent Legoll 写道:
>> * etc/guix-install.sh (REQUIRE): add realpath.
>> (main): Handle local binary tarball file path passed as first arg.
> 
> ‘file name’, ‘argument’.
> 
> I'm OK with this change in general but it needs to be documented 
> *somewhere*: in (guix)Binary Installation and/or a (new) --help message 
> and/or an ‘Invocation:’ comment at the top of the script.
> 
> I notice you ran out of commit message energy halfway through the series 
> :-)  While I've come to love Guix's discipline, I sympathise, but what's 
> the plan?

I was off duty at dayjob cause of covid partial unemployment last week,
that's why I got more time to work on guix. I have resumed work this
week so it explains the slowdown ;-)

The plan is that I'll continue working on this series to polish the
commit messages that need to be. I just wanted to send the series to
have the ACKs that it will not be lost work, before continuing.

I've got ACKs, so I'll work on finishing the pending patches, before
embarking on more TODO items. And doc is one item from that TODO list.
I'll put it on top.

But even if dev speed is lower, I'm committed to finish this.
diff mbox series

Patch

diff --git a/etc/guix-install.sh b/etc/guix-install.sh
index 4fa9664cf5..7b9a729570 100755
--- a/etc/guix-install.sh
+++ b/etc/guix-install.sh
@@ -4,6 +4,7 @@ 
 # Copyright © 2018 Ricardo Wurmus <rekado@elephly.net>
 # Copyright © 2018 Efraim Flashner <efraim@flashner.co.il>
 # Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr>
+# Copyright © 2020 Vincent Legoll <vincent.legoll@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