Trying to build a vanilla kernel with:
rpmbuild -ba --with vanilla kernel.spec
fails like so:
+ ApplyPatch linux-2.6-build-nonintconfig.patch + local patch=linux-2.6-build-nonintconfig.patch + shift + '[' '!' -f /home/cra/rpmbuild/SOURCES/linux-2.6-build-nonintconfig.patch ']' ERROR: Patch linux-2.6-build-nonintconfig.patch not listed as a source patch in specfile error: Bad exit status from /var/tmp/rpm-tmp.8pegaB (%prep)
this is due to the following code in ApplyPatch():
if ! egrep "^Patch[0-9]+: $patch$" %{_specdir}/%{name}.spec ; then if [ "${patch:0:10}" != "patch-2.6." ] ; then echo "ERROR: Patch $patch not listed as a source patch in specfile" exit 1 fi fi 2>/dev/null
Why is it checking for "patch-2.6.*" in the patch file name? I removed that entire block of code and --with vanilla now works. What is the expected behavior of that block of code?
On Wed, Apr 22, 2009 at 06:18:07PM -0400, Chuck Anderson wrote:
if ! egrep "^Patch[0-9]+: $patch$" %{_specdir}/%{name}.spec ; then if [ "${patch:0:10}" != "patch-2.6." ] ; then echo "ERROR: Patch $patch not listed as a source patch in specfile" exit 1 fi fi 2>/dev/null
Why is it checking for "patch-2.6.*" in the patch file name? I removed that entire block of code and --with vanilla now works. What is the expected behavior of that block of code?
Urgh. Yeah, this was added to check that ApplyPatch patches are also listed in the srpm (if they aren't, then obviously we'll ftbfs... this lets 'make prep' catch it.)
This rule should probably be updated to use an $specdir/exclude file or something.
regards, Kyle
On Wed, 22 Apr 2009 18:18:07 -0400 Chuck Anderson cra@WPI.EDU wrote:
ERROR: Patch linux-2.6-build-nonintconfig.patch not listed as a source patch in specfile error: Bad exit status from /var/tmp/rpm-tmp.8pegaB (%prep)
this is due to the following code in ApplyPatch():
if ! egrep "^Patch[0-9]+: $patch$" %{_specdir}/%{name}.spec ; then if [ "${patch:0:10}" != "patch-2.6." ] ; then echo "ERROR: Patch $patch not listed as a source patch in specfile" exit 1 fi fi 2>/dev/null
It's trying to grep in {_specdir}/kernel-vanilla.spec because of the ugly name-munging that's used to build the vanilla kernel.
Fixed in 2.6.29.1-114:
if ! egrep "^Patch[0-9]+: $patch$" %{_specdir}/${RPM_PACKAGE_NAME%%%%%{?variant}}.spec ; then
On Tue, Apr 28, 2009 at 11:08:05AM -0400, Chuck Ebbert wrote:
On Wed, 22 Apr 2009 18:18:07 -0400 Chuck Anderson cra@WPI.EDU wrote:
ERROR: Patch linux-2.6-build-nonintconfig.patch not listed as a source patch in specfile error: Bad exit status from /var/tmp/rpm-tmp.8pegaB (%prep)
this is due to the following code in ApplyPatch():
if ! egrep "^Patch[0-9]+: $patch$" %{_specdir}/%{name}.spec ; then if [ "${patch:0:10}" != "patch-2.6." ] ; then echo "ERROR: Patch $patch not listed as a source patch in specfile" exit 1 fi fi 2>/dev/null
It's trying to grep in {_specdir}/kernel-vanilla.spec because of the ugly name-munging that's used to build the vanilla kernel.
Fixed in 2.6.29.1-114:
if ! egrep "^Patch[0-9]+: $patch$" %{_specdir}/${RPM_PACKAGE_NAME%%%%%{?variant}}.spec ; then
Great. I ended up having lots of other issues with vanilla build. At some point during the build, the "make oldconfig" becomes interactive during the %install phase. I answer all the questions with default values (hitting enter on each one) and then the build fails. I also see some interesting thigs with ia64. Why is it messing with ia64 configs?
Excerpts:
Building for target noarch ... + Arch=ia64 + make ARCH=ia64 loose_nonint_oldconfig /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-segrel.S: Assembler messages: /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-segrel.S:1: Error: unknown pseudo-op: `.rodata' /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-segrel.S:2: Error: no such instruction: `data4 @segrel(start)' objdump: '/tmp/out12892': No such file /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/toolchain-flags: line 19: [: !=: unary operator expected /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-text-align.S: Assembler messages: /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-text-align.S:1: Error: unknown pseudo-op: `.proc' /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-text-align.S:2: Error: unknown pseudo-op: `.prologue' /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-text-align.S:3: Error: unknown pseudo-op: `.save' /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-text-align.S:6: Error: unknown pseudo-op: `.endp' readelf: Error: '/tmp/out12892': No such file /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-gas-asm.S: Assembler messages: /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-gas-asm.S:1: Error: junk at end of line, first unrecognized character is `[' /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-gas-asm.S:2: Error: unknown pseudo-op: `.xdata4' objdump: '/tmp/out12918.o': No such file /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/arch/ia64/scripts/check-gas: line 10: [: !=: unary operator expected + echo '# ia64' ...
Executing(%install): /bin/sh -e /var/tmp/rpm-tmp.RmV63c + umask 022 + cd /home/cra/rpmbuild/BUILD + cd kernel-2.6.29 + LANG=C + export LANG + unset DISPLAY + cd linux-2.6.29.noarch + make INSTALL_FW_PATH=/home/cra/rpmbuild/BUILDROOT/kernel-vanilla-2.6.29.1-102.fc10.noarch/lib/firmware firmware_install scripts/kconfig/conf -s arch/x86/Kconfig * * Restart config... * * * Enable the block layer * Enable the block layer (BLOCK) [Y/?] y Support for large block devices and files (LBD) [N/y/?] (NEW) aborted!
Console input/output is redirected. Run 'make oldconfig' to update configuration.
make[2]: *** [silentoldconfig] Error 1 make[1]: *** [silentoldconfig] Error 2 ... /bin/sh: /home/cra/rpmbuild/BUILD/kernel-2.6.29/linux-2.6.29.noarch/scripts/ihex2fw: No such file or directory make[1]: *** [firmware/dabusb/firmware.fw] Error 127 make: *** [firmware_install] Error 2 error: Bad exit status from /var/tmp/rpm-tmp.RmV63c (%install) ... File listed twice: /usr/src/kernels/2.6.29.1-102.fc10.i686.PAE/usr File listed twice: /usr/src/kernels/2.6.29.1-102.fc10.i686.PAE/usr/Kconfig File listed twice: /usr/src/kernels/2.6.29.1-102.fc10.i686.PAE/usr/Makefile Bad exit status from /var/tmp/rpm-tmp.RmV63c (%install)
On Tue, 28 Apr 2009 11:17:04 -0400 Chuck Anderson cra@WPI.EDU wrote:
Great. I ended up having lots of other issues with vanilla build. At some point during the build, the "make oldconfig" becomes interactive during the %install phase. I answer all the questions with default values (hitting enter on each one) and then the build fails. I also see some interesting thigs with ia64. Why is it messing with ia64 configs?
Excerpts:
Building for target noarch ...
You should always specify an arch.
I normally use:
rpmbuild -bb --target x86_64 --with baseonly --without debuginfo --with firmware kernel.spec
(--with firmware has some problems when building 32-bit kernels on x86_64 though.)
On Tue, Apr 28, 2009 at 01:01:17PM -0400, Chuck Ebbert wrote:
On Tue, 28 Apr 2009 11:17:04 -0400 Chuck Anderson cra@WPI.EDU wrote:
Great. I ended up having lots of other issues with vanilla build. At some point during the build, the "make oldconfig" becomes interactive during the %install phase. I answer all the questions with default values (hitting enter on each one) and then the build fails. I also see some interesting thigs with ia64. Why is it messing with ia64 configs?
Excerpts:
Building for target noarch ...
You should always specify an arch.
I normally use:
rpmbuild -bb --target x86_64 --with baseonly --without debuginfo --with firmware kernel.spec
(--with firmware has some problems when building 32-bit kernels on x86_64 though.)
Sorry, I should have specified the command I had used. It was similar to this:
rpmbuild -ba --target=i386,i686,noarch --with vanilla --without debuginfo --without debug --with firmware kernel.spec
I was building on an F10 i386 host.
On Tue, 28 Apr 2009 13:14:08 -0400 Chuck Anderson cra@WPI.EDU wrote:
Sorry, I should have specified the command I had used. It was similar to this:
rpmbuild -ba --target=i386,i686,noarch --with vanilla --without debuginfo --without debug --with firmware kernel.spec
I was building on an F10 i386 host.
I don't think the target can be a list. And if you say '--with firmware' you don't need to build the noarch target unless you want docs (if you do want the whole noarch build then you don't need '--with firmware'.)
On Tue, Apr 28, 2009 at 01:51:08PM -0400, Chuck Ebbert wrote:
On Tue, 28 Apr 2009 13:14:08 -0400 Chuck Anderson cra@WPI.EDU wrote:
Sorry, I should have specified the command I had used. It was similar to this:
rpmbuild -ba --target=i386,i686,noarch --with vanilla --without debuginfo --without debug --with firmware kernel.spec
I was building on an F10 i386 host.
I don't think the target can be a list. And if you say '--with firmware' you don't need to build the noarch target unless you want docs (if you do want the whole noarch build then you don't need '--with firmware'.)
The target has been able to be list for as long as I can remember building Fedora kernels. If it can't be a list now, then that is news to me.
On Tue, Apr 28, 2009 at 10:27:38AM -0700, Roland McGrath wrote:
You should always specify an arch.
make prep uses noarch and generally works fine. You can just ignore the strange assembler messages in the 'make configs' phase and the .config files come out fine, in my experience.
The strange messages are just annoying Makefile detritus because of running ARCH=ia64, they're nothing to be concerned with, and not relevant to anything but actually building the kernel on ia64.
(See also arch/ia64/Makefile $GAS_STATUS and $KBUILD_CPPFLAGS)
cheers, Kyle
On Tue, 28 Apr 2009 10:27:38 -0700 (PDT) Roland McGrath roland@redhat.com wrote:
You should always specify an arch.
make prep uses noarch and generally works fine. You can just ignore the strange assembler messages in the 'make configs' phase and the .config files come out fine, in my experience.
Well yeah, but if you're running rpmbuild -ba you probably want to build a kernel.
Great. I ended up having lots of other issues with vanilla build. At some point during the build, the "make oldconfig" becomes interactive during the %install phase.
%install?? Weird. That should not be happening. Maybe a V=1 on the make command would make kbuild explain why it decided to do that.
I also see some interesting thigs with ia64. Why is it messing with ia64 configs?
That stuff is "normal". Ignore it if it doesn't break the build.
kernel@lists.fedoraproject.org