From 218f6928029a0fb1430bf147c1e40a961530f60a Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Tue, 17 Dec 2024 13:59:09 -0500 Subject: [PATCH 01/11] Build IPMIview.app locally instead of in ~/Applications --- .gitignore | 6 +++-- script.sh | 70 +++++++++++++++++++++++++++++++++++++++++------------- 2 files changed, 57 insertions(+), 19 deletions(-) mode change 100644 => 100755 script.sh diff --git a/.gitignore b/.gitignore index 41d28b4..03cf798 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ -Contents/Resources/IPMIView -SM_download/ \ No newline at end of file +*~ +.*.sw* +/SM_download/ +/IPMIView.app/ diff --git a/script.sh b/script.sh old mode 100644 new mode 100755 index cddf7c4..80632b8 --- a/script.sh +++ b/script.sh @@ -9,6 +9,7 @@ INFO_URL="${BASE_URL}/downloadcenter/smsdownload\?category\=IPMI" API_URL="https://www.supermicro.com/support/resources/getfile.php?SoftwareItemID=DLID&type=serversoftwarefile" if which curl >/dev/null; then + echo "Detecting current SuperMicro software versions..." # this area is subject to problems if SuperMicro changes their page format DL_ID=$(curl -s ${INFO_URL} | grep "data-sms-name=\"Linux\".*sms_radio_buttons_IPMIView" | cut -d"'" -f4) DL_URL=$(echo $API_URL | sed "s/DLID/${DL_ID}/") @@ -78,26 +79,61 @@ else echo "Press [Enter] to continue" && read answer fi -echo "Extracting contents of downloaded IPMIView archive..." -if [[ -d Contents/Resources/IPMIView ]]; then - rm -rf Contents/Resources/IPMIView +echo "Using Java from $JAVA_HOME" +arch=$( arch ) +if [ "$arch" = "x86_64" ] ; then + echo "Okay, using x86-64 platform." +elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then + echo "Using aarm64 platform. Checking Java version..." + + jarch=$( $JAVA_HOME/bin/java -classpath . PropertyPrint os.arch ) + + if [ "x86_64" != "$jarch" ] ; then + echo "*" + echo "* This application bundle requires on x86-64 Java Runtime Environment (JRE/JDK)" + echo "*" + echo "* Java platform is $jarch for JAVA_HOME=$JAVA_HOME. Set JAVA_HOME to an x86-64 JRE and run this script again." + echo "*" + + if arch -x86_64 /usr/bin/true 2> /dev/null; then + echo "Rosetta 2 appears to be installed, so you will already be able to run the x86-64 JRE/JDK." + else + echo "You may also need to install Rosetta 2 to run an x86-64 Java Runtime Environment." + fi + + echo + echo "IPMIView.app was not built. Please read the messages above." + + exit 1 + else + echo "Java platform is $jarch for JAVA_HOME=$JAVA_HOME" + fi +else + echo "Unsupported platform: $arch" + exit 1 fi -mkdir -p Contents/Resources/IPMIView/Contents/Home/bin -tar -zxf "${LOCAL_DOWNLOAD_LOCATION}"/IPMIView*.tar* --strip=1 -C ./Contents/Resources/IPMIView/. || - { echo "Something went wrong, check download of IPMIView archive" && exit 1; } -echo "Linking 'java' and 'jre'..." -ln -s "${JAVA_HOME}/bin/java" Contents/Resources/IPMIView/Contents/Home/bin/java -rm -rf Contents/Resources/IPMIView/jre/* -pushd Contents/Resources/IPMIView/jre/ >/dev/null && - ln -s ../Contents . && - popd >/dev/null || exit +echo "Building IPMIView.app..." +if [ -f IPMIView.app/Contents/Resources/IPMIView/IPMIView.properties ] ; then + echo "Saving configuration properties IPMIView.app/Contents/Resources/IPMIView/IPMIView.properties" + cp -a IPMIView.app/Contents/Resources/IPMIView/IPMIView.properties ./IPMIView.properties.tmp || + { echo "Failed to save IPMIView.properties. Exiting."; exit 1; } +fi +rm -rf IPMIView.app +mkdir IPMIView.app +cp -a README.md Contents IPMIView.app/ +mkdir -p IPMIView.app/Contents/Resources/IPMIView/Contents/Home/bin +tar -zxf "${LOCAL_DOWNLOAD_LOCATION}"/IPMIView*.tar* --strip=1 --exclude='*/jre/*' -C IPMIView.app/Contents/Resources/IPMIView/. || + { echo "Something went wrong, check download of IPMIView archive" && exit 1; } +ln -s "${JAVA_HOME}/bin/java" IPMIView.app/Contents/Resources/IPMIView/Contents/Home/bin/java +if [ -f IPMIView.properties.tmp ] ; then + echo "Restoring IPMIView.app/Contents/Resources/IPMIView/IPMIView.properties" + cp -a IPMIView.properties.tmp IPMIView.app/Contents/Resources/IPMIView/IPMIView.properties || + { echo "Failed to restore IPMIView.properties. Exiting."; exit 1; } -echo "Copying IPMIView.app over to ~/Applications directory..." -pushd .. >/dev/null && - rsync -ar --exclude=.git --exclude=Contents/Resources/IPMIView/jre IPMIView.app ~/Applications && - popd >/dev/null || exit + rm IPMIView.properties.tmp +fi echo "Completed." echo -echo "You can now open ~/Applications/IPMIView.app" +echo "You can now open ./IPMIView.app or copy it into ~/Applications" From 8975ddc51571dd34dc5c6f3c90043422841aa975 Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Tue, 17 Dec 2024 14:05:06 -0500 Subject: [PATCH 02/11] Build IPMIview.app locally instead of in ~/Applications Also auto-detect the architecture of the machine and the JVM. Stop and require the use of x86-64 and Rosetta on aarch64. --- PropertyPrint.class | Bin 0 -> 687 bytes PropertyPrint.java | 18 ++++++++++++++++++ script.sh | 8 ++++++++ 3 files changed, 26 insertions(+) create mode 100644 PropertyPrint.class create mode 100644 PropertyPrint.java diff --git a/PropertyPrint.class b/PropertyPrint.class new file mode 100644 index 0000000000000000000000000000000000000000..de501089ddbf3feaa88a7ece17caddd1e8783574 GIT binary patch literal 687 zcmZuv%Wl(95Iqw+abi0(q@+AT=?hxdKqDa}7A#lUEIK`i#2%KTX*4Wg6b6Y6yej(zUpREP;hjR zsR8>Zbr!fy=eZ-8`+(7X2@fPjm$5xR!EIm^6bLeI5D+CJfq#;(tKJ@F(w3 zHBV4@VbqP_v9Z6yp 0) { + System.out.print(' '); + } + + System.out.print(System.getProperty(property)); + } + System.out.println(); + } +} diff --git a/script.sh b/script.sh index 80632b8..a7d7bd2 100755 --- a/script.sh +++ b/script.sh @@ -86,6 +86,14 @@ if [ "$arch" = "x86_64" ] ; then elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then echo "Using aarm64 platform. Checking Java version..." + if [ -x "$JAVA_HOME/bin/javac" ] ; then + if [ ! -f PropertyPrint.class ] ; then + "$JAVA_HOME/bin/javac" -target 1.8 PropertyPrint.java + fi + else + #echo "Cannot determine Java architecture because you do not have a JDK installed." + fi + jarch=$( $JAVA_HOME/bin/java -classpath . PropertyPrint os.arch ) if [ "x86_64" != "$jarch" ] ; then From e06b3da5adf057a720bf07340633127d25eb047e Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Tue, 17 Dec 2024 17:07:34 -0500 Subject: [PATCH 03/11] Abort if .class file is not present and JDK not available. --- script.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/script.sh b/script.sh index a7d7bd2..d57e405 100755 --- a/script.sh +++ b/script.sh @@ -91,7 +91,9 @@ elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then "$JAVA_HOME/bin/javac" -target 1.8 PropertyPrint.java fi else - #echo "Cannot determine Java architecture because you do not have a JDK installed." + echo "Cannot determine Java architecture because you do not have a JDK installed." + + exit 1 fi jarch=$( $JAVA_HOME/bin/java -classpath . PropertyPrint os.arch ) From 6093ffba4c3fa15cfef470a0b410eaf26393e64b Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Sat, 4 Jan 2025 17:26:18 -0500 Subject: [PATCH 04/11] Be more coonsistent with language. --- script.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/script.sh b/script.sh index d57e405..254c5d1 100755 --- a/script.sh +++ b/script.sh @@ -82,9 +82,9 @@ fi echo "Using Java from $JAVA_HOME" arch=$( arch ) if [ "$arch" = "x86_64" ] ; then - echo "Okay, using x86-64 platform." + echo "Using ${arch} platform." elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then - echo "Using aarm64 platform. Checking Java version..." + echo "Using ${arch} platform. Checking Java version..." if [ -x "$JAVA_HOME/bin/javac" ] ; then if [ ! -f PropertyPrint.class ] ; then From 5bc388f1678736f0dbbe951022dee9d53fb16726 Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Sat, 4 Jan 2025 17:38:11 -0500 Subject: [PATCH 05/11] Use built-in method to determine JVM architecture Use java -XshowSettings:properties instead of custom code --- PropertyPrint.class | Bin 687 -> 0 bytes PropertyPrint.java | 18 ------------------ script.sh | 2 +- 3 files changed, 1 insertion(+), 19 deletions(-) delete mode 100644 PropertyPrint.class delete mode 100644 PropertyPrint.java diff --git a/PropertyPrint.class b/PropertyPrint.class deleted file mode 100644 index de501089ddbf3feaa88a7ece17caddd1e8783574..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 687 zcmZuv%Wl(95Iqw+abi0(q@+AT=?hxdKqDa}7A#lUEIK`i#2%KTX*4Wg6b6Y6yej(zUpREP;hjR zsR8>Zbr!fy=eZ-8`+(7X2@fPjm$5xR!EIm^6bLeI5D+CJfq#;(tKJ@F(w3 zHBV4@VbqP_v9Z6yp 0) { - System.out.print(' '); - } - - System.out.print(System.getProperty(property)); - } - System.out.println(); - } -} diff --git a/script.sh b/script.sh index 254c5d1..2b7ebd6 100755 --- a/script.sh +++ b/script.sh @@ -96,7 +96,7 @@ elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then exit 1 fi - jarch=$( $JAVA_HOME/bin/java -classpath . PropertyPrint os.arch ) + jarch=$( $JAVA_HOME/bin/java -XshowSettings:properties -version 2>&1 | grep 'os.arch' | sed -e 's/.*=[ ]*//' ) if [ "x86_64" != "$jarch" ] ; then echo "*" From 15dd265c5479a09f08afb3313cef1e2464088d70 Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Sat, 4 Jan 2025 17:40:35 -0500 Subject: [PATCH 06/11] Remove compile step for arch check --- script.sh | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/script.sh b/script.sh index 2b7ebd6..484db09 100755 --- a/script.sh +++ b/script.sh @@ -86,16 +86,6 @@ if [ "$arch" = "x86_64" ] ; then elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then echo "Using ${arch} platform. Checking Java version..." - if [ -x "$JAVA_HOME/bin/javac" ] ; then - if [ ! -f PropertyPrint.class ] ; then - "$JAVA_HOME/bin/javac" -target 1.8 PropertyPrint.java - fi - else - echo "Cannot determine Java architecture because you do not have a JDK installed." - - exit 1 - fi - jarch=$( $JAVA_HOME/bin/java -XshowSettings:properties -version 2>&1 | grep 'os.arch' | sed -e 's/.*=[ ]*//' ) if [ "x86_64" != "$jarch" ] ; then From 1a3d28205de0a19842aa8db8a5aeff135c828ffa Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Sat, 4 Jan 2025 18:05:32 -0500 Subject: [PATCH 07/11] Quote JAVA_HOME just in case it contains spaces. --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index 484db09..f3f9fc7 100755 --- a/script.sh +++ b/script.sh @@ -86,7 +86,7 @@ if [ "$arch" = "x86_64" ] ; then elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then echo "Using ${arch} platform. Checking Java version..." - jarch=$( $JAVA_HOME/bin/java -XshowSettings:properties -version 2>&1 | grep 'os.arch' | sed -e 's/.*=[ ]*//' ) + jarch=$( "${JAVA_HOME}/bin/java" -XshowSettings:properties -version 2>&1 | grep 'os.arch' | sed -e 's/.*=[ ]*//' ) if [ "x86_64" != "$jarch" ] ; then echo "*" From 187c4c9e998ba6780e5adc6c6b5db49d7088bd03 Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Sun, 5 Jan 2025 08:45:48 -0500 Subject: [PATCH 08/11] Give more explanation about Rosetta. --- script.sh | 19 ++++++++++++++++--- 1 file changed, 16 insertions(+), 3 deletions(-) diff --git a/script.sh b/script.sh index f3f9fc7..25c207c 100755 --- a/script.sh +++ b/script.sh @@ -91,14 +91,27 @@ elif [ "$arch" = "arm64" -o "$arch" = "aarch64" ] ; then if [ "x86_64" != "$jarch" ] ; then echo "*" echo "* This application bundle requires on x86-64 Java Runtime Environment (JRE/JDK)" + echo "* to run properly." echo "*" - echo "* Java platform is $jarch for JAVA_HOME=$JAVA_HOME. Set JAVA_HOME to an x86-64 JRE and run this script again." + echo "* The Java platform is $jarch for JAVA_HOME=$JAVA_HOME" + echo "*" + echo "* Set your JAVA_HOME environment variable to an x86-64 JRE/JDK" + echo "* and run this script again." + echo "*" + echo "* In order to run an x86-64 JRE/JDK on your ${arch} computer, you will" + echo "* need to install Apple's Rosetta 2 software." echo "*" if arch -x86_64 /usr/bin/true 2> /dev/null; then - echo "Rosetta 2 appears to be installed, so you will already be able to run the x86-64 JRE/JDK." + echo "* Rosetta 2 appears to be installed, so you will already be able to run" + echo "* the x86-64 JRE/JDK once you install it (if necessary) and set JAVA_HOME" + echo "* to point to it." else - echo "You may also need to install Rosetta 2 to run an x86-64 Java Runtime Environment." + echo "* Rosetta 2 can't be detected on this system, so it is probably not installed." + echo "* You can install it using this command:" + echo + echo "* softwareupdate --install-rosetta" + echo "*" fi echo From 481d8aa6b1cb1f2e439bdae56aeef22fafb4907b Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Fri, 13 Feb 2026 09:35:07 -0500 Subject: [PATCH 09/11] Explicitly set JAVA_HOME so the KVM Console uses the same Java --- Contents/MacOS/IPMIView | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Contents/MacOS/IPMIView b/Contents/MacOS/IPMIView index f12d6e3..b008072 100755 --- a/Contents/MacOS/IPMIView +++ b/Contents/MacOS/IPMIView @@ -1,4 +1,6 @@ #!/usr/bin/env bash DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )" cd "${DIR}/../Resources/IPMIView" -"${DIR}/../Resources/IPMIView/Contents/Home/bin/java" -jar IPMIView20.jar +# Explicitly export JAVA_HOME so the KVM Console launches using the same Java +export JAVA_HOME="${DIR}/../Resources/IPMIView/Contents/Home" +"${JAVA_HOME}/bin/java" -jar IPMIView20.jar From f804603ce8ad7a8d4d158a5df46ccff38660d738 Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Fri, 13 Feb 2026 09:39:53 -0500 Subject: [PATCH 10/11] Update to latest known working IPMIView binary --- script.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/script.sh b/script.sh index dcb08a9..b9e1d6d 100755 --- a/script.sh +++ b/script.sh @@ -20,7 +20,7 @@ if which curl >/dev/null; then echo "[WARNING!] Problem parsing latest version..." echo "Falling back to last known version." echo "Please file an issue at https://github.com/TheCase/IPMIView.app/issues regarding latest version discovery." - DOWNLOAD_FILENAME="IPMIView_2.21.1_build.230720_bundleJRE_Linux_x64.tar.gz" + DOWNLOAD_FILENAME="IPMIView_2.24.0_build.251224_bundleJRE_Linux_x64.tar.gz" fi LOCAL_DOWNLOAD_LOCATION="./SM_download" From 1595e77af89ab390c215c39fb2cf3f6cbf1094c9 Mon Sep 17 00:00:00 2001 From: Christopher Schultz Date: Fri, 13 Feb 2026 09:55:25 -0500 Subject: [PATCH 11/11] Add comments about x64 vs aarch64 environments --- README.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 9322849..4088ce8 100644 --- a/README.md +++ b/README.md @@ -9,7 +9,7 @@ cd IPMIView.app bash script.sh ``` -You should now have an application icon in your home directory's Applications (aka `~/Applications`) folder. +You should now have an application icon in the current directory. You can copy it into `/Applications/` or into `~/Applications/` ror run it from the current location if you'd like. For some versions of macOS, you may also need to add a security exception for `java`; see [Using the KVM Console](#using-the-kvm-console) for details. @@ -28,6 +28,17 @@ Running the commands in the [Quick Start](#quick-start) section above will autom The script in this repo downloads files from SuperMicro's website located at: https://www.supermicro.com/wdl/utility/IPMIView/Linux/ +### Intel x86-64 versus Apple Silicon + +While the IPMIView application from SuperMicro is mostly written in Java, there are some native binaries required for the KVM console and possibly other parts of it. Oddly enough, the Linux bundle contains binaries for MacOS, but they are x86-64 *only*. + +If you are using MacOS on Apple Silicon (aka arm64 aka aarch64), it's still possible to run these x86-64-only binaries as long as you have: + +1. Rosetta 2 +2. Java Development Kit for MacOS x86-64 + +When building on MacOS aarch64, `script.sh` will prompt you to install Rosetta 2 and a usable JDK. You can simply set `$JAVA_HOME` to point to that JDK before running `script.sh`. + ### Using the KVM Console You need to add an `Input Monitoring` exception for `java` in the `Security & Privacy -> Privacy` Tab in `System Preferences`: @@ -40,6 +51,7 @@ You need to add an `Input Monitoring` exception for `java` in the `Security & Pr - In the top of the new window, select `Macintosh HD` in the pulldown `Library -> Java -> JavaVirtualMachines -> jdk.jdk -> bin -> Contents -> Home -> bin` - Double click on `java` - Make sure the box next to `java` is now checked and close the window + - (You may also have to do this for the Java embedded in the IPMIView.app bundle) When you attempt to launch the console, you may be presented with a message that says the developer is not verified. DO NOT click "Move to Trash" - this will delete the files necessary to run the graphical console. Once you get this message: @@ -58,3 +70,5 @@ java -jar IPMIView20.jar ``` If you have issues with IMPIView loading correctly with this method, please contact SuperMicro support. The problem is related to the app and your computer setup, not the wrapper. + +Remember, if you are using MacOS aarch64, you will need to use an x86-64 version of the JDK/JRE in order to run the KVM Console.