Skip to content

Commit

Permalink
Update exclude lists
Browse files Browse the repository at this point in the history
Signed-off-by: Sophia Guo <[email protected]>
  • Loading branch information
sophia-guo committed Sep 4, 2024
1 parent a94d654 commit 9f17fa9
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 17 deletions.
6 changes: 2 additions & 4 deletions tooling/reproducible/linux_repro_build_compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ elif [[ $JDK_PARAM =~ tar.gz ]]; then
tar xpfz "$JDK_PARAM" --strip-components=1 -C "$PWD/jdk-${TEMURIN_VERSION}"
else
#Local jdk dir
cp -R ${JDK_PARAM}/* ${sourceJDK}
cp -R "${JDK_PARAM}"/* "${sourceJDK}"
fi

echo "Rebuild args for makejdk_any_platform.sh are: $TEMURIN_BUILD_ARGS"
Expand All @@ -204,9 +204,7 @@ cp "$ScriptPath"/repro_*.sh "$PWD"
chmod +x "$PWD"/repro_*.sh
rc=0
set +e
echo "./repro_compare.sh temurin $sourceJDK temurin tarJDK Linux 2>&1" | sh &
wait
rc=$?
./repro_compare.sh temurin $sourceJDK temurin tarJDK/jdk-$TEMURIN_VERSION Linux 2>&1 || rc=$?
set -e

if [ $rc -eq 0 ]; then
Expand Down
28 changes: 17 additions & 11 deletions tooling/reproducible/repro_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,12 +327,24 @@ function processModuleInfo() {
fi
}

# Remove non-relevant files
function removeGeneratedClasses() {
# Remove excluded files known to differ
# NOTICE - Vendor specfic notice text file
# cacerts - Vendors use different cacerts
# classlist - Used to generate CDS archives, can vary due to different build machine environment
# classes.jsa, classes_nocoops.jsa - CDS archive caches will differ due to Vendor string differences
function removeExcludedFiles() {
local JDK_DIR="$1"

rm -rf "$JDK_DIR/bin/server/classes.jsa"
rm -rf "$JDK_DIR/bin/server/classes_nocoops.jsa"
excluded="NOTICE cacerts classlist classes.jsa classes_nocoops.jsa"
echo "Removing excluded files known to differ: ${excluded}"
for exclude in $excluded
do
FILES=$(find "${JDK_DIR}" -type f -name "$exclude")
for f in $FILES
do
echo "Removing $f"
rm -f "$f"
done
done
}

# Remove all Signatures
Expand Down Expand Up @@ -418,9 +430,6 @@ function cleanTemurinFiles() {

echo "Cleaning Temurin build-scripts specific files and metadata from ${DIR}"

echo "Removing Temurin NOTICE file from $DIR"
rm "${DIR}"/NOTICE

if [[ $(uname) =~ Darwin* ]]; then
echo "Removing Temurin specific lines from release file in $DIR"
sed -i "" '/^BUILD_SOURCE=.*$/d' "${DIR}/release"
Expand Down Expand Up @@ -451,9 +460,6 @@ function cleanTemurinFiles() {
sed -i '/^SOURCE=.*$/d' "${DIR}/release"
fi

echo "Removing cacerts file, as Temurin builds with different Mozilla cacerts"
find "${DIR}" -type f -name "cacerts" -delete

echo "Removing any JDK image files not shipped by Temurin(*.pdb, *.pdb, demo) in $DIR"
find "${DIR}" -type f -name "*.pdb" -delete
find "${DIR}" -type f -name "*.map" -delete
Expand Down
4 changes: 2 additions & 2 deletions tooling/reproducible/repro_process.sh
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ OS="$2"

expandJDK "$JDK_DIR" "$OS"

removeGeneratedClasses "$JDK_DIR"
removeExcludedFiles "$JDK_DIR"
if [[ "$OS" =~ CYGWIN* ]] || [[ "$OS" =~ Darwin* ]]; then

# Remove existing signature
Expand All @@ -39,6 +39,6 @@ fi
patchManifests "${JDK_DIR}"

echo "***********"
echo "SUCCESS :-)"
echo " Preprocess ${JDK_DIR} SUCCESS :-)"
echo "***********"

0 comments on commit 9f17fa9

Please sign in to comment.