--- yafc-1.1.1.dfsg.1.orig/debian/control +++ yafc-1.1.1.dfsg.1/debian/control @@ -0,0 +1,17 @@ +Source: yafc +Section: net +Priority: optional +Maintainer: Decklin Foster +Standards-Version: 3.7.2 +Build-Depends: debhelper (>= 4.0.0), quilt, texinfo, libncurses5-dev, libreadline-dev + +Package: yafc +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: yet another FTP client + yafc is an ftp client intended to be a replacement for the standard + ftp(1) program. Features include directory cache, remote filename + completion, aliases, colored ls, recursive get/put/ls/rm, nohup mode + transfers, tagging (queueing), background downloading, and more. + . + This version is compiled without KTH Kerberos 4/5 authentication. --- yafc-1.1.1.dfsg.1.orig/debian/yafc.copyright.in +++ yafc-1.1.1.dfsg.1/debian/yafc.copyright.in @@ -0,0 +1,11 @@ +This package was debianized by Decklin Foster +Mon, 21 Jun 1999 20:20:33 -0400. + +It was downloaded from: http://yafc.sourceforge.net/ +Upstream author: Martin Hedenfalk + +Upstream copyright notice follows. On Debian GNU/Linux systems, the +complete text of the GNU General Public License can be found in +`/usr/share/common-licenses/GPL'. + + --- yafc-1.1.1.dfsg.1.orig/debian/changelog +++ yafc-1.1.1.dfsg.1/debian/changelog @@ -0,0 +1,372 @@ +yafc (1.1.1.dfsg.1-4.1) unstable; urgency=low + + * Non-maintainer upload. + * Change Build-Dep libreadline5-dev to libreadline-dev. (Closes: #553874) + * Add patch from Mats Erik Andersson to fix FTBFS on GNU/kFreeBSD. (Closes: + #601758) + * Add patch from Lionel Landwerlin to fix wrong usage of strcpy. (Closes: + #604190) + + -- Sebastian Ramacher Thu, 04 Aug 2011 16:55:52 +0200 + +yafc (1.1.1.dfsg.1-4) unstable; urgency=low + + * Fix segfault on completing a line of whitespace (Closes: #418171) + + -- Decklin Foster Fri, 26 Sep 2008 17:43:55 -0400 + +yafc (1.1.1.dfsg.1-3) unstable; urgency=low + + * Added patch to fix useless sleep on interactive login (Closes: #197326) + * Explicitly disable Kerberos in configure as we don't currently support + it. + + -- Decklin Foster Wed, 28 Mar 2007 16:14:44 -0400 + +yafc (1.1.1.dfsg.1-2) unstable; urgency=low + + * Converted from dpatch to quilt. + * Added patches from neologix@free.fr: + - Allow expansion of '~user' + - Use tmpfile instead of mktemp (Closes: #368688) + - Fix some compiler warnings + + -- Decklin Foster Wed, 20 Sep 2006 13:24:41 -0400 + +yafc (1.1.1.dfsg.1-1) unstable; urgency=low + + * Strip out all the junk in the upstream tarball so we can upload this. + + -- Decklin Foster Mon, 10 Apr 2006 15:47:44 -0400 + +yafc (1.1.1-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Thu, 6 Oct 2005 16:53:30 -0400 + +yafc (1.1-4) unstable; urgency=low + + * 10_list_all.dpatch: disabled, as this is causing problems with other + servers. Reopening bug #232012 until we can get a better solution. + (Closes: #275314) + * 20_proxy_7.dpatch: Provide a new type of proxy server. + + -- Decklin Foster Sat, 8 Jan 2005 19:34:34 -0500 + +yafc (1.1-3) unstable; urgency=low + + * Compile against libreadline5. + + -- Decklin Foster Sat, 25 Dec 2004 08:37:03 -0500 + +yafc (1.1-2) unstable; urgency=low + + * Set sysconfdir to /etc instead of ${prefix}/etc when configuring. + (Closes: #278024) + + -- Decklin Foster Mon, 25 Oct 2004 01:51:11 -0400 + +yafc (1.1-1) unstable; urgency=low + + * New upstream release; This merges all of the patches previously held in + debian/patches. Of note, the LFS patch has been applied with Sebastian + Henschel's fix. I would like to thank Martin Pitt and Michael Banck for + their NMUs during my unfortunate absence. (Closes: #214050, #222632) + * Drop /usr/bin/ftp alternative. (Closes: #221117) + * Added 10_list_all.dpatch from Sebastian Henschel (Closes: #232012) + * Added 30_pathmax.dpatch from Marc Dequènes (Closes: #223581) + + -- Decklin Foster Sat, 2 Oct 2004 06:01:09 -0400 + +yafc (1.0-7.2) unstable; urgency=low + + * NMU during Bug-Squashing-Party + * Applied patch by Sebastian Henschel fixing a segfault when + transferring files on powerpc (Closes: #222632) + + -- Michael Banck Sat, 17 Apr 2004 00:18:36 +0200 + +yafc (1.0-7.1) unstable; urgency=low + + * Non-maintainer upload + * added debian/patches/21_errno.dpatch to replace 'extern int errno' with + '#include ' to work with newer glibcs (closes: #219588) + + -- Martin Pitt Fri, 19 Dec 2003 11:30:10 +0100 + + +yafc (1.0-7) unstable; urgency=low + + * Add ugly workaround to doc/Makefile.in to correctly detect the presence + of Debian install-info and not call it during the build (Closes: #214050) + + -- Decklin Foster Sun, 5 Oct 2003 14:46:49 -0400 + +yafc (1.0-6) unstable; urgency=low + + * Reverted part of the LFS patch from #172409. This seems wrong to me, but + it fixes the segfault for now. (Closes: #213058) + + -- Decklin Foster Mon, 29 Sep 2003 16:43:28 -0400 + +yafc (1.0-5) unstable; urgency=low + + * It helps if, when using dpatch, I actually build-dep on dpatch. Der. + (Closes: #212039) + + -- Decklin Foster Sun, 21 Sep 2003 19:55:34 -0400 + +yafc (1.0-4) unstable; urgency=low + + * Converted to dpatch + - 10_lfs: Large file support from Eduard, we've had this for a while. + - 11_leak2: Thomas Habets's fix for memory and file descriptor leaks. + (Closes: #177385) + - 12_ssh_opts: Also from Eduard, backported from CVS: allow passing + arbitrary options to ssh. (Closes: #166473) + - 13_help_arg: Another one from Eduard, improving the help command. + - 20_fsf_addr: Placate that silly lintian warning. + + -- Decklin Foster Sat, 20 Sep 2003 21:37:21 -0400 + +yafc (1.0-3) unstable; urgency=low + + * Register as an alternative for /usr/bin/ftp (Closes: #203743) + * Bump Standards-Version to 3.6.0 + + -- Decklin Foster Wed, 20 Aug 2003 16:14:26 -0400 + +yafc (1.0-2) unstable; urgency=low + + * The "Reports of my vacation have been greatly exaggerated" release + * Fix bugs introduced by the LFS patch (#156982). Thanks to Martin for + identifying the problem and Ari Pollak for providing the patch. + (Closes: #172087, #172409) + * Support DEB_BUILD_OPTIONS =~ /noopt/ correctly (thanks again to Ari for + pointing this out). My eyes must have glazed over while reading the + upgrading checklist. + + -- Decklin Foster Mon, 16 Dec 2002 19:00:53 -0500 + +yafc (1.0-1) unstable; urgency=low + + * New upstream release + * Added reference to /usr/share/common-licenses/GPL in copyright file. + + -- Decklin Foster Mon, 16 Dec 2002 19:00:49 -0500 + +yafc (0.7.10-3) unstable; urgency=low + + * Don't free return value of getenv (Closes: #168089) + * Use debhelper v4 and Standards-Version 3.5.7 + * Updated copyright file + + -- Decklin Foster Wed, 6 Nov 2002 17:16:52 -0500 + +yafc (0.7.10-2) unstable; urgency=low + + * Applied Eduard Bloch's LFS patch (Closes: #156982) + + -- Decklin Foster Mon, 19 Aug 2002 15:50:00 -0400 + +yafc (0.7.10-1) unstable; urgency=low + + * New upstream release (Closes: #148688) + + -- Decklin Foster Tue, 4 Jun 2002 02:47:20 -0400 + +yafc (0.7.8-1) unstable; urgency=low + + * New upstream release (Closes: #135623) + + -- Decklin Foster Mon, 8 Apr 2002 01:18:03 -0400 + +yafc (0.7.7-1) unstable; urgency=low + + * New upstream release + * Fixed .diff.gz + + -- Decklin Foster Sat, 23 Feb 2002 16:33:32 -0500 + +yafc (0.7.6-2) unstable; urgency=low + + * Fixed segfault on unspecified protocol and port (Closes: #135265) + + -- Decklin Foster Sat, 23 Feb 2002 00:18:02 -0500 + +yafc (0.7.6-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Mon, 18 Feb 2002 18:30:30 -0500 + +yafc (0.7.5-1) unstable; urgency=low + + * New upstream release + * Bump Standards-Version, add --build and --host to ./configure + + -- Decklin Foster Sun, 4 Nov 2001 10:53:20 -0500 + +yafc (0.7.4-1) unstable; urgency=low + + * New upstream release, fixes DOS directory listing (Closes: #107155) + + -- Decklin Foster Fri, 24 Aug 2001 12:15:31 -0400 + +yafc (0.7.3-1) unstable; urgency=low + + * New upstream release, fixes 'alias l' segfault (Closes: #106621) + + -- Decklin Foster Fri, 27 Jul 2001 13:28:31 -0400 + +yafc (0.7.2-1) unstable; urgency=low + + * New upstream release + * Added texinfo to Build-Depends + * Update Standards-Version to 3.5.5 + + -- Decklin Foster Fri, 20 Jul 2001 21:01:52 -0400 + +yafc (0.7.1-1) unstable; urgency=low + + * New upstream release + * Updated to use debhelper v3 and Standards-Version 3.5.4 + + -- Decklin Foster Tue, 22 May 2001 20:41:06 -0400 + +yafc (0.6.6-2) unstable; urgency=low + + * Increase debhelper build dep to >= 2.1.6. This is needed because + we depend on dh_strip to do the right thing when "nostrip" is set + in DEB_BUILD_OPTIONS (otherwise, adding "debug" would be useless + as there would be no way to prevent debugging information from + being stripped). + + -- Decklin Foster Tue, 13 Feb 2001 19:25:52 -0500 + +yafc (0.6.6-1) unstable; urgency=low + + * New upstream release. + * Made debhelper build dependency versioned. + * Removed -g from the default compilation flags, and added support + for "debug" in DEB_BUILD_OPTIONS. + * Increased Standards-Version to 3.5.0.0. + + -- Decklin Foster Sat, 10 Feb 2001 17:48:36 -0500 + +yafc (0.6.5-1) unstable; urgency=low + + * New upstream release (this fixes the stale /etc/yafcrc I left in + the last version). + + -- Decklin Foster Fri, 20 Oct 2000 18:24:40 -0400 + +yafc (0.6.4-1) unstable; urgency=low + + * New upstream release + * Checked recent revisions to policy and updated Standards-Version + * Updated debhelper rules to v2 + * install upstream changelog as changelog.gz instead of NEWS.gz + * Updated debian/copyright info from upstream COPYRIGHT (also + fixed emails). 0.6.3 was held due to copyright problems. + + -- Decklin Foster Sat, 14 Oct 2000 13:22:11 -0400 + +yafc (0.6.2-1) unstable; urgency=low + + * New upstream release + * debian/copyright: updated URL + * debian/dirs: fixed etc/ typo + * debian/rules: corrected build target + + -- Decklin Foster Fri, 15 Sep 2000 08:55:41 -0400 + +yafc (0.6.1-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Tue, 5 Sep 2000 23:30:44 -0400 + +yafc (0.6-1) unstable; urgency=low + + * New upstream release + * debian/control: added Build-Depends + + -- Decklin Foster Thu, 31 Aug 2000 22:27:46 -0400 + +yafc (0.5.8-1) unstable; urgency=low + + * New upstream release + * Moved the sample yafcrc out of /usr/share/doc, as /etc/yafcrc is + now read by the program. + + -- Decklin Foster Tue, 15 Aug 2000 18:41:03 -0400 + +yafc (0.5.6-1) unstable; urgency=low + + * New upstream release + * Fixed author's email in debian/copyright + + -- Decklin Foster Sun, 23 Jul 2000 21:31:44 -0400 + +yafc (0.5.5-2) unstable; urgency=low + + * Wrote man page. + + -- Decklin Foster Mon, 17 Jul 2000 00:44:50 -0500 + +yafc (0.5.5-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Fri, 30 Jun 2000 10:33:14 -0400 + +yafc (0.5.4-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Sat, 20 May 2000 20:39:25 -0400 + +yafc (0.5.2-1) unstable; urgency=low + + * New upstream release + * Moved info documentation to /usr/share/info + + -- Decklin Foster Fri, 21 Apr 2000 18:58:56 -0400 + +yafc (0.5.0-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Thu, 9 Dec 1999 21:18:58 -0500 + +yafc (0.4.8-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Sun, 31 Oct 1999 14:11:44 -0500 + +yafc (0.4.6-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Thu, 19 Aug 1999 13:35:05 -0400 + +yafc (0.4.5-1) unstable; urgency=low + + * New upstream release + + -- Decklin Foster Sat, 24 Jul 1999 12:37:19 -0400 + +yafc (0.4.3-2) unstable; urgency=low + + * Added /usr/doc/yafc/examples. + + -- Decklin Foster Thu, 24 Jun 1999 00:39:10 -0400 + +yafc (0.4.3-1) unstable; urgency=low + + * Initial release + + -- Decklin Foster Mon, 21 Jun 1999 20:20:33 -0400 --- yafc-1.1.1.dfsg.1.orig/debian/yafc.dirs +++ yafc-1.1.1.dfsg.1/debian/yafc.dirs @@ -0,0 +1,2 @@ +etc +usr/bin --- yafc-1.1.1.dfsg.1.orig/debian/yafc.menu +++ yafc-1.1.1.dfsg.1/debian/yafc.menu @@ -0,0 +1,2 @@ +?package(yafc):needs="text" section="Apps/Net" \ + title="Yet Another FTP Client" command="/usr/bin/yafc" --- yafc-1.1.1.dfsg.1.orig/debian/rules +++ yafc-1.1.1.dfsg.1/debian/rules @@ -0,0 +1,93 @@ +#!/usr/bin/make -f +# Sample debian/rules that uses debhelper. +# This file is public domain software, originally written by Joey Hess. + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +DEB_CFLAGS = -Wall -g +ifneq (,$(findstring noopt,$(DEB_BUILD_OPTIONS))) +DEB_CFLAGS += -O0 +else +DEB_CFLAGS += -O2 +endif + +export DEB_HOST_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_HOST_GNU_TYPE) +export DEB_BUILD_GNU_TYPE ?= $(shell dpkg-architecture -qDEB_BUILD_GNU_TYPE) + +patch: patch-stamp +patch-stamp: + QUILT_PATCHES=debian/patches quilt push -a || test $$? = 2 + touch patch-stamp + +unpatch: + QUILT_PATCHES=debian/patches quilt pop -a -R || test $$? = 2 + rm -rf .pc patch-stamp + +configure: configure-stamp +configure-stamp: patch-stamp + dh_testdir + + # Add here commands to configure the package. + CFLAGS='$(DEB_CFLAGS)' ./configure --build='$(DEB_BUILD_GNU_TYPE)' --host='$(DEB_HOST_GNU_TYPE)' --prefix='/usr' --sysconfdir='/etc' --mandir='$${prefix}/share/man' --infodir='$${prefix}/share/info' --without-krb4 --without-krb5 + + touch configure-stamp + +build: configure-stamp build-stamp +build-stamp: + dh_testdir + + # Add here commands to compile the package. + $(MAKE) + + touch build-stamp + +clean: unpatch + dh_testdir + dh_testroot + + # Add here commands to clean up after the build process. + -$(MAKE) distclean + rm -f doc/yafc.info + + dh_clean patch-stamp configure-stamp build-stamp debian/yafc.copyright + +install: build + dh_testdir + dh_testroot + dh_clean -k + dh_installdirs + + # Add here commands to install the package into debian/ + $(MAKE) prefix=$(CURDIR)/debian/yafc/usr install + # NOTE: upstream Makefile doesn't install this currently. + install -m 644 yafcrc.sample $(CURDIR)/debian/yafc/etc/yafcrc + + +# Build architecture-independent files here. +binary-indep: build install +# We have nothing to do by default. + +# Build architecture-dependent files here. +binary-arch: build install + cat debian/yafc.copyright.in COPYRIGHT > debian/yafc.copyright + dh_testdir + dh_testroot + dh_installchangelogs NEWS + dh_installdocs + dh_installexamples + dh_installmenu + dh_installinfo + dh_installman + dh_link + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary: binary-indep binary-arch +.PHONY: build clean binary-indep binary-arch binary install --- yafc-1.1.1.dfsg.1.orig/debian/yafc.info +++ yafc-1.1.1.dfsg.1/debian/yafc.info @@ -0,0 +1 @@ +doc/yafc.info --- yafc-1.1.1.dfsg.1.orig/debian/yafc.prerm +++ yafc-1.1.1.dfsg.1/debian/yafc.prerm @@ -0,0 +1,3 @@ +#!/bin/sh -e + +#DEBHELPER# --- yafc-1.1.1.dfsg.1.orig/debian/compat +++ yafc-1.1.1.dfsg.1/debian/compat @@ -0,0 +1 @@ +4 --- yafc-1.1.1.dfsg.1.orig/debian/yafc.examples +++ yafc-1.1.1.dfsg.1/debian/yafc.examples @@ -0,0 +1,2 @@ +inputrc.sample +contrib/yafc-import_ncftp.pl --- yafc-1.1.1.dfsg.1.orig/debian/yafc.docs +++ yafc-1.1.1.dfsg.1/debian/yafc.docs @@ -0,0 +1,4 @@ +BUGS +README +THANKS +TODO --- yafc-1.1.1.dfsg.1.orig/debian/yafc.postinst +++ yafc-1.1.1.dfsg.1/debian/yafc.postinst @@ -0,0 +1,3 @@ +#!/bin/sh -e + +#DEBHELPER# --- yafc-1.1.1.dfsg.1.orig/debian/patches/proxy-7.patch +++ yafc-1.1.1.dfsg.1/debian/patches/proxy-7.patch @@ -0,0 +1,62 @@ +Index: yafc-1.1.1.dfsg.1/src/ftp/ftp.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/ftp/ftp.c 2006-09-20 13:21:25.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/ftp/ftp.c 2006-09-20 13:22:16.000000000 -0400 +@@ -311,7 +311,13 @@ + ftp_set_signal(SIGALRM, SIG_IGN); + return -1; + } ++ /* keep the value in urlp->port + urlp->port = ntohs(ftp->host->port); ++ and set it to 21 if it is -1 */ ++ if(urlp->port == -1) { ++ urlp->port = 21; ++ } ++ + + fprintf(stderr, "\r "); + i = strlen(use_proxy ? gvProxyUrl->hostname : urlp->hostname); +@@ -861,7 +867,7 @@ + r = get_username(ftp->url, guessed_username, false); + if(r != 0) + return r; +- if(ptype > 1) { ++ if(ptype > 1 && ptype < 7) { + r = get_username(purl, 0, true); + if(r != 0) + return r; +@@ -972,6 +978,9 @@ + ftp_cmd("USER %s", ftp->url->username); + } + break; ++ case 7: ++ ftp_cmd("USER %s@%s:%i", ftp->url->username, ftp->url->hostname, ftp->url->port); ++ break; + } + + if(ftp->code == ctContinue) { +Index: yafc-1.1.1.dfsg.1/src/rc.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/rc.c 2006-09-20 13:21:25.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/rc.c 2006-09-20 13:22:16.000000000 -0400 +@@ -516,7 +516,7 @@ + NEXTSTR; + + gvProxyType = atoi(e); +- if(gvProxyType < 0 || gvProxyType > 6) { ++ if(gvProxyType < 0 || gvProxyType > 7) { + errp(_("Invalid value for proxy_type: %d\n"), gvProxyType); + gvProxyType = 0; + } +Index: yafc-1.1.1.dfsg.1/yafcrc.sample +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/yafcrc.sample 2006-09-20 13:21:25.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/yafcrc.sample 2006-09-20 13:22:16.000000000 -0400 +@@ -287,6 +287,7 @@ + # 4 - login to proxy, OPEN real_host, USER real_user, PASS real_password + # 5 - connect to proxy, USER real_user@proxy_user@real_host, PASS real_password@proxy_password + # 6 - connect to proxy, USER proxy_user@real_host, PASS proxy_password, USER realuser, PASS real_password ++# 7 - connect to proxy, USER real_user@real_host:real_port, PASS real_password + + proxy_type 0 + --- yafc-1.1.1.dfsg.1.orig/debian/patches/yafc-tilde.patch +++ yafc-1.1.1.dfsg.1/debian/patches/yafc-tilde.patch @@ -0,0 +1,54 @@ +diff -ur yafc-1.1.1/src/libmhe/strq.c yafc-1.1.1.new/src/libmhe/strq.c +--- yafc-1.1.1/src/libmhe/strq.c 2004-05-20 13:15:17.000000000 +0200 ++++ yafc-1.1.1.new/src/libmhe/strq.c 2006-07-03 18:51:31.000000000 +0200 +@@ -405,24 +405,36 @@ + } + + /* returns string with ~/foo expanded to /home/username/foo +- * FIXME: does not handle ~user/foo ++ * can handle ~user/foo + * returned string should be free'd + */ + char *tilde_expand_home(const char *str, const char *home) + { +- if(str[0] == '~') { +- if(home) { +- if(str[1] == 0) +- return xstrdup(home); +- else if(str[1] == '/') { +- char *full; +- +- asprintf(&full, "%s%s", home, str+1); +- return full; +- } +- } +- } +- return xstrdup(str); ++ char *full, *s; ++ ++ if(home && (strcmp(str, "~") == 0)) ++ full = xstrdup(home); ++ else if(home && (strncmp(str, "~/", 2) == 0)) ++ asprintf(&full, "%s%s", home, str + 1); ++ else if ((str[0] == '~') && ((s = strchr(str, '/')) || ++ (s = str+strlen(str)))) { ++ char *user; ++ struct passwd *pass; ++ ++ user = xmalloc(s - str); ++ memcpy(user, str+1, s-str-1); ++ user[s-str-1] = 0; ++ ++ if ((pass = getpwnam(user)) || (!strlen(user) && ++ (pass = getpwuid(getuid())))) ++ asprintf(&full, "%s%s", pass->pw_dir, s); ++ else ++ full = xstrdup(str); ++ free(user); ++ } else ++ full = xstrdup(str); ++ ++ return full; + } + + /* encodes special characters found in STR --- yafc-1.1.1.dfsg.1.orig/debian/patches/series +++ yafc-1.1.1.dfsg.1/debian/patches/series @@ -0,0 +1,9 @@ +pathmax.patch +proxy-7.patch +yafc-tmpfiles.patch +yafc-warnings.patch +yafc-tilde.patch +wait-time.patch +complete-whitespace.patch +use-termios.patch +fix-strcpy.patch --- yafc-1.1.1.dfsg.1.orig/debian/patches/fix-strcpy.patch +++ yafc-1.1.1.dfsg.1/debian/patches/fix-strcpy.patch @@ -0,0 +1,26 @@ +Description: fix wrong usage of strcpy in strpull +Author: Lionel Landwerlin +Bug-Debian: http://bugs.debian.org/604190 +Last-Update: 2011-08-04 + +diff --git a/src/libmhe/strq.c b/src/libmhe/strq.c +index 00b51c7..f303d84 100644 +--- a/src/libmhe/strq.c ++++ b/src/libmhe/strq.c +@@ -96,9 +96,10 @@ void strpush(char *s, int n) + + void strpull(char *s, int n) + { +- if(n > strlen(s)) +- n = strlen(s); +- strcpy(s, s+n); ++ int l = strlen(s); ++ if (n > l) ++ n = l; ++ memmove(s, s+n, l-n+1); + } + + /* returns number of C in STR */ +-- +1.7.2.3 + --- yafc-1.1.1.dfsg.1.orig/debian/patches/yafc-warnings.patch +++ yafc-1.1.1.dfsg.1/debian/patches/yafc-warnings.patch @@ -0,0 +1,102 @@ +Index: yafc-1.1.1.dfsg.1/lib/modechange.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/lib/modechange.c 2006-09-20 13:24:04.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/lib/modechange.c 2006-09-20 13:24:15.000000000 -0400 +@@ -55,7 +55,7 @@ + + #define isodigit(c) ((c) >= '0' && (c) <= '7') + +-static int oatoi (); ++static int oatoi(const char *s); + + /* Return a linked list of file mode change operations created from + MODE_STRING, an ASCII string that contains either an octal number +@@ -71,9 +71,7 @@ + return MODE_MEMORY_EXHAUSTED if there is insufficient memory. */ + + struct mode_change * +-mode_compile (mode_string, masked_ops) +- const char *mode_string; +- unsigned masked_ops; ++mode_compile (const char *mode_string, unsigned masked_ops) + { + struct mode_change *head; /* First element of the linked list. */ + struct mode_change *change; /* An element of the linked list. */ +@@ -308,11 +306,9 @@ + /* Free the memory used by the list of file mode change operations + CHANGES. */ + +-void +-mode_free (changes) +- register struct mode_change *changes; ++void mode_free (struct mode_change *changes) + { +- register struct mode_change *next; ++ struct mode_change *next; + + while (changes) + { +@@ -325,9 +321,7 @@ + /* Return a positive integer containing the value of the ASCII + octal number S. If S is not an octal number, return -1. */ + +-static int +-oatoi (s) +- char *s; ++static int oatoi (const char *s) + { + register int i; + +Index: yafc-1.1.1.dfsg.1/src/ftp/ftpsend.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/ftp/ftpsend.c 2006-09-20 13:24:04.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/ftp/ftpsend.c 2006-09-20 13:24:15.000000000 -0400 +@@ -971,7 +971,7 @@ + } + + if(rp > 0L) { +- if(fseeko(fp, rp, SEEK_SET) != 0) { ++ if(fseek(fp, rp, SEEK_SET) != 0) { + ftp_err(_("%s: %s, transfer cancelled\n"), + outfile, strerror(errno)); + close_func(fp); +@@ -1044,7 +1044,7 @@ + + + if(ftp->restart_offset > 0L) { +- if(fseeko(fp, ftp->restart_offset, SEEK_SET) != 0) { ++ if(fseek(fp, ftp->restart_offset, SEEK_SET) != 0) { + ftp_err(_("%s: %s, transfer cancelled\n"), + outfile, strerror(errno)); + fclose(fp); +Index: yafc-1.1.1.dfsg.1/src/ftp/socket.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/ftp/socket.c 2006-09-20 13:24:04.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/ftp/socket.c 2006-09-20 13:24:15.000000000 -0400 +@@ -153,7 +153,7 @@ + { + int s; + struct sockaddr sa; +- int l = sizeof(sa); ++ socklen_t l = sizeof(sa); + int tfd; + + if(!pasvmode) { +Index: yafc-1.1.1.dfsg.1/src/utils.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/utils.c 2006-09-20 13:24:15.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/utils.c 2006-09-20 13:24:15.000000000 -0400 +@@ -211,11 +211,11 @@ + pid = fork(); + if(pid == 0) { /* child thread */ + if(cmdline) +- execl(shell, shell, "-c", cmdline, 0); ++ execl(shell, shell, "-c", cmdline, (char *)NULL); + else { + printf(_("Executing '%s', use 'exit' to exit from shell...\n"), + shell); +- execl(shell, shell, 0); ++ execl(shell, shell, (char *)NULL); + } + perror(shell); + exit(1); --- yafc-1.1.1.dfsg.1.orig/debian/patches/yafc-tmpfiles.patch +++ yafc-1.1.1.dfsg.1/debian/patches/yafc-tmpfiles.patch @@ -0,0 +1,94 @@ +Index: yafc-1.1.1.dfsg.1/src/ftp/ftp.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/ftp/ftp.c 2006-09-20 13:22:16.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/ftp/ftp.c 2006-09-20 13:23:56.000000000 -0400 +@@ -24,9 +24,6 @@ + /* in cmd.c */ + void exit_yafc(void); + +-/* in get.c */ +-char *make_unique_filename(const char *path); +- + /* in tag.c */ + void save_taglist(const char *alt_filename); + +@@ -1319,7 +1316,6 @@ + FILE *fp = 0; + rdirectory *rdir; + bool is_curdir = false; +- char *tmpfilename, *e; + bool _failed = false; + char *dir; + bool is_mlsd = false; +@@ -1332,27 +1328,12 @@ + + is_curdir = (strcmp(dir, ftp->curdir) == 0); + +- asprintf(&e, "%s/yafclist.tmp", gvWorkingDirectory); +- tmpfilename = make_unique_filename(e); +- free(e); +- fp = fopen(tmpfilename, "w+"); +- +- if(fp == 0) { +- /* can't create a tmpfile in ~/.yafc, try in /tmp/ */ +- +- tmpfilename = make_unique_filename("/tmp/yafclist.tmp"); +- fp = fopen(tmpfilename, "w+"); +- +- if(fp == 0) { +- ftp_err("%s: %s\n", tmpfilename, strerror(errno)); ++ if((fp = tmpfile()) == NULL) { /* can't create a tmpfile */ ++ ftp_err("%s\n", strerror(errno)); + free(dir); +- free(tmpfilename); + return 0; +- } + } + +- fchmod(fileno(fp), S_IRUSR | S_IWUSR); +- + /* we do a "CWD" before the listing, because: we want a listing of + * the directory contents, not the directory itself, and some + * servers misunderstand this. If the target is a link to a +@@ -1409,16 +1390,12 @@ + ftp_trace("added directory '%s' to cache\n", dir); + list_additem(ftp->cache, rdir); + free(dir); +- unlink(tmpfilename); +- free(tmpfilename); + return rdir; + + failed: /* forgive me father, for I have goto'ed */ ++ if (fp) ++ fclose(fp); + free(dir); +- if(fp) +- fclose(fp); +- unlink(tmpfilename); +- free(tmpfilename); + return 0; + } + +Index: yafc-1.1.1.dfsg.1/src/transfer.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/transfer.c 2004-05-20 07:10:52.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/transfer.c 2006-09-20 13:23:56.000000000 -0400 +@@ -386,17 +386,9 @@ + return; + + if(!opened) { +- char *e; +- char *tmpfilename; +- +- asprintf(&e, "%s/yafcmail.tmp", gvWorkingDirectory); +- tmpfilename = make_unique_filename(e); +- free(e); +- +- mailfp = fopen(tmpfilename, "w+"); ++ mailfp = tmpfile(); + opened = true; + if(mailfp) { +- unlink(tmpfilename); + setbuf(logfp, 0); /* change buffering */ + transfer_mail_msg(_("From: yafc@%s\n" + "Subject: yafc transfer finished on %s\n" --- yafc-1.1.1.dfsg.1.orig/debian/patches/wait-time.patch +++ yafc-1.1.1.dfsg.1/debian/patches/wait-time.patch @@ -0,0 +1,13 @@ +diff -ur yafc-1.1.1/src/login.c yafc-1.1.1.new/src/login.c +--- yafc-1.1.1/src/login.c 2003-07-12 05:21:10.000000000 -0500 ++++ yafc-1.1.1.new/src/login.c 2006-09-21 07:37:42.000000000 -0500 +@@ -207,7 +207,8 @@ + if(r == -1) + break; + +- if(gvConnectAttempts == -1 || i+1 < gvConnectAttempts) { ++ if(url->username && ++ (gvConnectAttempts == -1 || i+1 < gvConnectAttempts)) { + ftp_set_close_handler(); + fprintf(stderr, _("Sleeping %u seconds before connecting again" + " (attempt #%d)...\n"), --- yafc-1.1.1.dfsg.1.orig/debian/patches/list-all.patch +++ yafc-1.1.1.dfsg.1/debian/patches/list-all.patch @@ -0,0 +1,19 @@ +diff -Naur yafc-1.0.orig/src/ftp/ftp.c yafc-1.0/src/ftp/ftp.c +--- yafc-1.0.orig/src/ftp/ftp.c 2004-02-10 10:30:22.065639176 +0100 ++++ yafc-1.0/src/ftp/ftp.c 2004-02-10 10:26:24.351777176 +0100 +@@ -1372,13 +1372,13 @@ + _failed = (ftp_list("MLSD", asdf, fp) != 0); + free(asdf); + #else +- _failed = (ftp_list("MLSD", 0, fp) != 0); ++ _failed = (ftp_list("MLSD", "-a", fp) != 0); + #endif + if(_failed && ftp->code == ctError) + ftp->has_mlsd_command = false; + } + if(!ftp->has_mlsd_command) { +- _failed = (ftp_list("LIST", 0, fp) != 0); ++ _failed = (ftp_list("LIST", "-a", fp) != 0); + is_mlsd = false; + } + --- yafc-1.1.1.dfsg.1.orig/debian/patches/complete-whitespace.patch +++ yafc-1.1.1.dfsg.1/debian/patches/complete-whitespace.patch @@ -0,0 +1,14 @@ +Index: yafc-1.1.1.dfsg.1/src/completion.c +=================================================================== +--- yafc-1.1.1.dfsg.1.orig/src/completion.c 2008-09-26 17:40:34.000000000 -0400 ++++ yafc-1.1.1.dfsg.1/src/completion.c 2008-09-26 17:43:46.000000000 -0400 +@@ -354,6 +354,9 @@ + rl_completion_append_character = ' '; + #endif + ++ if (start == end) ++ return NULL; ++ + if(force_completion_type == cpUnset) { + int i; + int cmd_start; --- yafc-1.1.1.dfsg.1.orig/debian/patches/pathmax.patch +++ yafc-1.1.1.dfsg.1/debian/patches/pathmax.patch @@ -0,0 +1,196 @@ +diff -ur yafc-1.0_orig/src/get.c yafc-1.0_duck/src/get.c +--- yafc-1.0_orig/src/get.c 2003-12-10 11:03:34.000000000 +0100 ++++ yafc-1.0_duck/src/get.c 2003-12-10 12:40:55.000000000 +0100 +@@ -98,7 +98,7 @@ + { + int r = 0; + char *fulldest; +- char tmp[PATH_MAX]; ++ char *tmp; + transfer_mode_t type; + + type = ascii_transfer(src) ? tmAscii : gvDefaultType; +@@ -107,7 +107,10 @@ + else if(test(opt, GET_BINARY)) + type = tmBinary; + +- getcwd(tmp, PATH_MAX); ++ tmp = getcwd(NULL, 0); ++ if (tmp == (char *)NULL) ++ return -1; ++ + fulldest = path_absolute(dest, tmp, 0); + + #if 0 && (defined(HAVE_SETPROCTITLE) || defined(linux)) +@@ -137,6 +140,9 @@ + if(gvUseEnvString && ftp_connected()) + setproctitle("%s", ftp->url->hostname); + #endif ++ ++ free(tmp); ++ + return r; + } + +diff -ur yafc-1.0_orig/src/lglob.c yafc-1.0_duck/src/lglob.c +--- yafc-1.0_orig/src/lglob.c 2003-12-10 11:04:33.000000000 +0100 ++++ yafc-1.0_duck/src/lglob.c 2003-12-10 12:50:53.000000000 +0100 +@@ -64,7 +64,7 @@ + struct dirent *de; + DIR *dp; + char *directory; +- char tmp[PATH_MAX]; ++ char *tmp; + bool added = false, found = false; + + directory = base_dir_xptr(mask); +@@ -74,12 +74,9 @@ + return -1; + } + +- if (!getcwd(tmp, PATH_MAX)) { +- if (ERANGE == errno) { +- ftp_err("cwd too long\n"); +- } else { +- ftp_err("getcwd(): %s\n", strerror(errno)); +- } ++ tmp = getcwd(NULL, 0); ++ if (tmp == (char *)NULL) { ++ ftp_err("getcwd(): %s\n", strerror(errno)); + return -1; + } + +diff -ur yafc-1.0_orig/src/libmhe/shortpath.c yafc-1.0_duck/src/libmhe/shortpath.c +--- yafc-1.0_orig/src/libmhe/shortpath.c 2003-12-10 11:03:39.000000000 +0100 ++++ yafc-1.0_duck/src/libmhe/shortpath.c 2003-12-10 12:34:05.000000000 +0100 +@@ -65,9 +65,10 @@ + + static char *_shortpath(char *path, unsigned maxlen) + { +- static char tmp[PATH_MAX]; ++ static char *tmp = NULL; + int len = strlen(path); + ++ tmp = realloc(tmp, len+1); + strcpy(tmp, path); + + if(len <= maxlen) +@@ -81,12 +82,14 @@ + char *shortpath(const char *path, unsigned maxlen, const char *home) + { + char *e; +- static char tmp[PATH_MAX]; ++ static char *tmp = NULL; ++ int len = strlen(path); + extern bool gvTilde; + + if(!path) + return 0; + ++ tmp = realloc(tmp, len+1); + strcpy(tmp, path); + + path_collapse(tmp); +diff -ur yafc-1.0_orig/src/local.c yafc-1.0_duck/src/local.c +--- yafc-1.0_orig/src/local.c 2003-12-10 11:03:38.000000000 +0100 ++++ yafc-1.0_duck/src/local.c 2003-12-10 12:50:23.000000000 +0100 +@@ -21,7 +21,7 @@ + /* print local working directory */ + void cmd_lpwd(int argc, char **argv) + { +- char tmp[PATH_MAX+1]; ++ char *tmp; + + if(argv) { + OPT_HELP("Print local working directory. Usage:\n" +@@ -32,7 +32,8 @@ + maxargs(optind - 1); + } + +- if(getcwd(tmp, PATH_MAX) == 0) { ++ tmp = getcwd(NULL, 0); ++ if (tmp == (char *)NULL) { + fprintf(stderr, _("Couldn't get local working directory...\n")); + return; + } +@@ -42,7 +43,7 @@ + /* local change directory */ + void cmd_lcd(int argc, char **argv) + { +- char *e = 0, tmp[PATH_MAX+1]; ++ char *e = 0, *tmp; + char *te; + + OPT_HELP("Change local working directory. Usage:\n" +@@ -63,7 +64,11 @@ + } + if(!e) + return; +- getcwd(tmp, PATH_MAX); ++ tmp = getcwd(NULL, 0); ++ if (tmp == (char *)NULL) { ++ fprintf(stderr, _("Couldn't change local working directory...\n")); ++ return; ++ } + te = tilde_expand_home(e, gvLocalHomeDir); + if(chdir(te) == -1) + perror(te); +diff -ur yafc-1.0_orig/src/prompt.c yafc-1.0_duck/src/prompt.c +--- yafc-1.0_orig/src/prompt.c 2003-12-10 11:03:38.000000000 +0100 ++++ yafc-1.0_duck/src/prompt.c 2003-12-10 12:54:40.000000000 +0100 +@@ -60,7 +60,7 @@ + unsigned maxlen; + char *ins, *e; + bool freeins; +- char tmp[PATH_MAX+1]; ++ char *tmp; + + + if(!fmt) +@@ -149,12 +149,14 @@ + ins = shortpath(ftp->curdir, maxlen, ftp->homedir); + break; + case 'l': /* current local directory */ +- getcwd(tmp, PATH_MAX); ++ tmp = getcwd(NULL, 0); + ins = shortpath(tmp, maxlen, 0); ++ free(tmp); + break; + case 'L': /* basename(%l) */ +- getcwd(tmp, PATH_MAX); ++ tmp = getcwd(NULL, 0); + ins = (char *)base_name_ptr(tmp); ++ free(tmp); + break; + case '%': /* percent sign */ + ins = "%"; +diff -ur yafc-1.0_orig/src/syshdr.h yafc-1.0_duck/src/syshdr.h +--- yafc-1.0_orig/src/syshdr.h 2003-12-10 11:03:34.000000000 +0100 ++++ yafc-1.0_duck/src/syshdr.h 2003-12-10 12:28:47.000000000 +0100 +@@ -238,8 +238,6 @@ + # endif + #endif + +-#include /* define PATH_MAX somehow, requires sys/types.h */ +- + typedef RETSIGTYPE (*sighandler_t)(int); + + #ifndef bool +diff -ur yafc-1.0_orig/src/utils.c yafc-1.0_duck/src/utils.c +--- yafc-1.0_orig/src/utils.c 2003-12-10 11:04:33.000000000 +0100 ++++ yafc-1.0_duck/src/utils.c 2003-12-10 12:58:15.000000000 +0100 +@@ -190,8 +190,12 @@ + + char *get_local_curdir(void) + { +- static char buf[PATH_MAX+1]; +- getcwd(buf, PATH_MAX); ++ static char *buf = NULL; ++ ++ if (buf != (char *)NULL) ++ free(buf); ++ buf = getcwd (NULL, 0); ++ + return buf; + } + --- yafc-1.1.1.dfsg.1.orig/debian/patches/use-termios.patch +++ yafc-1.1.1.dfsg.1/debian/patches/use-termios.patch @@ -0,0 +1,73 @@ +Description: Use termios for terminal settings. + A migration to will prepare adaptions + for GNU/kFreeBSD. The old is obsolete. + . + The ioctl-calls have different names in GNU/Linux + and GNU/kFreeBSD, so they must be redefined. + . + The implementation in FreeBSD and GNU/kFreeBSD lacks + IUCLC and OLCUC, as they are not POSIX specified. +Author: Mats Erik Andersson +Forwarded: no +Last-Update: 2011-08-04 +Bug-Debian: http://bugs.debian.org/601758 + +--- yafc-1.1.1.dfsg.1/src/input.c.orig ++++ yafc-1.1.1.dfsg.1/src/input.c +@@ -76,7 +76,20 @@ + + # include + # include +-# include ++# include ++ ++# if __FreeBSD_kernel__ ++# ifndef IUCLC ++ /* Not implemented in FreeBSD 8.0! */ ++# define IUCLC 0 ++# endif ++# ifndef TCGETS ++# define TCGETS TIOCGETA ++# endif ++# ifndef TCSETS ++# define TCSETS TIOCGETA ++# endif ++# endif /* __FreeBSD_kernel__ */ + + char *getpass_hook(const char *prompt) + { +@@ -89,14 +102,14 @@ + #else + int c, n = 0; + char tmp[1024]; +- struct termio tbuf, tbufsave; ++ struct termios tbuf, tbufsave; + FILE *fd; + + if((fd = fopen("/dev/tty", "rb")) == NULL) { + perror("fopen /dev/tty"); + return NULL; + } +- if (ioctl(fileno(fd), TCGETA, &tbuf) < 0) { ++ if (ioctl(fileno(fd), TCGETS, &tbuf) < 0) { + perror("ioctl get"); + fclose(fd); + return NULL; +@@ -105,7 +118,7 @@ + tbuf.c_iflag &= ~(IUCLC | ISTRIP | IXON | IXOFF); + tbuf.c_lflag &= ~(ICANON | ISIG | ECHO); + tbuf.c_cc[4] = 1; /* MIN */ +- if (ioctl(fileno(fd), TCSETA, &tbuf) < 0) { ++ if (ioctl(fileno(fd), TCSETS, &tbuf) < 0) { + perror("ioctl set"); + fclose(fd); + return NULL; +@@ -132,7 +145,7 @@ + fflush(stderr); + } + tmp[n] = '\0'; +- if (ioctl(fileno(fd), TCSETA, &tbufsave) < 0) { ++ if (ioctl(fileno(fd), TCSETS, &tbufsave) < 0) { + perror("ioctl restore"); + fclose(fd); + return NULL; --- yafc-1.1.1.dfsg.1.orig/doc/stamp-vti +++ yafc-1.1.1.dfsg.1/doc/stamp-vti @@ -0,0 +1,4 @@ +@set UPDATED 20 May 2004 +@set UPDATED-MONTH May 2004 +@set EDITION 1.1.1 +@set VERSION 1.1.1 --- yafc-1.1.1.dfsg.1.orig/doc/version.texi +++ yafc-1.1.1.dfsg.1/doc/version.texi @@ -1,4 +1,4 @@ @set UPDATED 20 May 2004 @set UPDATED-MONTH May 2004 -@set EDITION 1.1 -@set VERSION 1.1 +@set EDITION 1.1.1 +@set VERSION 1.1.1