Make kernel package name configurable

By writing '-latest' or '' in the 'suffix' file we can now easily switch
between the two variants.
This commit is contained in:
Simon Gaiser 2018-01-05 20:43:58 +01:00
parent c60e1c82c1
commit bbeccc01ac
2 changed files with 11 additions and 1 deletions

View File

@ -11,6 +11,7 @@
%define plainrel %(cat rel)
%define rel %{plainrel}.%{variant}
%define version %(cat version)
%define name_suffix %(cat suffix)
%define _buildshell /bin/bash
%define build_xen 1
@ -35,7 +36,7 @@
# Otherwise debuginfo build is disabled by default to save disk space (it needs 2-3GB build time)
%global debug_package %{nil}
Name: kernel-latest
Name: kernel%{name_suffix}
Summary: The Xen Kernel
Version: %{version}
Epoch: 1000
@ -458,6 +459,14 @@ umount /tmp/qubes-modules-%kernelrelease
rmdir /tmp/qubes-modules-%kernelrelease
mv /tmp/qubes-modules-%kernelrelease.img %vm_install_dir/modules.img
%if "%{name_suffix}" == ""
# Set kernel as default VM kernel if we are the default package.
# If qubes-prefs isn't installed yet, the default kernel will be set by %post
# of qubes-core-dom0
type qubes-prefs &>/dev/null && qubes-prefs --set default-kernel %version-%plainrel
%endif
exit 0
%preun qubes-vm

1
suffix Normal file
View File

@ -0,0 +1 @@
-latest