NixOS: add update script
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:
-
Creates new stable osinfo-db entry. This entry is based on the previous entry XML by substituting the release numbers and removing unnecessary tags.
-
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.
-
Updates the unknown entry with volume-id regular expression that matches all NixOS ISOs newer than the unstable release.
-
Downloads ISOs of the new release, runs isoinfo -d on them, and saves the result to tests/isodata/nixos.
-
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