After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 770758 - Can no longer be built on non-systemd systems
Can no longer be built on non-systemd systems
Status: RESOLVED NOTABUG
Product: gnome-user-share
Classification: Core
Component: general
3.18.x
Other Linux
: Normal normal
: ---
Assigned To: gnome-user-share maintainers
gnome-user-share maintainers
Depends on:
Blocks:
 
 
Reported: 2016-09-02 14:44 UTC by Michael Biebl
Modified: 2016-09-05 14:19 UTC
See Also:
GNOME target: 3.22
GNOME version: ---


Attachments
build: Don't install systemd user unit files if target directory is not set (2.13 KB, patch)
2016-09-02 15:11 UTC, Michael Biebl
none Details | Review

Description Michael Biebl 2016-09-02 14:44:58 UTC
The addition of systemd user service files is a welcome change.
But adding

PKG_CHECK_EXISTS (systemd,, AC_MSG_ERROR ([systemd development headers not found]))

makes the package non-buildable on non-systemd systems.

There are two ways to solve this:

We add a fallback in case the systemd.pc file is not found (like e.g. dbus [1] does), or we add a
AM_CONDITIONAL(HAVE_SYSTEMD,...) and install the user unit files only if systemduserunitdir is not empty.

Let me know which approach you prefer and I'll prep a patch accordingly.


[1]  https://cgit.freedesktop.org/dbus/dbus/tree/configure.ac#n1554
Comment 1 Michael Biebl 2016-09-02 14:57:23 UTC
As an additional not, the addition of
PKG_CHECK_EXISTS([systemd],, [AC_MSG_ERROR([systemd development headers not found])])

doesn't actually ensure that systemduserunitdir will always be set, as the user can just run --without-systemduserunitdir.
Comment 2 Michael Biebl 2016-09-02 15:11:37 UTC
Created attachment 334655 [details] [review]
build: Don't install systemd user unit files if target  directory is not set

I've decided to conditionally install the systemd user units as this seems the proper fix.
Comment 3 Bastien Nocera 2016-09-05 10:10:24 UTC
gnome-user-share is only ever started by gnome-settings-daemon's "sharing" plugin. Said plugin now uses "systemd --user" to start the daemons it handles. Therefore, gnome-user-share will need systemd. Whether it's at build time or run time is academic.
Comment 4 Michael Biebl 2016-09-05 12:09:12 UTC
As a side note: The nautilus extension should be probably be guarded with a AM_CONDITIONAL as well.

Atm, if libnautilus-extension.pc is missing, we build the extension but install it into the wrong path.
Comment 5 Bastien Nocera 2016-09-05 12:42:15 UTC
(In reply to Michael Biebl from comment #4)
> As a side note: The nautilus extension should be probably be guarded with a
> AM_CONDITIONAL as well.
> 
> Atm, if libnautilus-extension.pc is missing, we build the extension but
> install it into the wrong path.

No, because the PKG_CHECK_MODULES() call will fail if libnautilus-extension isn't present.