Unverified Commit 19bb6822 authored by Arnout Engelen's avatar Arnout Engelen Committed by GitHub
Browse files

Merge pull request #230663 from xworld21/texlive-faketime-preload-pure-glibc

texlive.combine: call faketime from within fmtutil
parents 4224a7f7 c60d2ffe
Loading
Loading
Loading
Loading
+5 −1
Original line number Diff line number Diff line
@@ -248,7 +248,11 @@ in (buildEnv {
    # libfaketime fixes non-determinism related to timestamps ignoring FORCE_SOURCE_DATE
    # we cannot fix further randomness caused by luatex; for further details, see
    # https://salsa.debian.org/live-team/live-build/-/blob/master/examples/hooks/reproducible/2006-reproducible-texlive-binaries-fmt-files.hook.chroot#L52
    FORCE_SOURCE_DATE=1 TZ= faketime -f '@1980-01-01 00:00:00 x0.001' fmtutil --sys --all | grep '^fmtutil' # too verbose
    # note that calling faketime and fmtutil is fragile (faketime uses LD_PRELOAD, fmtutil calls /bin/sh, causing potential glibc issues on non-NixOS)
    # so we patch fmtutil to use faketime, rather than calling faketime fmtutil
    substitute "$out/bin/fmtutil" fmtutil \
      --replace 'my $cmdline = "$eng -ini ' 'my $cmdline = "faketime -f '"'"'\@1980-01-01 00:00:00 x0.001'"'"' $eng -ini '
    FORCE_SOURCE_DATE=1 TZ= perl fmtutil --sys --all | grep '^fmtutil' # too verbose
    #texlinks "$out/bin" && wrapBin # do we need to regenerate format links?

    # Disable unavailable map files