# HG changeset patch # User Paul Boddie # Date 1393026446 -3600 # Node ID 440f00bf38a1b252e55da9899854de129cd3b6b1 # Parent 55f81ede76f1a9f7850bfd630f806c98554f5ad7 Packaging for kolab-freebusy 1.0.2-3~kolab1.1 by Paul. diff -r 55f81ede76f1 -r 440f00bf38a1 debian/changelog --- a/debian/changelog Sat Feb 22 00:46:46 2014 +0100 +++ b/debian/changelog Sat Feb 22 00:47:26 2014 +0100 @@ -1,3 +1,11 @@ +kolab-freebusy (1.0.2-3~kolab1.1) unstable; urgency=low + + * Non-maintainer upload. + * Changed the default loglevel for LDAP access to "info". + * Patch upstream source to access /etc/kolab-freebusy configuration. + + -- Paul Boddie Thu, 12 Dec 2013 22:35:21 +0100 + kolab-freebusy (1.0.2-3~kolab1) unstable; urgency=low * call dh_install in debian.rules diff -r 55f81ede76f1 -r 440f00bf38a1 debian/control --- a/debian/control Sat Feb 22 00:46:46 2014 +0100 +++ b/debian/control Sat Feb 22 00:47:26 2014 +0100 @@ -2,7 +2,7 @@ Section: mail Priority: extra Maintainer: Jeroen van Meeuwen -Build-Depends: debhelper (>= 8.0.0) +Build-Depends: debhelper (>= 8.0.0), quilt Standards-Version: 3.9.3 Homepage: http://www.kolab.org Vcs-Git: git://git.kolabsys.com/git/apt/kolab-freebusy @@ -11,7 +11,7 @@ Package: kolab-freebusy Architecture: all Depends: ${misc:Depends}, - kolab-utils + kolab-utils, kolab-conf Description: Free/Busy for Kolab Groupware The Kolab Groupware Free/Busy web application offers simple and extended Free/Busy information for Kolab Groupware users, diff -r 55f81ede76f1 -r 440f00bf38a1 debian/patches/config-lcattributes.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/patches/config-lcattributes.diff Sat Feb 22 00:47:26 2014 +0100 @@ -0,0 +1,10 @@ +--- a/config/config.ini.sample ++++ b/config/config.ini.sample +@@ -48,6 +48,7 @@ + base_dn = "dc=yourdomain,dc=com" + filter = "(&(objectClass=kolabInetOrgPerson)(|(uid=%s)(mail=%s)(alias=%s)))" + attributes[] = mail ++lc_attributes[] = mail + fbsource = file:/www/kolab-freebusy/data/%mail.ifb + loglevel = 100 ; Debug + diff -r 55f81ede76f1 -r 440f00bf38a1 debian/patches/config-ldap-loglevel.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/patches/config-ldap-loglevel.diff Sat Feb 22 00:47:26 2014 +0100 @@ -0,0 +1,11 @@ +--- a/config/config.ini.sample ++++ b/config/config.ini.sample +@@ -50,7 +50,7 @@ + attributes[] = mail + lc_attributes[] = mail + fbsource = file:/www/kolab-freebusy/data/%mail.ifb +-loglevel = 100 ; Debug ++loglevel = 300 ; Warn + + ;; external MS Exchange 2010 server + [directory "exchange"] diff -r 55f81ede76f1 -r 440f00bf38a1 debian/patches/config-log-path.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/patches/config-log-path.diff Sat Feb 22 00:47:26 2014 +0100 @@ -0,0 +1,11 @@ +--- a/config/config.ini.sample ++++ b/config/config.ini.sample +@@ -27,7 +27,7 @@ + ;; Logging configuration + [log] + driver = file ; supported drivers: file, syslog +-path = ./log ++path = /var/log/kolab-freebusy + name = freebusy + level = 300 ; (100 = Debug, 200 = Info, 300 = Warn, 400 = Error, 500 = Critical) + diff -r 55f81ede76f1 -r 440f00bf38a1 debian/patches/directory-lcattributes.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/patches/directory-lcattributes.diff Sat Feb 22 00:47:26 2014 +0100 @@ -0,0 +1,32 @@ +--- a/lib/Kolab/FreeBusy/Directory.php ++++ b/lib/Kolab/FreeBusy/Directory.php +@@ -53,7 +53,7 @@ + $fbsource = $this->config['fbsource']; + if ($source = Source::Factory($fbsource)) { + // forward request to Source instance +- if ($data = $source->getFreeBusyData($user, $extended)) { ++ if ($data = $source->getFreeBusyData($this->postprocessAttrib($user), $extended)) { + // send data through the according format converter + $converter = Format::factory($this->config['format']); + $data = $converter->toVCalendar($data); +@@ -66,4 +66,19 @@ + return false; + } + ++ /** ++ * Modify attribute values according to config ++ */ ++ protected function postprocessAttrib($attrib) ++ { ++ if (!empty($this->config['lc_attributes'])) { ++ foreach ((array)$this->config['lc_attributes'] as $key) { ++ if (!empty($attrib[$key])) ++ $attrib[$key] = strtolower($attrib[$key]); ++ } ++ } ++ ++ return $attrib; ++ } ++ + } +\ No newline at end of file diff -r 55f81ede76f1 -r 440f00bf38a1 debian/patches/index-config-path.diff --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/patches/index-config-path.diff Sat Feb 22 00:47:26 2014 +0100 @@ -0,0 +1,19 @@ +--- a/web/index.php ++++ b/web/index.php +@@ -26,6 +26,7 @@ + + + define('KOLAB_FREEBUSY_ROOT', realpath('../')); ++define('KOLAB_FREEBUSY_CONFIG_ROOT', '/etc/kolab-freebusy'); + + // suppress error notices + ini_set('error_reporting', E_ALL &~ E_NOTICE); +@@ -41,7 +42,7 @@ + + + // load config +-$config = Config::getInstance(KOLAB_FREEBUSY_ROOT . '/config'); ++$config = Config::getInstance(KOLAB_FREEBUSY_CONFIG_ROOT); + if ($config->isValid()) { + // check for trusted IP first + $remote_ip = Utils::remoteIP(); diff -r 55f81ede76f1 -r 440f00bf38a1 debian/patches/series --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/patches/series Sat Feb 22 00:47:26 2014 +0100 @@ -0,0 +1,5 @@ +config-lcattributes.diff +config-ldap-loglevel.diff +directory-lcattributes.diff +index-config-path.diff +config-log-path.diff diff -r 55f81ede76f1 -r 440f00bf38a1 debian/postinst --- a/debian/postinst Sat Feb 22 00:46:46 2014 +0100 +++ b/debian/postinst Sat Feb 22 00:47:26 2014 +0100 @@ -25,6 +25,7 @@ case "$1" in configure) fixperms + setup-kolab freebusy --use-system-config a2enmod rewrite >/dev/null 2>&1 || true if [ -e "/etc/apache2/sites-available/kolab-freebusy" -a ! -e "/etc/apache2/sites-enabled/kolab-freebusy" ]; then a2ensite kolab-freebusy diff -r 55f81ede76f1 -r 440f00bf38a1 debian/rules diff -r 55f81ede76f1 -r 440f00bf38a1 debian/source/format --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/debian/source/format Sat Feb 22 00:47:26 2014 +0100 @@ -0,0 +1,1 @@ +3.0 (quilt)