summary refs log tree commit diff
diff options
context:
space:
mode:
authorRicardo Wurmus <rekado@elephly.net>2022-01-04 15:00:32 +0100
committerRicardo Wurmus <rekado@elephly.net>2022-01-04 15:24:58 +0100
commit99d872ae04d50917767972b300f88e0f9179bba7 (patch)
tree513750175c54cc29f54812e46ab7131c704118bc
parent10836b45a2c497d1dc257adcde8c581b18e1e7b9 (diff)
downloadguix-99d872ae04d50917767972b300f88e0f9179bba7.tar.gz
gnu: texlive-bin: Fix directory traversal.
Fixes <https://bugs.gnu.org/52979>.

* gnu/packages/tex.scm (texlive-bin)[arguments]: Add build phase
'patch-directory-traversal.
-rw-r--r--gnu/packages/tex.scm9
1 files changed, 9 insertions, 0 deletions
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index 2705263daa..43aefd57e6 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -426,6 +426,15 @@ files from LOCATIONS with expected checksum HASH.  CODE is not currently in use.
 
                (with-fluids ((%default-port-encoding "ISO-8859-1"))
                  (substitute-commands iso-8859-1-encoded-scripts)))))
+         ;; When ST_NLINK_TRICK is set, kpathsea attempts to avoid work when
+         ;; searching files by assuming that a directory with exactly two
+         ;; links has no subdirectories.  This assumption does not hold in our
+         ;; case, so some directories with symlinked subdirectories would not
+         ;; be traversed.
+         (add-after 'patch-scripts 'patch-directory-traversal
+           (lambda _
+             (substitute* "texk/kpathsea/config.h"
+               (("#define ST_NLINK_TRICK") ""))))
          (add-after 'check 'customize-texmf.cnf
            ;; The default texmf.cnf is provided by this package, texlive-bin.
            ;; Every variable of interest is set relatively to the GUIX_TEXMF