Package: sbuild
Version: 0.81.2
Severity: normal
Tags: patch
X-Debbugs-Cc: vagr...@debian.org

The attached patch adds support for using zstd compressed tarballs.

sbuild will try to use ~/.cache/sbuild/sid-amd64.tar.zst but tar may not
know what to do with it and so errors out:

  Unpacking /home/vagrant/.cache/sbuild/sid-amd64.tar.zst to 
/tmp/tmp.sbuild.2ilJsfh49J...
  tar: Archive is compressed. Use --zstd option
  tar: Error is not recoverable: exiting now
  E: ABORT: Received PIPE signal (requesting cleanup and shutdown)


The patch passes the --zstd argument to tar, which seems to be available
in versions of tar since buster. Alternately, "--use-compress-program
zstd" worked as well.


Really loving "--chroot-mode=unshare" !


live well,
  vagrant
From df5ef135ae10816abe56d4de92b0214f1fb7cdd7 Mon Sep 17 00:00:00 2001
From: Vagrant Cascadian <vagr...@debian.org>
Date: Mon, 26 Apr 2021 23:49:40 -0700
Subject: [PATCH] lib/Sbuild/Utility.pm: Add support for zstd compression.

---
 lib/Sbuild/Utility.pm | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/lib/Sbuild/Utility.pm b/lib/Sbuild/Utility.pm
index 75864825..e56eb05b 100644
--- a/lib/Sbuild/Utility.pm
+++ b/lib/Sbuild/Utility.pm
@@ -627,6 +627,8 @@ sub get_tar_compress_options($) {
 	return ('--use-compress-program', 'lz4');
     } elsif ($filename =~ /\.(xz|txz)$/) {
 	return ('--xz');
+    } elsif ($filename =~ /\.zst$/) {
+	return ('--zstd');
     }
     return ();
 }
-- 
2.30.2

Attachment: signature.asc
Description: PGP signature

Reply via email to