[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Honor 'SOURCE_DATE_EPOCH' when generating autoloads.
From: |
Ludovic Courtès |
Subject: |
[PATCH] Honor 'SOURCE_DATE_EPOCH' when generating autoloads. |
Date: |
Mon, 16 Nov 2015 18:03:58 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux) |
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.
--- 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.
- [PATCH] Honor 'SOURCE_DATE_EPOCH' when generating autoloads.,
Ludovic Courtès <=
- [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Ludovic Courtès, 2015/11/29
- Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Eli Zaretskii, 2015/11/29
- Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Ludovic Courtès, 2015/11/29
- Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Eli Zaretskii, 2015/11/29
- Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Ludovic Courtès, 2015/11/29
- Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., John Wiegley, 2015/11/30
- Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Ludovic Courtès, 2015/11/30
- Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Alex Kost, 2015/11/30
Re: [PATCH PING] Honor 'SOURCE_DATE_EPOCH' when generating autoloads., Paul Eggert, 2015/11/29