-
Notifications
You must be signed in to change notification settings - Fork 40
bin/make_tarball.sh: use bsdtar instead of tar #42
Conversation
Hey pommi! Thanks for submitting this pull request! I'm here to inform the recipients of the pull request that you and the commit authors have already signed the CLA. |
We have created an issue in Pivotal Tracker to manage this: https://www.pivotaltracker.com/story/show/144610517 The labels on this github issue will be updated when the story is started. |
Hi @pommi, thanks for the PR! I'm not sure if we can take this as-is, because it modifies the host system and requires root privileges. I'll prioritize https://www.pivotaltracker.com/story/show/144610517 to investigate. |
Hi @sclevine! Thanks for your quick follow-up! This change only applies to the intermediate step ( |
Hello @pommi, Our assumption here (based on reading the linked issues) is that the problem:
That is, the problem occurs while creating the .tar.gz file, not when extracting it later. If this is the case, it may be better to add a check to We're not entirely comfortable switching to BSD tar if it's not absolutely necessary. |
Hi @sesmith177, Here is another issue that gives more in-depth information about the issue: moby/moby#19647. So it's overlayfs that is causing behaviour that tar isn't able to handle.
In our case it happens in 100% of our builds. I have to say that we add another 1GB of stuff to our rootfs, which cloud make things worse. And it's not only /usr that is wrong, but sometimes a lot more:
True
That would mean that we will not be able to build a cflinuxfs2 anymore, because this will check will always fail.
Can you share your specific concerns? I just created 2 builds (1 using tar, 1 using bsdtar), did Now I'm thinking about this, why don't we just do:
instead of:
In 5586ddc it made sense, because there also were |
Hello @pommi, Just zipping the final file looks interesting; could you try replacing the final line of the makefile with
|
Since commit 7168dc0 [Remove /etc/hosts from assets] it doesn't make much sense anymore to use a bash script to simply turn the .tar file into a .tar.gz file. Besides that, running tar in a docker container using overlayfs could lead to unexpected results, see: - #42 (comment)
When using tar with overlayfs it could happen that you end up with for example
a /bin folder with 0700 rights, while it should be 0755. This is caused by:
This is a known issue: docker/hub-feedback#727
In this case we have a "currupt" rootfs because the vcap user isn't able to do
anything anymore, because it's shell is /bin/bash (which is in /bin).
As a workaround we use bsdtar instead of tar. See:
coreos/bugs#1095 (comment)
Also generate a UTF-8 locale, so bsdtar can use it and you don't get: