debian/0000775000000000000000000000000012553144121007166 5ustar debian/README.Ubuntu0000664000000000000000000000045612272510204011331 0ustar This package is being obtained from a mirror of the github code, which can be found at: lp:python-tx-tftp Upstream does not have a formal release process, hance does not provide real version. This package has been versioned with 0.1~bzrXYZ in order for us to be able to release a versioned project. debian/rules0000775000000000000000000000123612272510204010245 0ustar #!/usr/bin/make -f BUILDHOME = $(CURDIR)/debian/build %: dh $@ --with python2 override_dh_clean: dh_clean rm -rf $(BUILDHOME) override_dh_auto_test: mkdir -p $(BUILDHOME) HOME=$(BUILDHOME) PYTHONPATH=$PWD trial -B tftp DEB_DEBIAN_DIR=$(dir $(firstword $(MAKEFILE_LIST))) REV=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \ | sed -rne 's,^Version: .*[+~]bzr([0-9]+).*,\1,p') VER=$(shell dpkg-parsechangelog -l$(DEB_DEBIAN_DIR)/changelog \ | sed -rne 's,^Version: ([^-]+).*,\1,p') get-orig-source: bzr export -r $(REV) --root=python-tx-tftp-$(VER).orig \ python-tx-tftp_$(VER).orig.tar.gz lp:python-tx-tftp debian/source/0000775000000000000000000000000012272510204010463 5ustar debian/source/format0000664000000000000000000000001412272510204011671 0ustar 3.0 (quilt) debian/patches/0000775000000000000000000000000012553143425010623 5ustar debian/patches/05_lp1317705.patch0000664000000000000000000000204012542034505013323 0ustar Description: Recognize error code 8 Regonise error code 8, which is used to terminate a transfer due to option negotiation. See RFC 2347, "TFTP Option Extension". Author: Gavin Panella Bug-Ubuntu: https://bugs.launchpad.net/bugs/1317705 Index: python-tx-tftp-0.1~bzr38/tftp/datagram.py =================================================================== --- python-tx-tftp-0.1~bzr38.orig/tftp/datagram.py 2014-01-30 12:48:27.000000000 -0500 +++ python-tx-tftp-0.1~bzr38/tftp/datagram.py 2015-06-22 12:29:48.921784718 -0400 @@ -22,6 +22,7 @@ ERR_TID_UNKNOWN = 5 ERR_FILE_EXISTS = 6 ERR_NO_SUCH_USER = 7 +ERR_TERM_OPTION = 8 errors = { ERR_NOT_DEFINED : "", @@ -31,7 +32,8 @@ ERR_ILLEGAL_OP : "Illegal TFTP operation", ERR_TID_UNKNOWN : "Unknown transfer ID", ERR_FILE_EXISTS : "File already exists", - ERR_NO_SUCH_USER : "No such user" + ERR_NO_SUCH_USER : "No such user", + ERR_TERM_OPTION : "Terminate transfer due to option negotiation", } debian/patches/03-longer-timeouts.patch0000664000000000000000000000344012272510231015211 0ustar Description: Increase timeouts In order to not discard the session state too early, which can prevent PXE booting from serving files, the timeout should not happen to early. For this reason timeout tuple must be changed to wait a longer time. Author: Andres Rodriguez Bug-Ubuntu: https://bugs.launchpad.net/bugs/1155556 Index: python-tx-tftp-0.1~bzr38.orig/tftp/bootstrap.py =================================================================== --- python-tx-tftp-0.1~bzr38.orig.orig/tftp/bootstrap.py 2014-01-30 12:49:08.859346073 -0500 +++ python-tx-tftp-0.1~bzr38.orig/tftp/bootstrap.py 2014-01-30 12:49:08.855346073 -0500 @@ -256,7 +256,7 @@ received a WRQ from a client. """ - timeout = (1, 3, 7) + timeout = (1, 1, 1, 1, 1, 1) def __init__(self, remote, writer, options=None, _clock=None): TFTPBootstrap.__init__(self, remote, writer, options, _clock) @@ -346,7 +346,7 @@ a RRQ. """ - timeout = (1, 3, 7) + timeout = (1, 1, 1, 1, 1, 1) def __init__(self, remote, reader, options=None, _clock=None): TFTPBootstrap.__init__(self, remote, reader, options, _clock) Index: python-tx-tftp-0.1~bzr38.orig/tftp/session.py =================================================================== --- python-tx-tftp-0.1~bzr38.orig.orig/tftp/session.py 2014-01-30 12:49:08.859346073 -0500 +++ python-tx-tftp-0.1~bzr38.orig/tftp/session.py 2014-01-30 12:49:08.855346073 -0500 @@ -33,7 +33,7 @@ """ block_size = 512 - timeout = (1, 3, 7) + timeout = (1, 1, 1, 1, 1, 1) tsize = None def __init__(self, writer, _clock=None): @@ -178,7 +178,7 @@ """ block_size = 512 - timeout = (1, 3, 7) + timeout = (1, 1, 1, 1, 1, 1) def __init__(self, reader, _clock=None): self.reader = reader debian/patches/series0000664000000000000000000000011012542033707012027 0ustar 03-longer-timeouts.patch 04-implement-rollover.patch 05_lp1317705.patch debian/patches/04-implement-rollover.patch0000664000000000000000000000242612332252405015717 0ustar Index: python-tx-tftp-0.1~bzr38/tftp/bootstrap.py =================================================================== --- python-tx-tftp-0.1~bzr38.orig/tftp/bootstrap.py 2014-05-06 16:31:14.195151635 -0500 +++ python-tx-tftp-0.1~bzr38/tftp/bootstrap.py 2014-05-06 16:31:51.015153039 -0500 @@ -390,7 +390,7 @@ return self.session.nextBlock() def _datagramReceived(self, datagram): - if datagram.opcode == OP_ACK and datagram.blocknum == 0: + if datagram.opcode == OP_ACK and datagram.blocknum == 0 and self.session.started is False: return self.tftp_ACK(datagram) elif self.session.started: return self.session.datagramReceived(datagram) Index: python-tx-tftp-0.1~bzr38/tftp/session.py =================================================================== --- python-tx-tftp-0.1~bzr38.orig/tftp/session.py 2014-05-06 16:31:14.195151635 -0500 +++ python-tx-tftp-0.1~bzr38/tftp/session.py 2014-05-06 16:32:50.479155305 -0500 @@ -249,6 +249,9 @@ cycle. """ + # reached maximum number of blocks. Rolling over + if self.blocknum == 65536: + self.blocknum = 0 if len(data) < self.block_size: self.completed = True bytes = DATADatagram(self.blocknum, data).to_wire() debian/changelog0000664000000000000000000000665112553144121011050 0ustar python-tx-tftp (0.1~bzr38-0ubuntu4~14.04.1) trusty-proposed; urgency=medium * debian/patches/05_lp1317705.patch: Regonise error code 8, which is used to terminate a transfer due to option negotiation. See RFC 2347, "TFTP Option Extension". (LP: #1317705) -- Andres Rodriguez Mon, 22 Jun 2015 12:33:26 -0400 python-tx-tftp (0.1~bzr38-0ubuntu3) utopic; urgency=medium * debian/patches/04-implement-rollover.patch: Resets the block number counter back to 0 after it reaches 2^16. (LP: #1476175) -- Andres Rodriguez Tue, 06 May 2014 16:18:36 -0500 python-tx-tftp (0.1~bzr38-0ubuntu2) trusty; urgency=medium * Rebuild to drop files installed into /usr/share/pyshared. -- Matthias Klose Sun, 23 Feb 2014 13:53:14 +0000 python-tx-tftp (0.1~bzr38-0ubuntu1) trusty; urgency=low * New upstream release * debian/patches/03-longer-timeouts.patch: Refreshed. -- Andres Rodriguez Thu, 30 Jan 2014 12:48:01 -0500 python-tx-tftp (0.1~bzr37-0ubuntu1) saucy; urgency=low * New upstream release * debian/patches: - 01-tsize-support.patch, 02-ip-context.patch, logmsg-ftbfs.patch: Drop. Merged upstream. - 03-longer-timeouts.patch: Refreshed. -- Andres Rodriguez Fri, 31 May 2013 14:08:16 -0400 python-tx-tftp (0.1~bzr31-0ubuntu8) raring; urgency=low * debian/patches/03-longer-timeouts.patch: Increase the timeout to not discard the session state because some clients are less tolerant to the provided timeouts. This solution closer matches that of tftpd-hpa. Thanks to Spads and Daviey for investigating and coming up with the solution. (LP: #1155556) -- Andres Rodriguez Mon, 01 Apr 2013 15:19:30 -0400 python-tx-tftp (0.1~bzr31-0ubuntu7) raring; urgency=low [ Julian Edwards ] * Add d/p/02-ip-context.patch (LP: #1068843) -- Andres Rodriguez Wed, 31 Oct 2012 10:10:04 +0100 python-tx-tftp (0.1~bzr31-0ubuntu6) quantal; urgency=low * d/p/logmsg-ftbfs.patch: Added an extra log.msg() bug fix for bad string formatting, annotated patch with upstream bug report (LP: #1062031). -- James Page Tue, 09 Oct 2012 16:42:41 +0100 python-tx-tftp (0.1~bzr31-0ubuntu5) quantal; urgency=low * debian/patches/logmsg-ftbfs.patch: Fixes obvious log.msg() bug causing FTBFS in Ubuntu 12.10. (LP: #1055581) -- Barry Warsaw Mon, 24 Sep 2012 11:29:37 -0400 python-tx-tftp (0.1~bzr31-0ubuntu4) quantal; urgency=low * debian/patches/01-tsize-support.patch: Updated to include missing patch hunks. Fixes not being able to download files due to permissions. -- Andres Rodriguez Fri, 24 Aug 2012 14:45:26 -0400 python-tx-tftp (0.1~bzr31-0ubuntu3) quantal; urgency=low * debian/patches/01-tsize-support.patch: Adds tsize support to comply with RFC 2349. Thanks to Gavin Panella. -- Andres Rodriguez Mon, 16 Jul 2012 12:30:07 -0400 python-tx-tftp (0.1~bzr31-0ubuntu2) quantal; urgency=low * Enable tests: - debian/control: Build-Dep on python-twisted. - debian/rules: Run tests with 'trial'. -- Andres Rodriguez Fri, 13 Jul 2012 23:06:56 -0400 python-tx-tftp (0.1~bzr31-0ubuntu1) quantal; urgency=low * Initial release (LP: #1023181) -- Andres Rodriguez Wed, 14 Mar 2012 12:14:31 -0400 debian/python-txtftp.install0000664000000000000000000000013212272510204013417 0ustar tftp usr/share/pyshared twisted/plugins/tftp_plugin.py usr/share/pyshared/twisted/plugins debian/copyright0000664000000000000000000000262012272510204011116 0ustar Format: http://dep.debian.net/deps/dep5 Upstream-Contact: Mark Lvov Upstream-Name: python-tx-tftp Source: https://github.com/shylent/python-tx-tftp Files: * Copyright: 2010-2012 Mark Lvov License: MIT Files: debian/* Copyright: Andres Rodriguez 2012 Canonical Ltd. License: MIT 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. debian/compat0000664000000000000000000000000212272510204010361 0ustar 7 debian/control0000664000000000000000000000152012272510274010573 0ustar Source: python-tx-tftp Section: python Priority: optional Maintainer: Ubuntu Developers Build-Depends: debhelper (>= 8), python (>= 2.7), python-twisted-core Standards-Version: 3.9.3 X-Python-Version: >= 2.7 Homepage: https://github.com/shylent/python-tx-tftp Package: python-txtftp Architecture: all Depends: ${misc:Depends}, ${python:Depends}, python-twisted, python-zope.interface Description: Twisted-based TFTP implementation A Twisted-based TFTP implementation that implements: . * RFC1350 (base TFTP specification) support. * Asynchronous backend support. * netascii transfer mode. * RFC2347 (TFTP Option Extension) support. blksize (RFC2348) and timeout. (partial support for RFC2349) options are supported. * An actual TFTP server. * Plugin for twistd.