Bug 1130247 - After updating to java-1.8.0-openjdk-1:1.8.0.11-11.b12.fc21.x86_64 java is no longer my PATH [NEEDINFO]
Summary: After updating to java-1.8.0-openjdk-1:1.8.0.11-11.b12.fc21.x86_64 java is no...
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: java-1.8.0-openjdk
Version: 21
Hardware: Unspecified
OS: Unspecified
unspecified
high
Target Milestone: ---
Assignee: jiri vanek
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
: 1130862 (view as bug list)
Depends On:
Blocks: F21BetaBlocker
TreeView+ depends on / blocked
 
Reported: 2014-08-14 16:19 UTC by Mat Booth
Modified: 2014-09-09 22:04 UTC (History)
13 users (show)

Fixed In Version: java-1.8.0-openjdk-1.8.0.11-9.b12.fc20
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-09-09 22:04:55 UTC
jvanek: needinfo? (sbaiduzh)


Attachments (Terms of Use)
dir listing of /etc/alternatives and /usr/lib/jvm (16.64 KB, text/plain)
2014-08-14 16:28 UTC, Mat Booth
no flags Details

Description Mat Booth 2014-08-14 16:19:40 UTC
I updated from:
java-1.8.0-openjdk-1:1.8.0.11-8.b12.fc21.x86_64
To:
java-1.8.0-openjdk-1:1.8.0.11-11.b12.fc21.x86_64

And then I was unable to start eclipse. This appears to be because java is no longer in my path:

$ which java
/usr/bin/which: no java in (/usr/local/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/home/mbooth/.local/bin:/home/mbooth/bin)
$ ls -lH /usr/bin/java
ls: cannot access /usr/bin/java: No such file or directory

The problem appears to be caused by the "/usr/lib/jvm/jre-1.8.0-openjdk.x86_64" directory no longer being present, which breaks all the alternatives symlinks.

I was able to workaround the problem by doing:

$ sudo ln -s  /usr/lib/jvm/jre-1.8.0-openjdk /usr/lib/jvm/jre-1.8.0-openjdk.x86_64
$ sudo ln -s  /usr/lib/jvm/java-1.8.0-openjdk /usr/lib/jvm/java-1.8.0-openjdk.x86_64

Comment 1 jiri vanek 2014-08-14 16:25:08 UTC
Yes. thats  correct.

F21 and rawhide, where those (little bit drastical) changes goes, are unreleased software.

Please remove jdk8 completely and install it again. 

Sorry for troubles.

Comment 2 Mat Booth 2014-08-14 16:28:47 UTC
Created attachment 926861 [details]
dir listing of /etc/alternatives and /usr/lib/jvm

