Attached is a patch of the patch posted by Neil Mayhew integrated into
the Debian build system.

This should make it easy for anyone who wishes to package the changes
themselves, or for any Debian devs to create a non-maintainer upload.

Thanks!
diff -uNr debian.org/changelog debian/changelog
--- debian.org/changelog	2009-07-16 18:46:27.000000000 -0600
+++ debian/changelog	2009-07-16 18:52:53.000000000 -0600
@@ -1,3 +1,10 @@
+rubber (1.1-2.3) unstable; urgency=low
+
+  * Non-maintainer upload.
+  * Use hashlib instead of md5 module (closes: #520048)
+
+ -- David Mohr <squis...@alucardo.nd.mcbf.net>  Thu, 16 Jul 2009 18:11:24 -0600
+
 rubber (1.1-2.2) unstable; urgency=medium
 
   * Non-maintainer upload.
diff -uNr debian.org/control debian/control
--- debian.org/control	2009-07-16 18:46:27.000000000 -0600
+++ debian/control	2009-07-16 18:37:59.000000000 -0600
@@ -3,7 +3,7 @@
 Priority: optional
 Maintainer: Emmanuel Beffara <m...@beffara.org>
 Uploaders: Baruch Even <bar...@debian.org>
-Build-Depends: debhelper (>= 5.0.37.2)
+Build-Depends: debhelper (>= 5.0.37.2), quilt
 Build-Depends-Indep: python, texinfo, python-support (>=0.5.3)
 XB-Python-Version: all
 Standards-Version: 3.8.0
diff -uNr debian.org/patches/01-hashlib.patch debian/patches/01-hashlib.patch
--- debian.org/patches/01-hashlib.patch	1969-12-31 17:00:00.000000000 -0700
+++ debian/patches/01-hashlib.patch	2009-07-16 18:26:09.000000000 -0600
@@ -0,0 +1,20 @@
+--- rubber-1.1/src/util.py	2009-07-16 18:12:33.000000000 -0600
++++ rubber-1.1/src/util.py.new	2009-07-16 18:12:46.000000000 -0600
+@@ -5,7 +5,7 @@
+ by the modules for various tasks.
+ """
+ 
+-import md5
++import hashlib
+ import os, stat, time
+ import imp
+ import re, string
+@@ -19,7 +19,7 @@
+ 	"""
+ 	Compute the MD5 sum of a given file.
+ 	"""
+-	m = md5.new()
++	m = hashlib.md5()
+ 	file = open(fname)
+ 	for line in file.readlines():
+ 		m.update(line)
diff -uNr debian.org/patches/series debian/patches/series
--- debian.org/patches/series	1969-12-31 17:00:00.000000000 -0700
+++ debian/patches/series	2009-07-16 18:29:01.000000000 -0600
@@ -0,0 +1 @@
+01-hashlib.patch
diff -uNr debian.org/rules debian/rules
--- debian.org/rules	2009-07-16 18:46:27.000000000 -0600
+++ debian/rules	2009-07-16 18:22:50.000000000 -0600
@@ -12,6 +12,7 @@
 
 build-stamp:  settings.py
 	dh_testdir
+	dh_quilt_patch
 	$(MAKE)
 	touch build-stamp
 
@@ -20,6 +21,7 @@
 	dh_testroot
 	rm -f build-stamp 
 	-$(MAKE) distclean
+	dh_quilt_unpatch
 	dh_clean
 
 install: build

Reply via email to