Debian Bug report logs - #764678
dh-systemd: Please support systemd user services

version graph

Package: debhelper; Maintainer for debhelper is Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>; Source for debhelper is src:debhelper (PTS, buildd, popcon).

Affects: pulseaudio, dirmngr, gnupg-agent

Reported by: Michael Vogt <mvo@debian.org>

Date: Fri, 10 Oct 2014 07:42:02 UTC

Severity: wishlist

Found in version debhelper/9.20160709

Reply or subscribe to this bug.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, pkg-systemd-maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>:
Bug#764678; Package dh-systemd. (Fri, 10 Oct 2014 07:42:06 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Vogt <mvo@debian.org>:
New Bug report received and forwarded. Copy sent to pkg-systemd-maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>. (Fri, 10 Oct 2014 07:42:06 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Michael Vogt <mvo@debian.org>
To: Debian Bug Tracking System <submit@bugs.debian.org>
Subject: dh-systemd: Please support systemd user services
Date: Fri, 10 Oct 2014 09:30:07 +0200
Package: dh-systemd
Severity: wishlist

It would be very nice if dh-systemd would support systemd user
units (both for detecting them during build time and to add
something like "systemctl --global enable my-user-unit" to the
debian/postinst).

My use case is that the package installs a unit that
should run at login time for all users. In the past this was 
done via the upstart session support. 

If you agree with the general idea I can help and work on a
patch.

Thanks,
 Michael



Information forwarded to debian-bugs-dist@lists.debian.org, Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>:
Bug#764678; Package dh-systemd. (Tue, 28 Jun 2016 22:15:03 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Kahn Gillmor <dkg@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>. (Tue, 28 Jun 2016 22:15:03 GMT) (full text, mbox, link).


Message #10 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Daniel Kahn Gillmor <dkg@debian.org>
To: Michael Vogt <mvo@debian.org>, 764678@bugs.debian.org
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Tue, 28 Jun 2016 18:11:14 -0400
[Message part 1 (text/plain, inline)]
On Fri 2014-10-10 03:30:07 -0400, Michael Vogt <mvo@debian.org> wrote:
> It would be very nice if dh-systemd would support systemd user
> units (both for detecting them during build time and to add
> something like "systemctl --global enable my-user-unit" to the
> debian/postinst).
>
> My use case is that the package installs a unit that
> should run at login time for all users. In the past this was 
> done via the upstart session support. 

fwiw, i'd like to see this capability for dh-systemd as well.

One alternative available now is to have the package manually ship a
symlink in /etc/systemd/user/default.target.wants/$PKGNAME.service
(pointing to /usr/lib/systemd/user/$PKGNAME.service, assuming the user
service wants to be installed in default.target), but shipping this
symlink as a config file seems a little bit strange, and wouldn't be
safely undoable by "systemctl --global disable my-user-unit" (it'd just
get re-added on upgrade, i think).

It'd be nice to have something more generalized, which can be safely and
cleanly overridden by both the admin and by individual users.

        --dkg
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>:
Bug#764678; Package dh-systemd. (Tue, 28 Jun 2016 23:42:03 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Biebl <biebl@debian.org>:
Extra info received and forwarded to list. Copy sent to Debian systemd Maintainers <pkg-systemd-maintainers@lists.alioth.debian.org>. (Tue, 28 Jun 2016 23:42:04 GMT) (full text, mbox, link).


Message #15 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Michael Biebl <biebl@debian.org>
To: Daniel Kahn Gillmor <dkg@debian.org>, 764678@bugs.debian.org
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Wed, 29 Jun 2016 01:39:26 +0200
[Message part 1 (text/plain, inline)]
Am 29.06.2016 um 00:11 schrieb Daniel Kahn Gillmor:
> On Fri 2014-10-10 03:30:07 -0400, Michael Vogt <mvo@debian.org> wrote:
>> It would be very nice if dh-systemd would support systemd user
>> units (both for detecting them during build time and to add
>> something like "systemctl --global enable my-user-unit" to the
>> debian/postinst).
>>
>> My use case is that the package installs a unit that
>> should run at login time for all users. In the past this was 
>> done via the upstart session support. 
> 
> fwiw, i'd like to see this capability for dh-systemd as well.
> 
> One alternative available now is to have the package manually ship a
> symlink in /etc/systemd/user/default.target.wants/$PKGNAME.service
> (pointing to /usr/lib/systemd/user/$PKGNAME.service, assuming the user

Shipping a static symlink in /etc is ugly, I would recommend against
doing that.

Daniel, which service do you have in mind which already requires a
systemd user session and systemd user services?


-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

[signature.asc (application/pgp-signature, attachment)]

Bug reassigned from package 'dh-systemd' to 'debhelper'. Request was from Michael Biebl <biebl@debian.org> to control@bugs.debian.org. (Mon, 11 Jul 2016 17:33:33 GMT) (full text, mbox, link).


Marked as found in versions debhelper/9.20160709. Request was from Michael Biebl <biebl@debian.org> to control@bugs.debian.org. (Mon, 11 Jul 2016 17:33:34 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#764678; Package debhelper. (Fri, 05 Aug 2016 16:57:08 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Kahn Gillmor <dkg@debian.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Fri, 05 Aug 2016 16:57:08 GMT) (full text, mbox, link).


Message #24 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Daniel Kahn Gillmor <dkg@debian.org>
To: Michael Biebl <biebl@debian.org>, 764678@bugs.debian.org
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Fri, 05 Aug 2016 12:38:58 -0400
[Message part 1 (text/plain, inline)]
On Tue 2016-06-28 19:39:26 -0400, Michael Biebl wrote:
> Am 29.06.2016 um 00:11 schrieb Daniel Kahn Gillmor:
>> On Fri 2014-10-10 03:30:07 -0400, Michael Vogt <mvo@debian.org> wrote:
>>> It would be very nice if dh-systemd would support systemd user
>>> units (both for detecting them during build time and to add
>>> something like "systemctl --global enable my-user-unit" to the
>>> debian/postinst).
>>>
>>> My use case is that the package installs a unit that
>>> should run at login time for all users. In the past this was 
>>> done via the upstart session support. 
>> 
>> fwiw, i'd like to see this capability for dh-systemd as well.
>> 
>> One alternative available now is to have the package manually ship a
>> symlink in /etc/systemd/user/default.target.wants/$PKGNAME.service
>> (pointing to /usr/lib/systemd/user/$PKGNAME.service, assuming the user
>
> Shipping a static symlink in /etc is ugly, I would recommend against
> doing that.
>
> Daniel, which service do you have in mind which already requires a
> systemd user session and systemd user services?

i'm looking at this for the gnupg-agent and dirmngr packages
(gpg-agent.service and dirmngr.service), which are currently generated
From the gnupg2 source package in experimental.

Regards,

        --dkg
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#764678; Package debhelper. (Wed, 10 Aug 2016 05:57:08 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Kahn Gillmor <dkg@debian.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Wed, 10 Aug 2016 05:57:08 GMT) (full text, mbox, link).


Message #29 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Daniel Kahn Gillmor <dkg@debian.org>
To: 764678@bugs.debian.org, Michael Biebl <biebl@debian.org>
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Wed, 10 Aug 2016 01:50:58 -0400
[Message part 1 (text/plain, inline)]
Control: affects 764678 + dirmngr gnupg-agent pulseaudio

On Fri 2016-08-05 12:38:58 -0400, Daniel Kahn Gillmor wrote:
> On Tue 2016-06-28 19:39:26 -0400, Michael Biebl wrote:
>> Daniel, which service do you have in mind which already requires a
>> systemd user session and systemd user services?
>
> i'm looking at this for the gnupg-agent and dirmngr packages
> (gpg-agent.service and dirmngr.service), which are currently generated
> From the gnupg2 source package in experimental.

fwiw, i think that the pulseaudio user service would also be a good idea
to enable automatically.

Currently, on a testing system with a stock gnome-core 1:3.20+1
installed, without the pulseaudio user service being enabled, a user
session will persist up to 20 seconds after logout is complete, waiting
on "/usr/bin/pulseaudio --start --log-target=syslog" to terminate.

the 20 seconds comes from pulse's "--exit-idle-time" default:

 https://sources.debian.net/src/pulseaudio/8.0-2/src/daemon/daemon-conf.c/?hl=72#L61

if the user does:

 systemctl --user enable pulseaudio

and then logs out, waits at least 20 seconds, and logs back in again,
then her new pulse server will be managed by the systemd user services
(user@NNNN.service in the cgroup hierarchy shown by "systemctl status")
instead of in the specific login session (session-N.scope).

Subsequent logouts no longer wait for pulseaudio to terminate.

On machines running systemd, a user service seems like a cleaner way to
supervise pulseaudio.

           --dkg
[signature.asc (application/pgp-signature, inline)]

Added indication that 764678 affects dirmngr, gnupg-agent, and pulseaudio Request was from Daniel Kahn Gillmor <dkg@debian.org> to 764678-submit@bugs.debian.org. (Wed, 10 Aug 2016 05:57:08 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#764678; Package debhelper. (Mon, 31 Oct 2016 19:51:05 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Kahn Gillmor <dkg@debian.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Mon, 31 Oct 2016 19:51:05 GMT) (full text, mbox, link).


Message #36 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Daniel Kahn Gillmor <dkg@debian.org>
To: 764678@bugs.debian.org, Michael Biebl <biebl@debian.org>
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Mon, 31 Oct 2016 15:49:29 -0400
[Message part 1 (text/plain, inline)]
On Wed 2016-08-10 01:50:58 -0400, Daniel Kahn Gillmor wrote:
> Control: affects 764678 + dirmngr gnupg-agent pulseaudio
>
> On Fri 2016-08-05 12:38:58 -0400, Daniel Kahn Gillmor wrote:
>> On Tue 2016-06-28 19:39:26 -0400, Michael Biebl wrote:
>>> Daniel, which service do you have in mind which already requires a
>>> systemd user session and systemd user services?
>>
>> i'm looking at this for the gnupg-agent and dirmngr packages
>> (gpg-agent.service and dirmngr.service), which are currently generated
>> From the gnupg2 source package in experimental.
>
> fwiw, i think that the pulseaudio user service would also be a good idea
> to enable automatically.

Is there any word on this?  GnuPG upstream has now merged patches to
support socket-activation of dirmngr and gpg-agent, and gnupg2 version
2.1.15-8 has .service and .socket files for managing nice clean
user-level services.

I don't plan on enabling them globally right away (i'd love to hear more
feedback from users who have enabled them manually), but i'd really like
to be *able* to enable them in the package if we decide that makes
sense.

In the event that globally-enabling seems warranted, if there is no
explicit support by dh-systemd or any better alternatives, i'm likely to
resort to shipping symlinks in /etc/systemd/user/ :/ any other
suggestions?

      --dkg
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#764678; Package debhelper. (Wed, 23 Nov 2016 15:03:02 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Kahn Gillmor <dkg@debian.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Wed, 23 Nov 2016 15:03:02 GMT) (full text, mbox, link).


Message #41 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Daniel Kahn Gillmor <dkg@debian.org>
To: 764678@bugs.debian.org, Michael Biebl <biebl@debian.org>
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Wed, 23 Nov 2016 10:00:14 -0500
[Message part 1 (text/plain, inline)]
On Mon 2016-10-31 15:49:29 -0400, Daniel Kahn Gillmor wrote:
> Is there any word on this?  GnuPG upstream has now merged patches to
> support socket-activation of dirmngr and gpg-agent, and gnupg2 version
> 2.1.15-8 has .service and .socket files for managing nice clean
> user-level services.
>
> I don't plan on enabling them globally right away (i'd love to hear more
> feedback from users who have enabled them manually), but i'd really like
> to be *able* to enable them in the package if we decide that makes
> sense.
>
> In the event that globally-enabling seems warranted, if there is no
> explicit support by dh-systemd or any better alternatives, i'm likely to
> resort to shipping symlinks in /etc/systemd/user/ :/ any other
> suggestions?

Sorry to nag about this, but is there any alternative to my just
shipping symlinks?

         --dkg
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#764678; Package debhelper. (Thu, 24 Nov 2016 16:39:05 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Biebl <biebl@debian.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Thu, 24 Nov 2016 16:39:05 GMT) (full text, mbox, link).


Message #46 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Michael Biebl <biebl@debian.org>
To: Daniel Kahn Gillmor <dkg@debian.org>, 764678@bugs.debian.org
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Thu, 24 Nov 2016 17:35:58 +0100
[Message part 1 (text/plain, inline)]
Am 23.11.2016 um 16:00 schrieb Daniel Kahn Gillmor:
> On Mon 2016-10-31 15:49:29 -0400, Daniel Kahn Gillmor wrote:
>> Is there any word on this?  GnuPG upstream has now merged patches to
>> support socket-activation of dirmngr and gpg-agent, and gnupg2 version
>> 2.1.15-8 has .service and .socket files for managing nice clean
>> user-level services.
>>
>> I don't plan on enabling them globally right away (i'd love to hear more
>> feedback from users who have enabled them manually), but i'd really like
>> to be *able* to enable them in the package if we decide that makes
>> sense.
>>
>> In the event that globally-enabling seems warranted, if there is no
>> explicit support by dh-systemd or any better alternatives, i'm likely to
>> resort to shipping symlinks in /etc/systemd/user/ :/ any other
>> suggestions?
> 
> Sorry to nag about this, but is there any alternative to my just
> shipping symlinks?

Are those user services supposed to be enabled by default?
If so, I'd just ship the symlinks in the package for now.

See for example dbus-user-session, which ships

/usr/lib/systemd/user/dbus.service
/usr/lib/systemd/user/dbus.socket
and
/usr/lib/systemd/user/sockets.target.wants/dbus.socket


Sorry I don't have a better answer atm.

Regards,
Michael
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#764678; Package debhelper. (Wed, 21 Dec 2016 08:51:03 GMT) (full text, mbox, link).


Acknowledgement sent to Michael Biebl <biebl@debian.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Wed, 21 Dec 2016 08:51:03 GMT) (full text, mbox, link).


Message #51 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Michael Biebl <biebl@debian.org>
To: Daniel Kahn Gillmor <dkg@debian.org>, 764678@bugs.debian.org
Cc: Julien Cristau <jcristau@debian.org>
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Wed, 21 Dec 2016 09:49:08 +0100
[Message part 1 (text/plain, inline)]
Am 24.11.2016 um 17:35 schrieb Michael Biebl:
> Am 23.11.2016 um 16:00 schrieb Daniel Kahn Gillmor:
>> On Mon 2016-10-31 15:49:29 -0400, Daniel Kahn Gillmor wrote:

>> Sorry to nag about this, but is there any alternative to my just
>> shipping symlinks?
> 
> Are those user services supposed to be enabled by default?
> If so, I'd just ship the symlinks in the package for now.
> 
> See for example dbus-user-session, which ships
> 
> /usr/lib/systemd/user/dbus.service
> /usr/lib/systemd/user/dbus.socket
> and
> /usr/lib/systemd/user/sockets.target.wants/dbus.socket

My earlier comment [1], that shipping the symlink in the package is
ugly, was specifically meant for doing it in /etc.
Shipping the symlinks in /usr/lib/systemd/user/foo.wants/ is imho an
acceptable solution for stretch, i.e.
/usr/lib/systemd/user/sockets.target.wants/gpg-agent.socket

I'm not sure if gpg-agent-ssh.socket and gpg-agent-extra.socket should
be enabled by default. Those look like they should be enabled on a
per-user basis and default to off?

In buster we should definitely add proper support for user services to
i-s-h and dh-systemd. For stretch this is too late and not going to
happen (anymore). Sorry about that.

Regards,
Michael


[1] https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764678#15
-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

[signature.asc (application/pgp-signature, attachment)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>:
Bug#764678; Package debhelper. (Tue, 10 Jan 2017 23:15:06 GMT) (full text, mbox, link).


Acknowledgement sent to Daniel Kahn Gillmor <dkg@debian.org>:
Extra info received and forwarded to list. Copy sent to Debhelper Maintainers <debhelper-devel@lists.alioth.debian.org>. (Tue, 10 Jan 2017 23:15:06 GMT) (full text, mbox, link).


Message #56 received at 764678@bugs.debian.org (full text, mbox, reply):

From: Daniel Kahn Gillmor <dkg@debian.org>
To: Michael Biebl <biebl@debian.org>, 764678@bugs.debian.org
Cc: Julien Cristau <jcristau@debian.org>
Subject: Re: Bug#764678: dh-systemd: Please support systemd user services
Date: Tue, 10 Jan 2017 17:34:43 -0500
[Message part 1 (text/plain, inline)]
On Wed 2016-12-21 03:49:08 -0500, Michael Biebl wrote:
> My earlier comment [1], that shipping the symlink in the package is
> ugly, was specifically meant for doing it in /etc.
> Shipping the symlinks in /usr/lib/systemd/user/foo.wants/ is imho an
> acceptable solution for stretch, i.e.
> /usr/lib/systemd/user/sockets.target.wants/gpg-agent.socket

yeah, i think we should be enabling the socket units but not the
.service units.

> I'm not sure if gpg-agent-ssh.socket and gpg-agent-extra.socket should
> be enabled by default. Those look like they should be enabled on a
> per-user basis and default to off?

in upstream gpg they default to being on anyway (as of 2.1.15, iirc), so
i'm going to ship them enabled, i think.

> In buster we should definitely add proper support for user services to
> i-s-h and dh-systemd. For stretch this is too late and not going to
> happen (anymore). Sorry about that.

no worries, and thanks for the followup!

   --dkg
[signature.asc (application/pgp-signature, inline)]

Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Wed Jan 10 16:54:20 2018; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.