summaryrefslogtreecommitdiff
path: root/sys-apps
diff options
context:
space:
mode:
authorBertrand Jacquin <beber@meleeweb.net>2014-04-03 15:56:52 +0200
committerBertrand Jacquin <beber@meleeweb.net>2014-04-03 18:53:05 +0200
commit9b1071f7081da1358187cc1f65b7cc86412169e5 (patch)
tree2c72904d3aeb172aea8372719768e9fe1ca7852c /sys-apps
parentsys-apps/IPMIView: Version bump (diff)
downloadportage-9b1071f7081da1358187cc1f65b7cc86412169e5.tar.xz
sys-apps/IPMIView: Use non JRE bundle version
Package-Manager: portage-2.2.10
Diffstat (limited to 'sys-apps')
-rw-r--r--sys-apps/IPMIView/ChangeLog4
-rw-r--r--sys-apps/IPMIView/IPMIView-2.9.30-r20140317.ebuild20
-rw-r--r--sys-apps/IPMIView/Manifest9
-rw-r--r--sys-apps/IPMIView/files/IPMIView-wrapper61
4 files changed, 68 insertions, 26 deletions
diff --git a/sys-apps/IPMIView/ChangeLog b/sys-apps/IPMIView/ChangeLog
index 833208e7..71437275 100644
--- a/sys-apps/IPMIView/ChangeLog
+++ b/sys-apps/IPMIView/ChangeLog
@@ -1,3 +1,7 @@
+ 03 Apr 2014; Bertrand Jacquin <beber@meleeweb.net>
+ IPMIView-2.9.30-r20140317.ebuild, files/IPMIView-wrapper:
+ sys-apps/IPMIView: Use non JRE bundle version
+
*IPMIView-2.9.30-r20140317 (03 Apr 2014)
03 Apr 2014; Bertrand Jacquin <beber@meleeweb.net>
diff --git a/sys-apps/IPMIView/IPMIView-2.9.30-r20140317.ebuild b/sys-apps/IPMIView/IPMIView-2.9.30-r20140317.ebuild
index a8077848..f9e1e114 100644
--- a/sys-apps/IPMIView/IPMIView-2.9.30-r20140317.ebuild
+++ b/sys-apps/IPMIView/IPMIView-2.9.30-r20140317.ebuild
@@ -3,13 +3,11 @@
# $Header: $
EAPI=5
-inherit multilib java-utils-2
+inherit java-utils-2
DESCRIPTION="SuperMicro IPMI management tool"
HOMEPAGE="ftp://ftp.supermicro.com/utility/IPMIView"
-SRC_URI="
- amd64? ( ftp://ftp.supermicro.com/utility/${PN}/Linux/${PN}_${PV}_bundleJRE_Linux_x64_${PR/r}.tar.gz )
- x86? ( ftp://ftp.supermicro.com/utility/${PN}/Linux/${PN}_${PV}_bundleJRE_Linux_${PR/r}.tar.gz )"
+SRC_URI="ftp://ftp.supermicro.com/utility/${PN}/Jar/${PN}_${PV}_jar_${PR/r}.zip"
LICENSE="Oracle-BCLA-JavaSE"
SLOT="0"
@@ -23,24 +21,18 @@ RESTRICT="mirror"
QA_PREBUILT="usr/lib*/*.so"
-use amd64 && S="${WORKDIR}/${PN}_${PV}_bundleJRE_Linux_x64_${PR/r}"
-use x86 && S="${WORKDIR}/${PN}_${PV}_bundleJRE_Linux_${PR/r}"
+S="${WORKDIR}/${PN}_${PV}_jar_${PR/r}"
src_install() {
dobin "${FILESDIR}/${PN}-wrapper"
- dosym "${PN}-wrapper" /usr/bin/iKVM
dosym "${PN}-wrapper" /usr/bin/IPMIView20
- dosym "${PN}-wrapper" /usr/bin/JViewerX9
dosym "${PN}-wrapper" /usr/bin/TrapReceiver
- java-pkg_dojar iKVM.jar IPMIView20.jar JViewerX9.jar TrapView.jar lax.jar
+ java-pkg_dojar iKVM.jar IPMIView20.jar JViewerX9.jar TrapView.jar
- insinto "/usr/share/${PN}/lax"
- doins iKVM.lax IPMIView20.lax JViewerX9.lax TrapReceiver.lax
-
- use x86 && dolib libiKVM32.so libSharedLibrary32.so
- use amd64 && dolib libiKVM64.so libSharedLibrary64.so
+ use x86 && java-pkg_doso libiKVM32.so libSharedLibrary32.so
+ use amd64 && java-pkg_doso libiKVM64.so libSharedLibrary64.so
dodoc IPMIView20.pdf IPMIViewSuperBlade.pdf ReleaseNote.txt
}
diff --git a/sys-apps/IPMIView/Manifest b/sys-apps/IPMIView/Manifest
index 308bbb6f..3191cb81 100644
--- a/sys-apps/IPMIView/Manifest
+++ b/sys-apps/IPMIView/Manifest
@@ -1,6 +1,5 @@
-AUX IPMIView-wrapper 413 SHA256 eecc4d3eaf57aae4457894d4baedb4b23b899aec4f0d1fa59eefaf1caecb70a6 WHIRLPOOL 9eac93fd12bb5c14c7a2c6cf4c2a9d0a80bbcc5e9f21701a421c5d19a30bac37f4653e5f75f4d4e1c6665fa4568b015e8c6b986acc00659bd50e73a7dfda8c54
-DIST IPMIView_2.9.30_bundleJRE_Linux_20140317.tar.gz 69362156 SHA256 4e4ce87d1e4bb02622b760c2aa00930b58dc238196f8b4b35a76a12a48d2bcbd WHIRLPOOL 72ca256a2e1e9a11c22c18893a60adf80c0b041a14649aea99331779df5c4f5bf2351f997a942940dabea96bf62af3b4dd8c01eeb53def28861baecc8dae5686
-DIST IPMIView_2.9.30_bundleJRE_Linux_x64_20140317.tar.gz 63094748 SHA256 471e4363f2ae78e00253f0aa12ab670acb6b7b8e3dde93fc4b98bdaaec205496 WHIRLPOOL 0e3c103d5e7eda6ac29897c596963703dd64847c590e9ca30ee1d8fa7a3c386ea27ab55e7907dbc881a31732a6b15156b92ce0da7509ff733212f46f334a5894
-EBUILD IPMIView-2.9.30-r20140317.ebuild 1340 SHA256 66a938f26eb5c99359974e118321932269fd5e795d1b970dad78d4ea5c8d1852 WHIRLPOOL 96e33ca47cacf519b9b4e7e4f05bdd095010078267572bbc0e8219e1ffee662911f62ca0d2ccba61523b347da59b5e0d85c6aac316099b1d674eb38c5470b261
-MISC ChangeLog 1047 SHA256 3d58ea53fbe1062318b0eaeab68914720513eab11c15e4fb1a66ad4fbd7c9779 WHIRLPOOL 96851e069531273e0f0bbe14438a4f1f52f8015b958aca95de72fff7847bb3b29ae16b01825f314d101b44288e91d1cebcc93514f1b0f166bdd4b8ab7730d488
+AUX IPMIView-wrapper 1779 SHA256 96e800ccff624921fe53bdc438453f424f24c722d4c673fe1fcb69e340d2ac05 WHIRLPOOL 2cadc3e8ad548ce51ba0e02199b45e952a6120e59e5051124cffc24ec1714ad7e09f673adaf689f7e77fd5b2c3ac356c77c20b3d7e7c6863c7d1399093d8b0a1
+DIST IPMIView_2.9.30_jar_20140317.zip 27676263 SHA256 3ffb8579b5b494d1020ad83fd0fcbbacaa7873484fec3d8410b48d61c013a7af WHIRLPOOL c0b145e88f53ba93ab4c20863bfce83bb46da385569d21d4889f71339b80e3a11ea2802ddd22f2cadc496bbd446acfd5ff6ab92bfad82b56cf43849e70ebd07a
+EBUILD IPMIView-2.9.30-r20140317.ebuild 936 SHA256 ed4e865702cfbbf2dbcca64bb9e694b592c274453257d627312f1eca61822a98 WHIRLPOOL cf7583a4ad065859a7e41c44c7db8879e48f35a7906517a30e71eee84d18aedd993fbcf7efa0d7409afd9568b8b8053c1dee18aff62e87edc8f889c0b4669809
+MISC ChangeLog 1209 SHA256 4b38fc6def6790e2f48e8ab5ba773fff8e11c4b81bbc7ccec45163a4bfe0cc3e WHIRLPOOL 48c9e9b7bd206f95840c4cb63169ed3d3db3c9ab39e1fac847a205f89ad49f47eaa12250a3f2dd5c911df590db290951ea5e64b593ec716c5f6b9caf30142323
MISC metadata.xml 254 SHA256 c56bc3d6780712c960298c70bb86867aeb6661e97a317cc624516b0e16b72fcc WHIRLPOOL 2ebbfaa14ef0c1847284fe64a79f052cd7e73b25a724fba728c084aaaf2dd0692e068eedcf42ccef7e205077f00c35780ded7ec69118dc01ddb988b4802e46ae
diff --git a/sys-apps/IPMIView/files/IPMIView-wrapper b/sys-apps/IPMIView/files/IPMIView-wrapper
index e0a4c06f..ae5f4a4e 100644
--- a/sys-apps/IPMIView/files/IPMIView-wrapper
+++ b/sys-apps/IPMIView/files/IPMIView-wrapper
@@ -1,18 +1,65 @@
#!/bin/bash
#
-# (c) 2013 - Bertrand Jacquin <beber@meleeweb.net>
+# (c) 2013-2014 - Bertrand Jacquin <beber@meleeweb.net>
#
BIN="${0##*/}"
-CLASSPATH="$(java-config --classpath IPMIView)"
+
+PN="IPMIView"
+PVR="$(java-config --query PVR --package ${PN})"
+
JAVA_HOME="$(java-config --jre-home)"
+CLASSPATH="$(java-config --classpath ${PN})"
+LIBRARY_PATH="$(java-config --library ${PN})"
+
+if [[ ! -e "/usr/share/${PN}/lib/${BIN}.jar" ]] ; then
+ echo "/usr/share/${PN}/lib/${BIN}.jar is missing"
+ exit 1
+fi
-if [[ ! -e "/usr/share/IPMIView/lax/${BIN}.lax" ]] ; then
- echo "/usr/share/IPMIView/lax/${BIN}.lax is missing"
+if [[ ! ${CLASSPATH} ]] ; then
+ echo "java-config --classpath ${PN} return nothing"
exit 1
fi
-"${JAVA_HOME}/bin/java" \
+if [[ ! ${LIBRARY_PATH} ]] ; then
+ echo "java-config --library ${PN} return nothing"
+ exit 1
+fi
+
+# IPMIView has hardcoded java exec like:
+# java -Djava.library.path=. -jar iKVM.jar ...
+#
+# If you change current directory to /usr/share/IPMIView/lib
+# Then IPMIView20 try to create .properties files but but get denied
+# due to directory permissions
+# --- error to write log[timeout.properties]! ---
+# java.io.FileNotFoundException: ./account.properties (Permission denied)
+# ...
+#
+# So lets fake where the jar remains and create a dumb symlink to real
+# jar so the java exec can use -Djava.library.path=. and create theses
+# properties files
+#
+# The same appy for .so files
+#
+# Flush that fake IPMIView root directory when IPMIView get upgrade
+[[ ! -d "${HOME}/.${PN}" ]] && mkdir -p "${HOME}/.${PN}"
+cd "${HOME}/.${PN}"
+
+if [[ "/usr/share/${PN}/package.env" -nt PVR ]] ; then
+ rm *.jar *.so
+ echo "${PVR}" > PVR
+fi
+
+while read -d : ; do
+ [[ ! -L "${REPLY##*/}" ]] && ln -snf "${REPLY}" "${REPLY##*/}"
+done <<< "${CLASSPATH}:"
+
+while read ; do
+ [[ ! -L "${REPLY##*/}" ]] && ln -snf "${REPLY}" "${REPLY##*/}"
+done < <(find "${LIBRARY_PATH}" -type f -name '*.so')
+
+exec "${JAVA_HOME}/bin/java" \
-classpath "${CLASSPATH}" \
- com.zerog.lax.LAX \
- "/usr/share/IPMIView/lax/${BIN}.lax"
+ -jar "/usr/share/${PN}/lib/${BIN}.jar"