Branch '2.3-stable' - pear/Kolab_Freebusy

Christoph Wickert wickert at kolabsys.com
Mon May 30 13:01:46 CEST 2011


 pear/Kolab_Freebusy/ChangeLog                                                |    6 
 pear/Kolab_Freebusy/Kolab_FreeBusy.spec                                      |    4 
 pear/Kolab_Freebusy/hooks/Kolab_FreeBusy-0.5.2/hook-delete_freebusy_user.php |   34 +
 pear/Kolab_Freebusy/package.info                                             |    6 
 pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/freebusy.conf.template    |  215 ++++++++++
 pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/rc.freebusy.template      |   40 +
 6 files changed, 300 insertions(+), 5 deletions(-)

New commits:
commit da2a44eb594f7e70e0fc27cd78d28ad35c59f39e
Author: Gunnar Wrobel <p at rdus.de>
Date:   Mon May 30 08:47:11 2011 +0000

    Update to Kolab_FreeBusy-0.5.2

diff --git a/pear/Kolab_Freebusy/ChangeLog b/pear/Kolab_Freebusy/ChangeLog
index 4596464..ba5dbb9 100644
--- a/pear/Kolab_Freebusy/ChangeLog
+++ b/pear/Kolab_Freebusy/ChangeLog
@@ -1,3 +1,9 @@
+2011-05-30  Gunnar Wrobel  <p at rdus.de>
+
+	* Kolab_FreeBusy.spec: Update to 0.5.2
+
+	kolab/issue4730 (generating free/busy cache broken in server 2.3.0)
+
 2011-05-20  Gunnar Wrobel  <p at rdus.de>
 
 	* patches/Kolab_FreeBusy-0.5.1/Kolab_FreeBusy_0.5.1_p3.patch:
diff --git a/pear/Kolab_Freebusy/Kolab_FreeBusy.spec b/pear/Kolab_Freebusy/Kolab_FreeBusy.spec
index 8c9b75f..393fe1c 100644
--- a/pear/Kolab_Freebusy/Kolab_FreeBusy.spec
+++ b/pear/Kolab_Freebusy/Kolab_FreeBusy.spec
@@ -6,8 +6,8 @@
 %define         V_package_origin WGET
 %define         V_repo_commit 
 %define         V_repo_release 
-%define         V_version 0.5.1
-%define         V_release 20110520
+%define         V_version 0.5.2
+%define         V_release 20110530
 %define         V_sourceurl http://pear.horde.org/get
 %define         V_php_lib_loc php
 %define         V_www_loc freebusy
diff --git a/pear/Kolab_Freebusy/hooks/Kolab_FreeBusy-0.5.2/hook-delete_freebusy_user.php b/pear/Kolab_Freebusy/hooks/Kolab_FreeBusy-0.5.2/hook-delete_freebusy_user.php
new file mode 100644
index 0000000..d34ba24
--- /dev/null
+++ b/pear/Kolab_Freebusy/hooks/Kolab_FreeBusy-0.5.2/hook-delete_freebusy_user.php
@@ -0,0 +1,34 @@
+#!@@@php_bin@@@
+<?php
+/**
+ * Deletes the Kolab webclient data of deleted users.
+ *
+ * PHP version 5
+ *
+ * Copyright 2010 Kolab Systems AG
+ *
+ * @category Kolab
+ * @package  Kolab
+ * @author   Gunnar Wrobel <wrobel at pardus.de>
+ * @license  http://www.fsf.org/copyleft/lgpl.html LGPL
+ * @link     http://www.kolab.org
+ */
+
+require_once 'Horde/Kolab/Config.php';
+require_once 'Horde/Kolab/Config/Exception.php';
+
+$config = new Horde_Kolab_Config('@@@prefix@@@/etc/kolab');
+if (file_exists($config['webserver_document_root'] . '/freebusy/config.php')) {
+    require_once $config['webserver_document_root'] . '/freebusy/config.php';
+
+    require_once 'Horde/Kolab/FreeBusy.php';
+
+    $_GET['uid'] = $_SERVER['argv'][1];
+
+    $fb = new Horde_Kolab_FreeBusy();
+    $fb->_getCache()->deleteOwner();
+
+    if ($config['log_level'] >= 3) {
+        syslog(LOG_INFO, "L: Deleted free/busy cache data for user $uid.");
+    }
+}
diff --git a/pear/Kolab_Freebusy/package.info b/pear/Kolab_Freebusy/package.info
index 690cb16..8e09ec0 100644
--- a/pear/Kolab_Freebusy/package.info
+++ b/pear/Kolab_Freebusy/package.info
@@ -13,13 +13,13 @@ package_url='http://pear.horde.org/index.php?package='
 package_origin='WGET'
 
 # Version number
-version='0.5.1'
+version='0.5.2'
 
 # Package release number
-release='20110520'
+release='20110530'
 
 # Source URL to download from
