You are not logged in.

#1 2026-09-27 15:14:47

Beemo
Member
Registered: 2024-12-20
Posts: 201

[Solved] forgejo package: why not minimal app.ini?

I'm new to using the forgejo package, so I don't know if there is a good reason how things are done. Just asking if someone has some opinions on it...
https://codeberg.org/forgejo/forgejo/sr … xample.ini

; This file lists the default values used by Forgejo
;; Copy required sections to your own app.ini (default is custom/conf/app.ini)
;; and modify as needed.
;; Do not copy the whole file as-is, as it contains some invalid sections for illustrative purposes.
;; If you don't know what a setting is you should not set it.

https://gitlab.archlinux.org/archlinux/ … =heads#L84
https://gitlab.archlinux.org/archlinux/ … bles.patch

backup=(etc/forgejo/app.ini)
patch -p1 -i "$srcdir/use-correct-variables.patch"
install -vDm660 custom/conf/app.example.ini "$pkgdir/etc/$pkgname/app.ini"

The documentation advises against copying the file as-is but that's what the package does. There is a patch that fixes some of the invalid options (and changes others). (And some are left unchanged, not sure if they are default values.)
However, wouldn't it be better to just ship the original app.example.ini as is, and put the modified options in a minimal app.ini?

Also, when using systemd, shouldn't the logger be kept as console, so that you can see it in journalctl? (Though forgejo does have log rotation so it's ok)

 ;; Main Logger
 ;;
 ;; Either "console", "file" or "conn", default is "console"
 ;; Use comma to separate multiple modes, e.g. "console, file"
-MODE = console
+MODE = file

p.s. What's the place to discuss Arch packages? It seems there isn't a category for it...

Last edited by Beemo (2026-10-04 17:29:30)

Offline

#2 2026-09-27 15:51:56

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,249

Re: [Solved] forgejo package: why not minimal app.ini?

What's the place to discuss Arch packages? It seems there isn't a category for it...

https://gitlab.archlinux.org/archlinux/ … ge_size=20

The example config is actually just

APP_NAME = ; Forgejo: Beyond coding. We Forge.
RUN_USER = ; git

[database]
DB_TYPE = sqlite3

[security]
INSTALL_LOCK = false
SECRET_KEY =
INTERNAL_TOKEN =

[oauth2]
ENABLED = true

[log]
MODE = console
LEVEL = Info

and otherwise documents itself.

The documentation advises against copying the file as-is but that's what the package does. There is a patch that fixes some of the invalid options (and changes others).

So the package copies the config as is except it doesn't?
tongue

As for the logging preferences, you'd have to ask the author of the patch but are of course free to alter it locally  (at which point the in-place documentation might come handy)

I assume you object to the line count the comments result in w/ the actual config kinda buried inside?
Does your editor not provide syntax highlighting?

(/me wonders whether me should add a special filter action to hide all commented lines to sqriptor™…)

Offline

#3 2026-09-27 18:56:23

Beemo
Member
Registered: 2024-12-20
Posts: 201

Re: [Solved] forgejo package: why not minimal app.ini?

So turns out when you first visit the site it will show a "install forgejo" settings page, which will add all the settings to app.ini afterwards anyway... (Not sure if it deletes the comments, probably not)
EDIT: Not all the settings just a lot, some like secret keys make sense, but others seem to be just default values.

So the package copies the config as is except it doesn't?
tongue

Ok I should have said "Copy required sections to your own app.ini" but it's too long...

I assume you object to the line count the comments result in w/ the actual config kinda buried inside?
Does your editor not provide syntax highlighting?

Yea, I don't like clutter even tho I have highlighting. (I like to be able to see my changes at a glance.)

Last edited by Beemo (2026-09-27 19:05:32)

Offline

#4 2026-09-27 19:10:36

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,249

Re: [Solved] forgejo package: why not minimal app.ini?

I like to be able to see my changes at a glance

It's one of the reason why I added the filtering -  it allows you to filter away "^;" but you need to enter that and tick regular expression and invert.
There're actually many configs that are written that way - I can probably be easily convinced to add a convenient shortcut to just hide comments smile

Offline

#5 2026-09-27 21:41:14

seth
Member
From: Won't reply 2 private help req
Registered: 2012-09-03
Posts: 78,249

Offline

#6 2026-09-27 21:47:07

Beemo
Member
Registered: 2024-12-20
Posts: 201

Re: [Solved] forgejo package: why not minimal app.ini?

Noice

Offline

Board footer

Powered by FluxBB