installer icon indicating copy to clipboard operation
installer copied to clipboard

RPM package version results in incorrect update behavior

Open Preston4tw opened this issue 6 years ago • 4 comments

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 ~]#

Preston4tw avatar Nov 12 '19 01:11 Preston4tw

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.

aahlenst avatar Nov 13 '19 07:11 aahlenst

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.

Preston4tw avatar Nov 13 '19 18:11 Preston4tw

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 avatar Mar 22 '20 09:03 aahlenst

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

aahlenst avatar Nov 05 '20 15:11 aahlenst