diff --git a/CHANGELOG.md b/CHANGELOG.md index 2a1626fff7..98d225c765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,5 +1,59 @@ # Changelog +## [16.2.1] - 2026-10-20 + +Fixed: + +- Cache: the package cache frontend starts again; 16.2.0 broke its nginx +- Snipe-IT: SSO login works again on v8.8.1 behind oauth2-proxy +- Snipe-IT: the SSO header is only trusted with the proxy's shared secret +- Wazuh: seeded bcrypt salts no longer leak a fast password digest + +Version jumps (net since 16.2.0): + +- *web-app-socialhome*: 2026.10.17 to 2026.10.20 + +Upgrade notes: + +- Snipe-IT: re-run *infinito administration inventory provision* once + +Contributors: + +- [Kevin Veen-Birkenbach](https://veen.world): cache, Snipe-IT SSO, bcrypt + +## [16.2.0] - 2026-10-20 + +Added: + +- Compose: *make compose-network-recreate* rebuilds the stack network safely +- CI: the updater keeps the GitHub-hosted runner labels current + +Fixed: + +- Backup: hard links, ACLs and xattrs survive every backup and recover hop +- NFS client: clients on Linux 6.19+ no longer fail writes on ganesha < 9.11 +- AppArmor: the teardown keeps docker-default, so containers keep starting +- Wazuh: hosts can be put into WireGuard meshes like every other role +- CI: GitHub-hosted runners are pinned to ubuntu-24.04 + +Version jumps (net since 16.1.0): + +- *svc-db-rabbitmq*: 4.3-management-alpine to 4.4-management-alpine +- *web-app-n8n*: 2.44.4 to 2.45.0 +- *web-app-pixelfed*: 20261019 to 20261020 +- *web-app-snipe-it*: v8.8.0-alpine to v8.8.1-alpine +- *web-app-taiga*: RabbitMQ 4.3-management-alpine to 4.4-management-alpine +- *eslint* (dev): ^10.12.0 to ^10.13.0 + +Upgrade notes: + +- Backup: a target without xattr support now fails instead of losing them +- Dev: worktree hosts apply the IP pool with *make compose-network-recreate* + +Contributors: + +- [Kevin Veen-Birkenbach](https://veen.world): backups, NFS, AppArmor, CI + ## [16.1.0] - 2026-10-19 Added: diff --git a/cli/__init__.py b/cli/__init__.py index 9f4a6a3289..29a52ec495 100644 --- a/cli/__init__.py +++ b/cli/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[1] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/administration/deploy/runner/__init__.py b/cli/administration/deploy/runner/__init__.py index 14b7e7361a..0be6d2a841 100644 --- a/cli/administration/deploy/runner/__init__.py +++ b/cli/administration/deploy/runner/__init__.py @@ -3,3 +3,5 @@ from __future__ import annotations from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/administration/recover/README.md b/cli/administration/recover/README.md index 64aa753e32..a11c05d2d9 100644 --- a/cli/administration/recover/README.md +++ b/cli/administration/recover/README.md @@ -78,7 +78,7 @@ expanding `volume` per docker volume. ## Safety -Each recover mirrors a snapshot with `rsync -a --delete` and first runs the +Each recover mirrors a snapshot with `rsync -aHAX --delete` and first runs the role's backup unit as a rollback point. `--no-safety-backup` skips that (only when the target holds nothing worth saving: fresh host / empty / disposable). `--preview` prints the exact commands without running them. diff --git a/cli/administration/recover/full.py b/cli/administration/recover/full.py index 63e90ea3f9..b73bbe888a 100644 --- a/cli/administration/recover/full.py +++ b/cli/administration/recover/full.py @@ -72,7 +72,7 @@ def plan(root: Path) -> tuple[list[tuple[str, str]], list[str]]: def _pull_cmd(source: str) -> list[str]: remote = source if ":" in source else f"{source}:{paths.BACKUP_ROOT}" - return ["rsync", "-a", f"{remote}/", f"{PULL_STAGE}/"] + return ["rsync", "-aHAX", f"{remote}/", f"{PULL_STAGE}/"] def _is_device(source: str) -> bool: diff --git a/cli/administration/recover/remote.py b/cli/administration/recover/remote.py index 44c7b72994..2626ea42f5 100644 --- a/cli/administration/recover/remote.py +++ b/cli/administration/recover/remote.py @@ -47,7 +47,7 @@ def commands( return ( [ ["ssh", host, shlex.join(remote)], - ["rsync", "-a", f"{host}:{REMOTE_ROOT}/", f"{LOCAL_ROOT}/"], + ["rsync", "-aHAX", f"{host}:{REMOTE_ROOT}/", f"{LOCAL_ROOT}/"], ], LOCAL_ROOT, ) diff --git a/cli/administration/recover/schema.yml b/cli/administration/recover/schema.yml index 8a14dda950..a854298a23 100644 --- a/cli/administration/recover/schema.yml +++ b/cli/administration/recover/schema.yml @@ -58,4 +58,4 @@ flags: skip the pre-recover safety backup of the current target (only when it holds nothing worth saving: fresh host / empty / disposable) -mechanism: "rsync -a --delete, preceded by a pre-recover safety backup by default" +mechanism: "rsync -aHAX --delete, preceded by a pre-recover safety backup by default" diff --git a/cli/build/docs/integration_matrix/__init__.py b/cli/build/docs/integration_matrix/__init__.py index 1d48518cec..3622064c5e 100644 --- a/cli/build/docs/integration_matrix/__init__.py +++ b/cli/build/docs/integration_matrix/__init__.py @@ -10,3 +10,5 @@ from __future__ import annotations from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/build/tree/__init__.py b/cli/build/tree/__init__.py index 189667f78b..ba83f47252 100644 --- a/cli/build/tree/__init__.py +++ b/cli/build/tree/__init__.py @@ -4,6 +4,15 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] +__all__ = [ + "PROJECT_ROOT", + "build_mappings", + "find_roles", + "main", + "output_graph", + "process_role", +] + from . import __main__ as _main # noqa: E402 build_mappings = _main.build_mappings diff --git a/cli/contributing/update/collection_source/__init__.py b/cli/contributing/update/collection_source/__init__.py index ab2c0b6137..6e89eae234 100644 --- a/cli/contributing/update/collection_source/__init__.py +++ b/cli/contributing/update/collection_source/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/contributing/update/docker/__init__.py b/cli/contributing/update/docker/__init__.py index b9b716f02d..0d4e8d4485 100644 --- a/cli/contributing/update/docker/__init__.py +++ b/cli/contributing/update/docker/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/contributing/update/galaxy/__init__.py b/cli/contributing/update/galaxy/__init__.py index f79db0b735..9a92af7804 100644 --- a/cli/contributing/update/galaxy/__init__.py +++ b/cli/contributing/update/galaxy/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/contributing/update/pip/__init__.py b/cli/contributing/update/pip/__init__.py index 427a508803..0edb5a2c18 100644 --- a/cli/contributing/update/pip/__init__.py +++ b/cli/contributing/update/pip/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/contributing/update/repository/__init__.py b/cli/contributing/update/repository/__init__.py index d4057cef8d..55857f43cc 100644 --- a/cli/contributing/update/repository/__init__.py +++ b/cli/contributing/update/repository/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/contributing/update/runner/__init__.py b/cli/contributing/update/runner/__init__.py index 9b7a055ab0..247a64576a 100644 --- a/cli/contributing/update/runner/__init__.py +++ b/cli/contributing/update/runner/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/contributing/update/source/__init__.py b/cli/contributing/update/source/__init__.py index 0f6478c67a..bbd236ccce 100644 --- a/cli/contributing/update/source/__init__.py +++ b/cli/contributing/update/source/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/core/__init__.py b/cli/core/__init__.py index a11dbb1745..8125c38905 100644 --- a/cli/core/__init__.py +++ b/cli/core/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/domains/__init__.py b/cli/meta/domains/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/cli/meta/domains/__init__.py +++ b/cli/meta/domains/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/env/__init__.py b/cli/meta/env/__init__.py index 3b325d12fb..dae468a3c0 100644 --- a/cli/meta/env/__init__.py +++ b/cli/meta/env/__init__.py @@ -9,3 +9,5 @@ resulting `.env` at the repo root. Implementation lives in from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/roles/applications/invokable/__init__.py b/cli/meta/roles/applications/invokable/__init__.py index e9ac86d477..f5da6fa522 100644 --- a/cli/meta/roles/applications/invokable/__init__.py +++ b/cli/meta/roles/applications/invokable/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations -__all__: list[str] = [] - from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/roles/applications/resolution/combined/__init__.py b/cli/meta/roles/applications/resolution/combined/__init__.py index 9f69c70b47..087c384b57 100644 --- a/cli/meta/roles/applications/resolution/combined/__init__.py +++ b/cli/meta/roles/applications/resolution/combined/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/roles/applications/resolution/dependencies/__init__.py b/cli/meta/roles/applications/resolution/dependencies/__init__.py index 9f69c70b47..087c384b57 100644 --- a/cli/meta/roles/applications/resolution/dependencies/__init__.py +++ b/cli/meta/roles/applications/resolution/dependencies/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/roles/applications/resolution/run_after/__init__.py b/cli/meta/roles/applications/resolution/run_after/__init__.py index 9f69c70b47..087c384b57 100644 --- a/cli/meta/roles/applications/resolution/run_after/__init__.py +++ b/cli/meta/roles/applications/resolution/run_after/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/roles/applications/ressources/__init__.py b/cli/meta/roles/applications/ressources/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/cli/meta/roles/applications/ressources/__init__.py +++ b/cli/meta/roles/applications/ressources/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/roles/applications/sufficient_storage/__init__.py b/cli/meta/roles/applications/sufficient_storage/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/cli/meta/roles/applications/sufficient_storage/__init__.py +++ b/cli/meta/roles/applications/sufficient_storage/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/roles/applications/type/__init__.py b/cli/meta/roles/applications/type/__init__.py index e9ac86d477..f5da6fa522 100644 --- a/cli/meta/roles/applications/type/__init__.py +++ b/cli/meta/roles/applications/type/__init__.py @@ -1,7 +1,7 @@ from __future__ import annotations -__all__: list[str] = [] - from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/cli/meta/runtime/__init__.py b/cli/meta/runtime/__init__.py index 105048b62c..f3cd3eb0f6 100644 --- a/cli/meta/runtime/__init__.py +++ b/cli/meta/runtime/__init__.py @@ -5,6 +5,8 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] +__all__ = ["PROJECT_ROOT", "detect_runtime"] + def detect_runtime() -> str: """ diff --git a/packaging/arch/PKGBUILD b/packaging/arch/PKGBUILD index 32b4c239a6..3d0f24b702 100644 --- a/packaging/arch/PKGBUILD +++ b/packaging/arch/PKGBUILD @@ -1,7 +1,7 @@ # Maintainer: Kevin Veen-Birkenbach pkgname=infinito-nexus -pkgver=16.1.0 +pkgver=16.2.1 pkgrel=1 pkgdesc="Meta package for Infinito.Nexus host dependencies (dev + CI)." arch=('any') diff --git a/packaging/debian/changelog b/packaging/debian/changelog index 7130893af6..103fd7dd93 100644 --- a/packaging/debian/changelog +++ b/packaging/debian/changelog @@ -1,3 +1,61 @@ +infinito-nexus (16.2.1-1) unstable; urgency=medium + + Fixed: + + - Cache: the package cache frontend starts again; 16.2.0 broke its nginx + - Snipe-IT: SSO login works again on v8.8.1 behind oauth2-proxy + - Snipe-IT: the SSO header is only trusted with the proxy's shared secret + - Wazuh: seeded bcrypt salts no longer leak a fast password digest + + Version jumps (net since 16.2.0): + + - *web-app-socialhome*: 2026.10.17 to 2026.10.20 + + Upgrade notes: + + - Snipe-IT: re-run *infinito administration inventory provision* once + + Contributors: + + - [Kevin Veen-Birkenbach](https://veen.world): cache, Snipe-IT SSO, bcrypt + + -- Kevin Veen-Birkenbach Tue, 20 Oct 2026 22:35:05 +0200 + +infinito-nexus (16.2.0-1) unstable; urgency=medium + + Added: + + - Compose: *make compose-network-recreate* rebuilds the stack network safely + - CI: the updater keeps the GitHub-hosted runner labels current + + Fixed: + + - Backup: hard links, ACLs and xattrs survive every backup and recover hop + - NFS client: clients on Linux 6.19+ no longer fail writes on ganesha < 9.11 + - AppArmor: the teardown keeps docker-default, so containers keep starting + - Wazuh: hosts can be put into WireGuard meshes like every other role + - CI: GitHub-hosted runners are pinned to ubuntu-24.04 + + Version jumps (net since 16.1.0): + + - *svc-db-rabbitmq*: 4.3-management-alpine to 4.4-management-alpine + - *web-app-n8n*: 2.44.4 to 2.45.0 + - *web-app-pixelfed*: 20261019 to 20261020 + - *web-app-snipe-it*: v8.8.0-alpine to v8.8.1-alpine + - *web-app-taiga*: RabbitMQ 4.3-management-alpine to 4.4-management-alpine + - *eslint* (dev): ^10.12.0 to ^10.13.0 + + Upgrade notes: + + - Backup: a target without xattr support now fails instead of losing them + - Dev: worktree hosts apply the IP pool with *make compose-network-recreate* + + Contributors: + + - [Kevin Veen-Birkenbach](https://veen.world): backups, NFS, AppArmor, CI + + -- Kevin Veen-Birkenbach Tue, 20 Oct 2026 21:11:50 +0200 + infinito-nexus (16.1.0-1) unstable; urgency=medium Added: diff --git a/packaging/fedora/infinito-nexus.spec b/packaging/fedora/infinito-nexus.spec index fa0b42a559..198d8b1f29 100644 --- a/packaging/fedora/infinito-nexus.spec +++ b/packaging/fedora/infinito-nexus.spec @@ -1,5 +1,5 @@ Name: infinito-nexus -Version: 16.1.0 +Version: 16.2.1 Release: 1%{?dist} Summary: Meta package for Infinito.Nexus host dependencies @@ -58,6 +58,58 @@ install -d %{buildroot}%{_docdir}/%{name} %doc %{_docdir}/%{name}/DEPENDENCIES %changelog +* Tue Oct 20 2026 Kevin Veen-Birkenbach - 16.2.1-1 +- Fixed: + +- - Cache: the package cache frontend starts again; 16.2.0 broke its nginx +- - Snipe-IT: SSO login works again on v8.8.1 behind oauth2-proxy +- - Snipe-IT: the SSO header is only trusted with the proxy's shared secret +- - Wazuh: seeded bcrypt salts no longer leak a fast password digest + +- Version jumps (net since 16.2.0): + +- - *web-app-socialhome*: 2026.10.17 to 2026.10.20 + +- Upgrade notes: + +- - Snipe-IT: re-run *infinito administration inventory provision* once + +- Contributors: + +- - [Kevin Veen-Birkenbach](https://veen.world): cache, Snipe-IT SSO, bcrypt + +* Tue Oct 20 2026 Kevin Veen-Birkenbach - 16.2.0-1 +- Added: + +- - Compose: *make compose-network-recreate* rebuilds the stack network safely +- - CI: the updater keeps the GitHub-hosted runner labels current + +- Fixed: + +- - Backup: hard links, ACLs and xattrs survive every backup and recover hop +- - NFS client: clients on Linux 6.19+ no longer fail writes on ganesha < 9.11 +- - AppArmor: the teardown keeps docker-default, so containers keep starting +- - Wazuh: hosts can be put into WireGuard meshes like every other role +- - CI: GitHub-hosted runners are pinned to ubuntu-24.04 + +- Version jumps (net since 16.1.0): + +- - *svc-db-rabbitmq*: 4.3-management-alpine to 4.4-management-alpine +- - *web-app-n8n*: 2.44.4 to 2.45.0 +- - *web-app-pixelfed*: 20261019 to 20261020 +- - *web-app-snipe-it*: v8.8.0-alpine to v8.8.1-alpine +- - *web-app-taiga*: RabbitMQ 4.3-management-alpine to 4.4-management-alpine +- - *eslint* (dev): ^10.12.0 to ^10.13.0 + +- Upgrade notes: + +- - Backup: a target without xattr support now fails instead of losing them +- - Dev: worktree hosts apply the IP pool with *make compose-network-recreate* + +- Contributors: + +- - [Kevin Veen-Birkenbach](https://veen.world): backups, NFS, AppArmor, CI + * Mon Oct 19 2026 Kevin Veen-Birkenbach - 16.1.0-1 - Added: diff --git a/plugins/filter/__init__.py b/plugins/filter/__init__.py index a11dbb1745..e69de29bb2 100644 --- a/plugins/filter/__init__.py +++ b/plugins/filter/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] diff --git a/plugins/filter/bcrypt_hash.py b/plugins/filter/bcrypt_hash.py index 2f9d5e91e1..3eee1aae25 100644 --- a/plugins/filter/bcrypt_hash.py +++ b/plugins/filter/bcrypt_hash.py @@ -23,18 +23,17 @@ _STD_TO_BCRYPT_B64 = bytes.maketrans( ) -def _seeded_salt(seed: str, secret: bytes) -> bytes: - """A fixed bcrypt salt derived from the seed and the secret. +def _seeded_salt(seed: str) -> bytes: + """A fixed bcrypt salt derived from the seed alone. Args: seed: caller-chosen, non-empty string that separates otherwise equal secrets. - secret: the UTF-8 encoded secret being hashed. Returns: ``$2b$12$`` plus 22 bcrypt-base64 characters encoding the first 16 - bytes of sha256(seed + secret). + bytes of sha256(seed). """ - digest = hashlib.sha256(seed.encode("utf-8") + secret).digest()[:16] + digest = hashlib.sha256(seed.encode("utf-8")).digest()[:16] encoded = base64.b64encode(digest)[:22].translate(_STD_TO_BCRYPT_B64) return b"$2b$12$" + encoded @@ -61,7 +60,7 @@ class FilterModule: if salt_seed is None: salt = bcrypt.gensalt() elif isinstance(salt_seed, str) and salt_seed: - salt = _seeded_salt(salt_seed, secret) + salt = _seeded_salt(salt_seed) else: raise ValueError( "bcrypt_hash: salt_seed must be a non-empty string when given" diff --git a/plugins/lookup/__init__.py b/plugins/lookup/__init__.py index a11dbb1745..8125c38905 100644 --- a/plugins/lookup/__init__.py +++ b/plugins/lookup/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/pyproject.toml b/pyproject.toml index 91d16d1233..a00a1d1f0b 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" [project] name = "infinito-nexus" -version = "16.1.0" +version = "16.2.1" description = "Infinito.Nexus" readme = "README.md" requires-python = ">=3.11" diff --git a/roles/svc-bkp-local-2-device/README.md b/roles/svc-bkp-local-2-device/README.md index aca5be1eb3..962a9a2ce9 100644 --- a/roles/svc-bkp-local-2-device/README.md +++ b/roles/svc-bkp-local-2-device/README.md @@ -97,7 +97,7 @@ Run `files/python/recover.py` on the host with the backup device attached: recover.py /dev/sdX1 /mnt/usb-recover /var/lib/infinito/backup [--snapshot ] ``` -The script opens the LUKS device (interactive passphrase prompt; `--passphrase-stdin` for automation), mounts it, picks the newest device snapshot across every machine hash (a fresh host after total loss has a new machine id), mirrors it into the target (`rsync -a --delete`) and unmounts/closes the device again. No pre-recover service backup runs: the device itself is the backup this role maintains. Afterwards restore individual applications from the backup root with the matching role's `recover.py` (`svc-bkp-volume-2-local` for docker volumes, `svc-bkp-nfs-2-local` for NFS exports). +The script opens the LUKS device (interactive passphrase prompt; `--passphrase-stdin` for automation), mounts it, picks the newest device snapshot across every machine hash (a fresh host after total loss has a new machine id), mirrors it into the target (`rsync -aHAX --delete`) and unmounts/closes the device again. No pre-recover service backup runs: the device itself is the backup this role maintains. Afterwards restore individual applications from the backup root with the matching role's `recover.py` (`svc-bkp-volume-2-local` for docker volumes, `svc-bkp-nfs-2-local` for NFS exports). ## Credits diff --git a/roles/svc-bkp-local-2-device/files/python/recover.py b/roles/svc-bkp-local-2-device/files/python/recover.py index beaff5b0b6..f7c21954df 100755 --- a/roles/svc-bkp-local-2-device/files/python/recover.py +++ b/roles/svc-bkp-local-2-device/files/python/recover.py @@ -8,7 +8,7 @@ Opens the LUKS device (interactive passphrase prompt, or stdin with ``--passphrase-stdin``), mounts it, picks the newest device snapshot (any machine hash: a fresh host after total loss has a new /etc/machine-id) and mirrors it into the target -(``rsync -a --delete``), then unmounts and closes the device again. +(``rsync -aHAX --delete``), then unmounts and closes the device again. No pre-recover service backup runs: the device itself is the backup this role maintains. diff --git a/roles/svc-bkp-local-2-device/files/python/script.py b/roles/svc-bkp-local-2-device/files/python/script.py index 222193d962..9e6a162635 100755 --- a/roles/svc-bkp-local-2-device/files/python/script.py +++ b/roles/svc-bkp-local-2-device/files/python/script.py @@ -53,7 +53,7 @@ def main(): try: rsync_command = [ "rsync", - "-aP", + "-aHAXP", "--numeric-ids", "--delete", "--delete-excluded", diff --git a/roles/svc-bkp-nfs-2-local/README.md b/roles/svc-bkp-nfs-2-local/README.md index 8b2168073c..0acd7775f5 100644 --- a/roles/svc-bkp-nfs-2-local/README.md +++ b/roles/svc-bkp-nfs-2-local/README.md @@ -44,7 +44,7 @@ flowchart TD UNIT["svc-bkp-nfs-2-local.<version>.<domain>.service"] --> LOCK["ExecStartPre: sys-lock against the manipulation group"] LOCK --> SCRIPT["ExecStart: script.sh <export_base> <backups_dir>
backup-nfs-to-local <state>/backup"] SCRIPT -->|export_base missing| ALARM["ERROR exit 1
OnFailure alarm"] - SCRIPT --> RSYNC["rsync -a --delete
--exclude /<state>/backup (no backups-in-backups)
--link-dest previous generation (hard links)"] + SCRIPT --> RSYNC["rsync -aHAX --delete
--exclude /<state>/backup (no backups-in-backups)
--link-dest previous generation (hard links)"] RSYNC -->|exit 24: live export churn| WARN["WARN, snapshot kept"] RSYNC -->|any other failure| CLEAN["generation removed, exit != 0"] RSYNC --> TREE["<backups_dir>/<sha256(machine-id)>/
backup-nfs-to-local/<YYYYmmddHHMMSS>/files/..."] @@ -105,7 +105,7 @@ recover.py //backup-nfs-to-local//files/`. -2. Run the script; it first starts the role's deployed backup unit (a fresh differential `backup-nfs-to-local` generation of the live export), then mirrors the snapshot into the target (`rsync -a --delete`, with the shared `/backup` root protected from deletion and never copied in). `--no-safety-backup` skips the unit run when the target holds nothing worth saving. +2. Run the script; it first starts the role's deployed backup unit (a fresh differential `backup-nfs-to-local` generation of the live export), then mirrors the snapshot into the target (`rsync -aHAX --delete`, with the shared `/backup` root protected from deletion and never copied in). `--no-safety-backup` skips the unit run when the target holds nothing worth saving. 3. Redeploy the stack; the NFS clients re-mount and pick up the restored state. The target subtree must already exist; the script refuses to create export subtrees implicitly. diff --git a/roles/svc-bkp-nfs-2-local/files/python/recover.py b/roles/svc-bkp-nfs-2-local/files/python/recover.py index ef159bed13..a2b0f7ebfe 100755 --- a/roles/svc-bkp-nfs-2-local/files/python/recover.py +++ b/roles/svc-bkp-nfs-2-local/files/python/recover.py @@ -6,7 +6,7 @@ Runs the role's deployed backup unit first (the usual differential ``backup-nfs-to-local`` generation of the live export), then mirrors the -snapshot into the target (``rsync -a --delete``). Run on the host +snapshot into the target (``rsync -aHAX --delete``). Run on the host serving the export with every consuming stack stopped; NFS clients re-mount on redeploy. diff --git a/roles/svc-bkp-nfs-2-local/files/shell/script.sh b/roles/svc-bkp-nfs-2-local/files/shell/script.sh index b353e816a3..415a7e893e 100644 --- a/roles/svc-bkp-nfs-2-local/files/shell/script.sh +++ b/roles/svc-bkp-nfs-2-local/files/shell/script.sh @@ -45,7 +45,7 @@ trap cleanup_failed_generation ERR mkdir -p "${DEST_DIR}" -rsync_args=(-a --numeric-ids --delete) +rsync_args=(-aHAX --numeric-ids --delete) if [[ -n "${EXCLUDE_REL}" ]]; then rsync_args+=(--exclude "/${EXCLUDE_REL#/}") fi diff --git a/roles/svc-bkp-remote-2-local/files/python/pull_specific_host.py b/roles/svc-bkp-remote-2-local/files/python/pull_specific_host.py index 3c57de188f..63553b9e81 100755 --- a/roles/svc-bkp-remote-2-local/files/python/pull_specific_host.py +++ b/roles/svc-bkp-remote-2-local/files/python/pull_specific_host.py @@ -120,7 +120,7 @@ def pull_backups(hostname: str, backups_dir: str) -> None: Path(local_backup_destination_path).mkdir(parents=True, exist_ok=True) rsync_command = ( - f"rsync -a --partial --info=stats2 " + f"rsync -aHAX --partial --info=stats2 " f"--numeric-ids --delete --delete-excluded --timeout=300 " f'-e "ssh {SSH_OPTS}" ' f'--rsync-path="sudo rsync" ' diff --git a/roles/svc-bkp-volume-2-local/README.md b/roles/svc-bkp-volume-2-local/README.md index 1a09e9415b..196385d452 100644 --- a/roles/svc-bkp-volume-2-local/README.md +++ b/roles/svc-bkp-volume-2-local/README.md @@ -78,7 +78,7 @@ flowchart TD TREE --> RECOVER["files/python/recover.py volume
resolves Mountpoint + Options"] RECOVER -->|"Options set"| PROBE{"mountpoint -q
(ssh for --docker-host)"} PROBE -->|unmounted| REFUSE["SystemExit: a restore would land
on the node disk and be shadowed
on the next mount"] - PROBE -->|mounted| RSYNC["rsync -a --delete through the
mounted export onto the server"] + PROBE -->|mounted| RSYNC["rsync -aHAX --delete through the
mounted export onto the server"] DRILL["DR drill [9/9]
mounts the export at the volume
mountpoint with the volume's own opts"] --> RECOVER RSYNC --> VERIFY["marker asserted on the
NFS server's disk"] ``` @@ -304,7 +304,7 @@ recover.py //backup-docker-to-local// ``` 1. Stop the consuming project (`docker compose down` / `docker stack rm `). -2. Run the script; it first starts the role's deployed backup unit (a fresh differential baudolo generation of every volume and database), resolves the volume's mountpoint and mirrors the snapshot into it (`rsync -a --delete`). `--no-safety-backup` skips the unit run when the target holds nothing worth saving. +2. Run the script; it first starts the role's deployed backup unit (a fresh differential baudolo generation of every volume and database), resolves the volume's mountpoint and mirrors the snapshot into it (`rsync -aHAX --delete`). `--no-safety-backup` skips the unit run when the target holds nothing worth saving. 3. Restore the databases with the `--databases` mode above **while the project is still down**, then start it again; on swarm, NFS-backed volumes are restored via `svc-bkp-nfs-2-local`'s `recover.py` instead (see below). ## Credits diff --git a/roles/svc-bkp-volume-2-local/files/python/recover.py b/roles/svc-bkp-volume-2-local/files/python/recover.py index b1ecdc5873..5d4d0829bf 100755 --- a/roles/svc-bkp-volume-2-local/files/python/recover.py +++ b/roles/svc-bkp-volume-2-local/files/python/recover.py @@ -9,7 +9,7 @@ Both modes run the role's deployed backup unit first, unless ``--no-safety-backup`` says the target holds nothing worth saving. Volume mode mirrors the snapshot into the volume's mountpoint -(``rsync -a --delete``); stop the consuming project first. With +(``rsync -aHAX --delete``); stop the consuming project first. With ``--docker-host ssh://user@host`` it works on a remote host. Database mode (``--databases``) replays every dump with diff --git a/roles/web-app-snipe-it/README.md b/roles/web-app-snipe-it/README.md index 147f417cab..e05d00a44e 100644 --- a/roles/web-app-snipe-it/README.md +++ b/roles/web-app-snipe-it/README.md @@ -88,9 +88,14 @@ Solid `1:1` edges are fixed relationships; dashed `0..1` edges are conditional ( When the oauth2-proxy SSO flavor is active, Snipe-IT's native `loginViaRemoteUser()` is enabled via the `Setting` model (`login_remote_user_enabled`, `login_remote_user_header_name = - HTTP_X_FORWARDED_PREFERRED_USERNAME`). nginx gates `/login` through - oauth2-proxy/Keycloak and injects the verified - `X-Forwarded-Preferred-Username` header, which Snipe-IT matches against + INFINITO_SSO_USER`). nginx gates `/login` through + oauth2-proxy/Keycloak, injects the verified + `X-Forwarded-Preferred-Username` header and sends the + `sso_proxy_secret` credential as `X-Infinito-Sso-Proxy` with every + request. Apache in the + container copies the username into the `INFINITO_SSO_USER` server + variable only when that secret matches `INFINITO_SSO_PROXY_SECRET`. + Snipe-IT matches the username against `users.username` (the user must pre-exist and be activated — sync them via LDAP) to mint a native `snipeit_session`. Visitors without a matching activated user silently fall through to the normal login form (no error). diff --git a/roles/web-app-snipe-it/files/Dockerfile b/roles/web-app-snipe-it/files/Dockerfile index 43255da7e0..094cce7ccc 100644 --- a/roles/web-app-snipe-it/files/Dockerfile +++ b/roles/web-app-snipe-it/files/Dockerfile @@ -3,3 +3,5 @@ ARG SNIPE_IT_VERSION FROM ${SNIPE_IT_IMAGE}:${SNIPE_IT_VERSION} RUN sed -i 's#php artisan migrate --force#php artisan migrate --force --isolated#' /startup.sh + +RUN printf 'SetEnvIf X-Forwarded-Preferred-Username "^(.+)$" INFINITO_SSO_USER=$1\nSetEnvIfExpr "-z env(\047INFINITO_SSO_PROXY_SECRET\047) || req(\047X-Infinito-Sso-Proxy\047) != env(\047INFINITO_SSO_PROXY_SECRET\047)" !INFINITO_SSO_USER\n' > /etc/apache2/conf.d/infinito-sso.conf diff --git a/roles/web-app-snipe-it/files/php/apply/sso_config.php b/roles/web-app-snipe-it/files/php/apply/sso_config.php index 77a67e1441..2fba9bddfb 100644 --- a/roles/web-app-snipe-it/files/php/apply/sso_config.php +++ b/roles/web-app-snipe-it/files/php/apply/sso_config.php @@ -2,14 +2,6 @@ // nocheck: mirrored-unit-test - boots Snipe-IT's Laravel kernel through // bootstrap/app.php and writes the trusted-reverse-proxy login settings through // App\Models\Setting; the models only exist once the install has booted -// Configure Snipe-IT trusted-reverse-proxy login via the Laravel `Setting` -// model (same path the UI uses). The oauth2-proxy in front of Snipe-IT -// authenticates the user against Keycloak and nginx injects the verified -// identity into the `X-Forwarded-Preferred-Username` request header, which -// PHP exposes as $_SERVER['HTTP_X_FORWARDED_PREFERRED_USERNAME']. -// LoginController::loginViaRemoteUser() then matches users.username and mints -// a native snipeit_session. The password/LDAP form stays available as a -// fallback (login_common_disabled is kept at 0). require "vendor/autoload.php"; $app = require "bootstrap/app.php"; $app->make(Illuminate\Contracts\Console\Kernel::class)->bootstrap(); diff --git a/roles/web-app-snipe-it/meta/secrets.yml b/roles/web-app-snipe-it/meta/secrets.yml index 7e665aca46..43316dcfca 100644 --- a/roles/web-app-snipe-it/meta/secrets.yml +++ b/roles/web-app-snipe-it/meta/secrets.yml @@ -10,3 +10,9 @@ credentials: algorithm: alphanumeric validation: "^[A-Za-z0-9]{32,}$" length: 48 + sso_proxy_secret: + description: "Shared secret the reverse proxy sends with every request; Apache in the Snipe-IT container only turns the trusted identity header into the login + variable when it matches." + algorithm: alphanumeric + validation: "^[A-Za-z0-9]{32,}$" + length: 48 diff --git a/roles/web-app-snipe-it/tasks/00_core.yml b/roles/web-app-snipe-it/tasks/00_core.yml index a7d4c2cc1b..7f582896aa 100644 --- a/roles/web-app-snipe-it/tasks/00_core.yml +++ b/roles/web-app-snipe-it/tasks/00_core.yml @@ -13,6 +13,7 @@ name: sys-stk-full vars: compose_handlers_flush: true + webserver_location_extra_configuration: 'proxy_set_header {{ SNIPE_IT_SSO_PROXY_HEADER }} "{{ SNIPE_IT_SSO_PROXY_SECRET }}";' - name: "👔 Snipe-IT manager-side operations (container exec)" include_tasks: 01_install/manager_ops.yml diff --git a/roles/web-app-snipe-it/tasks/04_sso.yml b/roles/web-app-snipe-it/tasks/04_sso.yml index 5dda964562..c08514b0d0 100644 --- a/roles/web-app-snipe-it/tasks/04_sso.yml +++ b/roles/web-app-snipe-it/tasks/04_sso.yml @@ -26,3 +26,18 @@ ansible.builtin.shell: cmd: "container exec {{ SNIPE_IT_CONTAINER_ADDRESS }} php artisan optimize:clear" changed_when: true + +- name: "🔒 snipe-it: the SSO header bridge logs in only proxy-secret requests" + ansible.builtin.shell: + cmd: >- + container exec {{ SNIPE_IT_CONTAINER_ADDRESS }} sh -c + '{{ 30 | curl }} -s -o /dev/null -w "%{http_code}" -H "X-Forwarded-Preferred-Username: $1" {{ item.proxy_header }} http://localhost/login' + _ {{ lookup('users', 'administrator').username | quote }} + loop: + - { label: "forged header without the proxy secret", proxy_header: "", expected: "200" } + - { label: "header with the proxy secret", proxy_header: '-H "{{ SNIPE_IT_SSO_PROXY_HEADER }}: $INFINITO_SSO_PROXY_SECRET"', expected: "302" } + loop_control: + label: "{{ item.label }}" + register: snipe_it_sso_bridge_probe + changed_when: false + failed_when: snipe_it_sso_bridge_probe.stdout != item.expected diff --git a/roles/web-app-snipe-it/templates/env.j2 b/roles/web-app-snipe-it/templates/env.j2 index a725042808..63d28cec03 100644 --- a/roles/web-app-snipe-it/templates/env.j2 +++ b/roles/web-app-snipe-it/templates/env.j2 @@ -78,6 +78,7 @@ SECURE_COOKIES={{ SNIPE_IT_TLS_ENABLED | string | lower }} API_TOKEN_EXPIRATION_YEARS=40 APP_TRUSTED_PROXIES=** +INFINITO_SSO_PROXY_SECRET={{ SNIPE_IT_SSO_PROXY_SECRET }} ALLOW_IFRAMING=false REFERRER_POLICY=same-origin ENABLE_CSP=false diff --git a/roles/web-app-snipe-it/vars/main.yml b/roles/web-app-snipe-it/vars/main.yml index 56966c32ef..689acd417d 100644 --- a/roles/web-app-snipe-it/vars/main.yml +++ b/roles/web-app-snipe-it/vars/main.yml @@ -18,7 +18,9 @@ SNIPE_IT_LDAP_ENABLED: "{{ lookup('config', application_id, 'services.ldap.enabl SNIPE_IT_TLS_ENABLED: "{{ lookup('tls', application_id, 'enabled') | bool }}" SNIPE_IT_SSO_ENABLED: "{{ lookup('sso', application_id, 'is_proxy_gated') }}" -SNIPE_IT_SSO_HEADER_NAME: "HTTP_X_FORWARDED_PREFERRED_USERNAME" +SNIPE_IT_SSO_HEADER_NAME: "INFINITO_SSO_USER" +SNIPE_IT_SSO_PROXY_HEADER: "X-Infinito-Sso-Proxy" +SNIPE_IT_SSO_PROXY_SECRET: "{{ lookup('config', application_id, 'secrets.credentials.sso_proxy_secret') }}" SNIPE_IT_SSO_LOGOUT_URL: "{{ OIDC.CLIENT.LOGOUT_URL }}" SNIPE_IT_LDAP_FILTER_FRAGMENT: "&(objectClass=inetOrgPerson)" diff --git a/roles/web-app-socialhome/meta/services.yml b/roles/web-app-socialhome/meta/services.yml index a63a82eb63..536d8dce2e 100644 --- a/roles/web-app-socialhome/meta/services.yml +++ b/roles/web-app-socialhome/meta/services.yml @@ -13,7 +13,7 @@ socialhome: # nocheck: default-placement-manager embedded sqlite in a node-local volume; no clustered storage placement: manager image: ghcr.io/social-home-io/socialhome - version: "2026.10.17" + version: "2026.10.20" ports: local: http: 8089 diff --git a/tasks/utils/migrate_meta_layout/__init__.py b/tasks/utils/migrate_meta_layout/__init__.py index dd8a02b6d1..bc79b7740f 100644 --- a/tasks/utils/migrate_meta_layout/__init__.py +++ b/tasks/utils/migrate_meta_layout/__init__.py @@ -10,3 +10,5 @@ Idempotent per role: re-running on an already-migrated tree is a no-op. from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/external/repository/__init__.py b/tests/external/repository/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/tests/external/repository/__init__.py +++ b/tests/external/repository/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/external/roles/__init__.py b/tests/external/roles/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/tests/external/roles/__init__.py +++ b/tests/external/roles/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/external/update/__init__.py b/tests/external/update/__init__.py index 78e3cae448..e69de29bb2 100644 --- a/tests/external/update/__init__.py +++ b/tests/external/update/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] diff --git a/tests/external/update/addons/__init__.py b/tests/external/update/addons/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/external/update/addons/__init__.py +++ b/tests/external/update/addons/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/external/update/docker/__init__.py b/tests/external/update/docker/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/external/update/docker/__init__.py +++ b/tests/external/update/docker/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/external/update/pip/__init__.py b/tests/external/update/pip/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/external/update/pip/__init__.py +++ b/tests/external/update/pip/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/external/update/repository/__init__.py b/tests/external/update/repository/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/external/update/repository/__init__.py +++ b/tests/external/update/repository/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/external/update/source/__init__.py b/tests/external/update/source/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/external/update/source/__init__.py +++ b/tests/external/update/source/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/__init__.py b/tests/integration/ansible/__init__.py index 78e3cae448..e69de29bb2 100644 --- a/tests/integration/ansible/__init__.py +++ b/tests/integration/ansible/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] diff --git a/tests/integration/ansible/action_plugins/__init__.py b/tests/integration/ansible/action_plugins/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/action_plugins/__init__.py +++ b/tests/integration/ansible/action_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/filters/__init__.py b/tests/integration/ansible/filters/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/filters/__init__.py +++ b/tests/integration/ansible/filters/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/group_vars/__init__.py b/tests/integration/ansible/group_vars/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/group_vars/__init__.py +++ b/tests/integration/ansible/group_vars/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/handlers/__init__.py b/tests/integration/ansible/handlers/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/handlers/__init__.py +++ b/tests/integration/ansible/handlers/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/jinja/__init__.py b/tests/integration/ansible/jinja/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/jinja/__init__.py +++ b/tests/integration/ansible/jinja/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/lookups/__init__.py b/tests/integration/ansible/lookups/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/lookups/__init__.py +++ b/tests/integration/ansible/lookups/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/lookups/config/__init__.py b/tests/integration/ansible/lookups/config/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/integration/ansible/lookups/config/__init__.py +++ b/tests/integration/ansible/lookups/config/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/playbooks/__init__.py b/tests/integration/ansible/playbooks/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/playbooks/__init__.py +++ b/tests/integration/ansible/playbooks/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/ansible/vars/__init__.py b/tests/integration/ansible/vars/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/ansible/vars/__init__.py +++ b/tests/integration/ansible/vars/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/iam/__init__.py b/tests/integration/iam/__init__.py index 78e3cae448..e69de29bb2 100644 --- a/tests/integration/iam/__init__.py +++ b/tests/integration/iam/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] diff --git a/tests/integration/iam/passwords/__init__.py b/tests/integration/iam/passwords/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/iam/passwords/__init__.py +++ b/tests/integration/iam/passwords/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/iam/sso/__init__.py b/tests/integration/iam/sso/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/iam/sso/__init__.py +++ b/tests/integration/iam/sso/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/iam/sso/rbac/__init__.py b/tests/integration/iam/sso/rbac/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/integration/iam/sso/rbac/__init__.py +++ b/tests/integration/iam/sso/rbac/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/infrastructure/__init__.py b/tests/integration/infrastructure/__init__.py index 78e3cae448..e69de29bb2 100644 --- a/tests/integration/infrastructure/__init__.py +++ b/tests/integration/infrastructure/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] diff --git a/tests/integration/infrastructure/compose/__init__.py b/tests/integration/infrastructure/compose/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/infrastructure/compose/__init__.py +++ b/tests/integration/infrastructure/compose/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/infrastructure/docker/__init__.py b/tests/integration/infrastructure/docker/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/infrastructure/docker/__init__.py +++ b/tests/integration/infrastructure/docker/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/infrastructure/networks/__init__.py b/tests/integration/infrastructure/networks/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/infrastructure/networks/__init__.py +++ b/tests/integration/infrastructure/networks/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/infrastructure/services/__init__.py b/tests/integration/infrastructure/services/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/infrastructure/services/__init__.py +++ b/tests/integration/infrastructure/services/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/meta/__init__.py b/tests/integration/meta/__init__.py index 78e3cae448..e69de29bb2 100644 --- a/tests/integration/meta/__init__.py +++ b/tests/integration/meta/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] diff --git a/tests/integration/meta/categories/__init__.py b/tests/integration/meta/categories/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/meta/categories/__init__.py +++ b/tests/integration/meta/categories/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/meta/cli/__init__.py b/tests/integration/meta/cli/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/meta/cli/__init__.py +++ b/tests/integration/meta/cli/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/meta/domains/__init__.py b/tests/integration/meta/domains/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/meta/domains/__init__.py +++ b/tests/integration/meta/domains/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/meta/env/__init__.py b/tests/integration/meta/env/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/meta/env/__init__.py +++ b/tests/integration/meta/env/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/meta/workflows/__init__.py b/tests/integration/meta/workflows/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/meta/workflows/__init__.py +++ b/tests/integration/meta/workflows/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/__init__.py b/tests/integration/roles/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/tests/integration/roles/__init__.py +++ b/tests/integration/roles/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/applications/__init__.py b/tests/integration/roles/applications/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/roles/applications/__init__.py +++ b/tests/integration/roles/applications/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/applications/id/__init__.py b/tests/integration/roles/applications/id/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/integration/roles/applications/id/__init__.py +++ b/tests/integration/roles/applications/id/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/includes/__init__.py b/tests/integration/roles/includes/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/roles/includes/__init__.py +++ b/tests/integration/roles/includes/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/__init__.py b/tests/integration/roles/meta/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/roles/meta/__init__.py +++ b/tests/integration/roles/meta/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/dependencies/__init__.py b/tests/integration/roles/meta/dependencies/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/integration/roles/meta/dependencies/__init__.py +++ b/tests/integration/roles/meta/dependencies/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/server/__init__.py b/tests/integration/roles/meta/server/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/integration/roles/meta/server/__init__.py +++ b/tests/integration/roles/meta/server/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/services/__init__.py b/tests/integration/roles/meta/services/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/integration/roles/meta/services/__init__.py +++ b/tests/integration/roles/meta/services/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/services/prometheus/__init__.py b/tests/integration/roles/meta/services/prometheus/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/integration/roles/meta/services/prometheus/__init__.py +++ b/tests/integration/roles/meta/services/prometheus/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/services/repositories/__init__.py b/tests/integration/roles/meta/services/repositories/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/integration/roles/meta/services/repositories/__init__.py +++ b/tests/integration/roles/meta/services/repositories/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/services/run_after/__init__.py b/tests/integration/roles/meta/services/run_after/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/integration/roles/meta/services/run_after/__init__.py +++ b/tests/integration/roles/meta/services/run_after/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/meta/variants/__init__.py b/tests/integration/roles/meta/variants/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/integration/roles/meta/variants/__init__.py +++ b/tests/integration/roles/meta/variants/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/run_once/__init__.py b/tests/integration/roles/run_once/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/roles/run_once/__init__.py +++ b/tests/integration/roles/run_once/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/integration/roles/when/__init__.py b/tests/integration/roles/when/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/integration/roles/when/__init__.py +++ b/tests/integration/roles/when/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/__init__.py b/tests/lint/ansible/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/tests/lint/ansible/__init__.py +++ b/tests/lint/ansible/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/jinja/__init__.py b/tests/lint/ansible/jinja/__init__.py index 8b57ab2838..4e9f2cd497 100644 --- a/tests/lint/ansible/jinja/__init__.py +++ b/tests/lint/ansible/jinja/__init__.py @@ -2,6 +2,8 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] +__all__ = ["COMPOSE_TEMPLATE", "PROJECT_ROOT", "is_main_compose_template"] + COMPOSE_TEMPLATE = "compose.yml.j2" diff --git a/tests/lint/ansible/modules/__init__.py b/tests/lint/ansible/modules/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/modules/__init__.py +++ b/tests/lint/ansible/modules/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/roles/__init__.py b/tests/lint/ansible/roles/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/roles/__init__.py +++ b/tests/lint/ansible/roles/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/roles/meta/__init__.py b/tests/lint/ansible/roles/meta/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/lint/ansible/roles/meta/__init__.py +++ b/tests/lint/ansible/roles/meta/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/roles/web-app/integration/__init__.py b/tests/lint/ansible/roles/web-app/integration/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/lint/ansible/roles/web-app/integration/__init__.py +++ b/tests/lint/ansible/roles/web-app/integration/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/roles/web-app/playwright/__init__.py b/tests/lint/ansible/roles/web-app/playwright/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/lint/ansible/roles/web-app/playwright/__init__.py +++ b/tests/lint/ansible/roles/web-app/playwright/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/roles/web-app/playwright/persona/__init__.py b/tests/lint/ansible/roles/web-app/playwright/persona/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/lint/ansible/roles/web-app/playwright/persona/__init__.py +++ b/tests/lint/ansible/roles/web-app/playwright/persona/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/services/__init__.py b/tests/lint/ansible/services/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/services/__init__.py +++ b/tests/lint/ansible/services/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/shell/__init__.py b/tests/lint/ansible/shell/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/shell/__init__.py +++ b/tests/lint/ansible/shell/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/sql/__init__.py b/tests/lint/ansible/sql/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/sql/__init__.py +++ b/tests/lint/ansible/sql/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/structure/__init__.py b/tests/lint/ansible/structure/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/structure/__init__.py +++ b/tests/lint/ansible/structure/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/swarm/__init__.py b/tests/lint/ansible/swarm/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/swarm/__init__.py +++ b/tests/lint/ansible/swarm/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/tasks/__init__.py b/tests/lint/ansible/tasks/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/tasks/__init__.py +++ b/tests/lint/ansible/tasks/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/ansible/variables/__init__.py b/tests/lint/ansible/variables/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/ansible/variables/__init__.py +++ b/tests/lint/ansible/variables/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/docker/dockerfile/__init__.py b/tests/lint/docker/dockerfile/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/lint/docker/dockerfile/__init__.py +++ b/tests/lint/docker/dockerfile/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/docker/dockerfile/apt/__init__.py b/tests/lint/docker/dockerfile/apt/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/lint/docker/dockerfile/apt/__init__.py +++ b/tests/lint/docker/dockerfile/apt/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/filesystem/__init__.py b/tests/lint/filesystem/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/tests/lint/filesystem/__init__.py +++ b/tests/lint/filesystem/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/lint/repository/__init__.py b/tests/lint/repository/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/tests/lint/repository/__init__.py +++ b/tests/lint/repository/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/performance/__init__.py b/tests/performance/__init__.py index a11dbb1745..8125c38905 100644 --- a/tests/performance/__init__.py +++ b/tests/performance/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/cli/administration/deploy/development/__init__.py b/tests/unit/python/cli/administration/deploy/development/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/cli/administration/deploy/development/__init__.py +++ b/tests/unit/python/cli/administration/deploy/development/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/cli/administration/inventory/__init__.py b/tests/unit/python/cli/administration/inventory/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/cli/administration/inventory/__init__.py +++ b/tests/unit/python/cli/administration/inventory/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/cli/administration/inventory/mesh/__init__.py b/tests/unit/python/cli/administration/inventory/mesh/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/cli/administration/inventory/mesh/__init__.py +++ b/tests/unit/python/cli/administration/inventory/mesh/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/cli/administration/inventory/validate/__init__.py b/tests/unit/python/cli/administration/inventory/validate/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/cli/administration/inventory/validate/__init__.py +++ b/tests/unit/python/cli/administration/inventory/validate/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/cli/administration/recover/test_full.py b/tests/unit/python/cli/administration/recover/test_full.py index 6d980f1b5f..7395eef314 100644 --- a/tests/unit/python/cli/administration/recover/test_full.py +++ b/tests/unit/python/cli/administration/recover/test_full.py @@ -74,7 +74,7 @@ class PullCmdTest(unittest.TestCase): full._pull_cmd("user@srchost"), [ "rsync", - "-a", + "-aHAX", f"user@srchost:{paths.BACKUP_ROOT}/", f"{full.PULL_STAGE}/", ], @@ -83,7 +83,7 @@ class PullCmdTest(unittest.TestCase): def test_host_with_explicit_path(self): self.assertEqual( full._pull_cmd("host:/custom/root"), - ["rsync", "-a", "host:/custom/root/", f"{full.PULL_STAGE}/"], + ["rsync", "-aHAX", "host:/custom/root/", f"{full.PULL_STAGE}/"], ) diff --git a/tests/unit/python/cli/build/__init__.py b/tests/unit/python/cli/build/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/cli/build/__init__.py +++ b/tests/unit/python/cli/build/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/cli/gha/__init__.py b/tests/unit/python/cli/gha/__init__.py index 29d44ed803..f5da6fa522 100644 --- a/tests/unit/python/cli/gha/__init__.py +++ b/tests/unit/python/cli/gha/__init__.py @@ -3,3 +3,5 @@ from __future__ import annotations from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/library/__init__.py b/tests/unit/python/library/__init__.py index 88f288ec1f..eec6d4835a 100644 --- a/tests/unit/python/library/__init__.py +++ b/tests/unit/python/library/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/plugins/filter/__init__.py b/tests/unit/python/plugins/filter/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/plugins/filter/__init__.py +++ b/tests/unit/python/plugins/filter/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/plugins/filter/get/__init__.py b/tests/unit/python/plugins/filter/get/__init__.py index 9f69c70b47..e69de29bb2 100644 --- a/tests/unit/python/plugins/filter/get/__init__.py +++ b/tests/unit/python/plugins/filter/get/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] diff --git a/tests/unit/python/plugins/filter/test_bcrypt_hash.py b/tests/unit/python/plugins/filter/test_bcrypt_hash.py index de6de1ae67..dbec112808 100644 --- a/tests/unit/python/plugins/filter/test_bcrypt_hash.py +++ b/tests/unit/python/plugins/filter/test_bcrypt_hash.py @@ -70,6 +70,13 @@ class TestBcryptHash(unittest.TestCase): self.f("password-two", "app:indexer-admin"), ) + def test_seeded_salt_carries_nothing_of_the_secret(self): + salt_end = len("$2b$12$") + 22 + self.assertEqual( + self.f("password-one", "app:indexer-admin")[:salt_end], + self.f("password-two", "app:indexer-admin")[:salt_end], + ) + def test_seeded_hash_verifies_against_the_original_password(self): password = "correct horse battery staple" hashed = self.f(password, "app:indexer-admin") diff --git a/tests/unit/python/plugins/lookup/__init__.py b/tests/unit/python/plugins/lookup/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/plugins/lookup/__init__.py +++ b/tests/unit/python/plugins/lookup/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/agents/__init__.py b/tests/unit/python/roles/agents/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/roles/agents/__init__.py +++ b/tests/unit/python/roles/agents/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-ai-litellm/files/__init__.py b/tests/unit/python/roles/svc-ai-litellm/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-ai-litellm/files/__init__.py +++ b/tests/unit/python/roles/svc-ai-litellm/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-ai-litellm/templates/__init__.py b/tests/unit/python/roles/svc-ai-litellm/templates/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-ai-litellm/templates/__init__.py +++ b/tests/unit/python/roles/svc-ai-litellm/templates/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-ai-mcp-adapter/files/__init__.py b/tests/unit/python/roles/svc-ai-mcp-adapter/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-ai-mcp-adapter/files/__init__.py +++ b/tests/unit/python/roles/svc-ai-mcp-adapter/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-bkp-nfs-2-local/files/__init__.py b/tests/unit/python/roles/svc-bkp-nfs-2-local/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-bkp-nfs-2-local/files/__init__.py +++ b/tests/unit/python/roles/svc-bkp-nfs-2-local/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-bkp-nfs-2-local/files/test_script.py b/tests/unit/python/roles/svc-bkp-nfs-2-local/files/test_script.py index 452821bcec..acf56c75f5 100644 --- a/tests/unit/python/roles/svc-bkp-nfs-2-local/files/test_script.py +++ b/tests/unit/python/roles/svc-bkp-nfs-2-local/files/test_script.py @@ -74,6 +74,14 @@ class NfsBackupScriptTests(unittest.TestCase): ).read_text() # nocheck: cache-read tempdir fixture self.assertEqual(content, "hello") + def test_snapshot_keeps_user_xattrs(self): + (self.source / "a.txt").write_text("hello") + os.setxattr(self.source / "a.txt", "user.oc.id", b"space-1") + result = self._run() + self.assertEqual(result.returncode, 0, result.stderr) + snapshot = self._generations()[0] / "files" / "a.txt" + self.assertEqual(os.getxattr(snapshot, "user.oc.id"), b"space-1") + def test_second_run_hardlinks_unchanged_files(self): (self.source / "a.txt").write_text("hello") self.assertEqual(self._run(generation="20240101000000").returncode, 0) diff --git a/tests/unit/python/roles/svc-bkp-remote-2-local/files/__init__.py b/tests/unit/python/roles/svc-bkp-remote-2-local/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-bkp-remote-2-local/files/__init__.py +++ b/tests/unit/python/roles/svc-bkp-remote-2-local/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-bkp-volume-2-local/files/__init__.py b/tests/unit/python/roles/svc-bkp-volume-2-local/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-bkp-volume-2-local/files/__init__.py +++ b/tests/unit/python/roles/svc-bkp-volume-2-local/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-bkp-volume-2-local/library/__init__.py b/tests/unit/python/roles/svc-bkp-volume-2-local/library/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-bkp-volume-2-local/library/__init__.py +++ b/tests/unit/python/roles/svc-bkp-volume-2-local/library/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-net-tor-smtp/files/__init__.py b/tests/unit/python/roles/svc-net-tor-smtp/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-net-tor-smtp/files/__init__.py +++ b/tests/unit/python/roles/svc-net-tor-smtp/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-net-tor/files/__init__.py b/tests/unit/python/roles/svc-net-tor/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-net-tor/files/__init__.py +++ b/tests/unit/python/roles/svc-net-tor/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-net-wireguard/__init__.py b/tests/unit/python/roles/svc-net-wireguard/__init__.py index 8ee16d7567..e69de29bb2 100644 --- a/tests/unit/python/roles/svc-net-wireguard/__init__.py +++ b/tests/unit/python/roles/svc-net-wireguard/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] diff --git a/tests/unit/python/roles/svc-net-wireguard/filter_plugins/__init__.py b/tests/unit/python/roles/svc-net-wireguard/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-net-wireguard/filter_plugins/__init__.py +++ b/tests/unit/python/roles/svc-net-wireguard/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/svc-opt-keyboard-color/files/__init__.py b/tests/unit/python/roles/svc-opt-keyboard-color/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/svc-opt-keyboard-color/files/__init__.py +++ b/tests/unit/python/roles/svc-opt-keyboard-color/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-cln-bkps/files/__init__.py b/tests/unit/python/roles/sys-ctl-cln-bkps/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-cln-bkps/files/__init__.py +++ b/tests/unit/python/roles/sys-ctl-cln-bkps/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-hlth-csp/files/__init__.py b/tests/unit/python/roles/sys-ctl-hlth-csp/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-hlth-csp/files/__init__.py +++ b/tests/unit/python/roles/sys-ctl-hlth-csp/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-hlth-csp/lookup_plugins/__init__.py b/tests/unit/python/roles/sys-ctl-hlth-csp/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-hlth-csp/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/sys-ctl-hlth-csp/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-hlth-disc-space/files/__init__.py b/tests/unit/python/roles/sys-ctl-hlth-disc-space/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-hlth-disc-space/files/__init__.py +++ b/tests/unit/python/roles/sys-ctl-hlth-disc-space/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-hlth-msmtp/lookup_plugins/__init__.py b/tests/unit/python/roles/sys-ctl-hlth-msmtp/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-hlth-msmtp/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/sys-ctl-hlth-msmtp/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-hlth-webserver/files/__init__.py b/tests/unit/python/roles/sys-ctl-hlth-webserver/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-hlth-webserver/files/__init__.py +++ b/tests/unit/python/roles/sys-ctl-hlth-webserver/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-hlth-webserver/filter_plugins/__init__.py b/tests/unit/python/roles/sys-ctl-hlth-webserver/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-hlth-webserver/filter_plugins/__init__.py +++ b/tests/unit/python/roles/sys-ctl-hlth-webserver/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-rpr-container-hard/files/__init__.py b/tests/unit/python/roles/sys-ctl-rpr-container-hard/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-rpr-container-hard/files/__init__.py +++ b/tests/unit/python/roles/sys-ctl-rpr-container-hard/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-ctl-rpr-container-soft/files/__init__.py b/tests/unit/python/roles/sys-ctl-rpr-container-soft/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-ctl-rpr-container-soft/files/__init__.py +++ b/tests/unit/python/roles/sys-ctl-rpr-container-soft/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-dns-wildcards/filter_plugins/__init__.py b/tests/unit/python/roles/sys-dns-wildcards/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-dns-wildcards/filter_plugins/__init__.py +++ b/tests/unit/python/roles/sys-dns-wildcards/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-front-inj-all/filter_plugins/__init__.py b/tests/unit/python/roles/sys-front-inj-all/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-front-inj-all/filter_plugins/__init__.py +++ b/tests/unit/python/roles/sys-front-inj-all/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-lock/files/__init__.py b/tests/unit/python/roles/sys-lock/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-lock/files/__init__.py +++ b/tests/unit/python/roles/sys-lock/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-svc-compose-ca/files/__init__.py b/tests/unit/python/roles/sys-svc-compose-ca/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-svc-compose-ca/files/__init__.py +++ b/tests/unit/python/roles/sys-svc-compose-ca/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-svc-compose/files/__init__.py b/tests/unit/python/roles/sys-svc-compose/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-svc-compose/files/__init__.py +++ b/tests/unit/python/roles/sys-svc-compose/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-svc-compose/files/swarm/__init__.py b/tests/unit/python/roles/sys-svc-compose/files/swarm/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/roles/sys-svc-compose/files/swarm/__init__.py +++ b/tests/unit/python/roles/sys-svc-compose/files/swarm/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-svc-compose/lookup_plugins/__init__.py b/tests/unit/python/roles/sys-svc-compose/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-svc-compose/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/sys-svc-compose/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-svc-container/files/__init__.py b/tests/unit/python/roles/sys-svc-container/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-svc-container/files/__init__.py +++ b/tests/unit/python/roles/sys-svc-container/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-svc-proxy/templates/__init__.py b/tests/unit/python/roles/sys-svc-proxy/templates/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-svc-proxy/templates/__init__.py +++ b/tests/unit/python/roles/sys-svc-proxy/templates/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-svc-rdbms/files/__init__.py b/tests/unit/python/roles/sys-svc-rdbms/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-svc-rdbms/files/__init__.py +++ b/tests/unit/python/roles/sys-svc-rdbms/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/sys-util-git-pull/files/__init__.py b/tests/unit/python/roles/sys-util-git-pull/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/sys-util-git-pull/files/__init__.py +++ b/tests/unit/python/roles/sys-util-git-pull/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/test-e2e-cli/files/__init__.py b/tests/unit/python/roles/test-e2e-cli/files/__init__.py index 9f69c70b47..e69de29bb2 100644 --- a/tests/unit/python/roles/test-e2e-cli/files/__init__.py +++ b/tests/unit/python/roles/test-e2e-cli/files/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] diff --git a/tests/unit/python/roles/test-e2e-cli/files/shared/__init__.py b/tests/unit/python/roles/test-e2e-cli/files/shared/__init__.py index 86efabd459..e69de29bb2 100644 --- a/tests/unit/python/roles/test-e2e-cli/files/shared/__init__.py +++ b/tests/unit/python/roles/test-e2e-cli/files/shared/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] diff --git a/tests/unit/python/roles/test-e2e-cli/files/shared/mcp/__init__.py b/tests/unit/python/roles/test-e2e-cli/files/shared/mcp/__init__.py index 1f90564319..0bd565f9d2 100644 --- a/tests/unit/python/roles/test-e2e-cli/files/shared/mcp/__init__.py +++ b/tests/unit/python/roles/test-e2e-cli/files/shared/mcp/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[8] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/test-e2e-cli/filter_plugins/__init__.py b/tests/unit/python/roles/test-e2e-cli/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/test-e2e-cli/filter_plugins/__init__.py +++ b/tests/unit/python/roles/test-e2e-cli/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/test-e2e-playwright/filter_plugins/__init__.py b/tests/unit/python/roles/test-e2e-playwright/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/test-e2e-playwright/filter_plugins/__init__.py +++ b/tests/unit/python/roles/test-e2e-playwright/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-baserow/files/__init__.py b/tests/unit/python/roles/web-app-baserow/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-baserow/files/__init__.py +++ b/tests/unit/python/roles/web-app-baserow/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-baserow/files/sso/__init__.py b/tests/unit/python/roles/web-app-baserow/files/sso/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/roles/web-app-baserow/files/sso/__init__.py +++ b/tests/unit/python/roles/web-app-baserow/files/sso/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-bookwyrm/files/sso/__init__.py b/tests/unit/python/roles/web-app-bookwyrm/files/sso/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/roles/web-app-bookwyrm/files/sso/__init__.py +++ b/tests/unit/python/roles/web-app-bookwyrm/files/sso/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-dashboard/filter_plugins/__init__.py b/tests/unit/python/roles/web-app-dashboard/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-dashboard/filter_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-dashboard/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-flowise/files/__init__.py b/tests/unit/python/roles/web-app-flowise/files/__init__.py index 9f69c70b47..e69de29bb2 100644 --- a/tests/unit/python/roles/web-app-flowise/files/__init__.py +++ b/tests/unit/python/roles/web-app-flowise/files/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] diff --git a/tests/unit/python/roles/web-app-flowise/files/reconcile/__init__.py b/tests/unit/python/roles/web-app-flowise/files/reconcile/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/roles/web-app-flowise/files/reconcile/__init__.py +++ b/tests/unit/python/roles/web-app-flowise/files/reconcile/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-jellyfin/files/__init__.py b/tests/unit/python/roles/web-app-jellyfin/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-jellyfin/files/__init__.py +++ b/tests/unit/python/roles/web-app-jellyfin/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-keycloak/templates/__init__.py b/tests/unit/python/roles/web-app-keycloak/templates/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-keycloak/templates/__init__.py +++ b/tests/unit/python/roles/web-app-keycloak/templates/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-littlejs/filter_plugins/__init__.py b/tests/unit/python/roles/web-app-littlejs/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-littlejs/filter_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-littlejs/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-mailu/lookup_plugins/__init__.py b/tests/unit/python/roles/web-app-mailu/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-mailu/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-mailu/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-matrix/lookup_plugins/__init__.py b/tests/unit/python/roles/web-app-matrix/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-matrix/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-matrix/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-n8n/files/__init__.py b/tests/unit/python/roles/web-app-n8n/files/__init__.py index 9f69c70b47..e69de29bb2 100644 --- a/tests/unit/python/roles/web-app-n8n/files/__init__.py +++ b/tests/unit/python/roles/web-app-n8n/files/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] diff --git a/tests/unit/python/roles/web-app-n8n/files/provision/__init__.py b/tests/unit/python/roles/web-app-n8n/files/provision/__init__.py index 86efabd459..6290ad0f99 100644 --- a/tests/unit/python/roles/web-app-n8n/files/provision/__init__.py +++ b/tests/unit/python/roles/web-app-n8n/files/provision/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[7] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-nextcloud/filter_plugins/__init__.py b/tests/unit/python/roles/web-app-nextcloud/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-nextcloud/filter_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-nextcloud/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-nextcloud/lookup_plugins/__init__.py b/tests/unit/python/roles/web-app-nextcloud/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-nextcloud/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-nextcloud/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-openwebui/files/__init__.py b/tests/unit/python/roles/web-app-openwebui/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-openwebui/files/__init__.py +++ b/tests/unit/python/roles/web-app-openwebui/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-openwebui/templates/__init__.py b/tests/unit/python/roles/web-app-openwebui/templates/__init__.py index 9f69c70b47..e69de29bb2 100644 --- a/tests/unit/python/roles/web-app-openwebui/templates/__init__.py +++ b/tests/unit/python/roles/web-app-openwebui/templates/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] diff --git a/tests/unit/python/roles/web-app-peertube/filter_plugins/__init__.py b/tests/unit/python/roles/web-app-peertube/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-peertube/filter_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-peertube/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-stalwart/files/__init__.py b/tests/unit/python/roles/web-app-stalwart/files/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-stalwart/files/__init__.py +++ b/tests/unit/python/roles/web-app-stalwart/files/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-app-stalwart/lookup_plugins/__init__.py b/tests/unit/python/roles/web-app-stalwart/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-app-stalwart/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/web-app-stalwart/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-opt-rdr-www/lookup_plugins/__init__.py b/tests/unit/python/roles/web-opt-rdr-www/lookup_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-opt-rdr-www/lookup_plugins/__init__.py +++ b/tests/unit/python/roles/web-opt-rdr-www/lookup_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web-svc-logout/filter_plugins/__init__.py b/tests/unit/python/roles/web-svc-logout/filter_plugins/__init__.py index 9f69c70b47..087c384b57 100644 --- a/tests/unit/python/roles/web-svc-logout/filter_plugins/__init__.py +++ b/tests/unit/python/roles/web-svc-logout/filter_plugins/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[6] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/roles/web_app_keycloak/__init__.py b/tests/unit/python/roles/web_app_keycloak/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/roles/web_app_keycloak/__init__.py +++ b/tests/unit/python/roles/web_app_keycloak/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/utils/__init__.py b/tests/unit/python/utils/__init__.py index 88f288ec1f..e69de29bb2 100644 --- a/tests/unit/python/utils/__init__.py +++ b/tests/unit/python/utils/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[4] diff --git a/tests/unit/python/utils/cache/__init__.py b/tests/unit/python/utils/cache/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/utils/cache/__init__.py +++ b/tests/unit/python/utils/cache/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/utils/cache/test_applications.py b/tests/unit/python/utils/cache/test_applications.py index 66502c19d9..2f719500f8 100644 --- a/tests/unit/python/utils/cache/test_applications.py +++ b/tests/unit/python/utils/cache/test_applications.py @@ -15,8 +15,8 @@ import sys import tempfile import textwrap import unittest +import unittest.mock as mock from pathlib import Path -from unittest import mock from utils.cache import _reset_cache_for_tests from utils.cache import applications as cache_apps diff --git a/tests/unit/python/utils/diagnostics/__init__.py b/tests/unit/python/utils/diagnostics/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/utils/diagnostics/__init__.py +++ b/tests/unit/python/utils/diagnostics/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/utils/github/__init__.py b/tests/unit/python/utils/github/__init__.py index 8ee16d7567..e69de29bb2 100644 --- a/tests/unit/python/utils/github/__init__.py +++ b/tests/unit/python/utils/github/__init__.py @@ -1,3 +0,0 @@ -from pathlib import Path - -PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] diff --git a/tests/unit/python/utils/mail/__init__.py b/tests/unit/python/utils/mail/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/utils/mail/__init__.py +++ b/tests/unit/python/utils/mail/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/utils/recovery/__init__.py b/tests/unit/python/utils/recovery/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/utils/recovery/__init__.py +++ b/tests/unit/python/utils/recovery/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/utils/recovery/test_base.py b/tests/unit/python/utils/recovery/test_base.py index b084fba0f6..e4672cc0e9 100644 --- a/tests/unit/python/utils/recovery/test_base.py +++ b/tests/unit/python/utils/recovery/test_base.py @@ -1,5 +1,6 @@ from __future__ import annotations +import os import tempfile import unittest import unittest.mock as mock @@ -55,6 +56,15 @@ class TestDirectoryRecovery(unittest.TestCase): self.assertEqual(text, "from-snapshot") self.assertFalse((target / "live.txt").exists()) + def test_restore_keeps_user_xattrs(self) -> None: + with tempfile.TemporaryDirectory() as td: + source, target = self._mk(td) + os.setxattr(source / "restored.txt", "user.oc.id", b"space-1") + _Recovery(str(source), str(target)).restore() + self.assertEqual( + os.getxattr(target / "restored.txt", "user.oc.id"), b"space-1" + ) + def test_missing_unit_refuses(self) -> None: with tempfile.TemporaryDirectory() as td: source, target = self._mk(td) diff --git a/tests/unit/python/utils/roles/__init__.py b/tests/unit/python/utils/roles/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/utils/roles/__init__.py +++ b/tests/unit/python/utils/roles/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/unit/python/utils/templating/__init__.py b/tests/unit/python/utils/templating/__init__.py index 8ee16d7567..aa7a30d2e5 100644 --- a/tests/unit/python/utils/templating/__init__.py +++ b/tests/unit/python/utils/templating/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[5] + +__all__ = ["PROJECT_ROOT"] diff --git a/tests/utils/__init__.py b/tests/utils/__init__.py index a11dbb1745..8125c38905 100644 --- a/tests/utils/__init__.py +++ b/tests/utils/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/utils/__init__.py b/utils/__init__.py index 9f4a6a3289..29a52ec495 100644 --- a/utils/__init__.py +++ b/utils/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[1] + +__all__ = ["PROJECT_ROOT"] diff --git a/utils/claude/__init__.py b/utils/claude/__init__.py index a11dbb1745..8125c38905 100644 --- a/utils/claude/__init__.py +++ b/utils/claude/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/utils/domains/__init__.py b/utils/domains/__init__.py index 5578db5dde..1612edbb60 100644 --- a/utils/domains/__init__.py +++ b/utils/domains/__init__.py @@ -3,3 +3,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/utils/github/variant/axes.py b/utils/github/variant/axes.py index 72881bd1b7..0016a74358 100644 --- a/utils/github/variant/axes.py +++ b/utils/github/variant/axes.py @@ -42,7 +42,7 @@ import os from typing import TYPE_CHECKING from utils.github.variant import instructions -from utils.github.variant.label import ( # noqa: F401 +from utils.github.variant.label import ( LABEL_RE, LOCAL_GLYPH, Label, @@ -56,7 +56,7 @@ from utils.github.variant.network import ( row_pulls_tor, row_states, ) -from utils.github.variant.pools import ( # noqa: F401 +from utils.github.variant.pools import ( DISTROS, FILESYSTEMS, rotate, @@ -70,6 +70,22 @@ from utils.networks.reachability import CLEARNET, NODE_MODES from utils.roles.display import VARIANT_SEPARATOR, display_names from utils.symbol_glossary import to_emoji +__all__ = [ + "DISTROS", + "FILESYSTEMS", + "LABEL_RE", + "LOCAL_GLYPH", + "MODES", + "Label", + "artifact_slug", + "assign", + "check_pins", + "parse_label", + "pick_mode", + "resolve_sweep", + "sort_key", +] + if TYPE_CHECKING: from collections.abc import Mapping, Sequence from typing import Any diff --git a/utils/meta/__init__.py b/utils/meta/__init__.py index a11dbb1745..8125c38905 100644 --- a/utils/meta/__init__.py +++ b/utils/meta/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/utils/recovery/base.py b/utils/recovery/base.py index 3d7087c31e..6ca5a51ad1 100644 --- a/utils/recovery/base.py +++ b/utils/recovery/base.py @@ -1,7 +1,7 @@ """Abstract recover flow shared by every ``svc-bkp-*`` role. A recover mirrors a snapshot into a live target directory -(``rsync -a --delete``), so the target's current state would be lost +(``rsync -aHAX --delete``), so the target's current state would be lost without a net. The flow therefore first runs the role's deployed backup service (``systemctl start`` on the role's unit), which applies the usual differential backup logic to the live data before anything is @@ -87,7 +87,7 @@ class DirectoryRecovery(ABC): subprocess.run( [ "rsync", - "-a", + "-aHAX", "--numeric-ids", "--delete", *self.rsync_extra_args, diff --git a/utils/roles/__init__.py b/utils/roles/__init__.py index a11dbb1745..8125c38905 100644 --- a/utils/roles/__init__.py +++ b/utils/roles/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[2] + +__all__ = ["PROJECT_ROOT"] diff --git a/utils/roles/validation/__init__.py b/utils/roles/validation/__init__.py index 78e3cae448..ff4b515c73 100644 --- a/utils/roles/validation/__init__.py +++ b/utils/roles/validation/__init__.py @@ -1,3 +1,5 @@ from pathlib import Path PROJECT_ROOT: Path = Path(__file__).resolve().parents[3] + +__all__ = ["PROJECT_ROOT"] diff --git a/utils/yaml_bootstrap.py b/utils/yaml_bootstrap.py index 18a1cd289f..16183d8266 100644 --- a/utils/yaml_bootstrap.py +++ b/utils/yaml_bootstrap.py @@ -25,7 +25,7 @@ import re _PLAIN = re.compile(r"^[A-Za-z_/][A-Za-z0-9_./+@:\- ]*$") _RESERVED = re.compile(r"^(?:true|false|yes|no|on|off|y|n|null)$", re.IGNORECASE) _NON_PRINTABLE = re.compile( - "[^\x09\x0a\x0d\x20-\x7e\x85\xa0-\U0000d7ff\U0000e000-\U0000fffd\U00010000-\U0010ffff]" + r"[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x84\x86-\x9f\ud800-\udfff￾￿]" )