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

Bug#930366: marked as done (initramfs-tools: unmkinitramfs fails to unpack lz4 compressed initrd)



Your message dated Sun, 28 Jul 2019 00:50:51 +0000
with message-id <E1hrXOl-0009B3-Kz@fasolo.debian.org>
and subject line Bug#930366: fixed in initramfs-tools 0.134
has caused the Debian Bug report #930366,
regarding initramfs-tools: unmkinitramfs fails to unpack lz4 compressed initrd
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact owner@bugs.debian.org
immediately.)


-- 
930366: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=930366
Debian Bug Tracking System
Contact owner@bugs.debian.org with problems
--- Begin Message ---
Package: initramfs-tools
Version: 0.133
Severity: normal
Tags: patch

Dear Maintainer,

unmkinitramfs fails to unpack lz4 compressed initrd, ie.:

$ sudo apt install initramfs-tools lz4 file
$ mkinitramfs -c lz4 -o foo.img
$ unmkinitramfs foo.img bar
cpio: premature end of archive
$ echo $?
2

I think this is because lz4cat is strict with file extensions:

$ file foo.img 
foo.img: LZ4 compressed data (v0.1-v0.9)
$ lz4cat -t foo.img 
File extension doesn't match expected LZ4_EXTENSION (.lz4); will not process file: foo.img

I propose the attached patch to change 'lz4cat -t $archive'
invocations to become 'lz4cat -t <$archive' instead. As lz4cat does
not / cannot enforce extension checking on streams.

Regards,

Dimitri.
diff -Nru initramfs-tools-0.133ubuntu6/unmkinitramfs initramfs-tools-0.133ubuntu8/unmkinitramfs
--- initramfs-tools-0.133ubuntu6/unmkinitramfs	2019-06-07 19:22:58.000000000 +0000
+++ initramfs-tools-0.133ubuntu8/unmkinitramfs	2019-06-09 23:21:17.000000000 +0000
@@ -33,8 +33,8 @@
 		gzip -c -d "$archive"
 	elif xzcat -t "$archive" >/dev/null 2>&1 ; then
 		xzcat "$archive"
-	elif lz4cat -t "$archive" >/dev/null 2>&1 ; then
-		lz4cat "$archive"
+	elif lz4cat -t <"$archive" >/dev/null 2>&1 ; then
+		lz4cat <"$archive"
 	elif bzip2 -t "$archive" >/dev/null 2>&1 ; then
 		bzip2 -c -d "$archive"
 	elif lzop -t "$archive" >/dev/null 2>&1 ; then


--- End Message ---
--- Begin Message ---
Source: initramfs-tools
Source-Version: 0.134

We believe that the bug you reported is fixed in the latest version of
initramfs-tools, which is due to be installed in the Debian FTP archive.

A summary of the changes between this version and the previous one is
attached.

Thank you for reporting the bug, which will now be closed.  If you
have further comments please address them to 930366@bugs.debian.org,
and the maintainer will reopen the bug report if appropriate.

Debian distribution maintenance software
pp.
Ben Hutchings <ben@decadent.org.uk> (supplier of updated initramfs-tools package)

(This message was generated automatically at their request; if you
believe that there is a problem with it please contact the archive
administrators by mailing ftpmaster@ftp-master.debian.org)


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA512

