From 1fc9de4b81ceacabef6aafe48ecaabaf76f34bb2 Mon Sep 17 00:00:00 2001 From: Glenn Morris Date: Fri, 30 Oct 2020 19:20:24 -0700 Subject: [PATCH] Improve reproducibility of generated -pkg.el files * lisp/emacs-lisp/package.el (package-generate-description-file): Don't include the full name of the source file in the header, since that varies non-reproducibly according to the build directory. https://bugs.debian.org/972861 Note that elpa.gnu.org's admin/archive-contents.el does this by hand and already only includes the nondirectory part. --- lisp/emacs-lisp/package.el | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el index fc8dfe12ca2..504eb99eb1d 100644 --- a/lisp/emacs-lisp/package.el +++ b/lisp/emacs-lisp/package.el @@ -963,7 +963,8 @@ untar into a directory named DIR; otherwise, signal an error." (write-region (concat ";;; Generated package description from " - (replace-regexp-in-string "-pkg\\.el\\'" ".el" pkg-file) + (replace-regexp-in-string "-pkg\\.el\\'" ".el" + (file-name-nondirectory pkg-file)) " -*- no-byte-compile: t -*-\n" (prin1-to-string (nconc -- 2.39.2