Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 689748 - www-apps/gitea - systemd should use --config /var/lib/gitea/custom/conf/app.ini and not --config /etc/gitea/app.ini
Summary: www-apps/gitea - systemd should use --config /var/lib/gitea/custom/conf/app.i...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal
Assignee: Felix Neumärker
URL:
Whiteboard:
Keywords: PullRequest
Depends on:
Blocks:
 
Reported: 2019-07-13 02:20 UTC by Nathan Dehnel
Modified: 2019-12-12 17:53 UTC (History)
4 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Nathan Dehnel 2019-07-13 02:20:24 UTC
In the systemd service, gitea is started with "/usr/bin/gitea web --config /etc/gitea/app.ini". This prevents users from changing gitea settings without editing the service file to "/usr/bin/gitea web --config /var/lib/gitea/custom/conf/app.ini", as the intended way to change gitea settings is to edit custom/conf/app.ini
Comment 1 Pierre-Olivier Mercier 2019-07-13 13:40:26 UTC
Hi Nathan,

Since 1.7.6, the default configuration location has been changed to /etc/gitea/app.ini, in order to follow upstream guidelines:

From https://docs.gitea.io/en-us/config-cheat-sheet/:
> When installing from a distribution, this will typically be found at /etc/gitea/conf/app.ini.

A warning is still shown during the update, to announce this change:
https://gitweb.gentoo.org/repo/gentoo.git/tree/www-apps/gitea/gitea-1.7.6.ebuild?id=d8b847da354d330a40a67a2971bbb851744a4ec2#n67


But, we miss something in the config tree, as the app.ini should definitely be inside conf/ directory, to allow users to have their own customization in /etc/gitea.
Comment 2 Nathan Dehnel 2019-07-13 13:55:46 UTC
So what, is their documentation inconsistent? gitea web --help suggests using custom/conf/app.ini.

It's weird that they would provide a facility for a custom settings file and then just instruct users to overwrite the defaults file.
Comment 3 Felix Neumärker 2019-12-07 18:03:59 UTC
I think the default configuration locations are for the usecase running Gitea from its development base (repository) (or from a windows environment?).


From https://docs.gitea.io/en-us/customizing-gitea/
> If Gitea is deployed from binary, all default paths will be relative to the Gitea binary.

So it is pretty clear that for using a unix layout adaption have to be made.

These are at the moment:

configuration -> /etc/gitea/app.ini
binary        -> /usr/bin/gitea
doc           -> /usr/share/doc/gitea-${PV}
dynamic data  -> /var/lib/gitea/{custom,data} (custom-templates/database,git-repos)

and the daemon-files (note that gitea's default logging behaviour is std-out, which does not match the behaviour, you would expect from a daemon).

Do you see any problem's with this layout? Otherwise I think we can close this bug.
Comment 4 Dennis Schridde 2019-12-07 18:59:23 UTC
(In reply to Felix Neumärker from comment #3)
> and the daemon-files (note that gitea's default logging behaviour is
> std-out, which does not match the behaviour, you would expect from a daemon).

Note that, with systemd and application containers becoming more popular, several project transitioned back to stdout/stderr logging by default, since that is the easiest mode in systemd and application containers.
Comment 5 Felix Neumärker 2019-12-07 19:05:04 UTC
(In reply to Dennis Schridde from comment #4)
> (In reply to Felix Neumärker from comment #3)
> > and the daemon-files (note that gitea's default logging behaviour is
> > std-out, which does not match the behaviour, you would expect from a daemon).
> 
> Note that, with systemd and application containers becoming more popular,
> several project transitioned back to stdout/stderr logging by default, since
> that is the easiest mode in systemd and application containers.

yes, you're right - it's a pitty. so let's say: “…the behaviour a classic/proper init system expects from a daemon”?
Comment 6 Larry the Git Cow gentoo-dev 2019-12-12 17:53:45 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b7b0b24dae7d9a0f8b5a8447a3901560d6184040

commit b7b0b24dae7d9a0f8b5a8447a3901560d6184040
Author:     Felix Neumärker <xdch47@posteo.de>
AuthorDate: 2019-12-07 17:41:51 +0000
Commit:     Joonas Niilola <juippis@gentoo.org>
CommitDate: 2019-12-12 17:53:34 +0000

    www-apps/gitea: bump to 1.10.1
    
    Closes: https://bugs.gentoo.org/689748
    Closes: https://bugs.gentoo.org/702192
    
    Package-Manager: Portage-2.3.80, Repoman-2.3.20
    Signed-off-by: Felix Neumärker <xdch47@posteo.de>
    Signed-off-by: Joonas Niilola <juippis@gentoo.org>

 www-apps/gitea/Manifest                            |  2 +-
 .../{gitea-1.10.0.ebuild => gitea-1.10.1.ebuild}   | 25 ++++++++++++++--------
 www-apps/gitea/gitea-9999.ebuild                   | 25 ++++++++++++++--------
 3 files changed, 33 insertions(+), 19 deletions(-)