Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 640764 - www-apps/gitea-1.3.1-r1: new ebuild proposal, fixes some bugs, proper initial configuration.
Summary: www-apps/gitea-1.3.1-r1: new ebuild proposal, fixes some bugs, proper initial...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal normal (vote)
Assignee: Manuel Rüger (RETIRED)
URL:
Whiteboard:
Keywords: EBUILD, PATCH
Depends on:
Blocks:
 
Reported: 2017-12-11 20:50 UTC by Michael Perlov
Modified: 2018-06-02 12:09 UTC (History)
1 user (show)

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


Attachments
New ebuild (gitea-1.3.1-r1.ebuild,1.77 KB, patch)
2017-12-11 20:51 UTC, Michael Perlov
Details | Diff
files/app.ini (app.ini,67 bytes, application/x-wine-extension-ini)
2017-12-11 20:52 UTC, Michael Perlov
Details
gitea-1.3.1-r1.ebuild (gitea-1.3.1-r1.ebuild,1.77 KB, text/plain)
2017-12-11 20:53 UTC, Michael Perlov
Details
files/gitea.initd-r1 (gitea.initd-r1,683 bytes, text/plain)
2017-12-11 20:53 UTC, Michael Perlov
Details
gitea-1.3.1-r1.ebuild.diff (gitea-1.3.1-r1.ebuild.diff,2.67 KB, patch)
2017-12-11 20:54 UTC, Michael Perlov
Details | Diff
gitea.initd-r1.diff (gitea.initd-r1.diff,457 bytes, patch)
2017-12-11 20:55 UTC, Michael Perlov
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Michael Perlov 2017-12-11 20:50:29 UTC
There are some bugs in current ebuild:

Initial config file owned by root, thus gitea cannot write down its settings upon install.
Because of wrong/incomplete sed substitutions in ebuild some settings in initial config are screwed (https://bugs.gentoo.org/612698#c4).
Environment variable GITEA_WORK_DIR is unset (defaults to /usr/bin), leading to wrong configuration, gitea could try to create directories in /usr/bin and obviously fail.

I tried to rework the ebuild to fix mentioned errors and to prevent new if upstream default config will be changed.

Fixes:
GITEA_WORK_DIR is set to /var/lib/gitea
GITEA_CUSTOM will default to /var/lib/gitea/custom, as stated in upstream documentation.
If no app.ini found, there will be created minimal app.ini, owned by git user. Upon install gitea will write down required settings with proper paths. Also, gitea will by default rotate logs, so logrotate.d configuration is not needed anymore, allowing user to control rotation via gitea config.
If there are already app.ini in place, ebuild will warn user about ENV changes.

Thanks.


Reproducible: Always
Comment 1 Michael Perlov 2017-12-11 20:51:35 UTC
Created attachment 509524 [details, diff]
New ebuild
Comment 2 Michael Perlov 2017-12-11 20:52:23 UTC
Created attachment 509526 [details]
files/app.ini
Comment 3 Michael Perlov 2017-12-11 20:53:00 UTC
Created attachment 509528 [details]
gitea-1.3.1-r1.ebuild
Comment 4 Michael Perlov 2017-12-11 20:53:51 UTC
Created attachment 509530 [details]
files/gitea.initd-r1
Comment 5 Michael Perlov 2017-12-11 20:54:38 UTC
Created attachment 509532 [details, diff]
gitea-1.3.1-r1.ebuild.diff
Comment 6 Michael Perlov 2017-12-11 20:55:36 UTC
Created attachment 509534 [details, diff]
gitea.initd-r1.diff
Comment 7 Manuel Rüger (RETIRED) gentoo-dev 2017-12-18 17:55:04 UTC
Thanks! I hope I find some time this week to review it and add it. Would you be interested in proxy-maintaining gitea, Michael?
Comment 8 Michael Perlov 2017-12-21 23:37:55 UTC
Well, I'm not using gitea, just wanted to test it :)

But in general, I could maintain some packages, just need to read all these docs about how to be a proxy-maintainer, set up testing environment and to find some spare time ;)
Comment 9 Stefan G. Weichinger 2018-04-05 09:30:57 UTC
I cross-link this one to https://bugs.gentoo.org/651498

@Michael, maybe you want to rebase your work on the 1.4.0 ebuild and we can work out a new updated version?
Comment 10 Stefan G. Weichinger 2018-04-05 13:38:23 UTC
@Michael
pls file a PR at github for your new ebuild

It's a bit confusing: your mix of diffs and files ... etc 

The changes make sense to me but I am no full-time maintainer here at all so maybe someone else might have a more professional look.
Comment 11 Michael Perlov 2018-04-24 11:00:22 UTC
Sorry, guys. Had no time at all.

PR looks good ;)
Comment 12 Manuel Rüger (RETIRED) gentoo-dev 2018-06-02 12:09:33 UTC
Added in 
commit 7062b1979c463885eb37690519eccd51825e3a6b
Author: Stefan G. Weichinger <office@oops.co.at>
Date:   Sat Jun 2 14:05:50 2018 +0200

    www-apps/gitea: Version bump to 1.4.1
    
    Package-Manager: Portage-2.3.40, Repoman-2.3.9