rpms/imapsync/devel imapsync-1.255-authuser.patch, NONE, 1.1 imapsync.spec, 1.5, 1.6

Lubomir Rintel (lkundrak) fedora-extras-commits at redhat.com
Fri Aug 8 09:02:11 UTC 2008


Author: lkundrak

Update of /cvs/pkgs/rpms/imapsync/devel
In directory cvs-int.fedora.redhat.com:/tmp/cvs-serv18668

Modified Files:
	imapsync.spec 
Added Files:
	imapsync-1.255-authuser.patch 
Log Message:


imapsync-1.255-authuser.patch:

--- NEW FILE imapsync-1.255-authuser.patch ---
diff -urp imapsync-1.255.orig/imapsync imapsync-1.255/imapsync
--- imapsync-1.255.orig/imapsync	2008-06-24 18:38:58.000000000 +0200
+++ imapsync-1.255/imapsync	2008-08-08 10:55:51.000000000 +0200
@@ -489,8 +489,8 @@ $VERSION = ($1) ? $1 : "UNKNOWN";
 
 my $VERSION_IMAPClient = $Mail::IMAPClient::VERSION;
 
-check_lib_version() or 
-  die "imapsync needs perl lib Mail::IMAPClient release 2.2.9 exactly, future imapsync release may suppoort 3.0.x, but sorry not now. See file BUG_IMAPClient_3.xx\n";
+#check_lib_version() or 
+#  warn "There are known problems in versions of Mail::IMAPClient more recent than 2.2.9 (Yours is $VERSION_IMAPClient). Please see file BUG_IMAPClient_3.xx";
 
 
 $mess_size_total_trans   = 0;
@@ -749,7 +749,9 @@ sub login_imap {
 	$imap->Authcallback(\&plainauth) if $authmech eq "PLAIN";
 
 	$imap->User($user);
-	$imap->Authuser($authuser);
+	# Newer Mail::IMAPClient (3.08) provides Authuser, use compat stub if it fails
+	eval { $imap->Authuser($authuser) };
+	$imap->Authuser_compat($authuser) if $@;
 	$imap->Password($password);
 	unless ($imap->login()) {
 		print "Error login : [$host] with user [$user] auth [$authmech]: $@\n";
@@ -2561,7 +2563,7 @@ use constant NonFolderArg => 1;         
 package Mail::IMAPClient;
 
 
-sub Authuser {
+sub Authuser_compat {
 	my $self = shift;
 	
 	if (@_) { $self->{AUTHUSER} = shift }


Index: imapsync.spec
===================================================================
RCS file: /cvs/pkgs/rpms/imapsync/devel/imapsync.spec,v
retrieving revision 1.5
retrieving revision 1.6
diff -u -r1.5 -r1.6
--- imapsync.spec	6 Aug 2008 17:26:10 -0000	1.5
+++ imapsync.spec	8 Aug 2008 09:01:41 -0000	1.6
@@ -1,12 +1,13 @@
 Name: imapsync
 Summary: Tool to migrate email between IMAP servers
 Version: 1.255
-Release: 2%{?dist}
+Release: 3%{?dist}
 License: GPLv2
 Group: Applications/Internet
 
 URL: http://freshmeat.net/projects/imapsync/
 Source: http://www.linux-france.org/prj/imapsync/dist/%{name}-%{version}.tgz
+Patch0: imapsync-1.255-authuser.patch
 BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
 
 BuildArch: noarch
@@ -33,6 +34,7 @@
 
 %prep
 %setup -q
+%patch0 -p1 -b .authuser
 
 cat << \EOF > %{name}-req
 #!/bin/sh
@@ -56,11 +58,14 @@
 
 %files
 %defattr(-,root,root,-)
-%doc GPL ChangeLog CREDITS INSTALL TODO README FAQ
+%doc GPL ChangeLog CREDITS INSTALL TODO README FAQ BUG_IMAPClient_3.xx
 %{_bindir}/imapsync
 %attr(644, root, root) %{_mandir}/man1/imapsync.1*
 
 %ChangeLog
+* Fri Aug  8 2008 Lubomir Rintel <lkundrak at v3.sk> - 1.255-3
+- Attempt to patch around too new Mail::IMAPClient
+
 * Wed Aug  6 2008 Marek Mahut <mmahut at fedoraproject.org> - 1.255-2
 - Upstream release
 




More information about the fedora-extras-commits mailing list