Source: radicale Version: 2.1.11-6 Severity: normal Tags: patch -----BEGIN PGP SIGNED MESSAGE----- Hash: SHA512
Dear Maintainer, When the log directory /var/log/radicale does not exit, starting radicale with uwsgi fails. The problem can be reproduced with `systemctl stop uwsgi; rm -rf /var/log/radicale; systemctl start uwsgi`. There is code in uwsgi configuration to create this directory but there is a typo in that code. The first attached patch fixes it. Additionally, when radicale is started with uWSGI (and also apparently with direct daemon start using init script), the log directory /var/log/radicale is never even used. Due to default radicale configuration, the daemon simply prints log messages console (which may not be picked up by uWSGI daemon or start-stop-daemon). The uWSGI general log and uWSGI request log are logged to /var/log/uwsgi/app/radicale.log. If the intension is to get rid of log directory, at least for uWSGI, the second attached patch helps. Otherwise, I suppose a change to radicale default configuration is needed to make it log to /var/log/radicale. Alternatively, perhaps uWSGI can capture the console log of radicale and output it as part of uwsgi app log. Please ignore the second patch in the latter two cases. Thanks, - -- Sunil - -- System Information: Debian Release: 10.0 APT prefers testing APT policy: (500, 'testing') Architecture: amd64 (x86_64) Kernel: Linux 4.19.0-5-amd64 (SMP w/4 CPU cores) Kernel taint flags: TAINT_OOT_MODULE, TAINT_UNSIGNED_MODULE Locale: LANG=en_IN.UTF-8, LC_CTYPE=en_IN.UTF-8 (charmap=UTF-8), LANGUAGE=en_IN.UTF-8 (charmap=UTF-8) Shell: /bin/sh linked to /bin/dash Init: systemd (via /run/systemd/system) LSM: AppArmor: enabled -----BEGIN PGP SIGNATURE----- iQJFBAEBCgAvFiEE5xPDY9ZyWnWupXSBQ+oc/wqnxfIFAl0VfY0RHHN1bmlsQG1l ZGhhcy5vcmcACgkQQ+oc/wqnxfLoXw/+Pb8A7ihF3+kJvpe0cdl4LeNQ9tACjN76 P4mDq7j8LV9ROsn/j6c7QFiDymtS/WoypB2grch3Ze7GtdLvYlBZKucEaru93SQC RYhL5wZGxMD1VfwOZElb/pmOyuAJzZl19znBeSODp7Rb61pQeiqmoBR9yyv5YWMb 8k2nOx+36+cgze66I/vVutU21OjrLYFwj/iKWtarLJnMFb4zcClJx/sBOlF4Nmla ayi0JHNxvNEeuU+fmkzxzHcIVjN0JMzrmIy/5S/2twHt8Lj9FIv2tAVzBBA6Mxhe mdXRG7GC+hAcz+1AOZuUfTVtqbaWSA+r+DfvQd87rupXwbP2v7bcI51OmpsiNIAI h5HILcR7F8i05o1c9Mz12gdgjKgL7kIKpvAlxxT5RgwSlyJKjeXJsNVIGB1X6IWq VqajMHAIWnHCT2wHlgD5RotCaJvI3ALRGc/ahQk9tnNykosh3BKSIXmFPasU4gFf weM6ThWmLK1LNXZFTlQ8aTKIU+n+ebXBtqvsJA96q6LkH+ypL4j1R8l73sQI4P85 ywLF0R/l/BsAcDgZfg7r1IOSwVbgSVK7PEIKezgGbWb7hhrXsE9wvihBAMb2v7vw EzMde3+wX8bg/2yFxHG9dpe+j8AOIbSyNbNa1EDuTQyM3vl8PZGmnwjzLZMjygZY sOo3ZtV1C40= =vXS2 -----END PGP SIGNATURE-----
>From 4ed52a100e78ed7ecde459c726a51eabca2a8d0a Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa <[email protected]> Date: Thu, 27 Jun 2019 19:15:47 -0700 Subject: [PATCH 1/2] uwsgi: Fix creation of log directory Signed-off-by: Sunil Mohan Adapa <[email protected]> --- debian/etc/uwsgi/apps-available/radicale.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/debian/etc/uwsgi/apps-available/radicale.ini b/debian/etc/uwsgi/apps-available/radicale.ini index cc9182c..24b0535 100644 --- a/debian/etc/uwsgi/apps-available/radicale.ini +++ b/debian/etc/uwsgi/apps-available/radicale.ini @@ -45,7 +45,7 @@ if-not-exists = /var/lib/radicale/collections exec-as-root = mkdir -p /var/lib/radicale/collections endif = if-not-exists = /var/log/radicale -exec-as-root = mkdir -p /var/lib/radicale +exec-as-root = mkdir -p /var/log/radicale endif = exec-as-root = if ! dpkg-statoverride --list /var/lib/radicale >/dev/null 2>&1; then chown radicale: /var/lib/radicale /var/lib/radicale/collections; chmod g-w,o-rwx /var/lib/radicale /var/lib/radicale/collections; fi exec-as-root = if ! dpkg-statoverride --list /var/log/radicale >/dev/null 2>&1; then chown radicale:adm /var/log/radicale; chmod g-w,o-rwx /var/log/radicale; fi -- 2.20.1
>From aaadffb4dd61cbf04a6fe4a8850fb5326c90ed3e Mon Sep 17 00:00:00 2001 From: Sunil Mohan Adapa <[email protected]> Date: Thu, 27 Jun 2019 19:17:13 -0700 Subject: [PATCH 2/2] uwsgi: Remove unused handling of /var/log/radicale Signed-off-by: Sunil Mohan Adapa <[email protected]> --- debian/etc/uwsgi/apps-available/radicale.ini | 5 ----- 1 file changed, 5 deletions(-) diff --git a/debian/etc/uwsgi/apps-available/radicale.ini b/debian/etc/uwsgi/apps-available/radicale.ini index 24b0535..eda350c 100644 --- a/debian/etc/uwsgi/apps-available/radicale.ini +++ b/debian/etc/uwsgi/apps-available/radicale.ini @@ -9,7 +9,6 @@ plugins = python3 #plugins = python3,logfile,http #https = 0.0.0.0:443,/etc/ssl/certs/ssl-cert-snakeoil.pem,/etc/ssl/private/ssl-cert-snakeoil.key,HIGH #log-format = %(addr) - %(user) [%(ltime)] "%(method) %(uri) %(proto)" %(status) %(size) "%(referer)" "%(uagent)" -#req-logger = file:/var/log/radicale/access.log # spawn 3 worker processes, growing to 16 as needed workers = 16 @@ -44,10 +43,6 @@ umask 027 if-not-exists = /var/lib/radicale/collections exec-as-root = mkdir -p /var/lib/radicale/collections endif = -if-not-exists = /var/log/radicale -exec-as-root = mkdir -p /var/log/radicale -endif = exec-as-root = if ! dpkg-statoverride --list /var/lib/radicale >/dev/null 2>&1; then chown radicale: /var/lib/radicale /var/lib/radicale/collections; chmod g-w,o-rwx /var/lib/radicale /var/lib/radicale/collections; fi -exec-as-root = if ! dpkg-statoverride --list /var/log/radicale >/dev/null 2>&1; then chown radicale:adm /var/log/radicale; chmod g-w,o-rwx /var/log/radicale; fi chdir2 = /var/lib/radicale/collections -- 2.20.1

