Created attachment 266156 [details] Update to 12.1.2 and fix missing dirs and rc script There are several issues with this port at the moment: - It is 15 releases behind upstream, including some security fixes - DATADIR (/var/db/act_runner) is not created with the correct ownership - The log dir (/var/log/act_runner) is not created at all, which prevents the service from starting - The pid cannot be created in /var/run/act_runner.pid because the daemon is started with an unprivileged user - The service cannot start using daemon(1) because it cannot set the environment I fixed all of the above in the provided patch. NOTE: I don't understand why the fix for the last point was removing -u from the daemon(1) invocation. I assume there is some conflict between the rc system and daemon(1), but I'm not sure, so please educate me. I contacted Daniel, the maintainer, but did not get a reply, so I'm sharing a patch here. It's the first time I'm opening a bug report and sharing a patch for a port, so please correct me if I failed in some part of the procedure (I did read the handbook, formatted the Makefile, linted, tested locally, etc).
Remove "PORTREVISION= 1".
Comment on attachment 266156 [details] Update to 12.1.2 and fix missing dirs and rc script >diff --color=auto -ruN /home/santi/freebsd-ports/devel/forgejo-runner/Makefile forgejo-runner/Makefile >--- /home/santi/freebsd-ports/devel/forgejo-runner/Makefile 2025-12-11 21:44:34.200587000 +0100 >+++ forgejo-runner/Makefile 2025-12-11 23:27:13.663398000 +0100 >@@ -1,7 +1,7 @@ > PORTNAME= act_runner > DISTVERSIONPREFIX= v >-DISTVERSION= 9.1.0 >-PORTREVISION= 6 >+DISTVERSION= 12.1.2 > CATEGORIES= devel > PKGNAMEPREFIX= forgejo- > >@@ -12,33 +12,50 @@ > COMMENT= Act runner is a runner for Forgejo based on the Gitea Act runner > WWW= https://code.forgejo.org/forgejo/runner > >-LICENSE= MIT APACHE20 >+LICENSE= APACHE20 MIT > LICENSE_COMB= multi > LICENSE_FILE_APACHE20= ${WRKSRC}/act/container/DOCKER_LICENSE > LICENSE_FILE_MIT= ${WRKSRC}/LICENSE > >-USES= go:modules >+USES= go:modules > USE_RC_SUBR= ${PORTNAME} > >-GO_MODULE= code.forgejo.org/forgejo/runner/v9 >+GO_MODULE= code.forgejo.org/forgejo/runner/v12 > GO_BUILDFLAGS= -ldflags "${LD_FLAG_STRING}" > >-LD_FLAG_STRING= -s ${LD_FLAG_X_PREFIX}.version=${DISTVERSION} >+LD_FLAG_STRING= -s ${LD_FLAG_X_PREFIX}.version=${DISTVERSION} > LD_FLAG_X_PREFIX= -X ${GO_MODULE}/internal/pkg/ver > > DATADIR= /var/db/${PORTNAME} >+SUB_LIST= ACT_RUNNER_USER=${ACT_RUNNER_USER} \ >+ LOGDIR=${LOGDIR} \ >+ PIDDIR=${PIDDIR} > > ACT_RUNNER_USER?= ${PORTNAME} > ACT_RUNNER_GROUP?= ${PORTNAME} > .if ${ACT_RUNNER_USER} == ${PORTNAME} >-USERS= ${ACT_RUNNER_USER} >+USERS= ${ACT_RUNNER_USER} > .endif > .if ${ACT_RUNNER_GROUP} == ${PORTNAME} >-GROUPS= ${ACT_RUNNER_GROUP} >+GROUPS= ${ACT_RUNNER_GROUP} > .endif > >+LOGDIR= /var/log/${PORTNAME} >+PIDDIR= /var/run/${PORTNAME} >+ >+PLIST_SUB= ACT_RUNNER_GROUP=${ACT_RUNNER_GROUP} \ >+ ACT_RUNNER_USER=${ACT_RUNNER_USER} \ >+ DATADIR=${DATADIR} \ >+ LOGDIR=${LOGDIR} \ >+ PIDDIR=${PIDDIR} >+ > post-install: >- ${MKDIR} ${STAGEDIR}${DATADIR} ${STAGEDIR}${ETCDIR} >+ ${MKDIR} \ >+ ${STAGEDIR}${ETCDIR} \ >+ ${STAGEDIR}${DATADIR} \ >+ ${STAGEDIR}${LOGDIR} \ >+ ${STAGEDIR}${PIDDIR} >+ > ${INSTALL_DATA} ${BUILD_WRKSRC}/internal/pkg/config/config.example.yaml \ > ${STAGEDIR}${ETCDIR}/act_runner.conf.sample > >diff --color=auto -ruN /home/santi/freebsd-ports/devel/forgejo-runner/distinfo forgejo-runner/distinfo >--- /home/santi/freebsd-ports/devel/forgejo-runner/distinfo 2025-12-11 21:44:34.200692000 +0100 >+++ forgejo-runner/distinfo 2025-12-11 21:44:28.285657000 +0100 >@@ -1,7 +1,7 @@ >-TIMESTAMP = 1755498518 >-SHA256 (go/devel_forgejo-runner/act_runner-v9.1.0/v9.1.0.mod) = 18d6c2c0fe0ff15434a5a60eb0a26d3c17ad1103d9e93f4c1272d551fcb756a7 >-SIZE (go/devel_forgejo-runner/act_runner-v9.1.0/v9.1.0.mod) = 4728 >-SHA256 (go/devel_forgejo-runner/act_runner-v9.1.0/v9.1.0.zip) = c7b6012a46048aeddb49e0429a20fdc72905974667516fcf0884af8007c4ac02 >-SIZE (go/devel_forgejo-runner/act_runner-v9.1.0/v9.1.0.zip) = 3878583 >-SHA256 (go/devel_forgejo-runner/act_runner-v9.1.0/34731a41be456d5b6328d8c118ba8e0b6c6a226b.diff) = fe7da83cfa0170b819ced458bafec9dd4b8353b275256409e269153d65b3fe8a >-SIZE (go/devel_forgejo-runner/act_runner-v9.1.0/34731a41be456d5b6328d8c118ba8e0b6c6a226b.diff) = 3891 >+TIMESTAMP = 1765480217 >+SHA256 (go/devel_forgejo-runner/act_runner-v12.1.2/v12.1.2.mod) = 57ca4519dcacf63f03daec6352731fcac4d7f191cc2d52ac2dce4347412a8537 >+SIZE (go/devel_forgejo-runner/act_runner-v12.1.2/v12.1.2.mod) = 4812 >+SHA256 (go/devel_forgejo-runner/act_runner-v12.1.2/v12.1.2.zip) = 026fe110955283e27258e82da698882705337a6a4f243eef32ff88e7bcba4347 >+SIZE (go/devel_forgejo-runner/act_runner-v12.1.2/v12.1.2.zip) = 3968489 >+SHA256 (go/devel_forgejo-runner/act_runner-v12.1.2/34731a41be456d5b6328d8c118ba8e0b6c6a226b.diff) = fe7da83cfa0170b819ced458bafec9dd4b8353b275256409e269153d65b3fe8a >+SIZE (go/devel_forgejo-runner/act_runner-v12.1.2/34731a41be456d5b6328d8c118ba8e0b6c6a226b.diff) = 3891 >diff --color=auto -ruN /home/santi/freebsd-ports/devel/forgejo-runner/files/act_runner.in forgejo-runner/files/act_runner.in >--- /home/santi/freebsd-ports/devel/forgejo-runner/files/act_runner.in 2025-12-11 21:44:34.200815000 +0100 >+++ forgejo-runner/files/act_runner.in 2025-12-11 21:44:28.888207000 +0100 >@@ -16,19 +16,18 @@ > > load_rc_config "${name}" > >-: ${act_runner_user:="act_runner"} >+: ${act_runner_user:="%%ACT_RUNNER_USER%%"} > : ${act_runner_enable:="NO"} > : ${act_runner_facility:="daemon"} > : ${act_runner_priority:="debug"} > : ${act_runner_config:="%%ETCDIR%%/act_runner.conf"} >-: ${act_runner_cache_dir:="%%DATADIR%%"} >-: ${act_runner_log_dir:="/var/log/act_runner"} >-: ${act_runner_log_file:="${act_runner_log_dir}/act_runner.log"} >+: ${act_runner_log_dir:="%%LOGDIR%%"} >+: ${act_runner_log_file:="${act_runner_log_dir}/${name}.log"} > : ${act_runner_args:="-c ${act_runner_config} daemon"} > > command="/usr/sbin/daemon" > >-pidfile="/var/run/${name}.pid" >+pidfile="%%PIDDIR%%/${name}.pid" > exec_path="%%PREFIX%%/bin/act_runner" > > required_files=${act_runner_config} >@@ -48,7 +47,7 @@ > > command_args=" -r -S -l ${act_runner_facility} -s ${act_runner_priority} \ > -T ${name} \ >- -u ${act_runner_user} -P ${pidfile} \ >+ -P ${pidfile} \ > -o ${act_runner_log_file} \ > ${exec_path} ${act_runner_args}" > >diff --color=auto -ruN /home/santi/freebsd-ports/devel/forgejo-runner/pkg-plist forgejo-runner/pkg-plist >--- /home/santi/freebsd-ports/devel/forgejo-runner/pkg-plist 2025-12-11 21:44:34.200886000 +0100 >+++ forgejo-runner/pkg-plist 2025-12-11 21:44:28.888133000 +0100 >@@ -1,3 +1,7 @@ > bin/act_runner > @sample %%ETCDIR%%/act_runner.conf.sample >-@dir(%%ACT_RUNNER_USER%%,%%ACT_RUNNER_GROUP%%,750) %%DATADIR%% >+@owner %%ACT_RUNNER_USER%% >+@group %%ACT_RUNNER_GROUP%% >+@dir %%DATADIR%% >+@dir %%LOGDIR%% >+@dir %%PIDDIR%%
Created attachment 266163 [details] Upgrades the port to version 12.1.2, adds missing dirs and solves issues with daemon(1) preventing startup Removed PORTREVISION and simplified the paths.
Waiting 2 weeks maintainer timeout…
Comment on attachment 266163 [details] Upgrades the port to version 12.1.2, adds missing dirs and solves issues with daemon(1) preventing startup New 12.2.0 was released.
Created attachment 266307 [details] Upgrades the port to version 12.2.0, adds missing dirs and solves issues with daemon(1) preventing startup Upgrades to 12.2.0 and launches daemon(1) as root and uses -u to run act_runner as %%ACT_RUNNER_USER%% to avoid issues with setting $HOME which prevent act_runner from creating the .cache directory.
I had to comment out the following line from /usr/local/etc/rc.d/act_runner: : ${act_runner_user:="act_runner"} as it was failing with the following error until I did: daemon: failed to set user environment While we're cleaning things up, can we please rename this whole thing to be "forgejo-runner" and dump all references to "act_runner"? It's a distinct runner and having "act_runner" vs "act-runner" in /var/db, among other such collisions with the Gitea act runner, is just a PITA. It's also nice to have consistent naming among the components of a Forgejo system.
We have 2 ways: 1. Waitnig maintaiener… 2. Create and test patches, attach patches here, wait 2 weeks "maintainer timeout" and commit. I don't use this port, so I can only help with the commit.
(In reply to Paul Armstrong from comment #7) The act_runner_user var is removed in the latest patch from 2025-12-17. My comment above (https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=291630#c6) has the rationale. I agree with renaming the port forgejo-runner, because that's what it is and how the upstream project calls itself. It will probably break other folks' setups, so maybe it should be a new port and this one is deprecated? I would happily create that new port and maintain it because I'm using this in my company (that I own) so I depend on it. A new version just came out today (12.3.0). (In reply to Vladimir Druzenko from comment #8) I'll gladly update my patch to the latest version and wait for the maintainer. @Paul: may I suggest waiting for the maintainer and, in the event of no response, discuss renaming/creating a new port?
(In reply to Vladimir Druzenko from comment #8) Vladimir it's been 3 weeks since the timeout. Should we proceed with the patch or would it be better to create a new port to "fix" the naming conventions?
(In reply to João Santiago from comment #10) 12.4.0 is here: https://code.forgejo.org/forgejo/runner/releases/tag/v12.4.0 1. Lets update to 12.4.0. 2. Create separate PRs with patches with rename port (require 2 weeks maintainer timeout) and request maintainership (AFAIR, require 3 months maintainer timeout).
2. Rename port require record in UPDATING about migrating.
Created attachment 266831 [details] v1: Update to 12.4.0 Changelogs: https://code.forgejo.org/forgejo/runner/releases/tag/v9.1.1 https://code.forgejo.org/forgejo/runner/releases/tag/v10.0.0 https://code.forgejo.org/forgejo/runner/releases/tag/v10.0.1 https://code.forgejo.org/forgejo/runner/releases/tag/v11.0.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.1.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.1.1 https://code.forgejo.org/forgejo/runner/releases/tag/v11.1.2 https://code.forgejo.org/forgejo/runner/releases/tag/v11.2.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.3.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.3.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.0.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.0.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.1.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.1.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.1.2 https://code.forgejo.org/forgejo/runner/releases/tag/v12.2.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.3.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.3.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.4.0
Created attachment 266832 [details] v1: Update to 12.4.0 "go:1.25+" instead of "go:1.25".
Created attachment 266833 [details] v2: Update to 12.4.0 Remove upstreamed patch.
Created attachment 266992 [details] v3: Update to 12.5.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.5.0 Maintainer timeout 4 weeks.
A commit in branch main references this bug: URL: https://cgit.FreeBSD.org/ports/commit/?id=48dac81824c735728f64f094c5fad14083b37e93 commit 48dac81824c735728f64f094c5fad14083b37e93 Author: Vladimir Druzenko <vvd@FreeBSD.org> AuthorDate: 2026-01-10 10:59:35 +0000 Commit: Vladimir Druzenko <vvd@FreeBSD.org> CommitDate: 2026-01-10 11:04:54 +0000 devel/forgejo-runner: Update 9.1.0 => 12.5.0 Changelogs: https://code.forgejo.org/forgejo/runner/releases/tag/v9.1.1 https://code.forgejo.org/forgejo/runner/releases/tag/v10.0.0 https://code.forgejo.org/forgejo/runner/releases/tag/v10.0.1 https://code.forgejo.org/forgejo/runner/releases/tag/v11.0.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.1.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.1.1 https://code.forgejo.org/forgejo/runner/releases/tag/v11.1.2 https://code.forgejo.org/forgejo/runner/releases/tag/v11.2.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.3.0 https://code.forgejo.org/forgejo/runner/releases/tag/v11.3.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.0.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.0.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.1.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.1.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.1.2 https://code.forgejo.org/forgejo/runner/releases/tag/v12.2.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.3.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.3.1 https://code.forgejo.org/forgejo/runner/releases/tag/v12.4.0 https://code.forgejo.org/forgejo/runner/releases/tag/v12.5.0 Fix rc.d script: - DATADIR (/var/db/act_runner) is not created with the correct ownership - The log dir (/var/log/act_runner) is not created at all, which prevents the service from starting. - The pid cannot be created in /var/run/act_runner.pid because the daemon is started with an unprivileged user. - The service cannot start using daemon(1) because it cannot set the environment. PR: 291630 Approved by: Daniel Morante <daniel@morante.net> (maintainer, timeout 4 weeks) Co-authored-by: João Santiago <me@jcpsantiago.xyz> devel/forgejo-runner/Makefile | 33 ++++++++++++++++++++------------ devel/forgejo-runner/distinfo | 12 +++++------- devel/forgejo-runner/files/act_runner.in | 13 ++++++------- devel/forgejo-runner/pkg-plist | 6 +++++- 4 files changed, 37 insertions(+), 27 deletions(-)
Thanks.