diff --git a/rpm/kernel-binary.spec.in b/rpm/kernel-binary.spec.in index 0b3ec3b..b1e1aea 100644 --- a/rpm/kernel-binary.spec.in +++ b/rpm/kernel-binary.spec.in @@ -24,6 +24,7 @@ %define compress_modules @COMPRESS_MODULES@ %define compress_vmlinux @COMPRESS_VMLINUX@ %define livepatch @LIVEPATCH@%{nil} +%define livepatch_rt @LIVEPATCH_RT@%{nil} %include %_sourcedir/kernel-spec-macros @@ -1373,7 +1374,7 @@ relink ../../linux-%{kernelrelease}%{variant}-obj/"%cpu_arch_flavor" /usr/src/li /usr/src/linux-obj/%kmp_target_cpu %endif -%if "%livepatch" != "" && "%CONFIG_SUSE_KERNEL_SUPPORTED" == "y" && "%variant" == "" && %build_default +%if "%livepatch" != "" && "%CONFIG_SUSE_KERNEL_SUPPORTED" == "y" && (("%variant" == "" && %build_default) || ("%variant" == "-rt" && 0%livepatch_rt)) %if "%livepatch" == "kgraft" %define patch_package %{livepatch}-patch %else @@ -1383,13 +1384,15 @@ relink ../../linux-%{kernelrelease}%{variant}-obj/"%cpu_arch_flavor" /usr/src/li Summary: Metapackage to pull in matching %patch_package package Group: System/Kernel Requires: %{patch_package}-%(echo %{version}-%{source_rel} | sed 'y/\./_/')-%{build_flavor} +Provides: multiversion(kernel) +%if "%variant" != "-rt" Provides: kernel-default-kgraft = %version Provides: kernel-xen-kgraft = %version -Provides: multiversion(kernel) %if "%livepatch" != "kgraft" Obsoletes: kernel-default-kgraft < %version Obsoletes: kernel-xen-kgraft < %version %endif +%endif %description %{livepatch} This is a metapackage that pulls in the matching %patch_package package for a diff --git a/rpm/mkspec b/rpm/mkspec index 4fe1124..c415073 100755 --- a/rpm/mkspec +++ b/rpm/mkspec @@ -41,6 +41,7 @@ my $compress_modules = 'none'; my $compress_vmlinux = 'gz'; my $build_dtbs = (); my $livepatch = ""; +my $livepatch_rt = ""; if (defined($vars{'COMPRESS_MODULES'})) { $compress_modules = $vars{'COMPRESS_MODULES'}; } @@ -55,6 +56,10 @@ if (defined($vars{'LIVEPATCH'})) { $livepatch = $vars{'LIVEPATCH'}; $livepatch = "" if $livepatch =~ /^(0+|no|none)$/i; } +if (defined($vars{'LIVEPATCH_RT'})) { + $livepatch_rt = $vars{'LIVEPATCH_RT'}; + $livepatch_rt = "" if $livepatch_rt =~ /^(0+|no|none)$/i; +} $vanilla_only ||= "0"; if (!defined ($rpmrelease)) { $rpmrelease = $vars{'RELEASE'} || 0; @@ -121,6 +126,7 @@ my %macros = ( UNPACK_PATCHES => $unpack_patches, SCRIPTS => $scripts, LIVEPATCH => $livepatch, + LIVEPATCH_RT => $livepatch_rt, YEAR => (localtime time)[5] + 1900, COMPRESS_MODULES => $compress_modules, COMPRESS_VMLINUX => $compress_vmlinux,