Eric Bavier <ericbav...@gmail.com> skribis: > This patch should fix the failing rdup build.
Seems to me that the test suite was bound to fail in a chroot setup, no? > I'm sending it to the list because I wonder if there's a better way to > handle the missing script shebangs? [...] > + (alist-cons-before > + 'check 'pre-check > + (lambda _ > + (setenv "HOME" (getcwd)) > + (substitute* > "testsuite/rdup/rdup.rdup-up-t-with-file.exp" > + (("/bin/cat") (which "cat"))) > + ;; Some test scripts are missing shebangs, which cause > + ;; "could not execute" errors. Add shebangs. > + (for-each > + (lambda (testscript) > + (with-atomic-file-replacement > + (string-append "testsuite/rdup/" testscript) > + (lambda (in out) > + (begin > + (format out "#!~a\n" (which "sh")) > + (dump-port in out))))) > + '("rdup.hardlink.helper" > + "rdup.hardlink-strip.helper" > + "rdup.hardlink-strip2.helper" > + "rdup.pipeline.helper"))) That looks like the right approach to me. It would be even nicer to make it a ‘snippet’ in the ‘origin’ structure; the only difference is that the snippet would use “#!/bin/sh” (that would later be patched in the patch-shebangs anyway.) Same for s,/bin/cat,cat,g. The advantage is that ‘guix build -S’ would return something equivalent to what we’re actually building. Could you try that? Thanks, Ludo’.