Package: unbound
Version: 1.4.9-2
Severity: important
Tags: patch

Currently unbound will FTBFS once the default Python version is switched to
python2.7 (which will happen during the wheezy development cycle).  The
attached patch will make it so unbound will not FTBFS and can be updated to
the new default via binNMU.
diff -Nru unbound-1.4.9/debian/changelog unbound-1.4.9/debian/changelog
--- unbound-1.4.9/debian/changelog	2011-04-03 14:32:31.000000000 -0400
+++ unbound-1.4.9/debian/changelog	2011-05-03 23:45:33.000000000 -0400
@@ -1,3 +1,13 @@
+unbound (1.4.9-3) unstable; urgency=low
+
+  * Make package binNMUable for default python version change
+    - Generalize install rule in debian/python-unbound.install
+    - Use pyversions -d to determine where to install .so files instead of
+      hard coding python2.6
+    - Remove hard coded XB-Python-Version: 2.6 from debian/control
+
+ -- Scott Kitterman <sc...@kitterman.com>  Tue, 03 May 2011 23:43:18 -0400
+
 unbound (1.4.9-2) unstable; urgency=low
 
   * Build-depend on libldns-dev (>= 1.6.9-2~) for GOST support.
diff -Nru unbound-1.4.9/debian/control unbound-1.4.9/debian/control
--- unbound-1.4.9/debian/control	2011-04-03 14:32:31.000000000 -0400
+++ unbound-1.4.9/debian/control	2011-05-03 23:46:25.000000000 -0400
@@ -56,7 +57,6 @@
 Section: python
 Architecture: any
 Depends: ${shlibs:Depends}, ${misc:Depends}, ${python:Depends}
-XB-Python-Version: 2.6
 Description: library implementing DNS resolution and validation (Python bindings)
  Python extension module for libunbound.
  .
diff -Nru unbound-1.4.9/debian/python-unbound.dirs unbound-1.4.9/debian/python-unbound.dirs
--- unbound-1.4.9/debian/python-unbound.dirs	2011-04-03 14:32:31.000000000 -0400
+++ unbound-1.4.9/debian/python-unbound.dirs	2011-05-04 00:00:55.000000000 -0400
@@ -1,2 +1,2 @@
-usr/lib/pyshared/python2.6
+usr/lib/pyshared
 usr/share/pyshared
diff -Nru unbound-1.4.9/debian/python-unbound.install unbound-1.4.9/debian/python-unbound.install
--- unbound-1.4.9/debian/python-unbound.install	2011-04-03 14:32:31.000000000 -0400
+++ unbound-1.4.9/debian/python-unbound.install	2011-05-03 23:45:54.000000000 -0400
@@ -1 +1 @@
-usr/lib/python2.6/dist-packages/unbound.py usr/share/pyshared
+usr/lib/python2.*/dist-packages/unbound.py usr/share/pyshared
diff -Nru unbound-1.4.9/debian/rules unbound-1.4.9/debian/rules
--- unbound-1.4.9/debian/rules	2011-04-03 14:32:31.000000000 -0400
+++ unbound-1.4.9/debian/rules	2011-05-03 23:48:18.000000000 -0400
@@ -3,6 +3,8 @@
 %:
 	dh $@
 
+PYVERS := $(shell pyversions -d)
+
 build: build-stamp
 build-stamp:
 	dh build --before configure
@@ -31,8 +33,9 @@
 	rm -f _unbound.la
 	sed -i -e 's/^dependency_libs=.*/dependency_libs=''/' libunbound.la
 	make _unbound.la LIBS=""
+	mkdir $(CURDIR)/debian/python-unbound/usr/lib/pyshared/$(PYVERS)
 	install -m 0644 .libs/_unbound.so.2.*.* \
-		debian/python-unbound/usr/lib/pyshared/python2.6/_unbound.so
+		$(CURDIR)/debian/python-unbound/usr/lib/pyshared/$(PYVERS)/_unbound.so
 
 binary-arch: install
 	dh binary-arch

Reply via email to