r4918 - in /packages/libmail-imapclient-perl/trunk: IMAPClient.pm debian/changelog debian/control debian/patches/ debian/patches/00list debian/patches/10_get_socket_on_external.dpatch debian/patches/20_ssl_support.dpatch debian/rules

gwolf at users.alioth.debian.org gwolf at users.alioth.debian.org
Thu Mar 1 01:30:11 CET 2007


Author: gwolf
Date: Thu Mar  1 01:30:10 2007
New Revision: 4918

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=4918
Log:
Working towards migrating all the past patches this package has seen
into dpatch

Added:
    packages/libmail-imapclient-perl/trunk/debian/patches/
    packages/libmail-imapclient-perl/trunk/debian/patches/00list
    packages/libmail-imapclient-perl/trunk/debian/patches/10_get_socket_on_external.dpatch   (with props)
    packages/libmail-imapclient-perl/trunk/debian/patches/20_ssl_support.dpatch   (with props)
Modified:
    packages/libmail-imapclient-perl/trunk/IMAPClient.pm
    packages/libmail-imapclient-perl/trunk/debian/changelog
    packages/libmail-imapclient-perl/trunk/debian/control
    packages/libmail-imapclient-perl/trunk/debian/rules

Modified: packages/libmail-imapclient-perl/trunk/IMAPClient.pm
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-imapclient-perl/trunk/IMAPClient.pm?rev=4918&op=diff
==============================================================================
--- packages/libmail-imapclient-perl/trunk/IMAPClient.pm (original)
+++ packages/libmail-imapclient-perl/trunk/IMAPClient.pm Thu Mar  1 01:30:10 2007
@@ -8,7 +8,6 @@
 use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
 use Socket();
 use IO::Socket();
-use IO::Socket::SSL();
 use IO::Select();
 use IO::File();
 use Carp qw(carp);
@@ -115,7 +114,6 @@
 			Authmechanism Authcallback Ranges
 			Readmethod Showcredentials
 			Prewritemethod
-			Ssl
 		)
  ) {
         no strict 'refs';
@@ -247,15 +245,13 @@
 		and 	$IO::Socket::INET::VERSION eq '1.25' 
 		and 	!$self->Port;
 	%$self = (%$self, @_);
-	my $sock = ($self->Ssl ? IO::Socket::SSL->new : IO::Socket::INET->new);
-	my $dp = ($self->Ssl ? 'imaps(993)' : 'imap(143)');
-	$sock->configure({
+	my $sock = IO::Socket::INET->new(
 		PeerAddr => $self->Server		,
-                PeerPort => $self->Port||$dp	       	,
+                PeerPort => $self->Port||'imap(143)'	,
                 Proto    => 'tcp' 			,
                 Timeout  => $self->Timeout||0		,
 		Debug	=> $self->Debug 		,
-	})						;
+	)						;
 
 	unless ( defined($sock) ) {
 		
@@ -306,10 +302,9 @@
 
 	my $id   = $self->User;
 	my $has_quotes = $id =~ /^".*"$/ ? 1 : 0;
-	#my $string = 	"Login " . ( $has_quotes ? $id : qq("$id") ) . " " . 
-	#		"{" . length($self->Password) . 
-	#		"}\r\n".$self->Password."\r\n";
-	my $string = "Login " . ( $has_quotes ? $id : qq("$id") ) . " " . $self->Password .  "\r\n";
+	my $string = 	"Login " . ( $has_quotes ? $id : qq("$id") ) . " " . 
+			"{" . length($self->Password) . 
+			"}\r\n".$self->Password."\r\n";
 	$self->_imap_command($string) 
 		and $self->State(Authenticated);
 	# $self->folders and $self->separator unless $self->NoAutoList;
@@ -1633,7 +1628,7 @@
                   return undef;
               }
               # successfully wrote to other end, keep going...
-              $count += $ret if defined($ret);
+              $count += $ret;
 		LINES: while ( $iBuffer =~ s/^(.*?\x0d?\x0a)// ) {
 		   my $current_line = $1;
 
@@ -2172,8 +2167,8 @@
                                 (?:"[^"]*"|NIL)\s+	 # "delimiter" or NIL
                                 (?:"([^"]*)"|(.*))\x0d\x0a$  # Name or "Folder name"
                         /ix;
-		#$folders[-1] = '"' . $folders[-1] . '"' 
-		#	if $1 and !$self->exists($folders[-1]) ;
+		$folders[-1] = '"' . $folders[-1] . '"' 
+			if $1 and !$self->exists($folders[-1]) ;
 		# $self->_debug("folders: line $list[$m]: 1=$1 and 2=$2\n");
         } 
 

