Hi,
i installed/started Openfire server (on our RHEL 6.5 server) connected to our LDAP (389-DS) server. Nice and cute setup!
Surprisingly, i had more troubles to install Spark client on my Scientific Linux 6.5 laptop :]
‘Quick and dirty’ “rpmbuild --rebuild” didn’t work (ofc) and after some searching around i found out the ‘src.rpm’ is quite old (no devs nowadays?) and has very old java (1.6.x) as a part of package, resulting in unability to recompile / install package properly (even after recompilation it was failing on an odd deps, which yum seen as satisfied).
So what i did:
- recompile as normal user (not root!) and prepare you recompile env (if not done during previous src.rpm entanglements :])
yum install rpm-build.x86_64 rpm-libs.x86_64 rpmdevtools.noarch
- download and install src.rpm
rpm -i spark-2.6.3.src.rpm
- you’ll have to edit specfile because by default it doesnt work:
cd ~/rpmbuild/SPECS/
change this
Version: %{SPARK_VERSION}
Source: %{SPARK_SOURCE}
Source1: jre-dist.tar.gz
to:
Version: 2.6.3.12555
Source: spark_src_2.6.3.12555.tar.gz
Source1: jre8-dist.tar.gz
header explained:
just have a look into ~/rpmbuild/SOURCES and there you’ll see “spark_src_2.6.3.12555.tar.gz” package and “jre-dist.tar.gz package” as source packages. Particularly the “jre-dist.tar.gz” package contain old java 1.6.x which is quite old and prevented me from succesfull install
After unpacking “jre-dist.tar.gz” i found it contain only “jre” folder with old 1.6.x java - so what i did is, i just replaced this “jre” folder with new 1.8.x java:
- download “jdk-8u31-linux-x64.tar.gz” and unpack
tar -xzvf jdk-8u31-linux-x64.tar.gz
cd jdk1.8.0_31
tar -cvpv jre8-dist.tar jre/*
mv jre8-dist.tar.gz ~/rpmbuild/SOURCES (this name has to correspond with the name in the specfile header - you can basically name it as whatever you want)
this will replace the old 1.6.x JRE with the 1.8 JRE as the source for building new rpm.
- export java home
export JAVA_HOME=’/usr/java/jdk1.8.0_31’
- rebuild
cd ~/rpmbuild/SPECS
rpmbuild -bb spark.spec
- if rebuild fails, it is probably because some libraries or deps are missing - install missing via ‘yum’ until it completes successfully - e.g. i had to install:
yum install unixODBC alsa-lib libX11 libXau libXext libXi libXp libXtst libxcb
- install
yum localinstall ~/rpmbuild/RPMS/x86_64/Spark-2.6.3.12555-1.x86_64.rpm
Install
1 Package(s)
Total size: 185 M
Installed size: 185 M
Is this ok [y/N]: y
Running Transaction
Installing : Spark-2.6.3.12555-1.x86_64
1/1
Verifying : Spark-2.6.3.12555-1.x86_64
1/1
Installed:
Spark.x86_64 0:2.6.3.12555-1
Complete!
NOTE Problem:
with the old version of java (1.6.x) that is distributed with the src.rpm package by default i had trouble to install the recompiled rpm package and the “yum localinstall …” was ending with:
Error: Package: Spark-2.6.3.12555-1.x86_64 (/spark-2.6.3)
Requires: libodbcinst.so
Error: Package: Spark-2.6.3.12555-1.x86_64 (/spark-2.6.3)
Requires: libodbc.so
These packages are satisfied via ‘unixODBC’ package, but it still failed even with it installed. After repackaging with new java, it went ok.
hope it helps someone
cheers :]