Watch
2
0
Fork
You've already forked agendav_ynh
0
mirror of https://github.com/YunoHost-Apps/agendav_ynh.git synced 2026-09-28 05:35:07 +02:00
AgenDAV package for YunoHost
  • Shell 88%
  • PHP 12%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
eric_G fbdc0b1d3d
Testing (#85)
* 3.3.1 (#82)

* update

* Auto-update READMEs

* Update nginx.conf

* cleaning

* Update install

* Update tests.toml

* Update manifest.toml

* Delete 00-add-http-auth.patch

* Update tests.toml

* cleaning

* cleaning

* Update install

* Update install

* Update settings.php

* 3.3.1 Fixes (#84)

* Fix install/upgrade/backup/restore: generate session_key, use flattened 3.x layout

Port the vetted lifecycle scripts from testing. Install now generates the
managed session_key (settings.php uses __SESSION_KEY__), fixing the CI crash
'Variable $session_key wasn't initialized'. Also use bin/agendavcli, the
config/ and var/cache paths of the flattened 3.3.1 tarball (no web/ subdir),
and chown /var/log/$app.

* Restore SSO nginx routing, fix radicale detection and apt deps

- nginx.conf: restore the named-location front-controller fallback (avoids the
  SSOWat alias+try_files XHR bug) and forward REMOTE_USER + HTTP_AUTHORIZATION so
  AgenDAV's HttpBasic auth works behind the SSO.
- _common.sh: radicale branch now returns installed_radicale[0] instead of
  installed_baikal[0].
- manifest.toml: ldap/sso back to true; apt deps trimmed to the extensions the
  app actually needs (drop redundant xmlreader/xmlwriter, already in php8.5-xml,
  and unneeded mcrypt/tokenizer; restore php8.5-fpm/cli/intl).

* refactor: render settings.php through one shared helper

install and upgrade held the same 8-line config block verbatim, and
change_url needs it a third time. Extract _ynh_agendav_config_settings
into _common.sh and call it from both.

* fix: regenerate settings.php on change_url

change_url only regenerated the nginx conf. settings.php carries
'app.base_path', which public/index.php passes to Slim's setBasePath(),
so after a URL change the router still matched the old prefix and the new
URL returned 404 — which is what package_check's Change url test caught.

Also purges var/cache and restores the 750 / app:www-data invariant on
config/ after the rewrite.

* fix: render the app config before switching NGINX in change_url

_ynh_agendav_config_settings dies when no CalDAV backend is installed.
Running it after ynh_config_change_url_nginx meant that abort left NGINX
already pointing at the new URL while settings.php still had the old
app.base_path — a half-migrated app that YunoHost will not auto-revert.
The two operations are independent, so doing the config first makes that
failure a clean no-op.

* conf: include fastcgi_params_with_auth instead of hand-rolled params

fastcgi_params_with_auth is a strict superset of what was here and defines
fastcgi_split_path_info identically, so this only removes duplication.

REMOTE_USER was dead twice over: AgenDAV's HttpBasic never reads it, and
ynh_config_add_nginx sed-deletes any REMOTE_USER line from the generated
conf anyway. HTTP_AUTHORIZATION stays explicit because the include does
not provide it and HttpBasic needs it.

Clears four linter warnings and makes the conf consistent with sso = true.

* manifest: ldap = false, AgenDAV does not use LDAP

Upstream removed it deliberately. CHANGELOG.md:395 reads 'Remove LDAP
dependency. AgenDAV now authenticates against CalDAV server'. There are
no LDAP references in the non-vendor source, no symfony/ldap or ext-ldap
in composer.json, and no php8.5-ldap in [resources.apt]. AgenDAV binds
against Baikal/Radicale; whether that backend is directory-backed is the
backend's business.

false rather than not_relevant, because not_relevant means no user or
account system at all and AgenDAV has one.

This flag has been flipped four times (b18498a, df69868, fdf7038,
cfa9333, 9d1ceeb) with no reason recorded — hence the detail here.

* fix: probe for a CalDAV backend before replacing the source tree

The recent settings.php refactor moved the Baikal/Radicale lookup inside
_ynh_agendav_config_settings, which now runs after ynh_setup_source has
already replaced the install tree and nginx/php-fpm/logrotate have been
rewritten. If an admin removes or renames the CalDAV backend before an
upgrade, what used to be an instant, side-effect-free ynh_die is now a
failed upgrade on a tree whose settings.php no longer exists (it is
intentionally not --kept), sending YunoHost core down its heavier
app_remove + backup_restore safety path.

Add a cheap guard at the top of install and upgrade, before
ynh_setup_source runs, that calls _ynh_agendav_find_caldav_app purely
for its ynh_die side effect. _ynh_agendav_config_settings still does
its own lookup further down; nothing is captured or reused here.

* fix: anchor the group D check to command position, not free text

The new check greped for _ynh_agendav_find_caldav_app and
ynh_setup_source anywhere in the file, so it matched comment lines as
well as actual calls. That forced the guard's own explanatory comment
to avoid the literal phrase "ynh_setup_source", which is a trap for
the next person who writes the natural sentence.

Anchor both greps to start-of-line (allowing only leading whitespace)
so they can only match the real calls, never a '#'-prefixed comment.
This frees the guard comment in install and upgrade to name the
helper it is protecting against again.

* chore: add madtibo as maintainer

---------

Co-authored-by: Thibaut MADELAINE <madtibo@5432.tech>

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: oleole39 <59071673+oleole39@users.noreply.github.com>
Co-authored-by: Thibaut MADELAINE <madtibo@5432.tech>

* cleaning

---------

Co-authored-by: yunohost-bot <yunohost@yunohost.org>
Co-authored-by: oleole39 <59071673+oleole39@users.noreply.github.com>
Co-authored-by: Thibaut MADELAINE <madtibo@5432.tech>
2026-09-01 19:57:31 +02:00
.github Cleaning (#73) 2023-10-01 10:16:58 +02:00
conf Testing (#85) 2026-09-01 19:57:31 +02:00
doc Improve 2025-03-23 17:43:42 +01:00
scripts Testing (#85) 2026-09-01 19:57:31 +02:00
.gitignore Testing (#85) 2026-09-01 19:57:31 +02:00
LICENSE [enh] Add LICENSE and some manifest keys 2016-05-13 18:44:34 +02:00
manifest.toml Testing (#85) 2026-09-01 19:57:31 +02:00
README.md Testing (#85) 2026-09-01 19:57:31 +02:00
tests.toml Testing (#85) 2026-09-01 19:57:31 +02:00

Logo of AgenDAV AgenDAV, packaged for YunoHost

CalDAV web client

App Demo Version: 3.3.1~ynh1

Screenshots

Screenshot of AgenDAV

📦 Developer info

Automatic tests level

🛠️ Upstream AgenDAV repository: https://github.com/agendav/agendav

Pull request are welcome and should target the testing branch.

The testing branch can be tested using:

# fresh install:
sudo yunohost app install https://github.com/YunoHost-Apps/agendav_ynh/tree/testing

# upgrade an existing install:
sudo yunohost app upgrade agendav -u https://github.com/YunoHost-Apps/agendav_ynh/tree/testing

📚 App packaging documentation

Please see https://doc.yunohost.org/packaging_apps for more information.