Bug 979128 - broken symlinks in alternatives
broken symlinks in alternatives
Status: CLOSED CURRENTRELEASE
Product: Fedora
Classification: Fedora
Component: java-1.7.0-openjdk (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: jiri vanek
Fedora Extras Quality Assurance
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-27 13:17 EDT by gil cattaneo
Modified: 2013-10-01 09:24 EDT (History)
11 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-10-01 09:24:08 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
full log from the reinstall as described in the comment #11 (25.94 KB, text/plain)
2013-07-27 10:25 EDT, Damian Wrobel
no flags Details
rpm -U strace log (1.14 MB, application/x-xz)
2013-08-06 17:08 EDT, Damian Wrobel
no flags Details

  None (edit)
Description gil cattaneo 2013-06-27 13:17:01 EDT
Description of problem:
i upgrade from F18 to F19.
these links are broken
/usr/lib/jvm/java
/usr/lib/jvm/java-openjdk
/usr/lib/jvm/jre-1.7.0
/usr/lib/jvm/jre-openjdk
/usr/lib/jvm-exports/java
/usr/lib/jvm-exports/java-openjdk
/usr/lib/jvm-exports/jre-1.7.0
/usr/lib/jvm-exports/jre-openjdk


Version-Release number of selected component (if applicable):
1.7.0.25-2.3.10.3.fc19.i686

How reproducible:
always




any ideas?
regards
Comment 1 gil cattaneo 2013-06-27 13:33:42 EDT
something of wrong there is also here
/usr/lib/jvm/java-1.7.0-openjdk-1.7.0.9/jre/lib/i386/server/classes.jsa
Comment 2 gil cattaneo 2013-06-27 15:29:32 EDT
also native2ascii link in /usr/bin is broken
Comment 3 jiri vanek 2013-06-28 05:06:00 EDT
Argh there was an change in main directory name on 32b arch from java-1.7.0-openjdk-1.7.0.9 to java-1.7.0-openjdk-1.7.0.9.i686


those could slip.
Comment 4 jiri vanek 2013-06-28 05:22:38 EDT
can you please list where are pointing both corrupted and correct symlinks?
Comment 5 gil cattaneo 2013-06-28 05:54:18 EDT
link                                   point to

/usr/lib/jvm/java                      /etc/alternatives/java_sdk

/etc/alternatives/java_sdk             /usr/lib/jvm/java-1.7.0-openjdk

/usr/lib/jvm/java-openjdk              /etc/alternatives/java_sdk_openjdk
/etc/alternatives/java_sdk_openjdk     /usr/lib/jvm/java-1.7.0-openjdk

/usr/lib/jvm/jre-1.7.0                 /etc/alternatives/jre_1.7.0

/usr/lib/jvm/jre-openjdk               /etc/alternatives/jre_openjdk


/usr/lib/jvm-exports/java              /etc/alternatives/java_sdk_exports

/usr/lib/jvm-exports/jre-1.7.0         /etc/alternatives/jre_1.7.0_exports

/usr/lib/jvm-exports/jre-openjdk       /etc/alternatives/jre_openjdk_exports



file:///var/lib/alternatives/java
auto
/usr/bin/java
keytool
/usr/bin/keytool
orbd
/usr/bin/orbd
pack200
/usr/bin/pack200
rmid
/usr/bin/rmid
rmiregistry
/usr/bin/rmiregistry
servertool
/usr/bin/servertool
tnameserv
/usr/bin/tnameserv
unpack200
/usr/bin/unpack200
jre_exports
/usr/lib/jvm-exports/jre
jre
/usr/lib/jvm/jre
java.1.gz
/usr/share/man/man1/java.1.gz
keytool.1.gz
/usr/share/man/man1/keytool.1.gz
orbd.1.gz
/usr/share/man/man1/orbd.1.gz
pack200.1.gz
/usr/share/man/man1/pack200.1.gz
rmid.1.gz
/usr/share/man/man1/rmid.1.gz
rmiregistry.1.gz
/usr/share/man/man1/rmiregistry.1.gz
servertool.1.gz
/usr/share/man/man1/servertool.1.gz
tnameserv.1.gz
/usr/share/man/man1/tnameserv.1.gz
unpack200.1.gz
/usr/share/man/man1/unpack200.1.gz

/usr/lib/jvm/jre-1.7.0-openjdk/bin/java
170025
/usr/lib/jvm/jre-1.7.0-openjdk/bin/keytool
/usr/lib/jvm/jre-1.7.0-openjdk/bin/orbd
/usr/lib/jvm/jre-1.7.0-openjdk/bin/pack200
/usr/lib/jvm/jre-1.7.0-openjdk/bin/rmid
/usr/lib/jvm/jre-1.7.0-openjdk/bin/rmiregistry
/usr/lib/jvm/jre-1.7.0-openjdk/bin/servertool
/usr/lib/jvm/jre-1.7.0-openjdk/bin/tnameserv
/usr/lib/jvm/jre-1.7.0-openjdk/bin/unpack200
/usr/lib/jvm-exports/jre-1.7.0-openjdk
/usr/lib/jvm/jre-1.7.0-openjdk
/usr/share/man/man1/java-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/keytool-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/orbd-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/pack200-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/rmid-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/rmiregistry-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/servertool-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/tnameserv-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/unpack200-java-1.7.0-openjdk.1.gz
/usr/lib/jvm/jre-1.5.0-gcj/bin/java
1500
/usr/lib/jvm/jre-1.5.0-gcj/bin/keytool



/usr/lib/jvm/jre-1.5.0-gcj/bin/rmiregistry



/usr/lib/jvm-exports/jre-1.5.0-gcj
/usr/lib/jvm/jre-1.5.0-gcj









/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/java
170025
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/keytool
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/orbd
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/pack200
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/rmid
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/rmiregistry
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/servertool
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/tnameserv
/usr/lib/jvm/jre-1.7.0-openjdk.i386/bin/unpack200
/usr/lib/jvm-exports/jre-1.7.0-openjdk.i386
/usr/lib/jvm/jre-1.7.0-openjdk.i386
/usr/share/man/man1/java-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/keytool-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/orbd-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/pack200-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/rmid-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/rmiregistry-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/servertool-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/tnameserv-java-1.7.0-openjdk.1.gz
/usr/share/man/man1/unpack200-java-1.7.0-openjdk.1.gz


file:///var/lib/alternatives/java_sdk_1.7.0
auto
/usr/lib/jvm/java-1.7.0
java_sdk_1.7.0_exports
/usr/lib/jvm-exports/java-1.7.0

/usr/lib/jvm/java-1.7.0-openjdk
170025
/usr/lib/jvm-exports/java-1.7.0-openjdk
/usr/lib/jvm/java-1.7.0-openjdk.i386
170025
/usr/lib/jvm-exports/java-1.7.0-openjdk.i386

file:///var/lib/alternatives/java_sdk_openjdk
auto
/usr/lib/jvm/java-openjdk
java_sdk_openjdk_exports
/usr/lib/jvm-exports/java-openjdk

/usr/lib/jvm/java-1.7.0-openjdk
170025
/usr/lib/jvm-exports/java-1.7.0-openjdk.i386
/usr/lib/jvm/java-1.7.0-openjdk.i386
170025
/usr/lib/jvm-exports/java-1.7.0-openjdk.i386

file:///var/lib/alternatives/jre_1.7.0
auto
/usr/lib/jvm/jre-1.7.0
jre_1.7.0_exports
/usr/lib/jvm-exports/jre-1.7.0

/usr/lib/jvm/jre-1.7.0-openjdk
170025
/usr/lib/jvm-exports/jre-1.7.0-openjdk
/usr/lib/jvm/jre-1.7.0-openjdk.i386
170025
/usr/lib/jvm-exports/jre-1.7.0-openjdk.i386

file:///var/lib/alternatives/jre_openjdk
auto
/usr/lib/jvm/jre-openjdk
jre_openjdk_exports
/usr/lib/jvm-exports/jre-openjdk

/usr/lib/jvm/jre-1.7.0-openjdk
170025
/usr/lib/jvm-exports/jre-1.7.0-openjdk
/usr/lib/jvm/jre-1.7.0-openjdk.i386
170025
/usr/lib/jvm-exports/jre-1.7.0-openjdk.i386
Comment 6 jiri vanek 2013-07-01 06:05:47 EDT
Ok, it looks like alternatives did not swap after update.
Can you run (as root) update-alternatives --config java (javac) , and select the version with ".i386" ?

If this help, i think you can close this bug.

You can then safely remove the "no arch" record in alternatives then.

However, the fact that the "wrong" alternative was left behind is bug :-/
Comment 7 gil cattaneo 2013-07-01 08:52:02 EDT
Thanks! solved.


(In reply to jiri vanek from comment #6)
> Ok, it looks like alternatives did not swap after update.
> Can you run (as root) update-alternatives --config java (javac) , and select
> the version with ".i386" ?
> 
> If this help, i think you can close this bug.
> 
> You can then safely remove the "no arch" record in alternatives then.

using rm or editing the file /var/lib/alternatives/*

/usr/lib/jvm/java-openjdk          /etc/alternatives/java_sdk_openjdk
/usr/lib/jvm/jre-1.7.0             /etc/alternatives/jre_1.7.0
/usr/lib/jvm/jre-openjdk           /etc/alternatives/jre_openjdk

/usr/lib/jvm-exports/jre-1.7.0     /etc/alternatives/jre_1.7.0_exports
/usr/lib/jvm-exports/jre-openjdk   /etc/alternatives/jre_openjdk_exports

> 
> However, the fact that the "wrong" alternative was left behind is bug :-/

regards
Comment 8 Fernando Lozano 2013-07-11 12:59:29 EDT
This bug is real -- I have it on both a machine upgraded using fedup and a machine installed clean from live media, both 32-bits machines.

Instead of forcing users to fix the alternatives configuration, it should be correct out-of-the-box.
Comment 9 Orion Poplawski 2013-07-26 12:22:18 EDT
Seeing some of this on fresh installs.  In particular:

jre_1.7.0_exports -> /usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.25-2.3.12.1.fc20.x86_64/jre
jre_exports -> /usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.25-2.3.12.1.fc20.x86_64/jre
jre_openjdk_exports -> /usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.25-2.3.12.1.fc20.x86_64/jre

there is no jre sub-directory in /usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.25-2.3.12.1.fc20.x86_64.

Other links are okay though.
Comment 10 Orion Poplawski 2013-07-26 13:57:29 EDT
I've checked in a fix to rawhide.  Jiri - I'll let you get this into F19.
Comment 11 Damian Wrobel 2013-07-27 10:23:37 EDT
Just hit the same after upgrading F18->F19.

I've tried to reinstall it completely by running:

# rpm --nodeps -e java-1.7.0-openjdk java-1.7.0-openjdk-devel
# yum localinstall java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.i686.rpm java-1.7.0-openjdk-devel-1.7.0.25-2.3.12.3.fc19.i686.rpm

But it still failed to install proper alternatives in /etc/alternatives for the following files:

jar
jarsigner
java
javac
javadoc
javah
javap
javaws
Comment 12 Damian Wrobel 2013-07-27 10:25:46 EDT
Created attachment 779091 [details]
full log from the reinstall as described in the comment #11
Comment 13 Deepak Bhole 2013-07-31 17:00:24 EDT
This should be addressed in:

https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19

Please test and add karma as appropriate.
Comment 14 Damian Wrobel 2013-07-31 17:11:28 EDT
(In reply to Deepak Bhole from comment #13)
> This should be addressed in:
> 
> https://admin.fedoraproject.org/updates/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.
> fc19
> 
> Please test and add karma as appropriate.

In comment #11 I already used the aforementioned version and it still didn't work (I had to manually recreate symlinks).
Comment 15 Omair Majid 2013-08-05 12:46:11 EDT
(In reply to Damian Wrobel from comment #11)
> Just hit the same after upgrading F18->F19.

I can not reproduce this locally.

> I've tried to reinstall it completely by running:
> 
> # rpm --nodeps -e java-1.7.0-openjdk java-1.7.0-openjdk-devel

Can you list the contents of /etc/alternatives after running this command? Do the symlinks /usr/bin/java* still exist?

> # yum localinstall java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.i686.rpm
> java-1.7.0-openjdk-devel-1.7.0.25-2.3.12.3.fc19.i686.rpm
> 
> But it still failed to install proper alternatives in /etc/alternatives for
> the following files:
> 
> jar
> jarsigner
> java
> javac
> javadoc
> javah
> javap

After installing java-1.7.0-openjdk-devel, do these /usr/bin/java* exist? Are they pointing to the right symlinks?

> javaws

This one is not related to openjdk. It should be provided by the icedtea-web package.
Comment 16 Damian Wrobel 2013-08-06 17:08:16 EDT
Created attachment 783517 [details]
rpm -U strace log

The log comes from the following command:
# strace -f rpm -U java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.i686.rpm java-1.7.0-openjdk-devel-1.7.0.25-2.3.12.3.fc19.i686.rpm 2>&1 | tee rpm-U.log
Comment 17 Damian Wrobel 2013-08-06 17:16:37 EDT
(In reply to Omair Majid from comment #15)
> Do the symlinks /usr/bin/java* still exist?

Here is the 'll' output (detailed information can be extracted from the strace log):

$ ll /bin/ja* | grep -v jack
-rwxr-xr-x 1 root root 567108 Mar 12 22:05 /bin/jad
lrwxrwxrwx 1 root root     22 Aug  6 22:54 /bin/java -> /etc/alternatives/java
lrwxrwxrwx 1 root root     24 Jul 27 02:33 /bin/javaws -> /etc/alternatives/javaws
-rwxr-xr-x 1 root root   2193 Jul 24 00:16 /bin/javaws.itweb

$ ll /etc/alternatives/ja* | grep -v jack
lrwxrwxrwx 1 root root 72 Aug  6 22:54 /etc/alternatives/java -> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.i386/jre/bin/java
lrwxrwxrwx 1 root root 76 Aug  6 22:54 /etc/alternatives/java.1.gz -> /usr/share/man/man1/java-java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.i386.1.gz
lrwxrwxrwx 1 root root 59 Aug  6 22:54 /etc/alternatives/java_sdk_1.7.0_openjdk -> /usr/lib/jvm/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.i386
lrwxrwxrwx 1 root root 67 Aug  6 22:54 /etc/alternatives/java_sdk_1.7.0_openjdk_exports -> /usr/lib/jvm-exports/java-1.7.0-openjdk-1.7.0.25-2.3.12.3.fc19.i386
lrwxrwxrwx 1 root root 29 Jul 27 11:13 /etc/alternatives/jaxp_parser_impl -> /usr/share/java/xerces-j2.jar
lrwxrwxrwx 1 root root 28 Jul 27 02:13 /etc/alternatives/jaxp_transform_impl -> /usr/share/java/xalan-j2.jar

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