-
Notifications
You must be signed in to change notification settings - Fork 51
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
Add base-passwd and generate certificate bundle #3
Conversation
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.
it lgtm.
I have 2 non-blocking comments though:
- (see inline comment about var names)
- in the
base-passwd
DEB, it actually is apreinst
script who populates those files in /etc, manually (like printing a text snippet). The files in /usr/share are only used inpostinst
, by what I assume is a sort of backup procedure. So the comment/question is: aren't we being untruthful to the DEB by ignoring thepreinst
?
@cjdcordeiro We are still truthful, see:
The preinst string is created from That being said, I don't think it makes sense to be truthful here. I don't think most of these make sense in 99% of container images we wish to have:
FYI: I'm not sure why the |
thanks for the info on the base-passwd's preinst 👍 no further comments then. |
@niemeyer could you please merge this one if you have no objections? |
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.
Just some nitpicking, and one relevant question:
slices/base-files.yaml
Outdated
@@ -28,7 +28,7 @@ slices: | |||
|
|||
tmp: | |||
contents: | |||
/tmp/: | |||
/tmp/: { mode: 01777 } |
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.
This shouldn't be required, as it's the actual mode of the underlying directory. I think we have a bug about umask getting in the way during creation. Is that what you're seeing? Why was the explicit mode added here?
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.
I though there wasn't bug but that the directory had wrong permissions in the archive since the postinst script explicitly adjusted its permissions. But I've just checked it's correct and indeed it sounds like a bug with umask handling. Reported here: canonical/chisel#9
slices/ca-certificates.yaml
Outdated
/usr/share/ca-certificates/mozilla/*: {until: mutate} | ||
mutate: | | ||
certs_dir = "/usr/share/ca-certificates/mozilla/" | ||
certs = [ content.read(certs_dir + path) for path in content.list(certs_dir) ] |
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.
Nitpick: I think it's more conventional in Python to not have spaces padding the edges of list comprehensions. Is that true? I don't mind too much the details of our conventions, as long as it's consistent, but since we're just starting we should try to borrow some typical Python style.
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.
Ack. Fixed.
No description provided.