1 Star 0 Fork 90

hongjinghao/openEuler-rpm-config

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
change-the-vendor-to-generic-for-common-use.patch 4.42 KB
一键复制 编辑 原始数据 按行查看 历史
Mingtai 提交于 2022-11-30 20:34 . support adaptive according to vendor
From e9f486a8d9af5b01dcadf8432a449e434cd6886b Mon Sep 17 00:00:00 2001
From: Yangyang Shen <shenyangyang4@huawei.com>
Date: Sat, 27 Mar 2021 14:18:56 +0800
Subject: [PATCH] change the vendor to generic for common use
---
openEuler-hardened-cc1 => generic-hardened-cc1 | 0
openEuler-hardened-ld => generic-hardened-ld | 0
openEuler-pie-cc1 => generic-pie-cc1 | 0
openEuler-pie-ld => generic-pie-ld | 0
macros | 16 ++++++++--------
macros.kmp | 2 +-
6 files changed, 9 insertions(+), 9 deletions(-)
rename openEuler-hardened-cc1 => generic-hardened-cc1 (100%)
rename openEuler-hardened-ld => generic-hardened-ld (100%)
rename openEuler-pie-cc1 => generic-pie-cc1 (100%)
rename openEuler-pie-ld => generic-pie-ld (100%)
diff --git a/openEuler-hardened-cc1 b/generic-hardened-cc1
similarity index 100%
rename from openEuler-hardened-cc1
rename to generic-hardened-cc1
diff --git a/openEuler-hardened-ld b/generic-hardened-ld
similarity index 100%
rename from openEuler-hardened-ld
rename to generic-hardened-ld
diff --git a/openEuler-pie-cc1 b/generic-pie-cc1
similarity index 100%
rename from openEuler-pie-cc1
rename to generic-pie-cc1
diff --git a/openEuler-pie-ld b/generic-pie-ld
similarity index 100%
rename from openEuler-pie-ld
rename to generic-pie-ld
diff --git a/macros b/macros
index b06faea..def87a7 100644
--- a/macros
+++ b/macros
@@ -1,6 +1,6 @@
# Per-platform rpm configuration file.
-%_vendor openEuler
+%_vendor __vendor
%_os linux
%_target_platform %{_target_cpu}-%{_vendor}-%{_target_os}%{?_gnu}
@@ -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/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/generic-hardened-cc1
+%_hardening_ldflags -Wl,-z,now -specs=/usr/lib/rpm/generic-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/generic-pie-cc1
+%_pie_pre_ldflags -Wl,-z,now -specs=/usr/lib/rpm/generic-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/generic-fs-cc1
%_fs_cflags %{?_fs_build:%{_fs_pre_cflags}}
diff --git a/macros.kmp b/macros.kmp
index be66e64..b9ebbe8 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.33.0
马建仓 AI 助手
尝试更多
代码解读
代码找茬
代码优化
1
https://gitee.com/hongjinghao/openEuler-rpm-config.git
git@gitee.com:hongjinghao/openEuler-rpm-config.git
hongjinghao
openEuler-rpm-config
openEuler-rpm-config
master

搜索帮助