Package: redshift
Version: 1.7-2.1
Severity: wishlist

Hi.

the geoclue provider seems problematic (see 
https://bugs.launchpad.net/redshift/+bug/808006 for instance), but I've found a 
way to make it work.

So my suggestion would be to enable it in the packaging.

The changes may need adjusting the DEFAULT_PROVIDER and DEFAULT_PROVIDER_PATH 
in src/location-geoclue.c, too.

With the provided changes (see attachment for a quick and dirty repackaging), 
I'm able to use it with :
gtk-redshift -l 
geoclue:name=org.freedesktop.Geoclue.Providers.Hostip:path=/org/freedesktop/Geoclue/Providers/Hostip

Note that I have registered my IP at hotip.info, which helps ;-)

Hope this helps.

Best regards,

-- System Information:
Debian Release: 7.0
  APT prefers testing
  APT policy: (900, 'testing')
Architecture: i386 (i686)

Kernel: Linux 3.2.0-4-686-pae (SMP w/2 CPU cores)
Locale: LANG=fr_FR.utf8, LC_CTYPE=fr_FR.utf8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/dash

Versions of packages redshift depends on:
ii  gconf-service     3.2.5-1+build1
ii  libc6             2.13-37
ii  libdbus-1-3       1.6.8-1
ii  libdbus-glib-1-2  0.100-1
ii  libgconf-2-4      3.2.5-1+build1
ii  libgeoclue0       0.12.0-4
ii  libglib2.0-0      2.33.12+really2.32.4-3
ii  libx11-6          2:1.5.0-1
ii  libxcb-randr0     1.8.1-2
ii  libxcb1           1.8.1-2
ii  libxml2           2.8.0+dfsg1-7
ii  libxxf86vm1       1:1.1.2-1

redshift recommends no packages.

redshift suggests no packages.

-- debconf-show failed
diff -Nru redshift-1.7/debian/changelog redshift-1.7/debian/changelog
--- redshift-1.7/debian/changelog	2012-06-16 19:44:21.000000000 +0200
+++ redshift-1.7/debian/changelog	2013-02-12 11:48:21.000000000 +0100
@@ -1,3 +1,9 @@
+redshift (1.7-2.1) UNRELEASED; urgency=low
+
+  * Add geoclue support
+
+ -- Olivier Berger <[email protected]>  Tue, 12 Feb 2013 11:47:40 +0100
+
 redshift (1.7-2) unstable; urgency=low
 
   * Changed dependency from python (>= 2.6.6-3~) to ${python:Depends}
diff -Nru redshift-1.7/debian/control redshift-1.7/debian/control
--- redshift-1.7/debian/control	2012-06-16 18:56:53.000000000 +0200
+++ redshift-1.7/debian/control	2013-02-12 11:48:45.000000000 +0100
@@ -2,7 +2,7 @@
 Section: x11
 Priority: extra
 Maintainer: Franziska Lichtblau <[email protected]>
-Build-Depends: debhelper (>= 7.0.50~), autotools-dev (>= 20100122.1~), pkg-config (>= 0.25), dpkg-dev (>= 1.16.1~), libx11-dev, libxcb-randr0-dev, libxxf86vm-dev, libgconf2-dev, python (>= 2.6.6-3~)
+Build-Depends: debhelper (>= 7.0.50~), autotools-dev (>= 20100122.1~), pkg-config (>= 0.25), dpkg-dev (>= 1.16.1~), libx11-dev, libxcb-randr0-dev, libxxf86vm-dev, libgconf2-dev, python (>= 2.6.6-3~), libgeoclue-dev
 XS-Python-Version: >= 2.6
 Standards-Version: 3.9.3 
 Vcs-Git: git://anonscm.debian.org/users/rhalina-guest/redshift.git
diff -Nru redshift-1.7/debian/patches/redshift-1.7srclocation-geoclue.c redshift-1.7/debian/patches/redshift-1.7srclocation-geoclue.c
--- redshift-1.7/debian/patches/redshift-1.7srclocation-geoclue.c	1970-01-01 01:00:00.000000000 +0100
+++ redshift-1.7/debian/patches/redshift-1.7srclocation-geoclue.c	2013-02-12 12:10:48.000000000 +0100
@@ -0,0 +1,40 @@
+Description: <short summary of the patch>
+ TODO: Put a short summary on the line above and replace this paragraph
+ with a longer explanation of this change. Complete the meta-information
+ with other relevant fields (see below for details). To make it easier, the
+ information below has been extracted from the changelog. Adjust it or drop
+ it.
+ .
+ redshift (1.7-2.1) UNRELEASED; urgency=low
+ .
+   * Add geoclue support
+Author: Olivier Berger <[email protected]>
+
+---
+The information above should follow the Patch Tagging Guidelines, please
+checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
+are templates for supplementary fields that you might want to add:
+
+Origin: <vendor|upstream|other>, <url of original patch>
+Bug: <url in upstream bugtracker>
+Bug-Debian: http://bugs.debian.org/<bugnumber>
+Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
+Forwarded: <no|not-needed|url proving that it has been forwarded>
+Reviewed-By: <name and email of someone who approved the patch>
+Last-Update: <YYYY-MM-DD>
+
+--- redshift-1.7.orig/src/location-geoclue.c
++++ redshift-1.7/src/location-geoclue.c
+@@ -32,8 +32,11 @@
+ # define _(s) s
+ #endif
+ 
+-#define DEFAULT_PROVIDER "org.freedesktop.Geoclue.Providers.UbuntuGeoIP"
++/*#define DEFAULT_PROVIDER "org.freedesktop.Geoclue.Providers.UbuntuGeoIP"
+ #define DEFAULT_PROVIDER_PATH "/org/freedesktop/Geoclue/Providers/UbuntuGeoIP"
++*/
++#define DEFAULT_PROVIDER "org.freedesktop.Geoclue.Providers.Hostip"
++#define DEFAULT_PROVIDER_PATH "/org/freedesktop/Geoclue/Providers/Hostip"
+ 
+ int
+ location_geoclue_init(location_geoclue_state_t *state)
diff -Nru redshift-1.7/debian/patches/series redshift-1.7/debian/patches/series
--- redshift-1.7/debian/patches/series	2012-06-16 15:21:48.000000000 +0200
+++ redshift-1.7/debian/patches/series	2013-02-12 12:10:48.000000000 +0100
@@ -1 +1,2 @@
 remove_autostart.patch
+redshift-1.7srclocation-geoclue.c
diff -Nru redshift-1.7/debian/rules redshift-1.7/debian/rules
--- redshift-1.7/debian/rules	2012-06-16 18:56:53.000000000 +0200
+++ redshift-1.7/debian/rules	2013-02-12 11:48:54.000000000 +0100
@@ -9,7 +9,7 @@
 	dh $@ --with autotools_dev --with python2
 
 override_dh_auto_configure:
-	dh_auto_configure -- --enable-randr --enable-vidmode --enable-gnome-clock
+	dh_auto_configure -- --enable-randr --enable-vidmode --enable-gnome-clock --enable-geoclue
 
 override_dh_installchangelogs:
 	dh_installchangelogs NEWS

Reply via email to