commit: a7c209f2ff5131dee2c788ef52132d7c4e147cd0 Author: Emanuel Valasiadis <emanuel <AT> valasiadis <DOT> space> AuthorDate: Sat Apr 19 19:56:02 2025 +0000 Commit: Zac Medico <zmedico <AT> gentoo <DOT> org> CommitDate: Sun Apr 20 17:29:09 2025 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a7c209f2
app-containers/podman: add OpenRC user service for podman Signed-off-by: Emanuel Valasiadis <emanuel <AT> valasiadis.space> From: https://github.com/gentoo/gentoo/pull/41672 Signed-off-by: Zac Medico <zmedico <AT> gentoo.org> .../podman/files/podman-5.0.0_rc4.user.initd | 23 ++++++++++++++++++++++ app-containers/podman/podman-5.4.2.ebuild | 3 +++ app-containers/podman/podman-9999.ebuild | 3 +++ 3 files changed, 29 insertions(+) diff --git a/app-containers/podman/files/podman-5.0.0_rc4.user.initd b/app-containers/podman/files/podman-5.0.0_rc4.user.initd new file mode 100644 index 000000000000..5b47d68c7fd3 --- /dev/null +++ b/app-containers/podman/files/podman-5.0.0_rc4.user.initd @@ -0,0 +1,23 @@ +#!/sbin/openrc-run +# Copyright 2015-2024 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +supervisor=supervise-daemon +description="Podman API Service" + +RUN_PATH="${XDG_RUNTIME_DIR}/podman" +LOG_PATH="${RUN_PATH}/log" +output_log="${LOG_PATH}/${RC_SVCNAME}.log" +error_log="${LOG_PATH}/${RC_SVCNAME}.log" +pidfile="${RUN_PATH}/${RC_SVCNAME}.pid" +socket="unix://${RUN_PATH}/${RC_SVCNAME}.sock" + +# command_user="${RUN_AS_USER:=root:root}" +command="/usr/bin/podman" +command_args="--log-level ${LOG_LEVEL:-error} system service --time 0 ${socket}" +command_background="true" + +start() { + checkpath -o $USER -d "${RUN_PATH}" "${LOG_PATH}" + default_start +} diff --git a/app-containers/podman/podman-5.4.2.ebuild b/app-containers/podman/podman-5.4.2.ebuild index 1a2de83c6b4a..04adb613e4fe 100644 --- a/app-containers/podman/podman-5.4.2.ebuild +++ b/app-containers/podman/podman-5.4.2.ebuild @@ -123,6 +123,9 @@ src_install() { insinto /etc/logrotate.d newins "${FILESDIR}/podman.logrotated" podman + + exeinto /etc/user/init.d + newexe "${FILESDIR}/podman-5.0.0_rc4.user.initd" fi keepdir /var/lib/containers diff --git a/app-containers/podman/podman-9999.ebuild b/app-containers/podman/podman-9999.ebuild index 1a2de83c6b4a..04adb613e4fe 100644 --- a/app-containers/podman/podman-9999.ebuild +++ b/app-containers/podman/podman-9999.ebuild @@ -123,6 +123,9 @@ src_install() { insinto /etc/logrotate.d newins "${FILESDIR}/podman.logrotated" podman + + exeinto /etc/user/init.d + newexe "${FILESDIR}/podman-5.0.0_rc4.user.initd" fi keepdir /var/lib/containers