From debbugs-submit-bounces@debbugs.gnu.org Sun May 17 13:18:30 2020 Received: (at 40601) by debbugs.gnu.org; 17 May 2020 17:18:31 +0000 Received: from localhost ([127.0.0.1]:44594 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMvm-000776-Gk for submit@debbugs.gnu.org; Sun, 17 May 2020 13:18:30 -0400 Received: from mail-wr1-f48.google.com ([209.85.221.48]:45473) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1jaMvI-000729-0R for 40601@debbugs.gnu.org; Sun, 17 May 2020 13:18:00 -0400 Received: by mail-wr1-f48.google.com with SMTP id v12so9035719wrp.12 for <40601@debbugs.gnu.org>; Sun, 17 May 2020 10:17:59 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=ygICNL6IhoFFWHUOcX9V5HZ4FO6scN2R4lCW8bvbziE=; b=ZUObr8/9Kco5MlwqgtI4JJeVnArneMQnH5rtoF4XZYaSsCco0p85O+ijKJOxUwbjho 8c2ryUgr604dR4q64ZNI7Aey1+MISO+9Hsetc0pfmBZlLDAMH5ty5Id+jQYsUQPYVTDQ pRoVHWhowSFCRLK96ARrQZZyHvLiJ+uZJj1AjqSUgDv7Vo0DOJqOwsW+J/2kjudGfHUc hTgfQyBzpgGuvZFF5x0/AlYDUiWkbF9nDeJ5NjsmnL5zOkb4Q7TprjTHlFmUcoIyWlco cgob0DPGMQjX3fOWoszOUjkrXnfn04lZk1snLnDeuNyxJD6JE6A8hm9/qdg0cATQ1k6z iORw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=ygICNL6IhoFFWHUOcX9V5HZ4FO6scN2R4lCW8bvbziE=; b=SWdNmOvvrGNfh7luAFd4At4gl+MUAx/2CXEaQX7iOWeYq2mAGfERKpO3KtBYzdU2SK qy17L8AqL0nRmw/PSIFdvGXvvEL/q5UB5fN23VYKO6oA/IXIj9lK+BosRdA7Z2TQqk0m 5v+a+0XHWy/9j0vYmJXsZnR2GUhbqWJL2W1dN9liZJ5x74+OwcRjZPGPJdoAp6mB2R9Z AyJ8/+Vf/MRsDuZNwQU+qiShDkqGyoYuH0pisKW2KL07CcVAuw7S//alinDTVpc6NNDo gj7lYfUj9dO/hSjE1uD37NOUu/Ia+3Bb1RRpcGSWDttS7QKCQ4zolXGyGCEEO5IVbohX toHA== X-Gm-Message-State: AOAM533Jvi0xnbWZ9JXA6miRYNK/ij+IkqYwywRMfa4vJ8uPlKot23fZ qocwgPo5rHkZfY+OkH23XSLFMMp+ X-Google-Smtp-Source: ABdhPJxJLljX6Crsfs7icX4ZgJ87waC4jNdnIJifLvXay58e4sbU/403dA2/snB2gjFQrbyi4lf9xQ== X-Received: by 2002:adf:9264:: with SMTP id 91mr15068684wrj.362.1589735874176; Sun, 17 May 2020 10:17:54 -0700 (PDT) Received: from localhost.localdomain (se167-1-82-242-148-1.fbx.proxad.net. [82.242.148.1]) by smtp.gmail.com with ESMTPSA id v126sm13305048wma.9.2020.05.17.10.17.53 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 17 May 2020 10:17:53 -0700 (PDT) From: Vincent Legoll To: 40601@debbugs.gnu.org Subject: [PATCH 14/28] guix-install.sh: Make tar usage compatible with busybox. Date: Sun, 17 May 2020 19:17:11 +0200 Message-Id: <20200517171725.732-14-vincent.legoll@gmail.com> X-Mailer: git-send-email 2.26.2 In-Reply-To: <20200517171725.732-1-vincent.legoll@gmail.com> References: <20200517171725.732-1-vincent.legoll@gmail.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Spam-Score: 0.0 (/) X-Debbugs-Envelope-To: 40601 Cc: Vincent Legoll X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -1.0 (-) The --warning option is not suported by busybox tar, but it does not emit missing timestamps warnings anyways. * etc/guix-install.sh (sys_create_store): Add --warning tar option only when supported. --- etc/guix-install.sh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/etc/guix-install.sh b/etc/guix-install.sh index 770ecfaf3f..b5e8416610 100755 --- a/etc/guix-install.sh +++ b/etc/guix-install.sh @@ -274,10 +274,13 @@ sys_create_store() _debug "--- [ $FUNCNAME ] ---" - cd "$tmp_path" - tar --warning=no-timestamp \ - --extract \ - --file "$pkg" && + # Do not use the --warning option with busybox tar + TAROPTS=("-C" "${tmp_path}") + if tar c --warning=no-timestamp -f /dev/null /dev/null >&/dev/null; then + TAROPTS+=("--warning=no-timestamp") + fi + + tar x -f "${pkg}" "${TAROPTS[@]}" && _msg "${PAS}unpacked archive" if [[ -e "/var/guix" || -e "/gnu" ]]; then -- 2.26.2