Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.kernel > #66913

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

From Ben Hutchings <ben@decadent.org.uk>
Newsgroups linux.debian.bugs.dist, linux.debian.kernel
Subject Bug#955469: initramfs-tools-core: Enable zstandard support
Date 2020-04-28 05:50 +0200
Message-ID <A0ppU-6tj-1@gated-at.bofh.it> (permalink)
References <zQFFE-6oS-1@gated-at.bofh.it> <zQFFE-6oS-1@gated-at.bofh.it>
Organization linux.* mail to news gateway

Cross-posted to 2 groups.

Show all headers | View raw


[Multipart message — attachments visible in raw view] - view raw

On Wed, 01 Apr 2020 09:05:22 +0200 Norbert Lange <nolange79@gmail.com> wrote:
> 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.

If the kernel doesn't yet support it, I'm not sure what the point of
supporting it in initramfs-tools is.

> 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.

> 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 ]

Aside from gzip (the default), this list is sorted alphabetically.  So
zstd belongs at the end.

>  #
> 
>  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"

gzip should be checked first as it's most likely to be the actual
compression used.  Aside from that, I don't think the order matters
here.

Ben.

-- 
Ben Hutchings
Larkinson's Law: All laws are basically false.


Back to linux.debian.kernel | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Bug#955469: initramfs-tools-core: Enable zstandard support Norbert Lange <nolange79@gmail.com> - 2020-04-01 09:10 +0200
  Bug#955469: initramfs-tools-core: Enable zstandard support Sedat Dilek <sedat.dilek@gmail.com> - 2020-04-01 12:50 +0200
    Bug#955469: initramfs-tools-core: Enable zstandard support Sedat Dilek <sedat.dilek@gmail.com> - 2020-07-31 17:00 +0200
      Bug#955469: initramfs-tools-core: Enable zstandard support Norbert Lange <nolange79@gmail.com> - 2020-08-01 00:40 +0200
        Bug#955469: initramfs-tools-core: Enable zstandard support Sedat Dilek <sedat.dilek@gmail.com> - 2020-08-01 14:30 +0200
          Bug#955469: initramfs-tools-core: Enable zstandard support Sedat Dilek <sedat.dilek@gmail.com> - 2020-08-04 09:40 +0200
  Bug#955469: initramfs-tools-core: Enable zstandard support Ben Hutchings <ben@decadent.org.uk> - 2020-04-28 05:50 +0200
    Bug#955469: initramfs-tools-core: Enable zstandard support Ben Hutchings <ben@decadent.org.uk> - 2020-04-29 19:00 +0200
      Bug#955469: initramfs-tools-core: Enable zstandard support Norbert Lange <nolange79@gmail.com> - 2020-04-29 21:40 +0200
        Bug#955469: initramfs-tools-core: Enable zstandard support Ben Hutchings <ben@decadent.org.uk> - 2020-05-16 02:00 +0200
  Bug#955469: marked as done (initramfs-tools-core: Enable  zstandard support) "Debian Bug Tracking System" <owner@bugs.debian.org> - 2020-09-11 22:40 +0200

csiph-web