diff --git a/add-brp-scripts-to-delete-rpath.patch b/add-brp-scripts-to-delete-rpath.patch index 7c52c4db5a833e5eb985c953c667c00f08a0d9fb..8677bd5c4598d23b254fb1caa486c262e8c84cc8 100644 --- a/add-brp-scripts-to-delete-rpath.patch +++ b/add-brp-scripts-to-delete-rpath.patch @@ -3,23 +3,25 @@ From: yangmingtaip Date: Sat, 4 Sep 2021 14:14:54 +0800 Subject: [PATCH] add brp scripts to delete rpath +Signed-off-by: xujing --- - 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 diff --git a/fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch b/fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch new file mode 100644 index 0000000000000000000000000000000000000000..ae85c220ccbc0472588cb7794925ef165ac003b4 --- /dev/null +++ b/fix-the-ELF-file-cannot-be-found-due-to-escape-of.patch @@ -0,0 +1,25 @@ +From 4e1adcc36b0c2e379d6080ceb874f2413644c535 Mon Sep 17 00:00:00 2001 +From: xujing +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 "\" | awk -F ':' '{print $1}' | xargs -i chrpath --delete {} ++%chrpath_delete find $RPM_BUILD_ROOT/ -type f -exec file {} ';' | grep "\\" | awk -F ':' '{print $1}' | xargs -i chrpath --delete {} + + %package_help \ + %package help \ +-- +2.33.0 + diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index 8eb0b658a0ebe541e94924a424e233c31c67014a..11f00da8ff1748f920031c9f5ebb5df509b1fa11 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -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 - 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 - 30-45 - check if the file is a symbolic link in brp-digest-list