From: Philip Kaludercic <philipk@posteo.net>
To: Stefan Monnier <monnier@iro.umontreal.ca>
Cc: ELPA Maintainers <emacs-devel@gnu.org>
Subject: Re: Patches for elpa-admin
Date: Sat, 21 May 2022 11:38:09 +0000 [thread overview]
Message-ID: <87y1yv6rq6.fsf@posteo.net> (raw)
In-Reply-To: <jwv8rs65syi.fsf-monnier+emacs@gnu.org> (Stefan Monnier's message of "Fri, 15 Apr 2022 10:40:08 -0400")
[-- Attachment #1: Type: text/plain, Size: 274 bytes --]
Stefan Monnier <monnier@iro.umontreal.ca> writes:
>> I will wait a bit to implement the changes i mentioned.
>
> Looking forward to them, thanks.
I have been experimenting with buffer-env's recent Guix support, and I
think it supersedes everything I had proposed before:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-Add-manifest.scm.patch --]
[-- Type: text/x-diff, Size: 948 bytes --]
From 9179865491899b6863967e0265afc50bf35f1f84 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sat, 21 May 2022 13:31:24 +0200
Subject: [PATCH] Add GNU Guix manifest.scm
---
manifest.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 manifest.scm
diff --git a/manifest.scm b/manifest.scm
new file mode 100644
index 0000000000..5dfc19941a
--- /dev/null
+++ b/manifest.scm
@@ -0,0 +1,19 @@
+;; GNU Guix manifest for (Non)GNU ELPA
+;;
+;; This file specifies all the packages that are required for the ELPA
+;; build system to function correctly. You can either use the "guix
+;; shell" command to create an environment with everything prepared.
+
+(specifications->manifest
+ (list "bubblewrap"
+ "coreutils"
+ "emacs-minimal"
+ "git"
+ "grep"
+ "imagemagick"
+ "lzip"
+ "make"
+ "markdown"
+ "tar"
+ "texinfo"))
+
--
2.36.1
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #3: 0001-Add-GNU-Guix-manifest.scm.patch --]
[-- Type: text/x-diff, Size: 948 bytes --]
From 6ecb36dbb9c2a87501f4411e29f76f694eca452d Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sat, 21 May 2022 13:32:04 +0200
Subject: [PATCH] Add GNU Guix manifest.scm
---
manifest.scm | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
create mode 100644 manifest.scm
diff --git a/manifest.scm b/manifest.scm
new file mode 100644
index 0000000000..5dfc19941a
--- /dev/null
+++ b/manifest.scm
@@ -0,0 +1,19 @@
+;; GNU Guix manifest for (Non)GNU ELPA
+;;
+;; This file specifies all the packages that are required for the ELPA
+;; build system to function correctly. You can either use the "guix
+;; shell" command to create an environment with everything prepared.
+
+(specifications->manifest
+ (list "bubblewrap"
+ "coreutils"
+ "emacs-minimal"
+ "git"
+ "grep"
+ "imagemagick"
+ "lzip"
+ "make"
+ "markdown"
+ "tar"
+ "texinfo"))
+
--
2.36.1
[-- Attachment #4: Type: text/plain, Size: 122 bytes --]
It might also be possible to add this to the elpa-admin branch, and link
it into elpa/nongnu like like the GNUmakefile.
[-- Attachment #5: 0001-Bind-gnu-directory-as-a-read-only-mount-when-sandbox.patch --]
[-- Type: text/x-diff, Size: 937 bytes --]
From b9127e66e956c94ef30b5f3dd2d9a61d9d2c545b Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sat, 21 May 2022 13:29:19 +0200
Subject: [PATCH 1/2] Bind /gnu directory as a read-only mount when sandboxing
This allows for packages installed and made available using GNU Guix
to be used by bubblewrap.
---
elpa-admin.el | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/elpa-admin.el b/elpa-admin.el
index d570c3c6aa..a546bb63ba 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -955,7 +955,7 @@ The INFILE and DISPLAY arguments are fixed as nil."
"--tmpfs" "/tmp"))
(defvar elpaa--sandbox-ro-binds
- '("/lib" "/lib64" "/bin" "/usr" "/etc/alternatives" "/etc/emacs"))
+ '("/lib" "/lib64" "/bin" "/usr" "/etc/alternatives" "/etc/emacs" "/gnu"))
(defun elpaa--call-sandboxed (destination &rest args)
"Like ‘elpaa--call’ but sandboxed.
--
2.36.1
[-- Attachment #6: Type: text/plain, Size: 479 bytes --]
With a manifest file, all the packages necessary for the ELPA
build-system to work are provided within the new environment. All that
has to be changed (see last patch) is to tell bubblewrap that the /gnu
directory should be visible, as "guix shell" adds a profile from within
that directory to the PATH.
I also noticed that there are issues when running "make -B" because
mkdir doesn't want to re-create the "packages" directory. So this
change should be non-controversial:
[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #7: 0002-Tolerate-if-packages-already-exists.patch --]
[-- Type: text/x-diff, Size: 589 bytes --]
From 05edc183b771611e2e028d00bdb1de437a52b504 Mon Sep 17 00:00:00 2001
From: Philip Kaludercic <philipk@posteo.net>
Date: Sat, 21 May 2022 13:29:56 +0200
Subject: [PATCH 2/2] Tolerate if packages/ already exists
---
GNUmakefile | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/GNUmakefile b/GNUmakefile
index a7d078a1a8..b3d2228900 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -135,7 +135,7 @@ packages/%.elc: packages/%.el
# $(extra_elcs):; rm $@
packages:
- mkdir $@
+ mkdir -p $@
include $(PKG_DESCS_MK)
$(PKG_DESCS_MK): elpa-packages packages
--
2.36.1
next prev parent reply other threads:[~2022-05-21 11:38 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-04-13 8:40 Patches for elpa-admin Philip Kaludercic
2022-04-15 4:01 ` Stefan Monnier
2022-04-15 7:18 ` Philip Kaludercic
2022-04-15 14:40 ` Stefan Monnier
2022-04-15 15:05 ` Brian Cully
2022-04-15 15:44 ` Philip Kaludercic
2022-04-15 15:37 ` Philip Kaludercic
2022-05-21 11:38 ` Philip Kaludercic [this message]
2022-05-31 8:37 ` Philip Kaludercic
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
List information: https://www.gnu.org/software/emacs/
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=87y1yv6rq6.fsf@posteo.net \
--to=philipk@posteo.net \
--cc=emacs-devel@gnu.org \
--cc=monnier@iro.umontreal.ca \
/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 public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).