!175 add the scanning path of the rpath and excute brp_chrpath before arch_install_post
From: @xujing99 Reviewed-by: @licunlong Signed-off-by: @licunlong
This commit is contained in:
commit
0f77666eff
@ -3,23 +3,25 @@ From: yangmingtaip <yangmingtai@huawei.com>
|
||||
Date: Sat, 4 Sep 2021 14:14:54 +0800
|
||||
Subject: [PATCH] add brp scripts to delete rpath
|
||||
|
||||
Signed-off-by: xujing <xujing125@huawei.com>
|
||||
---
|
||||
brp-chrpath | 103 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
brp-chrpath | 104 ++++++++++++++++++++++++++++++++++++++++++++++++++++
|
||||
macros | 2 +
|
||||
2 files changed, 105 insertions(+)
|
||||
2 files changed, 106 insertions(+)
|
||||
create mode 100755 brp-chrpath
|
||||
|
||||
diff --git a/brp-chrpath b/brp-chrpath
|
||||
new file mode 100755
|
||||
index 0000000..6dd37de
|
||||
index 0000000..dc48351
|
||||
--- /dev/null
|
||||
+++ b/brp-chrpath
|
||||
@@ -0,0 +1,103 @@
|
||||
@@ -0,0 +1,104 @@
|
||||
+#!/usr/bin/sh
|
||||
+# remove rpath specified
|
||||
+
|
||||
+rpathSuffix=(
|
||||
+ "/home/abuild/rpmbuild/BUILD"
|
||||
+ "/home/abuild/rpmbuild/BUILD",
|
||||
+ "/home/lkp/rpmbuild/BUILD"
|
||||
+)
|
||||
+
|
||||
+rpath=(
|
||||
@ -119,7 +121,7 @@ index 0000000..6dd37de
|
||||
+
|
||||
+exit 0
|
||||
diff --git a/macros b/macros
|
||||
index 7cde63f..ee0c126 100644
|
||||
index 36621df..a316be9 100644
|
||||
--- a/macros
|
||||
+++ b/macros
|
||||
@@ -89,6 +89,7 @@
|
||||
@ -130,14 +132,14 @@ index 7cde63f..ee0c126 100644
|
||||
%__brp_ldconfig /usr/lib/rpm/brp-ldconfig
|
||||
%__brp_compress /usr/lib/rpm/brp-compress
|
||||
%__brp_strip /usr/lib/rpm/brp-strip %{__strip}
|
||||
@@ -107,6 +108,7 @@
|
||||
%{?__brp_strip_static_archive} \
|
||||
%{?py_auto_byte_compile:%{?__brp_python_bytecompile}} \
|
||||
%{?__brp_python_hardlink} \
|
||||
+ %{?__vendor_delete_rpath:%{?__brp_chrpath}} \
|
||||
%{nil}
|
||||
@@ -111,6 +112,7 @@
|
||||
|
||||
%__spec_install_post\
|
||||
%{?__debug_package:%{__debug_install_post}}\
|
||||
+ %{?__vendor_delete_rpath:%{?__brp_chrpath}} \
|
||||
%{__arch_install_post}\
|
||||
%{__os_install_post}\
|
||||
%{nil}
|
||||
--
|
||||
2.23.0
|
||||
2.33.0
|
||||
|
||||
|
||||
25
fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch
Normal file
25
fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch
Normal file
@ -0,0 +1,25 @@
|
||||
From 4e1adcc36b0c2e379d6080ceb874f2413644c535 Mon Sep 17 00:00:00 2001
|
||||
From: xujing <xujing125@huawei.com>
|
||||
Date: Wed, 15 Nov 2023 17:16:22 +0800
|
||||
Subject: [PATCH] fix the ELF file cannot be found due to escape of '\'
|
||||
|
||||
---
|
||||
macros | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/macros b/macros
|
||||
index 7cde63f..36621df 100644
|
||||
--- a/macros
|
||||
+++ b/macros
|
||||
@@ -275,7 +275,7 @@ find $RPM_BUILD_ROOT -type f -name "*.a" -delete
|
||||
|
||||
%delete_la find $RPM_BUILD_ROOT -type f -name "*.la" -delete
|
||||
|
||||
-%chrpath_delete find $RPM_BUILD_ROOT/ -type f -exec file {} ';' | grep "\<ELF\>" | awk -F ':' '{print $1}' | xargs -i chrpath --delete {}
|
||||
+%chrpath_delete find $RPM_BUILD_ROOT/ -type f -exec file {} ';' | grep "\\<ELF\\>" | awk -F ':' '{print $1}' | xargs -i chrpath --delete {}
|
||||
|
||||
%package_help \
|
||||
%package help \
|
||||
--
|
||||
2.33.0
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
|
||||
Name: %{vendor}-rpm-config
|
||||
Version: 30
|
||||
Release: 45
|
||||
Release: 46
|
||||
License: GPL+
|
||||
Summary: specific rpm configuration files
|
||||
URL: https://gitee.com/openeuler/openEuler-rpm-config
|
||||
@ -32,6 +32,7 @@ Patch18: fix-brp-ldconfig-riscv-default-library-directory.patch
|
||||
Patch19: add-pyproject-macros.patch
|
||||
Patch20: add-pytest-and-tox-macros.patch
|
||||
Patch21: check-if-the-file-is-a-symbolic-link-in-brp-digest-list.patch
|
||||
Patch22: fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch
|
||||
|
||||
Provides: python-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
Provides: python2-rpm-macros = %{?epoch:%{epoch}:}%{version}-%{release}
|
||||
@ -143,6 +144,11 @@ sed -i "s/__vendor/%{vendor}/g" `grep "__vendor" -rl %{buildroot}%{_rpmconfigdir
|
||||
%{rpmvdir}/find-requires.ksyms
|
||||
|
||||
%changelog
|
||||
* Wed Nov 22 2023 xujing <xujing125@huawei.com> - 30-46
|
||||
- add the scanning path of the rpath
|
||||
fix the ELF file cannot be found due to escape of '\'
|
||||
excute brp_chrpath before arch_install_post
|
||||
|
||||
* Fri Nov 03 2023 fuanan <fuanan3@h-partners.com> - 30-45
|
||||
- check if the file is a symbolic link in brp-digest-list
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user