From 69b66599609c6513de8d72c45fe327312b0b81ac Mon Sep 17 00:00:00 2001 From: Ed Santiago Date: Thu, 7 Oct 2021 08:10:41 -0600 Subject: Unit files: Use actual installed path for podman Don't hardcode /usr/bin/podman in unit files: instead, use template files with a path replaced at install time. Because 'make' can be invoked repeatedly, with different PREFIX, do not leave the generated files behind in our work directory: wipe them immediately after install. To get this to work, fix a longstanding bug in podman.spec.in, a PREFIX that should've been DESTDIR. Side note: #7023 made contrib/systemd/user a symlink to .../system but did not update paths in Makefile. The unrelated-looking path change you see here is a belated correction for that. Fixes: #10787 Signed-off-by: Ed Santiago --- contrib/systemd/auto-update/podman-auto-update.service | 13 ------------- contrib/systemd/auto-update/podman-auto-update.service.in | 13 +++++++++++++ 2 files changed, 13 insertions(+), 13 deletions(-) delete mode 100644 contrib/systemd/auto-update/podman-auto-update.service create mode 100644 contrib/systemd/auto-update/podman-auto-update.service.in (limited to 'contrib/systemd/auto-update') diff --git a/contrib/systemd/auto-update/podman-auto-update.service b/contrib/systemd/auto-update/podman-auto-update.service deleted file mode 100644 index dc5fac8cf..000000000 --- a/contrib/systemd/auto-update/podman-auto-update.service +++ /dev/null @@ -1,13 +0,0 @@ -[Unit] -Description=Podman auto-update service -Documentation=man:podman-auto-update(1) -Wants=network-online.target -After=network-online.target - -[Service] -Type=oneshot -ExecStart=/usr/bin/podman auto-update -ExecStartPost=/usr/bin/podman image prune -f - -[Install] -WantedBy=multi-user.target default.target diff --git a/contrib/systemd/auto-update/podman-auto-update.service.in b/contrib/systemd/auto-update/podman-auto-update.service.in new file mode 100644 index 000000000..de4460d60 --- /dev/null +++ b/contrib/systemd/auto-update/podman-auto-update.service.in @@ -0,0 +1,13 @@ +[Unit] +Description=Podman auto-update service +Documentation=man:podman-auto-update(1) +Wants=network-online.target +After=network-online.target + +[Service] +Type=oneshot +ExecStart=@@PODMAN@@ auto-update +ExecStartPost=@@PODMAN@@ image prune -f + +[Install] +WantedBy=multi-user.target default.target -- cgit v1.2.3-54-g00ecf