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

2007-03-30 Thread Jarod Wilson

David Woodhouse wrote:

On Fri, 2007-03-30 at 21:20 -0400, Jarod Wilson wrote:
Hrm, not sure why that doesn't pass the option through, but I hadn't 
even thought to look at the Makefile to see how these flags would work 
at that level. Out of curiosity, does the following work?:


$ make RPM_DEFINES=--define 'with_kdump 0'

I suppose I ought to poke at that some myself... Adding to my todo list. 


I used the trick I learned from the end of the existing Makefile...

[EMAIL PROTECTED] devel]# tail -4 Makefile
compile compile-short: DIST_DEFINES += --target $(shell uname -m)

ppc64: DIST_DEFINES += --without kdump
ppc: DIST_DEFINES += --without smp


Now I just have to remember never to commit the Makefile :)


Ooh, I like it... Along those lines, what if we had Makefile include a 
Makefile.local if it existed, which was .cvsignore'd? Then you could 
tweak your local default build prefs to your hearts content without 
having to worry about accidentally committing them...


/me still needs to actually *read* the Makefile at this point... ;)

--
Jarod Wilson
[EMAIL PROTECTED]

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


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

2007-03-29 Thread Dave Jones
On Thu, Mar 29, 2007 at 01:41:45PM -0400, Chuck Ebbert wrote:
  I was thinking about adding something like this to the .spec file
  at the beginning:
  
  %define allowup 1
  %define allowsmp 1
  %define allowpae 1
  %define allowxen 1
  %define allowdoc 1
  %define allowdump 1
  %define allowheaders 1
  %define allowdebug 1
  
  Then, after all the automatic enable/disable of various options is done,
  turn off everything that's not allowed.
  
  This would make it much easier to change what gets built.

The amount of %define's we've grown recently does seem to be
getting out of hand. I'm not sure it's a good/bad thing, but it
does make the spec a little harder to read.

Not sure about your proposal tbh.  I'll think about it more
when I'm back from vacation :)

Dave

-- 
http://www.codemonkey.org.uk

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


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

2007-03-29 Thread Dave Jones
On Thu, Mar 29, 2007 at 02:06:58PM -0400, Jarod Wilson wrote:
  Dave Jones wrote:
   On Thu, Mar 29, 2007 at 01:41:45PM -0400, Chuck Ebbert wrote:
 I was thinking about adding something like this to the .spec file
 at the beginning:
 
 %define allowup 1
 %define allowsmp 1
 %define allowpae 1
 %define allowxen 1
 %define allowdoc 1
 %define allowdump 1
 %define allowheaders 1
 %define allowdebug 1
 
 Then, after all the automatic enable/disable of various options is done,
 turn off everything that's not allowed.
 
 This would make it much easier to change what gets built.
   
   The amount of %define's we've grown recently does seem to be
   getting out of hand. I'm not sure it's a good/bad thing, but it
   does make the spec a little harder to read.
   
   Not sure about your proposal tbh.  I'll think about it more
   when I'm back from vacation :)
  
  I like it, at least in theory. Invariably, I'll do a test build, and to
  speed the process, I twiddle bits at the top of the spec to disable
  certain builds. In the i686 case, I almost always forget to hunt down
  lower to turn off pae.

I probably don't really notice, because my workflow for test builds is usually
make prep
cd kernel-2.6.20/linux-2.6.20.noarch
cp configs/$whateverconfigIwant .config
make oldconfig bzImage modules
sudo make modules_install install

But I've not objection to making it easier for people who don't follow
my workflow and do things differently.

Dave

-- 
http://www.codemonkey.org.uk

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


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

2007-03-29 Thread Jarod Wilson
Dave Jones wrote:
 On Thu, Mar 29, 2007 at 02:06:58PM -0400, Jarod Wilson wrote:
   Dave Jones wrote:
On Thu, Mar 29, 2007 at 01:41:45PM -0400, Chuck Ebbert wrote:
  I was thinking about adding something like this to the .spec file
  at the beginning:
  
  %define allowup 1
  %define allowsmp 1
  %define allowpae 1
  %define allowxen 1
  %define allowdoc 1
  %define allowdump 1
  %define allowheaders 1
  %define allowdebug 1
  
  Then, after all the automatic enable/disable of various options is 
 done,
  turn off everything that's not allowed.
  
  This would make it much easier to change what gets built.

The amount of %define's we've grown recently does seem to be
getting out of hand. I'm not sure it's a good/bad thing, but it
does make the spec a little harder to read.

Not sure about your proposal tbh.  I'll think about it more
when I'm back from vacation :)
   
   I like it, at least in theory. Invariably, I'll do a test build, and to
   speed the process, I twiddle bits at the top of the spec to disable
   certain builds. In the i686 case, I almost always forget to hunt down
   lower to turn off pae.
 
 I probably don't really notice, because my workflow for test builds is usually
 make prep
 cd kernel-2.6.20/linux-2.6.20.noarch
 cp configs/$whateverconfigIwant .config
 make oldconfig bzImage modules
 sudo make modules_install install
 
 But I've not objection to making it easier for people who don't follow
 my workflow and do things differently.

Rather than wasting Chuck's time implementing this, what say a
lower-level grunt like myself try to implement something along these
lines? :) I've got a few ideas on how to do it using either %bcond or
%with{,out}...


-- 
Jarod Wilson
[EMAIL PROTECTED]




signature.asc
Description: OpenPGP digital signature
___
Fedora-kernel-list mailing list
Fedora-kernel-list@redhat.com
https://www.redhat.com/mailman/listinfo/fedora-kernel-list


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

2007-03-29 Thread Chuck Ebbert
Jarod Wilson wrote:
 Dave Jones wrote:
 On Thu, Mar 29, 2007 at 02:06:58PM -0400, Jarod Wilson wrote:
   Dave Jones wrote:
On Thu, Mar 29, 2007 at 01:41:45PM -0400, Chuck Ebbert wrote:
  I was thinking about adding something like this to the .spec file
  at the beginning:
  
  %define allowup 1
  %define allowsmp 1
  %define allowpae 1
  %define allowxen 1
  %define allowdoc 1
  %define allowdump 1
  %define allowheaders 1
  %define allowdebug 1
  
  Then, after all the automatic enable/disable of various options is 
 done,
  turn off everything that's not allowed.
  
  This would make it much easier to change what gets built.

The amount of %define's we've grown recently does seem to be
getting out of hand. I'm not sure it's a good/bad thing, but it
does make the spec a little harder to read.

Not sure about your proposal tbh.  I'll think about it more
when I'm back from vacation :)
   
   I like it, at least in theory. Invariably, I'll do a test build, and to
   speed the process, I twiddle bits at the top of the spec to disable
   certain builds. In the i686 case, I almost always forget to hunt down
   lower to turn off pae.


 But I've not objection to making it easier for people who don't follow
 my workflow and do things differently.
 
 Rather than wasting Chuck's time implementing this, what say a
 lower-level grunt like myself try to implement something along these
 lines? :) I've got a few ideas on how to do it using either %bcond or
 %with{,out}...
 

You understand rpm better than I do, so go for it. I'd use Dave's method
but an RPM is so much more convenient...

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


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

2007-03-29 Thread Jarod Wilson

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
[EMAIL PROTECTED]

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