summary refs log tree commit diff
diff options
context:
space:
mode:
authorLudovic Courtès <ludo@gnu.org>2020-06-29 22:57:12 +0200
committerLudovic Courtès <ludo@gnu.org>2020-06-30 00:18:28 +0200
commit4f060bf2fe1dd8bec79cb07907b46e16fca21398 (patch)
treeeb31be00fffaecdc5d2227653b9861cee45481a4
parentb032d14ebd26e80456e76d60fb946ce232abec94 (diff)
downloadguix-4f060bf2fe1dd8bec79cb07907b46e16fca21398.tar.gz
pack: Dereference symlinks when looking for executables.
Fixes <https://bugs.gnu.org/42127>.
Reported by Andrius Štikonas <andrius@stikonas.eu>.

* guix/scripts/pack.scm (wrapped-package)[build]: Add trailing slash to
the arguments to 'find-files'.
-rw-r--r--guix/scripts/pack.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/guix/scripts/pack.scm b/guix/scripts/pack.scm
index e0f9cc1a12..5bd405ade4 100644
--- a/guix/scripts/pack.scm
+++ b/guix/scripts/pack.scm
@@ -836,9 +836,10 @@ last resort for relocation."
                     (scandir input))
 
           (for-each build-wrapper
-                    (append (find-files (string-append input "/bin"))
-                            (find-files (string-append input "/sbin"))
-                            (find-files (string-append input "/libexec")))))))
+                    ;; Note: Trailing slash in case these are symlinks.
+                    (append (find-files (string-append input "/bin/"))
+                            (find-files (string-append input "/sbin/"))
+                            (find-files (string-append input "/libexec/")))))))
 
   (computed-file (string-append
                   (cond ((package? package)