Home Home > GIT Browse > linux-next
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKernel Build Daemon <kbuild@suse.de>2019-08-23 12:03:13 +0200
committerKernel Build Daemon <kbuild@suse.de>2019-08-23 12:03:13 +0200
commit7abba07f8f1e78b02e78ba58dcd43af98dd9ce30 (patch)
treecc0108e9a56265a45c5e0ecbc98915250991dbef
parentf2c85fb94320ca3db2efbecb3696ea027460b41d (diff)
parent16f681684447be904591435ab799c46638bdcea8 (diff)
Merge branch 'packaging' into linux-next
-rw-r--r--rpm/kernel-binary.spec.in33
-rwxr-xr-xrpm/mkspec6
2 files changed, 25 insertions, 14 deletions
diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in
index c736479ebc..d7023de175 100644
--- a/rpm/kernel-binary.spec.in
+++ b/rpm/kernel-binary.spec.in
@@ -22,6 +22,7 @@
%define variant @VARIANT@%{nil}
%define vanilla_only @VANILLA_ONLY@
%define compress_modules @COMPRESS_MODULES@
+%define livepatch @LIVEPATCH@%{nil}
%include %_sourcedir/kernel-spec-macros
@@ -1052,42 +1053,46 @@ kernel module packages) against the %build_flavor flavor of the kernel.
/usr/src/linux-obj/%kmp_target_cpu
%endif
-%if %CONFIG_SUSE_KERNEL_SUPPORTED == "y"
-%package livepatch
-Summary: Metapackage to pull in matching kernel-livepatch package
+%if "%livepatch" != "" && %CONFIG_SUSE_KERNEL_SUPPORTED == "y" && "%variant" == ""
+%if %livepatch == kgraft
+%define patch_package %{livepatch}-patch
+%else
+%define patch_package kernel-%{livepatch}
+%endif
+%package %{livepatch}
+Summary: Metapackage to pull in matching %patch_package package
Group: System/Kernel
-Requires: kernel-livepatch-%(echo %version-%source_rel | sed 'y/\./_/')-%build_flavor
+Requires: %{patch_package}-%(echo %{version}-%{source_rel} | sed 'y/\./_/')-%{build_flavor}
Provides: kernel-default-kgraft = %version
Provides: kernel-xen-kgraft = %version
Provides: multiversion(kernel)
Obsoletes: kernel-default-kgraft < %version
Obsoletes: kernel-xen-kgraft < %version
-%description livepatch
-This is a metapackage that pulls in the matching kernel-livepatch package for a
+%description %{livepatch}
+This is a metapackage that pulls in the matching %patch_package package for a
given kernel version. The advantage of the metapackage is that its name is
-static, unlike the kernel-livepatch-<kernel-version>-flavor package names.
+static, unlike the %{patch_package}-<kernel-version>-flavor package names.
-%files livepatch
+%files %{livepatch}
# rpmlint complains about empty packages, so lets own something
%defattr(-, root, root)
%dir /lib/modules/%kernelrelease-%build_flavor
%endif
-%if 0%{?klp_symbols}
-
-%package livepatch-devel
-Summary: Kernel symbols file used during livepatch development
+%if 0%{?klp_symbols} && "%livepatch" != ""
+%package %{livepatch}-devel
+Summary: Kernel symbols file used during kGraft patch development
Group: System/Kernel
Provides: klp-symbols = %version
-%description livepatch-devel
+%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
+%files %{livepatch}-devel
%defattr(-, root, root)
%dir %obj_install_dir
%dir %obj_install_dir/%cpu_arch
diff --git a/rpm/mkspec b/rpm/mkspec
index 3a22c27cb7..b18845cf2d 100755
--- a/rpm/mkspec
+++ b/rpm/mkspec
@@ -39,6 +39,7 @@ my ($srcversion, $variant, $vanilla_only) =
($vars{'SRCVERSION'}, $vars{'VARIANT'}, $vars{'VANILLA_ONLY'});
my $compress_modules = 'none';
my $build_dtbs = ();
+my $livepatch = "";
if (defined($vars{'COMPRESS_MODULES'})) {
$compress_modules = $vars{'COMPRESS_MODULES'};
}
@@ -46,6 +47,10 @@ if (defined($vars{'BUILD_DTBS'})) {
$build_dtbs = $vars{'BUILD_DTBS'};
$build_dtbs = () if $build_dtbs =~ /^(0+|no|false)$/i;
}
+if (defined($vars{'LIVEPATCH'})) {
+ $livepatch = $vars{'LIVEPATCH'};
+ $livepatch = "" if $livepatch =~ /^(0+|no|none)$/i;
+}
$vanilla_only ||= "0";
if (!defined ($rpmrelease)) {
$rpmrelease = $vars{'RELEASE'} || 0;
@@ -109,6 +114,7 @@ my %macros = (
NOSOURCE => $nosource,
UNPACK_PATCHES => $unpack_patches,
SCRIPTS => $scripts,
+ LIVEPATCH => $livepatch,
YEAR => (localtime time)[5] + 1900,
COMPRESS_MODULES => $compress_modules,
);