Subject: bug#42242: 27.0.91; emacs.service now requires emacs to be built with -lsystemd

From: Philipp Stephani <[email-masked]>
Date: Sun, 12 Jul 2020 16:12:46 +0200

Am Di., 7. Juli 2020 um 16:40 Uhr schrieb Nicolas Richard
<[email-masked]>:
>
> Using emacs-27 branch
>
> I've been using the unit etc/emacs.service, provided with emacs, for
> quite some time.
>
> With emacs-27, it seemed to still work (i.e. no obvious error and I can
> create a frame with emacsclient) but then systemd decided that the
> operation had timed out and killed emacs :
>
> systemd[2465]: emacs.service: Start operation timed out. Terminating.
> systemd[2465]: emacs.service: Main process exited, code=exited, status=15/n/a
> systemd[2465]: Failed to start Emacs text editor.
> systemd[2465]: emacs.service: Unit entered failed state.
> systemd[2465]: emacs.service: Failed with result 'exit-code'.
>
> As it turns out, emacs now uses Type=notify (commit
> 19f5f7b19b0dcdae87476a3fd51c41f840b2b80f) instead of Type=simple, and
> this requires emacs to be built with -lsystemd. I didn't have
> libsystemd-dev installed, so it didn't work.

I guess what we could do is have Autoconf generate emacs.service,
using Type=notify if and only if Emacs is built against libsystemd.
Not sure whether that's 100% reliable, though.