Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve debian version normalization #216

Closed
blshkv opened this issue Apr 25, 2017 · 23 comments
Closed

Improve debian version normalization #216

blshkv opened this issue Apr 25, 2017 · 23 comments

Comments

@blshkv
Copy link

blshkv commented Apr 25, 2017

I have noticed that some distributions create a random snapshot and call it a next release.
Here is an example:
https://packages.debian.org/jessie/faifa (0.2~svn82-1 instead of the official v0.1)
Eventually, repology would pick it up and mark other distributions as "outdated":
https://repology.org/metapackages/outdated-in-repo/gentoo_ovl_pentoo/

An another example is the following:
https://repology.org/metapackages/outdated-in-repo/gentoo_ovl_pentoo/?search=wfuzz
The official release is 2.1.5 (see https://github.com/xmendez/wfuzz/releases), however, 2.1beta is marked as the latest and any other versions are marked as outdated.

I suggest extracting version from the official homepage as the current behaviour can be manipulated.

@blshkv
Copy link
Author

blshkv commented Apr 25, 2017

FYI, Gentoo has a clearer name scheme:
https://devmanual.gentoo.org/ebuild-writing/file-format/

and it would be called either 0.1_p82, or 0.1_p82 or 0.2_pre82 (or YYYYMMDD instead of 82)

@blshkv
Copy link
Author

blshkv commented Apr 25, 2017

An another bad example is this package:
https://repology.org/metapackage/sslstrip/versions
Alpine Linux Edge came up with 0.9.2 release name, however the official version (at github) is 0.9-2 which supposed to be a post release.

@AMDmi3
Copy link
Member

AMDmi3 commented Apr 25, 2017

There are actually multiple unrelated problems here:

Incorrect version specified in the package

This is not repology fault, it should be fixed in upstream repos. For instance, cinnamon clearly states 3.4.0 as version. We can't do much with it automatically, but it can be ignored with rules (see rules.d/20.verignores.yaml)

I suggest extracting version from the official homepage as the current behaviour can be manipulated.

This is planned, but this is hard. For starters, I've planned to extract versions from GitHub. We can also fetch data from Anitya.

However, upstream version will be treated the same way as any other package version, so it won't really solve this problem. This is because

  • upstream may change, and repology will think that outdated version is actually upstream latest. This should not happen, as the purpose of repology is to find latest version regardless of upstream problems. Because of that, I was able to update a lot of FreeBSD ports I maintain which changed upstreams and for which newer versions could not be reported by portscout, our upstream release monitoring tool.
  • there's no way to reliably parse upstream for all packages

So, I suggest to fix these with rules for now. And of course maintainers should not use fake versions.

Incorrect version normalization

We normalize versions for most repos, e.g. 1.2.3~5dfsg6 is converted to 1.2.3, as 5dfsg6 is not related to upstream version in any way. However there sometimes are cases like 1.2.3~beta4 in the same repo, and we cut of beta part erroneously. These normalization rules may need to be revised. But it may be an upstream problem too, bacause IMO a sane version schema should never mix version parts which are related to upstream and parts which are related to the package revisions.

Incorrect version comparison

2.1.5 is clearly greater than 2.1beta. This was already fixed in libversion, but it was not updated in the production. Will fix itself with next update.

@ghost
Copy link

ghost commented Apr 26, 2017

Due to upstream versioning sometimes not following semantic version numbers, downstream (operating system in this case) would then change to a scheme of versions they agreed on.

As an example, I used to released gnurl until 3 version ago as "gnurl-7_53_0" and in Gentoo, and later Guix I had to rewrite my release version to "gnurl-7.53.0".

In Guix as far as I am aware we have clear guidelines on version numbers and nameformats. I think it would be easier to:

  1. ask operating systems (one kind of repository as far as I perceive this project) what their guidelines are on these two subjects.
  2. gathered data about the other kinds of repositories and their naming schemes
  3. come up with a comparison of common shared schemes.

There will be cases where no scheme applies or locations change (like: on new release move old current to subfolder archive), which is what every system dislikes.

@AMDmi3 AMDmi3 changed the title use reliable source of releases Sort out version normalization Apr 26, 2017
@AMDmi3
Copy link
Member

AMDmi3 commented Apr 26, 2017

Well since upstream version is not our problem and 2.1beta handling was fixed by switching site to https://github.com/repology/libversion 1.1.0, this issue will track issues with version normalization.

@blshkv
Copy link
Author

blshkv commented Apr 27, 2017

@AMDmi3
Copy link
Member

AMDmi3 commented Apr 27, 2017

Please add detail which repos have problematic versions.

@blshkv
Copy link
Author

blshkv commented Apr 27, 2017

Could you just click on the link and compare output? The list is way too long. For example, dsniff is marked as "1.2.0" (no beta) in some distros which is not correct. Others use several variations _beta1|b1|.b1 etc.

An another observation I made is that debian use "unreleased version"-<svn|git>number . This is the same with Gentoo's _pre (instead of svn|git)
https://packages.debian.org/stable/whatweb 0.4.8~git20141014-1

@l2dy
Copy link
Contributor

l2dy commented May 4, 2017

In https://repology.org/metapackage/keybase/versions, nix_stable used a different version scheme and made all others shown as outdated.

AMDmi3 added a commit that referenced this issue May 4, 2017
@AMDmi3
Copy link
Member

AMDmi3 commented May 4, 2017

In https://repology.org/metapackage/keybase/versions, nix_stable used a different version scheme and made all others shown as outdated.

Fixed in the ruleset, but will only be deployed in some days.

@l2dy
Copy link
Contributor

l2dy commented May 10, 2017

As a counterexample of normalization, onioncat makes official snapshots, but repology.org removed snapshot details from some repos and marked others as outdated.

@AMDmi3
Copy link
Member

AMDmi3 commented May 10, 2017

but repology.org removed snapshot details from some repos and marked others as outdated.

It didn't. Debian uses incorrect version schema to start with. It should be 0.2.2.svn559, while it is 0.2.2+svn559, when + suffix is used for debian-specific stuff and debian-generated snapshots (as in 1.2.10+dfsg1-1, 2.4+cvs20120801-1, 2.2.0+dfsg-6 (picked random from other debian packages), so we're in right to cut that away). And there's also Rosa, which just uses nonexisting version 0.2.2. Fixing this with rules.

