unmkinitramfs fails with lz4 compressed initrds
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
initramfs-tools (Debian) |
Fix Released
|
Unknown
|
|||
initramfs-tools (Ubuntu) |
Fix Released
|
High
|
Unassigned | ||
Cosmic |
In Progress
|
High
|
Unassigned | ||
Disco |
Fix Released
|
High
|
Unassigned |
Bug Description
[Impact]
* Cannot unpack initrds compressed with lz4 due to changes in lz4
[Test Case]
$ sudo apt install initramfs-tools lz4 file
$ mkinitramfs -c lz4 -o foo.img
$ lsinitramfs foo.img
cpio: premature end of archive
[Regression Potential]
* New lz4cat is more strict w.r.t. enforcing file name extensions, thus the fix is to feed a stream to lz4cat instead of asking it to open a file. The performance impact should be similar between both methods of reading file contents during ls/unmk-initramfs time.
[Other Info]
Original bug report:
unmkinitramfs fails with lz4 compressed initrds
Note:
$ lz4cat -t unmkinitramfs_
File extension doesn't match expected LZ4_EXTENSION (.lz4); will not process file: unmkinitramfs_
description: | updated |
Changed in initramfs-tools (Ubuntu Cosmic): | |
status: | Confirmed → In Progress |
Changed in initramfs-tools (Ubuntu Disco): | |
status: | Confirmed → In Progress |
Changed in initramfs-tools (Debian): | |
status: | Unknown → New |
no longer affects: | initramfs-tools (Ubuntu Bionic) |
tags: | added: regression-release |
Changed in initramfs-tools (Ubuntu): | |
importance: | Undecided → High |
Changed in initramfs-tools (Ubuntu Cosmic): | |
importance: | Undecided → High |
Changed in initramfs-tools (Ubuntu Disco): | |
importance: | Undecided → High |
Changed in initramfs-tools (Debian): | |
status: | New → Fix Released |
This bug was fixed in the package initramfs-tools - 0.133ubuntu8
---------------
initramfs-tools (0.133ubuntu8) eoan; urgency=medium
* Switch back to lz4 by default.
* Patch unmkinitramfs to cat possible lz4 archives first, as lz4 is
particular about enforcing .lz4 file extensions when operating on
files. LP: #1832108
-- Dimitri John Ledkov <email address hidden> Mon, 10 Jun 2019 00:21:17 +0100