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

make build Reproducible (mostly) #1128

Merged
merged 2 commits into from
Jul 17, 2020
Merged

make build Reproducible (mostly) #1128

merged 2 commits into from
Jul 17, 2020

Conversation

hboutemy
Copy link
Contributor

following Maven's guide https://maven.apache.org/guides/mini/guide-reproducible-builds.html

I could not check that the result was fully reproducible, because I can't run rpm
but if you follow instruction to check a rebuild against initial build, I'm pretty sure that most of the output content is reproducible: I'm interested to know what remains not reproducible (I suppose the rpm/deb files...)

@CLAassistant
Copy link

CLAassistant commented Apr 20, 2020

CLA assistant check
All committers have signed the CLA.

@hengyunabc
Copy link
Collaborator

Thanks for the PR, but arthas using the git-commit-id-maven-plugin: git-commit-id/git-commit-id-maven-plugin#472 .

May have to wait for the new version of the git-commit-id-maven-plugin.

@hboutemy
Copy link
Contributor Author

hboutemy commented Jul 1, 2020

maybe you won't have 100% reproducible artifacts yet, but are really all binary artifacts impacted by this?
isn't it worth improving now what can be improved to be listed on Reproducible Central https://github.com/jvm-repo-rebuild/reproducible-central with partial reproducibility, and working on next steps after?

@kylixs
Copy link
Contributor

kylixs commented Jul 16, 2020

@hboutemy Could you update git-commit-id-plugin to the latest version (4.0.1)? Seems to be ready for reproducible builds.
https://github.com/git-commit-id/git-commit-id-maven-plugin/releases/tag/v4.0.1
Also please resolve code conflicts.

@hboutemy
Copy link
Contributor Author

@kylixs done

make all subprojects use the same git.build.time
@kylixs
Copy link
Contributor

kylixs commented Jul 17, 2020

Add configuration <injectAllReactorProjects>true</injectAllReactorProjects> to git-commit-id-plugin, make all subprojects use the same git.build.time.
But there is still a problem, there is no way to use project.build.outputTimestamp for the initial value of git.build.time,
it is always initialized to the current time of the system:

  // git-commit-id-plugin-core : pl.project13.core.cibuild.BuildServerDataProvider
  private void loadBuildVersionAndTimeData(@Nonnull Properties properties) {
    Supplier<String> buildTimeSupplier = () -> {
      Date buildDate = new Date();
      SimpleDateFormat smf = new SimpleDateFormat(dateFormat);
      if (dateFormatTimeZone != null) {
        smf.setTimeZone(TimeZone.getTimeZone(dateFormatTimeZone));
      }
      return smf.format(buildDate);
    };
    maybePut(properties, GitCommitPropertyConstant.BUILD_TIME, buildTimeSupplier);

@kylixs kylixs merged commit 73e8fcc into alibaba:master Jul 17, 2020
@hengyunabc hengyunabc added this to the 3.3.7 milestone Jul 17, 2020
@kylixs
Copy link
Contributor

kylixs commented Jul 17, 2020

@hboutemy
Copy link
Contributor Author

FYI, I added Arthas 3.3.7 release evaluation to reproducible-central jvm-repo-rebuild/reproducible-central#27
the arthas-git.properties file generated by git-commit-id-maven-plugin is not reproducible at all

hengyunabc added a commit that referenced this pull request Jul 25, 2020
hengyunabc added a commit that referenced this pull request Jul 25, 2020
@hengyunabc
Copy link
Collaborator

@hboutemy Thanks, the next release will be reproducible.

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.

4 participants