!85 kernel-rpm-macros support -p |preamble

From: @yangmingtaip 
Reviewed-by: @openeuler-basic 
Signed-off-by: @openeuler-basic
This commit is contained in:
openeuler-ci-bot 2022-10-12 08:13:48 +00:00 committed by Gitee
commit 2f1377f990
No known key found for this signature in database
GPG Key ID: 173E9B9CA92EEF8F
2 changed files with 42 additions and 1 deletions

View File

@ -0,0 +1,37 @@
From 7629ad0c54cc3970e49b2f78043e0fe1b1c6474d Mon Sep 17 00:00:00 2001
From: liujing <liujing_yewu@cmss.chinamobile.com>
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

View File

@ -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 <yangmingtai@huawei.com> - 30-28
- macro.kmp support -p preamble
* Thu Sep 8 2022 yangmingtai <yangmingtai@huawei.com> - 30-27
- add find-requires and find-requires.ksyms