[pulseaudio-discuss] [PATCH 6/8] launch: Add systemd units for launching pulseaudio user instances

Tanu Kaskinen tanu.kaskinen at linux.intel.com
Mon Nov 10 08:29:16 PST 2014


On Mon, 2014-11-10 at 16:13 +0000, Colin Guthrie wrote:
> Tanu Kaskinen wrote on 10/11/14 15:49:
> > Hi Colin,
> > 
> > While I was adding systemd .service and .socket files for the system
> > mode in Tizen, I noticed something in configure.ac that I didn't pay
> > attention to before...
> > 
> > On Mon, 2014-11-03 at 09:42 +0000, Colin Guthrie wrote:
> >> ---
> >>  configure.ac                                  | 11 +++++++++++
> >>  src/Makefile.am                               | 12 +++++++++++-
> >>  src/daemon/systemd/user/pulseaudio.service.in | 10 ++++++++++
> >>  src/daemon/systemd/user/pulseaudio.socket     | 10 ++++++++++
> >>  4 files changed, 42 insertions(+), 1 deletion(-)
> >>  create mode 100644 src/daemon/systemd/user/pulseaudio.service.in
> >>  create mode 100644 src/daemon/systemd/user/pulseaudio.socket
> >>
> >> diff --git a/configure.ac b/configure.ac
> >> index 25cb207..23905ad 100644
> >> --- a/configure.ac
> >> +++ b/configure.ac
> >> @@ -1203,6 +1203,13 @@ AS_IF([test "x$HAVE_SYSTEMD" = "x1"],
> >>          HAVE_SYSTEMD_JOURNAL=1
> >>      ])
> >>  
> >> +AC_ARG_WITH([systemduserunitdir],
> >> +        AS_HELP_STRING([--with-systemduserunitdir=DIR], [Directory for systemd user service files]),
> >> +        [], [with_systemduserunitdir=$($PKG_CONFIG --variable=systemduserunitdir systemd)])
> >> +if test "x$with_systemduserunitdir" != xno; then
> >> +        AC_SUBST([systemduserunitdir], [$with_systemduserunitdir])
> >> +fi
> > 
> > Is it really a good idea to use pkg-config to get the unit directory?
> > pkg-config will probably return /usr/lib/systemd/system, while we should
> > by default install under /usr/local to avoid overwriting distro files.
> 
> It'll usually say /usr/lib/systemd/user (not system) but yes, this is
> pretty much the same as the udevrules dir.
> 
> Installing into /usr/local/ would be pretty weird tho' as they just
> wouldn't work there (which would be especially odd if you didn't have a
> system-installed version of PA). This is the same logic with the
> udevrulesdir I guess.
> 
> So I'd say that using pkgconfig to get the value is just as sensible as
> the hard-coded /lib/udev/rules.d/ stuff that's in there currently.

Are you sure installing to /usr/local/lib/systemd/user doesn't work? To
me path-lookup.c looks like it includes /usr/local/lib/systemd/user in
the unit search paths.

-- 
Tanu



More information about the pulseaudio-discuss mailing list