We should really only install ld.so.conf files from packages that actually have CONFIG_XEN enabled, but it would be slightly messy to have only kernel-PAE.i686 and kernel.x86_64 include it.
Since it won't actually be used unless it's enabled by the xen kernel at runtime, let's be lazy and have all variants install them.
Index: devel/kernel.spec =================================================================== --- devel.orig/kernel.spec 2008-07-23 14:05:27.000000000 +0100 +++ devel.orig/kernel.spec 2008-07-23 14:05:27.000000000 +0100 @@ -407,7 +407,7 @@ Summary: The Linux kernel # # The ld.so.conf.d file we install uses syntax older ldconfig's don't grok. # -%define kernel_xen_conflicts glibc < 2.3.5-1, xen < 3.0.1 +%define nosegneg_conflicts glibc < 2.3.5-1, xen < 3.0.1
# upto and including kernel 2.4.9 rpms, the 4Gb+ kernel was called kernel-enterprise # now that the smp kernel offers this capability, obsolete the old kernel @@ -440,6 +440,7 @@ Provides: kernel-uname-r = %{KVERREL}%{? Requires(pre): %{kernel_prereq}\ Conflicts: %{kernel_dot_org_conflicts}\ Conflicts: %{package_conflicts}\ +Conflicts: %{nosegneg_conflicts}\ %{?1:%{expand:%%{?kernel%{?1:_%{1}}_conflicts:Conflicts: %%{kernel%{?1:_%{1}}_conflicts}}}}\ %{?1:%{expand:%%{?kernel%{?1:_%{1}}_obsoletes:Obsoletes: %%{kernel%{?1:_%{1}}_obsoletes}}}}\ %{?1:%{expand:%%{?kernel%{?1:_%{1}}_provides:Provides: %%{kernel%{?1:_%{1}}_provides}}}}\ @@ -1440,6 +1441,18 @@ BuildKernel() { mkdir -p $RPM_BUILD_ROOT/usr/src/kernels mv $RPM_BUILD_ROOT/lib/modules/$KernelVer/build $RPM_BUILD_ROOT/$DevelDir ln -sf ../../..$DevelDir $RPM_BUILD_ROOT/lib/modules/$KernelVer/build + + mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d + rm -f $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-$KernelVer.nosegneg.conf + cat > $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-$KernelVer.nosegneg.conf <<EOF +# This directive teaches ldconfig to search in nosegneg subdirectories +# and cache the DSOs there with extra bit 0 set in their hwcap match +# fields. In Xen guest kernels, the vDSO tells the dynamic linker to +# search in nosegneg subdirectories and to match this extra hwcap bit +# in the ld.so.cache file. +hwcap 0 nosegneg +EOF + chmod 444 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-$KernelVer.nosegneg.conf }
### @@ -1521,22 +1534,6 @@ BuildKernel vmlinux vmlinux kdump vmlinu
cd linux-%{kversion}.%{_target_cpu}
-%if %{includexen} -%if %{with_xen} -mkdir -p $RPM_BUILD_ROOT/etc/ld.so.conf.d -rm -f $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf -cat > $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf <<\EOF -# This directive teaches ldconfig to search in nosegneg subdirectories -# and cache the DSOs there with extra bit 0 set in their hwcap match -# fields. In Xen guest kernels, the vDSO tells the dynamic linker to -# search in nosegneg subdirectories and to match this extra hwcap bit -# in the ld.so.cache file. -hwcap 0 nosegneg -EOF -chmod 444 $RPM_BUILD_ROOT/etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf -%endif -%endif - %if %{with_doc} mkdir -p $RPM_BUILD_ROOT/usr/share/doc/kernel-doc-%{kversion}/Documentation
@@ -1745,6 +1742,7 @@ fi /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.networking\ /lib/modules/%{KVERREL}%{?2:.%{2}}/modules.order\ %ghost /boot/initrd-%{KVERREL}%{?2:.%{2}}.img\ +/etc/ld.so.conf.d/kernelcap-%{KVERREL}%{?2:.%{2}}.nosegneg.conf\ %{?-e:%{-e*}}\ %{expand:%%files %{?2:%{2}-}devel}\ %defattr(-,root,root)\ @@ -1777,7 +1775,7 @@ fi %kernel_variant_files %{with_pae} PAE %kernel_variant_files %{with_pae_debug} PAEdebug %kernel_variant_files -k vmlinux %{with_kdump} kdump -%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen -e /etc/ld.so.conf.d/kernelcap-%{KVERREL}.xen.conf %{with_xen} xen +%kernel_variant_files -a /%{image_install_path}/xen*-%{KVERREL}.xen %{with_xen} xen
%changelog * Tue Jul 22 2008 Dave Jones davej@redhat.com
kernel@lists.fedoraproject.org