Bug 1412953

Summary: libjava.so not placed under System.getProperty("os.arch") directory
Product: [Fedora] Fedora Reporter: Petr Pisar <ppisar>
Component: java-1.8.0-openjdk-aarch32Assignee: jiri vanek <jvanek>
Status: CLOSED EOL QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 26CC: akashche, alex.kasko.mail, jerboaa, jvanek, orion
Target Milestone: ---Keywords: Regression
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-05-29 12:13:29 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Bug Depends On:    
Bug Blocks: 1412771    
Attachments:
Description Flags
non-working spec patch for arm symlink none

Description Petr Pisar 2017-01-13 09:05:47 UTC
java-1.8.0-openjdk-aarch32-1.8.0.112-2.161109.fc26 places libjava.so and other shared libraries under lib/aarch32:

/usr/lib/jvm/java-1.8.0-openjdk-aarch32-1.8.0.112-2.161109.fc26.arm/jre/lib/aarch32/libjava.so

while java-1.8.0-openjdk-1.8.0.111-5.b16.fc26 uses lib/arm:

/usr/lib/jvm/java-1.8.0-openjdk-1.8.0.111-5.b16.fc26.arm/jre/lib/arm/libjava.so

Normal openjdk names the directory according to System.getProperty("os.arch") which allows native applications to locate JRE libraries and link to them. The java-1.8.0-openjdk-aarch32 diverges from this schema and prevent from programmatic way how to obtain to correct path.

Is there there a reason for the divergence? Can you move change the directory name back to "arm"?

Comment 1 jiri vanek 2017-01-13 09:10:01 UTC
This must be solved upstream. IIRC upstream had a lot of discussions abot the name. i agree os.arch is the best argument

Comment 2 Alex Kashchenko 2017-01-13 10:17:10 UTC
Initially System.getProperty("os.arch") returned "aarch32" and that matched the JVM library directory. But it appeared that some java libs that bring native deps with them (eclipse/SWT and sqlite-jdbc) expects that on ARM32 System.getProperty("os.arch") must be "arm" (they used "os.arch" to choose which libs to load).

I am proposing to have a symlink "jre/lib/arm" -> "jre/lib/aarch32" in RPM now and then bring the issue upstream.

I am not sure that upstream dir change from "aarch32" to "arm" is feasible ("arm" is an ID of Oracle arm32 implementation and "aarch32" is and ID of aarch32-port one).

Comment 3 Alex Kashchenko 2017-01-20 19:10:27 UTC
As a small update, I've done a number of rebuilds during this week trying to squeeze a symlink into spec file with minimal divergence from mainline RPM spec. It appeared to be surprisingly non trivial as "arm" directory is also created during RPM build and a logic around it not completely straightforward. I'll prepare some details and will ask Jiri's advice on that after current jdk release for RHEL will be out.

