guix-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


From: guix-commits
Subject: 02/08: pack: "fakechroot" engine passes the recursive RUNPATH to ld.so.
Date: Fri, 17 Mar 2023 18:25:20 -0400 (EDT)

civodul pushed a commit to branch master
in repository guix.

commit d15dbdb79c617b8b710ef5a9502be0d5f640aaaf
Author: Ludovic Courtès <ludovic.courtes@inria.fr>
AuthorDate: Fri Mar 17 18:23:58 2023 +0100

    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'.
---
 guix/scripts/pack.scm | 10 ++++------
 1 file 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]