Note: This is a beta release of Red Hat Bugzilla 5.0. The data contained within is a snapshot of the live data so any changes you make will not be reflected in the production Bugzilla. Also email is disabled so feel free to test any aspect of the site that you want. File any problems you find or give feedback here.
Bug 1388520 - installing java-1.8.0-openjdk.i686 installs incorrect x86_64 dependencies
Summary: installing java-1.8.0-openjdk.i686 installs incorrect x86_64 dependencies
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Red Hat Enterprise Linux 7
Classification: Red Hat
Component: java-1.8.0-openjdk
Version: 7.3
Hardware: x86_64
OS: Linux
unspecified
medium
Target Milestone: rc
: ---
Assignee: jiri vanek
QA Contact: Lukas Zachar
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2016-10-25 14:45 UTC by Terry Bowling
Modified: 2017-08-01 08:46 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2017-08-01 08:46:49 UTC
Target Upstream Version:


Attachments (Terms of Use)


Links
System ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2017:1831 normal SHIPPED_LIVE java-1.8.0-openjdk bug fix and enhancement update 2017-08-01 12:39:07 UTC

Description Terry Bowling 2016-10-25 14:45:18 UTC
Description of problem:

When installing java-1.8.0-openjdk.i686, yum attempts to install the x86_64 version of java-1.8.0-openjdk-headless rather than the i686.

There are also other incorrect x86_64 packages installed.

Two workaround methods to prevent this are:

1. pre-installing expat.i686, alsa-lib.i686, freetype.i686, giflib.i686 will result in the correct -headless.i686 package to be installed.

2. Specify the desired -headless.i686 at the same time.  

     # yum install java-1.8.0-openjdk-headless.i686 java-1.8.0-openjdk.i686

     However, this results the libXfont.x86_64 and libfontenc.x86_64 being installed, even 
     though there are i686 versions available.


Version-Release number of selected component (if applicable):

 java-1.8.0-openjdk          i686  1:1.8.0.102-4.b14.el7  rhel-7-server-htb-rpms
 java-1.8.0-openjdk-headless i686  1:1.8.0.102-4.b14.el7  rhel-7-server-htb-rpms

How reproducible:

  Using RHEL 7.3 RC2
  # yum install java-1.8.0-openjdk.i686
or
  # yum install java-1.8.0-openjdk-headless.i686 java-1.8.0-openjdk.i686


Actual results:

x86_64 versions of the following packages are installed, even though .i686 versions are available.
	java-1.8.0-openjdk-headless
	libXfont
	libfontenc
	expat
	alsa-lib
	freetype
	giflib

Expected results:

Installing java-1.8.0-openjdk.i686 would only install .i686 dependencies if they are available.  Only if .i686 versions are not available would .x86_64 dependencies be installed.

Most concerning is the java-1.8.0-openjdk-headless.x86_64 being installed.

Additional info:

Comment 2 jiri vanek 2016-10-25 14:58:09 UTC
This have two lsolutions 
 * yom will start to do its job correctly
 * we will manually restrict most dependencies by %{_isa} (arch)

the second is not recommended and was removed on purpose. But once multilib is supported it looks liek right thing to do.

Comment 3 Terry Bowling 2016-11-16 15:50:17 UTC
Note the follow BZs are possibly somewhat related, all involving the upgrades and new i686 (32 bit) version of OpenJDK.

bz1395397 - Bug: In-place upgrade installs wrong version of OpenJDK
bz1388520 - installing java-1.8.0-openjdk.i686 installs incorrect x86_64 dependencies
bz1361609 - Yum changes arch of package if repository becomes out of sync with 32bit OpenJDK

Comment 4 jiri vanek 2016-12-02 09:22:47 UTC
Hi Deepak!

As rhel 7.4 schedule is already on plate, whats your option here?
Is there a chance that you will negotiate fix in yum?
Or is isa mes sin our RPMs the only way to go?

Comment 5 Deepak Bhole 2016-12-02 17:34:22 UTC
Hi Jiri, where is the right place to fix this bug?

