rpms/kernel/devel kernel-2.6.spec,1.2389,1.2390
fedora-cvs-commits at redhat.com
fedora-cvs-commits at redhat.com
Thu Jul 13 02:28:08 UTC 2006
Author: roland
Update of /cvs/dist/rpms/kernel/devel
In directory cvs.devel.redhat.com:/tmp/cvs-serv14023
Modified Files:
kernel-2.6.spec
Log Message:
Build separate debuginfo subpackages instead of a single one.
Index: kernel-2.6.spec
===================================================================
RCS file: /cvs/dist/rpms/kernel/devel/kernel-2.6.spec,v
retrieving revision 1.2389
retrieving revision 1.2390
diff -u -r1.2389 -r1.2390
--- kernel-2.6.spec 13 Jul 2006 00:00:10 -0000 1.2389
+++ kernel-2.6.spec 13 Jul 2006 02:28:05 -0000 1.2390
@@ -17,7 +17,7 @@
# Versions of various parts
-# After branching, please hardcode these values as the
+# After branching, please hardcode these values as the
# %dist and %rhel tags are not reliable yet
# For example dist -> .el5 and rhel -> 5
#% define dist .XX
@@ -77,7 +77,7 @@
%ifarch ppc64iseries i686
%define buildheaders 0
%endif
-
+
%ifarch %{all_x86}
%define all_arch_configs $RPM_SOURCE_DIR/kernel-%{kversion}-i?86*.config
%define image_install_path boot
@@ -681,7 +681,7 @@
$RPM_SOURCE_DIR/merge.pl $RPM_SOURCE_DIR/config-rhel-generic $i.tmp > $i
rm $i.tmp
done
-%endif
+%endif
# First we unpack the kernel tarball.
# If this isn't the first make prep, we use links to the existing clean tarball
@@ -790,7 +790,7 @@
# Warn if someone tries to build userspace using kernel headers
%patch801 -p1
-# Exec shield
+# Exec shield
%patch810 -p1
#%patch811 -p1
@@ -1098,6 +1098,7 @@
%if "%{_enable_debug_packages}" == "1"
mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/boot
+ mkdir -p $RPM_BUILD_ROOT/usr/lib/debug/%{image_install_path}
%endif
mkdir -p $RPM_BUILD_ROOT/%{image_install_path}
install -m 644 .config $RPM_BUILD_ROOT/boot/config-$KernelVer
@@ -1286,6 +1287,62 @@
BuildKernel %make_target %kernel_image kdump
%endif
+
+###
+### Special hacks for debuginfo subpackages.
+###
+
+# This macro is used by %%install, so we must redefine it before that.
+%define debug_package %{nil}
+
+%if "%{_enable_debug_packages}" == "1"
+%ifnarch noarch
+%global __debug_package 1
+%package debuginfo-common
+Summary: Kernel source files used by %{name}-debuginfo packages
+Group: Development/Debug
+Provides: %{name}-debuginfo-common-%{_target_cpu} = %{KVERREL}
+
+%description debuginfo-common
+This package is required by %{name}-debuginfo subpackages.
+It provides the kernel source files common to all builds.
+
+%files debuginfo-common
+%defattr(-,root,root)
+/usr/src/debug/%{name}-%{version}/linux-%{kversion}.%{_target_cpu}
+%dir /usr/src/debug
+%dir /usr/lib/debug
+%dir /usr/lib/debug/%{image_install_path}
+%dir /usr/lib/debug/lib
+%dir /usr/lib/debug/lib/modules
+%dir /usr/lib/debug/usr/src/kernels
+%endif
+%endif
+
+# First argument: subpackage name (e.g. smp)
+# Second argument, optional: dir with variant-named stripped ELF (e.g. boot)
+# Third argument, optional: suffix in that dir, if not -%{1} (e.g. -PAE)
+%define build_debuginfo() \
+%if "%{_enable_debug_packages}" == "1"\
+%ifnarch noarch\
+%%package %{?1:%{1}-}debuginfo\
+Summary: Debug information for package %{name}%{?1:-%{1}}\
+Group: Development/Debug\
+Requires: %{name}-debuginfo-common-%{_target_cpu} = %{KVERREL}\
+Provides: %{name}-%{?1:%{1}-}debuginfo-%{_target_cpu} = %{KVERREL}\
+%%description %{?1:%{1}-}debuginfo\
+This package provides debug information for package %{name}%{?1:-%{1}}.\
+This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\
+%%files %{?1:%{1}-}debuginfo\
+%defattr(-,root,root)\
+%{?2:/usr/lib/debug/%{2}/*-%{KVERREL}%{?3}%{!?3:%{?1}}.debug}\
+/usr/lib/debug/lib/modules/%{KVERREL}%{?1}\
+/usr/lib/debug/usr/src/kernels/%{KVERREL}%{?1:-%{1}}-%{_target_cpu}\
+%endif\
+%endif\
+%{nil}
+
+
###
### install
###
@@ -1385,9 +1442,9 @@
%post xen
[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}-xen
-if [ -e /proc/xen/xsd_kva -o ! -d /proc/xen ]; then
+if [ -e /proc/xen/xsd_kva -o ! -d /proc/xen ]; then
/sbin/new-kernel-pkg --package kernel-xen --mkinitrd --depmod --install --multiboot=/boot/xen.gz-%{KVERREL} %{KVERREL}xen
-else
+else
/sbin/new-kernel-pkg --package kernel-xen --mkinitrd --depmod --install %{KVERREL}xen
fi
[ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
@@ -1402,9 +1459,9 @@
%post xen-PAE
[ ! -x /usr/sbin/module_upgrade ] || /usr/sbin/module_upgrade %{rpmversion}-%{release}-xen-PAE
-if [ -e /proc/xen/xsd_kva ]; then
+if [ -e /proc/xen/xsd_kva ]; then
/sbin/new-kernel-pkg --package kernel-xen-PAE --mkinitrd --depmod --install --multiboot=/boot/xen.gz-%{KVERREL}-PAE %{KVERREL}xen-PAE
-else
+else
/sbin/new-kernel-pkg --package kernel-xen-PAE --mkinitrd --depmod --install %{KVERREL}xen-PAE
fi
[ ! -x /sbin/ldconfig ] || /sbin/ldconfig -X
@@ -1453,7 +1510,8 @@
###
%if %{buildup}
-%files
+%build_debuginfo
+%files
%defattr(-,root,root)
/%{image_install_path}/vmlinuz-%{KVERREL}
/boot/System.map-%{KVERREL}
@@ -1480,6 +1538,7 @@
%endif
%if %{buildpae}
+%build_debuginfo PAE
%files PAE
%defattr(-,root,root)
/%{image_install_path}/vmlinuz-%{KVERREL}PAE
@@ -1502,6 +1561,7 @@
%endif
%if %{buildsmp}
+%build_debuginfo smp
%files smp
%defattr(-,root,root)
/%{image_install_path}/vmlinuz-%{KVERREL}smp
@@ -1525,6 +1585,7 @@
%if %{includexen}
%if %{buildxen}
+%build_debuginfo xen boot
%files xen
%defattr(-,root,root)
/%{image_install_path}/vmlinuz-%{KVERREL}xen
@@ -1550,6 +1611,7 @@
%endif
%if %{buildxenPAE}
+%build_debuginfo xen-PAE boot -PAE
%files xen-PAE
%defattr(-,root,root)
/%{image_install_path}/vmlinuz-%{KVERREL}xen-PAE
@@ -1578,6 +1640,7 @@
%if %{buildkdump}
%files kdump
+%build_debuginfo kdump %{image_install_path}
%defattr(-,root,root)
/%{image_install_path}/vmlinux-%{KVERREL}kdump
/boot/System.map-%{KVERREL}kdump
@@ -1609,6 +1672,9 @@
%endif
%changelog
+* Wed Jul 12 2006 Roland McGrath <roland at redhat.com>
+- Build separate debuginfo subpackages instead of a single one.
+
* Wed Jul 12 2006 Dave Jones <davej at redhat.com>
- 2.6.18-rc1-git5
- Make serial console installs on ia64 work again.
@@ -2142,4 +2208,3 @@
* Tue Mar 14 2006 Dave Jones <davej at redhat.com>
- FC5 final kernel
- 2.6.16-rc6-git3
-
More information about the fedora-cvs-commits
mailing list