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: Thu, 19 May 2016 14:56:32 +0200 Message-ID: <87h9duury7.fsf@gnu.org> References: <87zize1mmq.fsf@gnu.org> <87si55h205.fsf@gmail.com> <87mvvde3h0.fsf@gnu.org> <87vba0mkwy.fsf@gmail.com> <87y4ew88km.fsf@gnu.org> <8737pomysb.fsf@gmail.com> <8737piyxvv.fsf@gnu.org> <87h9du1n6a.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]:59899) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1b3NVI-0007L9-Fg for guix-devel@gnu.org; Thu, 19 May 2016 08:56:41 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1b3NVE-00040M-AJ for guix-devel@gnu.org; Thu, 19 May 2016 08:56:39 -0400 In-Reply-To: <87h9du1n6a.fsf@gmail.com> (Alex Kost's message of "Thu, 19 May 2016 11:12:29 +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" To: Alex Kost Cc: guix-devel Alex Kost skribis: > Ludovic Court=C3=A8s (2016-05-16 15:45 +0300) wrote: > >> Alex Kost skribis: >> >>> To recap: we use "gnu/packages/patches/emacs-source-date-epoch.patch" to >>> modify 'autoload-insert-section-header' function, and it should work, >>> but it doesn't. IIUC this happens because "autoload.elc" file was >>> compiled using the unpatched "autoload.el", but first things first. Try >>> the following recipe in Emacs (installed with Guix): > [...] >> Ideally, we >> should remove all the .elc files and rebuild them, but maybe there are >> bootstrapping issues. > > The attached patch does this. Happily there were no any issues. Now > emacs packages will honor SOURCE_DATE_EPOCH. Even autoloads that comes > with emacs itself (loaddefs.el, cl-loaddefs.el, etc.) will have a proper > timestamp. Awesome! > From ca571f7631bf77ddc8ad6257fe165b4ff0ef5e6b Mon Sep 17 00:00:00 2001 > From: Alex Kost > Date: Thu, 19 May 2016 11:01:40 +0300 > Subject: [PATCH] gnu: emacs: Remove *.elc from the release tarball. > > * gnu/packages/emacs.scm (emacs)[arguments]: Add 'remove-compiled-elisp' > phase. > --- > gnu/packages/emacs.scm | 9 +++++++++ > 1 file changed, 9 insertions(+) > > diff --git a/gnu/packages/emacs.scm b/gnu/packages/emacs.scm > index 32ed722..0c15f63 100644 > --- a/gnu/packages/emacs.scm > +++ b/gnu/packages/emacs.scm > @@ -91,6 +91,15 @@ > (substitute* (find-files "." "^Makefile\\.in$") > (("/bin/pwd") > "pwd")))) > + (add-after 'configure 'remove-compiled-elisp > + (lambda _ > + ;; Emacs comes with compiled elisp (*.elc) and generated > + ;; autoloads (*loaddefs.el) files. This does not allow us = to use > + ;; "emacs-source-date-epoch.patch" effectively, so remove t= hese > + ;; files (using 'make bootstrap-clean'), as 'make' will rec= reate > + ;; them. > + (with-directory-excursion "lisp" > + (zero? (system* "make" "bootstrap-clean"))))) I would rather do it in a =E2=80=98snippet=E2=80=99 so that =E2=80=98guix b= uild -S emacs=E2=80=99 returns the cleaned-up source. However, the snippet would have to duplicate the logic of this makefile rule, which might not be desirable (depends on how complex this rule is). If you think it=E2=80=99s best to keep this way, please push! Thanks, Ludo=E2=80=99.