www-apps/gitea: Do some house-keeping

- Drop all example ini modifications. We need to maintain them downstream
  and if they really don't work than either upstream's documentation
  should be fixed - or ours.
  This was mostly already done in the in-tree ebuild.
- Re-order and re-format IUS, blocks and eclasses.
- Drop the upgrade notice for 0.15.x as I assume the time delta is enough.

Signed-off-by: Nils Freydank <nils.freydank@posteo.de>
This commit is contained in:
Nils Freydank 2023-08-07 08:06:17 +02:00
parent e717ce94eb
commit 55fe99feb4
Signed by: nfr
GPG Key ID: 0F1DEAB2D36AD112

View File

@ -3,11 +3,14 @@
EAPI="8"
inherit go-module tmpfiles systemd
inherit go-module systemd tmpfiles
MY_PV="${PV/_rc/-rc}"
DESCRIPTION="A painless self-hosted Git service"
HOMEPAGE="https://gitea.io https://github.com/go-gitea/gitea"
HOMEPAGE="
https://gitea.io
https://github.com/go-gitea/gitea
"
if [[ ${MY_PV} == *9999 ]]
then
@ -20,13 +23,14 @@ fi
LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
SLOT="0"
IUSE="+acct pam sqlite +pie"
IUSE="+acct pam +pie sqlite"
RESTRICT="test"
DEPEND="
acct? (
acct-group/git
acct-user/git[gitea] )
acct-user/git[gitea]
)
pam? ( sys-libs/pam )
"
RDEPEND="
@ -35,31 +39,13 @@ RDEPEND="
"
DOCS=(
custom/conf/app.example.ini CONTRIBUTING.md README.md
custom/conf/app.example.ini
CONTRIBUTING.md
README.md
)
S="${WORKDIR}/${PN}-src-${MY_PV}"
src_prepare() {
default
local sedcmds=(
-e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
-e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
-e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#"
-e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#"
-e "s#^MODE = console#MODE = file#"
-e "s#^LEVEL = Trace#LEVEL = Info#"
-e "s#^LOG_SQL = true#LOG_SQL = false#"
-e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#"
)
sed -i "${sedcmds[@]}" custom/conf/app.example.ini || die
if use sqlite ; then
sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.example.ini || die
fi
}
src_compile() {
local gitea_tags=(
bindata
@ -111,9 +97,4 @@ src_install() {
pkg_postinst() {
tmpfiles_process gitea.conf
ewarn "The default JWT signing algorithm changed in 1.15.0 from HS256 (symmetric) to"
ewarn "RS256 (asymmetric). Gitea OAuth2 tokens (and potentially client secrets) will"
ewarn "need to be regenerated unless you change your JWT_SIGNING_ALGORITHM back to HS256."
ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.15.0>."
}