From 3a0ff59d53bb772fc75e65f218e433327a674fc4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Robert=20F=C3=B6rster?= Date: Fri, 1 Nov 2019 02:40:17 +0100 Subject: [PATCH] [www-apps/gitea] bump to 1.10.0_rc2 as continuation from PR 12597 on gentoo/gentoo --- www-apps/gitea/Manifest | 1 + www-apps/gitea/files/gitea-logflags.patch | 13 +++ www-apps/gitea/files/gitea.confd-r1 | 14 +++ www-apps/gitea/files/gitea.initd-r3 | 22 ++++ www-apps/gitea/files/gitea.service-r2 | 34 +++++++ www-apps/gitea/gitea-1.10.0_rc2.ebuild | 119 ++++++++++++++++++++++ 6 files changed, 203 insertions(+) create mode 100644 www-apps/gitea/Manifest create mode 100644 www-apps/gitea/files/gitea-logflags.patch create mode 100644 www-apps/gitea/files/gitea.confd-r1 create mode 100644 www-apps/gitea/files/gitea.initd-r3 create mode 100644 www-apps/gitea/files/gitea.service-r2 create mode 100644 www-apps/gitea/gitea-1.10.0_rc2.ebuild diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest new file mode 100644 index 0000000..36f9a2b --- /dev/null +++ b/www-apps/gitea/Manifest @@ -0,0 +1 @@ +DIST gitea-1.10.0_rc2.tar.gz 28905169 BLAKE2B d34025875e344247968f43d03ee1b7fa2c41bb1c65169b6b206d3a60bd22dc09205a3e4a1b08d206c4fd2b0bb8075d2e4615a22aef8039b57f6dba7cabc222c6 SHA512 512af3bc2aa5c5caf188cb06fc6279d6fc2950e6f984a29d5e83a7c6e153d2c75edcf4a6536615e9bbe3ba948d3abf867687aa75032f2bbf1b62723fe86d1b55 diff --git a/www-apps/gitea/files/gitea-logflags.patch b/www-apps/gitea/files/gitea-logflags.patch new file mode 100644 index 0000000..331bd3d --- /dev/null +++ b/www-apps/gitea/files/gitea-logflags.patch @@ -0,0 +1,13 @@ +diff --git a/modules/log/flags.go b/modules/log/flags.go +index 992fc62..5578a1b 100644 +--- a/modules/log/flags.go ++++ b/modules/log/flags.go +@@ -31,7 +31,7 @@ const ( + Lmedfile = Lshortfile | Llongfile + + // LstdFlags is the initial value for the standard logger +- LstdFlags = Ldate | Ltime | Lmedfile | Lshortfuncname | Llevelinitial ++ LstdFlags = Ldate | Ltime | Llevelinitial + ) + + var flagFromString = map[string]int{ diff --git a/www-apps/gitea/files/gitea.confd-r1 b/www-apps/gitea/files/gitea.confd-r1 new file mode 100644 index 0000000..19018c1 --- /dev/null +++ b/www-apps/gitea/files/gitea.confd-r1 @@ -0,0 +1,14 @@ +# Gitea configuration +GITEA_CONF="/etc/gitea/app.ini" + +# Gitea user +GITEA_USER="git" + +# Gitea group +GITEA_GROUP="git" + +# Gitea working directory +GITEA_WORK_DIR="/var/lib/gitea" + +# Gitea custom directory +GITEA_CUSTOM="${GITEA_WORK_DIR}/custom" diff --git a/www-apps/gitea/files/gitea.initd-r3 b/www-apps/gitea/files/gitea.initd-r3 new file mode 100644 index 0000000..680ae83 --- /dev/null +++ b/www-apps/gitea/files/gitea.initd-r3 @@ -0,0 +1,22 @@ +#!/sbin/openrc-run +# Copyright 2016-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +description="Gitea, a self-hosted Git service" + +: ${GITEA_CONF:=/etc/gitea/app.ini} +: ${GITEA_USER:=git} +: ${GITEA_GROUP:=git} +: ${GITEA_WORK_DIR:=/var/lib/gitea} +: ${GITEA_CUSTOM:=${GITEA_WORK_DIR}/custom} + +command="/usr/bin/gitea web" +command_args="--config ${GITEA_CONF}" +command_background="true" +command_user="${GITEA_USER}:${GITEA_GROUP}" +error_log="/var/log/${RC_SVCNAME}/${RC_SVCNAME}.err" +pidfile="/run/${RC_SVCNAME}.pid" +required_files="${GITEA_CONF}" +start_stop_daemon_args="-d ${GITEA_WORK_DIR}" +start_stop_daemon_args="${start_stop_daemon_args} -e GITEA_WORK_DIR=${GITEA_WORK_DIR}" +start_stop_daemon_args="${start_stop_daemon_args} -e GITEA_CUSTOM=${GITEA_CUSTOM}" diff --git a/www-apps/gitea/files/gitea.service-r2 b/www-apps/gitea/files/gitea.service-r2 new file mode 100644 index 0000000..1931b46 --- /dev/null +++ b/www-apps/gitea/files/gitea.service-r2 @@ -0,0 +1,34 @@ +[Unit] +Description=Gitea service +Documentation=https://docs.gitea.io/ + +AssertPathIsDirectory=/var/lib/gitea +AssertPathIsReadWrite=/var/lib/gitea + +After=network.target +Requires=network.target +After=mysqld.service +After=postgresql-9.3.service +After=postgresql-9.4.service +After=postgresql-9.5.service +After=postgresql-9.6.service +After=postgresql-10.service +After=postgresql-11.service +After=postgresql-12.service +After=memcached.service +After=redis.service + +[Service] +User=git +Group=git + +Environment="GITEA_WORK_DIR=/var/lib/gitea" "GITEA_CUSTOM=/var/lib/gitea/custom" +WorkingDirectory=/var/lib/gitea +ExecStart=/usr/bin/gitea web --config /etc/gitea/app.ini + +Restart=always +PrivateTmp=true +Nice=5 + +[Install] +WantedBy=multi-user.target diff --git a/www-apps/gitea/gitea-1.10.0_rc2.ebuild b/www-apps/gitea/gitea-1.10.0_rc2.ebuild new file mode 100644 index 0000000..71187ae --- /dev/null +++ b/www-apps/gitea/gitea-1.10.0_rc2.ebuild @@ -0,0 +1,119 @@ +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=7 +inherit golang-vcs-snapshot tmpfiles systemd + +MY_PV=${PV/_/-} +#MY_P=${PN}-${MY_PV} + +EGO_PN="code.gitea.io/gitea" + +DESCRIPTION="A painless self-hosted Git service" +HOMEPAGE="https://gitea.io" +SRC_URI="https://github.com/go-gitea/gitea/archive/v${MY_PV}.tar.gz -> ${P}.tar.gz" + +LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64" +IUSE="+acct pam sqlite" + +BDEPEND="