diff --git a/scripts/config.sh b/scripts/config.sh index 54c5da6..43ac033 100644 --- a/scripts/config.sh +++ b/scripts/config.sh @@ -6,12 +6,8 @@ SCRIPTDIR="$( cd "$(dirname "$0")" ; pwd -P )" BUILDDIR="/build" # jdk repository directory JDKDIR="$BUILDDIR/jdk" -# openjdk-build repo dir -ABLDDIR="$BUILDDIR/openjdk-build" -# openjdk-build repo -ABLDREPO="https://github.com/AdoptOpenJDK/openjdk-build.git" -# cacertfile -CACERTFILE="$ABLDDIR/security/cacerts" +# CA certificate database +CACERTFILE="$BUILDDIR/cacerts" # hg tarball JAVA_TMP="$BUILDDIR/jdk_tmp" TARBALL_MAX_DOWNLOADS=10 diff --git a/scripts/fetch.sh b/scripts/fetch.sh index 2ca54e0..37c7b6b 100644 --- a/scripts/fetch.sh +++ b/scripts/fetch.sh @@ -157,12 +157,3 @@ if [ ! -d "$JDKDIR" ]; then else echo "[FETCH] Directory for JDK repository exists, assuming everything has been done already." 2>&1 fi - - -if [ -d "$ABLDDIR" ]; then - rm -rf "$ABLDDIR" -fi - -# clone the root project -echo "[FETCH] Cloning openjdk-build repo" -git clone --depth 1 "$ABLDREPO" "$ABLDDIR" diff --git a/scripts/prepare.sh b/scripts/prepare.sh index 6ed654e..f9699d3 100644 --- a/scripts/prepare.sh +++ b/scripts/prepare.sh @@ -33,3 +33,12 @@ if [ ! -d "$JTREG" ]; then else echo "[PREPARE] Using cached jtreg directory" fi + +if [ ! -f "$CACERTFILE" ]; then + echo "[PREPARE] Generating CA certificate database" + cd "$BUILDDIR" + wget -nv -N https://github.com/use-sparingly/keyutil/releases/download/0.4.0/keyutil-0.4.0.jar + wget -nv -N https://raw.githubusercontent.com/curl/curl/master/lib/mk-ca-bundle.pl + perl mk-ca-bundle.pl ca-bundle.crt + "$HOSTJDK/bin/java" -jar keyutil-0.4.0.jar --import --new-keystore "$CACERTFILE" --password changeit --force-new-overwrite --import-pem-file ca-bundle.crt +fi