since emacs uses pdumper per default, this src_compile() { # Disable sandbox when dumping. For the unbelievers, see bug #131505 emake RUN_TEMACS="SANDBOX_ON=0 LD_PRELOAD= env ./temacs" } isnt needed anymore and could be: src_compile() { default } Reproducible: Always
There is no support for the portable dumper in the emacs-26 branch, i.e. emacs-26.3 is still using unexec.
Reopening for app-editors/emacs-vcs-27.0.9999 which uses the portable dumper by default. However, I am getting different emacs.pdmp files with and without the sandbox (even different length, so it's not a simple matter of timestamps): # ls -l /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp # sandbox off -rw-r--r-- 1 root root 10563352 Nov 18 10:34 /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp # ls -l /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp # sandbox on -rw-r--r-- 1 root root 10563704 Nov 18 10:41 /usr/libexec/emacs/27.0.50/x86_64-pc-linux-gnu/emacs.pdmp At first glance, I'm not noticing any problems at runtime. Still, I'm going to investigate the cause of this difference.
Looks like the size of emacs.pdmp slightly varies between different builds, even if nothing is changed. So I'm going to give it a try and remove the sandbox hack in the live ebuild. Thanks for reporting!
The bug has been closed via the following commit(s): https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=49d30402fafa3571d4d3e1a79b4d08cc90318224 commit 49d30402fafa3571d4d3e1a79b4d08cc90318224 Author: Ulrich Müller <ulm@gentoo.org> AuthorDate: 2019-11-18 15:36:59 +0000 Commit: Ulrich Müller <ulm@gentoo.org> CommitDate: 2019-11-18 15:37:43 +0000 app-editors/emacs-vcs: Remove sandbox hack in src_compile. Configure with explicit option --with-dumping=pdumper to make sure that the portable dumper is used, even for the (unlikely) case that the upstream default would change. Note that (as of today) --with-dumping=unexec breaks the build process, therefore controlling this option with a USE flag wouldn't make sense. Closes: https://bugs.gentoo.org/700182 Package-Manager: Portage-2.3.79, Repoman-2.3.18 Signed-off-by: Ulrich Müller <ulm@gentoo.org> app-editors/emacs-vcs/emacs-vcs-27.0.9999.ebuild | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-)
I've reported the changing size of emacs.pdmp upstream. After the following commit: http://git.savannah.gnu.org/cgit/emacs.git/commit/?id=0fce8e9391fd107f9267188a36b85aea778b8440 commit 0fce8e9391fd107f9267188a36b85aea778b8440 Author: Paul Eggert <eggert@cs.ucla.edu> Date: Tue Nov 19 18:23:01 2019 -0800 Make .pdmp file more reproducible Problem reported by Ulrich Müller <https://lists.gnu.org/r/emacs-devel/2019-11/msg00757.html> and diagnosed by Andreas Schwab <https://lists.gnu.org/r/emacs-devel/2019-11/msg00774.html>. * src/sysdep.c (maybe_disable_address_randomization): Disable ASLR if any kind of dumping, instead of merely if unexec dumping. Omit first arg for simplicity; all uses changed. ... I get a reproducible size between builds. However, with sandbox disabled and enabled, emacs.pdmp still has slightly different size (10563576 and 10563568 bytes, respectively).