sysupdate: Limit update to at most one major version

Nils Kattenbeck nilskemail at gmail.com
Tue Jan 2 19:29:32 UTC 2024


Continuing in https://github.com/systemd/systemd/issues/30695

On Tue, Jan 2, 2024 at 2:06 PM Lennart Poettering
<lennart at poettering.net> wrote:
>
> On Di, 02.01.24 13:49, Nils Kattenbeck (nilskemail at gmail.com) wrote:
>
> > > I'd be fine with adding MaxVersion=. Happy to review a patch, merge
> > > something like this (at least file an RFE issue)
> >
> > Should that be inclusive or exclusive? Naming it MaxVersion would
> > imply it to be inclusive though an exclusive bound would likely be
> > more useful most of the time. One could then specify MaxVersion=1.3.0
> > in their 1.2.x images and once they have an upgrade path they would
> > explicitly raise the max version in e.g. 1.2.15. Otherwise they would
> > have to specify 1.99.99.
> > In retrospect a VersionBound= property with syntax similar to
> > ConditionKernelVersion= would have been better though I guess that
> > ship has sailed - or is it? Is sd-sysupdate still considered
> > experimental? Not sure if this warrants such a change though :shrug:
>
> We do not allow "=" nor "<" in version strings, as per
> https://uapi-group.org/specifications/specs/version_format_specification/.
>
> Hence we could use that fact and say: "MaxVersion= <=47.11",
> "MaxVersion= <47.11" could be used to make the type of version
> comparison explicit. This would implement a tiny subset of the
> ConditionKernelVersion= logic, and simply default to imply <= if the
> comparison is not specified explicitly.
>
> Of course, a similar logic should then be implemented for MinVersion,
> i.e. >= and >
>
> > Should we continue this discussion on the mailing list or an issue?
>
> Issue is better.
>
> Lennart
>
> --
> Lennart Poettering, Berlin


More information about the systemd-devel mailing list