Skip to content

Commit

Permalink
app-emulation/podman: Update podman to use new RESTful API service pl…
Browse files Browse the repository at this point in the history
…us 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 <[email protected]>
  • Loading branch information
TerraTech authored and zmedico committed Jan 30, 2021
1 parent bb37a1d commit 8ff0e30
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
11 changes: 11 additions & 0 deletions app-emulation/podman/files/podman.confd
Original file line number Diff line number Diff line change
@@ -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"
11 changes: 7 additions & 4 deletions app-emulation/podman/files/podman.initd
Original file line number Diff line number Diff line change
@@ -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
}
1 change: 1 addition & 0 deletions app-emulation/podman/podman-2.2.1.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 8ff0e30

Please sign in to comment.