From 4870c192945f2a51b7fad11526951d2d6df6381a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Luk=C3=A1=C5=A1=20Tinkl?= Date: Wed, 19 Dec 2012 15:32:40 +0100 Subject: [PATCH] Resolves: bz#888478 - Eject of CDs and DVDs fails --- ...bs-4.9.0-udisks_detatch_external_hdd.patch | 19 ------------ kdelibs-4.9.5-cdeject.patch | 29 +++++++++++++++++++ kdelibs.spec | 7 ++++- 3 files changed, 35 insertions(+), 20 deletions(-) delete mode 100644 kdelibs-4.9.0-udisks_detatch_external_hdd.patch create mode 100644 kdelibs-4.9.5-cdeject.patch diff --git a/kdelibs-4.9.0-udisks_detatch_external_hdd.patch b/kdelibs-4.9.0-udisks_detatch_external_hdd.patch deleted file mode 100644 index ace636b..0000000 --- a/kdelibs-4.9.0-udisks_detatch_external_hdd.patch +++ /dev/null @@ -1,19 +0,0 @@ -diff -up kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp.solid-detach-external-hdd kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp ---- kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp.solid-detach-external-hdd 2012-07-20 03:07:42.000000000 -0500 -+++ kdelibs-4.9.0/solid/solid/backends/udisks/udisksstorageaccess.cpp 2012-08-29 10:25:28.162850570 -0500 -@@ -204,7 +204,14 @@ void UDisksStorageAccess::slotDBusReply( - QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, drivePath, UD_DBUS_INTERFACE_DISKS_DEVICE, "DriveEject"); - msg << QStringList(); // options, unused now - c.call(msg, QDBus::NoBlock); -- } -+ // power down removable USB hard drives, rhbz#852196 -+ UDisksDevice drive(drivePath); -+ if (drive.prop("DriveCanDetach").toBool()) { -+ QDBusMessage msg2 = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, drivePath, UD_DBUS_INTERFACE_DISKS_DEVICE, "DriveDetach"); -+ msg2 << QStringList(); // options, unused now -+ c.call(msg2, QDBus::NoBlock); -+ } -+ } - - slotChanged(); - } diff --git a/kdelibs-4.9.5-cdeject.patch b/kdelibs-4.9.5-cdeject.patch new file mode 100644 index 0000000..dbdd1ca --- /dev/null +++ b/kdelibs-4.9.5-cdeject.patch @@ -0,0 +1,29 @@ +commit af93389d5a821e1c99374aff90f357cc738228d6 +Author: Stefan Brüns +Date: Sat Dec 15 21:11:45 2012 +0100 + + Use correct signature for DriveEject method arguments + + The previous commit added the "unmount" parameter as option for the + DriveEject method. It also inadvertently changed the method signature + of the call from "array of strings" to "string". + + DIGEST: Fix ejecting CDs/DVDs when using UDisks backend. UDisks2 is not affected + + REVIEW: 107686 + BUG: 311613 + FIXED-IN: 4.9.5 + +diff --git a/solid/solid/backends/udisks/udisksopticaldrive.cpp b/solid/solid/backends/udisks/udisksopticaldrive.cpp +index 8ea6194..8286ee7 100644 +--- a/solid/solid/backends/udisks/udisksopticaldrive.cpp ++++ b/solid/solid/backends/udisks/udisksopticaldrive.cpp +@@ -63,7 +63,7 @@ bool UDisksOpticalDrive::eject() + QString path = m_device->udi(); + + QDBusMessage msg = QDBusMessage::createMethodCall(UD_DBUS_SERVICE, path, UD_DBUS_INTERFACE_DISKS_DEVICE, "DriveEject"); +- msg << "unmount"; // unmount parameter ++ msg << (QStringList() << "unmount"); // unmount parameter + return c.callWithCallback(msg, this, SLOT(slotDBusReply(QDBusMessage)), SLOT(slotDBusError(QDBusError))); + } + diff --git a/kdelibs.spec b/kdelibs.spec index 59c736c..a331696 100644 --- a/kdelibs.spec +++ b/kdelibs.spec @@ -25,7 +25,7 @@ Summary: KDE Libraries Version: 4.9.4 -Release: 4%{?dist} +Release: 5%{?dist} Name: kdelibs Epoch: 6 @@ -166,6 +166,7 @@ Patch59: kdelibs-4.9.3-kcm_ssl.patch ## upstream Patch100: 0001-Revert-Also-check-parent-mimetypes-in-protocolForArc.patch Patch101: 0001-Fix-crash-when-no-service-was-selected-user-clicked-.patch +Patch102: kdelibs-4.9.5-cdeject.patch ## security fix # Not Upstreamed? why not ? -- Rex @@ -343,6 +344,7 @@ sed -i -e "s|@@VERSION_RELEASE@@|%{version}-%{release}|" kio/kio/kprotocolmanage # upstream patches %patch100 -p1 -b .kio %patch101 -p1 -b .crash +%patch102 -p1 -b .cdeject # security fixes %patch200 -p1 -b .CVE-2009-2702 @@ -602,6 +604,9 @@ rm -rf %{buildroot} %changelog +* Wed Dec 19 2012 Lukáš Tinkl - 6:4.9.4-5 +- Resolves: bz#888478 - Eject of CDs and DVDs fails + * Thu Dec 06 2012 Than Ngo - 6:4.9.4-4 - apply upstream patch to fix crash when no service was selected