diff --git a/conf/config b/conf/config index 91c9dab..477cc28 100644 --- a/conf/config +++ b/conf/config @@ -15,29 +15,29 @@ # IPv4 syntax: address:port # IPv6 syntax: [address]:port # For example: 0.0.0.0:9999, [::]:9999 -# IPv6 adresses are configured to only allow IPv6 connections -#hosts = 0.0.0.0:5232 +#hosts = localhost:5232 -# Daemon flag -#daemon = False +# Max parallel connections +#max_connections = 8 -# File storing the PID in daemon mode -#pid = +# Max size of request body (bytes) +#max_content_length = 100000000 + +# Socket timeout (seconds) +#timeout = 30 # SSL flag, enable HTTPS protocol #ssl = False # SSL certificate path -#certificate = /etc/apache2/ssl/server.crt +#certificate = /etc/ssl/radicale.cert.pem # SSL private key -#key = /etc/apache2/ssl/server.key +#key = /etc/ssl/radicale.key.pem -# SSL Protocol used. See python's ssl module for available values -#protocol = PROTOCOL_SSLv23 - -# Ciphers available. See python's ssl module for available ciphers -#ciphers = +# CA certificate for validating clients. This can be used to secure +# TCP traffic between Radicale and a reverse proxy +#certificate_authority = # Reverse DNS to resolve client address in logs dns_lookup = True @@ -48,9 +48,6 @@ base_prefix = __PATH__ # Possibility to allow URLs cleaned by a HTTP server, without the base_prefix #can_skip_base_prefix = False -# Message displayed in the client when a password is needed -#realm = Radicale - Password Required - [encoding] @@ -61,30 +58,25 @@ request = utf-8 stock = utf-8 -[well-known] - -# Path where /.well-known/caldav/ is redirected -#caldav = '/%(user)s/caldav/' - -# Path where /.well-known/carddav/ is redirected -#carddav = '/%(user)s/carddav/' - - [auth] # Authentication method # Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom type = LDAP -# Custom authentication handler -#custom_handler = - # Htpasswd filename #htpasswd_filename = /etc/radicale/users # Htpasswd encryption method -# Value: plain | sha1 | ssha | crypt -#htpasswd_encryption = crypt +# Value: plain | bcrypt | md5 +# bcrypt requires the installation of radicale[bcrypt]. +#htpasswd_encryption = md5 + +# Incorrect authentication delay (seconds) +#delay = 1 + +# Message displayed in the client when a password is needed +#realm = Radicale - Password Required # LDAP server URL, with protocol and port ldap_url = ldap://localhost:389/ @@ -111,40 +103,13 @@ ldap_filter = # LDAP scope of the search ldap_scope = OneLevel -# IMAP Configuration -#imap_hostname = localhost -#imap_port = 143 -#imap_ssl = False - -# PAM group user should be member of -#pam_group_membership = - -# Path to the Courier Authdaemon socket -#courier_socket = - -# HTTP authentication request URL endpoint -#http_url = -# POST parameter to use for username -#http_user_parameter = -# POST parameter to use for password -#http_password_parameter = - - -[git] - -# Git default options -#committer = Radicale - [rights] # Rights backend -# Value: None | authenticated | owner_only | owner_write | from_file | custom +# Value: none | authenticated | owner_only | owner_write | from_file type = from_file -# Custom rights handler -#custom_handler = - # File for rights management from_file file = /etc/radicale/rights @@ -152,28 +117,36 @@ file = /etc/radicale/rights [storage] # Storage backend -# ------- -# WARNING: ONLY "filesystem" IS DOCUMENTED AND TESTED, -# OTHER BACKENDS ARE NOT READY FOR PRODUCTION. -# ------- -# Value: filesystem | multifilesystem | database | custom +# Value: multifilesystem | multifilesystem_nolock type = filesystem -# Custom storage handler -#custom_handler = - # Folder for storing local collections, created if not present filesystem_folder = __FINALPATH__/collections -# Database URL for SQLAlchemy -# dialect+driver://user:password@host/dbname[?key=value..] -# For example: sqlite:///var/db/radicale.db, postgresql://user:password@localhost/radicale -# See http://docs.sqlalchemy.org/en/rel_0_8/core/engines.html#sqlalchemy.create_engine -#database_url = +# Delete sync token that are older (seconds) +#max_sync_token_age = 2592000 + +# Command that is run after changes to storage +# Example: ([ -d .git ] || git init) && git add -A && (git diff --cached --quiet || git commit -m "Changes by "%(user)s) +#hook = + + +[web] + +# Web interface backend +# Value: none | internal +#type = internal [logging] +# Threshold for the logger +# Value: debug | info | warning | error | critical +#level = warning + +# Don't include passwords in logs +#mask_passwords = True + # Logging configuration file # If no config is given, simple information is printed on the standard output # For more information about the syntax of the configuration file, see: diff --git a/conf/radicale.ini b/conf/radicale.ini index f941ee1..63c700c 100644 --- a/conf/radicale.ini +++ b/conf/radicale.ini @@ -12,7 +12,7 @@ chmod-socket = 666 # Plugin to use and interpretor config single-interpreter = true master = true -plugin = python +plugin = python3 # Application base folder base = /opt/yunohost/radicale diff --git a/manifest.json b/manifest.json index eaca62e..a518afc 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "CalDAV (calendar) and CardDAV (contact) synchronization server", "fr": "Serveur de synchronisation CalDAV et CardDAV" }, - "version": "1.1.6~ynh6", + "version": "3.1.5~ynh1", "url": "http://radicale.org", "upstream": { "license": "GPL-3.0,AGPL-3.0", diff --git a/scripts/_common.sh b/scripts/_common.sh index 3f2693c..65e1c63 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -6,7 +6,7 @@ YNH_PHP_VERSION="7.3" -pkg_dependencies="python-pip python-virtualenv virtualenv python-dev libldap2-dev libsasl2-dev libssl-dev uwsgi uwsgi-plugin-python" +pkg_dependencies="python3-pip python3-venv python3-dev libldap2-dev libsasl2-dev libssl-dev uwsgi uwsgi-plugin-python" #================================================= # BOOLEAN CONVERTER diff --git a/scripts/install b/scripts/install index 77ff61a..772298a 100755 --- a/scripts/install +++ b/scripts/install @@ -145,12 +145,17 @@ fi ynh_script_progression --message="Install Radicale in a virtualenv" # Init virtualenv -virtualenv /opt/yunohost/$app -version=$(ynh_app_setting_get --app=$app --key=version) -/opt/yunohost/$app/bin/pip install radicale==$version python-ldap +python3 -m venv /opt/yunohost/$app +set +u; +source /opt/yunohost/$app/bin/activate +set -u; +pip install radicale==$version python3-ldap +set +u; +deactivate +set -u; # regex.py file is patched to fix the awful commit e807c3d35bea9cfcfcacac83b1b17d748ea15a39 that stop the reading of "rights" file after the first match. -mv "$final_path/regex.py" /opt/yunohost/$app/lib/python*/site-packages/radicale/rights/regex.py +#mv "$final_path/regex.py" /opt/yunohost/$app/lib/python*/site-packages/radicale/rights/regex.py # useradd radicale -d /opt/yunohost/$app chown radicale: -R /opt/yunohost/$app diff --git a/scripts/upgrade b/scripts/upgrade index b7612d2..5c2aa9e 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -228,9 +228,14 @@ then ynh_script_progression --message="Upgrade Radicale in its virtualenv" # Upgrade pip packages ynh_secure_remove --file="/opt/yunohost/$app" - virtualenv /opt/yunohost/$app - version=$(ynh_app_setting_get $app version $version) - bash -c "source /opt/yunohost/radicale/bin/activate && pip install radicale==$version python-ldap" + python3 -m venv /opt/yunohost/$app + set +u; + source /opt/yunohost/$app/bin/activate + set -u; + pip install radicale==$version python3-ldap + set +u; + deactivate + set -u; # regex.py file is patched to fix the awful commit e807c3d35bea9cfcfcacac83b1b17d748ea15a39 that stop the reading of "rights" file after the first match. mv "$final_path/regex.py" /opt/yunohost/$app/lib/python*/site-packages/radicale/rights/regex.py