Bug 282771

Summary: www/forgejo: Switch to using `FORGEJO_` prefixed environment variables
Product: Ports & Packages Reporter: Rudolph <rudolphfroger>
Component: Individual Port(s)Assignee: Vladimir Druzenko <vvd>
Status: Closed FIXED    
Severity: Affects Some People CC: stb, vvd
Priority: --- Flags: stb: maintainer-feedback+
Version: Latest   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
Patch RC file none

Description Rudolph 2024-11-15 08:22:52 UTC
Created attachment 255188 [details]
Patch RC file

Currently the environment variables specified in the Forgejo RC file are still `GITEA_` prefixed but I think we can switch to `FORGEJO_` prefixed ones. See attached patch.

See Forgejo documentation here:
https://forgejo.org/docs/latest/admin/config-cheat-sheet/
Comment 1 Vladimir Druzenko freebsd_committer freebsd_triage 2024-11-20 21:02:20 UTC
Are the old names still work?
Comment 2 Rudolph 2024-11-21 07:29:50 UTC
It looks like both the old and new environment variables are considered. You can see the relevant code here: https://codeberg.org/forgejo/forgejo/src/commit/7015bdfa480e717299377b4547320ae6d70e9da2/modules/setting/path.go#L123. From what I gather, the `FORGEJO_` prefixed variables take precedence.

However, the current Forgejo documentation only mentions the new environment variables.
Comment 3 commit-hook freebsd_committer freebsd_triage 2024-11-21 16:22:45 UTC
A commit in branch main references this bug:

URL: https://cgit.FreeBSD.org/ports/commit/?id=2aa09e577ed8f1a0c1e79abd1836779cb8ca9411

commit 2aa09e577ed8f1a0c1e79abd1836779cb8ca9411
Author:     Rudolph <rudolphfroger@dreamsolution.nl>
AuthorDate: 2024-11-21 15:49:59 +0000
Commit:     Vladimir Druzenko <vvd@FreeBSD.org>
CommitDate: 2024-11-21 16:17:04 +0000

    www/forgejo: Switch to using "FORGEJO_" prefixed environment variables

    Switch the environment variables specified in the Forgejo RC file from
    "GITEA_" to "FORGEJO_".
    The old variables are still work, but new are preffered:
    https://codeberg.org/forgejo/forgejo/src/commit/7015bdfa480e717299377b4547320ae6d70e9da2/modules/setting/path.go#L123
    Also, the Forgejo documentation uses new names:
    https://forgejo.org/docs/latest/admin/config-cheat-sheet/

    PR:             282771
    Approved by:    Stefan Bethke <stb@lassitu.de> (maintainer)

 www/forgejo/files/forgejo.in | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Comment 4 Vladimir Druzenko freebsd_committer freebsd_triage 2024-11-21 16:28:57 UTC
Thanks.