[pkg-kolab] r269 - in trunk/kolab-resource-handlers/debian: . patches

Noel Koethe noel at costa.debian.org
Wed Feb 1 15:16:48 UTC 2006


Author: noel
Date: 2006-02-01 15:16:47 +0000 (Wed, 01 Feb 2006)
New Revision: 269

Added:
   trunk/kolab-resource-handlers/debian/patches/100-pfb.php-path.dpatch
   trunk/kolab-resource-handlers/debian/patches/80-freebusycache.class.php-path.dpatch
   trunk/kolab-resource-handlers/debian/patches/90-freebusy.php-path.dpatch
Modified:
   trunk/kolab-resource-handlers/debian/patches/00list
   trunk/kolab-resource-handlers/debian/postinst
   trunk/kolab-resource-handlers/debian/rules
Log:
add freebusy files and patch them

Modified: trunk/kolab-resource-handlers/debian/patches/00list
===================================================================
--- trunk/kolab-resource-handlers/debian/patches/00list	2006-02-01 14:16:34 UTC (rev 268)
+++ trunk/kolab-resource-handlers/debian/patches/00list	2006-02-01 15:16:47 UTC (rev 269)
@@ -1,7 +1,10 @@
-10-resmgr.conf
-20-kolabmailtransport.php
-30-kolabmailboxfilter.php
-40-resmgr.php
-50-kolabfilter.php
-60-olhacks.php
-70-IMAP.php
+100-pfb.php-path.dpatch
+10-resmgr.conf.dpatch
+20-kolabmailtransport.php.dpatch
+30-kolabmailboxfilter.php.dpatch
+40-resmgr.php.dpatch
+50-kolabfilter.php.dpatch
+60-olhacks.php.dpatch
+70-IMAP.php.dpatch
+80-freebusycache.class.php-path.dpatch
+90-freebusy.php-path.dpatch

