Cleaned up 5.10.0 patches

This commit is contained in:
Tom Callaway 2007-12-21 22:38:28 +00:00
parent 244e713744
commit 5e1703ecf2
4 changed files with 492 additions and 0 deletions

View File

@ -0,0 +1,110 @@
diff -up perl-5.10.0/lib/ExtUtils/MM_Unix.pm.Fedora perl-5.10.0/lib/ExtUtils/MM_Unix.pm
--- perl-5.10.0/lib/ExtUtils/MM_Unix.pm.Fedora 2007-12-21 11:03:28.000000000 -0500
+++ perl-5.10.0/lib/ExtUtils/MM_Unix.pm 2007-12-21 11:04:27.000000000 -0500
@@ -945,7 +945,7 @@ $(INST_DYNAMIC): $(OBJECT) $(MYEXTLIB) $
}
my $ld_run_path_shell = "";
- if ($self->{LD_RUN_PATH} ne "") {
+ if (($self->{LD_RUN_PATH} ne "") && ($self->{USE_MM_LD_RUN_PATH})) {
$ld_run_path_shell = 'LD_RUN_PATH="$(LD_RUN_PATH)" ';
}
diff -up perl-5.10.0/lib/ExtUtils/Liblist.pm.Fedora perl-5.10.0/lib/ExtUtils/Liblist.pm
--- perl-5.10.0/lib/ExtUtils/Liblist.pm.Fedora 2007-12-21 11:04:36.000000000 -0500
+++ perl-5.10.0/lib/ExtUtils/Liblist.pm 2007-12-21 11:05:15.000000000 -0500
@@ -89,6 +89,11 @@ libraries. LD_RUN_PATH is a colon separ
in LDLOADLIBS. It is passed as an environment variable to the process
that links the shared library.
+Fedora extension: This generation of LD_RUN_PATH is disabled by default.
+To use the generated LD_RUN_PATH for all links, set the USE_MM_LD_RUN_PATH
+MakeMaker object attribute / argument, (or set the $USE_MM_LD_RUN_PATH
+environment variable).
+
=head2 BSLOADLIBS
List of those libraries that are needed but can be linked in
diff -up perl-5.10.0/lib/ExtUtils/MakeMaker.pm.Fedora perl-5.10.0/lib/ExtUtils/MakeMaker.pm
--- perl-5.10.0/lib/ExtUtils/MakeMaker.pm.Fedora 2007-12-21 10:59:52.000000000 -0500
+++ perl-5.10.0/lib/ExtUtils/MakeMaker.pm 2007-12-21 11:03:16.000000000 -0500
@@ -245,7 +245,7 @@ sub full_setup {
PERL_SRC PERM_RW PERM_RWX
PL_FILES PM PM_FILTER PMLIBDIRS PMLIBPARENTDIRS POLLUTE PPM_INSTALL_EXEC
PPM_INSTALL_SCRIPT PREREQ_FATAL PREREQ_PM PREREQ_PRINT PRINT_PREREQ
- SIGN SKIP TYPEMAPS VERSION VERSION_FROM XS XSOPT XSPROTOARG
+ SIGN SKIP TYPEMAPS USE_MM_LD_RUN_PATH VERSION VERSION_FROM XS XSOPT XSPROTOARG
XS_VERSION clean depend dist dynamic_lib linkext macro realclean
tool_autosplit
@@ -384,7 +384,28 @@ sub new {
print join(" ", map { "perl($_)>=$self->{PREREQ_PM}->{$_} " }
sort keys %{$self->{PREREQ_PM}}), "\n";
exit 0;
- }
+ }
+
+ # USE_MM_LD_RUN_PATH - another RedHatism to disable automatic RPATH generation
+ if ( ( ! $self->{USE_MM_LD_RUN_PATH} )
+ &&( ("@ARGV" =~ /\bUSE_MM_LD_RUN_PATH(=([01]))?\b/)
+ ||( exists( $ENV{USE_MM_LD_RUN_PATH} )
+ &&( $ENV{USE_MM_LD_RUN_PATH} =~ /([01])?$/ )
+ )
+ )
+ )
+ {
+ my $v = $1;
+ if( $v )
+ {
+ $v = ($v=~/=([01])$/)[0];
+ }else
+ {
+ $v = 1;
+ };
+ $self->{USE_MM_LD_RUN_PATH}=$v;
+ };
+
print STDOUT "MakeMaker (v$VERSION)\n" if $Verbose;
if (-f "MANIFEST" && ! -f "Makefile"){
@@ -2159,6 +2180,40 @@ precedence. A typemap in the current di
precedence, even if it isn't listed in TYPEMAPS. The default system
typemap has lowest precedence.
+=item USE_MM_LD_RUN_PATH
+
+boolean
+The Fedora perl MakeMaker distribution differs from the standard
+upstream release in that it disables use of the MakeMaker generated
+LD_RUN_PATH by default, UNLESS this attribute is specified , or the
+USE_MM_LD_RUN_PATH environment variable is set during the MakeMaker run.
+
+The upstream MakeMaker will set the ld(1) environment variable LD_RUN_PATH
+to the concatenation of every -L ld(1) option directory in which a -l ld(1)
+option library is found, which is used as the ld(1) -rpath option if none
+is specified. This means that, if your application builds shared libraries
+and your MakeMaker application links to them, that the absolute paths of the
+libraries in the build tree will be inserted into the RPATH header of all
+MakeMaker generated binaries, and that such binaries will be unable to link
+to these libraries if they do not still reside in the build tree directories
+(unlikely) or in the system library directories (/lib or /usr/lib), regardless
+of any LD_LIBRARY_PATH setting. So if you specified -L../mylib -lmylib , and
+ your 'libmylib.so' gets installed into /some_directory_other_than_usr_lib,
+ your MakeMaker application will be unable to link to it, even if LD_LIBRARY_PATH
+is set to include /some_directory_other_than_usr_lib, because RPATH overrides
+LD_LIBRARY_PATH.
+
+So for Fedora MakeMaker builds LD_RUN_PATH is NOT generated by default for
+every link. You can still use explicit -rpath ld options or the LD_RUN_PATH
+environment variable during the build to generate an RPATH for the binaries.
+
+You can set the USE_MM_LD_RUN_PATH attribute to 1 on the MakeMaker command
+line or in the WriteMakefile arguments to enable generation of LD_RUN_PATH
+for every link command.
+
+USE_MM_LD_RUN_PATH will default to 1 (LD_RUN_PATH will be used) IF the
+$USE_MM_LD_RUN_PATH environment variable is set during a MakeMaker run.
+
=item VENDORPREFIX
Like PERLPREFIX, but only for the vendor install locations.

View File

@ -0,0 +1,12 @@
diff -up perl-5.10.0/lib/Net/Config.pm.disable_test_hosts perl-5.10.0/lib/Net/Config.pm
--- perl-5.10.0/lib/Net/Config.pm.disable_test_hosts 2007-12-21 11:41:12.000000000 -0500
+++ perl-5.10.0/lib/Net/Config.pm 2007-12-21 11:41:20.000000000 -0500
@@ -29,7 +29,7 @@ eval { local $SIG{__DIE__}; require Net:
ftp_firewall => undef,
ftp_ext_passive => 1,
ftp_int_passive => 1,
- test_hosts => 1,
+ test_hosts => 0,
test_exist => 1,
);

318
perl-5.10.0-links.patch Normal file
View File

@ -0,0 +1,318 @@
diff -up perl-5.10.0/lib/File/Fetch.pm.BAD perl-5.10.0/lib/File/Fetch.pm
--- perl-5.10.0/lib/File/Fetch.pm.BAD 2007-12-21 10:41:39.000000000 -0500
+++ perl-5.10.0/lib/File/Fetch.pm 2007-12-21 10:43:00.000000000 -0500
@@ -37,7 +37,7 @@ $WARN = 1;
### methods available to fetch the file depending on the scheme
$METHODS = {
- http => [ qw|lwp wget curl lynx| ],
+ http => [ qw|lwp wget curl links| ],
ftp => [ qw|lwp netftp wget curl ncftp ftp| ],
file => [ qw|lwp file| ],
rsync => [ qw|rsync| ]
@@ -694,9 +694,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 = @_;
@@ -706,25 +706,25 @@ 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' ));
}
- ### 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",
];
@@ -750,7 +750,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 ;(
@@ -760,7 +760,7 @@ sub _lynx_fetch {
return $to;
} else {
- $METHOD_FAIL->{'lynx'} = 1;
+ $METHOD_FAIL->{'links'} = 1;
return;
}
}
@@ -1031,7 +1031,7 @@ Below is a mapping of what utilities wil
for what schemes, if available:
file => LWP, file
- http => LWP, wget, curl, lynx
+ http => LWP, wget, curl, links
ftp => LWP, Net::FTP, wget, curl, ncftp, ftp
rsync => rsync
@@ -1143,7 +1143,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
@@ -1161,17 +1161,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/lib/File/Fetch/t/01_File-Fetch.t.BAD 2007-12-21 10:43:38.000000000 -0500
+++ perl-5.10.0/lib/File/Fetch/t/01_File-Fetch.t 2007-12-21 10:43:45.000000000 -0500
@@ -169,7 +169,7 @@ for my $entry (@map) {
{ for my $uri ( 'http://www.cpan.org/index.html',
'http://www.cpan.org/index.html?q=1&y=2'
) {
- for (qw[lwp wget curl lynx]) {
+ for (qw[lwp wget curl 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/lib/CPAN.pm.BAD 2007-12-21 10:39:16.000000000 -0500
+++ perl-5.10.0/lib/CPAN.pm 2007-12-21 10:41:13.000000000 -0500
@@ -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/lib/CPAN/HandleConfig.pm.BAD 2007-12-21 10:43:14.000000000 -0500
+++ perl-5.10.0/lib/CPAN/HandleConfig.pm 2007-12-21 10:43:21.000000000 -0500
@@ -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/lib/CPAN/FirstTime.pm.BAD 2007-12-21 10:38:30.000000000 -0500
+++ perl-5.10.0/lib/CPAN/FirstTime.pm 2007-12-21 10:38:58.000000000 -0500
@@ -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/pod/perltoc.pod.BAD 2007-12-21 10:44:44.000000000 -0500
+++ perl-5.10.0/pod/perltoc.pod 2007-12-21 10:44:53.000000000 -0500
@@ -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/pod/perlfaq9.pod.BAD 2007-12-21 10:44:08.000000000 -0500
+++ perl-5.10.0/pod/perlfaq9.pod 2007-12-21 10:44:32.000000000 -0500
@@ -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

View File

@ -0,0 +1,52 @@
diff -up perl-5.10.0/utils/perlbug.PL.BAD perl-5.10.0/utils/perlbug.PL
--- perl-5.10.0/utils/perlbug.PL.BAD 2007-12-21 10:31:26.000000000 -0500
+++ perl-5.10.0/utils/perlbug.PL 2007-12-21 10:36:03.000000000 -0500
@@ -27,8 +27,6 @@ open OUT, ">$file" or die "Can't create
open PATCH_LEVEL, "<" . catfile(updir, "patchlevel.h")
or die "Can't open patchlevel.h: $!";
-my $patchlevel_date = (stat PATCH_LEVEL)[9];
-
while (<PATCH_LEVEL>) {
last if $_ =~ /^\s*static\s+(?:const\s+)?char.*?local_patches\[\]\s*=\s*{\s*$/;
}
@@ -68,9 +66,8 @@ $Config{startperl}
eval 'exec $Config{perlpath} -S \$0 \${1+"\$@"}'
if \$running_under_some_shell;
-my \$config_tag1 = '$extract_version - $Config{cf_time}';
+my \$config_tag1 = '$extract_version';
-my \$patchlevel_date = $patchlevel_date;
my \$patch_tags = '$patch_tags';
my \@patches = (
$patch_desc
@@ -288,17 +285,6 @@ sub Init {
$ok = 0;
if ($::opt_o) {
if ($::opt_o eq 'k' or $::opt_o eq 'kay') {
- my $age = time - $patchlevel_date;
- if ($::opt_o eq 'k' and $age > 60 * 24 * 60 * 60 ) {
- my $date = localtime $patchlevel_date;
- print <<"EOF";
-"perlbug -ok" and "perlbug -nok" do not report on Perl versions which
-are more than 60 days old. This Perl version was constructed on
-$date. If you really want to report this, use
-"perlbug -okay" or "perlbug -nokay".
-EOF
- exit();
- }
# force these options
unless ($::opt_n) {
$::opt_S = 1; # don't prompt for send
@@ -628,8 +614,8 @@ EFF
print OUT <<EFF;
---
EFF
- print OUT "This perlbug was built using Perl $config_tag1\n",
- "It is being executed now by Perl $config_tag2.\n\n"
+ print OUT "This perlbug was built using Perl $config_tag1 in the Fedora build system.\n",
+ "It is being executed now by Perl $config_tag2.\n\n"
if $config_tag2 ne $config_tag1;
print OUT <<EOF;