acct-*/runner: rename to forgejo-runner

Hasn't hit master yet, so no pkgmove needed.

Drop systemd service file patch. Use sed to inject `PN` and `EPREFIX`.

Signed-off-by: Paul Zander <negril.nx+gentoo@gmail.com>
This commit is contained in:
Paul Zander
2026-03-27 15:14:35 +01:00
parent b6876d75bf
commit cb6a910c88
7 changed files with 26 additions and 27 deletions

View File

@@ -9,9 +9,9 @@ DESCRIPTION="Forgejo-Runner user account"
IUSE="docker podman lxc" IUSE="docker podman lxc"
ACCT_USER_HOME=/var/lib/runner ACCT_USER_HOME="/var/lib/${PN}"
ACCT_USER_ID=-1 ACCT_USER_ID=-1
ACCT_USER_GROUPS=( runner ) ACCT_USER_GROUPS=( "${PN}" )
acct-user_add_deps acct-user_add_deps

View File

@@ -1,15 +0,0 @@
diff --git a/contrib/forgejo-runner.service b/contrib/forgejo-runner.service
index 785d35df..0cbe146d 100644
--- a/contrib/forgejo-runner.service
+++ b/contrib/forgejo-runner.service
@@ -8,8 +8,8 @@ ExecStart=/usr/local/bin/forgejo-runner daemon
ExecReload=/bin/kill -s HUP $MAINPID
# This user and working directory must already exist
-User=runner
-WorkingDirectory=/home/runner
+User=runner
+WorkingDirectory=/var/lib/runner
Restart=on-failure
TimeoutSec=0
RestartSec=10

View File

@@ -31,13 +31,9 @@ DEPEND="
" "
RDEPEND=" RDEPEND="
acct-user/runner[docker=,podman=,lxc=] acct-user/${PN}[docker=,podman=,lxc=]
" "
PATCHES=(
"${FILESDIR}/${PN}-systemd-rundir.patch"
)
src_unpack() { src_unpack() {
if [[ "${PV}" == *9999* ]]; then if [[ "${PV}" == *9999* ]]; then
git-r3_src_unpack git-r3_src_unpack
@@ -47,6 +43,17 @@ src_unpack() {
fi fi
} }
src_prepare() {
default
sed \
-e "/ExecStart=/s#=.*#=${EPREFIX}/usr/bin/forgejo-runner daemon -c %h/runner-config.yml#g" \
-e "/ExecReload=/s#=#=${EPREFIX}#g" \
-e "/User=/s#=.*#=${PN}#g" \
-e '/WorkingDirectory=/s#=.*#/=~#g' \
-i contrib/forgejo-runner.service || die
}
src_compile() { src_compile() {
# export version information # export version information
# https://github.com/gentoo/guru/pull/205 # https://github.com/gentoo/guru/pull/205

View File

@@ -31,13 +31,9 @@ DEPEND="
" "
RDEPEND=" RDEPEND="
acct-user/runner[docker=,podman=,lxc=] acct-user/${PN}[docker=,podman=,lxc=]
" "
PATCHES=(
"${FILESDIR}/${PN}-systemd-rundir.patch"
)
src_unpack() { src_unpack() {
if [[ "${PV}" == *9999* ]]; then if [[ "${PV}" == *9999* ]]; then
git-r3_src_unpack git-r3_src_unpack
@@ -47,6 +43,17 @@ src_unpack() {
fi fi
} }
src_prepare() {
default
sed \
-e "/ExecStart=/s#=.*#=${EPREFIX}/usr/bin/forgejo-runner daemon -c %h/runner-config.yml#g" \
-e "/ExecReload=/s#=#=${EPREFIX}#g" \
-e "/User=/s#=.*#=${PN}#g" \
-e '/WorkingDirectory=/s#=.*#/=~#g' \
-i contrib/forgejo-runner.service || die
}
src_compile() { src_compile() {
# export version information # export version information
# https://github.com/gentoo/guru/pull/205 # https://github.com/gentoo/guru/pull/205