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-system-tarball: create reproducible tarballs #21305

Merged
merged 1 commit into from
Dec 20, 2016

Conversation

joachifm
Copy link
Contributor

This is an alternative to 4b78a5b

Ensure that archive members are added in sorted order with a fixed
mtime.  This allows `nix-build --check` to succeed (when building a
tarball of a simple system configuration).

We also remove env-vars which doesn't appear to do much apart from
capture a bunch of store paths we probably don't want.

This is an alternative to
NixOS@4b78a5b
@mention-bot
Copy link

@joachifm, thanks for your PR! By analyzing the history of the files in this pull request, we identified @offlinehacker, @rbvermaa and @edolstra to be potential reviewers.

@edolstra edolstra merged commit df48cb7 into NixOS:master Dec 20, 2016
tar cvJf $out/tarball/$fileName.tar.xz * $extraArgs
rm env-vars

tar --sort=name --mtime='1970-01-01' -cvJf $out/tarball/$fileName.tar.xz * $extraArgs
Copy link
Contributor

Choose a reason for hiding this comment

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

IIRC tar needs more magic options or it will capture the name of the build user: 3d50989

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Ah, you're right ofc, but on my end it says nixbld:nixbld which seems pretty predictable to me, so it's at least better than it was :)

Copy link
Member

@vcunat vcunat Dec 26, 2016

Choose a reason for hiding this comment

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

I guess user namespacing might now solve that by itself.

@joachifm joachifm deleted the deterministic-tarball-v2 branch December 20, 2016 21:54
joachifm added a commit that referenced this pull request Jan 1, 2017
Ownership should now always be 0/0.

Pointed out by @dezgeg at
#21305 (comment)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants