Skip to content

Commit 6abc67e

Browse files
authored
Merge branch 'master' into july25_sbomcontentupdates
2 parents 587b704 + 17b0d99 commit 6abc67e

File tree

10 files changed

+1327
-150
lines changed

10 files changed

+1327
-150
lines changed

.github/workflows/build-autotriage.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,7 @@ jobs:
3737
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
3838

3939
- name: "Run Build Auto Triage"
40-
run: bash "${PWD}/${TRIAGE_SCRIPT}" jdk8u jdk11u jdk17u jdk21u jdk24u
40+
run: bash "${PWD}/${TRIAGE_SCRIPT}" jdk8u jdk11u jdk17u jdk21u jdk25 jdk26
4141

4242
- name: Create Issue From File
4343
env:

.github/workflows/build.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -241,7 +241,7 @@ jobs:
241241
fail-fast: false
242242
matrix:
243243
os: [windows-2022]
244-
version: [jdk11u, jdk17u, jdk21u, jdk]
244+
version: [jdk17u, jdk21u, jdk]
245245
variant: [temurin]
246246

247247
env:

RELEASING.md

Lines changed: 18 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -372,15 +372,13 @@ Once all supported platform binaries have been released it's time to publish AQA
372372

373373
4. Publish packages for different OS
374374

