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

Support reproducible builds in the Makefile #3390

Merged
merged 2 commits into from Jun 21, 2019

Conversation

Foxboron
Copy link
Contributor

Found two issues in the current Makefile where podman builds are not reproducible. There are several build times embedded to build artifacts, made sure these adhere to SOURCE_DATE_EPOCH. Builds paths are also trimmed with -gcflags and -asmflags so we can reproduce them without caring about build path differences.

https://reproducible-builds.org/

Build artifacts embeds the current date of the build into the artifact.
If anyone want to reproduce the software at a later date there is no way
to pass a recorded date or fake it in the build system at a later point.

https://reproducible-builds.org/docs/source-date-epoch/

Signed-off-by: Morten Linderud <morten@linderud.pw>
An issue for achieving reproducible builds is build artifacts where
build paths are embedded. We remove them by passing the current working
directory to -gcflags and -asmflags which prefix trims the paths.

Note: Go 1.13 includes `-trimpath`

https://reproducible-builds.org/docs/build-path/

Signed-off-by: Morten Linderud <morten@linderud.pw>
@openshift-ci-robot openshift-ci-robot added size/S needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 20, 2019
@openshift-ci-robot
Copy link
Collaborator

Hi @Foxboron. Thanks for your PR.

I'm waiting for a containers or openshift member to verify that this patch is reasonable to test. If it is, they should reply with /ok-to-test on its own line. Until that is done, I will not automatically test new commits in this PR, but the usual testing commands by org members will still work. Regular contributors should join the org to skip this step.

Once the patch is verified, the new status will be reflected by the ok-to-test label.

I understand the commands that are listed here.

Instructions for interacting with me using PR comments are available here. If you have questions or suggestions related to my behavior, please file an issue against the kubernetes/test-infra repository.

@rh-atomic-bot
Copy link
Collaborator

Can one of the admins verify this patch?
I understand the following commands:

  • bot, add author to whitelist
  • bot, test pull request
  • bot, test pull request once

@baude
Copy link
Member

baude commented Jun 20, 2019

/ok-to-test

@openshift-ci-robot openshift-ci-robot added ok-to-test and removed needs-ok-to-test Indicates a PR that requires an org member to verify it is safe to test. labels Jun 20, 2019
@mheon
Copy link
Member

mheon commented Jun 20, 2019

/approve

@openshift-ci-robot
Copy link
Collaborator

[APPROVALNOTIFIER] This PR is APPROVED

This pull-request has been approved by: Foxboron, mheon

The full list of commands accepted by this bot can be found here.

The pull request process is described here

Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@openshift-ci-robot openshift-ci-robot added the approved Indicates a PR has been approved by an approver from all required OWNERS files. label Jun 20, 2019
@mheon
Copy link
Member

mheon commented Jun 20, 2019

Changes LGTM, but I'd like it if someone more familiar with makefiles could do a final review

@rhatdan
Copy link
Member

rhatdan commented Jun 21, 2019

We don't have GO 1.13 in Fedora yet. But it looks like the tests are passing.

/lgtm

@openshift-ci-robot openshift-ci-robot added the lgtm Indicates that a PR is ready to be merged. label Jun 21, 2019
@openshift-merge-robot openshift-merge-robot merged commit 39d6a86 into containers:master Jun 21, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
approved Indicates a PR has been approved by an approver from all required OWNERS files. lgtm Indicates that a PR is ready to be merged. ok-to-test
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants