--- Begin Message ---
Package: release.debian.org
Severity: normal
User: release.debian.org@packages.debian.org
Usertags: unblock
Please unblock package qreator
Fixes for 2 RC bugs: #725827 and #779265
unblock qreator/13.05.3-4
-- System Information:
Debian Release: stretch/sid
APT prefers yakkety-updates
APT policy: (500, 'yakkety-updates'), (500, 'yakkety-security'), (500, 'yakkety'), (100, 'yakkety-backports')
Architecture: amd64 (x86_64)
Foreign Architectures: i386
Kernel: Linux 4.9.0-hyper1+ (SMP w/4 CPU cores)
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash
Init: systemd (via /run/systemd/system)
--
Kind regards,
Loong Jin
diff --git a/debian/changelog b/debian/changelog
index bcca874..ce79e7f 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,20 @@
+qreator (13.05.3-4) unstable; urgency=medium
+
+ * [5879985] Use geoclue-2.0 instead of geoclue.
+ geoclue is gone from sid.
+
+ -- Chow Loong Jin <hyperair@debian.org> Mon, 16 Jan 2017 07:32:10 +0800
+
+qreator (13.05.3-3) unstable; urgency=medium
+
+ * [20d6c68] Fix debian/watch
+ * [1289a78] Depend on geoclue-ubuntu-geoip | geoclue-hostip
+ qreator won't start without at least one of these. (Closes: #725827)
+ * [5c40090] Depend on python-gi-cairo (Closes: #779265)
+ * [a0c6640] Fix exception from PIL deprecated method
+
+ -- Chow Loong Jin <hyperair@debian.org> Sun, 15 Jan 2017 10:14:21 +0800
+
qreator (13.05.3-2) unstable; urgency=low
* [aec84f6] Expand package description to differentiate from qrencode
diff --git a/debian/control b/debian/control
index 14c4bb3..d867043 100644
--- a/debian/control
+++ b/debian/control
@@ -13,13 +13,15 @@ Vcs-Browser: http://git.debian.org/?p=collab-maint/qreator.git;a=summary
Package: qreator
Architecture: all
Depends: ${python:Depends}, ${misc:Depends},
- python-imaging,
+ python-imaging (>= 2.0.0),
python-cairo,
python-dbus,
python-defer,
python-gi,
+ python-gi-cairo,
gir1.2-champlain-0.12,
gir1.2-clutter-1.0,
+ gir1.2-geoclue-2.0,
gir1.2-glib-2.0,
gir1.2-gdkpixbuf-2.0,
gir1.2-gtk-3.0,
@@ -30,7 +32,8 @@ Depends: ${python:Depends}, ${misc:Depends},
python-qrencode,
python-requests,
python-vobject,
- python-xdg
+ python-xdg,
+ geoclue-2.0
Description: graphical utility for creating QR codes
Qreator enables you to easily create your own QR codes to encode different
types of information in an efficient, compact and cool way.
diff --git a/debian/patches/Fix-usage-of-PIL-deprecated-method.patch b/debian/patches/Fix-usage-of-PIL-deprecated-method.patch
new file mode 100644
index 0000000..e75af18
--- /dev/null
+++ b/debian/patches/Fix-usage-of-PIL-deprecated-method.patch
@@ -0,0 +1,21 @@
+From: Chow Loong Jin <hyperair@debian.org>
+Date: Sun, 15 Jan 2017 09:43:31 +0800
+Subject: Fix usage of PIL deprecated method
+
+---
+ qreator/QRCode.py | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/qreator/QRCode.py b/qreator/QRCode.py
+index 84c508a..d3a0130 100644
+--- a/qreator/QRCode.py
++++ b/qreator/QRCode.py
+@@ -73,7 +73,7 @@ class QRCode(object):
+ # Notice the conversion to BGRA that Cairo expects
+ # See http://cairographics.org/pythoncairopil/ and
+ # http://mail.gnome.org/archives/gtkmm-list/2007-May/msg00111.html
+- bytearr = array.array('B', self.image.tostring("raw", "BGRA", 0, 1))
++ bytearr = array.array('B', self.image.tobytes("raw", "BGRA", 0, 1))
+ height, width = self.image.size
+ #print self.image.size
+
diff --git a/debian/patches/Port-to-geoclue-2.0.patch b/debian/patches/Port-to-geoclue-2.0.patch
new file mode 100644
index 0000000..82823de
--- /dev/null
+++ b/debian/patches/Port-to-geoclue-2.0.patch
@@ -0,0 +1,70 @@
+From: Chow Loong Jin <hyperair@debian.org>
+Date: Sun, 15 Jan 2017 23:45:17 +0800
+Subject: Port to geoclue-2.0
+
+geoclue has been removed from Debian.
+---
+ qreator/qrcodes/QRCodeLocationGtk.py | 46 ++++++++++--------------------------
+ 1 file changed, 12 insertions(+), 34 deletions(-)
+
+diff --git a/qreator/qrcodes/QRCodeLocationGtk.py b/qreator/qrcodes/QRCodeLocationGtk.py
+index 9adb634..c6b144f 100644
+--- a/qreator/qrcodes/QRCodeLocationGtk.py
++++ b/qreator/qrcodes/QRCodeLocationGtk.py
+@@ -14,6 +14,7 @@
+ # with this program. If not, see <http://www.gnu.org/licenses/>.
+ ### END LICENSE
+
++import gi
+ from gi.repository import Gtk, GtkChamplain, Clutter, Champlain
+ from qreator_lib.helpers import get_data_file
+ from gi.repository import GtkClutter
+@@ -83,37 +84,14 @@ class QRCodeLocationGtk(object):
+
+
+ def get_current_location():
+- '''Gets the current location from geolocation via IP (only method
+- currently supported)'''
+- #import Geoclue
+- #POS_PROVIDER = 'Ubuntu GeoIP'
+- #location = Geoclue.DiscoverLocation()
+- #location.init()
+- #location.set_position_provider(POS_PROVIDER)
+- #position = location.get_location_info()
+-
+- import dbus
+- bus = dbus.SessionBus()
+-
+- # For now we default to the UbuntuGeoIP provider and we fall back to
+- # Hostip. We should probably be cleverer about provider detection, but
+- # this solution works for now and does not rely solely on UbuntuGeoIP,
+- # which means qreator can run on other distros
+- try:
+- geoclue = bus.get_object(
+- 'org.freedesktop.Geoclue.Providers.UbuntuGeoIP',
+- '/org/freedesktop/Geoclue/Providers/UbuntuGeoIP')
+- except dbus.exceptions.DBusException:
+- geoclue = bus.get_object(
+- 'org.freedesktop.Geoclue.Providers.Hostip',
+- '/org/freedesktop/Geoclue/Providers/Hostip')
+- position_info = geoclue.GetPosition(
+- dbus_interface='org.freedesktop.Geoclue.Position')
+-
+- position = {}
+- position['timestamp'] = position_info[1]
+- position['latitude'] = position_info[2]
+- position['longitude'] = position_info[3]
+- position['altitude'] = position_info[4]
+-
+- return position['latitude'], position['longitude']
++ '''Gets the current location from geolocation via using Geoclue-2.0'''
++
++ gi.require_version('Geoclue', '2.0')
++ from gi.repository import Geoclue
++
++ geoclue_simple = Geoclue.Simple.new_sync(
++ 'qreator', Geoclue.AccuracyLevel.EXACT)
++ location = geoclue_simple.get_location()
++
++ return (location.get_property('latitude'),
++ location.get_property('longitude'))
diff --git a/debian/patches/series b/debian/patches/series
index a86553a..db3909b 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,2 +1,4 @@
Use-icon-name-in-desktop-file.patch
Amend-PROJECT_ROOT_DIRECTORY.patch
+Fix-usage-of-PIL-deprecated-method.patch
+Port-to-geoclue-2.0.patch
diff --git a/debian/watch b/debian/watch
index 9f47553..3625e84 100644
--- a/debian/watch
+++ b/debian/watch
@@ -1,3 +1,3 @@
version=3
-https://launchpad.net/qreator/+download .*/qreator-.+\.tar\.gz
+https://launchpad.net/qreator/+download .*/qreator_(.+)\.tar\.gz
--- End Message ---