Package: python-flickrapi
Version: 1.2-3.1
Severity: wishlist
Tags: patch

I've just uploaded a NMU with this patch to the 2 day delayed queue,
to fix what I believe is a release critical bug in python-flickrapi.
As far as I can tell, bug #769722 make the python module useless, as
it is no longer able to talk to Flickr.  This NMU fixes the problem
and get the module working again.  The same problem also affect
Wheezy, and should probably be fixed there too.  I discovered the
problem because creepy in Wheezy were no longer able to look up data
on Flickr, and later noticed the problem also was present in Jessie.

I had to change the build system slightly (add --prefix=/usr) to get
the package building properly in Jessie, and added the missing
dependency placeholder mentioned by lintian.  My goal is to get this
package into Jessie, so I limited the changes to the bare minimum
needed to get the package working.  The debdiff of source packages
show other changes in addition to the ones in the attached patch, but
those are generated during the build and not done by me.

An unblock request should be sent as soon as the NMU enter unstable.

-- 
Happy hacking
Petter Reinholdtsen
--- python-flickrapi-1.2/debian/changelog
+++ python-flickrapi-1.2/debian/changelog
@@ -1,3 +1,14 @@
+python-flickrapi (1.2-3.1) unstable; urgency=low
+
+  * Non-maintainer upload to get module working again.
+  * Change API URLs from http to https to get them working with the
+    current Flickr API where SSL is required (Closes: #769722).
+  * Add missing ${misc:Depends} to dependency list.
+  * Add --prefix=/usr to setup run in rules file to make sure the
+    documentation end up in /usr/share/doc/, not /usr/local/share/doc/.
+
+ -- Petter Reinholdtsen <[email protected]>  Mon, 17 Nov 2014 21:48:46 +0100
+
 python-flickrapi (1.2-3) unstable; urgency=low
 
   * Improved package long description (closes: #531014)
diff -u python-flickrapi-1.2/debian/control python-flickrapi-1.2/debian/control
--- python-flickrapi-1.2/debian/control
+++ python-flickrapi-1.2/debian/control
@@ -13,7 +13,7 @@
 Package: python-flickrapi
 Architecture: all
 XB-Python-Version: ${python:Versions}
-Depends: ${python:Depends},
+Depends: ${python:Depends}, ${misc:Depends}
 Description: Flickr API wrapper for Python
  Python-flickrapi is a complete and easy to use Python
  module for interfacing with the Flickr API (see
diff -u python-flickrapi-1.2/debian/rules python-flickrapi-1.2/debian/rules
--- python-flickrapi-1.2/debian/rules
+++ python-flickrapi-1.2/debian/rules
@@ -21,7 +21,7 @@
        dh_installdirs
        set -e; \
        for python in $(PYVERS); do \
-           $$python setup.py install --root=$(d);\
+           $$python setup.py install --root=$(d) --prefix=/usr ;\
        done
 
 binary-indep: build install
diff -u python-flickrapi-1.2/debian/changelog 
python-flickrapi-1.2/debian/changelog
--- python-flickrapi-1.2.orig/flickrapi/__init__.py
+++ python-flickrapi-1.2/flickrapi/__init__.py
@@ -386,7 +386,7 @@
         if self.cache and self.cache.get(post_data):
             return self.cache.get(post_data)
 
-        url = "http://"; + FlickrAPI.flickr_host + FlickrAPI.flickr_rest_form
+        url = "https://"; + FlickrAPI.flickr_host + FlickrAPI.flickr_rest_form
         flicksocket = urllib.urlopen(url, post_data)
         reply = flicksocket.read()
         flicksocket.close()
@@ -440,7 +440,7 @@
                     "frob": frob,
                     "perms": perms})
 
-        return "http://%s%s?%s"; % (FlickrAPI.flickr_host, \
+        return "https://%s%s?%s"; % (FlickrAPI.flickr_host, \
             FlickrAPI.flickr_auth_form, encoded)
 
     def web_login_url(self, perms):
@@ -454,7 +454,7 @@
                     "api_key": self.api_key,
                     "perms": perms})
 
-        return "http://%s%s?%s"; % (FlickrAPI.flickr_host, \
+        return "https://%s%s?%s"; % (FlickrAPI.flickr_host, \
             FlickrAPI.flickr_auth_form, encoded)
 
     def __extract_upload_response_format(self, kwargs):
@@ -578,7 +578,7 @@
         
         if self.secret:
             kwargs["api_sig"] = self.sign(kwargs)
-        url = "http://%s%s"; % (FlickrAPI.flickr_host, form_url)
+        url = "https://%s%s"; % (FlickrAPI.flickr_host, form_url)
 
         # construct POST data
         body = Multipart()

Reply via email to