[pkg-kolab] r1256 - in libkolab-perl/trunk/debian: . patches

Mathieu Parent mparent-guest at alioth.debian.org
Thu Apr 9 00:15:12 UTC 2009


Author: mparent-guest
Date: 2009-04-09 00:15:12 +0000 (Thu, 09 Apr 2009)
New Revision: 1256

Added:
   libkolab-perl/trunk/debian/patches/10-invoke-rc.diff
   libkolab-perl/trunk/debian/patches/30-bootstrap.diff
   libkolab-perl/trunk/debian/patches/40-disable-amavis.diff
Removed:
   libkolab-perl/trunk/debian/patches/50-sync-ldap-backend.diff
Modified:
   libkolab-perl/trunk/debian/changelog
   libkolab-perl/trunk/debian/compat
   libkolab-perl/trunk/debian/control
   libkolab-perl/trunk/debian/copyright
   libkolab-perl/trunk/debian/patches/series
   libkolab-perl/trunk/debian/rules
   libkolab-perl/trunk/debian/svn-deblayout
   libkolab-perl/trunk/debian/uupdate-wrapper
   libkolab-perl/trunk/debian/watch
Log:
libkolab-perl: Merge branch 2.2.1. Merge changelog.


Modified: libkolab-perl/trunk/debian/changelog
===================================================================
--- libkolab-perl/trunk/debian/changelog	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/changelog	2009-04-09 00:15:12 UTC (rev 1256)
@@ -1,8 +1,37 @@
-libkolab-perl (1:2.2.0-4) UNRELEASED; urgency=low
+libkolab-perl (1:2.2.1-20090304-1) experimental; urgency=low
 
