Kolab/kolab-freebusy

Changeset

1:440f00bf38a1
2014-02-22 Paul Boddie raw files shortlog changelog graph Packaging for kolab-freebusy 1.0.2-3~kolab1.1 by Paul. paul
debian/changelog (file) debian/control (file) debian/patches/config-lcattributes.diff (file) debian/patches/config-ldap-loglevel.diff (file) debian/patches/config-log-path.diff (file) debian/patches/directory-lcattributes.diff (file) debian/patches/index-config-path.diff (file) debian/patches/series (file) debian/postinst (file) debian/rules (file) debian/source/format (file)
     1.1 --- a/debian/changelog	Sat Feb 22 00:46:46 2014 +0100
     1.2 +++ b/debian/changelog	Sat Feb 22 00:47:26 2014 +0100
     1.3 @@ -1,3 +1,11 @@
     1.4 +kolab-freebusy (1.0.2-3~kolab1.1) unstable; urgency=low
     1.5 +
     1.6 +  * Non-maintainer upload.
     1.7 +  * Changed the default loglevel for LDAP access to "info".
     1.8 +  * Patch upstream source to access /etc/kolab-freebusy configuration.
     1.9 +
    1.10 + -- Paul Boddie <paul@boddie.org.uk>  Thu, 12 Dec 2013 22:35:21 +0100
    1.11 +
    1.12  kolab-freebusy (1.0.2-3~kolab1) unstable; urgency=low
    1.13  
    1.14    * call dh_install in debian.rules
     2.1 --- a/debian/control	Sat Feb 22 00:46:46 2014 +0100
     2.2 +++ b/debian/control	Sat Feb 22 00:47:26 2014 +0100
     2.3 @@ -2,7 +2,7 @@
     2.4  Section: mail
     2.5  Priority: extra
     2.6  Maintainer: Jeroen van Meeuwen <vanmeeuwen@kolabsys.com>
     2.7 -Build-Depends: debhelper (>= 8.0.0)
     2.8 +Build-Depends: debhelper (>= 8.0.0), quilt
     2.9  Standards-Version: 3.9.3
    2.10  Homepage: http://www.kolab.org
    2.11  Vcs-Git: git://git.kolabsys.com/git/apt/kolab-freebusy
    2.12 @@ -11,7 +11,7 @@
    2.13  Package: kolab-freebusy
    2.14  Architecture: all
    2.15  Depends: ${misc:Depends},
    2.16 -        kolab-utils
    2.17 +        kolab-utils, kolab-conf
    2.18  Description: Free/Busy for Kolab Groupware
    2.19   The Kolab Groupware Free/Busy web application offers simple
    2.20   and extended Free/Busy information for Kolab Groupware users,
     3.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     3.2 +++ b/debian/patches/config-lcattributes.diff	Sat Feb 22 00:47:26 2014 +0100
     3.3 @@ -0,0 +1,10 @@
     3.4 +--- a/config/config.ini.sample
     3.5 ++++ b/config/config.ini.sample
     3.6 +@@ -48,6 +48,7 @@
     3.7 + base_dn = "dc=yourdomain,dc=com"
     3.8 + filter = "(&(objectClass=kolabInetOrgPerson)(|(uid=%s)(mail=%s)(alias=%s)))"
     3.9 + attributes[] = mail
    3.10 ++lc_attributes[] = mail
    3.11 + fbsource = file:/www/kolab-freebusy/data/%mail.ifb
    3.12 + loglevel = 100  ; Debug
    3.13 + 
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/debian/patches/config-ldap-loglevel.diff	Sat Feb 22 00:47:26 2014 +0100
     4.3 @@ -0,0 +1,11 @@
     4.4 +--- a/config/config.ini.sample
     4.5 ++++ b/config/config.ini.sample
     4.6 +@@ -50,7 +50,7 @@
     4.7 + attributes[] = mail
     4.8 + lc_attributes[] = mail
     4.9 + fbsource = file:/www/kolab-freebusy/data/%mail.ifb
    4.10 +-loglevel = 100  ; Debug
    4.11 ++loglevel = 300  ; Warn
    4.12 + 
    4.13 + ;; external MS Exchange 2010 server
    4.14 + [directory "exchange"]
     5.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     5.2 +++ b/debian/patches/config-log-path.diff	Sat Feb 22 00:47:26 2014 +0100
     5.3 @@ -0,0 +1,11 @@
     5.4 +--- a/config/config.ini.sample
     5.5 ++++ b/config/config.ini.sample
     5.6 +@@ -27,7 +27,7 @@
     5.7 + ;; Logging configuration
     5.8 + [log]
     5.9 + driver = file  ; supported drivers: file, syslog
    5.10 +-path = ./log
    5.11 ++path = /var/log/kolab-freebusy
    5.12 + name = freebusy
    5.13 + level = 300  ; (100 = Debug, 200 = Info, 300 = Warn, 400 = Error, 500 = Critical)
    5.14 + 
     6.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     6.2 +++ b/debian/patches/directory-lcattributes.diff	Sat Feb 22 00:47:26 2014 +0100
     6.3 @@ -0,0 +1,32 @@
     6.4 +--- a/lib/Kolab/FreeBusy/Directory.php
     6.5 ++++ b/lib/Kolab/FreeBusy/Directory.php
     6.6 +@@ -53,7 +53,7 @@
     6.7 + 			$fbsource = $this->config['fbsource'];
     6.8 + 			if ($source = Source::Factory($fbsource)) {
     6.9 + 				// forward request to Source instance
    6.10 +-				if ($data = $source->getFreeBusyData($user, $extended)) {
    6.11 ++				if ($data = $source->getFreeBusyData($this->postprocessAttrib($user), $extended)) {
    6.12 + 					// send data through the according format converter
    6.13 + 					$converter = Format::factory($this->config['format']);
    6.14 + 					$data = $converter->toVCalendar($data);
    6.15 +@@ -66,4 +66,19 @@
    6.16 + 		return false;
    6.17 + 	}
    6.18 + 
    6.19 ++	/**
    6.20 ++	 * Modify attribute values according to config
    6.21 ++	 */
    6.22 ++	protected function postprocessAttrib($attrib)
    6.23 ++	{
    6.24 ++		if (!empty($this->config['lc_attributes'])) {
    6.25 ++			foreach ((array)$this->config['lc_attributes'] as $key) {
    6.26 ++				if (!empty($attrib[$key]))
    6.27 ++					$attrib[$key] = strtolower($attrib[$key]);
    6.28 ++			}
    6.29 ++		}
    6.30 ++
    6.31 ++		return $attrib;
    6.32 ++	}
    6.33 ++
    6.34 + }
    6.35 +\ No newline at end of file
     7.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     7.2 +++ b/debian/patches/index-config-path.diff	Sat Feb 22 00:47:26 2014 +0100
     7.3 @@ -0,0 +1,19 @@
     7.4 +--- a/web/index.php
     7.5 ++++ b/web/index.php
     7.6 +@@ -26,6 +26,7 @@
     7.7 + 
     7.8 + 
     7.9 + define('KOLAB_FREEBUSY_ROOT', realpath('../'));
    7.10 ++define('KOLAB_FREEBUSY_CONFIG_ROOT', '/etc/kolab-freebusy');
    7.11 + 
    7.12 + // suppress error notices
    7.13 + ini_set('error_reporting', E_ALL &~ E_NOTICE);
    7.14 +@@ -41,7 +42,7 @@
    7.15 + 
    7.16 + 
    7.17 + // load config
    7.18 +-$config = Config::getInstance(KOLAB_FREEBUSY_ROOT . '/config');
    7.19 ++$config = Config::getInstance(KOLAB_FREEBUSY_CONFIG_ROOT);
    7.20 + if ($config->isValid()) {
    7.21 + 	// check for trusted IP first
    7.22 + 	$remote_ip = Utils::remoteIP();
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/debian/patches/series	Sat Feb 22 00:47:26 2014 +0100
     8.3 @@ -0,0 +1,5 @@
     8.4 +config-lcattributes.diff
     8.5 +config-ldap-loglevel.diff
     8.6 +directory-lcattributes.diff
     8.7 +index-config-path.diff
     8.8 +config-log-path.diff
     9.1 --- a/debian/postinst	Sat Feb 22 00:46:46 2014 +0100
     9.2 +++ b/debian/postinst	Sat Feb 22 00:47:26 2014 +0100
     9.3 @@ -25,6 +25,7 @@
     9.4  case "$1" in
     9.5      configure)
     9.6          fixperms
     9.7 +        setup-kolab freebusy --use-system-config
     9.8          a2enmod rewrite >/dev/null 2>&1 || true
     9.9          if [ -e "/etc/apache2/sites-available/kolab-freebusy" -a ! -e "/etc/apache2/sites-enabled/kolab-freebusy" ]; then
    9.10              a2ensite kolab-freebusy
    11.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    11.2 +++ b/debian/source/format	Sat Feb 22 00:47:26 2014 +0100
    11.3 @@ -0,0 +1,1 @@
    11.4 +3.0 (quilt)