Bug 282771 - www/forgejo: Switch to using `FORGEJO_` prefixed environment variables
Summary: www/forgejo: Switch to using `FORGEJO_` prefixed environment variables
Status: Closed FIXED
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Some People
Assignee: Vladimir Druzenko
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2024-11-15 08:22 UTC by Rudolph
Modified: 2024-11-21 16:28 UTC (History)
2 users (show)

See Also:
stb: maintainer-feedback+


Attachments
Patch RC file (560 bytes, patch)
2024-11-15 08:22 UTC, Rudolph
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
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.