Re: Needed: An easier way to build a subset of kernel packages

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

 



Chuck Ebbert wrote:
Jarod Wilson wrote:
The minimalist approach that comes to mind is to make all the %define
build* bits all set to 1/enabled by default, and only flip them to
disabled where appropriate, so they'd be equivalent to your allow* idea,
in that if you disable them at the top of the spec, they'd stay disabled.


I like this; right now there are surprises there for the unwary who
think they can disable things that way.

I've implemented enabling/disabling certain builds at the very top of the spec file, and anything you set to not build at the top will NOT be turned back on later by an ifarch/ifnarch/etc -- all those have been modified such that they only disable things compared with the defaults set at the top.

Turns out the complexity of adding --with/--without support only resulted in the on/off lines at the top of the spec being slightly longer, so one can now additionally pass in, say, --without xen, on the rpmbuild line to disable building a xen kernel. For example, here's the results of a test build using the modified spec:

$ rpmbuild -bb --without xen --without kdump --without debug kernel-2.6.spec
[...]
Wrote: /data/buildroot/RPMS/x86_64/kernel-2.6.20-1.2937.fc6.x86_64.rpm
Wrote: /data/buildroot/RPMS/x86_64/kernel-debuginfo-2.6.20-1.2937.fc6.x86_64.rpm Wrote: /data/buildroot/RPMS/x86_64/kernel-debuginfo-common-2.6.20-1.2937.fc6.x86_64.rpm
Wrote: /data/buildroot/RPMS/x86_64/kernel-devel-2.6.20-1.2937.fc6.x86_64.rpm
Wrote: /data/buildroot/RPMS/x86_64/kernel-headers-2.6.20-1.2937.fc6.x86_64.rpm
Executing(%clean): /bin/sh -e /data/buildroot/tmp/rpm-tmp.44498
+ umask 022
+ cd /data/buildroot/BUILD
+ cd kernel-2.6.20
+ rm -rf /data/buildroot/tmp/kernel-2.6.20-1.2937.fc6-root
+ exit 0

Results are exactly as expected/desired. Similar results have been observed on an i686 build.

Here's another thought... Would be simple enough to add one more flag, along the lines of "--without flavo{,u}rs" that automagically flipped off everything but the base kernel build (+debuginfo, devel and headers). That's actually likely to be the thing folks would most commonly want to do. Worth adding?

Still touching up a few things, but should have this completely presentable before lunch tomorrow...

--
Jarod Wilson
jwilson@xxxxxxxxxx

_______________________________________________
Fedora-kernel-list mailing list
Fedora-kernel-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/fedora-kernel-list

[Index of Archives]     [Fedora General Discussion]     [Older Fedora Users Archive]     [Fedora Advisory Board]     [Fedora Security]     [Fedora Devel Java]     [Fedora Legacy]     [Fedora Desktop]     [ATA RAID]     [Fedora Marketing]     [Fedora Mentors]     [Fedora Package Announce]     [Fedora Package Review]     [Fedora Music]     [Fedora Packaging]     [Centos]     [Fedora SELinux]     [Coolkey]     [Yum Users]     [Tux]     [Yosemite News]     [KDE Users]     [Fedora Art]     [Fedora Docs]     [USB]     [Asterisk PBX]

  Powered by Linux