From mboxrd@z Thu Jan 1 00:00:00 1970 From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Subject: Re: Timestamps in ...-autoloads.el files Date: Wed, 21 Oct 2015 18:55:53 +0200 Message-ID: <87y4ew88km.fsf@gnu.org> References: <87zize1mmq.fsf@gnu.org> <87si55h205.fsf@gmail.com> <87mvvde3h0.fsf@gnu.org> <87vba0mkwy.fsf@gmail.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:52510) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1ZowgK-00025E-N2 for guix-devel@gnu.org; Wed, 21 Oct 2015 12:56:12 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Zowg8-00042W-7I for guix-devel@gnu.org; Wed, 21 Oct 2015 12:56:06 -0400 In-Reply-To: <87vba0mkwy.fsf@gmail.com> (Alex Kost's message of "Wed, 21 Oct 2015 16:05:33 +0300") List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Alex Kost Cc: guix-devel Alex Kost 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=E2=80=99ll have to set it in =E2=80=98gnu-build=E2=80= =99 in (guix build gnu-build-system) in the next =E2=80=98core-updates=E2=80=99 cycle. In the interim, we can set it in a phase of =E2=80=98emacs-build-system=E2= =80=99, which would entail few rebuilds. WDYT? > From b8dc19a65980690a636ad7f9f39b3c84991f4975 Mon Sep 17 00:00:00 2001 > From: Alex Kost > Date: Wed, 21 Oct 2015 15:59:23 +0300 > Subject: [PATCH] gnu: emacs: Honor 'SOURCE_DATE_EPOCH'. > MIME-Version: 1.0 > Content-Type: text/plain; charset=3DUTF-8 > Content-Transfer-Encoding: 8bit > > Suggested by Ludovic Court=C3=A8s . > > * gnu/packages/patches/emacs-source-date-epoch.patch: New patch. > * gnu-system.am (dist_patch_DATA): Add it. > * gnu/packages/emacs.scm (emacs)[source]: Use it. LGTM. > +++ 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=E2=80=99ing guix-devel and reproducible-builds@lists.alioth.debian.org? Hopefully that is acceptable. (I searched a bit but didn=E2=80=99t find a similar patch by t= he Debian Reproducible team, but patch-tracker.debian.org is unreachable.) Thanks! Ludo=E2=80=99.