On 01/03/11 23:04, Piotr Ożarowski wrote:
> Hi Julian,
> 
> [nore...@alioth.debian.org, 2011-03-01]
>> I would like to join the python modules team to help packaging python 
>> modules.
>> My prime interest right now is updating the foolscap module, required by bug 
>> #591384.
> 
> great, welcome on board, note that I already pinged my sponsoree about
> foolscap's new upstream version, no response yet, though. DPMT is in
> Maintainer field so feel free to update it in the repo and ping me to
> check & upload it

Hi,
I finished the packaging of 0.6.1. It should be pretty solid.
Major changes are quilt, dh --with python2, and DEP5 copyright (see
changelog).

The only problem is I have not found a way to execute the trial test
driver (from twisted) for multiple python versions. python setup.py test
does not seem to work.
Maybe you know how if this is possible with trial?

Anyhow I have not commit it to the repo as my first attempt went
disastrously wrong (see r15939-r15942, hopefully I have reverted it
correctly).
Can the changes simply be committed to the repo without any extra tools?

Before I screw up more, I just attach the patch to the debian directory
to this mail (0001-New-upstream-release-Closes-591384.patch)
I'll be grateful for a review.

Best Regards,
Julian Taylor
From 3d317c325f58a2a6847aff93a9ef461854be270a Mon Sep 17 00:00:00 2001
From: Julian Taylor <jtaylor.deb...@googlemail.com>
Date: Wed, 2 Mar 2011 00:02:10 +0100
Subject: [PATCH] * New upstream release (Closes: #591384)
 * updated copyright to DEP5
 * no repackaging anymore
   - the removed source is BSD licensed so it is not required
 * change to debhelper compat 7, depend on 7.0.50~
 * use dh --with python2 in debian/rules
   - remove XB-Python-Version from debian/control
   - includes executing of testsuite
   - remove obsolete preinst
   - Closes: #596909
 * change do source format 3.0 (quilt)
 * Bumped Standards-Version to 3.9.1, no further changes needed

---
 debian/changelog     |   18 +++++++
 debian/compat        |    2 +-
 debian/control       |   11 ++--
 debian/copyright     |  132 ++++++++++++++++++++++++++------------------------
 debian/preinst       |    9 ---
 debian/rules         |   75 +++++------------------------
 debian/source/format |    2 +-
 7 files changed, 105 insertions(+), 144 deletions(-)
 delete mode 100644 debian/preinst

diff --git a/debian/changelog b/debian/changelog
index e1e839e..471e256 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,21 @@
+foolscap (0.6.1-1) unstable; urgency=low
+
+  [ Julian Taylor ]
+  * New upstream release (Closes: #591384)
+  * updated copyright to DEP5
+  * no repackaging anymore
+    - the previously removed source is BSD licensed so it is not required
+  * change to debhelper compat 7, depend on 7.0.50~
+  * use dh --with python2 in debian/rules
+    - remove XB-Python-Version from debian/control
+    - includes executing of testsuite
+    - remove obsolete preinst
+    - Closes: #596909
+  * change do source format 3.0 (quilt)
+  * Bumped Standards-Version to 3.9.1, no further changes needed
+
+ -- Julian Taylor <jtaylor.deb...@googlemail.com>  Tue, 01 Mar 2011 23:42:14 +0100
+
 foolscap (0.5.0+dfsg-1) unstable; urgency=low
 
   [ Elliot Murphy ]
diff --git a/debian/compat b/debian/compat
index 7ed6ff8..7f8f011 100644
--- a/debian/compat
+++ b/debian/compat
@@ -1 +1 @@
-5
+7
diff --git a/debian/control b/debian/control
index 2843592..1b2da54 100644
--- a/debian/control
+++ b/debian/control
@@ -2,11 +2,10 @@ Source: foolscap
 Section: python
 Priority: optional
 Maintainer: Debian Python Modules Team <python-modules-team@lists.alioth.debian.org>
-Uploaders: Stephan Peijnik <deb...@sp.or.at>
-Build-Depends: debhelper (>= 5)
-Build-Depends-Indep: python-all (>= 2.5.4-1~), python-support (>= 0.6.4), python-openssl, python-twisted-core, python-twisted-web, python-setuptools
-XS-Python-Version: all
-Standards-Version: 3.8.3
+Uploaders: Stephan Peijnik <deb...@sp.or.at>, Julian Taylor <jtaylor.deb...@googlemail.com>
+Build-Depends-Indep: python-all (>= 2.6.6-3), python-openssl, python-twisted-core, python-twisted-web, debhelper (>= 7.0.50~)
+X-Python-Version: >= 2.4
+Standards-Version: 3.9.1
 Homepage: http://foolscap.lothar.com/
 Vcs-Svn: svn://svn.debian.org/python-modules/packages/foolscap/trunk/
 Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/foolscap/trunk/
@@ -14,8 +13,8 @@ Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/foolscap/trun
 Package: python-foolscap
 Architecture: all
 Depends: ${misc:Depends}, ${python:Depends}, python-twisted-core, python-twisted-web, python-zope.interface
+Breaks: ${python:Breaks}
 Recommends: python-twisted-names, python-openssl (>= 0.6)
-XB-Python-Version: ${python:Versions}
 Description: object-capability-based RPC system for Twisted Python
  Foolscap (also known as "newpb") contains a new RPC system for Twisted Python,
  combining capability-based security, secure references, flexible 
diff --git a/debian/copyright b/debian/copyright
index bc3a62d..ab1ddb4 100644
--- a/debian/copyright
+++ b/debian/copyright
@@ -1,68 +1,72 @@
-This package was debianized by Stephan Peijnik <deb...@sp.or.at> on
-Fri, 19 Sep 2008 17:48:21 +0200.
-
-It was downloaded from http://foolscap.lothar.com/.
-
-Upstream Author:
-    
-    Brian Warner <war...@lothar.com>
-
-Copyright:
-
-    Copyright (C) 2006-2008 Brian Warner
-
-License:
- 
-    Permission is hereby granted, free of charge, to any person
-    obtaining a copy of this software and associated documentation
-    files (the "Software"), to deal in the Software without
-    restriction, including without limitation the rights to use,
-    copy, modify, merge, publish, distribute, sublicense, and/or sell
-    copies of the Software, and to permit persons to whom the
-    Software is furnished to do so, subject to the following
-    conditions:
-
-    The above copyright notice and this permission notice shall be
-    included in all copies or substantial portions of the Software.
-
-    THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-    EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
-    OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-    NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
-    HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
-    WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
-    FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
-    OTHER DEALINGS IN THE SOFTWARE.
-
-Files with extra copyrights/licenses:
-
-* foolscap/sslverify.py
-
-  Slightly modified of sslverify.py which can also be found in 
-  python-epsilon.
-
-  Copyright (c) 2005 Divmod Inc.
-
-  Permission is hereby granted, free of charge, to any person obtaining
-  a copy of this software and associated documentation files (the
-  "Software"), to deal in the Software without restriction, including
-  without limitation the rights to use, copy, modify, merge, publish,
-  distribute, sublicense, and/or sell copies of the Software, and to
-  permit persons to whom the Software is furnished to do so, subject to
-  the following conditions:
-
+Format: http://dep.debian.net/deps/dep5/
+Upstream-Name: Foolscap
+Upstream-Contact: Brian Warner <warner-fools...@lothar.com>
+Source: http://foolscap.lothar.com/.
+Comment: This package was debianized by Stephan Peijnik <deb...@sp.or.at> on Fri, 19 Sep 2008 17:48:21 +0200.
+
+Files: *
+Copyright (C) 2006-2008 Brian Warner
+License: MIT
+
+Files: foolscap/sslverify.py
+Copyright: Copyright 2005 Divmod, Inc
+License: MIT
+Comment:  Slightly modified of sslverify.py which can also be found in python-epsilon
+
+Files: misc/testutils/figleaf.py
+Copyright: Copyright: 2006, 2007 C. Titus Brown
+License: BSD
+Comment: copied from http://darcs.idyll.org/~t/projects/figleaf/doc/
+
+
+License: MIT
+  Permission is hereby granted, free of charge, to any person
+  obtaining a copy of this software and associated documentation
+  files (the "Software"), to deal in the Software without
+  restriction, including without limitation the rights to use,
+  copy, modify, merge, publish, distribute, sublicense, and/or sell
+  copies of the Software, and to permit persons to whom the
+  Software is furnished to do so, subject to the following
+  conditions:
+  .
   The above copyright notice and this permission notice shall be
   included in all copies or substantial portions of the Software.
-
+  .
   THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
-  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
-  MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
-  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
-  LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
-  OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
-  WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
-
+  EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
+  OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+  NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
+  HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
+  WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
+  FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
+  OTHER DEALINGS IN THE SOFTWARE.
+
+
+License: BSD
+  Copyright (c) The Regents of the University of California.
+  All rights reserved.
+  . 
+  Redistribution and use in source and binary forms, with or without
+  modification, are permitted provided that the following conditions
+  are met:
+  1. Redistributions of source code must retain the above copyright
+     notice, this list of conditions and the following disclaimer.
+  2. Redistributions in binary form must reproduce the above copyright
+     notice, this list of conditions and the following disclaimer in the
+     documentation and/or other materials provided with the distribution.
+  3. Neither the name of the University nor the names of its contributors
+     may be used to endorse or promote products derived from this software
+     without specific prior written permission.
+  .
+  THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
+  ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+  ARE DISCLAIMED.  IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
+  FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+  DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
+  OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
+  HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
+  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
+  OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
+  SUCH DAMAGE.
 
-The Debian packaging is (C) 2008, Stephan Peijnik <deb...@sp.or.at> and
-is licensed under the same license as foolscap, see the license text included
-above for more information.
diff --git a/debian/preinst b/debian/preinst
deleted file mode 100644
index baf93e9..0000000
--- a/debian/preinst
+++ /dev/null
@@ -1,9 +0,0 @@
-#!/bin/sh
-# TODO: remove this file after squeeze has been released
-set -e
-if [ "$1" = upgrade ] && dpkg --compare-versions "$2" lt-nl 0.4.0+dfsg-0;
-then
-	pycentral pkgremove python-foolscap
-fi
-
-#DEBHELPER#
\ No newline at end of file
diff --git a/debian/rules b/debian/rules
index ad79217..665dbd5 100755
--- a/debian/rules
+++ b/debian/rules
@@ -1,70 +1,19 @@
 #!/usr/bin/make -f
-# -*- makefile -*-
 
-# Uncomment this to turn on verbose mode.
-#export DH_VERBOSE=1
+export DH_VERBOSE=1
 
-DEB_UPSTREAM_VERSION=$(shell dpkg-parsechangelog | sed -rne 's,^Version: ([^-]+).*,\1,p' | sed -rne 's,(.*)\+dfsg,\1,p')
-PYVERS=$(shell pyversions -vr)
+%:
+	dh $@ --with python2 --buildsystem=python_distutils
 
-# if $py_setup_install_args will contain "--install-layout=deb" dist-packages
-# will be used instead of site-packages for Python >= 2.6;
-# --install-layout=deb and python.mk are available since python >= 2.5.4-1~,
-# here's backwards compatible code:
--include /usr/share/python/python.mk
-ifeq (,$(py_libdir))
-    py_libdir = /usr/lib/python$(subst python,,$(1))/site-packages
-endif
-
-get-orig-source:
-	uscan --force-download --destdir=. --rename \
-		--download-version=$(DEB_UPSTREAM_VERSION)
-
-	tar xzf foolscap_$(DEB_UPSTREAM_VERSION).orig.tar.gz
-
-	# Remove unused misc/testutils directory.
-	rm -rf foolscap-$(DEB_UPSTREAM_VERSION)/misc/testutils/
-
-	tar czf foolscap_$(DEB_UPSTREAM_VERSION)+dfsg.orig.tar.gz foolscap-$(DEB_UPSTREAM_VERSION)
-	rm -rf foolscap-$(DEB_UPSTREAM_VERSION)
-	rm -f foolscap_$(DEB_UPSTREAM_VERSION).orig.tar.gz
-
-clean:
-	dh_testdir
-	dh_testroot
-	rm -rf $(CURDIR)/build
-	find $(CURDIR) -name '*\.py[co]' -delete
-	dh_clean $(PYVERS:%=install-python%)
-
-build:
-
-install: build $(PYVERS:%=install-python%)
-
-install-python%:
-	python$* setup.py install --root $(CURDIR)/debian/python-foolscap \
-		--single-version-externally-managed $(py_setup_install_args)
-	# No need to include the unit tests in the deb file.
-	rm -rf $(CURDIR)/debian/python-foolscap/$(call py_libdir,$*)/foolscap/test
-	touch $@
-
-# Build architecture-independent files here.
-binary-indep: build install
-	dh_testdir -i
-	dh_testroot -i
-	dh_install -i
+override_dh_installchangelogs:
 	dh_installchangelogs -i NEWS
-	dh_installdocs -i README
-	dh_installman -i
-	dh_pysupport -i
-	dh_compress -i -X.py -X.xhtml -X.txt
-	dh_fixperms -i
-	dh_installdeb -i
-	dh_gencontrol -i
-	dh_md5sums -i
-	dh_builddeb -i
 
-binary-arch:
-# We have nothing to do by default.
+override_dh_auto_test:
+	# uses trial instead of setup.py test
+	PYTHONPATH=$(CURDIR) dh_auto_test --buildsystem=makefile
 
-binary: binary-indep binary-arch
-.PHONY: get-orig-source build clean binary-indep binary-arch install
+override_dh_auto_clean:
+	# remove pyc's from testsuite
+	find . -name "*.pyc" | xargs rm -f
+	rm -rf _trial_temp
+	rm -rf build
diff --git a/debian/source/format b/debian/source/format
index d3827e7..163aaf8 100644
--- a/debian/source/format
+++ b/debian/source/format
@@ -1 +1 @@
-1.0
+3.0 (quilt)
-- 
1.7.1

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Python-modules-team mailing list
Python-modules-team@lists.alioth.debian.org
http://lists.alioth.debian.org/mailman/listinfo/python-modules-team

Reply via email to