2011-10-05 07:01:45 +02:00
|
|
|
#
|
2011-10-25 07:02:09 +02:00
|
|
|
# spec file for package kernel-vanilla
|
2011-10-05 07:01:45 +02:00
|
|
|
#
|
2018-01-01 10:01:54 +01:00
|
|
|
# Copyright (c) 2018 SUSE LINUX GmbH, Nuernberg, Germany.
|
2011-10-05 07:01:45 +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.
|
|
|
|
|
|
|
|
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
|
|
|
#
|
2013-03-01 08:07:50 +01:00
|
|
|
# needssslcertforbuild
|
2014-01-31 08:01:42 +01:00
|
|
|
|
2016-12-13 08:07:16 +01:00
|
|
|
|
2018-04-04 08:43:11 +02:00
|
|
|
%define srcversion 4.16
|
2018-05-22 21:58:28 +02:00
|
|
|
%define patchversion 4.16.11
|
2011-10-05 07:01:45 +02:00
|
|
|
%define variant %{nil}
|
2012-01-06 07:02:55 +01:00
|
|
|
%define vanilla_only 0
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%include %_sourcedir/kernel-spec-macros
|
|
|
|
|
|
|
|
%define build_flavor vanilla
|
2014-08-19 08:03:29 +02:00
|
|
|
%define build_default ("%build_flavor" == "default")
|
|
|
|
%define build_vanilla ("%build_flavor" == "vanilla")
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2016-01-26 08:03:18 +01:00
|
|
|
%if ! %build_vanilla
|
2011-10-05 07:01:45 +02:00
|
|
|
%define src_install_dir /usr/src/linux-%kernelrelease%variant
|
2016-01-26 08:03:18 +01:00
|
|
|
%else
|
|
|
|
%define src_install_dir /usr/src/linux-%kernelrelease-vanilla
|
|
|
|
%endif
|
|
|
|
%define obj_install_dir /usr/src/linux-%kernelrelease%variant-obj
|
2011-10-05 07:01:45 +02:00
|
|
|
%define rpm_install_dir %buildroot%obj_install_dir
|
2015-10-27 08:06:34 +01:00
|
|
|
%define kernel_build_dir %my_builddir/linux-%srcversion/linux-obj
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2018-04-19 23:07:42 +02:00
|
|
|
%(chmod +x %_sourcedir/{guards,apply-patches,check-for-config-changes,group-source-files.pl,split-modules,modversions,kabi.pl,mkspec,compute-PATCHVERSION.sh,arch-symbols,log.sh,try-disable-staging-driver,compress-vmlinux.sh,mkspec-dtb,check-module-license,klp-symbols})
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%global cpu_arch %(%_sourcedir/arch-symbols %_target_cpu)
|
|
|
|
%define cpu_arch_flavor %cpu_arch/%build_flavor
|
|
|
|
|
|
|
|
# Define some CONFIG variables as rpm macros as well. (rpm cannot handle
|
|
|
|
# defining them all at once.)
|
2016-09-28 10:07:34 +02:00
|
|
|
%define config_vars CONFIG_MODULES CONFIG_MODULE_SIG CONFIG_KMSG_IDS CONFIG_SUSE_KERNEL_SUPPORTED CONFIG_EFI_STUB
|
2011-10-05 07:01:45 +02:00
|
|
|
%{expand:%(eval "$(test -n "%cpu_arch_flavor" && tar -xjf %_sourcedir/config.tar.bz2 --to-stdout config/%cpu_arch_flavor)"; for config in %config_vars; do echo "%%global $config ${!config:-n}"; done)}
|
2016-12-13 08:07:16 +01:00
|
|
|
%define split_extra (%CONFIG_MODULES == "y" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y")
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
%define install_vdso 1
|
|
|
|
%else
|
|
|
|
%define install_vdso 0
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Name: kernel-vanilla
|
|
|
|
Summary: The Standard Kernel - without any SUSE patches
|
2014-02-02 08:01:46 +01:00
|
|
|
License: GPL-2.0
|
|
|
|
Group: System/Kernel
|
2018-05-22 21:58:28 +02:00
|
|
|
Version: 4.16.11
|
2013-10-03 08:02:42 +02:00
|
|
|
%if 0%{?is_kotd}
|
2018-05-22 21:58:28 +02:00
|
|
|
Release: <RELEASE>.gf86282c
|
2013-10-03 08:02:42 +02:00
|
|
|
%else
|
2014-11-01 08:04:35 +01:00
|
|
|
Release: 0
|
2013-10-03 08:02:42 +02:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
Url: http://www.kernel.org/
|
2014-02-02 08:01:46 +01:00
|
|
|
BuildRequires: bc
|
2018-03-03 08:03:49 +01:00
|
|
|
BuildRequires: bison
|
2014-02-02 08:01:46 +01:00
|
|
|
BuildRequires: coreutils
|
2011-10-05 07:01:45 +02:00
|
|
|
BuildRequires: fdupes
|
2018-04-04 08:43:11 +02:00
|
|
|
BuildRequires: flex
|
2017-06-21 08:02:31 +02:00
|
|
|
# Cannot test %%CONFIG_GCC_PLUGINS here because the buildservice parser
|
|
|
|
# does not expand %%(...)
|
|
|
|
%if "%build_flavor" == "syzkaller"
|
2017-05-02 09:07:06 +02:00
|
|
|
# Needed by scripts/gcc-plugin.sh
|
|
|
|
BuildRequires: gcc-c++ gcc-devel
|
2017-06-21 08:02:31 +02:00
|
|
|
%endif
|
2014-06-06 08:02:12 +02:00
|
|
|
%if 0%{?suse_version} > 1310
|
2014-06-05 08:02:39 +02:00
|
|
|
BuildRequires: hmaccalc
|
2014-06-06 08:02:12 +02:00
|
|
|
%endif
|
2016-01-13 08:05:39 +01:00
|
|
|
BuildRequires: libopenssl-devel
|
2014-02-11 08:03:09 +01:00
|
|
|
BuildRequires: modutils
|
2013-03-01 08:07:50 +01:00
|
|
|
# Used to sign the kernel in the buildservice
|
2015-07-22 08:03:49 +02:00
|
|
|
BuildRequires: openssl
|
|
|
|
BuildRequires: pesign-obs-integration
|
2016-06-26 16:47:43 +02:00
|
|
|
# for objtool
|
|
|
|
BuildRequires: libelf-devel
|
2010-12-01 11:20:27 +01:00
|
|
|
Provides: %name = %version-%source_rel
|
2014-12-11 08:04:19 +01:00
|
|
|
# bnc#901925
|
|
|
|
Provides: %name-%version-%source_rel
|
2018-04-04 08:43:11 +02:00
|
|
|
Provides: %{name}_%_target_cpu = %version-%source_rel
|
2011-10-05 07:01:45 +02:00
|
|
|
Provides: kernel-base = %version-%source_rel
|
2016-12-13 08:07:16 +01:00
|
|
|
Provides: multiversion(kernel)
|
2015-11-30 08:05:48 +01:00
|
|
|
# In SLE11, kernel-$flavor complemented kernel-$flavor-base. With SLE12,
|
|
|
|
# kernel-$flavor itself contains all the needed files and kernel-$flavor-base
|
|
|
|
# is a subset that can replace kernel-$flavor in some scenarios. We need to
|
|
|
|
# obsolete the -base subpackage from SLE11, so that the base files are not
|
|
|
|
# owned by multiple packages now. The dependency is not correct wrt openSUSE
|
|
|
|
# 11.2 - 11.4, but we primarily care about the supported upgrade path.
|
|
|
|
Obsoletes: %name-base < 3.1
|
2017-11-02 08:03:00 +01:00
|
|
|
Recommends: kernel-firmware
|
2016-03-15 08:05:00 +01:00
|
|
|
# The following is copied to the -base subpackage as well
|
|
|
|
# BEGIN COMMON DEPS
|
2011-10-05 07:01:45 +02:00
|
|
|
Requires(pre): coreutils awk
|
2013-09-04 08:05:35 +02:00
|
|
|
# For /usr/lib/module-init-tools/weak-modules2
|
|
|
|
Requires(post): suse-module-tools
|
|
|
|
# For depmod (modutils is a dependency provided by both module-init-tools and
|
|
|
|
# kmod-compat)
|
|
|
|
Requires(post): modutils
|
2011-10-05 07:01:45 +02:00
|
|
|
# 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.
|
|
|
|
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
|
|
|
|
Requires(post): perl-Bootloader >= 0.4.15
|
2013-03-13 08:06:21 +01:00
|
|
|
%if %build_vanilla
|
|
|
|
Requires(post): mkinitrd
|
|
|
|
%else
|
|
|
|
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
|
2012-08-02 07:03:47 +02:00
|
|
|
Requires(post): mkinitrd >= 2.7.1
|
2013-03-13 08:06:21 +01:00
|
|
|
%endif
|
2012-05-22 07:06:49 +02:00
|
|
|
# Install the package providing /etc/SuSE-release early enough, so that
|
|
|
|
# the grub entry has correct title (bnc#757565)
|
|
|
|
Requires(post): distribution-release
|
2017-12-16 08:02:58 +01:00
|
|
|
# Do not install p-b and mkinitrd for the install check, the %post script is
|
|
|
|
# able to handle this
|
2012-05-22 07:06:49 +02:00
|
|
|
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
|
2011-03-29 07:06:18 +02:00
|
|
|
# Remove some packages that are installed automatically by the build system,
|
|
|
|
# but are not needed to build the kernel
|
2018-04-04 08:43:11 +02:00
|
|
|
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools udev insserv
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%ifarch s390 s390x
|
|
|
|
%if %build_vanilla && 0%{?suse_version} < 1130
|
|
|
|
BuildRequires: dwarfextract
|
|
|
|
%endif
|
|
|
|
%endif
|
2012-01-06 07:02:55 +01:00
|
|
|
%ifarch %arm
|
|
|
|
BuildRequires: u-boot-tools
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2014-02-02 08:01:46 +01:00
|
|
|
Obsoletes: microcode_ctl
|
2013-09-04 08:05:35 +02:00
|
|
|
|
2016-01-26 08:03:18 +01:00
|
|
|
# Force bzip2 instead of lzma compression to
|
|
|
|
# 1) allow install on older dist versions, and
|
|
|
|
# 2) decrease build times (bsc#962356)
|
2011-10-05 07:01:45 +02:00
|
|
|
%define _binary_payload w9.bzdio
|
2017-07-20 14:59:48 +02:00
|
|
|
# Do not recompute the build-id of vmlinux in find-debuginfo.sh (bsc#964063)
|
2017-12-16 08:02:58 +01:00
|
|
|
%undefine _unique_build_ids
|
2017-07-20 14:59:48 +02:00
|
|
|
%define _no_recompute_build_ids 1
|
2018-03-03 08:03:49 +01:00
|
|
|
# prevent usr/lib/debug/boot/vmlinux-4.12.14-11.10-default-4.12.14-11.10.ppc64le.debug
|
|
|
|
%undefine _unique_debug_names
|
2011-10-05 07:01:45 +02:00
|
|
|
# dead network if installed on SLES10, otherwise it will work (mostly)
|
|
|
|
Conflicts: sysfsutils < 2.0
|
|
|
|
Conflicts: apparmor-profiles <= 2.1
|
|
|
|
Conflicts: apparmor-parser < 2.3
|
|
|
|
# root-lvm only works with newer udevs
|
|
|
|
Conflicts: udev < 118
|
|
|
|
Conflicts: lvm2 < 2.02.33
|
2012-10-18 08:07:03 +02:00
|
|
|
# Interface to hv_kvp_daemon changed
|
|
|
|
Conflicts: hyper-v < 4
|
2016-06-26 16:47:43 +02:00
|
|
|
%ifarch %ix86
|
|
|
|
Conflicts: libc.so.6()(64bit)
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
Provides: kernel = %version-%source_rel
|
2018-05-22 21:58:28 +02:00
|
|
|
Provides: kernel-srchash = f86282c36e93ea7ebdb1860fafa7c3830196564b
|
|
|
|
Provides: kernel-%build_flavor-base-srchash = f86282c36e93ea7ebdb1860fafa7c3830196564b
|
2017-11-02 08:03:00 +01:00
|
|
|
# END COMMON DEPS
|
2018-05-22 21:58:28 +02:00
|
|
|
Provides: %name-srchash = f86282c36e93ea7ebdb1860fafa7c3830196564b
|
2015-09-14 08:02:55 +02:00
|
|
|
%obsolete_rebuilds %name
|
2016-06-26 16:47:43 +02:00
|
|
|
Source0: http://www.kernel.org/pub/linux/kernel/v4.x/linux-%srcversion.tar.xz
|
2011-10-05 07:01:45 +02:00
|
|
|
Source2: source-post.sh
|
|
|
|
Source3: kernel-source.rpmlintrc
|
|
|
|
Source8: devel-pre.sh
|
|
|
|
Source9: devel-post.sh
|
|
|
|
Source10: preun.sh
|
|
|
|
Source11: postun.sh
|
|
|
|
Source12: pre.sh
|
|
|
|
Source13: post.sh
|
|
|
|
Source14: series.conf
|
|
|
|
Source16: guards
|
|
|
|
Source17: apply-patches
|
|
|
|
Source21: config.conf
|
|
|
|
Source23: supported.conf
|
|
|
|
Source33: check-for-config-changes
|
2011-10-25 07:02:09 +02:00
|
|
|
Source35: group-source-files.pl
|
2015-02-12 08:04:40 +01:00
|
|
|
Source36: README.PATCH-POLICY.SUSE
|
2011-10-05 07:01:45 +02:00
|
|
|
Source37: README.SUSE
|
|
|
|
Source38: README.KSYMS
|
|
|
|
Source39: config-options.changes.txt
|
|
|
|
Source40: source-timestamp
|
2016-06-26 16:47:43 +02:00
|
|
|
Source46: split-modules
|
|
|
|
Source47: modversions
|
2011-10-05 07:01:45 +02:00
|
|
|
Source48: macros.kernel-source
|
|
|
|
Source49: kernel-module-subpackage
|
|
|
|
Source50: kabi.pl
|
|
|
|
Source51: mkspec
|
|
|
|
Source52: kernel-source%variant.changes
|
|
|
|
Source53: kernel-source.spec.in
|
|
|
|
Source54: kernel-binary.spec.in
|
|
|
|
Source55: kernel-syms.spec.in
|
|
|
|
Source56: kernel-docs.spec.in
|
2013-05-01 08:12:39 +02:00
|
|
|
Source57: kernel-cert-subpackage
|
2014-04-01 08:03:05 +02:00
|
|
|
Source58: constraints.in
|
2011-10-05 07:01:45 +02:00
|
|
|
Source60: config.sh
|
|
|
|
Source61: compute-PATCHVERSION.sh
|
2013-10-03 08:02:42 +02:00
|
|
|
Source62: old-flavors
|
2011-10-05 07:01:45 +02:00
|
|
|
Source63: arch-symbols
|
|
|
|
Source64: package-descriptions
|
|
|
|
Source65: kernel-spec-macros
|
|
|
|
Source67: log.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
Source68: host-memcpy-hack.h
|
2012-01-06 07:02:55 +01:00
|
|
|
Source69: try-disable-staging-driver
|
2014-04-15 08:02:51 +02:00
|
|
|
Source70: kernel-obs-build.spec.in
|
|
|
|
Source71: kernel-obs-qa.spec.in
|
2014-08-18 08:02:31 +02:00
|
|
|
Source72: compress-vmlinux.sh
|
2016-12-13 08:07:16 +01:00
|
|
|
Source73: dtb.spec.in.in
|
|
|
|
Source74: mkspec-dtb
|
2018-04-04 08:43:11 +02:00
|
|
|
Source75: release-projects
|
|
|
|
Source76: check-module-license
|
2018-04-19 23:07:42 +02:00
|
|
|
Source77: klp-symbols
|
2011-10-05 07:01:45 +02:00
|
|
|
Source100: config.tar.bz2
|
|
|
|
Source101: config.addon.tar.bz2
|
|
|
|
Source102: patches.arch.tar.bz2
|
|
|
|
Source103: patches.drivers.tar.bz2
|
|
|
|
Source104: patches.fixes.tar.bz2
|
|
|
|
Source105: patches.rpmify.tar.bz2
|
|
|
|
Source106: patches.suse.tar.bz2
|
|
|
|
Source108: patches.addon.tar.bz2
|
|
|
|
Source109: patches.kernel.org.tar.bz2
|
|
|
|
Source110: patches.apparmor.tar.bz2
|
|
|
|
Source111: patches.rt.tar.bz2
|
|
|
|
Source113: patches.kabi.tar.bz2
|
|
|
|
Source120: kabi.tar.bz2
|
2011-05-21 07:04:56 +02:00
|
|
|
Source121: sysctl.tar.bz2
|
2011-10-05 07:01:45 +02:00
|
|
|
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
2016-06-26 16:47:43 +02:00
|
|
|
ExclusiveArch: aarch64 armv6hl armv7hl %ix86 ppc64 ppc64le s390x x86_64
|
2012-03-20 07:05:08 +01:00
|
|
|
%define kmp_target_cpu %_target_cpu
|
2016-06-26 16:47:43 +02:00
|
|
|
%ifarch %ix86
|
|
|
|
# Only i386/default supports i586, mark other flavors' packages as i686
|
|
|
|
%if ! %build_default
|
|
|
|
BuildArch: i686
|
|
|
|
# KMPs are always built as i586, because rpm does not allow to build
|
|
|
|
# subpackages for different architectures. Therefore, we change the
|
|
|
|
# /usr/src/linux-obj/<arch> symlink to i586.
|
|
|
|
%define kmp_target_cpu i586
|
|
|
|
%endif
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
# These files are found in the kernel-source package:
|
2014-04-01 08:03:05 +02:00
|
|
|
NoSource: 0
|
|
|
|
NoSource: 2
|
|
|
|
NoSource: 3
|
|
|
|
NoSource: 8
|
|
|
|
NoSource: 9
|
|
|
|
NoSource: 10
|
|
|
|
NoSource: 11
|
|
|
|
NoSource: 12
|
|
|
|
NoSource: 13
|
|
|
|
NoSource: 14
|
|
|
|
NoSource: 16
|
|
|
|
NoSource: 17
|
|
|
|
NoSource: 21
|
|
|
|
NoSource: 23
|
|
|
|
NoSource: 33
|
|
|
|
NoSource: 35
|
2015-02-12 08:04:40 +01:00
|
|
|
NoSource: 36
|
2014-04-01 08:03:05 +02:00
|
|
|
NoSource: 37
|
|
|
|
NoSource: 38
|
|
|
|
NoSource: 39
|
|
|
|
NoSource: 40
|
|
|
|
NoSource: 46
|
2016-06-26 16:47:43 +02:00
|
|
|
NoSource: 47
|
2014-04-01 08:03:05 +02:00
|
|
|
NoSource: 48
|
|
|
|
NoSource: 49
|
|
|
|
NoSource: 50
|
|
|
|
NoSource: 51
|
|
|
|
NoSource: 52
|
|
|
|
NoSource: 53
|
|
|
|
NoSource: 54
|
|
|
|
NoSource: 55
|
|
|
|
NoSource: 56
|
|
|
|
NoSource: 57
|
|
|
|
NoSource: 58
|
|
|
|
NoSource: 60
|
|
|
|
NoSource: 61
|
|
|
|
NoSource: 62
|
|
|
|
NoSource: 63
|
|
|
|
NoSource: 64
|
|
|
|
NoSource: 65
|
|
|
|
NoSource: 67
|
|
|
|
NoSource: 68
|
|
|
|
NoSource: 69
|
2014-04-15 08:02:51 +02:00
|
|
|
NoSource: 70
|
|
|
|
NoSource: 71
|
2014-08-18 08:02:31 +02:00
|
|
|
NoSource: 72
|
2016-12-13 08:07:16 +01:00
|
|
|
NoSource: 73
|
|
|
|
NoSource: 74
|
2018-04-04 08:43:11 +02:00
|
|
|
NoSource: 75
|
|
|
|
NoSource: 76
|
2018-04-19 23:07:42 +02:00
|
|
|
NoSource: 77
|
2014-04-01 08:03:05 +02:00
|
|
|
NoSource: 100
|
|
|
|
NoSource: 101
|
|
|
|
NoSource: 102
|
|
|
|
NoSource: 103
|
|
|
|
NoSource: 104
|
|
|
|
NoSource: 105
|
|
|
|
NoSource: 106
|
|
|
|
NoSource: 108
|
|
|
|
NoSource: 109
|
|
|
|
NoSource: 110
|
|
|
|
NoSource: 111
|
|
|
|
NoSource: 113
|
|
|
|
NoSource: 120
|
|
|
|
NoSource: 121
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
# The following KMPs have been integrated into the kernel package,
|
|
|
|
# grouped by the last product that contained them.
|
2013-10-03 08:02:42 +02:00
|
|
|
# Usage: obsolete_kmp <basename> <upper bound of shipped versions>
|
|
|
|
# Note that KMPs embed the version of the kernel built against, that's why
|
|
|
|
# the _3 suffix for 2.6.x-based KMPs
|
|
|
|
%define obsolete_kmp() Obsoletes: %1-kmp-%build_flavor <= %2 \
|
|
|
|
Provides: %1-kmp = %2 \
|
|
|
|
Provides: %1-kmp-%build_flavor = %2
|
2011-10-05 07:01:45 +02:00
|
|
|
# sles10 / 10.3
|
2013-10-03 08:02:42 +02:00
|
|
|
%obsolete_kmp iwlwifi 1.3.27_3
|
|
|
|
%obsolete_kmp ipw3945 1.2.2_3
|
|
|
|
# sled10 / 11.0
|
|
|
|
%obsolete_kmp uvcvideo r200_3
|
2011-10-05 07:01:45 +02:00
|
|
|
# sle11-ga
|
2013-10-03 08:02:42 +02:00
|
|
|
%obsolete_kmp enic 0.0.1_3
|
|
|
|
%obsolete_kmp fnic 1.0.0_3
|
|
|
|
%obsolete_kmp brocade-bfa 1.1.0.2_3
|
|
|
|
%obsolete_kmp kvm 78.2.6.30.1_3
|
|
|
|
%obsolete_kmp perfmon 2_3
|
|
|
|
%obsolete_kmp iwlagn-2-6-27 1.0_3
|
|
|
|
%obsolete_kmp msi-wmi 1.0_3
|
2011-10-05 07:01:45 +02:00
|
|
|
# 11.1
|
2013-10-03 08:02:42 +02:00
|
|
|
%obsolete_kmp quickcam 0.6.7
|
|
|
|
# sle11-sp1
|
2014-02-02 08:01:46 +01:00
|
|
|
%obsolete_kmp wacom 0.8.1_3
|
|
|
|
%obsolete_kmp btrfs 0_3
|
|
|
|
%obsolete_kmp brocade-bna 2.1.0.0_3
|
|
|
|
%obsolete_kmp hyper-v 0_3
|
|
|
|
%obsolete_kmp intel-e1000e 2.2.14
|
|
|
|
%obsolete_kmp drm 3.7_3.1
|
|
|
|
Obsoletes: firewire <= 3.0
|
|
|
|
Provides: firewire = 3.0
|
|
|
|
%obsolete_kmp firewire 3.0
|
|
|
|
%obsolete_kmp iwlagn 3.0
|
|
|
|
Obsoletes: compat-ath9k <= 3.0
|
|
|
|
Provides: compat-ath9k = 3.0
|
|
|
|
%obsolete_kmp compat-ath9k 3.0
|
|
|
|
%obsolete_kmp realtek-r8192ce_pci 2.6.0005_3
|
|
|
|
%obsolete_kmp realtek-r8192se_pci 2.6.0019.1207.2010_3
|
|
|
|
%obsolete_kmp rt3090 2.4.0.4_3
|
|
|
|
%obsolete_kmp rt3592 2.4.1.1_3
|
|
|
|
%obsolete_kmp rt5390 2.4.0.4_3
|
|
|
|
%obsolete_kmp ath3k 1.0_3
|
2015-11-30 08:05:48 +01:00
|
|
|
%obsolete_kmp compat-wireless 3.12
|
|
|
|
%obsolete_kmp rts5229 1.08
|
|
|
|
%obsolete_kmp rts_pstor 1.11
|
2016-06-26 16:47:43 +02:00
|
|
|
# sle12-sp1 / Leap 42.1
|
|
|
|
%obsolete_kmp xen 4.6.1
|
|
|
|
%obsolete_kmp compat-wireless 4.4
|
2016-12-30 08:06:15 +01:00
|
|
|
# TW 4.8
|
|
|
|
%obsolete_kmp ftsteutates 20160601
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
# Will modules not listed in supported.conf abort the kernel build (0/1)?
|
|
|
|
%define supported_modules_check 0
|
|
|
|
|
|
|
|
%description
|
|
|
|
The standard kernel - without any SUSE patches
|
|
|
|
|
2010-12-01 11:20:27 +01:00
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
%source_timestamp
|
2011-10-05 07:01:45 +02:00
|
|
|
%prep
|
2014-01-23 08:04:33 +01:00
|
|
|
if ! [ -e %{S:0} ]; then
|
2011-10-05 07:01:45 +02:00
|
|
|
echo "The %name-%version.nosrc.rpm package does not contain the" \
|
|
|
|
"complete sources. Please install kernel-source-%version.src.rpm."
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
SYMBOLS=
|
|
|
|
if test -e %_sourcedir/extra-symbols; then
|
|
|
|
SYMBOLS=$(cat %_sourcedir/extra-symbols)
|
|
|
|
echo "extra symbol(s):" $SYMBOLS
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Unpack all sources and patches
|
2017-06-14 16:35:28 +02:00
|
|
|
%setup -q -c -T -a 0 -a 100 -a 101 -a 102 -a 103 -a 104 -a 105 -a 106 -a 108 -a 109 -a 110 -a 111 -a 113 -a 120 -a 121
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
mkdir -p %kernel_build_dir
|
|
|
|
|
2013-10-07 08:01:22 +02:00
|
|
|
# Generate a list of modules with their support status marking
|
|
|
|
%_sourcedir/guards --list --with-guards <%_sourcedir/supported.conf | \
|
|
|
|
awk '
|
2016-06-26 16:47:43 +02:00
|
|
|
/\+external / {
|
2013-10-07 08:01:22 +02:00
|
|
|
print $(NF) " external";
|
|
|
|
next;
|
|
|
|
}
|
2016-06-26 16:47:43 +02:00
|
|
|
/^-/ {
|
2013-10-07 08:01:22 +02:00
|
|
|
print $(NF) " no";
|
|
|
|
next;
|
|
|
|
}
|
|
|
|
{
|
|
|
|
print $(NF);
|
|
|
|
}
|
|
|
|
' >%kernel_build_dir/Module.supported
|
2017-05-02 09:07:06 +02:00
|
|
|
subpackages=(
|
|
|
|
base
|
|
|
|
%if %CONFIG_SUSE_KERNEL_SUPPORTED == "y"
|
2018-04-19 23:07:42 +02:00
|
|
|
cluster-md-kmp dlm-kmp gfs2-kmp kselftests-kmp ocfs2-kmp
|
2017-05-02 09:07:06 +02:00
|
|
|
%endif
|
|
|
|
)
|
|
|
|
for package in "${subpackages[@]}"; do
|
2016-06-26 16:47:43 +02:00
|
|
|
%_sourcedir/guards --default=0 "$package" \
|
|
|
|
<%_sourcedir/supported.conf | sed 's,.*/,,; s,\.ko$,,' | \
|
|
|
|
sort -u >%kernel_build_dir/Module."$package"
|
|
|
|
done
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
cd linux-%srcversion
|
|
|
|
|
|
|
|
%_sourcedir/apply-patches \
|
|
|
|
%if %{build_vanilla}
|
|
|
|
--vanilla \
|
|
|
|
%endif
|
|
|
|
%_sourcedir/series.conf .. $SYMBOLS
|
|
|
|
|
|
|
|
cd %kernel_build_dir
|
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
# Override the timestamp 'uname -v' reports with the source timestamp and
|
|
|
|
# the commit hash.
|
|
|
|
date=$(head -n 1 %_sourcedir/source-timestamp)
|
|
|
|
commit=$(sed -n 's/GIT Revision: //p' %_sourcedir/source-timestamp)
|
|
|
|
cat > .kernel-binary.spec.buildenv <<EOF
|
|
|
|
export KBUILD_BUILD_TIMESTAMP="$(LANG=C date -d "$date") (${commit:0:7})"
|
|
|
|
export KBUILD_VERBOSE=0
|
|
|
|
export KBUILD_SYMTYPES=1
|
|
|
|
export KBUILD_OVERRIDE=1
|
|
|
|
export KBUILD_BUILD_USER=geeko
|
|
|
|
export KBUILD_BUILD_HOST=buildhost
|
|
|
|
export HOST_EXTRACFLAGS="-include %_sourcedir/host-memcpy-hack.h"
|
|
|
|
EOF
|
|
|
|
source .kernel-binary.spec.buildenv
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
if [ -f %_sourcedir/localversion ] ; then
|
|
|
|
cat %_sourcedir/localversion > localversion
|
|
|
|
fi
|
|
|
|
|
2016-06-26 16:47:43 +02:00
|
|
|
vanilla_base="default"
|
|
|
|
%ifarch %ix86
|
|
|
|
vanilla_base="pae"
|
|
|
|
%endif
|
|
|
|
if ! grep -q CONFIG_MMU= "%my_builddir/config/%cpu_arch_flavor"; then
|
|
|
|
cp "%my_builddir/config/%cpu_arch/$vanilla_base" .config
|
|
|
|
../scripts/kconfig/merge_config.sh -m .config \
|
|
|
|
%my_builddir/config/%cpu_arch_flavor
|
|
|
|
else
|
2015-10-27 08:06:34 +01:00
|
|
|
cp %my_builddir/config/%cpu_arch_flavor .config
|
2016-06-26 16:47:43 +02:00
|
|
|
fi
|
2014-08-18 08:02:31 +02:00
|
|
|
if test -e %my_builddir/config.addon/%cpu_arch_flavor; then
|
2011-10-05 07:01:45 +02:00
|
|
|
# FIXME: config.addon doesn't affect the %CONFIG_ macros defined at
|
|
|
|
# the top of the specfile
|
2015-10-27 08:06:34 +01:00
|
|
|
../scripts/kconfig/merge_config.sh -m .config %my_builddir/config.addon/%cpu_arch_flavor
|
2011-10-05 07:01:45 +02:00
|
|
|
fi
|
2018-04-04 08:43:11 +02:00
|
|
|
|
|
|
|
CONFIG_SUSE_KERNEL_RELEASED="--disable CONFIG_SUSE_KERNEL_RELEASED"
|
|
|
|
%if 0%{?_project:1}
|
|
|
|
if echo %_project | egrep -qx -f %_sourcedir/release-projects; then
|
|
|
|
CONFIG_SUSE_KERNEL_RELEASED="--enable CONFIG_SUSE_KERNEL_RELEASED"
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
2015-10-27 08:06:34 +01:00
|
|
|
../scripts/config \
|
2013-05-09 08:08:40 +02:00
|
|
|
--set-str CONFIG_LOCALVERSION -%source_rel-%build_flavor \
|
2011-10-05 07:01:45 +02:00
|
|
|
--enable CONFIG_SUSE_KERNEL \
|
2018-04-04 08:43:11 +02:00
|
|
|
$CONFIG_SUSE_KERNEL_RELEASED \
|
2011-10-05 07:01:45 +02:00
|
|
|
%if 0%{?__debug_package:1}
|
2016-10-04 10:11:34 +02:00
|
|
|
--enable CONFIG_DEBUG_INFO
|
2011-10-05 07:01:45 +02:00
|
|
|
%else
|
|
|
|
--disable CONFIG_DEBUG_INFO
|
|
|
|
%endif
|
|
|
|
|
2017-06-14 16:35:28 +02:00
|
|
|
makeoutputsync=
|
|
|
|
if make --output-sync --help >/dev/null 2>&1 ; then
|
|
|
|
makeoutputsync=--output-sync
|
|
|
|
else
|
|
|
|
echo make does not support --output-sync flag. Build messages may be mangled. 1>&2
|
|
|
|
fi
|
|
|
|
MAKE_ARGS="$MAKE_ARGS $makeoutputsync %{?_smp_mflags}"
|
|
|
|
echo export MAKE_ARGS=\""$MAKE_ARGS"\" >> .kernel-binary.spec.buildenv
|
|
|
|
|
|
|
|
KERN_DIRS="-C .. O=$PWD"
|
2011-10-05 07:01:45 +02:00
|
|
|
if test -e %_sourcedir/TOLERATE-UNKNOWN-NEW-CONFIG-OPTIONS; then
|
2017-06-14 16:35:28 +02:00
|
|
|
yes '' | make oldconfig $MAKE_ARGS $KERN_DIRS
|
2011-10-05 07:01:45 +02:00
|
|
|
else
|
|
|
|
cp .config .config.orig
|
2017-06-14 16:35:28 +02:00
|
|
|
make silentoldconfig $MAKE_ARGS $KERN_DIRS < /dev/null
|
2011-10-05 07:01:45 +02:00
|
|
|
%_sourcedir/check-for-config-changes .config.orig .config
|
|
|
|
rm .config.orig
|
|
|
|
fi
|
|
|
|
|
|
|
|
make prepare $MAKE_ARGS
|
|
|
|
make scripts $MAKE_ARGS
|
|
|
|
krel=$(make -s kernelrelease $MAKE_ARGS)
|
|
|
|
|
|
|
|
if [ "$krel" != "%kernelrelease-%build_flavor" ]; then
|
|
|
|
echo "Kernel release mismatch: $krel != %kernelrelease-%build_flavor" >&2
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
make clean $MAKE_ARGS
|
|
|
|
|
|
|
|
rm -f source
|
2016-06-26 16:47:43 +02:00
|
|
|
find . ! -type d ! -name 'Module.base' ! -name 'Module.*-kmp' -printf '%%P\n' \
|
|
|
|
> %my_builddir/obj-files
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%build
|
|
|
|
cd %kernel_build_dir
|
|
|
|
source .kernel-binary.spec.buildenv
|
|
|
|
|
|
|
|
# create *.symref files in the tree
|
|
|
|
if test -e %my_builddir/kabi/%cpu_arch/symtypes-%build_flavor; then
|
|
|
|
%_sourcedir/modversions --unpack . < $_
|
|
|
|
fi
|
|
|
|
|
2016-08-02 08:03:59 +02:00
|
|
|
# copy module signing certificate(s). We use the default path and trick
|
|
|
|
# certs/Makefile to not regenerate the certificate. It is done this way so
|
|
|
|
# that the kernel-source package can be rebuilt even without the certificate
|
|
|
|
mkdir -p certs
|
2015-02-12 08:04:40 +01:00
|
|
|
for f in %_sourcedir/*.crt; do
|
|
|
|
if ! test -e "$f"; then
|
|
|
|
continue
|
|
|
|
fi
|
2016-08-02 08:03:59 +02:00
|
|
|
touch certs/x509.genkey
|
|
|
|
cat "$f" >>certs/signing_key.pem
|
2015-02-12 08:04:40 +01:00
|
|
|
done
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%if %CONFIG_KMSG_IDS == "y"
|
2014-08-18 08:02:31 +02:00
|
|
|
chmod +x ../scripts/kmsg-doc
|
2012-01-06 07:02:55 +01:00
|
|
|
MAKE_ARGS="$MAKE_ARGS D=2"
|
2011-10-05 07:01:45 +02:00
|
|
|
%endif
|
|
|
|
|
2017-02-21 08:08:23 +01:00
|
|
|
mkdir -p %_topdir/OTHER
|
|
|
|
log=%_topdir/OTHER/make-stderr.log
|
2012-01-06 07:02:55 +01:00
|
|
|
while true; do
|
2017-02-21 08:08:23 +01:00
|
|
|
make all $MAKE_ARGS 2> >(tee "$log")
|
2012-01-06 07:02:55 +01:00
|
|
|
if test "${PIPESTATUS[0]}" -eq 0; then
|
|
|
|
break
|
|
|
|
fi
|
|
|
|
# In the linux-next and vanilla branches, we try harder to build a
|
|
|
|
# package.
|
|
|
|
if test 0%vanilla_only -gt 0 &&
|
2017-02-21 08:08:23 +01:00
|
|
|
%_sourcedir/try-disable-staging-driver "$log"; then
|
2012-01-06 07:02:55 +01:00
|
|
|
echo "Retrying make"
|
|
|
|
else
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
done
|
|
|
|
|
2018-04-19 23:07:42 +02:00
|
|
|
# Generate list of symbols that are used to create kernel livepatches
|
|
|
|
%if ! 0%{?skip_klp_symbols:1}
|
|
|
|
%_sourcedir/klp-symbols . Symbols.list
|
|
|
|
%endif
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%install
|
|
|
|
|
2015-02-12 08:04:40 +01:00
|
|
|
# sign the modules, firmware and possibly the kernel in the buildservice
|
2017-05-02 09:07:06 +02:00
|
|
|
BRP_PESIGN_FILES=""
|
2013-03-01 08:07:50 +01:00
|
|
|
%if %CONFIG_EFI_STUB == "y"
|
2017-05-02 09:07:06 +02:00
|
|
|
BRP_PESIGN_FILES="/boot/vmlinuz-%kernelrelease-%build_flavor"
|
|
|
|
%endif
|
|
|
|
%if %CONFIG_MODULE_SIG == "y"
|
|
|
|
BRP_PESIGN_FILES="$BRP_PESIGN_FILES *.ko"
|
2013-03-01 08:07:50 +01:00
|
|
|
%endif
|
2016-06-26 16:47:43 +02:00
|
|
|
%ifarch %ix86
|
|
|
|
# XXX: do not sign on x86, as the repackaging changes kernel-pae
|
|
|
|
# from i686 to i586
|
|
|
|
BRP_PESIGN_FILES=""
|
|
|
|
%endif
|
2017-05-02 09:07:06 +02:00
|
|
|
export BRP_PESIGN_FILES
|
2013-03-01 08:07:50 +01:00
|
|
|
|
2011-10-05 07:01:45 +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
|
|
|
|
export STRIP_KEEP_SYMTAB='*/vmlinux-*'
|
|
|
|
|
2015-02-12 08:04:40 +01:00
|
|
|
# /lib/modules/%kernelrelease-%build_flavor/source points to the source
|
|
|
|
# directory installed by kernel-devel. The kernel-%build_flavor-devel package
|
|
|
|
# has a correct dependency on kernel-devel, but the brp check does not see
|
|
|
|
# kernel-devel during build.
|
2011-10-05 07:01:45 +02:00
|
|
|
export NO_BRP_STALE_LINK_ERROR=yes
|
|
|
|
|
|
|
|
cd %kernel_build_dir
|
|
|
|
|
|
|
|
mkdir -p %buildroot/boot
|
|
|
|
# (Could strip out non-public symbols.)
|
|
|
|
cp -p System.map %buildroot/boot/System.map-%kernelrelease-%build_flavor
|
|
|
|
|
|
|
|
add_vmlinux()
|
|
|
|
{
|
2014-06-05 08:02:39 +02:00
|
|
|
local vmlinux=boot/vmlinux-%kernelrelease-%build_flavor
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2010-12-01 11:20:27 +01:00
|
|
|
cp vmlinux %buildroot/$vmlinux
|
2014-06-05 08:02:39 +02:00
|
|
|
# make sure that find-debuginfo.sh picks it up. In the filelist, we
|
|
|
|
# mark the file 0644 again
|
|
|
|
chmod +x %buildroot/$vmlinux
|
|
|
|
if test $1 == "--compressed"; then
|
2014-08-18 08:02:31 +02:00
|
|
|
# avoid using the gzip -n option to make kdump happy (bnc#880848#c20)
|
|
|
|
ts="$(head -n1 %_sourcedir/source-timestamp)"
|
|
|
|
touch -d "$ts" %buildroot/$vmlinux
|
|
|
|
touch %buildroot/$vmlinux.gz
|
2014-05-27 08:00:59 +02:00
|
|
|
%if 0%{?__debug_package:1}
|
2014-08-18 08:02:31 +02:00
|
|
|
# compress the vmlinux image after find-debuginfo.sh has processed it
|
|
|
|
%global __debug_install_post %__debug_install_post \
|
|
|
|
%_sourcedir/compress-vmlinux.sh %buildroot/boot/vmlinux-%kernelrelease-%build_flavor
|
|
|
|
%else
|
|
|
|
%_sourcedir/compress-vmlinux.sh %buildroot/$vmlinux
|
|
|
|
%endif
|
2014-06-05 08:02:39 +02:00
|
|
|
ghost_vmlinux=true
|
|
|
|
else
|
|
|
|
ghost_vmlinux=false
|
2011-10-05 07:01:45 +02:00
|
|
|
fi
|
|
|
|
}
|
|
|
|
|
|
|
|
# architecture specifics
|
|
|
|
%ifarch %ix86 x86_64
|
|
|
|
add_vmlinux --compressed
|
2010-12-01 11:20:27 +01:00
|
|
|
image=bzImage
|
2011-10-05 07:01:45 +02:00
|
|
|
cp -p arch/x86/boot/$image %buildroot/boot/vmlinuz-%kernelrelease-%build_flavor
|
|
|
|
image=vmlinuz
|
|
|
|
%endif
|
2014-01-23 08:04:33 +01:00
|
|
|
%ifarch ppc ppc64 ppc64le
|
2011-10-05 07:01:45 +02:00
|
|
|
add_vmlinux
|
|
|
|
image=vmlinux
|
|
|
|
%endif
|
|
|
|
%ifarch s390 s390x
|
|
|
|
add_vmlinux --compressed
|
|
|
|
cp -p arch/s390/boot/image %buildroot/boot/image-%kernelrelease-%build_flavor
|
|
|
|
image=image
|
|
|
|
if test -e arch/s390/boot/kerntypes.o; then
|
|
|
|
cp -p arch/s390/boot/kerntypes.o %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor
|
|
|
|
elif test -x "$(which dwarfextract 2>/dev/null)"; then
|
|
|
|
dwarfextract vmlinux %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor || echo "dwarfextract failed ($?)"
|
|
|
|
fi
|
|
|
|
%if %CONFIG_KMSG_IDS == "y"
|
|
|
|
mkdir -p %buildroot/usr/share/man/man9
|
|
|
|
find man -name '*.9' -exec install -m 644 -D '{}' %buildroot/usr/share/man/man9/ ';'
|
|
|
|
%endif
|
|
|
|
%endif
|
2012-01-06 07:02:55 +01:00
|
|
|
%ifarch %arm
|
|
|
|
add_vmlinux --compressed
|
2014-10-09 08:03:01 +02:00
|
|
|
image=zImage
|
2013-02-21 08:06:32 +01:00
|
|
|
cp -p arch/arm/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
|
2012-01-06 07:02:55 +01:00
|
|
|
%endif
|
2013-03-02 08:07:41 +01:00
|
|
|
%ifarch aarch64
|
|
|
|
add_vmlinux --compressed
|
|
|
|
image=Image
|
|
|
|
cp -p arch/arm64/boot/$image %buildroot/boot/$image-%kernelrelease-%build_flavor
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2014-06-05 08:02:39 +02:00
|
|
|
if test -x /usr/lib/rpm/pesign/gen-hmac; then
|
|
|
|
$_ -r %buildroot /boot/$image-%kernelrelease-%build_flavor
|
|
|
|
fi
|
2013-03-29 08:03:08 +01:00
|
|
|
|
2013-05-01 08:12:39 +02:00
|
|
|
# Package the compiled-in certificates as DER files in /etc/uefi/certs
|
|
|
|
# and have mokutil enroll them when the kernel is installed
|
|
|
|
certs=()
|
|
|
|
if test %CONFIG_MODULE_SIG = "y"; then
|
2017-05-02 09:07:06 +02:00
|
|
|
for f in %_sourcedir/*.crt; do
|
2013-05-01 08:12:39 +02:00
|
|
|
if ! test -s "$f"; then
|
|
|
|
continue
|
|
|
|
fi
|
2017-05-02 09:07:06 +02:00
|
|
|
h=$(openssl x509 -inform PEM -fingerprint -noout -in "$f")
|
2013-05-01 08:12:39 +02:00
|
|
|
test -n "$h"
|
|
|
|
cert=/etc/uefi/certs/$(echo "$h" | \
|
|
|
|
sed -rn 's/^SHA1 Fingerprint=//; T; s/://g; s/(.{8}).*/\1/p').crt
|
2013-05-21 08:07:11 +02:00
|
|
|
if test -e %buildroot/"$cert"; then
|
|
|
|
continue
|
|
|
|
fi
|
2013-05-01 08:12:39 +02:00
|
|
|
mkdir -p %buildroot/etc/uefi/certs
|
2017-05-02 09:07:06 +02:00
|
|
|
openssl x509 -inform PEM -in "$f" -outform DER -out %buildroot/"$cert"
|
2013-05-01 08:12:39 +02:00
|
|
|
certs=("${certs[@]}" "$cert")
|
|
|
|
done
|
|
|
|
fi
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
for sub in '-base' '' '-extra'; do
|
|
|
|
case "$sub" in
|
|
|
|
'-base' | '') base_package=1 ;;
|
|
|
|
*) base_package=0 ;;
|
|
|
|
esac
|
|
|
|
for script in preun postun pre post devel-pre devel-post; do
|
2016-01-20 08:45:34 +01:00
|
|
|
if test %build_flavor = "zfcpdump"; then
|
|
|
|
: >%my_builddir/$script$sub.sh
|
|
|
|
continue
|
|
|
|
fi
|
2011-10-05 07:01:45 +02:00
|
|
|
sed -e "s:@KERNELRELEASE@:%kernelrelease:g" \
|
|
|
|
-e "s:@IMAGE@:$image:g" \
|
|
|
|
-e "s:@FLAVOR""@:%build_flavor:g" \
|
|
|
|
-e "s:@SUBPACKAGE@:%name$sub:g" \
|
|
|
|
-e "s:@BASE_PACKAGE@:$base_package:g" \
|
|
|
|
-e "s:@RPM_VERSION_RELEASE@:%version-%release:g" \
|
|
|
|
-e "s:@RPM_TARGET_CPU@:%_target_cpu:g" \
|
|
|
|
-e "s:@CPU_ARCH_FLAVOR@:%cpu_arch_flavor:g" \
|
|
|
|
-e "s:@SRCVARIANT@:%variant:g" \
|
|
|
|
%_sourcedir/$script.sh > %my_builddir/$script$sub.sh
|
2013-05-21 08:07:11 +02:00
|
|
|
if test "$base_package" -eq 1 -a "${#certs[@]}" -gt 0; then
|
|
|
|
case "$script" in
|
|
|
|
preun | postun | post)
|
|
|
|
# Copy the respective scriptlet from kernel-cert-subpackage
|
|
|
|
sed "1,/^%%$script / d; /^%%[^%%]/,\$ d; s:@CERTS@:${certs[*]}:g" \
|
|
|
|
%_sourcedir/kernel-cert-subpackage \
|
|
|
|
>>"%my_builddir/$script$sub.sh"
|
|
|
|
esac
|
2013-05-01 08:12:39 +02:00
|
|
|
fi
|
2013-05-21 08:07:11 +02:00
|
|
|
# Do an exit 0 at the end of each scriptlet. If the last real command
|
|
|
|
# in the scriptlet (e.g. update-bootloader call, see bnc#809617)
|
|
|
|
# returns an error, we do not want to amplify the damage by leaving
|
|
|
|
# the system in an inconsistent state.
|
|
|
|
echo "exit 0" >>"%my_builddir/$script$sub.sh"
|
2011-10-05 07:01:45 +02:00
|
|
|
done
|
|
|
|
done
|
|
|
|
|
2016-06-26 16:47:43 +02:00
|
|
|
%if %build_vanilla
|
2011-10-05 07:01:45 +02:00
|
|
|
# keep this -suffix list in sync with post.sh and postun.sh
|
|
|
|
suffix=-%build_flavor
|
|
|
|
%endif
|
|
|
|
ln -s $image$suffix %buildroot/boot/$image$suffix
|
|
|
|
ln -s initrd$suffix %buildroot/boot/initrd$suffix
|
|
|
|
|
2010-12-15 07:00:53 +01:00
|
|
|
cp -p .config %buildroot/boot/config-%kernelrelease-%build_flavor
|
2011-05-21 07:04:56 +02:00
|
|
|
sysctl_file=%buildroot/boot/sysctl.conf-%kernelrelease-%build_flavor
|
|
|
|
for file in %my_builddir/sysctl/{defaults,%cpu_arch/arch-defaults,%cpu_arch_flavor}; do
|
|
|
|
if [ -f "$file" ]; then
|
|
|
|
cat "$file"
|
|
|
|
fi
|
|
|
|
done | sed '1i # Generated file - do not edit.' >$sysctl_file
|
|
|
|
if [ ! -s $sysctl_file ]; then
|
|
|
|
rm $sysctl_file
|
|
|
|
fi
|
2011-10-05 07:01:45 +02: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
|
2014-08-18 08:02:31 +02:00
|
|
|
rm -rf %buildroot/lib/modules/%kernelrelease-%build_flavor/vdso/.build-id
|
2011-10-05 07:01:45 +02:00
|
|
|
%endif
|
|
|
|
|
|
|
|
# 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-%build_flavor \
|
|
|
|
bs=1024 seek=2047 count=1
|
2014-06-05 08:02:39 +02:00
|
|
|
# Also reserve some space for the kdump initrd
|
|
|
|
cp %buildroot/boot/initrd-%kernelrelease-%build_flavor{,-kdump}
|
2011-10-05 07:01:45 +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
|
2018-02-17 08:02:43 +01:00
|
|
|
install -m 755 -D -t %rpm_install_dir/%cpu_arch_flavor/scripts/mod/ scripts/mod/ksym-provides
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2011-07-25 07:01:42 +02:00
|
|
|
gzip -n -c9 < Module.symvers > %buildroot/boot/symvers-%kernelrelease-%build_flavor.gz
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
make modules_install $MAKE_ARGS INSTALL_MOD_PATH=%buildroot
|
|
|
|
|
|
|
|
%ifarch s390 s390x
|
|
|
|
if test -e arch/s390/boot/kerntypes.o; then
|
|
|
|
:
|
|
|
|
elif test -x "$(which dwarfextract 2>/dev/null)" -a \
|
|
|
|
-f %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor; then
|
|
|
|
find %buildroot -name "*.ko" > kofiles.list
|
|
|
|
dwarfextract %buildroot/boot/Kerntypes-%kernelrelease-%build_flavor -C kofiles.list || echo "dwarfextract failed ($?)"
|
|
|
|
fi
|
|
|
|
%endif
|
|
|
|
|
|
|
|
# Also put the resulting file in %rpm_install_dir/%cpu_arch/%build_flavor
|
|
|
|
# so that kernel-devel + kernel-%build_flavor is sufficient for building
|
|
|
|
# modules that have modversions as well.
|
|
|
|
mkdir -p %rpm_install_dir/%cpu_arch/%build_flavor
|
|
|
|
cp Module.symvers %rpm_install_dir/%cpu_arch/%build_flavor
|
|
|
|
|
2018-04-19 23:07:42 +02:00
|
|
|
# List of symbols that are used to generate kernel livepatches
|
|
|
|
%if ! 0%{?skip_klp_symbols:1}
|
|
|
|
cp Symbols.list %rpm_install_dir/%cpu_arch/%build_flavor
|
|
|
|
%endif
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
# Table of types used in exported symbols (for modversion debugging).
|
|
|
|
%_sourcedir/modversions --pack . > %buildroot/boot/symtypes-%kernelrelease-%build_flavor
|
|
|
|
if [ -s %buildroot/boot/symtypes-%kernelrelease-%build_flavor ]; then
|
2011-07-25 07:01:42 +02:00
|
|
|
gzip -n -9 %buildroot/boot/symtypes-%kernelrelease-%build_flavor
|
2011-10-05 07:01:45 +02:00
|
|
|
else
|
|
|
|
rm -f %buildroot/boot/symtypes-%kernelrelease-%build_flavor
|
|
|
|
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.
|
2012-03-20 07:05:08 +01:00
|
|
|
if [ ! -e %rpm_install_dir/%kmp_target_cpu ]; then
|
|
|
|
ln -sf %cpu_arch %rpm_install_dir/%kmp_target_cpu
|
|
|
|
ln -sf %cpu_arch %buildroot/usr/src/linux-obj/%kmp_target_cpu
|
2011-10-05 07:01:45 +02:00
|
|
|
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
|
|
|
|
# build symlink.
|
|
|
|
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
|
|
|
|
|
|
|
|
# Abort if there are any undefined symbols
|
|
|
|
msg="$(/sbin/depmod -F %buildroot/boot/System.map-%kernelrelease-%build_flavor \
|
|
|
|
-b %buildroot -ae %kernelrelease-%build_flavor 2>&1)"
|
|
|
|
if [ $? -ne 0 ] || echo "$msg" | grep 'needs unknown symbol'; then
|
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
|
|
|
%_sourcedir/split-modules -d %buildroot \
|
|
|
|
-o %my_builddir \
|
2016-06-26 16:47:43 +02:00
|
|
|
-b %kernel_build_dir \
|
2013-10-07 08:01:22 +02:00
|
|
|
%if %CONFIG_SUSE_KERNEL_SUPPORTED == "y"
|
|
|
|
-e \
|
|
|
|
%endif
|
2011-03-16 07:03:17 +01:00
|
|
|
%if ! %supported_modules_check
|
2013-10-07 08:01:22 +02:00
|
|
|
-i
|
2011-03-16 07:03:17 +01:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
%if ! %split_extra
|
|
|
|
cat %my_builddir/unsupported-modules >>%my_builddir/main-modules
|
|
|
|
%endif
|
|
|
|
|
2016-06-26 16:47:43 +02:00
|
|
|
# The modules.dep file is sorted randomly which produces strange file
|
|
|
|
# checksums. As the file is not included in the resulting RPM, it's
|
|
|
|
# pointless to rely on its contents. Replacing by zeros to make the
|
|
|
|
# checksums always the same for several builds of the same package.
|
2017-11-02 08:03:00 +01:00
|
|
|
test -s %buildroot/lib/modules/%kernelrelease-%build_flavor/modules.dep && \
|
2016-06-26 16:47:43 +02:00
|
|
|
dd if=/dev/zero of=%buildroot/lib/modules/%kernelrelease-%build_flavor/modules.dep ibs=`stat -c%s %buildroot/lib/modules/%kernelrelease-%build_flavor/modules.dep` count=1
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
res=0
|
|
|
|
if test -e %my_builddir/kabi/%cpu_arch/symvers-%build_flavor; then
|
|
|
|
# check for kabi changes
|
|
|
|
%_sourcedir/kabi.pl --rules %my_builddir/kabi/severities \
|
|
|
|
%my_builddir/kabi/%cpu_arch/symvers-%build_flavor \
|
|
|
|
Module.symvers || res=$?
|
|
|
|
fi
|
|
|
|
if [ $res -ne 0 ]; then
|
2012-10-22 08:06:03 +02:00
|
|
|
# %ignore_kabi_badness is defined in the Kernel:* projects in the
|
|
|
|
# OBS to be able to build the KOTD in spite of kabi errors
|
|
|
|
if [ 0%{?ignore_kabi_badness} -eq 0 -a \
|
|
|
|
! -e %my_builddir/kabi/%cpu_arch/ignore-%build_flavor -a \
|
|
|
|
! -e %_sourcedir/IGNORE-KABI-BADNESS ]; then
|
2011-10-05 07:01:45 +02:00
|
|
|
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
|
|
|
|
|
2018-04-04 08:43:11 +02:00
|
|
|
# Check the license in each module
|
|
|
|
if ! sh %_sourcedir/check-module-license %buildroot; then
|
|
|
|
echo "Please fix the missing licenses!"
|
|
|
|
%if %CONFIG_SUSE_KERNEL_SUPPORTED == "y"
|
|
|
|
exit 1
|
|
|
|
%endif
|
|
|
|
fi
|
|
|
|
|
2017-09-09 08:03:11 +02:00
|
|
|
# These files are required for building external modules
|
|
|
|
for FILE in arch/powerpc/lib/crtsavres.o arch/arm64/kernel/ftrace-mod.o; do
|
|
|
|
if [ -f %kernel_build_dir/$FILE ]; then
|
|
|
|
echo $FILE >> %my_builddir/obj-files
|
|
|
|
fi
|
|
|
|
done
|
2012-04-03 07:04:10 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
tar -cf - -T %my_builddir/obj-files | \
|
|
|
|
tar -xf - -C %rpm_install_dir/%cpu_arch_flavor
|
|
|
|
# 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
|
2014-08-18 08:02:31 +02:00
|
|
|
# Recreate the generated Makefile with correct path
|
2016-01-26 08:03:18 +01:00
|
|
|
sh ../scripts/mkmakefile ../../../%{basename:%src_install_dir} \
|
2014-08-18 08:02:31 +02:00
|
|
|
%rpm_install_dir/%cpu_arch_flavor \
|
2014-08-22 08:03:45 +02:00
|
|
|
$(echo %srcversion | sed -r 's/^([0-9]+)\.([0-9]+).*/\1 \2/')
|
2011-10-05 07:01:45 +02:00
|
|
|
fi
|
|
|
|
|
2017-09-08 08:03:12 +02:00
|
|
|
rm -rf %{buildroot}/lib/firmware
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
add_dirs_to_filelist() {
|
|
|
|
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
|
|
|
|
}
|
|
|
|
|
|
|
|
# Collect the file lists.
|
2014-06-05 08:02:39 +02:00
|
|
|
shopt -s nullglob dotglob
|
2011-10-05 07:01:45 +02:00
|
|
|
> %my_builddir/kernel-devel.files
|
2012-01-06 07:02:55 +01:00
|
|
|
for file in %buildroot/boot/symtypes* %buildroot/lib/modules/*/{build,source}; do
|
2011-10-05 07:01:45 +02:00
|
|
|
f=${file##%buildroot}
|
2015-02-12 08:04:40 +01:00
|
|
|
echo "$f"
|
|
|
|
done | add_dirs_to_filelist >%my_builddir/kernel-devel.files
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
{ cd %buildroot
|
2014-06-05 08:02:39 +02:00
|
|
|
for f in boot/*; do
|
|
|
|
if test -L "$f"; then
|
|
|
|
echo "%%ghost /$f"
|
|
|
|
continue
|
|
|
|
elif test ! -f "$f"; then
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
case "$f" in
|
|
|
|
boot/initrd-*)
|
|
|
|
echo "%%ghost /$f"
|
|
|
|
continue
|
|
|
|
;;
|
|
|
|
boot/vmlinux-*.gz)
|
|
|
|
;;
|
|
|
|
boot/vmlinux-*)
|
|
|
|
if $ghost_vmlinux; then
|
|
|
|
echo "%%ghost /$f"
|
|
|
|
continue
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
boot/symtypes*)
|
|
|
|
continue
|
|
|
|
;;
|
|
|
|
esac
|
|
|
|
echo "%%attr(0644, root, root) /$f"
|
|
|
|
done
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
if [ %CONFIG_MODULES = y ]; then
|
|
|
|
find lib/modules/%kernelrelease-%build_flavor \
|
|
|
|
-type d -o \
|
|
|
|
\( -path '*/modules.*' ! -path '*/modules.order' \
|
|
|
|
! -path '*/modules.builtin' \) -printf '%%%%ghost /%%p\n' \
|
2014-06-05 08:02:39 +02:00
|
|
|
-o -name '*.ko' -prune -o -type f -printf '/%%p\n'
|
2011-10-05 07:01:45 +02:00
|
|
|
cat %my_builddir/base-modules
|
|
|
|
fi
|
2016-01-20 08:45:34 +01:00
|
|
|
if test %CONFIG_MODULE_SIG = "y" -a -d etc/uefi/certs; then
|
2013-05-01 08:12:39 +02:00
|
|
|
find etc/uefi/certs -type f -printf '/%%p\n'
|
|
|
|
fi
|
2016-06-26 16:47:43 +02:00
|
|
|
if test -d lib/firmware/%kernelrelease-%build_flavor; then
|
|
|
|
echo "%%dir /lib/firmware/%kernelrelease-%build_flavor"
|
|
|
|
cat %my_builddir/base-firmware
|
2016-05-26 08:04:03 +02:00
|
|
|
fi
|
2011-10-05 07:01:45 +02:00
|
|
|
if [ -e .%_docdir/%name ]; then
|
|
|
|
echo "%%doc %_docdir/%name"
|
|
|
|
fi
|
2014-06-05 08:02:39 +02:00
|
|
|
} | sort -u | add_dirs_to_filelist >%my_builddir/kernel-base.files
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2016-06-26 16:47:43 +02:00
|
|
|
{
|
|
|
|
add_dirs_to_filelist %my_builddir/{kernel-base.files,main-modules}
|
|
|
|
if test -d %buildroot/lib/firmware/%kernelrelease-%build_flavor; then
|
|
|
|
echo "/lib/firmware/%kernelrelease-%build_flavor"
|
|
|
|
fi
|
|
|
|
} > %my_builddir/kernel-main.files
|
2011-10-05 07:01:45 +02:00
|
|
|
%if %split_extra
|
|
|
|
add_dirs_to_filelist %my_builddir/unsupported-modules > %my_builddir/kernel-extra.files
|
|
|
|
%endif
|
2016-06-26 16:47:43 +02:00
|
|
|
for f in %my_builddir/*-kmp-modules; do
|
|
|
|
f2=${f%%-modules}.files
|
|
|
|
add_dirs_to_filelist "$f" >"$f2"
|
|
|
|
done
|
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
# Hardlink duplicate files automatically (from package fdupes): It doesn't save
|
2011-02-11 07:03:11 +01:00
|
|
|
# much, but it keeps rpmlint from breaking the package build. Note that we skip
|
|
|
|
# /usr/src/linux-obj intentionally, to not accidentally break timestamps there
|
|
|
|
%fdupes $RPM_BUILD_ROOT/lib
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%preun -f preun.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%postun -f postun.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%pre -f pre.sh
|
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
%post -f post.sh
|
2011-10-14 11:30:53 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%files -f kernel-main.files
|
2012-01-06 07:02:55 +01:00
|
|
|
%defattr(-, root, root)
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2016-12-13 08:07:16 +01:00
|
|
|
%if %CONFIG_MODULES == "y"
|
2011-10-05 07:01:45 +02:00
|
|
|
%package base
|
|
|
|
Summary: The Standard Kernel - without any SUSE patches - base modules
|
|
|
|
Group: System/Kernel
|
|
|
|
Url: http://www.kernel.org/
|
2010-12-01 11:20:27 +01:00
|
|
|
Provides: kernel-base = %version-%source_rel
|
2014-02-02 08:01:46 +01:00
|
|
|
Provides: multiversion(kernel)
|
2018-04-04 08:43:11 +02:00
|
|
|
Conflicts: %name = %version-%source_rel
|
2011-10-05 07:01:45 +02:00
|
|
|
Requires(pre): coreutils awk
|
2016-03-15 08:05:00 +01:00
|
|
|
# For /usr/lib/module-init-tools/weak-modules2
|
|
|
|
Requires(post): suse-module-tools
|
|
|
|
# For depmod (modutils is a dependency provided by both module-init-tools and
|
|
|
|
# kmod-compat)
|
2014-02-02 08:01:46 +01:00
|
|
|
Requires(post): modutils
|
2016-03-15 08:05:00 +01:00
|
|
|
# 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.
|
|
|
|
# Need a perl-Bootloader with /usr/lib/bootloader/bootloader_entry
|
|
|
|
Requires(post): perl-Bootloader >= 0.4.15
|
|
|
|
%if %build_vanilla
|
2011-10-05 07:01:45 +02:00
|
|
|
Requires(post): mkinitrd
|
2016-03-15 08:05:00 +01:00
|
|
|
%else
|
|
|
|
# Require a mkinitrd that can handle usbhid/hid-generic built-in (bnc#773559)
|
|
|
|
Requires(post): mkinitrd >= 2.7.1
|
|
|
|
%endif
|
|
|
|
# Install the package providing /etc/SuSE-release early enough, so that
|
|
|
|
# the grub entry has correct title (bnc#757565)
|
|
|
|
Requires(post): distribution-release
|
2017-12-16 08:02:58 +01:00
|
|
|
# Do not install p-b and mkinitrd for the install check, the %post script is
|
|
|
|
# able to handle this
|
2017-11-02 08:03:00 +01:00
|
|
|
#!BuildIgnore: perl-Bootloader mkinitrd distribution-release
|
|
|
|
# Remove some packages that are installed automatically by the build system,
|
|
|
|
# but are not needed to build the kernel
|
2018-04-04 08:43:11 +02:00
|
|
|
#!BuildIgnore: autoconf automake gettext-runtime libtool cvs gettext-tools udev insserv
|
2017-11-02 08:03:00 +01:00
|
|
|
|
|
|
|
%ifarch s390 s390x
|
|
|
|
%if %build_vanilla && 0%{?suse_version} < 1130
|
|
|
|
BuildRequires: dwarfextract
|
|
|
|
%endif
|
|
|
|
%endif
|
|
|
|
%ifarch %arm
|
|
|
|
BuildRequires: u-boot-tools
|
|
|
|
%endif
|
|
|
|
|
|
|
|
Obsoletes: microcode_ctl
|
|
|
|
|
|
|
|
# Force bzip2 instead of lzma compression to
|
|
|
|
# 1) allow install on older dist versions, and
|
|
|
|
# 2) decrease build times (bsc#962356)
|
|
|
|
%define _binary_payload w9.bzdio
|
|
|
|
# Do not recompute the build-id of vmlinux in find-debuginfo.sh (bsc#964063)
|
2017-12-16 08:02:58 +01:00
|
|
|
%undefine _unique_build_ids
|
2017-11-02 08:03:00 +01:00
|
|
|
%define _no_recompute_build_ids 1
|
2018-03-03 08:03:49 +01:00
|
|
|
# prevent usr/lib/debug/boot/vmlinux-4.12.14-11.10-default-4.12.14-11.10.ppc64le.debug
|
|
|
|
%undefine _unique_debug_names
|
2017-11-02 08:03:00 +01:00
|
|
|
# dead network if installed on SLES10, otherwise it will work (mostly)
|
|
|
|
Conflicts: sysfsutils < 2.0
|
|
|
|
Conflicts: apparmor-profiles <= 2.1
|
|
|
|
Conflicts: apparmor-parser < 2.3
|
|
|
|
# root-lvm only works with newer udevs
|
|
|
|
Conflicts: udev < 118
|
|
|
|
Conflicts: lvm2 < 2.02.33
|
|
|
|
# Interface to hv_kvp_daemon changed
|
|
|
|
Conflicts: hyper-v < 4
|
|
|
|
%ifarch %ix86
|
|
|
|
Conflicts: libc.so.6()(64bit)
|
|
|
|
%endif
|
|
|
|
Provides: kernel = %version-%source_rel
|
2018-05-22 21:58:28 +02:00
|
|
|
Provides: kernel-srchash = f86282c36e93ea7ebdb1860fafa7c3830196564b
|
|
|
|
Provides: kernel-%build_flavor-base-srchash = f86282c36e93ea7ebdb1860fafa7c3830196564b
|
2016-03-15 08:05:00 +01:00
|
|
|
|
2015-09-14 08:02:55 +02:00
|
|
|
%obsolete_rebuilds %name-base
|
2016-06-26 16:47:43 +02:00
|
|
|
%ifarch %ix86
|
|
|
|
Conflicts: libc.so.6()(64bit)
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%description base
|
|
|
|
The standard kernel - without any SUSE patches
|
|
|
|
|
|
|
|
This package contains only the base modules, required in all installs.
|
|
|
|
|
2011-10-14 11:30:53 +02:00
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
%source_timestamp
|
2010-12-01 11:20:27 +01:00
|
|
|
%preun base -f preun-base.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%postun base -f postun-base.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%pre base -f pre-base.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%post base -f post-base.sh
|
|
|
|
|
|
|
|
%files base -f kernel-base.files
|
|
|
|
%defattr(-, root, root)
|
2016-12-13 08:07:16 +01:00
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%package extra
|
|
|
|
Summary: The Standard Kernel - without any SUSE patches - Unsupported kernel modules
|
|
|
|
Group: System/Kernel
|
|
|
|
Url: http://www.kernel.org/
|
2018-04-04 08:43:11 +02:00
|
|
|
Provides: %name-extra_%_target_cpu = %version-%source_rel
|
2011-10-05 07:01:45 +02:00
|
|
|
Provides: kernel-extra = %version-%source_rel
|
2014-02-02 08:01:46 +01:00
|
|
|
Provides: multiversion(kernel)
|
2018-04-04 08:43:11 +02:00
|
|
|
Requires: %{name}_%_target_cpu = %version-%source_rel
|
2011-10-05 07:01:45 +02:00
|
|
|
Requires(pre): coreutils awk
|
2014-02-02 08:01:46 +01:00
|
|
|
Requires(post): modutils
|
2011-10-05 07:01:45 +02:00
|
|
|
Requires(post): perl-Bootloader
|
|
|
|
Requires(post): mkinitrd
|
2015-09-14 08:02:55 +02:00
|
|
|
%obsolete_rebuilds %name-extra
|
2017-12-16 08:02:58 +01:00
|
|
|
Supplements: packageand(product(SLED):%{name}_%_target_cpu)
|
|
|
|
Supplements: packageand(product(sle-we):%{name}_%_target_cpu)
|
2016-06-26 16:47:43 +02:00
|
|
|
%ifarch %ix86
|
|
|
|
Conflicts: libc.so.6()(64bit)
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%description extra
|
|
|
|
The standard kernel - without any SUSE patches
|
|
|
|
|
|
|
|
This package contains additional modules not supported by Novell.
|
|
|
|
|
2011-10-14 11:30:53 +02:00
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
%source_timestamp
|
2010-12-01 11:20:27 +01:00
|
|
|
%preun extra -f preun-extra.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%postun extra -f postun-extra.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%pre extra -f pre-extra.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%post extra -f post-extra.sh
|
|
|
|
|
|
|
|
%if %split_extra
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%files extra -f kernel-extra.files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%if %CONFIG_KMSG_IDS == "y"
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%package man
|
2016-06-26 16:47:43 +02:00
|
|
|
Summary: The collection of man pages generated by the kmsg script
|
2011-10-05 07:01:45 +02:00
|
|
|
Group: System/Kernel
|
|
|
|
|
|
|
|
%description man
|
|
|
|
This package includes the man pages that have been generated from the
|
|
|
|
kmsg message documentation comments.
|
|
|
|
|
2010-12-01 11:20:27 +01:00
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
%source_timestamp
|
2011-10-05 07:01:45 +02:00
|
|
|
%files man
|
|
|
|
%defattr(-,root,root)
|
|
|
|
/usr/share/man/man9/*
|
|
|
|
%endif
|
|
|
|
|
|
|
|
%package devel
|
|
|
|
Summary: Development files necessary for building kernel modules
|
|
|
|
Group: Development/Sources
|
2010-12-01 11:20:27 +01:00
|
|
|
Provides: %name-devel = %version-%source_rel
|
2014-02-02 08:01:46 +01:00
|
|
|
Provides: multiversion(kernel)
|
2016-01-26 08:03:18 +01:00
|
|
|
%if ! %build_vanilla
|
2011-10-05 07:01:45 +02:00
|
|
|
Requires: kernel-devel%variant = %version-%source_rel
|
2016-12-13 08:07:16 +01:00
|
|
|
Recommends: make
|
|
|
|
Recommends: gcc
|
|
|
|
Recommends: perl
|
2017-11-13 22:08:43 +01:00
|
|
|
# for objtool
|
|
|
|
Requires: libelf-devel
|
2011-10-05 07:01:45 +02:00
|
|
|
Supplements: packageand(%name:kernel-devel%variant)
|
2016-01-26 08:03:18 +01:00
|
|
|
%else
|
|
|
|
Requires: kernel-source-vanilla = %version-%source_rel
|
|
|
|
Supplements: packageand(%name:kernel-source-vanilla)
|
|
|
|
%endif
|
2015-09-14 08:02:55 +02:00
|
|
|
%obsolete_rebuilds %name-devel
|
2012-11-27 08:12:21 +01:00
|
|
|
PreReq: coreutils
|
2011-10-05 07:01:45 +02:00
|
|
|
|
|
|
|
%description devel
|
|
|
|
This package contains files necessary for building kernel modules (and
|
|
|
|
kernel module packages) against the %build_flavor flavor of the kernel.
|
|
|
|
|
2011-10-14 11:30:53 +02:00
|
|
|
|
2011-10-25 07:02:09 +02:00
|
|
|
%source_timestamp
|
2016-12-13 08:07:16 +01:00
|
|
|
|
2010-12-01 11:20:27 +01:00
|
|
|
%if %CONFIG_MODULES == "y"
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%pre devel -f devel-pre.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%post devel -f devel-post.sh
|
2011-10-25 07:02:09 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%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
|
2018-04-19 23:07:42 +02:00
|
|
|
%exclude %obj_install_dir/%cpu_arch_flavor/Symbols.list
|
2012-03-20 07:05:08 +01:00
|
|
|
%if %kmp_target_cpu != %cpu_arch
|
|
|
|
%obj_install_dir/%kmp_target_cpu
|
|
|
|
/usr/src/linux-obj/%kmp_target_cpu
|
2011-10-05 07:01:45 +02:00
|
|
|
%endif
|
2018-03-03 08:03:49 +01:00
|
|
|
%if %CONFIG_MODULE_SIG != "y"
|
|
|
|
# avoid unnecessary libopenssl dependency (bsc#1080250)
|
|
|
|
%exclude /usr/src/linux-*/*/*/scripts/extract-cert
|
|
|
|
%endif
|
2011-10-05 07:01:45 +02:00
|
|
|
|
2016-12-13 08:07:16 +01:00
|
|
|
%if %CONFIG_SUSE_KERNEL_SUPPORTED == "y"
|
2017-11-13 22:08:43 +01:00
|
|
|
%package livepatch
|
|
|
|
Summary: Metapackage to pull in matching kernel-livepatch package
|
2016-06-26 16:47:43 +02:00
|
|
|
Group: System/Kernel
|
2017-11-13 22:08:43 +01:00
|
|
|
Requires: kernel-livepatch-%(echo %version-%source_rel | sed 'y/\./_/')-%build_flavor
|
2016-06-26 16:47:43 +02:00
|
|
|
Provides: multiversion(kernel)
|
2018-01-31 19:59:10 +01:00
|
|
|
Provides: kernel-default-kgraft = %version
|
|
|
|
Provides: kernel-xen-kgraft = %version
|
|
|
|
Obsoletes: kernel-default-kgraft < %version
|
|
|
|
Obsoletes: kernel-xen-kgraft < %version
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2017-11-13 22:08:43 +01:00
|
|
|
%description livepatch
|
|
|
|
This is a metapackage that pulls in the matching kernel-livepatch package for a
|
2016-06-26 16:47:43 +02:00
|
|
|
given kernel version. The advantage of the metapackage is that its name is
|
2017-11-13 22:08:43 +01:00
|
|
|
static, unlike the kernel-livepatch-<kernel-version>-flavor package names.
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2017-11-13 22:08:43 +01:00
|
|
|
%files livepatch
|
2016-06-26 16:47:43 +02:00
|
|
|
# rpmlint complains about empty packages, so lets own something
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%dir /lib/modules/%kernelrelease-%build_flavor
|
|
|
|
%endif
|
|
|
|
|
2018-04-19 23:07:42 +02:00
|
|
|
%if ! 0%{?skip_klp_symbols:1}
|
|
|
|
|
|
|
|
%package livepatch-devel
|
|
|
|
Summary: Kernel symbols file used during livepatch development
|
|
|
|
Group: System/Kernel
|
|
|
|
Provides: klp-symbols = %version
|
|
|
|
|
|
|
|
%description livepatch-devel
|
|
|
|
This package brings a file named Symbols.list, which contains a list of all
|
|
|
|
kernel symbols and its respective kernel object . This list is to be used by
|
|
|
|
the klp-convert tool, which helps livepatch developers by enabling automatic
|
|
|
|
symbol resolution.
|
|
|
|
|
|
|
|
%files livepatch-devel
|
|
|
|
%defattr(-, root, root)
|
|
|
|
%dir %obj_install_dir
|
|
|
|
%dir %obj_install_dir/%cpu_arch
|
|
|
|
%dir %obj_install_dir/%cpu_arch_flavor/
|
|
|
|
%obj_install_dir/%cpu_arch_flavor/Symbols.list
|
|
|
|
|
|
|
|
%endif
|
|
|
|
|
2017-05-02 09:07:06 +02:00
|
|
|
%if %CONFIG_SUSE_KERNEL_SUPPORTED == "y"
|
2018-04-19 23:07:42 +02:00
|
|
|
%package -n cluster-md-kmp-%build_flavor
|
|
|
|
Summary: Clustering support for MD devices
|
|
|
|
Group: System/Kernel
|
|
|
|
Requires: %name = %version-%source_rel
|
|
|
|
Provides: cluster-md-kmp = %version-%source_rel
|
|
|
|
Provides: multiversion(kernel)
|
|
|
|
# tell weak-modules2 to ignore this package
|
|
|
|
Provides: kmp_in_kernel
|
|
|
|
Requires(post): suse-module-tools >= 12.4
|
|
|
|
Requires: dlm-kmp-%build_flavor = %version-%release
|
|
|
|
|
|
|
|
%description -n cluster-md-kmp-%build_flavor
|
|
|
|
Clustering support for MD devices. This enables locking and
|
|
|
|
synchronization across multiple systems on the cluster, so all
|
|
|
|
nodes in the cluster can access the MD devices simultaneously.
|
|
|
|
|
|
|
|
%post -n cluster-md-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=cluster-md-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
rpm -ql "$nvr" | INITRD_IN_POSTTRANS=1 /bin/bash -${-/e/} "$wm2" \
|
|
|
|
--add-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
|
|
|
|
%posttrans -n cluster-md-kmp-%build_flavor
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
|
|
|
%preun -n cluster-md-kmp-%build_flavor
|
|
|
|
nvr=cluster-md-kmp-%build_flavor-%version-%release
|
|
|
|
rpm -ql "$nvr" | grep '\.ko$' > "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%postun -n cluster-md-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=cluster-md-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
/bin/bash -${-/e/} "$wm2" < "/var/run/rpm-$nvr-modules" \
|
|
|
|
--remove-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
rm -f "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%files -n cluster-md-kmp-%build_flavor -f cluster-md-kmp.files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
|
|
|
%package -n dlm-kmp-%build_flavor
|
|
|
|
Summary: DLM kernel modules
|
|
|
|
Group: System/Kernel
|
|
|
|
Requires: %name = %version-%source_rel
|
|
|
|
Provides: dlm-kmp = %version-%source_rel
|
|
|
|
Provides: multiversion(kernel)
|
|
|
|
# tell weak-modules2 to ignore this package
|
|
|
|
Provides: kmp_in_kernel
|
|
|
|
Requires(post): suse-module-tools >= 12.4
|
|
|
|
|
|
|
|
%description -n dlm-kmp-%build_flavor
|
|
|
|
DLM stands for Distributed Lock Manager, a means to synchronize access to
|
|
|
|
shared resources over the cluster.
|
|
|
|
|
|
|
|
%post -n dlm-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=dlm-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
rpm -ql "$nvr" | INITRD_IN_POSTTRANS=1 /bin/bash -${-/e/} "$wm2" \
|
|
|
|
--add-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
|
|
|
|
%posttrans -n dlm-kmp-%build_flavor
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
|
|
|
%preun -n dlm-kmp-%build_flavor
|
|
|
|
nvr=dlm-kmp-%build_flavor-%version-%release
|
|
|
|
rpm -ql "$nvr" | grep '\.ko$' > "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%postun -n dlm-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=dlm-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
/bin/bash -${-/e/} "$wm2" < "/var/run/rpm-$nvr-modules" \
|
|
|
|
--remove-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
rm -f "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%files -n dlm-kmp-%build_flavor -f dlm-kmp.files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
|
|
|
%package -n gfs2-kmp-%build_flavor
|
|
|
|
Summary: GFS2 kernel modules
|
|
|
|
Group: System/Kernel
|
|
|
|
Requires: %name = %version-%source_rel
|
|
|
|
Provides: gfs2-kmp = %version-%source_rel
|
|
|
|
Provides: multiversion(kernel)
|
|
|
|
# tell weak-modules2 to ignore this package
|
|
|
|
Provides: kmp_in_kernel
|
|
|
|
Requires(post): suse-module-tools >= 12.4
|
|
|
|
Requires: dlm-kmp-%build_flavor = %version-%release
|
|
|
|
|
|
|
|
%description -n gfs2-kmp-%build_flavor
|
|
|
|
GFS2 is Global Filesystem, a shared device filesystem.
|
|
|
|
|
|
|
|
%post -n gfs2-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=gfs2-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
rpm -ql "$nvr" | INITRD_IN_POSTTRANS=1 /bin/bash -${-/e/} "$wm2" \
|
|
|
|
--add-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
|
|
|
|
%posttrans -n gfs2-kmp-%build_flavor
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
|
|
|
%preun -n gfs2-kmp-%build_flavor
|
|
|
|
nvr=gfs2-kmp-%build_flavor-%version-%release
|
|
|
|
rpm -ql "$nvr" | grep '\.ko$' > "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%postun -n gfs2-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=gfs2-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
/bin/bash -${-/e/} "$wm2" < "/var/run/rpm-$nvr-modules" \
|
|
|
|
--remove-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
rm -f "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%files -n gfs2-kmp-%build_flavor -f gfs2-kmp.files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
|
|
|
%package -n kselftests-kmp-%build_flavor
|
|
|
|
Summary: kselftests kernel modules
|
|
|
|
Group: System/Kernel
|
|
|
|
Requires: %name = %version-%source_rel
|
|
|
|
Provides: kselftests-kmp = %version-%source_rel
|
|
|
|
Provides: multiversion(kernel)
|
|
|
|
# tell weak-modules2 to ignore this package
|
|
|
|
Provides: kmp_in_kernel
|
|
|
|
Requires(post): suse-module-tools >= 12.4
|
|
|
|
|
|
|
|
%description -n kselftests-kmp-%build_flavor
|
|
|
|
kselftests kernel modules.
|
|
|
|
|
|
|
|
%post -n kselftests-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=kselftests-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
rpm -ql "$nvr" | INITRD_IN_POSTTRANS=1 /bin/bash -${-/e/} "$wm2" \
|
|
|
|
--add-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
|
|
|
|
%posttrans -n kselftests-kmp-%build_flavor
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
|
|
|
%preun -n kselftests-kmp-%build_flavor
|
|
|
|
nvr=kselftests-kmp-%build_flavor-%version-%release
|
|
|
|
rpm -ql "$nvr" | grep '\.ko$' > "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%postun -n kselftests-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=kselftests-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
/bin/bash -${-/e/} "$wm2" < "/var/run/rpm-$nvr-modules" \
|
|
|
|
--remove-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
rm -f "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%files -n kselftests-kmp-%build_flavor -f kselftests-kmp.files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
|
|
|
%package -n ocfs2-kmp-%build_flavor
|
|
|
|
Summary: OCFS2 kernel modules
|
|
|
|
Group: System/Kernel
|
|
|
|
Requires: %name = %version-%source_rel
|
|
|
|
Provides: ocfs2-kmp = %version-%source_rel
|
|
|
|
Provides: multiversion(kernel)
|
|
|
|
# tell weak-modules2 to ignore this package
|
|
|
|
Provides: kmp_in_kernel
|
|
|
|
Requires(post): suse-module-tools >= 12.4
|
|
|
|
Requires: dlm-kmp-%build_flavor = %version-%release
|
|
|
|
|
|
|
|
%description -n ocfs2-kmp-%build_flavor
|
|
|
|
OCFS2 is the Oracle Cluster Filesystem, a filesystem for shared devices
|
|
|
|
accessible simultaneously from multiple nodes of a cluster.
|
|
|
|
|
|
|
|
%post -n ocfs2-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=ocfs2-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
rpm -ql "$nvr" | INITRD_IN_POSTTRANS=1 /bin/bash -${-/e/} "$wm2" \
|
|
|
|
--add-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
|
|
|
|
%posttrans -n ocfs2-kmp-%build_flavor
|
|
|
|
%{?regenerate_initrd_posttrans}
|
|
|
|
|
|
|
|
%preun -n ocfs2-kmp-%build_flavor
|
|
|
|
nvr=ocfs2-kmp-%build_flavor-%version-%release
|
|
|
|
rpm -ql "$nvr" | grep '\.ko$' > "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%postun -n ocfs2-kmp-%build_flavor
|
|
|
|
wm2=/usr/lib/module-init-tools/weak-modules2
|
|
|
|
nvr=ocfs2-kmp-%build_flavor-%version-%release
|
|
|
|
if test -x "$wm2"; then
|
|
|
|
/bin/bash -${-/e/} "$wm2" < "/var/run/rpm-$nvr-modules" \
|
|
|
|
--remove-kernel-modules %kernelrelease-%build_flavor
|
|
|
|
fi
|
|
|
|
rm -f "/var/run/rpm-$nvr-modules"
|
|
|
|
|
|
|
|
%files -n ocfs2-kmp-%build_flavor -f ocfs2-kmp.files
|
|
|
|
%defattr(-, root, root)
|
|
|
|
|
2017-05-02 09:07:06 +02:00
|
|
|
%endif # %CONFIG_SUSE_KERNEL_SUPPORTED
|
2016-12-13 08:07:16 +01:00
|
|
|
%endif # %CONFIG_MODULES
|
2016-06-26 16:47:43 +02:00
|
|
|
|
2011-10-05 07:01:45 +02:00
|
|
|
%changelog
|