[buildd-tools-devel] Bug#768091: schroot: please support alternative compressions for file-based chroots

Aurelien Jarno aurel32 at debian.org
Tue Nov 4 21:51:12 UTC 2014


Package: schroot
Version: 1.6.10-1+b1
Severity: wishlist
Tags: patch

Hi,

schroot currently supports the gzip and bzip2 compressions for file-based
chroots. It might be worth to support alternative compressions to let
the user do a compromise between speed and space, depending for example
if the chroot is used often or not.

The patch below adds support for xz, lzop and lz4 compression, which
should cover most of the standard compression format available today.
Could you please apply it in one of the next uploads? Thanks.

Thanks,
Aurelien


--- a/etc/setup.d/05file
+++ b/etc/setup.d/05file
@@ -32,6 +32,12 @@
         filetype="tgz"
     elif echo "$CHROOT_FILE" | egrep -q '(\.tar\.bz2|\.tbz)$'; then
         filetype="tbz"
+    elif echo "$CHROOT_FILE" | egrep -q '(\.tar\.xz|\.txz)$'; then
+        filetype="txz"
+    elif echo "$CHROOT_FILE" | egrep -q '(\.tar\.lzo|\.tzo)$'; then
+        filetype="tzo"
+    elif echo "$CHROOT_FILE" | egrep -q '(\.tar\.lz4|\.tlz4)$'; then
+        filetype="tlz4"
     else
         fatal "Unsupported filetype for $CHROOT_FILE"
     fi
@@ -50,6 +56,12 @@
         tar $TAR_VERBOSE -xzf "$CHROOT_FILE"
     elif [ "$filetype" = "tbz" ]; then
         tar $TAR_VERBOSE -xjf "$CHROOT_FILE"
+    elif [ "$filetype" = "txz" ]; then
+        tar $TAR_VERBOSE -xJf "$CHROOT_FILE"
+    elif [ "$filetype" = "tzo" ]; then
+        tar $TAR_VERBOSE --lzop -xf "$CHROOT_FILE"
+    elif [ "$filetype" = "tlz4" ]; then
+        tar $TAR_VERBOSE -I /usr/bin/lz4 -xf "$CHROOT_FILE"
     else
         fatal "Unsupported filetype for $CHROOT_FILE"
     fi
@@ -68,6 +80,12 @@
         tar $TAR_VERBOSE -czf "$NEWFILE" .
     elif [ "$filetype" = "tbz" ]; then
         tar $TAR_VERBOSE -cjf "$NEWFILE" .
+    elif [ "$filetype" = "txz" ]; then
+        tar $TAR_VERBOSE -cJf "$NEWFILE" .
+    elif [ "$filetype" = "tzo" ]; then
+        tar $TAR_VERBOSE --lzop -cf "$NEWFILE" .
+    elif [ "$filetype" = "tlz4" ]; then
+        tar $TAR_VERBOSE -I /usr/bin/lz4 -cf "$NEWFILE" .
     else
         fatal "Unsupported filetype for $CHROOT_FILE"
     fi


-- System Information:
Debian Release: jessie/sid
  APT prefers unstable
  APT policy: (500, 'unstable')
Architecture: amd64 (x86_64)
Foreign Architectures: i386

Kernel: Linux 3.16-3-amd64 (SMP w/8 CPU cores)
Locale: LANG=fr_FR.UTF-8, LC_CTYPE=fr_FR.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages schroot depends on:
ii  libboost-filesystem1.55.0       1.55.0+dfsg-3
ii  libboost-iostreams1.55.0        1.55.0+dfsg-3
ii  libboost-program-options1.55.0  1.55.0+dfsg-3
ii  libboost-regex1.55.0            1.55.0+dfsg-3
ii  libboost-system1.55.0           1.55.0+dfsg-3
ii  libc6                           2.19-12
ii  libgcc1                         1:4.9.1-19
ii  libpam0g                        1.1.8-3.1
ii  libstdc++6                      4.9.1-19
ii  libuuid1                        2.25.2-2
ii  schroot-common                  1.6.10-1

schroot recommends no packages.

Versions of packages schroot suggests:
pn  aufs-modules | unionfs-modules  <none>
pn  btrfs-tools                     <none>
ii  debootstrap                     1.0.64
ii  lvm2                            2.02.111-2
pn  qemu-user-static                <none>

-- Configuration Files:
/etc/default/schroot changed [not included]
/etc/schroot/default/fstab changed [not included]
/etc/schroot/sbuild/fstab changed [not included]
/etc/schroot/schroot.conf changed [not included]
/etc/schroot/setup.d/05file changed [not included]

-- no debconf information



More information about the Buildd-tools-devel mailing list