On 2022-06-23, Maxim Cournoyer wrote: >>> Perhaps to show our stand here we could patch our copy of pdftex with >>> 's/FORCE_SOURCE_DATE/SOURCE_DATE_EPOCH/', lest we end up with a grocery >>> list of *SOURCE_DATE* variable variants. >> >> Sure, with some technical details fixed up, as I think they are >> functionally different, in that FORCE_SOURCE_DATE is a boolean, and >> SOURCE_DATE_EPOCH is an integer, though ... Guix sets >> SOURCE_DATE_EPOCH=1 ... so it might just work by dumb luck! Though There >> may be some rare packages that need SOURCE_DATE_EPOCH to be some larger >> value... "It can't possibly be 1970, this program was first written in >> 2002, there must be some error, failing build..." >> >> At any rate, if diverging from upstream Tex Live is how Guix wants to >> handle this, I'm all for it! > > Seems we have a small consensus here (Ludo, you and myself); would you > like to give it a try?
My first naive attempt appeared to build, but failed lots of test
suites... so that clearly needs some more work!
diff --git a/gnu/packages/tex.scm b/gnu/packages/tex.scm
index f6b4c25595..e8c99d202b 100644
--- a/gnu/packages/tex.scm
+++ b/gnu/packages/tex.scm
@@ -395,6 +395,12 @@ (define-public texlive-bin
(("srcdir/tests/pprecA-0.ind pprecA-0.ind1 \\|\\| exit 1")
"srcdir/tests/pprecA-0.ind pprecA-0.ind1 || exit 77")))))
'())
+ (add-after 'unpack 'default-to-force-source-date
+ ;;
https://lists.gnu.org/archive/html/guix-devel/2022-06/msg00330.html
+ (lambda _
+ ;; texk/web2c/lib/texmfmp.c: string sde_texprim = getenv
("FORCE_SOURCE_DATE");
+ (substitute* "texk/web2c/lib/texmfmp.c"
+ (("getenv ..FORCE_SOURCE_DATE..") "1"))))
(add-after 'unpack 'unpack-texlive-extra
(lambda* (#:key inputs #:allow-other-keys)
(mkdir "texlive-extra")
No idea if this approach would have any side-effects ... there is some
code that checks if both FORCE_SOURCE_DATE and SOURCE_DATE_EPOCH are set
... but i *think* this is the only spot where it directly checks if
FORCE_SOURCE_DATE is set. It would also be good to support
FORCE_SOURCE_DATE=0 if there is in fact some real-world use-case with
SOURCE_DATE_EPOCH is set and FORCE_SOURCE_DATE should be "0".
I'll try with tests disabled to see if it at least fixes the issue in
the two packages (itpp, discrover) that manually set FORCE_SOURCE_DATE.
live well,
vagrant
signature.asc
Description: PGP signature
