kp-sync 0.6.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- kp_sync-0.6.0/.pycodestyle +5 -0
- kp_sync-0.6.0/CHANGES.md +449 -0
- kp_sync-0.6.0/DESIGN.md +81 -0
- kp_sync-0.6.0/LICENSE +674 -0
- kp_sync-0.6.0/MANIFEST.in +9 -0
- kp_sync-0.6.0/PKG-INFO +333 -0
- kp_sync-0.6.0/PLAN.md +145 -0
- kp_sync-0.6.0/README.md +293 -0
- kp_sync-0.6.0/design/architecture.md +251 -0
- kp_sync-0.6.0/design/configuration-cli.md +339 -0
- kp_sync-0.6.0/design/development.md +190 -0
- kp_sync-0.6.0/design/endpoints-and-access.md +467 -0
- kp_sync-0.6.0/design/history-and-sync.md +728 -0
- kp_sync-0.6.0/design/interaction.md +303 -0
- kp_sync-0.6.0/design/lifecycle.md +274 -0
- kp_sync-0.6.0/docs/_ext/cli_help.py +40 -0
- kp_sync-0.6.0/docs/_ext/module_reference.py +55 -0
- kp_sync-0.6.0/docs/_static/layout.css +59 -0
- kp_sync-0.6.0/docs/api.rst +129 -0
- kp_sync-0.6.0/docs/cli.rst +8 -0
- kp_sync-0.6.0/docs/conf.py +32 -0
- kp_sync-0.6.0/docs/contributing.rst +63 -0
- kp_sync-0.6.0/docs/getting-started.rst +64 -0
- kp_sync-0.6.0/docs/index.rst +21 -0
- kp_sync-0.6.0/docs/integration.rst +108 -0
- kp_sync-0.6.0/docs/internals.rst +73 -0
- kp_sync-0.6.0/docs/modules.rst +9 -0
- kp_sync-0.6.0/docs/reusing-documentation.rst +105 -0
- kp_sync-0.6.0/examples/README.md +163 -0
- kp_sync-0.6.0/examples/bash-completion/kps +16 -0
- kp_sync-0.6.0/examples/configs/cloud-only.toml +31 -0
- kp_sync-0.6.0/examples/configs/cloud-rcd.toml +33 -0
- kp_sync-0.6.0/examples/configs/dropbox.toml +16 -0
- kp_sync-0.6.0/examples/configs/everything.toml +154 -0
- kp_sync-0.6.0/examples/configs/pendrives-only.toml +42 -0
- kp_sync-0.6.0/examples/configs/persistent-hub-folders.toml +56 -0
- kp_sync-0.6.0/examples/keepass +12 -0
- kp_sync-0.6.0/examples/main-laptop.toml +26 -0
- kp_sync-0.6.0/examples/second-laptop.toml +24 -0
- kp_sync-0.6.0/examples/udevmon/main-laptop.toml +63 -0
- kp_sync-0.6.0/examples/udevmon/second-laptop.toml +42 -0
- kp_sync-0.6.0/man/man1/kp-sync.1 +975 -0
- kp_sync-0.6.0/man/man5/kp-sync-config.5 +899 -0
- kp_sync-0.6.0/pyproject.toml +60 -0
- kp_sync-0.6.0/setup.cfg +4 -0
- kp_sync-0.6.0/src/kp_sync/__init__.py +5 -0
- kp_sync-0.6.0/src/kp_sync/__main__.py +8 -0
- kp_sync-0.6.0/src/kp_sync/access_op.py +146 -0
- kp_sync-0.6.0/src/kp_sync/access_ops.py +480 -0
- kp_sync-0.6.0/src/kp_sync/backups.py +86 -0
- kp_sync-0.6.0/src/kp_sync/baseline.py +804 -0
- kp_sync-0.6.0/src/kp_sync/classify.py +103 -0
- kp_sync-0.6.0/src/kp_sync/cleanup.py +177 -0
- kp_sync-0.6.0/src/kp_sync/cli.py +1123 -0
- kp_sync-0.6.0/src/kp_sync/cloud_contact.py +175 -0
- kp_sync-0.6.0/src/kp_sync/completion.py +119 -0
- kp_sync-0.6.0/src/kp_sync/config.py +1105 -0
- kp_sync-0.6.0/src/kp_sync/content.py +62 -0
- kp_sync-0.6.0/src/kp_sync/credentials.py +349 -0
- kp_sync-0.6.0/src/kp_sync/daemon/__init__.py +3 -0
- kp_sync-0.6.0/src/kp_sync/daemon/apps.py +658 -0
- kp_sync-0.6.0/src/kp_sync/daemon/client.py +388 -0
- kp_sync-0.6.0/src/kp_sync/daemon/dbus.py +332 -0
- kp_sync-0.6.0/src/kp_sync/daemon/inhibit.py +137 -0
- kp_sync-0.6.0/src/kp_sync/daemon/leases.py +203 -0
- kp_sync-0.6.0/src/kp_sync/daemon/protocol.py +305 -0
- kp_sync-0.6.0/src/kp_sync/daemon/rescue.py +755 -0
- kp_sync-0.6.0/src/kp_sync/daemon/server.py +2116 -0
- kp_sync-0.6.0/src/kp_sync/daemon/systemd.py +251 -0
- kp_sync-0.6.0/src/kp_sync/daemon/triggers.py +204 -0
- kp_sync-0.6.0/src/kp_sync/drive_retire.py +288 -0
- kp_sync-0.6.0/src/kp_sync/drive_setup.py +344 -0
- kp_sync-0.6.0/src/kp_sync/drive_sync.py +107 -0
- kp_sync-0.6.0/src/kp_sync/drives.py +349 -0
- kp_sync-0.6.0/src/kp_sync/endpoints/__init__.py +27 -0
- kp_sync-0.6.0/src/kp_sync/endpoints/access.py +26 -0
- kp_sync-0.6.0/src/kp_sync/endpoints/base.py +307 -0
- kp_sync-0.6.0/src/kp_sync/endpoints/command.py +172 -0
- kp_sync-0.6.0/src/kp_sync/endpoints/file.py +524 -0
- kp_sync-0.6.0/src/kp_sync/endpoints/rclone.py +1060 -0
- kp_sync-0.6.0/src/kp_sync/endpoints/session.py +37 -0
- kp_sync-0.6.0/src/kp_sync/engine.py +4887 -0
- kp_sync-0.6.0/src/kp_sync/history.py +375 -0
- kp_sync-0.6.0/src/kp_sync/history_command.py +154 -0
- kp_sync-0.6.0/src/kp_sync/idle.py +100 -0
- kp_sync-0.6.0/src/kp_sync/integration.py +1646 -0
- kp_sync-0.6.0/src/kp_sync/kdbx.py +127 -0
- kp_sync-0.6.0/src/kp_sync/keepassxc.py +280 -0
- kp_sync-0.6.0/src/kp_sync/lock.py +76 -0
- kp_sync-0.6.0/src/kp_sync/log.py +189 -0
- kp_sync-0.6.0/src/kp_sync/merge.py +2042 -0
- kp_sync-0.6.0/src/kp_sync/paths.py +153 -0
- kp_sync-0.6.0/src/kp_sync/pending.py +158 -0
- kp_sync-0.6.0/src/kp_sync/rclone_credentials.py +263 -0
- kp_sync-0.6.0/src/kp_sync/rclone_rcd.py +553 -0
- kp_sync-0.6.0/src/kp_sync/reach.py +448 -0
- kp_sync-0.6.0/src/kp_sync/repair.py +185 -0
- kp_sync-0.6.0/src/kp_sync/services.py +645 -0
- kp_sync-0.6.0/src/kp_sync/sessions/__init__.py +3 -0
- kp_sync-0.6.0/src/kp_sync/sessions/authkeys.py +425 -0
- kp_sync-0.6.0/src/kp_sync/sessions/diagnostic.py +191 -0
- kp_sync-0.6.0/src/kp_sync/sessions/records.py +457 -0
- kp_sync-0.6.0/src/kp_sync/sessions/session.py +792 -0
- kp_sync-0.6.0/src/kp_sync/sessions/sftp_serve.py +270 -0
- kp_sync-0.6.0/src/kp_sync/state.py +685 -0
- kp_sync-0.6.0/src/kp_sync/udevmon.py +94 -0
- kp_sync-0.6.0/src/kp_sync/ui/__init__.py +10 -0
- kp_sync-0.6.0/src/kp_sync/ui/base.py +106 -0
- kp_sync-0.6.0/src/kp_sync/ui/factory.py +51 -0
- kp_sync-0.6.0/src/kp_sync/ui/fake.py +66 -0
- kp_sync-0.6.0/src/kp_sync/ui/gui.py +417 -0
- kp_sync-0.6.0/src/kp_sync/ui/none.py +32 -0
- kp_sync-0.6.0/src/kp_sync/ui/progress.py +111 -0
- kp_sync-0.6.0/src/kp_sync/ui/tty.py +139 -0
- kp_sync-0.6.0/src/kp_sync/verify.py +196 -0
- kp_sync-0.6.0/src/kp_sync.egg-info/PKG-INFO +333 -0
- kp_sync-0.6.0/src/kp_sync.egg-info/SOURCES.txt +169 -0
- kp_sync-0.6.0/src/kp_sync.egg-info/dependency_links.txt +1 -0
- kp_sync-0.6.0/src/kp_sync.egg-info/entry_points.txt +2 -0
- kp_sync-0.6.0/src/kp_sync.egg-info/requires.txt +13 -0
- kp_sync-0.6.0/src/kp_sync.egg-info/top_level.txt +1 -0
- kp_sync-0.6.0/tests/__init__.py +49 -0
- kp_sync-0.6.0/tests/acceptance_sessions.py +435 -0
- kp_sync-0.6.0/tests/data/keepassxc.xml +38 -0
- kp_sync-0.6.0/tests/fixtures.py +69 -0
- kp_sync-0.6.0/tests/test_access_ops.py +558 -0
- kp_sync-0.6.0/tests/test_baseline.py +647 -0
- kp_sync-0.6.0/tests/test_cleanup.py +227 -0
- kp_sync-0.6.0/tests/test_cloud_contact.py +122 -0
- kp_sync-0.6.0/tests/test_cloud_sync.py +1216 -0
- kp_sync-0.6.0/tests/test_compatibility.py +129 -0
- kp_sync-0.6.0/tests/test_completion.py +127 -0
- kp_sync-0.6.0/tests/test_config.py +516 -0
- kp_sync-0.6.0/tests/test_content.py +102 -0
- kp_sync-0.6.0/tests/test_credentials.py +299 -0
- kp_sync-0.6.0/tests/test_daemon.py +2142 -0
- kp_sync-0.6.0/tests/test_desktop.py +986 -0
- kp_sync-0.6.0/tests/test_documentation.py +144 -0
- kp_sync-0.6.0/tests/test_drive_retire.py +480 -0
- kp_sync-0.6.0/tests/test_drive_setup.py +236 -0
- kp_sync-0.6.0/tests/test_drives.py +244 -0
- kp_sync-0.6.0/tests/test_endpoints.py +516 -0
- kp_sync-0.6.0/tests/test_engine.py +2495 -0
- kp_sync-0.6.0/tests/test_examples.py +104 -0
- kp_sync-0.6.0/tests/test_history.py +193 -0
- kp_sync-0.6.0/tests/test_history_command.py +89 -0
- kp_sync-0.6.0/tests/test_idle.py +188 -0
- kp_sync-0.6.0/tests/test_integration.py +751 -0
- kp_sync-0.6.0/tests/test_isolation.py +49 -0
- kp_sync-0.6.0/tests/test_kdbx.py +142 -0
- kp_sync-0.6.0/tests/test_keepassxc.py +305 -0
- kp_sync-0.6.0/tests/test_keepassxc_settings.py +49 -0
- kp_sync-0.6.0/tests/test_license.py +54 -0
- kp_sync-0.6.0/tests/test_log.py +297 -0
- kp_sync-0.6.0/tests/test_merge.py +1165 -0
- kp_sync-0.6.0/tests/test_pending.py +55 -0
- kp_sync-0.6.0/tests/test_rclone.py +558 -0
- kp_sync-0.6.0/tests/test_rclone_credentials.py +284 -0
- kp_sync-0.6.0/tests/test_rclone_rcd.py +870 -0
- kp_sync-0.6.0/tests/test_reach.py +518 -0
- kp_sync-0.6.0/tests/test_releases.py +607 -0
- kp_sync-0.6.0/tests/test_repair.py +150 -0
- kp_sync-0.6.0/tests/test_run_tests.py +66 -0
- kp_sync-0.6.0/tests/test_services.py +985 -0
- kp_sync-0.6.0/tests/test_sessions.py +859 -0
- kp_sync-0.6.0/tests/test_skeleton.py +474 -0
- kp_sync-0.6.0/tests/test_status.py +323 -0
- kp_sync-0.6.0/tests/test_ui.py +285 -0
- kp_sync-0.6.0/tools/docs.py +79 -0
- kp_sync-0.6.0/tools/releases.py +624 -0
- kp_sync-0.6.0/tools/run_tests.py +184 -0
kp_sync-0.6.0/CHANGES.md
ADDED
|
@@ -0,0 +1,449 @@
|
|
|
1
|
+
# Changes
|
|
2
|
+
|
|
3
|
+
User-visible changes per release, newest first. Commit history and tags
|
|
4
|
+
hold the details; design decisions live in the `design/` chapters.
|
|
5
|
+
|
|
6
|
+
## 0.6.0 (2026-11-11)
|
|
7
|
+
|
|
8
|
+
### Added
|
|
9
|
+
|
|
10
|
+
- kp-sync is published on PyPI (`pipx install kp-sync`, or
|
|
11
|
+
`pip install kp-sync`; extra `keepassxc`), with documentation on Read
|
|
12
|
+
the Docs. The README lists the external tools it drives.
|
|
13
|
+
- `tools/releases.py install --pypi X.Y.Z` and `test --pypi X.Y.Z` take
|
|
14
|
+
the release from PyPI's source package (its SHA-256 checked against
|
|
15
|
+
PyPI's) instead of a Git tag, with the same dependency handling, unit
|
|
16
|
+
refresh and daemon restart. "Updating a machine from PyPI" in
|
|
17
|
+
`examples/README.md` uses them without a checkout.
|
|
18
|
+
|
|
19
|
+
### Changed
|
|
20
|
+
|
|
21
|
+
- The kernel keyring is reached through `linux-keyctl` (GPL-3.0-or-later,
|
|
22
|
+
on PyPI), which replaces the private `keyctl` module; every version in
|
|
23
|
+
the repository's history now declares it. Install it before running
|
|
24
|
+
this version from a source tree.
|
|
25
|
+
- `tools/releases.py install` installs a release's missing dependencies
|
|
26
|
+
first (plain pip, never upgrading satisfied ones; on failure it stops
|
|
27
|
+
before touching kp-sync) and refuses to restart the daemon when
|
|
28
|
+
`pip check` reports kp-sync's requirements broken. `test` reports
|
|
29
|
+
missing dependencies first.
|
|
30
|
+
- udevmon is installed as its own tool from PyPI (`pipx install
|
|
31
|
+
--system-site-packages udevmon`), not as a kp-sync dependency.
|
|
32
|
+
- kp-sync is licensed under the GNU General Public License, version 3
|
|
33
|
+
or later (`LICENSE`), and so are all earlier versions: the license
|
|
34
|
+
file is part of every version in the repository's history.
|
|
35
|
+
- All source files now have a license header: every Python file and
|
|
36
|
+
script starts with `SPDX-License-Identifier: GPL-3.0-or-later` and the
|
|
37
|
+
copyright line, and `tests/test_license.py` keeps new files compliant.
|
|
38
|
+
- The package metadata declares `GPL-3.0-or-later`; building kp-sync
|
|
39
|
+
needs setuptools 77 or later.
|
|
40
|
+
|
|
41
|
+
### Fixed
|
|
42
|
+
|
|
43
|
+
- On Python 3.11, `kp-sync drive-sync up --mode M --drive-id ID
|
|
44
|
+
MOUNTPOINT` (the command udevmon runs) failed with "unrecognized
|
|
45
|
+
arguments": argparse there cannot fill an optional positional after
|
|
46
|
+
options. The mount point is now taken on every supported Python.
|
|
47
|
+
|
|
48
|
+
## 0.5.1 (2026-11-10)
|
|
49
|
+
|
|
50
|
+
### Added
|
|
51
|
+
|
|
52
|
+
- `kp-sync completion install [--alias NAME]` writes Bash completion for
|
|
53
|
+
kp-sync and for aliases such as `kps` into bash-completion's per-user
|
|
54
|
+
directory; no profile needed.
|
|
55
|
+
|
|
56
|
+
### Changed
|
|
57
|
+
|
|
58
|
+
- The hourly idle sync (`kp-sync sync --idle`, run by the timer) is
|
|
59
|
+
skipped while every cloud is clearly unreachable (its reach check
|
|
60
|
+
fails or its credentials are not published), without starting the
|
|
61
|
+
daemon; one still runs every eight intervals. Idle syncs no longer
|
|
62
|
+
fail because a copy is unreachable, so the timer's unit stops failing
|
|
63
|
+
every hour offline. Reinstall the units (`kp-sync service install
|
|
64
|
+
daemon`, done by `tools/releases.py install`) to get `--idle`.
|
|
65
|
+
|
|
66
|
+
### Fixed
|
|
67
|
+
|
|
68
|
+
- Notices from a sync run by the daemon (a decommissioned or damaged
|
|
69
|
+
key drive, a stale-cache save, a rejected password) now appear as
|
|
70
|
+
desktop notifications while `[ui] notify` is true; they were only
|
|
71
|
+
logged.
|
|
72
|
+
|
|
73
|
+
## 0.5.0 (2026-11-06)
|
|
74
|
+
|
|
75
|
+
### Added
|
|
76
|
+
|
|
77
|
+
- `kp-sync drive-retire DRIVE` decommissions a key drive, present or
|
|
78
|
+
not, named by its udevmon device, a `[drives.aliases]` name or
|
|
79
|
+
`SERIAL:FS_UUID`. Without `--confirm` it previews the drive's record
|
|
80
|
+
and anything that blocks it (attached, unsynced or the only copy of
|
|
81
|
+
a version); applying writes a reversible marker to the shared
|
|
82
|
+
history, so every machine leaves the drive untouched from its next
|
|
83
|
+
sync, and removes this machine's udevmon device (`--keep-device`
|
|
84
|
+
sets it to ignore). `drive-setup` enrols the drive again. The first
|
|
85
|
+
marker moves the shared history to schema 3, which kp-sync before
|
|
86
|
+
0.5.0 cannot read: upgrade every machine before using it.
|
|
87
|
+
- Before a run's first rclone call, a check of at most `reach_timeout`
|
|
88
|
+
seconds (default 3) tries a TCP connection to the cloud's server
|
|
89
|
+
(derived from the rclone remote, or a proxy) and asks NetworkManager
|
|
90
|
+
about a captive portal. When it fails, the cloud is skipped at once,
|
|
91
|
+
so an offline start shows the "cloud cannot be reached" warning
|
|
92
|
+
before KeePassXC opens instead of launching silently after 20 s.
|
|
93
|
+
`reach_check = "HOST:PORT"` or `false` per `rclone` endpoint;
|
|
94
|
+
`doctor` reports a check that fails while rclone works.
|
|
95
|
+
- A pre-launch sync still running when the application starts and then
|
|
96
|
+
ending without the cloud shows the same warning late.
|
|
97
|
+
|
|
98
|
+
### Fixed
|
|
99
|
+
|
|
100
|
+
- An attached key drive without a database (as left by `drive-setup`
|
|
101
|
+
on an empty stick) is now filled with the current version; it was
|
|
102
|
+
skipped as unavailable.
|
|
103
|
+
- `drive-setup` gives a second profile's drives and actions their own
|
|
104
|
+
tag (`keepass-PROFILE`), so one profile's drives no longer run
|
|
105
|
+
another profile's actions, and describes the trigger by the
|
|
106
|
+
profile's existing actions.
|
|
107
|
+
- After the first rclone timeout of a run the cloud is unavailable for
|
|
108
|
+
the rest of it, so a hanging cloud costs one timeout per run instead
|
|
109
|
+
of one per call.
|
|
110
|
+
|
|
111
|
+
## 0.4.0 (2026-11-06)
|
|
112
|
+
|
|
113
|
+
### Added
|
|
114
|
+
|
|
115
|
+
- `kp-sync drive-setup MOUNTPOINT NAME` prepares a plugged key drive
|
|
116
|
+
(udevmon 0.7.0+): it registers the drive and this profile's actions
|
|
117
|
+
in kp-sync's udevmon drop-in and runs them, so the normal attach
|
|
118
|
+
fills an empty drive with the current database and history (a drive
|
|
119
|
+
that already holds one is merged, never overwritten). `--dry-run`
|
|
120
|
+
shows the plan.
|
|
121
|
+
|
|
122
|
+
- Once per attachment, a key drive's history bases are checked against
|
|
123
|
+
their SHA-256 names; a damaged one is moved to `damaged/` on the
|
|
124
|
+
drive (never deleted), replaced from a verified copy in the same run,
|
|
125
|
+
and reported, so a failing stick is noticed before it is the only
|
|
126
|
+
offline copy.
|
|
127
|
+
|
|
128
|
+
- When the pre-launch sync cannot reach the cloud, a warning dialog says
|
|
129
|
+
so and how long it has been since the cloud was last reached (with
|
|
130
|
+
`confirm_without_cloud`, the same text is a question). `status` shows
|
|
131
|
+
when each cloud was last reached from this machine, and a notification
|
|
132
|
+
appears when hub changes have waited longer than
|
|
133
|
+
`[daemon] cloud_warning_hours` (default 24) for the cloud.
|
|
134
|
+
|
|
135
|
+
## 0.3.8 (2026-11-06)
|
|
136
|
+
|
|
137
|
+
### Changed
|
|
138
|
+
|
|
139
|
+
- The udevmon examples are now drop-ins for udevmon 0.7.0 or later
|
|
140
|
+
(`~/.config/udevmon/config.d/50-kp-sync.toml`), with
|
|
141
|
+
`notify_on_failure`; the rclone provider's own drop-in orders its
|
|
142
|
+
actions around kp-sync's with `order` 10/90. `doctor`'s integration
|
|
143
|
+
check reads udevmon's drop-ins too.
|
|
144
|
+
|
|
145
|
+
### Added
|
|
146
|
+
|
|
147
|
+
- `tools/run_tests.py` runs the test suite in parallel, one process per
|
|
148
|
+
module (about 40 s instead of 80 s on a 4-core laptop);
|
|
149
|
+
`tools/releases.py` uses it for the full suite. Test databases use a
|
|
150
|
+
light key derivation, which took the serial suite from about 6.5
|
|
151
|
+
minutes to 80 s.
|
|
152
|
+
|
|
153
|
+
## 0.3.7 (2026-11-05)
|
|
154
|
+
|
|
155
|
+
### Added
|
|
156
|
+
|
|
157
|
+
- `doctor` checks that every `kp-sync` call in udevmon's actions and in
|
|
158
|
+
kp-access's `file-op-cmd` selects an existing profile, and that
|
|
159
|
+
kp-access's `db-path` is this profile's staged copy (both had to be
|
|
160
|
+
found by hand when `alpha` moved to its own profile).
|
|
161
|
+
|
|
162
|
+
## 0.3.6 (2026-11-05)
|
|
163
|
+
|
|
164
|
+
### Changed
|
|
165
|
+
|
|
166
|
+
- Without `~/.config/kp-sync/config.toml`, kp-sync stops and lists the
|
|
167
|
+
named profiles when any exist, instead of silently running on built-in
|
|
168
|
+
defaults that reach nothing. Pass `--profile NAME`.
|
|
169
|
+
|
|
170
|
+
### Documentation
|
|
171
|
+
|
|
172
|
+
- The README explains installing Bash completion when
|
|
173
|
+
`register-python-argcomplete` is not on `PATH`, and
|
|
174
|
+
`examples/bash-completion/kps` completes an alias such as
|
|
175
|
+
`kps='kp-sync --profile HOST'`.
|
|
176
|
+
|
|
177
|
+
### Fixed
|
|
178
|
+
|
|
179
|
+
- `tools/releases.py install` builds in pip's isolated environment when
|
|
180
|
+
the target environment has no setuptools, instead of failing with
|
|
181
|
+
`Cannot import 'setuptools.build_meta'`.
|
|
182
|
+
|
|
183
|
+
## 0.3.5 (2026-11-05)
|
|
184
|
+
|
|
185
|
+
### Fixed
|
|
186
|
+
|
|
187
|
+
- `service uninstall daemon` and `service disable daemon --now` no
|
|
188
|
+
longer refuse a clean daemon stop with "could not verify shutdown
|
|
189
|
+
result" (systemd drops the exit record of a stopped unit that nothing
|
|
190
|
+
references).
|
|
191
|
+
|
|
192
|
+
### Added
|
|
193
|
+
|
|
194
|
+
- `service install daemon` checks every target directory and that
|
|
195
|
+
systemd can start the `kp-sync` it names before writing anything, and
|
|
196
|
+
reports all problems at once; `doctor` checks the installed daemon
|
|
197
|
+
unit's program too.
|
|
198
|
+
- `status` shows when this machine's hub was saved since the last sync
|
|
199
|
+
("its changes are not synchronized yet"), checked locally without
|
|
200
|
+
contacting the cloud, so offline edits are visible.
|
|
201
|
+
- `tools/releases.py` cuts a release (`release`), installs a tag into
|
|
202
|
+
an environment and refreshes the profile's daemon (`install`), and
|
|
203
|
+
tests a tag from an export with a Markdown report (`test`).
|
|
204
|
+
- The daemon logs a warning when `up`/`down` (main-mode drive events,
|
|
205
|
+
which start and quit applications) reach a profile with a persistent
|
|
206
|
+
hub; use `drive-sync --mode secondary` there.
|
|
207
|
+
|
|
208
|
+
## 0.3.4 (2026-11-05)
|
|
209
|
+
|
|
210
|
+
### Fixed
|
|
211
|
+
|
|
212
|
+
- `kp-sync service install daemon` writes the absolute path of the
|
|
213
|
+
running `kp-sync` into units and desktop entries. A bare name failed
|
|
214
|
+
to start (`status=203/EXEC`) when kp-sync lived outside systemd's fixed
|
|
215
|
+
search path, for example in `~/.local/bin` or a virtual environment.
|
|
216
|
+
|
|
217
|
+
## 0.3.3 (2026-11-05)
|
|
218
|
+
|
|
219
|
+
### Added
|
|
220
|
+
|
|
221
|
+
- `require_encrypted` accepts a persistent hub on a ZFS dataset with
|
|
222
|
+
native encryption and its key loaded, as well as on dm-crypt/LUKS.
|
|
223
|
+
|
|
224
|
+
### Changed
|
|
225
|
+
|
|
226
|
+
- `rclone_transport` now defaults to `"auto"`: the daemon keeps a
|
|
227
|
+
persistent `rclone rcd` per rclone endpoint (rclone 1.61 or later) and
|
|
228
|
+
falls back to plain commands otherwise. Set `"cli"` to keep separate
|
|
229
|
+
rclone processes.
|
|
230
|
+
|
|
231
|
+
## 0.3.2 (2026-11-04)
|
|
232
|
+
|
|
233
|
+
### Added
|
|
234
|
+
|
|
235
|
+
- `--debug`, or `KP_SYNC_DEBUG=1` in the environment (for example on the
|
|
236
|
+
daemon's unit), prints `DEBUG:` lines explaining what a run decided:
|
|
237
|
+
each copy's state with short hashes and how it was observed, sync lock
|
|
238
|
+
waits, restarts, the outcome, daemon requests and queueing, and the
|
|
239
|
+
duration of configured commands and the `keepassxc-cli` check, and the
|
|
240
|
+
command line of every external program run (dialog text is not shown).
|
|
241
|
+
It never shows passwords, stdin or command output. A command handled
|
|
242
|
+
by the daemon notes that its `--debug` does not reach the daemon.
|
|
243
|
+
|
|
244
|
+
### Changed
|
|
245
|
+
|
|
246
|
+
- Commands run from a terminal no longer print routine `INFO:` lines
|
|
247
|
+
such as rclone timings and credential-copy housekeeping; `--verbose`
|
|
248
|
+
shows them again. Results, warnings and errors are unchanged, and the
|
|
249
|
+
daemon, udevmon hooks and kp-access operations log exactly as before.
|
|
250
|
+
|
|
251
|
+
### Documentation
|
|
252
|
+
|
|
253
|
+
- The `kp-sync(1)` and `kp-sync-config(5)` man pages now describe every
|
|
254
|
+
command, option and configuration key with its type, default and the
|
|
255
|
+
meaning of each accepted value. `kp-sync(1)` adds the missing
|
|
256
|
+
`repair-history` and `sftp-serve` commands, the copy states printed by
|
|
257
|
+
`sync`, and environment and file details.
|
|
258
|
+
|
|
259
|
+
## 0.3.1 (2026-11-04)
|
|
260
|
+
|
|
261
|
+
### Changed
|
|
262
|
+
|
|
263
|
+
- Cloud remotes that list other content hashes no longer download the
|
|
264
|
+
database on every sync. Dropbox's content hash is now checked against
|
|
265
|
+
local bytes like MD5 and SHA-256, so a Dropbox cloud needs one listing
|
|
266
|
+
for an unchanged sync, as Google Drive does. Other hashes of at least
|
|
267
|
+
64 bits that kp-sync cannot compute (such as OneDrive's `quickxor`)
|
|
268
|
+
show a copy unchanged, which avoids downloads on unchanged syncs and
|
|
269
|
+
before writes; the copy is still downloaded after a write to confirm
|
|
270
|
+
it.
|
|
271
|
+
|
|
272
|
+
### Documentation
|
|
273
|
+
|
|
274
|
+
- Example profiles under `examples/configs/` (cloud only, rcd transport,
|
|
275
|
+
Dropbox, pendrives only, persistent hub with folders, every option) and
|
|
276
|
+
udevmon actions for main and secondary drive modes under
|
|
277
|
+
`examples/udevmon/`, with an index in `examples/README.md`. A test keeps
|
|
278
|
+
them loadable and their commands valid.
|
|
279
|
+
|
|
280
|
+
## 0.3.0 (2026-11-04)
|
|
281
|
+
|
|
282
|
+
### Added
|
|
283
|
+
|
|
284
|
+
- Optional `rclone_transport = "auto"` on an `rclone` endpoint: the
|
|
285
|
+
daemon keeps a persistent `rclone rcd` on a private socket, so cloud
|
|
286
|
+
calls skip repeated authentication (about 1 s instead of 2–4 s per call
|
|
287
|
+
on Google Drive). It needs rclone 1.61 or later; older rclone, other
|
|
288
|
+
processes when the daemon is not running and custom commands keep
|
|
289
|
+
using plain rclone commands. The default stays `"cli"`.
|
|
290
|
+
|
|
291
|
+
### Changed
|
|
292
|
+
|
|
293
|
+
- Cloud history is faster to publish: all history copies (bases) a sync
|
|
294
|
+
uploads, downloads or prunes go to the cloud in one rclone call per
|
|
295
|
+
direction instead of one call per file (each call costs several
|
|
296
|
+
seconds on Google Drive). `state.json` and the database are still
|
|
297
|
+
written separately and in order.
|
|
298
|
+
|
|
299
|
+
### Fixed
|
|
300
|
+
|
|
301
|
+
- A copy is no longer taken as unchanged just because its size and
|
|
302
|
+
modification time are unchanged. kp-sync skips downloading a copy only
|
|
303
|
+
when its listing or probe includes a content hash (SHA-256, SHA-1 or
|
|
304
|
+
MD5, as Google Drive provides); other rclone remotes and `command`
|
|
305
|
+
endpoints are downloaded on every sync. A `command` endpoint whose
|
|
306
|
+
`probe` prints a real content hash can set the new
|
|
307
|
+
`probe_is_content_hash = true` to keep the shortcut.
|
|
308
|
+
- A pendrive whose history cannot be updated (full, read-only remount,
|
|
309
|
+
I/O error) no longer fails every sync while it is attached. Once the
|
|
310
|
+
cloud (or the first drive when offline) holds the new history, the
|
|
311
|
+
failure is logged and kp-sync asks whether to continue without updating
|
|
312
|
+
that pendrive. Accepting is remembered until the drive's history is
|
|
313
|
+
next updated; declining, or a background sync without a dialog, leaves
|
|
314
|
+
a pending decision (`kp-sync resolve` asks again). Launching, kp-access
|
|
315
|
+
and ejecting the drive are not blocked.
|
|
316
|
+
- `kp-sync history` and `kp-sync doctor` no longer race the daemon over
|
|
317
|
+
the private rclone credentials copy. Importing a new provider config or
|
|
318
|
+
removing the copy after the key drive leaves now waits for any rclone
|
|
319
|
+
run of the profile, in any process, so a running rclone can no longer
|
|
320
|
+
overwrite a newly imported login or recreate a removed copy.
|
|
321
|
+
- A pendrive whose database copy cannot be written (read-only remount,
|
|
322
|
+
full, I/O error) no longer fails every sync. If the copy is verified
|
|
323
|
+
unchanged after the failed write, that drive is skipped like an
|
|
324
|
+
unreachable one, the other copies are synchronized, and kp-sync asks
|
|
325
|
+
whether to continue without updating it (the same remembered answer
|
|
326
|
+
and pending decision as for pendrive history). A copy changed by the
|
|
327
|
+
failed write still stops the sync.
|
|
328
|
+
- After a failed sync the daemon no longer starts a new visible sync,
|
|
329
|
+
with its progress dialog, every few seconds. It retries on the next
|
|
330
|
+
save, hub change or background poll.
|
|
331
|
+
- The KeePassXC "reload when modified externally" check (daemon and
|
|
332
|
+
`kp-sync doctor`) also finds KeePassXC's settings under a custom
|
|
333
|
+
`XDG_CONFIG_HOME` and in a Flatpak installation, instead of reporting
|
|
334
|
+
the setting as missing.
|
|
335
|
+
- A saved history copy (base) that disappears from the cloud or a
|
|
336
|
+
pendrive, for example because two machines pruned at the same time or
|
|
337
|
+
it was deleted by hand, is uploaded again from wherever a copy still
|
|
338
|
+
exists: the runtime cache, another history store or a database copy
|
|
339
|
+
seen in the same sync. After a reboot only the missing ones are
|
|
340
|
+
fetched. If a version's copy exists nowhere, kp-sync refuses to publish
|
|
341
|
+
new history and shows a dialog naming the affected version and the
|
|
342
|
+
repair command, which you must accept (otherwise it stays a pending
|
|
343
|
+
decision); the database copies keep synchronizing meanwhile.
|
|
344
|
+
- New `kp-sync repair-history`: previews versions whose saved copies are
|
|
345
|
+
missing and whether they can be recovered; `--apply
|
|
346
|
+
--confirm-writers-paused` restores what it can and removes versions
|
|
347
|
+
whose copy exists nowhere, keeping the remaining history connected.
|
|
348
|
+
|
|
349
|
+
## 0.2.1 (2026-11-03)
|
|
350
|
+
|
|
351
|
+
Maintenance release: test isolation fixes found by the code review on the
|
|
352
|
+
development laptop. No configuration or behaviour changes for users.
|
|
353
|
+
|
|
354
|
+
### Fixed
|
|
355
|
+
|
|
356
|
+
- `kp-sync status` queries the daemon socket in the runtime directory it
|
|
357
|
+
has just checked, instead of re-deriving the path from the process
|
|
358
|
+
environment. `daemon.client.Client` accepts an explicit `directory`.
|
|
359
|
+
|
|
360
|
+
### Tests
|
|
361
|
+
|
|
362
|
+
- Status tests no longer create the real `$XDG_RUNTIME_DIR/kp-sync/` or
|
|
363
|
+
connect to the real control socket, which socket activation would turn
|
|
364
|
+
into a production daemon start.
|
|
365
|
+
- Integration and desktop tests create their temporary trees on runtime
|
|
366
|
+
storage (`tests.fixtures.private_tempdir()`), not inside the checkout,
|
|
367
|
+
so they pass when the checkout's ancestors are group-writable.
|
|
368
|
+
- Install and uninstall tests no longer depend on the user's umask.
|
|
369
|
+
- The KeePassXC compatibility test passes `-p` to `keepassxc-cli import`
|
|
370
|
+
only when the installed version supports it (2.7 and later), so it runs
|
|
371
|
+
on both 2.6 and 2.7.
|
|
372
|
+
|
|
373
|
+
### Documentation
|
|
374
|
+
|
|
375
|
+
- Agent session instructions moved to `CLAUDE.md`.
|
|
376
|
+
- Open code-review findings are tracked in `REVIEW_FINDINGS.md`;
|
|
377
|
+
`NEXT_STEPS.md` records the development host.
|
|
378
|
+
|
|
379
|
+
## 0.2.0 (2026-11-03)
|
|
380
|
+
|
|
381
|
+
Separates drive attachment from rclone credential provisioning and makes
|
|
382
|
+
daemon installation and activation explicit.
|
|
383
|
+
|
|
384
|
+
### Added
|
|
385
|
+
|
|
386
|
+
- `kp-sync drive-sync up|down --mode main|secondary --drive-id
|
|
387
|
+
SERIAL:FS_UUID [MOUNTPOINT]` for udevmon drive actions. `--mode` is
|
|
388
|
+
required: `main` sends `up`/`down`, `secondary` sends `attach`/`detach`.
|
|
389
|
+
It verifies the mounted drive's identity, writes the pending-up marker
|
|
390
|
+
under the shared `keydisk.lock`, submits the request with `--no-wait`,
|
|
391
|
+
and never touches rclone credentials.
|
|
392
|
+
- Private rclone credentials: an rclone endpoint's `rclone_config` now
|
|
393
|
+
names a provider-owned file that kp-sync only reads. Each profile gives
|
|
394
|
+
rclone its own copy under `<profile run dir>/rclone/<endpoint>.conf`,
|
|
395
|
+
imports changes between rclone runs, and drains the copy after the
|
|
396
|
+
provider removes the file (one more sync, then deletion). Without an
|
|
397
|
+
external file or copy the cloud endpoint reports "credentials
|
|
398
|
+
unavailable" and is skipped. Endpoints without `rclone_config` are
|
|
399
|
+
unchanged.
|
|
400
|
+
- The daemon watches provider configs: a new or changed file triggers a
|
|
401
|
+
sync while leases are held; a removed one triggers the draining sync.
|
|
402
|
+
- `kp-sync service install daemon [--desktop]` writes unit files (and
|
|
403
|
+
desktop entries only with `--desktop`) without enabling anything.
|
|
404
|
+
- `kp-sync service enable|disable daemon [--now]` manages activation
|
|
405
|
+
triggers; `--now` also starts or stops them.
|
|
406
|
+
- `kp-sync service uninstall daemon [--desktop]` removes only unmodified
|
|
407
|
+
generated files for the selected profile, after stopping triggers and
|
|
408
|
+
the daemon; shared templates, other profiles and runtime recovery data
|
|
409
|
+
are kept.
|
|
410
|
+
- `kp-sync service status daemon` also reports each trigger's active and
|
|
411
|
+
enabled state.
|
|
412
|
+
|
|
413
|
+
### Changed
|
|
414
|
+
|
|
415
|
+
- `doctor` checks rclone through the private copy.
|
|
416
|
+
- Runtime cleanup deletes this profile's private credential copies; it no
|
|
417
|
+
longer deletes or inspects a shared runtime rclone config.
|
|
418
|
+
|
|
419
|
+
### Removed
|
|
420
|
+
|
|
421
|
+
- `kp-sync install-units` (no alias). Use `service install daemon`, then
|
|
422
|
+
`service enable daemon [--now]`.
|
|
423
|
+
- `examples/keydisk-kp-sync.py` and the second-laptop bundle's
|
|
424
|
+
`keydisk-second-laptop` wrapper; udevmon actions call `drive-sync`
|
|
425
|
+
directly. `~/.dynamic_config` is no longer created or read.
|
|
426
|
+
|
|
427
|
+
### Upgrade notes
|
|
428
|
+
|
|
429
|
+
- Replace udevmon actions that ran `keydisk.py` with `kp-sync drive-sync`
|
|
430
|
+
actions plus the udevmon rclone-config provider, ordered as described in
|
|
431
|
+
`design/endpoints-and-access.md`.
|
|
432
|
+
- Point each rclone endpoint's `rclone_config` at the provider's
|
|
433
|
+
published file, normally `$XDG_RUNTIME_DIR/rclone/rclone.conf`.
|
|
434
|
+
- Update scripts that called `install-units`.
|
|
435
|
+
|
|
436
|
+
## 0.1.3 (2026-10-29)
|
|
437
|
+
|
|
438
|
+
Maintenance commands and offline pendrive history.
|
|
439
|
+
|
|
440
|
+
- Collision-aware short hashes in `kp-sync status` (`--long` for full).
|
|
441
|
+
- `kp-sync cleanup` previews obsolete baseline files and deletes them only
|
|
442
|
+
with an explicit scope (`--store NAME --confirm-writers-paused` or
|
|
443
|
+
`--runtime`).
|
|
444
|
+
- `kp-sync service start|stop|restart|status daemon`.
|
|
445
|
+
- Reconciled history and retained bases stay on configured writable
|
|
446
|
+
pendrives while the cloud is available, so a cold offline start can
|
|
447
|
+
recognize their copies.
|
|
448
|
+
|
|
449
|
+
Earlier releases: see the `v0.1.0`–`v0.1.2` tags and Git history.
|
kp_sync-0.6.0/DESIGN.md
ADDED
|
@@ -0,0 +1,81 @@
|
|
|
1
|
+
# kp-sync design
|
|
2
|
+
|
|
3
|
+
This index and the chapters under `design/` together form the authoritative
|
|
4
|
+
architecture and safety design. Start here, then read the chapters relevant
|
|
5
|
+
to the task. Each decision has one authoritative home; other chapters refer
|
|
6
|
+
to it rather than duplicating its rules.
|
|
7
|
+
|
|
8
|
+
`PLAN.md` tracks current implementation and acceptance; a developer's
|
|
9
|
+
deployment notes stay outside the repository. Superseded work
|
|
10
|
+
descriptions remain in Git history; retain only lessons with continuing
|
|
11
|
+
value, not parallel narrative archives. Design text is not proof that
|
|
12
|
+
a feature is implemented: explicit planned decisions, including disposable
|
|
13
|
+
session retirement, remain pending until the implementation plan says
|
|
14
|
+
otherwise. Historical wording in the chapters is preserved by this
|
|
15
|
+
structure-only reorganization.
|
|
16
|
+
|
|
17
|
+
## Chapter index
|
|
18
|
+
|
|
19
|
+
| Chapter | Sections |
|
|
20
|
+
|---|---|
|
|
21
|
+
| [Architecture and safety](design/architecture.md) | [Goals](design/architecture.md#goals), [existing pieces](design/architecture.md#existing-pieces), [packaging decisions](design/architecture.md#packaging-decisions), [concepts](design/architecture.md#concepts), [error handling and safety](design/architecture.md#error-handling-and-safety), [feature parity](design/architecture.md#feature-parity-with-the-replaced-scripts) |
|
|
22
|
+
| [History, synchronization and restore](design/history-and-sync.md) | [Baseline store](design/history-and-sync.md#baseline-store), [sync algorithm](design/history-and-sync.md#sync-algorithm-kp-sync-sync), [restoring an old version](design/history-and-sync.md#restoring-an-old-version) |
|
|
23
|
+
| [Daemon and runtime lifecycle](design/lifecycle.md) | [Daemon and leases](design/lifecycle.md#daemon-and-leases), [runtime state](design/lifecycle.md#runtime-state-all-under-xdg_runtime_dirkp-sync) |
|
|
24
|
+
| [Endpoints and remote access](design/endpoints-and-access.md) | [Machines and pendrives](design/endpoints-and-access.md#machines-and-pendrives), [integration points](design/endpoints-and-access.md#integration-points) |
|
|
25
|
+
| [Applications, interaction and credentials](design/interaction.md) | [Applications](design/interaction.md#applications-keepassxc-and-others), [user interaction](design/interaction.md#user-interaction), [credentials](design/interaction.md#credentials) |
|
|
26
|
+
| [Configuration and command contracts](design/configuration-cli.md) | [Configuration](design/configuration-cli.md#configuration-toml), [commands](design/configuration-cli.md#commands) |
|
|
27
|
+
| [Development and implementation planning](design/development.md) | [Testing](design/development.md#testing), [documentation and integration API](design/development.md#documentation-and-integration-api), [implementation phases](design/development.md#implementation-phases), [open points](design/development.md#open-points) |
|
|
28
|
+
|
|
29
|
+
Section-name references in existing chapters and plans resolve through this
|
|
30
|
+
index, even when the referenced section now lives in another chapter.
|
|
31
|
+
Search all design text with `rg PATTERN DESIGN.md design/`.
|
|
32
|
+
|
|
33
|
+
## Safety-invariant reference
|
|
34
|
+
|
|
35
|
+
This is a navigation aid, not a second specification of the rules.
|
|
36
|
+
|
|
37
|
+
| Concern | Authoritative sections |
|
|
38
|
+
|---|---|
|
|
39
|
+
| Unknown/stale copies, foreign saves, verification, backups and atomic promotion | [Sync algorithm](design/history-and-sync.md#sync-algorithm-kp-sync-sync) |
|
|
40
|
+
| Shared history reconciliation, publication checks, pruning, session retirement and drive decommissioning | [Baseline store](design/history-and-sync.md#baseline-store) |
|
|
41
|
+
| Lease ownership, synchronization serialization and runtime cleanup | [Daemon and leases](design/lifecycle.md#daemon-and-leases), [error handling and safety](design/architecture.md#error-handling-and-safety) |
|
|
42
|
+
| Private runtime storage and explicit persistence exceptions | [Runtime state](design/lifecycle.md#runtime-state-all-under-xdg_runtime_dirkp-sync), [baseline store](design/history-and-sync.md#baseline-store), [configuration](design/configuration-cli.md#configuration-toml), [credentials](design/interaction.md#credentials) |
|
|
43
|
+
| Credential lifetime, browser approval and secrets outside IPC/logs | [Credentials](design/interaction.md#credentials) |
|
|
44
|
+
| Safe deferral, pending decisions and question/progress lifecycle | [User interaction](design/interaction.md#user-interaction) |
|
|
45
|
+
| SSH confinement, revocation, staged-copy retention and access uploads | [Integration points](design/endpoints-and-access.md#integration-points) |
|
|
46
|
+
| Synthetic validation and safety mutations | [Testing](design/development.md#testing) |
|
|
47
|
+
|
|
48
|
+
## Task reading guide
|
|
49
|
+
|
|
50
|
+
| Task | Read together |
|
|
51
|
+
|---|---|
|
|
52
|
+
| Sync, classification, merge, restore or history changes | Architecture, history/sync, interaction, testing |
|
|
53
|
+
| Daemon scheduling, leases or cleanup | Lifecycle, safety, history/sync, interaction, testing |
|
|
54
|
+
| Disposable session retirement | Baseline store, lifecycle, integration points, command/status contracts, testing |
|
|
55
|
+
| Key drive decommissioning | Baseline store, unknown copies, endpoints/access (udevmon actions), command/status contracts, testing |
|
|
56
|
+
| Endpoints, pendrives, SSH or kp-access | Endpoints/access, lifecycle, history/sync, configuration, testing |
|
|
57
|
+
| Cloud reachability and offline launch warnings | Endpoints/access (rclone, cloud reach check), lifecycle (launch), configuration/commands (`doctor`), interaction, testing |
|
|
58
|
+
| UI, applications or credentials | Interaction, lifecycle, configuration/commands, testing |
|
|
59
|
+
| Configuration or CLI changes | Configuration/commands and the chapter owning the affected behavior |
|
|
60
|
+
| Packaging, documentation or API work | Development, packaging decisions, affected contracts |
|
|
61
|
+
|
|
62
|
+
## Maintaining this design
|
|
63
|
+
|
|
64
|
+
- Read the applicable chapters before proposing or implementing changes.
|
|
65
|
+
- Put each new decision in its owning chapter and link to it elsewhere.
|
|
66
|
+
- Keep this index and contributor instructions consistent when moving or
|
|
67
|
+
adding sections; remove resolved questions from Open points.
|
|
68
|
+
- Keep implementation progress and acceptance evidence in `PLAN.md`.
|
|
69
|
+
Update it when implementing a planned decision.
|
|
70
|
+
- Structural moves should preserve section wording; substantive design
|
|
71
|
+
revisions should be reviewed separately.
|
|
72
|
+
|
|
73
|
+
Approved maintenance extensions (short status hashes, explicit base cleanup
|
|
74
|
+
and daemon service controls) are specified in configuration/commands,
|
|
75
|
+
history/sync and lifecycle. PLAN.md tracks their implementation.
|
|
76
|
+
|
|
77
|
+
Offline pendrive history is retained alongside cloud history; the baseline
|
|
78
|
+
store chapter owns publication and cold-start safeguards.
|
|
79
|
+
|
|
80
|
+
Symmetric daemon install/uninstall and activation enable/disable are specified
|
|
81
|
+
in the configuration/commands chapter, with lifecycle links.
|