Windows Package Manager (winget) provides exciting features to install and upgrade apps on Windows devices. But how does winget actually work and how are new packages integrated? Within this post I want to elaborate on some questions I had when having a closer look into winget.
How does winget find sources?
By default, winget has the following sources configured:
- msstore: Microsoft Store (public)
- winget: Winget Content Delivery Network (CDN)
When searching for a particular package, e.g:
winget search wireshark all configured sources are searched for a match.
lesson learned: winget can install packages from the public Microsoft store and the winget CDN.
How are winget CDN packages provided?
Winget CDN packages reside within a public git repository hosted on GitHub. The repository contains an alphabetic folder structure by vendor and product name holding manifests in YAML format that describe the app details.
manifests folder within the repo is grouped by the app vendor and app name and YAML contents of a manifest look like this:
- Architecture: x64
- Architecture: x64
Besides some basic metadata a manifest contains URLs to download the installer for different architectures and installation scopes with a SHA256 hash to verify the integrity.
How are new (versions of) manifests published?
New manifests or changes are submitted to the repositories main branch via GitHub pull request (PR). After approval of the pull request an Azure DevOps pipeline runs that publishes manifests to the winget CDN which seems based on Azure CDN and adheres to a standard winget repository.
Besides some general validation, the pipeline definition also contains external SmartScreen checks against the referenced installers within the manifest to prevent malicious apps being added.
Once the pipeline has completed the package becomes discoverable for the winget client:
That’s how the package submission process looks like from a simplified perspective:
Who adds the manifests?
My initial guess was that the app manifests are provided by the software vendors directly, aren’t they? A closer look into the commit history and breakdown of the #number of commits by commit Author e-mail address domain breaks down to the following results:
… Unfortunately 75% of all commits use a
users.noreply.github.com address that hides the real domain for further analysis 🙃. But based on my subjective feelings a lot of packages are submitted by volunteers.
Grouping the commits only by the authors shows that a GitHub user with the username
vedantmgoyal2009 authored more than 25% of all packages.
So that’s still a question mark for me who maintains those packages and what’s their motivation to do so… It could also be possible that some people wrote automations to submit new packages automatically once the sources appear.
My 🔑 take-aways
- Winget supports multiple package sources you can add additional ones or even host your own
- Winget comes with winget CDN and Microsoft Store as default sources
- Anyone with a GitHub account can publish or update manifests
- Manifest submissions ore updates are reviewed via GitHub pull requests
- Most submissions come from individuals and not necessarily the organisations maintaining the software