Sign in

Search issue titles and bodies, change requests and comments. Private repositories you cannot read are not included.

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.

RELEASING.md +34−4

@@ -112,10 +112,14 @@ script rather than producing a release that clients reject.
112 112
113 113 A Vole release includes:
114 114
115 - `vole-linux-amd64` and `vole-linux-arm64`, and `vole-darwin-amd64` and
116 `vole-darwin-arm64`;
117 - `install.sh`, the one-command installer, and `vole-darwin-sshd.conf`, the
118 macOS front-door drop-in;
115 - `vole-linux-amd64` and `vole-linux-arm64`, `vole-darwin-amd64` and
116 `vole-darwin-arm64`, and `vole-windows-amd64.exe`;
117 - `vole-windows-amd64.msi`, the Windows package, for stable tags only: an MSI
118 version cannot carry a pre-release suffix, and `wixl` cannot express the
119 same-version upgrade a pre-release needs. Pre-release tags ship the Windows
120 binary alone, and `install.ps1` says so;
121 - `install.sh` and `install.ps1`, the one-command installers, and
122 `vole-darwin-sshd.conf`, the macOS front-door drop-in;
119 123 - Debian, RPM, and Arch packages for both architectures, at the release root;
120 124 - `apt/` — a flat Debian repository: the packages, `Packages`,
121 125 `Packages.gz`, `Release`, `InRelease`, and `Release.gpg`;
@@ -233,6 +237,32 @@ See [Packages and upgrades](docs/packaging.md) for the paths and systemd units
233 237 the packages install, and [Install](docs/install.md#add-the-repository-by-hand)
234 238 for the client commands.
235 239
240 ## Windows sign-off
241
242 CI runs every job in a Linux container, so no release has installed the Windows
243 MSI or run the service. `wixl` on Linux builds the package but cannot exercise
244 it, and the MSI is not Authenticode-signed yet, so a packaging mistake would ship
245 to Windows users undetected.
246
247 Before a release that carries the MSI is published, install it on a Windows
248 machine and check:
249
250 - `msiexec /i vole-windows-amd64.msi /l*v install.log` exits 0, the `Vole`
251 service reports `Running`, and the Application event log has no error under
252 source `Vole`;
253 - `%ProgramData%\Vole\vole.toml` exists, the data directory exists, and the
254 service account, `SYSTEM`, and `Administrators` are the only entries in both
255 access lists;
256 - HTTP answers on the configured address, the admin CLI works over the SSH
257 listener, and a clone and push succeed;
258 - a reboot brings the forge back without a login;
259 - installing the MSI over the previous release upgrades it: one Programs and
260 Features entry, the service running, the configuration and data untouched;
261 - uninstalling removes the service and `%ProgramFiles%\Vole` and leaves
262 `%ProgramData%\Vole` in place.
263
264 Do not publish a Windows MSI that has not passed this check.
265
236 266 ## macOS sign-off
237 267
238 268 CI runs every job in a Linux container, so a release has never executed the test