[Python-modules-commits] r20627 - in packages/pyspf/trunk/debian (8 files)
kitterman at users.alioth.debian.org
kitterman at users.alioth.debian.org
Wed Feb 29 02:26:55 UTC 2012
Date: Wednesday, February 29, 2012 @ 02:26:53
Author: kitterman
Revision: 20627
* New upstream release
- Update X-Python-Version and X-Python3-Version
- Drop use of 2to3 in debian/rules, no longer needed
- Add debian/patches/missed_py3 to fix missing python 3 compatbility
change
* Build --with quilt, add quilt to build-depends, replace long obsolete
README.source with a new one for quilt
* Add python-authres as Recommends to python-spf and python3-spf since
doctests require it
* Override dh_fixperms to exclude spf.py
- It needs to be executable by anyone so the the symlink from
/usr/bin/pyspf in spf-tools-python works
* Update debian/pyspf.1 to match the current way the package works
* Bump standards version to 3.9.3 without further change
Added:
packages/pyspf/trunk/debian/patches/
packages/pyspf/trunk/debian/patches/missed_py3
packages/pyspf/trunk/debian/patches/series
Modified:
packages/pyspf/trunk/debian/README.source
packages/pyspf/trunk/debian/changelog
packages/pyspf/trunk/debian/control
packages/pyspf/trunk/debian/pyspf.1
packages/pyspf/trunk/debian/rules
Modified: packages/pyspf/trunk/debian/README.source
===================================================================
--- packages/pyspf/trunk/debian/README.source 2012-02-28 23:19:19 UTC (rev 20626)
+++ packages/pyspf/trunk/debian/README.source 2012-02-29 02:26:53 UTC (rev 20627)
@@ -1,4 +1,58 @@
-This package uses CDBS simple patchsys. dpkg-source -x does produce source
-ready for building with dpkg-buildpackage. It does not procude source ready
-for editing. To edit or update a patch, use cdbs-edit-patch. See man
-cdbs-edit-patch for details.
+This package uses quilt to manage all modifications to the upstream
+source. Changes are stored in the source package as diffs in
+debian/patches and applied during the build.
+
+To configure quilt to use debian/patches instead of patches, you want
+either to export QUILT_PATCHES=debian/patches in your environment
+or use this snippet in your ~/.quiltrc:
+
+ for where in ./ ../ ../../ ../../../ ../../../../ ../../../../../; do
+ if [ -e ${where}debian/rules -a -d ${where}debian/patches ]; then
+ export QUILT_PATCHES=debian/patches
+ break
+ fi
+ done
+
+To get the fully patched source after unpacking the source package, cd to
+the root level of the source package and run:
+
+ quilt push -a
+
+The last patch listed in debian/patches/series will become the current
+patch.
+
+To add a new set of changes, first run quilt push -a, and then run:
+
+ quilt new <patch>
+
+where <patch> is a descriptive name for the patch, used as the filename in
+debian/patches. Then, for every file that will be modified by this patch,
+run:
+
+ quilt add <file>
+
+before editing those files. You must tell quilt with quilt add what files
+will be part of the patch before making changes or quilt will not work
+properly. After editing the files, run:
+
+ quilt refresh
+
+to save the results as a patch.
+
+Alternately, if you already have an external patch and you just want to
+add it to the build system, run quilt push -a and then:
+
+ quilt import -P <patch> /path/to/patch
+ quilt push -a
+
+(add -p 0 to quilt import if needed). <patch> as above is the filename to
+use in debian/patches. The last quilt push -a will apply the patch to
+make sure it works properly.
+
+To remove an existing patch from the list of patches that will be applied,
+run:
+
+ quilt delete <patch>
+
+You may need to run quilt pop -a to unapply patches first before running
+this command.
Modified: packages/pyspf/trunk/debian/changelog
===================================================================
--- packages/pyspf/trunk/debian/changelog 2012-02-28 23:19:19 UTC (rev 20626)
+++ packages/pyspf/trunk/debian/changelog 2012-02-29 02:26:53 UTC (rev 20627)
@@ -1,3 +1,22 @@
+pyspf (2.0.7-1) unstable; urgency=low
+
+ * New upstream release
+ - Update X-Python-Version and X-Python3-Version
+ - Drop use of 2to3 in debian/rules, no longer needed
+ - Add debian/patches/missed_py3 to fix missing python 3 compatbility
+ change
+ * Build --with quilt, add quilt to build-depends, replace long obsolete
+ README.source with a new one for quilt
+ * Add python-authres as Recommends to python-spf and python3-spf since
+ doctests require it
+ * Override dh_fixperms to exclude spf.py
+ - It needs to be executable by anyone so the the symlink from
+ /usr/bin/pyspf in spf-tools-python works
+ * Update debian/pyspf.1 to match the current way the package works
+ * Bump standards version to 3.9.3 without further change
+
+ -- Scott Kitterman <scott at kitterman.com> Tue, 28 Feb 2012 09:49:39 -0500
+
pyspf (2.0.6-1) unstable; urgency=low
[ Guilherme de Siqueira Pastore ]
Modified: packages/pyspf/trunk/debian/control
===================================================================
--- packages/pyspf/trunk/debian/control 2012-02-28 23:19:19 UTC (rev 20626)
+++ packages/pyspf/trunk/debian/control 2012-02-29 02:26:53 UTC (rev 20627)
@@ -3,17 +3,18 @@
Priority: optional
Maintainer: Scott Kitterman <scott at kitterman.com>
Uploaders: Debian Python Modules Team <python-modules-team at lists.alioth.debian.org>, Gustavo Franco <stratus at debian.org>
-Build-Depends: debhelper (>= 7.3.16), python-all (>= 2.6.6-6), python3-all
-X-Python-Version: >= 2.4
-X-Python3-Version: >= 3.1
+Build-Depends: debhelper (>= 7.3.16), python-all (>= 2.6.6-6), python3-all, quilt (>= 0.46-7)
+X-Python-Version: >= 2.6
+X-Python3-Version: >= 3.2
Homepage: http://cheeseshop.python.org/pypi/pyspf/
Vcs-Svn: svn://svn.debian.org/python-modules/packages/pyspf/trunk/
Vcs-Browser: http://svn.debian.org/viewsvn/python-modules/packages/pyspf/trunk/
-Standards-Version: 3.9.2
+Standards-Version: 3.9.3
Package: python-spf
Architecture: all
Depends: ${python:Depends}, ${misc:Depends}, python-dns
+Recommends: python-authres
Suggests: python-yaml
Description: sender policy framework (SPF) module for Python
This module provides SPF (Sender Policy Framework) for Python. It is RFC 4408
@@ -24,6 +25,7 @@
Package: python3-spf
Architecture: all
Depends: ${python3:Depends}, ${misc:Depends}, python3-dns
+Recommends: python-authres
Suggests: python3-yaml
Description: sender policy framework (SPF) module for Python 3
This module provides SPF (Sender Policy Framework) for Python 3. It is RFC
Added: packages/pyspf/trunk/debian/patches/missed_py3
===================================================================
--- packages/pyspf/trunk/debian/patches/missed_py3 (rev 0)
+++ packages/pyspf/trunk/debian/patches/missed_py3 2012-02-29 02:26:53 UTC (rev 20627)
@@ -0,0 +1,20 @@
+Fixes a few missed python3 compatiblity issues
+Forwareded upstream
+Scott Kitterman <scott at kitterman.com> Feb 5, 2012
+
+Index: pyspf-2.0.7/spf.py
+===================================================================
+--- pyspf-2.0.7.orig/spf.py 2012-02-09 17:05:32.039191110 -0500
++++ pyspf-2.0.7/spf.py 2012-02-09 17:09:08.479184717 -0500
+@@ -1968,9 +1984,9 @@
+ elif len(argv) == 3:
+ q = query(i=argv[0], s=argv[1], h=argv[2],
+ receiver=socket.gethostname(), verbose=verbose)
+- print q.check(),q.mechanism
++ print(q.check(),q.mechanism)
+ if q.perm_error and q.perm_error.ext:
+- print q.perm_error.ext
++ print(q.perm_error.ext)
+ elif len(argv) == 4:
+ i, s, h = argv[1:]
+ q = query(i=i, s=s, h=h, receiver=socket.gethostname(),
Added: packages/pyspf/trunk/debian/patches/series
===================================================================
--- packages/pyspf/trunk/debian/patches/series (rev 0)
+++ packages/pyspf/trunk/debian/patches/series 2012-02-29 02:26:53 UTC (rev 20627)
@@ -0,0 +1 @@
+missed_py3
Modified: packages/pyspf/trunk/debian/pyspf.1
===================================================================
--- packages/pyspf/trunk/debian/pyspf.1 2012-02-28 23:19:19 UTC (rev 20626)
+++ packages/pyspf/trunk/debian/pyspf.1 2012-02-29 02:26:53 UTC (rev 20627)
@@ -128,12 +128,12 @@
.\" ========================================================================
.\"
.IX Title "python-spf 1"
-.TH python-spf 1 "2010-12-03"
+.TH python-spf 1 "2012-02-05"
.SH "NAME"
pyspf \- pure-Python SPF library
.SH "VERSION"
.IX Header "VERSION"
-2\.0\.5
+2\.0\.7
.SH "DESCRIPTION"
.IX Header "DESCRIPTION"
@@ -153,10 +153,23 @@
.SH "USAGE"
.IX Header "USAGE"
-There are two ways to use this package. The first is from the command
-line::
- % python spf.py {ip-addr} {mail-from} {helo}
+There are multiple ways to use this package:
+ To check an incoming mail request:
+ % pyspf [\-v] {ip} {sender} {helo}
+ % pyspf 69.55.226.139 tway at optsw.com mx1.wayforward.net
+
+ To test an SPF record:
+ % pyspf [\-v] "v=spf1..." {ip} {sender} {helo}
+ % pyspf "v=spf1 +mx +ip4:10.0.0.1 \-all" 10.0.0.1 tway at foo.com a
+
+ To fetch an SPF record:
+ % pyspf {domain}
+ % pyspf wayforward.net
+
+ To test this script (and to output this usage message):
+ % pyspf
+
For instance, during an SMTP exchange from client 69.55.226.139::
S: 220 mail.example.com ESMTP Postfix
C: EHLO mx1.wayforward.net
@@ -166,39 +179,12 @@
C: MAIL FROM:<terry at wayforward.net>
Then the following command line would check if this is a valid sender:
- % ./spf.py 69.55.226.139 terry at wayforward.net mx1.wayforward.net
+ % pyspf 69.55.226.139 terry at wayforward.net mx1.wayforward.net
('pass', 250, 'sender SPF authorized')
Command line calls return RFC 4408 result codes, i.e. 'pass', 'fail', 'neutral',
\'softfail, 'permerror', or 'temperror'.
-The second way is via the module's APIs.
-
-The legacy (pySPF 1.6) API:
- >>> import spf
- >>> spf.check(i='69.55.226.139',
- ... s='terry at wayforward.net',
- ... h='mx1.wayforward.net')
- ('pass', 250, 'sender SPF authorized')
-
-The first element in the tuple is one of 'pass', 'fail', 'netural', 'softfail',
-\'unknown', or 'error'. The second is the SMTP response status code: 550 for
-\'fail', 450 for 'error' and 250 for all else. The third is an explanation.
-
-Note: SPF results alone are never sufficient to decide that a message should be
-accepted. Accept, reject, or defer decisions are a function of local receiver
-policy.
-
-The RFC 4408 compliant API:
- >>> import spf
- >>> spf.check2(i='69.55.226.139',
- ... s='terry at wayforward.net',
- ... h='mx1.wayforward.net')
- ('pass', 'sender SPF verified')
-
-The first element in the tuple is one of 'pass', 'fail', 'neutral', 'softfail,
-\'permerror', or 'temperror'. The second is an explanation.
-
.SH "RFC 4408 TEST SUITE"
.IX Header "RFC 4408 TEST SUITE"
@@ -207,12 +193,14 @@
errors or improvements in the test definitions are approved, they are available
from:
-<http://www.openspf.org/Test_Suite>
+<http://www.openspf.net/Test_Suite>
To run the test suite, change the directory the test suite is installed in:
-$ cd /usr/share/python-support/python-spf/test
+$ cd /usr/share/doc/python-spf
+Uncompress testspf.py.gz, testspf.py.gz, and rfc4408-tests.yml.gz
+
and then run testspf.py:
$ python testspf.py
Modified: packages/pyspf/trunk/debian/rules
===================================================================
--- packages/pyspf/trunk/debian/rules 2012-02-28 23:19:19 UTC (rev 20626)
+++ packages/pyspf/trunk/debian/rules 2012-02-29 02:26:53 UTC (rev 20627)
@@ -1,7 +1,7 @@
#!/usr/bin/make -f
%:
- dh $@ --with python2,python3
+ dh $@ --with python2,python3,quilt
override_dh_auto_install:
@@ -10,15 +10,11 @@
--root $(CURDIR)/debian/python-spf; \
done
- 2to3 -w $(CURDIR)/spf.py
-
set -e && for py3vers in $(shell py3versions -sv); do \
python$$py3vers setup.py install --install-layout=deb \
--root $(CURDIR)/debian/python3-spf; \
done
- mv $(CURDIR)/spf.py.bak $(CURDIR)/spf.py
-
# Make dirs for the tools package (then move scripts from python-spf)
mkdir -p debian/spf-tools-python/usr/bin/
# Rename the `spfquery` tool for the alternatives system
@@ -48,3 +44,6 @@
find . -name \*.pyc -exec rm {} \;
dh_clean
+override_dh_fixperms:
+ dh_fixperms
+ chmod +x $(CURDIR)/debian/python-spf/usr/share/pyshared/spf.py
More information about the Python-modules-commits
mailing list