I'm probably in over my head but rebuilding this package: kernel-2.6.3-1.116.src.rpm
Does not produce a regular kernel package. I only get:
*RPMS/ kernel-debuginfo-2.6.3-1.116.i386.rpm kernel-source-2.6.3-1.116.i386.rpm kernel-doc-2.6.3-1.116.i386.rpm
and *SRPMS/ kernel-2.6.3-1.116.src.rpm
No `kernel-2.6.3-1.116.i386.rpm' Nothing in any other dir under RPMS
Its the only kernel of that version under SRPMs for rawhide.
On Mon, 1 Mar 2004, Harry Putnam wrote:
I'm probably in over my head but rebuilding this package: kernel-2.6.3-1.116.src.rpm
Does not produce a regular kernel package. I only get:
*RPMS/ kernel-debuginfo-2.6.3-1.116.i386.rpm kernel-source-2.6.3-1.116.i386.rpm kernel-doc-2.6.3-1.116.i386.rpm
Yes it does. You just have to talk nice to it. :-)
Try adding --target i686-redhat-linux to your command line. If you want to do the i386 and i686 stuff at the same time add both --target i686-redhat-linux and --target i386-redhat-linux on the command line.
FWIW you can edit the spec file to turn off the debug, boot and other kernels you might not need. The stuff you need to edit is right at the top.
and *SRPMS/ kernel-2.6.3-1.116.src.rpm
No `kernel-2.6.3-1.116.i386.rpm' Nothing in any other dir under RPMS
Its the only kernel of that version under SRPMs for rawhide.
Yup!! That is the one you need.
Disclaimer, I have not actually built a 2.6 kernel yet but that is what makes the 2.4 rpms build the stuff I need. I am assuming it is the same. If not I am sure someone will correct me.
HTH,
Tom
Tom Diehl tdiehl@rogueind.com writes:
Yes it does. You just have to talk nice to it. :-)
Try adding --target i686-redhat-linux to your command line. If you want to do the i386 and i686 stuff at the same time add both --target i686-redhat-linux and --target i386-redhat-linux on the command line.
Ahh yess, the old... `..talk nice to it..' gambit. hehe.
A word or two about this ought to be in /usr/src/linux*/README.
Also it seemed much easier to edit the appropriate config file from the *src* package by hand and then `rpmbuild -ba' instead of stepping thru a non-rpm build and install. At least once you told me about `talking nice'.
Tom Diehl tdiehl@rogueind.com writes:
Yes it does. You just have to talk nice to it. :-)
Try adding --target i686-redhat-linux to your command line. If you want to do the i386 and i686 stuff at the same time add both --target i686-redhat-linux and --target i386-redhat-linux on the command line.
FWIW you can edit the spec file to turn off the debug, boot and other kernels you might not need. The stuff you need to edit is right at the top.
Sorry to be a pest Tom but the *spec file is so poorly commented and the comments that are there are so ambiguous it is really difficult to tell from readin them what any of it supposed to be doing.
Would have almost been better to no comment it at all.
I don't see how to turn off debug smp other $ARCH or any of it for sure.
I'm guessing the various arch can be turned off here:
# groups of related archs %define all_x86 i386 i586 i686 %define all_sparc sparc sparc64
# Override generic defaults with per-arch defaults
# First, architecture-specific kernels off on all other archs (ifnarch) %ifnarch i386 x86_64 sparc %define buildsource 0 %endif
`Other' than what?
Does this mean i386 x86_64 sparc are turned off? Or does it mean everything else is turned off?
I don't understand why its required that comments be riddles.... hehe.
I made the mistake of running: rpmbuild --target i686-redhat-linux --target i386-redhat-linux --target i586-redhat-linux -ba kernel-2.6.spec
Its still running hours later. And this is on a 2GHz cpu with 512 ram.
It already generated what I needed so I guess I'll kill it but I kind of wanted to see what is taking so damned long. And learn how to edit the spec so I get a little shorter run.
I see nothing about debug that looks like something I can edit to shut it off.
On Mon, 1 Mar 2004, Harry Putnam wrote:
Tom Diehl tdiehl@rogueind.com writes:
Yes it does. You just have to talk nice to it. :-)
Try adding --target i686-redhat-linux to your command line. If you want to do the i386 and i686 stuff at the same time add both --target i686-redhat-linux and --target i386-redhat-linux on the command line.
FWIW you can edit the spec file to turn off the debug, boot and other kernels you might not need. The stuff you need to edit is right at the top.
Sorry to be a pest Tom but the *spec file is so poorly commented and the comments that are there are so ambiguous it is really difficult to tell from readin them what any of it supposed to be doing.
Sorry Harry, I have not looked at the 2.6 spec file. In the 2.4 spec file there is this at the top:
# What parts do we want to build? We must build at least one kernel. # These are the kernels that are built IF the architecture allows and # no contrary --with/--without arguments are given on the command line.
%define buildup 1 %define buildsmp 0 %define buildBOOT 0 %define buildbigmem 0 %define builddebug 0 %define buildjensen 0 %define buildtape 0 %define buildBOOTtape 0 %define buildUML 0
I just assumed that the 2.6 spec was the same. I know that the with/without part was stripped out of the 2.4 but last time I checked setting the above to 0 or 1 depending on what you need worked. Of course it has been a while since I did this so it might have changed. :-(
Would have almost been better to no comment it at all.
I don't see how to turn off debug smp other $ARCH or any of it for sure.
I'm guessing the various arch can be turned off here:
# groups of related archs %define all_x86 i386 i586 i686 %define all_sparc sparc sparc64
I am not sure.
# Override generic defaults with per-arch defaults
# First, architecture-specific kernels off on all other archs (ifnarch) %ifnarch i386 x86_64 sparc %define buildsource 0 %endif
`Other' than what?
Does this mean i386 x86_64 sparc are turned off? Or does it mean everything else is turned off?
On archs that do not match what you are building?? IOW if you are building i386 you only get the i386 stuff. Same for i686.
I don't understand why its required that comments be riddles.... hehe.
I made the mistake of running: rpmbuild --target i686-redhat-linux --target i386-redhat-linux --target i586-redhat-linux -ba kernel-2.6.spec Its still running hours later. And this is on a 2GHz cpu with 512 ram.
Yes, it takes a while. I usually let it run overnight.
It already generated what I needed so I guess I'll kill it but I kind of wanted to see what is taking so damned long. And learn how to edit the spec so I get a little shorter run.
:-)
Tom
On Mon, 2004-03-01 at 23:32 -0500, Tom Diehl wrote:
Sorry to be a pest Tom but the *spec file is so poorly commented and the comments that are there are so ambiguous it is really difficult to tell from readin them what any of it supposed to be doing.
I'm guessing the various arch can be turned off here:
# groups of related archs %define all_x86 i386 i586 i686 %define all_sparc sparc sparc64
No. All this is doing is variable definitions. Its definining "all_x86" as a list, containing the members "i386", "i586", and "i686". Note that it is used here to set additional definitions:
%ifarch %{all_x86} %define all_arch_configs kernel-%{kversion}-i?86*.config %define _64bit 0 %endif
So, in English, "If we're i386, i586, or i686, use the kernel-*i?86. configs, and disable the 64 bit variable."
All its doing here is setting variables so that one spec file can be used for multiple arches.
# Override generic defaults with per-arch defaults
# First, architecture-specific kernels off on all other archs (ifnarch) %ifnarch i386 x86_64 sparc %define buildsource 0 %endif
`Other' than what?
Does this mean i386 x86_64 sparc are turned off? Or does it mean everything else is turned off?
No. What this means in English is "If the arch is not i386, x86_64, or sparc, do not build the source package." The only arch that you want a kernel-source package for is one of those three, because the source is not optimized for any specific arch, only the binaries. This is why there is a kernel-source*.i386.rpm and not a kernel-source*.i686.rpm.
The old conditional methods from the 2.4 kernel are no longer present in the 2.6 kernel spec. And while the spec could probably use a little bit of commenting, as a whole, its a LOT less difficult to parse than the 2.4 spec.
hth,
~spot --- Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE Red Hat Sales Engineer || Aurora SPARC Linux Project Leader
"The author's mathematical treatment of the conception of purpose is novel and highly ingenious, but heretical and, so far as the present social order is concerned, dangerous and potentially subversive. Not to be published." -- Aldous Huxley's "Brave New World"
"Tom 'spot' Callaway" tcallawa@redhat.com writes:
No. What this means in English is "If the arch is not i386, x86_64, or sparc, do not build the source package." The only arch that you want a kernel-source package for is one of those three, because the source is not optimized for any specific arch, only the binaries. This is why there is a kernel-source*.i386.rpm and not a kernel-source*.i686.rpm.
The old conditional methods from the 2.4 kernel are no longer present in the 2.6 kernel spec. And while the spec could probably use a little bit of commenting, as a whole, its a LOT less difficult to parse than the 2.4 spec.
Thanks for the explanations... but I still don't see how to control the build from the spec file. For example:
Don't build the debug rpms only build i686 don't build an src file do build a src file
etc.
On Thu, 2004-03-04 at 10:40 -0600, Harry Putnam wrote:
Thanks for the explanations... but I still don't see how to control the build from the spec file. For example:
Don't build the debug rpms
Debug rpms are done systemwide for all packages that aren't noarch. This isn't kernel specific. However, if you really want to disable the debuginfo, adding this line to the spec will do it:
%define __debug_package 0
Be aware that this will likely inflate the size of the packages, since debuginfo is not being stripped and put in its own rpm package.
only build i686
rpmbuild -bb --target i686 kernel-2.6.spec
don't build an src file
The only arches that build kernel-source are i386, x86_64, and sparc. At least for x86, thats about all it builds when the target is i386. So, presuming you're i686 or higher, doing the above commandline will not build kernel-source (or kernel*.src.rpm for that matter).
do build a src file
rpmbuild -bb --target i386 kernel-2.6.spec (will make kernel-source) rpmbuild -bs kernel-2.6.spec (will make kernel-*.src.rpm)
~spot --- Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE Red Hat Sales Engineer || Aurora SPARC Linux Project Leader
"The author's mathematical treatment of the conception of purpose is novel and highly ingenious, but heretical and, so far as the present social order is concerned, dangerous and potentially subversive. Not to be published." -- Aldous Huxley's "Brave New World"
"Tom 'spot' Callaway" tcallawa@redhat.com writes:
On Thu, 2004-03-04 at 10:40 -0600, Harry Putnam wrote:
Thanks for the explanations... but I still don't see how to control the build from the spec file. For example:
Thanks again.. all info you've supplied is usefull, however maybe I wasnt clear ... the key words above were `FROM THE SPEC FILE'.
Don't build the debug rpms
Debug rpms are done systemwide for all packages that aren't noarch. This isn't kernel specific. However, if you really want to disable the debuginfo, adding this line to the spec will do it:
%define __debug_package 0
Ok, this kind of thing used to be right at the top of a spec file before 2.6.. Where can I get a list of such items ... they don't appear in spec files anymore?
2.4 *.spec: Summary: The Linux kernel (the core of the Linux operating system)
# What parts do we want to build? We must build at least one kernel. # These are the kernels that are built IF the architecture allows and # no contrary --with/--without arguments are given on the command line. %define buildup 1 %define buildsmp 1 %define buildBOOT 1 %define buildenterprise 1 %define builddebug 1 %define buildjensen 0 %define buildtape 1 %define buildBOOTtape 1 [...]
2.6 *.spec
Summary: The Linux kernel (the core of the Linux operating system)
# What parts do we want to build? We must build at least one kernel. # These are the kernels that are built IF the architecture allows it.
%define buildup 1 %define buildsmp 1 %define buildsource 1 %define usegcc32 0 [...]
On Thu, 2004-03-04 at 11:26 -0600, Harry Putnam wrote:
Thanks again.. all info you've supplied is usefull, however maybe I wasnt clear ... the key words above were `FROM THE SPEC FILE'.
OK. There are no more BOOT, enterprise, debug, jensen, tape, or BOOTtape kernels in the 2.6 FC2 tree, just UP and SMP for for i586 and i686 (and sparc/sparc64, but thats only relevant to me right now).
This means that the FC2 2.6 kernel spec can generate a grand total of four different x86 (32 bit) binary kernels.
If you want to just build UP (or just SMP), you should be able to adjust the variables at the top of the 2.6 spec file, just as you could for 2.4. If you want to build for a specific arch, you need to pass it as a --target on the commandline, just as you had to do with 2.4. The only place these variables are overwritten is for the -source package, which is ONLY built for i386, because it makes no sense to have a i586/i686 version of the kernel-source package.
If anything, this is easier than 2.4.
~spot --- Tom "spot" Callaway <tcallawa(a)redhat*com> LCA, RHCE Red Hat Sales Engineer || Aurora SPARC Linux Project Leader
"The author's mathematical treatment of the conception of purpose is novel and highly ingenious, but heretical and, so far as the present social order is concerned, dangerous and potentially subversive. Not to be published." -- Aldous Huxley's "Brave New World"