Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

HDDS-11057. Enable reproducible builds #6856

Open
wants to merge 10 commits into
base: master
Choose a base branch
from

Conversation

adoroszlai
Copy link
Contributor

What changes were proposed in this pull request?

  • Enable reproducible builds by setting the project.build.outputTimestamp property.
  • Remove build user and date/time, which make builds non-reproducible.
  • Add new check repro to verify jars created by build check.

(This is only the first step in making all Ozone build artifacts reproducible.)

https://issues.apache.org/jira/browse/HDDS-11057

How was this patch tested?

https://github.com/adoroszlai/ozone/actions/runs/9634357696

@adoroszlai adoroszlai added the build Pull request that modifies the build process label Jun 23, 2024
@adoroszlai adoroszlai self-assigned this Jun 23, 2024
BASE_DIR="$(pwd -P)"
REPORT_DIR=${OUTPUT_DIR:-"${BASE_DIR}/target/repro"}

source "${DIR}"/_build.sh verify artifact:compare "$@" | tee "${REPORT_DIR}/output.log"
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I am not sure which is the source artifacts used to validate reproducible builds.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

which is the source artifacts used to validate reproducible builds

The jars created and uploaded by build check.

@adoroszlai
Copy link
Contributor Author

Build user and time is accessed in

public String getDate() {
return info.getProperty("date", "Unknown");
}
public String getUser() {
return info.getProperty("user", "Unknown");
}

and reported in ozone version output:

System.out.println("Compiled by " + OZONE_VERSION_INFO.getUser() + " on "
+ OZONE_VERSION_INFO.getDate());

I plan to remove that, too, but the method which creates the version output string is being refactored in #6876.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build Pull request that modifies the build process
Projects
None yet
2 participants