Bug 61127 - Improve configure check for systemd
Summary: Improve configure check for systemd
Status: RESOLVED FIXED
Alias: None
Product: PolicyKit
Classification: Unclassified
Component: daemon (show other bugs)
Version: unspecified
Hardware: Other All
: medium normal
Assignee: David Zeuthen (not reading bugmail)
QA Contact: David Zeuthen (not reading bugmail)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-02-19 16:36 UTC by Giovanni Campagna
Modified: 2013-04-11 17:18 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
build: try harder to avoid systemd/consolekit misconfiguration (1.55 KB, patch)
2013-02-19 16:36 UTC, Giovanni Campagna
Details | Splinter Review
build: try harder to avoid systemd/consolekit misconfiguration (1.64 KB, patch)
2013-03-16 13:25 UTC, Giovanni Campagna
Details | Splinter Review

Description Giovanni Campagna 2013-02-19 16:36:20 UTC
Created attachment 75121 [details] [review]
build: try harder to avoid systemd/consolekit misconfiguration

See patch
Comment 1 Colin Walters 2013-03-13 19:14:52 UTC
Comment on attachment 75121 [details] [review]
build: try harder to avoid systemd/consolekit misconfiguration

Review of attachment 75121 [details] [review]:
-----------------------------------------------------------------

::: configure.ac
@@ +175,4 @@
>    fi
>  fi
>  
> +if test "$have_libsystemd_login" = "yes"; then

These need to be AS_IF().  See https://bugzilla.gnome.org/show_bug.cgi?id=681413

Furthermore, I'd wrap this whole check inside:

AS_IF([test x$cross_compiling != x], [
 ...
])

@@ +179,5 @@
> +  if test ! -d /sys/fs/cgroup/systemd/ ; then
> +    if test "$enable_libsystemd_login" = "yes"; then
> +      AC_MSG_WARN([libsystemd-login requested but system does not appear to be using systemd])
> +    else
> +      AC_MSG_ERROR([libsystemd-login autoconfigured, but system does not appear to use systemd])

This will actually break the gnome-ostree build system which isn't specifying --enable-systemd-login right now, but also doesn't have systemd actually *running* in the buildroot.

I'll fix that now though as a defensive measure.
Comment 2 Giovanni Campagna 2013-03-16 13:25:26 UTC
Created attachment 76607 [details] [review]
build: try harder to avoid systemd/consolekit misconfiguration
Comment 3 Colin Walters 2013-04-11 17:18:51 UTC
(In reply to comment #2)
> Created attachment 76607 [details] [review] [review]
> build: try harder to avoid systemd/consolekit misconfiguration

There was a typo and logic error in the cross compiling detection; since it's either "yes" or "no", we need to if != "yes".  Fixed and pushed to master, thanks!


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.