Comment 4 jiri vanek 2017-01-23 10:00:56 UTC
(In reply to Alex Kashchenko from comment #3)
> As a small update, I've done a number of rebuilds during this week trying to
> squeeze a symlink into spec file with minimal divergence from mainline RPM
> spec. It appeared to be surprisingly non trivial as "arm" directory is also
> created during RPM build and a logic around it not completely
> straightforward. I'll prepare some details and will ask Jiri's advice on
> that after current jdk release for RHEL will be out.

And is th direcotry installed? I doubt a bit.  So at the end of %install you can create link, and write it to %files ... ?

Comment 5 Alex Kashchenko 2017-01-23 10:14:43 UTC
Created attachment 1243533 [details]
non-working spec patch for arm symlink

Comment 6 Alex Kashchenko 2017-01-23 10:19:21 UTC
(In reply to jiri vanek from comment #4)
> And is th direcotry installed? I doubt a bit.  So at the end of %install you
> can create link, and write it to %files ... ?

Yes, it is installed, in current released version:

$ pwd
/usr/lib/jvm/java-1.8.0-openjdk-aarch32-1.8.0.112-2.161109.fc25.arm/jre/lib
$ ls -lR arm
arm:
total 8
drwxr-xr-x 2 root root 4096 Jan  2 17:21 client
drwxr-xr-x 2 root root 4096 Jan  2 17:21 server

arm/client:
total 0

arm/server:
total 0


As I understand it comes from here: http://pkgs.fedoraproject.org/cgit/rpms/java-1.8.0-openjdk-aarch32.git/tree/java-1.8.0-openjdk-aarch32.spec#n571

And with the attached patch I am having the following on RPM install time (from dnf output):

error: java-1.8.0-openjdk-aarch32-headless-debug-1:1.8.0.112-2.161109.fc25.armv7hl: install failed
error: unpacking of archive failed on file /usr/lib/jvm/java-1.8.0-openjdk-aarch32-1.8.0.112-2.161109.fc25.arm/jre/lib/arm: cpio: rename


Just wanted to ask whether current way to do that (symlink "arm" -> "aarch32", not the symlink for the "libjvm.so" only in real "arm" directory) is correct one?

Comment 7 Orion Poplawski 2017-02-14 19:50:09 UTC
Note that rpm is unable on upgrade to replace a symlink with a directory or a directory with any type of file - see https://fedoraproject.org/wiki/Packaging:Directory_Replacement

With a mock install of java-1.8.0-openjdk-aarch32-headless-1.8.0.112-3.161109.fc26.armv7hl I'm getting an empty arm directory:

# ls -l /usr/lib/jvm/java/jre/lib/arm/server
total 0

This is current breaking a package of mine on arm.

Comment 8 Alex Kashchenko 2017-02-14 19:56:42 UTC
(In reply to Orion Poplawski from comment #7)

Thanks for heads up, I'll try to address this in the next update that is due this week.

Comment 9 Alex Kashchenko 2017-02-19 19:18:08 UTC
Added symlinks for separates files (not dir), rawhide build is running - https://koji.fedoraproject.org/koji/taskinfo?taskID=17957747

Note, that symlinks are added only for jre/lib/aarch32/client/libjvm.so and jre/lib/aarch32/libjava.so . If symlinks for other libs will needed - I can add them too.

Also, there is no libjvm.so in aarch32/server/ directory (so no symlink in arm dir too), as aarch32 has implementation only for client VM ("client" and "server" here is just a jdk slang - not related to actual clients and servers functionality). If it will be better to have a symink in (aarch32|arm)/server/ - I can add there a symlink for the same libjvm.so from client dir.

Comment 10 Petr Pisar 2017-02-20 11:12:35 UTC
I don't understand why not to symlink all libraries, but if you like it. I'm personally interested only in three libraries: libjava.so, libjvm.so, and libverify.so.

Comment 11 Alex Kashchenko 2017-02-20 12:30:18 UTC
(In reply to Petr Pisar from comment #10)
> I don't understand why not to symlink all libraries

No particular reason for that, just to minimize the amount of spec changes. I'll add symlinks for all other libs too.

Comment 12 Alex Kashchenko 2017-02-20 21:54:14 UTC
Rawhide build with symlinks for all libs in jre/lib/aarch32 - https://koji.fedoraproject.org/koji/taskinfo?taskID=17972463

Comment 13 Fedora Update System 2017-02-21 12:46:40 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-2.170210.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-cff58a2753

Comment 14 Fedora Update System 2017-02-21 12:47:54 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-2.170210.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-94ca17accc

Comment 15 Fedora Update System 2017-02-22 18:52:21 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-2.170210.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-cff58a2753

Comment 16 Fedora Update System 2017-02-22 21:07:53 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-2.170210.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-94ca17accc

Comment 17 Fedora End Of Life 2017-02-28 10:57:12 UTC
This bug appears to have been reported against 'rawhide' during the Fedora 26 development cycle.
Changing version to '26'.

Comment 18 Fedora Update System 2017-03-01 10:47:02 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-3.170210.fc25 has been submitted as an update to Fedora 25. https://bodhi.fedoraproject.org/updates/FEDORA-2017-d0bd684bb2

Comment 19 Fedora Update System 2017-03-01 10:48:08 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-3.170210.fc24 has been submitted as an update to Fedora 24. https://bodhi.fedoraproject.org/updates/FEDORA-2017-47ae1f01b1

Comment 20 Fedora Update System 2017-03-02 02:21:57 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-3.170210.fc25 has been pushed to the Fedora 25 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-d0bd684bb2

Comment 21 Fedora Update System 2017-03-02 02:52:49 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-3.170210.fc24 has been pushed to the Fedora 24 testing repository. If problems still persist, please make note of it in this bug report.
See https://fedoraproject.org/wiki/QA:Updates_Testing for
instructions on how to install test updates.
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2017-47ae1f01b1

Comment 22 Fedora Update System 2017-03-10 14:50:25 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-3.170210.fc24 has been pushed to the Fedora 24 stable repository. If problems still persist, please make note of it in this bug report.

Comment 23 Fedora Update System 2017-03-10 15:20:41 UTC
java-1.8.0-openjdk-aarch32-1.8.0.121-3.170210.fc25 has been pushed to the Fedora 25 stable repository. If problems still persist, please make note of it in this bug report.

Comment 24 Fedora End Of Life 2018-05-03 08:30:32 UTC
This message is a reminder that Fedora 26 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 26. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as EOL if it remains open with a Fedora  'version'
of '26'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version'
to a later Fedora version.

Thank you for reporting this issue and we are sorry that we were not
able to fix it before Fedora 26 is end of life. If you would still like
to see this bug fixed and are able to reproduce it against a later version
of Fedora, you are encouraged  change the 'version' to a later Fedora
version prior this bug is closed as described in the policy above.

Although we aim to fix as many bugs as possible during every release's
lifetime, sometimes those efforts are overtaken by events. Often a
more recent Fedora release includes newer upstream software that fixes
bugs or makes them obsolete.

Comment 25 Fedora End Of Life 2018-05-29 12:13:29 UTC
Fedora 26 changed to end-of-life (EOL) status on 2018-05-29. Fedora 26
is no longer maintained, which means that it will not receive any
further security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of
Fedora please feel free to reopen this bug against that version. If you
are unable to reopen this bug, please file a new report against the
current release. If you experience problems, please add a comment to this
bug.

Thank you for reporting this bug and we are sorry it could not be fixed.