Tags: patch

Initial patch could look like this, which seems to work.  (I wish I could
find a better way to do this with CDBS "natively".)

-Kees

-- 
Kees Cook                                            @debian.org
diff -u python-crypto-2.0.1+dfsg1/debian/rules python-crypto-2.0.1+dfsg1/debian/rules
--- python-crypto-2.0.1+dfsg1/debian/rules
+++ python-crypto-2.0.1+dfsg1/debian/rules
@@ -12,6 +12,11 @@
 common-build-arch::
 	cd Doc && $(MKHOWTO) --ps
 
+build/python-crypto::
+	for i in $(cdbs_python_build_versions); do \
+	  python$$i ./test.py; \
+	done
+
 $(patsubst %,binary-post-install/%,$(DEB_PYTHON_REAL_LIB_PACKAGES)):: 
 	sh -e debian/pathmangle.sh /usr/bin/$(shell echo $(cdbs_curpkg) | sed 's,-crypto$$,,') debian/$(cdbs_curpkg)
 
+++ python-crypto-2.0.1+dfsg1/test.py
@@ -35,4 +35,8 @@
 if args: test.TestBlockModules(args, verbose= not quiet)
 else: test.TestBlockModules(verbose= not quiet)
 
-
+import subprocess
+os.chdir('test')
+os.environ['PYTHONPATH'] = sys.path[0] + ':' + sys.path[1]
+for unit in ['test_arc2_buffer_overflow.py']:
+    if subprocess.call(['python',unit,'-v']) != 0: sys.exit(1)

Reply via email to