On Tue, 22 Nov 2005, Karanbir Singh wrote:
Charlie Brady wrote:
The kernel-sourcecode package has been changed by RH so as to be absolutely worthless :)
rpmbuild -bp --target i686 kernel-2.6.spec
(or i586, x86_64, etc.)
[Arch shouldn't matter for -bp, as %prep is architecture agnostic.]
Have you actually tried this out before ?
try this :
rpmbuild -bp --target i686 kernel-2.6.spec mv ../BUILD/kernel-2.6.9 ../BUILD/kernel-2.6.9.i686
rpmbuild -bp --target x86_64 kernel-2.6.spec
cd ../BUILD diff -uNr kernel-2.6.9.i686 kernel-2.6.9 | wc -l 15431
Did you look at the diff? There's lots like this:
... 0000000 -0500 @@ -1,7 +1,7 @@ # # Automatically generated make config: don't edit # Linux kernel version: 2.6.9-ac11 -# Tue Nov 22 06:42:42 2005 +# Tue Nov 22 06:46:36 2005 # CONFIG_X86=y CONFIG_MMU=y ...
Can we, therefore, safely assume that source setup after a '-bp' is not that arch independent really?
Not based on the non-zero size of the diff, no. But on the content of the diff - yes.
Is the kernel-sourcecode RPM you built anywhere that I can get it?
There is no kernel-sourcecode built by the CentOS buildsystem by default ( anymore ).
Why not? The reasons I've been given seem to be invalid.
If you really need it - go grab the .src.rpm and rebuild to suite your role / application requirement.
Yes, I can do that. But having the kernel-sourcode RPM I've had previously would be much more convenient. It means that I can build kernel-module-xxx RPMs using something like this:
... BuildRequires: kernel-source = %{kversion}-%{krelease} ... %prep %setup -n %{name}-%{version} -c -T ln -s %{_usrsrc}/linux-%{kernel}/drivers/net/appletalk/*.h . ln -s %{_usrsrc}/linux-%{kernel}/drivers/net/appletalk/*.c . for i in ipddp cops ltpc ; do echo obj-m += $i.o ; done > Makefile
%build %{__rm} -rf %{buildroot} echo -e "\nDriver version: %{version}\nKernel version: %{kernel}\n"
%{__make} KERNELRELEASE=%{kernel} -C /usr/src/kernels/%{kernel}-%{_target_cpu} M=`pwd` clean %{__make} KERNELRELEASE=%{kernel} -C /usr/src/kernels/%{kernel}-%{_target_cpu} M=`pwd` %{__install} -d -m0755 %{buildroot}%{_libmoddir}/%{kernel}%{moduledir}/ %{__install} -m0644 %{modules} %{buildroot}%{_libmoddir}/%{kernel}%{moduledir} ...