FS#70400 - [emacs-nox] daemon doesn't notify systemd user instance of startup in 27.2-1
Attached to Project:
Arch Linux
Opened by Jérôme Tamba (sprsd) - Saturday, 10 April 2021, 15:52 GMT
Last edited by freswa (frederik) - Thursday, 09 June 2022, 21:12 GMT
Opened by Jérôme Tamba (sprsd) - Saturday, 10 April 2021, 15:52 GMT
Last edited by freswa (frederik) - Thursday, 09 June 2022, 21:12 GMT
|
Details
Description:
After upgrading to emacs-nox 27.2-1, the emacs systemd user service stays in the 'activating' state after being started or restarted, like it's never notifying systemd. Thus it gets killed and restarted by systemd frequently. Other than that the daemon seems to be functional. This feels exactly like With emacs-nox 27.2-1 (NOK): ~ > emacsclient --eval "(emacs-version)" "GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu)\n of 2021-04-05" ~ > emacsclient --eval "system-configuration-options" "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-libsystemd --localstatedir=/var --without-x --without-sound --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" It was built with --with-libsystemd, so it's not the same cause as With my local build (OK): ~ > emacsclient --eval "(emacs-version)" "GNU Emacs 27.2 (build 1, x86_64-pc-linux-gnu)\n of 2021-04-10" ~ > emacsclient --eval "system-configuration-options" "--prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-libsystemd --localstatedir=/var --without-x --without-sound --with-modules 'CFLAGS=-march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong -fno-plt' CPPFLAGS=-D_FORTIFY_SOURCE=2 LDFLAGS=-Wl,-O1,--sort-common,--as-needed,-z,relro,-z,now" So, no real difference apart from -fstack-protector-strong. Just for the sake of it I tried building locally without it and it still worked. I noticed that systemd and libs got an update on the same day as emacs-nox so I tried downgrading systemd-libs and try with the 27.2-1 package but it still doesn't work. Note that the emacs package doesn't seem to have the problem, the daemon starts correctly. Steps to reproduce: - install/upgrade emacs-nox to 27.2-1 - systemctl --user start emacs |
This task depends upon
FS#66762end of configure output from clean chroot:
Configured for 'x86_64-pc-linux-gnu'.
Where should the build process find the source code? .
What compiler should emacs be built with? gcc -march=x86-64 -mtune=generic -O2 -pipe -fno-plt
Should Emacs use the GNU version of malloc? no
(The GNU allocators don't work with this system configuration.)
Should Emacs use a relocating allocator for buffers? no
Should Emacs use mmap(2) for buffer allocation? no
What window system should Emacs use? none
What toolkit should Emacs use? none
Where do we find X Windows header files? NONE
Where do we find X Windows libraries? NONE
Does Emacs use -lXaw3d? no
Does Emacs use -lXpm? no
Does Emacs use -ljpeg? no
Does Emacs use -ltiff? no
Does Emacs use a gif library? no
Does Emacs use a png library? no
Does Emacs use -lrsvg-2? no
Does Emacs use cairo? no
Does Emacs use -llcms2? no
Does Emacs use imagemagick? no
Does Emacs support sound? no
Does Emacs use -lgpm? no
Does Emacs use -ldbus? yes
Does Emacs use -lgconf? no
Does Emacs use GSettings? no
Does Emacs use a file notification library? yes -lglibc (inotify)
Does Emacs use access control lists? yes -lacl
Does Emacs use -lselinux? no
Does Emacs use -lgnutls? yes
Does Emacs use -lxml2? yes
Does Emacs use -lfreetype? no
Does Emacs use HarfBuzz? no
Does Emacs use -lm17n-flt? no
Does Emacs use -lotf? no
Does Emacs use -lxft? no
Does Emacs use -lsystemd? no
Does Emacs use -ljansson? yes
Does Emacs use -lgmp? yes
Does Emacs directly use zlib? yes
Does Emacs have dynamic modules support? yes
Does Emacs use toolkit scroll bars? no
Does Emacs support Xwidgets (requires gtk3)? no
Does Emacs have threading support in lisp? yes
Does Emacs support the portable dumper? yes
Does Emacs support legacy unexec dumping? no
Which dumping strategy does Emacs use? pdumper
Edit:
Adding systemd to makedepends and support is then detected and --with-libsystemd can be dropped.
```
diff --git a/PKGBUILD b/PKGBUILD
index 6ccf3c3..07678a4 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -9,6 +9,7 @@ arch=('x86_64')
url="https://www.gnu.org/software/emacs/emacs.html"
license=('GPL3')
depends=('dbus' 'ncurses' 'perl' 'libxml2' 'glib2' 'gnutls' 'jansson')
+makedepends=('systemd')
provides=('emacs')
conflicts=('emacs')
changelog=$pkgname.changelog
@@ -20,7 +21,7 @@ sha256sums=('b4a7cc4e78e63f378624e0919215b910af5bb2a0afc819fad298272e9f40c1b9'
build() {
cd "${srcdir}"/emacs-$pkgver
- ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib --with-libsystemd \
+ ./configure --prefix=/usr --sysconfdir=/etc --libexecdir=/usr/lib \
--localstatedir=/var --without-x --without-sound --with-modules
make
}
```
Now that I've upgraded to emacs-nox 28.1-7 - I am no longer getting the systemd restarts that would happen in 27.2-1
[1] https://github.com/archlinux/svntogit-packages/commit/4777ddb29868888e3c3d7578739e59ffc0e94df9