From 3daef2e82638a7bdae5037d4fc0d8918a57368e3 Mon Sep 17 00:00:00 2001
From: Daniel J Walsh <dwalsh@redhat.com>
Date: Wed, 4 Nov 2020 09:51:26 -0500
Subject: Use /tmp/podman-run-* for backup XDG_RUNTIME_DIR

We need to block systemd from cleaning up this directory
by dropping a /usr/lib/tmpfiles.d/podman.conf file in place.

Signed-off-by: Daniel J Walsh <dwalsh@redhat.com>
---
 contrib/spec/podman.spec.in | 1 +
 contrib/tmpfile/podman.conf | 4 ++++
 contrib/varlink/podman.conf | 1 -
 3 files changed, 5 insertions(+), 1 deletion(-)
 create mode 100644 contrib/tmpfile/podman.conf
 delete mode 100644 contrib/varlink/podman.conf

(limited to 'contrib')

diff --git a/contrib/spec/podman.spec.in b/contrib/spec/podman.spec.in
index 2e266b59f..2a3041ccc 100644
--- a/contrib/spec/podman.spec.in
+++ b/contrib/spec/podman.spec.in
@@ -509,6 +509,7 @@ export GOPATH=%{buildroot}/%{gopath}:$(pwd)/vendor:%{gopath}
 %{_usr}/lib/systemd/user/podman.socket
 %{_usr}/lib/systemd/user/podman-auto-update.service
 %{_usr}/lib/systemd/user/podman-auto-update.timer
+%{_usr}/lib/tmpfiles.d/podman.conf
 
 %if 0%{?with_devel}
 %files -n libpod-devel -f devel.file-list
diff --git a/contrib/tmpfile/podman.conf b/contrib/tmpfile/podman.conf
new file mode 100644
index 000000000..d769671e3
--- /dev/null
+++ b/contrib/tmpfile/podman.conf
@@ -0,0 +1,4 @@
+# /tmp/podman-run-* directory can contain content for Podman containers that have run
+# for many days. This following line prevents systemd from removing this content.
+x /tmp/podman-run-.*
+d /run/podman 0700 root root
diff --git a/contrib/varlink/podman.conf b/contrib/varlink/podman.conf
deleted file mode 100644
index 732c15185..000000000
--- a/contrib/varlink/podman.conf
+++ /dev/null
@@ -1 +0,0 @@
-d /run/podman 0700 root root
-- 
cgit v1.2.3-54-g00ecf