Skip to content

make podman-clean-transient.service work as user #24421

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

Merged
merged 1 commit into from
Nov 1, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -1000,6 +1000,13 @@ install.systemd: $(PODMAN_GENERATED_UNIT_FILES)
install ${SELINUXOPT} -m 644 $$unit $(DESTDIR)${USERSYSTEMDDIR}/$$(basename $$unit); \
install ${SELINUXOPT} -m 644 $$unit $(DESTDIR)${SYSTEMDDIR}/$$(basename $$unit); \
done
# HACK; as rootless this unit will not work due the requires on a non existing target
# as the user session does not see system units. We could define two different units
# but this seems much more complicated then this small fixup here.
# https://github.com/containers/podman/issues/23790
sed -i '/Requires=/d' $(DESTDIR)${USERSYSTEMDDIR}/podman-clean-transient.service
sed -i '/After=/d' $(DESTDIR)${USERSYSTEMDDIR}/podman-clean-transient.service

# Important this unit should only be installed for the user session and is thus not added to the loop above.
install ${SELINUXOPT} -m 644 contrib/systemd/user/podman-user-wait-network-online.service \
$(DESTDIR)${USERSYSTEMDDIR}/podman-user-wait-network-online.service
Expand Down