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

Add adoptopenjdk to userland list #30

Merged
merged 4 commits into from
Apr 26, 2019
Merged
Show file tree
Hide file tree
Changes from 3 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
2 changes: 2 additions & 0 deletions package-lists/build/userland.pkgs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@
# - java8 is required by the saml app
bcc
java8
make-jpkg
adoptopenjdk

delphix-sso-app
bpftrace
Expand Down
29 changes: 24 additions & 5 deletions packages/adoptopenjdk/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,23 +18,42 @@

DEFAULT_PACKAGE_GIT_URL=none
tarfile="OpenJDK8U-jdk_x64_linux_hotspot_8u202b08.tar.gz"
jdk_path="/usr/lib/jvm/adoptopenjdk-java8-jdk-amd64"

function prepare() {
logmust "$TOP/buildpkg.sh" make-jpkg
if [ ! -f "$TOP/packages/make-jpkg/tmp/artifacts/"*.deb ]; then
echo_bold "custom java-package not installed. Building package 'make-jpkg' first."
logmust "$TOP/buildpkg.sh" make-jpkg
fi
}

function fetch() {
logmust cd "$WORKDIR/"

local url="http://artifactory.delphix.com/artifactory"

wget -nv "$url/java-binaries/linux/jdk/8/$tarfile" -O "$tarfile"
logmust wget -nv "$url/java-binaries/linux/jdk/8/$tarfile" -O "$tarfile"
}

function build() {
logmust cd "$WORKDIR/"

env DEB_BUILD_OPTIONS=nostrip fakeroot make-jpkg "$tarfile" <<<y

logmust mv ./*.deb artifacts/
logmust env DEB_BUILD_OPTIONS=nostrip fakeroot make-jpkg "$tarfile" <<<y

logmust mv ./*.deb "$WORKDIR/artifacts/"
#
# Store the install path of the JDK in a file so that the users of this
# Java package know where to look. This is especially useful for
# other linux-pkg packages that have a build dependency on this
# particular version of Java, as they don't have to hardcode the
# path in their build definition. This would also be useful if external
# packages, such as the app-gate, decide to fetch and install Java from
# the Linux-pkg bundle.
#
logmust bash -c "echo $jdk_path >'$WORKDIR/artifacts/JDK_PATH'"
#
# Install the Java package on this system so that other linux-pkg
# packages can use it.
#
logmust install_pkgs "$WORKDIR/artifacts/"*.deb
}
8 changes: 4 additions & 4 deletions packages/delphix-sso-app/config.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,13 @@
# shellcheck disable=SC2034

DEFAULT_PACKAGE_GIT_URL="https://gitlab.delphix.com/app/saml-app.git"
JDK_PATH_FILE="$TOP/packages/java8/tmp/artifacts/JDK_PATH"
JDK_PATH_FILE="$TOP/packages/adoptopenjdk/tmp/artifacts/JDK_PATH"

function prepare() {
java_package_exists=$(dpkg-query --show oracle-java8-jdk >/dev/null 2>&1)
java_package_exists=$(dpkg-query --show adoptopenjdk-java8-jdk >/dev/null 2>&1)
if [[ ! $java_package_exists && ! -f $JDK_PATH_FILE ]]; then
echo_bold "java8 not installed. Building package 'java8' first."
logmust "$TOP/buildpkg.sh" java8
echo_bold "java8 not installed. Building package 'adoptopenjdk' first."
logmust "$TOP/buildpkg.sh" adoptopenjdk
fi
}

Expand Down