What is the meaning of the tilde in this last version?
The official reference for the Debian package version format is in the Debian Policy Manual. The format is designed to allow “reasonable-looking” version numbers with a well-defined (if somewhat complex) comparison relation to decide when a version is more recent than another.
For the most part, the comparison is a lexicographic comparison of the string. For example,
1foo is sorted before
1ga. However, sequences of digits are compared in numerical order, so
foo10bar is sorted after
With a lexicographic order, a string is always sorted before its prefix. The tilde character allows a deviation from that:
foo~bar is always sorted before
foo as well as before any version that begins with
foo followed by a character other than
~. This is often used for beta versions:
8u60~b22 is sorted before
8u60. I don't know why the OpenJDK 8 packages seem to alternate between
~b suffixes though.
Tilde suffixes are also used for backports of all kinds. For example, if the same version of a package is present in both Debian stable and testing, and a security fix needs to enter stable, then the package in stable will have a suffix like
-2~deb1 while the version in testing (compiled against more recent libraries) will have
-2; that way the package is an upgrade to the
-1 version, but if a system is upgraded from stable to testing, the
-2~deb1 stable version will be upgraded to the
-2 testing version. Official backports use
~bpoNUMBER for the same purpose, this way a
4.2~bpo7 version will be upgraded to
4.2 if that ever appears in the main distribution.