Comment 6 jiri vanek 2016-12-05 09:28:27 UTC
The right place is of course yum. But I' doubt we will ever pass bureaucracy there.

Comment 7 Deepak Bhole 2016-12-23 18:44:46 UTC
What change is required in yum to make this happen?

Comment 8 Deepak Bhole 2017-01-05 21:35:33 UTC
Adding NEEDINFO to Jiri, please see comment #6

Comment 9 jiri vanek 2017-01-06 07:51:48 UTC
There are two ways if fixing.  Restrict all requires in ojdk8 by isa, which is and always was deprecated, or fix yum, os it hor the arch of package correctly.

Comment 10 Deepak Bhole 2017-01-06 21:46:27 UTC
I did not know isa was deprecated -- if it is, how do other packages pull in the right arch deps? Do they hardcode it?

Comment 11 Andrew John Hughes 2017-01-09 07:52:29 UTC
I didn't either. We actually used it recently to resolve the same issue with OpenJDK's native runtime dependencies (fontconfig, NSS, lksctp-tools). See bug 1375224.

Comment 12 jiri vanek 2017-01-09 08:38:44 UTC
Some four years ago, fedora was making a lot of noise about using isa (build)requirements. I lived in impression that isa is forbidden for buildrequires, and deprecated for requires. I also recall beig mass-rmeoving of isa. As build requires for isa are forbidden for sure, today I did not found  any approved guideline for isa in requires.  Actually isa is recommended for requiring base package (our case). If you two agree isa can be safely added, I will be happy to restrict it.

So yes... my apologise to the yum. I will prepare patch for fedora.

Comment 13 jiri vanek 2017-01-09 09:48:05 UTC
requirements on itslef: adjusted
 Requires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
 OrderWithRequires: %{name}-headless%1%{?_isa} = %{epoch}:%{version}-%{release}
 Requires: %{name}%1%{?_isa} = %{epoch}:%{version}-%{release}

requirements already heaving isa:
 Requires: fontconfig%{?_isa}
 Requires: nss%{?_isa} %{NSS_BUILDTIME_VERSION}
 Requires: nss-softokn%{?_isa} %{NSSSOFTOKN_BUILDTIME_VERSION}

other arch-speific requirements which were adjusted:
 Requires: lksctp-tools%{?_isa}
 Requires: java-atk-wrapper%{?_isa}

noarch: (no need to adjsut)
 Requires: javapackages-tools
 Requires: ca-certificates
 Requires: javapackages-tools
 Requires: tzdata-java >= 2015d
 Requires: copy-jdk-configs >= 1.1-3
 OrderWithRequires: copy-jdk-configs
 Requires: xorg-x11-fonts-Type1

arched dependencies, called by exec, so no need to adjsut:
 Requires(post):   %{_sbindir}/alternatives
 Requires(post):   chkconfig >= 1.7


Just one nit - shouldn't also provides be adjusted?

Fedora:
http://pkgs.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk.git/commit/?id=09ac4b902860a41345f38aaaf5a662d4c2c244aa
https://koji.fedoraproject.org/koji/taskinfo?taskID=17221552

Comment 14 Andrew John Hughes 2017-01-09 21:33:08 UTC
 
> other arch-speific requirements which were adjusted:
>  Requires: lksctp-tools%{?_isa}
>  Requires: java-atk-wrapper%{?_isa}
> 

Are you sure you're correctly synced with RHEL, because the lksctp-tools line is already in RHEL 7.4:

# libsctp.so.1 is being `dlopen`ed on demand
Requires: lksctp-tools%{?_isa}

Comment 16 jiri vanek 2017-02-28 13:46:30 UTC
Building java-1.8.0-openjdk-1.8.0.121-4.b14.el7 for rhel-7.4-candidate
Created task: 12646425
Task info: https://brewweb.engineering.redhat.com/brew/taskinfo?taskID=12646425

Comment 20 errata-xmlrpc 2017-08-01 08:46:49 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2017:1831


Note You need to log in before you can comment on or make changes to this bug.