Separate portable releases from the native update channel with embedded Ed25519 trust roots, bounded verified downloads, immutable release objects and a compare-and-swap stable pointer. Keep installation manual. Split the Linux CLI's privileged installer from service-user IPC and state access. Reverify signed plans as root, validate both private archives before stopping systemd, retain baseline recovery and confirm live binary readiness. Preserve configuration, user, state and enablement through upgrades. Validate 317 macOS and 320 Linux workspace tests, Clippy, publisher race tests, and 18 real systemd update/rollback/failure scenarios. No field devices or POC API are modified by this implementation. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
8.7 KiB
Installation — 1.0.7
The package contains CLI and daemon. Keep them on the same release and use one daemon instance/state namespace. This describes the current source/package contract; it does not prove a signed package has been published or a machine upgraded. Historical v1.0.1/v1.0.2 manuals remain historical references.
Upgrade order and preserved data
- Deploy the current API/coordinator and their indexes before clients. The API must advertise
features.sessionHeartbeat=true,features.previewSessions=true,features.credentialActivation=true,features.metadataRecovery=true,features.missingFileSkip=true,features.safeClean=true, serve statusprogress.totalItems/progress.terminalItems, and implement Session heartbeat. The client rejects the missing feature before scanning or creating a Session; there is no old-server fallback. - Preserve the existing state namespace, credential store and source files. A consistent backup must include SQLite state/WAL through a proper checkpoint or a stopped daemon; never delete WAL/SHM to force recovery.
- Install the matching CLI/daemon package using the selected installation format, then let the daemon open/migrate the database.
- Verify actual CLI/daemon versions with
drosync version, readiness withdoctor, and results using a dedicated fixture before rolling out broadly.
SQLite schema 5 adds source-digest caching and a latest-file receipt projection. The daemon performs a one-time migration; read-only Web/report calls require the current schema and do not modify old databases. Historical records without a verifiable source identity remain 待校验 until a fresh verified sync supplies evidence.
Recovery journal version 3 includes the source snapshot and exact Session-create request. Old in-flight journals are not silently resumed: the client must confirm cloud abort, preserve recovery state on failure, and rescan. This retirement of old resumability does not remove source files, mappings, committed objects or historical reports. A lost create response is recovered with its original request/key before cancellation. Older pending data lacking that request uses authoritative remote discovery before cleanup; failures preserve the recovery record. Do not downgrade a daemon onto schema 5 unless that package explicitly understands it.
Linux
Choose signed native DEB or a verified portable archive for linux-x86_64 / linux-arm64; do not install both services.
sudo dpkg -i drosync_1.0.7_<ARCH>.deb
sudo systemctl enable --now drosync.service
Native packages require their signing trust to be established through the release-distribution process. The DEB build signs and verifies the final package before producing its SHA256; do not trust an unsigned bootstrap package merely because it contains a verification policy. Preview builds do not establish native-signature acceptance.
For a portable archive, verify its artifact digest/signature and use its one installer:
sudo ./install-systemd-portable.sh --enable
--enable persists systemd enablement and restarts the selected service. Native DEB upgrade scripts stop an already running daemon before replacing binaries and restore it afterward. Neither installer deletes state/WAL/SHM. Portable upgrades use the same portable installer and installation prefix. From 1.1.6, a trusted portable bootstrap enables sudo /opt/drosync/drosync update install through the public signed channel; it never converts the install to DEB. Older portable clients need one manual bootstrap. clean-install.sh and destructive reset aliases are retired.
The package service defaults to ubt, with project directories under /home/ubt and token file /home/ubt/.local/share/drosync/device-token. The portable installer accepts DROSYNC_USER to select the account/home. Run CLI with matching account/directories. The service explicitly reads /etc/drosync/environment with -c; the package installs a literal runtime configuration sample and preserves existing files on upgrade. Before upgrading, remove retired business keys/environment overrides and migrate the supported keys using the configuration inventory. Old JSON configuration is not imported. auth --secret-file reads an Access Key Secret; the service's explicit credential file stores the resulting device bearer token.
macOS arm64
The native PKG installs /usr/local/bin/drosync, /usr/local/bin/drosync-daemon, and one per-user LaunchAgent at /Library/LaunchAgents/com.drobotics.drosync.agent.plist. Use the same account for CLI and LaunchAgent. The package no longer installs GUI/App bundle or a second LaunchDaemon; upgrade scripts retire those product-owned entries without deleting state data.
Released native packages require Developer ID signing and notarization. The ordinary-user daemon only prepares updates; the CLI requests administrator authorization for a verified private-copy installation. Signature/notarization and target-machine upgrade acceptance remain separate release evidence.
Windows x86_64
Use the Authenticode-signed MSI system service. install-user.ps1/Windows user-startup and Linux user-service delivery are retired; migrate explicitly to the system package after stopping the old service and backing up state. The MSI runs the daemon, not CLI; there is no GUI shortcut. System mode defaults to ProgramData/drosync and uses the sole \\.\pipe\drosync, with no fallback endpoint. Run CLI elevated when initializing the system service as required by its ACLs.
Runtime token storage uses the Windows credential store; Unix token-file persistence is not a Windows fallback. A Secret input file remains an auth input. Native installation/rollback requests UAC authorization through CLI. Native MSI self-update does not convert installation modes. Real Windows service/ACL/UAC/upgrade/rollback acceptance is required in addition to cross-compilation.
First configuration
drosync auth --server https://data.example.com --access-key-id '<KEY_ID>' --secret-file '<KEY_SECRET_FILE>' --require-https
drosync doctor
drosync pause
drosync mapping add '<LOCAL_ROOT>' --bucket '<BUCKET>' --remote-prefix '<PREFIX>'
drosync sync '<MAPPING_ID>' --dry-run
drosync resume
drosync sync '<MAPPING_ID>'
POC may explicitly select http://120.48.164.19; omit --require-https for that endpoint and record that control-plane credentials/metadata are unencrypted. Public BOS upload URLs and update artifacts require HTTPS. This POC branch is not a Fanyu deployment target.
A bucket must resolve to exactly one credential-visible space; otherwise select --space ID. DROSYNC_DATA_DIR in the runtime configuration file is one explicit absolute namespace for CLI and daemon; never change it accidentally during upgrade. Use auth and mapping add if old initialization existed only in retired configuration files.
Canonical commands: CLI reference. Update authorization: signed updates. The installation-format marker is installer-owned. Native installers explicitly write native; missing/unknown markers and portable/preview markers are rejected by native update/rollback. Do not remove/change it to bypass restrictions. An unmarked installation must first be installed through its selected canonical installer. Signed updates require all four current platform artifacts/digests; historical three-platform manifests are rejected.
Bootstrap and device recovery
A new native v2 package writes drosync.build.json with the exact Cargo version and CLI/daemon SHA256; packaging fails when an override disagrees with Cargo. Preview packages are marked preview, never native. Existing v1 manifests cannot bootstrap v2 automatic updates: install the current verified native package explicitly, then authenticate through activation-v1. Server signing verification uses DROSYNC_UPDATE_SIGNING_PUBLIC_KEY; it must match the platform trust root compiled into the clients.
To recover after losing only local state, run the canonical auth with the original key and --device-id copied from the platform Device/Session view, into a new empty namespace. A nonexistent recovery ID is rejected. pause, then abort discovers and cancels all active sessions owned by that device and credential. Recreate mappings only after cancellation is confirmed. Revoked keys must first be restored/rotated by their administrator; changing credential authority while active sessions exist is refused.
1.0.6 metadata, timeout and BOS recovery changes: repair and verification.
1.0.7 configuration migration and daily-upload V1.1 usage: implementation and acceptance.