From: Clark Williams <williams@xxxxxxxxxx> redhat: RT/Auto 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 and INCLUDE_AUTO_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 and have automotive inherit from rt Due to the way the config merge scripts work and empty rt and automotive 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 <jbenc@xxxxxxxxxx> Signed-off-by: Andrew Halaney <ahalaney@xxxxxxxxxx> Signed-off-by: Clark Williams <williams@xxxxxxxxxx> Signed-off-by: Wander Lairson Costa <wander@xxxxxxxxxx> diff --git a/redhat/Makefile b/redhat/Makefile index blahblah..blahblah 100644 --- a/redhat/Makefile +++ b/redhat/Makefile @@ -12,6 +12,8 @@ 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) +SPECINCLUDE_AUTOMOTIVE_FILES=$(INCLUDE_AUTOMOTIVE_FILES) ifneq (,$(findstring n,$(firstword -$(MAKEFLAGS)))) # Do not set RHTEST on the command line. Use the make command built-in options @@ -695,6 +697,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,8 @@ HEAD ?= HEAD # to '0'. INCLUDE_FEDORA_FILES:=1 INCLUDE_RHEL_FILES:=1 +INCLUDE_RT_FILES:=1 +INCLUDE_AUTOMOTIVE_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,10 @@ 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-automotive=generic:generic-x86:rt-generic:rt-generic-x86:automotive-generic:automotive-generic-x86 +x86_64-rt_debug=generic:generic-x86:debug:debug-x86:rt-generic:rt-generic-x86:rt-debug:rt-debug-x86 +x86_64-automotive_debug=generic:generic-x86:debug:debug-x86:rt-generic:rt-generic-x86:rt-debug:rt-debug-x86:automotive-generic:automotive-generic-x86:automotive-debug:automotive-debug-x86 # ppc64le ppc64le=generic:generic-powerpc @@ -37,5 +41,9 @@ 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-automotive=generic:generic-arm:generic-arm-aarch64:rt-generic:rt-generic-arm-aarch64:automotive-generic:automotive-generic-arm:automotive-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 +aarch64-automotive_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:automotive-generic:automotive-generic-arm:automotive-generic-arm-aarch64:automotive-debug:automotive-debug-arm:automotive-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,10 @@ 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%% +# Include AUTOMOTIVE files +%global include_automotive %%SPECINCLUDE_AUTOMOTIVE_FILES%% # Provide Patchlist.changelog file %global patchlist_changelog %%SPECPATCHLIST_CHANGELOG%% # Set released_kernel to 1 when the upstream source tarball contains a @@ -210,6 +214,10 @@ 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} +# Only build the automotive kernel (--with automotiveonly): +%define with_automotiveonly %{?_with_automotiveonly: 1} %{?!_with_automotiveonly: 0} # Control whether we perform a compat. check against published ABI. %define with_kabichk %{?_without_kabichk: 0} %{?!_without_kabichk: 1} # Temporarily disable kabi checks until RC. @@ -252,8 +260,16 @@ Summary: The Linux kernel # Want to build a vanilla kernel build without any non-upstream patches? %define with_vanilla %{?_with_vanilla: 1} %{?!_with_vanilla: 0} +# special purpose variants + +# RHEL real-time kernel (PREEMPT_RT) +%define with_realtime %{?_without_realtime: 0} %{?!_without_realtime: 1} + +# Automotive kernel +%define with_automotive %{?_without_automotive: 0} %{?!_without_automotive: 1} + %ifarch x86_64 -%define with_efiuki %{?_without_efiuki: 0} %{?!_without_efiuki: 1} +%define with_efiuki %{?_without_efiuki: 0} %{?!_without_efiuki: !%{with_realtime}} %else %define with_efiuki 0 %endif @@ -272,6 +288,9 @@ Summary: The Linux kernel %define with_bpftool 0 # selftests turns on bpftool %define with_selftests 0 +# No realtime or automotive fedora variants +%define with_realtime 0 +%define with_automotive 0 %endif %if %{with_verbose} @@ -353,10 +372,18 @@ Summary: The Linux kernel %define with_pae 0 %endif +# RT kernel is only built on x86_64 and aarch64 +%ifnarch x86_64 aarch64 +%define with_realtime 0 +%define with_automotive 0 +%endif + # if requested, only build base kernel %if %{with_baseonly} %define with_pae 0 %define with_debug 0 +%define with_realtime 0 +%define with_automotive 0 %define with_vdso_install 0 %define with_perf 0 %define with_tools 0 @@ -372,11 +399,33 @@ Summary: The Linux kernel %if %{with_paeonly} %define with_up 0 %define with_debug 0 +%define with_realtime 0 +%define with_automotive 0 %endif # if requested, only build debug kernel %if %{with_dbgonly} %define with_up 0 +%define with_realtime 0 +%define with_automotive 0 +%define with_vdso_install 0 +%define with_perf 0 +%define with_tools 0 +%define with_bpftool 0 +%define with_kernel_abi_stablelists 0 +%define with_selftests 0 +%define with_cross 0 +%define with_cross_headers 0 +%define with_ipaclones 0 +%endif + +# if requested, only build realtime kernel +%if %{with_rtonly} +%define with_realtime 1 +%define with_automotive 0 +%define with_up 0 +%define with_pae 0 +%define with_debug 0 %define with_vdso_install 0 %define with_perf 0 %define with_tools 0 @@ -386,6 +435,45 @@ Summary: The Linux kernel %define with_cross 0 %define with_cross_headers 0 %define with_ipaclones 0 +%define with_headers 0 +%endif + +# if requested, only build automotive kernel +%if %{with_automotiveonly} +%define with_automotive 1 +%define with_realtime 0 +%define with_up 0 +%define with_pae 0 +%define with_debug 0 +%define with_vdso_install 0 +%define with_perf 0 +%define with_tools 0 +%define with_bpftool 0 +%define with_kernel_abi_stablelists 0 +%define with_selftests 0 +%define with_cross 0 +%define with_cross_headers 0 +%define with_ipaclones 0 +%define with_headers 0 +%endif + +# if requested, only build automotive kernel +%if %{with_rtonly} +%define with_automotive 1 +%define with_realtime 0 +%define with_up 0 +%define with_pae 0 +%define with_debug 0 +%define with_vdso_install 0 +%define with_perf 0 +%define with_tools 0 +%define with_bpftool 0 +%define with_kernel_abi_stablelists 0 +%define with_selftests 0 +%define with_cross 0 +%define with_cross_headers 0 +%define with_ipaclones 0 +%define with_headers 0 %endif # turn off kABI DUP check and DWARF-based check if kABI check is disabled @@ -425,6 +513,8 @@ Summary: The Linux kernel # don't build noarch kernels or headers (duh) %ifarch noarch %define with_up 0 +%define with_realtime 0 +%define with_automotive 0 %define with_headers 0 %define with_cross_headers 0 %define with_tools 0 @@ -526,8 +616,12 @@ Summary: The Linux kernel %if 0%{?fedora} %define nobuildarches i386 %else +%if %{with_realtime} || %{with_automotive} +%define nobuildarches i386 i686 %{arm} ppc64le s390x +%else %define nobuildarches i386 i686 %{arm} %endif +%endif %ifarch %nobuildarches # disable BuildKernel commands @@ -535,6 +629,8 @@ Summary: The Linux kernel %define with_debug 0 %define with_pae 0 %define with_zfcpdump 0 +%define with_realtime 0 +%define with_automotive 0 %define with_debuginfo 0 %define with_perf 0 @@ -864,6 +960,18 @@ Source72: filter-s390x.sh.fedora Source73: filter-modules.sh.fedora %endif +# realtime-specific files +Source474: %{name}-aarch64-rt-rhel.config +Source475: %{name}-aarch64-rt_debug-rhel.config +Source476: %{name}-x86_64-rt-rhel.config +Source477: %{name}-x86_64-rt_debug-rhel.config + +# automotive specific files +Source491: %{name}-aarch64-automotive-rhel.config +Source492: %{name}-aarch64-automotive_debug-rhel.config +Source493: %{name}-x86_64-automotive-rhel.config +Source494: %{name}-x86_64-automotive_debug-rhel.config + Source75: partial-kgcov-snip.config Source80: generate_all_configs.sh Source81: process_configs.sh @@ -875,6 +983,8 @@ Source85: mod-partner.list Source86: dracut-virt.conf +Source87: flavors + Source100: rheldup3.x509 Source101: rhelkpatch1.x509 @@ -893,6 +1003,9 @@ Source213: Module.kabi_dup_x86_64 Source300: kernel-abi-stablelists-%{kabiversion}.tar.bz2 Source301: kernel-kabi-dw-%{kabiversion}.tar.bz2 +# RT specific virt module +Source400: mod-kvm.list + # Sources for kernel-tools Source2002: kvm_stat.logrotate @@ -1375,11 +1488,32 @@ summary: kernel meta-package for the %{1} kernel\ Requires: kernel-%{1}-core-uname-r = %{KVERREL}+%{1}\ Requires: kernel-%{1}-modules-uname-r = %{KVERREL}+%{1}\ Requires: kernel-%{1}-modules-core-uname-r = %{KVERREL}+%{1}\ +%if "%{1}" == "rt" || "%{1}" == "rt_debug"\ +Requires: realtime-setup\ +%endif\ Provides: installonlypkg(kernel)\ %description %{1}\ The meta-package for the %{1} kernel\ %{nil} +%if %{with_realtime} +# +# this macro creates a kernel-rt-<subpackage>-kvm package +# %%kernel_kvm_package <subpackage> +# +%define kernel_kvm_package() \ +%package %{?1:%{1}-}kvm\ +Summary: KVM modules for package kernel%{?1:-%{1}}\ +Group: System Environment/Kernel\ +Requires: kernel%{?1:-%{1}} = %{version}-%{release}\ +Provides: installonlypkg(kernel-module)\ +Provides: kernel%{?1:-%{1}}-kvm-%{_target_cpu} = %{version}-%{release}\ +AutoReq: no\ +%description -n kernel%{?1:-%{1}}-kvm\ +This package provides KVM modules for package kernel%{?1:-%{1}}.\ +%{nil} +%endif + # # This macro creates a kernel-<subpackage> and its -devel and -debuginfo too. # %%define variant_summary The Linux kernel compiled for <configuration> @@ -1410,6 +1544,9 @@ Requires: kernel-%{?1:%{1}-}-modules-core-uname-r = %{KVERREL}%{?1:+%{1}}\ %endif\ %{expand:%%kernel_debuginfo_package %{?1:%{1}}}\ %endif\ +%if "%{1}" == "rt" || "%{1}" == "rt_debug"\ +%{expand:%%kernel_kvm_package %{?1:%{1}}} %{!?{-n}:%{1}}%{?{-n}:%{-n*}}}\ +%endif \ %if %{with_efiuki}\ %package %{?1:%{1}-}uki-virt\ Summary: %{variant_summary} unified kernel image for virtual machines\ @@ -1446,6 +1583,22 @@ This package provides kernel modules for the %{?2:%{2} }kernel package for Red H # Now, each variant package. +%if %{with_realtime} +%define variant_summary The Linux kernel compiled with PREEMPT_RT +%kernel_variant_package rt +%description rt-core +This package includes a version of the Linux kernel compiled with the +PREEMPT_RT real-time preemption support +%endif + +%if %{with_automotive} +%define variant_summary The Linux kernel compiled with automotive configs +%kernel_variant_package automotive +%description automotive-core +This package includes a version of the Linux kernel compiled with the +both PREEMPT_RT and automotive configurations +%endif + %if %{with_pae} %define variant_summary The Linux kernel compiled for Cortex-A15 %kernel_variant_package lpae @@ -1479,6 +1632,35 @@ This variant of the kernel has numerous debugging options enabled. It should only be installed when trying to gather additional information on kernel bugs, as some of these options impact performance noticably. +%if %{with_debug} && %{with_realtime} +%define variant_summary The Linux PREEMPT_RT kernel compiled with extra debugging enabled +%kernel_variant_package rt_debug +%description rt_debug-core +The kernel package contains the Linux kernel (vmlinuz), the core of any +Linux operating system. The kernel handles the basic functions +of the operating system: memory allocation, process allocation, device +input and output, etc. + +This variant of the kernel has numerous debugging options enabled. +It should only be installed when trying to gather additional information +on kernel bugs, as some of these options impact performance noticably. +%endif + +%if %{with_debug} && %{with_automotive} +%define variant_summary The Linux Automotive kernel compiled with extra debugging enabled +%kernel_variant_package automotive_debug +%description automotive_debug-core +The kernel package contains the Linux kernel (vmlinuz), the core of any +Linux operating system. The kernel handles the basic functions +of the operating system: memory allocation, process allocation, device +input and output, etc. + +This variant of the kernel has numerous debugging options enabled. +It should only be installed when trying to gather additional information +on kernel bugs, as some of these options impact performance noticably. +%endif + +%if %{with_up} # And finally the main -core package %define variant_summary The Linux kernel @@ -1488,6 +1670,7 @@ The kernel package contains the Linux kernel (vmlinuz), the core of any Linux operating system. The kernel handles the basic functions of the operating system: memory allocation, process allocation, device input and output, etc. +%endif %if %{with_efiuki} %description debug-uki-virt @@ -1573,6 +1756,12 @@ ApplyOptionalPatch linux-kernel-test.patch # Any further pre-build tree manipulations happen here. +%if %{with_realtime} || %{with_automotive} +# remove the localversion-rt file if it exists since +# it messes with the uname output +rm -f localversion-rt +%endif + chmod +x scripts/checkpatch.pl mv COPYING COPYING-%{specrpmversion}-%{release} @@ -2232,6 +2421,10 @@ BuildKernel() { # Identify modules in the kernel-modules-partner package %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE85} partner %endif + if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then + # Identify modules in the kernel-rt-kvm package + %{SOURCE20} $RPM_BUILD_ROOT lib/modules/$KernelVer %{SOURCE400} kvm + fi # # Generate the kernel-core and kernel-modules files lists @@ -2253,6 +2446,10 @@ BuildKernel() { # don't include anything going into kernel-modules-partner in the file lists xargs rm -rf < mod-partner.list %endif + if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then + # don't include anything going into kernel-rt-kvm in the file lists + xargs rm -rf < mod-kvm.list + fi if [ $DoModules -eq 1 ]; then # Find all the module files and filter them out into the core and @@ -2346,6 +2543,9 @@ BuildKernel() { sed -e 's/^lib*/%dir \/lib/' %{?zipsed} $RPM_BUILD_ROOT/module-dirs.list > ../kernel${Variant:+-${Variant}}-modules-core.list sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/modules.list >> ../kernel${Variant:+-${Variant}}-modules-core.list sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-extra.list >> ../kernel${Variant:+-${Variant}}-modules-extra.list + if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then + sed -e 's/^lib*/\/lib/' %{?zipsed} $RPM_BUILD_ROOT/mod-kvm.list >> ../kernel${Variant:+-${Variant}}-kvm.list + fi # Cleanup rm -f $RPM_BUILD_ROOT/k-d.list @@ -2356,6 +2556,9 @@ BuildKernel() { %if 0%{!?fedora:1} rm -f $RPM_BUILD_ROOT/mod-partner.list %endif + if [[ "$Variant" == "rt" || "$Variant" == "rt_debug" ]]; then + rm -f $RPM_BUILD_ROOT/mod-kvm.list + fi %if %{signmodules} if [ $DoModules -eq 1 ]; then @@ -2436,8 +2639,19 @@ cd linux-%{KVERREL} %if %{with_debug} +%if %{with_realtime} +echo "building rt_debug" +BuildKernel %make_target %kernel_image %{_use_vdso} rt_debug +%endif +%if %{with_automotive} +echo "building automotive_debug" +BuildKernel %make_target %kernel_image %{_use_vdso} automotive_debug +%endif +%if %{with_up} +echo "building main debug package" BuildKernel %make_target %kernel_image %{_use_vdso} debug %endif +%endif %if %{with_zfcpdump} BuildKernel %make_target %kernel_image %{_use_vdso} zfcpdump @@ -2451,8 +2665,16 @@ BuildKernel %make_target %kernel_image %{use_vdso} lpae BuildKernel %make_target %kernel_image %{_use_vdso} %endif -%ifnarch noarch i686 -%if !%{with_debug} && !%{with_zfcpdump} && !%{with_pae} && !%{with_up} +%if %{with_realtime} +BuildKernel %make_target %kernel_image %{_use_vdso} rt +%endif + +%if %{with_automotive} +BuildKernel %make_target %kernel_image %{_use_vdso} automotive +%endif + +%ifnarch noarch i686 %{nobuildarches} +%if !%{with_debug} && !%{with_zfcpdump} && !%{with_pae} && !%{with_up} && !%{with_realtime} && !%{with_automotive} # If only building the user space tools, then initialize the build environment # and some variables so that the various userspace tools can be built. InitBuildVars @@ -2601,7 +2823,14 @@ find Documentation -type d | xargs chmod u+w %{modsign_cmd} certs/signing_key.pem.sign+lpae certs/signing_key.x509.sign+lpae $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+lpae/ \ fi \ if [ "%{with_debug}" -ne "0" ]; then \ - %{modsign_cmd} certs/signing_key.pem.sign+debug certs/signing_key.x509.sign+debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+debug/ \ + if [ "%{with_realtime}" -ne "0" ]; then \ + %{modsign_cmd} certs/signing_key.pem.sign+rt_debug certs/signing_key.x509.sign+rt_debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+rt_debug/ \ + else if [ "%{with_automotive}" -ne "0" ]; then \ + %{modsign_cmd} certs/signing_key.pem.sign+automotive_debug certs/signing_key.x509.sign+automotive_debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+automotive_debug/ \ + else \ + %{modsign_cmd} certs/signing_key.pem.sign+debug certs/signing_key.x509.sign+debug $RPM_BUILD_ROOT/lib/modules/%{KVERREL}+debug/ \ + fi \ + fi \ fi \ if [ "%{with_up}" -ne "0" ]; then \ %{modsign_cmd} certs/signing_key.pem.sign certs/signing_key.x509.sign $RPM_BUILD_ROOT/lib/modules/%{KVERREL}/ \ @@ -2622,7 +2851,7 @@ find Documentation -type d | xargs chmod u+w %if %{with_debuginfo} -%ifnarch noarch +%ifnarch noarch %{nobuildarches} %global __debug_package 1 %files -f debugfiles.list debuginfo-common-%{_target_cpu} %endif @@ -2990,6 +3219,21 @@ fi\ /sbin/depmod -a %{KVERREL}%{?1:+%{1}}\ %{nil} +%if %{with_realtime} +# +# This macro defines a %%post script for a kernel*-kvm package. +# It also defines a %%postun script that does the same thing. +# %%kernel_kvm_post [<subpackage>] +# +%define kernel_kvm_post() \ +%{expand:%%post %{?1:%{1}-}kvm}\ +/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\ +%{nil}\ +%{expand:%%postun %{?1:%{1}-}kvm}\ +/sbin/depmod -a %{KVERREL}%{?1:+%{1}}\ +%{nil} +%endif + # # This macro defines a %%post script for a kernel*-modules package. # It also defines a %%postun script that does the same thing. @@ -3107,8 +3351,10 @@ fi\ %kernel_uki_virt_scripts %endif +%if %{with_up} %kernel_variant_preun %kernel_variant_post -r kernel-smp +%endif %if %{with_pae} %kernel_variant_preun lpae @@ -3128,10 +3374,32 @@ fi\ %kernel_variant_post -v zfcpdump %endif +%if %{with_realtime} +%kernel_variant_preun rt +%kernel_variant_post -v rt -r (kernel|kernel-smp) +%kernel_kvm_post rt +%if %{with_debug} +%kernel_variant_preun rt_debug +%kernel_variant_post -v rt_debug +%kernel_kvm_post rt_debug +%endif +%endif + +%if %{with_automotive} +%kernel_variant_preun automotive +%kernel_variant_post -v automotive -r (kernel|kernel-smp) +%if %{with_debug} +%kernel_variant_preun automotive_debug +%kernel_variant_post -v automotive_debug +%endif +%endif + +%ifnarch noarch %{nobuildarches} if [ -x /sbin/ldconfig ] then /sbin/ldconfig -X || exit $? fi +%endif ### ### file lists @@ -3358,6 +3626,9 @@ fi %{expand:%%files %{?3:%{3}-}modules-partner}\ /lib/modules/%{KVERREL}%{?3:+%{3}}/partner\ %endif\ +%if "%{3}" == "rt" || "%{3}" == "rt_debug"\ +%{expand:%%files -f %{name}-%{?3:%{3}-}kvm.list %{?3:%{3}-}kvm}\ +%endif\ %if %{with_debuginfo}\ %ifnarch noarch\ %{expand:%%files -f debuginfo%{?3}.list %{?3:%{3}-}debuginfo}\ @@ -3384,6 +3655,14 @@ fi %{nil} %kernel_variant_files %{_use_vdso} %{with_up} +%if %{with_debug} +%if %{with_realtime} +%kernel_variant_files %{_use_vdso} %{with_debug} rt_debug +%endif +%if %{with_automotive} +%kernel_variant_files %{_use_vdso} %{with_debug} automotive_debug +%endif +%if %{with_up} %kernel_variant_files %{_use_vdso} %{with_debug} debug %if %{with_debug_meta} %files debug @@ -3394,8 +3673,12 @@ fi %files debug-modules-core %files debug-modules-extra %endif +%endif +%endif %kernel_variant_files %{use_vdso} %{with_pae} lpae %kernel_variant_files %{_use_vdso} %{with_zfcpdump} zfcpdump +%kernel_variant_files %{_use_vdso} %{with_realtime} rt +%kernel_variant_files %{_use_vdso} %{with_automotive} automotive %define kernel_variant_ipaclones(k:) \ %if %{1}\ diff --git a/redhat/rhel_files/filter-modules.sh.rhel b/redhat/rhel_files/filter-modules.sh.rhel index blahblah..blahblah 100755 --- a/redhat/rhel_files/filter-modules.sh.rhel +++ b/redhat/rhel_files/filter-modules.sh.rhel @@ -39,7 +39,7 @@ netprots="6lowpan appletalk atm ax25 batman-adv bluetooth can dccp dsa ieee80215 drmdrvs="amd ast gma500 i2c i915 mgag200 nouveau radeon via " -singlemods="ntb_netdev iscsi_ibft iscsi_boot_sysfs megaraid pmcraid qedi qla1280 9pnet_rdma rpcrdma nvmet-rdma nvme-rdma hid-picolcd hid-prodikeys hwa-hc hwpoison-inject hid-sensor-hub target_core_user sbp_target cxgbit iw_cxgb3 iw_cxgb4 cxgb3i cxgb3i cxgb3i_ddp cxgb4i chcr chtls parport_serial ism regmap-sdw regmap-sdw-mbq arizona-micsupp hid-asus nct6775 ntc_thermistor video apple_bl" +singlemods="ntb_netdev iscsi_ibft iscsi_boot_sysfs megaraid pmcraid qedi qla1280 9pnet_rdma rpcrdma nvmet-rdma nvme-rdma hid-picolcd hid-prodikeys hwa-hc hwpoison-inject hid-sensor-hub target_core_user sbp_target cxgbit iw_cxgb3 iw_cxgb4 cxgb3i cxgb3i cxgb3i_ddp cxgb4i chcr chtls parport_serial ism regmap-sdw regmap-sdw-mbq arizona-micsupp hid-asus nct6775 ntc_thermistor video apple_bl kasan_test" # Grab the arch-specific filter list overrides source ./filter-$2.sh @@ -57,7 +57,7 @@ filter_dir() { grep -e "${dir}/" ${filelist} >> k-d.list mv ${filelist}.tmp $filelist fi - + return 0 } @@ -74,7 +74,7 @@ filter_ko() { grep -e "${mod}.ko" ${filelist} >> k-d.list mv ${filelist}.tmp $filelist fi - + return 0 } diff --git a/redhat/rhel_files/mod-kvm.list b/redhat/rhel_files/mod-kvm.list new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/rhel_files/mod-kvm.list @@ -0,0 +1,5 @@ +kvm-amd +kvm-intel +kvm +kvmgt +ptp_kvm diff --git a/redhat/scripts/genspec/genspec.sh b/redhat/scripts/genspec/genspec.sh index blahblah..blahblah 100755 --- a/redhat/scripts/genspec/genspec.sh +++ b/redhat/scripts/genspec/genspec.sh @@ -53,6 +53,8 @@ test -f "$SOURCES/$SPECFILE" && s/%%SPECINCLUDE_FEDORA_FILES%%/$SPECINCLUDE_FEDORA_FILES/ s/%%SPECINCLUDE_RHEL_FILES%%/$SPECINCLUDE_RHEL_FILES/ s/%%SPECPATCHLIST_CHANGELOG%%/$SPECPATCHLIST_CHANGELOG/ + s/%%SPECINCLUDE_RT_FILES%%/$SPECINCLUDE_RT_FILES/ + s/%%SPECINCLUDE_AUTOMOTIVE_FILES%%/$SPECINCLUDE_AUTOMOTIVE_FILES/ s/%%SPECVERSION%%/$SPECVERSION/ s/%%SPECRPMVERSION%%/$SPECRPMVERSION/ s/%%SPECKABIVERSION%%/$SPECKABIVERSION/ diff --git a/redhat/scripts/mod/mod-kvm.list b/redhat/scripts/mod/mod-kvm.list new file mode 100644 index blahblah..blahblah 100644 --- /dev/null +++ b/redhat/scripts/mod/mod-kvm.list @@ -0,0 +1,5 @@ +kvm-amd +kvm-intel +kvm +kvmgt +ptp_kvm -- https://gitlab.com/cki-project/kernel-ark/-/merge_requests/2403 _______________________________________________ kernel mailing list -- kernel@xxxxxxxxxxxxxxxxxxxxxxx To unsubscribe send an email to kernel-leave@xxxxxxxxxxxxxxxxxxxxxxx Fedora Code of Conduct: https://docs.fedoraproject.org/en-US/project/code-of-conduct/ List Guidelines: https://fedoraproject.org/wiki/Mailing_list_guidelines List Archives: https://lists.fedoraproject.org/archives/list/kernel@xxxxxxxxxxxxxxxxxxxxxxx Do not reply to spam, report it: https://pagure.io/fedora-infrastructure/new_issue