On 17/04/15 20:09, David Sommerseth wrote:
Hi,
I've started looking at RHBZ #1211638 [1] on behalf of the secondary architectures team. There are some issues related to /usr/bin/AtoB and /usr/bin/BtoA on ppc64 and ppc64le - due to the hard coding of platform and architecture dependencies.
From what I understand, these scripts found in /usr/bin are generated by the base/java-tools/templates/pki_java_command_wrapper.in template.
Currently, I only focus on what is inside the Linux OS block.
From what I can understand, the Linux block only sets up the LD_LIBRARY_PATH and I wonder why it does that? I know in earlier days (10-15 years ago) such tweaks where needed when ld.so.conf wasn't updated properly or had issues loading the proper libraries. But is that an issue today at all on Linux?
I would like to propose a patch which cleans up this behaviour. If it is believed that LD_LIBRARY_PATH is still needed, I will of course respect that. But I'd like to simplify this whole code block to be less "architecture dependent". Like just using the x86_64 LD_LIBRARY_PATH setup for all arches. The general idea is to not need to care about the $ARCHITECTURE variable at all inside the Linux block.
Any thoughts or comments? I've done some simple tests on Fedora 21 (x86_64) stripping out the complete LD_LIBRARY_PATH stuff in AtoB and BtoA. Everything worked just fine.
Just to be more concrete, I've added two patches solving the same problem, just two different approaches. 0001-Simplify-the-architectures-on-Linux-in-the-java-wrap.patch keeps the LD_LIBRARY_PATH stuff, but uses generic system paths regardless of which architecture it is running on. 0001-Cleanup-LD_LIBRARY_PATH-usage-in-pki_java_command_wr.patch removes the whole LD_LIBRARY_PATH stuff. Again, the changes are isolated to Linux only. I have no idea how this behaves on SunOS/Solaris. Both patches have been smoke-tested successfully using AtoB and BtoA on Fedora 21 (x86_64). -- kind regards, David Sommerseth