This reverts commit
093d48a97b8211ff549f78f2b3b2ef77fcd45573.
I used mkosi without any explicit distro/version parameters and was surprised
that it built for Fedora 36 after successfully detecting that it's running on
Fedora 37. Using the host version is more likely to be what users expect, and
also avoids the awkward issue that when we hardcode some default version, this
version is likely to be "wrong" (not the latest) until both the distro and we
make a release.
Looking at this more generally, if we have some constant config that doesn't
specify the distro version, we have three possible source of the version
default: host distro version, latest version that was known was mkosi was
released, and actual latest released distro version. It is nice to use the
first option, because that is what users generally expect, and also this makes
mkosi "stable", i.e. we may upgrade it at any time and users will not observe
unexpected changes in defaults. This makes mkosi closer to guidelines for
upgrades in stable distros, see
https://docs.fedoraproject.org/en-US/fesco/Updates_Policy/#stable-releases.
093d48a97b8211ff549f78f2b3b2ef77fcd45573 was aiming for "consistent results",
but this gives consistency with the wrong thing. For a normal user, the host
distro version would never change "unexpectedly", and in fact it is expected
that the defaults of programs change when the host distro is upgraded and not
at any other time. Mkosi itself should provide stable and backwards-compatible
behaviour over releases.
- Split dm-verity artifacts default names have been changed to match what
`systemd` and other tools expect: `image.root.raw`, `image.root.verity`,
`image.root.roothash`, `image.root.roothash.p7s` (same for `usr` variants).
+- `mkosi` will again default to the same OS release as the host system when the
+ host system uses the same distribution as the image that's being built.
## v13
if args.distribution is None:
args.distribution = d
+ if args.distribution == d and args.release is None:
+ args.release = r
+
if args.distribution is None:
die("Couldn't detect distribution.")