From 5c961718c1d855bf3c5feb53909fd05f39d9e461 Mon Sep 17 00:00:00 2001 From: zhangnaichuan Date: Mon, 31 Jul 2023 18:47:48 +0800 Subject: [PATCH] kabi: add kernel-abi-stablelists --- kernel.spec | 40 +++++++++++++++++++++++++++++++++++++++- 1 file changed, 39 insertions(+), 1 deletion(-) diff --git a/kernel.spec b/kernel.spec index bfb9d640..ece64cd1 100644 --- a/kernel.spec +++ b/kernel.spec @@ -1,5 +1,6 @@ %define with_signmodules 1 %define with_kabichk 1 +%define with_kernel_abi_stablelists %{?_without_kernel_abi_stablelists: 0} %{?!_without_kernel_abi_stablelists: 1} %define modsign_cmd %{SOURCE10} @@ -12,7 +13,7 @@ %global upstream_sublevel 0 %global devel_release 153 %global maintenance_release .27.0 -%global pkg_release .103 +%global pkg_release .104 %define with_debuginfo 1 # Do not recompute the build-id of vmlinux in find-debuginfo.sh @@ -64,6 +65,11 @@ Source20: Module.kabi_aarch64 Source21: Module.kabi_x86_64 %endif +%if %{with_kernel_abi_stablelists} +Source100: kabi_whitelist_x86_64 +Source101: kabi_whitelist_aarch64 +%endif + Source200: mkgrub-menu-aarch64.sh Source2000: cpupower.service @@ -210,6 +216,15 @@ Summary: Inspection and simple manipulation of eBPF programs and maps This package contains the bpftool, which allows inspection and simple manipulation of eBPF programs and maps. +%package -n %{name}-abi-stablelists +Summary: kernel ABI symbol stablelists +AutoReqProv: no +Provides: %{name}-abi-whitelists +%description -n %{name}-abi-stablelists +The kABI package contains information pertaining to the +kernel ABI, including lists of kernel symbols that are needed by +external Linux kernel modules, and a yum plugin to aid enforcement. + %package source Summary: the kernel source %description source @@ -470,6 +485,20 @@ popd install -m 644 .config $RPM_BUILD_ROOT/boot/config-%{KernelVer} install -m 644 System.map $RPM_BUILD_ROOT/boot/System.map-%{KernelVer} +%if %{with_kernel_abi_stablelists} +INSTALL_KABI_PATH=$RPM_BUILD_ROOT/lib/modules +mkdir -p $INSTALL_KABI_PATH + +mkdir -p $INSTALL_KABI_PATH/kabi-oe2203sp2/ +cp $RPM_SOURCE_DIR/kabi_whitelist_x86_64 $RPM_SOURCE_DIR/kabi_stablelist_x86_64 +cp $RPM_SOURCE_DIR/kabi_whitelist_aarch64 $RPM_SOURCE_DIR/kabi_stablelist_aarch64 +cp -a $RPM_SOURCE_DIR/kabi_stablelist_x86_64 $INSTALL_KABI_PATH/kabi-oe2203sp2/ +cp -a $RPM_SOURCE_DIR/kabi_stablelist_aarch64 $INSTALL_KABI_PATH/kabi-oe2203sp2/ +pushd $INSTALL_KABI_PATH +ln -sf kabi-oe2203sp1 kabi-current +popd +%endif + %if 0%{?with_kabichk} gzip -c9 < Module.symvers > $RPM_BUILD_ROOT/boot/symvers-%{KernelVer}.gz %endif @@ -909,7 +938,16 @@ fi /usr/src/linux-%{KernelVer}/.scmversion %endif +%if %{with_kernel_abi_stablelists} +%files -n kernel-abi-stablelists +%defattr(-,root,root,-) +/lib/modules/kabi-* +%endif + %changelog +* Thu Sep 14 2023 Naichuan Zhang - 5.10.0-153.27.0.104 +- kabi: add kernel_abi_stablelists + * Wed Sep 13 2023 Jialin Zhang - 5.10.0-153.27.0.103 - !2145 [sync] PR-2126: netfilter: nf_tables: skip immediate deactivate in _PREPARE_ERROR - !2110 [sync] PR-2090: net/sched: sch_hfsc: Ensure inner classes have fsc curve -- Gitee