GNU bug report logs - #76924
31.0.50; Wrong install location for systemd user unit file

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: emacs; Reported by: Ulrich Müller <ulm@HIDDEN>; Done: Ulrich Müller <ulm@HIDDEN>; Maintainer for emacs is bug-gnu-emacs@HIDDEN.
bug marked as fixed in version 31.1, send any further explanations to 76924 <at> debbugs.gnu.org and Ulrich Müller <ulm@HIDDEN> Request was from Ulrich Müller <ulm@HIDDEN> to control <at> debbugs.gnu.org. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 14 Mar 2025 07:03:20 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Fri Mar 14 03:03:20 2025
Received: from localhost ([127.0.0.1]:59789 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsz4i-0005rF-3y
	for submit <at> debbugs.gnu.org; Fri, 14 Mar 2025 03:03:20 -0400
Received: from woodpecker.gentoo.org ([140.211.166.183]:39848
 helo=smtp.gentoo.org)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1tsz4f-0005qz-Qm
 for 76924 <at> debbugs.gnu.org; Fri, 14 Mar 2025 03:03:18 -0400
Received: from urania (p200300cbaf23ab005979f40f65addeff.dip0.t-ipconnect.de
 [IPv6:2003:cb:af23:ab00:5979:f40f:65ad:deff])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id 5C1153430A7;
 Fri, 14 Mar 2025 07:03:09 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <8634fh2dw4.fsf@HIDDEN> (Eli Zaretskii's message of "Thu, 13 Mar
 2025 16:39:39 +0200")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN> <utt7y9yqc@HIDDEN>
 <86ecz25lb0.fsf@HIDDEN> <uldta9pep@HIDDEN>
 <86tt7y42ck.fsf@HIDDEN> <uh63y9mbd@HIDDEN> <uy0x9qinz@HIDDEN>
 <8634fh2dw4.fsf@HIDDEN>
Date: Fri, 14 Mar 2025 08:03:05 +0100
Message-ID: <uldt8qel2@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>, schwab@HIDDEN,
 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>>> On Thu, 13 Mar 2025, Eli Zaretskii wrote:

> Thanks.  This LGTM, but maybe it would be slightly better to have
> references to the URLs where the standard places are documented,
> instead of the reference to discussion of this bug?

Comment updated, and pushed to master.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 13 Mar 2025 14:39:53 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 13 10:39:53 2025
Received: from localhost ([127.0.0.1]:57614 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsjiz-0003l3-Bf
	for submit <at> debbugs.gnu.org; Thu, 13 Mar 2025 10:39:53 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:52560)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tsjiw-0003kh-Ex
 for 76924 <at> debbugs.gnu.org; Thu, 13 Mar 2025 10:39:51 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tsjio-0002jA-Td; Thu, 13 Mar 2025 10:39:44 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=y2f+sSoVWl2q6TLyegauIQ5kSvXzsEQy/QL+EpZunpY=; b=kIXshNFlphMglLNUY4bb
 t6GgIzG/hnT264oNcnn6SieBbK0We6jMQ+mzfHr4Bim2POGJB+PYZAwfzK/AUiNd1g/0yLh/W+8a/
 l4oPVmOZAz/5dmoHU0HefgXXm1QPeUfSrtehE/m/sa9NLdDRxkx89syxKck4iBajKQxvOtK6S3VEf
 f3Fh51nJCiKSy1YJVnWtwpQH0Ss5fYEn9gfLoiwKNvsofeGmbCcrBZAGtnu+lgCgtVPoWdqxvgJtD
 s3wvjtsP+qoAOooHzY+NgfJwe/ryZv2tTijJurTjqQrPiERvQvKTurnilv5ye6ywAV0lD8+NLe/vp
 ME7exOuSTQGcgQ==;
Date: Thu, 13 Mar 2025 16:39:39 +0200
Message-Id: <8634fh2dw4.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich =?iso-8859-1?Q?M=FCller?= <ulm@HIDDEN>
In-Reply-To: <uy0x9qinz@HIDDEN> (message from Ulrich =?iso-8859-1?Q?M?=
 =?iso-8859-1?Q?=FCller?= on Thu, 13 Mar 2025 12:22:40 +0100)
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN> <utt7y9yqc@HIDDEN>
 <86ecz25lb0.fsf@HIDDEN> <uldta9pep@HIDDEN>
 <86tt7y42ck.fsf@HIDDEN> <uh63y9mbd@HIDDEN> <uy0x9qinz@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: schwab@HIDDEN, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Müller <ulm@HIDDEN>
> Cc: Ulrich Müller <ulm@HIDDEN>, Eli Zaretskii
>  <eliz@HIDDEN>,
>   schwab@HIDDEN
> Date: Thu, 13 Mar 2025 12:22:40 +0100
> 
> Proposed patch attached, please review.

Thanks.  This LGTM, but maybe it would be slightly better to have
references to the URLs where the standard places are documented,
instead of the reference to discussion of this bug?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 13 Mar 2025 11:22:59 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Mar 13 07:22:59 2025
Received: from localhost ([127.0.0.1]:53928 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsgeQ-0007Us-KL
	for submit <at> debbugs.gnu.org; Thu, 13 Mar 2025 07:22:59 -0400
Received: from woodpecker.gentoo.org
 ([2001:470:ea4a:1:5054:ff:fec7:86e4]:49103 helo=smtp.gentoo.org)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1tsgeM-0007UT-I4
 for 76924 <at> debbugs.gnu.org; Thu, 13 Mar 2025 07:22:55 -0400
Received: from urania (p200300cbaf4383001e57f1d88e96d38d.dip0.t-ipconnect.de
 [IPv6:2003:cb:af43:8300:1e57:f1d8:8e96:d38d])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id BCC1A343687;
 Thu, 13 Mar 2025 11:22:43 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: 76924 <at> debbugs.gnu.org
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <uh63y9mbd@HIDDEN> ("Ulrich =?utf-8?Q?M=C3=BCller=22's?=
 message of "Wed, 12 Mar 2025 18:43:34 +0100")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN> <utt7y9yqc@HIDDEN>
 <86ecz25lb0.fsf@HIDDEN> <uldta9pep@HIDDEN>
 <86tt7y42ck.fsf@HIDDEN> <uh63y9mbd@HIDDEN>
Date: Thu, 13 Mar 2025 12:22:40 +0100
Message-ID: <uy0x9qinz@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>, schwab@HIDDEN,
 Eli Zaretskii <eliz@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

--=-=-=
Content-Type: text/plain

Proposed patch attached, please review.


--=-=-=
Content-Type: text/plain
Content-Disposition: inline;
 filename=0001-New-configure-option-with-systemduserunitdir.patch

From 19232af5cb08a321dde60fd59e92c8b30203d7f4 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Ulrich=20M=C3=BCller?= <ulm@HIDDEN>
Date: Thu, 13 Mar 2025 12:16:37 +0100
Subject: [PATCH] New configure option --with-systemduserunitdir

* configure.ac (systemduserunitdir): New variable and option.
* Makefile.in (systemduserunitdir): New, set by configure.
(install-etc, uninstall): Don't install emacs.service when
systemduserunitdir is unspecified.
* etc/NEWS: Announce the new configure option.  (Bug#76924)
---
 Makefile.in  | 22 +++++++++-------------
 configure.ac | 16 ++++++++++++++++
 etc/NEWS     |  5 +++++
 3 files changed, 30 insertions(+), 13 deletions(-)

diff --git a/Makefile.in b/Makefile.in
index ca6d991bce6..0ba11c9aa5b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -160,7 +160,7 @@ sharedstatedir=
 # a subdirectory of this.
 libexecdir=@libexecdir@
 
-# Currently only used for the systemd service file.
+# Where to install object code libraries.  Used for ELN_DESTDIR.
 libdir=@libdir@
 
 # Where to install emacs-module.h.
@@ -207,15 +207,7 @@ desktopdir=
 metainfodir=$(datarootdir)/metainfo
 
 # 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
+systemduserunitdir=@systemduserunitdir@
 
 # Where the etc/images/icons/hicolor directory is to be installed.
 icondir=$(datarootdir)/icons
@@ -886,14 +878,16 @@ install-etc:
 	  ${srcdir}/etc/emacs.metainfo.xml > $${tmp}; \
 	${INSTALL_DATA} $${tmp} "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"; \
 	rm -f $${tmp}
-	umask 022; $(MKDIR_P) "$(DESTDIR)$(systemdunitdir)"
+  ifneq ($(systemduserunitdir),)
+	umask 022; $(MKDIR_P) "$(DESTDIR)$(systemduserunitdir)"
 	tmp=etc/emacs.tmpservice; rm -f $${tmp}; \
 	sed -e '/^##/d' \
 	  -e "/^Documentation/ s/emacs(1)/${EMACS_NAME}(1)/" \
 	  -e "/^ExecStart/ s|emacs|${bindir}/${EMACS}|" \
 	  ${srcdir}/etc/emacs.service > $${tmp}; \
-	$(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"; \
+	$(INSTALL_DATA) $${tmp} "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service"; \
 	rm -f $${tmp}
+  endif
 	thisdir=`pwd -P`; \
 	cd ${iconsrcdir} || exit 1; umask 022 ; \
 	for dir in */*/apps */*/mimetypes; do \
@@ -977,7 +971,9 @@ uninstall:
 	fi)
 	-rm -f "$(DESTDIR)${desktopdir}/${EMACS_NAME}.desktop"
 	-rm -f "$(DESTDIR)${metainfodir}/${EMACS_NAME}.metainfo.xml"
-	-rm -f "$(DESTDIR)$(systemdunitdir)/${EMACS_NAME}.service"
+  ifneq ($(systemduserunitdir),)
+	-rm -f "$(DESTDIR)$(systemduserunitdir)/${EMACS_NAME}.service"
+  endif
   ifneq (,$(use_gamedir))
 	for file in snake-scores tetris-scores; do \
 	  file="$(DESTDIR)${gamedir}/$${file}"; \
diff --git a/configure.ac b/configure.ac
index 4a7f326ab2b..033f1dc09ef 100644
--- a/configure.ac
+++ b/configure.ac
@@ -481,6 +481,22 @@ AC_DEFUN
 DUMPING=$with_dumping
 AC_SUBST([DUMPING])
 
+dnl Where the etc/emacs.service file is to be installed.
+dnl We use $(prefix)/lib/systemd/user as default, but this may not be
+dnl in systemd's search path when prefix is neither /usr nor /usr/local.
+dnl In that case (e.g. for non-root installs) the location can be
+dnl specified with the configure option.  (Bug#76924)
+AC_ARG_WITH([systemduserunitdir],
+  [AS_HELP_STRING([--with-systemduserunitdir=DIR],
+    [directory for systemd user unit file;
+    default 'PREFIX/usr/lib/systemd/user'])],
+  [systemduserunitdir=${withval}],
+  [systemduserunitdir='${prefix}/lib/systemd/user'])
+if test "${systemduserunitdir}" = "no"; then
+  systemduserunitdir=''
+fi
+AC_SUBST([systemduserunitdir])
+
 dnl FIXME currently it is not the last.
 dnl This should be the last --with option, because --with-x is
 dnl added later on when we find the file name of X, and it's best to
diff --git a/etc/NEWS b/etc/NEWS
index d79080c94e8..e7f13bbc567 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -37,6 +37,11 @@ host system supports SSE2) or '-fno-tree-sra' (if not).  These GCC
 options work around GCC bug 58416, which can cause Emacs to behave
 incorrectly in rare cases.
 
+---
+** New configure option '--with-systemduserunitdir'.
+This allows to specify the directory where the user unit file for
+systemd is installed; default is '${prefix}/usr/lib/systemd/user'.
+
 
 * Startup Changes in Emacs 31.1
 
-- 
2.48.1


--=-=-=--




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 12 Mar 2025 17:43:50 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 13:43:50 2025
Received: from localhost ([127.0.0.1]:51578 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsQ7S-00037D-2V
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 13:43:50 -0400
Received: from mail.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:36753
 helo=smtp.gentoo.org)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1tsQ7P-00036v-JJ
 for 76924 <at> debbugs.gnu.org; Wed, 12 Mar 2025 13:43:48 -0400
Received: from urania (p200300cbaf2615004a94df9c25963a30.dip0.t-ipconnect.de
 [IPv6:2003:cb:af26:1500:4a94:df9c:2596:3a30])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id 754DB3430F9;
 Wed, 12 Mar 2025 17:43:38 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <86tt7y42ck.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 12 Mar
 2025 18:53:47 +0200")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN> <utt7y9yqc@HIDDEN>
 <86ecz25lb0.fsf@HIDDEN> <uldta9pep@HIDDEN>
 <86tt7y42ck.fsf@HIDDEN>
Date: Wed, 12 Mar 2025 18:43:34 +0100
Message-ID: <uh63y9mbd@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>, schwab@HIDDEN,
 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>>>> On Wed, 12 Mar 2025, Eli Zaretskii wrote:

> Thanks. So I guess we will add a configure time option with
> $(prefix)/lib/systemd/user as fallback?

Yes, option --with-systemduserunitdir with fallback as mentioned.

I'll try to come up with a patch before the end of the week.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 12 Mar 2025 16:54:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 12:54:02 2025
Received: from localhost ([127.0.0.1]:51492 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsPLF-0000mK-Jq
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 12:54:02 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:57554)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tsPLC-0000ly-Fv
 for 76924 <at> debbugs.gnu.org; Wed, 12 Mar 2025 12:53:59 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tsPL5-0007Fn-Rr; Wed, 12 Mar 2025 12:53:51 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=tQq5TOHLblSByXztPKkgm64MV0HFl1/EFGC2Zh2gRBA=; b=mmIMsyMNFprEuzTIC7yo
 pclgfOinN4vcoNHdnFjHmrD0TXxyUmKDE1ksk/ZBJ+V1Zc+TCzK1E6C6Ym9ci8wZVC2k0+Emqd74X
 fAw5xWiqTRri1lmSoKnHsIj2mgtR5hxmEbiwDO4r/+vHKcgZ+bX0xo7BNBzA83plYbZJ1LqTPf6ig
 +0GNQ+iTArHZ/OdRo8uqxAlC7fdLn5meuazcm6BdMuNncKXbLdFRVIEE1gZtx28vVWmbeMIWz1j/6
 qjFOzZhlODY3toqIW3HSyhOI6i+mwkK3kYmq80cJE8wzGIAROExxY8/5vKiVUgBohSzv/J/UImzsv
 ro4iIYfs9kF1VQ==;
Date: Wed, 12 Mar 2025 18:53:47 +0200
Message-Id: <86tt7y42ck.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich =?iso-8859-1?Q?M=FCller?= <ulm@HIDDEN>
In-Reply-To: <uldta9pep@HIDDEN> (message from Ulrich =?iso-8859-1?Q?M?=
 =?iso-8859-1?Q?=FCller?= on Wed, 12 Mar 2025 17:36:46 +0100)
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN> <utt7y9yqc@HIDDEN>
 <86ecz25lb0.fsf@HIDDEN> <uldta9pep@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: schwab@HIDDEN, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Müller <ulm@HIDDEN>
> Cc: Ulrich Müller <ulm@HIDDEN>,  schwab@HIDDEN,
>   76924 <at> debbugs.gnu.org
> Date: Wed, 12 Mar 2025 17:36:46 +0100
> 
> >>>>> On Wed, 12 Mar 2025, Eli Zaretskii wrote:
> 
> So I did some reasearch (not at all comprehensive, but should be enough
> to get an idea how things are typically done):
> 
> blueman:
>   configure option --with-systemduserunitdir
> 
> GNOME:
>   Meson option:
>   option('systemduserunitdir', type: 'string', value: '', description: 'custom directory for systemd user units, or \'no\' to disable')
> 
> KDE:
>   CMake installs into ${KDE_INSTALL_SYSTEMDUSERUNITDIR} which is defined
>   by KDE Frameworks' extra-cmake-modules package
> 
> XFCE:
>   configure.ac defines location based on $(prefix):
>   systemd_userdir = $(prefix)/lib/systemd/user
> 
> libvirt:
>   Meson option (for system unit file):
>   option('unitdir', type: 'string', value: '', description: 'directory for systemd unit files')
> 
> PAM:
>   Meson option (for system unit file):
>   option('systemdunitdir', type: 'string', description: 'systemd service directory')
> 
> 
> >From this, I would conclude:
> 
> - Most packages have the location configurable. The only exception in
>   above list is XFCE which uses $(prefix)/lib/systemd/user.
> 
> - The name of the option isn't standardised, but variations of
>   "--with-systemduserunitdir" or "systemduserunitdir" are what I see
>   most often.

Thanks.  So I guess we will add a configure time option with
$(prefix)/lib/systemd/user as fallback?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 12 Mar 2025 16:37:03 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 12:37:02 2025
Received: from localhost ([127.0.0.1]:51454 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsP4o-0008Pn-DU
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 12:37:02 -0400
Received: from smtp.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:33985)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1tsP4m-0008PI-2r
 for 76924 <at> debbugs.gnu.org; Wed, 12 Mar 2025 12:37:00 -0400
Received: from urania (unknown [IPv6:2001:4c80:40:539:b877:565f:7e2f:2761])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id 724D434301D;
 Wed, 12 Mar 2025 16:36:50 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <86ecz25lb0.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 12 Mar
 2025 17:18:59 +0200")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN> <utt7y9yqc@HIDDEN>
 <86ecz25lb0.fsf@HIDDEN>
Date: Wed, 12 Mar 2025 17:36:46 +0100
Message-ID: <uldta9pep@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>, schwab@HIDDEN,
 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>>>> On Wed, 12 Mar 2025, Eli Zaretskii wrote:

>> Presumably the most common use cases will be:
>> 
>> - Distros building an Emacs package. These should make sure that
>>   prefix is the same for all their packages. So, installing in
>>   $(prefix)/lib will be The Right Thing and no option is needed.
>> 
>> - Users compiling Emacs from the release tarball or from Git. For
>>   these we don't really know what the prefix is, it could be
>>   /usr/local or some location under their home dir. I believe an
>>   option would be useful here.
>> 
>>   Not entirely sure about the default, but I'd go with $(prefix)/lib
>>   also for this case, because: a) /usr/local/lib is in systemd's
>>   search path, which covers one of the more common cases, and
>>   b) hardcoded /usr/lib (systemd's prefix) may not be writable for
>>   the user.

> OK, thanks. Before we decide what to do, would it be possibly to see
> what other projects do with systemd files? (Assuming there are other
> projects which install files for systemd's use.) I'd like to be sure
> we are not reinventing the wheel here, if some accepted solution
> already exists.

So I did some reasearch (not at all comprehensive, but should be enough
to get an idea how things are typically done):

blueman:
  configure option --with-systemduserunitdir

GNOME:
  Meson option:
  option('systemduserunitdir', type: 'string', value: '', description: 'custom directory for systemd user units, or \'no\' to disable')

KDE:
  CMake installs into ${KDE_INSTALL_SYSTEMDUSERUNITDIR} which is defined
  by KDE Frameworks' extra-cmake-modules package

XFCE:
  configure.ac defines location based on $(prefix):
  systemd_userdir = $(prefix)/lib/systemd/user

libvirt:
  Meson option (for system unit file):
  option('unitdir', type: 'string', value: '', description: 'directory for systemd unit files')

PAM:
  Meson option (for system unit file):
  option('systemdunitdir', type: 'string', description: 'systemd service directory')


From this, I would conclude:

- Most packages have the location configurable. The only exception in
  above list is XFCE which uses $(prefix)/lib/systemd/user.

- The name of the option isn't standardised, but variations of
  "--with-systemduserunitdir" or "systemduserunitdir" are what I see
  most often.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 12 Mar 2025 15:19:16 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 11:19:16 2025
Received: from localhost ([127.0.0.1]:51264 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsNrY-0004hk-10
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 11:19:16 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:42176)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tsNrU-0004hR-5b
 for 76924 <at> debbugs.gnu.org; Wed, 12 Mar 2025 11:19:12 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tsNrL-00088C-9E; Wed, 12 Mar 2025 11:19:04 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=74pOD0iG8O/hekeR0b2IbrnuiLm8K4kOjPn8mIkqjMY=; b=WhTBQ9C/48O6NiJ9M+CJ
 td57oGgV8fMAqkMUuTOc7enUuPfZ9qrY3aRIvUochp5c+FTRm+wOjvATjWBgGr58I7h9uoXI9IkM4
 XR9SL51a3qT+skvvA9MHF9MhJLNqjBKgWEpX2ibP/1z9mI2YBkmLwwC0Vze9vUyrF4bWauMCb7lkI
 RpMnk2mPD5pJmeqFCrVQzJb/fLFXiciGVtoIXOoIUQxUhAmvVCsQ4P5HvT9I9xXdbW8EYPAgt3Hns
 okFhN/UenYKvIEBmmc8BaruYD9JF+FifBJORXe81Vr455TL6anQ9Le11BGU+gfuKzQJwhTs6J+bsj
 ClKCxSVSmVrSAQ==;
Date: Wed, 12 Mar 2025 17:18:59 +0200
Message-Id: <86ecz25lb0.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich =?iso-8859-1?Q?M=FCller?= <ulm@HIDDEN>
In-Reply-To: <utt7y9yqc@HIDDEN> (message from Ulrich =?iso-8859-1?Q?M?=
 =?iso-8859-1?Q?=FCller?= on Wed, 12 Mar 2025 14:15:23 +0100)
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN> <utt7y9yqc@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: schwab@HIDDEN, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Müller <ulm@HIDDEN>
> Cc: Ulrich Müller <ulm@HIDDEN>,  schwab@HIDDEN,
>   76924 <at> debbugs.gnu.org
> Date: Wed, 12 Mar 2025 14:15:23 +0100
> 
> >>>>> On Wed, 12 Mar 2025, Eli Zaretskii wrote:
> 
> > Is there no way of knowing what is systemd's idea of prefix?
> 
> I think that for the majority of installations it would be prefix=/usr.
> 
> > If not, I guess a configure option will have to do, but the question
> > of the default still stands, no?
> 
> Presumably the most common use cases will be:
> 
> - Distros building an Emacs package. These should make sure that prefix
>   is the same for all their packages. So, installing in $(prefix)/lib
>   will be The Right Thing and no option is needed.
> 
> - Users compiling Emacs from the release tarball or from Git. For these
>   we don't really know what the prefix is, it could be /usr/local or
>   some location under their home dir. I believe an option would be
>   useful here.
> 
>   Not entirely sure about the default, but I'd go with $(prefix)/lib
>   also for this case, because: a) /usr/local/lib is in systemd's search
>   path, which covers one of the more common cases, and b) hardcoded
>   /usr/lib (systemd's prefix) may not be writable for the user.

OK, thanks.  Before we decide what to do, would it be possibly to see
what other projects do with systemd files?  (Assuming there are other
projects which install files for systemd's use.)  I'd like to be sure
we are not reinventing the wheel here, if some accepted solution
already exists.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 12 Mar 2025 13:15:37 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 09:15:37 2025
Received: from localhost ([127.0.0.1]:47917 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsLvs-0006h8-GZ
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 09:15:36 -0400
Received: from woodpecker.gentoo.org ([140.211.166.183]:56802
 helo=smtp.gentoo.org)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1tsLvp-0006gs-JE
 for 76924 <at> debbugs.gnu.org; Wed, 12 Mar 2025 09:15:34 -0400
Received: from urania (unknown [IPv6:2001:4c80:40:539:b877:565f:7e2f:2761])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id 84E30342F65;
 Wed, 12 Mar 2025 13:15:26 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <86ldta780a.fsf@HIDDEN> (Eli Zaretskii's message of "Wed, 12 Mar
 2025 14:23:17 +0200")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
 <86ldta780a.fsf@HIDDEN>
Date: Wed, 12 Mar 2025 14:15:23 +0100
Message-ID: <utt7y9yqc@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>, schwab@HIDDEN,
 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>>> On Wed, 12 Mar 2025, Eli Zaretskii wrote:

> Is there no way of knowing what is systemd's idea of prefix?

I think that for the majority of installations it would be prefix=/usr.

> If not, I guess a configure option will have to do, but the question
> of the default still stands, no?

Presumably the most common use cases will be:

- Distros building an Emacs package. These should make sure that prefix
  is the same for all their packages. So, installing in $(prefix)/lib
  will be The Right Thing and no option is needed.

- Users compiling Emacs from the release tarball or from Git. For these
  we don't really know what the prefix is, it could be /usr/local or
  some location under their home dir. I believe an option would be
  useful here.

  Not entirely sure about the default, but I'd go with $(prefix)/lib
  also for this case, because: a) /usr/local/lib is in systemd's search
  path, which covers one of the more common cases, and b) hardcoded
  /usr/lib (systemd's prefix) may not be writable for the user.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 12 Mar 2025 12:23:32 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Wed Mar 12 08:23:32 2025
Received: from localhost ([127.0.0.1]:47744 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tsL7U-0004Do-Au
	for submit <at> debbugs.gnu.org; Wed, 12 Mar 2025 08:23:32 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33282)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tsL7R-0004DR-JA
 for 76924 <at> debbugs.gnu.org; Wed, 12 Mar 2025 08:23:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tsL7K-0001Ai-CJ; Wed, 12 Mar 2025 08:23:22 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=fRBV/Kk0hzQbDG8rfwKvFVsTGjO1YY9QaphXKT0RhCY=; b=WquthkjYbhXUBGD80wSm
 fMto1q3aMUeCrJ67wcv9LrivTc8P5OK4k9jHQ8rcMoqbRJoIJIorqBvU9Hvr4Z5khjJjl85vVupYt
 6E1p7e8rPS1HZj72Q8ZSM7g55KaEkvPtWwB8W4/ZoTCJ2KPAwFLomBnIfWkB33s7oEUMfQtyRWioh
 mmNEsGC0iqFoLAEWTF+M/39McQZVa6Erq/JNjFBA9F+7Ln+z/yZzqjTZlUMP4IpbVJkaS6ckeO8c7
 mW9QaE8Xo9CI+3N+fbW2cX4V1RvMRYEjla5bQOgwn+OLzf4pCkdDZ0B8givDVnYKFGtmMCtXf8uT4
 0Kbo+zKxsalGcg==;
Date: Wed, 12 Mar 2025 14:23:17 +0200
Message-Id: <86ldta780a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>
In-Reply-To: <u34fjbgnn@HIDDEN> (message from Ulrich =?utf-8?Q?M=C3=BC?=
 =?utf-8?Q?ller?= on Tue, 11 Mar 2025 18:50:36 +0100)
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN> <u34fjbgnn@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: schwab@HIDDEN, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Müller <ulm@HIDDEN>
> Cc: Ulrich Müller <ulm@HIDDEN>,  Eli Zaretskii
>  <eliz@HIDDEN>,
>   76924 <at> debbugs.gnu.org
> Date: Tue, 11 Mar 2025 18:50:36 +0100
> 
> >>>>> On Tue, 11 Mar 2025, Andreas Schwab wrote:
> 
> > On Mär 11 2025, Ulrich Müller wrote:
> >> Sorry, I had a thinko there. Asking pkg-config isn't such a good idea.
> >> Imagine someone installing with prefix=/usr/local, we would then install
> >> the unit file in a stray location outside prefix. It is even worse for
> >> non-root installs where the dir may not even be writable.
> 
> > But the unit file needs to be installed in a location searched by
> > systemd, so it needs to follow systemd's idea of prefix.
> 
> More precisely, they need to be installed in a directory that is in
> systemd's search path for unit files. Which includes /usr/lib,
> /usr/local/lib, /etc, and a few others.
> 
> Looks like we should have a configure option for it then?

Is there no way of knowing what is systemd's idea of prefix?  If not,
I guess a configure option will have to do, but the question of the
default still stands, no?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 11 Mar 2025 17:50:52 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 13:50:51 2025
Received: from localhost ([127.0.0.1]:45476 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ts3kh-0001cK-HV
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 13:50:51 -0400
Received: from dev.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]:50401
 helo=smtp.gentoo.org)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1ts3ke-0001c2-Nu
 for 76924 <at> debbugs.gnu.org; Tue, 11 Mar 2025 13:50:49 -0400
Received: from urania (p200300cbaf4efb00d42170c30e4c6a9f.dip0.t-ipconnect.de
 [IPv6:2003:cb:af4e:fb00:d421:70c3:e4c:6a9f])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id D081634314A;
 Tue, 11 Mar 2025 17:50:39 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: Andreas Schwab <schwab@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <87senj1n7j.fsf@HIDDEN> (Andreas Schwab's message of "Tue, 11
 Mar 2025 18:39:12 +0100")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
 <87senj1n7j.fsf@HIDDEN>
Date: Tue, 11 Mar 2025 18:50:36 +0100
Message-ID: <u34fjbgnn@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: quoted-printable
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>,
 Eli Zaretskii <eliz@HIDDEN>, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

>>>>> On Tue, 11 Mar 2025, Andreas Schwab wrote:

> On M=C3=A4r 11 2025, Ulrich M=C3=BCller wrote:
>> Sorry, I had a thinko there. Asking pkg-config isn't such a good idea.
>> Imagine someone installing with prefix=3D/usr/local, we would then insta=
ll
>> the unit file in a stray location outside prefix. It is even worse for
>> non-root installs where the dir may not even be writable.

> But the unit file needs to be installed in a location searched by
> systemd, so it needs to follow systemd's idea of prefix.

More precisely, they need to be installed in a directory that is in
systemd's search path for unit files. Which includes /usr/lib,
/usr/local/lib, /etc, and a few others.

Looks like we should have a configure option for it then?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 11 Mar 2025 17:39:30 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 13:39:30 2025
Received: from localhost ([127.0.0.1]:45434 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ts3Zh-00010t-TE
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 13:39:30 -0400
Received: from mail-out.m-online.net ([212.18.0.9]:50967)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <whitebox@HIDDEN>)
 id 1ts3Zd-00010d-62
 for 76924 <at> debbugs.gnu.org; Tue, 11 Mar 2025 13:39:26 -0400
Received: from frontend01.mail.m-online.net (unknown [192.168.8.182])
 by mail-out.m-online.net (Postfix) with ESMTP id 4ZC1Gg2H25z1r4pg;
 Tue, 11 Mar 2025 18:39:23 +0100 (CET)
Received: from localhost (dynscan1.mnet-online.de [192.168.6.68])
 by mail.m-online.net (Postfix) with ESMTP id 4ZC1Gg0VH5z1qvBt;
 Tue, 11 Mar 2025 18:39:23 +0100 (CET)
X-Virus-Scanned: amavis at mnet-online.de
Received: from mail.mnet-online.de ([192.168.8.182])
 by localhost (dynscan1.mail.m-online.net [192.168.6.68]) (amavis, port 10024)
 with ESMTP id TQNkNOhcWL6I; Tue, 11 Mar 2025 18:39:12 +0100 (CET)
X-Auth-Info: OeE9gwx6PlCV5cgGgB2oLwPoW4C5lK5Lzw2XdGr9by7c1EID87OFYspGypQpOpL6
Received: from igel.home (aftr-82-135-83-193.dynamic.mnet-online.de
 [82.135.83.193])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256)
 (No client certificate requested)
 by mail.mnet-online.de (Postfix) with ESMTPSA;
 Tue, 11 Mar 2025 18:39:12 +0100 (CET)
Received: by igel.home (Postfix, from userid 1000)
 id 4E19B2C1958; Tue, 11 Mar 2025 18:39:12 +0100 (CET)
From: Andreas Schwab <schwab@HIDDEN>
To: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <u7c4vbpjy@HIDDEN> ("Ulrich =?utf-8?Q?M=C3=BCller=22's?=
 message of "Tue, 11 Mar 2025 15:38:25 +0100")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
Date: Tue, 11 Mar 2025 18:39:12 +0100
Message-ID: <87senj1n7j.fsf@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76924
Cc: Eli Zaretskii <eliz@HIDDEN>, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

On Mär 11 2025, Ulrich Müller wrote:

> Sorry, I had a thinko there. Asking pkg-config isn't such a good idea.
> Imagine someone installing with prefix=/usr/local, we would then install
> the unit file in a stray location outside prefix. It is even worse for
> non-root installs where the dir may not even be writable.

But the unit file needs to be installed in a location searched by
systemd, so it needs to follow systemd's idea of prefix.

-- 
Andreas Schwab, schwab@HIDDEN
GPG Key fingerprint = 7578 EB47 D4E5 4D69 2510  2552 DF73 E780 A9DA AEC1
"And now for something completely different."




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 11 Mar 2025 17:23:12 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 13:23:12 2025
Received: from localhost ([127.0.0.1]:45397 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ts3Jw-0000Hk-0A
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 13:23:12 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:48724)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1ts3JE-0000Fu-RR
 for 76924 <at> debbugs.gnu.org; Tue, 11 Mar 2025 13:22:29 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1ts3J8-0003eQ-4b; Tue, 11 Mar 2025 13:22:23 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=uXciP1D8rXjo6jEoOnvCwygrnO4+tSgijanlO91nVi0=; b=Mx8O8d29Pz48Ue9xkesO
 gBkGBYVaSp1RDDk09/Dvcr3xCg0UutMbVJjL8pyd87zYEpbYevXev7GEuHb1+obnTDjv20St7amCb
 leMd4ulFyXWe+ug1g6K1NFaJBPYuHqtho/kQx3nI+i9QTsFRlof7pehuDZ0pfpRnkdVem3IfvzlRw
 MOnnIcBf6Z2oTOP5ThCXWKIlOaCkDvxt8CtmlSv4vM772/ecC0RxR1TgizV4FYE3hjWyBW37BNPY0
 NUqWew7cq80C2p4Z8ILgHXJ4d7qxzwJ7Gi94H/eyC7eCmlPdv9o8Unes5t7pW+sSHO/HcFmgVYP8B
 b6GQTBs2n4zmXQ==;
Date: Tue, 11 Mar 2025 19:22:06 +0200
Message-Id: <867c4vbhz5.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich =?iso-8859-1?Q?M=FCller?= <ulm@HIDDEN>
In-Reply-To: <u7c4vbpjy@HIDDEN> (message from Ulrich =?iso-8859-1?Q?M?=
 =?iso-8859-1?Q?=FCller?= on Tue, 11 Mar 2025 15:38:25 +0100)
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN> <u7c4vbpjy@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Müller <ulm@HIDDEN>
> Cc: Ulrich Müller <ulm@HIDDEN>,  76924 <at> debbugs.gnu.org
> Date: Tue, 11 Mar 2025 15:38:25 +0100
> 
> >>>>> On Tue, 11 Mar 2025, Eli Zaretskii wrote:
> 
> >> Maybe the cleanest solution would be to ask pkg-config (after all,
> >> systemd must find these files), with $(prefix)/lib/systemd/user as
> >> fallback location.
> 
> > SGTM, thanks.
> 
> Sorry, I had a thinko there. Asking pkg-config isn't such a good idea.
> Imagine someone installing with prefix=/usr/local, we would then install
> the unit file in a stray location outside prefix.

Sorry, I don't understand: if prefix=/usr/local, then
$(prefix)/lib/systemd/user gives us /usr/local/lib/systemd/user, which
is what you wanted, no?  Or what did I miss?

> It is even worse for non-root installs where the dir may not even be
> writable.

For these, we could ask users to use --with-systemduserunitdir.  But
"normal" installs should not need to specify standard directories.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 11 Mar 2025 14:38:40 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 10:38:40 2025
Received: from localhost ([127.0.0.1]:44933 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1ts0kh-00039Y-U6
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 10:38:40 -0400
Received: from woodpecker.gentoo.org ([140.211.166.183]:39568
 helo=smtp.gentoo.org)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1ts0kd-000394-PC
 for 76924 <at> debbugs.gnu.org; Tue, 11 Mar 2025 10:38:36 -0400
Received: from urania (ulm2.kph.Uni-Mainz.DE [134.93.134.44])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id D778F34312C;
 Tue, 11 Mar 2025 14:38:28 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <86jz8vbruc.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 11 Mar
 2025 15:48:59 +0200")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN> <86jz8vbruc.fsf@HIDDEN>
Date: Tue, 11 Mar 2025 15:38:25 +0100
Message-ID: <u7c4vbpjy@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>>> On Tue, 11 Mar 2025, Eli Zaretskii wrote:

>> Maybe the cleanest solution would be to ask pkg-config (after all,
>> systemd must find these files), with $(prefix)/lib/systemd/user as
>> fallback location.

> SGTM, thanks.

Sorry, I had a thinko there. Asking pkg-config isn't such a good idea.
Imagine someone installing with prefix=/usr/local, we would then install
the unit file in a stray location outside prefix. It is even worse for
non-root installs where the dir may not even be writable.

So I come back to my original solution of $(prefix)/lib/systemd/user,
which just avoids "lib64" in favour of "lib".

Or we could add a configure option (like --with-systemduserunitdir),
but maybe that would be over-engineered.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 11 Mar 2025 13:49:10 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 09:49:10 2025
Received: from localhost ([127.0.0.1]:42271 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1trzyn-00007r-IS
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 09:49:09 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:33718)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1trzyl-00007Q-65
 for 76924 <at> debbugs.gnu.org; Tue, 11 Mar 2025 09:49:07 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1trzyf-00017y-LY; Tue, 11 Mar 2025 09:49:01 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=Zr98sh9HFJxZa0NmdxdFj2R043IyqYAK47qH+T1l9rs=; b=iCr2nK7wOk1277uE7j9J
 +veZiTGh4GR0oQBEIE5Z15xQPAggPil9/Rn6kXT3T2GBT0ybDZ5IvQfsiqI22ooqiRglnhmuaW+lP
 Q185EPf06QZpSfn3d4QXHaN8b7yqorsUrhaI3zgwOiMrZk2MA8RZ5OmFJidqTaRX/DM0I9YYC5FSA
 I5N0sEFCJbHOFerfu7DrpuzJ8glHYMWdzE0EG4p6oVG6foP+/fIEc08ZwgecfYRl7zxXgeg53SMpM
 YoE9vHGS7MGd0dS7/CxozgzR+uVn9AoesZF+NaxTjNs6MYBmcDRU0GGfNg619XyZVn44qc4UKTDmH
 LSLDwwDviP98RQ==;
Date: Tue, 11 Mar 2025 15:48:59 +0200
Message-Id: <86jz8vbruc.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich =?iso-8859-1?Q?M=FCller?= <ulm@HIDDEN>
In-Reply-To: <ubju7bsir@HIDDEN> (message from Ulrich =?iso-8859-1?Q?M?=
 =?iso-8859-1?Q?=FCller?= on Tue, 11 Mar 2025 14:34:20 +0100)
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
 <ubju7bsir@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Müller <ulm@HIDDEN>
> Cc: Ulrich Müller <ulm@HIDDEN>,  76924 <at> debbugs.gnu.org
> Date: Tue, 11 Mar 2025 14:34:20 +0100
> 
> > Or maybe we should use pkg-config, at least if no --prefix was
> > specified at configure time?
> 
> systemd.pc has this
> (https://github.com/systemd/systemd/blob/cd20d48c69f9e586de914e1facf33b11122477ae/src/core/systemd.pc.in#L34):
> 
>    systemd_user_unit_dir=${prefix}/lib/systemd/user
>    systemduserunitdir=${systemd_user_unit_dir}
> 
> So depending on the prefix, that would be /lib or /usr/lib (which are
> equivalent, see above).
> 
> Maybe the cleanest solution would be to ask pkg-config (after all,
> systemd must find these files), with $(prefix)/lib/systemd/user as
> fallback location.

SGTM, thanks.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 11 Mar 2025 13:34:35 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 09:34:35 2025
Received: from localhost ([127.0.0.1]:42244 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1trzkg-0007uX-TW
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 09:34:35 -0400
Received: from woodpecker.gentoo.org ([140.211.166.183]:56930
 helo=smtp.gentoo.org)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1trzkd-0007uF-Tl
 for 76924 <at> debbugs.gnu.org; Tue, 11 Mar 2025 09:34:32 -0400
Received: from urania (ulm2.kph.Uni-Mainz.DE [134.93.134.44])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id 86668343140;
 Tue, 11 Mar 2025 13:34:24 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: Eli Zaretskii <eliz@HIDDEN>
Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user
 unit file
In-Reply-To: <86jz8vdb6a.fsf@HIDDEN> (Eli Zaretskii's message of "Tue, 11 Mar
 2025 14:06:05 +0200")
References: <uecz4d8ai@HIDDEN> <86jz8vdb6a.fsf@HIDDEN>
Date: Tue, 11 Mar 2025 14:34:20 +0100
Message-ID: <ubju7bsir@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.7 (/)
X-Debbugs-Envelope-To: 76924
Cc: Ulrich =?utf-8?Q?M=C3=BCller?= <ulm@HIDDEN>, 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.7 (-)

>>>>> On Tue, 11 Mar 2025, Eli Zaretskii wrote:

> The comment there says:

>   # 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

> So this isn't a simple mistake, but a deliberate decision.  We should
> do more research before we override this.  For example: what do
> distros do with this? do they really all use what you suggest?

Gentoo removes the emacs.service file from Emacs' install image and
installs it in /usr/lib/systemd/user instead.

IIUC Debian installs system unit files in the /lib/systemd/system
directory, see https://wiki.debian.org/systemd. The article doesn't
mention user files, but the corresponding location would be
/lib/systemd/user (i.e. _not_ /lib64).

(Note that systemd no longer supports the concept of separate /lib and
/usr/lib, i.e. /lib is a symlink to /usr/lib and it doesn't matter if
the prefix is / or /usr.)

> Or maybe we should use pkg-config, at least if no --prefix was
> specified at configure time?

systemd.pc has this
(https://github.com/systemd/systemd/blob/cd20d48c69f9e586de914e1facf33b11122477ae/src/core/systemd.pc.in#L34):

   systemd_user_unit_dir=${prefix}/lib/systemd/user
   systemduserunitdir=${systemd_user_unit_dir}

So depending on the prefix, that would be /lib or /usr/lib (which are
equivalent, see above).

Maybe the cleanest solution would be to ask pkg-config (after all,
systemd must find these files), with $(prefix)/lib/systemd/user as
fallback location.




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at 76924 <at> debbugs.gnu.org:


Received: (at 76924) by debbugs.gnu.org; 11 Mar 2025 12:06:31 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Tue Mar 11 08:06:31 2025
Received: from localhost ([127.0.0.1]:42019 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1tryNP-0003ge-F0
	for submit <at> debbugs.gnu.org; Tue, 11 Mar 2025 08:06:31 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10]:45426)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <eliz@HIDDEN>) id 1tryNJ-0003gJ-5W
 for 76924 <at> debbugs.gnu.org; Tue, 11 Mar 2025 08:06:24 -0400
Received: from fencepost.gnu.org ([2001:470:142:3::e])
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <eliz@HIDDEN>)
 id 1tryN6-0005IP-Du; Tue, 11 Mar 2025 08:06:14 -0400
DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=gnu.org;
 s=fencepost-gnu-org; h=MIME-version:References:Subject:In-Reply-To:To:From:
 Date; bh=dtMkcufBYgMcJ/tQU74elJHbeO9v76y1EkzCHv+nth4=; b=X/WqyOylPKL1+tavjmTs
 dEfBmAEPm+DZnXJvWu5jM4Xj2RFWbcrSpaY8fWpbgTYUAdsZvQAOS1i38BFlCj+1GkNNKo1yTEnJU
 0wc1u19yZKIcoOv8mccx/zT0Ff5JEhy1BvvippyUt7XzamTYyXgLLPT0IWdc90/crKzMgCGsxru64
 YAiPgWKd2dVSm6B5uT8zskvWpn2izEGrRtO/RvJh08kywaRqrotAqonOmdmMzdJIj6EsN+3Ad0/De
 URieTzUpG8xHckMcpklI3cVnKUj+LLYI5tJTJ0zznCr4Nu2XNQBxVXMIW5Lzem/VI+4glBrmiGvFS
 Z+z+P5BU1uavNQ==;
Date: Tue, 11 Mar 2025 14:06:05 +0200
Message-Id: <86jz8vdb6a.fsf@HIDDEN>
From: Eli Zaretskii <eliz@HIDDEN>
To: Ulrich =?iso-8859-1?Q?M=FCller?= <ulm@HIDDEN>
In-Reply-To: <uecz4d8ai@HIDDEN> (message from Ulrich =?iso-8859-1?Q?M?=
 =?iso-8859-1?Q?=FCller?= on Mon, 10 Mar 2025 19:56:05 +0100)
Subject: Re: bug#76924: 31.0.50;
 Wrong install location for systemd user unit file
References: <uecz4d8ai@HIDDEN>
MIME-version: 1.0
Content-type: text/plain; charset=iso-8859-1
Content-Transfer-Encoding: 8bit
X-Spam-Score: -2.3 (--)
X-Debbugs-Envelope-To: 76924
Cc: 76924 <at> debbugs.gnu.org
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -3.3 (---)

> From: Ulrich Müller <ulm@HIDDEN>
> Date: Mon, 10 Mar 2025 19:56:05 +0100
> 
> The top-level Makefile.in defines systemdunitdir=$(libdir)/systemd/user
> where libdir is taken from the --libdir configure option, so typically
> it will be /usr/local/lib64 or /usr/lib64 on a 64-bit system.
> 
> This appears to be wrong, the file should be installed in a fixed "lib"
> location, not $(libdir).
> 
> Reference:
> https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#id-1.8.5
> 
> Table 2 lists these locations:
> /usr/local/lib/systemd/user	User units installed by the administrator
> /usr/lib/systemd/user	User units installed by the distribution package manager
> 
> 
> Possible solutions:
> - Install in systemdunitdir=$(prefix)/lib/systemd/user
> - Add a --with-systemduserunitdir option (this was already suggested
>   in bug #16507 message #28)

The comment there says:

  # 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

So this isn't a simple mistake, but a deliberate decision.  We should
do more research before we override this.  For example: what do
distros do with this? do they really all use what you suggest?

Or maybe we should use pkg-config, at least if no --prefix was
specified at configure time?




Information forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 10 Mar 2025 18:56:27 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Mar 10 14:56:27 2025
Received: from localhost ([127.0.0.1]:39785 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1triIc-0002pt-Sk
	for submit <at> debbugs.gnu.org; Mon, 10 Mar 2025 14:56:27 -0400
Received: from lists.gnu.org ([2001:470:142::17]:45666)
 by debbugs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.84_2) (envelope-from <ulm@HIDDEN>) id 1triIY-0002pX-Ar
 for submit <at> debbugs.gnu.org; Mon, 10 Mar 2025 14:56:24 -0400
Received: from eggs.gnu.org ([2001:470:142:3::10])
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <ulm@HIDDEN>) id 1triIS-0008TO-RG
 for bug-gnu-emacs@HIDDEN; Mon, 10 Mar 2025 14:56:16 -0400
Received: from dev.gentoo.org ([2001:470:ea4a:1:5054:ff:fec7:86e4]
 helo=smtp.gentoo.org)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_CHACHA20_POLY1305:256)
 (Exim 4.90_1) (envelope-from <ulm@HIDDEN>) id 1triIR-00022x-3E
 for bug-gnu-emacs@HIDDEN; Mon, 10 Mar 2025 14:56:16 -0400
Received: from urania (p200300cbaf30e10023bbd653dd085164.dip0.t-ipconnect.de
 [IPv6:2003:cb:af30:e100:23bb:d653:dd08:5164])
 (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)
 key-exchange ECDHE (prime256v1) server-signature RSA-PSS (4096 bits)
 server-digest SHA256) (No client certificate requested)
 (Authenticated sender: ulm)
 by smtp.gentoo.org (Postfix) with ESMTPSA id 9BC06343064;
 Mon, 10 Mar 2025 18:56:09 +0000 (UTC)
From: =?utf-8?Q?Ulrich_M=C3=BCller?= <ulm@HIDDEN>
To: bug-gnu-emacs@HIDDEN
Subject: 31.0.50; Wrong install location for systemd user unit file
Date: Mon, 10 Mar 2025 19:56:05 +0100
Message-ID: <uecz4d8ai@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13)
MIME-Version: 1.0
Content-Type: text/plain
Received-SPF: pass client-ip=2001:470:ea4a:1:5054:ff:fec7:86e4;
 envelope-from=ulm@HIDDEN; helo=smtp.gentoo.org
X-Spam_score_int: -41
X-Spam_score: -4.2
X-Spam_bar: ----
X-Spam_report: (-4.2 / 5.0 requ) BAYES_00=-1.9, RCVD_IN_DNSWL_MED=-2.3,
 SPF_HELO_PASS=-0.001, SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: 0.7 (/)
X-Debbugs-Envelope-To: submit
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -0.3 (/)

The top-level Makefile.in defines systemdunitdir=$(libdir)/systemd/user
where libdir is taken from the --libdir configure option, so typically
it will be /usr/local/lib64 or /usr/lib64 on a 64-bit system.

This appears to be wrong, the file should be installed in a fixed "lib"
location, not $(libdir).

Reference:
https://www.freedesktop.org/software/systemd/man/latest/systemd.unit.html#id-1.8.5

Table 2 lists these locations:
/usr/local/lib/systemd/user	User units installed by the administrator
/usr/lib/systemd/user	User units installed by the distribution package manager


Possible solutions:
- Install in systemdunitdir=$(prefix)/lib/systemd/user
- Add a --with-systemduserunitdir option (this was already suggested
  in bug #16507 message #28)




Acknowledgement sent to Ulrich Müller <ulm@HIDDEN>:
New bug report received and forwarded. Copy sent to bug-gnu-emacs@HIDDEN. Full text available.
Report forwarded to bug-gnu-emacs@HIDDEN:
bug#76924; Package emacs. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 14 Mar 2025 07:15:01 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.