xz kernel modules (Re: [packages/kernel] - updated config)

Elan Ruusamäe glen at pld-linux.org
Mon Jan 26 21:06:20 CET 2015


On 26.01.2015 22:02, Elan Ruusamäe wrote:
> On 13.12.2014 12:46, Jan Rękorajski wrote:
>> On Thu, 11 Dec 2014, Elan Ruusamäe wrote:
>>
>>> On 10.12.2014 21:59, Jan Rękorajski wrote:
>>>> What about switching to xz? That will require recent kmod, but we 
>>>> do it
>>>> only for 3.18+ and if someone is running fresh kernel we can assume he
>>>> has a fresh userspace.
>>> i see you already switched. would be nice to see some du stats before
>>> and after
>> [root at home 3.17.2-1]# du -hs kernel*
>> 54M    kernel.gz
>> 46M    kernel.xz
>>
>> ~20% savings.
> you compressed the files yourself?
>
> because our rpm build automation does not strip the files:
>
> [~/tmp/kernel-3.18.3-root-glen/lib] ➔ dus */
>   1.  modules/  112.95 MiB
>   2. firmware/    2.46 MiB
> Total:             115.41 MiB
>
>
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ l 
> fs/xfs/xfs.ko.xz
> -rw-r--r-- 1 glen users 702K 26. jaan  21:42 fs/xfs/xfs.ko.xz
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ xz -d 
> fs/xfs/xfs.ko.xz
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ file 
> fs/xfs/xfs.ko
> fs/xfs/xfs.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), 
> BuildID[sha1]=63b5e04025bf63f7cd892e1f71785a0aa575fd28, not stripped
>
>
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ strip 
> fs/xfs/xfs.ko
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ file 
> fs/xfs/xfs.ko
> fs/xfs/xfs.ko: ELF 64-bit LSB relocatable, x86-64, version 1 (SYSV), 
> BuildID[sha1]=63b5e04025bf63f7cd892e1f71785a0aa575fd28, stripped
>
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ l 
> fs/xfs/xfs.ko
> -rw-r--r-- 1 glen users 723K 26. jaan  21:58 fs/xfs/xfs.ko
>
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ xz -9 
> fs/xfs/xfs.ko
> xz: Adjusted the number of threads from 4 to 3 to not exceed the 
> memory usage limit of 4,773 MiB
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔ l 
> fs/xfs/xfs.ko.xz
> -rw-r--r-- 1 glen users 212K 26. jaan  21:58 fs/xfs/xfs.ko.xz
> [~/tmp/kernel-3.18.3-root-glen/lib/modules/3.18.3-1/kernel] ➔
>
> i checked build logs and no match for "Stripping kernel modules" [1]:
> http://buildlogs.pld-linux.org//index.php?dist=th&arch=x86_64&ok=1&ns=&cnt=50&off=0&name=kernel&id=87e395d9-22b0-4451-9554-774e0d2b1444 
>
> [1] 
> https://github.com/pld-linux/rpm-build-macros/blob/auto/th/rpm-build-macros-1.706-1/rpm.macros#L578
>
> apparently kernel compresses themselves and our build automation just 
> searches for "*o" only:
> https://github.com/pld-linux/rpm-build-macros/blob/auto/th/rpm-build-macros-1.706-1/rpm.macros#L574-L583 
>
>

our build automation does only *.o -> .gz:

https://github.com/pld-linux/rpm-build-macros/blob/auto/th/rpm-build-macros-1.706-1/rpm.macros.kernel#L96-L115

so, where should this be continued? make kernel.spec not to compress and 
update rpm-build-macros to use .xz?
or vice versa?

as stripping is done by rpm, and creating -debuginfo, would be wasteful 
to decompress, strip, compress again... (we do so with man pages btw)

-- 
glen



More information about the pld-devel-en mailing list