I notice that CentOS 4.2 has no kernel-sourcecode RPM, unlike 4.0 and 4.1. Is that intentional or an oversight?
--- Charlie
On Mon, 2005-11-21 at 23:34 -0500, Charlie Brady wrote:
I notice that CentOS 4.2 has no kernel-sourcecode RPM, unlike 4.0 and 4.1. Is that intentional or an oversight?
Charlie
I was intentional
The kernel-sourcecode package has been changed by RH so as to be absolutely worthless :)
It is a noarch rpm now, which means that none of the arch specfic patches are installed when it is created.
It therefore creates kernels that are not like the actual kernels.
Better way to get a real (and patched) kernel source tree is to install the kernel source RPM
rpm -Uvh kernel-xxxxx.src.rpm
then to go to the SPEC directory ... normally /usr/src/redhat/SPECS ... and do this:
rpmbuild -bp --target i686 kernel-2.6.spec
(or i586, x86_64, etc.)
Then go to the BUILD directory ... normally /usr/src/redhat/BUILD ... and the patched tree is there.
On Mon, 21 Nov 2005, Johnny Hughes wrote:
On Mon, 2005-11-21 at 23:34 -0500, Charlie Brady wrote:
I notice that CentOS 4.2 has no kernel-sourcecode RPM, unlike 4.0 and 4.1. Is that intentional or an oversight?
...
The kernel-sourcecode package has been changed by RH so as to be absolutely worthless :)
It is a noarch rpm now, which means that none of the arch specfic patches are installed when it is created.
That's not true (not for RHEL4, at least). Here's an extract from %install from kernel-2.6.9-22.0.1.EL.src.rpm:
%if %{buildsource}
mkdir -p $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL} chmod -R a+r *
# clean up the source tree so that it is ready for users to build their own # kernel make -s mrproper # copy the source over tar cf - . | tar xf - -C $RPM_BUILD_ROOT/usr/src/linux-%{KVERREL}
... %endif
then to go to the SPEC directory ... normally /usr/src/redhat/SPECS ... and do this:
rpmbuild -bp --target i686 kernel-2.6.spec
(or i586, x86_64, etc.)
[Arch shouldn't matter for -bp, as %prep is architecture agnostic.]
Then go to the BUILD directory ... normally /usr/src/redhat/BUILD ... and the patched tree is there.
I don't see how that would be any different to what we see happening above.
Is the kernel-sourcecode RPM you built anywhere that I can get it?
Thanks
--- Charlie
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 -------------
Can we, therefore, safely assume that source setup after a '-bp' is not that arch independent really?
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 ).
If you really need it - go grab the .src.rpm and rebuild to suite your role / application requirement.
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} ...
Charlie Brady wrote:
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.
Because there is no use for it, there is no reason to carry additional stuff on the distro when its not needed. Anyone who needs the compelete sources can get the .src.rpm
Details also in the Release Notes. And this issue has been covereed quite a few times on the centos mailing list and the rhel mail list, might be worth your time to read through the history there.
Charlie Brady wrote:
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:
You can install the kernel source rpm, edit the spec file like this: @@ -55,7 +55,7 @@ %ifarch noarch %define builddoc 1 -%define buildsource 0 +%define buildsource 1 %define buildup 0 %define buildsmp 0 %define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}*.config
And build the kernel-sourcecode rpm with: rpmbuild -bb --target noarch kernel-2.6.spec
Greg
On Tue, 22 Nov 2005, Charlie Brady wrote:
On Tue, 22 Nov 2005, Karanbir Singh wrote:
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 ...
A slight mistake here. I compared i686 and i586 builds and that's what I found. Comparing x86_64 and i686 builds generates differences in the .config* files. But I don't expect to use those from a kernel-sourcecode RPM - they are included in kernel-devel and kernel-smp-devel RPMs.
Charlie Brady wrote:
I notice that CentOS 4.2 has no kernel-sourcecode RPM, unlike 4.0 and 4.1. Is that intentional or an oversight?
if you need to rebuild a kernel - use the kernel-*.src.rpm instead - if you just need headers and module building ability, use the kernel-devel-*.rpm
- K
On Tue, 22 Nov 2005, Karanbir Singh wrote:
Charlie Brady wrote:
I notice that CentOS 4.2 has no kernel-sourcecode RPM, unlike 4.0 and 4.1. Is that intentional or an oversight?
if you need to rebuild a kernel - use the kernel-*.src.rpm instead - if you just need headers and module building ability, use the kernel-devel-*.rpm
I don't want to do either. I want to build some modules which aren't included in the standard kernel. I'd like to get the source for them from the kernel-sourcecode RPM, as I've done in the past. But I can manage without if I have to.
On Tue, 2005-11-22 at 06:37 -0500, Charlie Brady wrote:
On Tue, 22 Nov 2005, Karanbir Singh wrote:
Charlie Brady wrote:
I notice that CentOS 4.2 has no kernel-sourcecode RPM, unlike 4.0 and 4.1. Is that intentional or an oversight?
if you need to rebuild a kernel - use the kernel-*.src.rpm instead - if you just need headers and module building ability, use the kernel-devel-*.rpm
I don't want to do either. I want to build some modules which aren't included in the standard kernel. I'd like to get the source for them from the kernel-sourcecode RPM, as I've done in the past. But I can manage without if I have to. _______________________________________________
When I need to build some kernel modules for a raid controller, that is when I noticed that the modules produced from kernel-sourcecode did not work. They built fine, but didn't function.
That is when I started researching the kernel-sourcecode rpm more fully and discovered that the tree is different and things happen inside the code that is arch specific.
Fedora and RedHat both no longer produce the kernel-sourcecode package by default.
It caused quite a stir on their mailing lists at the time. However, since it is their stance to not build a kernel-source=code and since the source tree produced is different when using kernel-sourcecode, it is better that we do what they do for consistency.
On Tue, 2005-11-22 at 06:37 -0500, Charlie Brady wrote:
On Tue, 22 Nov 2005, Karanbir Singh wrote:
Charlie Brady wrote:
I notice that CentOS 4.2 has no kernel-sourcecode RPM, unlike 4.0 and 4.1. Is that intentional or an oversight?
if you need to rebuild a kernel - use the kernel-*.src.rpm instead - if you just need headers and module building ability, use the kernel-devel-*.rpm
I don't want to do either. I want to build some modules which aren't included in the standard kernel. I'd like to get the source for them from the kernel-sourcecode RPM, as I've done in the past. But I can manage without if I have to.
Have you looked at the centosplus repo "unsupported" kernels? They usually have most/all of the additional modules I need.
Phil