all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Vagrant Cascadian <vagrant@reproducible-builds.org>
To: "Ludovic Courtès" <ludo@gnu.org>
Cc: Guix Devel <guix-devel@gnu.org>
Subject: Re: Set FORCE_SOURCE_DATE=1 by default
Date: Tue, 21 Jun 2022 13:48:07 -0700	[thread overview]
Message-ID: <878rppagl4.fsf@contorta> (raw)
In-Reply-To: <87h74muwu0.fsf@gnu.org>

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

On 2022-06-15, Ludovic Courtès wrote:
> Vagrant Cascadian <vagrant@reproducible-builds.org> skribis:
>> From 7a39330b56934accef14b5e2ac003e211c7c6c5b Mon Sep 17 00:00:00 2001
>> From: Vagrant Cascadian <vagrant@reproducible-builds.org>
>> Date: Fri, 10 Jun 2022 16:12:59 -0700
>> Subject: [PATCH] guix: gnu-build-system: Set FORCE_SOURCE_DATE in
>>  set-SOURCE-DATE-EPOCH phase.
>>
>> * guix/build/gnu-build-system.scm (set-SOURCE-DATE-EPOCH): Set
>>   FORCE_SOURCE_DATE=1. Update URL.
>
> [...]
>
>>  (define* (set-SOURCE-DATE-EPOCH #:rest _)
>> -  "Set the 'SOURCE_DATE_EPOCH' environment variable.  This is used by tools
>> -that incorporate timestamps as a way to tell them to use a fixed timestamp.
>> -See https://reproducible-builds.org/specs/source-date-epoch/."
>> -  (setenv "SOURCE_DATE_EPOCH" "1"))
>> +  "Set the 'SOURCE_DATE_EPOCH' and 'FORCE_SOURCE_DATE' environment variables.
>> +This is used by tools that incorporate timestamps as a way to tell them to use
>> +a fixed timestamp.  See https://reproducible-builds.org/docs/source-date-epoch/."
>> +  (setenv "SOURCE_DATE_EPOCH" "1")
>> +  (setenv "FORCE_SOURCE_DATE" "1"))
>
> I’d mention above that FORCE_SOURCE_DATE is honored exclusively by
> TeX Live.

I am having trouble explaining it, partly because I don't really believe
in it and kind of want to just leave that up to the URL... that said:

diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
index d84411c090..d69f8c42fd 100644
--- a/guix/build/gnu-build-system.scm
+++ b/guix/build/gnu-build-system.scm
@@ -56,10 +56,13 @@ (define time-monotonic time-tai))
   (else #t))
 
 (define* (set-SOURCE-DATE-EPOCH #:rest _)
-  "Set the 'SOURCE_DATE_EPOCH' environment variable.  This is used by tools
-that incorporate timestamps as a way to tell them to use a fixed timestamp.
-See https://reproducible-builds.org/specs/source-date-epoch/."
-  (setenv "SOURCE_DATE_EPOCH" "1"))
+  "Set the 'SOURCE_DATE_EPOCH' and 'FORCE_SOURCE_DATE' environment variables.
+This is used by tools that incorporate timestamps as a way to tell them to use
+a fixed timestamp.  Setting 'FORCE_SOURCE_DATE' is needed in order for TeX
+Live to respect 'SOURCE_DATE_EPOCH'. See
+https://reproducible-builds.org/docs/source-date-epoch/."
+  (setenv "SOURCE_DATE_EPOCH" "1")
+  (setenv "FORCE_SOURCE_DATE" "1"))
 
 (define (first-subdirectory directory)
   "Return the file name of the first sub-directory of DIRECTORY or false, when


Not really happy with it ... both variables are basically needed to make
SOURCE_DATE_EPOCH effective, and it's not clear to me what it really
adds to the statement to call out TeX Live explicitly... especially
given that other tools *might* actually do the same... even though I
sure hope we can contain the problem to TeX Live.

Would renaming it to set-SOURCE-DATE-EPOCH-and-FORCE-SOURCE-DATE add
anything? or come up with a generic name? or having both
set-SOURCE-DATE-EPOCH and set-FORCE-SOURCE-DATE as separate functions?
Or a more generic description?


> It’s a bit of a bummer that we have to do that here, but as you point
> out, TeX Live can be used pretty much in any package and we’d rather not
> track every possible issue by hand.

Agreed.


> I think it can go to ‘core-updates’.

I hope so too!


live well,
  vagrant

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

  parent reply	other threads:[~2022-06-21 20:56 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 [this message]
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
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

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

  git send-email \
    --in-reply-to=878rppagl4.fsf@contorta \
    --to=vagrant@reproducible-builds.org \
    --cc=guix-devel@gnu.org \
    --cc=ludo@gnu.org \
    /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 external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.