FS#23235 - [mkinitcpio] don't force -9 compression

Attached to Project: Arch Linux
Opened by Dimitrios Apostolou (jimis) - Friday, 11 March 2011, 04:31 GMT
Last edited by Thomas Bächler (brain0) - Thursday, 24 March 2011, 09:30 GMT
Task Type Bug Report
Category Packages: Core
Status Closed
Assigned To Thomas Bächler (brain0)
Architecture All
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 1
Private No

Details

mkinitcpio compresses always using -9 parameter. We should leave it to the default setting which is generally better, and also allows the user to override it by a custom COMPRESSION="xz -4" setting. The following patch should do the job:

--- /sbin/mkinitcpio.orig 2010-10-06 03:23:00.966415649 +0300
+++ /sbin/mkinitcpio 2011-02-26 19:11:36.309682053 +0200
@@ -277,7 +277,7 @@
status=0
if [ -n "${GENIMG}" ]; then
echo -n ":: Generating image '${GENIMG}'..."
- if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} -9 > "${GENIMG}"; then
+ if ! /sbin/gen_init_cpio ${FILELIST} | ${COMPRESSION} > "${GENIMG}"; then
echo "FAILED"
status=1
else


I argued about this on the list and I got no disagreements since there seem to be no disadvantages. I also believe default gzip/xz settings should be used in other cases too (makepkg?). Here are my findings from email at [1]:


FWIW compressing the kernel26-fallback image with various settings
(no_options, -e, -4, -4e, -9, -9e) yields almost identical results, even
if -9 needs many times the memory of -6. CPU times are all from 20 to 25
seconds:

-rw-r--r-- 1 jimis jimis 10293248 Feb 27 15:19 kernel26-fallback.orig
-rw-r--r-- 1 jimis jimis 7860781 Feb 27 15:22 kernel26-fallback.4.lzma
-rw-r--r-- 1 jimis jimis 7849183 Feb 27 15:25 kernel26-fallback.4e.lzma
-rw-r--r-- 1 jimis jimis 7848882 Feb 27 15:26 kernel26-fallback.6e.lzma
-rw-r--r-- 1 jimis jimis 7848866 Feb 27 15:28 kernel26-fallback.9e.lzma
-rw-r--r-- 1 jimis jimis 7846985 Feb 27 15:22 kernel26-fallback.9.lzma
-rw-r--r-- 1 jimis jimis 7846962 Feb 27 15:21 kernel26-fallback.6.lzma


[1] http://mailman.archlinux.org/pipermail/arch-general/2011-February/018741.html
This task depends upon

Closed by  Thomas Bächler (brain0)
Thursday, 24 March 2011, 09:30 GMT
Reason for closing:  Duplicate
Additional comments about closing:   FS#20954 
Comment by Karol Błażewicz (karol) - Thursday, 24 March 2011, 03:53 GMT
Isn't this a duplicate of https://bugs.archlinux.org/task/20954 ?
Comment by Thomas Bächler (brain0) - Thursday, 24 March 2011, 09:30 GMT
It is.

Loading...