[PATCH] kernel.spec: xz compress modules on i686 and x86_64
Kyle McMartin
kmcmarti at redhat.com
Tue May 6 18:33:20 UTC 2014
On Tue, May 06, 2014 at 02:24:23PM -0400, Josh Boyer wrote:
> No armv7hl? Curious if those boards would benefit from the size savings
> as well.
>
Meh don't want to make the build even slower there...
> > +
> > +%if %{zipmodules}
> > +%global zipsed -e 's/\.ko$/\.ko.xz/'
> > %endif
> >
> > # % define buildid .local
> > @@ -1713,9 +1719,9 @@ BuildKernel() {
> >
> > # Make sure the files lists start with absolute paths or rpmbuild fails.
> > # Also add in the dir entries
> > - sed -e 's/^lib*/\/lib/' $RPM_BUILD_ROOT/k-d.list > ../kernel${Flavour:+-${Flavour}}-modules.list
> > - sed -e 's/^lib*/%dir \/lib/' $RPM_BUILD_ROOT/module-dirs.list > ../kernel${Flavour:+-${Flavour}}-core.list
> > - sed -e 's/^lib*/\/lib/' $RPM_BUILD_ROOT/modules.list >> ../kernel${Flavour:+-${Flavour}}-core.list
> > + sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/k-d.list > ../kernel${Flavour:+-${Flavour}}-modules.list
> > + sed -e 's/^lib*/%dir \/lib/' %{?zipsed} $RPM_BUILD_ROOT/module-dirs.list > ../kernel${Flavour:+-${Flavour}}-core.list
> > + sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/modules.list >> ../kernel${Flavour:+-${Flavour}}-core.list
>
> Hm. This makes me wonder if the auto-module-Provides thing we're
> working through now will be impacted. I'll have to go look at what you
> did in RPM to see what it's looking for to create those, and when.
>
It probably does... could just change the check in kmod.prov I guess and
then prune the extension off.
> josh
>
> >
> > # Cleanup
> > rm -f $RPM_BUILD_ROOT/k-d.list
> > @@ -1836,6 +1842,9 @@ popd
> > %{modsign_cmd} signing_key.priv.sign signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \
> > fi \
> > fi \
> > + if [ "%{zipmodules}" -eq "1" ]; then \
> > + find $RPM_BUILD_ROOT/lib/modules/ -type f -name '*.ko' | xargs xz; \
> > + fi \
> > %{nil}
> >
> > ###
> > _______________________________________________
> > kernel mailing list
> > kernel at lists.fedoraproject.org
> > https://admin.fedoraproject.org/mailman/listinfo/kernel
More information about the kernel
mailing list