From Bugzilla Helper: User-Agent: Mozilla/5.0 (Windows; U; Win98; en-US; rv:0.9.4) Gecko/20011128 Netscape6/6.2.1 Description of problem: I thought in the past if I used -ba or --rebuild on a .spec/SRPM on a SMP i686, it would automatically generate an SMP kernel. It no longer does that. Version-Release number of selected component (if applicable): How reproducible: Always Steps to Reproduce: 1. become root on a SMP i686 system 2.rpm -i ftp://ftp.redhat.com/pub/redhat/linux/updates/7.2/en/os/SRPMS/kernel-2.4.9-31.src.rpm 3. cd /usr/src/redhat/SPEC 4. rpm -ba kernel-2.4.spec Actual Results: No i686 kernels or SMP kernels created. All I get are: -rw-r--r-- 1 root root 10434043 Apr 15 18:46 kernel-2.4.9-31.perfctr.i386.rpm -rw-r--r-- 1 root root 4365290 Apr 15 18:52 kernel-BOOT-2.4.9-31.perfctr.i386.rpm -rw-r--r-- 1 root root 1663964 Apr 15 18:51 kernel-doc-2.4.9-31.perfctr.i386.rpm -rw-r--r-- 1 root root 1152130 Apr 15 18:51 kernel-headers-2.4.9-31.perfctr.i386.rpm -rw-r--r-- 1 root root 25144112 Apr 15 18:51 kernel-source-2.4.9-31.perfctr.i386.rpm [Where perfctr is an addition to the release on the custom kernel I am bulding] Expected Results: That I'd get a kernel-smp-2.4.9-31.i686.rpm in /usr/src/redhat/RPMS/i686 (actually kernel-smp-2.4.9-31.perfctr.i686.rpm in my case) Additional info: This is a dual processor PII. `arch` return i686 at the command line. In the spec file, "%ifarch i386", is (I think quite properly) true due to the following. [root@emmy SPECS]$ find /usr/lib/rpm/ -name macros | xargs grep %_arch /usr/lib/rpm/i386-redhat-linux/macros:%_arch i386 /usr/lib/rpm/i486-redhat-linux/macros:%_arch i386 /usr/lib/rpm/i586-redhat-linux/macros:%_arch i386 /usr/lib/rpm/i686-redhat-linux/macros:%_arch i386 /usr/lib/rpm/macros:%_arch i386 /usr/lib/rpm/athlon-redhat-linux/macros:%_arch i386 Looking /var/tmp/rpm-tmp.xyzw for the session, I see this bit: RPM_OPT_FLAGS="-O2 -march=i386 -mcpu=i686" RPM_ARCH="i386" which seems right given the above and the following: [root@emmy SPECS]$ find /usr/lib/rpm/ -name macros | xargs grep march /usr/lib/rpm/i386-redhat-linux/macros:%optflags -O2 -march=i386 -mcpu=i686 -g /usr/lib/rpm/i486-redhat-linux/macros:%optflags -O2 -march=i486 -g /usr/lib/rpm/i586-redhat-linux/macros:%optflags -O2 -march=i586 -g /usr/lib/rpm/i686-redhat-linux/macros:%optflags -O2 -march=i686 -g /usr/lib/rpm/athlon-redhat-linux/macros:%optflags -O2 -march=athlon -g However, in the .spec file, there is this section: %ifarch i386 %define buildsmp 0 %endif which seems to be activated. Is this correct on a i686? If I put this right after %prep: %prep # BEGIN PERFCTR %if %{buildsmp} echo "Build SMP - %{_arch}" %else echo "Don't build SMP" %endif %ifarch i386 echo "i386 architecutre - SMP build disabled" %endif %ifarch i686 echo "i686 architecture" %endif # END PERFCTR I get this for rpm -bp kernel.spec [root@emmy SPECS]$ rpm -bp kernel-2.4.spec.save3.jkp Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.91258 + umask 022 + cd /usr/src/redhat/BUILD + echo 'Don'\''t build SMP' Don't build SMP + echo 'i386 architecutre - SMP build disabled' i386 architecutre - SMP build disabled + cd /usr/src/redhat/BUILD + rm -rf kernel-2.4.9 [snipped] Notice the lack if i686 definition. To force SMP, I can add --with smp kernel.spec as so: [root@emmy SPECS]$ rpm -bp --with smp kernel-2.4.spec.save3.jkp Executing(%prep): /bin/sh -e /var/tmp/rpm-tmp.17123 + umask 022 + cd /usr/src/redhat/BUILD + echo 'Build SMP - i386' Build SMP - i386 + echo 'i386 architecutre - SMP build disabled' i386 architecutre - SMP build disabled + cd /usr/src/redhat/BUILD and SMP will be enabled (later on down in the spec), but the target is still i386. Furthermore, the smp RPM never shows up (but that's another bug probably). So, the question is... Will %ifarch 686 ever be true? If not, that .spec file needs some serious help. If so, should it not letting %ifarch 386 be true? Do I have to use --rebuild on the SRPM to get i686 kernels (haven't tried that yet since each processor is only 300Mhz and kernel rebuilds take quite a while)? I thought -ba and --rebuild where just one step away from each other (i.e. extracting the source and spec).
You seem to have forgotten rpm -ba --target i686 <filenamesrc.rpm> eg the default target is i386 not i686
Thanks Arjan... I guess that was a piece of knowledge I didn't have. I could swear I've had it rebuild SMP by default on SMP systems without specifying the target in the past. I guess not. Sorry to "bug" you. I guess I'll go ahead and change this to NOTABUG (defective end user).