diff options
author | Sven Eden <sven.eden@gmx.de> | 2017-02-24 15:45:27 +0100 |
---|---|---|
committer | Sven Eden <sven.eden@gmx.de> | 2017-02-24 15:45:27 +0100 |
commit | 4e85fa4b4db934eb17c5be45ee91f1d89162e2fe (patch) | |
tree | 8296004ec932853e544c7172ac2557b0ab4fdc23 /net-misc | |
parent | sys-process/procps: Fixed Manifest (diff) | |
download | seden-4e85fa4b4db934eb17c5be45ee91f1d89162e2fe.tar.gz seden-4e85fa4b4db934eb17c5be45ee91f1d89162e2fe.tar.bz2 seden-4e85fa4b4db934eb17c5be45ee91f1d89162e2fe.zip |
net-misc/networkmanager
The patch to enable elogind was accepted. It was further enhanced by
Thomas Haller with the following commit:
From c0d9243e7ebdb6efd5c3e866b03a28cd91b08c83 Mon Sep 17 00:00:00 2001
From: Thomas Haller <thaller@redhat.com>
Date: Fri, 24 Feb 2017 12:58:55 +0100
Subject: session: make systemd-logind and elogind conflicting build options
This commit has been added to
files/networkmanager-1.4.4-enable-elogind-r1.patch
for usage until the next release of NetworkManager.
Diffstat (limited to 'net-misc')
-rw-r--r-- | net-misc/networkmanager/files/networkmanager-1.4.4-enable-elogind-r1.patch (renamed from net-misc/networkmanager/files/networkmanager-1.4.4-enable-elogind.patch) | 109 | ||||
-rw-r--r-- | net-misc/networkmanager/networkmanager-1.4.4-r14.ebuild (renamed from net-misc/networkmanager/networkmanager-1.4.4-r13.ebuild) | 2 |
2 files changed, 62 insertions, 49 deletions
diff --git a/net-misc/networkmanager/files/networkmanager-1.4.4-enable-elogind.patch b/net-misc/networkmanager/files/networkmanager-1.4.4-enable-elogind-r1.patch index c7fc131..29d4742 100644 --- a/net-misc/networkmanager/files/networkmanager-1.4.4-enable-elogind.patch +++ b/net-misc/networkmanager/files/networkmanager-1.4.4-enable-elogind-r1.patch @@ -1,27 +1,27 @@ ---- a/config.h.in 2017-02-14 09:53:41.124245372 +0100 -+++ b/config.h.in 2017-02-14 09:59:04.886255092 +0100 -@@ -207,6 +207,9 @@ - /* Define to 1 if libsystemd-login is available */ - #undef SESSION_TRACKING_SYSTEMD +--- a/config.h.in 2017-02-24 15:32:43.030370913 +0100 ++++ b/config.h.in 2017-02-24 15:33:38.122369926 +0100 +@@ -204,6 +204,9 @@ + /* Define to 1 if ConsoleKit is available */ + #undef SESSION_TRACKING_CONSOLEKIT +/* Define to 1 if libelogin is available */ +#undef SESSION_TRACKING_ELOGIND + - /* The size of `dev_t', as computed by sizeof. */ - #undef SIZEOF_DEV_T + /* Define to 1 if libsystemd-login is available */ + #undef SESSION_TRACKING_SYSTEMD -@@ -219,6 +222,9 @@ - /* Define to 1 to use systemd suspend api */ - #undef SUSPEND_RESUME_SYSTEMD +@@ -216,6 +219,9 @@ + /* Define to 1 to use ConsoleKit2 suspend api */ + #undef SUSPEND_RESUME_CONSOLEKIT +/* Define to 1 to use elogind suspend api */ +#undef SUSPEND_RESUME_ELOGIND + - /* Define to 1 to use UPower suspend api */ - #undef SUSPEND_RESUME_UPOWER + /* Define to 1 to use systemd suspend api */ + #undef SUSPEND_RESUME_SYSTEMD ---- a/configure.ac 2017-02-14 09:28:51.529200651 +0100 -+++ b/configure.ac 2017-02-14 09:48:25.376235892 +0100 +--- a/configure.ac 2017-02-24 15:32:55.321370693 +0100 ++++ b/configure.ac 2017-02-24 15:34:13.635369290 +0100 @@ -426,14 +426,15 @@ [Support systemd session tracking])) AC_ARG_WITH(consolekit, AS_HELP_STRING([--with-consolekit=yes|no], @@ -44,12 +44,15 @@ # current options AS_IF([test -n "$with_systemd_logind" ], [use_systemd_logind="$with_systemd_logind"]) AS_IF([test -n "$with_consolekit" ], [use_consolekit="$with_consolekit"]) -@@ -454,6 +455,20 @@ +@@ -454,6 +455,23 @@ AC_DEFINE([SESSION_TRACKING_SYSTEMD], 1, [Define to 1 if libsystemd-login is available]) session_tracking="$session_tracking, systemd-logind" fi + -+if test "$use_elogind" = "yes" -o "$use_elogind" = "auto"; then ++if test "$use_elogind" = "yes" -a "$have_systemd_logind" = "yes"; then ++ AC_MSG_ERROR([Cannot enable systemd-logind together with elogind.]) ++fi ++if test "$use_elogind" = "yes"; then + PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libelogind], [have_elogind=yes], [PKG_CHECK_MODULES(SYSTEMD_LOGIN, [libelogind], [have_elogind=yes], [have_elogind=no])]) +else + have_elogind=no @@ -65,7 +68,7 @@ if test "$use_consolekit" = "yes"; then AC_DEFINE([SESSION_TRACKING_CONSOLEKIT], 1, [Define to 1 if ConsoleKit is available]) AC_DEFINE([CKDB_PATH], "/var/run/ConsoleKit/database", [Path to ConsoleKit database]) -@@ -461,7 +476,7 @@ +@@ -461,7 +479,7 @@ fi session_tracking="$(printf '%s' "${session_tracking}" | sed 's/^, //')" @@ -74,7 +77,7 @@ if test "z$with_suspend_resume" = "z"; then PKG_CHECK_EXISTS([libsystemd >= 209], [have_systemd_inhibit=yes], [PKG_CHECK_EXISTS([libsystemd-login >= 183], [have_systemd_inhibit=yes], [have_systemd_inhibit=no])]) -@@ -469,6 +484,12 @@ +@@ -469,6 +487,12 @@ # Use systemd if it's new enough with_suspend_resume="systemd" else @@ -87,7 +90,7 @@ if test "$use_consolekit" = "yes"; then # Use consolekit suspend if session tracking is consolekit with_suspend_resume="consolekit" -@@ -478,6 +499,7 @@ +@@ -478,6 +502,7 @@ fi fi fi @@ -95,7 +98,7 @@ case $with_suspend_resume in upower) -@@ -488,11 +510,16 @@ +@@ -488,11 +513,16 @@ [PKG_CHECK_MODULES(SYSTEMD_INHIBIT, [libsystemd-login >= 183])]) AC_DEFINE([SUSPEND_RESUME_SYSTEMD], 1, [Define to 1 to use systemd suspend api]) ;; @@ -113,9 +116,9 @@ ;; esac ---- a/src/nm-sleep-monitor.c 2017-02-14 09:57:16.963251852 +0100 -+++ b/src/nm-sleep-monitor.c 2017-02-14 09:58:01.855253200 +0100 -@@ -38,7 +38,7 @@ +--- a/src/nm-sleep-monitor.c 2017-02-24 15:33:06.326370496 +0100 ++++ b/src/nm-sleep-monitor.c 2017-02-24 15:34:13.636369290 +0100 +@@ -38,13 +38,17 @@ #define USE_UPOWER 1 #define _NMLOG_PREFIX_NAME "sleep-monitor-up" @@ -124,7 +127,17 @@ #define SUSPEND_DBUS_NAME "org.freedesktop.login1" #define SUSPEND_DBUS_PATH "/org/freedesktop/login1" -@@ -60,7 +60,7 @@ + #define SUSPEND_DBUS_INTERFACE "org.freedesktop.login1.Manager" + #define USE_UPOWER 0 ++#if defined (SUSPEND_RESUME_SYSTEMD) + #define _NMLOG_PREFIX_NAME "sleep-monitor-sd" ++#else ++#define _NMLOG_PREFIX_NAME "sleep-monitor-el" ++#endif + + #elif defined(SUSPEND_RESUME_CONSOLEKIT) + +@@ -60,7 +64,7 @@ #else @@ -133,53 +146,53 @@ #endif ---- a/src/nm-session-monitor.c 2017-02-14 09:49:08.645237191 +0100 -+++ b/src/nm-session-monitor.c 2017-02-14 09:56:48.680251003 +0100 -@@ -32,6 +32,11 @@ +--- a/src/nm-session-monitor.c 2017-02-24 15:33:16.240370318 +0100 ++++ b/src/nm-session-monitor.c 2017-02-24 15:34:13.635369290 +0100 +@@ -29,8 +29,20 @@ + #include "nm-session-monitor.h" + #include "NetworkManagerUtils.h" + ++#if defined (SESSION_TRACKING_SYSTEMD) && defined (SESSION_TRACKING_ELOGIND) ++#error Cannot build both systemd-logind and elogind support ++#endif ++ #ifdef SESSION_TRACKING_SYSTEMD #include <systemd/sd-login.h> - #endif ++#define LOGIND_NAME "systemd-logind" ++#endif ++ +#ifdef SESSION_TRACKING_ELOGIND +#include <elogind/sd-login.h> ++#define LOGIND_NAME "elogind" +/* Re-Use SESSION_TRACKING_SYSTEMD as elogind substitutes systemd-login */ +#define SESSION_TRACKING_SYSTEMD 1 -+#endif + #endif /********************************************************************/ - -@@ -103,7 +108,11 @@ +@@ -103,7 +115,7 @@ status = sd_uid_get_sessions (uid, active, NULL); if (status < 0) -+#ifdef SESSION_TRACKING_ELOGIND -+ _LOGE ("failed to get elogind sessions for uid %d: %d", uid, status); -+#else - _LOGE ("failed to get systemd sessions for uid %d: %d", uid, status); -+#endif /* SESSION_TRACKING_ELOGIND */ +- _LOGE ("failed to get systemd sessions for uid %d: %d", uid, status); ++ _LOGE ("failed to get "LOGIND_NAME" sessions for uid %d: %d", uid, status); return status > 0; } -@@ -130,7 +139,11 @@ +@@ -130,7 +142,7 @@ return; if ((status = sd_login_monitor_new (NULL, &monitor->sd.monitor)) < 0) { -+#ifdef SESSION_TRACKING_ELOGIND -+ _LOGE ("failed to create elogind monitor: %d", status); -+#else - _LOGE ("failed to create systemd login monitor: %d", status); -+#endif /* SESSION_TRACKING_ELOGIND */ +- _LOGE ("failed to create systemd login monitor: %d", status); ++ _LOGE ("failed to create "LOGIND_NAME" monitor: %d", status); return; } -@@ -375,7 +388,11 @@ +@@ -375,7 +387,7 @@ { #ifdef SESSION_TRACKING_SYSTEMD st_sd_init (monitor); -+#ifdef SESSION_TRACKING_ELOGIND -+ _LOGD ("using elogind session tracking"); -+#else - _LOGD ("using systemd-logind session tracking"); -+#endif /* SESSION_TRACKING_ELOGIND */ +- _LOGD ("using systemd-logind session tracking"); ++ _LOGD ("using "LOGIND_NAME" session tracking"); #endif #ifdef SESSION_TRACKING_CONSOLEKIT diff --git a/net-misc/networkmanager/networkmanager-1.4.4-r13.ebuild b/net-misc/networkmanager/networkmanager-1.4.4-r14.ebuild index 7ef8dbe..bae837f 100644 --- a/net-misc/networkmanager/networkmanager-1.4.4-r13.ebuild +++ b/net-misc/networkmanager/networkmanager-1.4.4-r14.ebuild @@ -96,7 +96,7 @@ DEPEND="${COMMON_DEPEND} PATCHES=( # Patch in elogind support # Bug #607352 - "${FILESDIR}"/${P}-enable-elogind.patch + "${FILESDIR}"/${P}-enable-elogind-r1.patch ) python_check_deps() { |