www-client/prozilla: add patches
git-svn-id: https://svn.disconnected-by-peer.at/svn/linamh/trunk/linamh@2353 6952d904-891a-0410-993b-d76249ca496b
This commit is contained in:
@@ -0,0 +1,44 @@
|
||||
Submitted By: Your Name (your at email dot address)
|
||||
Date: 2010-08-29
|
||||
Initial Package Version: 2.0.4
|
||||
Origin: me
|
||||
Upstream Status: dead
|
||||
Description: Add Proper documentation to prozilla:
|
||||
extend online help
|
||||
update man Page
|
||||
|
||||
diff -Naur prozilla-2.0.4.orig/man/proz.1 prozilla-2.0.4/man/proz.1
|
||||
--- prozilla-2.0.4.orig/man/proz.1 2010-08-29 11:26:11.000000000 +0000
|
||||
+++ prozilla-2.0.4/man/proz.1 2010-08-29 11:38:20.000000000 +0000
|
||||
@@ -31,6 +31,10 @@
|
||||
.TP
|
||||
\-\-no\-curses
|
||||
Don't use the Curses interface, but the traditional plain text interface
|
||||
+.SH "Filess:"
|
||||
+.TP
|
||||
+\-P, \-\-output\-document=FILE
|
||||
+write documents to FILE
|
||||
.SH "Directories:"
|
||||
.TP
|
||||
\-P, \-\-directory\-prefix=DIR
|
||||
diff -Naur prozilla-2.0.4.orig/src/main.cpp prozilla-2.0.4/src/main.cpp
|
||||
--- prozilla-2.0.4.orig/src/main.cpp 2010-08-29 11:26:11.000000000 +0000
|
||||
+++ prozilla-2.0.4/src/main.cpp 2010-08-29 11:34:33.000000000 +0000
|
||||
@@ -59,6 +59,7 @@
|
||||
{"tries", required_argument, NULL, 't'},
|
||||
{"force", no_argument, NULL, 'f'},
|
||||
{"version", no_argument, NULL, 'v'},
|
||||
+ {"output-document", required_argument, NULL, 'O'},
|
||||
{"directory-prefix", required_argument, NULL, 'P'},
|
||||
{"use-port", no_argument, NULL, 129},
|
||||
{"retry-delay", required_argument, NULL, 130},
|
||||
@@ -133,6 +134,9 @@
|
||||
" -v,--verbose Increase the amount of information sent to stdout\n"
|
||||
" --no-curses Don't use Curses, plain text to stdout\n"
|
||||
"\n"
|
||||
+ "Files:\n"
|
||||
+ " -O, --output-document=FILE write documents to FILE\n"
|
||||
+ "\n"
|
||||
"Directories:\n"
|
||||
" -P, --directory-prefix=DIR save the generated file to DIR/\n"
|
||||
"\n"
|
||||
@@ -1,11 +0,0 @@
|
||||
--- prozilla-2.0.4/src/download_win.h.orig 2006-02-08 18:18:59.000000000 +0100
|
||||
+++ prozilla-2.0.4/src/download_win.h 2006-06-22 21:05:59.000000000 +0200
|
||||
@@ -52,7 +52,7 @@
|
||||
void handle_joining_thread();
|
||||
void handle_dl_fatal_error();
|
||||
void cleanup(boolean erase_dlparts);
|
||||
- void DL_Window::print_status(download_t * download, int quiet_mode);
|
||||
+ void print_status(download_t * download, int quiet_mode);
|
||||
|
||||
connection_t *connection;
|
||||
download_t *download;
|
||||
21
www-client/prozilla/files/prozilla-2.0.4-home_dir-1.patch
Normal file
21
www-client/prozilla/files/prozilla-2.0.4-home_dir-1.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
Submitted By: Your Name (your at email dot address)
|
||||
Date: 2010-08-29
|
||||
Initial Package Version: 2.0.4
|
||||
Origin: http://github.com/screwgoth/prozilla-dev-2.5/commit/5c5600e816124f84ddedaa09306377362504642c
|
||||
Upstream Status: dead
|
||||
Description: Make sure that home_dir is never empty. If all else fails, pwd is
|
||||
home_dir.
|
||||
|
||||
diff -Naur prozilla-2.0.4.orig/libprozilla/src/main.c prozilla-2.0.4/libprozilla/src/main.c
|
||||
--- prozilla-2.0.4.orig/libprozilla/src/main.c 2010-08-29 12:49:09.000000000 +0000
|
||||
+++ prozilla-2.0.4/libprozilla/src/main.c 2010-08-29 15:46:41.000000000 +0000
|
||||
@@ -101,6 +101,9 @@
|
||||
sprintf(netrc_file, "%s/%s", libprozrtinfo.home_dir, ".netrc");
|
||||
|
||||
libprozrtinfo.netrc_list = parse_netrc(netrc_file);
|
||||
+ } else {
|
||||
+ /* Make sure home dir is never NULL */
|
||||
+ libprozrtinfo.home_dir = kstrdup(".");
|
||||
}
|
||||
|
||||
libprozrtinfo.dl_dir = kstrdup(".");
|
||||
41
www-client/prozilla/files/prozilla-Oopt.patch
Normal file
41
www-client/prozilla/files/prozilla-Oopt.patch
Normal file
@@ -0,0 +1,41 @@
|
||||
--- prozilla-2.0.3/src/main.cpp.orig 2006-01-22 23:40:16.000000000 +0100
|
||||
+++ prozilla-2.0.3/src/main.cpp 2006-01-22 23:48:40.000000000 +0100
|
||||
@@ -216,12 +216,13 @@
|
||||
{
|
||||
int c;
|
||||
int ret;
|
||||
+ char *opt_file = NULL;
|
||||
proz_init (argc, argv); //init libprozilla
|
||||
set_defaults (); //set some reasonable defaults
|
||||
load_prefs (); //load values from the config file
|
||||
|
||||
while ((c =
|
||||
- getopt_long (argc, argv, "?hvrfk:1Lt:VgsP:", long_opts,
|
||||
+ getopt_long (argc, argv, "?hvrfk:1Lt:VgsP:O:", long_opts,
|
||||
NULL)) != EOF)
|
||||
{
|
||||
switch (c)
|
||||
@@ -274,7 +275,12 @@
|
||||
*/
|
||||
rt.use_netrc = FALSE;
|
||||
break;
|
||||
-
|
||||
+ case 'O':
|
||||
+ /*
|
||||
+ * Output file name
|
||||
+ */
|
||||
+ opt_file = kstrdup(optarg);
|
||||
+ break;
|
||||
case 'P':
|
||||
/*
|
||||
* Save the downloaded file to DIR
|
||||
@@ -503,6 +509,9 @@
|
||||
exit (0);
|
||||
}
|
||||
|
||||
+ if (opt_file)
|
||||
+ url_data->file=opt_file;
|
||||
+
|
||||
PrintMessage("Starting.....");
|
||||
//In to %s\n",url_data->host);
|
||||
// start the download
|
||||
11
www-client/prozilla/files/prozilla-ac_fixes.patch
Normal file
11
www-client/prozilla/files/prozilla-ac_fixes.patch
Normal file
@@ -0,0 +1,11 @@
|
||||
--- prozilla-1.3.6/acinclude.m4~ Fri Aug 17 16:38:55 2001
|
||||
+++ prozilla-1.3.6/acinclude.m4 Sun Aug 19 17:19:39 2001
|
||||
@@ -376,7 +17,7 @@
|
||||
dnl @version $Id: acinclude.m4,v 1.3 2001/03/25 08:16:33 kalum Exp $
|
||||
dnl @author Caolan McNamara <caolan@skynet.ie>
|
||||
dnl
|
||||
-AC_DEFUN(AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R,
|
||||
+AC_DEFUN([AC_caolan_FUNC_WHICH_GETHOSTBYNAME_R],
|
||||
[AC_CACHE_CHECK(for which type of gethostbyname_r, ac_cv_func_which_gethostname_r, [
|
||||
AC_CHECK_FUNC(gethostbyname_r, [
|
||||
AC_TRY_COMPILE([
|
||||
60
www-client/prozilla/files/prozilla-gcc4.patch
Normal file
60
www-client/prozilla/files/prozilla-gcc4.patch
Normal file
@@ -0,0 +1,60 @@
|
||||
--- prozilla-2.0.3/src/download_win.h.orig 2006-01-24 16:10:01.000000000 +0000
|
||||
+++ prozilla-2.0.3/src/download_win.h 2006-01-24 16:10:06.000000000 +0000
|
||||
@@ -52,7 +52,7 @@
|
||||
void handle_joining_thread();
|
||||
void handle_dl_fatal_error();
|
||||
void cleanup(boolean erase_dlparts);
|
||||
- void DL_Window::print_status(download_t * download, int quiet_mode);
|
||||
+ void print_status(download_t * download, int quiet_mode);
|
||||
|
||||
connection_t *connection;
|
||||
download_t *download;
|
||||
--- prozilla-2.0.3/src/download_win.cpp.orig 2005-12-11 18:21:33.000000000 +0100
|
||||
+++ prozilla-2.0.3/src/download_win.cpp 2006-01-24 20:21:03.489470750 +0100
|
||||
@@ -599,7 +599,7 @@
|
||||
{
|
||||
|
||||
fprintf (stdout,
|
||||
- "%2.2d %-30.30s %15.15s %10Ld\n",
|
||||
+ "%2.2d %-30.30s %15.15s %10zd\n",
|
||||
i + 1, download->pconnections[i]->u.host,
|
||||
proz_connection_get_status_string (download->
|
||||
pconnections
|
||||
@@ -608,7 +608,7 @@
|
||||
(download->pconnections[i]));
|
||||
}
|
||||
|
||||
- fprintf (stdout, "Total Bytes received %Ld Kb\n",
|
||||
+ fprintf (stdout, "Total Bytes received %zd Kb\n",
|
||||
proz_download_get_total_bytes_got (download) / 1024);
|
||||
|
||||
|
||||
@@ -648,7 +648,7 @@
|
||||
//WGET looks like this:
|
||||
//xx% [=======> ] nnn,nnn,nnn XXXX.XXK/s ETA hh:mm:ss
|
||||
|
||||
- fprintf (stdout, " %.2lf%% %lldKb/%lldkb %0.3fKb/s ETA %s \r",
|
||||
+ fprintf (stdout, " %.2lf%% %zdKb/%zdkb %0.3fKb/s ETA %s \r",
|
||||
((float)totalDownloaded) / ((float)totalFile / 100),
|
||||
totalDownloaded, totalFile, (float)aveSpeed, timeLeft);
|
||||
fflush (stdout);
|
||||
--- prozilla-2.0.3/libprozilla/src/ftpsearch.c.orig 2005-12-12 01:05:49.000000000 +0100
|
||||
+++ prozilla-2.0.3/libprozilla/src/ftpsearch.c 2006-01-24 20:19:46.908684750 +0100
|
||||
@@ -119,7 +119,7 @@
|
||||
(char *) kmalloc(lycos_url_len + strlen(request->file_name) + 300);
|
||||
|
||||
sprintf(lycos_url_buf,
|
||||
- "%s?form=advanced&query=%s&doit=Search&type=Exact+search&hits=%d&matches=&hitsprmatch=&limdom=&limpath=&limsize1=%Ld&limsize2=%lld&f1=Host&f2=Path&f3=Size&f4=-&f5=-&f6=-&header=none&sort=none&trlen=20",
|
||||
+ "%s?form=advanced&query=%s&doit=Search&type=Exact+search&hits=%d&matches=&hitsprmatch=&limdom=&limpath=&limsize1=%zd&limsize2=%zd&f1=Host&f2=Path&f3=Size&f4=-&f5=-&f6=-&header=none&sort=none&trlen=20",
|
||||
ftps_loc, request->file_name, num_req_mirrors,
|
||||
request->file_size, request->file_size);
|
||||
|
||||
@@ -159,7 +159,7 @@
|
||||
(char *) kmalloc(filesearching_url_len + strlen(request->file_name) + 300);
|
||||
|
||||
sprintf(filesearching_url_buf,
|
||||
- "%s?q=%s&l=en&t=f&e=on&m=%d&o=n&s=on&s1=%Ld&s2=%Ld&d=&p=&p2=&x=10&y=14",
|
||||
+ "%s?q=%s&l=en&t=f&e=on&m=%d&o=n&s=on&s1=%zd&s2=%zd&d=&p=&p2=&x=10&y=14",
|
||||
ftps_loc, request->file_name, num_req_mirrors,
|
||||
request->file_size, request->file_size);
|
||||
|
||||
21
www-client/prozilla/files/prozilla-man.patch
Normal file
21
www-client/prozilla/files/prozilla-man.patch
Normal file
@@ -0,0 +1,21 @@
|
||||
--- prozilla-2.0.3/man/proz.1.orig 2006-01-22 23:26:51.000000000 +0100
|
||||
+++ prozilla-2.0.3/man/proz.1 2006-01-22 23:29:00.000000000 +0100
|
||||
@@ -103,12 +103,15 @@
|
||||
can be placed in /etc/make.conf to use ProZilla to download your system updates. This example will not do FTP searches for files < 500Kb, uses the text interface (handier with portage) and saves the files in your ${DISTDIR} (normally /usr/portage/distfiles)
|
||||
.SH "FILES"
|
||||
.TP
|
||||
-"/etc/prozilla.conf"
|
||||
-The global config file
|
||||
+"~/.prozilla"
|
||||
+The per\-user config directory
|
||||
.TP
|
||||
-"~/.prozrc"
|
||||
+"~/.prozilla/prozconfig"
|
||||
The per\-user config file
|
||||
.TP
|
||||
+"~/.prozilla/debug.log"
|
||||
+The per\-user debug log
|
||||
+.TP
|
||||
"~/.netrc"
|
||||
A file which can be used to provide ProZilla with hosts, accounts and passwords
|
||||
.SH "BUGS"
|
||||
45
www-client/prozilla/files/prozilla-no_memleak.patch
Normal file
45
www-client/prozilla/files/prozilla-no_memleak.patch
Normal file
@@ -0,0 +1,45 @@
|
||||
--- ./libprozilla/src/connect.c.orig Wed Feb 8 14:19:54 2006
|
||||
+++ ./libprozilla/src/connect.c Sun Sep 17 14:00:02 2006
|
||||
@@ -54,16 +54,14 @@
|
||||
hints.ai_socktype = SOCK_STREAM;
|
||||
|
||||
error = getaddrinfo(name, szPort, &hints, &res);
|
||||
- if (error) {
|
||||
- freeaddrinfo(res);
|
||||
- return HOSTERR;
|
||||
- }
|
||||
+ if (error)
|
||||
+ return HOSTERR;
|
||||
|
||||
|
||||
/* Create a socket. */
|
||||
if ((*sock = socket(res->ai_family, res->ai_socktype, IPPROTO_TCP)) < 1)
|
||||
{
|
||||
- free(res);
|
||||
+ freeaddrinfo(res);
|
||||
return CONSOCKERR;
|
||||
}
|
||||
|
||||
@@ -110,11 +108,11 @@
|
||||
|
||||
if (errno == ECONNREFUSED)
|
||||
{
|
||||
- free(res);
|
||||
+ freeaddrinfo(res);
|
||||
return CONREFUSED;
|
||||
} else
|
||||
{
|
||||
- free(res);
|
||||
+ freeaddrinfo(res);
|
||||
return CONERROR;
|
||||
}
|
||||
} else
|
||||
@@ -133,7 +131,7 @@
|
||||
setsockopt(*sock, SOL_SOCKET, SO_KEEPALIVE,
|
||||
(char *) &opt, (int) sizeof(opt));
|
||||
|
||||
- free(res);
|
||||
+ freeaddrinfo(res);
|
||||
|
||||
return NOCONERROR;
|
||||
}
|
||||
36
www-client/prozilla/files/prozilla-opt.patch
Normal file
36
www-client/prozilla/files/prozilla-opt.patch
Normal file
@@ -0,0 +1,36 @@
|
||||
--- prozilla-2.0.3/libprozilla/configure.in.orig 2005-12-12 01:06:00.000000000 +0100
|
||||
+++ prozilla-2.0.3/libprozilla/configure.in 2006-01-27 21:24:20.701344750 +0100
|
||||
@@ -168,7 +168,7 @@
|
||||
AC_SUBST(MSGFMT)
|
||||
|
||||
|
||||
-CFLAGS="-Wall -O0 -D_REENTRANT"
|
||||
+CFLAGS="$CFLAGS -Wall -D_REENTRANT"
|
||||
|
||||
if test "x$GCC" != "xyes"; then
|
||||
enable_compiler_warnings = "no";
|
||||
@@ -176,11 +176,11 @@
|
||||
|
||||
if test "x$enable_compiler_warnings" != "xno"; then
|
||||
if test "x$enable_compiler_warnings" = "xmin"; then
|
||||
- CFLAGS="$CFLAGS -g -ansi -pedantic"
|
||||
+ CFLAGS="$CFLAGS -ansi -pedantic"
|
||||
fi
|
||||
if test "x$enable_compiler_warnings" = "xyes"; then
|
||||
CFLAGS="$CFLAGS \
|
||||
--g -ansi -pedantic -W -Wtraditional -Wshadow -Wpointer-arith \
|
||||
+-ansi -pedantic -W -Wtraditional -Wshadow -Wpointer-arith \
|
||||
-Wcast-qual -Wcast-align -Wwrite-strings -Wconversion \
|
||||
-Waggregate-return -Wstrict-prototypes -Wmissing-prototypes \
|
||||
-Wmissing-declarations -Wnested-externs -Winline"
|
||||
--- prozilla-2.0.3/configure.in.orig 2005-12-12 01:07:52.000000000 +0100
|
||||
+++ prozilla-2.0.3/configure.in 2006-01-27 21:23:52.247566500 +0100
|
||||
@@ -82,7 +82,7 @@
|
||||
AC_TYPE_SIZE_T
|
||||
TYPE_SOCKLEN_T
|
||||
|
||||
-CFLAGS="-Wall -O2 -D_REENTRANT"
|
||||
+CFLAGS="$CFLAGS -Wall -D_REENTRANT"
|
||||
|
||||
|
||||
dnl ==============
|
||||
102
www-client/prozilla/files/prozrc.sample
Normal file
102
www-client/prozilla/files/prozrc.sample
Normal file
@@ -0,0 +1,102 @@
|
||||
# Prozilla rc file.
|
||||
# Any line beginning w/ a "#" is a comment
|
||||
# Empty lines are ignored
|
||||
|
||||
# This will generate a file named debug.log
|
||||
# If you want to report a bug please also send the file debug.log.
|
||||
#
|
||||
#debug=off
|
||||
|
||||
# How many connections prozilla will make.
|
||||
# This greatly depends on your bandwidth.
|
||||
# Recommended values:
|
||||
# 33k: dunno, tell us what you find to be the best
|
||||
# 56-64k: dunno, tell us what you find to be the best
|
||||
# Cable: dunno, tell us what you find to be the best
|
||||
# DSL: dunno, tell us what you find to be the best
|
||||
# Subspatial Transmissions: dunno, tell us if you have this ;)
|
||||
#
|
||||
#threads = 4
|
||||
|
||||
# How many servers will we ping at once
|
||||
# Recommended values...
|
||||
#
|
||||
pingatonce = 5
|
||||
|
||||
|
||||
# Wait 2*n seconds for a server response (default 2*4)
|
||||
pingtimeout = 4
|
||||
|
||||
# The next option is a very nice thing. Just set it on ;)
|
||||
# BTW, it's still under test. If you find bugs please report
|
||||
# them at <prozilla@genesys.ro>
|
||||
#
|
||||
# Patches are greatly appreciated.
|
||||
#ftpsearch = ON
|
||||
|
||||
#The next line spcifies the server to use for the ftpsearch
|
||||
# lycos changed it from ftpsearch.lycos com to the following
|
||||
#
|
||||
#ftpsearchurl = http://download.lycos.com/swadv/AdvResults.asp
|
||||
#ftpsearchurl = http://ftpsearch.uniovi.es:8000/ftpsearch
|
||||
|
||||
# How many mirrors we will request from ftpsearch.
|
||||
# This option only make sense w/ ftpsearch ON
|
||||
#
|
||||
#mirrors = 40
|
||||
|
||||
# The timeout period
|
||||
# How long do we wait when there is no response before starting again
|
||||
#
|
||||
#timeout = 180
|
||||
|
||||
# How many attempts do we make when we encounter a data transmission error
|
||||
# to get the file in (default is 200), specify 0 to try infinitely
|
||||
#
|
||||
#tries = 200
|
||||
|
||||
#The timedelay between retries. (default 15 seconds)
|
||||
#
|
||||
#retrydelay = 15
|
||||
|
||||
# The force option, off by default. When enabled cause Prozilla NOT
|
||||
# to prompt the user about overwriting existent files etc..
|
||||
#
|
||||
#forcemode = off
|
||||
|
||||
# Maximum redirections allowed
|
||||
#
|
||||
#maxredirs = 10
|
||||
|
||||
# Use ~/.netrc? On by default
|
||||
#
|
||||
#netrc = on
|
||||
|
||||
# Uses PASV by default. If you don't like it set it OFF and will use PORT instead.
|
||||
#
|
||||
#pasv = off
|
||||
|
||||
# If you turn this option ON, when an error occurs, ProZilla will print the
|
||||
# error to stdout and quit instead of waiting for the user to press a key to
|
||||
# exit
|
||||
#
|
||||
#nogetch = off
|
||||
|
||||
#The maxbps option can be used to limit the bandwith consumption of
|
||||
# prozilla for example maxbps = 40000 will limit it to consume a maximum of
|
||||
# 40k of bandwith, the default is 0 which means unlimited bandwith
|
||||
# consumption (ie no limitation just get as fast as possible)
|
||||
#
|
||||
#maxbps = 0
|
||||
|
||||
|
||||
#mainoutputdir
|
||||
#This specifies to which directory the output file will be built
|
||||
#mainoutputdir = /home/weasel/downloads
|
||||
#Now if you download a file called gcc-2.95.2.tar.bz2 it will be saved as
|
||||
#/home/weasel/downloads/gcc-2.95.2.tar.bz2
|
||||
#
|
||||
#mainoutputdir = .
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user