Hello Evan!


Thanks for the idea, and the thorough investigation! 
I think it is a reasonable need to only install openjdk package if the java dependency is not met and that this dependency should be met by Oracle jdk as well.

We will try out your proposal and will give you information of the results in the upcoming days.

Regards,
Gabor

On Thu, Mar 22, 2018 at 6:23 PM, Robin Blanchard <rblanchard@nephilaadvisors.com> wrote:
Ah. Now I see/understand.

I can confirm this behavior.

$ ldconfig -p |grep libjvm
        libjvm.so (libc6,x86-64) => /usr/java/jre1.8.0_162/lib/amd64/server/libjvm.so

$ yum --nogpgcheck install syslog-ng-java
Loaded plugins: fastestmirror, rhnplugin
This system is receiving updates from RHN Classic or Red Hat Satellite.
Loading mirror speeds from cached hostfile
Resolving Dependencies
--> Running transaction check
---> Package syslog-ng-java.x86_64 0:3.14.1-4.el7.centos will be installed
--> Processing Dependency: libjvm.so(SUNWprivate_1.1)(64bit) for package: syslog-ng-java-3.14.1-4.el7.centos.x86_64
--> Processing Dependency: libjvm.so()(64bit) for package: syslog-ng-java-3.14.1-4.el7.centos.x86_64
--> Running transaction check
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-0.b14.el7_4 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================================
 Package                                      Arch                    Version                                    Repository                                Size
================================================================================================================================================================
Installing:
 syslog-ng-java                               x86_64                  3.14.1-4.el7.centos                        czanik-syslog-ng-3.14                    4.9 M
Installing for dependencies:
 java-1.8.0-openjdk-headless                  x86_64                  1:1.8.0.161-0.b14.el7_4                    centos-7-updates-x86_64                   32 M

Transaction Summary
================================================================================================================================================================
Install  1 Package (+1 Dependent package)

Total download size: 37 M
Installed size: 109 M
Is this ok [y/d/N]: n
Exiting on user command