-  * added hidden debian/watch for beta and dev
+  * New beta release 2.2.1-beta1 (20081212)
+    + Integrated patch: 50-sync-ldap-backend
+    + Moved patch: 30-bootstrap from kolabd
+      - updated
+    + Moved patch: 40-disable-amavis from kolabd
+    + kolabconf package integrated:
+      - added versioned conflicts 
+      - removed 10-kolabconf-perl-path.diff
+      - imported 30-invoke-rc.diff (now 10-invoke-rc)
+      - removed 85-slapd-syncrepl-24.diff, integrated upstream
+      - removed 95-runonchange.diff, integrated upstream
+    + added conflict with previous kolabd as binaries are now here
+  * New rc release 2.2.1-rc1 (2.2.1-20090304). Integrated patches:
+    + create manpages for bin/* and sbin/*
+      - 70-manpages.diff: add POD manpages to bin/* and sbin/* (issue/3355)
+      - 71-install-sbin-manpages.diff: install sbin/* manpages (issue/3363)
+    + 90-slapd-conf-optional: slapd.replicas.template and slapd.access.template
+      can be absent (kolab/issue3321)
+  * debian/rules:
+    + remove empty manpages
+    + makefile parameters 
+  * debian/copyright: refers to versionned license version
+  * debian/uupdate-wrapper: updated to keep upsteam version
+  * debian/watch:
+    - include url for dev, beta and release
+    - use the release url
+  * updated Standards-Version to 3.8.1: no changes
+  * debian/compat: switching to compatibility-version 7:
+    - build-depends on debhelper 7
+    - replace 'dh_clean -k' by 'dh_prep'
 
- -- Mathieu Parent <math.parent at gmail.com>  Tue, 16 Dec 2008 00:00:59 +0100
+ -- Mathieu Parent <math.parent at gmail.com>  Fri, 27 Mar 2009 20:12:03 +0100
 
 libkolab-perl (1:2.2.0-3) unstable; urgency=low
 

Modified: libkolab-perl/trunk/debian/compat
===================================================================
--- libkolab-perl/trunk/debian/compat	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/compat	2009-04-09 00:15:12 UTC (rev 1256)
@@ -1 +1 @@
-4
+7

Modified: libkolab-perl/trunk/debian/control
===================================================================
--- libkolab-perl/trunk/debian/control	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/control	2009-04-09 00:15:12 UTC (rev 1256)
@@ -3,15 +3,18 @@
 Priority: extra
 Maintainer: Debian Kolab Maintainers <pkg-kolab-devel at lists.alioth.debian.org>
 Uploaders: Noèl Köthe <noel at debian.org>, Steffen Joeris <white at debian.org>, Mathieu Parent <math.parent at gmail.com>
-Build-Depends: debhelper (>= 4), quilt (>= 0.40)
+Build-Depends: debhelper (>= 7), quilt (>= 0.40)
 Build-Depends-Indep: libnet-ldap-perl
-Standards-Version: 3.8.0
+Standards-Version: 3.8.1
 Homepage: http://www.kolab.org/
 Vcs-Browser: http://svn.debian.org/wsvn/pkg-kolab/libkolab-perl/trunk/
 Vcs-Svn: svn://svn.debian.org/pkg-kolab/libkolab-perl/trunk/
 
 Package: libkolab-perl
 Architecture: all
+Provides: kolabconf
+Conflicts: kolabconf (<<2.2.1), kolabd (<<2.2.1-20081212-1)
+Replaces: kolabconf (<<2.2.1), kolabd (<<2.2.1-20081212-1)
 Depends: ${perl:Depends}, libconvert-asn1-perl, libmail-imapclient-perl, libmime-tools-perl, libnet-ldap-perl (>= 1:0.39-1), liburi-perl, kolab-libcyrus-imap-perl
 Description: Perl modules for Kolab
  Kolab is a secure, scalable, and reliable groupware server.  It consists

Modified: libkolab-perl/trunk/debian/copyright
===================================================================
--- libkolab-perl/trunk/debian/copyright	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/copyright	2009-04-09 00:15:12 UTC (rev 1256)
@@ -1,8 +1,11 @@
-This package was debianized by
-Noèl Köthe <noel at debian.org> on Fri, 16 Dec 2005 15:34:20 +0100.
+This package was debianized by:
 
-It was downloaded from <http://kolab.org/>
+    Noèl Köthe <noel at debian.org> on Fri, 16 Dec 2005 15:34:20 +0100
 
+It was downloaded from:
+
+    <http://kolab.org/>
+
 Copyright holder (taken from AUTHORS):
 
 Originally written by Stuart Bingë <s.binge at codefusion.co.za>
@@ -41,5 +44,6 @@
    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
    GNU General Public License for more details.
 
-On Debian systems, the complete text of the GNU General Public License can be
-found in '/usr/share/common-licenses/GPL'.
+On Debian systems, the complete text of the GNU General Public License
+version 2 can be found in `/usr/share/common-licenses/GPL-2'.
+

Copied: libkolab-perl/trunk/debian/patches/10-invoke-rc.diff (from rev 1255, libkolab-perl/branches/2.2.1/debian/patches/10-invoke-rc.diff)
===================================================================
--- libkolab-perl/trunk/debian/patches/10-invoke-rc.diff	                        (rev 0)
+++ libkolab-perl/trunk/debian/patches/10-invoke-rc.diff	2009-04-09 00:15:12 UTC (rev 1256)
@@ -0,0 +1,53 @@
+#! /bin/sh /usr/share/dpatch/dpatch-run
+## 30-invoke-rc.dpatch by  <math.parent at gmail.com>
+##
+## DP: Debian specific invocation of services
+
+ at DPATCH@
+diff -urNad kolabconf-2.2.0~/lib/Kolab/Conf.pm kolabconf-2.2.0/lib/Kolab/Conf.pm
+--- kolabconf-2.2.0~/lib/Kolab/Conf.pm	2008-10-14 19:50:45.000000000 +0200
++++ kolabconf-2.2.0/lib/Kolab/Conf.pm	2008-10-14 19:51:43.000000000 +0200
+@@ -724,38 +724,28 @@
+ {
+     if ($haschanged{'slapd'}) {
+         &Kolab::log('K', 'Restarting OpenLDAP...');
+-        system("$Kolab::config{'KOLABRC'} rc openldap restart &");
++        system("invoke-rc.d slapd restart &");
+     }
+ 
+     if ($haschanged{'saslauthd'}) {
+         &Kolab::log('K', 'Restarting SASLAuthd...');
+-        system("$Kolab::config{'KOLABRC'} rc sasl stop; sleep 1; $Kolab::config{sbindir}/saslauthd -a ldap -n 5");
++        system("invoke-rc.d saslauthd restart");
+     }
+ 
+     if ($haschanged{'apache'}) {
+         &Kolab::log('K', 'Reloading Apache...');
+-        system("$Kolab::config{sbindir}/apachectl graceful");
++        system("invoke-rc.d apache2 graceful");
+     }
+ 
+     if ($haschanged{'postfix'}) {
+         &Kolab::log('K', 'Reloading Postfix...');
+-        system("$Kolab::config{sbindir}/postfix reload");
++        system("invoke-rc.d postfix reload");
+     }
+ 
+     if ($haschanged{'imapd'}) {
+         &Kolab::log('K', 'Restarting imapd...');
+ 	# Would it be enough with a reload here? /steffen
+-        system("$Kolab::config{'KOLABRC'} rc imapd restart");
+-    }
+-
+-    if ($haschanged{'amavisd'}) {
+-        &Kolab::log('K', 'Restarting amavisd...');
+-        system("$Kolab::config{'KOLABRC'} rc amavisd restart");
+-    }
+-
+-    if ($haschanged{'clamav'}) {
+-        &Kolab::log('K', 'Restarting clamav...');
+-        system("$Kolab::config{'KOLABRC'} rc clamav restart");
++        system("invoke-rc.d kolab-cyrus restart");
+     }
+ 
+     %Kolab::Conf::haschanged = ();

Copied: libkolab-perl/trunk/debian/patches/30-bootstrap.diff (from rev 1255, libkolab-perl/branches/2.2.1/debian/patches/30-bootstrap.diff)
===================================================================
--- libkolab-perl/trunk/debian/patches/30-bootstrap.diff	                        (rev 0)
+++ libkolab-perl/trunk/debian/patches/30-bootstrap.diff	2009-04-09 00:15:12 UTC (rev 1256)
@@ -0,0 +1,87 @@
+Goal: kolab_bootstrap debian specificic stuff
+
+Author: Noèl Köthe <noel at debian.org>
+
+Upstream status: Parts can be included
+
+Index: b/sbin/kolab_bootstrap.in
+===================================================================
+--- a/sbin/kolab_bootstrap.in
++++ b/sbin/kolab_bootstrap.in
+@@ -74,7 +74,7 @@
+     print ("Error: Found $name running on Port $port\n");
+     print ("Check your installation!\n");
+     print ("You must stop the service $name before running Kolab\n");
+-    print ("You may try to execute \"$Kolab::config{'KOLABRC'} rc all stop\" initially\n");
++    print ("You may try to execute \"/etc/init.d/\$DAEMON stop\" initially\n");
+     exit 1;
+   }
+ }
+@@ -186,7 +186,7 @@
+ 
+ print ("Excellent all required Ports are available!\n");
+ 
+-system("$Kolab::config{'sbindir'}/slapcat >/dev/null 2>&1");
++system("su  --shell /bin/sh --command $Kolab::config{'sbindir'}/slapcat >/dev/null 2>&1");
+ if ($?==0) {
+   print ("\nFound existing configuration\n");
+   print "\nBootstrapping Kolab will overwrite old configuration\n";
+@@ -285,6 +285,18 @@
+   print "Proceeding with master server setup\n\n";
+ }
+ 
++# enable saslauthd by default
++copy("/etc/default/saslauthd", "/etc/default/saslauthd.orig") || die "could not read /etc/default/saslauthd.orig";
++my $saslauthd_orig = IO::File->new("/etc/default/saslauthd.orig", "r") || die "could not read /etc/default/saslauthd.orig";
++my $saslauthd = IO::File->new("/etc/default/saslauthd", "w") || die "could not read /etc/default/saslauthd";
++foreach (<$saslauthd_orig>) {
++  s/^(# )?START=.*$/START=yes/g;
++  s/^MECHANISMS="pam"/MECHANISMS="ldap"/g;
++      print $saslauthd $_;
++}
++undef $saslauthd;
++undef $saslauthd_orig;
++
+ if ( $is_master eq "true" ) {
+   ##### Master server setup
+   getopt('f');
+@@ -373,6 +385,9 @@
+     }
+   };
+ 
++  if (! -e "/etc/postfix/sasl/") {
++    mkdir( "/etc/postfix/sasl/", 0750) || die "cannot mkdir : $!";
++  }
+   my $confname = "$Kolab::config{'sasl_smtpconffile'}";
+   copy("@CONFIG_DIR@/templates/smtpd.conf.template", $confname) || die "could not write to $confname";
+ 
+@@ -406,12 +421,15 @@
+       Kolab::Conf::bootstrapConfig();
+       $Kolab::config{"bootstrap_config"} = 'false';
+ 
++      #ldap server should access to certificate key
++      system("adduser --quiet $Kolab::config{'ldapserver_rusr'} $Kolab::config{'pki_grp'}");
++
+       # now we must startup slapd
+       print "temporarily starting slapd\n";
+       $ldap_uri = "ldap://127.0.0.1:389/";
+       # ensure that the database has correct permissions
+       system("chown $Kolab::config{'ldapserver_rusr'}:$Kolab::config{'ldapserver_grp'} $Kolab::config{'ldapserver_dir'}/*");
+-      (system("$Kolab::config{'libexecdir'}/openldap/slapd -h ldap://127.0.0.1:389/ -f $Kolab::config{'ldapserver_confdir'}/slapd.conf -u $Kolab::config{'ldapserver_rusr'} -g $Kolab::config{'ldapserver_grp'}") == 0 ) || die( "Could not start temporary slapd: $!" );
++      (system("/usr/sbin/slapd -h ldap://127.0.0.1:389/ -f $Kolab::config{'ldapserver_confdir'}/slapd.conf -u $Kolab::config{'ldapserver_rusr'} -g $Kolab::config{'ldapserver_grp'}") == 0 ) || die( "Could not start temporary slapd: $!" );
+       print ("Waiting for OpenLDAP to start\n");
+       sleep 10;
+ 
+@@ -836,8 +854,11 @@
+   chmod 0600, $kolab_config;
+ }
+ 
++#run postfix newaliases
++kolab_system("/usr/bin/newaliases");
++
+ #system("@CONFIG_DIR@/kolab_sslcert.sh $fqdn");
+ print "kolab is now ready to run!\n";
+-print "please run '$Kolab::config{'KOLABRC'} rc all start'\n";
++print "please restart all the daemons'\n";
+ print ("Use login=manager and passwd=$bind_pw when you log into\n");
+ print ("the webinterface https://$fqdn$Kolab::config{'kolab_wui'} !\n");

Copied: libkolab-perl/trunk/debian/patches/40-disable-amavis.diff (from rev 1255, libkolab-perl/branches/2.2.1/debian/patches/40-disable-amavis.diff)
===================================================================
--- libkolab-perl/trunk/debian/patches/40-disable-amavis.diff	                        (rev 0)
+++ libkolab-perl/trunk/debian/patches/40-disable-amavis.diff	2009-04-09 00:15:12 UTC (rev 1256)
@@ -0,0 +1,19 @@
+Goal: amavis is only suggested, so disable by default
+
+Author: Mathieu Parent <math.parent at gmail.com>
+
+Upstream status: Specific to Debian
+
+Index: b/sbin/kolab_bootstrap.in
+===================================================================
+--- a/sbin/kolab_bootstrap.in
++++ b/sbin/kolab_bootstrap.in
+@@ -517,7 +517,7 @@
+         'postfix-mynetworks' => $mynetworkinterfaces,
+         #'postfix-relayhost' => "",
+         #'postfix-transport' => "",
+-        'postfix-enable-virus-scan' => "TRUE",
++        'postfix-enable-virus-scan' => "FALSE",
+         'cyrus-autocreatequota' => 100000,
+         'cyrus-quotawarn' => 80,
+         'cyrus-admins' => "manager",

Deleted: libkolab-perl/trunk/debian/patches/50-sync-ldap-backend.diff
===================================================================
--- libkolab-perl/trunk/debian/patches/50-sync-ldap-backend.diff	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/patches/50-sync-ldap-backend.diff	2009-04-09 00:15:12 UTC (rev 1256)
@@ -1,342 +0,0 @@
-#! /bin/sh /usr/share/dpatch/dpatch-run
-## 50-sync-ldap-backend.dpatch by Mathieu Parent <math.parent at gmail.com>
-##
-## DP: LDAP backend using content synchronization (RFC4533)
-## DP: which is not activated by default
-
- at DPATCH@
-Index: b/lib/Kolab/LDAP/Backend/syncrepl.pm
-===================================================================
---- /dev/null
-+++ b/lib/Kolab/LDAP/Backend/syncrepl.pm
-@@ -0,0 +1,330 @@
-+package Kolab::LDAP::Backend::syncrepl;
-+
-+##
-+##  Copyright (c) 2008  Mathieu Parent <math.parent at gmail.com>
-+##
-+##  This  program is free  software; you can redistribute  it and/or
-+##  modify it  under the terms of the GNU  General Public License as
-+##  published by the  Free Software Foundation; either version 2, or
-+##  (at your option) any later version.
-+##
-+##  This program is  distributed in the hope that it will be useful,
-+##  but WITHOUT  ANY WARRANTY; without even the  implied warranty of
-+##  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+##  General Public License for more details.
-+##
-+##  You can view the  GNU General Public License, online, at the GNU
-+##  Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
-+##
-+use 5.008;
-+use strict;
-+use warnings;
-+use Kolab;
-+use Kolab::LDAP;
-+use Net::LDAP qw(
-+	LDAP_USER_CANCELED
-+	LDAP_SYNC_REFRESH_ONLY
-+	LDAP_SYNC_REFRESH_AND_PERSIST
-+);
-+use Net::LDAP::Control;
-+use Net::LDAP::Control::SyncRequest;
-+use Net::LDAP::Entry;
-+use vars qw($ldap $disconnected);
-+my $disconnected = 1;
-+
-+require Exporter;
-+
-+our @ISA = qw(Exporter);
-+
-+our %EXPORT_TAGS = (
-+    'all' => [ qw(
-+    &startup
-+    &run
-+    ) ]
-+);
-+
-+our @EXPORT_OK = ( @{ $EXPORT_TAGS{'all'} } );
-+
-+our @EXPORT = qw(
-+    
-+);
-+
-+our $VERSION = '0.3';
-+
-+sub mode { 
-+  LDAP_SYNC_REFRESH_ONLY;
-+  #LDAP_SYNC_REFRESH_AND_PERSIST;
-+}
-+
-+# calling without args means: get,
-+# giving an argument means: set
-+sub cookie {
-+  my($cookie) = @_;
-+  my $syncrepl_cookie_file = $Kolab::config{'syncrepl_cookie_file'} || '/tmp/kolab_syncrepl_cookie_file';
-+  if(defined($cookie)) {
-+    if(!open(COOKIE_FILE, '>', $syncrepl_cookie_file)) {
-+        Kolab::log("SYNCREPL', 'Cannot open file `".$syncrepl_cookie_file.
-+        "' for writing: $!", KOLAB_DEBUG);
-+        &abort;
-+    }
-+    Kolab::log("SYNCREPL', 'Writing cookie to file: ".$cookie, KOLAB_DEBUG);
-+    print COOKIE_FILE $cookie;
-+    close(COOKIE_FILE);
-+    return $cookie;
-+  } else {
-+    #create if it doesn't exists
-+    if(! -f $syncrepl_cookie_file) {
-+        open COOKIE_FILE, '>', $syncrepl_cookie_file;
-+        close COOKIE_FILE;
-+    }
-+    if(!open(COOKIE_FILE, '+<', $syncrepl_cookie_file)) {
-+        Kolab::log("SYNCREPL', 'Cannot open file `".$syncrepl_cookie_file.
-+        "' for reading: $!", KOLAB_DEBUG);
-+        &abort;
-+    }
-+    read COOKIE_FILE, $cookie, 1024, 0;
-+    close COOKIE_FILE;
-+    #an empty file means no cookie:
-+    $cookie = undef if !$cookie;
-+    return $cookie;
-+  }
-+}
-+
-+sub startup { 1; }
-+
-+sub shutdown
-+{
-+  Kolab::log('SYNCREPL', 'Shutting down');
-+  exit(0);
-+}
-+
-+sub abort
-+{
-+    Kolab::log('SYNCREPL', 'Aborting');
-+    exit(1);
-+}
-+
-+sub run {
-+  # This should be called from a separate thread, as we set our
-+  # own interrupt handlers here
-+
-+  $SIG{'INT'} = \&shutdown;
-+  $SIG{'TERM'} = \&shutdown;
-+
-+  END {
-+    alarm 0;
-+    Kolab::LDAP::destroy($ldap);
-+  }
-+  my $mesg;
-+
-+  while (1) {
-+    Kolab::log('SYNCREPL', 'Creating LDAP connection to LDAP server', KOLAB_DEBUG);
-+
-+    $ldap = Kolab::LDAP::create($Kolab::config{'user_ldap_ip'},
-+                                $Kolab::config{'user_ldap_port'},
-+                                $Kolab::config{'user_bind_dn'},
-+                                $Kolab::config{'user_bind_pw'},
-+                                1
-+                               );
-+    if (!$ldap) {
-+        Kolab::log('SYNCREPL', 'Sleeping 5 seconds...');
-+        sleep 5;
-+        next;
-+    }
-+    $disconnected = 0;  
-+
-+    Kolab::log('SYNCREPL', 'LDAP connection established', KOLAB_DEBUG);
-+
-+    Kolab::LDAP::ensureAsync($ldap);
-+    Kolab::log('SYNCREPL', 'Async checked', KOLAB_DEBUG);
-+
-+    while($ldap and not $disconnected) {
-+      my $ctrl = Net::LDAP::Control::SyncRequest->new(
-+        mode       => Kolab::LDAP::Backend::syncrepl::mode(),
-+        cookie     => Kolab::LDAP::Backend::syncrepl::cookie(),
-+        reloadHint => 0);
-+      Kolab::log('SYNCREPL', 'Control created: mode='.$ctrl->mode().
-+      	'; cookie='.$ctrl->cookie().
-+      	'; reloadHint='.$ctrl->reloadHint(), KOLAB_DEBUG);
-+
-+      #search
-+      my $mesg = $ldap->search(base     => $Kolab::config{'base_dn'},
-+                               scope    => 'sub',
-+                               control  => [ $ctrl ],
-+                               callback => \&searchCallback, # call for each entry
-+                               filter   => "(objectClass=*)",
-+                               attrs    => [ '*',
-+                                             $Kolab::config{'user_field_guid'},
-+                                             $Kolab::config{'user_field_modified'},
-+                                             $Kolab::config{'user_field_quota'},
-+                                             $Kolab::config{'user_field_deleted'},
-+                                           ],
-+                              );
-+      Kolab::log('SYNCREPL', 'Search created', KOLAB_DEBUG);
-+      $mesg->sync;
-+      Kolab::log('SYNCREPL', "Finished Net::LDAP::Search::sync sleeping 10s", KOLAB_DEBUG);
-+      sleep 10;
-+    }
-+  }
-+  1;
-+}
-+
-+#search callback
-+sub searchCallback {
-+  my $mesg = shift;
-+  my $param2 = shift; # might be entry or intermediate
-+  my @controls = $mesg->control;
-+  my @sync_controls = ();
-+  if($param2 && $param2->isa("Net::LDAP::Entry")) {
-+    Kolab::log('SYNCREPL', 'Received Search Entry', KOLAB_DEBUG);
-+    #retrieve Sync State Control
-+    foreach my $ctrl (@controls) {
-+      push(@sync_controls, $ctrl)
-+        if $ctrl->isa('Net::LDAP::Control::SyncState');
-+    }
-+    if(@sync_controls>1) {
-+      Kolab::log('SYNCREPL', 'Got search entry with multiple Sync State controls',
-+        KOLAB_DEBUG);
-+      return;
-+    }
-+    if(!@sync_controls) {
-+      Kolab::log('SYNCREPL', 'Got search entry without Sync State control',
-+        KOLAB_DEBUG);
-+      return;
-+    }
-+    if(!$sync_controls[0]->entryUUID) {
-+      Kolab::log('SYNCREPL', 'Got empty entryUUID', KOLAB_DEBUG);
-+      return;
-+    }
-+    Kolab::log('SYNCREPL', 'Search Entry has Sync State Control: '.
-+      'state='.$sync_controls[0]->state().
-+      '; entryUUID='.unpack("H*",$sync_controls[0]->entryUUID()).
-+      '; cookie='.(defined($sync_controls[0]->cookie()) ? $sync_controls[0]->cookie() : 'UNDEF')
-+	, KOLAB_DEBUG);
-+    if(defined($sync_controls[0]->cookie)) {
-+      Kolab::LDAP::Backend::syncrepl::cookie($sync_controls[0]->cookie);
-+      Kolab::log('SYNCREPL',"New cookie: ".Kolab::LDAP::Backend::syncrepl::cookie(),
-+        KOLAB_DEBUG);
-+    }
-+    Kolab::log('SYNCREPL', "Entry (".$param2->changetype."): ".$param2->dn(), KOLAB_DEBUG);
-+  } elsif($param2 && $param2->isa("Net::LDAP::Reference")) {
-+    Kolab::log('SYNCREPL', 'Received Search Reference', KOLAB_DEBUG);
-+    return;
-+  #if it not first control?
-+  } elsif($controls[0] and $controls[0]->isa('Net::LDAP::Control::SyncDone')) {
-+    Kolab::log('SYNCREPL', 'Received Sync Done Control: '.
-+      'cookie='.(defined($controls[0]->cookie()) ? $controls[0]->cookie() : 'UNDEF').
-+      '; refreshDeletes='.$controls[0]->refreshDeletes(), KOLAB_DEBUG);
-+    #we have a new cookie
-+    if(defined($controls[0]->cookie())
-+        and not $controls[0]->cookie() eq '' 
-+        and not $controls[0]->cookie() eq Kolab::LDAP::Backend::syncrepl::cookie()) {
-+      Kolab::LDAP::Backend::syncrepl::cookie($controls[0]->cookie());
-+      Kolab::log('SYNCREPL', "New cookie: ".
-+        Kolab::LDAP::Backend::syncrepl::cookie(), KOLAB_DEBUG);
-+      Kolab::log('SYNCREPL', "Calling Kolab::LDAP::sync", KOLAB_DEBUG);
-+      Kolab::LDAP::sync;
-+      system($Kolab::config{'kolabconf_script'}) == 0
-+        || Kolab::log('SD', "Failed to run kolabconf: $?", KOLAB_ERROR);
-+      Kolab::log('SYNCREPL', "Finished Kolab::LDAP::sync sleeping 1s", KOLAB_DEBUG);
-+      sleep 1; # we get too many bogus change notifications!
-+	  } 
-+  } elsif($param2 && $param2->isa("Net::LDAP::Intermediate")) {
-+    Kolab::log('SYNCREPL', 'Received Intermediate Message', KOLAB_DEBUG);
-+    my $attrs = $param2->{asn};
-+    if($attrs->{newcookie}) {
-+      Kolab::LDAP::Backend::syncrepl::cookie($attrs->{newcookie});
-+      Kolab::log('SYNCREPL', "New cookie: ".
-+        Kolab::LDAP::Backend::syncrepl::cookie(), KOLAB_DEBUG);
-+    } elsif(my $refreshInfos = ($attrs->{refreshDelete} || $attrs->{refreshPresent})) {
-+      Kolab::LDAP::Backend::syncrepl::cookie($refreshInfos->{cookie})
-+        if defined($refreshInfos->{cookie});
-+      Kolab::log('SYNCREPL', 
-+        (defined($refreshInfos->{cookie}) ? 'New ' : 'Empty ').
-+        "cookie from ".
-+        ($attrs->{refreshDelete} ? 'refreshDelete' : 'refreshPresent').
-+        " (refreshDone=".$refreshInfos->{refreshDone}."): ".
-+        Kolab::LDAP::Backend::syncrepl::cookie(), KOLAB_DEBUG);
-+    } elsif(my $syncIdSetInfos = $attrs->{syncIdSet}) {
-+      Kolab::LDAP::Backend::syncrepl::cookie($syncIdSetInfos->{cookie})
-+        if defined($syncIdSetInfos->{cookie});
-+      Kolab::log('SYNCREPL', 
-+        (defined($syncIdSetInfos->{cookie}) ? 'Empty ' : 'New ').
-+        "cookie from syncIdSet".
-+        " (refreshDeletes=".$syncIdSetInfos->{refreshDeletes}."): ".
-+        Kolab::LDAP::Backend::syncrepl::cookie(), KOLAB_DEBUG);
-+      foreach my $syncUUID ($syncIdSetInfos->{syncUUIDs}) {
-+        Kolab::log('SYNCREPL', 'entryUUID='.
-+          unpack("H*",$syncUUID), KOLAB_DEBUG);
-+      }
-+    }
-+  } elsif($mesg->code) {
-+    if ($mesg->code == 1) {
-+      Kolab::log('SYNCREPL', 'Communication Error: disconnecting', KOLAB_DEBUG);
-+      $disconnected = 1;
-+      return 0;
-+    } elsif ($mesg->code == LDAP_USER_CANCELED) {
-+        Kolab::log('SYNCREPL', 'searchCallback() -> Exit code received, returning', KOLAB_DEBUG);
-+        return;
-+    } elsif ($mesg->code == 4096) {
-+        Kolab::log('SYNCREPL', 'Refresh required', KOLAB_DEBUG);
-+        Kolab::LDAP::Backend::syncrepl::cookie('');
-+    } else {
-+        Kolab::log('SYNCREPL', "searchCallback: mesg->code = `" . $mesg->code . "', mesg->msg = `" . $mesg->error . "'", KOLAB_DEBUG);
-+        &abort;
-+    }   
-+  } else {
-+    Kolab::log('SYNCREPL', 'Received something else', KOLAB_DEBUG);
-+  }
-+  return 0;
-+}
-+
-+1;
-+__END__
-+
-+=head1 NAME
-+
-+Kolab::LDAP::Backend::syncrepl - Perl extension for RFC 4533 compliant LDAP server backend
-+
-+=head1 ABSTRACT
-+
-+  Kolab::LDAP::Backend::syncrepl handles OpenLDAP backend to the kolab daemon.
-+
-+=head1 AUTHOR
-+
-+Mathieu Parent <math.parent at gmail.com>
-+
-+=head1 COPYRIGHT AND LICENSE
-+
-+Copyright (c) 2008  Mathieu Parent <math.parent at gmail.com>
-+
-+
-+This  program is free  software; you can redistribute  it and/or
-+modify it  under the terms of the GNU  General Public License as
-+published by the  Free Software Foundation; either version 2, or
-+(at your option) any later version.
-+
-+This program is  distributed in the hope that it will be useful,
-+but WITHOUT  ANY WARRANTY; without even the  implied warranty of
-+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
-+General Public License for more details.
-+
-+You can view the  GNU General Public License, online, at the GNU
-+Project's homepage; see <http://www.gnu.org/licenses/gpl.html>.
-+
-+=head1 NOTES
-+We use refreshOnly mode as refreshAndPersist mode uses LDAP Intermediate
-+Response Messages [RFC4511] that are not supported by current Net::LDAP.
-+
-+However (quoting from RFC, page 21):
-+
-+   The server SHOULD transfer a new cookie frequently to avoid having to
-+   transfer information already provided to the client.  Even where DIT
-+   changes do not cause content synchronization changes to be
-+   transferred, it may be advantageous to provide a new cookie using a
-+   Sync Info Message.  However, the server SHOULD avoid overloading the
-+   client or network with Sync Info Messages.
-+
-+
-+
-+=cut

Modified: libkolab-perl/trunk/debian/patches/series
===================================================================
--- libkolab-perl/trunk/debian/patches/series	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/patches/series	2009-04-09 00:15:12 UTC (rev 1256)
@@ -1,2 +1,3 @@
-50-sync-ldap-backend.diff
-
+10-invoke-rc.diff
+30-bootstrap.diff
+40-disable-amavis.diff

Modified: libkolab-perl/trunk/debian/rules
===================================================================
--- libkolab-perl/trunk/debian/rules	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/rules	2009-04-09 00:15:12 UTC (rev 1256)
@@ -4,7 +4,7 @@
 
 build: patch
 	dh_testdir
-	perl Makefile.PL
+	perl Makefile.PL --config=/etc/kolab --bin=/usr/bin --sbin=/usr/sbin --etc=/etc/kolab
 	$(MAKE)
 	touch build-stamp
 
@@ -19,9 +19,15 @@
 install: build
 	dh_testdir
 	dh_testroot
-	dh_clean -k 
+	dh_prep
 	dh_installdirs
 	$(MAKE) install DESTDIR=$(CURDIR)/debian/libkolab-perl
+	# Man pages
+	mkdir -p $(CURDIR)/debian/libkolab-perl/usr/share/man/man1
+	#make install creates empty manpages, delete them
+	find $(CURDIR)/debian/libkolab-perl/usr/share/man/man1/ -size 0 -exec rm '{}' \;
+	#remove empty directories
+	find $(CURDIR)/debian/libkolab-perl -type d -empty -delete
 
 binary-indep: build install
 	dh_testdir

Modified: libkolab-perl/trunk/debian/svn-deblayout
===================================================================
--- libkolab-perl/trunk/debian/svn-deblayout	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/svn-deblayout	2009-04-09 00:15:12 UTC (rev 1256)
@@ -1 +1,2 @@
-origDir=../upstream
+origDir=../../upstream
+buildArea=../../build-area

Modified: libkolab-perl/trunk/debian/uupdate-wrapper
===================================================================
--- libkolab-perl/trunk/debian/uupdate-wrapper	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/uupdate-wrapper	2009-04-09 00:15:12 UTC (rev 1256)
@@ -3,4 +3,5 @@
 version=$2
 file=$3
 
-rpm2cpio $file | cpio -i --quiet 'perl-kolab-*.tar.gz'
+rpm2cpio "$file" | cpio --extract --quiet --to-stdout 'perl-kolab-*.tar.gz' > "libkolab-perl_$version.orig.tar.gz"
+rm "$file"

Modified: libkolab-perl/trunk/debian/watch
===================================================================
--- libkolab-perl/trunk/debian/watch	2009-04-08 23:48:52 UTC (rev 1255)
+++ libkolab-perl/trunk/debian/watch	2009-04-09 00:15:12 UTC (rev 1256)
@@ -1,8 +1,8 @@
 version=3
 opts="dversionmangle=s/~rc/.rc/,uversionmangle=s/-20\d{6}$//" \
 # original URL for stable releases:
-ftp://ftp.belnet.be/packages/kolab/server/release/kolab-server-(?:[\d.]+)/sources/perl-kolab-([\d.-]+).src.rpm debian debian/uupdate-wrapper
+#ftp://ftp.belnet.be/packages/kolab/server/release/kolab-server-(?:[\d.]+)/sources/perl-kolab-([\d.-]+).src.rpm debian debian/uupdate-wrapper
 # URL for development releases:
 #ftp://ftp.belnet.be/packages/kolab/server/development-2.2/current/sources/perl-kolab-([\d\w.-]+).src.rpm  debian  debian/uupdate-wrapper
 # URL for beta releases:
-#ftp://ftp.belnet.be/packages/kolab/server/beta/kolab-server-([\d\w.-]*)/sources/perl-kolab-([\d\w.-]*).src.rpm  debian  debian/uupdate-wrapper
+ftp://ftp.belnet.be/packages/kolab/server/beta/kolab-server-([\d\w.-]*)/sources/perl-kolab-([\d\w.-]*).src.rpm  debian  debian/uupdate-wrapper




More information about the pkg-kolab-devel mailing list