[kde-workspace/f18] Merged and cleaned the systemd shutdown and logout patches.

Martin Briza mbriza at fedoraproject.org
Thu Dec 6 13:38:28 UTC 2012


commit 139bd35cde76502c685b78765a086e668f0dfc6a
Author: Martin Briza <mbriza at redhat.com>
Date:   Thu Dec 6 14:37:41 2012 +0100

    Merged and cleaned the systemd shutdown and logout patches.
    
    Merged and cleaned the systemd shutdown and logout patches.

 kde-workspace-4.9.3-systemd-displaymanager.patch |  479 ++++++++++++++++++++++
 kde-workspace.spec                               |  101 ++---
 2 files changed, 520 insertions(+), 60 deletions(-)
---
diff --git a/kde-workspace-4.9.3-systemd-displaymanager.patch b/kde-workspace-4.9.3-systemd-displaymanager.patch
new file mode 100644
index 0000000..ee3f61e
--- /dev/null
+++ b/kde-workspace-4.9.3-systemd-displaymanager.patch
@@ -0,0 +1,479 @@
+--- libs/kworkspace/kdisplaymanager.cpp.systemd-displaymanager	2012-08-13 10:53:46.000000000 +0200
++++ libs/kworkspace/kdisplaymanager.cpp	2012-12-05 12:58:32.193798795 +0100
+@@ -40,6 +40,166 @@
+ #include <errno.h>
+ #include <stdio.h>
+ 
++#define _DBUS_PROPERTIES_IFACE "org.freedesktop.DBus.Properties"
++#define _DBUS_PROPERTIES_GET "Get"
++
++#define DBUS_PROPERTIES_IFACE QLatin1String(_DBUS_PROPERTIES_IFACE)
++#define DBUS_PROPERTIES_GET QLatin1String(_DBUS_PROPERTIES_GET)
++
++#define _SYSTEMD_SERVICE "org.freedesktop.login1"
++#define _SYSTEMD_BASE_PATH "/org/freedesktop/login1"
++#define _SYSTEMD_MANAGER_IFACE _SYSTEMD_SERVICE ".Manager"
++#define _SYSTEMD_SESSION_BASE_PATH _SYSTEMD_BASE_PATH "/Session"
++#define _SYSTEMD_SEAT_IFACE _SYSTEMD_SERVICE ".Seat"
++#define _SYSTEMD_SEAT_BASE_PATH _SYSTEMD_BASE_PATH "/Seat"
++#define _SYSTEMD_SESSION_IFACE _SYSTEMD_SERVICE ".Session"
++#define _SYSTEMD_USER_PROPERTY "User"
++#define _SYSTEMD_SEAT_PROPERTY "Seat"
++#define _SYSTEMD_SESSIONS_PROPERTY "Sessions"
++#define _SYSTEMD_SWITCH_CALL "Activate"
++
++#define SYSTEMD_SERVICE QLatin1String(_SYSTEMD_SERVICE)
++#define SYSTEMD_BASE_PATH QLatin1String(_SYSTEMD_BASE_PATH)
++#define SYSTEMD_MANAGER_IFACE QLatin1String(_SYSTEMD_MANAGER_IFACE)
++#define SYSTEMD_SESSION_BASE_PATH QLatin1String(_SYSTEMD_SESSION_BASE_PATH)
++#define SYSTEMD_SEAT_IFACE QLatin1String(_SYSTEMD_SEAT_IFACE)
++#define SYSTEMD_SEAT_BASE_PATH QLatin1String(_SYSTEMD_SEAT_BASE_PATH)
++#define SYSTEMD_SESSION_IFACE QLatin1String(_SYSTEMD_SESSION_IFACE)
++#define SYSTEMD_USER_PROPERTY QLatin1String(_SYSTEMD_USER_PROPERTY)
++#define SYSTEMD_SEAT_PROPERTY QLatin1String(_SYSTEMD_SEAT_PROPERTY)
++#define SYSTEMD_SESSIONS_PROPERTY QLatin1String(_SYSTEMD_SESSIONS_PROPERTY)
++#define SYSTEMD_SWITCH_CALL QLatin1String(_SYSTEMD_SWITCH_CALL)
++
++struct NamedDBusObjectPath
++{
++    QString name;
++    QDBusObjectPath path;
++};
++Q_DECLARE_METATYPE(NamedDBusObjectPath)
++Q_DECLARE_METATYPE(QList<NamedDBusObjectPath>)
++
++// Marshall the NamedDBusObjectPath data into a D-Bus argument
++QDBusArgument &operator<<(QDBusArgument &argument, const NamedDBusObjectPath &namedPath)
++{
++    argument.beginStructure();
++    argument << namedPath.name << namedPath.path;
++    argument.endStructure();
++    return argument;
++}
++
++// Retrieve the NamedDBusObjectPath data from the D-Bus argument
++const QDBusArgument &operator>>(const QDBusArgument &argument, NamedDBusObjectPath &namedPath)
++{
++    argument.beginStructure();
++    argument >> namedPath.name >> namedPath.path;
++    argument.endStructure();
++    return argument;
++}
++
++struct NumberedDBusObjectPath
++{
++    uint num;
++    QDBusObjectPath path;
++};
++Q_DECLARE_METATYPE(NumberedDBusObjectPath)
++
++// Marshall the NumberedDBusObjectPath data into a D-Bus argument
++QDBusArgument &operator<<(QDBusArgument &argument, const NumberedDBusObjectPath &numberedPath)
++{
++    argument.beginStructure();
++    argument << numberedPath.num << numberedPath.path;
++    argument.endStructure();
++    return argument;
++}
++
++// Retrieve the NumberedDBusObjectPath data from the D-Bus argument
++const QDBusArgument &operator>>(const QDBusArgument &argument, NumberedDBusObjectPath &numberedPath)
++{
++    argument.beginStructure();
++    argument >> numberedPath.num >> numberedPath.path;
++    argument.endStructure();
++    return argument;
++}
++
++class SystemdManager : public QDBusInterface
++{
++public:
++    SystemdManager() :
++        QDBusInterface(
++                SYSTEMD_SERVICE,
++                SYSTEMD_BASE_PATH,
++                SYSTEMD_MANAGER_IFACE,
++                QDBusConnection::systemBus()) {}
++};
++
++class SystemdSeat : public QDBusInterface
++{
++public:
++    SystemdSeat(const QDBusObjectPath &path) :
++        QDBusInterface(
++                SYSTEMD_SERVICE,
++                path.path(),
++                SYSTEMD_SEAT_IFACE,
++                QDBusConnection::systemBus()) {}
++    /* HACK to be able to extract a(so) type from QDBus, property doesn't do the trick */
++    QList<NamedDBusObjectPath> getSessions() {
++        QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), DBUS_PROPERTIES_IFACE, DBUS_PROPERTIES_GET);
++        message <<  interface() << SYSTEMD_SESSIONS_PROPERTY;
++        QDBusMessage reply = QDBusConnection::systemBus().call(message);
++
++        QVariantList args = reply.arguments();
++        if (!args.isEmpty()) {
++            QList<NamedDBusObjectPath> namedPathList = qdbus_cast< QList<NamedDBusObjectPath> >(args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>());
++            return namedPathList;
++        }
++        return QList<NamedDBusObjectPath>();
++    }
++};
++
++class SystemdSession : public QDBusInterface
++{
++public:
++    SystemdSession(const QDBusObjectPath &path) :
++        QDBusInterface(
++                SYSTEMD_SERVICE,
++                path.path(),
++                SYSTEMD_SESSION_IFACE,
++                QDBusConnection::systemBus()) {}
++    /* HACK to be able to extract (so) type from QDBus, property doesn't do the trick */
++    NamedDBusObjectPath getSeat() {
++        QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), DBUS_PROPERTIES_IFACE, DBUS_PROPERTIES_GET);
++        message <<  interface() <<  SYSTEMD_SEAT_PROPERTY;
++        QDBusMessage reply = QDBusConnection::systemBus().call(message);
++
++        QVariantList args = reply.arguments();
++        if (!args.isEmpty()) {
++            NamedDBusObjectPath namedPath;
++            args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>() >> namedPath;
++            return namedPath;
++        }
++        return NamedDBusObjectPath();
++    }
++    NumberedDBusObjectPath getUser() {
++        QDBusMessage message = QDBusMessage::createMethodCall(service(), path(), DBUS_PROPERTIES_IFACE, DBUS_PROPERTIES_GET);
++        message <<  interface() <<  SYSTEMD_USER_PROPERTY;
++        QDBusMessage reply = QDBusConnection::systemBus().call(message);
++
++        QVariantList args = reply.arguments();
++        if (!args.isEmpty()) {
++            NumberedDBusObjectPath numberedPath;
++            args.at(0).value<QDBusVariant>().variant().value<QDBusArgument>() >> numberedPath;
++            return numberedPath;
++        }
++        return NumberedDBusObjectPath();
++    }
++    void getSessionLocation(SessEnt &se)
++    {
++        se.tty = (property("Type").toString() != QLatin1String("x11"));
++        se.display = property(se.tty ? "TTY" : "Display").toString();
++        se.vt = property("VTNr").toInt();
++    }
++};
++
+ class CKManager : public QDBusInterface
+ {
+ public:
+@@ -68,9 +228,26 @@
+     CKSession(const QDBusObjectPath &path) :
+         QDBusInterface(
+                 QLatin1String("org.freedesktop.ConsoleKit"),
+-            path.path(),
++                path.path(),
+                 QLatin1String("org.freedesktop.ConsoleKit.Session"),
+                 QDBusConnection::systemBus()) {}
++    void getSessionLocation(SessEnt &se)
++    {
++        QString tty;
++        QDBusReply<QString> r = call(QLatin1String("GetX11Display"));
++        if (r.isValid() && !r.value().isEmpty()) {
++            QDBusReply<QString> r2 = call(QLatin1String("GetX11DisplayDevice"));
++            tty = r2.value();
++            se.display = r.value();
++            se.tty = false;
++        } else {
++            QDBusReply<QString> r2 = call(QLatin1String("GetDisplayDevice"));
++            tty = r2.value();
++            se.display = tty;
++            se.tty = true;
++        }
++        se.vt = tty.mid(strlen("/dev/tty")).toInt();
++    }
+ };
+ 
+ class GDMFactory : public QDBusInterface
+@@ -131,6 +308,9 @@
+     }
+     switch (DMType) {
+     default:
++        qDBusRegisterMetaType<NamedDBusObjectPath>();
++        qDBusRegisterMetaType<QList<NamedDBusObjectPath> >();
++        qDBusRegisterMetaType<NumberedDBusObjectPath>();
+         return;
+     case NewKDM:
+     case OldGDM:
+@@ -242,17 +422,31 @@
+ 
+ static bool getCurrentSeat(QDBusObjectPath *currentSession, QDBusObjectPath *currentSeat)
+ {
+-    CKManager man;
+-    QDBusReply<QDBusObjectPath> r = man.call(QLatin1String("GetCurrentSession"));
++    SystemdManager man;
++    QDBusReply<QDBusObjectPath> r = man.call(QLatin1String("GetSessionByPID"), (uint) QCoreApplication::applicationPid());
+     if (r.isValid()) {
+-        CKSession sess(r.value());
++        SystemdSession sess(r.value());
+         if (sess.isValid()) {
+-            QDBusReply<QDBusObjectPath> r2 = sess.call(QLatin1String("GetSeatId"));
+-            if (r2.isValid()) {
+-                if (currentSession)
+-                    *currentSession = r.value();
+-                *currentSeat = r2.value();
+-                return true;
++            NamedDBusObjectPath namedPath = sess.getSeat();
++            if (currentSession)
++                *currentSession = r.value();
++            *currentSeat = namedPath.path;
++            return true;
++        }
++    }
++    else {
++        CKManager man;
++        QDBusReply<QDBusObjectPath> r = man.call(QLatin1String("GetCurrentSession"));
++        if (r.isValid()) {
++            CKSession sess(r.value());
++            if (sess.isValid()) {
++                QDBusReply<QDBusObjectPath> r2 = sess.call(QLatin1String("GetSeatId"));
++                if (r2.isValid()) {
++                    if (currentSession)
++                        *currentSession = r.value();
++                    *currentSeat = r2.value();
++                    return true;
++                }
+             }
+         }
+     }
+@@ -261,44 +455,44 @@
+ 
+ static QList<QDBusObjectPath> getSessionsForSeat(const QDBusObjectPath &path)
+ {
+-    CKSeat seat(path);
+-    if (seat.isValid()) {
+-        QDBusReply<QList<QDBusObjectPath> > r = seat.call(QLatin1String("GetSessions"));
+-        if (r.isValid()) {
+-            // This will contain only local sessions:
+-            // - this is only ever called when isSwitchable() is true => local seat
+-            // - remote logins into the machine are assigned to other seats
+-            return r.value();
++    if (path.path().startsWith(SYSTEMD_BASE_PATH)) { // systemd path incoming
++        SystemdSeat seat(path);
++        if (seat.isValid()) {
++            QList<NamedDBusObjectPath> r = seat.getSessions();
++            QList<QDBusObjectPath> result;
++            foreach (const NamedDBusObjectPath &namedPath, r)
++                result.append(namedPath.path);
++            // This pretty much can't contain any other than local sessions as seats are assigned only locally in systemd
++            return result;
++        }
++    }
++    else if (path.path().startsWith("/org/freedesktop/ConsoleKit")) {
++        CKSeat seat(path);
++        if (seat.isValid()) {
++            QDBusReply<QList<QDBusObjectPath> > r = seat.call(QLatin1String("GetSessions"));
++            if (r.isValid()) {
++                // This will contain only local sessions:
++                // - this is only ever called when isSwitchable() is true => local seat
++                // - remote logins into the machine are assigned to other seats
++                return r.value();
++            }
+         }
+     }
+     return QList<QDBusObjectPath>();
+ }
+ 
+-static void getSessionLocation(CKSession &lsess, SessEnt &se)
+-{
+-    QString tty;
+-    QDBusReply<QString> r = lsess.call(QLatin1String("GetX11Display"));
+-    if (r.isValid() && !r.value().isEmpty()) {
+-        QDBusReply<QString> r2 = lsess.call(QLatin1String("GetX11DisplayDevice"));
+-        tty = r2.value();
+-        se.display = r.value();
+-        se.tty = false;
+-    } else {
+-        QDBusReply<QString> r2 = lsess.call(QLatin1String("GetDisplayDevice"));
+-        tty = r2.value();
+-        se.display = tty;
+-        se.tty = true;
+-    }
+-    se.vt = tty.mid(strlen("/dev/tty")).toInt();
+-}
+-
+ #ifndef KDM_NO_SHUTDOWN
+ bool
+ KDisplayManager::canShutdown()
+ {
+     if (DMType == NewGDM || DMType == NoDM || DMType == LightDM) {
++        QDBusReply<QString> canPowerOff = SystemdManager().call(QLatin1String("CanPowerOff"));
++        if (canPowerOff.isValid())
++            return canPowerOff.value() != QLatin1String("no");
+         QDBusReply<bool> canStop = CKManager().call(QLatin1String("CanStop"));
+-        return (canStop.isValid() && canStop.value());
++        if (canStop.isValid())
++            return canStop.value();
++        return false;
+     }
+ 
+     if (DMType == OldKDM)
+@@ -329,9 +523,21 @@
+             return;
+ 
+         if (DMType == NewGDM || DMType == NoDM || DMType == LightDM) {
+-            // FIXME: entirely ignoring shutdownMode
+-            CKManager().call(QLatin1String(
+-                    shutdownType == KWorkSpace::ShutdownTypeReboot ? "Restart" : "Stop"));
++            // systemd supports only 2 modes:
++            // * interactive = true: brings up a PolicyKit prompt if other sessions are active
++            // * interactive = false: rejects the shutdown if other sessions are active
++            // There are no schedule or force modes.
++            // We try to map our 4 shutdown modes in the sanest way.
++            bool interactive = (shutdownMode == KWorkSpace::ShutdownModeInteractive
++                                || shutdownMode == KWorkSpace::ShutdownModeForceNow);
++            QDBusReply<QString> check = SystemdManager().call(QLatin1String(
++                    shutdownType == KWorkSpace::ShutdownTypeReboot ? "Reboot" : "PowerOff"), interactive);
++            if (!check.isValid()) {
++                // FIXME: entirely ignoring shutdownMode
++                CKManager().call(QLatin1String(
++                        shutdownType == KWorkSpace::ShutdownTypeReboot ? "Restart" : "Stop"));
++                // if even CKManager call fails, there is nothing more to be done
++            }
+             return;
+         }
+ 
+@@ -406,9 +612,15 @@
+     if (DMType == NewGDM || DMType == LightDM) {
+         QDBusObjectPath currentSeat;
+         if (getCurrentSeat(0, &currentSeat)) {
+-            CKSeat seat(currentSeat);
+-            if (seat.isValid()) {
+-                QDBusReply<bool> r = seat.call(QLatin1String("CanActivateSessions"));
++            SystemdSeat SDseat(currentSeat);
++            if (SDseat.isValid()) {
++                QVariant prop = SDseat.property("CanMultiSession");
++                if (prop.isValid())
++                    return prop.toBool();
++            }
++            CKSeat CKseat(currentSeat);
++            if (CKseat.isValid()) {
++                QDBusReply<bool> r = CKseat.call(QLatin1String("CanActivateSessions"));
+                 if (r.isValid())
+                     return r.value();
+             }
+@@ -468,23 +680,56 @@
+     if (DMType == NewGDM || DMType == LightDM) {
+         QDBusObjectPath currentSession, currentSeat;
+         if (getCurrentSeat(&currentSession, &currentSeat)) {
+-            foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
+-                CKSession lsess(sp);
+-                if (lsess.isValid()) {
+-                    SessEnt se;
+-                    getSessionLocation(lsess, se);
+-                    // "Warning: we haven't yet defined the allowed values for this property.
+-                    // It is probably best to avoid this until we do."
+-                    QDBusReply<QString> r = lsess.call(QLatin1String("GetSessionType"));
+-                    if (r.value() != QLatin1String("LoginWindow")) {
+-                        QDBusReply<unsigned> r2 = lsess.call(QLatin1String("GetUnixUser"));
+-                        se.user = KUser(K_UID(r2.value())).loginName();
+-                        se.session = "<unknown>";
++            // we'll divide the code in two branches to reduce the overhead of calls to non-existent services
++            // systemd part // preferred
++            if (QDBusConnection::systemBus().interface()->isServiceRegistered(SYSTEMD_SERVICE)) {
++                foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
++                    SystemdSession lsess(sp);
++                    if (lsess.isValid()) {
++                        SessEnt se;
++                        lsess.getSessionLocation(se);
++                        if ((lsess.property("Class").toString() != QLatin1String("greeter")) &&
++                                (lsess.property("State").toString() != QLatin1String("closing"))) {
++                            NumberedDBusObjectPath numberedPath = lsess.getUser();
++                            se.display = lsess.property("Display").toString();
++                            se.vt = lsess.property("VTNr").toInt();
++                            se.user = KUser(K_UID(numberedPath.num)).loginName();
++                            /* TODO:
++                             * regarding the session name in this, it IS possible to find it out - logind tracks the session leader PID
++                             * the problem is finding out the name of the process, I could come only with reading /proc/PID/comm which
++                             * doesn't seem exactly... right to me --mbriza
++                             */
++                            se.session = "<unknown>";
++                            se.self = lsess.property("Display").toString() == ::getenv("DISPLAY"); /* Bleh once again */
++                            se.tty = !lsess.property("TTY").toString().isEmpty();
++                        }
++                        list.append(se);
++                    }    
++                }
++            }
++            // ConsoleKit part
++            else if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.freedesktop.ConsoleKit")) {
++                foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
++                    CKSession lsess(sp);
++                    if (lsess.isValid()) {
++                        SessEnt se;
++                        lsess.getSessionLocation(se);
++                        // "Warning: we haven't yet defined the allowed values for this property.
++                        // It is probably best to avoid this until we do."
++                        QDBusReply<QString> r = lsess.call(QLatin1String("GetSessionType"));
++                        if (r.value() != QLatin1String("LoginWindow")) {
++                            QDBusReply<unsigned> r2 = lsess.call(QLatin1String("GetUnixUser"));
++                            se.user = KUser(K_UID(r2.value())).loginName();
++                            se.session = "<unknown>";
++                        }
++                        se.self = (sp == currentSession);
++                        list.append(se);
+                     }
+-                    se.self = (sp == currentSession);
+-                    list.append(se);
+                 }
+             }
++            else {
++                return false;
++            }
+             return true;
+         }
+         return false;
+@@ -566,16 +811,33 @@
+     if (DMType == NewGDM || DMType == LightDM) {
+         QDBusObjectPath currentSeat;
+         if (getCurrentSeat(0, &currentSeat)) {
+-            foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
+-                CKSession lsess(sp);
+-                if (lsess.isValid()) {
+-                    SessEnt se;
+-                    getSessionLocation(lsess, se);
+-                    if (se.vt == vt) {
+-                        if (se.tty) // ConsoleKit simply ignores these
+-                            return false;
+-                        lsess.call(QLatin1String("Activate"));
+-                        return true;
++            // systemd part // preferred
++            if (QDBusConnection::systemBus().interface()->isServiceRegistered(SYSTEMD_SERVICE)) {
++                foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
++                    SystemdSession lsess(sp);
++                    if (lsess.isValid()) {
++                        SessEnt se;
++                        lsess.getSessionLocation(se);
++                        if (se.vt == vt) {
++                            lsess.call(SYSTEMD_SWITCH_CALL);
++                            return true;
++                        }
++                    }
++                }
++            }
++            // ConsoleKit part
++            else if (QDBusConnection::systemBus().interface()->isServiceRegistered("org.freedesktop.ConsoleKit")) {
++                foreach (const QDBusObjectPath &sp, getSessionsForSeat(currentSeat)) {
++                    CKSession lsess(sp);
++                    if (lsess.isValid()) {
++                        SessEnt se;
++                        lsess.getSessionLocation(se);
++                        if (se.vt == vt) {
++                            if (se.tty) // ConsoleKit simply ignores these
++                                return false;
++                            lsess.call(QLatin1String("Activate"));
++                            return true;
++                        }
+                     }
+                 }
+             }
diff --git a/kde-workspace.spec b/kde-workspace.spec
index fa8fa79..89bd2eb 100644
--- a/kde-workspace.spec
+++ b/kde-workspace.spec
@@ -2,16 +2,10 @@
 %define gpsd 1
 %endif
 
-%if 0%{?fedora} > 16 || 0%{?rhel} > 6
-%define systemd 1
-%else
-%define consolekit 1
-%endif
-
 Summary: KDE Workspace
 Name:    kde-workspace
-Version: 4.9.4
-Release: 1%{?dist}
+Version: 4.9.90
+Release: 2%{?dist}
 
 License: GPLv2
 URL:     https://projects.kde.org/projects/kde/kde-workspace
@@ -21,15 +15,14 @@ URL:     https://projects.kde.org/projects/kde/kde-workspace
 %else
 %global stable stable
 %endif
-Source0: ftp://ftp.kde.org/pub/kde/%{stable}/%{version}/src/kde-workspace-%{version}.tar.xz
-BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+Source0: http://download.kde.org/%{stable}/%{version}/src/kde-workspace-%{version}.tar.xz
 
 # RH/Fedora-specific startkde changes
-Patch1: kde-workspace-4.8.97-redhat_startkde.patch
+Patch1: kde-workspace-4.9.90-redhat_startkde.patch
 
 # add konsole menuitem
 # FIXME?  only show menu when/if konsole is installed? then we can drop the hard-dep
-Patch2: kdebase-workspace-4.5.0-plasma-konsole.patch
+Patch2: kde-workspace-4.9.90-plasma_konsole.patch
 Requires: konsole
 
 # 441062: packagekit tools do not show icons correctly on KDE
@@ -41,9 +34,6 @@ Patch8: kdebase-workspace-4.2.85-klipper-url.patch
 # 434824: KDE4 System Settings - No Method To Enter Administrative Mode
 Patch9: kdebase-workspace-4.4.90-rootprivs.patch
 
-# drop useless kde font directories
-Patch11: kdebase-workspace-4.6.90-font.patch
-
 # no klipper action on selection for Arora browser
 Patch14: kdebase-workspace-4.2.0-klipper-arora.patch
 
@@ -66,9 +56,6 @@ Patch20: kdebase-workspace-4.4.92-xsession_errors_O_APPEND.patch
 # support the widgetStyle4 hack in the Qt KDE platform plugin
 Patch21: kdebase-workspace-4.3.98-platformplugin-widgetstyle4.patch
 
-# drop hard dep on xorg-x11-apps (for xmessage), http://bugzilla.redhat.com/537609
-Patch23: kdebase-workspace-4.5.2-startkde_zenity.patch 
-
 # multilib QT_PLUGIN_PATH, http://bugzilla.redhat.com/704840
 Patch24: kdebase-workspace-4.6.90-multilib_qt_plugin_path.patch
 
@@ -102,16 +89,16 @@ Patch52: kde-workspace-4.8.2-bz#732830-login.patch
 # http://bugs.kde.org/242065
 Patch53: kde-workspace-4.7.95-kdm_xauth.patch
 
+# fix CMakeLists.txt for renaming kscreenlocker.notifyrc to ksmserver.notifyrc
+Patch54: kde-workspace-4.9.90-kscreenlocker_rename.patch
+
 # pam/systemd bogosity: kdm restart/shutdown does not work 
 # http://bugzilla.redhat.com/796969
 Patch57: kde-workspace-4.8.0-bug796969.patch
 
-# initial systemd support
-Patch58: kde-workspace-4.8.0-systemd-shutdown.patch
-
-# Support for switching users with systemd - #859347
-Patch60: kde-workspace-4.9.2-systemd-switch-user.patch
-Patch61: kde-workspace-4.9.2-systemd-switch-user2.patch
+# merged patches: systemd-switch-user{,2} systemd-shutdown
+# Support for systemd AND ConsoleKit in kworkspace
+Patch62: kde-workspace-4.9.3-systemd-displaymanager.patch
 
 ## upstream patches
 
@@ -132,9 +119,6 @@ Patch300: kde-workspace-4.8.3-webkit.patch
 Obsoletes: kdebase-workspace < 4.7.97-10
 Provides:  kdebase-workspace = %{version}-%{release}
 
-# kinfocenter moved kdebase-4.4 -> kdebase-workspace-4.5
-Conflicts: kdebase < 6:4.4.80
-
 Requires: polkit-kde
 
 %if ! 0%{?akonadi_subpkg}
@@ -160,6 +144,7 @@ BuildRequires: desktop-file-utils
 BuildRequires: kdelibs4-devel >= %{version}
 BuildRequires: kdepimlibs-devel >= %{version}
 BuildRequires: kactivities-devel >= %{version} 
+BuildRequires: nepomuk-core-devel >= %{version}
 BuildRequires: libjpeg-devel
 BuildRequires: libutempter-devel
 %ifnarch s390 s390x
@@ -174,6 +159,7 @@ BuildRequires: pkgconfig(libdmtx)
 BuildRequires: pkgconfig(akonadi)
 BuildRequires: pkgconfig(bluez)
 BuildRequires: pkgconfig(dbusmenu-qt)
+BuildRequires: pkgconfig(gl)
 BuildRequires: pkgconfig(glib-2.0)
 %if 0%{?gpsd}
 BuildRequires: pkgconfig(libgps)
@@ -190,8 +176,12 @@ BuildRequires: pkgconfig(NetworkManager) pkgconfig(libnm-glib)
 BuildRequires: pkgconfig(polkit-qt-1)
 BuildRequires: pkgconfig(python)
 BuildRequires: pkgconfig(qimageblitz)
+BuildRequires: pkgconfig(QJson)
 BuildRequires: pkgconfig(soprano)
 BuildRequires: pkgconfig(xau)
+BuildRequires: pkgconfig(xcb)
+BuildRequires: pkgconfig(xcb-image)
+BuildRequires: pkgconfig(xcb-renderutil)
 BuildRequires: pkgconfig(xdmcp)
 BuildRequires: pkgconfig(xres)
 # kwin
@@ -228,12 +218,6 @@ Requires: dbus-x11
 #Requires: xorg-x11-apps
 Requires: xorg-x11-utils
 Requires: xorg-x11-server-utils
-%if 0%{?consolekit}
-BuildRequires: pkgconfig(ck-connector)
-# for shutdown/restart support without KDM (and KDM requires this anyway)
-# (works around #788171)
-Requires: ConsoleKit
-%endif
 
 %define default_face_icon default1.png
 Requires: kde-settings-ksplash
@@ -305,10 +289,6 @@ Provides: service(graphical-login) = kdm
 Requires: kgreeter-plugins = %{version}-%{release}
 Requires: libkworkspace%{?_isa} =  %{version}-%{release}
 Requires: kde-settings-kdm
-%if 0%{?consolekit}
-# prevent "Cannot open ConsoleKit session" when logging in (#787855)
-Requires: ConsoleKit-x11
-%endif
 %description -n kdm
 KDM provides the graphical login screen, shown shortly after boot up,
 log out, and when user switching.
@@ -422,18 +402,17 @@ Requires: akonadi
 %patch1 -p1 -b .redhat_startkde
 # Well, I looked at doing this using the context menu plugin system and it
 # looked like a lot more work than this simple patch to me. -- Kevin
+# FIXME/REBASE -- rex
 %patch2 -p1 -b .plasma-konsole
 %patch7 -p1 -b .krdb
 %patch8 -p1 -b .klipper-url
 %patch9 -p1 -b .rootprivs
-%patch11 -p1 -b .font
 %patch15 -p1 -b .kio_sysinfo
 %patch16 -p1 -b .showremainingtime
 %patch17 -p1 -b .classicmenu-logout
 %patch19 -p1 -b .kdm_plymouth
 %patch20 -p1 -b .xsession_errors_O_APPEND
 %patch21 -p1 -b .platformplugin-widgetstyle4
-%patch23 -p1 -b .startkde_zenity
 %patch24 -p1 -b .multilib_qt_plugin_path
 %patch25 -p1 -b .bz#747982-launchers
 %patch26 -p1 -b .systray_ktp_presence
@@ -444,10 +423,9 @@ Requires: akonadi
 %patch51 -p1 -b .add_apper_to_kickoff_favorites
 %patch52 -p1 -b .bz#732830-login
 %patch53 -p1 -b .kdm_xauth
+%patch54 -p1 -b .kscreenlocker_rename
 %patch57 -p1 -b .bug796969
-%patch58 -p1 -b .systemd-shutdown
-%patch60 -p1 -b .systemd-switch-user
-%patch61 -p0 -b .systemd-switch-user2
+%patch62 -p0 -b .systemd-displaymanager
 
 # upstream patches
 
@@ -473,8 +451,7 @@ pushd %{_target_platform}
   -DKDE4_KDM_PAM_SERVICE=kdm \
   -DKDE4_KCHECKPASS_PAM_SERVICE=kcheckpass \
   -DKDE4_KSCREENSAVER_PAM_SERVICE=kscreensaver \
-  %{?systemd:-DKWORKSPACE_USE_SYSTEMD:BOOL=ON} \
-  %{?systemd:-DPOWERDEVIL_USE_SYSTEMD:BOOL=ON} \
+  -DPOWERDEVIL_USE_SYSTEMD:BOOL=ON \
   ..
 popd
 
@@ -568,10 +545,6 @@ fi
 %{_kde4_bindir}/plasma-netbook
 %{_kde4_bindir}/plasma-overlay
 %{_kde4_bindir}/plasma-windowed
-%{_kde4_bindir}/plasmaengineexplorer
-%{_kde4_bindir}/plasmoidviewer
-%{_kde4_bindir}/plasmawallpaperviewer
-%{_kde4_bindir}/remote-widgets-browser
 %{_kde4_bindir}/solid-action-desktop-gen
 %{_kde4_bindir}/solid-network
 %{_kde4_bindir}/startkde
@@ -584,6 +557,7 @@ fi
 %{_kde4_appsdir}/kcmkeyboard/
 %{_kde4_appsdir}/kcmkeys/
 %{_kde4_appsdir}/kcmsolidactions/
+%{_kde4_appsdir}/kcmstyle/
 %{_kde4_appsdir}/kcmusb/
 %ifnarch s390 s390x
 %{_kde4_appsdir}/kcmview1394/
@@ -594,8 +568,9 @@ fi
 %{_kde4_appsdir}/khotkeys/
 %{_kde4_appsdir}/kinfocenter/
 %{_kde4_appsdir}/kmenuedit/
-%{_kde4_appsdir}/kscreenlocker/
 %dir %{_kde4_appsdir}/ksmserver/
+%{_kde4_appsdir}/ksmserver/ksmserver.notifyrc
+%{_kde4_appsdir}/ksmserver/screenlocker/
 %dir %{_kde4_appsdir}/ksmserver/themes/
 %{_kde4_appsdir}/ksmserver/themes/contour/
 %{_kde4_appsdir}/ksmserver/themes/default/
@@ -621,12 +596,13 @@ fi
 %{_kde4_configdir}/aurorae.knsrc
 %{_kde4_configdir}/background.knsrc
 %{_kde4_configdir}/ksplash.knsrc
+%{_kde4_configdir}/kwineffect.knsrc
+%{_kde4_configdir}/kwinscripts.knsrc
+%{_kde4_configdir}/kwinswitcher.knsrc
 %{_kde4_configdir}/plasma-overlayrc
 %{_kde4_configdir}/plasma-themes.knsrc
 %{_kde4_configdir}/wallpaper.knsrc
 %{_kde4_configdir}/xcursor.knsrc
-%{_kde4_configdir}/kwinscripts.knsrc
-%{_kde4_configdir}/kwinswitcher.knsrc
 
 %{_kde4_datadir}/kde4/services/*
 %exclude %{_kde4_datadir}/kde4/services/kdm.desktop
@@ -641,12 +617,12 @@ fi
 %{_sysconfdir}/dbus-1/system.d/org.kde.kcontrol.kcmclock.conf
 %{_sysconfdir}/dbus-1/system.d/org.kde.kcontrol.kcmkdm.conf
 %{_sysconfdir}/dbus-1/system.d/org.kde.powerdevil.backlighthelper.conf
-%{_datadir}/dbus-1/interfaces/org.freedesktop.ScreenSaver.xml
+%{_datadir}/dbus-1/interfaces/com.canonical.AppMenu.Registrar.xml
+%{_datadir}/dbus-1/interfaces/org.kde.kded.appmenu.xml
 %{_datadir}/dbus-1/interfaces/org.kde.KSMServerInterface.xml
 %{_datadir}/dbus-1/interfaces/org.kde.KWin.xml
 %{_datadir}/dbus-1/interfaces/org.kde.khotkeys.xml
 %{_datadir}/dbus-1/interfaces/org.kde.krunner.App.xml
-%{_datadir}/dbus-1/interfaces/org.kde.screensaver.xml
 %{_datadir}/dbus-1/services/org.kde.fontinst.service
 %{_datadir}/dbus-1/services/org.kde.krunner.service
 %{_datadir}/dbus-1/system-services/org.kde.fontinst.service
@@ -668,6 +644,7 @@ fi
 %{_kde4_libdir}/kde4/classic_mode.so
 %{_kde4_libdir}/kde4/devinfo.so
 %{_kde4_libdir}/kde4/icon_mode.so
+%{_kde4_libdir}/kde4/imports/org/kde/kwin/
 %{_kde4_libdir}/kde4/ion_*.so
 %{_kde4_libdir}/kde4/kcm_*.so
 %exclude %{_kde4_libdir}/kde4/kcm_colors.so
@@ -680,11 +657,9 @@ fi
 %{_kde4_libdir}/kde4/kwin3_b2.so
 %{_kde4_libdir}/kde4/kwin3_laptop.so
 %{_kde4_libdir}/kde4/kwin3_oxygen.so
-%{_kde4_libdir}/kde4/kwin3_plastik.so
 %{_kde4_libdir}/kde4/kwin4_effect_builtins.so
 %{_kde4_libdir}/kde4/kwin_b2_config.so
 %{_kde4_libdir}/kde4/kwin_oxygen_config.so
-%{_kde4_libdir}/kde4/kwin_plastik_config.so
 %{_kde4_libdir}/kde4/plasma_animator_default.so
 %{_kde4_libdir}/kde4/plasma_applet_*.so
 %{_kde4_libdir}/kde4/plasma_containmentactions_*.so
@@ -709,7 +684,7 @@ fi
 %{_kde4_libexecdir}/kcmdatetimehelper
 %{_kde4_libexecdir}/kcmkdmhelper
 %{_kde4_libexecdir}/krootimage
-%{_kde4_libexecdir}/kscreenlocker
+%{_kde4_libexecdir}/kscreenlocker_greet
 %{_kde4_libexecdir}/kwin_killer_helper
 %{_kde4_libexecdir}/kwin_opengl_test
 %{_kde4_libexecdir}/kwin_rules_dialog
@@ -730,7 +705,6 @@ fi
 %{_kde4_libdir}/libpowerdevilconfigcommonprivate.so
 %{_kde4_libdir}/libsystemsettingsview.so
 %{_kde4_libdir}/kconf_update_bin/*
-%{_mandir}/man1/plasm*.1*
 %if 0%{?googlegadgets}
 # googlegadgets
 %exclude %{_kde4_libdir}/kde4/plasma_package_ggl.so
@@ -999,6 +973,13 @@ fi
 
 
 %changelog
+* Thu Dec 06 2012 Martin Briza <mbriza at redhat.com> 4.9.90-2
+- Merged and cleaned the systemd shutdown and logout patches.
+- It is possible to use systemd and/or CK without defining it at compile time
+
+* Mon Dec 03 2012 Rex Dieter <rdieter at fedoraproject.org> 4.9.90-1
+- 4.9.90 (4.10 beta2)
+
 * Mon Dec 03 2012 Than Ngo <than at redhat.com> - 4.9.4-1
 - 4.9.4
 
@@ -1611,7 +1592,7 @@ fi
 * Tue Jul 27 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.4.95-1.py27
 - rebuild for python27
 
-* Sat Jul 25 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.4.95-1
+* Sun Jul 25 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.4.95-1
 - 4.5 RC3 (4.4.95)
 
 * Wed Jul 21 2010 David Malcolm <dmalcolm at redhat.com> - 4.4.92-3
@@ -1761,7 +1742,7 @@ fi
 - do not link calendar dataengine with Akonadi (kde#215150, rh#552473)
 - s/plasma-engine/plasma-dataengine/
 
-* Fri Jan 09 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.3.90-4
+* Sat Jan 09 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.3.90-4
 - krunner crasher (kde#221871)
 
 * Fri Jan 08 2010 Rex Dieter <rdieter at fedoraproject.org> - 4.3.90-3
@@ -2582,7 +2563,7 @@ fi
 - BR: libXtst-devel
 - BR: libXScrnSaver-devel
 
-* Fri Nov 15 2007 Sebastian Vahl <fedora at deadbabylon.de> 3.96.0-3
+* Fri Nov 16 2007 Sebastian Vahl <fedora at deadbabylon.de> 3.96.0-3
 - own some more directories
 - add %%defattr to package devel
 - some spec cleanups


More information about the scm-commits mailing list