Modified: packages/libmail-imapclient-perl/trunk/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-imapclient-perl/trunk/debian/changelog?rev=4918&op=diff
==============================================================================
--- packages/libmail-imapclient-perl/trunk/debian/changelog (original)
+++ packages/libmail-imapclient-perl/trunk/debian/changelog Thu Mar  1 01:30:10 2007
@@ -1,3 +1,12 @@
+libmail-imapclient-perl (2.2.9+deb-5) unstable; urgency=low
+
+  * Add dpatch framework
+  * Now creates the inner state for externally created sockets. Thanks
+    to Alexander Zangerl for the patch. (dpatch:
+    10_get_socket_on_external) (Closes: #401144)
+
+ -- Gunnar Wolf <gwolf at debian.org>  Wed, 28 Feb 2007 18:08:33 -0600
+
 libmail-imapclient-perl (2.2.9+deb-4) unstable; urgency=low
 
   [ Niko Tyni ]

Modified: packages/libmail-imapclient-perl/trunk/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-imapclient-perl/trunk/debian/control?rev=4918&op=diff
==============================================================================
--- packages/libmail-imapclient-perl/trunk/debian/control (original)
+++ packages/libmail-imapclient-perl/trunk/debian/control Thu Mar  1 01:30:10 2007
@@ -3,7 +3,7 @@
 Section: perl
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Joachim Breitner <nomeata at debian.org>, Gunnar Wolf <gwolf at debian.org>, Niko Tyni <ntyni at iki.fi>, Russ Allbery <rra at debian.org>
-Build-Depends: debhelper (>= 5)
+Build-Depends: debhelper (>= 5), dpatch (>= 2.0.9)
 Build-Depends-Indep: perl (>= 5.6.0-17), libparse-recdescent-perl, libio-socket-ssl-perl
 Standards-Version: 3.6.2
 XS-Vcs-Svn: svn://svn.debian.org/pkg-perl/packages/libmail-imapclient-perl/trunk/

Added: packages/libmail-imapclient-perl/trunk/debian/patches/00list
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-imapclient-perl/trunk/debian/patches/00list?rev=4918&op=file
==============================================================================
--- packages/libmail-imapclient-perl/trunk/debian/patches/00list (added)
+++ packages/libmail-imapclient-perl/trunk/debian/patches/00list Thu Mar  1 01:30:10 2007
@@ -1,0 +1,2 @@
+10_get_socket_on_external
+20_ssl_support

Added: packages/libmail-imapclient-perl/trunk/debian/patches/10_get_socket_on_external.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-imapclient-perl/trunk/debian/patches/10_get_socket_on_external.dpatch?rev=4918&op=file
==============================================================================
--- packages/libmail-imapclient-perl/trunk/debian/patches/10_get_socket_on_external.dpatch (added)
+++ packages/libmail-imapclient-perl/trunk/debian/patches/10_get_socket_on_external.dpatch Thu Mar  1 01:30:10 2007
@@ -1,0 +1,19 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 10_get_socket_on_external.dpatch by  <gwolf at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Creates the inner state of the socket when an external socket is
+## DP: passed to the module - See bug #401144. Thanks to Alexander Zangerl.
+
+ at DPATCH@
+diff -urNad trunk~/IMAPClient.pm trunk/IMAPClient.pm
+--- trunk~/IMAPClient.pm	2007-02-28 17:51:10.000000000 -0600
++++ trunk/IMAPClient.pm	2007-02-28 18:05:29.000000000 -0600
+@@ -233,6 +233,7 @@
+ 		"and perl version " . (defined $^V ? join(".",unpack("CCC",$^V)) : "") . 
+ 		" ($])\n") if $self->Debug;
+ 	$self->LastError(0);
++	$self->Socket($self->{Socket}) if ($self->{Socket});
+ 	$self->Maxtemperrors or $self->Maxtemperrors("unlimited") ;
+ 	return $self->connect if $self->Server and !$self->Socket;
+ 	return $self;

