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

Bug#533903: initramfs-tools: support different compression tools in mkinitramfs



hello,

sorry for the late reaction and thanks a lot for your report.

On Wed, 03 Feb 2010, Bert Schulze wrote:

> Package: initramfs-tools
> Version: 0.93.4
> Severity: normal
> Tags: patch
> 
> Dear initramfs-tools Maintainers,
> 
> 
> since I've recently did some experiments regarding lzma compressed initramfs
> images I stumbled upon this quite old bugreport.
> 
> As mentioned before the stock kernel has support for lzma/bzip2 compressed
> images built in nowadays and it works great. Instead of having to recompress
> the initramfs image by hand over and over again i did a patch against
> initramfs-tools-0.93.4 which enables mkinitramfs to build gzip/bzip2/lzma
> compressed images.

cool for the testing!
 
 
> Therefor I've set a new variable in /etc/initramfs-tools/update-initramfs.conf
> 
>   #
>   # compress_initramfs [ gzip | bzip2 | lzma ]
>   #
>   compress_initramfs=gzip

hmm there i'm not sure that it is update-initramfs job.

I'd prefer to have it in /etc/initramfs-tools/initramfs.conf
and have mkinitramfs deal directly with it.
then you also don't have to take care about the arg passing.


update-initramfs has not many arguments and thus tries to stay user
friendly. mkinitramfs is the low level interface.
 
 
> added the new function verify_compression() to the update-initramfs script which
> 
>   - checks the availability of the compression utility in userspace
>   - matches the kernel's config file against the selected compression method
>   - falls back to gzip compression if either or both are missing and prints
>     verbose messages if that has happened.
> 
> 
> The method gets passed to mkinitramfs via a new optional argument "-c <COMP>"
> and mkinitramfs itself verifies that "lzma" or "bzip2" has been passed as argument,
> or defaults to gzip. (as well if the -c argument has been omitted)
> Given the fact that gzip, bzip2 and lzma read input from stdin and pass the
> compressed output to stdout theres no need to change a lot of code here.

would you care to rediff that according to aboves comment,
to deal with it in mkinitramfs?

also just fall back on current default if the input is undefined or
strange of tha config option.
 
 
> unified diff attached
> 
> 
> best regards
> Bert Schulze

thanks a lot for your input.


kind regards.

maks



Reply to: