rpms/kernel-xen-2.6/F-7 kernel.spec,1.1.2.6,1.1.2.7
Eduardo Habkost (ehabkost)
fedora-extras-commits at redhat.com
Thu Oct 18 14:31:24 UTC 2007
- Previous message (by thread): rpms/VLGothic-fonts/devel 59-VLGothic-monospace.conf, NONE, 1.1 59-VLGothic-sans.conf, NONE, 1.1 VLGothic-fonts.spec, 1.7, 1.8 sources, 1.6, 1.7 30-VLGothic.conf, 1.2, NONE
- Next message (by thread): rpms/kernel/F-7 kernel-2.6.spec, 1.3357, 1.3358 linux-2.6-wireless-fixes.patch, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Author: ehabkost
Update of /cvs/pkgs/rpms/kernel-xen-2.6/F-7
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv26079
Modified Files:
Tag: private-ehabkost-debuginfo-branch
kernel.spec
Log Message:
Changes to make sane package names (main package: kernel-xen-2.6, but binary
package named kernel-xen).
Index: kernel.spec
===================================================================
RCS file: /cvs/pkgs/rpms/kernel-xen-2.6/F-7/Attic/kernel.spec,v
retrieving revision 1.1.2.6
retrieving revision 1.1.2.7
diff -u -r1.1.2.6 -r1.1.2.7
--- kernel.spec 17 Oct 2007 21:03:49 -0000 1.1.2.6
+++ kernel.spec 18 Oct 2007 14:30:52 -0000 1.1.2.7
@@ -1,3 +1,6 @@
+# we are kernel-xen-2.6!
+%define xen_package_magic 1
+
Summary: The Linux kernel (the core of the Linux operating system)
# For a stable, released kernel, released_kernel should be 1. For rawhide
@@ -107,16 +110,36 @@
%define usesparse 1
%endif
-# Whether or not to apply the Xen patches -- leave this enabled
+# defaults for the non-xen package
+
+# don't include xen patches
+%define includexen 0
+
+# don't build xen variant
+%define with_xen 0
+
+# Magic that will be enabled for the kernel-xen-2.6 Fedora package:
+%if 0%{?xen_package_magic}
+
+# Include the Xen patches
%define includexen 1
-# Xen doesn't work with current upstream kernel, shut it off
+
+# Enable the xen variant
%define with_xen 1
-# This pkg (kernel-xen-2.6) builds only the Xen kernel
+
+# Disable all other variants
%define with_xenonly 1
-# We won't build the .config files dynamically
+
+# We don't build the .config files dynamically, currently
%define preconfigured 1
-# kernel-xen variant
-%define variant -xen
+
+# The main package is called kernel-xen-2.6
+%define variant -xen-2.6
+
+# However the -xen variant will be called kernel-xen
+%define variantbase kernel
+
+%endif # (xen_package_magic)
# Set debugbuildsenabled to 1 for production (build separate debug kernels)
# and 0 for rawhide (all kernels are debug kernels).
@@ -143,6 +166,11 @@
%define pkg_release 0.%{fedora_build}%{?rctag}%{?gittag}%{?buildid}%{?dist}
%endif
+%define mainpkgname kernel%{?variant}
+%if !0%{?variantbase:1}
+%define variantbase %{mainpkgname}
+%endif
+
# The kernel tarball/base version
%define kversion 2.6.%{base_sublevel}
@@ -450,7 +478,7 @@
AutoProv: yes\
%{nil}
-Name: kernel%{?variant}
+Name: %{mainpkgname}
Group: System Environment/Kernel
License: GPLv2
URL: http://www.kernel.org/
@@ -887,7 +915,7 @@
%endif
-BuildRoot: %{_tmppath}/kernel-%{KVERREL}-root-%{_target_cpu}
+BuildRoot: %{_tmppath}/%{mainpkgname}-%{KVERREL}-root-%{_target_cpu}
%description
The kernel package contains the Linux kernel (vmlinuz), the core of any
@@ -896,10 +924,10 @@
input and output, etc.
-%package doc
+%package -n %{mainpkgname}-doc
Summary: Various documentation bits found in the kernel source
Group: Documentation
-%description doc
+%description -n %{mainpkgname}-doc
This package contains documentation files from the kernel
source. Various bits of information about the Linux kernel and the
device drivers shipped with it are documented in these files.
@@ -908,12 +936,12 @@
options that can be passed to Linux kernel modules at load time.
-%package headers
+%package -n %{mainpkgname}-headers
Summary: Header files for the Linux kernel for use by glibc
Group: Development/System
Obsoletes: glibc-kernheaders
Provides: glibc-kernheaders = 3.0-46
-%description headers
+%description -n %{mainpkgname}-headers
Kernel-headers includes the C header files that specify the interface
between the Linux kernel and userspace libraries and programs. The
header files define structures and constants that are needed for
@@ -921,12 +949,12 @@
glibc package.
-%package debuginfo-common
-Summary: Kernel source files used by %{name}-debuginfo packages
+%package -n %{mainpkgname}-debuginfo-common
+Summary: Kernel source files used by %{mainpkgname}-debuginfo packages
Group: Development/Debug
-Provides: %{name}-debuginfo-common-%{_target_cpu} = %{KVERREL}
-%description debuginfo-common
-This package is required by %{name}-debuginfo subpackages.
+Provides: %{mainpkgname}-debuginfo-common-%{_target_cpu} = %{KVERREL}
+%description -n %{mainpkgname}-debuginfo-common
+This package is required by %{mainpkgname}-debuginfo subpackages.
It provides the kernel source files common to all builds.
@@ -935,15 +963,15 @@
# %%kernel_debuginfo_package <subpackage>
#
%define kernel_debuginfo_package() \
-%package %{?1:%{1}-}debuginfo\
-Summary: Debug information for package %{name}%{?1:-%{1}}\
+%package -n %{variantbase}-%{?1:%{1}-}debuginfo\
+Summary: Debug information for package %{variantbase}%{?1:-%{1}}\
Group: Development/Debug\
-Requires: %{name}-debuginfo-common-%{_target_cpu} = %{KVERREL}\
-Provides: %{name}%{?1:-%{1}}-debuginfo-%{_target_cpu} = %{KVERREL}\
+Requires: %{mainpkgname}-debuginfo-common-%{_target_cpu} = %{KVERREL}\
+Provides: %{variantbase}%{?1:-%{1}}-debuginfo-%{_target_cpu} = %{KVERREL}\
AutoReqProv: no\
-%description -n %{name}%{?1:-%{1}}-debuginfo\
-This package provides debug information for package %{name}%{?1:-%{1}}.\
-This is required to use SystemTap with %{name}%{?1:-%{1}}-%{KVERREL}.\
+%description -n %{variantbase}%{?1:-%{1}}-debuginfo\
+This package provides debug information for package %{variantbase}%{?1:-%{1}}.\
+This is required to use SystemTap with %{variantbase}%{?1:-%{1}}-%{KVERREL}.\
%{expand:%%global debuginfo_args %{?debuginfo_args} -p '/.*/%%{KVERREL}%{?1:-?%{1}}(-%%{_target_cpu})?/.*|/.*%%{KVERREL}%{?1}' -o debuginfo%{?1}.list}\
%{nil}
@@ -952,7 +980,7 @@
# %%kernel_devel_package <subpackage> <pretty-name>
#
%define kernel_devel_package() \
-%package %{?1:%{1}-}devel\
+%package -n %{variantbase}-%{?1:%{1}-}devel\
Summary: Development package for building kernel modules to match the %{?2:%{2} }kernel\
Group: System Environment/Kernel\
Provides: kernel%{?1:-%{1}}-devel-%{_target_cpu} = %{rpmversion}-%{release}\
@@ -960,7 +988,7 @@
Provides: kernel-devel = %{rpmversion}-%{release}%{?1}\
AutoReqProv: no\
Requires(pre): /usr/bin/find\
-%description -n kernel%{?variant}%{?1:-%{1}}-devel\
+%description -n %{variantbase}%{?1:-%{1}}-devel\
This package provides kernel headers and makefiles sufficient to build modules\
against the %{?2:%{2} }kernel package.\
%{nil}
@@ -971,7 +999,7 @@
# %%kernel_variant_package [-n <pretty-name>] <subpackage>
#
%define kernel_variant_package(n:) \
-%package %1\
+%package -n %{variantbase}-%1\
Summary: %{variant_summary}\
Group: System Environment/Kernel\
%kernel_reqprovconf\
@@ -989,7 +1017,7 @@
%define variant_summary The Linux kernel compiled for SMP machines
%kernel_variant_package -n SMP smp
-%description smp
+%description -n %{variantbase}-smp
This package includes a SMP version of the Linux kernel. It is
required only on machines with two or more CPUs as well as machines with
hyperthreading technology.
@@ -999,7 +1027,7 @@
%define variant_summary The Linux kernel compiled for PAE capable machines
%kernel_variant_package PAE
-%description PAE
+%description -n %{variantbase}-PAE
This package includes a version of the Linux kernel with support for up to
64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
The non-PAE kernel can only address up to 4GB of memory.
@@ -1008,7 +1036,7 @@
%define variant_summary The Linux kernel compiled with extra debugging enabled for PAE capable machines
%kernel_variant_package PAE-debug
-%description PAE-debug
+%description -n %{variantbase}-PAE-debug
This package includes a version of the Linux kernel with support for up to
64GB of high memory. It requires a CPU with Physical Address Extensions (PAE).
The non-PAE kernel can only address up to 4GB of memory.
@@ -1021,7 +1049,7 @@
%define variant_summary The Linux kernel compiled with extra debugging enabled
%kernel_variant_package debug
-%description debug
+%description -n %{variantbase}-debug
The kernel package contains the Linux kernel (vmlinuz), the core of any
Linux operating system. The kernel handles the basic functions
of the operating system: memory allocation, process allocation, device
@@ -1034,14 +1062,14 @@
%define variant_summary The Linux kernel compiled for Xen VM operations
%kernel_variant_package -n Xen xen
-%description xen
-This package includes a version of the Linux kernel which
+%description -n %{variantbase}-xen
+This package includes version of the Linux kernel which
runs in a Xen VM. It works for both privileged and unprivileged guests.
%define variant_summary A minimal Linux kernel compiled for crash dumps
%kernel_variant_package kdump
-%description kdump
+%description -n %{variantbase}-kdump
This package includes a kdump version of the Linux kernel. It is
required only on machines which will use the kexec-based kernel crash dump
mechanism.
@@ -1070,6 +1098,22 @@
%endif
%endif
+# If the package has a variantbase set, the up (no variant suffix) packages would
+# be inconsistent (sometimes using %%{mainpkgname}, other using %%{variantbase})
+#
+# As we only use variantbase on the kernel-xen package (that has with_up
+# disabled), it is better to not support it than making the spec file
+# more complex by adding magic to allow generating separated %%package sessions
+# if necessary (the up variant has no %%package session because it has
+# no subpackage suffix, but it uses the %%post and %%files section generation
+# macros).
+%if "%{mainpkgname}"!="%{variantbase}" && %{with_up}
+echo "Setting %%{variantbase}!=%%{mainpkgname} is not support when building up kernels"
+exit 1
+%endif
+
+
+
# First we unpack the kernel tarball.
# If this isn't the first make prep, we use links to the existing clean tarball
@@ -1095,7 +1139,7 @@
cd linux-%{kversion}.%{_target_cpu}
-%if 0%{preconfigured}
+%if 0%{?preconfigured}
cp $RPM_SOURCE_DIR/kernel-%{kversion}*.config .
%else
# Drop some necessary files from the source dir into the buildroot
@@ -1953,7 +1997,7 @@
%if %{with_debuginfo}
%ifnarch noarch
%global __debug_package 1
-%files -f debugfiles.list debuginfo-common
+%files -f debugfiles.list -n %{mainpkgname}-debuginfo-common
%defattr(-,root,root)
%endif
%endif
@@ -2032,7 +2076,7 @@
# %%kernel_devel_post <subpackage>
#
%define kernel_devel_post() \
-%{expand:%%post %{?1:%{1}-}devel}\
+%{expand:%%post -n %{variantbase}-%{?1:%{1}-}devel}\
if [ -f /etc/sysconfig/kernel ]\
then\
. /etc/sysconfig/kernel || exit $?\
@@ -2052,18 +2096,20 @@
# More text can follow to go at the end of this variant's %%post.
#
%define kernel_variant_post(s:r:v:) \
+%if %{1}\
%{expand:%%kernel_devel_post %{?-v*}}\
-%{expand:%%post %{?-v*}}\
+%{expand:%%post -n %{variantbase}%{?-v:-%{-v*}}}\
%{-s:\
if [ `uname -i` == "x86_64" -o `uname -i` == "i386" ] &&\
[ -f /etc/sysconfig/kernel ]; then\
/bin/sed -i -e 's/^DEFAULTKERNEL=%{-s*}$/DEFAULTKERNEL=%{-r*}/' /etc/sysconfig/kernel || exit $?\
fi}\
-/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --depmod --install %{?1} %{KVERREL}%{?-v*} || exit $?\
+/sbin/new-kernel-pkg --package kernel%{?-v:-%{-v*}} --mkinitrd --depmod --install %{?2} %{KVERREL}%{?-v*} || exit $?\
#if [ -x /sbin/weak-modules ]\
#then\
# /sbin/weak-modules --add-kernel %{KVERREL}%{?-v*} || exit $?\
#fi\
+%endif\
%{nil}
#
@@ -2071,31 +2117,33 @@
# %%kernel_variant_preun <subpackage>
#
%define kernel_variant_preun() \
-%{expand:%%preun %{?1}}\
-/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}%{?1} || exit $?\
+%if %{1}\
+%{expand:%%preun -n %{variantbase}%{?2:-%{2}}}\
+/sbin/new-kernel-pkg --rminitrd --rmmoddep --remove %{KVERREL}%{?2} || exit $?\
#if [ -x /sbin/weak-modules ]\
#then\
-# /sbin/weak-modules --remove-kernel %{KVERREL}%{?1} || exit $?\
+# /sbin/weak-modules --remove-kernel %{KVERREL}%{?2} || exit $?\
#fi\
+%endif\
%{nil}
-%kernel_variant_preun
-%kernel_variant_post -s kernel-smp -r kernel
+%kernel_variant_preun %{with_up}
+%kernel_variant_post %{with_up} -s kernel-smp -r kernel
-%kernel_variant_preun smp
-%kernel_variant_post -v smp
+%kernel_variant_preun %{with_smp} smp
+%kernel_variant_post %{with_smp} -v smp
-%kernel_variant_preun PAE
-%kernel_variant_post -v PAE -s kernel-smp -r kernel-PAE
+%kernel_variant_preun %{with_pae} PAE
+%kernel_variant_post %{with_pae} -v PAE -s kernel-smp -r kernel-PAE
-%kernel_variant_preun debug
-%kernel_variant_post -v debug
+%kernel_variant_preun %{with_debug} debug
+%kernel_variant_post %{with_debug} -v debug
-%kernel_variant_post -v PAE-debug -s kernel-smp -r kernel-PAE-debug
-%kernel_variant_preun PAE-debug
+%kernel_variant_preun %{with_pae_debug} PAE-debug
+%kernel_variant_post %{with_pae_debug} -v PAE-debug -s kernel-smp -r kernel-PAE-debug
-%kernel_variant_preun xen
-%kernel_variant_post xen -v xen -s kernel-xen[0U] -r kernel-xen -- `[ -d /proc/xen -a ! -e /proc/xen/xsd_kva ] || echo --multiboot=/%{image_install_path}/xen.gz-%{KVERREL}`
+%kernel_variant_preun %{with_xen} xen
+%kernel_variant_post %{with_xen} xen -v xen -s kernel-xen[0U] -r kernel-xen -- `[ -d /proc/xen -a ! -e /proc/xen/xsd_kva ] || echo --multiboot=/%{image_install_path}/xen.gz-%{KVERREL}`
if [ -x /sbin/ldconfig ]
then
/sbin/ldconfig -X || exit $?
@@ -2106,14 +2154,14 @@
###
%if %{with_headers}
-%files headers
+%files -n %{mainpkgname}-headers
%defattr(-,root,root)
/usr/include/*
%endif
# only some architecture builds need kernel-doc
%if %{with_doc}
-%files doc
+%files -n %{mainpkgname}-doc
%defattr(-,root,root)
%{_datadir}/doc/kernel-doc-%{kversion}/Documentation/*
%dir %{_datadir}/doc/kernel-doc-%{kversion}/Documentation
@@ -2131,7 +2179,7 @@
#
%define kernel_variant_files(a:e:k:) \
%if %{1}\
-%{expand:%%files %{?2}}\
+%{expand:%%files -n %{variantbase}%{?2:-%{2}}}\
%defattr(-,root,root)\
/%{image_install_path}/%{?-k:%{-k*}}%{!?-k:vmlinuz}-%{KVERREL}%{?2}\
/boot/System.map-%{KVERREL}%{?2}\
- Previous message (by thread): rpms/VLGothic-fonts/devel 59-VLGothic-monospace.conf, NONE, 1.1 59-VLGothic-sans.conf, NONE, 1.1 VLGothic-fonts.spec, 1.7, 1.8 sources, 1.6, 1.7 30-VLGothic.conf, 1.2, NONE
- Next message (by thread): rpms/kernel/F-7 kernel-2.6.spec, 1.3357, 1.3358 linux-2.6-wireless-fixes.patch, 1.1, 1.2
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the fedora-extras-commits
mailing list