Propchange: packages/libmail-imapclient-perl/trunk/debian/patches/10_get_socket_on_external.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Added: packages/libmail-imapclient-perl/trunk/debian/patches/20_ssl_support.dpatch
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-imapclient-perl/trunk/debian/patches/20_ssl_support.dpatch?rev=4918&op=file
==============================================================================
--- packages/libmail-imapclient-perl/trunk/debian/patches/20_ssl_support.dpatch (added)
+++ packages/libmail-imapclient-perl/trunk/debian/patches/20_ssl_support.dpatch Thu Mar  1 01:30:10 2007
@@ -1,0 +1,80 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 20_ssl_support.dpatch by  <gwolf at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: Adds SSL support - Thanks for Joost Cassee for the patch!
+## DP: For more information, see bug #111960
+
+ at DPATCH@
+diff -urNad trunk~/IMAPClient.pm trunk/IMAPClient.pm
+--- trunk~/IMAPClient.pm	2007-02-28 18:14:12.000000000 -0600
++++ trunk/IMAPClient.pm	2007-02-28 18:15:17.000000000 -0600
+@@ -8,6 +8,7 @@
+ use Fcntl qw(F_GETFL F_SETFL O_NONBLOCK);
+ use Socket();
+ use IO::Socket();
++use IO::Socket::SSL();
+ use IO::Select();
+ use IO::File();
+ use Carp qw(carp);
+@@ -114,6 +115,7 @@
+ 			Authmechanism Authcallback Ranges
+ 			Readmethod Showcredentials
+ 			Prewritemethod
++			Ssl
+ 		)
+  ) {
+         no strict 'refs';
+@@ -245,13 +247,15 @@
+ 		and 	$IO::Socket::INET::VERSION eq '1.25' 
+ 		and 	!$self->Port;
+ 	%$self = (%$self, @_);
+-	my $sock = IO::Socket::INET->new(
++	my $sock = ($self->Ssl ? IO::Socket::SSL->new : IO::Socket::INET->new);
++	my $dp = ($self->Ssl ? 'imaps(993)' : 'imap(143)');
++	$sock->configure({
+ 		PeerAddr => $self->Server		,
+-                PeerPort => $self->Port||'imap(143)'	,
++                PeerPort => $self->Port||$dp	       	,
+                 Proto    => 'tcp' 			,
+                 Timeout  => $self->Timeout||0		,
+ 		Debug	=> $self->Debug 		,
+-	)						;
++	})						;
+ 
+ 	unless ( defined($sock) ) {
+ 		
+@@ -302,9 +306,10 @@
+ 
+ 	my $id   = $self->User;
+ 	my $has_quotes = $id =~ /^".*"$/ ? 1 : 0;
+-	my $string = 	"Login " . ( $has_quotes ? $id : qq("$id") ) . " " . 
+-			"{" . length($self->Password) . 
+-			"}\r\n".$self->Password."\r\n";
++	#my $string = 	"Login " . ( $has_quotes ? $id : qq("$id") ) . " " . 
++	#		"{" . length($self->Password) . 
++	#		"}\r\n".$self->Password."\r\n";
++	my $string = "Login " . ( $has_quotes ? $id : qq("$id") ) . " " . $self->Password .  "\r\n";
+ 	$self->_imap_command($string) 
+ 		and $self->State(Authenticated);
+ 	# $self->folders and $self->separator unless $self->NoAutoList;
+@@ -1628,7 +1633,7 @@
+                   return undef;
+               }
+               # successfully wrote to other end, keep going...
+-              $count += $ret;
++              $count += $ret if defined($ret);
+ 		LINES: while ( $iBuffer =~ s/^(.*?\x0d?\x0a)// ) {
+ 		   my $current_line = $1;
+ 
+@@ -2167,8 +2172,8 @@
+                                 (?:"[^"]*"|NIL)\s+	 # "delimiter" or NIL
+                                 (?:"([^"]*)"|(.*))\x0d\x0a$  # Name or "Folder name"
+                         /ix;
+-		$folders[-1] = '"' . $folders[-1] . '"' 
+-			if $1 and !$self->exists($folders[-1]) ;
++		#$folders[-1] = '"' . $folders[-1] . '"' 
++		#	if $1 and !$self->exists($folders[-1]) ;
+ 		# $self->_debug("folders: line $list[$m]: 1=$1 and 2=$2\n");
+         } 
+ 

Propchange: packages/libmail-imapclient-perl/trunk/debian/patches/20_ssl_support.dpatch
------------------------------------------------------------------------------
    svn:executable = *

Modified: packages/libmail-imapclient-perl/trunk/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/packages/libmail-imapclient-perl/trunk/debian/rules?rev=4918&op=diff
==============================================================================
--- packages/libmail-imapclient-perl/trunk/debian/rules (original)
+++ packages/libmail-imapclient-perl/trunk/debian/rules Thu Mar  1 01:30:10 2007
@@ -4,7 +4,9 @@
 PERL ?= /usr/bin/perl
 TMP  := $(CURDIR)/debian/libmail-imapclient-perl
 
-build: build-arch build-indep
+include /usr/share/dpatch/dpatch.make
+
+build: patch-stamp build-arch build-indep
 build-arch:
 build-indep: build-stamp
 build-stamp:
@@ -16,7 +18,9 @@
 	$(MAKE) test
 	touch build-stamp
 
-clean:
+clean: clean-patched unpatch
+
+clean-patched:
 	dh_testdir
 	dh_testroot
 	[ ! -f Makefile ] || $(MAKE) distclean




More information about the Pkg-perl-cvs-commits mailing list