--- snarf-7.0.orig/debian/changelog +++ snarf-7.0/debian/changelog @@ -0,0 +1,110 @@ +snarf (7.0-6) unstable; urgency=medium + + * QA upload. + * Maintainer field set to QA Group. + * Bump Standards-Version to 3.9.6. + * Debhelper compatibility level set to 9. + * Use default Debian compiler flags. + * Do not start synopsis with an article. + * Depend on ${misc:Depends}. + * Point to GPLv2 in copyright file. + * Add recommended debian/rules targets: build-arch and build-indep. + + -- Emanuele Rocca Sat, 28 Nov 2015 17:59:25 +0100 + +snarf (7.0-5) unstable; urgency=low + + * Apply patch from Alan Curry to use a different + user agent when talking to Google, since they are denying access to + the standard snarf user agent. (Closes: Bug#369037) + * Apply patch from "Ulf Harnhammar" to avoid + crashing when we get an invalid response to the PASV command from an + FTP server. (Closes: Bug#352450) + * Update policy to version 3.7.2. + * Update DH_COMPAT to 5. + + -- Noah Meyerhans Tue, 6 Jun 2006 22:32:16 -0400 + +snarf (7.0-4) unstable; urgency=low + + * Fix typo in description (Closes: Bug#135508) + * Fix FSF info in copyright + * Fix some generally harmless compiler warnings for aesthetics. + + -- Noah Meyerhans Mon, 24 Oct 2005 23:45:46 -0400 + +snarf (7.0-3) unstable; urgency=low + + * Updated description (Closes: Bug#127858) + + -- Noah Meyerhans Fri, 11 Jan 2002 15:18:51 -0500 + +snarf (7.0-2) unstable; urgency=low + + * New maintainer (Closes: Bug#86871) + + -- Noah Meyerhans Mon, 7 May 2001 14:28:52 -0400 + +snarf (7.0-1) unstable; urgency=low + + * New upstream version. + * Conforms to Standards version 3.5.2: + * Added build dependancies. + * Added support for the `debug' build option. + + -- Matej Vela Sun, 25 Feb 2001 12:52:19 +0100 + +snarf (2.0.9-2) frozen unstable; urgency=low + + * Orphaning package + + -- Sean 'Shaleh' Perry Wed, 21 Feb 2001 07:56:29 -0800 + +snarf (2.0.9-1) frozen unstable; urgency=low + + * New upstream release + + -- Sean 'Shaleh' Perry Wed, 19 Jan 2000 15:00:29 -0800 + +snarf (2.0.8-1) unstable; urgency=low + + * New upstream release + * New maintainer + + -- Sean 'Shaleh' Perry Mon, 13 Dec 1999 16:00:10 -0800 + +snarf (2.0.5-2) unstable; urgency=low + + * Update for policy 3.0.0. + * debian/rules: Adopt dpkg-architecture variables. + + -- Joel Klecker Sat, 31 Jul 1999 20:47:26 -0700 + +snarf (2.0.5-1) unstable; urgency=low + + * New upstream release. + * Actually release the package. + + -- Joel Klecker Wed, 30 Dec 1998 08:33:06 -0800 + +snarf (2.0.4-1) unstable; urgency=low + + * Initial release of repackaging. + + -- Joel Klecker Wed, 18 Nov 1998 22:42:26 -0800 + +snarf (1.12-1) unstable; urgency=low + + * New maintainer: John Goerzen + * New upstream release + * Standards-version now 2.1.2.2 + + -- John Goerzen Thu, 16 Jan 1997 22:08:39 -0600 + +snarf (1.0-1) unstable; urgency=low + + * Initial Release. + + -- Christoph Lameter Fri, 11 Oct 1996 19:21:09 -0800 + + --- snarf-7.0.orig/debian/compat +++ snarf-7.0/debian/compat @@ -0,0 +1 @@ +9 --- snarf-7.0.orig/debian/control +++ snarf-7.0/debian/control @@ -0,0 +1,15 @@ +Source: snarf +Section: net +Priority: optional +Maintainer: Debian QA Group +Standards-Version: 3.9.6 +Build-Depends: debhelper (>= 9) + +Package: snarf +Architecture: any +Depends: ${shlibs:Depends}, ${misc:Depends} +Description: command-line URL grabber + Snarf is a utility to retrieve files via the http and ftp protocols. It + supports http redirect, http and ftp resume, http and ftp + authentication, and other neat things. Its functionality is similar to + that of wget, but with a much smaller binary. --- snarf-7.0.orig/debian/copyright +++ snarf-7.0/debian/copyright @@ -0,0 +1,24 @@ +This is the Debian GNU/Linux pre-packaged version of snarf. +It was packaged by Joel Klecker using sources +obtained from: http://www.xach.com/snarf/ + +Changes: + * Added Debian GNU/Linux packaging files. + +Copyright 1998 Zachary Beane . + + This program is free software; you can redistribute it and/or modify + it under the terms of the GNU General Public License as published by + the Free Software Foundation; version 2 dated June, 1991. + + This program is distributed in the hope that it will be useful, + but WITHOUT ANY WARRANTY; without even the implied warranty of + MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + GNU General Public License for more details. + + You should have received a copy of the GNU General Public License + along with this program; if not, write to the Free Software + Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA + +On Debian GNU/Linux systems, the complete text of the GNU General +Public License can be found in `/usr/share/common-licenses/GPL-2'. --- snarf-7.0.orig/debian/rules +++ snarf-7.0/debian/rules @@ -0,0 +1,42 @@ +#!/usr/bin/make -f + +export CFLAGS:=$(shell dpkg-buildflags --get CFLAGS) +export LDFLAGS:=$(shell dpkg-buildflags --get LDFLAGS) + +clean: + dh_testdir + dh_testroot + dh_clean build.stamp + [ ! -f Makefile ] || $(MAKE) distclean + +build: build-arch build-indep +build-arch: build.stamp +build-indep: build.stamp + +build.stamp: + dh_testdir + ./configure --prefix=/usr --mandir=/usr/share/man --with-guess-winsize + $(MAKE) + > $@ + +binary: binary-arch binary-indep + +binary-arch: build + dh_testdir + dh_testroot + dh_clean + $(MAKE) DESTDIR=`pwd`/debian/snarf install + dh_installdocs README TODO + dh_installchangelogs ChangeLog + dh_strip + dh_compress + dh_fixperms + dh_installdeb + dh_shlibdeps + dh_gencontrol + dh_md5sums + dh_builddeb + +binary-indep: + +.PHONY: clean build binary binary-arch binary-indep --- snarf-7.0.orig/ftp.c +++ snarf-7.0/ftp.c @@ -166,7 +166,7 @@ { unsigned char *addr; struct sockaddr_in sa; - int sock; + int sock, commas; int x; char *line, *orig_line; @@ -185,6 +185,18 @@ return 0; } + commas = 0; + while (*line) + if (*line++ == ',') + commas++; + line = orig_line; + + if (commas < 5) { + safe_free(orig_line); + puts("can't parse PASV response"); + return 0; + } + if( !(sock = sock_init(&sa, control)) ) return -1; --- snarf-7.0.orig/http.c +++ snarf-7.0/http.c @@ -8,6 +8,7 @@ #include #include #include +#include #include "url.h" #include "http.h" #include "options.h" @@ -127,8 +128,6 @@ static char * get_header_value(char *key, HttpHeader *header) { - char *value = NULL; - char *retval = NULL; List *l = NULL; HttpHeaderEntry *he = NULL; @@ -222,6 +221,17 @@ request = strconcat(request, "User-Agent: ", NULL); + /* How silly of google to blacklist snarf by User-Agent. + Well, we can be silly too. */ + if (!(rsrc->options & (OPT_BE_MOZILLA|OPT_BE_MSIE))) { + if (!strcmp(u->host, "google.com") || + (strlen(u->host) > strlen("google.com") && + !strcmp(u->host+(strlen(u->host)-strlen("google.com"))-1, + ".google.com"))) { + rsrc -> options |= OPT_BE_MOZILLA; + } + } + if (getenv("SNARF_HTTP_USER_AGENT")) { request = strconcat(request, getenv("SNARF_HTTP_USER_AGENT"), NULL); --- snarf-7.0.orig/llist.c +++ snarf-7.0/llist.c @@ -35,5 +35,7 @@ l->next = list_new(); l->next->data = data; l->next->next = NULL; + + return l; } --- snarf-7.0.orig/util.c +++ snarf-7.0/util.c @@ -4,6 +4,10 @@ #include "config.h" +#include "http.h" +#include "ftp.h" +#include "gopher.h" + #include #include #include @@ -552,7 +556,7 @@ int transfer(UrlResource *rsrc) { - int i; + int i = 0; switch (rsrc->url->service_type) { case SERVICE_HTTP: