2008-07-18 12:15:21 +02:00
|
|
|
#
|
2009-08-01 11:17:24 +02:00
|
|
|
# spec file for package kernel-kdump (Version 2.6.31)
|
2008-07-18 12:15:21 +02:00
|
|
|
#
|
2009-01-10 14:03:47 +01:00
|
|
|
# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-07-18 12:15:21 +02:00
|
|
|
#
|
2008-10-08 11:08:56 +02:00
|
|
|
# All modifications and additions to the file contributed by third parties
|
|
|
|
# remain the property of their copyright owners, unless otherwise agreed
|
|
|
|
# upon. The license for this file, and modifications and additions to the
|
|
|
|
# file, is the same license as for the pristine package itself (unless the
|
|
|
|
# license for the pristine package is not an Open Source License, in which
|
|
|
|
# case the license is the MIT License). An "Open Source License" is a
|
|
|
|
# license that conforms to the Open Source Definition (Version 1.9)
|
|
|
|
# published by the Open Source Initiative.
|
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
2009-08-01 11:17:24 +02:00
|
|
|
%define srcversion 2.6.30
|
2009-09-01 22:04:03 +02:00
|
|
|
%define patchversion 2.6.31-rc8
|
2009-08-01 11:17:24 +02:00
|
|
|
%define variant %{nil}
|
|
|
|
%include %_sourcedir/kernel-spec-macros
|
2009-05-20 10:59:36 +02:00
|
|
|
%define build_flavor kdump
|
|
|
|
%define build_kdump (%build_flavor == "kdump")
|
|
|
|
%define build_xen (%build_flavor == "xen")
|
|
|
|
%define build_vanilla (%build_flavor == "vanilla")
|
|
|
|
%define build_ps3 (%build_flavor == "ps3")
|
|
|
|
%define build_src_dir %my_builddir/linux-%srcversion
|
|
|
|
%define src_install_dir /usr/src/linux-%kernelrelease%variant
|
|
|
|
%define obj_install_dir %src_install_dir-obj
|
|
|
|
%define rpm_install_dir %buildroot%obj_install_dir
|
|
|
|
%define kernel_build_dir %my_builddir/linux-obj
|
2009-08-01 11:17:24 +02:00
|
|
|
%(chmod +x %_sourcedir/{arch-symbols,find-provides,guards,check-for-config-changes,check-supported-list,built-in-where,modversions,symsets.pl,split-modules})
|
|
|
|
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
|
|
|
|
%define cpu_arch_flavor %cpu_arch/%build_flavor
|
2008-09-30 00:24:12 +02:00
|
|
|
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
|
|
|
|
# defining them all at once.)
|
2009-08-07 16:06:37 +02:00
|
|
|
%define config_vars CONFIG_MODULES CONFIG_KMSG_IDS CONFIG_SPLIT_PACKAGE CONFIG_ENTERPRISE_SUPPORT
|
2008-11-11 15:45:48 +01:00
|
|
|
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
|
2009-08-07 16:06:37 +02:00
|
|
|
%define split_base (%CONFIG_SPLIT_PACKAGE == "y")
|
|
|
|
%define split_extra (%CONFIG_SPLIT_PACKAGE == "y" && %CONFIG_ENTERPRISE_SUPPORT == "y")
|
2008-11-08 19:28:50 +01:00
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
%define install_vdso 1
|
|
|
|
%else
|
|
|
|
%define install_vdso 0
|
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
Name: kernel-kdump
|
2008-10-08 11:08:56 +02:00
|
|
|
Summary: kernel for kdump
|
2009-08-01 11:17:24 +02:00
|
|
|
Version: 2.6.31
|
2009-09-01 22:04:03 +02:00
|
|
|
Release: 5
|
2009-05-20 10:59:36 +02:00
|
|
|
%if %using_buildservice
|
|
|
|
%else
|
|
|
|
%endif
|
2008-10-08 11:08:56 +02:00
|
|
|
License: GPL v2 only
|
2008-07-18 12:15:21 +02:00
|
|
|
Group: System/Kernel
|
|
|
|
Url: http://www.kernel.org/
|
|
|
|
AutoReqProv: on
|
2008-09-29 18:18:36 +02:00
|
|
|
BuildRequires: coreutils module-init-tools sparse
|
|
|
|
BuildRequires: fdupes
|
2009-05-20 10:59:36 +02:00
|
|
|
Provides: %{name}_%_target_cpu = %version-%release
|
2009-08-07 16:06:37 +02:00
|
|
|
%if %split_base
|
2009-08-18 12:35:53 +02:00
|
|
|
Provides: kernel-base = %version-%source_rel
|
2009-08-26 22:31:04 +02:00
|
|
|
# 2.6.30-1 was the last package with split -base
|
|
|
|
Obsoletes: %name-base <= 2.6.30-1
|
2008-09-30 00:24:12 +02:00
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
Requires(pre): coreutils awk
|
|
|
|
Requires(post): module-init-tools
|
|
|
|
# This Requires is wrong, because the post/postun scripts have a
|
|
|
|
# test -x update-bootloader, having perl-Bootloader is not a hard requirement.
|
|
|
|
# But, there is no way to tell rpm or yast to schedule the installation
|
|
|
|
# of perl-Bootloader before kernel-binary.rpm if both are in the list of
|
|
|
|
# packages to install/update. Likewise, this is true for mkinitrd.
|
|
|
|
# A specific version of perl-Bootloader is not required, because the post/postun
|
|
|
|
# scripts handle the two API versions of 10.1/SLES10 GA and 10.2/SLES10 SP1
|
|
|
|
Requires(post): perl-Bootloader
|
|
|
|
Requires(post): mkinitrd
|
|
|
|
#!BuildIgnore: perl-Bootloader mkinitrd
|
|
|
|
%ifarch ia64
|
|
|
|
# arch/ia64/scripts/unwcheck.py
|
|
|
|
BuildRequires: python
|
|
|
|
%endif
|
2008-11-21 17:05:19 +01:00
|
|
|
%ifarch s390 s390x
|
|
|
|
BuildRequires: dwarfextract
|
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
%if %build_xen
|
|
|
|
%ifarch %ix86
|
2009-05-20 10:59:36 +02:00
|
|
|
Provides: kernel-xenpae = %version
|
|
|
|
Obsoletes: kernel-xenpae <= %version
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
|
|
|
#!BuildIgnore: xen
|
|
|
|
%endif
|
2009-05-20 10:59:36 +02:00
|
|
|
Provides: %name-nongpl
|
|
|
|
Obsoletes: %name-nongpl
|
2008-07-18 12:15:21 +02:00
|
|
|
%if %build_vanilla
|
|
|
|
# force bzip2 instead of lzma compression to allow install on older dist versions
|
|
|
|
%define _binary_payload w9.bzdio
|
|
|
|
%endif
|
|
|
|
# dead network if installed on SLES10, otherwise it will work (mostly)
|
2008-10-08 11:08:56 +02:00
|
|
|
Conflicts: sysfsutils < 2.0
|
2008-07-18 12:15:21 +02:00
|
|
|
%if ! %build_vanilla
|
2008-10-08 11:08:56 +02:00
|
|
|
Conflicts: apparmor-profiles <= 2.1
|
|
|
|
Conflicts: apparmor-parser < 2.3
|
2008-07-18 12:15:21 +02:00
|
|
|
# root-lvm only works with newer udevs
|
|
|
|
Conflicts: udev < 118
|
|
|
|
Conflicts: lvm2 < 2.02.33
|
|
|
|
%endif
|
|
|
|
%ifarch %ix86
|
2008-10-08 11:08:56 +02:00
|
|
|
Conflicts: libc.so.6()(64bit)
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
2009-05-20 10:59:36 +02:00
|
|
|
Provides: kernel = %version-%source_rel
|
|
|
|
Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-%srcversion.tar.bz2
|
2008-10-14 18:16:00 +02:00
|
|
|
Source10: preun.sh
|
2008-10-08 11:08:56 +02:00
|
|
|
Source11: postun.sh
|
2008-10-14 18:16:00 +02:00
|
|
|
Source12: pre.sh
|
|
|
|
Source13: post.sh
|
2008-10-08 11:08:56 +02:00
|
|
|
Source20: series.conf
|
|
|
|
Source22: supported.conf
|
|
|
|
Source30: arch-symbols
|
|
|
|
Source31: guards
|
|
|
|
Source33: check-for-config-changes
|
|
|
|
Source34: check-supported-list
|
2009-05-20 10:59:36 +02:00
|
|
|
Source40: source-timestamp
|
2008-10-08 11:08:56 +02:00
|
|
|
Source41: built-in-where
|
2008-10-28 00:21:37 +01:00
|
|
|
Source44: find-provides
|
2008-10-08 11:08:56 +02:00
|
|
|
Source46: modversions
|
2008-11-23 08:54:06 +01:00
|
|
|
Source47: symsets.pl
|
2009-07-21 12:14:09 +02:00
|
|
|
Source48: split-modules
|
2009-08-07 16:06:37 +02:00
|
|
|
Source49: kernel-spec-macros
|
2008-10-08 11:08:56 +02:00
|
|
|
Source100: config.tar.bz2
|
|
|
|
Source101: patches.arch.tar.bz2
|
|
|
|
Source102: patches.drivers.tar.bz2
|
|
|
|
Source103: patches.fixes.tar.bz2
|
|
|
|
Source104: patches.rpmify.tar.bz2
|
|
|
|
Source105: patches.suse.tar.bz2
|
|
|
|
Source107: patches.xen.tar.bz2
|
|
|
|
Source108: patches.addon.tar.bz2
|
|
|
|
Source109: patches.kernel.org.tar.bz2
|
|
|
|
Source110: patches.apparmor.tar.bz2
|
|
|
|
Source111: patches.rt.tar.bz2
|
|
|
|
Source112: patches.trace.tar.bz2
|
2009-02-03 23:53:27 +01:00
|
|
|
Source113: patches.kabi.tar.bz2
|
2008-10-08 11:08:56 +02:00
|
|
|
Source120: kabi.tar.bz2
|
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
|
|
|
ExclusiveArch: ppc ppc64
|
2008-07-18 12:15:21 +02:00
|
|
|
# These files are found in the kernel-source package:
|
2008-10-08 11:08:56 +02:00
|
|
|
NoSource: 0
|
|
|
|
NoSource: 100
|
|
|
|
NoSource: 101
|
|
|
|
NoSource: 102
|
|
|
|
NoSource: 103
|
|
|
|
NoSource: 104
|
|
|
|
NoSource: 105
|
|
|
|
NoSource: 107
|
|
|
|
NoSource: 108
|
|
|
|
NoSource: 109
|
|
|
|
NoSource: 110
|
|
|
|
NoSource: 111
|
|
|
|
NoSource: 120
|
2008-07-18 12:15:21 +02:00
|
|
|
# The following KMPs have been integrated into the kernel package.
|
2009-07-21 12:14:09 +02:00
|
|
|
# sles10 / 10.3
|
2008-10-08 11:08:56 +02:00
|
|
|
Obsoletes: iwlwifi-kmp
|
|
|
|
Obsoletes: ipw3945-kmp
|
2009-07-21 12:14:09 +02:00
|
|
|
# sles10 / 11.0
|
|
|
|
Obsoletes: uvcvideo-kmp
|
|
|
|
# 10.3
|
2008-10-08 11:08:56 +02:00
|
|
|
Obsoletes: adm8211-kmp
|
|
|
|
Obsoletes: rt2x00-kmp
|
|
|
|
Obsoletes: rfswitch-kmp
|
2009-07-21 12:14:09 +02:00
|
|
|
# 11.0
|
2008-10-12 00:19:34 +02:00
|
|
|
Obsoletes: atl2-kmp
|
2008-10-13 23:31:54 +02:00
|
|
|
Obsoletes: wlan-ng-kmp
|
2008-10-14 18:16:00 +02:00
|
|
|
Obsoletes: et131x-kmp
|
|
|
|
Obsoletes: ivtv-kmp
|
|
|
|
Obsoletes: at76_usb-kmp
|
|
|
|
Obsoletes: pcc-acpi-kmp
|
2009-07-21 12:14:09 +02:00
|
|
|
Obsoletes: btusb-kmp
|
2008-07-18 12:15:21 +02:00
|
|
|
# Provide the exported symbols as "ksym(symbol) = hash"
|
2009-07-09 04:41:55 +02:00
|
|
|
%define __find_provides %_sourcedir/find-provides %name
|
2008-07-18 12:15:21 +02:00
|
|
|
# Will modules not listed in supported.conf abort the kernel build (0/1)?
|
|
|
|
%define supported_modules_check 0
|
|
|
|
# kABI change tolerance (default in maintenance should be 4, 6, 8 or 15,
|
|
|
|
# 31 is the maximum; see scripts/kabi-checks)
|
2009-02-03 23:53:27 +01:00
|
|
|
%define tolerate_kabi_changes 6
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
%description
|
2008-10-08 11:08:56 +02:00
|
|
|
This kernel is intended for kdump. It can not be booted with a normal
|
|
|
|
bootloader, the kexec tool has to be used to load it. Once the system
|
|
|
|
crashes, the loaded kernel will be started to grab debug info from the
|
|
|
|
crashed kernel.
|
|
|
|
|
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%source_timestamp
|
2008-07-18 12:15:21 +02:00
|
|
|
%prep
|
2009-05-20 10:59:36 +02:00
|
|
|
if ! [ -e %_sourcedir/linux-%srcversion.tar.bz2 ]; then
|
|
|
|
echo "The %name-%version.nosrc.rpm package does not contain the" \
|
|
|
|
"complete sources. Please install kernel-source-%version.src.rpm."
|
2008-07-18 12:15:21 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
2009-08-01 11:17:24 +02:00
|
|
|
SYMBOLS=%name
|
|
|
|
if test -e %_sourcedir/extra-symbols; then
|
|
|
|
SYMBOLS="$SYMBOLS $(cat %_sourcedir/extra-symbols)"
|
|
|
|
fi
|
|
|
|
echo "Symbol(s):" $SYMBOLS
|
2008-07-18 12:15:21 +02:00
|
|
|
# Unpack all sources and patches
|
2009-02-03 23:53:27 +01:00
|
|
|
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 113 -a 120
|
2009-05-20 10:59:36 +02:00
|
|
|
mkdir -p %kernel_build_dir
|
2008-09-29 18:18:36 +02:00
|
|
|
supported_conf() {
|
2009-08-01 11:17:24 +02:00
|
|
|
%_sourcedir/guards $* < %_sourcedir/supported.conf | \
|
2009-07-21 12:14:09 +02:00
|
|
|
sed 's,.*/,,; s,\.ko$,,' | sort -u
|
2008-09-29 18:18:36 +02:00
|
|
|
}
|
|
|
|
# Generate the list of modules to be marked as supported
|
2008-09-30 00:24:12 +02:00
|
|
|
{ supported_conf base
|
2009-07-21 12:14:09 +02:00
|
|
|
supported_conf --default=0 external | sed 's/$/ external/'
|
|
|
|
} > %kernel_build_dir/Module.supported
|
|
|
|
supported_conf --default=0 base >%kernel_build_dir/Module.base
|
2009-05-20 10:59:36 +02:00
|
|
|
cd linux-%srcversion
|
2009-07-09 04:41:55 +02:00
|
|
|
# Apply patches
|
|
|
|
echo "trap 'echo \"*** patch \$_ failed ***\"' ERR" >../apply-patches.sh
|
2009-08-01 11:17:24 +02:00
|
|
|
%_sourcedir/guards $SYMBOLS <%_sourcedir/series.conf | \
|
2009-07-09 04:41:55 +02:00
|
|
|
%if %build_vanilla
|
|
|
|
egrep '^patches\.(kernel\.org|rpmify)/' | \
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
2009-07-09 04:41:55 +02:00
|
|
|
sed 's:^:patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../:' \
|
|
|
|
>>../apply-patches.sh
|
|
|
|
bash -ex ../apply-patches.sh
|
2009-05-20 10:59:36 +02:00
|
|
|
cd %kernel_build_dir
|
2008-07-18 12:15:21 +02:00
|
|
|
if [ -f %_sourcedir/localversion ] ; then
|
|
|
|
cat %_sourcedir/localversion > localversion
|
|
|
|
fi
|
2009-08-01 11:17:24 +02:00
|
|
|
cp ../config/%cpu_arch_flavor .config
|
|
|
|
%build_src_dir/scripts/config \
|
|
|
|
--set-str CONFIG_LOCALVERSION -%release_major-%build_flavor \
|
|
|
|
--enable CONFIG_SUSE_KERNEL \
|
2008-07-18 12:15:21 +02:00
|
|
|
%if 0%{?__debug_package:1}
|
2009-08-01 11:17:24 +02:00
|
|
|
--enable CONFIG_DEBUG_INFO
|
|
|
|
%else
|
|
|
|
--disable CONFIG_DEBUG_INFO
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
2009-05-20 10:59:36 +02:00
|
|
|
MAKE_ARGS="$MAKE_ARGS -C %build_src_dir O=$PWD"
|
|
|
|
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
|
|
|
|
yes '' | make oldconfig $MAKE_ARGS
|
|
|
|
else
|
|
|
|
cp .config .config.orig
|
|
|
|
make silentoldconfig $MAKE_ARGS < /dev/null
|
|
|
|
%_sourcedir/check-for-config-changes .config.orig .config
|
|
|
|
rm .config.orig
|
|
|
|
fi
|
2008-07-18 12:15:21 +02:00
|
|
|
make prepare $MAKE_ARGS
|
2009-05-20 10:59:36 +02:00
|
|
|
make scripts $MAKE_ARGS
|
2008-07-18 12:15:21 +02:00
|
|
|
krel=$(make -s kernelrelease $MAKE_ARGS)
|
2009-05-20 10:59:36 +02:00
|
|
|
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
|
|
|
|
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
|
2008-07-18 12:15:21 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
2009-05-20 10:59:36 +02:00
|
|
|
make clean $MAKE_ARGS
|
|
|
|
rm -f source
|
|
|
|
find . ! -type d -printf '%%P\n' > %my_builddir/obj-files
|
2008-07-18 12:15:21 +02:00
|
|
|
cat > .kernel-binary.spec.buildenv <<EOF
|
|
|
|
# Override the timestamp 'uname -v' reports with the build
|
|
|
|
# timestamp.
|
2009-05-20 10:59:36 +02:00
|
|
|
export KBUILD_BUILD_VERSION="$(grep SHA1_ID %_sourcedir/source-timestamp | awk '{ print $2 }')"
|
|
|
|
export KBUILD_BUILD_TIMESTAMP="$(head -n 1 %_sourcedir/source-timestamp)"
|
2008-07-18 12:15:21 +02:00
|
|
|
# The following branch/timestamp will end up in Oopses.
|
|
|
|
export OOPS_TIMESTAMP="$(
|
2008-11-23 08:54:06 +01:00
|
|
|
echo -n $(sed -ne 's/^GIT Branch: \(.*\)/\1-/p' \
|
2009-05-20 10:59:36 +02:00
|
|
|
%_sourcedir/source-timestamp)
|
|
|
|
head -n 1 %_sourcedir/source-timestamp \
|
2008-07-18 12:15:21 +02:00
|
|
|
| tr -dc 0-9)"
|
|
|
|
export KBUILD_VERBOSE=0
|
|
|
|
export KBUILD_SYMTYPES=1
|
2009-02-03 23:53:27 +01:00
|
|
|
export KBUILD_OVERRIDE=1
|
2008-07-18 12:15:21 +02:00
|
|
|
EOF
|
2009-05-20 10:59:36 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
cd %kernel_build_dir
|
2008-07-18 12:15:21 +02:00
|
|
|
source .kernel-binary.spec.buildenv
|
2009-07-09 04:41:55 +02:00
|
|
|
# create *.symref files in the tree
|
|
|
|
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
|
|
|
|
%_sourcedir/modversions --unpack . < $_
|
|
|
|
fi
|
2009-08-18 12:35:53 +02:00
|
|
|
# If the %jobs macro is defined to a number, make will spawn that many jobs.
|
|
|
|
# There are several ways how to define it:
|
|
|
|
# If you are using the build script:
|
|
|
|
# build --jobs=N kernel-$flavor.spec
|
|
|
|
# With plain rpmbuild:
|
|
|
|
# rpmbuild -ba --define 'jobs N' kernel-$flavor.spec
|
|
|
|
# To spawn as many jobs as there are cpu cores:
|
|
|
|
# rpmbuild -ba --define "jobs 0$(grep -c ^processor /proc/cpuinfo)" \
|
|
|
|
# kernel-$flavor.spec
|
|
|
|
# You can also set this permanently in ~/.rpmmacros:
|
|
|
|
# %jobs 0%(grep -c ^processor /proc/cpuinfo)
|
2009-02-03 23:53:27 +01:00
|
|
|
%if %CONFIG_KMSG_IDS == "y"
|
2008-11-21 17:05:19 +01:00
|
|
|
chmod +x scripts/kmsg-doc
|
|
|
|
make %{?jobs:-j%jobs} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y D=2
|
|
|
|
%else
|
|
|
|
make %{?jobs:-j%jobs} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
|
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
# get rid of /usr/lib/rpm/brp-strip-debug
|
|
|
|
# strip removes too much from the vmlinux ELF binary
|
|
|
|
export NO_BRP_STRIP_DEBUG=true
|
2009-05-20 10:59:36 +02:00
|
|
|
# /lib/modules/%kernelrelease-%build_flavor/build will be a stale symlink until the
|
2008-07-18 12:15:21 +02:00
|
|
|
# kernel-source package is installed. Don't check for stale symlinks
|
|
|
|
# in the brp-symlink check:
|
|
|
|
export NO_BRP_STALE_LINK_ERROR=yes
|
2009-05-20 10:59:36 +02:00
|
|
|
cd %kernel_build_dir
|
|
|
|
mkdir -p %buildroot/boot
|
2008-07-18 12:15:21 +02:00
|
|
|
# (Could strip out non-public symbols.)
|
2009-05-20 10:59:36 +02:00
|
|
|
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
|
2009-08-18 12:35:53 +02:00
|
|
|
%define extract_vmlinux_debuginfo 0
|
|
|
|
%if 0%{?__debug_package:1}
|
|
|
|
%ifnarch ppc ppc64
|
|
|
|
%define extract_vmlinux_debuginfo 1
|
|
|
|
%endif
|
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
add_vmlinux()
|
|
|
|
{
|
2009-05-20 10:59:36 +02:00
|
|
|
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor
|
2009-08-18 12:35:53 +02:00
|
|
|
%if %extract_vmlinux_debuginfo
|
2008-07-18 12:15:21 +02:00
|
|
|
local vmlinux_debug=usr/lib/debug/$vmlinux.debug
|
|
|
|
mkdir -p $(dirname %buildroot/$vmlinux_debug)
|
|
|
|
cp vmlinux %buildroot/$vmlinux
|
|
|
|
/usr/lib/rpm/debugedit -b $RPM_BUILD_DIR -d /usr/src/debug \
|
|
|
|
-l vmlinux.sourcefiles %buildroot/$vmlinux
|
2009-08-01 11:17:24 +02:00
|
|
|
# FIXME: create and package build-id symlinks
|
2008-07-18 12:15:21 +02:00
|
|
|
objcopy --only-keep-debug \
|
|
|
|
%buildroot/$vmlinux \
|
|
|
|
%buildroot/$vmlinux_debug || :
|
|
|
|
objcopy --add-gnu-debuglink=%buildroot/$vmlinux_debug \
|
|
|
|
--strip-debug \
|
|
|
|
%buildroot/$vmlinux || :
|
|
|
|
mkdir -p %buildroot/usr/src/debug
|
2009-07-21 12:14:09 +02:00
|
|
|
LANG=C sort -z -u vmlinux.sourcefiles | grep -Ezv "<(built-in|stdin)>" \
|
2008-07-18 12:15:21 +02:00
|
|
|
| ( cd %_builddir && cpio -pd0m %buildroot/usr/src/debug )
|
|
|
|
find %buildroot/usr/src/debug -type d -print0 | xargs -0 -r chmod 0755
|
|
|
|
find %buildroot/usr/src/debug -type f -print0 | xargs -0 -r chmod 0644
|
2009-08-01 11:17:24 +02:00
|
|
|
echo -e "%%defattr(-, root, root)\\n/$vmlinux_debug" >%my_builddir/vmlinux.debug.files
|
2008-07-18 12:15:21 +02:00
|
|
|
%else
|
|
|
|
cp vmlinux %buildroot/$vmlinux
|
|
|
|
%endif
|
|
|
|
if [ "$1" = --compressed ]; then
|
|
|
|
gzip -9 %buildroot/$vmlinux
|
|
|
|
chmod a-x %buildroot/$vmlinux.gz
|
|
|
|
fi
|
|
|
|
}
|
|
|
|
%if %build_kdump
|
|
|
|
add_vmlinux
|
2009-05-20 10:59:36 +02:00
|
|
|
chmod 644 %buildroot/boot/vmlinux-%kernelrelease-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
image=vmlinux
|
|
|
|
%else
|
|
|
|
# architecture specifics
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
add_vmlinux --compressed
|
|
|
|
%if %build_xen
|
|
|
|
image=vmlinuz
|
|
|
|
%else
|
|
|
|
image=bzImage
|
|
|
|
%endif
|
2009-05-20 10:59:36 +02:00
|
|
|
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
image=vmlinuz
|
|
|
|
%endif
|
|
|
|
%ifarch alpha
|
|
|
|
add_vmlinux --compressed
|
2009-05-20 10:59:36 +02:00
|
|
|
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
image=vmlinuz
|
|
|
|
%endif
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
add_vmlinux
|
2009-05-20 10:59:36 +02:00
|
|
|
chmod 644 %buildroot/boot/vmlinux-%kernelrelease-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
image=vmlinux
|
|
|
|
%endif
|
|
|
|
%ifarch ia64
|
|
|
|
add_vmlinux --compressed
|
2009-05-20 10:59:36 +02:00
|
|
|
mv %buildroot/boot/vmlinux-%kernelrelease-%build_flavor.gz \
|
|
|
|
%buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
image=vmlinuz
|
|
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
|
|
|
add_vmlinux --compressed
|
2009-05-20 10:59:36 +02:00
|
|
|
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
image=image
|
2008-11-21 17:05:19 +01:00
|
|
|
if [ -x "$(which dwarfextract 2>/dev/null)" ] ; then
|
2009-05-20 10:59:36 +02:00
|
|
|
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
|
2008-11-21 17:05:19 +01:00
|
|
|
fi
|
2009-02-03 23:53:27 +01:00
|
|
|
%if %CONFIG_KMSG_IDS == "y"
|
2008-11-21 17:05:19 +01:00
|
|
|
mkdir -p %buildroot/usr/share/man/man9
|
|
|
|
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
|
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
|
|
|
if [ -e init/kerntypes.o ]; then
|
2009-05-20 10:59:36 +02:00
|
|
|
cp init/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
fi
|
|
|
|
# end of build_kdump
|
|
|
|
%endif
|
2008-09-29 18:18:36 +02:00
|
|
|
for sub in '-base' '' '-extra'; do
|
2009-08-18 12:35:53 +02:00
|
|
|
case "$sub" in
|
|
|
|
'-base' | '') base_package=1 ;;
|
|
|
|
*) base_package=0 ;;
|
|
|
|
esac
|
2009-05-20 10:59:36 +02:00
|
|
|
for script in preun postun pre post devel-pre devel-post; do
|
|
|
|
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
|
2008-10-14 18:16:00 +02:00
|
|
|
-e "s:@IMAGE@:$image:g" \
|
2009-05-20 10:59:36 +02:00
|
|
|
-e "s:@FLAVOR""@:%build_flavor:g" \
|
|
|
|
-e "s:@SUBPACKAGE@:%name$sub:g" \
|
2008-10-14 18:16:00 +02:00
|
|
|
-e "s:@BASE_PACKAGE@:$base_package:g" \
|
|
|
|
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
|
2009-01-10 14:03:47 +01:00
|
|
|
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
|
2009-05-20 10:59:36 +02:00
|
|
|
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
|
|
|
|
-e "s:@SRCVARIANT@:%variant:g" \
|
|
|
|
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
|
2008-10-14 18:16:00 +02:00
|
|
|
done
|
2008-09-29 18:18:36 +02:00
|
|
|
done
|
2008-11-28 15:25:51 +01:00
|
|
|
%if %build_kdump || %build_xen || %build_vanilla || %build_ps3
|
|
|
|
# keep this -suffix list in sync with post.sh and postun.sh
|
2009-05-20 10:59:36 +02:00
|
|
|
suffix=-%build_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
|
|
|
ln -s $image$suffix %buildroot/boot/$image$suffix
|
|
|
|
ln -s initrd$suffix %buildroot/boot/initrd$suffix
|
2009-05-20 10:59:36 +02:00
|
|
|
cp .config %buildroot/boot/config-%kernelrelease-%build_flavor
|
2008-11-08 19:28:50 +01:00
|
|
|
%if %install_vdso
|
|
|
|
# Install the unstripped vdso's that are linked in the kernel image
|
|
|
|
make vdso_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
|
|
|
|
%endif
|
2008-11-28 15:25:51 +01:00
|
|
|
# Create a dummy initrd with roughly the size the real one will have.
|
|
|
|
# That way, YaST will know that this package requires some additional
|
|
|
|
# space in /boot.
|
2009-05-20 10:59:36 +02:00
|
|
|
dd if=/dev/zero of=%buildroot/boot/initrd-%kernelrelease-%build_flavor \
|
2008-11-28 15:25:51 +01:00
|
|
|
bs=1024 seek=2047 count=1
|
2009-05-20 10:59:36 +02:00
|
|
|
if [ %CONFIG_MODULES = y ]; then
|
|
|
|
mkdir -p %rpm_install_dir/%cpu_arch_flavor
|
|
|
|
mkdir -p %buildroot/usr/src/linux-obj/%cpu_arch
|
|
|
|
ln -s %build_flavor %buildroot/usr/src/linux-obj/%cpu_arch_flavor
|
2008-11-28 15:25:51 +01:00
|
|
|
# Figure out where the symbols that vmlinux exports are defined.
|
|
|
|
%_sourcedir/built-in-where < Module.symvers > Module.symvers.split
|
2009-05-20 10:59:36 +02:00
|
|
|
gzip -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
|
2008-09-29 18:18:36 +02:00
|
|
|
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
|
|
|
|
if ! %_sourcedir/check-supported-list \
|
2009-05-20 10:59:36 +02:00
|
|
|
%_sourcedir %buildroot/lib/modules/%kernelrelease-%build_flavor; then
|
2008-07-18 12:15:21 +02:00
|
|
|
%if %supported_modules_check
|
2008-09-29 18:18:36 +02:00
|
|
|
exit 1
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
2008-09-29 18:18:36 +02:00
|
|
|
echo "Consistency check error: please update supported.conf."
|
|
|
|
fi
|
2008-11-21 17:05:19 +01:00
|
|
|
%ifarch s390 s390x
|
|
|
|
if [ -x "$(which dwarfextract 2>/dev/null)" -a \
|
2009-05-20 10:59:36 +02:00
|
|
|
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor ] ; then
|
2008-11-21 17:05:19 +01:00
|
|
|
find %buildroot -name "*.ko" > kofiles.list
|
2009-05-20 10:59:36 +02:00
|
|
|
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list
|
2008-11-21 17:05:19 +01:00
|
|
|
fi
|
|
|
|
%endif
|
2009-05-20 10:59:36 +02:00
|
|
|
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
|
|
|
|
# so that kernel-source + kernel-%build_flavor is sufficient for building
|
2008-09-29 18:18:36 +02:00
|
|
|
# modules that have modversions as well.
|
2009-05-20 10:59:36 +02:00
|
|
|
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
|
|
|
|
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
|
2008-09-29 18:18:36 +02:00
|
|
|
# Table of types used in exported symbols (for modversion debugging).
|
2009-05-20 10:59:36 +02:00
|
|
|
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
|
|
|
|
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
|
|
|
|
gzip -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
|
2008-09-29 18:18:36 +02:00
|
|
|
else
|
2009-05-20 10:59:36 +02:00
|
|
|
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
|
2008-09-29 18:18:36 +02:00
|
|
|
fi
|
|
|
|
# Some architecture's $(uname -m) output is different from the ARCH
|
|
|
|
# parameter that needs to be passed to kbuild. Create symlinks from
|
|
|
|
# $(uname -m) to the ARCH directory.
|
2009-05-20 10:59:36 +02:00
|
|
|
if [ ! -e %rpm_install_dir/%_target_cpu ]; then
|
|
|
|
ln -sf %cpu_arch %rpm_install_dir/%_target_cpu
|
|
|
|
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%_target_cpu
|
|
|
|
fi
|
|
|
|
# We were building in %my_builddir/linux-%srcversion, but the sources will
|
|
|
|
# later be installed in /usr/src/linux-%srcversion-%source_rel. Fix up the
|
2008-09-29 18:18:36 +02:00
|
|
|
# build symlink.
|
2009-05-20 10:59:36 +02:00
|
|
|
rm -f %buildroot/lib/modules/%kernelrelease-%build_flavor/{source,build}
|
|
|
|
ln -s %src_install_dir \
|
|
|
|
%buildroot/lib/modules/%kernelrelease-%build_flavor/source
|
|
|
|
ln -s %obj_install_dir/%cpu_arch/%build_flavor \
|
|
|
|
%buildroot/lib/modules/%kernelrelease-%build_flavor/build
|
2008-09-29 18:18:36 +02:00
|
|
|
# Abort if there are any undefined symbols
|
2009-05-20 10:59:36 +02:00
|
|
|
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
|
|
|
|
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
|
2008-09-29 18:18:36 +02:00
|
|
|
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2009-08-07 16:06:37 +02:00
|
|
|
%if %split_base
|
2009-07-21 12:14:09 +02:00
|
|
|
%_sourcedir/split-modules -d %buildroot \
|
|
|
|
%if ! %supported_modules_check
|
|
|
|
-i \
|
|
|
|
%endif
|
|
|
|
-o %my_builddir \
|
|
|
|
-b %kernel_build_dir/Module.base \
|
|
|
|
-s %kernel_build_dir/Module.supported
|
2009-08-07 16:06:37 +02:00
|
|
|
%if ! %split_extra
|
|
|
|
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
|
|
|
|
%endif
|
2008-09-29 18:18:36 +02:00
|
|
|
%else
|
|
|
|
( cd %buildroot
|
2009-05-20 10:59:36 +02:00
|
|
|
find lib/modules/%kernelrelease-%build_flavor -type f -name '*.ko' -printf '/%%p\n'
|
2008-09-29 18:18:36 +02:00
|
|
|
) > %my_builddir/base-modules
|
2008-11-23 08:54:06 +01:00
|
|
|
%endif
|
2009-01-10 14:03:47 +01:00
|
|
|
# check for kabi changes
|
2009-07-21 12:14:09 +02:00
|
|
|
if [ -z "fixme-broken" ]; then
|
2009-01-10 14:03:47 +01:00
|
|
|
%_sourcedir/symsets.pl --check-kabi \
|
|
|
|
$reference \
|
2009-07-09 04:41:55 +02:00
|
|
|
--symvers=Module.symvers.split \
|
2009-01-10 14:03:47 +01:00
|
|
|
--modules=%my_builddir/base-modules-br \
|
|
|
|
--modules=%my_builddir/main-modules-br \
|
|
|
|
--modules=%my_builddir/unsupported-modules-br \
|
|
|
|
--commonsyms=%my_builddir/kabi/commonsyms \
|
|
|
|
--usedsyms=%my_builddir/kabi/usedsyms \
|
|
|
|
--severities=%my_builddir/kabi/severities \
|
2009-07-21 12:14:09 +02:00
|
|
|
--max-badness=%tolerate_kabi_changes
|
2009-01-10 14:03:47 +01:00
|
|
|
fi
|
2009-07-21 12:14:09 +02:00
|
|
|
if [ $? -ne 0 ]; then
|
2009-05-20 10:59:36 +02:00
|
|
|
if [ ! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
|
2008-11-23 08:54:06 +01:00
|
|
|
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
|
|
|
|
echo "Create a file IGNORE-KABI-BADNESS in the kernel-source" \
|
|
|
|
"directory to build this kernel even though its badness is" \
|
|
|
|
"higher than allowed for an official kernel."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
fi
|
2009-05-20 10:59:36 +02:00
|
|
|
tar cf - -T %my_builddir/obj-files | \
|
|
|
|
tar xf - -C %rpm_install_dir/%cpu_arch_flavor
|
2009-06-08 23:58:20 +02:00
|
|
|
# bnc#507084
|
|
|
|
find %rpm_install_dir/%cpu_arch_flavor/scripts -type f -perm -111 | \
|
|
|
|
while read f; do
|
|
|
|
case "$(file -b "$f")" in
|
|
|
|
ELF\ *\ executable*)
|
|
|
|
strip "$f"
|
|
|
|
esac
|
|
|
|
done
|
2009-05-20 10:59:36 +02:00
|
|
|
# Replace the absolute with a relative path
|
|
|
|
sed -i "s,%build_src_dir,../../../linux-%kernelrelease%variant,g" \
|
|
|
|
%rpm_install_dir/%cpu_arch_flavor/Makefile
|
2009-07-21 12:14:09 +02:00
|
|
|
link=%rpm_install_dir/%cpu_arch_flavor/include2/asm
|
|
|
|
target=$(readlink "$link")
|
2009-08-01 11:17:24 +02:00
|
|
|
target=${target#%build_src_dir/}
|
2009-07-21 12:14:09 +02:00
|
|
|
rm "$link"
|
|
|
|
ln -s ../../../../linux-%kernelrelease%variant/"$target" "$link"
|
2008-07-18 12:15:21 +02:00
|
|
|
fi
|
2008-09-29 18:18:36 +02:00
|
|
|
add_dirs_to_filelist() {
|
2009-07-21 12:14:09 +02:00
|
|
|
sed -rn '
|
|
|
|
# print file name
|
|
|
|
p
|
|
|
|
# remove filelist macros
|
|
|
|
s:%%%%[a-z]+(\([^)]+\))? ?::g
|
|
|
|
# add %%%%dir prefix
|
|
|
|
s:^:%%%%dir :
|
|
|
|
# print all parents
|
|
|
|
:a
|
|
|
|
# skip directories owned by other packages
|
|
|
|
s:^%%%%dir (/boot|/etc|/lib/(modules|firmware)|/usr/src)/[^/]+$::
|
|
|
|
s:/[^/]+$::p
|
|
|
|
ta
|
|
|
|
' "$@" | sort -u
|
2008-09-29 18:18:36 +02:00
|
|
|
}
|
|
|
|
# Collect the file lists.
|
2009-05-20 10:59:36 +02:00
|
|
|
shopt -s nullglob
|
|
|
|
> %my_builddir/kernel-devel.files
|
2009-07-09 04:41:55 +02:00
|
|
|
for file in %buildroot/boot/vmlinux-*.gz %buildroot/boot/symtypes* ; do
|
2009-05-20 10:59:36 +02:00
|
|
|
f=${file##%buildroot}
|
|
|
|
echo "$f" >> %my_builddir/kernel-devel.files
|
|
|
|
done
|
2008-09-30 00:24:12 +02:00
|
|
|
{ cd %buildroot
|
2009-05-20 10:59:36 +02:00
|
|
|
(find boot \
|
2008-09-29 18:18:36 +02:00
|
|
|
\( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \
|
2009-05-20 10:59:36 +02:00
|
|
|
-type f -printf '/%%p\n' ; cat %my_builddir/kernel-devel.files) | \
|
|
|
|
sort | uniq -u
|
2008-10-22 18:33:57 +02:00
|
|
|
# Add the auto-generated (by mkdumprd) kdump initrd to %ghost so that
|
|
|
|
# the file gets removed when uninstalling the kernel.
|
2009-05-20 10:59:36 +02:00
|
|
|
echo '%%%%ghost /boot/initrd-%kernelrelease-kdump'
|
|
|
|
touch $RPM_BUILD_ROOT/boot/initrd-%kernelrelease-kdump
|
|
|
|
if [ %CONFIG_MODULES = y ]; then
|
|
|
|
find lib/modules/%kernelrelease-%build_flavor \
|
2008-09-29 18:18:36 +02:00
|
|
|
-type d -o \
|
2009-07-09 04:41:55 +02:00
|
|
|
\( -path '*/modules.*' ! -path '*/modules.order' \
|
|
|
|
! -path '*/modules.builtin' \) -printf '%%%%%%%%ghost /%%p\n' \
|
|
|
|
-o -name '*.ko' -prune -o -printf '/%%p\n'
|
2008-09-29 18:18:36 +02:00
|
|
|
cat %my_builddir/base-modules
|
|
|
|
fi
|
2009-05-20 10:59:36 +02:00
|
|
|
test -d lib/firmware/%kernelrelease-%build_flavor && \
|
|
|
|
find lib/firmware/%kernelrelease-%build_flavor \
|
2008-09-29 18:18:36 +02:00
|
|
|
-type d -o \
|
2008-07-18 12:15:21 +02:00
|
|
|
-printf '/%%p\n'
|
|
|
|
if [ -e .%_docdir/%name ]; then
|
2008-09-29 18:18:36 +02:00
|
|
|
echo "%%%%doc %_docdir/%name"
|
2008-07-18 12:15:21 +02:00
|
|
|
fi
|
2008-09-30 00:24:12 +02:00
|
|
|
} | add_dirs_to_filelist > %my_builddir/kernel-base.files
|
2009-08-07 16:06:37 +02:00
|
|
|
%if %split_base
|
2009-08-18 12:35:53 +02:00
|
|
|
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules} \
|
|
|
|
> %my_builddir/kernel-main.files
|
2009-08-07 16:06:37 +02:00
|
|
|
%endif
|
|
|
|
%if %split_extra
|
2008-09-30 00:24:12 +02:00
|
|
|
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
|
2008-09-29 18:18:36 +02:00
|
|
|
%endif
|
2008-09-30 00:24:12 +02:00
|
|
|
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
|
2008-09-29 18:18:36 +02:00
|
|
|
# much, but it keeps rpmlint from breaking the package build.
|
|
|
|
%fdupes $RPM_BUILD_ROOT
|
2008-07-18 12:15:21 +02:00
|
|
|
|
2008-10-14 18:16:00 +02:00
|
|
|
%preun -f preun.sh
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
%postun -f postun.sh
|
2008-10-14 18:16:00 +02:00
|
|
|
|
|
|
|
%pre -f pre.sh
|
|
|
|
|
|
|
|
%post -f post.sh
|
2009-08-07 16:06:37 +02:00
|
|
|
%if %split_base
|
2008-10-08 11:08:56 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
%files -f kernel-main.files
|
|
|
|
%else
|
2008-10-08 11:08:56 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
%files -f kernel-base.files
|
|
|
|
%endif
|
2008-09-30 00:24:12 +02:00
|
|
|
%defattr(-, root, root)
|
2008-09-08 16:13:44 +02:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%package base
|
2008-10-08 11:08:56 +02:00
|
|
|
Summary: kernel for kdump - base modules
|
|
|
|
License: GPL v2 only
|
2008-09-29 18:18:36 +02:00
|
|
|
Group: System/Kernel
|
|
|
|
Url: http://www.kernel.org/
|
|
|
|
AutoReqProv: on
|
2009-07-09 04:41:55 +02:00
|
|
|
Provides: kernel-base = %version-%source_rel
|
2008-09-29 18:18:36 +02:00
|
|
|
Requires(pre): coreutils awk
|
|
|
|
Requires(post): module-init-tools
|
|
|
|
Requires(post): perl-Bootloader
|
|
|
|
Requires(post): mkinitrd
|
2008-11-08 19:28:50 +01:00
|
|
|
%ifarch %ix86
|
|
|
|
Conflicts: libc.so.6()(64bit)
|
|
|
|
%endif
|
2008-09-29 18:18:36 +02:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%description base
|
2008-10-08 11:08:56 +02:00
|
|
|
This kernel is intended for kdump. It can not be booted with a normal
|
|
|
|
bootloader, the kexec tool has to be used to load it. Once the system
|
|
|
|
crashes, the loaded kernel will be started to grab debug info from the
|
|
|
|
crashed kernel.
|
|
|
|
|
|
|
|
This package contains only the base modules, required in all installs.
|
|
|
|
|
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%source_timestamp
|
2008-10-14 18:16:00 +02:00
|
|
|
%preun base -f preun-base.sh
|
|
|
|
|
|
|
|
%postun base -f postun-base.sh
|
2008-09-29 18:18:36 +02:00
|
|
|
|
2008-10-14 18:16:00 +02:00
|
|
|
%pre base -f pre-base.sh
|
2008-09-29 18:18:36 +02:00
|
|
|
|
2008-10-14 18:16:00 +02:00
|
|
|
%post base -f post-base.sh
|
2009-08-07 16:06:37 +02:00
|
|
|
%if %split_base
|
2008-10-08 11:08:56 +02:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%files base -f kernel-base.files
|
2008-09-30 00:24:12 +02:00
|
|
|
%defattr(-, root, root)
|
2008-09-29 18:18:36 +02:00
|
|
|
%endif
|
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%package extra
|
2009-07-09 04:41:55 +02:00
|
|
|
Summary: kernel for kdump - Unsupported kernel modules
|
2008-10-08 11:08:56 +02:00
|
|
|
License: GPL v2 only
|
2008-09-29 18:18:36 +02:00
|
|
|
Group: System/Kernel
|
|
|
|
Url: http://www.kernel.org/
|
|
|
|
AutoReqProv: on
|
2009-05-20 10:59:36 +02:00
|
|
|
Provides: %name-extra_%_target_cpu = %version-%release
|
2009-07-09 04:41:55 +02:00
|
|
|
Provides: kernel-extra = %version-%source_rel
|
2009-05-20 10:59:36 +02:00
|
|
|
Requires: %{name}_%_target_cpu = %version-%release
|
2008-09-29 18:18:36 +02:00
|
|
|
Requires(pre): coreutils awk
|
|
|
|
Requires(post): module-init-tools
|
|
|
|
Requires(post): perl-Bootloader
|
|
|
|
Requires(post): mkinitrd
|
2009-05-20 10:59:36 +02:00
|
|
|
Supplements: packageand(product(SUSE_SLED):%{name}_%_target_cpu)
|
2008-11-08 19:28:50 +01:00
|
|
|
%ifarch %ix86
|
|
|
|
Conflicts: libc.so.6()(64bit)
|
|
|
|
%endif
|
2008-09-29 18:18:36 +02:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%description extra
|
2008-10-08 11:08:56 +02:00
|
|
|
This kernel is intended for kdump. It can not be booted with a normal
|
|
|
|
bootloader, the kexec tool has to be used to load it. Once the system
|
|
|
|
crashes, the loaded kernel will be started to grab debug info from the
|
|
|
|
crashed kernel.
|
|
|
|
|
|
|
|
This package contains additional modules not supported by Novell.
|
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%source_timestamp
|
2008-10-14 18:16:00 +02:00
|
|
|
%preun extra -f preun-extra.sh
|
|
|
|
|
|
|
|
%postun extra -f postun-extra.sh
|
|
|
|
|
|
|
|
%pre extra -f pre-extra.sh
|
2008-10-08 11:08:56 +02:00
|
|
|
|
2008-10-14 18:16:00 +02:00
|
|
|
%post extra -f post-extra.sh
|
2009-08-07 16:06:37 +02:00
|
|
|
%if %split_extra
|
2008-10-08 11:08:56 +02:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%files extra -f kernel-extra.files
|
2008-09-30 00:24:12 +02:00
|
|
|
%defattr(-, root, root)
|
2008-09-29 18:18:36 +02:00
|
|
|
%endif
|
2009-02-03 23:53:27 +01:00
|
|
|
%if %CONFIG_KMSG_IDS == "y"
|
2008-11-21 17:05:19 +01:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%package man
|
2009-06-19 00:50:33 +02:00
|
|
|
Summary: The collection of man pages generated by the kmsg script.
|
2009-06-20 01:58:35 +02:00
|
|
|
License: GPL v2 only
|
2008-11-21 17:05:19 +01:00
|
|
|
Group: System/Kernel
|
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%description man
|
2009-06-19 00:50:33 +02:00
|
|
|
This package includes the man pages that have been generated from the
|
|
|
|
kmsg message documentation comments.
|
2008-11-21 17:05:19 +01:00
|
|
|
|
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%source_timestamp
|
|
|
|
%files man
|
2008-11-21 17:05:19 +01:00
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/share/man/man9/*
|
|
|
|
%endif
|
2008-11-08 19:28:50 +01:00
|
|
|
|
2009-05-20 10:59:36 +02:00
|
|
|
%package devel
|
|
|
|
Summary: Development files necessary for building kernel modules
|
2009-06-20 01:58:35 +02:00
|
|
|
License: GPL v2 only
|
2009-06-19 00:50:33 +02:00
|
|
|
Group: Development/Sources
|
2009-05-20 10:59:36 +02:00
|
|
|
Provides: %name-devel = %version-%source_rel
|
|
|
|
Requires: kernel-source%variant = %version-%source_rel
|
|
|
|
AutoReqProv: on
|
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains files necessary for building kernel modules (and
|
2009-07-09 04:41:55 +02:00
|
|
|
kernel module packages) against the %build_flavor flavor of the kernel.
|
2009-05-20 10:59:36 +02:00
|
|
|
|
|
|
|
|
|
|
|
%source_timestamp
|
|
|
|
%if %CONFIG_MODULES == "y"
|
|
|
|
|
|
|
|
%pre devel -f devel-pre.sh
|
|
|
|
|
|
|
|
%post devel -f devel-post.sh
|
|
|
|
|
|
|
|
%files devel -f kernel-devel.files
|
|
|
|
%defattr(-,root,root)
|
|
|
|
%dir %obj_install_dir
|
|
|
|
%dir %obj_install_dir/%cpu_arch
|
|
|
|
%dir /usr/src/linux-obj
|
|
|
|
%dir /usr/src/linux-obj/%cpu_arch
|
|
|
|
%ghost /usr/src/linux-obj/%cpu_arch_flavor
|
|
|
|
%obj_install_dir/%cpu_arch_flavor
|
|
|
|
%if %_target_cpu != %cpu_arch
|
|
|
|
%obj_install_dir/%_target_cpu
|
|
|
|
/usr/src/linux-obj/%_target_cpu
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
|
2009-08-01 11:17:24 +02:00
|
|
|
%package devel-debuginfo
|
|
|
|
# rpm doesn't notice that vmlinux.debug belongs to the gzipped vmlinux.gz
|
|
|
|
Summary: Debug information for package %name-devel
|
|
|
|
License: GPL v2 only
|
|
|
|
Group: Development/Debug
|
|
|
|
|
|
|
|
%description devel-debuginfo
|
|
|
|
Debug information for package %name-devel
|
|
|
|
|
|
|
|
|
|
|
|
%source_timestamp
|
2009-08-18 12:35:53 +02:00
|
|
|
%if %extract_vmlinux_debuginfo
|
|
|
|
|
2009-08-01 11:17:24 +02:00
|
|
|
%files devel-debuginfo -f vmlinux.debug.files
|
2009-08-18 12:35:53 +02:00
|
|
|
%endif
|
2009-08-01 11:17:24 +02:00
|
|
|
|
2008-10-08 11:08:56 +02:00
|
|
|
%changelog
|