[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#955469: initramfs-tools-core: Enable zstandard support



Package: initramfs-tools-core
Version: 0.136
Severity: wishlist
Tags: patch

Hello,

there are Kernelpatches for zstandard initramfs support
available for several years, and will hopefully accepted
upstream soon.

Please enable support for this compression.

The patch should be simple enough, I chosen to try zstd
as first decompressor because it supports a whole
range of formats on debian.

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

Kernel: Linux 5.4.0-4-amd64 (SMP w/8 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en (charmap=UTF-8)
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Versions of packages initramfs-tools-core depends on:
ii  coreutils    8.30-3+b1
ii  cpio         2.13+dfsg-2
ii  e2fsprogs    1.45.6-1
ii  klibc-utils  2.0.7-1
ii  kmod         27-2
ii  logsave      1.45.6-1
ii  udev         244.3-1

Versions of packages initramfs-tools-core recommends:
ii  busybox  1:1.30.1-4
ii  pigz     2.4-1+b1

Versions of packages initramfs-tools-core suggests:
ii  bash-completion  1:2.10-1

-- Configuration Files:
/etc/initramfs-tools/initramfs.conf changed [not included]

-- no debconf information
diff -burN initramfs-tools.org/conf/initramfs.conf initramfs-tools/conf/initramfs.conf
--- initramfs-tools.org/conf/initramfs.conf	2019-02-06 00:55:47.000000000 +0100
+++ initramfs-tools/conf/initramfs.conf	2020-03-31 18:38:48.558687968 +0200
@@ -38,7 +38,7 @@
 KEYMAP=n

 #
-# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | xz ]
+# COMPRESS: [ gzip | bzip2 | lz4 | lzma | lzop | zstd | xz ]
 #

 COMPRESS=gzip
diff -burN initramfs-tools.org/mkinitramfs initramfs-tools/mkinitramfs
--- initramfs-tools.org/mkinitramfs	2020-01-18 19:36:00.000000000 +0100
+++ initramfs-tools/mkinitramfs	2020-03-31 18:31:31.046107765 +0200
@@ -185,6 +185,7 @@
 	fi
 	;;
 lz4)	compress="lz4 -9 -l" ;;
+zstd)	compress="zstd -19" ;;
 xz)	compress="xz --check=crc32"
 	# If we're not doing a reproducible build, enable multithreading
 	test -z "${SOURCE_DATE_EPOCH}" && compress="$compress --threads=0"
diff -burN initramfs-tools.org/unmkinitramfs initramfs-tools/unmkinitramfs
--- initramfs-tools.org/unmkinitramfs	2019-07-31 16:25:58.000000000 +0200
+++ initramfs-tools/unmkinitramfs	2020-03-31 18:36:36.821308275 +0200
@@ -29,7 +29,9 @@
 	dir="$2"
 	shift 2

-	if gzip -t "$archive" >/dev/null 2>&1 ; then
+	if zstd -q -c -t "$archive" >/dev/null 2>&1 ; then
+		zstd -q -c -d "$archive"
+	elif gzip -t "$archive" >/dev/null 2>&1 ; then
 		gzip -c -d "$archive"
 	elif xzcat -t "$archive" >/dev/null 2>&1 ; then
 		xzcat "$archive"


Reply to: