mirror of
https://github.com/containers/podman.git
synced 2025-06-21 01:19:15 +08:00
Merge pull request #8241 from rhatdan/tmpfile
Use /tmp/podman-run-* for backup XDG_RUNTIME_DIR
This commit is contained in:
5
Makefile
5
Makefile
@ -493,6 +493,8 @@ install.bin-nobuild:
|
||||
install ${SELINUXOPT} -d -m 755 $(DESTDIR)$(BINDIR)
|
||||
install ${SELINUXOPT} -m 755 bin/podman $(DESTDIR)$(BINDIR)/podman
|
||||
test -z "${SELINUXOPT}" || chcon --verbose --reference=$(DESTDIR)$(BINDIR)/podman bin/podman
|
||||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${TMPFILESDIR}
|
||||
install ${SELINUXOPT} -m 644 contrib/tmpfile/podman.conf ${DESTDIR}${TMPFILESDIR}/podman.conf
|
||||
|
||||
.PHONY: install.bin
|
||||
install.bin: podman install.bin-nobuild
|
||||
@ -531,14 +533,13 @@ install.docker: docker-docs
|
||||
.PHONY: install.varlink
|
||||
ifneq (,$(findstring varlink,$(BUILDTAGS)))
|
||||
install.varlink:
|
||||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR} ${DESTDIR}${TMPFILESDIR}
|
||||
install ${SELINUXOPT} -m 755 -d ${DESTDIR}${SYSTEMDDIR} ${DESTDIR}${USERSYSTEMDDIR}
|
||||
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${SYSTEMDDIR}/io.podman.socket
|
||||
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.socket ${DESTDIR}${USERSYSTEMDDIR}/io.podman.socket
|
||||
install ${SELINUXOPT} -m 644 contrib/varlink/io.podman.service ${DESTDIR}${SYSTEMDDIR}/io.podman.service
|
||||
# User units are ordered differently, we can't make the *system* multi-user.target depend on a user unit.
|
||||
# For user units the default.target that's the default is fine.
|
||||
sed -e 's,^WantedBy=.*,WantedBy=default.target,' < contrib/varlink/io.podman.service > ${DESTDIR}${USERSYSTEMDDIR}/io.podman.service
|
||||
install ${SELINUXOPT} -m 644 contrib/varlink/podman.conf ${DESTDIR}${TMPFILESDIR}/podman.conf
|
||||
else
|
||||
install.varlink:
|
||||
endif
|
||||
|
@ -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
|
||||
|
4
contrib/tmpfile/podman.conf
Normal file
4
contrib/tmpfile/podman.conf
Normal file
@ -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
|
@ -1 +0,0 @@
|
||||
d /run/podman 0700 root root
|
@ -38,7 +38,7 @@ func GetRuntimeDir() (string, error) {
|
||||
}
|
||||
}
|
||||
if runtimeDir == "" {
|
||||
tmpDir := filepath.Join(os.TempDir(), fmt.Sprintf("run-%s", uid))
|
||||
tmpDir := filepath.Join(os.TempDir(), fmt.Sprintf("podman-run-%s", uid))
|
||||
if err := os.MkdirAll(tmpDir, 0700); err != nil {
|
||||
logrus.Debug(err)
|
||||
}
|
||||
|
Reference in New Issue
Block a user