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.

#408

Windows packaging: a WiX MSI, an install script, and the release artifacts

closed · opened by keenan 2d ago

keenan opened this 2d ago

Windows packaging: a WiX MSI, an install script, and the release artifacts

What

A Windows machine should install Vole the way it installs anything else: an MSI from the stable channel, with the service registered, the data directory prepared, and an upgrade that does not lose state. This issue is the packaging half of the Windows port; the service itself is #409.

Decisions

  • A WiX MSI is the artifact of record. On Windows the enterprise package manager is MSI through Intune, Group Policy, Configuration Manager, or Ansible; winget and Chocolatey are downloaders in front of it. WiX is chosen over msitools/wixl for its upgrade and custom-action support; the .NET SDK it needs joins .vole/images/release.yaml beside the existing package tools.
  • Authenticode: later. The first Windows releases are unsigned and the documentation says so, including the SmartScreen prompt. GPG SHA256SUMS still covers integrity, and the release workflow keeps failing rather than publishing an unsigned GPG release. This is revisited when a certificate exists.
  • winget: later. Manifests live in microsoft/winget-pkgs, so it needs a decision about a GitHub mirror of each release, not a packaging change. MSI and the install script come first.
  • Chocolatey and Scoop: not now. Chocolatey is a thin package that fetches the signed MSI if ops teams ask for it; a Scoop bucket on our own forge is the client-side convenience.
  • One service definition. The MSI registers the service through the binary’s vole service install step (custom action), so the account, recovery actions, and command line are the same for MSI, zip, and script installs.
  • The default identity stays NT SERVICE\Vole, matching #409.

Scope

  1. packaging/windows/ with the WiX sources:
    • %ProgramFiles%\Vole\vole.exe, LICENSE, NOTICE.
    • %ProgramData%\Vole\{vole.toml,data,logs}, config created only if absent (never overwritten on upgrade).
    • Custom actions: vole service install on install, vole service stop + uninstall on uninstall; data directory preserved deliberately.
    • Major upgrade: stop the service, replace files, start it again; no downgrade.
    • PATH entry for vole, and an ARP entry with the version and publisher.
    • Launch condition for Git for Windows (git.exe on PATH), because the server shells out to git and an MSI cannot declare the dependency.
  2. install.ps1 served at /channels/<channel>/install.ps1, mirroring install.sh: choose arch, download the MSI or zip from the channel, verify against SHA256SUMS, install the service, print the next steps (config, admin invite, firewall rules). -OpenFirewall opens 80/443/2222; the default does not.
  3. Release pipeline: build the MSI for amd64 in the release image, attach it and the zip to the release, include both in SHA256SUMS, and publish the script on the channel. Keep the Windows binary out of the Linux package trees.
  4. Docs: docs/install.md gains Windows methods, docs/packaging.md gains the installed-files table and upgrade notes, docs/deploy/windows.md is extended from #409 with the package path, and RELEASING.md gains the MSI step and the unsigned-release note.

Acceptance criteria

  • msiexec /i vole.msi on a clean Server Core guest installs the service, starts it, and serves HTTP and SSH; an uninstall removes the service and files and leaves %ProgramData%\Vole.
  • An upgrade from the previous MSI stops, replaces, restarts, and keeps the database, repositories, and configuration.
  • install.ps1 installs without a package manager and fails closed on a checksum or signature mismatch.
  • SHA256SUMS covers the MSI and the zip, and the verify workflow still passes.

Out of scope

Authenticode signing, winget manifests, Chocolatey, Scoop, and the CI runner on Windows.

Comments (1)

keenan 2d ago

Tooling findings: WiX cannot build MSIs in the Linux release image

Measured while starting the MSI, before writing packaging files. Both findings were reproduced on this machine and the second on the Server Core guest.

WiX (v5.0.2 and v6.0.2) cannot build an MSI on Linux

The dotnet tool runs, but it prints The WiX Toolset only supports Windows ... All behavior after this point is undefined, and the first <Directory Name="..."> fails:

error WIX0389: The Directory/@Name attribute's value, 'Vole', is not a relative path.

The cause is in WiX’s own source: relative-path attributes are canonicalized against a hardcoded C:\ (ParseHelper.cs → BundleValidator.GetCanonicalRelativePath, which does Path.GetFullPath(@"C:\" + path) and requires the result to start with C:\). On Linux that never holds, so every directory name is rejected. There is no flag or environment variable to change it; only Windows is supported. So WiX in the release image would need Wine plus a Windows .NET runtime, which is not a release dependency worth taking.

wixl 0.101 (Debian bookworm, separate wixl package) does build working MSIs

A file-only probe package built with wixl installs, major-upgrades from 1.0.0 to 1.0.1 (one ARP entry, no downgrade error), and uninstalls on the guest. It is the WiX v3 schema, so it is not the WiX v4+ source the issue assumes.

What wixl 0.101 does not support, with the ones that matter first:

Feature Behaviour
Component/@Permanent, @NeverOverwrite silently ignored (component attributes stay 0); the probe’s %ProgramData% config and data directory were deleted on uninstall
MajorUpgrade/@Schedule, @AllowSameVersionUpgrades rejected/ignored by 0.101; upgrade still works, but pre-release and final MSIs share a version
Package/@Platform rejected; use wixl -a x64
Environment under Component unhandled child Component node Environment; no PATH entry
Execute="rollback" written as a normal deferred CA (type 0x852), so it cannot be used as a rollback action

The silent Permanent/NeverOverwrite loss is the dangerous one: an MSI-owned config file would vanish on uninstall, so the design has to stop owning it.

Options

  1. wixl in the release image, with adaptations. The Linux-only, reproducible release stays intact. Adaptations: vole service install writes a default %ProgramData%\Vole\vole.toml when the file is missing (so the configuration and data are not MSI-owned and survive uninstall), no PATH entry, no rollback CA, and pre-release MSIs share a ProductVersion. The MSI still installs, starts, upgrades, and uninstalls the service via the binary’s own commands.
  2. Build the MSI with WiX on Windows. Keeps the v4+ source and every feature, but the release workflow can no longer produce the whole release on a Linux runner: it becomes a maintainer step on Windows, and SHA256SUMS would have to be regenerated and re-signed after the MSI is attached.
  3. Defer the MSI. Ship install.ps1 and a zip now (binary, docs, service install), and add the MSI when a Windows build path exists.

Recommendation: (1) if an MSI is needed in the next release, (3) if a script is enough for now. Either keeps the release honest; (2) trades the release invariant for the tool.