From 0e6a421ca67cd7f12a12e06c37990c5886483d51 Mon Sep 17 00:00:00 2001 From: SeongChan Lee <> Date: Wed, 24 Aug 2022 14:52:40 +0900 Subject: Use tmpfiles.d specifiers instead of fixed path Rootless Docker daemon exposes its API socket on `$XDG_RUNTIME_DIR/docker.sock`. On tmpfiles.d, `%t` is same as `$XDG_RUNTIME_DIR` in `--user` mode, and `/run` otherwise. We can reuse the same config file for both mode with this change. Signed-off-by: SeongChan Lee --- contrib/systemd/system/podman-docker.conf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/contrib/systemd/system/podman-docker.conf b/contrib/systemd/system/podman-docker.conf index e12f19bce..9d5f43101 100644 --- a/contrib/systemd/system/podman-docker.conf +++ b/contrib/systemd/system/podman-docker.conf @@ -1 +1 @@ -L+ /run/docker.sock - - - - /run/podman/podman.sock +L+ %t/docker.sock - - - - %t/podman/podman.sock -- cgit v1.2.3-54-g00ecf From b47c54ab69d56f05bc586e443d04fe572de8ff8f Mon Sep 17 00:00:00 2001 From: SeongChan Lee <> Date: Wed, 24 Aug 2022 14:52:40 +0900 Subject: Install podman-docker.conf on user-tmpfiles.d too `systemd-tmpfiles` reads "user" configurations in `/usr/share/user-tmpfiles.d` when `--user` mode is set. User unit `systemd-tmpfiles-setup.service` can be enabled to alias rootless socket through systemd-tmpfiles. Signed-off-by: SeongChan Lee --- Makefile | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index 4f222d6d4..4818ee122 100644 --- a/Makefile +++ b/Makefile @@ -38,6 +38,7 @@ MANDIR ?= ${PREFIX}/share/man SHAREDIR_CONTAINERS ?= ${PREFIX}/share/containers ETCDIR ?= ${PREFIX}/etc TMPFILESDIR ?= ${PREFIX}/lib/tmpfiles.d +USERTMPFILESDIR ?= ${PREFIX}/share/user-tmpfiles.d MODULESLOADDIR ?= ${PREFIX}/lib/modules-load.d SYSTEMDDIR ?= ${PREFIX}/lib/systemd/system USERSYSTEMDDIR ?= ${PREFIX}/lib/systemd/user @@ -795,8 +796,9 @@ install.completions: install.docker: install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(BINDIR) install ${SELINUXOPT} -m 755 docker $(DESTDIR)$(BINDIR)/docker - install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR} + install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR} ${DESTDIR}${USERTMPFILESDIR} install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t ${DESTDIR}${TMPFILESDIR} + install ${SELINUXOPT} -m 644 contrib/systemd/system/podman-docker.conf -t ${DESTDIR}${USERTMPFILESDIR} .PHONY: install.docker-docs install.docker-docs: -- cgit v1.2.3-54-g00ecf From c3dc92a50ae25e6da6ce08ac21d3d3bbf84a8a7f Mon Sep 17 00:00:00 2001 From: SeongChan Lee Date: Wed, 24 Aug 2022 18:00:35 +0900 Subject: Fix rpm packaging error Signed-off-by: SeongChan Lee --- podman.spec.rpkg | 1 + 1 file changed, 1 insertion(+) diff --git a/podman.spec.rpkg b/podman.spec.rpkg index f27b31108..2962fe91e 100644 --- a/podman.spec.rpkg +++ b/podman.spec.rpkg @@ -233,6 +233,7 @@ done %{_userunitdir}/%{name}-restart.service %{_userunitdir}/%{name}-kube@.service %{_tmpfilesdir}/%{name}.conf +%{_user_tmpfilesdir}/%{name}-docker.conf %if 0%{?fedora} >= 36 %{_modulesloaddir}/%{name}-iptables.conf %endif -- cgit v1.2.3-54-g00ecf