unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* [PATCH] Honor 'SOURCE_DATE_EPOCH' when generating autoloads.
@ 2015-11-16 17:03 Ludovic Courtès
  2015-11-29 10:44 ` [PATCH PING] " Ludovic Courtès
  0 siblings, 1 reply; 53+ messages in thread
From: Ludovic Courtès @ 2015-11-16 17:03 UTC (permalink / raw)
  To: emacs-devel

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

Support bit-for-bit reproducible generation of autoloads.
See <https://reproducible-builds.org/specs/source-date-epoch/>.
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.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: Type: text/x-patch, Size: 658 bytes --]

--- 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.

^ permalink raw reply	[flat|nested] 53+ messages in thread

end of thread, other threads:[~2016-04-06 21:29 UTC | newest]

Thread overview: 53+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-11-16 17:03 [PATCH] Honor 'SOURCE_DATE_EPOCH' when generating autoloads Ludovic Courtès
2015-11-29 10:44 ` [PATCH PING] " Ludovic Courtès
2015-11-29 16:02   ` Eli Zaretskii
2015-11-29 16:57     ` Ludovic Courtès
2015-11-29 18:12       ` Eli Zaretskii
2015-11-29 20:38         ` Ludovic Courtès
2015-11-30 17:00         ` John Wiegley
2015-11-30 19:30           ` Ludovic Courtès
2015-12-07 18:36             ` Philipp Stephani
2015-12-07 18:58               ` Paul Eggert
2015-12-07 19:00                 ` Philipp Stephani
2015-12-07 19:14                   ` Paul Eggert
2015-12-20 12:48                     ` Philipp Stephani
2015-12-20 16:37                       ` Eli Zaretskii
2015-12-20 18:39                         ` Philipp Stephani
2015-12-20 19:03                           ` Eli Zaretskii
2015-12-20 21:27                           ` Paul Eggert
2015-12-23  1:13                             ` John Wiegley
2015-12-23 16:01                               ` Philipp Stephani
2015-12-23 16:39                                 ` Eli Zaretskii
2015-12-23 16:52                                   ` Philipp Stephani
2015-12-23 17:10                                     ` Eli Zaretskii
2015-12-23 17:38                                       ` Philipp Stephani
2015-12-23 21:09                                         ` Paul Eggert
2015-12-24  3:33                                           ` Eli Zaretskii
2015-12-24  6:54                                             ` Paul Eggert
2015-12-24 16:18                                               ` Eli Zaretskii
2015-12-27  9:53                                     ` Philipp Stephani
2015-12-27 16:10                                       ` Eli Zaretskii
2016-02-29 21:52                                         ` Philipp Stephani
2016-03-01 16:36                                           ` Paul Eggert
2016-03-01 21:46                                             ` Philipp Stephani
2016-03-02 18:24                                               ` Paul Eggert
2016-03-02 18:30                                                 ` Philipp Stephani
2016-03-22 13:30                                                   ` Philipp Stephani
2016-03-22 20:37                                                     ` Paul Eggert
2016-03-22 21:46                                                       ` Philipp Stephani
2016-03-22 21:58                                                         ` Paul Eggert
2016-03-23  8:03                                                         ` Andreas Schwab
2016-04-06 21:29                                                           ` Philipp Stephani
2015-12-27 23:26                                       ` Paul Eggert
2015-12-28 16:26                                         ` Eli Zaretskii
2015-12-28 18:00                                           ` Paul Eggert
2015-12-28 18:23                                             ` Eli Zaretskii
2015-12-29  3:01                                               ` Paul Eggert
2015-12-29 15:38                                                 ` Eli Zaretskii
2015-12-29 16:47                                                   ` Paul Eggert
2015-12-29 17:59                                                     ` Eli Zaretskii
2015-12-29 20:33                                                       ` Paul Eggert
2015-12-07 23:11               ` Ludovic Courtès
2015-11-30  9:22       ` Alex Kost
2015-11-29 20:22   ` Paul Eggert
2015-11-29 20:42     ` Ludovic Courtès

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.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).