Subject: Re: bug#76924: 31.0.50; Wrong install location for systemd user unit file

From: Eli Zaretskii <[email-masked]>
Date: Wed, 12 Mar 2025 18:53:47 +0200

> From: Ulrich Müller <[email-masked]>
> Cc: Ulrich Müller <[email-masked]>,  [email-masked],
>   [email-masked]
> 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?