Skip to content

Commit

Permalink
Ensure CCache disabled for all reproducible jdk-17 & jdk-19+ builds (#…
Browse files Browse the repository at this point in the history
…3470)

* Ensure CCache disabled for all reproducible jdk-17 & jdk-19+ builds

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure TZ is UTC for all reproducible jdk-17 & jdk-19+ builds

Signed-off-by: Andrew Leonard <[email protected]>

* Ensure CCache disabled for all reproducible jdk-17 & jdk-19+ builds

Signed-off-by: Andrew Leonard <[email protected]>

---------

Signed-off-by: Andrew Leonard <[email protected]>
  • Loading branch information
andrew-m-leonard authored Sep 4, 2023
1 parent 8b75b17 commit f97f3cf
Showing 1 changed file with 10 additions and 5 deletions.
15 changes: 10 additions & 5 deletions sbin/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,8 @@ configureReproducibleBuildParameter() {
# Enable reproducible builds implicitly with --with-source-date
if [ "${BUILD_CONFIG[RELEASE]}" == "true" ]
then
# TZ issue: https://github.com/adoptium/temurin-build/issues/3075
export TZ=UTC
# Use release date and disable CCache( remove --enable-ccache if exist)
addConfigureArg "--with-source-date=version" " --disable-ccache"
CONFIGURE_ARGS="${CONFIGURE_ARGS//--enable-ccache/}"
# Use release date
addConfigureArg "--with-source-date=" "version"
else
# Use BUILD_TIMESTAMP date

Expand All @@ -120,6 +117,14 @@ configureReproducibleBuildParameter() {
# Use supplied date
addConfigureArg "--with-hotspot-build-time=" "'${BUILD_CONFIG[BUILD_TIMESTAMP]}'"
fi

# TZ issue: https://github.com/adoptium/temurin-build/issues/3075
export TZ=UTC

# disable CCache (remove --enable-ccache if exist)
addConfigureArg "--disable-ccache" ""
CONFIGURE_ARGS="${CONFIGURE_ARGS//--enable-ccache/}"

# Ensure reproducible and comparable binary with a unique build user identifier
addConfigureArg "--with-build-user=" "admin"
if [ "${BUILD_CONFIG[OS_KERNEL_NAME]}" == "aix" ]; then
Expand Down

0 comments on commit f97f3cf

Please sign in to comment.