From 1f3242fb02c3d4998ebb160245ddab7a06513581 Mon Sep 17 00:00:00 2001 From: Thomas Fitzsimmons Date: Wed, 24 Jan 2024 16:59:54 -0500 Subject: [PATCH] generate_source_tarball.sh: Ignore -ga tags with OPENJDK_LATEST Related: RHEL-30946 --- generate_source_tarball.sh | 8 ++++++++ java-21-openjdk.spec | 1 + 2 files changed, 9 insertions(+) diff --git a/generate_source_tarball.sh b/generate_source_tarball.sh index b24a63b..7a328e6 100755 --- a/generate_source_tarball.sh +++ b/generate_source_tarball.sh @@ -81,9 +81,17 @@ if [ "$OPENJDK_LATEST" != "" ] ; then | tail --lines 1) PROJECT_NAME=openjdk REPO_NAME=jdk"${FEATURE_VERSION}"u + # Skip -ga tags since those are the same as the most recent non-ga tag, and + # the non-ga tag is the one that is used to generated the official source + # tarball. For example: + # ca760c86642aa2e0d9b571aaabac054c0239fbdc refs/tags/jdk-17.0.10-ga^{} + # 25a2e6c20c9a96853714284cabc6b456eb095070 refs/tags/jdk-17.0.10-ga + # ca760c86642aa2e0d9b571aaabac054c0239fbdc refs/tags/jdk-17.0.10+7^{} + # e49c5749b10f3e90274b72e9279f794fdd191d27 refs/tags/jdk-17.0.10+7 VERSION=$(git ls-remote --tags --refs --sort=-version:refname \ "${OPENJDK_URL_DEFAULT}/${PROJECT_NAME}/${REPO_NAME}.git" \ "jdk-${FEATURE_VERSION}*" \ + | grep -v '\-ga$' \ | head --lines 1 | cut --characters 52-) FILE_NAME_ROOT=open${VERSION} WITH_TEMP=1 diff --git a/java-21-openjdk.spec b/java-21-openjdk.spec index 287d2c0..7fd7b55 100644 --- a/java-21-openjdk.spec +++ b/java-21-openjdk.spec @@ -2526,6 +2526,7 @@ cjc.mainProgram(args) - generate_source_tarball.sh: shellcheck: Do not use -a (SC2166) - generate_source_tarball.sh: shellcheck: Do not use $ on arithmetic variables (SC2004) - Use backward-compatible patch syntax +- generate_source_tarball.sh: Ignore -ga tags with OPENJDK_LATEST - Related: RHEL-30946 * Sun Apr 14 2024 Andrew Hughes - 1:21.0.3.0.1-0.2.ea