From c18343dfdf162a5de7282b71d0273deccc541d3f Mon Sep 17 00:00:00 2001 From: Funda Wang Date: Sun, 9 Feb 2025 20:58:01 +0800 Subject: [PATCH] Make libfoo.so symlinks require the soname-provide of the target library --- libsymlink.attr | 5 +++++ macros.perl | 3 +-- openEuler-rpm-config.spec | 10 ++++++++-- 3 files changed, 14 insertions(+), 4 deletions(-) create mode 100644 libsymlink.attr diff --git a/libsymlink.attr b/libsymlink.attr new file mode 100644 index 0000000..8d2c58b --- /dev/null +++ b/libsymlink.attr @@ -0,0 +1,5 @@ +# Make libfoo.so symlinks require the soname-provide of the target library +%__libsymlink_requires %{_rpmconfigdir}/elfdeps --provides --soname-only +%__libsymlink_magic ^symbolic link to .*lib.*\\.so\\..*$ +%__libsymlink_path ^.*\\.so$ +%__libsymlink_flags magic_and_path diff --git a/macros.perl b/macros.perl index 1e45bcb..cab2eb7 100644 --- a/macros.perl +++ b/macros.perl @@ -40,9 +40,8 @@ export PERL_MM_USE_DEFAULT=1 # "%{?perl_default_filter}", before any %description block. %perl_default_filter %{expand: \ -%global __global_requires_exclude_from %{nil} %global __provides_exclude_from %{?__provides_exclude_from:%__provides_exclude_from|}^%{_docdir} -%global __requires_exclude_from %{?__requires_exclude_from:%__requires_exclude_from|}^%{_docdir}/.*\\\\(?=META.json|\\\\(MY|\\\\)META.yml\\\\)$ +%global __requires_exclude_from %{?__requires_exclude_from:%__requires_exclude_from|}^%{_docdir} %global __provides_exclude %{?__provides_exclude:%__provides_exclude|}^perl\\\\(VMS|^perl\\\\(Win32|^perl\\\\(DB\\\\)|^perl\\\\(UNIVERSAL\\\\) %global __requires_exclude %{?__requires_exclude:%__requires_exclude|}^perl\\\\(VMS|^perl\\\\(Win32 } diff --git a/openEuler-rpm-config.spec b/openEuler-rpm-config.spec index c0ad452..b18c9fd 100644 --- a/openEuler-rpm-config.spec +++ b/openEuler-rpm-config.spec @@ -3,7 +3,7 @@ Name: %{vendor}-rpm-config Version: 31 -Release: 15 +Release: 16 License: GPL+ AND MIT Summary: specific rpm configuration files URL: https://gitee.com/src-openeuler/openEuler-rpm-config @@ -38,10 +38,11 @@ Source201: infopages.attr Source202: manpages.attr Source203: nbdkit.attr Source204: find-provides.nbdkit -# Source 205-207 from fedora, licenced under MIT +# Source 205-208 from fedora, licenced under MIT Source205: kabi.attr Source206: kabi.sh Source207: kmod.attr +Source208: libsymlink.attr # Misc helper scripts Source300: kmodtool @@ -194,6 +195,11 @@ sed -i "s/@VENDOR@/%{vendor}/g" `grep "@VENDOR@" -rl %{buildroot}%{_rpmconfigdir %{_fileattrsdir}/kmod.attr %changelog +* Mon Feb 03 2025 Funda Wang - 31-16 +- Make libfoo.so symlinks require the soname-provide of the target library +- revert previous change regarding perl_default_filter, it causes regressions + for some packages + * Fri Jan 31 2025 Funda Wang - 31-15 - add kabi, kmod dependency generators from fedora -- Gitee