-sourceurl='http://files.kolab.org/server/development-2.3/externals'
+sourceurl='http://files.kolab.org/incoming/wrobel'
 
 # In which PHP library location should the library get installed
 php_lib_loc='php'
diff --git a/pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/freebusy.conf.template b/pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/freebusy.conf.template
new file mode 100644
index 0000000..712f51a
--- /dev/null
+++ b/pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/freebusy.conf.template
@@ -0,0 +1,215 @@
+KOLAB_META_START
+TARGET=@@@freebusy_confdir@@@/config.php
+PERMISSIONS=0640
+OWNERSHIP=@@@freebusy_usr@@@:@@@freebusy_grp@@@
+KOLAB_META_END
+<?php
+@@@warning@@@
+
+/*
+ *  COPYRIGHT
+ *  ---------
+ *
+ *  See docs/AUTHORS file
+ *
+ *
+ *  LICENSE
+ *  -------
+ *
+ *  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 of the License, 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 should have received a copy of the GNU General Public License
+ *  along with this program; if not, write to the Free Software
+ *  Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ *
+ *  $Revision$
+ *
+ *  ABOUT
+ *  -----
+ *
+ *  This file provides configuration settings for both the
+ *  freebusy.php and the pfb.php scripts.
+ *
+ */
+
+$conf = array();
+
+/* Horde::Log configuration */
+$conf['log']['enabled']          = true;
+$conf['log']['priority']         = PEAR_LOG_INFO;
+$conf['log']['type']             = '@@@freebusy_log_type@@@';
+$conf['log']['name']             = '@@@freebusy_log_name@@@';
+$conf['log']['ident']            = 'Kolab Free/Busy';
+$conf['log']['params']['append'] = true;
+
+/* PHP error logging */
+ini_set('error_log', '@@@freebusy_logdir@@@/php-error.log');
+
+/* Horde::Kolab::LDAP configuration */
+$conf['kolab']['ldap']['server'] = '@@@ldap_uri@@@';
+$conf['kolab']['ldap']['basedn'] = '@@@base_dn@@@';
+$conf['kolab']['ldap']['phpdn']  = '@@@php_dn@@@';
+$conf['kolab']['ldap']['phppw']  = '@@@php_pw@@@';
+
+/**
+ * If you use customized LDAP attributes on your LDAP server the
+ * following configuration setting allows you to map the standard
+ * Kolab attribute names to your customizations.
+ *
+ * Specify the mapping line by line:
+ *
+ * $conf['kolab']['ldap']['map']['uid'] = 'uid2';
+ * $conf['kolab']['ldap']['map']['mobile'] = 'handy';
+ *
+ * or use a hash structure:
+ *
+ * $conf['kolab']['ldap']['map'] = array('uid' => 'uid2',
+ *                                       'mobile' => 'handy');
+ *
+ */
+//$conf['kolab']['ldap']['map']['uid'] = 'uid2';
+
+/**
+ * If you use customized LDAP attributes on your LDAP server the
+ * following configuration setting allows you to map the standard
+ * Kolab attribute names to your customizations.
+ *
+ * Specify the mapping line by line:
+ *
+ * $conf['kolab']['ldap']['map']['uid'] = 'uid2';
+ * $conf['kolab']['ldap']['map']['mobile'] = 'handy';
+ *
+ * or use a hash structure:
+ *
+ * $conf['kolab']['ldap']['map'] = array('uid' => 'uid2',
+ *                                       'mobile' => 'handy');
+ *
+ */
+//$conf['kolab']['ldap']['map']['uid'] = 'uid2';
+
+/* Horde::Kolab::IMAP configuration */
+$conf['kolab']['imap']['server']   = '@@@fqdnhostname@@@';
+$conf['kolab']['imap']['port']     = 143;
+$conf['kolab']['imap']['protocol'] = 'notls/readonly';
+
+/* Horde::Auth configuration */
+$conf['auth']['params']['login_block'] = 0;
+$conf['auth']['checkbrowser']          = false;
+$conf['auth']['checkip']               = false;
+$conf['umask'] = false;
+
+/* Allow special users to log into the system */
+$conf['kolab']['imap']['allow_special_users'] = true;
+
+/* Do not record login attempts */
+$conf['auth']['params']['login_block'] = false;
+
+/* Kolab::Freebusy configuration */
+
+/* Should we redirect using a Location header, if the user is not local? If this
+ * is false we silently download the file ourselves and output it so that it
+ * looks as though the free/busy information is coming from us.
+ */
+$conf['fb']['redirect']     = false;
+
+/* What is the address of the current server where the free/busy data can be accessed?
+ */
+$conf['kolab']['freebusy']['server']  = 'https://@@@fqdnhostname@@@/freebusy';
+
+/* What is our default mail domain? This is used if any users do not have
+ * '@domain' specified after their username as part of their email address.
+ */
+$conf['fb']['email_domain'] = '@@@fqdnhostname@@@';
+
+/* Location of the cache files */
+$conf['fb']['cache_dir']    = '@@@freebusy_cachedir@@@';
+
+/* What db type to use for the freebusy caches */
+$conf['fb']['dbformat']     = 'db4';
+
+/* Should we send a Content-Type header, indicating what the mime type of the
+ * resulting VFB file is?
+ */
+$conf['fb']['send_content_type'] = false;
+
+/* Should we send a Content-Length header, indicating how large the resulting
+ * VFB file is?
+ */
+$conf['fb']['send_content_length'] = false;
+
+/* Should we send a Content-Disposition header, indicating what the name of the
+ * resulting VFB file should be?
+ */
+$conf['fb']['send_content_disposition'] = false;
+
+/* Should we use ACLs or does everybody get full rights? DO NOT set
+ * this to false if you don't know what you are doing. Your free/busy
+ * service should not be visible to any outside networks when
+ * disabling the use of ACL settings.
+ */
+$conf['fb']['use_acls'] = true;
+
+/* How many days in advance should the free/busy information be calculated? This
+ * is the default value that can be overwritten by the kolabFreeBusyFuture
+ * attribute of the users LDAP account.
+ */
+$conf['fb']['future_days'] = 180;
+
+/* The resulting vCalendar file is being cached. The following setting
+ * determines how many seconds it will be delivered without checking if
+ * the contents of the file might have changed. A negative setting disables
+ * caching (which is currently required for the resource management to work).
+ */
+$conf['fb']['vcal_cache']['min_age'] = -1;
+
+/* The resulting vCalendar file is being cached. The following setting
+ * determines after how many seconds it will be considered too old for
+ * delivery and a refresh of its contents will be enforced.
+ */
+$conf['fb']['vcal_cache']['max_age'] = 259200;
+
+
+/* Are there remote servers on which users have additional (shared)
+ * folders? In that case free/busy information should also be fetched
+ * from these servers.
+ *
+ * Add them like this:
+ *
+ * array('remote1.example.com', 'remote2.example.com')
+ */
+$conf['fb']['remote_servers'] = array();
+
+/**
+ * Ensure we use the Kolab group driver when handling groups.
+ */
+$conf['group']['driver'] = 'kolab';
+$conf['group']['cache'] = false;
+
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+//
+// If you modify this file, please do not forget to ping upstream
+// about synchronizing this file with
+//
+// http://cvs.horde.org/framework/Kolab_FreeBusy/www/Horde/Kolab/FreeBusy/config.php
+//
+//!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
+
+// DEBUGGING
+// =========
+//
+// Activate this to see the log messages on the screen
+// $conf['log']['type'] = 'display';
+//
+// Activate this to see the php messages on the screen
+// ini_set('display_errors', 1);
+//
+// Both setting will disrupt header delivery (which should not cause a
+// problem).
diff --git a/pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/rc.freebusy.template b/pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/rc.freebusy.template
new file mode 100644
index 0000000..7d6a695
--- /dev/null
+++ b/pear/Kolab_Freebusy/templates/Kolab_FreeBusy-0.5.2/rc.freebusy.template
@@ -0,0 +1,40 @@
+KOLAB_META_START
+TARGET=@@@sysconfdir@@@/rc.d/rc.freebusy
+PERMISSIONS=0755
+OWNERSHIP=@@@kolab_musr@@@:@@@kolab_mgrp@@@
+KOLAB_META_END
+#!@@@KOLABRC@@@ rc
+##
+##  rc.freebusy -- Handles log rotation for the free/busy system.
+##
+
+@@@warning@@@
+
+%config
+    freebusy_log_logfile="@@@freebusy_log_name@@@"
+    freebusy_log_phperrors="@@@freebusy_logdir@@@/php-error.log"
+    freebusy_log_owner="@@@kolab_usr@@@"
+    freebusy_log_group="@@@kolab_grp@@@"
+    freebusy_log_prolog="true"
+    freebusy_log_epilog="true"
+    freebusy_log_numfiles="10"
+    freebusy_log_minsize="1M"
+    freebusy_log_complevel="9"
+
+%daily -u @@@kolab_susr@@@
+    shtool rotate -f \
+        -n ${freebusy_log_numfiles} -s ${freebusy_log_minsize} -d \
+        -z ${freebusy_log_complevel} -m 640 \
+        -o ${freebusy_log_owner} \
+        -g ${freebusy_log_group} \
+        -P "${freebusy_log_prolog}" \
+        -E "${freebusy_log_epilog}" \
+        "${freebusy_log_logfile}"
+    shtool rotate -f \
+        -n ${freebusy_log_numfiles} -s ${freebusy_log_minsize} -d \
+        -z ${freebusy_log_complevel} -m 640 \
+        -o ${freebusy_log_owner} \
+        -g ${freebusy_log_group} \
+        -P "${freebusy_log_prolog}" \
+        -E "${freebusy_log_epilog}" \
+        "${freebusy_log_phperrors}"





More information about the commits mailing list