Sisyphus repository
Last update: 1 october 2023 | SRPMs: 18631 | Visits: 37379832
en ru br
ALT Linux repos
S:3.15-alt1
5.0: 1.22-alt1
4.1: 1.22-alt1
4.0: 1.20-alt2
3.0: 1.19-alt3

Group :: Development/Perl
RPM: perl-libnet

 Main   Changelog   Spec   Patches   Sources   Download   Gear   Bugs and FR  Repocop 

Patch: perl-libnet-3.13-alt.patch
Download


diff -ru libnet-3.13-orig/Configure libnet-3.13/Configure
--- libnet-3.13-orig/Configure	2020-12-23 13:21:46.000000000 +0200
+++ libnet-3.13/Configure	2021-02-10 14:08:20.433444602 +0200
@@ -248,6 +248,7 @@
 no warnings 'once';
 $Net::Config::CONFIGURE = 1; # Suppress load of user overrides
 }
+if (0) {
 if( -f $libnet_cfg )
  {
   %oldcfg = ( %{ do $libnet_cfg } );
@@ -258,6 +259,7 @@
   no warnings 'once';
   %oldcfg = %Net::Config::NetConfig;
  }
+}
 
 map { $cfg{lc $_} = $cfg{$_}; delete $cfg{$_} if /[A-Z]/ } keys %cfg;
 
@@ -497,6 +499,7 @@
 
 #---------------------------------------------------------------------------
 
+if (0) {
 print <<EDQ;
 
 Normally when FTP needs a data connection the client tells the server
@@ -524,6 +527,7 @@
 $def = $oldcfg{'ftp_int_passive'} || 0;
 
 $cfg{'ftp_int_passive'} = get_bool($msg,$def);
+}
 
 
 #---------------------------------------------------------------------------
diff -ru libnet-3.13-orig/lib/Net/Config.pm libnet-3.13/lib/Net/Config.pm
--- libnet-3.13-orig/lib/Net/Config.pm	2020-12-23 13:21:46.000000000 +0200
+++ libnet-3.13/lib/Net/Config.pm	2021-02-10 14:08:20.434444565 +0200
@@ -72,22 +72,18 @@
 TRY_INTERNET_CONFIG
 }
 
