On Sat, Apr 17, 2021 at 03:22:37PM -0400, Leo Famulari wrote:
> Can you share your diff? I tried to alter guix-install.sh to download
> the tarball I built from my server, but it's easier said than done.

Julien shared a diff on #guix, and I adapted it a bit, as attached.

I named the binary tarball that I built 'guix-binary-0.tar.xz', so if
you choose another name, adjust guix-install.sh appropriately.

And of course, change the URL used in the invocation of guix_get_bin().
The example.com URL will not work.
--- guix-install.sh.bak 2021-04-17 16:54:16.653305552 -0400
+++ guix-install.sh     2021-04-17 17:53:30.704684525 -0400
@@ -267,7 +267,7 @@
 
     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"
+    wget $_PROGRESS_OPT -P "$dl_path" "${url}/${bin_ver}.tar.xz"
 
     if [[ "$?" -eq 0 ]]; then
        _msg "${PAS}download completed."
@@ -276,15 +276,15 @@
         exit 1
     fi
 
-    pushd "${dl_path}" >/dev/null
-    gpg --verify "${bin_ver}.tar.xz.sig" >/dev/null 2>&1
-    if [[ "$?" -eq 0 ]]; then
-        _msg "${PAS}Signature is valid."
-        popd >/dev/null
-    else
-        _err "${ERR}could not verify the signature."
-        exit 1
-    fi
+#    pushd "${dl_path}" >/dev/null
+#    gpg --verify "${bin_ver}.tar.xz.sig" >/dev/null 2>&1
+#    if [[ "$?" -eq 0 ]]; then
+#        _msg "${PAS}Signature is valid."
+#        popd >/dev/null
+#    else
+#        _err "${ERR}could not verify the signature."
+#        exit 1
+#    fi
 }
 
 sys_create_store()
@@ -296,7 +296,7 @@
 
     cd "$tmp_path"
     tar --extract \
-        --file "$pkg" &&
+        --file "guix-binary-0.tar.xz" &&
     _msg "${PAS}unpacked archive"
 
     if [[ -e "/var/guix" || -e "/gnu" ]]; then
@@ -544,7 +544,7 @@
 
     chk_term
     chk_require "${REQUIRE[@]}"
-    chk_gpg_keyring
+#    chk_gpg_keyring
     chk_init_sys
     chk_sys_arch
     chk_sys_nscd
@@ -554,8 +554,9 @@
     umask 0022
     tmp_path="$(mktemp -t -d guix.XXX)"
 
-    guix_get_bin_list "${GNU_URL}"
-    guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
+#    guix_get_bin_list "${GNU_URL}"
+#    guix_get_bin "${GNU_URL}" "${BIN_VER}" "$tmp_path"
+    guix_get_bin "https://example.com"; "guix-binary-0" "$tmp_path"
 
     sys_create_store "${BIN_VER}.tar.xz" "${tmp_path}"
     sys_create_build_user

Attachment: signature.asc
Description: PGP signature

Reply via email to