r25038 - in /trunk/libimap-admin-perl: Admin.pm Changes META.yml debian/changelog debian/compat debian/control debian/copyright debian/libimap-admin-perl.examples debian/patches/ debian/patches/no_interactive_tests.patch debian/patches/series debian/rules

rmayorga-guest at users.alioth.debian.org rmayorga-guest at users.alioth.debian.org
Sat Sep 13 09:11:56 UTC 2008


Author: rmayorga-guest
Date: Sat Sep 13 09:11:52 2008
New Revision: 25038

URL: http://svn.debian.org/wsvn/pkg-perl/?sc=1&rev=25038
Log:
* New upstream release
* debian/control 
  + Bump standards-version to 3.8.0 (No changes needed)
  + set debhelper version to 7
  + add myself to uploaders
  + add ${misc:Depends} to Depends field
  + add Module name to long description
  + add quilt to b-d
* debian/rules: refresh with the help of dh-make-perl
  + install examples/
* debian/copyright - convert to the (new)format
* no_interactive_tests.patch added
  + don't depend on internet conections nor user interactive test
    this patch just disabled (all?) tests.

Added:
    trunk/libimap-admin-perl/debian/libimap-admin-perl.examples
    trunk/libimap-admin-perl/debian/patches/
    trunk/libimap-admin-perl/debian/patches/no_interactive_tests.patch
    trunk/libimap-admin-perl/debian/patches/series
Modified:
    trunk/libimap-admin-perl/Admin.pm
    trunk/libimap-admin-perl/Changes
    trunk/libimap-admin-perl/META.yml
    trunk/libimap-admin-perl/debian/changelog
    trunk/libimap-admin-perl/debian/compat
    trunk/libimap-admin-perl/debian/control
    trunk/libimap-admin-perl/debian/copyright
    trunk/libimap-admin-perl/debian/rules

Modified: trunk/libimap-admin-perl/Admin.pm
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/Admin.pm?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/Admin.pm (original)
+++ trunk/libimap-admin-perl/Admin.pm Sat Sep 13 09:11:52 2008
@@ -11,7 +11,7 @@
 
 use vars qw($VERSION);
 
-$VERSION = '1.6.4';
+$VERSION = '1.6.6';
 
 sub new {
   my $class = shift;
@@ -91,19 +91,30 @@
 	    return;
     }
   } else {
-    if (!eval {
-	    $self->{'Socket'} = 
-      IO::Socket::INET->new(PeerAddr => $self->{'Server'},
-                            PeerPort => $self->{'Port'},
-                            Proto => 'tcp',
-                            Reuse => 1,
-                            Timeout => 5); })
-      {
-        delete $self->{'Socket'};
-        $self->_error("initialize", "couldn't establish connection to",
-                      $self->{'Server'});
-        return;
-			  
+    if ($self->{'Server'} =~ /^\//) {
+        if (!eval {
+            $self->{'Socket'} = 
+        IO::Socket::UNIX->new(Peer => $self->{'Server'}); })
+        {
+            delete $self->{'Socket'};
+            $self->_error("initialize", "couldn't establish connection to",
+                        $self->{'Server'});
+            return;
+        }
+      } else {
+          if (!eval {
+              $self->{'Socket'} = 
+          IO::Socket::INET->new(PeerAddr => $self->{'Server'},
+                                  PeerPort => $self->{'Port'},
+                                  Proto => 'tcp',
+                                  Reuse => 1,
+                                  Timeout => 5); })
+          {
+              delete $self->{'Socket'};
+              $self->_error("initialize", "couldn't establish connection to",
+                          $self->{'Server'});
+              return;
+          }
       }
   }
   my $fh = $self->{'Socket'};
@@ -486,6 +497,61 @@
   return 0;
 }
 
