r12824 - in /trunk/libauthen-sasl-cyrus-perl: debian/changelog debian/control debian/patches/ debian/patches/encode-no-more-than-MAX_OUTBUF.patch debian/patches/series debian/rules lib/Authen/SASL/Cyrus/Security.pm

dmn at users.alioth.debian.org dmn at users.alioth.debian.org
Wed Jan 16 12:51:13 UTC 2008


Author: dmn
Date: Wed Jan 16 12:51:13 2008
New Revision: 12824

URL: http://svn.debian.org/wsvn/?sc=1&rev=12824
Log:
* debian/rules:
  + move test suitr to build-stamp target
  + stop setting INSTALLVENDOR* vars, remove usr/share/perl5 if it exists
  + remove unused dh_link
  + no need to chmod -R $(CURDIR) in clean
* Move the change to Security.pm (encoding data in chunks) to a separate
  patch. Bring quilt into play

Added:
    trunk/libauthen-sasl-cyrus-perl/debian/patches/
    trunk/libauthen-sasl-cyrus-perl/debian/patches/encode-no-more-than-MAX_OUTBUF.patch
    trunk/libauthen-sasl-cyrus-perl/debian/patches/series
Modified:
    trunk/libauthen-sasl-cyrus-perl/debian/changelog
    trunk/libauthen-sasl-cyrus-perl/debian/control
    trunk/libauthen-sasl-cyrus-perl/debian/rules
    trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm

Modified: trunk/libauthen-sasl-cyrus-perl/debian/changelog
URL: http://svn.debian.org/wsvn/trunk/libauthen-sasl-cyrus-perl/debian/changelog?rev=12824&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/debian/changelog (original)
+++ trunk/libauthen-sasl-cyrus-perl/debian/changelog Wed Jan 16 12:51:13 2008
@@ -1,3 +1,15 @@
+libauthen-sasl-cyrus-perl (0.13-server-3) UNRELEASED; urgency=low
+
+  * debian/rules:
+    + move test suitr to build-stamp target
+    + stop setting INSTALLVENDOR* vars, remove usr/share/perl5 if it exists
+    + remove unused dh_link
+    + no need to chmod -R $(CURDIR) in clean
+  * Move the change to Security.pm (encoding data in chunks) to a separate
+    patch. Bring quilt into play
+
+ -- Damyan Ivanov <dmn at debian.org>  Wed, 16 Jan 2008 14:36:14 +0200
+
 libauthen-sasl-cyrus-perl (0.13-server-2) unstable; urgency=low
 
   [ gregor herrmann ]

Modified: trunk/libauthen-sasl-cyrus-perl/debian/control
URL: http://svn.debian.org/wsvn/trunk/libauthen-sasl-cyrus-perl/debian/control?rev=12824&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/debian/control (original)
+++ trunk/libauthen-sasl-cyrus-perl/debian/control Wed Jan 16 12:51:13 2008
@@ -2,7 +2,7 @@
 Section: perl
 Priority: extra
 Build-Depends: debhelper (>> 5), perl (>> 5.8), libauthen-sasl-perl,
- libsasl2-dev, libsasl2-modules
+ libsasl2-dev, libsasl2-modules, quilt
 Maintainer: Debian Perl Group <pkg-perl-maintainers at lists.alioth.debian.org>
 Uploaders: Russ Allbery <rra at debian.org>
 Standards-Version: 3.7.3

Added: trunk/libauthen-sasl-cyrus-perl/debian/patches/encode-no-more-than-MAX_OUTBUF.patch
URL: http://svn.debian.org/wsvn/trunk/libauthen-sasl-cyrus-perl/debian/patches/encode-no-more-than-MAX_OUTBUF.patch?rev=12824&op=file
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/debian/patches/encode-no-more-than-MAX_OUTBUF.patch (added)
+++ trunk/libauthen-sasl-cyrus-perl/debian/patches/encode-no-more-than-MAX_OUTBUF.patch Wed Jan 16 12:51:13 2008
@@ -1,0 +1,32 @@
+--- libauthen-sasl-cyrus-perl-0.13-server.orig/lib/Authen/SASL/Cyrus/Security.pm
++++ libauthen-sasl-cyrus-perl-0.13-server/lib/Authen/SASL/Cyrus/Security.pm
+@@ -73,11 +73,27 @@
+ # all the data to be encrypted is immediately available
+ sub WRITE {
+   my($ref,$string,$len) = @_;
+-  my($fh, $clearbuf, $cryptbuf);
++  my($fh, $clearbuf, $cryptbuf, $maxbuf);
+ 
+   $fh = $ref->{fh};
+   $clearbuf = substr($string, 0, $len);
+-  $cryptbuf = $ref->{conn}->encode($clearbuf);
++  $maxbuf = $ref->{conn}->property("maxout");
++  if ($len < $maxbuf) {
++    $cryptbuf = $ref->{conn}->encode($clearbuf);
++    return(-1) if not defined ($cryptbuf);
++  } else {
++    my ($partial, $chunk, $chunksize);
++    my $offset = 0;
++    $cryptbuf = '';
++    while ($offset < $len) {
++      $chunksize = (($offset + $maxbuf) > $len) ? $len - $offset : $maxbuf;
++      $chunk = substr($clearbuf, $offset, $chunksize);
++      $partial = $ref->{conn}->encode($chunk);
++      return(-1) if not defined ($partial);
++      $cryptbuf .= $partial;
++      $offset += $chunksize;
++    }
++  }
+   print $fh $cryptbuf;
+ }
+ 

