[PATCH] deb: Use dh2_python rather then cdbs to build Debian/Ubuntu packages

Steven Dake sdake at redhat.com
Tue Jun 19 02:36:18 UTC 2012


This patch updates the debian packaging to more appropriately match
what is expected in a multi-python environment.  While this only builds
python 2.x binaries, the previous debian oz packages didn't work at all on
modern Debian or Ubuntu systems because of the pyshared usage.  This resulted
in an error about TDL.py not being importable.

I also removed cdbs since it is not necessary to get the job done.

Signed-off-by: Steven Dake <sdake at redhat.com>
---
 debian/changelog |    5 +++++
 debian/control   |   18 ++++++++----------
 debian/rules     |   15 +++++++++++----
 3 files changed, 24 insertions(+), 14 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index 0d269eb..90d5a3c 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,8 @@
+oz (0.9.0-1) unstable; urgency=low
+  * Updated to match more modern ubuntu packaging standards.
+
+ -- Steven Dake <sdake at redhat.com>  Mon, 18 Jun 2012 19:14:25 -0700
+  
 oz (0.7.0-5) unstable; urgency=low
 
   * Initial Release.
diff --git a/debian/control b/debian/control
index 90403ac..6aa5119 100644
--- a/debian/control
+++ b/debian/control
@@ -1,21 +1,19 @@
 Source: oz
-Section: utils
-Priority: extra
 Maintainer: Richard Jones <rjones at redhat.com>
-Build-Depends: debhelper (>= 7.0.50~), cdbs,
- python (>= 2.5)
-Standards-Version: 3.8.4
+Section: python
+Priority: optional
+Build-Depends: debhelper (>= 7.4.3), python-all (>= 2.6.6-3)
+Standards-Version: 3.9.3
 Homepage: http://aeolusproject.org/oz.html
 Vcs-Git: git://github.com/clalancette/oz.git
-#Vcs-Browser: http://git.debian.org/?p=collab-maint/oz.git;a=summary
-XS-Python-Version: ${python:Versions}
+X-Python-Version: >= 2.6
 
 Package: oz
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends},
- python (>= 2.5),
-# for gvnccapture, but only packaged in Sid:
+ python (>= 2.6.6-3),
  genisoimage,
+# for gvnccapture, but only packaged in Sid:
  gvncviewer,
  libvirt-dev,
  mtools,
@@ -27,6 +25,6 @@ Depends: ${misc:Depends}, ${python:Depends},
  python-numpy,
  python-m2crypto,
  python-parted
-Description: installing guest OSs with only minimal input the user
+Description: Installing guest OSs with only minimal input the user
  Oz is a tool for automatically installing guest OSs with only minimal
  up-front input from the user.
diff --git a/debian/rules b/debian/rules
index 1eda7a7..e829d28 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,11 +1,17 @@
 #!/usr/bin/make -f
 
-DEB_PYTHON_SYSTEM=pysupport
+#DH_VERBOSE=1
 
-include /usr/share/cdbs/1/rules/debhelper.mk
-include /usr/share/cdbs/1/class/python-distutils.mk
+PYTHON2=$(shell pyversions -vr)
+
+%:
+	dh $@ --buildsystem=python_distutils --with=python2
+
+override_dh_auto_clean:
+	dh_auto_clean
+	rm -rf build
+	rm -rf *.egg-info
 
-# Add here any variable or target overrides you need.
 install/oz::
 	mkdir -p debian/oz/var/lib/oz/isocontent/
 	mkdir -p debian/oz/var/lib/oz/isos/
@@ -16,3 +22,4 @@ install/oz::
 	mkdir -p debian/oz/var/lib/oz/kernels/
 	mkdir -p debian/oz/etc/oz
 	install -m 0644 oz.cfg debian/oz/etc/oz/
+
-- 
1.7.7.6




More information about the aeolus-devel mailing list