unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: Maxim Cournoyer <maxim.cournoyer@gmail.com>
Cc: "Guix Devel" <guix-devel@gnu.org>, "Ludovic Courtès" <ludo@gnu.org>
Subject: Re: Set FORCE_SOURCE_DATE=1 by default
Date: Sat, 02 Jul 2022 18:58:27 -0700	[thread overview]
Message-ID: <87k08vj6t8.fsf@contorta> (raw)
In-Reply-To: <87letn2ut9.fsf@gmail.com>

[-- Attachment #1: Type: text/plain, Size: 2497 bytes --]

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 227 bytes --]

  reply	other threads:[~2022-07-03  1:58 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-06-10 23:53 Set FORCE_SOURCE_DATE=1 by default Vagrant Cascadian
2022-06-15  8:58 ` Ludovic Courtès
2022-06-15 16:24   ` Vagrant Cascadian
2022-06-21 20:48   ` Vagrant Cascadian
2022-06-21 21:06     ` Vagrant Cascadian
2022-06-22  3:57 ` Maxim Cournoyer
2022-06-22  6:08   ` Vagrant Cascadian
2022-06-22 13:53     ` Ludovic Courtès
2022-06-22 15:11       ` Vagrant Cascadian
2022-06-22 17:41         ` Maxim Cournoyer
2022-06-22 13:59     ` Maxim Cournoyer
2022-06-23  1:03       ` Vagrant Cascadian
2022-06-23 16:44         ` Maxim Cournoyer
2022-07-03  1:58           ` Vagrant Cascadian [this message]
2022-07-04 13:14             ` Ludovic Courtès
2022-08-12 15:32               ` Vagrant Cascadian
2022-06-22 15:16 ` Time namespace for build sandbox (was Re: Set FORCE_SOURCE_DATE=1 by default) Zhu Zihao
2022-06-22 15:35   ` Vagrant Cascadian
2022-06-22 16:41   ` Maxime Devos

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://guix.gnu.org/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87k08vj6t8.fsf@contorta \
    --to=vagrant@reproducible-builds.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    --cc=maxim.cournoyer@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/guix.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).