From 1323c4d6de411b41e553c41915881e1318a9d35e Mon Sep 17 00:00:00 2001 From: Michal Domonkos Date: Fri, 19 Jul 2024 14:15:33 +0200 Subject: [PATCH] Fix auto soname requires on non-versioned targets RPM's macro engine itself understands backslash escapes so we need to double-escape these, otherwise we may accidentally match symlink targets that contain the substring "so" in their names, such as: libechosounder.so -> libechosounder2.so ~~ ^ this is currently matched Whereas we only want these to be processed: libechosounder.so -> libechosounder.so.2 ~~~~~ ^ this should be matched Resolves: RHEL-28767 --- libsymlink.attr | 4 ++-- redhat-rpm-config.spec | 3 ++- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/libsymlink.attr b/libsymlink.attr index 4e4981f..8d2c58b 100644 --- a/libsymlink.attr +++ b/libsymlink.attr @@ -1,5 +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_magic ^symbolic link to .*lib.*\\.so\\..*$ +%__libsymlink_path ^.*\\.so$ %__libsymlink_flags magic_and_path diff --git a/redhat-rpm-config.spec b/redhat-rpm-config.spec index 5c88dc1..ad3e53a 100644 --- a/redhat-rpm-config.spec +++ b/redhat-rpm-config.spec @@ -254,8 +254,9 @@ install -p -m 644 -t %{buildroot}%{_rpmluadir}/fedora/srpm forge.lua %doc buildflags.md %changelog -* Fri Jul 12 2024 Michal Domonkos - 208-1 +* Fri Jul 19 2024 Michal Domonkos - 208-1 - brp-mangle-shebangs: Strip env flags when mangling shebangs (RHEL-26961) +- Fix automatic soname requires on non-versioned symlink targets (RHEL-28767) * Thu Jan 18 2024 Miro HronĨok - 207-1 - brp-python-bytecompile: Pass --invalidation-mode=timestamp to compileall