Skip to content

NixOS: add update script

Martin Milata requested to merge mmilata/osinfo-db:nixos-update-script into master

The script is supposed to be run when a new stable version of NixOS is released (every 6 months). It takes the new release number, codename, and release date as inputs and does the following:

  1. Creates new stable osinfo-db entry. This entry is based on the previous entry XML by substituting the release numbers and removing unnecessary tags.

  2. Updates the unstable entry by bumping the release number to the version that comes after the new release, the current in-development version. Also and tags are updated to point to the new stable entry.

  3. Updates the unknown entry with volume-id regular expression that matches all NixOS ISOs newer than the unstable release.

  4. Downloads ISOs of the new release, runs isoinfo -d on them, and saves the result to tests/isodata/nixos.

  5. Regenerates the isodata of the unstable release - deletes the old isodata, downloads new ISOs, saves the result to tests/isodata/nixos.

Use of the script is demonstrated in the last three commits of https://gitlab.com/mmilata/osinfo-db/-/commits/nixos.py-demo

cc @worldofpeace

Merge request reports