unofficial mirror of guix-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: ludo@gnu.org (Ludovic Courtès)
To: Alex Kost <alezost@gmail.com>
Cc: guix-devel <guix-devel@gnu.org>
Subject: Re: Timestamps in ...-autoloads.el files
Date: Tue, 03 Nov 2015 14:27:08 +0100	[thread overview]
Message-ID: <87wptzz00j.fsf@gnu.org> (raw)
In-Reply-To: <87y4egny5y.fsf@gmail.com> (Alex Kost's message of "Mon, 02 Nov 2015 19:50:17 +0300")

Alex Kost <alezost@gmail.com> skribis:

> Ludovic Courtès (2015-10-21 19:55 +0300) wrote:
>
>> Alex Kost <alezost@gmail.com> skribis:
>>
>>> I like the idea to honor SOURCE_DATE_EPOCH, so I'm attaching a patch for
>>> this.  But now I don't know how to make Guix set this variable during
>>> the build process :-(  Need help.
>>
>> Ahem, eventually, we’ll have to set it in ‘gnu-build’ in (guix build
>> gnu-build-system) in the next ‘core-updates’ cycle.
>
> So would it be as simple as this (?):
>
> diff --git a/guix/build/gnu-build-system.scm b/guix/build/gnu-build-system.scm
> index ff7646b..92e15d1 100644
> --- a/guix/build/gnu-build-system.scm
> +++ b/guix/build/gnu-build-system.scm
> @@ -576,6 +576,9 @@ in order.  Return #t if all the PHASES succeeded, #f otherwise."
>    ;; Encoding/decoding errors shouldn't be silent.
>    (fluid-set! %default-port-conversion-strategy 'error)
>  
> +  ;; Avoid non-determinism related to generated timestamps.
> +  (setenv "SOURCE_DATE_EPOCH" "1")
> +
>    ;; The trick is to #:allow-other-keys everywhere, so that each procedure in
>    ;; PHASES can pick the keyword arguments it's interested in.
>    (every (match-lambda

Yes, as simple as this.

>> In the interim, we can set it in a phase of ‘emacs-build-system’, which
>> would entail few rebuilds.
>>
>> WDYT?
>
> I think it is not so important to make a temporary workaround for
> master.  What about just fixing it in core-updates?

Sure, makes sense.  It’ll be several weeks before it is merged, though,
but we can probably live with that.

>>> +++ b/gnu/packages/patches/emacs-source-date-epoch.patch
>>> @@ -0,0 +1,20 @@
>>> +Honor SOURCE_DATE_EPOCH variable to avoid non-determinism in generated
>>> +"autoloads" files.
>>> +
>>> +--- a/lisp/emacs-lisp/autoload.el
>>> ++++ b/lisp/emacs-lisp/autoload.el
>>> +@@ -378,8 +378,12 @@
>>> +   "Insert the section-header line,
>>> + which lists the file name and which functions are in it, etc."
>>> +   (insert generate-autoload-section-header)
>>> +-  (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
>>> +-	 outbuf)
>>> ++  (let* ((env  (getenv "SOURCE_DATE_EPOCH"))
>>> ++         (time (if env
>>> ++                   (seconds-to-time (string-to-number env))
>>> ++                 time)))
>>> ++    (prin1 `(autoloads ,autoloads ,load-name ,file ,time)
>>> ++           outbuf))
>>> +   (terpri outbuf)
>>> +   ;; Break that line at spaces, to avoid very long lines.
>>> +   ;; Make each sub-line into a comment.
>>
>> Could you also submit it upstream, Cc’ing guix-devel and
>> reproducible-builds@lists.alioth.debian.org?  Hopefully that is
>> acceptable.  (I searched a bit but didn’t find a similar patch by the
>> Debian Reproducible team, but patch-tracker.debian.org is unreachable.)
>
> I'm afraid it's a too hard task for me, sorry.  I wouldn't like to mail
> to so many places.

Or email only emacs-devel if you prefer.

An experienced Emacs hacker like you shouldn’t have to be afraid of that.

Thanks!

Ludo’.

  reply	other threads:[~2015-11-03 13:27 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-10-19 23:09 Challenge substitute servers! Ludovic Courtès
2015-10-20  0:17 ` Daniel Pimentel
2015-10-20 14:38 ` [PATCHES] emacs: Changes for 'guix challenge' Alex Kost
2015-10-20 14:58   ` Ludovic Courtès
2015-10-20 17:40 ` Timestamps in ...-autoloads.el files Alex Kost
2015-10-20 19:38   ` Ludovic Courtès
2015-10-21 13:05     ` Alex Kost
2015-10-21 16:55       ` Ludovic Courtès
2015-11-02 16:50         ` Alex Kost
2015-11-03 13:27           ` Ludovic Courtès [this message]
2015-11-14 11:32             ` Alex Kost
2015-11-14 15:03               ` Ludovic Courtès
2015-11-14 20:39                 ` Alex Kost
2016-05-11 14:53         ` Alex Kost
2016-05-16 12:45           ` Ludovic Courtès
2016-05-16 20:52             ` Alex Kost
2016-05-17  9:12               ` Ludovic Courtès
2016-05-19 16:29                 ` Alex Kost
2016-05-20 12:02                   ` Ludovic Courtès
2016-05-20 13:38                     ` Leo Famulari
2016-05-21 10:49                       ` Alex Kost
2016-05-21 21:02                         ` Ludovic Courtès
2016-05-24  9:07                           ` Alex Kost
2016-05-20 21:14                     ` Alex Kost
2016-05-19  8:12             ` Alex Kost
2016-05-19 12:56               ` Ludovic Courtès
2016-05-21 10:31                 ` Alex Kost
2016-05-21 21:01                   ` Ludovic Courtès
2016-05-24  9:00                     ` Alex Kost

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=87wptzz00j.fsf@gnu.org \
    --to=ludo@gnu.org \
    --cc=alezost@gmail.com \
    --cc=guix-devel@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 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).