From d12b0792923bd3e095b1ee8e4a9d12eed8b46467 Mon Sep 17 00:00:00 2001 From: yangmingtaip Date: Wed, 12 Oct 2022 15:12:33 +0800 Subject: [PATCH] macro.kmp support -p preamble --- ...-a-bug-that-missing_-p-in-macros.kmp.patch | 37 +++++++++++++++++++ openEuler-rpm-config.spec | 6 ++- 2 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 fixed-a-bug-that-missing_-p-in-macros.kmp.patch diff --git a/fixed-a-bug-that-missing_-p-in-macros.kmp.patch b/fixed-a-bug-that-missing_-p-in-macros.kmp.patch new file mode 100644 index 0000000..7a601e9 --- /dev/null +++ b/fixed-a-bug-that-missing_-p-in-macros.kmp.patch @@ -0,0 +1,37 @@ +From 7629ad0c54cc3970e49b2f78043e0fe1b1c6474d Mon Sep 17 00:00:00 2001 +From: liujing +Date: Wed, 1 Dec 2021 00:46:20 -0500 +Subject: [PATCH] fixed a bug that missing -p in macros.kmp + +--- + macros.kmp | 6 +++--- + 1 file changed, 3 insertions(+), 3 deletions(-) + +diff --git a/macros.kmp b/macros.kmp +index be66e64..5207045 100644 +--- a/macros.kmp ++++ b/macros.kmp +@@ -5,17 +5,17 @@ kernel_module_package_release 1 + + + #kernel_module_package [ -n name ] [ -v version ] [ -r release ] +-# [ -f filelist] ++# [ -f filelist][-p preamble] + # + + %kernel_module_package_buildreqs %global kmodtool_generate_buildreqs 1 \ + kernel-devel + +-%kernel_module_package(n:v:r:f:) %{expand:%( \ ++%kernel_module_package(n:v:r:f:p) %{expand:%( \ + %define kmodtool /usr/lib/rpm/openEuler/kmodtool.py\ + %define latest_kernel $(rpm -q --qf '%{VERSION}-%{RELEASE}\\\\n' `rpm -q kernel-devel` | head -n 1) \ + %{!?kernel_version:%{expand:%%global kernel_version %{latest_kernel}}} \ + %global kverrel %(%{kmodtool} verrel %{?kernel_version} 2>/dev/null) \ +- python3 %{kmodtool} rpmtemplate_kmp %{-n*}%{!-n:%name} %{kverrel} %{-f*}%{!-f:%filelist} \ ++ python3 %{kmodtool} rpmtemplate_kmp %{-n*}%{!-n:%name} %{kverrel} %{-f*}%{!-f:%filelist} %{-p*}%{!-p:%preamble} \ + )} + +-- +2.27.0 + diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index ea71e8a..7d4e331 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 30 -Release: 27 +Release: 28 License: GPL+ Summary: specific rpm configuration files URL: https://gitee.com/openeuler/openEuler-rpm-config @@ -20,6 +20,7 @@ Patch6: add-brp-scripts-to-delete-rpath.patch Patch7: add-common-script.patch Patch8: Fix-python3_version-macros-for-Python-3.10.patch Patch9: Give-a-warning-when-using-kabi-outside-our-stablelis.patch +Patch10: fixed-a-bug-that-missing_-p-in-macros.kmp.patch Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release} @@ -123,6 +124,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/%{_vendor} common.lua %{rpmvdir}/find-requires.ksyms %changelog +* Wed Oct 12 2022 yangmingtai - 30-28 +- macro.kmp support -p preamble + * Thu Sep 8 2022 yangmingtai - 30-27 - add find-requires and find-requires.ksyms -- Gitee