|
| 1 | +# Changelog for `anything-sync-daemon` |
| 2 | + |
| 3 | +All notable changes to this project will be documented in this file. |
| 4 | + |
| 5 | +## [Unreleased] |
| 6 | + |
| 7 | +### Added |
| 8 | + |
| 9 | +- Support running as an unprivileged user. |
| 10 | +- Document usage in [a Markdown file](/USAGE.md) readable in GitHub's web UI. |
| 11 | +- Document significant environment variables in the manual page. |
| 12 | +- Add [a Nix derivation](/nix/packages.nix) for `anything-sync-daemon`. |
| 13 | +- Add [NixOS modules](/nix/nixos-modules.nix) for managing |
| 14 | + `anything-sync-daemon`. |
| 15 | +- Support OverlayFS when running as an unprivileged user by managing mounts |
| 16 | + through the new [`asd-mount-helper`](/common/asd-mount-helper) script. |
| 17 | + For this to work, the user in question must be able to run `asd-mount-helper` |
| 18 | + as root via `sudo` without entering a password. |
| 19 | +- Install the example systemd unit files to the `/user/` unit file hierarchy |
| 20 | + when executing the `install-systemd` Make target. |
| 21 | + |
| 22 | +### Fixed |
| 23 | + |
| 24 | +- Only unmount bind mounts if they have the expected source, and only unmount |
| 25 | + volatile paths if they are OverlayFS mountpoints. |
| 26 | +- Ensure that `asd.conf`'s parent directory exists before attempt to copy |
| 27 | + `asd.conf` into it. |
| 28 | +- Deduplicate sync targets (entries in the `WHATTOSYNC` array). This means |
| 29 | + testing for string equality on said targets' canonicalized representations, |
| 30 | + as determined by `realpath -m` or `readlink -m`, if those commands are |
| 31 | + available and respect the `-m` ("canonicalize missing") option, or otherwise |
| 32 | + by a native shell routine that simply removes trailing slashes. |
| 33 | + `anything-sync-daemon` issues a non-fatal warning if it detects duplicate |
| 34 | + sync targets. |
| 35 | +- Ensure that all intended mount points are mounted as expected when performing |
| 36 | + the "ungraceful state" check. This means checking that bind mounts exist and |
| 37 | + have the expected source (e.g. `/foo/bar/.baz-backup_asd-old` has the source |
| 38 | + `/foo/bar/baz`) and that (when `USE_OVERLAYFS` is in effect) overlay mount |
| 39 | + targets have the same mount options as their mount sources. This makes it |
| 40 | + possible for `asd` to recover from partial mount states -- that is, to |
| 41 | + sensibly re-mount intended mount points before performing re-synchronization. |
| 42 | +- In the "ungraceful state" check, only unmount intended mountpoints if they |
| 43 | + are mounted as expected (in the manner described immediately above). This |
| 44 | + means that `asd` is no longer liable to unmount other filesystems that may |
| 45 | + happen to be mounted in the relevant locations. |
| 46 | +- Install the `asd.conf` parent directory before attempting to copy `asd.conf` |
| 47 | + into place. |
| 48 | + |
| 49 | +### Changed |
| 50 | + |
| 51 | +- **BREAKING CHANGE**: Load `asd.conf` in a subprocess. This is a breaking |
| 52 | + change for configurations that attempt to inspect or modify the |
| 53 | + `anything-sync-daemon` script's internal state. |
| 54 | +- **BREAKING CHANGE**: Enforce a timeout of configurable |
| 55 | + duration on loading `asd.conf` operation. This is a breaking change for |
| 56 | + configurations that do not load within said timeout, though this can be |
| 57 | + addressed by specifying a longer timeout in the `ASDCONFTIMEOUT` environment |
| 58 | + variable. |
| 59 | +- **BREAKING CHANGE**: Use the portable shebang `#!/usr/bin/env bash` rather |
| 60 | + than using `#!/bin/bash`. This is a breaking change for any setups that (a) |
| 61 | + have a `bash` under an entry in `PATH` that takes precedence over |
| 62 | + `/bin/bash`, and (b) are compatible with `/bin/bash` but not the |
| 63 | + higher-precedence `bash`. It is also incompatible with setups that lack |
| 64 | + `/bin` in `PATH`. |
| 65 | +- Respect [the `NO_COLOR` environment variable](https://no-color.org); that is, |
| 66 | + do not colorize output if `NO_COLOR` is set to a non-empty value. |
| 67 | +- **BREAKING CHANGE**: Attempt to obtain an exclusive lock in-process (via |
| 68 | + `flock -n <file-descriptor>`) rather than by re-executing when the `FLOCKER` |
| 69 | + environment variable is unset or empty. This breaks setups that bypass |
| 70 | + locking by setting `FLOCKER` to a non-empty value. |
| 71 | +- **BREAKING CHANGE**: detect the presence of `asd.service` by running |
| 72 | + `systemd list-unit-files asd.service`, in addition to checking for the unit |
| 73 | + file at `/usr/lib/systemd/system/asd.service` (or, if running `asd` as a |
| 74 | + non-root user, `/usr/lib/systemd/user/asd.service`). This makes `asd` liable |
| 75 | + to conclude that it is being run under systemd when previously it would have |
| 76 | + concluded otherwise. |
| 77 | +- **BREAKING CHANGE**: detect the `INVOCATION_ID` environment variable and, if |
| 78 | + it is present, determine the name of the corresponding systemd service, if |
| 79 | + one exists. If a service is detected, assume that `asd` is running under |
| 80 | + systemd. As with the item just above, this makes `asd` liable to conclude |
| 81 | + that it is being run under systemd when previously it would have concluded |
| 82 | + otherwise. |
| 83 | + |
| 84 | +### Removed |
| 85 | + |
| 86 | +- Removed the `asd.conf` "syntax check". Now, `anything-sync-daemon` accepts |
| 87 | + any valid Bash code in `asd.conf`. |
0 commit comments