Wrapper script for Java programs and usage of LD_LIBRARY_PATH
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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. - -- kind regards, David Sommerseth [1] <https://bugzilla.redhat.com/show_bug.cgi?id=1211638> -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlUxTGoACgkQIIWEatLf4Hfh/ACZAXF3AkGWEUoGGdjlaGSHQc15 ApEAoJGv8h2W3ymxxUQsR+t7R+DNpzSE =5sJE -----END PGP SIGNATURE-----
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
-----BEGIN PGP SIGNED MESSAGE----- Hash: SHA1 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 a follow-up here. There are several other places where there are such architecture checks have been implemented. I would really like to clean-up this so that pki can function well on other platforms than ia32 and x86_64. To solve the open BZ in the very best way, I do need some input to which approach you prefer; to reduce the complexity by unifying the architectures, or to remove the architecture checks completely. - -- kind regards, David Sommerseth -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.22 (GNU/Linux) iEYEARECAAYFAlU2ETEACgkQIIWEatLf4Hd6oACfXY/T9FG61cDduvS+J8L2EP9h uiIAmwYP8ie+4lm/Jm9h63W4mZEJ7xpY =1Rz7 -----END PGP SIGNATURE-----
Thanks for the patches. Most of the Dogtag team is pretty swamped right now trying to get the 10.2.3 build out. As soon as the current fire drill is over, we'll take a close look at your patches. Much of the wrapper code you are looking at was written awhile back, when LD_LIBRARY_PATH tweaks were needed - and we had to support Solaris etc. This is definitely code that needs updating. Ade On Tue, 2015-04-21 at 10:58 +0200, David Sommerseth wrote:
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 a follow-up here. There are several other places where there are such architecture checks have been implemented. I would really like to clean-up this so that pki can function well on other platforms than ia32 and x86_64.
To solve the open BZ in the very best way, I do need some input to which approach you prefer; to reduce the complexity by unifying the architectures, or to remove the architecture checks completely.
-- kind regards,
David Sommerseth _______________________________________________ Pki-devel mailing list Pki-devel@redhat.com https://www.redhat.com/mailman/listinfo/pki-devel
participants (2)
-
Ade Lee -
David Sommerseth