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
[master] deb, rpm: add /etc/docker directory #841
Conversation
cherry-pick in #842 |
I'm fine with this, I also don't think that this should necessarily be a known issue on 23.0.0. Users should not count on these folders being present, especially as other install methods (aka not the packages) exist. That being said, seems harmless to bring in, and we can give it a line item in the next patches on the 23.0 branch. |
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.
LGTM (although I also agree 100% that anyone scripting anything with this should start with sudo mkdir -p /etc/docker
)
sigh.. looks like CentOS 7 rpms don't like it (could be a RPM version issue, or possibly RPMs need a different directive to create it);
|
okay; all rpms don't like it.. back to reading docs / specs 😞 |
You still need to create the folder with |
Previous versions of the engine created this directory as a side-effect of the (legacy) "key.json" file. With the removal of libtrust (and the key.json) file, that directory is no longer created. While the precence of this directory is not needed for the daemon to function, users may expect it to be there, so it there should be no harm in creating it. For scripting purposes, users are still recommended to check if the directory exists or to create it (mkdir -p). This patch adds a .dirs file to create the directory on installation for .deb; https://www.debian.org/doc/manuals/maint-guide/dother.en.html#dirs And adds a %dirs directive for .rpm packages: http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-DIR-DIRECTIVE Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
bfab8ec
86f8d3c
to
bfab8ec
Compare
# create the config directory | ||
mkdir -p ${RPM_BUILD_ROOT}/etc/docker | ||
|
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 like just mkdir -p
in the %install
section is the way to go, but if others know a more idiomatic approach, let me know 😅
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 is the correct idiom, and how you customize ownership/permissions 👍
Agreed; I added a line to the commit message as well on that |
Nice! CI gods are happy now 👍 |
Previous versions of the engine created this directory as a side-effect of the (legacy) "key.json" file. With the removal of libtrust (and the key.json) file, that directory is no longer created.
While the precence of this directory is not needed for the daemon to function, users may expect it to be there, so it there should be no harm in creating it.
This patch adds a .dirs file to create the directory on installation for .deb; https://www.debian.org/doc/manuals/maint-guide/dother.en.html#dirs
And adds a
%dirs
directive for .rpm packages:http://ftp.rpm.org/max-rpm/s1-rpm-inside-files-list-directives.html#S3-RPM-INSIDE-DIR-DIRECTIVE