1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/radicale_ynh.git synced 2024-09-03 20:16:14 +02:00

3.1.5~ynh1

This commit is contained in:
yalh76 2022-04-14 23:14:40 +02:00
parent 9e6dd816e2
commit 776ae4875b
6 changed files with 64 additions and 81 deletions

View file

@ -15,29 +15,29 @@
# IPv4 syntax: address:port # IPv4 syntax: address:port
# IPv6 syntax: [address]:port # IPv6 syntax: [address]:port
# For example: 0.0.0.0:9999, [::]:9999 # For example: 0.0.0.0:9999, [::]:9999
# IPv6 adresses are configured to only allow IPv6 connections #hosts = localhost:5232
#hosts = 0.0.0.0:5232
# Daemon flag # Max parallel connections
#daemon = False #max_connections = 8
# File storing the PID in daemon mode # Max size of request body (bytes)
#pid = #max_content_length = 100000000
# Socket timeout (seconds)
#timeout = 30
# SSL flag, enable HTTPS protocol # SSL flag, enable HTTPS protocol
#ssl = False #ssl = False
# SSL certificate path # SSL certificate path
#certificate = /etc/apache2/ssl/server.crt #certificate = /etc/ssl/radicale.cert.pem
# SSL private key # 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 # CA certificate for validating clients. This can be used to secure
#protocol = PROTOCOL_SSLv23 # TCP traffic between Radicale and a reverse proxy
#certificate_authority =
# Ciphers available. See python's ssl module for available ciphers
#ciphers =
# Reverse DNS to resolve client address in logs # Reverse DNS to resolve client address in logs
dns_lookup = True dns_lookup = True
@ -48,9 +48,6 @@ base_prefix = __PATH__
# Possibility to allow URLs cleaned by a HTTP server, without the base_prefix # Possibility to allow URLs cleaned by a HTTP server, without the base_prefix
#can_skip_base_prefix = False #can_skip_base_prefix = False
# Message displayed in the client when a password is needed
#realm = Radicale - Password Required
[encoding] [encoding]
@ -61,30 +58,25 @@ request = utf-8
stock = 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] [auth]
# Authentication method # Authentication method
# Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom # Value: None | htpasswd | IMAP | LDAP | PAM | courier | http | remote_user | custom
type = LDAP type = LDAP
# Custom authentication handler
#custom_handler =
# Htpasswd filename # Htpasswd filename
#htpasswd_filename = /etc/radicale/users #htpasswd_filename = /etc/radicale/users
# Htpasswd encryption method # Htpasswd encryption method
# Value: plain | sha1 | ssha | crypt # Value: plain | bcrypt | md5
#htpasswd_encryption = crypt # 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 server URL, with protocol and port
ldap_url = ldap://localhost:389/ ldap_url = ldap://localhost:389/
@ -111,40 +103,13 @@ ldap_filter =
# LDAP scope of the search # LDAP scope of the search
ldap_scope = OneLevel 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 <radicale@example.com>
[rights] [rights]
# Rights backend # Rights backend
# Value: None | authenticated | owner_only | owner_write | from_file | custom # Value: none | authenticated | owner_only | owner_write | from_file
type = from_file type = from_file
# Custom rights handler
#custom_handler =
# File for rights management from_file # File for rights management from_file
file = /etc/radicale/rights file = /etc/radicale/rights
@ -152,28 +117,36 @@ file = /etc/radicale/rights
[storage] [storage]
# Storage backend # Storage backend
# ------- # Value: multifilesystem | multifilesystem_nolock
# WARNING: ONLY "filesystem" IS DOCUMENTED AND TESTED,
# OTHER BACKENDS ARE NOT READY FOR PRODUCTION.
# -------
# Value: filesystem | multifilesystem | database | custom
type = filesystem type = filesystem
# Custom storage handler
#custom_handler =
# Folder for storing local collections, created if not present # Folder for storing local collections, created if not present
filesystem_folder = __FINALPATH__/collections filesystem_folder = __FINALPATH__/collections
# Database URL for SQLAlchemy # Delete sync token that are older (seconds)
# dialect+driver://user:password@host/dbname[?key=value..] #max_sync_token_age = 2592000
# 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 # Command that is run after changes to storage
#database_url = # 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] [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 # Logging configuration file
# If no config is given, simple information is printed on the standard output # If no config is given, simple information is printed on the standard output
# For more information about the syntax of the configuration file, see: # For more information about the syntax of the configuration file, see:

View file

@ -12,7 +12,7 @@ chmod-socket = 666
# Plugin to use and interpretor config # Plugin to use and interpretor config
single-interpreter = true single-interpreter = true
master = true master = true
plugin = python plugin = python3
# Application base folder # Application base folder
base = /opt/yunohost/radicale base = /opt/yunohost/radicale

View file

@ -6,7 +6,7 @@
"en": "CalDAV (calendar) and CardDAV (contact) synchronization server", "en": "CalDAV (calendar) and CardDAV (contact) synchronization server",
"fr": "Serveur de synchronisation CalDAV et CardDAV" "fr": "Serveur de synchronisation CalDAV et CardDAV"
}, },
"version": "1.1.6~ynh6", "version": "3.1.5~ynh1",
"url": "http://radicale.org", "url": "http://radicale.org",
"upstream": { "upstream": {
"license": "GPL-3.0,AGPL-3.0", "license": "GPL-3.0,AGPL-3.0",

View file

@ -6,7 +6,7 @@
YNH_PHP_VERSION="7.3" 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 # BOOLEAN CONVERTER

View file

@ -145,12 +145,17 @@ fi
ynh_script_progression --message="Install Radicale in a virtualenv" ynh_script_progression --message="Install Radicale in a virtualenv"
# Init virtualenv # Init virtualenv
virtualenv /opt/yunohost/$app python3 -m venv /opt/yunohost/$app
version=$(ynh_app_setting_get --app=$app --key=version) set +u;
/opt/yunohost/$app/bin/pip install radicale==$version python-ldap 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. # 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 # useradd radicale -d /opt/yunohost/$app
chown radicale: -R /opt/yunohost/$app chown radicale: -R /opt/yunohost/$app

View file

@ -228,9 +228,14 @@ then
ynh_script_progression --message="Upgrade Radicale in its virtualenv" ynh_script_progression --message="Upgrade Radicale in its virtualenv"
# Upgrade pip packages # Upgrade pip packages
ynh_secure_remove --file="/opt/yunohost/$app" ynh_secure_remove --file="/opt/yunohost/$app"
virtualenv /opt/yunohost/$app python3 -m venv /opt/yunohost/$app
version=$(ynh_app_setting_get $app version $version) set +u;
bash -c "source /opt/yunohost/radicale/bin/activate && pip install radicale==$version python-ldap" 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. # 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