Source: emacs
Version: 1:27.1+1-1
Severity: wishlist
Tags: patch
User: reproducible-bui...@lists.alioth.debian.org
Usertags: buildpath
X-Debbugs-Cc: reproducible-b...@lists.alioth.debian.org

Hi,

Whilst working on the Reproducible Builds effort [0] we noticed that
emacs is now generating .el files that do not build reproducibly.

Specifically, it adds "Generated package description from <fullpath>"
to these files that then get installed under the
/usr/share/emacs/site-lisp/elpa-src dir. This seems to be affecting
most packages that use dh-elpa.

Here's nose-el, for example:

 -;;; Generated package description from 
/build/1st/nose-el-0.1.1/debian/elpa-nose/usr/share/emacs/site-lisp/elpa-src/nose-0.1.1/nose.el
  -*- no-byte-compile: t -*-
 +;;; Generated package description from 
/build/2/nose-el-0.1.1/2nd/debian/elpa-nose/usr/share/emacs/site-lisp/elpa-src/nose-0.1.1/nose.el
  -*- no-byte-compile: t -*-

Patch attached that drops this particular filename; it probably isn't
very useful in a Debian package context. An alternative approach could
be to regexp it down to "nose-0.1.1/nose.el" or similar; I suppose my
patch is more of an exact clarification on the issue rather than a
request for it to be fixed in this specific way.

  [0] https://reproducible-builds.org/


Regards,

--
      ,''`.
     : :'  :     Chris Lamb
     `. `'`      la...@debian.org / chris-lamb.co.uk
       `-
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 7d6be3c..a8e1ec3 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -962,8 +962,7 @@ untar into a directory named DIR; otherwise, signal an 
error."
           (print-length nil))
       (write-region
        (concat
-        ";;; Generated package description from "
-        (replace-regexp-in-string "-pkg\\.el\\'" ".el" pkg-file)
+        ";;; Generated package description "
         "  -*- no-byte-compile: t -*-\n"
         (prin1-to-string
          (nconc

Reply via email to