--- ftplib-3.1-1.orig/linux/ftplib.c +++ ftplib-3.1-1/linux/ftplib.c @@ -416,7 +416,11 @@ 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; } } --- ftplib-3.1-1.orig/debian/ftplib-dev.README.Debian +++ ftplib-3.1-1/debian/ftplib-dev.README.Debian @@ -0,0 +1,6 @@ +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. --- ftplib-3.1-1.orig/debian/control +++ ftplib-3.1-1/debian/control @@ -0,0 +1,27 @@ +Source: ftplib +Section: libs +Priority: optional +Maintainer: Raphaël Hertzog +Standards-Version: 3.8.3 +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 +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). --- ftplib-3.1-1.orig/debian/rules +++ ftplib-3.1-1/debian/rules @@ -0,0 +1,32 @@ +#!/usr/bin/make -f + +CFLAGS = -g +ifeq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) + CFLAGS += -O2 +else + CFLAGS += -O0 +endif + +%: + 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 + +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 + --- ftplib-3.1-1.orig/debian/ftplib-dev.links +++ ftplib-3.1-1/debian/ftplib-dev.links @@ -0,0 +1,2 @@ +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 --- ftplib-3.1-1.orig/debian/copyright +++ ftplib-3.1-1/debian/copyright @@ -0,0 +1,29 @@ +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. + --- ftplib-3.1-1.orig/debian/ftplib-dev.examples +++ ftplib-3.1-1/debian/ftplib-dev.examples @@ -0,0 +1,3 @@ +debian/Makefile.examples +linux/qftp.c +NOTES --- ftplib-3.1-1.orig/debian/Makefile.examples +++ ftplib-3.1-1/debian/Makefile.examples @@ -0,0 +1,21 @@ +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) --- ftplib-3.1-1.orig/debian/ftplib3.install +++ ftplib-3.1-1/debian/ftplib3.install @@ -0,0 +1 @@ +linux/libftp.so.* usr/lib --- ftplib-3.1-1.orig/debian/html2man.py +++ ftplib-3.1-1/debian/html2man.py @@ -0,0 +1,195 @@ +#! /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)) --- ftplib-3.1-1.orig/debian/ftplib3.symbols +++ ftplib-3.1-1/debian/ftplib3.symbols @@ -0,0 +1,28 @@ +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 --- ftplib-3.1-1.orig/debian/watch +++ ftplib-3.1-1/debian/watch @@ -0,0 +1,3 @@ +# 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 --- ftplib-3.1-1.orig/debian/changelog +++ ftplib-3.1-1/debian/changelog @@ -0,0 +1,204 @@ +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 --- ftplib-3.1-1.orig/debian/ftplib-dev.doc-base +++ ftplib-3.1-1/debian/ftplib-dev.doc-base @@ -0,0 +1,11 @@ +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 --- ftplib-3.1-1.orig/debian/compat +++ ftplib-3.1-1/debian/compat @@ -0,0 +1 @@ +7 --- ftplib-3.1-1.orig/debian/ftplib3.lintian-overrides +++ ftplib-3.1-1/debian/ftplib3.lintian-overrides @@ -0,0 +1,3 @@ +# 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 --- ftplib-3.1-1.orig/debian/ftplib-dev.docs +++ ftplib-3.1-1/debian/ftplib-dev.docs @@ -0,0 +1,4 @@ +README.ftplib_v3.1 +README.qftp +TODO +html --- ftplib-3.1-1.orig/debian/ftplib-dev.install +++ ftplib-3.1-1/debian/ftplib-dev.install @@ -0,0 +1,4 @@ +linux/ftplib.h usr/include +linux/libftp.a usr/lib +linux/libftp.so usr/lib +linux/qftp usr/lib/ftplib-dev/examples