Added: trunk/libauthen-sasl-cyrus-perl/debian/patches/series
URL: http://svn.debian.org/wsvn/trunk/libauthen-sasl-cyrus-perl/debian/patches/series?rev=12824&op=file
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/debian/patches/series (added)
+++ trunk/libauthen-sasl-cyrus-perl/debian/patches/series Wed Jan 16 12:51:13 2008
@@ -1,0 +1,1 @@
+encode-no-more-than-MAX_OUTBUF.patch

Modified: trunk/libauthen-sasl-cyrus-perl/debian/rules
URL: http://svn.debian.org/wsvn/trunk/libauthen-sasl-cyrus-perl/debian/rules?rev=12824&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/debian/rules (original)
+++ trunk/libauthen-sasl-cyrus-perl/debian/rules Wed Jan 16 12:51:13 2008
@@ -6,6 +6,8 @@
 # If set to a true value then MakeMaker's prompt function will
 # always return the default without waiting for user input.
 export PERL_MM_USE_DEFAULT=1
+
+include /usr/share/quilt/quilt.make
 
 PACKAGE := libauthen-sasl-cyrus-perl
 DESTDIR := $(CURDIR)/debian/$(PACKAGE)
@@ -22,20 +24,19 @@
 build: build-arch build-indep
 build-arch: build-stamp
 build-indep:
-build-stamp:
+build-stamp: $(QUILT_STAMPFN)
 	dh_testdir
 	$(PERL) Makefile.PL LIBS="-lsasl2" DEFINE="-DSASL2" \
-	    INSTALLDIRS=vendor INSTALLVENDORLIB=/usr/lib/perl5/ \
-	    VENDORLIBEXP=/usr/lib/perl5/
+	    INSTALLDIRS=vendor
 	$(MAKE) OPTIMIZE="$(CFLAGS)" LD_RUN_PATH=""
+	USER=testuser $(MAKE) test
 	touch build-stamp
 
-clean:
+clean: unpatch
 	dh_testdir
 	dh_testroot
 	rm -f build-stamp install-stamp
 	[ ! -f Makefile ] || $(MAKE) realclean
-	chmod -R u+w $(CURDIR)
 	dh_clean
 
 install: install-stamp
@@ -43,9 +44,9 @@
 	dh_testdir
 	dh_testroot
 	dh_clean -k
-	USER=testuser $(MAKE) test
 	$(MAKE) install DESTDIR=$(DESTDIR)
-	chmod 644 $(DESTDIR)/usr/lib/perl5/Authen/SASL/Cyrus.pod
+	chmod 0644 $(DESTDIR)/usr/lib/perl5/Authen/SASL/Cyrus.pod
+	[ ! -d $(DESTDIR)/usr/share/perl5 ] || rmdir --ignore-fail-on-non-empty --parents --verbose $(DESTDIR)/usr/share/perl5
 	touch install-stamp
 
 binary: binary-arch binary-indep
@@ -56,7 +57,6 @@
 	dh_installdocs README
 	dh_installchangelogs CHANGES
 	dh_perl
-	dh_link
 	dh_strip
 	dh_compress
 	dh_fixperms

Modified: trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm
URL: http://svn.debian.org/wsvn/trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm?rev=12824&op=diff
==============================================================================
--- trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm (original)
+++ trunk/libauthen-sasl-cyrus-perl/lib/Authen/SASL/Cyrus/Security.pm Wed Jan 16 12:51:13 2008
@@ -73,27 +73,11 @@
 # all the data to be encrypted is immediately available
 sub WRITE {
   my($ref,$string,$len) = @_;
-  my($fh, $clearbuf, $cryptbuf, $maxbuf);
+  my($fh, $clearbuf, $cryptbuf);
 
   $fh = $ref->{fh};
   $clearbuf = substr($string, 0, $len);
-  $maxbuf = $ref->{conn}->property("maxout");
-  if ($len < $maxbuf) {
-    $cryptbuf = $ref->{conn}->encode($clearbuf);
-    return(-1) if not defined ($cryptbuf);
-  } else {
-    my ($partial, $chunk, $chunksize);
-    my $offset = 0;
-    $cryptbuf = '';
-    while ($offset < $len) {
-      $chunksize = (($offset + $maxbuf) > $len) ? $len - $offset : $maxbuf;
-      $chunk = substr($clearbuf, $offset, $chunksize);
-      $partial = $ref->{conn}->encode($chunk);
-      return(-1) if not defined ($partial);
-      $cryptbuf .= $partial;
-      $offset += $chunksize;
-    }
-  }
+  $cryptbuf = $ref->{conn}->encode($clearbuf);
   print $fh $cryptbuf;
 }
 




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