From 11de7ef3c55282112e24b8b351b3ad318e27d5b3 Mon Sep 17 00:00:00 2001 From: Sebastiaan van Stijn Date: Tue, 7 Feb 2023 22:33:51 +0100 Subject: [PATCH] deb, rpm: add /etc/docker directory 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 Signed-off-by: Sebastiaan van Stijn (cherry picked from commit 86f8d3cb8c4282bfff8cbdee946f8ea968377d18) Signed-off-by: Sebastiaan van Stijn --- deb/common/docker-ce.dirs | 1 + rpm/SPECS/docker-ce.spec | 1 + 2 files changed, 2 insertions(+) create mode 100644 deb/common/docker-ce.dirs diff --git a/deb/common/docker-ce.dirs b/deb/common/docker-ce.dirs new file mode 100644 index 0000000000..cf12594fd2 --- /dev/null +++ b/deb/common/docker-ce.dirs @@ -0,0 +1 @@ +/etc/docker diff --git a/rpm/SPECS/docker-ce.spec b/rpm/SPECS/docker-ce.spec index 51dbeb663c..08f51c4fb4 100644 --- a/rpm/SPECS/docker-ce.spec +++ b/rpm/SPECS/docker-ce.spec @@ -102,6 +102,7 @@ install -D -m 0644 engine/contrib/init/systemd/docker.socket ${RPM_BUILD_ROOT}%{ %{_bindir}/docker-init %{_unitdir}/docker.service %{_unitdir}/docker.socket +%dir /etc/docker %post %systemd_post docker.service