78 lines
3.3 KiB
Diff
78 lines
3.3 KiB
Diff
From 9ddbf9dcb6de021ad796876282796dc409cdb268 Mon Sep 17 00:00:00 2001
|
|
From: Yangyang Shen <shenyangyang4@huawei.com>
|
|
Date: Thu, 7 Jan 2021 21:19:58 +0800
|
|
Subject: [PATCH] replace openEuler with %{_vendor} macro
|
|
|
|
---
|
|
macros | 14 +++++++-------
|
|
macros.kmp | 2 +-
|
|
2 files changed, 8 insertions(+), 8 deletions(-)
|
|
|
|
diff --git a/macros b/macros
|
|
index b06faea..678136a 100644
|
|
--- a/macros
|
|
+++ b/macros
|
|
@@ -52,7 +52,7 @@
|
|
%configure \
|
|
%{set_build_flags}; \
|
|
[ "%_configure_gnuconfig_hack" = 1 ] && for i in $(find $(dirname %{_configure}) -name config.guess -o -name config.sub) ; do \
|
|
- [ -f /usr/lib/rpm/openEuler/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/openEuler/$(basename $i) $i ; \
|
|
+ [ -f /usr/lib/rpm/%{_vendor}/$(basename $i) ] && %{__rm} -f $i && %{__cp} -fv /usr/lib/rpm/%{_vendor}/$(basename $i) $i ; \
|
|
done ; \
|
|
[ "%_configure_libtool_hardening_hack" = 1 ] && [ x != "x%{_hardened_ldflags}" ] && \
|
|
for i in $(find . -name ltmain.sh) ; do \
|
|
@@ -89,7 +89,7 @@
|
|
|
|
# Build root policy macros. Standard naming:
|
|
# convert all '-' in basename to '_', add two leading underscores.
|
|
-%__brp_ldconfig /usr/lib/rpm/openEuler/brp-ldconfig
|
|
+%__brp_ldconfig /usr/lib/rpm/%{_vendor}/brp-ldconfig
|
|
%__brp_compress /usr/lib/rpm/brp-compress
|
|
%__brp_strip /usr/lib/rpm/brp-strip %{__strip}
|
|
%__brp_strip_comment_note /usr/lib/rpm/brp-strip-comment-note %{__strip} %{__objdump}
|
|
@@ -144,8 +144,8 @@
|
|
# secure options for rpmbuild
|
|
#
|
|
# #hardened options
|
|
-%_hardening_cflags -specs=/usr/lib/rpm/%{_vendor}/openEuler-hardened-cc1
|
|
-%_hardening_ldflags -Wl,-z,now -specs=/usr/lib/rpm/%{_vendor}/openEuler-hardened-ld
|
|
+%_hardening_cflags -specs=/usr/lib/rpm/%{_vendor}/%{_vendor}-hardened-cc1
|
|
+%_hardening_ldflags -Wl,-z,now -specs=/usr/lib/rpm/%{_vendor}/%{_vendor}-hardened-ld
|
|
# Use "%undefine _hardened_build" to disable.
|
|
%_hardened_build 1
|
|
%_hardened_cflags %{?_hardened_build:%{_hardening_cflags}}
|
|
@@ -156,14 +156,14 @@
|
|
#Use "%undefine _sec_opt_build" to disable.
|
|
#Use "%undefine _pie_build" to disable.
|
|
%_pie_build 1
|
|
-%_pie_pre_cflags -specs=/usr/lib/rpm/%{_vendor}/openEuler-pie-cc1
|
|
-%_pie_pre_ldflags -Wl,-z,now -specs=/usr/lib/rpm/%{_vendor}/openEuler-pie-ld
|
|
+%_pie_pre_cflags -specs=/usr/lib/rpm/%{_vendor}/%{_vendor}-pie-cc1
|
|
+%_pie_pre_ldflags -Wl,-z,now -specs=/usr/lib/rpm/%{_vendor}/%{_vendor}-pie-ld
|
|
%_pie_cflags %{?_sec_opt_build:?_pie_build:%{_pie_pre_cflags}}
|
|
%_pie_ldflags %{?_sec_opt_build:?_pie_build:%{_pie_pre_ldflags}}
|
|
|
|
#Use "%undefine _fs_build" to disable.
|
|
%_fs_build 1
|
|
-%_fs_pre_cflags -specs=/usr/lib/rpm/%{_vendor}/openEuler-fs-cc1
|
|
+%_fs_pre_cflags -specs=/usr/lib/rpm/%{_vendor}/%{_vendor}-fs-cc1
|
|
%_fs_cflags %{?_fs_build:%{_fs_pre_cflags}}
|
|
|
|
|
|
diff --git a/macros.kmp b/macros.kmp
|
|
index be66e64..2bf977c 100644
|
|
--- a/macros.kmp
|
|
+++ b/macros.kmp
|
|
@@ -12,7 +12,7 @@ kernel_module_package_release 1
|
|
kernel-devel
|
|
|
|
%kernel_module_package(n:v:r:f:) %{expand:%( \
|
|
- %define kmodtool /usr/lib/rpm/openEuler/kmodtool.py\
|
|
+ %define kmodtool /usr/lib/rpm/%{_vendor}/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) \
|
|
--
|
|
2.23.0
|
|
|