gnu: emacs: Honor 'SOURCE_DATE_EPOCH'.
Suggested by Ludovic Courtès <ludo@gnu.org>. * 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.
This commit is contained in:
parent
f7dbeb376b
commit
6f4b23e674
|
@ -437,6 +437,7 @@ dist_patch_DATA = \
|
||||||
gnu/packages/patches/duplicity-test_selection-tmp.patch \
|
gnu/packages/patches/duplicity-test_selection-tmp.patch \
|
||||||
gnu/packages/patches/elfutils-tests-ptrace.patch \
|
gnu/packages/patches/elfutils-tests-ptrace.patch \
|
||||||
gnu/packages/patches/emacs-exec-path.patch \
|
gnu/packages/patches/emacs-exec-path.patch \
|
||||||
|
gnu/packages/patches/emacs-source-date-epoch.patch \
|
||||||
gnu/packages/patches/eudev-rules-directory.patch \
|
gnu/packages/patches/eudev-rules-directory.patch \
|
||||||
gnu/packages/patches/expat-CVE-2015-1283.patch \
|
gnu/packages/patches/expat-CVE-2015-1283.patch \
|
||||||
gnu/packages/patches/fastcap-mulGlobal.patch \
|
gnu/packages/patches/fastcap-mulGlobal.patch \
|
||||||
|
|
|
@ -70,7 +70,8 @@
|
||||||
(sha256
|
(sha256
|
||||||
(base32
|
(base32
|
||||||
"0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
|
"0kn3rzm91qiswi0cql89kbv6mqn27rwsyjfb8xmwy9m5s8fxfiyx"))
|
||||||
(patches (list (search-patch "emacs-exec-path.patch")))))
|
(patches (list (search-patch "emacs-exec-path.patch")
|
||||||
|
(search-patch "emacs-source-date-epoch.patch")))))
|
||||||
(build-system glib-or-gtk-build-system)
|
(build-system glib-or-gtk-build-system)
|
||||||
(arguments
|
(arguments
|
||||||
'(#:phases (alist-cons-before
|
'(#:phases (alist-cons-before
|
||||||
|
|
|
@ -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.
|
Loading…
Reference in New Issue