Group :: Development/Perl
RPM: perl-libnet
Main Changelog Spec Patches Sources Download Gear Bugs and FR Repocop
Patch: perl-libnet-1.22-alt1.patch
Download
Download
.gear-rules | 2 +
.../38a0732399bc63171217344175a9913bd4af45ab | 13 ++
.../ff03a9e4ee7fc326062d6e365ef0cae88d9b7302 | 13 ++
.gear-tags/list | 2 +
Configure | 4 +
Makefile.PL | 10 +-
Net/Cmd.pm | 17 +--
Net/Config.pm | 12 +-
Net/Domain.pm | 86 +-----------
Net/SMTP.pm | 1 +
perl-libnet.spec | 154 ++++++++++++++++++++
11 files changed, 197 insertions(+), 117 deletions(-)
diff --git a/.gear-rules b/.gear-rules
new file mode 100644
index 0000000..e55ec03
--- /dev/null
+++ b/.gear-rules
@@ -0,0 +1,2 @@
+tar: @version@:. name=libnet-@version@
+diff: @version@:. . name=perl-libnet-@version@-@release@.patch
diff --git a/.gear-tags/38a0732399bc63171217344175a9913bd4af45ab b/.gear-tags/38a0732399bc63171217344175a9913bd4af45ab
new file mode 100644
index 0000000..b4efd37
--- /dev/null
+++ b/.gear-tags/38a0732399bc63171217344175a9913bd4af45ab
@@ -0,0 +1,13 @@
+object 63084af8b25ce321a66c766dc7316256df90fdb2
+type commit
+tag 1.22
+tagger Alexey Tourbin <at@altlinux.ru> 1204782726 +0300
+
+1.22
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.8 (GNU/Linux)
+
+iEYEABECAAYFAkfPhoYACgkQfBKgtDjnu0bCKQCg4OBsp+DIkqStXpkFUZG9ETC2
+MZwAoINFGng/w1Mf7hB3TAT9DALnrCMd
+=4fk+
+-----END PGP SIGNATURE-----
diff --git a/.gear-tags/ff03a9e4ee7fc326062d6e365ef0cae88d9b7302 b/.gear-tags/ff03a9e4ee7fc326062d6e365ef0cae88d9b7302
new file mode 100644
index 0000000..b185168
--- /dev/null
+++ b/.gear-tags/ff03a9e4ee7fc326062d6e365ef0cae88d9b7302
@@ -0,0 +1,13 @@
+object c9d2ea30936f043106a0e20597658497b36ab64e
+type commit
+tag 1.21
+tagger Alexey Tourbin <at@altlinux.ru> 1181254451 +0400
+
+1.21
+-----BEGIN PGP SIGNATURE-----
+Version: GnuPG v1.4.7 (GNU/Linux)
+
+iD8DBQBGaIM0fBKgtDjnu0YRAhI6AJ4ixXD1XxbUNdrK3SheW21Tco3SEgCgjxRa
+RXTVsSDkZCp64RiBkjbuKJ8=
+=R/8s
+-----END PGP SIGNATURE-----
diff --git a/.gear-tags/list b/.gear-tags/list
new file mode 100644
index 0000000..01fc415
--- /dev/null
+++ b/.gear-tags/list
@@ -0,0 +1,2 @@
+ff03a9e4ee7fc326062d6e365ef0cae88d9b7302 1.21
+38a0732399bc63171217344175a9913bd4af45ab 1.22
diff --git a/Configure b/Configure
index 540f5aa..f1ed32b 100755
--- a/Configure
+++ b/Configure
@@ -241,6 +241,7 @@ $libnet_cfg = "libnet.cfg"
my %oldcfg = ();
$Net::Config::CONFIGURE = 1; # Suppress load of user overrides
+if (0) {
if( -f $libnet_cfg )
{
%oldcfg = ( %{ do $libnet_cfg } );
@@ -250,6 +251,7 @@ elsif (eval { require Net::Config })
$have_old = 1;
%oldcfg = %Net::Config::NetConfig;
}
+}
map { $cfg{lc $_} = $cfg{$_}; delete $cfg{$_} if /[A-Z]/ } keys %cfg;
@@ -489,6 +491,7 @@ current list and an empty line to continue with Configure.
#---------------------------------------------------------------------------
+if (0) {
print <<EDQ;
Normally when FTP needs a data connection the client tells the server
@@ -516,6 +519,7 @@ else {
$def = $oldcfg{'ftp_int_passive'} || 0;
$cfg{'ftp_int_passive'} = get_bool($msg,$def);
+}
#---------------------------------------------------------------------------
diff --git a/Makefile.PL b/Makefile.PL
index a329167..767c46a 100644
--- a/Makefile.PL
+++ b/Makefile.PL
@@ -40,15 +40,7 @@ sub MY::post_initialize
my $config_pm = "Net/libnet.cfg";
my $libnet_cfg = "libnet.cfg";
- # Use %INC and ExtUtils::MakeMaker to determine how this machine
- # maps package names to path names
-
- foreach (keys %INC) {
- last if ($config_pm = $_) =~ s/^ExtUtils(.)MakeMaker.pm/Net${1}libnet.cfg/;
- }
-
- system(($^O eq 'VMS' ? 'mcr ': ()),$^X, 'Configure')
- unless -f $libnet_cfg;
+ system(($^O eq 'VMS' ? 'mcr ': ()),$^X, 'Configure');
$self->{PM}->{$libnet_cfg} = $self->catfile('$(INST_LIBDIR)',$config_pm);
diff --git a/Net/Cmd.pm b/Net/Cmd.pm
index 4f0e444..4fec40a 100644
--- a/Net/Cmd.pm
+++ b/Net/Cmd.pm
@@ -22,21 +22,6 @@ BEGIN {
}
}
-BEGIN {
- if (!eval { require utf8 }) {
- *is_utf8 = sub { 0 };
- }
- elsif (eval { utf8::is_utf8(undef); 1 }) {
- *is_utf8 = \&utf8::is_utf8;
- }
- elsif (eval { require Encode; Encode::is_utf8(undef); 1 }) {
- *is_utf8 = \&Encode::is_utf8;
- }
- else {
- *is_utf8 = sub { $_[0] =~ /[^\x00-\xff]/ };
- }
-}
-
$VERSION = "2.29";
@ISA = qw(Exporter);
@EXPORT = qw(CMD_INFO CMD_OK CMD_MORE CMD_REJECT CMD_ERROR CMD_PENDING);
@@ -401,7 +386,7 @@ sub datasend {
# encode to individual utf8 bytes if
# $line is a string (in internal UTF-8)
- utf8::encode($line) if is_utf8($line);
+ utf8::encode($line) if $] > 5.008 and utf8::is_utf8($line);
return 0 unless defined(fileno($cmd));
diff --git a/Net/Config.pm b/Net/Config.pm
index db51c1f..6fe594e 100644
--- a/Net/Config.pm
+++ b/Net/Config.pm
@@ -57,22 +57,18 @@ my %nc = (
}
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 --git a/Net/Domain.pm b/Net/Domain.pm
index 330909d..d5f40d9 100644
--- a/Net/Domain.pm
+++ b/Net/Domain.pm
@@ -20,91 +20,9 @@ $VERSION = "2.20";
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";
- defined(&main::SYS_gethostname);
- }
- || eval {
- package main;
- require "sys/syscall.ph";
- 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 --git a/Net/SMTP.pm b/Net/SMTP.pm
index a28496d..07b2498 100644
--- a/Net/SMTP.pm
+++ b/Net/SMTP.pm
@@ -625,6 +625,7 @@ Net::SMTP will attempt to extract the address from the value passed.
B<Debug> - Enable debugging information
+B<Port> - Select a port on the remote host to connect to (default is 25)
Example:
diff --git a/perl-libnet.spec b/perl-libnet.spec
new file mode 100644
index 0000000..d24185e
--- /dev/null
+++ b/perl-libnet.spec
@@ -0,0 +1,154 @@
+%define dist libnet
+Name: perl-%dist
+Version: 1.22
+Release: alt1
+Epoch: 1
+
+Summary: Collection of Network protocol modules for Perl
+License: GPL or Artistic
+Group: Development/Perl
+
+URL: %CPAN %dist
+Source: %dist-%version.tar
+Patch: %name-%version-%release.patch
+
+BuildArch: noarch
+Requires: /etc/perl5
+
+# Automatically added by buildreq on Thu Mar 06 2008
+BuildRequires: perl-devel
+
+%description
+libnet is a collection of Perl modules which provides a simple
+and consistent programming interface (API) to the client side
+of various protocols used in the internet community.
+
+The RFC implemented in this distribution are
+
+Net::FTP RFC959 File Transfer Protocol
+Net::SMTP RFC821 Simple Mail Transfer Protocol
+Net::Time RFC867 Daytime Protocol
+Net::Time RFC868 Time Protocol
+Net::NNTP RFC977 Network News Transfer Protocol
+Net::POP3 RFC1939 Post Office Protocol 3
+Net::SNPP RFC1861 Simple Network Pager Protocol
+
+%prep
+%setup -q -n %dist-%version
+%patch -p1
+
+%build
+%perl_vendor_build
+
+%install
+%perl_vendor_install
+
+mkdir -p %buildroot/etc/perl5/Net
+mv %buildroot{%perl_vendor_privlib,/etc/perl5}/Net/libnet.cfg
+
+%files
+%doc README Change* demos
+%dir /etc/perl5/Net
+%config(noreplace) /etc/perl5/Net/libnet.cfg
+%dir %perl_vendor_privlib/Net
+ %perl_vendor_privlib/Net/*.pm
+%doc %perl_vendor_privlib/Net/*.pod
+%dir %perl_vendor_privlib/Net/FTP
+ %perl_vendor_privlib/Net/FTP/*.pm
+
+%changelog
+* Thu Mar 06 2008 Alexey Tourbin <at@altlinux.ru> 1:1.22-alt1
+- 1.21 -> 1.22
+- Net/Config.pm: fixed /etc/perl5/Net/libnet.cfg loading
+
+* Tue Aug 21 2007 Alexey Tourbin <at@altlinux.ru> 1:1.21-alt1
+- 1.20 -> 1.21
+- reviewed and updated my previous changes
+- changed src.rpm packaging to keep upstream tarball intact
+
+* Sat Apr 07 2007 Alexey Tourbin <at@altlinux.ru> 1:1.20-alt2
+- applied change #30576 from perl-5.9 tree, which reverts unconditional
+ utf8::encode() call in Net::Cmd (#10976, rt.cpan.org #24835)
+- also applied patch from rt.cpan.org #25019, with which Net::FTP
+ no longer "Removes Last Character of Each Line"
+
+* Mon Feb 26 2007 Alexey Tourbin <at@altlinux.ru> 1:1.20-alt1
+- 1.19 -> 1.20
+
+* Sat Jun 11 2005 Alexey Tourbin <at@altlinux.ru> 1:1.19-alt3
+- Net/Domain.pm: use Sys::Hostname to find out hostname (cpan #13208)
+- Net/NNTP.pm: fix precedence error in article routine (deb #275142)
+
+* Sun Dec 19 2004 Alexey Tourbin <at@altlinux.ru> 1:1.19-alt2
+- rebuild in new environment
+- manual pages not packaged (use perldoc)
+
+* Thu Jul 01 2004 Alexey Tourbin <at@altlinux.ru> 1:1.19-alt1
+- 1.17 -> 1.19
+
+* Fri Sep 26 2003 Alexey Tourbin <at@altlinux.ru> 1:1.17-alt1
+- 1.17
+
+* Fri Jun 20 2003 Alexey Tourbin <at@altlinux.ru> 1:1.16-alt1
+- 1.16
+- don't look for any previous installation/the existing libnet.cfg
+- Net/libnet.cfg moved to /etc/perl5 (requires perl-5.8.1)
+- triggerun added to move old configuration file on upgrade
+
+* Sat Apr 26 2003 Alexey Tourbin <at@altlinux.ru> 1:1.13-alt3
+- ignore Authen::SASL dependency
+
+* Fri Mar 20 2003 Alexey Tourbin <at@altlinux.ru> 1:1.13-alt2
+- nointeractive.patch removed; alt-ftp-passive.patch added
+- specfile cleanup; docs added
+
+* Wed Mar 19 2003 Stanislav Ievlev <inger@altlinux.ru> 1:1.13-alt1
+- 1.13
+
+* Sat Oct 26 2002 Alexey Tourbin <at@altlinux.ru> 1:1.12-alt2
+- rebuilt for perl-5.8 with new rpm macros
+
+* Thu Jun 13 2002 Stanislav Ievlev <inger@altlinux.ru> 1.12-alt1
+- 1.12
+
+* Wed Mar 27 2002 Stanislav Ievlev <inger@altlinux.ru> 1.0901-alt1
+- 1.0901
+
+* Mon Jun 25 2001 Stanislav Ievlev <inger@altlinux.ru> 1.0703-ipl3mdk
+- Rebuilt with perl-5.6.1
+
+* Mon Jan 29 2001 Mikhail Zabaluev <zabaluev@parascript.com> 1.0703-ipl2mdk
+- Changed:
+ + skipping 'make test' due to its dependancy on network environment
+
+* Sun Jan 28 2001 Mikhail Zabaluev <zabaluev@parascript.com> 1.0703-ipl1mdk
+- Changed:
+ + adapted spec for Sisyphus
+
+* Tue Jun 27 2000 Mikhail Zabaluev <mookid@sigent.ru> 1.0703-3mdk_mhz
+- fixed .packlist and RPM filelist
+- ExclusiveArch: noarch
+
+* Wed May 24 2000 Chmouel Boudjnah <chmouel@mandrakesoft.com> 1.0703-2mdk
+- Don't ask interactive questions.
+
+* Mon Apr 3 2000 Guillaume Cottenceau <gc@mandrakesoft.com> 1.0703-1mdk
+- 1.0703
+- fixed group
+- rebuild with new perl
+- fixed location
+
+* Tue Feb 29 2000 Jean-Michel Dault <jmdault@netrevolution.com> 1.0607-1mdk
+- upgraded to 1.0607
+
+* Mon Jan 3 2000 Jean-Michel Dault <jmdault@netrevolution.com>
+- final cleanup for Mandrake 7
+
+* Thu Dec 30 1999 Jean-Michel Dault <jmdault@netrevolution.com>
+- rebuilt for Mandrake 7
+
+* Sun Aug 29 1999 Jean-Michel Dault <jmdault@netrevolution.com>
+- bzip2'd sources
+
+* Tue May 11 1999 root <root@alien.devel.redhat.com>
+- Spec file was autogenerated.