-----Original Message-----
From: syslog-ng [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Evan Rempel
Sent: Thursday, March 22, 2018 12:20 PM
To: syslog-ng@lists.balabit.hu
Subject: Re: [syslog-ng] syslog-ng-java RPM requirements will not use Oracle Java

I realize that the libjvm.so is included in the Oracle RPM package. It is when I have this installed,
the installation of syslog-ng-java will install another java onto my system.

% rpm -q jdk1.8
jdk1.8-1.8.0_162-fcs.x86_64

% find /usr/java/ -name "*jvm.so"
/usr/java/jdk1.8.0_162/jre/lib/amd64/server/libjvm.so

% sudo yum install syslog-ng-java
...
--> Running transaction check
---> Package syslog-ng-java.x86_64 0:3.14.1-4.el7.centos will be installed
--> Processing Dependency: libjvm.so(SUNWprivate_1.1)(64bit) for package: syslog-ng-java-3.14.1-4.el7.centos.x86_64
--> Processing Dependency: libjvm.so()(64bit) for package: syslog-ng-java-3.14.1-4.el7.centos.x86_64
--> Running transaction check
---> Package java-1.8.0-openjdk-headless.x86_64 1:1.8.0.161-0.b14.el7_4 will be installed
--> Processing Dependency: tzdata-java >= 2015d for package: 1:java-1.8.0-openjdk-headless-1.8.0.161-0.b14.el7_4.x86_64
--> Processing Dependency: copy-jdk-configs >= 2.2 for package: 1:java-1.8.0-openjdk-headless-1.8.0.161-0.b14.el7_4.x86_64
--> Processing Dependency: lksctp-tools(x86-64) for package: 1:java-1.8.0-openjdk-headless-1.8.0.161-0.b14.el7_4.x86_64
--> Running transaction check
---> Package copy-jdk-configs.noarch 0:2.2-5.el7_4 will be installed
---> Package lksctp-tools.x86_64 0:1.0.17-2.el7 will be installed
---> Package tzdata-java.noarch 0:2018c-1.el7 will be installed
--> Finished Dependency Resolution

Dependencies Resolved

================================================================================================================================================
  Package                                   Arch Version Repository                        Size
================================================================================================================================================
Installing:
  syslog-ng-java                            x86_64 3.14.1-4.el7.centos uvic-syslog-ng-314               4.9 M
Installing for dependencies:
  copy-jdk-configs                          noarch 2.2-5.el7_4 rhel-7-server-rpms                19 k
  java-1.8.0-openjdk-headless               x86_64 1:1.8.0.161-0.b14.el7_4 rhel-7-server-rpms                32 M
  lksctp-tools                              x86_64 1.0.17-2.el7 rhel-7-server-rpms                88 k
  tzdata-java                               noarch 2018c-1.el7 rhel-7-server-rpms               183 k

Transaction Summary
================================================================================================================================================
Install  1 Package (+4 Dependent packages)

If I have Oracle java installed, I would expect to install syslog-ng-java without any additional dependencies (other than syslog-ng)

Evan.

On 03/22/2018 10:07 AM, Robin Blanchard wrote:
> $ find /usr/java/jre1.8.0_162/* -name "*jvm.so"
> /usr/java/jre1.8.0_162/lib/amd64/server/libjvm.so
>
>
> -----Original Message-----
> From: syslog-ng [mailto:syslog-ng-bounces@lists.balabit.hu] On Behalf Of Evan Rempel
> Sent: Thursday, March 22, 2018 12:02 PM
> To: Syslog-ng users' and developers' mailing list <syslog-ng@lists.balabit.hu>
> Subject: [syslog-ng] syslog-ng-java RPM requirements will not use Oracle Java
>
> Using the copr builds of syslog-ng 3.14
>
> The package syslog-ng-java has RPM requirements that include
>
> libjvm.so()(64bit)
> libjvm.so(SUNWprivate_1.1)(64bit)
>
> The Java packages from Oracle do not provide these items.
>
> % rpm -q --provides -p jdk-8u162-linux-x64.rpm
> jdk
> jaxp_parser_impl
> xml-commons-apis
> java
> java-1.8.0
> java-fonts
> jre
> jre-1.8.0
> jdk1.8 = 2000:1.8.0_162-fcs
>
> % rpm -q --provides -p jre-8u162-linux-x64.rpm
> jaxp_parser_impl
> xml-commons-apis
> java
> java-1.8.0
> java-fonts
> jre
> jre-1.8.0
> jre1.8 = 1.8.0_161-fcs
>
> [% rpm -q --provides jdk-9.0.4_linux-x64_bin.rpm
> jdk
> jaxp_parser_impl
> xml-commons-apis
> java
> java-9.0.4
> java-fonts
> jre
> jre-9.0.4
> jdk-9.0.4 = 2000:9.0.4-ga
> jdk-9.0.4(x86-64) = 2000:9.0.4-ga
>
> Under Redhat 7 in order to get these I need
>
> libjvm.so()(64bit) --> java-1.8.0-ibm
> libjvm.so(SUNWprivate_1.1)(64bit) --> java-1.8.0-openjdk-headless
>
> The Oracle provided java (jdk or jre) do not provide these things. Both of these java packages provides the lib jvm.so
>
> % rpm -ql java-1.8.0-ibm | grep libjvm
> /usr/lib/jvm/java-1.8.0-ibm-1.8.0.5.10-1jpp.1.el7.x86_64/jre/bin/classic/libjvm.so
> /usr/lib/jvm/java-1.8.0-ibm-1.8.0.5.10-1jpp.1.el7.x86_64/jre/bin/j9vm/libjvm.so
> /usr/lib/jvm/java-1.8.0-ibm-1.8.0.5.10-1jpp.1.el7.x86_64/jre/lib/amd64/classic/libjvm.so
> /usr/lib/jvm/java-1.8.0-ibm-1.8.0.5.10-1jpp.1.el7.x86_64/jre/lib/amd64/compressedrefs/libjvm.so
> /usr/lib/jvm/java-1.8.0-ibm-1.8.0.5.10-1jpp.1.el7.x86_64/jre/lib/amd64/default/libjvm.so
> /usr/lib/jvm/java-1.8.0-ibm-1.8.0.5.10-1jpp.1.el7.x86_64/jre/lib/amd64/j9vm/libjvm.so
>
> % rpm -ql java-1.8.0-openjdk-headless | grep libjvm
> /usr/lib/jvm/java-1.8.0-openjdk-1.8.0.161-0.b14.el7_4.x86_64/jre/lib/amd64/server/libjvm.so
>
> Both of these package provide the following potentials for a dependency
>
> jre = 1:1.8.0
> java = 1:1.8.0
>
> or if you want to tie to a specific version of java
>
> jre-1.8.0
> java-1.8.0
>
>
> If these requirements were used in the RPM build then I could use Oracle Java to satisfy the RPM requirements.
>
> Am I missing something obvious here?
>
> Comments?
>
>
______________________________________________________________________________
Member info: https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.balabit.hu%2Fmailman%2Flistinfo%2Fsyslog-ng&data=02%7C01%7Crblanchard%40nephilaadvisors.com%7C496909108c9c404c5ec308d59018e151%7C1e7efa48808b4cb19709d1b4e6fbdf78%7C0%7C0%7C636573358889781833&sdata=DhvyUoJAPMRDDujSJ9M7qeaog64amw4Y9SttQtIXauk%3D&reserved=0
Documentation: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fsupport%2Fdocumentation%2F%3Fproduct%3Dsyslog-ng&data=02%7C01%7Crblanchard%40nephilaadvisors.com%7C496909108c9c404c5ec308d59018e151%7C1e7efa48808b4cb19709d1b4e6fbdf78%7C0%7C0%7C636573358889781833&sdata=ajlzo2ITz7nAhCnZZNAr6F64LEk7K4oyA5ov1wGubYY%3D&reserved=0
FAQ: https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fwww.balabit.com%2Fwiki%2Fsyslog-ng-faq&data=02%7C01%7Crblanchard%40nephilaadvisors.com%7C496909108c9c404c5ec308d59018e151%7C1e7efa48808b4cb19709d1b4e6fbdf78%7C0%7C0%7C636573358889781833&sdata=diDHbPPlihzKWptv9vsmQsCRBf2QVq52%2B0PeX6oHRz4%3D&reserved=0

______________________________________________________________________________
Member info: https://lists.balabit.hu/mailman/listinfo/syslog-ng
Documentation: http://www.balabit.com/support/documentation/?product=syslog-ng
FAQ: http://www.balabit.com/wiki/syslog-ng-faq