Projects
Kolab:Winterfell
kolab-syncroton
Log In
Username
Password
Overview
Repositories
Revisions
Requests
Users
Attributes
Meta
Expand all
Collapse all
Changes of Revision 33
View file
kolab-syncroton.spec
Changed
@@ -37,7 +37,7 @@ Name: kolab-syncroton Version: 2.3.8 -Release: 1%{?dist} +Release: 2%{?dist} Summary: ActiveSync for Kolab Groupware Group: Applications/Internet @@ -47,6 +47,10 @@ Source0: https://mirror.kolabenterprise.com/pub/releases/%{name}-%{version}.tar.gz Source1: kolab-syncroton.logrotate +Patch0001: 0001-Remove-activesync_user_debug-also-from-sample-config.patch +Patch0002: 0002-Fix-logging-with-per_user_logging-true.patch +Patch0003: 0003-Do-not-forget-to-bump-the-version.patch + BuildArch: noarch # Use this build requirement to make sure we are using @@ -94,6 +98,10 @@ %prep %setup -q -n %{name}-%{version} +%patch0001 -p1 +%patch0002 -p1 +%patch0003 -p1 + %build %install @@ -195,6 +203,10 @@ %attr(0770,%{httpd_user},%{httpd_group}) %{_var}/log/%{name} %changelog +* Wed Jan 24 2018 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.3.8-2 +- Fix logging +- Fix version number + * Wed Dec 20 2017 Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> - 2.3.8-1 - Release 2.3.8
View file
0001-Remove-activesync_user_debug-also-from-sample-config.patch
Added
@@ -0,0 +1,26 @@ +From 25fe73820c89e4098d9e415c2b9d57998126c8f0 Mon Sep 17 00:00:00 2001 +From: Aleksander Machniak <machniak@kolabsys.com> +Date: Thu, 11 Jan 2018 08:15:41 +0100 +Subject: [PATCH 1/3] Remove activesync_user_debug also from sample config file + +--- + config/config.inc.php.dist | 3 --- + 1 file changed, 3 deletions(-) + +diff --git a/config/config.inc.php.dist b/config/config.inc.php.dist +index 61a4fd8..1b9b011 100644 +--- a/config/config.inc.php.dist ++++ b/config/config.inc.php.dist +@@ -8,9 +8,6 @@ $config['activesync_debug'] = true; + // Enables logging to a separate directory for every user/device + $config['activesync_user_log'] = false; + +-// Enable per-user debugging only if /var/log/kolab-syncroton/<username>/ folder exists +-$config['activesync_user_debug'] = false; +- + // If specified all ActiveSync-related logs will be saved to this file + // Note: This doesn't change Roundcube Framework log locations + $config['activesync_log_file'] = null; +-- +2.14.3 +
View file
0002-Fix-logging-with-per_user_logging-true.patch
Added
@@ -0,0 +1,134 @@ +From bbec0775f0aae33d8cbf13f1c4a4ee018c4e59fa Mon Sep 17 00:00:00 2001 +From: Aleksander Machniak <machniak@kolabsys.com> +Date: Tue, 23 Jan 2018 18:12:41 +0000 +Subject: [PATCH 2/3] Fix logging with per_user_logging=true + +Also don't enable debug automatically, for consistence with Roundcube Framework +where per_user_logging do not enable any debug. +--- + lib/kolab_sync.php | 49 ++++++++++++++++------------------------------- + lib/kolab_sync_logger.php | 6 +++++- + 2 files changed, 22 insertions(+), 33 deletions(-) + +diff --git a/lib/kolab_sync.php b/lib/kolab_sync.php +index 302c873..539cb81 100644 +--- a/lib/kolab_sync.php ++++ b/lib/kolab_sync.php +@@ -142,7 +142,7 @@ class kolab_sync extends rcube + $this->plugins->exec_hook('ready', array('task' => 'syncroton')); + + // Set log directory per-user +- $this->set_log_dir($this->username ?: $_SERVER['PHP_AUTH_USER']); ++ $this->set_log_dir(); + + // Save user password for Roundcube Framework + $this->password = $_SERVER['PHP_AUTH_PW']; +@@ -384,13 +384,13 @@ class kolab_sync extends rcube + /** + * Set logging directory per-user + */ +- protected function set_log_dir($username) ++ protected function set_log_dir() + { +- if (empty($username)) { ++ if (empty($this->username)) { + return; + } + +- $this->logger->set_username($username); ++ $this->logger->set_username($this->username); + + $user_debug = $this->config->get('per_user_logging'); + $user_log = $user_debug || $this->config->get('activesync_user_log'); +@@ -400,15 +400,9 @@ class kolab_sync extends rcube + } + + $log_dir = $this->config->get('log_dir'); +- $log_dir .= DIRECTORY_SEPARATOR . $username; ++ $log_dir .= DIRECTORY_SEPARATOR . $this->username; + +- // in user_debug mode enable logging only if user directory exists +- if ($user_debug) { +- if (!is_dir($log_dir)) { +- return; +- } +- } +- else if (!is_dir($log_dir)) { ++ if (!$user_debug && !is_dir($log_dir)) { + if (!mkdir($log_dir, 0770)) { + return; + } +@@ -424,28 +418,12 @@ class kolab_sync extends rcube + } + } + +- // make sure we're using debug mode where possible, + if ($user_debug) { +- $this->config->set('debug_level', 1); +- $this->config->set('memcache_debug', true); +- $this->config->set('imap_debug', true); +- $this->config->set('ldap_debug', true); +- $this->config->set('smtp_debug', true); +- $this->config->set('sql_debug', true); +- +- // SQL/IMAP debug need to be set directly on the object instance +- // it's already initialized/configured +- if ($db = $this->get_dbh()) { +- $db->set_debug(true); +- } +- if ($storage = $this->get_storage()) { +- $storage->set_debug(true); +- } +- +- $this->logger->mode = kolab_sync_logger::DEBUG; ++ $this->per_user_log_dir = $log_dir; ++ } ++ else { ++ $this->config->set('log_dir', $log_dir); + } +- +- $this->config->set('log_dir', $log_dir); + + // re-set PHP error logging + if (($this->config->get('debug_level') & 1) && $this->config->get('log_driver') != 'syslog') { +@@ -453,6 +431,13 @@ class kolab_sync extends rcube + } + } + ++ /** ++ * Get the per-user log directory ++ */ ++ public function get_user_log_dir() ++ { ++ return $this->per_user_log_dir; ++ } + + /** + * Send HTTP 503 response. +diff --git a/lib/kolab_sync_logger.php b/lib/kolab_sync_logger.php +index 4e89757..83e5311 100644 +--- a/lib/kolab_sync_logger.php ++++ b/lib/kolab_sync_logger.php +@@ -59,7 +59,7 @@ class kolab_sync_logger extends Zend_Log + $rcube = rcube::get_instance(); + $logfile = $rcube->config->get('activesync_log_file'); + $format = $rcube->config->get('log_date_format', 'd-M-Y H:i:s O'); +- $log_dir = $rcube->config->get('log_dir'); ++ $log_dir = $rcube->get_user_log_dir() ?: $rcube->config->get('log_dir'); + + if (is_numeric($method)) { + $mode = $method; +@@ -88,6 +88,10 @@ class kolab_sync_logger extends Zend_Log + } + + $logfile = $log_dir . DIRECTORY_SEPARATOR . $file; ++ ++ if (version_compare(version_parse(RCUBE_VERSION), '1.4.0') >= 0) { ++ $logfile .= $rcube->config->get('log_file_ext', '.log'); ++ } + } + else if ($logfile[0] != '/') { + $logfile = $log_dir . DIRECTORY_SEPARATOR . $logfile; +-- +2.14.3 +
View file
0003-Do-not-forget-to-bump-the-version.patch
Added
@@ -0,0 +1,25 @@ +From e6d5a6129bac243f65dea3a35b3e7c2c23fc7c97 Mon Sep 17 00:00:00 2001 +From: "Jeroen van Meeuwen (Kolab Systems)" <vanmeeuwen@kolabsys.com> +Date: Wed, 24 Jan 2018 08:59:10 +0100 +Subject: [PATCH 3/3] Do not forget to bump the version + +--- + lib/kolab_sync.php | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/lib/kolab_sync.php b/lib/kolab_sync.php +index 539cb81..4b55566 100644 +--- a/lib/kolab_sync.php ++++ b/lib/kolab_sync.php +@@ -46,7 +46,7 @@ class kolab_sync extends rcube + public $password; + + const CHARSET = 'UTF-8'; +- const VERSION = "2.3.7"; ++ const VERSION = "2.3.8"; + + + /** +-- +2.14.3 +
View file
debian.changelog
Changed
@@ -1,3 +1,10 @@ +kolab-syncroton (2.3.8-0~kolab2) unstable; urgency=low + + * Fix logging + * Fix version number + + -- Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Wed, Jan 24 2018 15:13:40 +0200 + kolab-syncroton (2.3.8-0~kolab1) unstable; urgency=low * Release 2.3.8
View file
debian.series
Changed
@@ -0,0 +1,3 @@ +0001-Remove-activesync_user_debug-also-from-sample-config.patch -p1 +0002-Fix-logging-with-per_user_logging-true.patch -p1 +0003-Do-not-forget-to-bump-the-version.patch -p1
View file
kolab-syncroton.dsc
Changed
@@ -2,7 +2,7 @@ Source: kolab-syncroton Binary: kolab-syncroton Architecture: all -Version: 2.3.8-0~kolab1 +Version: 2.3.8-0~kolab2 Maintainer: Jeroen van Meeuwen (Kolab Systems) <vanmeeuwen@kolabsys.com> Uploaders: Paul Klos <kolab@klos2day.nl> Homepage: http://www.kolab.org/
Locations
Projects
Search
Status Monitor
Help
Open Build Service
OBS Manuals
API Documentation
OBS Portal
Reporting a Bug
Contact
Mailing List
Forums
Chat (IRC)
Twitter
Open Build Service (OBS)
is an
openSUSE project
.