adoptium / installer

Installer scripts for Eclipse Temurin binaries
Apache License 2.0
148 stars 73 forks source link

RPM package version results in incorrect update behavior #180

Open Preston4tw opened 4 years ago

Preston4tw commented 4 years ago

I'm installing AdoptOpenJDK 13 on to CentOS 7 from the provided RPM repo at adoptopenjdk.jfrog.io. It looks like the way the version numbers are set up on the package is causing an older version of the rpm to take precedence. Testing in a centos:7 container

docker run -it --rm centos:7

yum-config-manager --add-repo https://adoptopenjdk.jfrog.io/adoptopenjdk/rpm/centos/7/x86_64
yum -q --nogpgcheck install adoptopenjdk-13-hotspot
[root@f6e9260aedfd ~]# yum -q install --nogpgcheck adoptopenjdk-13-hotspot

=================================================================================================================================================================================================
 Package                                      Arch                        Version                              Repository                                                                   Size
=================================================================================================================================================================================================
Installing:
 adoptopenjdk-13-hotspot                      x86_64                      13+33-1                              adoptopenjdk.jfrog.io_adoptopenjdk_rpm_centos_7_x86_64                      198 M
Installing for dependencies:
 alsa-lib                                     x86_64                      1.1.8-1.el7                          base                                                                        425 k
 libX11                                       x86_64                      1.6.7-2.el7                          base                                                                        607 k
 libX11-common                                noarch                      1.6.7-2.el7                          base                                                                        164 k
 libXau                                       x86_64                      1.0.8-2.1.el7                        base                                                                         29 k
 libXext                                      x86_64                      1.3.3-3.el7                          base                                                                         39 k
 libXi                                        x86_64                      1.7.9-1.el7                          base                                                                         40 k
 libXrender                                   x86_64                      0.9.10-1.el7                         base                                                                         26 k
 libXtst                                      x86_64                      1.2.3-1.el7                          base                                                                         20 k
 libxcb                                       x86_64                      1.13-1.el7                           base                                                                        214 k

Transaction Summary
=================================================================================================================================================================================================
Install  1 Package (+9 Dependent packages)

Is this ok [y/d/N]: n
Exiting on user command
Your transaction was saved, rerun it with:
 yum load-transaction /tmp/yum_save_tx.2019-11-12.01-19.6TB15U.yumtx
[root@f6e9260aedfd ~]#

Without specifying a version yum tries to install adoptopenjdk-13-hotspot 13+33-1 (13+33), but it looks like adoptopenjdk-13-hotspot 13.0.1+9-1 (13.0.1+9) is the later version.

[root@f6e9260aedfd ~]# yum -q --showduplicates list adoptopenjdk-13-hotspot
Available Packages
adoptopenjdk-13-hotspot.x86_64                                                 13.0.1+9-1                                                  adoptopenjdk.jfrog.io_adoptopenjdk_rpm_centos_7_x86_64
adoptopenjdk-13-hotspot.x86_64                                                 13+33-1                                                     adoptopenjdk.jfrog.io_adoptopenjdk_rpm_centos_7_x86_64
[root@f6e9260aedfd ~]#
aahlenst commented 4 years ago

So, the JEP 223 version numbering scheme does not work well with RPM/YUM. See http://blog.jasonantman.com/2014/07/how-yum-and-rpm-compare-versions/ for a description on how the versions are compared.

Preston4tw commented 4 years ago

I suspect the problem can be addressed by adding a .0.0, so 13.0.0+33 instead of 13+33, to the version string when a minor and security version is omitted for the initial releases.

aahlenst commented 4 years ago

This should not happen again with 14 because I manually expanded the version to 14.0.0 before creating the packages. There is no proper fix in place, yet. I won‘t fix 13 except https://github.com/AdoptOpenJDK/TSC/issues/147 gets approved and we continue building it.

aahlenst commented 3 years ago

http://openjdk.java.net/jeps/322 is now the relevant JEP.