[SCM] qtlocation packaging branch, ubuntu, updated. debian/5.5.0-1-18-g845e95d

Timo Jyrinki timo at moszumanska.debian.org
Wed Sep 30 08:22:06 UTC 2015


Gitweb-URL: http://git.debian.org/?p=pkg-kde/qt/qtlocation.git;a=commitdiff;h=845e95d

The following commit has been merged in the ubuntu branch:
commit 845e95d530e184de751f41e5bee343a870d40231
Author: Timo Jyrinki <timo.jyrinki at canonical.com>
Date:   Wed Sep 30 08:06:38 2015 +0000

    Replace appSpecificTileCache.diff with two upstream patches
    
    * Replace appSpecificTileCache.diff with two upstream patches:
      - Check-if-GenericCacheLocation-is-writable-before-tru.patch
      - Isolate-the-default-cache-directory.patch
---
 debian/changelog                                   |   5 +-
 ...nericCacheLocation-is-writable-before-tru.patch |  50 +++++++
 .../Isolate-the-default-cache-directory.patch      | 158 +++++++++++++++++++++
 debian/patches/appSpecificTileCache.diff           |  21 ---
 debian/patches/series                              |   6 +-
 5 files changed, 217 insertions(+), 23 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 7d982b0..87cf089 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,4 +1,4 @@
-qtlocation-opensource-src (5.5.0-0ubuntu1) UNRELEASED; urgency=medium
+qtlocation-opensource-src (5.5.0-1ubuntu1) UNRELEASED; urgency=medium
 
   * New upstream release.
   * Update .install files.
@@ -7,6 +7,9 @@ qtlocation-opensource-src (5.5.0-0ubuntu1) UNRELEASED; urgency=medium
   * Skip qmlinterface tests since they fail to use the module.
   * Build depend on libqt5xcbqpa5 to be able to run tests under xvfb.
   * Bump build deps.
+  * Replace appSpecificTileCache.diff with two upstream patches:
+    - Check-if-GenericCacheLocation-is-writable-before-tru.patch
+    - Isolate-the-default-cache-directory.patch
 
  -- Timo Jyrinki <timo-jyrinki at ubuntu.com>  Fri, 27 Mar 2015 07:03:26 +0000
 
diff --git a/debian/patches/Check-if-GenericCacheLocation-is-writable-before-tru.patch b/debian/patches/Check-if-GenericCacheLocation-is-writable-before-tru.patch
new file mode 100644
index 0000000..500a480
--- /dev/null
+++ b/debian/patches/Check-if-GenericCacheLocation-is-writable-before-tru.patch
@@ -0,0 +1,50 @@
+From e9753c6cfd5a0a7fa1c73c19459b815c59a1d6dd Mon Sep 17 00:00:00 2001
+From: Laszlo Agocs <laszlo.agocs at theqtcompany.com>
+Date: Tue, 15 Sep 2015 14:59:07 +0200
+Subject: [PATCH] Check if GenericCacheLocation is writable before trusting it
+
+Enforced application isolation (AppArmor) may make it impossible to write
+to $HOME/.cache as applications are only allowed to use their own specific
+directories (as returned by CacheLocation). QtCore is not able to recognize
+this so the value returned for GenericCacheLocation is still non-empty in
+this case. Therefore do a write check.
+
+Task-number: QTBUG-41187
+Change-Id: I6ad136abc69997d25715dcdbbc1b8ffb55ec65e0
+Reviewed-by: Alberto Mardegan <mardy at users.sourceforge.net>
+Reviewed-by: Alex Blasche <alexander.blasche at theqtcompany.com>
+---
+ src/location/maps/qgeotilecache.cpp | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+diff --git a/src/location/maps/qgeotilecache.cpp b/src/location/maps/qgeotilecache.cpp
+index 3da2865..01cfcba 100644
+--- a/src/location/maps/qgeotilecache.cpp
++++ b/src/location/maps/qgeotilecache.cpp
+@@ -468,6 +468,23 @@ QString QGeoTileCache::baseCacheDirectory()
+     // If this is not supported by the platform, use the application-specific cache
+     // location. (e.g. ~/.cache/<app_name>/QtLocation)
+     dir = QStandardPaths::writableLocation(QStandardPaths::GenericCacheLocation);
++
++    if (!dir.isEmpty()) {
++        // The shared cache may not be writable when application isolation is enforced.
++        static bool writable = false;
++        static bool writableChecked = false;
++        if (!writableChecked) {
++            writableChecked = true;
++            QDir::root().mkpath(dir);
++            QFile writeTestFile(QDir(dir).filePath(QStringLiteral("qt_cache_check")));
++            writable = writeTestFile.open(QIODevice::WriteOnly);
++            if (writable)
++                writeTestFile.remove();
++        }
++        if (!writable)
++            dir = QString();
++    }
++
+     if (dir.isEmpty())
+         dir = QStandardPaths::writableLocation(QStandardPaths::CacheLocation);
+ 
+-- 
+2.5.0
+
diff --git a/debian/patches/Isolate-the-default-cache-directory.patch b/debian/patches/Isolate-the-default-cache-directory.patch
new file mode 100644
index 0000000..db4e764
--- /dev/null
+++ b/debian/patches/Isolate-the-default-cache-directory.patch
@@ -0,0 +1,158 @@
+From a99b8ced41b2c634598ce70fe69036a0ed34e9ba Mon Sep 17 00:00:00 2001
+From: Laszlo Agocs <laszlo.agocs at theqtcompany.com>
+Date: Mon, 14 Sep 2015 12:15:17 +0200
+Subject: [PATCH] Isolate the default cache directory
+
+Instead of having it in several random places, have a central function
+that contains all the cache directory selection logic.
+
+As per QtCore docs GenericCacheLocation can be empty so introduce a fallback
+to CacheLocation (the app-specific, non-shared location) in case some
+future platform does not support the former.
+
+Task-number: QTBUG-41187
+Change-Id: Icfe5e8926e917483ac11844f625244318ff815c7
+Reviewed-by: Alex Blasche <alexander.blasche at theqtcompany.com>
+---
+ src/location/doc/src/plugins/nokia.qdoc            |  4 ++-
+ src/location/doc/src/plugins/osm.qdoc              |  8 ++++++
+ src/location/maps/qgeotilecache.cpp                | 30 ++++++++++++++++------
+ src/location/maps/qgeotilecache_p.h                |  2 ++
+ .../maps/qgeotiledmappingmanagerengine.cpp         |  6 ++---
+ .../nokia/qgeotiledmappingmanagerengine_nokia.cpp  |  3 +--
+ 6 files changed, 38 insertions(+), 15 deletions(-)
+
+diff --git a/src/location/doc/src/plugins/nokia.qdoc b/src/location/doc/src/plugins/nokia.qdoc
+index f1a6828..1ed5e6e 100644
+--- a/src/location/doc/src/plugins/nokia.qdoc
++++ b/src/location/doc/src/plugins/nokia.qdoc
+@@ -92,7 +92,9 @@ a prefix.
+     \li here.mapping.cache.directory
+     \li Absolute path to map tile cache directory used as network disk cache.
+ 
+-    Default place for the cache is "QtLocation" directory in \l {QStandardPaths::writableLocation()} {QStandardPaths::writableLocation}(\l{QStandardPaths::GenericCacheLocation}).
++    The default place for the cache is 
-- 
qtlocation packaging



More information about the pkg-kde-commits mailing list