summaryrefslogtreecommitdiff
path: root/pcr/accountsservice-elogind/accountsservice-enable-elogind.patch
diff options
context:
space:
mode:
authorOmar Vega Ramos <ovruni@gnu.org.pe>2017-03-17 09:51:25 -0500
committerOmar Vega Ramos <ovruni@gnu.org.pe>2017-03-17 09:51:25 -0500
commit378b238c202e8034ae80e7335b537e8806ce6891 (patch)
tree88bd86c8a8b7cb43a514105367804ff0959230cf /pcr/accountsservice-elogind/accountsservice-enable-elogind.patch
parent84b120a57fd378584de559413c6f921d937cee52 (diff)
downloadabslibre-378b238c202e8034ae80e7335b537e8806ce6891.tar.gz
abslibre-378b238c202e8034ae80e7335b537e8806ce6891.tar.bz2
abslibre-378b238c202e8034ae80e7335b537e8806ce6891.zip
accountsservice-elogind: add new package to [pcr]
Diffstat (limited to 'pcr/accountsservice-elogind/accountsservice-enable-elogind.patch')
-rw-r--r--pcr/accountsservice-elogind/accountsservice-enable-elogind.patch82
1 files changed, 82 insertions, 0 deletions
diff --git a/pcr/accountsservice-elogind/accountsservice-enable-elogind.patch b/pcr/accountsservice-elogind/accountsservice-enable-elogind.patch
new file mode 100644
index 000000000..5c3a95072
--- /dev/null
+++ b/pcr/accountsservice-elogind/accountsservice-enable-elogind.patch
@@ -0,0 +1,82 @@
+--- a/configure.ac 2017-01-10 14:41:49.303134338 +0100
++++ b/configure.ac 2017-01-10 14:49:17.627133630 +0100
+@@ -264,6 +264,49 @@
+ dnl ---------------------------------------------------------------------------
+ AC_PATH_PROG([XSLTPROC], [xsltproc])
+
++# elogind
++
++AC_ARG_ENABLE([elogind],
++ AS_HELP_STRING([--enable-elogind], [Use elogind]),
++ [enable_elogind=$enableval],
++ [enable_elogind=auto])
++
++if test "x$enable_elogind" != "xno"; then
++ PKG_CHECK_MODULES(ELOGIND, [libelogind >= 219],
++ [have_elogind=yes],
++ [have_elogind=no])
++else
++ have_elogind=no
++fi
++
++AC_MSG_CHECKING([whether to use elogind])
++
++if test "x$enable_elogind" = "xauto" ; then
++ if test "x$have_elogind" = "xno" ; then
++ enable_elogind=no
++ else
++ enable_elogind=yes
++ fi
++fi
++
++AC_MSG_RESULT($enable_elogind)
++
++if test "x$enable_elogind" = "xyes"; then
++ if test "x$have_elogind" = "xno"; then
++ AC_MSG_ERROR([elogind support explicitly required, but libelogind not found])
++ fi
++fi
++AC_SUBST(ELOGIND_CFLAGS)
++AC_SUBST(ELOGIND_LIBS)
++
++LIBACCOUNTSSERVICE_LIBS="$LIBACCOUNTSSERVICE_LIBS $ELOGIND_LIBS"
++LIBACCOUNTSSERVICE_CFLAGS="$LIBACCOUNTSSERVICE_CFLAGS $ELOGIND_CFLAGS"
++
++if test "x$have_elogind" != "xno" ; then
++ AC_DEFINE(WITH_ELOGIND, 1, [Define to enable elogind support])
++fi
++
++
+ # systemd
+
+ AC_ARG_ENABLE([systemd],
+@@ -272,8 +315,14 @@
+ [enable_systemd=auto])
+
+ if test x$enable_systemd != xno; then
++ if test "x$have_elogind" != "xno"; then
++ AC_MSG_NOTICE([Systemd support requested, but elogind found])
++ have_systemd=no
++ enable_systemd=no
++ else
+ PKG_CHECK_MODULES(SYSTEMD, [libsystemd >= 186],
+ [have_systemd=yes], [have_systemd=no])
++ fi
+ else
+ have_systemd=no
+ fi
+--- a/src/libaccountsservice/act-user-manager.c 2016-11-08 09:11:28.489353842 +0100
++++ b/src/libaccountsservice/act-user-manager.c 2016-11-08 09:18:47.768357775 +0100
+@@ -42,7 +42,12 @@
+ #include <gio/gunixinputstream.h>
+
+ #ifdef WITH_SYSTEMD
+ #include <systemd/sd-login.h>
++#else
++#ifdef WITH_ELOGIND
++#include <elogind/sd-login.h>
++#define WITH_SYSTEMD 1 /* Do not clutter the sources */
++#endif /* check against elogind substitution
+
+ /* check if logind is running */
+ #define LOGIND_RUNNING() (access("/run/systemd/seats/", F_OK) >= 0)