Added: trunk/kolab-resource-handlers/debian/patches/100-pfb.php-path.dpatch
===================================================================
--- trunk/kolab-resource-handlers/debian/patches/100-pfb.php-path.dpatch	2006-02-01 14:16:34 UTC (rev 268)
+++ trunk/kolab-resource-handlers/debian/patches/100-pfb.php-path.dpatch	2006-02-01 15:16:47 UTC (rev 269)
@@ -0,0 +1,48 @@
+#!/bin/sh -e
+## 100-pfb.php-path.dpatch by Noèl Köthe <noel at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: path changes
+
+if [ $# -lt 1 ]; then
+echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+      -patch) patch $patch_opts -p1 < $0;;
+      -unpatch) patch $patch_opts -p1 -R < $0;;
+      *)
+      echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+      exit 1;;
+esac
+
+exit 0
+
+ at DPATCH@
+--- kolab-resource-handlers-0.3.9/kolab-resource-handlers/freebusy/pfb.php.orig	2006-02-01 15:45:57.000000000 +0100
++++ kolab-resource-handlers-0.3.9/kolab-resource-handlers/freebusy/pfb.php	2006-02-01 15:54:00.000000000 +0100
+@@ -34,7 +34,7 @@
+ require_once('freebusy/freebusycache.class.php');
+ require_once('freebusy/misc.php');
+ 
+-require_once('@l_prefix@/etc/resmgr/freebusy.conf');
++require_once('/etc/kolab/freebusy.conf');
+ 
+ logInit('pfb');
+ 
+@@ -101,9 +101,9 @@
+   exit;
+ }
+ 
+-$cache =& new FreeBusyCache( $params['kolab_prefix'].'/var/kolab/www/freebusy/cache',
++$cache =& new FreeBusyCache( $params['kolab_prefix'].'/var/lib/kolab/freebusy-cache',
+ 			     false );
+-$xcache =& new FreeBusyCache( $params['kolab_prefix'].'/var/kolab/www/freebusy/cache',
++$xcache =& new FreeBusyCache( $params['kolab_prefix'].'/var/lib/kolab/freebusy-cache',
+ 			     true );
+ 
+ if( $req_cache ) {


Property changes on: trunk/kolab-resource-handlers/debian/patches/100-pfb.php-path.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/kolab-resource-handlers/debian/patches/80-freebusycache.class.php-path.dpatch
===================================================================
--- trunk/kolab-resource-handlers/debian/patches/80-freebusycache.class.php-path.dpatch	2006-02-01 14:16:34 UTC (rev 268)
+++ trunk/kolab-resource-handlers/debian/patches/80-freebusycache.class.php-path.dpatch	2006-02-01 15:16:47 UTC (rev 269)
@@ -0,0 +1,73 @@
+#!/bin/sh -e
+## 80-freebusycache.class.php-path.dpatch by Noèl Köthe <noel at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: path changes
+
+if [ $# -lt 1 ]; then
+echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+      -patch) patch $patch_opts -p1 < $0;;
+      -unpatch) patch $patch_opts -p1 -R < $0;;
+      *)
+      echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+      exit 1;;
+esac
+
+exit 0
+
+ at DPATCH@
+--- kolab-resource-handlers-0.3.9/kolab-resource-handlers/freebusy/freebusycache.class.php.orig	2006-02-01 15:18:38.000000000 +0100
++++ kolab-resource-handlers-0.3.9/kolab-resource-handlers/freebusy/freebusycache.class.php	2006-02-01 15:26:12.000000000 +0100
+@@ -40,7 +40,7 @@
+       // false data means delete the pfb
+       unlink($fbfilename);
+       $oldacl = $this->loadACL( $filename );
+-      $db = dba_open( $this->basedir.'/pfbcache.db', 'cd', 'gdbm' );
++      $db = dba_open( '/var/lib/kolab/pfbcache.db', 'cd', 'db4' );
+       if( $db === false ) return false;
+       foreach( $oldacl as $ac ) {
+ 	  if( dba_exists( $ac['USER'], $db ) ) {
+@@ -87,9 +87,9 @@
+       default: $perm = 'a';
+       }
+ 
+-      $db = dba_open( $this->basedir.'/pfbcache.db', 'cd', 'gdbm' );
++      $db = dba_open( '/var/lib/kolab/pfbcache.db', 'cd', 'db4' );
+       if( $db === false ) {
+-	myLog('Unable to open freebusy cache db '.$this->basedir.'/pfbcache.db',
++	myLog('Unable to open freebusy cache db /var/lib/kolab/pfbcache.db',
+ 	      RM_LOG_ERROR );
+ 	return false;
+       }
+@@ -139,7 +139,7 @@
+     $fbfilename = $this->mkfbfilename($filename);
+     unlink($fbfilename);
+     unlink($this->mkaclfilename($filename));    
+-    $db = dba_open( $this->basedir.'/pfbcache.db', 'cd', 'gdbm' );
++    $db = dba_open( '/var/lib/kolab/pfbcache.db', 'cd', 'db4' );
+     if( $db === false ) return false;
+     for( $uid = dba_firstkey($db); $uid !== false; $uid = dba_nextkey($db)) {
+       $lst = dba_fetch( $uid, $db );
+@@ -153,7 +153,7 @@
+ 
+   function findAll( $uid, $groups ) {
+     $lst = array();
+-    $db = dba_open( $this->basedir.'/pfbcache.db', 'rd', 'gdbm' );
++    $db = dba_open( '/var/lib/kolab/pfbcache.db', 'rd', 'db4' );
+     if( $db === false ) return false;
+     $uids = $groups;
+     for( $i = 0; $i < count($uids); $i++ ) $uids[$i] = 'group:'.$uids[$i];
+@@ -314,4 +314,4 @@
+   var $error;
+ };
+ 
+-?>
+\ Kein Zeilenumbruch am Dateiende.
++?>


Property changes on: trunk/kolab-resource-handlers/debian/patches/80-freebusycache.class.php-path.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Added: trunk/kolab-resource-handlers/debian/patches/90-freebusy.php-path.dpatch
===================================================================
--- trunk/kolab-resource-handlers/debian/patches/90-freebusy.php-path.dpatch	2006-02-01 14:16:34 UTC (rev 268)
+++ trunk/kolab-resource-handlers/debian/patches/90-freebusy.php-path.dpatch	2006-02-01 15:16:47 UTC (rev 269)
@@ -0,0 +1,45 @@
+#!/bin/sh -e
+## 90-freebusy.php-path.dpatch by Noèl Köthe <noel at debian.org>
+##
+## All lines beginning with `## DP:' are a description of the patch.
+## DP: path changes
+
+if [ $# -lt 1 ]; then
+echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+exit 1
+fi
+
+[ -f debian/patches/00patch-opts ] && . debian/patches/00patch-opts
+patch_opts="${patch_opts:--f --no-backup-if-mismatch}"
+
+case "$1" in
+      -patch) patch $patch_opts -p1 < $0;;
+      -unpatch) patch $patch_opts -p1 -R < $0;;
+      *)
+      echo >&2 "`basename $0`: script expects -patch|-unpatch as argument"
+      exit 1;;
+esac
+
+exit 0
+
+ at DPATCH@
+--- kolab-resource-handlers-0.3.9/kolab-resource-handlers/freebusy/freebusy.php.orig	2006-02-01 15:28:00.000000000 +0100
++++ kolab-resource-handlers-0.3.9/kolab-resource-handlers/freebusy/freebusy.php	2006-02-01 15:45:15.000000000 +0100
+@@ -23,7 +23,7 @@
+ require_once('freebusy/freebusyldap.class.php');
+ require_once('freebusy/misc.php');
+ 
+-require_once('@l_prefix@/etc/resmgr/freebusy.conf');
++require_once('/etc/kolab/freebusy.conf');
+ 
+ logInit( 'freebusy' );
+ 
+@@ -69,7 +69,7 @@
+ 
+ 
+ $user = strtolower($user);
+-$cache =& new FreeBusyCache( $params['kolab_prefix'].'/var/kolab/www/freebusy/cache', $req_extended );
++$cache =& new FreeBusyCache( $params['kolab_prefix'].'/var/lib/kolab/freebusy-cache', $req_extended );
+ $collector =& new FreeBusyCollector( $user );
+ 
+ $groups = $ldap->distlists( $ldap->dn( $user ) );


Property changes on: trunk/kolab-resource-handlers/debian/patches/90-freebusy.php-path.dpatch
___________________________________________________________________
Name: svn:executable
   + *

Modified: trunk/kolab-resource-handlers/debian/postinst
===================================================================
--- trunk/kolab-resource-handlers/debian/postinst	2006-02-01 14:16:34 UTC (rev 268)
+++ trunk/kolab-resource-handlers/debian/postinst	2006-02-01 15:16:47 UTC (rev 269)
@@ -8,9 +8,22 @@
 		mkdir -p /var/log/kolab
 	fi
 	if ! [ -e /var/log/kolab/resmgr.log ] ; then
-		echo "Creating log file for kolab-resource-handlers"
+		echo "Creating log file for resource manager"
 		touch /var/log/kolab/resmgr.log
+		chown nobody:root /var/log/kolab/resmgr.log
+		chmod 640 /var/log/kolab/resmgr.log
 	fi
+	if ! [ -e /var/log/kolab/freebusy.log ] ; then
+		echo "Creating log file for freebusy"
+		touch /var/log/kolab/freebusy.log
+		chown www-data:root /var/log/kolab/freebusy.log
+		chmod 640 /var/log/kolab/freebusy.log
+	fi
+	if ! [ -d /var/lib/kolab/freebusy-cache ] ; then
+		echo "Creating freebusy cache directory"
+		mkdir /var/lib/kolab/freebusy-cache
+		chown www-data:root /var/lib/kolab/freebusy-cache
+	fi
 }
 
 case "$1" in

Modified: trunk/kolab-resource-handlers/debian/rules
===================================================================
--- trunk/kolab-resource-handlers/debian/rules	2006-02-01 14:16:34 UTC (rev 268)
+++ trunk/kolab-resource-handlers/debian/rules	2006-02-01 15:16:47 UTC (rev 269)
@@ -44,7 +44,6 @@
 	# Install files for kolabmailboxfilter.php
 	install -D -m 644 kolab-resource-handlers/resmgr/misc.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/php/misc.php
 	install -D -m 644 kolab-resource-handlers/resmgr/resmgr.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/php/resmgr.php
-	install -D -m 644 kolab-resource-handlers/freebusy/recurrence.class.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/php/recurrence.class.php
 	
 	# Install files for kolabfilter.php
 	install -D -m 644 kolab-resource-handlers/resmgr/olhacks.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/php/olhacks.php
@@ -53,9 +52,20 @@
 	install -D -m 644 kolab-resource-handlers/resmgr/kolabfilter.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/kolabfilter.php
 	install -D -m 644 kolab-resource-handlers/resmgr/kolabmailboxfilter.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/kolabmailboxfilter.php
 	install -D -m 644 kolab-resource-handlers/resmgr/kolabmailtransport.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/kolabmailtransport.php
-	
-	# Install conffile
+
+	# Install the freebusy scripts, classes
+	install -D -m 644 kolab-resource-handlers/freebusy/freebusycache.class.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/freebusycache.class.php
+	install -D -m 644 kolab-resource-handlers/freebusy/freebusy.class.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/freebusy.class.php
+	install -D -m 644 kolab-resource-handlers/freebusy/freebusycollector.class.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/freebusycollector.class.php
+	install -D -m 644 kolab-resource-handlers/freebusy/freebusyldap.class.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/freebusyldap.class.php
+	install -D -m 644 kolab-resource-handlers/freebusy/freebusy.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/freebusy.php
+	install -D -m 644 kolab-resource-handlers/freebusy/misc.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/misc.php
+	install -D -m 644 kolab-resource-handlers/freebusy/pfb.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/pfb.php
+	install -D -m 644 kolab-resource-handlers/freebusy/recurrence.class.php debian/kolab-resource-handlers/usr/share/kolab-resource-handlers/freebusy/recurrence.class.php
+
+	# Install conffiles
 	install -D -m 644 kolab-resource-handlers/resmgr/resmgr.conf debian/kolab-resource-handlers/etc/kolab/resmgr.conf
+	install -D -m 644 kolab-resource-handlers/freebusy/freebusy.conf debian/kolab-resource-handlers/etc/kolab/freebusy.conf
 	
 binary-arch: build install
 # We are binary-indep so nothing to do here.




More information about the pkg-kolab-devel mailing list