+sub select { # returns an array or undef
+  my $self = shift;
+  my @info;
+
+  if (!defined($self->{'Socket'})) {
+    return 1;
+  }
+  if (scalar(@_) != 1) {
+    $self->_error("select", "incorrect number of arguments");
+    return;
+  }
+
+  my $mailbox = shift;
+  my $fh = $self->{'Socket'};
+  print $fh qq{try SELECT "$mailbox"\n};
+  my $try = $self->_read;
+  while ($try =~ /^\* (.*)/) { # danger danger (could lock up needs timeout)
+    push @info, $1;
+    $try = $self->_read;
+  }
+  if ($try =~ /^try OK/) {
+    return @info;
+  } else {
+    $self->_error("select", "couldn't select", $mailbox, ":", $try);
+    return;
+  }
+}
+
+sub expunge { # returns an array or undef
+  my $self = shift;
+  my @info;
+
+  if (!defined($self->{'Socket'})) {
+    return 1;
+  }
+  if (scalar(@_) != 0) {
+    $self->_error("expunge", "incorrect number of arguments");
+    return;
+  }
+
+  my $mailbox = shift;
+  my $fh = $self->{'Socket'};
+  print $fh qq{try EXPUNGE\n};
+  my $try = $self->_read;
+  while ($try =~ /^\* (.*)/) { # danger danger (could lock up needs timeout)
+    push @info, $1;
+    $try = $self->_read;
+  }
+  if ($try =~ /^try OK/) {
+    return @info;
+  } else {
+    $self->_error("expunge", "couldn't expunge", $mailbox, ":", $try);
+    return;
+  }
+}
 
 sub get_acl { # returns an array or undef
   my $self = shift;
@@ -683,6 +749,8 @@
 
 SSL on the new call will attempt to make an SSL connection to the imap server.  It does not fallback to a regular connection if it fails.  It is off by default.  IO::Socket::SSL requires a ca certificate, a client certificate, and a client private key. By default these are in current_directory/certs, respectively named ca-cert.pem, client-cert.pem, and client-key.pem.  The location of this can be overridden by setting SSL_ca_file, SSL_cert_file, and SSL_key_file (you'll probably want to also set SSL_ca_path).
 
+If you start the name of the server with a / instead of using tcp/ip it'll attempt to use a unix socket.
+
 I generated my ca cert and ca key with openssl:
  openssl req -x509 -newkey rsa:1024 -keyout ca-key.pem -out ca-cert.pem
 
@@ -724,6 +792,26 @@
 subscribe/unsubscribe does this action on given mailbox.
 
 rename renames a mailbox.  IMAP servers seem to be peculiar about how they implement this, so I wouldn't necessarily expect it to do what you think it should.
+
+select selects a mailbox to work on. You need the 'r' acl to select a mailbox.
+This command selects a mailbox that mailbox related commands will be performed on.  This is not a recursive command so sub-mailboxes/folders will not be affected unless for some bizarre reason the IMAP server has it implemented as recursive.  It returns an error or an array that contains information about the mailbox.  For example:
+FLAGS (\Answered \Flagged \Draft \Deleted \Seen $Forwarded $MDNSent NonJunk Junk $Label7)
+OK [PERMANENTFLAGS (\Deleted)]  
+2285 EXISTS
+2285 RECENT
+OK [UNSEEN 1]  
+OK [UIDVALIDITY 1019141395]  
+OK [UIDNEXT 293665]  
+OK [READ-WRITE] Completed
+
+expunge permanently removes messages flagged with \Deleted out of the current selected mailbox.
+It returns a list of message sequence numbers that it deleted.  You need to select a mailbox before you expunge. You need to read section 7.4.1 of RFC2060 to interpret the output.  Essentially each time a message is deleted the sequence numbers all get decremented so you can see the same message sequence number several times in the list of deleted messages.  In the following example (taken from the RFC) messages 3, 4, 7, and 11 were deleted:
+* 3 EXPUNGE
+* 3 EXPUNGE
+* 5 EXPUNGE
+* 8 EXPUNGE
+. OK EXPUNGE completed
+
 
 =head2 QUOTA FUNCTIONS
 

Modified: trunk/libimap-admin-perl/Changes
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/Changes?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/Changes (original)
+++ trunk/libimap-admin-perl/Changes Sat Sep 13 09:11:52 2008
@@ -159,3 +159,8 @@
   - I screwed the pooch on 1.6.3, blatant typo pointed out to me by matrix200
     guess I forgot to run make test before releasing.
 
+1.6.5 apparently a mystery release
+
+1.6.6 Sun Sep 07 10:20:22 CST 2008
+  - Thomas Jarosch sent a patch that adds unix socket support for those
+    who have their admin restricted to unix socket instead of tcp

Modified: trunk/libimap-admin-perl/META.yml
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/META.yml?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/META.yml (original)
+++ trunk/libimap-admin-perl/META.yml Sat Sep 13 09:11:52 2008
@@ -1,10 +1,12 @@
-# http://module-build.sourceforge.net/META-spec.html
-#XXXXXXX This is a prototype!!!  It will change in the future!!! XXXXX#
-name:         IMAP-Admin
-version:      1.6.4
-version_from: Admin.pm
-installdirs:  site
-requires:
-
-distribution_type: module
-generated_by: ExtUtils::MakeMaker version 6.17
+--- #YAML:1.0
+name:                IMAP-Admin
+version:             1.6.6
+abstract:            ~
+license:             ~
+author:              ~
+generated_by:        ExtUtils::MakeMaker version 6.42
+distribution_type:   module
+requires:     
+meta-spec:
+    url:     http://module-build.sourceforge.net/META-spec-v1.3.html
+    version: 1.3

Modified: trunk/libimap-admin-perl/debian/changelog
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/changelog?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/debian/changelog (original)
+++ trunk/libimap-admin-perl/debian/changelog Sat Sep 13 09:11:52 2008
@@ -1,4 +1,4 @@
-libimap-admin-perl (1.6.4-2) UNRELEASED; urgency=low
+libimap-admin-perl (1.6.6-1) unstable; urgency=low
 
   [ gregor herrmann ]
   * debian/control: Added: Vcs-Svn field (source stanza); Vcs-Browser
@@ -10,7 +10,23 @@
   [ Joachim Breitner ]
   * Removed myself from uploaders.
 
- -- Joachim Breitner <nomeata at debian.org>  Mon, 11 Feb 2008 20:28:54 +0000
+  [ Rene Mayorga ]
+  * New upstream release
+  * debian/control 
+    + Bump standards-version to 3.8.0 (No changes needed)
+    + set debhelper version to 7
+    + add myself to uploaders
+    + add ${misc:Depends} to Depends field
+    + add Module name to long description
+    + add quilt to b-d
+  * debian/rules: refresh with the help of dh-make-perl
+    + install examples/
+  * debian/copyright - convert to the (new)format
+  * no_interactive_tests.patch added
+    + don't depend on internet conections nor user interactive test
+      this patch just disabled (all?) tests.
+
+ -- Rene Mayorga <rmayorga at debian.org.sv>  Sat, 13 Sep 2008 02:08:11 -0600
 
 libimap-admin-perl (1.6.4-1) unstable; urgency=low
 

Modified: trunk/libimap-admin-perl/debian/compat
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/compat?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/debian/compat (original)
+++ trunk/libimap-admin-perl/debian/compat Sat Sep 13 09:11:52 2008
@@ -1,1 +1,1 @@
-5
+7

Modified: trunk/libimap-admin-perl/debian/control
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/control?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/debian/control (original)
+++ trunk/libimap-admin-perl/debian/control Sat Sep 13 09:11:52 2008
@@ -2,9 +2,9 @@
 Section: perl
 Priority: extra
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
-Uploaders: Niko Tyni <ntyni at iki.fi>
-Build-Depends: debhelper (>= 5)
-Standards-Version: 3.6.2
+Uploaders: Niko Tyni <ntyni at iki.fi>, Rene Mayorga <rmayorga at debian.org.sv>
+Build-Depends: debhelper (>= 7), quilt
+Standards-Version: 3.8.0
 Homepage: http://search.cpan.org/dist/IMAP-Admin/
 Vcs-Svn: svn://svn.debian.org/pkg-perl/trunk/libimap-admin-perl/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/
@@ -13,8 +13,8 @@
 Architecture: all
 Section: perl
 Priority: extra
-Depends: ${perl:Depends}
+Depends: ${perl:Depends}, ${misc:Depends}
 Recommends: libio-socket-ssl-perl, libdigest-hmac-perl
 Description: Administer IMAP servers
- This module is designed to take the pain out of writing programs for
+ IMAP::Admin is designed to take the pain out of writing programs for
  administering an IMAP server like Cyrus.

Modified: trunk/libimap-admin-perl/debian/copyright
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/copyright?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/debian/copyright (original)
+++ trunk/libimap-admin-perl/debian/copyright Sat Sep 13 09:11:52 2008
@@ -1,21 +1,20 @@
-This is Debian GNU/Linux's prepackaged IMAP::Admin.  This is a set of
-perl modules which provide a simple interface to administering a Cyrus
-(and possibly other) IMAP server.
+Format-Specification: http://wiki.debian.org/Proposals/CopyrightFormat?action=recall&rev=226
+Upstream-Name: IMAP-Admin
+Upstream-Maintainer:  Eric Estabrooks <eric at urbanrage.com>
+Upstream-Source: http://search.cpan.org/dist/IMAP-Admin
 
-Michael Alan Dorman <mdorman at debian.org> originally assembled this
-package using original sources retrieved from the Comprehensive Perl
-Archive Network (CPAN). Visit <URL:http://www.perl.com/CPAN/> to find
-a CPAN site near you.
+Files: *
+Copyright: © 2002-2008 Eric Estabrooks <eric at urbanrage.com>
+License: Artistic
+ This is licensed under the Artistic license
 
-The only change for the Debian package was the addition of the debian/
-files.
+Files: debian/*
+Copyright: © 2000 Alan Dorman <mdorman at debian.org>
+License: GPL-1+ | Artistic
+ This library is free software; you can redistribute it and/or modify it
+ under the same terms as Perl itself.
 
-The IMAP::Admin copright is as follows:
+On Debian systems, the complete text of the GNU General Public License can be
+found in /usr/share/common-licenses/GPL and the Artistic License in
+/usr/share/common-licenses/Artistic.
 
-Eric Estabrooks, eric at urbanrage.com
-
-This is licensed under the Artistic license (same as perl).
-
-On Debian GNU/Linux systems, this can be found in
-
-/usr/share/common-licenses/Artistic

Added: trunk/libimap-admin-perl/debian/libimap-admin-perl.examples
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/libimap-admin-perl.examples?rev=25038&op=file
==============================================================================
--- trunk/libimap-admin-perl/debian/libimap-admin-perl.examples (added)
+++ trunk/libimap-admin-perl/debian/libimap-admin-perl.examples Sat Sep 13 09:11:52 2008
@@ -1,0 +1,1 @@
+examples/*

Added: trunk/libimap-admin-perl/debian/patches/no_interactive_tests.patch
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/patches/no_interactive_tests.patch?rev=25038&op=file
==============================================================================
--- trunk/libimap-admin-perl/debian/patches/no_interactive_tests.patch (added)
+++ trunk/libimap-admin-perl/debian/patches/no_interactive_tests.patch Sat Sep 13 09:11:52 2008
@@ -1,0 +1,16 @@
+--- libimap-admin-perl.orig/test.pl
++++ libimap-admin-perl/test.pl
+@@ -18,6 +18,13 @@
+ # (correspondingly "not ok 13") depending on the success of chunk 13
+ # of the test code):
+ 
++# Don't ask for a interactive nor internet depending test please
++if ($ENV{NOINTERNET}) {
++	print "We don't run other tests NOINTERNET var is defined\n";
++	print "skipped...\n";
++	exit 0
++}
++
+ $testuser = "user.testjoebob";
+ $renameuser = "user.renamedjoebob";
+ 

Added: trunk/libimap-admin-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/patches/series?rev=25038&op=file
==============================================================================
--- trunk/libimap-admin-perl/debian/patches/series (added)
+++ trunk/libimap-admin-perl/debian/patches/series Sat Sep 13 09:11:52 2008
@@ -1,0 +1,1 @@
+no_interactive_tests.patch

Modified: trunk/libimap-admin-perl/debian/rules
URL: http://svn.debian.org/wsvn/pkg-perl/trunk/libimap-admin-perl/debian/rules?rev=25038&op=diff
==============================================================================
--- trunk/libimap-admin-perl/debian/rules (original)
+++ trunk/libimap-admin-perl/debian/rules Sat Sep 13 09:11:52 2008
@@ -1,48 +1,24 @@
 #!/usr/bin/make -f
-# -*- Makefile -*-
-
-PACKAGE=$(shell dh_listpackages)
-
-tmp=$(shell pwd)/debian/$(PACKAGE)
-
-ifndef PERL
-PERL=/usr/bin/perl
-endif
-
-binary: binary-indep binary-arch
-
-binary-arch: build install
-
-binary-indep: build install
-	dh_testdir
-	dh_testroot
-	dh_perl
-	dh_installchangelogs Changes
-	dh_installdocs
-	dh_installdeb
-	dh_fixperms
-	dh_compress
-	dh_gencontrol
-	dh_md5sums
-	dh_builddeb
+include /usr/share/quilt/quilt.make
 
 build: build-stamp
-build-stamp:
-	dh_testdir
-	$(PERL) Makefile.PL INSTALLDIRS=perl INSTALLMAN1DIR=$(tmp)/usr/share/man/man1 INSTALLMAN3DIR=$(tmp)/usr/share/man/man3 INSTALLPRIVLIB=$(tmp)/usr/share/perl5 INSTALLARCHLIB=$(tmp)/usr/share/perl5/
-	$(MAKE)
-	touch build-stamp
+build-stamp: $(QUILT_STAMPFN)
+	NOINTERNET=1 dh build
+	touch $@
 
-clean:
-	dh_testdir
-	dh_testroot
-	[ ! -f Makefile ] || $(MAKE) distclean
-	dh_clean build-stamp install-stamp
+clean: unpatch
+	dh $@
 
 install: install-stamp
-install-stamp:
-	dh_testdir
-	$(MAKE) pure_install
-	[ ! -d debian/$(PACKAGE)/usr/lib/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose debian/$(PACKAGE)/usr/lib/perl5
+install-stamp: build-stamp
+	dh install
+	touch $@
 
-.PHONY: binary binary-arch binary-indep clean
+binary-arch:
+
+binary-indep: install
+	dh $@
+
+binary: binary-arch binary-indep
+
+.PHONY: binary binary-arch binary-indep install clean build




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