debian/0000775000000000000000000000000011723352650007174 5ustar debian/html2man.py0000664000000000000000000001155511574673656011317 0ustar #! /usr/bin/python # HTML to manpage converter, written for ftplib. # This program was written by Richard Braakman # The author places it in the public domain. import time import sys import string import os import errno import stat from sgmllib import SGMLParser class PageParser(SGMLParser): def __init__(self, receiver): SGMLParser.__init__(self, 0) self.receiver = receiver self.data = None # Data-handling mechanism borrowed from HTMLParser def handle_data(self, data): if self.data is not None: self.data = self.data + data else: self.receiver.add_text(data) def save_bgn(self): self.data = '' def save_end(self): data = self.data self.data = None return string.join(string.split(data)) def start_html(self, attrs): pass def end_html(self): self.receiver.finish() def start_title(self, attrs): self.save_bgn() def end_title(self): # This used to set the title, but it will be the same as # the title in the

block anyway, which is more convenient. self.save_end() def start_h1(self, attrs): self.save_bgn() def end_h1(self): self.receiver.set_title(self.save_end()) self.receiver.write_intro() def start_h2(self, attrs): self.save_bgn() def end_h2(self): self.receiver.make_header(self.save_end()) def do_p(self, attrs): self.receiver.start_paragraph() def do_dt(self, attrs): self.save_bgn() def do_dd(self, attrs): self.receiver.start_tab(self.save_end()) def start_pre(self, attrs): self.save_bgn() def end_pre(self): self.receiver.preformatted(self.save_end()) class PageWriter: def __init__(self, outfile): self.out = outfile self.title = None self.mtime = None self.need_newline = 0 self.suppress_paragraph = 0 def writeout(self, data): self.out.write(data) def set_time(self, time): self.mtime = time def prettydate(self): return time.strftime('"%d %B %Y"', time.localtime(self.mtime)) def opt_newline(self): if self.need_newline: self.writeout("\n") self.need_newline = 0 def add_text(self, data): if len(data) == 0: return if data[-1] == " ": data = string.join(string.split(data)) + " " else: data = string.join(string.split(data)) data = data.replace("-", "\-"); if len(data) == 0: return self.writeout(data) self.need_newline = 1 def set_title(self, title): self.title = title def write_intro(self): self.writeout(".\\\" This manual page was generated from the file " + self.title + ".html.\n") self.writeout(".TH " + self.title + " 3 " + self.prettydate() + " FTPlib\n") self.writeout(".SH NAME\n" + self.title + " \- "); self.suppress_paragraph = 1 self.need_newline = 1 def preformatted(self, text): self.opt_newline # Parse include directives rb = string.find(text, ">") while rb >= 0: self.writeout('.B "' + text[:rb+1] + '"\n.br\n') text = text[rb+2:] rb = string.find(text, ">") self.writeout('.sp\n') # Next comes a function prototype. parmstart = string.index(text, "(") if text[parmstart:] == "(void);": self.writeout('.B "' + text + '"\n') return parms = string.split(text[parmstart+1:-2], ", ") self.writeout('.BI "' + text[:parmstart+1]) length = parmstart+1 for i in range(len(parms)): parm = parms[i] if length + len(parm) > 55: self.writeout('"\n.RS\n.BI "') length = 8 else: length = length + len(parm) + 2 end = string.rindex(parm, " ") while parm[end+1] == "*": end = end + 1 self.writeout(parm[:end+1] + '" ' + parm[end+1:] + ' "') if i + 1 < len(parms): self.writeout(', ') self.writeout(text[-2:] + '"\n') def make_header(self, header): self.opt_newline() self.writeout('.SH "' + header + '"\n'); def start_paragraph(self): if self.suppress_paragraph: self.suppress_paragraph = 0 else: self.opt_newline() self.writeout(".LP\n") def start_tab(self, heading): self.opt_newline() self.writeout('.TP\n.B "' + heading + '"\n') def finish(self): self.opt_newline() def convert(filename): begin = string.rfind(filename, "/") if begin >= 0: filename = filename[begin+1:] end = string.rindex(filename, ".html") return filename[:end] + ".3" if len(sys.argv) < 3: sys.stderr.write("Usage: html2man filenames... dirname\n") else: dirname = sys.argv[-1] try: os.makedirs(dirname) except OSError, e: if e.errno <> errno.EEXIST: raise for filename in sys.argv[1:-1]: outfilename = os.path.join(dirname, convert(filename)) infile = open(filename, "r") outfile = open(outfilename, "w") timestamp = os.fstat(infile.fileno())[stat.ST_MTIME] receiver = PageWriter(outfile) receiver.set_time(timestamp) parser = PageParser(receiver) parser.feed(infile.read()) infile.close() outfile.close() os.utime(outfilename, (timestamp, timestamp)) debian/ftplib-dev.examples0000664000000000000000000000005411574673656013007 0ustar debian/Makefile.examples linux/qftp.c NOTES debian/Makefile.examples0000664000000000000000000000055311574673656012474 0ustar TARGETS = qftp OBJECTS = qftp.o SOURCES = qftp.c DEBUG = -g INCLUDES = CFLAGS = -Wall $(DEBUG) $(INCLUDES) LDFLAGS = -lftp all : $(TARGETS) ln -sf qftp ftpdir ln -sf qftp ftpget ln -sf qftp ftpsend ln -sf qftp ftprm ln -sf qftp ftplist clean : rm -f $(OBJECTS) core *~ ftpdir ftpget ftpsend ftprm ftplist clobber : clean rm -f $(TARGETS) $(OLDTARGETS) debian/ftplib-dev.links0000664000000000000000000000022611574673656012312 0ustar usr/share/doc/ftplib-dev/README.qftp usr/share/doc/ftplib-dev/examples/README usr/lib/ftplib-dev/examples/qftp usr/share/doc/ftplib-dev/examples/qftp debian/ftplib3.lintian-overrides0000664000000000000000000000025211574673656014136 0ustar # The package name dates back to before we had such a policy # and I don't want to handle a useless transition for now ftplib3: package-name-doesnt-match-sonames libftp3 debian/source/0000775000000000000000000000000011574673656010514 5ustar debian/source/format0000664000000000000000000000001411574673656011722 0ustar 3.0 (quilt) debian/watch0000664000000000000000000000030211574673656010240 0ustar # Upstream is not reliable in using a consistent scheme for release # http://nbpfaus.net/~pfau/ftplib/ is the main page but it currently # doesn't respond anymore -- Raphael Hertzog on 20091004 debian/compat0000664000000000000000000000000211574673656010412 0ustar 7 debian/patches/0000775000000000000000000000000011574673656010643 5ustar debian/patches/series0000664000000000000000000000006711574673656012063 0ustar check-getservbyname-failure fix-ascii-read-without-eol debian/patches/check-getservbyname-failure0000664000000000000000000000152011574673656016137 0ustar Description: Verify value returned by getservbyname getservbyname() can return a NULL pointer and dereferencing it would lead to a segfault. . The patch is not forwarded upstream but there's no real maintainance upstream any more. Origin: vendor, see changelog entry 3.1-1-2 Author: Richard Braakman Last-Update: 2009-10-29 Forwarded: no diff --git a/linux/ftplib.c b/linux/ftplib.c index 9089a5b..c4a5873 100644 --- a/linux/ftplib.c +++ b/linux/ftplib.c @@ -416,7 +416,11 @@ GLOBALDEF int FtpConnect(const char *host, netbuf **nControl) sin.sin_port = htons(atoi(pnum)); else { - pse = getservbyname(pnum,"tcp"); + if ((pse = getservbyname(pnum,"tcp")) == NULL) + { + perror("getservbyname"); + return 0; + } sin.sin_port = pse->s_port; } } debian/patches/fix-ascii-read-without-eol0000664000000000000000000000267411574673656015642 0ustar Description: Fix reading FTP data is ASCII mode In ASCII mode, if you don't have a line in the next block that you're trying to read, then ftplib would set the first character to '\0'. . Upstream probably intented to return an empty string when requesting to read only 1 character since that doesn't make much sense when the EOL delimiter is 2 characters already (\r\n). However, due to the way data is read, max can be set to 1 just after having read max-1 legitimate bytes and we should not be overwriting the first byte. . Patch is not submitted upstream since upstream is not actively maintaining it. Origin: vendor, see Author Author: Raphaël Hertzog Last-Update: 2009-11-24 --- The information above should follow the Patch Tagging Guidelines, please checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here are templates for supplementary fields that you might want to add: Origin: , Bug: Bug-Debian: http://bugs.debian.org/ Forwarded: Reviewed-By: Last-Update: --- ftplib-3.1-1.orig/linux/ftplib.c +++ ftplib-3.1-1/linux/ftplib.c @@ -220,7 +220,6 @@ static int readline(char *buf,int max,ne } if (max == 1) { - *buf = '\0'; break; } if (ctl->cput == ctl->cget) debian/rules0000775000000000000000000000200111574673656010265 0ustar #!/usr/bin/make -f export CFLAGS := $(shell dpkg-buildflags --get CFLAGS) export LDFLAGS := $(shell dpkg-buildflags --get LDFLAGS) export CPPFLAGS := $(shell dpkg-buildflags --get CPPFLAGS) DEB_HOST_MULTIARCH := $(shell dpkg-architecture -qDEB_HOST_MULTIARCH) %: dh $@ override_dh_auto_build: $(MAKE) -C linux DEBUG="$(DEBUG)" override_dh_auto_clean: [ ! -f linux/Makefile ] || $(MAKE) -C linux clobber override_dh_auto_install: python debian/html2man.py html/Ftp*.html \ debian/ftplib-dev/usr/share/man/man3 mkdir -p debian/ftplib3/usr/lib/$(DEB_HOST_MULTIARCH) cp -a linux/libftp.so.* debian/ftplib3/usr/lib/$(DEB_HOST_MULTIARCH) mkdir -p debian/ftplib-dev/usr/lib/$(DEB_HOST_MULTIARCH) cp -a linux/libftp.a linux/libftp.so debian/ftplib-dev/usr/lib/$(DEB_HOST_MULTIARCH) override_dh_compress: dh_compress -Xexamples override_dh_link: dh_link cd debian/ftplib-dev/usr/share/doc/ftplib-dev \ && rm html/model.html \ && mv examples/Makefile.examples examples/Makefile \ && $(MAKE) -C examples debian/ftplib3.symbols0000664000000000000000000000105211574673656012167 0ustar libftp.so.3 ftplib3 #MINVER# DefaultNetbuf@Base 3.1 FtpAccess@Base 3.1 FtpCDUp@Base 3.1 FtpChdir@Base 3.1 FtpClose@Base 3.1 FtpConnect@Base 3.1 FtpDelete@Base 3.1 FtpDir@Base 3.1 FtpGet@Base 3.1 FtpInit@Base 3.1 FtpLastResponse@Base 3.1 FtpLogin@Base 3.1 FtpMkdir@Base 3.1 FtpModDate@Base 3.1 FtpNlst@Base 3.1 FtpOptions@Base 3.1 FtpPut@Base 3.1 FtpPwd@Base 3.1 FtpQuit@Base 3.1 FtpRead@Base 3.1 FtpRename@Base 3.1 FtpRmdir@Base 3.1 FtpSite@Base 3.1 FtpSize@Base 3.1 FtpSysType@Base 3.1 FtpWrite@Base 3.1 ftplib_debug@Base 3.1 debian/control0000664000000000000000000000212011574673656010612 0ustar Source: ftplib Section: libs Priority: optional Maintainer: Raphaël Hertzog Standards-Version: 3.9.2 Build-Depends: debhelper (>= 7.0.50~), python Vcs-Git: git://git.debian.org/collab-maint/ftplib.git Vcs-Browser: http://git.debian.org/?p=collab-maint/ftplib.git Homepage: http://nbpfaus.net/~pfau/ftplib/ Package: ftplib3 Architecture: any Multi-Arch: same Pre-Depends: multiarch-support Depends: ${shlibs:Depends}, ${misc:Depends} Description: Library of callable ftp routines Ftplib presents a convenient C interface for the standard File Transfer Protocol (FTP). It makes it easier for programmers to use file transfer in their programs. Package: ftplib-dev Section: libdevel Architecture: any Depends: ftplib3 (= ${binary:Version}), ${shlibs:Depends}, ${misc:Depends} Description: Library of callable ftp routines (development) Ftplib makes it easier for C programmers to use file transfer in their programs. This package is required to compile and link programs that use ftplib. It includes an example command line utility for transferring files via ftp (RFC959). debian/changelog0000644000000000000000000002100611723352647011051 0ustar ftplib (3.1-1-9build1) precise; urgency=low * No-change rebuild against current pkgbinarymangler to fix broken md5sums. (see LP #875466) -- Martin Pitt Wed, 29 Feb 2012 08:37:11 +0100 ftplib (3.1-1-9) unstable; urgency=low * Add new patch debian/patches/fix-ascii-read-without-eol to fix a bug where FtpRead in ASCII mode would overwrite the first byte of data read with a NUL char if no EOL is found in the next block of data read. * Install library in multiarch path. * Set CFLAGS/LDFLAGS/CPPFLAGS via dpkg-buildflags. * Bump Standards-Version to 3.9.2. -- Raphaël Hertzog Sat, 11 Jun 2011 16:07:39 +0200 ftplib (3.1-1-8) unstable; urgency=low * Convert to 3.0 (quilt) source format. Let's try it out for real and see how buildd copes with it. * Move an (unnoticed) Debian specific change in a new quilt patch with its DEP-3 compliant header. -- Raphaël Hertzog Thu, 29 Oct 2009 17:07:46 +0100 ftplib (3.1-1-7) unstable; urgency=low * New maintainer. Closes: #353128 * Fix the doc-base registration to mention section Programming and not Apps/Programming. * Fix RFC path given in README.Debian of ftplib-dev. * Add a symbols file for ftplib3. * Fix debian/html2man.py to escape dashes as \-. * Add a watch file indicating that upstream is not reliable in providing a consistent scheme for new releases (if any new release can be expected!). * Add Vcs-Git and Vcs-Browser URLs in debian/control. * Hardcode the dependency ftplib-dev → ftplib3 in debian/control instead of using debian/shlibs.local. * Drop Conflicts/Replaces fields introduced for a package split in 1998. * Update copyright file and add Homepage field. * Update Standards-Version to 3.8.3 (no supplementary changes needed). * Switch to debhelper 7 and tiny rules file. * Add a lintian override for package-name-doesnt-match-sonames as I don't plan to do a useless transition for now. -- Raphaël Hertzog Sun, 04 Oct 2009 19:07:28 +0200 ftplib (3.1-1-6) unstable; urgency=low * QA upload. * Package is orphaned (#353128); set maintainer to Debian QA Group. * Switch to debhelper. * Move ftplib-dev to libdevel in accordance with the override file. * Move qftp to /usr/lib/ftplib-dev/examples. * Move NOTES.qftp to /usr/share/doc/ftplib-dev/examples. * Replace /usr/share/doc/ftplib-dev/examples/README.qftp with a symlink to ../README.qftp. * Register documentation through doc-base rather than menu. * debian/Makefile.examples: Add symlinks for ftprm and ftplist. * debian/html2man.py: Create destination directory if necessary. * debian/changelog: Remove obsolete Emacs local variables. * debian/copyright: Update FSF address. * Conforms to Standards version 3.6.2. -- Matej Vela Thu, 9 Mar 2006 01:08:29 +0100 ftplib (3.1-1-5) unstable; urgency=low * Install NOTES file in ftplib-dev's documentation directory as NOTES.qftp * Don't compress very small documentation files (README.Debian, TODO). * Standards-Version 3.5.8. * Update package homepage and author's email address in debian/control. * debug -> noopt change: Build with debug support by default again. * Drop handling of /usr/doc symlink. * debian/rules: Get rid of double dependency of ftplib-dev on the runtime library, by munging the shlibdeps output for qftp. * debian/rules: Strip harder. -- Richard Braakman Thu, 12 Dec 2002 05:30:33 +0200 ftplib (3.1-1-4) unstable; urgency=low * Change build dependency again from python-base (>= 1.5.2-4) to just python, because python-base no longer exists. The package will still build on both potato and woody, because python-base in potato Provides: python. Thanks to Gregor Hoffleit for reporting the problem, and to David Kimdon for prodding me with a non-maintainer upload. (closes: bug#126079, doesn't build from source). -- Richard Braakman Sat, 2 Feb 2002 00:47:42 +0200 ftplib (3.1-1-3) unstable; urgency=low * Change build dependency from python-net (>= 1.5) to python-base (>= 1.5.2-4), because python-net got merged in long ago. The package will still build on both potato and woody. Thanks to Ryan Murray for pointing this out. (closes: bug#100181, invalid build-depends). -- Richard Braakman Sun, 10 Jun 2001 01:53:38 +0300 ftplib (3.1-1-2) unstable; urgency=low * Fixes bug spotted by Steve Fosdick. ftplib could segfault if an unknown port was specified by name. -- Richard Braakman Fri, 9 Feb 2001 12:13:11 +0200 ftplib (3.1-1-1) unstable; urgency=low * New upstream bugfixing patch. It was available only as a patch. I applied it to the ftplib 3.1 sources and used that as the "upstream source" for this package. * (debian/copyright) Noted new location of upstream source. -- Richard Braakman Fri, 2 Feb 2001 18:35:48 +0200 ftplib (3.1-2) unstable; urgency=low * Moved manpages and documentation to /usr/share. * Made debian/rules sensitive to DEB_BUILD_OPTIONS environment variable. * Handle /usr/doc compatibility symlinks in postinst and prerm. * Added Build-Depends. * Set Standards-Version to 3.2.1. -- Richard Braakman Tue, 30 Jan 2001 20:07:30 +0200 ftplib (3.1-1) unstable; urgency=low * New upstream source. * (debian/rules) Use linux/Makefile again, since it includes my rules for making shared libraries. * (debian/Makefile.linux) Discarded. * (debian/shlibs.local) Updated minimum version to 3.1-1, because new functions were added to the lib. * (debian/rules) Install the symlinks recommended by README.qftp in /usr/doc/ftplib-dev/examples/, so that the example works right away. -- Richard Braakman Tue, 7 Jul 1998 19:19:56 +0200 ftplib (3-4) unstable; urgency=low * (debian/NOTES) Noted source-dependency on python-net, for the benefit of people who want to recompile this package. -- Richard Braakman Sun, 26 Apr 1998 20:56:12 +0200 ftplib (3-3) frozen unstable; urgency=low * Upgrade to Debian policy 2.4.1: Move ldconfig call from ftplib-dev postinst to ftplib3 postinst. Only call ldconfig if argument is "configure". -- Richard Braakman Sun, 26 Apr 1998 20:56:12 +0200 ftplib (3-2) unstable; urgency=low * Put ftplib-dev in section devel, not libs. -- Richard Braakman Sun, 15 Feb 1998 04:06:32 +0100 ftplib (3-1) unstable; urgency=low * New maintainer. * New upstream source. * Adjusted copyright file (ftplib is now under LGPL). * Changed shlibs.local to depend on ftplib3 (>= 3-1). * Choose soname of libftp.3 and library name libftp.3.0. * debian/rules: more thorough "clean" target. * Moved header file to /usr/include/ftplib.h rather than /usr/include/ftplib/ftplib.h * Install simpler Makefile.examples * Split into ftplib and ftplib-dev packages. * Convert html docs to manpages and install those (as well as html versions). * Refer to rfc959 in the README.Debian instead of installing it. * Install menu entry for HTML documentation. * Include Section and Priority fields in binary packages. * Standards-Version 2.4.0.0. * Use -p when installing documentation files, to preserve timestamps. * Set timestamp of man pages equal to the timestamp of the html pages from which they were generated. -- Richard Braakman Sun, 4 Jan 1998 16:43:15 +0100 ftplib (2-3) unstable; urgency=low * Cosmetic change (Fix bug #9658). * Orphaned the package. -- Vincent Renardias Fri, 9 May 1997 14:41:58 +0200 ftplib (2-2) unstable; urgency=low * Rebuilt with libc6. -- Vincent Renardias Fri, 2 May 1997 01:36:09 +0200 ftplib (1-5) unstable; urgency=low * Compiled with '-D_REENTRANT'. -- Vincent Renardias Wed, 12 Feb 1997 00:57:59 +0100 ftplib (1-4) unstable; urgency=low * Moved into the "libs" section. * Provided a Makefile to build the examples. -- Vincent Renardias Sat, 11 Jan 1997 20:20:48 +0100 ftplib (1-3) unstable; urgency=low * Added missing ftplib.shlibs file. -- Vincent Renardias Sun, 1 Dec 1996 04:43:48 +0100 ftplib (1-2) unstable; urgency=low * Added a dynamic library version -- Vincent Renardias Sat, 2 Nov 1996 00:15:23 +0100 ftplib (1-1) unstable; urgency=low * Initial Release -- Vincent Renardias Sun, 20 Oct 1996 23:13:48 +0200 debian/ftplib-dev.docs0000664000000000000000000000005111574673656012116 0ustar README.ftplib_v3.1 README.qftp TODO html debian/ftplib-dev.README.Debian0000664000000000000000000000040711574673656013311 0ustar The FTP protocol is defined in RFC959, which you can find under /usr/share/doc/RFC/standard/rfc959.txt.gz if you have the doc-rfc-std Debian package installed. It will also be available at a friendly mirror site near you; most archive sites carry the RFC files. debian/ftplib-dev.doc-base0000664000000000000000000000057411574673656012655 0ustar Document: ftplib-dev Title: FTP Library Documentation Author: Thomas Pfau Abstract: Ftplib presents a convenient C interface for the standard File Transfer Protocol (FTP). It makes it easier for programmers to use file transfer in their programs. Section: Programming Format: HTML Index: /usr/share/doc/ftplib-dev/html/ftplib.html Files: /usr/share/doc/ftplib-dev/html/*.html debian/copyright0000664000000000000000000000172411574673656011153 0ustar Name: ftplib Maintainer: Thomas Pfau Source: http://nbpfaus.net/~pfau/ftplib/ Format-Specification: http://svn.debian.org/wsvn/dep/web/deps/dep5.mdwn?op=file&rev=59 Files: * Copyright: 1996-2000, Thomas Pfau License: LGPL-2+ On Debian systems the full text of the GNU Library General Public License can be found in the `/usr/share/common-licenses/LGPL-2' file. Files: */qftp.c, old/* Copyright: 1996-2000, Thomas Pfau License: GPL2+ On Debian systems the full text of the GNU General Public License can be found in the `/usr/share/common-licenses/GPL-2' file. Files: debian/* Copyright: 2009, Raphaël Hertzog 2006, Matej Vela 1998-2002, Richard Braakman 1996-1997, Vincent Renardias License: GPL2+ On Debian systems the full text of the GNU General Public License can be found in the `/usr/share/common-licenses/GPL-2' file. debian/ftplib-dev.install0000664000000000000000000000010411574673656012633 0ustar linux/ftplib.h usr/include linux/qftp usr/lib/ftplib-dev/examples