diff options
author | Ludovic Courtès <ludovic.courtes@inria.fr> | 2023-03-17 18:23:58 +0100 |
---|---|---|
committer | Ludovic Courtès <ludo@gnu.org> | 2023-03-17 23:20:35 +0100 |
commit | d15dbdb79c617b8b710ef5a9502be0d5f640aaaf (patch) | |
tree | d54a9e4dfc9263c46f804e471222fd463fcf2215 /guix/scripts | |
parent | b5a70370f5ffd3cfa5e7d8f819475ca50d20fa7f (diff) |
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'.
Diffstat (limited to 'guix/scripts')
-rw-r--r-- | guix/scripts/pack.scm | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm index 25ac9d29d0..0dc9979194 100644 --- a/guix/scripts/pack.scm +++ b/guix/scripts/pack.scm @@ -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 |