- use a better BuildRoot - drop a redundant mkdir in %%install - call patchlevel.h only once; rm patchlevel.bak - update modules Sys::Syslog, Module::Load::Conditional, Module::CoreList, Test::Harness, Test::Simple, CGI.pm (dropping the upstreamed patch), File::Path (that includes our perl-5.10.0-CVE-2008-2827.patch), constant, Pod::Simple, Archive::Tar, Archive::Extract, File::Fetch, File::Temp, IPC::Cmd, Time::HiRes, Module::Build, ExtUtils::CBuilder - standardize the patches for updating embedded modules - work around a bug in Module::Build tests bu setting TMPDIR to a directory inside the source tree
331 lines
13 KiB
Diff
331 lines
13 KiB
Diff
diff -up perl-5.10.0/lib/File/Fetch.pm.BAD perl-5.10.0/lib/File/Fetch.pm
|
|
--- perl-5.10.0.orig/lib/File/Fetch.pm 2009-03-11 14:21:00.000000000 +0100
|
|
+++ perl-5.10.0/lib/File/Fetch.pm 2009-03-11 14:23:26.000000000 +0100
|
|
@@ -35,7 +35,7 @@ $WARN = 1;
|
|
|
|
### methods available to fetch the file depending on the scheme
|
|
$METHODS = {
|
|
- http => [ qw|lwp wget curl lftp lynx| ],
|
|
+ http => [ qw|lwp wget curl lftp links| ],
|
|
ftp => [ qw|lwp netftp wget curl lftp ncftp ftp| ],
|
|
file => [ qw|lwp lftp file| ],
|
|
rsync => [ qw|rsync| ]
|
|
@@ -772,9 +772,9 @@ sub _ftp_fetch {
|
|
}
|
|
}
|
|
|
|
-### lynx is stupid - it decompresses any .gz file it finds to be text
|
|
-### use /bin/lynx to fetch files
|
|
-sub _lynx_fetch {
|
|
+### links is stupid - it decompresses any .gz file it finds to be text
|
|
+### use /bin/links to fetch files
|
|
+sub _links_fetch {
|
|
my $self = shift;
|
|
my %hash = @_;
|
|
|
|
@@ -784,21 +784,21 @@ sub _lynx_fetch {
|
|
};
|
|
check( $tmpl, \%hash ) or return;
|
|
|
|
- ### see if we have a lynx binary ###
|
|
- if( my $lynx = can_run('lynx') ) {
|
|
+ ### see if we have a links binary ###
|
|
+ if( my $links = can_run('links') ) {
|
|
|
|
unless( IPC::Cmd->can_capture_buffer ) {
|
|
- $METHOD_FAIL->{'lynx'} = 1;
|
|
+ $METHOD_FAIL->{'links'} = 1;
|
|
|
|
return $self->_error(loc(
|
|
"Can not capture buffers. Can not use '%1' to fetch files",
|
|
- 'lynx' ));
|
|
+ 'links' ));
|
|
}
|
|
|
|
### check if the HTTP resource exists ###
|
|
if ($self->uri =~ /^https?:\/\//i) {
|
|
my $cmd = [
|
|
- $lynx,
|
|
+ $links,
|
|
'-head',
|
|
'-source',
|
|
"-auth=anonymous:$FROM_EMAIL",
|
|
@@ -822,14 +822,14 @@ sub _lynx_fetch {
|
|
}
|
|
}
|
|
|
|
- ### write to the output file ourselves, since lynx ass_u_mes to much
|
|
+ ### write to the output file ourselves, since links ass_u_mes to much
|
|
my $local = FileHandle->new(">$to")
|
|
or return $self->_error(loc(
|
|
"Could not open '%1' for writing: %2",$to,$!));
|
|
|
|
### dump to stdout ###
|
|
my $cmd = [
|
|
- $lynx,
|
|
+ $links,
|
|
'-source',
|
|
"-auth=anonymous:$FROM_EMAIL",
|
|
];
|
|
@@ -860,7 +860,7 @@ sub _lynx_fetch {
|
|
### XXX on a 404 with a special error page, $captured will actually
|
|
### hold the contents of that page, and make it *appear* like the
|
|
### request was a success, when really it wasn't :(
|
|
- ### there doesn't seem to be an option for lynx to change the exit
|
|
+ ### there doesn't seem to be an option for links to change the exit
|
|
### code based on a 4XX status or so.
|
|
### the closest we can come is using --error_file and parsing that,
|
|
### which is very unreliable ;(
|
|
@@ -870,7 +870,7 @@ sub _lynx_fetch {
|
|
return $to;
|
|
|
|
} else {
|
|
- $METHOD_FAIL->{'lynx'} = 1;
|
|
+ $METHOD_FAIL->{'links'} = 1;
|
|
return;
|
|
}
|
|
}
|
|
@@ -1150,7 +1150,7 @@ Below is a mapping of what utilities wil
|
|
for what schemes, if available:
|
|
|
|
file => LWP, lftp, file
|
|
- http => LWP, wget, curl, lftp, lynx
|
|
+ http => LWP, wget, curl, lftp, links
|
|
ftp => LWP, Net::FTP, wget, curl, lftp, ncftp, ftp
|
|
rsync => rsync
|
|
|
|
@@ -1262,7 +1262,7 @@ the $BLACKLIST, $METHOD_FAIL and other i
|
|
LWP => lwp
|
|
Net::FTP => netftp
|
|
wget => wget
|
|
- lynx => lynx
|
|
+ links => links
|
|
ncftp => ncftp
|
|
ftp => ftp
|
|
curl => curl
|
|
@@ -1281,17 +1281,17 @@ example, to use an ftp proxy:
|
|
|
|
Refer to the LWP::UserAgent manpage for more details.
|
|
|
|
-=head2 I used 'lynx' to fetch a file, but its contents is all wrong!
|
|
+=head2 I used 'links' to fetch a file, but its contents is all wrong!
|
|
|
|
-C<lynx> can only fetch remote files by dumping its contents to C<STDOUT>,
|
|
+C<links> can only fetch remote files by dumping its contents to C<STDOUT>,
|
|
which we in turn capture. If that content is a 'custom' error file
|
|
(like, say, a C<404 handler>), you will get that contents instead.
|
|
|
|
-Sadly, C<lynx> doesn't support any options to return a different exit
|
|
+Sadly, C<links> doesn't support any options to return a different exit
|
|
code on non-C<200 OK> status, giving us no way to tell the difference
|
|
between a 'successfull' fetch and a custom error page.
|
|
|
|
-Therefor, we recommend to only use C<lynx> as a last resort. This is
|
|
+Therefor, we recommend to only use C<links> as a last resort. This is
|
|
why it is at the back of our list of methods to try as well.
|
|
|
|
=head2 Files I'm trying to fetch have reserved characters or non-ASCII characters in them. What do I do?
|
|
diff -up perl-5.10.0/lib/File/Fetch/t/01_File-Fetch.t.BAD perl-5.10.0/lib/File/Fetch/t/01_File-Fetch.t
|
|
--- perl-5.10.0.orig/lib/File/Fetch/t/01_File-Fetch.t 2009-03-11 14:21:00.000000000 +0100
|
|
+++ perl-5.10.0/lib/File/Fetch/t/01_File-Fetch.t 2009-03-11 14:22:10.000000000 +0100
|
|
@@ -177,7 +177,7 @@ for my $entry (@map) {
|
|
'http://www.cpan.org/index.html?q=1',
|
|
'http://www.cpan.org/index.html?q=1&y=2',
|
|
) {
|
|
- for (qw[lwp wget curl lftp lynx]) {
|
|
+ for (qw[lwp wget curl lftp links]) {
|
|
_fetch_uri( http => $uri, $_ );
|
|
}
|
|
}
|
|
diff -up perl-5.10.0/lib/CPAN.pm.BAD perl-5.10.0/lib/CPAN.pm
|
|
--- perl-5.10.0.orig/lib/CPAN.pm 2007-12-18 11:47:07.000000000 +0100
|
|
+++ perl-5.10.0/lib/CPAN.pm 2009-03-11 14:21:21.000000000 +0100
|
|
@@ -4318,7 +4318,7 @@ sub hostdlhard {
|
|
|
|
# Try the most capable first and leave ncftp* for last as it only
|
|
# does FTP.
|
|
- DLPRG: for my $f (qw(curl wget lynx ncftpget ncftp)) {
|
|
+ DLPRG: for my $f (qw(curl wget links ncftpget ncftp)) {
|
|
my $funkyftp = CPAN::HandleConfig->safe_quote($CPAN::Config->{$f});
|
|
next unless defined $funkyftp;
|
|
next if $funkyftp =~ /^\s*$/;
|
|
@@ -4330,7 +4330,7 @@ sub hostdlhard {
|
|
my($src_switch) = "";
|
|
my($chdir) = "";
|
|
my($stdout_redir) = " > $asl_ungz";
|
|
- if ($f eq "lynx") {
|
|
+ if ($f eq "links") {
|
|
$src_switch = " -source";
|
|
} elsif ($f eq "ncftp") {
|
|
$src_switch = " -c";
|
|
@@ -4354,8 +4354,8 @@ Trying with "$funkyftp$src_switch" to ge
|
|
"$chdir$funkyftp$src_switch \"$url\" $devnull$stdout_redir";
|
|
$self->debug("system[$system]") if $CPAN::DEBUG;
|
|
my($wstatus) = system($system);
|
|
- if ($f eq "lynx") {
|
|
- # lynx returns 0 when it fails somewhere
|
|
+ if ($f eq "links") {
|
|
+ # links returns 0 when it fails somewhere
|
|
if (-s $asl_ungz) {
|
|
my $content = do { local *FH;
|
|
open FH, $asl_ungz or die;
|
|
@@ -4363,7 +4363,7 @@ Trying with "$funkyftp$src_switch" to ge
|
|
<FH> };
|
|
if ($content =~ /^<.*(<title>[45]|Error [45])/si) {
|
|
$CPAN::Frontend->mywarn(qq{
|
|
-No success, the file that lynx has downloaded looks like an error message:
|
|
+No success, the file that links has downloaded looks like an error message:
|
|
$content
|
|
});
|
|
$CPAN::Frontend->mysleep(1);
|
|
@@ -4371,7 +4371,7 @@ $content
|
|
}
|
|
} else {
|
|
$CPAN::Frontend->myprint(qq{
|
|
-No success, the file that lynx has downloaded is an empty file.
|
|
+No success, the file that links has downloaded is an empty file.
|
|
});
|
|
next DLPRG;
|
|
}
|
|
@@ -9081,14 +9081,14 @@ sub _display_url {
|
|
# should we define it in the config instead?
|
|
my $html_converter = "html2text.pl";
|
|
|
|
- my $web_browser = $CPAN::Config->{'lynx'} || undef;
|
|
+ my $web_browser = $CPAN::Config->{'links'} || undef;
|
|
my $web_browser_out = $web_browser
|
|
? CPAN::Distribution->_check_binary($self,$web_browser)
|
|
: undef;
|
|
|
|
if ($web_browser_out) {
|
|
# web browser found, run the action
|
|
- my $browser = CPAN::HandleConfig->safe_quote($CPAN::Config->{'lynx'});
|
|
+ my $browser = CPAN::HandleConfig->safe_quote($CPAN::Config->{'links'});
|
|
$CPAN::Frontend->myprint(qq{system[$browser $url]})
|
|
if $CPAN::DEBUG;
|
|
$CPAN::Frontend->myprint(qq{
|
|
@@ -9163,7 +9163,7 @@ with pager "$pager"
|
|
} else {
|
|
# coldn't find the web browser or html converter
|
|
$CPAN::Frontend->myprint(qq{
|
|
-You need to install lynx or $html_converter to use this feature.});
|
|
+You need to install links or $html_converter to use this feature.});
|
|
}
|
|
}
|
|
}
|
|
@@ -10837,7 +10837,7 @@ defined:
|
|
keep_source_where directory in which to keep the source (if we do)
|
|
load_module_verbosity
|
|
report loading of optional modules used by CPAN.pm
|
|
- lynx path to external prg
|
|
+ links path to external prg
|
|
make location of external make program
|
|
make_arg arguments that should always be passed to 'make'
|
|
make_install_make_command
|
|
@@ -11666,7 +11666,7 @@ Makefile.PL> or C<perl Build.PL> and C<m
|
|
|
|
Downloads the pod documentation of the file associated with a
|
|
distribution (in html format) and runs it through the external
|
|
-command lynx specified in C<$CPAN::Config->{lynx}>. If lynx
|
|
+command links specified in C<$CPAN::Config->{links}>. If links
|
|
isn't available, it converts it to plain text with external
|
|
command html2text and runs it through the pager specified
|
|
in C<$CPAN::Config->{pager}>
|
|
@@ -11975,7 +11975,7 @@ required for non-UNIX systems or if your
|
|
associated with a URL that is not C<ftp:>.
|
|
|
|
If you have neither Net::FTP nor LWP, there is a fallback mechanism
|
|
-implemented for an external ftp command or for an external lynx
|
|
+implemented for an external ftp command or for an external links
|
|
command.
|
|
|
|
=head1 UTILITIES
|
|
@@ -12247,16 +12247,16 @@ ftp_passive to a true value.
|
|
|
|
=back
|
|
|
|
-=head2 Configuring lynx or ncftp for going through a firewall
|
|
+=head2 Configuring links or ncftp for going through a firewall
|
|
|
|
-If you can go through your firewall with e.g. lynx, presumably with a
|
|
+If you can go through your firewall with e.g. links, presumably with a
|
|
command such as
|
|
|
|
- /usr/local/bin/lynx -pscott:tiger
|
|
+ /usr/local/bin/links -pscott:tiger
|
|
|
|
then you would configure CPAN.pm with the command
|
|
|
|
- o conf lynx "/usr/local/bin/lynx -pscott:tiger"
|
|
+ o conf links "/usr/local/bin/links -pscott:tiger"
|
|
|
|
That's all. Similarly for ncftp or ftp, you would configure something
|
|
like
|
|
diff -up perl-5.10.0/lib/CPAN/HandleConfig.pm.BAD perl-5.10.0/lib/CPAN/HandleConfig.pm
|
|
--- perl-5.10.0.orig/lib/CPAN/HandleConfig.pm 2007-12-18 11:47:07.000000000 +0100
|
|
+++ perl-5.10.0/lib/CPAN/HandleConfig.pm 2009-03-11 14:21:21.000000000 +0100
|
|
@@ -49,7 +49,7 @@ $VERSION = sprintf "%.6f", substr(q$Rev:
|
|
"inhibit_startup_message",
|
|
"keep_source_where",
|
|
"load_module_verbosity",
|
|
- "lynx",
|
|
+ "links",
|
|
"make",
|
|
"make_arg",
|
|
"make_install_arg",
|
|
diff -up perl-5.10.0/lib/CPAN/FirstTime.pm.BAD perl-5.10.0/lib/CPAN/FirstTime.pm
|
|
--- perl-5.10.0.orig/lib/CPAN/FirstTime.pm 2007-12-18 11:47:07.000000000 +0100
|
|
+++ perl-5.10.0/lib/CPAN/FirstTime.pm 2009-03-11 14:21:21.000000000 +0100
|
|
@@ -813,7 +813,7 @@ Shall we use it as the general CPAN buil
|
|
|
|
make
|
|
|
|
- curl lynx wget ncftpget ncftp ftp
|
|
+ curl links wget ncftpget ncftp ftp
|
|
|
|
gpg
|
|
|
|
diff -up perl-5.10.0/pod/perltoc.pod.BAD perl-5.10.0/pod/perltoc.pod
|
|
--- perl-5.10.0.orig/pod/perltoc.pod 2007-12-18 11:47:08.000000000 +0100
|
|
+++ perl-5.10.0/pod/perltoc.pod 2009-03-11 14:21:21.000000000 +0100
|
|
@@ -14682,7 +14682,7 @@ has_inst($module), has_usable($module),
|
|
|
|
http firewall, ftp firewall, One way visibility, SOCKS, IP Masquerade
|
|
|
|
-=item Configuring lynx or ncftp for going through a firewall
|
|
+=item Configuring links or ncftp for going through a firewall
|
|
|
|
=back
|
|
|
|
@@ -20857,7 +20857,7 @@ $ff->output_file
|
|
|
|
=item So how do I use a proxy with File::Fetch?
|
|
|
|
-=item I used 'lynx' to fetch a file, but its contents is all wrong!
|
|
+=item I used 'links' to fetch a file, but its contents is all wrong!
|
|
|
|
=item Files I'm trying to fetch have reserved characters or non-ASCII
|
|
characters in them. What do I do?
|
|
diff -up perl-5.10.0/pod/perlfaq9.pod.BAD perl-5.10.0/pod/perlfaq9.pod
|
|
--- perl-5.10.0.orig/pod/perlfaq9.pod 2007-12-18 11:47:08.000000000 +0100
|
|
+++ perl-5.10.0/pod/perlfaq9.pod 2009-03-11 14:21:21.000000000 +0100
|
|
@@ -212,14 +212,14 @@ examples.
|
|
|
|
=head2 How do I fetch an HTML file?
|
|
|
|
-One approach, if you have the lynx text-based HTML browser installed
|
|
+One approach, if you have the links text-based HTML browser installed
|
|
on your system, is this:
|
|
|
|
- $html_code = `lynx -source $url`;
|
|
- $text_data = `lynx -dump $url`;
|
|
+ $html_code = `links -source $url`;
|
|
+ $text_data = `links -dump $url`;
|
|
|
|
The libwww-perl (LWP) modules from CPAN provide a more powerful way
|
|
-to do this. They don't require lynx, but like lynx, can still work
|
|
+to do this. They don't require links, but like links, can still work
|
|
through proxies:
|
|
|
|
# simplest version
|