- up to 1.0.7 auto/th/PackageKit-1.0.7-1
authorJan Rękorajski <baggins@pld-linux.org>
Sun, 2 Aug 2015 11:05:44 +0000 (13:05 +0200)
committerJan Rękorajski <baggins@pld-linux.org>
Sun, 2 Aug 2015 11:05:44 +0000 (13:05 +0200)
- drop R:ConsoleKit
- add ConsoleKit as fallback if systemd is not running

PackageKit.spec
consolekit-fallback.patch [new file with mode: 0644]

index 171c25e..4282d90 100644 (file)
 Summary:       System daemon that is a D-Bus abstraction layer for package management
 Summary(pl.UTF-8):     Demon systemowy będący warstwą abstrakcji D-Bus do zarządzania pakietami
 Name:          PackageKit
-Version:       1.0.5
+Version:       1.0.7
 Release:       1
 License:       GPL v2+
 Group:         Applications/System
 Source0:       http://www.freedesktop.org/software/PackageKit/releases/%{name}-%{version}.tar.xz
-# Source0-md5: 1b7b4f820d522cf5fb1d4449afd89a27
+# Source0-md5: 5d6fc6cdd44354c5b7bab7bb434cab1f
 Patch0:                %{name}-poldek.patch
 Patch1:                %{name}-bashcomp.patch
 Patch2:                %{name}-format.patch
+Patch3:                consolekit-fallback.patch
 URL:           http://www.packagekit.org/
 BuildRequires: NetworkManager-devel >= 0.6.5
 # pkgconfig(libalpm) >= 8.2.0
@@ -85,7 +86,6 @@ BuildRequires:        xulrunner-devel >= 8.0
 Requires(post,postun): shared-mime-info
 Requires:      %{name}-backend
 Requires:      %{name}-libs = %{version}-%{release}
-Requires:      ConsoleKit-x11
 Requires:      crondaemon
 Requires:      polkit >= 0.98
 Obsoletes:     PackageKit-backend-smart
@@ -421,6 +421,7 @@ Wtyczka PackageKit do przeglądarek WWW.
 %patch0 -p1
 %patch1 -p1
 %patch2 -p1
+%patch3 -p1
 
 %build
 %if %{with doc}
diff --git a/consolekit-fallback.patch b/consolekit-fallback.patch
new file mode 100644 (file)
index 0000000..a56c424
--- /dev/null
@@ -0,0 +1,52 @@
+--- PackageKit-1.0.7/configure.ac~     2015-08-02 12:49:14.000000000 +0200
++++ PackageKit-1.0.7/configure.ac      2015-08-02 12:58:42.496449586 +0200
+@@ -235,7 +235,7 @@
+ AC_ARG_ENABLE(systemd, AS_HELP_STRING([--enable-systemd],[enable systemd and logind code]),
+             enable_systemd=$enableval,enable_systemd=yes)
+ if test x$enable_systemd = xyes; then
+-      PKG_CHECK_MODULES(SYSTEMD, libsystemd-login libsystemd-journal)
++      PKG_CHECK_MODULES(SYSTEMD, libsystemd-login libsystemd-journal libsystemd-daemon)
+       AC_ARG_WITH([systemdsystemunitdir],
+                   AS_HELP_STRING([--with-systemdsystemunitdir=DIR], [Directory for systemd service files]),
+                   [has_systemdsystemunitdir=$with_systemdsystemunitdir],
+--- PackageKit-1.0.7/src/pk-dbus.c~    2015-04-22 11:54:49.000000000 +0200
++++ PackageKit-1.0.7/src/pk-dbus.c     2015-08-02 12:57:29.398321174 +0200
+@@ -28,6 +28,7 @@
+ #include <gio/gio.h>
+ #ifdef HAVE_SYSTEMD
++ #include <systemd/sd-daemon.h>
+  #include <systemd/sd-login.h>
+ #endif
+@@ -222,9 +222,7 @@
+ pk_dbus_get_session (PkDbus *dbus, const gchar *sender)
+ {
+       gchar *session = NULL;
+-#ifndef HAVE_SYSTEMD
+       _cleanup_error_free_ GError *error = NULL;
+-#endif
+       guint pid;
+       _cleanup_variant_unref_ GVariant *value = NULL;
+@@ -252,8 +254,10 @@
+       /* get session from systemd or ConsoleKit */
+ #ifdef HAVE_SYSTEMD
++        if (sd_booted () > 0) {
+       session = pk_dbus_get_session_systemd (pid);
+-#else
++      } else {
++#endif
+       /* get session from ConsoleKit */
+       value = g_dbus_proxy_call_sync (dbus->priv->proxy_session,
+                                       "GetSessionForUnixProcess",
+@@ -269,6 +273,8 @@
+               goto out;
+       }
+       g_variant_get (value, "(o)", &session);
++#ifdef HAVE_SYSTEMD
++      }
+ #endif
+ out:
+       return session;
This page took 0.115629 seconds and 4 git commands to generate.