2008-07-18 12:15:21 +02:00
|
|
|
#
|
2008-08-21 18:33:51 +02:00
|
|
|
# spec file for package kernel-ppc64 (Version 2.6.27)
|
2008-07-18 12:15:21 +02:00
|
|
|
#
|
|
|
|
# Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
2008-10-08 10:51:30 +02:00
|
|
|
# This file and all modifications and additions to the pristine
|
|
|
|
# package are under the same license as the package itself.
|
2008-07-18 12:15:21 +02:00
|
|
|
#
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
|
|
|
|
|
|
|
# norootforbuild
|
|
|
|
|
|
|
|
%if 0%{?opensuse_bs}
|
|
|
|
# Strip off the build number ("y") from the "x.y" release number
|
|
|
|
%define source_rel %(release=%release; echo ${release%.*})
|
|
|
|
%else
|
|
|
|
# We don't have build numbers internally
|
|
|
|
%define source_rel %release
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Don't use shell commands in build macros, this won't work outside of rpm
|
|
|
|
%define build_flavor "ppc64"
|
|
|
|
%define build_kdump 0
|
|
|
|
%define build_xen 0
|
|
|
|
%define build_um 0
|
|
|
|
%define build_vanilla 0
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
%if %{build_flavor} == "kdump"
|
|
|
|
%define build_kdump 1
|
|
|
|
%endif
|
|
|
|
%if %{build_flavor} == "xen"
|
|
|
|
%define build_xen 1
|
|
|
|
%endif
|
|
|
|
%if %{build_flavor} == "um"
|
|
|
|
%define build_um 1
|
|
|
|
%endif
|
|
|
|
%if %{build_flavor} == "vanilla"
|
|
|
|
%define build_vanilla 1
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-30 00:24:12 +02:00
|
|
|
%(chmod +x %_sourcedir/{arch-symbols,guards,config-subst,check-for-config-changes,check-supported-list,built-in-where,find-provides,make-symsets,modversions,kabi-checks})
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-30 00:24:12 +02:00
|
|
|
%define symbols %(set -- kernel-ppc64 ppc64 $(case ppc64 in (rt|rt_*) echo RT ;; esac) $(%_sourcedir/arch-symbols %_target_cpu) $([ -e %_sourcedir/extra-symbols ] && cat %_sourcedir/extra-symbols) ; echo $*)
|
|
|
|
%define subarch_flavor %(%_sourcedir/guards %symbols < %_sourcedir/config.conf | grep '/ppc64$')
|
2008-10-08 10:51:30 +02:00
|
|
|
|
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.)
|
|
|
|
%define config_vars CONFIG_MODULES
|
|
|
|
%{expand:%(eval "$(test -n "%subarch_flavor" && tar xfj %_sourcedir/config.tar.bz2 --to-stdout config/%subarch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-30 00:24:12 +02:00
|
|
|
%if %build_vanilla || %CONFIG_MODULES != "y"
|
|
|
|
%define split_packages 0
|
|
|
|
%else
|
|
|
|
%define split_packages 1
|
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
Name: kernel-ppc64
|
2008-10-08 10:51:30 +02:00
|
|
|
Summary: Dummy summary
|
2008-08-21 18:33:51 +02:00
|
|
|
Version: 2.6.27
|
2008-10-08 10:51:30 +02:00
|
|
|
Release: rc8.<RELEASE>
|
|
|
|
License: GPL
|
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
|
2008-09-30 00:24:12 +02:00
|
|
|
%if %split_packages
|
2008-09-29 18:18:36 +02:00
|
|
|
Requires: kernel-ppc64-base = %version-%release
|
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
|
2008-10-08 10:51:30 +02:00
|
|
|
Recommends: kerneloops
|
2008-09-30 00:24:12 +02:00
|
|
|
%if ! %sles_version && %split_packages
|
2008-09-29 18:18:36 +02:00
|
|
|
Recommends: kernel-ppc64-extra
|
|
|
|
%endif
|
2008-07-18 12:15:21 +02:00
|
|
|
#!BuildIgnore: perl-Bootloader mkinitrd
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
%if ! 0%{?opensuse_bs}
|
|
|
|
BuildRequires: kernel-dummy
|
|
|
|
%endif
|
|
|
|
%if %build_um
|
|
|
|
BuildRequires: libpcap xorg-x11-devel
|
|
|
|
%endif
|
|
|
|
%ifarch ia64
|
|
|
|
# arch/ia64/scripts/unwcheck.py
|
|
|
|
BuildRequires: python
|
|
|
|
%endif
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
# for PS3 zImage
|
|
|
|
BuildRequires: dtc
|
|
|
|
%endif
|
|
|
|
%if %build_xen
|
|
|
|
Requires: xen >= xen-3.0.4_13138
|
|
|
|
%ifarch %ix86
|
2008-08-21 18:33:51 +02:00
|
|
|
Provides: kernel-xenpae = 2.6.27
|
|
|
|
Obsoletes: kernel-xenpae <= 2.6.27
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
|
|
|
#!BuildIgnore: xen
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
|
|
|
Provides: kernel-ppc64-nongpl
|
|
|
|
Obsoletes: kernel-ppc64-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 10:51:30 +02:00
|
|
|
Conflicts: sysfsutils < 2.0
|
2008-07-18 12:15:21 +02:00
|
|
|
%if ! %build_vanilla
|
2008-10-08 10:51:30 +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 10:51:30 +02:00
|
|
|
Conflicts: libc.so.6()(64bit)
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
|
|
|
%if %build_um
|
|
|
|
#Conflicts: kernel
|
|
|
|
%else
|
|
|
|
%if ! %build_xen
|
2008-10-08 10:51:30 +02:00
|
|
|
Provides: kernel = 2.6.27-%source_rel
|
2008-07-18 12:15:21 +02:00
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%ifarch ppc
|
2008-10-08 10:51:30 +02:00
|
|
|
Provides: kernel-pmac64 kernel-pseries64 kernel-iseries64
|
|
|
|
Obsoletes: kernel-pmac64 kernel-pseries64 kernel-iseries64
|
2008-07-18 12:15:21 +02:00
|
|
|
%else
|
|
|
|
%ifarch ppc64
|
|
|
|
%endif
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
|
|
|
Source0: http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.26.tar.bz2
|
|
|
|
Source1: functions.sh
|
|
|
|
Source11: postun.sh
|
|
|
|
Source12: post.sh
|
|
|
|
Source13: pre.sh
|
|
|
|
Source20: series.conf
|
|
|
|
Source21: config.conf
|
|
|
|
Source22: supported.conf
|
|
|
|
Source30: arch-symbols
|
|
|
|
Source31: guards
|
|
|
|
Source32: config-subst
|
|
|
|
Source33: check-for-config-changes
|
|
|
|
Source34: check-supported-list
|
|
|
|
Source38: kabi-checks
|
|
|
|
Source40: build-source-timestamp
|
|
|
|
Source41: built-in-where
|
|
|
|
Source42: make-symsets
|
|
|
|
Source43: find-provides
|
|
|
|
Source45: module-renames
|
|
|
|
Source46: modversions
|
|
|
|
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
|
|
|
|
Source106: patches.uml.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
|
|
|
|
Source120: kabi.tar.bz2
|
2008-07-18 12:15:21 +02:00
|
|
|
%define my_builddir %_builddir/%{name}-%{version}
|
2008-10-08 10:51:30 +02:00
|
|
|
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 10:51:30 +02:00
|
|
|
NoSource: 0
|
|
|
|
NoSource: 100
|
|
|
|
NoSource: 101
|
|
|
|
NoSource: 102
|
|
|
|
NoSource: 103
|
|
|
|
NoSource: 104
|
|
|
|
NoSource: 105
|
|
|
|
NoSource: 106
|
|
|
|
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.
|
2008-10-08 10:51:30 +02:00
|
|
|
Obsoletes: iwlwifi-kmp
|
|
|
|
Obsoletes: ipw3945-kmp
|
|
|
|
Obsoletes: adm8211-kmp
|
|
|
|
Obsoletes: rt2x00-kmp
|
|
|
|
Obsoletes: rfswitch-kmp
|
|
|
|
Obsoletes: uvcvideo-kmp
|
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Build with bash instead of sh as the shell: this turns on bash
|
|
|
|
# extensions like <(...).
|
|
|
|
%define _buildshell /bin/bash
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Provide the exported symbols as "ksym(symbol) = hash"
|
|
|
|
%define __find_provides %_sourcedir/find-provides %name
|
2008-10-08 10:51:30 +02:00
|
|
|
|
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
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
%define tolerate_unknown_new_config_options 0
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# kABI change tolerance (default in maintenance should be 4, 6, 8 or 15,
|
|
|
|
# 31 is the maximum; see scripts/kabi-checks)
|
|
|
|
%define tolerate_kabi_changes 31
|
|
|
|
|
|
|
|
%description
|
2008-10-08 10:51:30 +02:00
|
|
|
Dummy description.
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
%prep
|
2008-07-19 01:01:47 +02:00
|
|
|
if ! [ -e %_sourcedir/linux-2.6.26.tar.bz2 ]; then
|
2008-08-21 18:33:51 +02:00
|
|
|
echo "The kernel-ppc64-2.6.27.nosrc.rpm package does not contain the" \
|
|
|
|
"complete sources. Please install kernel-source-2.6.27.src.rpm."
|
2008-07-18 12:15:21 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
echo "Architecture symbol(s):" %symbols
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Unpack all sources and patches
|
2008-09-29 18:18:36 +02:00
|
|
|
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 107 -a 108 -a 109 -a 110 -a 111 -a 112 -a 120
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
supported_conf() {
|
|
|
|
%_sourcedir/guards %symbols $* < %_sourcedir/supported.conf | sort -u
|
|
|
|
}
|
2008-10-08 10:51:30 +02:00
|
|
|
|
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
|
2008-07-18 12:15:21 +02:00
|
|
|
for how in external; do
|
2008-09-29 18:18:36 +02:00
|
|
|
comm -2 -3 <(supported_conf base $how) <(supported_conf base) \
|
|
|
|
| sed -e 's:$: '"$how"':'
|
2008-07-18 12:15:21 +02:00
|
|
|
done
|
2008-09-30 00:24:12 +02:00
|
|
|
} | sed -e 's,.*/,,' -e 's,\.ko$,,' > linux-2.6.26/Module.supported
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Create grep pattern file for the modules to end up in the base package
|
|
|
|
comm -2 -3 <(supported_conf base) <(supported_conf) \
|
|
|
|
| sed -e 's:.*/::' -e 's:^:\\/:' -e 's:$:\.ko$:' \
|
|
|
|
> %my_builddir/grep-for-base-modules
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-19 01:01:47 +02:00
|
|
|
cd linux-2.6.26
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Find out for which architecture to build. We do this here, and use the
|
|
|
|
# result in the %build and %install sections.
|
|
|
|
#
|
|
|
|
# On architectures with a bi-arch or cross compiler, we can compile for
|
|
|
|
# an architecture different from %arch. The location of the config file
|
|
|
|
# tells us for which architecture to compile.
|
2008-09-29 18:18:36 +02:00
|
|
|
set -- %subarch_flavor
|
2008-07-18 12:15:21 +02:00
|
|
|
if [ $# -ne 1 ]; then
|
|
|
|
echo "$# config files found for this spec file (but one needed)" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
subarch=${1%/*}
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Apply the patches needed for this architecture.
|
|
|
|
%if ! %build_vanilla
|
|
|
|
for patch in $(%_sourcedir/guards %symbols < %_sourcedir/series.conf); do
|
2008-07-19 01:01:47 +02:00
|
|
|
if ! patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../$patch; then
|
2008-07-18 12:15:21 +02:00
|
|
|
echo "*** Patch $patch failed ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
%else
|
|
|
|
for patch in $(%_sourcedir/guards %symbols < %_sourcedir/series.conf | egrep kernel.org\|rpmify); do
|
2008-07-19 01:01:47 +02:00
|
|
|
if ! patch -s -F0 -E -p1 --no-backup-if-mismatch -i ../$patch; then
|
2008-07-18 12:15:21 +02:00
|
|
|
echo "*** Patch $patch failed ***"
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Release number without the EXTRAVERSION
|
|
|
|
RELEASE=%source_rel
|
|
|
|
while [ "$RELEASE" != "${RELEASE#[^0-9]*.}" ]; do
|
|
|
|
RELEASE=${RELEASE#[^0-9]*.}
|
|
|
|
done
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
if [ -f %_sourcedir/localversion ] ; then
|
|
|
|
cat %_sourcedir/localversion > localversion
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
cat ../config/%subarch_flavor \
|
|
|
|
| %_sourcedir/config-subst CONFIG_LOCALVERSION '"'-$RELEASE-ppc64'"' \
|
|
|
|
| %_sourcedir/config-subst CONFIG_SUSE_KERNEL y \
|
2008-07-18 12:15:21 +02:00
|
|
|
%if 0%{?__debug_package:1}
|
|
|
|
| %_sourcedir/config-subst CONFIG_DEBUG_INFO y \
|
|
|
|
%endif
|
|
|
|
> .config
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# We compile for this sub-architecture (i.e., machine architecture):
|
|
|
|
%if %build_um
|
|
|
|
cat > ../.rpm-defs <<EOF
|
|
|
|
ARCH=ppc64
|
|
|
|
SUBARCH=$subarch
|
|
|
|
MAKE_ARGS="ARCH=ppc64 SUBARCH=$subarch"
|
|
|
|
EOF
|
|
|
|
%else
|
|
|
|
cat > ../.rpm-defs <<EOF
|
|
|
|
ARCH=$subarch
|
|
|
|
SUBARCH=$subarch
|
|
|
|
MAKE_ARGS="ARCH=$subarch"
|
|
|
|
EOF
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
cat >> ../.rpm-defs <<EOF
|
2008-10-06 18:52:37 +02:00
|
|
|
KERNELRELEASE=2.6.27-rc8-$RELEASE-ppc64
|
2008-07-18 12:15:21 +02:00
|
|
|
EOF
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
%if 0%{?__debug_package:1}
|
|
|
|
cat >> ../.rpm-defs <<EOF
|
|
|
|
MAKE_ARGS="\$MAKE_ARGS CONFIG_DEBUG_INFO=y"
|
|
|
|
EOF
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
echo CONFIG_MODULES=%CONFIG_MODULES >> ../.rpm-defs
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
source .rpm-defs
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-19 01:01:47 +02:00
|
|
|
cd linux-2.6.26
|
2008-07-18 12:15:21 +02:00
|
|
|
cp .config .config.orig
|
|
|
|
%if %{tolerate_unknown_new_config_options}
|
|
|
|
MAKE_ARGS="$MAKE_ARGS -k"
|
|
|
|
yes '' | make oldconfig $MAKE_ARGS
|
|
|
|
%else
|
|
|
|
make silentoldconfig $MAKE_ARGS < /dev/null
|
|
|
|
%_sourcedir/check-for-config-changes .config.orig .config
|
|
|
|
rm .config.orig
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
make prepare $MAKE_ARGS
|
|
|
|
krel=$(make -s kernelrelease $MAKE_ARGS)
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
if [ "$krel" != "$KERNELRELEASE" ]; then
|
|
|
|
echo "Kernel release mismatch: $krel != $KERNELRELEASE" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
cat > .kernel-binary.spec.buildenv <<EOF
|
|
|
|
# Override the timestamp 'uname -v' reports with the build
|
|
|
|
# timestamp.
|
|
|
|
export KBUILD_BUILD_VERSION="$(grep SHA1_ID %_sourcedir/build-source-timestamp | awk '{ print $2 }')"
|
|
|
|
export KBUILD_BUILD_TIMESTAMP="$(head -n 1 %_sourcedir/build-source-timestamp)"
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# The following branch/timestamp will end up in Oopses.
|
|
|
|
export OOPS_TIMESTAMP="$(
|
|
|
|
echo -n $(sed -ne 's/^CVS Branch: \(.*\)/\1-/p' \
|
|
|
|
%_sourcedir/build-source-timestamp)
|
|
|
|
head -n 1 %_sourcedir/build-source-timestamp \
|
|
|
|
| tr -dc 0-9)"
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
export KBUILD_VERBOSE=0
|
|
|
|
export KBUILD_SYMTYPES=1
|
|
|
|
EOF
|
|
|
|
source .kernel-binary.spec.buildenv
|
2008-09-29 18:18:36 +02:00
|
|
|
make %{?jobs:-j%jobs} all $MAKE_ARGS CONFIG_DEBUG_SECTION_MISMATCH=y
|
2008-07-18 12:15:21 +02:00
|
|
|
|
|
|
|
%install
|
|
|
|
source .rpm-defs
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# get rid of /usr/lib/rpm/brp-strip-debug
|
|
|
|
# strip removes too much from the vmlinux ELF binary
|
|
|
|
export NO_BRP_STRIP_DEBUG=true
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# /lib/modules/$KERNELRELEASE/build will be a stale symlink until the
|
|
|
|
# kernel-source package is installed. Don't check for stale symlinks
|
|
|
|
# in the brp-symlink check:
|
|
|
|
export NO_BRP_STALE_LINK_ERROR=yes
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-19 01:01:47 +02:00
|
|
|
cd linux-2.6.26
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
mkdir %buildroot/boot
|
|
|
|
# (Could strip out non-public symbols.)
|
|
|
|
cp -p System.map %buildroot/boot/System.map-$KERNELRELEASE
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
add_vmlinux()
|
|
|
|
{
|
|
|
|
local vmlinux=boot/vmlinux-$KERNELRELEASE
|
|
|
|
%if 0%{?__debug_package:1}
|
|
|
|
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
|
|
|
|
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
|
|
|
|
LANG=C sort -z -u vmlinux.sourcefiles | grep -z -v "<built-in>" \
|
|
|
|
| ( 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
|
|
|
|
%else
|
|
|
|
cp vmlinux %buildroot/$vmlinux
|
|
|
|
%endif
|
|
|
|
if [ "$1" = --compressed ]; then
|
|
|
|
gzip -9 %buildroot/$vmlinux
|
|
|
|
chmod a-x %buildroot/$vmlinux.gz
|
|
|
|
fi
|
|
|
|
}
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
%if %build_kdump
|
|
|
|
add_vmlinux
|
|
|
|
chmod 644 %buildroot/boot/vmlinux-$KERNELRELEASE
|
|
|
|
image=vmlinux
|
|
|
|
%else
|
|
|
|
%if %build_um
|
|
|
|
add_vmlinux
|
|
|
|
chmod 755 %buildroot/boot/vmlinux-$KERNELRELEASE
|
|
|
|
image=linux
|
|
|
|
%else
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# architecture specifics
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
add_vmlinux --compressed
|
|
|
|
%if %build_xen
|
|
|
|
image=vmlinuz
|
|
|
|
%else
|
|
|
|
image=bzImage
|
|
|
|
%endif
|
|
|
|
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-$KERNELRELEASE
|
|
|
|
image=vmlinuz
|
|
|
|
%endif
|
|
|
|
%ifarch alpha
|
|
|
|
add_vmlinux --compressed
|
|
|
|
cp -p arch/alpha/boot/vmlinux.gz %buildroot/boot/vmlinuz-$KERNELRELEASE
|
|
|
|
image=vmlinuz
|
|
|
|
%endif
|
|
|
|
%ifarch ppc ppc64
|
|
|
|
add_vmlinux
|
|
|
|
chmod 644 %buildroot/boot/vmlinux-$KERNELRELEASE
|
|
|
|
image=vmlinux
|
|
|
|
%endif
|
|
|
|
%ifarch ia64
|
|
|
|
add_vmlinux --compressed
|
|
|
|
mv %buildroot/boot/vmlinux-$KERNELRELEASE.gz \
|
|
|
|
%buildroot/boot/vmlinuz-$KERNELRELEASE
|
|
|
|
image=vmlinuz
|
|
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
|
|
|
add_vmlinux --compressed
|
|
|
|
cp -p arch/s390/boot/image %buildroot/boot/image-$KERNELRELEASE
|
|
|
|
image=image
|
|
|
|
%endif
|
|
|
|
if [ -e init/kerntypes.o ]; then
|
|
|
|
cp init/kerntypes.o %buildroot/boot/Kerntypes-$KERNELRELEASE
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# end of build_um
|
|
|
|
%endif
|
|
|
|
# end of build_kdump
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \
|
2008-09-29 18:18:36 +02:00
|
|
|
-e "s:@IMAGE@:$image:g" \
|
|
|
|
-e "s:@FLAVOR""@:ppc64:g" \
|
|
|
|
%_sourcedir/pre.sh > ../pre-base.sh
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
for sub in '-base' '' '-extra'; do
|
2008-09-30 00:24:12 +02:00
|
|
|
{ cat %_sourcedir/functions.sh
|
2008-09-29 18:18:36 +02:00
|
|
|
sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \
|
|
|
|
-e "s:@IMAGE@:$image:g" \
|
|
|
|
-e "s:@FLAVOR""@:ppc64:g" \
|
|
|
|
-e "s:@SUBPACKAGE@:kernel-ppc64$sub:g" \
|
|
|
|
%_sourcedir/post.sh
|
2008-09-30 00:24:12 +02:00
|
|
|
} > ../post$sub.sh
|
2008-09-29 18:18:36 +02:00
|
|
|
done
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-30 00:24:12 +02:00
|
|
|
{ cat %_sourcedir/functions.sh
|
2008-07-18 12:15:21 +02:00
|
|
|
sed -e "s:@KERNELRELEASE@:$KERNELRELEASE:g" \
|
|
|
|
-e "s:@IMAGE@:$image:g" \
|
|
|
|
-e "s:@FLAVOR""@:ppc64:g" \
|
2008-09-29 18:18:36 +02:00
|
|
|
%_sourcedir/postun.sh
|
2008-09-30 00:24:12 +02:00
|
|
|
} > ../postun.sh
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
%if %build_kdump || %build_um || %build_xen || %build_vanilla
|
|
|
|
suffix=-ppc64
|
|
|
|
%endif
|
|
|
|
ln -s $image$suffix %buildroot/boot/$image$suffix
|
|
|
|
ln -s initrd$suffix %buildroot/boot/initrd$suffix
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
cp .config %buildroot/boot/config-$KERNELRELEASE
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
gzip -c9 < Module.symvers > %buildroot/boot/symvers-$KERNELRELEASE.gz
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
if [ $CONFIG_MODULES = y ]; then
|
|
|
|
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
if ! %_sourcedir/check-supported-list \
|
|
|
|
%_sourcedir %buildroot/lib/modules/$KERNELRELEASE; 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-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Preserve exports from previous kernels when possible.
|
|
|
|
old_symsets=%my_builddir/kabi/$SUBARCH/symsets-ppc64.tar.gz
|
|
|
|
[ -e $old_symsets ] || old_symsets=
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-07-18 12:15:21 +02:00
|
|
|
# Group the exported symbols listed in symvers.gz by directory, and
|
|
|
|
# create a database of sets.
|
2008-10-08 10:51:30 +02:00
|
|
|
{ awk '$3 != "vmlinux" { print }' Module.symvers
|
2008-07-18 12:15:21 +02:00
|
|
|
# Find out in which built-in.o files the exported symbols that ended
|
|
|
|
# up in vmlinux were defined.
|
2008-10-08 10:51:30 +02:00
|
|
|
awk '$3 == "vmlinux" { print }' Module.symvers \
|
|
|
|
| %_sourcedir/built-in-where
|
2008-09-30 00:24:12 +02:00
|
|
|
} | %_sourcedir/make-symsets \
|
2008-07-18 12:15:21 +02:00
|
|
|
%buildroot/boot/symsets-$KERNELRELEASE.tar.gz \
|
|
|
|
$old_symsets ||
|
|
|
|
[ -n "$ignore_kabi_changes" -o %tolerate_kabi_changes -ge 8 ]
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Also put the resulting file in $obj_dir/$SUBARCH/ppc64
|
|
|
|
# so that kernel-source + kernel-ppc64 is sufficient for building
|
|
|
|
# modules that have modversions as well.
|
|
|
|
obj_dir=usr/src/linux-${KERNELRELEASE%%-ppc64}-obj
|
|
|
|
mkdir -p %buildroot/$obj_dir/$SUBARCH/ppc64
|
|
|
|
cp Module.symvers %buildroot/$obj_dir/$SUBARCH/ppc64
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Table of types used in exported symbols (for modversion debugging).
|
|
|
|
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-$KERNELRELEASE
|
|
|
|
if [ -s %buildroot/boot/symtypes-$KERNELRELEASE ]; then
|
|
|
|
gzip -9 %buildroot/boot/symtypes-$KERNELRELEASE
|
|
|
|
else
|
|
|
|
rm -f %buildroot/boot/symtypes-$KERNELRELEASE
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# 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.
|
|
|
|
[ -e %buildroot/$obj_dir/%_target_cpu ] \
|
|
|
|
|| ln -sf $SUBARCH %buildroot/$obj_dir/%_target_cpu
|
2008-07-18 12:15:21 +02:00
|
|
|
%ifarch ppc ppc64
|
2008-09-29 18:18:36 +02:00
|
|
|
[ -e %buildroot/$obj_dir/ppc ] \
|
|
|
|
|| ln -s $SUBARCH %buildroot/$obj_dir/ppc
|
|
|
|
[ -e %buildroot/$obj_dir/ppc64 ] \
|
|
|
|
|| ln -s $SUBARCH %buildroot/$obj_dir/ppc64
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Check for kABI changes
|
|
|
|
KABI=0
|
|
|
|
if [ -e %my_builddir/kabi/$SUBARCH/symvers-ppc64 ]; then
|
|
|
|
%_sourcedir/kabi-checks \
|
|
|
|
%my_builddir/kabi/$SUBARCH/symvers-ppc64 \
|
|
|
|
Module.symvers \
|
|
|
|
%my_builddir/kabi/commonsyms \
|
|
|
|
%my_builddir/kabi/usedsyms \
|
|
|
|
|| KABI=$?
|
2008-07-18 12:15:21 +02:00
|
|
|
fi
|
2008-09-29 18:18:36 +02:00
|
|
|
if [ $KABI -gt %tolerate_kabi_changes ]; then
|
|
|
|
echo "kABI changes of badness $KABI exceed the maximum allowed badness" \
|
|
|
|
"of %tolerate_kabi_changes. Please try to avoid the kABI changes."
|
|
|
|
if [ ! -e %my_builddir/kabi/$SUBARCH/ignore-ppc64 -a \
|
|
|
|
! -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
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Indicate the ABI badness in build result emails.
|
|
|
|
echo "KABI BADNESS $KABI" > %_rpmdir/%_arch/mbuild_subject.tag
|
|
|
|
fi
|
|
|
|
if [ $KABI -ge 8 ]; then
|
|
|
|
echo "To find out which types have changed relative to the reference" \
|
|
|
|
"symbols, diff the symtypes.gz files of the reference kernel" \
|
|
|
|
"against the symtypes.gz file from this build."
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# We were building in %my_builddir/linux-2.6.26, but the sources will
|
|
|
|
# later be installed in /usr/src/linux-2.6.26-%source_rel. Fix up the
|
|
|
|
# build symlink.
|
|
|
|
rm -f %buildroot/lib/modules/$KERNELRELEASE/{source,build}
|
|
|
|
ln -s /usr/src/linux-${KERNELRELEASE%%-ppc64} \
|
|
|
|
%buildroot/lib/modules/$KERNELRELEASE/source
|
|
|
|
ln -s /$obj_dir/$SUBARCH/ppc64 \
|
|
|
|
%buildroot/lib/modules/$KERNELRELEASE/build
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Abort if there are any undefined symbols
|
|
|
|
msg="$(/sbin/depmod -F %buildroot/boot/System.map-$KERNELRELEASE \
|
|
|
|
-b %buildroot -ae $KERNELRELEASE 2>&1)"
|
|
|
|
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
|
|
|
|
exit 1
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02: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.
|
|
|
|
dd if=/dev/zero of=%buildroot/boot/initrd-$KERNELRELEASE \
|
|
|
|
bs=1024 seek=2047 count=1
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
%if %split_packages
|
|
|
|
# Generate the lists of supported and unsupported modules.
|
|
|
|
( cd %buildroot
|
|
|
|
for module in $(find lib/modules/$KERNELRELEASE -type f -name '*.ko'); do
|
|
|
|
case "$(/sbin/modinfo -F supported $module)" in
|
|
|
|
(yes|external)
|
|
|
|
echo "/$module" >> %my_builddir/supported-modules
|
|
|
|
;;
|
|
|
|
(*)
|
|
|
|
echo "/$module" >> %my_builddir/unsupported-modules
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
done
|
|
|
|
)
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
add_dependent_modules() {
|
|
|
|
local modules_dep=$1
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
xargs make -rRs -f <(echo -e '%:\n\t@echo $@' ; cat $modules_dep)
|
|
|
|
}
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
modules_dep=%buildroot/lib/modules/$KERNELRELEASE/modules.dep
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Make sure that no supported modules depend on any unsupported modules.
|
|
|
|
dependent_unsupported_modules=$(
|
|
|
|
comm -3 <(sort %my_builddir/supported-modules) \
|
|
|
|
<(cat %my_builddir/supported-modules \
|
|
|
|
| add_dependent_modules $modules_dep \
|
|
|
|
| sort))
|
|
|
|
if [ -n "$dependent_unsupported_modules" ]; then
|
|
|
|
echo "The following unsupported modules are used by supported modules:"
|
|
|
|
echo "$dependent_unsupported_modules"
|
|
|
|
echo "Please fix supported.conf."
|
|
|
|
exit 1
|
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Compute the list of base modules: modules that core modules depend on
|
|
|
|
# implicitly are also core modules.
|
|
|
|
grep -f %my_builddir/grep-for-base-modules %my_builddir/supported-modules \
|
|
|
|
| add_dependent_modules $modules_dep > %my_builddir/base-modules
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-30 00:24:12 +02:00
|
|
|
# All supported modules which are not core modules belong in kernel-ppc64.
|
2008-09-29 18:18:36 +02:00
|
|
|
comm -3 <(sort %my_builddir/supported-modules) \
|
|
|
|
<(sort %my_builddir/base-modules) \
|
|
|
|
> %my_builddir/main-modules
|
|
|
|
%else
|
|
|
|
( cd %buildroot
|
|
|
|
find lib/modules/$KERNELRELEASE -type f -name '*.ko' -printf '/%%p\n'
|
|
|
|
) > %my_builddir/base-modules
|
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Set up some module aliases
|
|
|
|
install -d -m 755 %buildroot/etc/modprobe.d/
|
|
|
|
install -m 644 %_sourcedir/module-renames %buildroot/etc/modprobe.d/
|
2008-07-18 12:15:21 +02:00
|
|
|
fi
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
add_dirs_to_filelist() {
|
|
|
|
local filelist
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-30 00:24:12 +02:00
|
|
|
filelist=$(cat "$@")
|
2008-09-29 18:18:36 +02:00
|
|
|
echo "$filelist"
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Below, we do this:
|
|
|
|
# - remove filelist macros
|
|
|
|
# - remove last pathname component
|
|
|
|
# - generate all parents and make the list unique
|
|
|
|
# - skip directories owned be other packages
|
|
|
|
# - add the %dir prefix (double-escaped for find and rpm)
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
echo "$filelist" \
|
|
|
|
| sed -re 's:%%%%[a-z]+(\([^)]+\))? ?::g' \
|
|
|
|
| sed -re 's:/[^/]+$::' \
|
|
|
|
| sed -nre ':a; p; s:/[^/]+$::; ta' \
|
|
|
|
| sort -u \
|
|
|
|
| sed -r -e '\:^(|/boot|/etc|/lib(/modules|/firmware)?|/usr(/src)?)$:d' \
|
|
|
|
| sed -e 's:^:%%%%dir :'
|
|
|
|
}
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
# Collect the file lists.
|
2008-09-30 00:24:12 +02:00
|
|
|
{ cd %buildroot
|
2008-07-18 12:15:21 +02:00
|
|
|
find boot \
|
2008-09-29 18:18:36 +02:00
|
|
|
\( -type l -o -name 'initrd-*' \) -printf '%%%%%%%%ghost /%%p\n' -o \
|
2008-07-18 12:15:21 +02:00
|
|
|
-type f -printf '/%%p\n'
|
2008-09-29 18:18:36 +02:00
|
|
|
if [ $CONFIG_MODULES = y ]; then
|
|
|
|
find lib/modules/$KERNELRELEASE \
|
|
|
|
-type d -o \
|
|
|
|
-path '*/modules.*' -printf '%%%%%%%%ghost /%%p\n' -o \
|
|
|
|
-name '*.ko' -prune -o \
|
|
|
|
-printf '/%%p\n'
|
|
|
|
cat %my_builddir/base-modules
|
|
|
|
echo '%%%%config /etc/modprobe.d/module-renames'
|
|
|
|
find $obj_dir \
|
|
|
|
-type d -o \
|
|
|
|
-printf '/%%p\n'
|
|
|
|
fi
|
|
|
|
test -d lib/firmware/$KERNELRELEASE && \
|
2008-08-21 18:33:51 +02:00
|
|
|
find lib/firmware/$KERNELRELEASE \
|
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
|
2008-10-08 10:51:30 +02:00
|
|
|
|
2008-09-29 18:18:36 +02:00
|
|
|
%if %split_packages
|
2008-09-30 00:24:12 +02:00
|
|
|
add_dirs_to_filelist %my_builddir/main-modules > %my_builddir/kernel-main.files
|
|
|
|
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
|
2008-09-29 18:18:36 +02:00
|
|
|
%endif
|
2008-10-08 10:51:30 +02:00
|
|
|
|
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
|
|
|
|
|
|
|
%post -f post.sh
|
|
|
|
|
|
|
|
%postun -f postun.sh
|
|
|
|
|
2008-10-08 10:51:30 +02:00
|
|
|
%if %split_packages
|
2008-09-29 18:18:36 +02:00
|
|
|
%files -f kernel-main.files
|
|
|
|
%else
|
|
|
|
%files -f kernel-base.files
|
|
|
|
%endif
|
2008-09-30 00:24:12 +02:00
|
|
|
%defattr(-, root, root)
|
2008-09-29 18:18:36 +02:00
|
|
|
|
|
|
|
%package -n kernel-ppc64-base
|
2008-10-08 10:51:30 +02:00
|
|
|
Summary: Base kernel package
|
|
|
|
License: GPL
|
2008-09-29 18:18:36 +02:00
|
|
|
Group: System/Kernel
|
|
|
|
Url: http://www.kernel.org/
|
|
|
|
AutoReqProv: on
|
|
|
|
Requires(pre): coreutils awk
|
|
|
|
Requires(post): module-init-tools
|
|
|
|
Requires(post): perl-Bootloader
|
|
|
|
Requires(post): mkinitrd
|
|
|
|
|
|
|
|
%description -n kernel-ppc64-base
|
2008-10-08 10:51:30 +02:00
|
|
|
Dummy description.
|
2008-09-29 18:18:36 +02:00
|
|
|
|
|
|
|
%pre -n kernel-ppc64-base -f pre-base.sh
|
|
|
|
%post -n kernel-ppc64-base -f post-base.sh
|
|
|
|
|
2008-10-08 10:51:30 +02:00
|
|
|
%if %split_packages
|
2008-09-29 18:18:36 +02:00
|
|
|
%files -n kernel-ppc64-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
|
|
|
|
|
|
|
|
%package -n kernel-ppc64-extra
|
2008-10-08 10:51:30 +02:00
|
|
|
Summary: Unsupported kernel modules
|
|
|
|
License: GPL
|
2008-09-29 18:18:36 +02:00
|
|
|
Group: System/Kernel
|
|
|
|
Url: http://www.kernel.org/
|
|
|
|
AutoReqProv: on
|
|
|
|
Requires: kernel-ppc64 = %version-%release
|
|
|
|
Requires(pre): coreutils awk
|
|
|
|
Requires(post): module-init-tools
|
|
|
|
Requires(post): perl-Bootloader
|
|
|
|
Requires(post): mkinitrd
|
|
|
|
|
|
|
|
%description -n kernel-ppc64-extra
|
2008-10-08 10:51:30 +02:00
|
|
|
Dummy description.
|
2008-09-29 18:18:36 +02:00
|
|
|
|
|
|
|
%post -n kernel-ppc64-extra -f post-extra.sh
|
|
|
|
|
2008-10-08 10:51:30 +02:00
|
|
|
%if %split_packages
|
2008-09-29 18:18:36 +02:00
|
|
|
%files -n kernel-ppc64-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
|