* bug#16507: [RFC] Add a systemd service file for dealing with emacs --daemon.
[not found] <8738ki4ys4.fsf@geometryfactory.com>
@ 2014-12-03 19:39 ` Rüdiger Sonderfeld
2014-12-03 21:08 ` Romain Francoise
` (2 more replies)
0 siblings, 3 replies; 10+ messages in thread
From: Rüdiger Sonderfeld @ 2014-12-03 19:39 UTC (permalink / raw)
To: emacs-devel; +Cc: 16507
As discussed in Bug#16507, I've added a systemd service file to deal with
emacs --daemon. This however requires some installation changes. That's why
I submit this patch for review before pushing it.
A new configuration flag `--with-systemduserunitdir' is added to set the
installation directory for the user unit. If it is unset an attempt is made
to locate the default directory by using pkg-config.
(I guess this should also get an entry in etc/NEWS.)
* configure.ac (with_systemduserunitdir): New option.
* Makefile.in (systemdunitdir,SYSTEMD_UNITS): New variables.
(install-etc): Install systemd unit file.
(uninstall): Uninstall systemd unit file.
* etc/emacs.service.in: New file.
---
ChangeLog | 8 ++++++++
Makefile.in | 17 +++++++++++++++++
configure.ac | 19 +++++++++++++++++++
etc/ChangeLog | 5 +++++
etc/emacs.service.in | 14 ++++++++++++++
5 files changed, 63 insertions(+)
create mode 100644 etc/emacs.service.in
diff --git a/ChangeLog b/ChangeLog
index cd7698c..05ad878 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2014-12-03 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
+
+ Add a systemd service file for dealing with emacs --daemon.
+ * configure.ac (with_systemduserunitdir): New option.
+ * Makefile.in (systemdunitdir,SYSTEMD_UNITS): New variables.
+ (install-etc): Install systemd unit file.
+ (uninstall): Uninstall systemd unit file.
+
2014-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
* .gitignore: Ignore loaddefs directly under lisp, and in
diff --git a/Makefile.in b/Makefile.in
index ccb70a4..b1e6be5 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -241,6 +241,9 @@ etcdocdir=@etcdocdir@
# Where to install Emacs game score files.
gamedir=@gamedir@
+# Where to install systemd unit files.
+systemdunitdir=@systemdunitdir@
+
# ==================== Utility Programs for the Build ====================
# Allow the user to specify the install program.
@@ -286,6 +289,9 @@ SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed
's|$(srcdir)/||g'`
COPYDIR = ${srcdir}/etc ${srcdir}/lisp
COPYDESTS = "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}"
+# systemd unit
+SYSTEMD_UNITS = @SYSTEMD_UNITS@
+
all: ${SUBDIR} info
.PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 etc-emacsver
@@ -716,6 +722,16 @@ install-etc:
|| exit 1; \
done ; \
done
+ if test "x$(SYSTEMD_UNITS)" = "xemacs.service" ; then \
+ tmp=etc/emacs.service; rm -f $${tmp}; \
+ sed \
+ -e "s;@emacs_prog@;${bindir}/${EMACSFULL};" \
+ -e "s;@emacsclient_prog@;${bindir}/emacsclient${EXEEXT};" \
+ "$(srcdir)/etc/emacs.service.in" > $${tmp}; \
+ umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"; \
+ $(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemdunitdir)/emacs.service"; \
+ rm -f $${tmp}; \
+ fi
### Build Emacs and install it, stripping binaries while installing them.
install-strip:
@@ -771,6 +787,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
file="$(DESTDIR)${gamedir}/$${file}"; \
[ -s "$${file}" ] || rm -f "$$file"; \
done
+ -rm -f "$(DESTDIR)$(systemdunitdir)/emacs.service"
### Windows-specific uninstall target for removing programs produced
### in nt/, and its Posix do-nothing shadow.
diff --git a/configure.ac b/configure.ac
index 010abc8..e737f1b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -374,6 +374,10 @@ otherwise for the first of `gfile' or `inotify' that is
usable.])
],
[with_file_notification=$with_features])
+AC_ARG_WITH([systemduserunitdir],
+ AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user
service files]),
+ [], [with_systemduserunitdir=default])
+
## For the times when you want to build Emacs but don't have
## a suitable makeinfo, and can live without the manuals.
dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html
@@ -2678,6 +2682,21 @@ AC_SUBST(NOTIFY_OBJ)
AC_SUBST(GFILENOTIFY_CFLAGS)
AC_SUBST(GFILENOTIFY_LIBS)
+if test "x$with_systemduserunitdir" != xno; then
+ if test "x$with_systemduserunitdir" = xdefault; then
+ with_systemduserunitdir=`"$PKG_CONFIG" --variable=systemduserunitdir
systemd`
+ fi
+ AC_SUBST([systemdunitdir], [$with_systemduserunitdir])
+fi
+
+if test -n "$with_systemduserunitdir" -a "x$with_systemduserunitdir" != xno ;
then
+ SYSTEMD_UNITS="emacs.service"
+else
+ SYSTEMD_UNITS=""
+fi
+
+AC_SUBST(SYSTEMD_UNITS)
+
dnl Do not put whitespace before the #include statements below.
dnl Older compilers (eg sunos4 cc) choke on it.
HAVE_XAW3D=no
diff --git a/etc/ChangeLog b/etc/ChangeLog
index 4f672df..02c0895 100644
--- a/etc/ChangeLog
+++ b/etc/ChangeLog
@@ -1,3 +1,8 @@
+2014-12-03 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
+
+ Add a systemd service file for dealing with emacs --daemon.
+ * emacs.service.in: New file.
+
2014-12-02 Eli Zaretskii <eliz@gnu.org>
* NEWS: Mention 'bidi-find-overridden-directionality'.
diff --git a/etc/emacs.service.in b/etc/emacs.service.in
new file mode 100644
index 0000000..0e59bc2
--- /dev/null
+++ b/etc/emacs.service.in
@@ -0,0 +1,14 @@
+# -*- conf-mode -*-
+# Copyright (C) 2014 Free Software Foundation, Inc.
+[Unit]
+Description=Emacs: the extensible, customizable text editor - and more.
+Documentation=info:Emacs man:emacs(1) https://gnu.org/software/emacs/
+
+[Service]
+Type=forking
+ExecStart=@emacs_prog@ --daemon
+ExecStop=@emacsclient_prog@ --eval "(kill-emacs)"
+Restart=on-failure
+
+[Install]
+WantedBy=default.target
--
2.1.3
^ permalink raw reply related [flat|nested] 10+ messages in thread
* Re: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-03 19:39 ` bug#16507: [RFC] Add a systemd service file for dealing with emacs --daemon Rüdiger Sonderfeld
@ 2014-12-03 21:08 ` Romain Francoise
2014-12-03 21:44 ` Rüdiger Sonderfeld
2014-12-03 22:08 ` Ulrich Mueller
2014-12-03 21:16 ` joakim
2014-12-04 3:00 ` bug#16507: " Glenn Morris
2 siblings, 2 replies; 10+ messages in thread
From: Romain Francoise @ 2014-12-03 21:08 UTC (permalink / raw)
To: Rüdiger Sonderfeld; +Cc: 16507, emacs-devel
Hi,
On Wed, Dec 03, 2014 at 08:39:44PM +0100, Rüdiger Sonderfeld wrote:
> As discussed in Bug#16507, I've added a systemd service file to deal
> with emacs --daemon. This however requires some installation changes.
> That's why I submit this patch for review before pushing it.
Is this something that distributions would be expected to enable?
Because I use both systemd and Emacs, yet I absolutely don't want to
have an Emacs daemon started by default in my user instance.
Also, by default user instances are killed when the last session is
closed, which would therefore kill the emacs process and kinda defeat
the point of having a persistent daemon.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-03 19:39 ` bug#16507: [RFC] Add a systemd service file for dealing with emacs --daemon Rüdiger Sonderfeld
2014-12-03 21:08 ` Romain Francoise
@ 2014-12-03 21:16 ` joakim
2014-12-04 3:00 ` bug#16507: " Glenn Morris
2 siblings, 0 replies; 10+ messages in thread
From: joakim @ 2014-12-03 21:16 UTC (permalink / raw)
To: Rüdiger Sonderfeld; +Cc: 16507, emacs-devel
Rüdiger Sonderfeld <ruediger@c-plusplus.net> writes:
> As discussed in Bug#16507, I've added a systemd service file to deal with
> emacs --daemon. This however requires some installation changes. That's why
> I submit this patch for review before pushing it.
>
> A new configuration flag `--with-systemduserunitdir' is added to set the
> installation directory for the user unit. If it is unset an attempt is made
> to locate the default directory by using pkg-config.
>
> (I guess this should also get an entry in etc/NEWS.)
>
> * configure.ac (with_systemduserunitdir): New option.
> * Makefile.in (systemdunitdir,SYSTEMD_UNITS): New variables.
> (install-etc): Install systemd unit file.
> (uninstall): Uninstall systemd unit file.
> * etc/emacs.service.in: New file.
> ---
> ChangeLog | 8 ++++++++
> Makefile.in | 17 +++++++++++++++++
> configure.ac | 19 +++++++++++++++++++
> etc/ChangeLog | 5 +++++
> etc/emacs.service.in | 14 ++++++++++++++
> 5 files changed, 63 insertions(+)
> create mode 100644 etc/emacs.service.in
>
> diff --git a/ChangeLog b/ChangeLog
> index cd7698c..05ad878 100644
> --- a/ChangeLog
> +++ b/ChangeLog
> @@ -1,3 +1,11 @@
> +2014-12-03 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
> +
> + Add a systemd service file for dealing with emacs --daemon.
> + * configure.ac (with_systemduserunitdir): New option.
> + * Makefile.in (systemdunitdir,SYSTEMD_UNITS): New variables.
> + (install-etc): Install systemd unit file.
> + (uninstall): Uninstall systemd unit file.
> +
> 2014-12-01 Lars Magne Ingebrigtsen <larsi@gnus.org>
>
> * .gitignore: Ignore loaddefs directly under lisp, and in
> diff --git a/Makefile.in b/Makefile.in
> index ccb70a4..b1e6be5 100644
> --- a/Makefile.in
> +++ b/Makefile.in
> @@ -241,6 +241,9 @@ etcdocdir=@etcdocdir@
> # Where to install Emacs game score files.
> gamedir=@gamedir@
>
> +# Where to install systemd unit files.
> +systemdunitdir=@systemdunitdir@
> +
> # ==================== Utility Programs for the Build ====================
>
> # Allow the user to specify the install program.
> @@ -286,6 +289,9 @@ SUBDIR_MAKEFILES = `echo $(SUBDIR_MAKEFILES_IN:.in=) | sed
> 's|$(srcdir)/||g'`
> COPYDIR = ${srcdir}/etc ${srcdir}/lisp
> COPYDESTS = "$(DESTDIR)${etcdir}" "$(DESTDIR)${lispdir}"
>
> +# systemd unit
> +SYSTEMD_UNITS = @SYSTEMD_UNITS@
> +
> all: ${SUBDIR} info
>
> .PHONY: all ${SUBDIR} blessmail epaths-force epaths-force-w32 etc-emacsver
> @@ -716,6 +722,16 @@ install-etc:
> || exit 1; \
> done ; \
> done
> + if test "x$(SYSTEMD_UNITS)" = "xemacs.service" ; then \
> + tmp=etc/emacs.service; rm -f $${tmp}; \
> + sed \
> + -e "s;@emacs_prog@;${bindir}/${EMACSFULL};" \
> + -e "s;@emacsclient_prog@;${bindir}/emacsclient${EXEEXT};" \
> + "$(srcdir)/etc/emacs.service.in" > $${tmp}; \
> + umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"; \
> + $(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemdunitdir)/emacs.service"; \
> + rm -f $${tmp}; \
> + fi
>
> ### Build Emacs and install it, stripping binaries while installing them.
> install-strip:
> @@ -771,6 +787,7 @@ uninstall: uninstall-$(NTDIR) uninstall-doc
> file="$(DESTDIR)${gamedir}/$${file}"; \
> [ -s "$${file}" ] || rm -f "$$file"; \
> done
> + -rm -f "$(DESTDIR)$(systemdunitdir)/emacs.service"
>
> ### Windows-specific uninstall target for removing programs produced
> ### in nt/, and its Posix do-nothing shadow.
> diff --git a/configure.ac b/configure.ac
> index 010abc8..e737f1b 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -374,6 +374,10 @@ otherwise for the first of `gfile' or `inotify' that is
> usable.])
> ],
> [with_file_notification=$with_features])
>
> +AC_ARG_WITH([systemduserunitdir],
> + AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user
> service files]),
> + [], [with_systemduserunitdir=default])
> +
> ## For the times when you want to build Emacs but don't have
> ## a suitable makeinfo, and can live without the manuals.
> dnl http://lists.gnu.org/archive/html/emacs-devel/2008-04/msg01844.html@@ -2678,6 +2682,21 @@ AC_SUBST(NOTIFY_OBJ)
> AC_SUBST(GFILENOTIFY_CFLAGS)
> AC_SUBST(GFILENOTIFY_LIBS)
>
> +if test "x$with_systemduserunitdir" != xno; then
> + if test "x$with_systemduserunitdir" = xdefault; then
> + with_systemduserunitdir=`"$PKG_CONFIG" --variable=systemduserunitdir
> systemd`
> + fi
> + AC_SUBST([systemdunitdir], [$with_systemduserunitdir])
> +fi
> +
> +if test -n "$with_systemduserunitdir" -a "x$with_systemduserunitdir" != xno ;
> then
> + SYSTEMD_UNITS="emacs.service"
> +else
> + SYSTEMD_UNITS=""
> +fi
> +
> +AC_SUBST(SYSTEMD_UNITS)
> +
> dnl Do not put whitespace before the #include statements below.
> dnl Older compilers (eg sunos4 cc) choke on it.
> HAVE_XAW3D=no
> diff --git a/etc/ChangeLog b/etc/ChangeLog
> index 4f672df..02c0895 100644
> --- a/etc/ChangeLog
> +++ b/etc/ChangeLog
> @@ -1,3 +1,8 @@
> +2014-12-03 Rüdiger Sonderfeld <ruediger@c-plusplus.de>
> +
> + Add a systemd service file for dealing with emacs --daemon.
> + * emacs.service.in: New file.
> +
> 2014-12-02 Eli Zaretskii <eliz@gnu.org>
>
> * NEWS: Mention 'bidi-find-overridden-directionality'.
> diff --git a/etc/emacs.service.in b/etc/emacs.service.in
> new file mode 100644
> index 0000000..0e59bc2
> --- /dev/null
> +++ b/etc/emacs.service.in
> @@ -0,0 +1,14 @@
> +# -*- conf-mode -*-
> +# Copyright (C) 2014 Free Software Foundation, Inc.
> +[Unit]
> +Description=Emacs: the extensible, customizable text editor - and more.
> +Documentation=info:Emacs man:emacs(1) https://gnu.org/software/emacs/+
> +[Service]
> +Type=forking
> +ExecStart=@emacs_prog@ --daemon
> +ExecStop=@emacsclient_prog@ --eval "(kill-emacs)"
> +Restart=on-failure
> +
> +[Install]
> +WantedBy=default.target
I have a unit file that enables ssh-agent, which is otherwise a problem.
I'm not sure if its generally usable.
[Unit]
Description=Emacs: the extensible, self-documenting text editor
[Service]
Type=forking
ExecStart=/usr/bin/ssh-agent /usr/local/bin/emacs --daemon
ExecStop=/usr/local/bin/emacs --eval "(progn (setq kill-emacs-hook 'nil) (kill-emacs))"
Restart=always
User=%i
WorkingDirectory=%h
[Install]
WantedBy=multi-user.target
The corresponding elisp looks like (warning, lame hard-coding):
(defun ssh-agent-init ()
(interactive)
(save-excursion
(if (get-buffer "ssh-agent-process") (kill-buffer "ssh-agent-process" ))
(with-current-buffer (get-buffer-create "ssh-agent-process")
(call-process "ssh-agent" nil t t "-c" "-a" "/home/joakim/.ssh-agent-sock")
(goto-char (point-min))
(message "buf: %s cont: %s"(current-buffer) (buffer-string))
(search-forward-regexp ".* .* \\(.*\\);")
(message "1: %s" (match-string 0)(match-string 1))
(setenv "SSH_AUTH_SOCK" (match-string 1))
(setq ssh-auth-sock (getenv "SSH_AUTH_SOCK" ))
(message "%s" (getenv "SSH_AUTH_SOCK" )))
)
)
(setenv "SSH_AUTH_SOCK" "/home/joakim/.ssh-agent-sock")
;;from the internetz
;; - it hangs, but works anyway
;; - it should also run ssh-agent-init intelligently
(defun ssh-add-process-filter (process string)
(save-match-data
(if (string-match ":\\s *\\'" string)
(process-send-string process (concat (read-passwd string) "\n"))
(message "%s" string))))
(defun ssh-add ()
"Run ssh-add to add a key to the running SSH agent.
Let Emacs prompt for the passphrase."
(interactive)
(let ((process-connection-type t)
process)
(unwind-protect
(progn
(setq process (start-process "ssh-add" nil
"ssh-add" ))
(set-process-filter process 'ssh-add-process-filter)
(while (accept-process-output process)))
(if (eq (process-status process) 'run)
(kill-process process)))))
--
Joakim Verona
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-03 21:08 ` Romain Francoise
@ 2014-12-03 21:44 ` Rüdiger Sonderfeld
2014-12-03 22:08 ` Ulrich Mueller
1 sibling, 0 replies; 10+ messages in thread
From: Rüdiger Sonderfeld @ 2014-12-03 21:44 UTC (permalink / raw)
To: emacs-devel; +Cc: 16507, Romain Francoise, Rüdiger Sonderfeld
On Wednesday 03 December 2014 22:08:37 Romain Francoise wrote:
> Is this something that distributions would be expected to enable?
> Because I use both systemd and Emacs, yet I absolutely don't want to
> have an Emacs daemon started by default in my user instance.
It's something the user would be expected to enable. This should only provide
the service file and the user can then enable it, using
systemctl enable --user emacs.service
(or disable it by using disable).
> Also, by default user instances are killed when the last session is
> closed, which would therefore kill the emacs process and kinda defeat
> the point of having a persistent daemon.
Users should be able to prevent this, by using `loginctl enable-linger'.
Regards,
Rüdiger
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-03 21:08 ` Romain Francoise
2014-12-03 21:44 ` Rüdiger Sonderfeld
@ 2014-12-03 22:08 ` Ulrich Mueller
2014-12-04 0:18 ` Rüdiger Sonderfeld
1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Mueller @ 2014-12-03 22:08 UTC (permalink / raw)
To: Romain Francoise; +Cc: 16507, emacs-devel, Rüdiger Sonderfeld
>>>>> On Wed, 03 Dec 2014, Romain Francoise wrote:
> Is this something that distributions would be expected to enable?
As it is proposed, it won't work for Gentoo. We support installation
of several Emacs versions in parallel, so a systemd unit file
installed under a fixed path name would lead to file collisions
between different versions.
Which means that we shall disable installation of the file in Gentoo.
(Besides, systemd isn't our default init system ...)
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-03 22:08 ` Ulrich Mueller
@ 2014-12-04 0:18 ` Rüdiger Sonderfeld
2014-12-04 2:57 ` bug#16507: " Drew Adams
2014-12-04 6:26 ` Ulrich Mueller
0 siblings, 2 replies; 10+ messages in thread
From: Rüdiger Sonderfeld @ 2014-12-04 0:18 UTC (permalink / raw)
To: emacs-devel; +Cc: Ulrich Mueller, Romain Francoise, 16507
On Wednesday 03 December 2014 23:08:29 Ulrich Mueller wrote:
> >>>>> On Wed, 03 Dec 2014, Romain Francoise wrote:
> > Is this something that distributions would be expected to enable?
>
> As it is proposed, it won't work for Gentoo. We support installation
> of several Emacs versions in parallel, so a systemd unit file
> installed under a fixed path name would lead to file collisions
> between different versions.
>
> Which means that we shall disable installation of the file in Gentoo.
> (Besides, systemd isn't our default init system ...)
Multiple versions are indeed an issue. I don't know if the systemd folks have
a suggestion for that case. But as far as I understand the recommendation is
indeed to install unit files to the directory given by pkg-config.
The installation directory can of course be changed and you could simply point
it elsewhere and then have the user copy the unit file she wants.
Regards,
Rüdiger
^ permalink raw reply [flat|nested] 10+ messages in thread
* RE: bug#16507: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-04 0:18 ` Rüdiger Sonderfeld
@ 2014-12-04 2:57 ` Drew Adams
2014-12-04 6:26 ` Ulrich Mueller
1 sibling, 0 replies; 10+ messages in thread
From: Drew Adams @ 2014-12-04 2:57 UTC (permalink / raw)
To: Rüdiger Sonderfeld, emacs-devel
Cc: Ulrich Mueller, Romain Francoise, 16507
Please drop one or the other from the recipients list:
emacs-devel or debbugs.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: bug#16507: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-03 19:39 ` bug#16507: [RFC] Add a systemd service file for dealing with emacs --daemon Rüdiger Sonderfeld
2014-12-03 21:08 ` Romain Francoise
2014-12-03 21:16 ` joakim
@ 2014-12-04 3:00 ` Glenn Morris
2 siblings, 0 replies; 10+ messages in thread
From: Glenn Morris @ 2014-12-04 3:00 UTC (permalink / raw)
To: Rüdiger Sonderfeld; +Cc: 16507, emacs-devel
Thanks, looks nice.
(Don't see why it needed to be posted to two mailing lists though.)
Should the name of the service file not respect program-transform though?
Ie, if I am installing the Emacs binary as "emacs24", should the service
file not be installed as "emacs24.service"?
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-04 0:18 ` Rüdiger Sonderfeld
2014-12-04 2:57 ` bug#16507: " Drew Adams
@ 2014-12-04 6:26 ` Ulrich Mueller
2014-12-04 14:04 ` Rüdiger Sonderfeld
1 sibling, 1 reply; 10+ messages in thread
From: Ulrich Mueller @ 2014-12-04 6:26 UTC (permalink / raw)
To: Rüdiger Sonderfeld; +Cc: 16507, Romain Francoise, emacs-devel
>>>>> On Thu, 04 Dec 2014, Rüdiger Sonderfeld wrote:
> On Wednesday 03 December 2014 23:08:29 Ulrich Mueller wrote:
>> Which means that we shall disable installation of the file in
>> Gentoo. (Besides, systemd isn't our default init system ...)
> Multiple versions are indeed an issue. I don't know if the systemd
> folks have a suggestion for that case. But as far as I understand
> the recommendation is indeed to install unit files to the directory
> given by pkg-config.
> The installation directory can of course be changed and you could
> simply point it elsewhere and then have the user copy the unit file
> she wants.
IIUC, a copy of the file is installed with the data-directory (etc/)
anyway? So the file will be available to the user, even if not
installed in the pkgconfig location.
Alternatively, if there is users' demand for it, we (Gentoo) could
add the unit to another package (like app-emacs/emacs-common-gentoo
which contains the desktop files, or app-emacs/emacs-daemon). We try
to keep the number of files installed such at a minimum, though, and
follow upstream's install locations whereever possible.
^ permalink raw reply [flat|nested] 10+ messages in thread
* Re: [RFC] Add a systemd service file for dealing with emacs --daemon.
2014-12-04 6:26 ` Ulrich Mueller
@ 2014-12-04 14:04 ` Rüdiger Sonderfeld
0 siblings, 0 replies; 10+ messages in thread
From: Rüdiger Sonderfeld @ 2014-12-04 14:04 UTC (permalink / raw)
To: emacs-devel, Romain Francoise; +Cc: Ulrich Mueller
On Thursday 04 December 2014 07:26:53 Ulrich Mueller wrote:
> IIUC, a copy of the file is installed with the data-directory (etc/)
> anyway? So the file will be available to the user, even if not
> installed in the pkgconfig location.
No, the data directory etc/ should not be automatically be installed anywhere.
The emacs.service file is only generated and installed, if either pkgconfig
provides the default location or the user explicitly sets it.
> Alternatively, if there is users' demand for it, we (Gentoo) could
> add the unit to another package (like app-emacs/emacs-common-gentoo
> which contains the desktop files, or app-emacs/emacs-daemon). We try
> to keep the number of files installed such at a minimum, though, and
> follow upstream's install locations whereever possible.
That probably makes sense.
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2014-12-04 14:04 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <8738ki4ys4.fsf@geometryfactory.com>
2014-12-03 19:39 ` bug#16507: [RFC] Add a systemd service file for dealing with emacs --daemon Rüdiger Sonderfeld
2014-12-03 21:08 ` Romain Francoise
2014-12-03 21:44 ` Rüdiger Sonderfeld
2014-12-03 22:08 ` Ulrich Mueller
2014-12-04 0:18 ` Rüdiger Sonderfeld
2014-12-04 2:57 ` bug#16507: " Drew Adams
2014-12-04 6:26 ` Ulrich Mueller
2014-12-04 14:04 ` Rüdiger Sonderfeld
2014-12-03 21:16 ` joakim
2014-12-04 3:00 ` bug#16507: " Glenn Morris
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).