Sisyphus repository
Last update: 4 december 2020 | SRPMs: 17764 | Visits: 19753302
en ru br
ALT Linux repos
S:3.11-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.04-alt.patch
Download


diff -ru libnet-3.04-orig/Configure libnet-3.04/Configure
--- libnet-3.04-orig/Configure	2014-11-29 16:32:43.000000000 +0000
+++ libnet-3.04/Configure	2014-12-22 17:44:40.193986506 +0000
@@ -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.04-orig/Makefile.PL libnet-3.04/Makefile.PL
--- libnet-3.04-orig/Makefile.PL	2014-11-29 16:32:43.000000000 +0000
+++ libnet-3.04/Makefile.PL	2014-12-22 17:45:39.445643487 +0000
@@ -223,7 +223,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} ||
diff -ru libnet-3.04-orig/lib/Net/Config.pm libnet-3.04/lib/Net/Config.pm
--- libnet-3.04-orig/lib/Net/Config.pm	2014-11-29 16:32:43.000000000 +0000
+++ libnet-3.04/lib/Net/Config.pm	2014-12-22 17:44:05.257679234 +0000
@@ -68,22 +68,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';
   }
diff -ru libnet-3.04-orig/lib/Net/Domain.pm libnet-3.04/lib/Net/Domain.pm
--- libnet-3.04-orig/lib/Net/Domain.pm	2014-11-29 16:32:43.000000000 +0000
+++ libnet-3.04/lib/Net/Domain.pm	2014-12-22 17:47:12.697170636 +0000
@@ -24,91 +24,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();
 }
 
 
diff -ru libnet-3.04-orig/lib/Net/SMTP.pm libnet-3.04/lib/Net/SMTP.pm
--- libnet-3.04-orig/lib/Net/SMTP.pm	2014-11-29 16:32:43.000000000 +0000
+++ libnet-3.04/lib/Net/SMTP.pm	2014-12-22 17:44:05.257679234 +0000
@@ -737,6 +737,7 @@
 
 B<Debug> - Enable debugging information
 
+B<Port> - Select a port on the remote host to connect to (default is 25)
 
 Example:
 
 
design & coding: Vladimir Lettiev aka crux © 2004-2005, Andrew Avramenko aka liks © 2007-2008
current maintainer: Michael Shigorin