SHA256
3
0
forked from pool/rpm
rpm/finddebuginfo-absolute-links.diff

36 lines
1.1 KiB
Diff
Raw Normal View History

From: Jan Blunck <jblunck@suse.de>
Subject: Do the symbolic links right in the first place
Since brp-symlink relinks symbolic links to enforce a certain policy we should
do it right in the first place. So this patch changes find-debuginfo.sh scripts
behavior to reflect that policy.
Signed-off-by: Jan Blunck <jblunck@suse.de>
---
scripts/find-debuginfo.sh | 12 +++++++++++-
1 file changed, 11 insertions(+), 1 deletion(-)
Index: scripts/find-debuginfo.sh
===================================================================
--- scripts/find-debuginfo.sh.orig
+++ scripts/find-debuginfo.sh
@@ -123,7 +123,17 @@ debug_link()
local l="/usr/lib/debug$2"
local t="$1"
echo >> "$LINKSFILE" "$l $t"
- link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+
+ # this should correspond to what brp-symlink is doing
+ case $t in
+ /usr*)
+ link_relative "$t" "$l" "$RPM_BUILD_ROOT"
+ ;;
+ *)
+ mkdir -p "$(dirname "$RPM_BUILD_ROOT$l")" && \
+ ln -snf "$t" "$RPM_BUILD_ROOT$l"
+ ;;
+ esac
}
# Compare two binaries but ignore the .note.gnu.build-id section