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 cec8345
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 19 deletions.
2 changes: 1 addition & 1 deletion tooling/reproducible/linux_repro_build_compare.sh
Original file line number Diff line number Diff line change
Expand Up @@ -187,7 +187,7 @@ if [[ $JDK_PARAM =~ ^https?:// ]]; then
elif [[ $JDK_PARAM =~ tar.gz ]]; then
tar xpfz "$JDK_PARAM" --strip-components=1 -C "$PWD/jdk-${TEMURIN_VERSION}"
else
#Local jdk dir
# Local jdk dir
cp -R "${JDK_PARAM}"/* "${sourceJDK}"
fi

Expand Down
31 changes: 14 additions & 17 deletions tooling/reproducible/repro_common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -327,24 +327,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 +420,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 +453,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 cec8345

Please sign in to comment.