From de19f51761a8e933581a5a7feb2b243d810aa246 Mon Sep 17 00:00:00 2001 From: "CanbiZ (MickLesk)" <47820557+MickLesk@users.noreply.github.com> Date: Sun, 11 Oct 2026 14:03:06 +0200 Subject: [PATCH] Radicale: install the bcrypt and argon2 extras (#17813) * Radicale: install the bcrypt and argon2 extras The update replaces pyproject.toml and the venv, so a bcrypt or argon2 module added by hand was gone afterwards and Radicale refused to start with htpasswd_encryption = bcrypt, argon2 or autodetect. The service now runs uv with --extra bcrypt --extra argon2, which upstream already defines. The update patches existing units and restarts the service. * Radicale: enable the extras only once the code defines them argon2 is an extra since v3.5.4 and uv refuses unknown extras, so patching before the release update broke older installs. Patch after it instead, and only when pyproject.toml defines the extra. --- ct/radicale.sh | 10 +++++++++- install/radicale-install.sh | 2 +- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/ct/radicale.sh b/ct/radicale.sh index ffb0927fd..bc87e272e 100644 --- a/ct/radicale.sh +++ b/ct/radicale.sh @@ -41,7 +41,7 @@ function update_script() { if grep -q 'start.sh' /etc/systemd/system/radicale.service; then sed -i -e '/^Description/i[Unit]' \ -e '\|^ExecStart|iWorkingDirectory=/opt/radicale' \ - -e 's|^ExecStart=.*|ExecStart=/usr/local/bin/uv run -m radicale --config /etc/radicale/config|' /etc/systemd/system/radicale.service + -e 's|^ExecStart=.*|ExecStart=/usr/local/bin/uv run --extra bcrypt --extra argon2 -m radicale --config /etc/radicale/config|' /etc/systemd/system/radicale.service systemctl daemon-reload fi if [[ ! -f /etc/radicale/config ]]; then @@ -70,6 +70,14 @@ EOF msg_ok "Started service" msg_ok "Updated Successfully!" fi + + if grep -q 'uv run -m radicale' /etc/systemd/system/radicale.service && grep -q '^argon2 *=' /opt/radicale/pyproject.toml; then + msg_info "Enabling bcrypt/argon2 support" + sed -i 's|uv run -m radicale|uv run --extra bcrypt --extra argon2 -m radicale|' /etc/systemd/system/radicale.service + systemctl daemon-reload + systemctl restart radicale + msg_ok "Enabled bcrypt/argon2 support" + fi exit } diff --git a/install/radicale-install.sh b/install/radicale-install.sh index d16c19e41..7eab2e159 100644 --- a/install/radicale-install.sh +++ b/install/radicale-install.sh @@ -58,7 +58,7 @@ Requires=network.target [Service] WorkingDirectory=/opt/radicale -ExecStart=/usr/local/bin/uv run -m radicale --config /etc/radicale/config +ExecStart=/usr/local/bin/uv run --extra bcrypt --extra argon2 -m radicale --config /etc/radicale/config Restart=on-failure # User=radicale # Deny other users access to the calendar data