Sunday, April 28, 2024
2
rated 0 times [  2] [ 0]  / answers: 1 / hits: 944  / 3 Years ago, mon, november 1, 2021, 5:58:04

Here is the output of gcc --version :


./gcc --version
gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0

I understand this is version 7.5.0 but why is there the word "Ubuntu" before the version and what does "-3ubuntu1~18.04" after it means exactly in this context (gcc version)?


The manual does not really help me:


   --version
Display the version number and copyrights of the invoked GCC.

EDIT: Note that I'm not merely asking about what XubuntuY means. I now know this has been answered here. I want to know about the whole string above, including why a version of ubuntu is specified.


More From » package-management

 Answers
0

As I understand it.


The part in brackets is vendor-specific information. The Ubuntu tells you that this is a Ubuntu build of gcc, and the string after it is the package version.


The package version is split into two parts by a hyphen (if there is more than one hyphen the last one is used for the split). The "upstream version" and the "Debian revision" (in some cases there may also be an epoch). The "upstream version", may be the literal version number used upstream or it may contain other indications, for example +dfsg to indicate that non-free files were stripped out of the orig tarball or +git to indicate that what is packaged is actually a git snapshot.


In this case the "upstream version" is "7.5.0" (same as the literal upstream version) and the "Debian revision" is "3ubuntu1~18.04"


Changes in the "Debian revision" identify changes in Debian or it's derivatives that do not change the content of the upstream tarball(s). There are a few basic principles when assigning a version number.



  • It should to the extent possible uniquely identify a version of a package. Obviously this can't be 100% guaranteed with multiple people making packages but there is a generally accepted practice that derivatives should include a unique "tag" in version numbers they assign.

  • When a release is updated, the version number must increase (according to the comparison rules) so that users actually get the upgrade.

  • When a package is in multiple releases of a distro, the version in newer releases must be higher than in older releases so that users who upgrade their systems get the correct version.

  • It should be meaningful to users.


The tilde character in version numbers is special, in the version comparision algorithm it compares lower than the empty string, that is "1.2.3-2~foo" < "1.2.3-2" < "1.2.3-2foo" it is commonly used when backporting a package to an earlier release, it is also used to represent prerelease versions.


So now lets break the "Debian revision" of this package down.



  • "3" is the revision from Debian itself, indicating that the Debian package this Ubuntu package was based on was the third revision they made to their packaging for 7.5.0.

  • "ubuntu1" indicates that this package was modified by Ubuntu.

  • ~ generally indicates this is a backport of some sort.

  • 18.04 appears to indicate what release this package was backported to. This appears from what I can tell to be ad-hoc usage. There are standards for how backports uploaded to the backports repository should be versioned, but this backport was released as a stable update not through the backports repository. The stable update process does not seem to mandate a particular versioning scheme, it suggests using the one from the security updates process, but that doesn't seem to cover the case of a backported package.


[#846] Monday, November 1, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ngthmated

Total Points: 12
Total Questions: 115
Total Answers: 113

Location: Saint Vincent and the Grenadines
Member since Wed, Apr 21, 2021
3 Years ago
;