From 16eea69f4aae4a55e59513cbe0b599b00cb52849 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Tue, 29 Oct 2024 17:15:57 -0400 Subject: [PATCH 1/4] Show detail diff for *class* files Signed-off-by: Sophia Guo --- tooling/reproducible/repro_compare.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tooling/reproducible/repro_compare.sh b/tooling/reproducible/repro_compare.sh index 2ee8616fb..54ca7ff8d 100755 --- a/tooling/reproducible/repro_compare.sh +++ b/tooling/reproducible/repro_compare.sh @@ -64,6 +64,13 @@ diff -r -q "${JDK_DIR1}" "${JDK_DIR2}" > "${output}" || rc=$? cat "${output}" +grep "Files .*class" "${output}" | while read -r line; do + FILE1=$(echo "$line" | awk '{print $2}') + FILE2=$(echo "$line" | awk '{print $4}') + echo "diff -c on $FILE1 and $FILE2" + diff -c "$FILE1" "$FILE2" +done + num_differences=$(wc -l < "${output}") echo "Number of differences: ${num_differences}" repro_pc100=$(( (files1-num_differences)*100*100/files1 )) From d29757cbe5556d5a0fa842b5fb52ddb2f2b301ec Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Thu, 31 Oct 2024 11:40:34 -0400 Subject: [PATCH 2/4] enable IPV6 --- tooling/reproducible/linux_repro_build_compare.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/tooling/reproducible/linux_repro_build_compare.sh b/tooling/reproducible/linux_repro_build_compare.sh index 1aceb48d3..863a3c448 100755 --- a/tooling/reproducible/linux_repro_build_compare.sh +++ b/tooling/reproducible/linux_repro_build_compare.sh @@ -89,6 +89,13 @@ setAntEnvironment() { export PATH="${LOCALGCCDIR}/bin:/usr/local/bin:/usr/bin:$PATH:/usr/local/apache-ant-${ANT_VERSION}/bin" } +enableIPV6() { + sysctl -w net.ipv6.conf.all.disable_ipv6=0 + sysctl -w net.ipv6.conf.default.disable_ipv6=0 + sysctl -w net.ipv6.conf.tun0.disable_ipv6=0 + sysctl -p +} + setTemurinBuildArgs() { local buildArgs="$1" local bootJdk="$2" @@ -173,6 +180,7 @@ if [[ "${USING_DEVKIT}" == "false" ]]; then setNonDevkitGccEnvironment fi setAntEnvironment +enableIPV6 echo "original temurin build args is ${TEMURIN_BUILD_ARGS}" TEMURIN_BUILD_ARGS=$(setTemurinBuildArgs "$TEMURIN_BUILD_ARGS" "$BOOTJDK_VERSION" "$BUILDSTAMP") From b38cfada0e1e360c5c1f604c244f14c854cc331d Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Thu, 31 Oct 2024 13:17:35 -0400 Subject: [PATCH 3/4] enable ipv6 at runtime --- test/system/reproducibleCompare/playlist.xml | 2 +- tooling/reproducible/linux_repro_build_compare.sh | 8 -------- 2 files changed, 1 insertion(+), 9 deletions(-) diff --git a/test/system/reproducibleCompare/playlist.xml b/test/system/reproducibleCompare/playlist.xml index 9fd60ce40..64ca44127 100644 --- a/test/system/reproducibleCompare/playlist.xml +++ b/test/system/reproducibleCompare/playlist.xml @@ -19,7 +19,7 @@ Rebuild_Same_JDK_Reproducibility_Test docker container rm -f reproducibleCompare; \ - docker run -v "$(TEST_RESROOT):/home/jenkins/test" -w "/home/jenkins/" -v "$(TEST_JDK_HOME):/home/jenkins/jdkbinary/" --name reproducibleCompare centos:7 /bin/bash /home/jenkins/test/linux_repro_build_compare.sh $(SBOM_FILE) /home/jenkins/jdkbinary; \ + docker run --sysctl net.ipv6.conf.all.disable_ipv6=0 --sysctl net.ipv6.conf.default.disable_ipv6=0 -v "$(TEST_RESROOT):/home/jenkins/test" -w "/home/jenkins/" -v "$(TEST_JDK_HOME):/home/jenkins/jdkbinary/" --name reproducibleCompare centos:7 /bin/bash /home/jenkins/test/linux_repro_build_compare.sh $(SBOM_FILE) /home/jenkins/jdkbinary; \ $(TEST_STATUS); \ docker cp reproducibleCompare:/home/jenkins/reprotest.diff ./; \ docker cp reproducibleCompare:/home/jenkins/reproJDK.tar.gz ./; \ diff --git a/tooling/reproducible/linux_repro_build_compare.sh b/tooling/reproducible/linux_repro_build_compare.sh index 863a3c448..1aceb48d3 100755 --- a/tooling/reproducible/linux_repro_build_compare.sh +++ b/tooling/reproducible/linux_repro_build_compare.sh @@ -89,13 +89,6 @@ setAntEnvironment() { export PATH="${LOCALGCCDIR}/bin:/usr/local/bin:/usr/bin:$PATH:/usr/local/apache-ant-${ANT_VERSION}/bin" } -enableIPV6() { - sysctl -w net.ipv6.conf.all.disable_ipv6=0 - sysctl -w net.ipv6.conf.default.disable_ipv6=0 - sysctl -w net.ipv6.conf.tun0.disable_ipv6=0 - sysctl -p -} - setTemurinBuildArgs() { local buildArgs="$1" local bootJdk="$2" @@ -180,7 +173,6 @@ if [[ "${USING_DEVKIT}" == "false" ]]; then setNonDevkitGccEnvironment fi setAntEnvironment -enableIPV6 echo "original temurin build args is ${TEMURIN_BUILD_ARGS}" TEMURIN_BUILD_ARGS=$(setTemurinBuildArgs "$TEMURIN_BUILD_ARGS" "$BOOTJDK_VERSION" "$BUILDSTAMP") From d026b1ba795b7eec97cecbede754b657d7a749f6 Mon Sep 17 00:00:00 2001 From: Sophia Guo Date: Thu, 31 Oct 2024 16:31:13 -0400 Subject: [PATCH 4/4] Verbose output the difference" --- tooling/reproducible/repro_compare.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tooling/reproducible/repro_compare.sh b/tooling/reproducible/repro_compare.sh index 54ca7ff8d..1fa0ba09c 100755 --- a/tooling/reproducible/repro_compare.sh +++ b/tooling/reproducible/repro_compare.sh @@ -64,7 +64,7 @@ diff -r -q "${JDK_DIR1}" "${JDK_DIR2}" > "${output}" || rc=$? cat "${output}" -grep "Files .*class" "${output}" | while read -r line; do +grep "Files .*" "${output}" | while read -r line; do FILE1=$(echo "$line" | awk '{print $2}') FILE2=$(echo "$line" | awk '{print $4}') echo "diff -c on $FILE1 and $FILE2"