@blshkv
Copy link
Author

blshkv commented Jul 7, 2017

Could you please dedicate more time on this issue?
A fresh example is here: https://repology.org/metapackage/gnome-keyring/versions
Alt linux came up with un-existing 3.20.1 version.

@AMDmi3
Copy link
Member

AMDmi3 commented Jul 11, 2017

It is existing version. I believe other samples were fixed.

@blshkv
Copy link
Author

blshkv commented Jul 11, 2017

I can't find the official release, http://ftp.gnome.org/pub/GNOME/sources/gnome-keyring/ the latest is 3.20.0. usbmuxd is not fixed. I'll give more examples in a bit

@AMDmi3
Copy link
Member

AMDmi3 commented Jul 11, 2017

It is there http://ftp.acc.umu.se/pub/gnome/sources/gnome-keyring/3.20 since July 4th.

@blshkv
Copy link
Author

blshkv commented Jul 12, 2017

usbmuxd there is no 1.1.1 (OpenWrt abused few other packages)
faifa - there is no 0.2 (ffainelli/faifa#15)
whatweb there is no 0.4.8, pentoo provide 0.4.8_pre

AMDmi3 added a commit that referenced this issue Jul 12, 2017
@blshkv
Copy link
Author

blshkv commented Jul 12, 2017

Perfect, thanks!

There are few more:
hostapd (there is no 2016 release)
iaxclient (beta only)
libmpsse (the last commit was on 20160602 not 20161223)

AMDmi3 added a commit that referenced this issue Jul 13, 2017
@blshkv
Copy link
Author

blshkv commented Aug 14, 2017

livecd-tools is an another tool with the same name but a different upstream:

https://admin.fedoraproject.org/pkgdb/package/rpms/livecd-tools/
https://gitweb.gentoo.org/proj/livecd-tools.git

repology mixes up these two and report the one with a lower version numbering as outdated

@blshkv
Copy link
Author

blshkv commented Sep 10, 2017

allinux come up with the new 2.3 version of pixiewps but it was not released by the upstream
http://www.sisyphus.ru/en/srpm/Sisyphus/pixiewps/get

It is listed as outdated:
https://repology.org/metapackages/outdated-in-repo/gentoo_ovl_pentoo/

AMDmi3 added a commit that referenced this issue Sep 12, 2017
AMDmi3 added a commit that referenced this issue Sep 12, 2017
@AMDmi3
Copy link
Member

AMDmi3 commented Sep 12, 2017

Both fixed. Next time, please create report for a corresponding port on the website. These cases have nothing to do with version normalization really.

@AMDmi3 AMDmi3 changed the title Sort out version normalization Improve debian version normalization Sep 18, 2017
@AMDmi3
Copy link
Member

AMDmi3 commented Sep 18, 2017

To fix this, it seems that we'll have to preserve a predefined set of suffixes (something like [+~-](a|alpha|b|beta|rc|pre|patch|git|hg|svn|cvs)[0-9]+) while doing version normalization for debian repos (currently they are all removed). There's room for expansion ([+~-][0-9]+), but we should act safe to not let any garbage get into version numbers.

@AMDmi3 AMDmi3 closed this as completed in d172a4f Sep 24, 2017
AMDmi3 added a commit to repology/repology-rules that referenced this issue Mar 21, 2018
AMDmi3 added a commit to repology/repology-rules that referenced this issue Mar 21, 2018
AMDmi3 added a commit to repology/repology-rules that referenced this issue Mar 21, 2018
AMDmi3 added a commit to repology/repology-rules that referenced this issue Mar 21, 2018
AMDmi3 added a commit to repology/repology-rules that referenced this issue Mar 21, 2018
AMDmi3 added a commit to repology/repology-rules that referenced this issue Mar 21, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants