From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: ludo@gnu.org (Ludovic =?utf-8?Q?Court=C3=A8s?=) Newsgroups: gmane.emacs.devel Subject: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads. Date: Sun, 29 Nov 2015 11:44:36 +0100 Message-ID: <87io4lnkyz.fsf@gnu.org> References: <87k2ph3mgx.fsf@gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" X-Trace: ger.gmane.org 1448797346 30351 80.91.229.3 (29 Nov 2015 11:42:26 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Sun, 29 Nov 2015 11:42:26 +0000 (UTC) To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sun Nov 29 12:42:15 2015 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1a30Mq-0004il-Cp for ged-emacs-devel@m.gmane.org; Sun, 29 Nov 2015 12:42:08 +0100 Original-Received: from localhost ([::1]:35693 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2zTa-0004Gt-MB for ged-emacs-devel@m.gmane.org; Sun, 29 Nov 2015 05:45:02 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:49629) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2zTG-0004E0-DR for emacs-devel@gnu.org; Sun, 29 Nov 2015 05:44:43 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a2zTC-0001Cn-DZ for emacs-devel@gnu.org; Sun, 29 Nov 2015 05:44:42 -0500 Original-Received: from fencepost.gnu.org ([2001:4830:134:3::e]:50279) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a2zTC-0001Cj-Ag for emacs-devel@gnu.org; Sun, 29 Nov 2015 05:44:38 -0500 Original-Received: from reverse-83.fdn.fr ([80.67.176.83]:50518 helo=pluto) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_128_CBC_SHA1:128) (Exim 4.82) (envelope-from ) id 1a2zTB-00051t-Pq for emacs-devel@gnu.org; Sun, 29 Nov 2015 05:44:38 -0500 X-URL: http://www.fdn.fr/~lcourtes/ X-Revolutionary-Date: 9 Frimaire an 224 de la =?utf-8?Q?R=C3=A9volution?= X-PGP-Key-ID: 0x3D9AEBB5 X-PGP-Key: http://www.fdn.fr/~lcourtes/ludovic.asc X-PGP-Fingerprint: 3CE4 6455 8A84 FDC6 9DB4 0CFB 090B 1199 3D9A EBB5 X-OS: x86_64-unknown-linux-gnu In-Reply-To: <87k2ph3mgx.fsf@gnu.org> ("Ludovic \=\?utf-8\?Q\?Court\=C3\=A8s\=22'\?\= \=\?utf-8\?Q\?s\?\= message of "Mon, 16 Nov 2015 18:03:58 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) X-detected-operating-system: by eggs.gnu.org: Error: Malformed IPv6 address (bad octet value). X-Received-From: 2001:4830:134:3::e X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:195518 Archived-At: --=-=-= Content-Type: text/plain Ping! https://lists.gnu.org/archive/html/emacs-devel/2015-11/msg01547.html Support bit-for-bit reproducible generation of autoloads. See . Submitted on behalf of Alex Kost. * lisp/emacs-lisp/autoload.el (autoload-insert-section-header): Check whether the 'SOURCE_DATE_EPOCH' environment variable is defined; use it as the TIME part of the 'autoloads' sexp when it is. --=-=-= Content-Type: text/x-patch Content-Disposition: inline --- 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. --=-=-=--