From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:470:142:3::10]:59128) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1jO1dw-0004zF-Oq for guix-patches@gnu.org; Mon, 13 Apr 2020 12:09:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1jO1dv-0005N9-Lo for guix-patches@gnu.org; Mon, 13 Apr 2020 12:09:04 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:49023) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1jO1dv-0005Ms-8M for guix-patches@gnu.org; Mon, 13 Apr 2020 12:09:03 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1jO1dv-0006ww-49 for guix-patches@gnu.org; Mon, 13 Apr 2020 12:09:03 -0400 Subject: [bug#40601] [PATCH 4/5] guix-install.sh: Handle local binary tarball file. Resent-Message-ID: From: Vincent Legoll Date: Mon, 13 Apr 2020 18:07:39 +0200 Message-Id: <20200413160740.19584-4-vincent.legoll@gmail.com> In-Reply-To: <20200413160740.19584-1-vincent.legoll@gmail.com> References: <20200413160740.19584-1-vincent.legoll@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 40601@debbugs.gnu.org Cc: Vincent Legoll * 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 # Copyright © 2018 Efraim Flashner # Copyright © 2019 Tobias Geerinckx-Rice +# Copyright © 2020 Vincent Legoll # # 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