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

This is a followup to 58abd5873985e0cd9a2926867bf697c5e7bc01f9, 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))))) (utf8->string bv)))))
(define (runpath file) (define (runpath file)
;; Return the RUNPATH of FILE as a list of directories. ;; Return the "recursive" RUNPATH of FILE as a list of
(let* ((bv (call-with-input-file file get-bytevector-all)) ;; directories.
(elf (parse-elf bv)) (delete-duplicates
(dyninfo (elf-dynamic-info elf))) (map dirname (file-needed/recursive file))))
(or (and=> dyninfo elf-dynamic-info-runpath)
'())))
(define (elf-loader-compile-flags program) (define (elf-loader-compile-flags program)
;; Return the cpp flags defining macros for the ld.so/fakechroot ;; Return the cpp flags defining macros for the ld.so/fakechroot