From 875f859e361d4ff72e63cc0d385152d0c86d4989 Mon Sep 17 00:00:00 2001 From: Rex Dieter Date: May 05 2018 21:45:12 +0000 Subject: 5.46.0 --- diff --git a/.gitignore b/.gitignore index 12e34fd..7379ed5 100644 --- a/.gitignore +++ b/.gitignore @@ -1,3 +1,4 @@ /solid-5.43.0.tar.xz /solid-5.44.0.tar.xz /solid-5.45.0.tar.xz +/solid-5.46.0.tar.xz diff --git a/0001-UDisks-Correct-handling-of-removable-file-systems.patch b/0001-UDisks-Correct-handling-of-removable-file-systems.patch deleted file mode 100644 index 91845ea..0000000 --- a/0001-UDisks-Correct-handling-of-removable-file-systems.patch +++ /dev/null @@ -1,49 +0,0 @@ -From 122a6cd8989a4bd3096fddea908a1c2b223be62a Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Sun, 8 Apr 2018 22:12:10 +0200 -Subject: [PATCH 1/5] [UDisks] Correct handling of removable file systems - -Summary: -Filesystems which have no fstab entry have an empty filepath (aka -mountpoint), but these should be mountable nevertheless. -The StorageAccess.ignored flag should only be used as a hint if a -device (filesystem) should create a device item in e.g Dolphin. - -BUG: 391706 -CCBUG: 389479 - -Reviewers: ngraham, broulik - -Reviewed By: ngraham - -Subscribers: #frameworks - -Tags: #frameworks - -Differential Revision: https://phabricator.kde.org/D12051 ---- - src/solid/devices/backends/udisks2/udisksstorageaccess.cpp | 8 ++++---- - 1 file changed, 4 insertions(+), 4 deletions(-) - -diff --git a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp -index dd8f76f..7db2263 100644 ---- a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp -+++ b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp -@@ -111,10 +111,10 @@ bool StorageAccess::isIgnored() const - - const QString path = filePath(); - -- return !path.isEmpty() -- && !path.startsWith(QLatin1String("/media/")) -- && !path.startsWith(QLatin1String("/run/media/")) -- && !path.startsWith(QDir::homePath()); -+ bool inUserPath = path.startsWith(QLatin1String("/media/")) || -+ path.startsWith(QLatin1String("/run/media/")) || -+ path.startsWith(QDir::homePath()); -+ return !inUserPath; - } - - bool StorageAccess::setup() --- -2.14.3 - diff --git a/0002-UDisks-Optimize-several-property-checks.patch b/0002-UDisks-Optimize-several-property-checks.patch deleted file mode 100644 index 8c93670..0000000 --- a/0002-UDisks-Optimize-several-property-checks.patch +++ /dev/null @@ -1,101 +0,0 @@ -From 3c0f767f0337fc136976545cb29f89d76a4a5a8c Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Tue, 10 Apr 2018 06:52:58 +0200 -Subject: [PATCH 2/5] [UDisks] Optimize several property checks - -Summary: -Use QStringLiteral for hasInterface argument - -Retrieve MountPoints propery just once when checking mount state. - -Test Plan: -make -solid-hardware5 list details - -Reviewers: #frameworks, broulik - -Reviewed By: broulik - -Subscribers: broulik - -Tags: #frameworks - -Differential Revision: https://phabricator.kde.org/D12123 ---- - src/solid/devices/backends/udisks2/udisksdevice.cpp | 19 ++++++++++--------- - 1 file changed, 10 insertions(+), 9 deletions(-) - -diff --git a/src/solid/devices/backends/udisks2/udisksdevice.cpp b/src/solid/devices/backends/udisks2/udisksdevice.cpp -index bbdd904..f3fdfff 100644 ---- a/src/solid/devices/backends/udisks2/udisksdevice.cpp -+++ b/src/solid/devices/backends/udisks2/udisksdevice.cpp -@@ -780,17 +780,17 @@ Solid::ErrorType Device::errorToSolidError(const QString &error) const - - bool Device::isBlock() const - { -- return hasInterface(UD2_DBUS_INTERFACE_BLOCK); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_BLOCK)); - } - - bool Device::isPartition() const - { -- return hasInterface(UD2_DBUS_INTERFACE_PARTITION); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_PARTITION)); - } - - bool Device::isPartitionTable() const - { -- return hasInterface(UD2_DBUS_INTERFACE_PARTITIONTABLE); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_PARTITIONTABLE)); - } - - bool Device::isStorageVolume() const -@@ -800,12 +800,12 @@ bool Device::isStorageVolume() const - - bool Device::isStorageAccess() const - { -- return hasInterface(UD2_DBUS_INTERFACE_FILESYSTEM) || isEncryptedContainer(); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_FILESYSTEM)) || isEncryptedContainer(); - } - - bool Device::isDrive() const - { -- return hasInterface(UD2_DBUS_INTERFACE_DRIVE); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_DRIVE)); - } - - bool Device::isOpticalDrive() const -@@ -837,12 +837,13 @@ bool Device::mightBeOpticalDisc() const - - bool Device::isMounted() const - { -- return propertyExists("MountPoints") && !qdbus_cast(prop("MountPoints")).isEmpty(); -+ QVariant mountPoints = prop(QStringLiteral("MountPoints")); -+ return mountPoints.isValid() && !qdbus_cast(mountPoints).isEmpty(); - } - - bool Device::isEncryptedContainer() const - { -- return hasInterface(UD2_DBUS_INTERFACE_ENCRYPTED); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_ENCRYPTED)); - } - - bool Device::isEncryptedCleartext() const -@@ -857,12 +858,12 @@ bool Device::isEncryptedCleartext() const - - bool Device::isSwap() const - { -- return hasInterface(UD2_DBUS_INTERFACE_SWAP); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_SWAP)); - } - - bool Device::isLoop() const - { -- return hasInterface(UD2_DBUS_INTERFACE_LOOP); -+ return hasInterface(QStringLiteral(UD2_DBUS_INTERFACE_LOOP)); - } - - QString Device::drivePath() const --- -2.14.3 - diff --git a/0003-Avoid-creating-duplicate-property-entries-in-the-cac.patch b/0003-Avoid-creating-duplicate-property-entries-in-the-cac.patch deleted file mode 100644 index a0f04cf..0000000 --- a/0003-Avoid-creating-duplicate-property-entries-in-the-cac.patch +++ /dev/null @@ -1,58 +0,0 @@ -From 15047128e56b97f0c6df4628f87e3653a754ad95 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Thu, 12 Apr 2018 00:02:29 +0200 -Subject: [PATCH 3/5] Avoid creating duplicate property entries in the cache - -Summary: -Properties are associated with a specific interface, although the Solid -UDisks2 backend merges properties from all interfaces into a single -namespace. -Fortunately most properties have either unique names accross interfaces, -or are consistent (e.g. "Size" in org.fd.UDisks2.{Block,Partition}), thus -this poses no problem in practice. -QMap<>::unite(other) behaves like QMap<>::insertMulti(item), i.e. the -map may contain multiple values per key, while QMap<>::insert(item) -updates the value for existing keys. - -Test Plan: -make -solid-hardware list details - -Reviewers: #frameworks, broulik - -Reviewed By: broulik - -Subscribers: broulik - -Tags: #frameworks - -Differential Revision: https://phabricator.kde.org/D12124 ---- - src/solid/devices/backends/udisks2/udisksdevicebackend.cpp | 8 ++++++-- - 1 file changed, 6 insertions(+), 2 deletions(-) - -diff --git a/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp b/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp -index 69ebc72..def7dff 100644 ---- a/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp -+++ b/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp -@@ -139,11 +139,15 @@ QVariantMap DeviceBackend::allProperties() const - QDBusPendingReply reply = QDBusConnection::systemBus().call(call); - - if (reply.isValid()) { -- m_propertyCache.unite(reply.value()); -+ auto props = reply.value(); -+ // Can not use QMap<>::unite(), as it allows multiple values per key -+ for (auto it = props.cbegin(); it != props.cend(); ++it) { -+ m_propertyCache.insert(it.key(), it.value()); -+ } - } else { - qWarning() << "Error getting props:" << reply.error().name() << reply.error().message(); - } -- //qDebug() << "After iface" << iface << ", cache now contains" << m_cache.size() << "items"; -+ //qDebug() << "After iface" << iface << ", cache now contains" << m_propertyCache.size() << "items"; - } - - return m_propertyCache; --- -2.14.3 - diff --git a/0004-Invalidate-property-cache-when-an-interface-is-remov.patch b/0004-Invalidate-property-cache-when-an-interface-is-remov.patch deleted file mode 100644 index df62931..0000000 --- a/0004-Invalidate-property-cache-when-an-interface-is-remov.patch +++ /dev/null @@ -1,43 +0,0 @@ -From 796dea6c044030bc2c02bcfcc967e1fffe9fa276 Mon Sep 17 00:00:00 2001 -From: =?UTF-8?q?Stefan=20Br=C3=BCns?= -Date: Thu, 12 Apr 2018 00:12:54 +0200 -Subject: [PATCH 4/5] Invalidate property cache when an interface is removed - -Summary: -As we do not know which property belongs to which interface we have to -drop the whole cache whenever one or multiples interface are removed. - -Test Plan: -make -solid-hardware5 list details -solid-hardware5 listen - -Reviewers: #frameworks, broulik - -Reviewed By: broulik - -Tags: #frameworks - -Differential Revision: https://phabricator.kde.org/D12126 ---- - src/solid/devices/backends/udisks2/udisksdevicebackend.cpp | 6 ++++++ - 1 file changed, 6 insertions(+) - -diff --git a/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp b/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp -index def7dff..2349d54 100644 ---- a/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp -+++ b/src/solid/devices/backends/udisks2/udisksdevicebackend.cpp -@@ -247,4 +247,10 @@ void DeviceBackend::slotInterfacesRemoved(const QDBusObjectPath &object_path, co - Q_FOREACH (const QString &iface, interfaces) { - m_interfaces.removeAll(iface); - } -+ -+ // We don't know which property belongs to which interface, so remove all -+ m_propertyCache.clear(); -+ if (!m_interfaces.isEmpty()) { -+ allProperties(); -+ } - } --- -2.14.3 - diff --git a/0005-Update-mount-point-after-mount-operations.patch b/0005-Update-mount-point-after-mount-operations.patch deleted file mode 100644 index 177767b..0000000 --- a/0005-Update-mount-point-after-mount-operations.patch +++ /dev/null @@ -1,118 +0,0 @@ -From d735708ff11c40ee6b9bee64544250d55067403f Mon Sep 17 00:00:00 2001 -From: David Edmundson -Date: Tue, 1 May 2018 22:16:28 +0100 -Subject: [PATCH 5/5] Update mount point after mount operations - -Summary: -The order of udisks evaluation has changed from: - -call Mount -propertiesChanged -mount call returns - -call Mount -mount call returns -propertiesChanged - -The mount has finished, but the property is not yet updated. - -Solid caches properties, updating them when they change. This worked -before but due to the re-ordering client code gets "setupDone" requests -the mount point gets an outdated version from the cache and we get -errors. Invalidating the cache causes us to round-trip to the udisks -daemon meaning we'll have the correct values. - -BUG: 370975 - -Test Plan: -Diagnosed but with dbus-monitor trace -Asked someone on the bug report to test this - -Reviewers: #plasma - -Subscribers: #frameworks - -Tags: #frameworks - -Differential Revision: https://phabricator.kde.org/D12648 ---- - src/solid/devices/backends/udisks2/udisksdevice.cpp | 7 +++++++ - src/solid/devices/backends/udisks2/udisksdevice.h | 1 + - src/solid/devices/backends/udisks2/udisksstorageaccess.cpp | 8 ++++---- - 3 files changed, 12 insertions(+), 4 deletions(-) - -diff --git a/src/solid/devices/backends/udisks2/udisksdevice.cpp b/src/solid/devices/backends/udisks2/udisksdevice.cpp -index f3fdfff..0df32be 100644 ---- a/src/solid/devices/backends/udisks2/udisksdevice.cpp -+++ b/src/solid/devices/backends/udisks2/udisksdevice.cpp -@@ -157,6 +157,13 @@ QStringList Device::interfaces() const - return QStringList(); - } - -+void Device::invalidateCache() -+{ -+ if (m_backend) { -+ return m_backend->invalidateProperties(); -+ } -+} -+ - QObject *Device::createDeviceInterface(const Solid::DeviceInterface::Type &type) - { - if (!queryDeviceInterface(type)) { -diff --git a/src/solid/devices/backends/udisks2/udisksdevice.h b/src/solid/devices/backends/udisks2/udisksdevice.h -index 147d554..1492564 100644 ---- a/src/solid/devices/backends/udisks2/udisksdevice.h -+++ b/src/solid/devices/backends/udisks2/udisksdevice.h -@@ -61,6 +61,7 @@ public: - QVariant prop(const QString &key) const; - bool propertyExists(const QString &key) const; - QVariantMap allProperties() const; -+ void invalidateCache(); - - bool hasInterface(const QString &name) const; - QStringList interfaces() const; -diff --git a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp -index 7db2263..d08f35d 100644 ---- a/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp -+++ b/src/solid/devices/backends/udisks2/udisksstorageaccess.cpp -@@ -166,6 +166,7 @@ void StorageAccess::slotDBusReply(const QDBusMessage & /*reply*/) - mount(); - } else { // Don't broadcast setupDone unless the setup is really done. (Fix kde#271156) - m_setupInProgress = false; -+ m_device->invalidateCache(); - m_device->broadcastActionDone("setup"); - - checkAccessibility(); -@@ -191,6 +192,7 @@ void StorageAccess::slotDBusReply(const QDBusMessage & /*reply*/) - } - - m_teardownInProgress = false; -+ m_device->invalidateCache(); - m_device->broadcastActionDone("teardown"); - - checkAccessibility(); -@@ -227,9 +229,8 @@ void StorageAccess::slotSetupDone(int error, const QString &errorString) - { - m_setupInProgress = false; - //qDebug() << "SETUP DONE:" << m_device->udi(); -- emit setupDone(static_cast(error), errorString, m_device->udi()); -- - checkAccessibility(); -+ emit setupDone(static_cast(error), errorString, m_device->udi()); - } - - void StorageAccess::slotTeardownRequested() -@@ -241,9 +242,8 @@ void StorageAccess::slotTeardownRequested() - void StorageAccess::slotTeardownDone(int error, const QString &errorString) - { - m_teardownInProgress = false; -- emit teardownDone(static_cast(error), errorString, m_device->udi()); -- - checkAccessibility(); -+ emit teardownDone(static_cast(error), errorString, m_device->udi()); - } - - bool StorageAccess::mount() --- -2.14.3 - diff --git a/kf5-solid.spec b/kf5-solid.spec index e435204..3135b7e 100644 --- a/kf5-solid.spec +++ b/kf5-solid.spec @@ -1,8 +1,8 @@ %global framework solid Name: kf5-%{framework} -Version: 5.45.0 -Release: 2%{?dist} +Version: 5.46.0 +Release: 1%{?dist} Summary: KDE Frameworks 5 Tier 1 integration module that provides hardware information License: LGPLv2+ @@ -18,11 +18,6 @@ URL: https://solid.kde.org/ Source0: http://download.kde.org/%{stable}/frameworks/%{versiondir}/%{framework}-%{version}.tar.xz ## upstreamable patches -Patch1: 0001-UDisks-Correct-handling-of-removable-file-systems.patch -Patch2: 0002-UDisks-Optimize-several-property-checks.patch -Patch3: 0003-Avoid-creating-duplicate-property-entries-in-the-cac.patch -Patch4: 0004-Invalidate-property-cache-when-an-interface-is-remov.patch -Patch5: 0005-Update-mount-point-after-mount-operations.patch BuildRequires: extra-cmake-modules >= %{version} BuildRequires: kf5-rpm-macros >= %{version} @@ -119,6 +114,9 @@ make install/fast DESTDIR=%{buildroot} -C %{_target_platform} %changelog +* Sat May 05 2018 Rex Dieter - 5.46.0-1 +- 5.46.0 + * Wed May 02 2018 Rex Dieter - 5.45.0-2 - pull in upstream fixes diff --git a/sources b/sources index fec7dad..38d9205 100644 --- a/sources +++ b/sources @@ -1 +1 @@ -SHA512 (solid-5.45.0.tar.xz) = 3b650269b6552e6466ad8edb455c20f930cc777dce64187b535e0889611a69b76044e1ff0f8d33926900aa30764ec17f5637fd5b9fab129e48c106cd3a06ec49 +SHA512 (solid-5.46.0.tar.xz) = 3b5a62f9723cd164a0ee2504e27a650bfae4a9d6b063db08e95d4a2735242092b39cb5b509d28408ca435adce18bf780c22a0acb4c8bf47749c5273edf6ed46c