• Bug#1079967: should policy and dpkg agree on allowed versions?

    From Helmut Grohne@1:229/2 to of what is a version. While man deb on Thu Aug 29 07:50:02 2024
    XPost: linux.debian.bugs.dist, linux.debian.policy
    From: [email protected]

    Package: dpkg-dev,debian-policy
    Severity: wishlist
    X-Debbugs-Cc: [email protected]

    Hi Guillem and policy editors,

    Emilio and me noticed that policy and dpkg have subtly different ideas
    of what is a version. While man deb-version says

    | The upstream-version may contain only alphanumerics (“A-Za-z0-9”)
    | and the characters . + - : ~ (full stop, plus, hyphen, colon, tilde)
    | and should start with a digit.

    Debian policy section 5.6.1 says

    | The upstream_version must contain only alphanumerics 6 and the
    | characters . + - ~ (full stop, plus, hyphen, tilde) and should start
    | with a digit. If there is no debian_revision then hyphens are not
    | allowed.

    Technically speaking, it is fine for policy to forbid things that dpkg
    allows. Other distributions based on dpkg may use a different policy and
    allow using multiple colons. Still is is an odd aspect and may cause
    confusion. Is this difference intentional? If yes, would it make sense
    to add a footnote to policy hinting that it is more restrictive than
    dpkg? I also checked packages in unstable and found no packages with a
    version containing two colons (i.e. all packages are policy-compliant in
    this regard).

    Thanks for considering

    Helmut

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)
  • From Guillem Jover@1:229/2 to Helmut Grohne on Thu Aug 29 12:00:01 2024
    XPost: linux.debian.bugs.dist, linux.debian.policy
    From: [email protected]

    Control: reassign -1 debian-policy

    Hi!

    On Wed, 2024-08-28 at 18:11:23 +0200, Helmut Grohne wrote:
    Package: dpkg-dev,debian-policy
    Severity: wishlist
    X-Debbugs-Cc: [email protected]

    Emilio and me noticed that policy and dpkg have subtly different ideas
    of what is a version. While man deb-version says

    | The upstream-version may contain only alphanumerics (“A-Za-z0-9”)
    | and the characters . + - : ~ (full stop, plus, hyphen, colon, tilde)
    | and should start with a digit.

    Debian policy section 5.6.1 says

    | The upstream_version must contain only alphanumerics 6 and the
    | characters . + - ~ (full stop, plus, hyphen, tilde) and should start
    | with a digit. If there is no debian_revision then hyphens are not
    | allowed.

    Technically speaking, it is fine for policy to forbid things that dpkg allows. Other distributions based on dpkg may use a different policy and allow using multiple colons. Still is is an odd aspect and may cause confusion. Is this difference intentional? If yes, would it make sense
    to add a footnote to policy hinting that it is more restrictive than
    dpkg? I also checked packages in unstable and found no packages with a version containing two colons (i.e. all packages are policy-compliant in
    this regard).

    Yes, this is the result of both #792853 and #971023. Reassigning to
    Debian Policy in case someone wants to clarify it there.

    Thanks,
    Guillem

    --- SoupGate-Win32 v1.05
    * Origin: you cannot sedate... all the things you hate (1:229/2)