From: Rob Browning <rlb@defaultvalue.org>
To: emacs-devel@gnu.org
Subject: [PATCH 1/1] Strip parent path from package descriptions for reproducibility
Date: Sat, 7 Nov 2020 15:50:25 -0600 [thread overview]
Message-ID: <20201107215025.2085605-1-rlb@defaultvalue.org> (raw)
Previously, the package description would include the full build tree
path which varies. Instead, remove any duplicate slashes and any
components other than the immediate parent.
Bug-Debian: https://bugs.debian.org/972861
---
I'm not sure this is suitable for Emacs proper, and it could likely
use some improvement, but we've applied it in Debian for the time
being in order to avoid introducing unreprodcible strings into
generated packages.
lisp/emacs-lisp/package.el | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/lisp/emacs-lisp/package.el b/lisp/emacs-lisp/package.el
index 7d6be3cf4e2..60561fdb678 100644
--- a/lisp/emacs-lisp/package.el
+++ b/lisp/emacs-lisp/package.el
@@ -963,7 +963,11 @@ package-generate-description-file
(write-region
(concat
";;; Generated package description from "
- (replace-regexp-in-string "-pkg\\.el\\'" ".el" pkg-file)
+ (replace-regexp-in-string ;; just the final y.el or x/y.el
+ "^.*?\\([^/]+/\\)?\\([^/]+\\)$" "\\1\\2"
+ (replace-regexp-in-string
+ "/+" "/"
+ (replace-regexp-in-string "-pkg\\.el\\'" ".el" pkg-file)))
" -*- no-byte-compile: t -*-\n"
(prin1-to-string
(nconc
--
2.29.2
next reply other threads:[~2020-11-07 21:50 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-11-07 21:50 Rob Browning [this message]
2020-11-13 4:39 ` [PATCH 1/1] Strip parent path from package descriptions for reproducibility Stefan Monnier
2020-11-15 0:38 ` Rob Browning
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20201107215025.2085605-1-rlb@defaultvalue.org \
--to=rlb@defaultvalue.org \
--cc=emacs-devel@gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.