Subject: bug#63916: 30.0.50; use-package: changes do not propagate to elpa-devel

From: Philip Kaludercic <[email-masked]>
Date: Sat, 10 Jun 2023 09:03:31 +0000

Benjamin Orthen <[email-masked]> writes:

> Recent changes in use-package (i.e., commit
> 2ce279680bf9c1964e98e2aa48a03d6675c386fe) have not propagated to
> emacs-devel (https://elpa.gnu.org/devel/use-package.html) even though
> use-package is designated as a :core package in elpa.
>
> My understanding is that changes in emacs for :core packages are
> automatically propagated to elpa(-devel). I was however not able to
> find documentation on how this propagation/sync works. I noticed that
> use-package.el does not have the disclaimer ";; This is a GNU ELPA
> :core package. Avoid adding functionality [...]" in its header. I
> suppose this is unrelated to the elpa-devel sync, but could be fixed
> as well.

Unless I broke something on my local end, there seems to be a general
problem with the ELPA build system.  When trying to build use-package, I
get these error messages:

--8<---------------cut here---------------start------------->8---
$ make build/use-package
emacs --batch -Q -l admin/elpa-admin.el \
         -f elpaa-batch-pkg-spec-make-dependencies .pkg-descs.mk
emacs --batch -l /home/philip/Source/elpa/admin/elpa-admin.el	\
         -f elpaa-batch-make-one-package use-package
Linking files for package: use-package
  lisp/use-package/use-package.el -> use-package.el
  lisp/use-package/use-package-lint.el -> use-package-lint.el
  lisp/use-package/use-package-jump.el -> use-package-jump.el
  lisp/use-package/use-package-ensure.el -> use-package-ensure.el
  lisp/use-package/use-package-ensure-system-package.el -> use-package-ensure-system-package.el
  lisp/use-package/use-package-diminish.el -> use-package-diminish.el
  lisp/use-package/use-package-delight.el -> use-package-delight.el
  lisp/use-package/use-package-core.el -> use-package-core.el
  lisp/use-package/use-package-bind-key.el -> use-package-bind-key.el
  lisp/use-package/bind-key.el -> bind-key.el
  doc/emacs/doclicense.texi -> doclicense.texi
  doc/emacs/docstyle.texi -> docstyle.texi
  doc/misc/use-package.texi -> use-package.texi
======== Building tarball archive-devel/use-package-2.4.5.0.20230115.133305.tar...
Build error for archive-devel/use-package-2.4.5.0.20230115.133305.tar: (error "Error-indicating exit code in elpaa--call-sandboxed:
could not open use-package.texi: No such file or directory
")
######## Build of package archive-devel/use-package-2.4.5.0.20230115.133305.tar FAILED!!
======== Building tarball archive/use-package-2.4.5.tar...
Build error for archive/use-package-2.4.5.tar: (error "Error-indicating exit code in elpaa--call-sandboxed:
could not open use-package.texi: No such file or directory
")
######## Build of package archive/use-package-2.4.5.tar FAILED!!
--8<---------------cut here---------------end--------------->8---

But if I disable sandboxing, then it works.  The issue appears to be
that the files under package/use-package are linked in using symlinks,
but the directory (the emacs checkout) that is being linked to is not
exposed via bwarp.  If I add that to the ro-binds, then I can build the
package.  This diff might be enough to resolve the issue:

diff --git a/elpa-admin.el b/elpa-admin.el
index 24dd16d3cb..81467aa628 100644
--- a/elpa-admin.el
+++ b/elpa-admin.el
@@ -1262,7 +1262,8 @@ The INFILE and DISPLAY arguments are fixed as nil."
     "--tmpfs" "/tmp"))
 
 (defvar elpaa--sandbox-ro-binds
-  '("/lib" "/lib64" "/bin" "/usr" "/etc/alternatives" "/etc/emacs" "/gnu"))
+  `("/lib" "/lib64" "/bin" "/usr" "/etc/alternatives" "/etc/emacs" "/gnu"
+    ,(file-truename (expand-file-name "emacs"))))
 
 (defun elpaa--call-sandboxed (destination &rest args)
   "Like ‘elpaa--call’ but sandboxed.

CC: Stefan, does this look OK to you?

> Best regards,
> Benjamin