diff --git a/java-17-openjdk.spec b/java-17-openjdk.spec index 6563ef7..04b4135 100644 --- a/java-17-openjdk.spec +++ b/java-17-openjdk.spec @@ -2486,6 +2486,9 @@ require "copy_jdk_configs.lua" %endif %changelog +* Mon Jul 8 2024 Anton Bobrov - 1:17.0.12.0.6-0.1.ea +- generate_source_tarball.sh: Use tar exclude options for VCS files + * Mon Jul 8 2024 Andrew Hughes - 1:17.0.12.0.6-0.1.ea - generate_source_tarball.sh: Update examples in header for clarity - generate_source_tarball.sh: Cleanup message issued when checkout already exists diff --git a/scripts/generate_source_tarball.sh b/scripts/generate_source_tarball.sh index 0af33c3..5b66951 100755 --- a/scripts/generate_source_tarball.sh +++ b/scripts/generate_source_tarball.sh @@ -242,34 +242,21 @@ pushd "${FILE_NAME_ROOT}" popd rm -rf build - EA_PART="$(awk -F= \ - '/^DEFAULT_PROMOTED_VERSION_PRE/ { if ($2) print "-"$2 }' \ - "${VERSION}"/make/conf/version-numbers.conf)" - TARBALL_BASE=${FILE_NAME_ROOT}${EA_PART}.tar - pushd "${VERSION}" - # Omit commit checks, history, and GHA from archive. - for skip in .jcheck .hgtags .hgignore .gitattributes .gitignore .github - do - echo "${skip}"" export-ignore" >> .git/info/attributes - done - # Do not bother with --mtime here; specify it to tar below. - # Unforunately, git-archive sorts added files like .src-rev at the end; - # retar below to use GNU tar --sort=name ordering which sorts .src-rev - # at the start. - git archive --output "${TARBALL_BASE}" --prefix="${VERSION}"/ \ - --add-file=.src-rev --format=tar "${VERSION}" - popd - mv "${VERSION}" "${VERSION}".git - tar xf "${VERSION}".git/"${TARBALL_BASE}" echo "Compressing remaining forest" if [ "$COMPRESSION" = "xz" ] ; then SWITCH=cJf else SWITCH=czf fi - TARBALL_NAME=${TARBALL_BASE}.${COMPRESSION} + EA_PART="$(awk -F= \ + '/^DEFAULT_PROMOTED_VERSION_PRE/ { if ($2) print "-"$2 }' \ + "${VERSION}"/make/conf/version-numbers.conf)" + TARBALL_NAME=${FILE_NAME_ROOT}${EA_PART}.tar.${COMPRESSION} XZ_OPT=${XZ_OPT-"-T0"} \ - tar --mtime="${TAR_TIME}" --owner=root --group=root --sort=name \ + tar --exclude-vcs --exclude=.jcheck --exclude=.hgtags \ + --exclude=.hgignore --exclude=.gitattributes \ + --exclude=.gitignore --exclude=.github \ + --mtime="${TAR_TIME}" --owner=root --group=root --sort=name \ -$SWITCH "${TARBALL_NAME}" "${TO_COMPRESS}" mv "${TARBALL_NAME}" .. popd