Bruno Haible via Gnulib discussion list <bug-gnulib@gnu.org> writes:

> `who --version` in Debian reports "who (GNU coreutils) 9.1". Should it report
> "9.1-dirty" instead of "9.1"? I don't think the Debian developers would find
> it socially acceptable to call most of their packages "dirty". And likewise
> for other distros.

Actually, reporting it as '9.1' does not seem ideal to me.

I think '9.1-dirty' would be better than '9.1' in this case, as a
differentiator to '9.1', but I agree that probably most distributions
will not like the '-dirty' word in there.

The word to use is not important to me, but declaring and informing the
user about proper versioning is important, since it makes my job as
maintainer simpler when receiving bug reports and trying to understand
how they built their tools.

To me, the best solution appears to be to not bother with any *-dirty or
*-modified keywords (since they convey too little information to be
useful), and instead have all tools support the 'version-etc' gnulib
module, and in the Debian (etc) packaging set these parameters

                --with-packager=Debian \
                --with-packager-version=$(DEB_VERSION) \
                --with-packager-bug-reports=https://bugs.debian.org/

which results in --version outputs like this:

jas@kaka:~$ /usr/bin/gsasl --version | head -2
gsasl (GNU SASL) 1.10.0
Packaged by Debian (1.10.0-5)
jas@kaka:~$ /usr/bin/idn2 --version | head -2
idn2 (Libidn2) 2.3.2
Packaged by Debian (2.3.2-2build1)
jas@kaka:~$

I believe this approach achives 1) declare what upstream version the
tool you are running is based on to indicate a possibly patched variant,
and 2) avoid needless version comparison failures due to '9.1' vs
'9.1-dirty' when built from patched sources from a git repository.

I filed a wishlist bug on coreutils in Debian about this:

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=1094325

/Simon

Attachment: signature.asc
Description: PGP signature

Reply via email to