emacs-bug-tracker
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#48233: closed ([PATCH 0/3] Modest improvements to the guix-install.s


From: GNU bug Tracking System
Subject: bug#48233: closed ([PATCH 0/3] Modest improvements to the guix-install.sh script.)
Date: Wed, 05 May 2021 15:01:02 +0000

Your message dated Wed, 05 May 2021 11:00:42 -0400
with message-id <87o8dpjkdh.fsf@gmail.com>
and subject line Re: [bug#48233] [PATCH 1/3] guix-install.sh: Please the 
shellcheck linter.
has caused the debbugs.gnu.org bug report #48233,
regarding [PATCH 0/3] Modest improvements to the guix-install.sh script.
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs@gnu.org.)


-- 
48233: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=48233
GNU Bug Tracking System
Contact help-debbugs@gnu.org with problems
--- Begin Message --- Subject: [PATCH 0/3] Modest improvements to the guix-install.sh script. Date: Wed, 5 May 2021 00:10:19 -0400
Hello Guix!

This is a cleanup + small improvement to the install script; it allows
completing the installation in a completely automatic way via:

# yes | ./guix-install.sh

Before this change it was not possible due to the step fetching the OpenPGP
keys being strictly manual.

I've tested it in a VM; if it looks fine I'd like push it to the version-1.3.0
branch.

Thanks,

Maxim

Maxim Cournoyer (3):
  guix-install.sh: Please the shellcheck linter.
  guix-install.sh: Propose automatically fetching OpenPGP keys.
  guix-install.sh: Exit early if Guix is already installed.

 etc/guix-install.sh | 133 ++++++++++++++++++++++++--------------------
 1 file changed, 72 insertions(+), 61 deletions(-)

--
2.31.1



--- End Message ---
--- Begin Message --- Subject: Re: [bug#48233] [PATCH 1/3] guix-install.sh: Please the shellcheck linter. Date: Wed, 05 May 2021 11:00:42 -0400 User-agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
Hi Julien,

Julien Lepiller <julien@lepiller.eu> writes:

> Le 5 mai 2021 00:32:00 GMT-04:00, Maxim Cournoyer <maxim.cournoyer@gmail.com> 
> a écrit :
>>
>>     wget --help | grep -q '\--show-progress' && \
>>         _PROGRESS_OPT="-q --show-progress" || _PROGRESS_OPT=""
>>-    wget $_PROGRESS_OPT -P "$dl_path" "${url}/${bin_ver}.tar.xz"
>>"${url}/${bin_ver}.tar.xz.sig"
>>
>>-    if [[ "$?" -eq 0 ]]; then
>>-       _msg "${PAS}download completed."
>>+    if wget "$_PROGRESS_OPT" -P "$dl_path" \
>>+            "${url}/${bin_ver}.tar.xz" "${url}/${bin_ver}.tar.xz.sig";
>
> "$_PROGRESS_OPT" gets expanded to a single "-q --show-progress", which I 
> doubt exists in wget :). The previous version didn't have quotes.

Good catch!  I failed to see that in my testing due to using the
GUIX_RELEASE_FILE_NAME trick, which shortcuts that procedure.

I've fixed it with an array:

--8<---------------cut here---------------start------------->8---
1 file changed, 4 insertions(+), 3 deletions(-)
etc/guix-install.sh | 7 ++++---

modified   etc/guix-install.sh
@@ -266,15 +266,16 @@ guix_get_bin()
     local url="$1"
     local bin_ver="$2"
     local dl_path="$3"
+    local wget_args=()

     _debug "--- [ ${FUNCNAME[0]} ] ---"

     _msg "${INF}Downloading Guix release archive"

-    wget --help | grep -q '\--show-progress' && \
-        _PROGRESS_OPT="-q --show-progress" || _PROGRESS_OPT=""
+    wget --help | grep -q '\--show-progress' \
+        && wget_args=("-q" "--show-progress")

-    if wget "$_PROGRESS_OPT" -P "$dl_path" \
+    if wget "${wget_args[@]}" -P "$dl_path" \
             "${url}/${bin_ver}.tar.xz" "${url}/${bin_ver}.tar.xz.sig"; then
         _msg "${PAS}download completed."
     else
--8<---------------cut here---------------end--------------->8---

And in another VM (RHEL8) with up-to-date certs to be able to fetch from
the alpha.gnu.org :-).  The install went fine.

Pushed, thank you!

Maxim


--- End Message ---

reply via email to

[Prev in Thread] Current Thread [Next in Thread]