-my $file = __FILE__;
-my $ref;
-$file =~ s/Config.pm/libnet.cfg/;
-if (-f $file) {
-  $ref = eval { local $SIG{__DIE__}; do $file };
+if (my $ref = do "Net/libnet.cfg") {
   if (ref($ref) eq 'HASH') {
     %NetConfig = (%NetConfig, %{$ref});
-    $LIBNET_CFG = $file;
+    $LIBNET_CFG = $INC{"Net/libnet.cfg"};
   }
 }
 if ($< == $> and !$CONFIGURE) {
   my $home = eval { local $SIG{__DIE__}; (getpwuid($>))[7] } || $ENV{HOME};
   $home ||= $ENV{HOMEDRIVE} . ($ENV{HOMEPATH} || '') if defined $ENV{HOMEDRIVE};
   if (defined $home) {
-    $file      = $home . "/.libnetrc";
-    $ref       = eval { local $SIG{__DIE__}; do $file } if -f $file;
+    my $file   = $home . "/.libnetrc";
+    my $ref    = do $file;
     %NetConfig = (%NetConfig, %{$ref})
       if ref($ref) eq 'HASH';
   }
Только в libnet-3.13/lib/Net: Config.pm.orig
diff -ru libnet-3.13-orig/lib/Net/Domain.pm libnet-3.13/lib/Net/Domain.pm
--- libnet-3.13-orig/lib/Net/Domain.pm	2020-12-23 13:21:46.000000000 +0200
+++ libnet-3.13/lib/Net/Domain.pm	2021-02-10 14:08:20.434444565 +0200
@@ -23,91 +23,9 @@
 
 my ($host, $domain, $fqdn) = (undef, undef, undef);
 
-# Try every conceivable way to get hostname.
-
-
 sub _hostname {
-
-  # we already know it
-  return $host
-    if (defined $host);
-
-  if ($^O eq 'MSWin32') {
-    require Socket;
-    my ($name, $alias, $type, $len, @addr) = gethostbyname($ENV{'COMPUTERNAME'} || 'localhost');
-    while (@addr) {
-      my $a = shift(@addr);
-      $host = gethostbyaddr($a, Socket::AF_INET());
-      last if defined $host;
-    }
-    if (defined($host) && index($host, '.') > 0) {
-      $fqdn = $host;
-      ($host, $domain) = $fqdn =~ /^([^.]+)\.(.*)$/;
-    }
-    return $host;
-  }
-  elsif ($^O eq 'MacOS') {
-    chomp($host = `hostname`);
-  }
-  elsif ($^O eq 'VMS') {    ## multiple varieties of net s/w makes this hard
-    $host = $ENV{'UCX$INET_HOST'}      if defined($ENV{'UCX$INET_HOST'});
-    $host = $ENV{'MULTINET_HOST_NAME'} if defined($ENV{'MULTINET_HOST_NAME'});
-    if (index($host, '.') > 0) {
-      $fqdn = $host;
-      ($host, $domain) = $fqdn =~ /^([^.]+)\.(.*)$/;
-    }
-    return $host;
-  }
-  else {
-    local $SIG{'__DIE__'};
-
-    # syscall is preferred since it avoids tainting problems
-    eval {
-      my $tmp = "\0" x 256;    ## preload scalar
-      eval {
-        package main;
-        require "syscall.ph"; ## no critic (Modules::RequireBarewordIncludes)
-        defined(&main::SYS_gethostname);
-        }
-        || eval {
-        package main;
-        require "sys/syscall.ph"; ## no critic (Modules::RequireBarewordIncludes)
-        defined(&main::SYS_gethostname);
-        }
-        and $host =
-        (syscall(&main::SYS_gethostname, $tmp, 256) == 0)
-        ? $tmp
-        : undef;
-      }
-
-      # POSIX
-      || eval {
-      require POSIX;
-      $host = (POSIX::uname())[1];
-      }
-
-      # trusty old hostname command
-      || eval {
-      chop($host = `(hostname) 2>/dev/null`);    # BSD'ish
-      }
-
-      # sysV/POSIX uname command (may truncate)
-      || eval {
-      chop($host = `uname -n 2>/dev/null`);      ## SYSV'ish && POSIX'ish
-      }
-
-      # Apollo pre-SR10
-      || eval { $host = (split(/[:. ]/, `/com/host`, 6))[0]; }
-
-      || eval { $host = ""; };
-  }
-
-  # remove garbage
-  $host =~ s/[\0\r\n]+//go;
-  $host =~ s/(\A\.+|\.+\Z)//go;
-  $host =~ s/\.\.+/\./go;
-
-  $host;
+  require Sys::Hostname;
+  return $host = Sys::Hostname::hostname();
 }
 
 
Только в libnet-3.13/lib/Net: Domain.pm.orig
diff -ru libnet-3.13-orig/lib/Net/SMTP.pm libnet-3.13/lib/Net/SMTP.pm
--- libnet-3.13-orig/lib/Net/SMTP.pm	2020-12-23 13:21:46.000000000 +0200
+++ libnet-3.13/lib/Net/SMTP.pm	2021-02-10 14:09:20.927219174 +0200
@@ -633,8 +633,6 @@
   }
 }
 
-
-
 1;
 
 __END__
diff -ru libnet-3.13-orig/Makefile.PL libnet-3.13/Makefile.PL
--- libnet-3.13-orig/Makefile.PL	2020-12-23 13:21:46.000000000 +0200
+++ libnet-3.13/Makefile.PL	2021-02-10 14:08:20.434444565 +0200
@@ -237,7 +237,7 @@
 
     return '' if $self->{PERL_CORE};
 
-    if (not -f $CfgFile) {
+    if (1) {
         my @args = qw(Configure);
         push @args, '-d' if $ENV{PERL5_CPAN_IS_RUNNING}     ||
                             $ENV{PERL5_CPANPLUS_IS_RUNNING} ||
Только в libnet-3.13: Makefile.PL.orig
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin