Monday, 19 May 2025

Re: Consistency of package versioning in Ubuntu-only packages

Hi,

I am a little late to the party.

On Tue, 2025-04-08 at 11:49 +0200, Christian Ehrhardt wrote:
> On Tue, Apr 8, 2025 at 9:29 AM Julian Andres Klode
> <julian.klode@canonical.com> wrote:
> >
> > On Wed, Apr 02, 2025 at 02:55:46PM +0100, Robie Basak wrote:
> > > Some packages that are Ubuntu-only have `ubuntu` in the version string,
> > > which automatically stops autosync, which is probably what we want.
> > >
> > > Other such Ubuntu-only packages do not, so if Debian were to package
> > > something with the same source package name, it may autosync, which is
> > > probably not what we want.
> > >
> > > Unless it's in the sync blocklist, but now there are three possible
> > > states for an Ubuntu-only package to be with respect to autosync, which
> > > is just unnecessary work for concerned reviewers.
> > >
> > > I just reviewed the following SRUs, which (sort of) uses a mix of both:
> > >
> > > lxd-installer | 1 | focal | source
> > > lxd-installer | 1 | jammy | source
> > > lxd-installer | 4 | noble | source
> > > lxd-installer | 4ubuntu0.1 | noble-updates | source
> > > lxd-installer | 4ubuntu0.2 | noble/unapproved/39f530b | source
> > > lxd-installer | 8 | oracular | source
> > > lxd-installer | 8.1 | oracular/unapproved/74f18e3 | source
> > > lxd-installer | 12 | plucky | source
> > >
> > > Could we agree that all Ubuntu-only packages SHOULD always contain
> > > `ubuntu` in their version string (this would usually be -0ubuntuX or
> > > 0ubuntuX[1] if native) then, so that we don't have to think about it?
> > >
> > > Are there any reasons for an exception to this rule, where an autosync
> > > would actually be desirable if Debian were to introduce such a package?
> > > If it's not for a common reason, then perhaps an additional policy might
> > > be that there SHOULD be something in debian/README.source that explains
> > > any deviation from this.
> >
> > Funny enough I had that same conversation with Scott James Remnant many
> > years ago on upstart, which had like 0.1.0-1 versions in Ubuntu at the
> > time.
> >
> > I also had exactly the problem where it synced software-properties
> > from Debian because it was not in the blocklist, and software-properties
> > Debian packaging ended up weird (0.90debian1, possibly not an actual
> > version number)
> >
> > But also this is going to get even weirder if we have a package we
> > develop and start to use the ubuntu version string. Then my Debian
> > version of foo 1ubuntu1 will end up 1ubuntu1debian1.
> >
> > Like I can guarantee you, someone will upload 1ubuntu2 with code
> > changes and the Debian uploader will need to package that, rather
> > than a 2ubuntu1.
>
> True and backed with a real story,
> but I feel we should still strive to make the normal cases better and
> consistent,
> despite the existence of edge cases - WDYT?

I read the full discussion and the current
https://github.com/canonical/ubuntu-maintainers-handbook/blob/main/VersionStrings.md

I dislike adding `ubuntu0` to Ubuntu native packages because it is
confusing. I have different alternatives to propose.

We could recommend avoiding native packages for Ubuntu-only packages.
This makes it easier for Debian to adopt the package, makes versioning
and backports simpler. For example I did this change for Apport and I do
not regret it.

Alternative ideas:

1. Add `ubuntu` instead of `ubuntu0` as suffix to make it more obvious
what is going on. I would less likely change `1ubuntu` into `1ubuntu1`
than `1ubuntu0` into `1ubuntu1` (taking the example from Julian).

2. Use `0ubuntu[version]` instead of `[version]ubuntu0`.

--
Benjamin Drung
Debian & Ubuntu Developer

--
ubuntu-devel mailing list
ubuntu-devel@lists.ubuntu.com
Modify settings or unsubscribe at: https://lists.ubuntu.com/mailman/listinfo/ubuntu-devel