Package: perl-modules
Tags: patch

Heya,

Here is the patch we talked about in IRC. This includes all patches
applied on libnet-perl that were not yet in perl-modules, a control file
conflict with the last libnet-perl version and a new
/etc/perl/libnet.cfg config file which uses /etc/libnet.cfg if it
exists and is used for configuration in the other cases.

Marc
-- 
Fachbegriffe der Informatik - Einfach erklärt
251: Hochglanz-Verkaufsprospekt
       Das Produkt befindet sich gerade in der allerersten
       Konzeptionsphase. (Patrick Piecha)

diff -u perl-5.8.8/lib/Net/Config.pm perl-5.8.8/lib/Net/Config.pm
--- perl-5.8.8/lib/Net/Config.pm
+++ perl-5.8.8/lib/Net/Config.pm
@@ -57,7 +57,7 @@
 }
 TRY_INTERNET_CONFIG
 
-my $file = '/etc/perl/Net/libnet.cfg';
+my $file = '/etc/perl/libnet.cfg';
 my $ref;
 if ( -f $file ) {
     $ref = eval { local $SIG{__DIE__}; do $file };
@@ -130,8 +130,8 @@
 C<Net::Config> holds configuration data for the modules in the libnet
 distribuion. During installation you will be asked for these values.
 
-The configuration data is held globally in a file in the perl installation
-tree, but a user may override any of these values by providing their own. This
+The configuration data is held globally in /etc/perl/libnet.cfg,
+but a user may override any of these values by providing their own. This
 can be done by having a C<.libnetrc> file in their home directory. This file
 should return a reference to a HASH containing the keys described below.
 For example
@@ -156,7 +156,7 @@
 Attempts to determine if a given host is outside your firewall. Possible
 return values are.
 
-  -1  Cannot lookup hostname
+  \-1  Cannot lookup hostname
    0  Host is inside firewall (or there is no ftp_firewall entry)
    1  Host is outside the firewall
 
diff -u perl-5.8.8/patches-applied perl-5.8.8/patches-applied
--- perl-5.8.8/patches-applied
+++ perl-5.8.8/patches-applied
@@ -10,6 +10,10 @@
 debian/patches/09_fix_installperl
 debian/patches/10_fix_installsitescript
 debian/patches/11_fix_processPL
+debian/patches/12_fix_net_cmd
+debian/patches/13_fix_net_pop3
+debian/patches/14_fix_net_groff_minus-hyphen
+debian/patches/15_fix_net_smtp_docs
 debian/patches/50_debian_use_gdbm
 debian/patches/51_debian_ld_run_path
 debian/patches/52_debian_extutils_hacks
diff -u perl-5.8.8/debian/patches/60_debian_libnet_config_path perl-5.8.8/debian/patches/60_debian_libnet_config_path
--- perl-5.8.8/debian/patches/60_debian_libnet_config_path
+++ perl-5.8.8/debian/patches/60_debian_libnet_config_path
@@ -1,4 +1,4 @@
-Set location of libnet.cfg to /etc/perl/Net as /usr may not be writable.
+Set location of libnet.cfg to /etc/perl/libnet.cfg as /usr may not be writable.
 
 diff -Naur --exclude=debian perl-5.8.8.orig/lib/Net/Config.pm perl-5.8.8/lib/Net/Config.pm
 --- perl-5.8.8.orig/lib/Net/Config.pm	2002-03-01 01:04:31.000000000 +1100
@@ -11,6 +11,17 @@
-+my $file = '/etc/perl/Net/libnet.cfg';
++my $file = '/etc/perl/libnet.cfg';
  my $ref;
 -$file =~ s/Config.pm/libnet.cfg/;
  if ( -f $file ) {
      $ref = eval { local $SIG{__DIE__}; do $file };
      if (ref($ref) eq 'HASH') {
+@@ -131,8 +130,8 @@
+ C<Net::Config> holds configuration data for the modules in the libnet
+ distribuion. During installation you will be asked for these values.
+
+-The configuration data is held globally in a file in the perl installation
+-tree, but a user may override any of these values by providing their own. This
++The configuration data is held globally in /etc/perl/libnet.cfg,
++but a user may override any of these values by providing their own. This
+ can be done by having a C<.libnetrc> file in their home directory. This file
+ should return a reference to a HASH containing the keys described below.
+ For example
diff -u perl-5.8.8/debian/changelog perl-5.8.8/debian/changelog
--- perl-5.8.8/debian/changelog
+++ perl-5.8.8/debian/changelog
@@ -1,3 +1,15 @@
+perl (5.8.8-6.2) unstable; urgency=low
+
+  * Completly replace libnet-perl:
+   + Integrate some patches for the Net:: modules
+   + debian/control: Update to replace the last libnet-perl version.
+   + Update configuration mechanism so that /etc/perl/libnet.cfg
+     sources in /etc/libnet.cfg if it exists, otherwise the
+     configuration is stored there. This saves us trouble from
+     converting debconf-managed /etc/libnet.cfg to a dpkg conffile
+
+ -- Marc 'HE' Brockschmidt <[EMAIL PROTECTED]>  Tue,  7 Nov 2006 17:30:54 +0100
+
 perl (5.8.8-6.1) unstable; urgency=high
 
   * Non-maintainer upload to fix Failure To Build From Source in hppa, mips
diff -u perl-5.8.8/debian/control perl-5.8.8/debian/control
--- perl-5.8.8/debian/control
+++ perl-5.8.8/debian/control
@@ -50,7 +50,7 @@
 Priority: standard
 Architecture: all
 Depends: perl (>= ${Upstream-Version}-1)
-Conflicts: libpod-parser-perl (<< 1.32-1), libansicolor-perl (<< 1.10-1), libfile-temp-perl (<< 0.16-1), libnet-perl (<< 1:1.17-1), libattribute-handlers-perl (<< 0.78_02-1), libcgi-pm-perl (<< 3.15-1), libi18n-langtags-perl (<< 0.35-1), liblocale-maketext-perl (<< 1.08-1), libmath-bigint-perl (<< 1.77-1), libnet-ping-perl (<< 2.31-1), libtest-harness-perl (<< 2.56-1), libtest-simple-perl (<< 0.62-1), liblocale-codes-perl (<< 2.06.1-1)
+Conflicts: libpod-parser-perl (<< 1.32-1), libansicolor-perl (<< 1.10-1), libfile-temp-perl (<< 0.16-1), libnet-perl (<= 1:1.19-3), libattribute-handlers-perl (<< 0.78_02-1), libcgi-pm-perl (<< 3.15-1), libi18n-langtags-perl (<< 0.35-1), liblocale-maketext-perl (<< 1.08-1), libmath-bigint-perl (<< 1.77-1), libnet-ping-perl (<< 2.31-1), libtest-harness-perl (<< 2.56-1), libtest-simple-perl (<< 0.62-1), liblocale-codes-perl (<< 2.06.1-1)
 Replaces: libpod-parser-perl, libansicolor-perl, libfile-temp-perl, libnet-perl, libattribute-handlers-perl, libcgi-pm-perl, libi18n-langtags-perl, liblocale-maketext-perl, libmath-bigint-perl, libnet-ping-perl, libtest-harness-perl, libtest-simple-perl, liblocale-codes-perl
 Provides: libpod-parser-perl, libansicolor-perl, libfile-temp-perl, libnet-perl, libattribute-handlers-perl, libcgi-pm-perl, libi18n-langtags-perl, liblocale-maketext-perl, libmath-bigint-perl, libnet-ping-perl, libtest-harness-perl, libtest-simple-perl, liblocale-codes-perl
 Description: Core Perl modules
diff -u perl-5.8.8/debian/rules perl-5.8.8/debian/rules
--- perl-5.8.8/debian/rules
+++ perl-5.8.8/debian/rules
@@ -229,6 +229,9 @@
 	mkdir -p $(build)/perl-modules/etc/perl/CPAN \
 	    $(build)/perl-modules/etc/perl/Net
 
+	# copy in Config.pm for libnet:
+	install -m 644 --owner root --group root $(CURDIR)/debian/libnet.cfg $(build)/perl-modules/etc/perl/libnet.cfg
+
 	# compress
 	find $(build)/*/usr/share/man -type f -print | xargs -r gzip -9
 	find $(build)/*/usr/share/doc -type f \
only in patch2:
unchanged:
--- perl-5.8.8.orig/lib/Net/SMTP.pm
+++ perl-5.8.8/lib/Net/SMTP.pm
@@ -558,7 +558,7 @@
 
 This example prints the mail domain name of the SMTP server known as mailhost:
 
-    #!/usr/local/bin/perl -w
+    #!/usr/local/bin/perl \-w
 
     use Net::SMTP;
 
@@ -569,7 +569,7 @@
 This example sends a small message to the postmaster at the SMTP server
 known as mailhost:
 
-    #!/usr/local/bin/perl -w
+    #!/usr/local/bin/perl \-w
 
     use Net::SMTP;
 
@@ -623,6 +623,7 @@
 
 B<Debug> - Enable debugging information
 
+B<Port> - Select a port on the remote host to connect to (default is 25)
 
 Example:
 
unchanged:
--- perl-5.8.8.orig/lib/Net/POP3.pm
+++ perl-5.8.8/lib/Net/POP3.pm
@@ -54,7 +54,8 @@
  $obj->autoflush(1);
  $obj->debug(exists $arg{Debug} ? $arg{Debug} : undef);
 
- unless ($obj->response() == CMD_OK)
+ my $response = $obj->response();
+ unless ($response && $response == CMD_OK)
   {
    $obj->close();
    return undef;
only in patch2:
unchanged:
--- perl-5.8.8.orig/lib/Net/Cmd.pm
+++ perl-5.8.8/lib/Net/Cmd.pm
@@ -204,7 +204,7 @@
   {
    local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
 
-   my $str =  join(" ", map { /\n/ ? do { my $n = $_; $n =~ tr/\n/ /; $n } : $_; } @_);
+   my $str =  join(" ", map { defined($_) ? /\n/ ? do { my $n = $_; $n =~ tr/\n/ /; $n } : $_ : " "; } @_);
    $str = $cmd->toascii($str) if $tr;
    $str .= "\015\012";
 
only in patch2:
unchanged:
--- perl-5.8.8.orig/lib/Net/FTP.pm
+++ perl-5.8.8/lib/Net/FTP.pm
@@ -1243,7 +1243,7 @@
     $ftp = Net::FTP->new("some.host.name", Debug => 0)
       or die "Cannot connect to some.host.name: $@";
 
-    $ftp->login("anonymous",'-anonymous@')
+    $ftp->login("anonymous",'\-anonymous@')
       or die "Cannot login ", $ftp->message;
 
     $ftp->cwd("/pub")
only in patch2:
unchanged:
--- perl-5.8.8.orig/debian/libnet.cfg
+++ perl-5.8.8/debian/libnet.cfg
@@ -0,0 +1,25 @@
+#Please note that the configuration done in this file is only parsed
+#if /etc/libnet.cfg doesn't exist. The libnet-perl package used to
+#create this file, but its contents are now integrated in perl-modules
+
+if (-f "/etc/libnet.cfg") {
+	do "/etc/libnet.cfg";
+} else {
+
+#These options are used if /etc/libnet.cfg doesn't exist:
+{
+	nntp_hosts => [ qw {} ],
+	snpp_hosts => [ qw {} ],
+	pop3_hosts => [ qw {} ],
+	smtp_hosts => [ qw {} ],
+	ph_hosts => [ qw {} ],
+	daytime_hosts => [ qw {} ],
+	time_hosts => [ qw {} ],
+	inet_domain => undef,
+	ftp_firewall => qq {},
+	ftp_firewall_type => qq {},
+	ftp_ext_passive => 0,
+	ftp_int_passive => 0,
+	local_netmask => qq {},
+}
+}
only in patch2:
unchanged:
--- perl-5.8.8.orig/debian/patches/13_fix_net_pop3
+++ perl-5.8.8/debian/patches/13_fix_net_pop3
@@ -0,0 +1,14 @@
+Fix Net::POP3 to avoid undefined value warnings
+
+--- perl-5.8.8.orig/lib/Net/POP3.pm	2004-07-04 01:04:46.000000000 +0200
++++ perl-5.8.8/lib/Net/POP3.pm	2004-07-04 01:50:38.000000000 +0200
+@@ -54,7 +54,8 @@
+  $obj->autoflush(1);
+  $obj->debug(exists $arg{Debug} ? $arg{Debug} : undef);
+ 
+- unless ($obj->response() == CMD_OK)
++ my $response = $obj->response();
++ unless ($response && $response == CMD_OK)
+   {
+    $obj->close();
+    return undef;
only in patch2:
unchanged:
--- perl-5.8.8.orig/debian/patches/12_fix_net_cmd
+++ perl-5.8.8/debian/patches/12_fix_net_cmd
@@ -0,0 +1,13 @@
+Fix Net::Cmd's handling of undefined arguments
+
+--- perl-5.8.8.orig/lib/Net/Cmd.pm	2004-07-04 00:47:13.000000000 +0200
++++ perl-5.8.8/lib/Net/Cmd.pm	2004-07-04 01:18:17.000000000 +0200
+@@ -204,7 +204,7 @@
+   {
+    local $SIG{PIPE} = 'IGNORE' unless $^O eq 'MacOS';
+ 
+-   my $str =  join(" ", map { /\n/ ? do { my $n = $_; $n =~ tr/\n/ /; $n } : $_; } @_);
++   my $str =  join(" ", map { defined($_) ? /\n/ ? do { my $n = $_; $n =~ tr/\n/ /; $n } : $_ : " "; } @_);
+    $str = $cmd->toascii($str) if $tr;
+    $str .= "\015\012";
+ 
only in patch2:
unchanged:
--- perl-5.8.8.orig/debian/patches/15_fix_net_smtp_docs
+++ perl-5.8.8/debian/patches/15_fix_net_smtp_docs
@@ -0,0 +1,13 @@
+Complete the documentation for Net::SMTP
+
+diff -ru perl-5.8.8.orig/lib/Net/SMTP.pm perl-5.8.8/lib/Net/SMTP.pm
+--- perl-5.8.8.orig/lib/Net/SMTP.pm	2004-07-04 00:47:13.000000000 +0200
++++ perl-5.8.8/lib/Net/SMTP.pm	2004-07-04 01:24:37.000000000 +0200
+@@ -623,6 +623,7 @@
+ 
+ B<Debug> - Enable debugging information
+ 
++B<Port> - Select a port on the remote host to connect to (default is 25)
+ 
+ Example:
+ 
only in patch2:
unchanged:
--- perl-5.8.8.orig/debian/patches/14_fix_net_groff_minus-hyphen
+++ perl-5.8.8/debian/patches/14_fix_net_groff_minus-hyphen
@@ -0,0 +1,47 @@
+Add backslashes to hyphens to get real minus signs with groff.
+
+diff -ru perl-5.8.8.orig/lib/Net/Config.pm perl-5.8.8/lib/Net/Config.pm
+--- perl-5.8.8.orig/lib/Net/Config.pm	2004-07-04 00:47:13.000000000 +0200
++++ perl-5.8.8/lib/Net/Config.pm	2004-07-04 01:04:55.000000000 +0200
+@@ -157,7 +157,7 @@
+ Attempts to determine if a given host is outside your firewall. Possible
+ return values are.
+ 
+-  -1  Cannot lookup hostname
++  \-1  Cannot lookup hostname
+    0  Host is inside firewall (or there is no ftp_firewall entry)
+    1  Host is outside the firewall
+ 
+diff -ru perl-5.8.8.orig/lib/Net/FTP.pm perl-5.8.8/lib/Net/FTP.pm
+--- perl-5.8.8.orig/lib/Net/FTP.pm	2004-07-04 00:47:13.000000000 +0200
++++ perl-5.8.8/lib/Net/FTP.pm	2004-07-04 01:04:55.000000000 +0200
+@@ -1243,7 +1243,7 @@
+     $ftp = Net::FTP->new("some.host.name", Debug => 0)
+       or die "Cannot connect to some.host.name: $@";
+ 
+-    $ftp->login("anonymous",'-anonymous@')
++    $ftp->login("anonymous",'\-anonymous@')
+       or die "Cannot login ", $ftp->message;
+ 
+     $ftp->cwd("/pub")
+diff -ru perl-5.8.8.orig/lib/Net/SMTP.pm perl-5.8.8/lib/Net/SMTP.pm
+--- perl-5.8.8.orig/lib/Net/SMTP.pm	2004-07-04 00:47:13.000000000 +0200
++++ perl-5.8.8/lib/Net/SMTP.pm	2004-07-04 01:04:55.000000000 +0200
+@@ -558,7 +558,7 @@
+ 
+ This example prints the mail domain name of the SMTP server known as mailhost:
+ 
+-    #!/usr/local/bin/perl -w
++    #!/usr/local/bin/perl \-w
+ 
+     use Net::SMTP;
+ 
+@@ -569,7 +569,7 @@
+ This example sends a small message to the postmaster at the SMTP server
+ known as mailhost:
+ 
+-    #!/usr/local/bin/perl -w
++    #!/usr/local/bin/perl \-w
+ 
+     use Net::SMTP;
+ 

Reply via email to