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

oci: handle Go 1.10 change to FileInfoHeader #276

Merged
merged 2 commits into from Nov 13, 2018

Conversation

Projects
None yet
1 participant
@cyphar
Copy link
Member

cyphar commented Nov 12, 2018

Go 1.10's archive/tar decided to add Uname and Gname to archives by
default1, which obviously is a bit of an issue for us if we want to be
reproducible across Go versoins. To counter-act this we explicitly set
them all to the zero value.

To avoid chasing shadows in the future, we'll add some regression tests
to make sure that Go's archive/tar doesn't regress us again.

Normally regression tests are for your own project, but (as seen
throughout umoci's history) we are currently acting as one of the few
regression tests of many other projects. In the past we've found plenty
of Go bugs and bugs in many other OCI tools, but this was usually due to
some pretty blatant problems.

Recently though there have been a slew of increasingly subtle Go
changes. Unfortunately it's not possible for us to be certain of whether
a Go compiler update will break our reproducibility between versions,
but we should at least be able to smoke test it somewhat.

Here's hoping I never have to see this test again.

Fixes #275
Signed-off-by: Aleksa Sarai asarai@suse.de

oci: handle Go 1.10 change to FileInfoHeader
Go 1.10's archive/tar decided to add Uname and Gname to archives by
default[1], which obviously is a bit of an issue for us if we want to be
reproducible across Go versoins. To counter-act this we explicitly set
them all to the zero value.

To avoid chasing shadows in the future, we'll add some regression tests
to make sure that Go's archive/tar doesn't regress us again.

[1]: golang/go@0564e30 ("archive/tar: populate uname/gname/devmajor/devminor in FileInfoHeader")

Signed-off-by: Aleksa Sarai <asarai@suse.de>

@cyphar cyphar force-pushed the cyphar:go-regression-prevention branch from 6d977c2 to d28ea26 Nov 13, 2018

test: add archive/tar regression test
Normally regression tests are for your own project, but (as seen
throughout umoci's history) we are currently acting as one of the few
regression tests of many other projects. In the past we've found plenty
of Go bugs and bugs in many other OCI tools, but this was usually due to
some pretty blatant problems.

Recently though there have been a slew of increasingly subtle Go
changes. Unfortunately it's not possible for us to be certain of whether
a Go compiler update will break our reproducibility between versions,
but we should at least be able to smoke test it somewhat.

Here's hoping I never have to see this test again.

Signed-off-by: Aleksa Sarai <asarai@suse.de>

@cyphar cyphar force-pushed the cyphar:go-regression-prevention branch from d28ea26 to b9a6b2c Nov 13, 2018

@cyphar

This comment has been minimized.

Copy link
Member Author

cyphar commented Nov 13, 2018

LGTM.

@cyphar cyphar merged commit b9a6b2c into openSUSE:master Nov 13, 2018

2 checks passed

approvals/lgtm this commit looks good
continuous-integration/travis-ci/pr The Travis CI build passed
Details

cyphar added a commit that referenced this pull request Nov 13, 2018

merge branch 'pr-276'
  test: add archive/tar regression test
  oci: handle Go 1.10 change to FileInfoHeader

LGTMs: @cyphar
Closes #276

@cyphar cyphar deleted the cyphar:go-regression-prevention branch Nov 13, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment