Skip to content

Commit

Permalink
Revert some changes
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 5, 2024
1 parent 1f9c376 commit b6cb0f0
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 24 deletions.
37 changes: 14 additions & 23 deletions tooling/reproducible/repro_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -244,12 +244,6 @@ function removeMacOSNonComparableData() {
echo "Successfully removed all MacOS dylib non-comparable UUID from ${JDK_DIR}"
}

# Normalize the following ModuleAttributes that can be ordered differently
# depending on how the vendor has signed and re-packed the JMODs
# - ModuleResolution:
# - ModuleTarget:
# java.base also requires the dependent module "hash:" values to be excluded
# as they differ due to the Signatures
function processModuleInfo() {
if [[ "$OS" =~ CYGWIN* ]] || [[ "$OS" =~ Darwin* ]]; then
echo "Normalizing ModuleAttributes order in module-info.class, converting to javap"
Expand Down Expand Up @@ -327,24 +321,15 @@ function processModuleInfo() {
fi
}

# 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() {
# Remove windowns generate classes jdk/bin/server/classes.jsa & jdk/bin/server/classes_nocoops.jsa
function removeGeneratedClasses() {
local JDK_DIR="$1"
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
local OS="$2"

if [[ "$OS" =~ CYGWIN* ]] || [[ "$OS" =~ Darwin* ]]; then
rm -rf "$JDK_DIR/bin/server/classes.jsa"
rm -rf "$JDK_DIR/bin/server/classes_nocoops.jsa"
fi
}

# Remove all Signatures
Expand Down Expand Up @@ -429,6 +414,9 @@ function cleanTemurinFiles() {
local DIR="$1"

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"
Expand Down Expand Up @@ -459,6 +447,9 @@ function cleanTemurinFiles() {
echo "Removing SOURCE= from ${DIR}/release file, as Temurin builds from Adoptium mirror repo _adopt tag"
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
Expand Down
2 changes: 1 addition & 1 deletion 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"

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

# Remove existing signature
Expand Down

0 comments on commit b6cb0f0

Please sign in to comment.