unofficial mirror of help-gnu-emacs@gnu.org
 help / color / mirror / Atom feed
From: Noam Postavsky <npostavs@gmail.com>
To: Bingo <right.ho@gmail.com>
Cc: Help Gnu Emacs mailing list <help-gnu-emacs@gnu.org>
Subject: Re: make install does not setup systemd correctly
Date: Sun, 15 Jul 2018 20:40:21 -0400	[thread overview]
Message-ID: <CAM-tV--guAU7srprzkAFKfr-fA+qEYRkALktdSwYgCBK69_=wg@mail.gmail.com> (raw)
In-Reply-To: <20180715162748.5c9a123d@gmail.com>

On 15 July 2018 at 06:58, Bingo <right.ho@gmail.com> wrote:
> Hi,
>    On my Fedora installation, emacs 25.3 was already installed
>    in /usr/bin. In another
>    location (~/Downloads/emacs26/install/bin/emacs) , I installed emacs
>    27.0 from source using ./configure, make and make install. $PATH
>    contains ~/Downloads/emacs26/install/ before /usr/bin.
>
> In this state, running "emacs --daemon" creates a emacs process, using
> the binary from ~/Downloads/emacs26/install as a subprocess of systemd.

As far as I understand it, when you are running systemd, every process
is a subprocess of systemd, because it's the init process, so it's at
the root of the process tree.

> But the systemd configuration still uses the configuration info
> from /lib/systemd/user/emacs.service, which is from the pre-installed
> emacs 25.3. Any systemd operations end up using the binary
> from /usr/bin.

Maybe because it doesn't use your $PATH configuration? The
emacs.service file doesn't seem to have anything version specific in
it.

> 1. Emacs man page, or --help does not give an obvious way to not use
> systemd for its daemon. Is it supported at all ?

I guess just don't use any "systemd operations"?

Currently Emacs doesn't use systemd at all, except that it takes
sockets passed by systemd and makes them available to the
`:use-external-socket' option of `make-network-process'.

> 2. If we are not making it easy to avoid systemd, let us configure it
> while installing? Emacswiki says that we need to copy the included
> emacs.service file to ~/.config/systemd/user/emacs.service. It seems to
> help - my emacsclient has not been hanging since then. But couldn't
> make install have copied this file by default ? Or used emacs.service
> file from the correct place when a binary from this emacs 27.0
> installation is being run as daemon ?

According to this comment in Makefile.in, it's not entirely clear
where the service file should get installed.

# Where the etc/emacs.service file is to be installed.
# The system value (typically /usr/lib/systemd/user) can be
# obtained with: pkg-config --variable=systemduserunitdir systemd
# but that does not respect configure's prefix.
# It is not clear where we should install this file when
# prefix != /usr (or /usr/local?) (eg for non-root installs).
# Other options include ~/.config/systemd/user/,
# $XDG_RUNTIME_DIR/systemd/user/
# It seems the user may end up having to make a manual link...
systemdunitdir=$(libdir)/systemd/user



  reply	other threads:[~2018-07-16  0:40 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-07-15 10:58 make install does not setup systemd correctly Bingo
2018-07-16  0:40 ` Noam Postavsky [this message]
2018-07-16 14:33   ` Bingo
2018-07-16 15:31     ` Noam Postavsky

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='CAM-tV--guAU7srprzkAFKfr-fA+qEYRkALktdSwYgCBK69_=wg@mail.gmail.com' \
    --to=npostavs@gmail.com \
    --cc=help-gnu-emacs@gnu.org \
    --cc=right.ho@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).