Bug 269065 - [new port] www/forgejo: Compact self-hosted Git service
Summary: [new port] www/forgejo: Compact self-hosted Git service
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-ports-bugs (Nobody)
URL: https://forgejo.org/
Keywords:
Depends on:
Blocks:
 
Reported: 2023-01-20 02:07 UTC by freebsd
Modified: 2024-02-26 15:48 UTC (History)
15 users (show)

See Also:


Attachments
www/forgejo (8.16 KB, application/mbox)
2023-01-20 02:07 UTC, freebsd
no flags Details
forgejo.diff (8.17 KB, patch)
2023-01-20 20:51 UTC, freebsd
no flags Details | Diff
v3 patch, fixes LOCALEs and minor tweaks (7.85 KB, patch)
2023-03-07 23:25 UTC, Dave Cottlehuber
no flags Details | Diff
Patch to add the new port www/forgejo (9.06 KB, patch)
2023-04-18 19:08 UTC, Jens Grassel
no flags Details | Diff
www/forgejo: New port: Self-hosted lightweight software forge, www/gitea fork (9.10 KB, patch)
2023-04-29 03:23 UTC, freebsd
no flags Details | Diff
Patch to create a new www/forgejo port. (9.07 KB, patch)
2024-01-16 13:08 UTC, Jens Grassel
no flags Details | Diff
Add forgejo port + update to latest 1.21.5 version (9.12 KB, patch)
2024-02-19 13:26 UTC, Vladimir Timofeev
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description freebsd 2023-01-20 02:07:30 UTC
Created attachment 239608 [details]
www/forgejo

This patch adds www/forgejo, a fork of www/gitea
Comment 1 Bradley D. Thornton 2023-01-20 13:25:59 UTC
This is surely needed, as we don't yet have this in order to migrate away from the predecessor. 

Waiting on this so migration to this drop in replacement can be completed.
Comment 2 Bradley D. Thornton 2023-01-20 13:32:18 UTC
This corresponds to the following issue at the projects forge, adding support for FreeBSD at the project level.

https://codeberg.org/forgejo/forgejo/issues/230
Comment 3 Sam Whited 2023-01-20 20:41:25 UTC
A group that I'm a member of is experimenting with moving from Gitea to Forgeio. We are currently building Forgeio by applying this patch to the ports tree, and it appears to be working.

The only thing we ran into is that the directories in the rc.d script are still "gitea", so we had to change that before it would start from eg. /var/db/gitea to /var/db/forgejo.

I'm not sure what forgejo does by default, it may still be using gitea directories, but we renamed everything in our config file and if I change the two directories listed in the rc.d script this starts working.
Comment 4 freebsd 2023-01-20 20:51:26 UTC
Created attachment 239617 [details]
forgejo.diff

That must have missed my scan through, updated it here
Comment 5 Dave Cottlehuber freebsd_committer freebsd_triage 2023-03-07 23:25:22 UTC
Created attachment 240654 [details]
v3 patch, fixes LOCALEs and minor tweaks

Making BINDATA option be part of DEFAULT_OPTIONS worked for me, is that appropriate to resolve this error on first run:

2023/03/07 23:03:31 ...rvices/cron/tasks.go:200:RegisterTaskFatal() [F] [6407c2c3-41] Unable to register cron task update_mirrors Error: translation is missing for task "update_mirrors", please add translation for "admin.dashboard.update_mirrors"

ok - poudriere 13.1-RELEASE amd64 ok, portlint/portclippy wanted minor tweaks

before we commit this:

- we can't ship a config file that has an existing JWT secret, internal token etc

- it needs a pkg-message describing how to do a fresh install
- and importantly, how to migrate from gitea -> forgejo
- having /usr/local/share as an app-writable space feels wrong,
  should we put this in e.g. /va/db/forgejo or some other dir?

I'm too new to feel comfortable doing these notes yet, can anybody help?
Comment 6 Jens Grassel 2023-04-18 19:08:29 UTC
Created attachment 241569 [details]
Patch to add the new port www/forgejo

Hi,

I gave it a try and updated to the latest forgejo release and added a small pkg-message. Also the hard coded secret values are removed from the sample config.

Please review and leave comments. It would be great to have this in ports/packages. :-)

Kind regards,

Jens
Comment 7 freebsd 2023-04-29 03:23:09 UTC
Created attachment 241844 [details]
www/forgejo: New port: Self-hosted lightweight software forge, www/gitea fork

Updated to v1.19.2-0 :)

What's left to get this merged? I think all concerns were addressed
Comment 8 freebsd 2023-04-29 03:44:48 UTC
ah

(In reply to Dave Cottlehuber from comment #5)

- and importantly, how to migrate from gitea -> forgejo

The directories are configurable, so for the purpose of migration, all required is to swap out the config paths - the fork is a soft fork, rebased and kept in sync by version, it's a drop-in replacement :)

- having /usr/local/share as an app-writable space feels wrong,
  should we put this in e.g. /va/db/forgejo or some other dir?

GITEA_WORK_DIR refers to the working directory, not a directory used to do work, so nothing variable is going in /share, not to worry. There also already is content going in /var/db/forgejo
Comment 9 Dave Cottlehuber freebsd_committer freebsd_triage 2023-07-18 11:10:50 UTC
not going to get this done before vacation, returning to pool.
Comment 10 mrmschf 2023-10-01 01:55:01 UTC
Is there anything still preventing this from getting merged? I'd like to migrate my gitea instance to forgejo as well.
Comment 11 gyptazy 2024-01-13 16:43:44 UTC
2024 says "Hello, it's me!".

What's the current state or preventing it from being merged? If there's something we can assist or boost it up to get merged, just let us know!

Cheers,
gyptazy
Comment 12 Joel Bodenmann freebsd_committer freebsd_triage 2024-01-14 03:41:39 UTC
I'd suggest that somebody updates the patch to match the latest upstream release and marking the previous patches as obsolete accordingly.
Comment 13 Jens Grassel 2024-01-16 13:08:35 UTC
Created attachment 247700 [details]
Patch to create a new www/forgejo port.

Here is a new patch with the latest version of forgejo. I couldn't obsolete all other patches though. :-|

Kind regards,

Jens
Comment 14 pk 2024-01-23 15:50:18 UTC
(In reply to Jens Grassel from comment #13) +1
Comment 15 Vladimir Timofeev 2024-02-19 13:26:24 UTC
Created attachment 248606 [details]
Add forgejo port + update to latest 1.21.5 version

Latest patch (100% thanks to the original authors, I'm only updated forgejo to latest version 1.21.5).
Also, I'm tested it. Migrated from gitea on my own server, all works as expected. Build log from poudriere with this patch: https://poudriere.vovkasm.org/data/13-2-amd64-dev/2024-02-18_02h19m14s/logs/forgejo-1.21.5.0.log