Comment 3 Mat Booth 2014-08-14 16:31:42 UTC
(In reply to jiri vanek from comment #1)
> Yes. thats  correct.
> 
> F21 and rawhide, where those (little bit drastical) changes goes, are
> unreleased software.
> 
> Please remove jdk8 completely and install it again. 
> 
> Sorry for troubles.

Hmm that's annoying. Will users upgrading from F20 be affected? I use java 1.8.0 on my Fedora 20 workstation -- will I be bitten by this when I upgrade to F21?

Comment 4 jiri vanek 2014-08-15 07:58:56 UTC
Uf. If you are using jdk8  on your workstation, then you may be affected.

Then the work around is - in f20 install 7, remove 8 and update. After update you should have only correctly working 8.

Comment 5 Mat Booth 2014-08-15 12:34:37 UTC
Okay, so I took the time to test it for myself. Starting from a freshly installed F20 machine:

1. Install java 1.8, then get all latest updates:

$ sudo yum install java-1.8.0-openjdk-headless java-1.8.0-openjdk
$ sudo yum install updates -y
$ sudo reboot

2. Configure java 1.8 to be the default version in use:

$ sudo alternatives --config javac
(choose java 1.8 from the menu here)
$ java -version
(this should show that java is version 1.8.0)

3. Upgrade to Fedora 21

$ sudo yum install -y https://kojipkgs.fedoraproject.org//packages/fedora-release/21/0.13/noarch/fedora-release-21-0.13.noarch.rpm https://kojipkgs.fedoraproject.org//packages/fedora-repos/21/0.5/noarch/fedora-repos-21-0.5.noarch.rpm
$ sudo yum distro-sync --nogpgcheck

4. Java no longer works

$ java -version
bash: java: command not found...

5. In addition to this, java 8 does not appear to obsolete java 7, so I still have java 7 on my upgraded F21 system:

$ sudo yum list java-*openjdk*
Loaded plugins: langpacks
Installed Packages
java-1.7.0-openjdk.x86_64                 1:1.7.0.65-2.5.1.3.fc20    @updates/20
java-1.7.0-openjdk-headless.x86_64        1:1.7.0.65-2.5.1.3.fc20    @updates/20
java-1.8.0-openjdk.x86_64                 1:1.8.0.11-14.b12.fc21     @fedora    
java-1.8.0-openjdk-headless.x86_64        1:1.8.0.11-14.b12.fc21     @fedora

Comment 7 jiri vanek 2014-08-15 12:46:27 UTC
For some reason your update picked overwritten package:

http://koji.fedoraproject.org/koji/taskinfo?taskID=7305471 is the latest (for some time!)

which DO obsolates:

http://pkgs.fedoraproject.org/cgit/java-1.8.0-openjdk.git/commit/?id=b0d513fffbc87d27ab11cf694c189bbf17617329

Sorry, wrong  link in previous comment.

Comment 8 Mat Booth 2014-08-15 13:17:11 UTC
Aha, that was built yesterday and the F21 Branched compose was not yet finished when I ran this upgrade earlier today, which is why I got release -14.

Running updates again now I get release -15 and I see that java 7 is correctly obsoleted. Thanks for that!

Comment 9 jiri vanek 2014-08-15 13:47:31 UTC
Thanx to you for testing.

Comment 10 Christopher Tubbs 2014-08-15 23:39:32 UTC
I worked around this issue by deleting the symlinks and reinstalling the RPMs (yum reinstall '*openjdk*'). Is it possible to get into this state with an online upgrade from F20 w/1.8?

Comment 11 jiri vanek 2014-08-18 08:21:25 UTC
(In reply to Christopher Tubbs from comment #10)
> I worked around this issue by deleting the symlinks and reinstalling the
> RPMs (yum reinstall '*openjdk*'). Is it possible to get into this state with
> an online upgrade from F20 w/1.8?

If you have 8 in f20, then it will probably happen.  If you have only 7, then it should update correctly.

Comment 12 jiri vanek 2014-08-18 10:51:38 UTC
See #c4 for workaround.

Comment 13 jiri vanek 2014-08-18 10:59:00 UTC
*** Bug 1130862 has been marked as a duplicate of this bug. ***

Comment 14 Stephen Gallagher 2014-08-18 17:38:52 UTC
Reopening. If this can be hit on an upgrade from F20 (as comment 11 indicates), then this is definitely a bug that should be addressed.

(Side-note: I also hit this today while upgrading along the F21 path).

Removing JRE 8 entirely from F21 and then reinstalling is an unacceptable workaround as it forces the removal of many other packages (particularly the LibreOffice suite).

Comment 15 Fedora Blocker Bugs Application 2014-08-18 19:11:20 UTC
Proposed as a Blocker for 21-beta by Fedora user sgallagh using the blocker tracking app because:

 Upgrading to Fedora 21 from a Fedora 20 system configured to use Java 8 will result in an unusable Java environment. This will cause many applications to fail and generally result in a poor impression of Fedora 21 for many users.

Justification from the Beta criteria: "For each one of the release-blocking package sets, it must be possible to successfully complete an upgrade from a fully updated installation of the previous stable Fedora release with that package set installed."

Comment 16 jiri vanek 2014-08-19 08:15:32 UTC
(In reply to Stephen Gallagher from comment #14)
> Reopening. If this can be hit on an upgrade from F20 (as comment 11
> indicates), then this is definitely a bug that should be addressed.
> 

It will hit less then minority of users. And it will hit skilled users. Other users do not have jdk8 installed.

If you have only jdk7 installed (n f20), then update to f21 will be flawless.

> (Side-note: I also hit this today while upgrading along the F21 path).
> 
> Removing JRE 8 entirely from F21 and then reinstalling is an unacceptable
> workaround as it forces the removal of many other packages (particularly the
> LibreOffice suite).

You can always remove without deps, but, the workaround for update is to remove jdk8 while still have f20, and so jdk7 installed.

The fix to this issue is to add cleaning scripts to all alternatives we use. It is making the specfile terribly messy.

As jdk8 is development revie in f20, I do not wont to support  this update.

Sorry for this trouble.

Comment 17 Stephen Gallagher 2014-08-19 11:29:50 UTC
Given the maintainer's unwillingness to address this serious issue, I have escalated it to FESCo: https://fedorahosted.org/fesco/ticket/1333

Comment 18 jiri vanek 2014-08-19 13:28:25 UTC
Just FYI:

http://pkgs.fedoraproject.org/cgit/java-1.7.0-openjdk.git/commit/java-1.7.0-openjdk.spec?h=f19&id=0b206b4b46ded5bdd76c957862d1c499abb4e978

is the fix.

it is something what i really do not wont to include.

And the only way how to not include it, is to let those few people who already have jdk8 deal with the alternatives on theirs own.

Comment 19 jiri vanek 2014-08-20 16:17:37 UTC
reopened for FESCo reslution.

Comment 20 Mat Booth 2014-08-20 18:38:19 UTC
Hi Jiri,

I read the FESCo meeting log -- since this bug affects me, I'd be happy to test any proposed solutions you have for this problem.

I can test using the method I outlined in comment 5 above until fedup is fixed.

Comment 21 Tomáš Hozza 🤓 2014-08-20 18:52:46 UTC
On today's meeting FESCo declared BZ1130247 to be a blocker for F21 Beta. (+6)

Comment 22 Orion Poplawski 2014-08-20 21:48:40 UTC
I think you want an explicit "alternatives --remove <name> <target>" for each of the bad targets that there were.  e.g. :

alternatives --remove java /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java

before installing the new alternatives.  Perhaps in a trigger.

Comment 23 jiri vanek 2014-08-21 09:36:23 UTC
(In reply to Orion Poplawski from comment #22)
> I think you want an explicit "alternatives --remove <name> <target>" for
> each of the bad targets that there were.  e.g. :
> 
> alternatives --remove java /usr/lib/jvm/jre-1.8.0-openjdk.x86_64/bin/java
> 
> before installing the new alternatives.  Perhaps in a trigger.


See c#18 - thats it:(

Comment 24 jiri vanek 2014-08-21 09:38:15 UTC
Mitr have an idea to do this in f20/f19 packages rather  dirty f21 ones. I'm going to try it.

Comment 25 Stephen Gallagher 2014-08-21 15:40:21 UTC
FYI, the recommendation to do 'rpm -e --nodeps' and then reinstall does *NOT* resolve the issue. I just tried it on another F21 system that I have been updating as I go.

Comment 26 jiri vanek 2014-08-22 06:28:00 UTC
(In reply to Stephen Gallagher from comment #25)
> FYI, the recommendation to do 'rpm -e --nodeps' and then reinstall does
> *NOT* resolve the issue. I just tried it on another F21 system that I have
> been updating as I go.

Oh thats really suspicious.  But If gave sense - if you had corrupted jdk, then installed new, incompatible, then  run rpm -e, then it run post of *new* and not of old, which was actually responsible:(

Anyway I have fix for f20 ready, (see c#24) which was already verified by few people around including Mat. I will soon do koji build.

Comment 29 Fedora Update System 2014-08-24 18:59:35 UTC
java-1.8.0-openjdk-1.8.0.11-9.b12.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/java-1.8.0-openjdk-1.8.0.11-9.b12.fc20

Comment 30 Fedora Update System 2014-08-27 01:36:22 UTC
Package java-1.8.0-openjdk-1.8.0.11-9.b12.fc20:
* should fix your issue,
* was pushed to the Fedora 20 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing java-1.8.0-openjdk-1.8.0.11-9.b12.fc20'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-9782/java-1.8.0-openjdk-1.8.0.11-9.b12.fc20
then log in and leave karma (feedback).

Comment 31 Fedora Update System 2014-09-09 22:04:55 UTC
java-1.8.0-openjdk-1.8.0.11-9.b12.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.


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