From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on inbox.vuxu.org X-Spam-Level: X-Spam-Status: No, score=-1.1 required=5.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,MAILING_LIST_MULTI,RCVD_IN_DNSWL_NONE autolearn=ham autolearn_force=no version=3.4.4 Received: (qmail 15223 invoked from network); 29 Dec 2020 19:18:09 -0000 Received: from krantz.zx2c4.com (192.95.5.69) by inbox.vuxu.org with ESMTPUTF8; 29 Dec 2020 19:18:09 -0000 Received: by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTP id 89c783d2; Tue, 29 Dec 2020 19:08:01 +0000 (UTC) Return-Path: Received: from pb-smtp1.pobox.com (pb-smtp1.pobox.com [64.147.108.70]) by krantz.zx2c4.com (ZX2C4 Mail Server) with ESMTPS id f23f0fc7 (TLSv1.2:ECDHE-RSA-AES256-GCM-SHA384:256:NO) for ; Tue, 29 Dec 2020 19:07:59 +0000 (UTC) Received: from pb-smtp1.pobox.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id 0F33C90C83; Tue, 29 Dec 2020 14:18:05 -0500 (EST) (envelope-from tmz@pobox.com) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; s=sasl; bh=DgoU2EeE1Cnq rNgg9RhLTOjOZy4=; b=XqnEquqwhdHON5UXxOPOJbtqxLBD9AKpMbi6G1NRxzfr CHorIvJYeKmV639Y0GCinR+qFqMu8XfLvO33TyxvEzwOH6SmJMWaukT1Z+LEkBEJ AurwJ1uTZT4MJhlUjqbuGhdfXXqyKc7ktVenxAg0pjDupGnWz2NutSU9NHJb+0E= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:date:message-id:in-reply-to:references:mime-version :content-type:content-transfer-encoding; q=dns; s=sasl; b=grP1ER vu/Qi339pnZ3f+G9Q3HX0cyJrSI+AZz8nO1+mR0MDJRx/kDZ65nP5VAcWNAXzEe2 yq18rDnAeLzV6L1TwzgoGXt51jUk+YZDfQHIR9zX7K3Vys/xbuWbYslIiMLxGjI7 5G8DCuOmlTJT641whxLsrrACYlkG+xqUgLKYU= Received: from pb-smtp1.nyi.icgroup.com (unknown [127.0.0.1]) by pb-smtp1.pobox.com (Postfix) with ESMTP id A632B90C82; Tue, 29 Dec 2020 14:18:04 -0500 (EST) (envelope-from tmz@pobox.com) Received: from morphine.paradise.teonanacatl.net (unknown [47.202.84.202]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pb-smtp1.pobox.com (Postfix) with ESMTPSA id 58C5790C81; Tue, 29 Dec 2020 14:18:03 -0500 (EST) (envelope-from tmz@pobox.com) From: Todd Zullinger To: cgit@lists.zx2c4.com Cc: Christian Hesse , Hanspeter Portner Subject: [PATCH] t0107: support older and/or non-GNU tar Date: Tue, 29 Dec 2020 14:18:01 -0500 Message-Id: <20201229191801.3845323-1-tmz@pobox.com> X-Mailer: git-send-email 2.30.0 In-Reply-To: <20200810022631.GV540@pobox.com> References: <20200810022631.GV540@pobox.com> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 X-Pobox-Relay-ID: 92A36DAC-4A0A-11EB-9422-D152C8D8090B-09356542!pb-smtp1.pobox.com Content-Transfer-Encoding: quoted-printable X-BeenThere: cgit@lists.zx2c4.com X-Mailman-Version: 2.1.30rc1 Precedence: list List-Id: List for cgit developers and users List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: cgit-bounces@lists.zx2c4.com Sender: "CGit" The untar tests for various compression algorithms use shortcut options from GNU tar to handle decompression. These options may not be provided by non-GNU tar nor even by slightly older GNU tar versions which ship on many systems. An example of the latter case is the --zstd option. This was added in GNU tar-1.32 (2019-02-23)=C2=B9. This version of tar is not provided by CentOS/RHEL, in particular. In Debian, --zstd has been backported to the tar-1.30 release. Avoid the requirement on any specific implementations or versions of tar by piping decompressed output to tar. This is compatible with older GNU tar releases as well as tar implementations from other vendors. (It may also be a slight benefit that this more closely matches what the snapshot creation code does.) =C2=B9 Technically, the --zstd option was first released in tar-1.31 (2019-01-02), but this release was very short-lived and is no longer listed on the GNU Tar release page. Signed-off-by: Todd Zullinger --- Hi, I'm sending again, in case the previous version which was in reply to the RFC/PATCH was simply not seen. It would be nice to get a fix to allow running the tests on systems which don't have tar >=3D 1.32 (or Debian-based syttems where the --zstd option was backported to 1.30). I'd also prefer to not carry it as a patch in the packages for Fedora's EPEL branches if I can avoid it. Thanks! tests/t0107-snapshot.sh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/tests/t0107-snapshot.sh b/tests/t0107-snapshot.sh index c164d3e..8ea95ce 100755 --- a/tests/t0107-snapshot.sh +++ b/tests/t0107-snapshot.sh @@ -25,7 +25,7 @@ test_expect_success 'verify gzip format' ' =20 test_expect_success 'untar' ' rm -rf master && - tar -xzf master.tar.gz + gzip -dc master.tar.gz | tar -xf - ' =20 test_expect_success 'count files' ' @@ -67,7 +67,7 @@ test_expect_success LZIP 'verify lzip format' ' =20 test_expect_success LZIP 'untar' ' rm -rf master && - tar --lzip -xf master.tar.lz + lzip -dc master.tar.lz | tar -xf - ' =20 test_expect_success LZIP 'count files' ' @@ -109,7 +109,7 @@ test_expect_success XZ 'verify xz format' ' =20 test_expect_success XZ 'untar' ' rm -rf master && - tar --xz -xf master.tar.xz + xz -dc master.tar.xz | tar -xf - ' =20 test_expect_success XZ 'count files' ' @@ -151,7 +151,7 @@ test_expect_success ZSTD 'verify zstd format' ' =20 test_expect_success ZSTD 'untar' ' rm -rf master && - tar --zstd -xf master.tar.zst + zstd -dc master.tar.zst | tar -xf - ' =20 test_expect_success ZSTD 'count files' '