From cacd901fea7cc1faf84109e13c9b3481c7560473 Mon Sep 17 00:00:00 2001 From: Adam Brousseau Date: Tue, 5 Oct 2021 12:24:45 -0400 Subject: [PATCH] Remove freemarker download Signed-off-by: Adam Brousseau --- .../windows.sh | 14 +++--- docker/buildDocker.sh | 2 +- sbin/build.sh | 5 -- sbin/prepareWorkspace.sh | 46 ------------------- 4 files changed, 8 insertions(+), 59 deletions(-) diff --git a/build-farm/platform-specific-configurations/windows.sh b/build-farm/platform-specific-configurations/windows.sh index 739b0e42b..3a1f158b6 100755 --- a/build-farm/platform-specific-configurations/windows.sh +++ b/build-farm/platform-specific-configurations/windows.sh @@ -116,14 +116,14 @@ then if [ "${JAVA_TO_BUILD}" == "${JDK8_VERSION}" ] then export BUILD_ARGS="${BUILD_ARGS} --freetype-version 2.5.3" - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-freemarker-jar=/cygdrive/c/openjdk/freemarker.jar" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM}" # https://github.com/adoptium/temurin-build/issues/243 export INCLUDE="C:\Program Files\Debugging Tools for Windows (x64)\sdk\inc;$INCLUDE" export PATH="/c/cygwin64/bin:/usr/bin:$PATH" TOOLCHAIN_VERSION="2013" elif [ "${JAVA_TO_BUILD}" == "${JDK11_VERSION}" ] then - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-freemarker-jar=/cygdrive/c/openjdk/freemarker.jar" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM}" # Next line a potentially tactical fix for https://github.com/adoptium/temurin-build/issues/267 export PATH="/usr/bin:$PATH" @@ -161,26 +161,26 @@ then export BUILD_ARGS="${BUILD_ARGS} --freetype-version 2.5.3" export INCLUDE="C:\Program Files\Debugging Tools for Windows (x64)\sdk\inc;$INCLUDE" export PATH="$PATH:/c/cygwin64/bin" - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-freemarker-jar=/cygdrive/c/openjdk/freemarker.jar --disable-ccache" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --disable-ccache" export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-openssl=/cygdrive/c/openjdk/OpenSSL-${OPENSSL_VERSION}-x86_64-VS2013 --enable-openssl-bundling" TOOLCHAIN_VERSION="2013" elif [ "${JAVA_TO_BUILD}" == "${JDK9_VERSION}" ] then TOOLCHAIN_VERSION="2013" export BUILD_ARGS="${BUILD_ARGS} --freetype-version 2.5.3" - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-freemarker-jar=/cygdrive/c/openjdk/freemarker.jar" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM}" elif [ "${JAVA_TO_BUILD}" == "${JDK10_VERSION}" ] then export BUILD_ARGS="${BUILD_ARGS} --freetype-version 2.5.3" - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-freemarker-jar=/cygdrive/c/openjdk/freemarker.jar" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM}" elif [ "${JAVA_TO_BUILD}" == "${JDK11_VERSION}" ] then TOOLCHAIN_VERSION="2017" - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-freemarker-jar=/cygdrive/c/openjdk/freemarker.jar --with-openssl=/cygdrive/c/openjdk/OpenSSL-${OPENSSL_VERSION}-x86_64-VS2017 --enable-openssl-bundling" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-openssl=/cygdrive/c/openjdk/OpenSSL-${OPENSSL_VERSION}-x86_64-VS2017 --enable-openssl-bundling" elif [ "$JAVA_FEATURE_VERSION" -gt 11 ] then TOOLCHAIN_VERSION="2019" - export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-freemarker-jar=/cygdrive/c/openjdk/freemarker.jar --with-openssl=/cygdrive/c/openjdk/OpenSSL-${OPENSSL_VERSION}-x86_64-VS2019 --enable-openssl-bundling" + export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-openssl=/cygdrive/c/openjdk/OpenSSL-${OPENSSL_VERSION}-x86_64-VS2019 --enable-openssl-bundling" fi CUDA_VERSION=9.0 diff --git a/docker/buildDocker.sh b/docker/buildDocker.sh index 588d5067a..1a1d8da66 100755 --- a/docker/buildDocker.sh +++ b/docker/buildDocker.sh @@ -125,7 +125,7 @@ eclipseDockerCommands() docker build -t "${dockerImage}" -f Dockerfile . docker run -it -u root -d --name="${dockerContainer}" "${dockerImage}" docker exec -u root -i "${dockerContainer}" sh -c "git clone https://github.com/ibmruntimes/openj9-openjdk-${jdk}" - docker exec -u root -i "${dockerContainer}" sh -c "cd openj9-openjdk-${jdk} && bash ./get_source.sh && bash ./configure --with-freemarker-jar=/root/freemarker.jar && make all" + docker exec -u root -i "${dockerContainer}" sh -c "cd openj9-openjdk-${jdk} && bash ./get_source.sh && bash ./configure && make all" docker stop "${dockerContainer}" docker rm "${dockerContainer}" docker rmi "${dockerImage}" diff --git a/sbin/build.sh b/sbin/build.sh index e4c04e5c0..959a6d0be 100755 --- a/sbin/build.sh +++ b/sbin/build.sh @@ -345,11 +345,6 @@ buildingTheRestOfTheConfigParameters() { addConfigureArg "--enable-ccache" "" fi - # Point-in-time dependency for openj9 only - if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]]; then - addConfigureArg "--with-freemarker-jar=" "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/freemarker-${FREEMARKER_LIB_VERSION}/freemarker.jar" - fi - if [ "${BUILD_CONFIG[OPENJDK_CORE_VERSION]}" == "${JDK8_CORE_VERSION}" ]; then addConfigureArg "--with-x=" "/usr/include/X11" addConfigureArg "--with-alsa=" "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/installedalsa" diff --git a/sbin/prepareWorkspace.sh b/sbin/prepareWorkspace.sh index 91df65164..fa552b051 100644 --- a/sbin/prepareWorkspace.sh +++ b/sbin/prepareWorkspace.sh @@ -34,11 +34,9 @@ source "$SCRIPT_DIR/common/constants.sh" ALSA_LIB_VERSION=${ALSA_LIB_VERSION:-1.1.6} ALSA_LIB_CHECKSUM=${ALSA_LIB_CHECKSUM:-5f2cd274b272cae0d0d111e8a9e363f08783329157e8dd68b3de0c096de6d724} -FREEMARKER_LIB_CHECKSUM=${FREEMARKER_LIB_CHECKSUM:-8723ec9ffe006e8d376b6c7dbe7950db34ad1fa163aef4026e6477151a1a0deb} FREETYPE_LIB_CHECKSUM=${FREETYPE_LIB_CHECKSUM:-ec391504e55498adceb30baceebd147a6e963f636eb617424bcfc47a169898ce} FREETYPE_FONT_SHARED_OBJECT_FILENAME="libfreetype.so*" -FREEMARKER_LIB_VERSION=${FREEMARKER_LIB_VERSION:-2.3.31} # Create a new clone or update the existing clone of the OpenJDK source repo # TODO refactor this for Single Responsibility Principle (SRP) @@ -395,41 +393,6 @@ checkFingerprint() { fi } -# Freemarker for OpenJ9 -checkingAndDownloadingFreemarker() { - echo "Checking for FREEMARKER" - - cd "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/" || exit - FOUND_FREEMARKER=$(find "." -type d -name "freemarker-${FREEMARKER_LIB_VERSION}") - - FREEMARKER_BUILD_INFO="Unknown" - if [[ -n "$FOUND_FREEMARKER" ]]; then - echo "Skipping FREEMARKER download" - else - - # www.mirrorservice.org unavailable - issue #1867 - #wget -nc --no-check-certificate "https://www.mirrorservice.org/sites/ftp.apache.org/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" - - wget "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" || - curl -o "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" - - # Allow fallback to curl since wget fails cert check on macos - issue #1194 - wget "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" || - curl -o "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" "https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" - - FREEMARKER_BUILD_INFO="https://www.apache.org/dist/freemarker/engine/${FREEMARKER_LIB_VERSION}/binaries/apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" - - checkFingerprint "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz.asc" "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" "freemarker" "13AC 2213 964A BE1D 1C14 7C0E 1939 A252 0BAB 1D90" "${FREEMARKER_LIB_CHECKSUM}" - - mkdir -p "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/freemarker-${FREEMARKER_LIB_VERSION}/" || exit - tar -xzf "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" --strip-components=1 -C "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/freemarker-${FREEMARKER_LIB_VERSION}/" - rm "apache-freemarker-${FREEMARKER_LIB_VERSION}-bin.tar.gz" - fi - - # Record buildinfo version - echo "${FREEMARKER_BUILD_INFO}" > "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[TARGET_DIR]}/metadata/dependency_version_freemarker.txt" -} - # Utility function downloadFile() { local targetFileName="$1" @@ -574,15 +537,6 @@ downloadingRequiredDependencies() { checkingAndDownloadingAlsa fi - if [[ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_OPENJ9}" ]]; then - if [[ "$OSTYPE" == "cygwin" ]] || [[ "$OSTYPE" == "msys" ]]; then - echo "Windows or Windows-like environment detected, skipping download of dependency Freemarker." - else - echo "Checking and downloading Freemarker dependency" - checkingAndDownloadingFreemarker - fi - fi - if [[ "${BUILD_CONFIG[FREETYPE]}" == "true" ]]; then if [ -z "${BUILD_CONFIG[FREETYPE_DIRECTORY]}" ]; then echo "Checking and download FreeType Font dependency"