From: Clark Williams
redhat: RT packaging changes
Apply changes for building RT and Automotive kernels to the redhat
directory files. This works is prepratory to the upstream merge of
the PREEMPT_RT code.
Introduce new specfile macros: with_realtime and with_automotive to
control whether the realtime and automotive kernel variants will be
built and packaged. All sections of the specfile that focus on either
of these two variants are protected by these macros. Also, modify most
of the variant helper macros to handle rt/auto variants.
Also add with_rtonly and with_automotiveonly macros for building just
one of the variants
Note that the RT kernel adds an extra package named kernel-rt-kvm,
which contains the KVM modules, due to supporting virtualization on RT
as a separate product.
Modify redhat/Makefile.variables to set INCLUDE_RT_FILES for use by
genspec.sh when generating the specfile from the template specfile.
Config file generation logic changes were done to
redhat/configs/priority.rhel to describe the config files for the rt
and automotive kernels.
Modify priority.rhel to have rt inherit from rhel
Due to the way the config merge scripts work an empty
rt directory tree needs to be maintained under common. Empty README
files will be used to keep those directory trees in git.
Don't run '/sbin/ldconfig -X' if we're a noarch or a non-build arch
since there won't be any shared library changes to update the cache
Signed-off-by: Jiri Benc
Signed-off-by: Andrew Halaney
Signed-off-by: Clark Williams
Signed-off-by: Wander Lairson Costa
diff --git a/redhat/Makefile b/redhat/Makefile
index blahblah..blahblah 100644
--- a/redhat/Makefile
+++ b/redhat/Makefile
@@ -12,6 +12,7 @@ include Makefile.variables
SPECRELEASED_KERNEL=$(RELEASED_KERNEL)
SPECINCLUDE_FEDORA_FILES=$(INCLUDE_FEDORA_FILES)
SPECINCLUDE_RHEL_FILES=$(INCLUDE_RHEL_FILES)
+SPECINCLUDE_RT_FILES=$(INCLUDE_RT_FILES)
ifneq (,$(findstring n,$(firstword -$(MAKEFLAGS
# Do not set RHTEST on the command line. Use the make command built-in
options
@@ -695,6 +696,7 @@ sources-rh: $(TARBALL) generate-testpatch-tmp setup-source
dist-configs-check
scripts/mod/mod-internal.list \
scripts/mod/mod-partner.list \
scripts/mod/mod-sign.sh \
+ scripts/mod/mod-kvm.list \
configs/flavors \
configs/generate_all_configs.sh \
configs/merge.py \
diff --git a/redhat/Makefile.variables b/redhat/Makefile.variables
index blahblah..blahblah 100644
--- a/redhat/Makefile.variables
+++ b/redhat/Makefile.variables
@@ -68,6 +68,7 @@ HEAD ?= HEAD
# to '0'.
INCLUDE_FEDORA_FILES:=1
INCLUDE_RHEL_FILES:=1
+INCLUDE_RT_FILES:=1
# This variable is the location of the KABI cross compilers
KABI_CROSS_COMPILE_PREFIX ?= /usr/bin/
diff --git a/redhat/configs/priority.rhel b/redhat/configs/priority.rhel
index blahblah..blahblah 100644
--- a/redhat/configs/priority.rhel
+++ b/redhat/configs/priority.rhel
@@ -23,6 +23,8 @@ EMPTY=armv7hl armv7hl-debug armv7hl-lpae armv7hl-lpae-debug
x86_64=generic:generic-x86
x86_64-debug=generic:generic-x86:debug:debug-x86
x86_64-kgcov=generic:generic-x86:kgcov
+x86_64-rt=generic:generic-x86:rt-generic:rt-generic-x86
+x86_64-rt_debug=generic:generic-x86:debug:debug-x86:rt-generic:rt-generic-x86:rt-debug:rt-debug-x86
# ppc64le
ppc64le=generic:generic-powerpc
@@ -37,5 +39,7 @@ s390x-kgcov=generic:generic-s390x:kgcov
# aarch64
aarch64=generic:generic-arm:generic-arm-aarch64
-aarch64-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm-aarch64
+aarch64-debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64
aarch64-kgcov=generic:generic-arm:generic-arm-aarch64:kgcov
+aarch64-rt=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64
+aarch64-rt_debug=generic:generic-arm:generic-arm-aarch64:debug:debug-arm:debug-arm-aarch64:rt-generic:rt-generic-arm:rt-generic-arm-aarch64:rt-debug:rt-debug-arm:rt-debug-arm-aarch64
diff --git a/redhat/kernel.spec.template b/redhat/kernel.spec.template
index blahblah..blahblah 100644
--- a/redhat/kernel.spec.template
+++ b/redhat/kernel.spec.template
@@ -130,6 +130,8 @@ Summary: The Linux kernel
%global include_fedora %%SPECINCLUDE_FEDORA_FILES%%
# Include RHEL files
%global include_rhel %%SPECINCLUDE_RHEL_FILES%%
+# Include RT files
+%global include_rt %%SPECINCLUDE_RT_FILES%%
# Provide Patchlist.changelog file
%global patchlist_changelog %%SPECPATCHLIST_CHANGELOG%%
# Set released_kernel to 1 when the upstream source tarball contains a
@@ -210,6 +212,8 @@ Summary: The Linux kernel
%define with_paeonly %{?_with_paeonly: 1} %{?!_with_paeonly: 0}
# Only build the debug kernel (--with dbgonly):
%define with_dbgonly %{?_with_dbgonly: 1} %{?!_with_dbgonly: 0}
+# Only build the realtime kernel (--with rtonly):
+%define with_rtonly%{?_with_rtonly: 1} %{?!_with_rtonly: 0}
#