pack: "fakechroot" engine passes the recursive RUNPATH to ld.so.

This is a followup to 58abd58739, which
did not fully address <https://issues.guix.gnu.org/43491>.

* guix/scripts/pack.scm (wrapped-package)[build](runpath): Rewrite in
terms of 'file-needed/recursive'.
This commit is contained in:
Ludovic Courtès 2023-03-17 18:23:58 +01:00 committed by Ludovic Courtès
parent b5a70370f5
commit d15dbdb79c
No known key found for this signature in database
GPG Key ID: 090B11993D9AEBB5

View File

@ -1201,12 +1201,10 @@ last resort for relocation."
(utf8->string bv)))))
(define (runpath file)
;; Return the RUNPATH of FILE as a list of directories.
(let* ((bv (call-with-input-file file get-bytevector-all))
(elf (parse-elf bv))
(dyninfo (elf-dynamic-info elf)))
(or (and=> dyninfo elf-dynamic-info-runpath)
'())))
;; Return the "recursive" RUNPATH of FILE as a list of
;; directories.
(delete-duplicates
(map dirname (file-needed/recursive file))))
(define (elf-loader-compile-flags program)
;; Return the cpp flags defining macros for the ld.so/fakechroot