vole
Site
Clone
Read only, no credentials:
https://rodent.software/vole.git
Write over SSH with a registered key:
git clone ssh://git@rodent.software/vole.git
Self-hosted forge that lives in your Git repo.
Package Windows: an MSI built with wixl, and install.ps1
31560d91c4e27f3fdee2652aa3b4b12b8343903d · Keenan Nemetz · 2d ago · parent 9cbfa891
Package Windows: an MSI built with wixl, and install.ps1 The Windows server installs from an MSI now, with install.ps1 on the channel as the one-command path, the same shape as the Linux installer. The MSI is built by wixl (msitools), not the WiX toolset. WiX v5 and v6 refuse to build outside Windows: every relative path is canonicalized against a hardcoded C:\ and the first Directory is rejected, so it cannot run in the release image. I tested both before choosing; wixl 0.101 is what Debian bookworm ships and it produces a package that installs, upgrades, and uninstalls on the Server Core guest. Its limits shaped the design and are recorded in the .wxs header: it silently drops Component/@Permanent and @NeverOverwrite, cannot edit PATH, and cannot schedule rollback actions, so the configuration and the data directory belong to `vole service install` and not to the package. That moved two things into the CLI. `service install` now writes a documented default configuration to %ProgramData%\Vole\vole.toml when it is given none, and initializes the instance database and repository like the Linux post-install step, so the package's only action is the binary registering itself. The same command serves a hand install and a pre-release, which has no MSI. The MSI's upgrade table is written by hand because wixl's MajorUpgrade schedules RemoveExistingProducts in the window Windows Installer rejects (error 2613). RemoveExistingProducts is placed at 1501, the service's stop-and-remove at 3400, and install-and-start after InstallFiles, so an upgrade removes the old product before the new files land and the running executable is never locked. Fixed along the way, found by installing the MSI: secure.HardenFor accepted an access list that was a subset of what it was asked to grant, so a configuration written by SYSTEM looked correct and never got the service account's entry; the service then could not read it and failed to start. HardenFor now requires every requested principal to be present, with a Windows test for the subset case. Release and verify wiring: both images gain wixl and msitools, verify builds the MSI and reads its tables back (wixl exits 0 when a source is missing), and the release builds the Windows binary and, for a stable tag, the MSI, and publishes install.ps1 beside install.sh. A pre-release tag has no MSI: ProductVersion cannot carry a pre-release suffix and wixl cannot express the same-version upgrade, so those releases ship the binary and install.ps1 says so. Docs: install.md gains the Windows method, packaging.md the Windows package and its limits, deploying windows.md the packaged flow (install, configure, first admin, firewall, upgrade, binary fallback, troubleshooting), and RELEASING.md the Windows sign-off a Linux runner cannot perform. Verified on the Server Core 2022 guest: MSI install starts the service and serves HTTP 200, with the config created at the documented default and the data kept; 0.2.1 upgrades over 0.2.0 with one Programs-and-Features entry and the service running; uninstall removes the service and the binary and leaves the config, data, and a marker file; install.ps1 installs from a local mirror after checking SHA256SUMS; reinstall and uninstall are repeatable. Windows unit tests pass there, and `vole workflow run verify` passes locally including the new package step. Part of 01M8SE6GWX1DGYPY6H9YC142C2.
docs/packaging.md +42−3
| @@ -1,8 +1,8 @@ | |||
| 1 | 1 | # Packages and upgrades | |
| 2 | 2 | ||
| 3 | Vole provides `.deb`, `.rpm`, and Arch packages for `amd64` and `arm64`. This | ||
| 4 | page describes the installed files, service sandbox, and upgrade procedure. For | ||
| 5 | installation, see [Install](install.md). | ||
| 3 | Vole provides `.deb`, `.rpm`, and Arch packages for `amd64` and `arm64`, and an | ||
| 4 | MSI for Windows `amd64`. This page describes the installed files, the service, | ||
| 5 | and the upgrade procedure. For installation, see [Install](install.md). | ||
| 6 | 6 | ||
| 7 | 7 | ## Package repositories | |
| 8 | 8 | ||
| @@ -117,6 +117,45 @@ instance admin, enable the forge service, or touch `/etc/ssh`: putting sshd in | |||
| 117 | 117 | front of Vole is a change to your sshd, so the drop-in is shipped and not | |
| 118 | 118 | installed. `/usr/share/vole/sshd/vole.conf` opens with the four steps. | |
| 119 | 119 | ||
| 120 | ## The Windows package | ||
| 121 | |||
| 122 | The Windows release artifact is `vole-windows-amd64.msi`, built by | ||
| 123 | `packaging/windows/vole.wxs`. It is compiled with | ||
| 124 | [wixl](https://wiki.gnome.org/msitools) rather than the WiX toolset: WiX refuses | ||
| 125 | to build an MSI anywhere but Windows (it canonicalizes every relative path | ||
| 126 | against `C:\`), and the release runs on a Linux runner. wixl implements the WiX | ||
| 127 | v3 schema, which is why the source is version 3. Its limits shape the package: | ||
| 128 | the MSI cannot preserve files across an uninstall, cannot edit `PATH`, and | ||
| 129 | cannot schedule rollback actions, so the configuration and the data directory | ||
| 130 | belong to `vole service install` instead of the package. | ||
| 131 | |||
| 132 | | Path | Purpose | | ||
| 133 | |---|---| | ||
| 134 | | `%ProgramFiles%\Vole\vole.exe` | Vole binary with the release version embedded | | ||
| 135 | | `%ProgramFiles%\Vole\LICENSE`, `NOTICE` | The same documents the Linux package installs | | ||
| 136 | | `%ProgramData%\Vole\vole.toml` | Configuration, written by `vole service install` when absent; not a package file | | ||
| 137 | | the configured `data_dir` | Repositories, databases, objects, logs, secrets, and host key; not a package file | | ||
| 138 | |||
| 139 | The MSI registers the `Vole` service by running the binary's own | ||
| 140 | `vole service install`, so the account, recovery actions, and command line are | ||
| 141 | the same for an MSI, `install.ps1`, and a hand-run install. The service runs as | ||
| 142 | the virtual account `NT SERVICE\Vole`, starts automatically with a short delay, | ||
| 143 | and restarts after a failure. The install prepares the data directory and the | ||
| 144 | configuration's access list for that account and starts the service; `uninstall` | ||
| 145 | stops and deletes the service before the files go, and leaves the configuration | ||
| 146 | and the instance data in place. | ||
| 147 | |||
| 148 | Upgrading is installing a newer MSI: wixl schedules the old product's removal | ||
| 149 | before the new files are copied, so the running service is stopped before its | ||
| 150 | executable would be locked. Pre-release tags have no MSI — an MSI version cannot | ||
| 151 | carry a pre-release suffix here, and wixl cannot express the same-version | ||
| 152 | upgrade that would let a release candidate and the final release share one — so | ||
| 153 | those releases publish the Windows binary only. | ||
| 154 | |||
| 155 | The MSI is not Authenticode-signed yet, so Windows shows an unknown-publisher | ||
| 156 | prompt. Verify the download against the GPG-signed `SHA256SUMS` instead. See | ||
| 157 | [Windows packaging](https://rodent.software/vole/n/408) for signing and winget. | ||
| 158 | |||
| 120 | 159 | The `git` account runs the forced command sshd hands it and has no access to | |
| 121 | 160 | `/var/lib/vole`. If the machine already has a `git` account for another forge, | |
| 122 | 161 | the package leaves it alone — including its shell — and says so at install time. | |