-
Notifications
You must be signed in to change notification settings - Fork 55
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
image: include files from git reproducibly #3555
Conversation
✅ Deploy Preview for constellation-docs canceled.
|
b3d4cc6
to
a8fdd6b
Compare
Why aren't you able to use GNU |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for spotting this! Changes LGTM
bazel/mkosi/mkosi_image.bzl
Outdated
# from pkg_tar, where the mode is a fixed octal or needs to be passed for each file individually. | ||
# | ||
# NOTE: this rule dereferences symbolic links and hard links to weed out sources of nondeterminism. | ||
def reproducible_tar(name, srcs = [], visibility = []): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we put a notice here that this requires GNU tar
? Maybe explicitly target that notice to MacOS users, so they know that they have to install package X to run this.
a8fdd6b
to
66eaf5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Seems fine by me because building images needs to be done in the CI anyways
Unfortunately, I was ignorant of the heavy lifting that |
66eaf5a
to
0747305
Compare
Context
Our image build includes source files from git. Since git respects the users
umask
, the files in the image might have different permissions depending on the system executing the build.Proposed change(s)
reproducible_tar
that normalizes git subtrees for image inclusion.Additional info
The added rule depends on gnutar and is unlikely to work on vanilla darwin (cc @elchead). This trades off portability for correctness of the rootfs. Some alternatives:
pkg_tar
with a mode0555
. Downside: our config files are now executable.pkg_tar(modes={})
. Downside: need to maintain names in two places.Checklist
[ ] sonobuoy-quick with fresh image on GCP