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

Reproducible builds #3153

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Reproducible builds #3153

merged 2 commits into from
Oct 2, 2024

Conversation

shroffk
Copy link
Member

@shroffk shroffk commented Oct 1, 2024

With each packaging of the Phoebus jar there is now a git.properties file which includes the commit id associated with this build

Additionally, I use the git commit time to mark the project.build.outputTimestamp which can be used to compare builds as follows

$ mvn clean verify artifact:compare -DskipTests
[INFO] Saved aggregate info on build to C:\git\cs-studio\phoebus\services\save-and-restore\target\service-save-and-restore-4.7.4-SNAPSHOT.buildinfo
[INFO] Aggregate buildinfo copied to C:\git\cs-studio\phoebus\target\parent-4.7.4-SNAPSHOT.buildinfo
[INFO] Checking against reference build from central...
[INFO] Reference buildinfo file not found: it will be generated from downloaded reference artifacts
[INFO] Reference build java.version: 17 (from MANIFEST.MF Build-Jdk-Spec)
[INFO] Reference build os.name: Windows (from pom.properties newline)
[INFO] Minimal buildinfo generated from downloaded artifacts: C:\git\cs-studio\phoebus\target\reference\service-save-and-restore-4.7.4-SNAPSHOT.buildinfo
[INFO] Reproducible Build output summary: 183 files ok
[INFO] Reproducible Build output comparison saved to C:\git\cs-studio\phoebus\services\save-and-restore\target\service-save-and-restore-4.7.4-SNAPSHOT.buildcompare
[INFO] Aggregate buildcompare copied to C:\git\cs-studio\phoebus\target\parent-4.7.4-SNAPSHOT.buildcompare

@shroffk shroffk merged commit ff51447 into master Oct 2, 2024
2 checks passed
@shroffk shroffk deleted the reproducible_builds branch October 2, 2024 15:41
@kasemir
Copy link
Collaborator

kasemir commented Oct 2, 2024

Looks like io.github.git-commit-id:git-commit-id-maven-plugin:9.0.1 requires Maven version 3.6.3 or later, failed with maven 3.3.9.
Updated to maven 3.9.9, but that requires changes in the syntax of some locally used antrun tasks. Maven 3.9.1 seems to be a usable version.

@shroffk
Copy link
Member Author

shroffk commented Oct 2, 2024

I will add a note in the readme about the minimum maven requirement ( I tested with 3.8.X )
Is there someplace else that I should fix the maven version too?

the github CI is set to 3.9.6
https://github.com/ControlSystemStudio/phoebus/blob/master/.github/workflows/build_latest.yml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants