Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/
Date: Sun, 31 Oct 2021 02:55:10
Message-Id: 1635648739.0c1d3c5f1591405fbef033d14749afa3a759214c.sam@gentoo
1 commit: 0c1d3c5f1591405fbef033d14749afa3a759214c
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Tue Oct 26 07:06:48 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sun Oct 31 02:52:19 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0c1d3c5f
7
8 www-apps/gitea: bump to 1.15.5
9
10 Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com>
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 www-apps/gitea/Manifest | 1 +
14 www-apps/gitea/gitea-1.15.5.ebuild | 123 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 124 insertions(+)
16
17 diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
18 index 402794e64d0..4b82f4f45d2 100644
19 --- a/www-apps/gitea/Manifest
20 +++ b/www-apps/gitea/Manifest
21 @@ -2,3 +2,4 @@ DIST gitea-1.14.6.tar.gz 117871468 BLAKE2B f71ea5e6761e36bbb5d4304e606b995131967
22 DIST gitea-1.14.7.tar.gz 117981989 BLAKE2B e3159f0a3c07511319491865ab75a4619e1c696e19e0dc6dc0ce56d0adf06f6be0658b96d65a8085694aac0fc0a5131e127b8181d789847708bc56691ad6a547 SHA512 023a6583f8352974df3138b8aa5e7729cef1769dff7a3a59b1a5efe66e4527296045ae10f69982592a9d932d390c60e749199e4d1fe1010b7507de5576c8abca
23 DIST gitea-1.15.2.tar.gz 48648887 BLAKE2B 5bd5800e4c967946dad918d57318831cc7a55cdeedd46e8efb74cd47940eefde1212b85f43b77f1ba443d2c09997a5dd1dd29fd9c7bbc404cf2943048e42225c SHA512 47332f07882c2bef26f9417f0617801518c0448cbe84c2a70b140f38dbe18c17cfe9bb077da49536663066b8d09a566a423256430f954beafc53d746b5bfd578
24 DIST gitea-1.15.3.tar.gz 48671233 BLAKE2B 3440e02711f696fff8629e5049c44963a31375516ae8e335069970d8a9a65792c60a382444bea6d49f1048936862ff5e56b79eaa7bc1aefaafe0c080ce52cb02 SHA512 00bf48e8c30ee2c00465f7e29055149e68a1f2956860ca4314c7671d054e93c94024d8aed91770b1a0a50a21937bb51e42da5d9639462c21f9a56652fbfdf04e
25 +DIST gitea-1.15.5.tar.gz 48677702 BLAKE2B fe46e16041861a477cd91e66e741d35cd43264f8e8c6bfeac5a858fd4aeac9e5e92e308608d6fe74a86a69f21a7c036c8e3409aacb8e5841cbf60ae67009574a SHA512 85522113f389d0a26d4f4b78c05a5454095da5f9f9a030c7392143588f985dc7711368d40194bdc6ea286f3ec15b1f9db428f1401f29aa4c46800d0431696a85
26
27 diff --git a/www-apps/gitea/gitea-1.15.5.ebuild b/www-apps/gitea/gitea-1.15.5.ebuild
28 new file mode 100644
29 index 00000000000..a5eec77f603
30 --- /dev/null
31 +++ b/www-apps/gitea/gitea-1.15.5.ebuild
32 @@ -0,0 +1,123 @@
33 +# Copyright 2016-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +inherit fcaps go-module tmpfiles systemd
38 +MY_PV="${PV/_rc/-rc}"
39 +
40 +DESCRIPTION="A painless self-hosted Git service"
41 +HOMEPAGE="https://gitea.io"
42 +
43 +if [[ ${PV} != 9999* ]] ; then
44 + SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${MY_PV}/gitea-src-${MY_PV}.tar.gz -> ${P}.tar.gz"
45 + KEYWORDS="~amd64 ~arm ~arm64"
46 + S="${WORKDIR}"
47 +else
48 + EGIT_REPO_URI="https://github.com/go-gitea/gitea"
49 + inherit git-r3
50 + S="${WORKDIR}/${P}"
51 +fi
52 +
53 +LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
54 +SLOT="0"
55 +IUSE="+acct pam sqlite"
56 +
57 +COMMON_DEPEND="
58 + acct? (
59 + acct-group/git
60 + acct-user/git[gitea] )
61 + pam? ( sys-libs/pam )"
62 +DEPEND="${COMMON_DEPEND}"
63 +RDEPEND="${COMMON_DEPEND}
64 + dev-vcs/git"
65 +
66 +DOCS=(
67 + custom/conf/app.example.ini CONTRIBUTING.md README.md
68 +)
69 +FILECAPS=(
70 + -m 711 cap_net_bind_service+ep usr/bin/gitea
71 +)
72 +
73 +RESTRICT="test"
74 +QA_PRESTRIPPED="usr/bin/gitea"
75 +
76 +src_prepare() {
77 + default
78 +
79 + local sedcmds=(
80 + -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
81 + -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
82 + -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#"
83 + -e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#"
84 + -e "s#^MODE = console#MODE = file#"
85 + -e "s#^LEVEL = Trace#LEVEL = Info#"
86 + -e "s#^LOG_SQL = true#LOG_SQL = false#"
87 + -e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#"
88 + )
89 +
90 + sed -i "${sedcmds[@]}" custom/conf/app.example.ini || die
91 + if use sqlite ; then
92 + sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.example.ini || die
93 + fi
94 +
95 + einfo "Remove tests which are known to fail with network-sandbox enabled."
96 + rm ./modules/migrations/github_test.go || die
97 +
98 + einfo "Remove tests which depend on gitea git-repo."
99 + rm ./modules/git/blob_test.go || die
100 + rm ./modules/git/repo_test.go || die
101 +}
102 +
103 +src_compile() {
104 + local gitea_tags=(
105 + bindata
106 + $(usev pam)
107 + $(usex sqlite 'sqlite sqlite_unlock_notify' '')
108 + )
109 + local gitea_settings=(
110 + "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini"
111 + "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
112 + "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
113 + )
114 + local makeenv=(
115 + TAGS="${gitea_tags[*]}"
116 + LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}"
117 + )
118 + [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${MY_PV}")
119 +
120 + env "${makeenv[@]}" emake backend
121 +}
122 +
123 +src_install() {
124 + dobin gitea
125 +
126 + einstalldocs
127 +
128 + newconfd "${FILESDIR}/gitea.confd-r1" gitea
129 + newinitd "${FILESDIR}/gitea.initd-r3" gitea
130 + newtmpfiles - gitea.conf <<-EOF
131 + d /run/gitea 0755 git git
132 + EOF
133 + systemd_newunit "${FILESDIR}"/gitea.service-r3 gitea.service
134 +
135 + insinto /etc/gitea
136 + newins custom/conf/app.example.ini app.ini
137 + if use acct ; then
138 + fowners root:git /etc/gitea/{,app.ini}
139 + fperms g+w,o-rwx /etc/gitea/{,app.ini}
140 +
141 + diropts -m0750 -o git -g git
142 + keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
143 + keepdir /var/log/gitea
144 + fi
145 +}
146 +
147 +pkg_postinst() {
148 + fcaps_pkg_postinst
149 + tmpfiles_process gitea.conf
150 +
151 + ewarn "The default JWT signing algorithm changed in 1.15.0 from HS256 (symmetric) to"
152 + ewarn "RS256 (asymmetric). Gitea OAuth2 tokens (and potentially client secrets) will"
153 + ewarn "need to be regenerated unless you change your JWT_SIGNING_ALGORITHM back to HS256."
154 + ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.15.0>."
155 +}