Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Splitting VisualVM from Java #133

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
24 changes: 19 additions & 5 deletions software-modules/debuggers/visualvm/visualvm.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,17 +17,31 @@
set -xe
NAME=visualvm
TARGET_DIR="/run/initramfs/memory/system/huronOS/software/debuggers/"
MAIN_PATH="$(dirname "$(readlink -f "$0")")"

## In this particular script, given that visualvm depends on java but java cannot be installed directly in the dependencies,
## it is required to create a temp layer installing the remaining dependencies related to java before actually installing visualvm.
apt update

## Patch visualvm so it is not linked to the javasdk
## allowing only the relevant visualvm files to be preserved
cd /tmp
apt download visualvm
mkdir tmp-visualvm
dpkg-deb -R visualvm_2.1.5-1_all.deb tmp-visualvm
sed -i 's/default-jdk (>= 2:1.11) | java11-sdk, //' tmp-visualvm/DEBIAN/control
dpkg-deb -b tmp-visualvm visualvm-patched.deb

## Install java so it doesn't autoinstall
apt install --yes --no-install-recommends openjdk-17-jdk default-jdk

## Install software
apt update
apt install --yes --no-install-recommends $NAME
apt autoremove --yes

## Remove java and it's dependencies
## effectively keeping visualvm and its files
apt remove --yes --autoremove openjdk-17-jdk default-jdk

## Prepare final files
cp ./$NAME.desktop /usr/share/applications/
cp "$MAIN_PATH/$NAME.desktop" /usr/share/applications/

## Create packed changes
savechanges /tmp/$NAME.hsm
Expand Down
2 changes: 1 addition & 1 deletion software-modules/langs/java/javac/java.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ TARGET_DIR="/run/initramfs/memory/system/huronOS/software/langs/"

## Install software
apt update
apt install --yes --no-install-recommends openjdk-17-jdk
apt install --yes --no-install-recommends openjdk-17-jdk default-jdk
apt autoremove --yes

## Prepare final files
Expand Down