commit: 8ff0e309943dd3c195a0eea20688ae9fd2058711
Author: TerraTech <TerraTech <AT> users <DOT> noreply <DOT> github <DOT>
com>
AuthorDate: Fri Jan 29 20:40:45 2021 +0000
Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
CommitDate: Sat Jan 30 12:29:51 2021 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ff0e309
app-emulation/podman: Update podman to use new RESTful API service plus New
Features
podman varlink is deprecated in the v2 release
CHANGES:
1) Update Copyright date (Hello 2021)
2) s/varlink/system service/
3) Use the default unix socket path: unix:/run/podman/podman.sock
NEW FEATURES:
1) Config --log-level. Using 'debug' as the default level is a bit noisy.
2) Config listening socket.
3) Config user[:group] to run daemon as for rootless services.
The new Config options allow for symlinking off the primary service to
start multiple daemons for rootless API services.
e.g. ln -s podman podman-terra
Closes: https://bugs.gentoo.org/767895
Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
app-emulation/podman/files/podman.confd | 11 +++++++++++
app-emulation/podman/files/podman.initd | 11 +++++++----
app-emulation/podman/podman-2.2.1.ebuild | 1 +
3 files changed, 19 insertions(+), 4 deletions(-)
diff --git a/app-emulation/podman/files/podman.confd
b/app-emulation/podman/files/podman.confd
new file mode 100644
index 00000000000..e997d3b4000
--- /dev/null
+++ b/app-emulation/podman/files/podman.confd
@@ -0,0 +1,11 @@
+# Config file for /etc/init.d/podman
+
+# Sets the API service daemon log level
+# valid levels: debug, info, warn, error, fatal or panic
+#LOG_LEVEL="error"
+
+# Sets the API service daemon socket
+#SOCKET="unix:/run/${RC_SVCNAME}/podman.sock"
+
+# Configure the user[:group] the API service daemon will run as
+#RUN_AS_USER="root:root"
diff --git a/app-emulation/podman/files/podman.initd
b/app-emulation/podman/files/podman.initd
index b590be16a1b..7adcdab40ea 100644
--- a/app-emulation/podman/files/podman.initd
+++ b/app-emulation/podman/files/podman.initd
@@ -1,17 +1,20 @@
#!/sbin/openrc-run
-# Copyright 2015-2019 Gentoo Authors
+# Copyright 2015-2021 Gentoo Authors
# Distributed under the terms of the GNU General Public License v2
description="Podman Remote API Service"
LOG_PATH="/var/log/${RC_SVCNAME}"
RUN_PATH="/run/${RC_SVCNAME}"
+: ${LOG_LEVEL:=error}
+: ${RUN_AS_USER:=root:root}
+: ${SOCKET:=unix:/run/${RC_SVCNAME}/podman.sock}
pidfile="${RUN_PATH}/${RC_SVCNAME}.pid"
command="/usr/bin/podman"
-command_args="--log-level debug varlink -t 0 unix:/run/podman/io.podman"
+command_args="--log-level ${LOG_LEVEL} system service -t 0 ${SOCKET}"
command_background="true"
-start_stop_daemon_args="--stdout ${LOG_PATH}/${RC_SVCNAME}.log --stderr
${LOG_PATH}/${RC_SVCNAME}.log"
+start_stop_daemon_args="--stdout ${LOG_PATH}/${RC_SVCNAME}.log --stderr
${LOG_PATH}/${RC_SVCNAME}.log --user ${RUN_AS_USER}"
start() {
- checkpath -d "${RUN_PATH}" "${LOG_PATH}"
+ checkpath -o "${RUN_AS_USER}" -d "${RUN_PATH}" "${LOG_PATH}"
default_start
}
diff --git a/app-emulation/podman/podman-2.2.1.ebuild
b/app-emulation/podman/podman-2.2.1.ebuild
index bca75d6fddb..32c38f9a790 100644
--- a/app-emulation/podman/podman-2.2.1.ebuild
+++ b/app-emulation/podman/podman-2.2.1.ebuild
@@ -114,6 +114,7 @@ src_install() {
insinto /usr/share/containers
doins vendor/github.com/containers/common/pkg/seccomp/seccomp.json
+ newconfd "${FILESDIR}"/podman.confd podman
newinitd "${FILESDIR}"/podman.initd podman
insinto /etc/logrotate.d