Gentoo Archives: gentoo-commits

From: Zac Medico <zmedico@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: app-emulation/podman/files/, app-emulation/podman/
Date: Sat, 30 Jan 2021 12:32:05
Message-Id: 1612009791.8ff0e309943dd3c195a0eea20688ae9fd2058711.zmedico@gentoo
1 commit: 8ff0e309943dd3c195a0eea20688ae9fd2058711
2 Author: TerraTech <TerraTech <AT> users <DOT> noreply <DOT> github <DOT> com>
3 AuthorDate: Fri Jan 29 20:40:45 2021 +0000
4 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 30 12:29:51 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8ff0e309
7
8 app-emulation/podman: Update podman to use new RESTful API service plus New Features
9
10 podman varlink is deprecated in the v2 release
11
12 CHANGES:
13 1) Update Copyright date (Hello 2021)
14 2) s/varlink/system service/
15 3) Use the default unix socket path: unix:/run/podman/podman.sock
16
17 NEW FEATURES:
18 1) Config --log-level. Using 'debug' as the default level is a bit noisy.
19 2) Config listening socket.
20 3) Config user[:group] to run daemon as for rootless services.
21
22 The new Config options allow for symlinking off the primary service to
23 start multiple daemons for rootless API services.
24 e.g. ln -s podman podman-terra
25
26 Closes: https://bugs.gentoo.org/767895
27 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org>
28
29 app-emulation/podman/files/podman.confd | 11 +++++++++++
30 app-emulation/podman/files/podman.initd | 11 +++++++----
31 app-emulation/podman/podman-2.2.1.ebuild | 1 +
32 3 files changed, 19 insertions(+), 4 deletions(-)
33
34 diff --git a/app-emulation/podman/files/podman.confd b/app-emulation/podman/files/podman.confd
35 new file mode 100644
36 index 00000000000..e997d3b4000
37 --- /dev/null
38 +++ b/app-emulation/podman/files/podman.confd
39 @@ -0,0 +1,11 @@
40 +# Config file for /etc/init.d/podman
41 +
42 +# Sets the API service daemon log level
43 +# valid levels: debug, info, warn, error, fatal or panic
44 +#LOG_LEVEL="error"
45 +
46 +# Sets the API service daemon socket
47 +#SOCKET="unix:/run/${RC_SVCNAME}/podman.sock"
48 +
49 +# Configure the user[:group] the API service daemon will run as
50 +#RUN_AS_USER="root:root"
51
52 diff --git a/app-emulation/podman/files/podman.initd b/app-emulation/podman/files/podman.initd
53 index b590be16a1b..7adcdab40ea 100644
54 --- a/app-emulation/podman/files/podman.initd
55 +++ b/app-emulation/podman/files/podman.initd
56 @@ -1,17 +1,20 @@
57 #!/sbin/openrc-run
58 -# Copyright 2015-2019 Gentoo Authors
59 +# Copyright 2015-2021 Gentoo Authors
60 # Distributed under the terms of the GNU General Public License v2
61
62 description="Podman Remote API Service"
63 LOG_PATH="/var/log/${RC_SVCNAME}"
64 RUN_PATH="/run/${RC_SVCNAME}"
65 +: ${LOG_LEVEL:=error}
66 +: ${RUN_AS_USER:=root:root}
67 +: ${SOCKET:=unix:/run/${RC_SVCNAME}/podman.sock}
68 pidfile="${RUN_PATH}/${RC_SVCNAME}.pid"
69 command="/usr/bin/podman"
70 -command_args="--log-level debug varlink -t 0 unix:/run/podman/io.podman"
71 +command_args="--log-level ${LOG_LEVEL} system service -t 0 ${SOCKET}"
72 command_background="true"
73 -start_stop_daemon_args="--stdout ${LOG_PATH}/${RC_SVCNAME}.log --stderr ${LOG_PATH}/${RC_SVCNAME}.log"
74 +start_stop_daemon_args="--stdout ${LOG_PATH}/${RC_SVCNAME}.log --stderr ${LOG_PATH}/${RC_SVCNAME}.log --user ${RUN_AS_USER}"
75
76 start() {
77 - checkpath -d "${RUN_PATH}" "${LOG_PATH}"
78 + checkpath -o "${RUN_AS_USER}" -d "${RUN_PATH}" "${LOG_PATH}"
79 default_start
80 }
81
82 diff --git a/app-emulation/podman/podman-2.2.1.ebuild b/app-emulation/podman/podman-2.2.1.ebuild
83 index bca75d6fddb..32c38f9a790 100644
84 --- a/app-emulation/podman/podman-2.2.1.ebuild
85 +++ b/app-emulation/podman/podman-2.2.1.ebuild
86 @@ -114,6 +114,7 @@ src_install() {
87 insinto /usr/share/containers
88 doins vendor/github.com/containers/common/pkg/seccomp/seccomp.json
89
90 + newconfd "${FILESDIR}"/podman.confd podman
91 newinitd "${FILESDIR}"/podman.initd podman
92
93 insinto /etc/logrotate.d