375-
4.1. **[Mac only]** Once the binaries are available on the website you need to update the Homebrew casks. There are 4 casks in total
376-
and all but the first one is in the `hombrew-cask-versions` repository. If you're doing a point release, the format of the version string is 11.0.20.1,1 so the version is always the same as "our" one but with the `+` replaced with a `,`
375+
4.1. **[Mac only]** Once the binaries are available on the website there is now [automation upstream](https://github.com/Homebrew/homebrew-cask/commits/main/.github/workflows/autobump.yml) as of [June 2025](https://github.com/Homebrew/brew/pull/20117) which updates the Homebrew casks under the `BrewTestBot` ID - this automation should be checked to ensure it has run. Noting that for point releases (not tested with the automated PRs), the format of the version string should be 11.0.20.1,1 so the version is always the same as "our" one but with the `+` replaced with a `,`
377376

378377
- [`temurin`](https://github.com/Homebrew/homebrew-cask/blob/master/Casks/t/temurin.rb) which always serves the latest release version
379-
- [`temurin8`](https://github.com/Homebrew/homebrew-cask-versions/blob/master/Casks/temurin8.rb)
380-
- [`temurin11`](https://github.com/Homebrew/homebrew-cask-versions/blob/master/Casks/temurin11.rb)
381-
- [`temurin17`](https://github.com/Homebrew/homebrew-cask-versions/blob/master/Casks/temurin17.rb)
382-
383-
An example PR can be found [here](https://github.com/Homebrew/homebrew-cask-versions/pull/17582/files). The required SHA sums can be updated by `brew bump-cask-pr temurinXX --version 11.0.XX,Y` command if you're on a macos system, or manually if not . The separate pull request is required for each version you update. If in doubt reach out to @gdams as he's a maintainer.
378+
- [`temurin8`](https://github.com/Homebrew/homebrew-cask/blob/master/Casks/t/temurin@8.rb)
379+
- [`temurin11`](https://github.com/Homebrew/homebrew-cask/blob/master/Casks/t/temurin@11.rb)
380+
- [`temurin17`](https://github.com/Homebrew/homebrew-cask/blob/master/Casks/t/temurin@17.rb)
381+
- [`temurin21`](https://github.com/Homebrew/homebrew-cask/blob/master/Casks/t/temurin@21.rb)
384382

385383
4.2. **[Linux only]** Once the binaries are available on the website you can begin updating the specfiles for the RPM/DEB/APK files. There are 4 different types of linux installer
386384

@@ -433,7 +431,7 @@ For the api.adoptium.net repository:
433431
- If you are ADDING a JDK version:
434432
- Ensure that JDK N-1 is available as build JDK on the builders. For example in order to build JDK 15, JDK 14 needs to be installed on the build machines. As a temporary measure, [code](./build-farm/platform-specific-configurations/linux.sh#L110) so as to download the JDK to the builder via the API has been added. NOTE: For the transition period shortly after a new JDK has been branched, there might not yet exist a generally available release of JDK N-1.
435433
- Ensure that JDK sources are being mirrored. Example [infrastructure request](https://github.com/AdoptOpenJDK/openjdk-infrastructure/issues/1096)
436-
- Ensure that a repository which contains the binary releases exists. Example [temurin23-binaries](https://github.com/adoptium/temurin23-binaries), if not then create using OtterDog <https://github.com/adoptium/.eclipsefdn/blob/68e1a3c84a7f51e538ab0cbc8a6b5d3428028c37/otterdog/adoptium.jsonnet#L753>:
434+
- Ensure that a repository which contains the binary releases exists. Example [temurin23-binaries](https://github.com/adoptium/temurin23-binaries), if not then create using [OtterDog](https://github.com/adoptium/.eclipsefdn/blob/68e1a3c84a7f51e538ab0cbc8a6b5d3428028c37/otterdog/adoptium.jsonnet#L753).
437435
- Regenerate build jobs:
438436
- Create a New Item in the folder linked above that copies the `pipeline_jobs_generator_jdk` job. Call it `pipeline_jobs_generator_jdk<new-version-number>`.
439437
- Change the `Script Path` setting of the new job to `pipelines/build/regeneration/jdk<new-version-number>_regeneration_pipeline.groovy`. Don't worry if this currently doesn't exist in this repository, you'll add it in step 3.
@@ -452,6 +450,18 @@ For the api.adoptium.net repository:
452450

453451
5. Update the view for the [build and test pipeline calendar](https://ci.adoptium.net/view/Build%20and%20Test%20Pipeline%20Calendar) to include the new version.
454452

453+
6. Various other updates:
454+
455+
- If you are ADDING a JDK version:
456+
- Add the feature (LTS) or tip (STS) release to the job config for [nightlyBuildAndTestStats_temurin](https://ci.adoptium.net/job/nightlyBuildAndTestStats_temurin).
457+
- Add the JDK major version to the [build triage git workflow](https://github.com/adoptium/temurin-build/blob/f701dc3e14ee91f0c2539ee13a4ed0394e422123/.github/workflows/build-autotriage.yml#L40).
458+
- If you are REMOVING a JDK version:
459+
- jdkxx.groovy: Remove/comment-out any lines that begin with "triggerSchedule"
460+
- jdkxx.groovy: add this code to the bottom, before the "return this" line: disableJob = true
461+
- nightly_build_and_test_stats: Add the JDK major version to the retiredVersions array
462+
- Update the [nightlyBuildAndTestStats_temurin](https://ci.adoptium.net/job/nightlyBuildAndTestStats_temurin) job configuration to remove the feature (LTS) or tip (STS) release.
463+
- Update the [build triage git workflow](https://github.com/adoptium/temurin-build/blob/f701dc3e14ee91f0c2539ee13a4ed0394e422123/.github/workflows/build-autotriage.yml#L40) to remove the JDK version.
464+
455465
### Update Repository (jdkXXu)
456466

457467
At some point in a java version's lifecycle, the JDK version will be maintained in an update repository. The first notification of this will be via mail list in one of two places:

build-farm/platform-specific-configurations/mac.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,4 +176,4 @@ fi
176176

177177
if [ ! "${cxx_flags_bucket}" = "" ]; then
178178
export CONFIGURE_ARGS_FOR_ANY_PLATFORM="${CONFIGURE_ARGS_FOR_ANY_PLATFORM} --with-extra-cxxflags='${cxx_flags_bucket}'"
179-
fi
179+
fi

sbin/build.sh

Lines changed: 41 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -290,7 +290,7 @@ getOpenJdkVersion() {
290290
version="jdk-11.${minorNum}.${updateNum}+${buildNum}"
291291
fi
292292
else
293-
version=${BUILD_CONFIG[TAG]:-$(getFirstTagFromOpenJDKGitRepo)}
293+
version=$(getOpenJDKTag)
294294
version=$(echo "$version" | cut -d'_' -f 2)
295295
fi
296296
elif [ "${BUILD_CONFIG[BUILD_VARIANT]}" == "${BUILD_VARIANT_BISHENG}" ]; then
@@ -307,11 +307,11 @@ getOpenJdkVersion() {
307307
version="jdk-11.${minorNum}.${updateNum}+${buildNum}"
308308
fi
309309
else
310-
version=${BUILD_CONFIG[TAG]:-$(getFirstTagFromOpenJDKGitRepo)}
310+
version=$(getOpenJDKTag)
311311
version=$(echo "$version" | cut -d'-' -f 2 | cut -d'_' -f 1)
312312
fi
313313
else
314-
version=${BUILD_CONFIG[TAG]:-$(getFirstTagFromOpenJDKGitRepo)}
314+
version=$(getOpenJDKTag)
315315
# TODO remove pending #1016
316316
version=${version%_adopt}
317317
version=${version#aarch64-shenandoah-}
@@ -720,7 +720,7 @@ buildTemplatedFile() {
720720

721721
if [[ "${BUILD_CONFIG[ASSEMBLE_EXPLODED_IMAGE]}" == "true" ]]; then
722722
# This is required so that make will only touch the jmods and not re-compile them after signing
723-
FULL_MAKE_COMMAND="make -t \&\& ${FULL_MAKE_COMMAND}"
723+
touchSignedBuildOutputFolders
724724
fi
725725

726726
if [[ "${BUILD_CONFIG[ENABLE_SBOM_STRACE]}" == "true" ]]; then
@@ -744,6 +744,30 @@ buildTemplatedFile() {
744744
-e "s|{makeCommandArg}|${FULL_MAKE_COMMAND}|" >"${BUILD_CONFIG[WORKSPACE_DIR]}/config/configure-and-build.sh"
745745
}
746746

747+
# Touch the exploded build image output folders so that the executables do not get re-built
748+
# by make when assembling the images
749+
touchSignedBuildOutputFolders() {
750+
local buildOutputFolder="."
751+
if [ -z "${BUILD_CONFIG[USER_OPENJDK_BUILD_ROOT_DIRECTORY]}" ] ; then
752+
buildOutputFolder="build/*/."
753+
fi
754+
755+
local buildOutputFolderName=$(ls -d ${PWD}/${buildOutputFolder})
756+
757+
local signedFolderTimestamp=$(date -u +"%Y%m%d%H%M.%S")
758+
echo "Touching signed build folders within build output directory: ${buildOutputFolderName} using timestamp: ${signedFolderTimestamp}"
759+
760+
# The following build exploded image output folders contain the signed executables
761+
local signedFolders=("hotspot/variant-server" "jdk/modules/jdk.jpackage/jdk/jpackage/internal/resources" "support")
762+
for signedFolder in "${signedFolders[@]}"
763+
do
764+
if [[ -d "${buildOutputFolderName}/${signedFolder}" ]]; then
765+
echo "Touching signed build output folder: ${buildOutputFolderName}/${signedFolder}"
766+
find ${buildOutputFolderName}/${signedFolder} -exec touch -t ${signedFolderTimestamp} {} +
767+
fi
768+
done
769+
}
770+
747771
createSourceArchive() {
748772
local sourceDir="${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}"
749773
local sourceArchiveTargetPath="$(getSourceArchivePath)"
@@ -2036,6 +2060,19 @@ createDefaultTag() {
20362060
fi
20372061
}
20382062

2063+
# Get the build "tag" being built, either specified via TAG or BRANCH, otherwise get latest from the git repo
2064+
getOpenJDKTag() {
2065+
if [ -n "${BUILD_CONFIG[TAG]}" ]; then
2066+
# Checked out TAG specified
2067+
echo "${BUILD_CONFIG[TAG]}"
2068+
elif cd "${BUILD_CONFIG[WORKSPACE_DIR]}/${BUILD_CONFIG[WORKING_DIR]}/${BUILD_CONFIG[OPENJDK_SOURCE_DIR]}" && git show-ref -q --verify "refs/tags/${BUILD_CONFIG[BRANCH]}"; then
2069+
# Checked out BRANCH is a tag
2070+
echo "${BUILD_CONFIG[BRANCH]}"
2071+
else
2072+
getFirstTagFromOpenJDKGitRepo
2073+
fi
2074+
}
2075+
20392076
# Get the tags from the git repo and choose the latest numerically ordered tag for the given JDK version.
20402077
#
20412078
getFirstTagFromOpenJDKGitRepo() {

sbin/solaris/build-simple.sh

Lines changed: 168 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,168 @@
1+
#!/bin/bash
2+
# shellcheck disable=SC2155,SC2153,SC2038,SC1091,SC2116,SC2086
3+
# ********************************************************************************
4+
# Copyright (c) 2017, 2024 Contributors to the Eclipse Foundation
5+
#
6+
# See the NOTICE file(s) with this work for additional
7+
# information regarding copyright ownership.
8+
#
9+
# This program and the accompanying materials are made
10+
# available under the terms of the Apache Software License 2.0
11+
# which is available at https://www.apache.org/licenses/LICENSE-2.0.
12+
#
13+
# SPDX-License-Identifier: Apache-2.0
14+
# ********************************************************************************
15+
16+
# Note that this script expects SCM_REF and TARGET_ARCH variables to be provided
17+
# by the calling jenkins job
18+
19+
createMetadataFile() {
20+
metadata_file="$1"
21+
arch="$2"
22+
scm_ref="$3"
23+
build_src_file="$4"
24+
version_txt_file="$5"
25+
sha256="$6"
26+
27+
echo "Creating metadata file: $metadata_file $arch $scm_ref $build_src_file $version_txt_file $sha256"
28+
29+
ver_txt=$(cat $version_txt_file | sed 's/$/\\n/' | tr -d '\r\n' | sed 's/"/\\"/g')
30+
ver_pattern=".*Runtime Environment.*\(build ([0-9a-z_+-\\.]+).*OpenJDK.*"
31+
if [[ "$ver_txt" =~ .*$ver_pattern.* ]]; then
32+
ver=${BASH_REMATCH[1]}
33+
else
34+
echo "ERROR: Unable to find java version output build string"
35+
exit 1
36+
fi
37+
38+
bin_type=$(echo $metadata_file | cut -d'-' -f2 | cut -d'_' -f1)
39+
40+
release_pattern="1\.8\.0_([0-9]+)-b([0-9]+)"
41+
beta_pattern="1\.8\.0_([0-9]+)-([a-zA-Z]+)-([0-9]+)-b([0-9]+)"
42+
43+
if [[ "$ver" =~ $release_pattern ]]; then
44+
update=${BASH_REMATCH[1]}
45+
build=${BASH_REMATCH[2]}
46+
pre="null"
47+
opt="null"
48+
adopt_build_num="null"
49+
ver_pre=""
50+
ver_opt=""
51+
semver_adopt_build_num=""
52+
semver_opt=""
53+
build_trim=$(echo $build | sed 's/^0*//')
54+
elif [[ "$ver" =~ $beta_pattern ]]; then
55+
update=${BASH_REMATCH[1]}
56+
pre='"'${BASH_REMATCH[2]}'"'
57+
opt='"'${BASH_REMATCH[3]}'"'
58+
build=${BASH_REMATCH[4]}
59+
adopt_build_num="0"
60+
ver_pre="-${BASH_REMATCH[2]}"
61+
ver_opt="-${BASH_REMATCH[3]}"
62+
semver_adopt_build_num=".$adopt_build_num"
63+
semver_opt=".${BASH_REMATCH[3]}"
64+
build_trim=$(echo $build | sed 's/^0*//')
65+
else
66+
echo "ERROR: Unable to determine metadata parameters"
67+
exit 1
68+
fi
69+
70+
echo '{' > $metadata_file
71+
echo '"vendor": "Eclipse Adoptium",' >> $metadata_file
72+
echo '"os": "solaris",' >> $metadata_file
73+
echo '"arch": "'$arch'",' >> $metadata_file
74+
echo '"variant": "temurin",' >> $metadata_file
75+
echo '"version": {' >> $metadata_file
76+
echo ' "minor": 0,' >> $metadata_file
77+
echo ' "patch": null,' >> $metadata_file
78+
echo ' "msi_product_version": "8.0.'$update'.'$build_trim'",' >> $metadata_file
79+
echo ' "security": '$update',' >> $metadata_file
80+
echo ' "pre": '$pre',' >> $metadata_file
81+
echo ' "adopt_build_number": '$adopt_build_num',' >> $metadata_file
82+
echo ' "major": 8,' >> $metadata_file
83+
echo ' "version": "1.8.0_'$update$ver_pre$ver_opt'-b'$build'",' >> $metadata_file
84+
echo ' "semver": "8.0.'$update$ver_pre'+'$build_trim$semver_adopt_build_num$semver_opt'",' >> $metadata_file
85+
echo ' "build": '$build_trim',' >> $metadata_file
86+
echo ' "opt": '$opt >> $metadata_file
87+
echo '},' >> $metadata_file
88+
echo '"scmRef": "'$scm_ref'",' >> $metadata_file
89+
cat $build_src_file | sed 's/^/"buildRef": "/' >> $metadata_file
90+
echo '",'>> $metadata_file
91+
echo '"version_data": "jdk8u",' >> $metadata_file
92+
echo '"binary_type": "'$bin_type'",' >> $metadata_file
93+
echo '"sha256": "'$sha256'",' >> $metadata_file
94+
echo '"full_version_output": "'$ver_txt'",' >> $metadata_file
95+
echo '"makejdk_any_platform_args": "",' >> $metadata_file
96+
echo '"configure_arguments": "",' >> $metadata_file
97+
echo '"make_command_args": "",' >> $metadata_file
98+
echo '"BUILD_CONFIGURATION_param": "",' >> $metadata_file
99+
echo '"openjdk_built_config": "",' >> $metadata_file
100+
echo '"openjdk_source": "",' >> $metadata_file
101+
echo '"build_env_docker_image_digest": "",' >> $metadata_file
102+
echo '"dependency_version_alsa": "",' >> $metadata_file
103+
echo '"dependency_version_freetype": "",' >> $metadata_file
104+
echo '"dependency_version_freemarker": ""' >> $metadata_file
105+
echo '}' >> $metadata_file
106+
}
107+
108+
# Clear out proxy workspace to avoid archiving old artifacts if job is aborted
109+
echo RELEASE=$RELEASE
110+
rm -rf workspace
111+
# This comes from a variable definition on the agent
112+
SSH_OPTS="$SSH_PROXY_OPTS"
113+
# "-o LogLevel=FATAL -o StrictHostKeyChecking=no -o PubkeyAcceptedKeyTypes=+ssh-rsa -o HostKeyAlgorithms=+ssh-rsa -i /home/solaris/test-azure-solaris10-x64-1/.vagrant/machines/adoptopenjdkSol10/virtualbox/private_key"
114+
PUBLISH_NAME=$(echo $SCM_REF | sed 's/_adopt/-ea/')
115+
116+
if [ -n "$PUBLISH_NAME" ]; then
117+
# Use correct published filename format
118+
FILENAME="OpenJDK8U-jdk_${TARGET_ARCH}_solaris_hotspot_$(echo $PUBLISH_NAME | sed 's/jdk//' | sed 's/-b/b/').tar.gz"
119+
else
120+
# Use Timestamp
121+
FILE_DATE=$(date -u +'%Y-%m-%d-%H-%M')
122+
FILENAME="OpenJDK8U-jdk_${TARGET_ARCH}_solaris_hotspot_$FILE_DATE"
123+
fi
124+
# git clone changed from github.com/sxa/openjdk-build -b solarisfixes on April 8th
125+
ssh -p ${SSH_PORT} ${SSH_TARGET} $SSH_OPTS \
126+
JDK7_BOOT_DIR="$JDK7_BOOT_DIR" VARIANT=temurin SCM_REF="$SCM_REF" \
127+
BUILD_ARGS="$BUILD_ARGS" CONFIGURE_ARGS="$CONFIGURE_ARGS" JDK7_BOOT_DIR=$JDK7_BOOT_DIR \
128+
PUBLISH_NAME="$PUBLISH_NAME" RELEASE="$RELEASE" \
129+
"rm -rf temurin-build && \
130+
git clone https://github.com/adoptium/temurin-build && \
131+
cd temurin-build/build-farm && \
132+
export FILENAME="$FILENAME" && \
133+
export BUILD_ARGS="$BUILD_ARGS" && \
134+
export CONFIGURE_ARGS="$CONFIGURE_ARGS" && \
135+
export JDK7_BOOT_DIR="$JDK7_BOOT_DIR" && \
136+
export SCM_REF="$SCM_REF" && \
137+
export VARIANT="$VARIANT" && \
138+
export PUBLISH_NAME="$PUBLISH_NAME" && \
139+
export WORKSPACE=$HOME/temurin-build && \
140+
export JAVA_HOME=/usr/lib/jvm/jdk8 && \
141+
export RELEASE="$RELEASE" && \
142+
export PATH="/usr/local/bin:$PATH" && java -version && \
143+
./make-adopt-build-farm.sh jdk8u"
144+
# /usr/local/bin needed at start of path to avoid picking up /usr/sfw/bin/ant
145+
# JAVA_HOME needed to avoid ant giving org/apache/tools/ant/launch/Launcher : Unsupported major.minor version 52.0
146+
147+
mkdir -p workspace/target
148+
scp -prP "${SSH_PORT}" $SSH_OPTS "${SSH_TARGET}:temurin-build/build-farm/workspace/target/*" workspace/target
149+
150+
cd workspace/target || exit 1
151+
for FILE in OpenJDK*; do
152+
echo Creating metadata for ${FILE}
153+
sha256sum $FILE > $FILE.sha256.txt
154+
sha256=$(cat $FILE.sha256.txt | cut -d' ' -f1)
155+
if [[ "$FILE" =~ .*sbom.*\.json ]]; then
156+
metadata_file=${FILE%.*}-metadata.json
157+
else
158+
metadata_file=$FILE.json
159+
fi
160+
createMetadataFile "$metadata_file" "${TARGET_ARCH}" "$SCM_REF" metadata/buildSource.txt metadata/version.txt "$sha256"
161+
done
162+
# Simple test job uses filenames.txt to determine the correct filenames to pull down
163+
ls -1 > filenames.txt
164+
cd ../../..
165+
pwd
166+
ls -lR
167+
# Memo to self for tests:
168+
# Set PATH=/usr/local/bin:/opt/csw/bin:$PATH so that git and Perl 5.10 with Digest::SHA.pm can be located

0 commit comments

Comments
 (0)