Format: 1.8
Date: Sun, 28 Jul 2019 01:10:56 +0100
Source: initramfs-tools
Architecture: source
Version: 0.134
Distribution: unstable
Urgency: medium
Maintainer: Debian kernel team <debian-kernel@lists.debian.org>
Changed-By: Ben Hutchings <ben@decadent.org.uk>
Closes: 916696 923165 928689 928736 930366 930754 932854
Changes:
 initramfs-tools (0.134) unstable; urgency=medium
 .
   [ Ben Hutchings ]
   * [8aeae9f] hooks/resume: Disable resume when there are no suitable swap
     devices. Thanks to Trek <trek00@inbox.ru> (Closes: #916696)
   * [40f6647] hook-functions: Include all keyboard driver modules when
     MODULES=most. Thanks to Alper Nebi Yasak <alpernebiyasak@gmail.com>
   * [797e5fe] hook-functions: Include cros_ec_spi and SPI drivers when
     MODULES=most. Thanks to Alper Nebi Yasak <alpernebiyasak@gmail.com>
   * [f65627d] resume: Set plymouth status only if there is a suspend image
     (Closes: #928736)
   * [c31a908] hook-functions: Fix copy_file with target of "/bin"
     (Closes: #928689)
   * [8a29ef3] scripts/functions: Use "reboot -f" to reboot on panic.
     Thanks to Michael Niewöhner <linux@mniewoehner.de> (Closes: #923165)
   * [da9f53e] unmkinitramfs: Work around lz4cat filename check.
     Thanks to Dimitri John Ledkov <xnox@ubuntu.com> (Closes: #930366)
   * [cf7bb4b] initramfs-tools-core: Depend on logsave or older e2fsprogs
     (Closes: #932854)
   * [8570718] update-initramfs(8): Document -d option as "delete" instead of
     "remove"
   * [fffe514] update-initramfs(8): Update description of "-k all" option
 .
   [ Benjamin Drung ]
   * [5e94f22] autopkgtest: Check also
     /usr/share/initramfs-tools/{hooks,scripts}
 .
   [ Alper Nebi Yasak ]
   * [994d698] hook-functions: Include extcon-usbc-cros-ec when MODULES=most
   * [4e3496a] hook-functions: Include extcon drivers when MODULES=dep
 .
   [ Uwe Kleine-König ]
   * [37dcf3d] mkinitramfs: suppress warning when using bzip2 or lzma
     (Closes: #930754)
Checksums-Sha1:
 cb626f58f71afe80c05fcab65154d1c556845d86 1821 initramfs-tools_0.134.dsc
 f8dae02d5ae863b7d57ec07a04d35fc99452680b 90668 initramfs-tools_0.134.tar.xz
 84d4af82515c425e2dafc1fcb7f6044518fea7e9 6165 initramfs-tools_0.134_source.buildinfo
Checksums-Sha256:
 3f0ac785b5807c124ac86fad50364ad84ca0107b33a0d75564bb02b99e181590 1821 initramfs-tools_0.134.dsc
 0ea9a39f7951a7766170811f548dbfd95f58e01af5f0c7ada232cd0054b6ac90 90668 initramfs-tools_0.134.tar.xz
 ae352b23ca48579a4a86e703cfb68531225ed5ebf5b012c195bcaf3eed5a95f9 6165 initramfs-tools_0.134_source.buildinfo
Files:
 0c35ad5d6dd04b3a7b9064fe32f0716a 1821 utils optional initramfs-tools_0.134.dsc
 cacea7bff5e01f6ad6c9bd896072858d 90668 utils optional initramfs-tools_0.134.tar.xz
 700dd4a43153261b096392f1dd9ba124 6165 utils optional initramfs-tools_0.134_source.buildinfo

-----BEGIN PGP SIGNATURE-----

iQIzBAEBCgAdFiEErCspvTSmr92z9o8157/I7JWGEQkFAl088F4ACgkQ57/I7JWG
EQmrmBAAtydoFIMmLGKAv8scUdjXZDy6JR/DpfAgW1mC/CHtSo2b9jtGZ+1tJieb
k1oJUKaJru8IEumLyjyQ1wS1On6Ggl/HxGW0dJyrwjtbsWzn6e9OC3VaklTdeN/6
883kVjSTgqRivf12FjMYy7rUga09AZT52SqqsKH6gHrsKcIQ6YChtLo3ONLFTzK+
17ZxMNNQpYgauUiFWl7npTnhMmf5Y3/GQo+4/m/APUQsqQlAvt8SUF6k7twxQqzT
ID4hBmMWH5z9KSiOUfoNLAaQhbk9ABwghqXC7fcfvqN2jesqcAhuSZ4Uw5ZzAHvh
kYjl2ke0r94nHNDc2An6dz8u+hgXa/7z+M+ooYABEKOxwgoEf3uN64E7Nx1gknvC
hGCb7iNhY8872n+WdtAmilZPoQQ0rMtAGDvHm1Vq1q3tfKjMBBVzXw41vcPODNaS
jxIEm1vY1WGu8OiK04YjuZ63QUHi5ll1rgcVVEv81pPSzXdNwbXkFYKaXW7W3DAI
f50G3/6PfpSzZ3B+3yKmC4hzyWvKQc3/WLJc6grC2eze3HLjkQaWSv/koSsq1cVR
Wb5vkTYQdgWDbhfOcrg0ot6zSjKJ4oeefpJPTFR294ug3SxkmaPrJGSwqs9wqlRq
3qCW1uoSpwDYPjySsB5d5OKDvzeqqFmOCON/I/nfMHlGT6Prc0c=
=b+fS
-----END PGP SIGNATURE-----

--- End Message ---

Reply to: