Gentoo Archives: gentoo-commits

From: Aaron Bauman <bman@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: www-apps/gitea/
Date: Tue, 02 Jun 2020 04:35:34
Message-Id: 1591072520.96ce865c1b6f2d22e07e9a73ca2514de4c1331c4.bman@gentoo
1 commit: 96ce865c1b6f2d22e07e9a73ca2514de4c1331c4
2 Author: Pierre-Olivier Mercier <nemunaire <AT> nemunai <DOT> re>
3 AuthorDate: Sun May 31 12:50:03 2020 +0000
4 Commit: Aaron Bauman <bman <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 2 04:35:20 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=96ce865c
7
8 www-apps/gitea: drop vulnerables olds
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Pierre-Olivier Mercier <nemunaire <AT> nemunai.re>
12 Closes: https://github.com/gentoo/gentoo/pull/16031
13 Signed-off-by: Aaron Bauman <bman <AT> gentoo.org>
14
15 www-apps/gitea/Manifest | 2 -
16 www-apps/gitea/gitea-1.10.6.ebuild | 134 -----------------------------------
17 www-apps/gitea/gitea-1.11.5.ebuild | 141 -------------------------------------
18 3 files changed, 277 deletions(-)
19
20 diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
21 index f868988d0ed..0caedd3fa4b 100644
22 --- a/www-apps/gitea/Manifest
23 +++ b/www-apps/gitea/Manifest
24 @@ -1,3 +1 @@
25 -DIST gitea-1.10.6.tar.gz 30147860 BLAKE2B e41e226be820eb0a436783f49bf90a1149eef4e0dde00edc09bc76bb086ea53ff2856563e31ab261e1529a03753785e04c1fe8a02f72eef01a6de173df82098d SHA512 be64f73eb0819c28e444b9dae8d4baecd910aad790efeb515a981542125679257f48a5f4ab1c8453b5372a0c8b1e9b84275e61c89dcd2137d7f7cfe8c71f917b
26 -DIST gitea-src-1.11.5.tar.gz 68923871 BLAKE2B 99e189b4a95e9ef6079a5e8455c05209da742499ff1b18e9f5edab2620ff8deb64ca3b7cb59d456b6fe25558602be8e1f8376ec234229c6af7baf24cc6d15023 SHA512 b12bfb2fc13bd0ca5799d52c37b5d2988879041892aa1e160546f7c80e2faef086f76cd753de90f2468fe9f87af6eca64ca21df394db160fc347137fc9a0fd52
27 DIST gitea-src-1.11.6.tar.gz 68915319 BLAKE2B 8d8fd34fe38e153aa4af932a83933d0b5ad81a63bf7b7b5be59e64dd82db3282072686979a41fafa3ac2e523f79d6926ed057b2ed18645040bf1c446c6ab04b2 SHA512 57d5214a5e05581c134d42e00ec29fe15f3245a75440fca26c7162937570affc5a2e4ba8e903cb7f15fcb271144183ce5aa473457245f36d52686ea9f1cc93b3
28
29 diff --git a/www-apps/gitea/gitea-1.10.6.ebuild b/www-apps/gitea/gitea-1.10.6.ebuild
30 deleted file mode 100644
31 index 473b669f45b..00000000000
32 --- a/www-apps/gitea/gitea-1.10.6.ebuild
33 +++ /dev/null
34 @@ -1,134 +0,0 @@
35 -# Copyright 1999-2020 Gentoo Authors
36 -# Distributed under the terms of the GNU General Public License v2
37 -
38 -EAPI=7
39 -
40 -if [[ ${PV} != 9999* ]] ; then
41 - SCM="golang-vcs-snapshot"
42 -else
43 - SCM="git-r3"
44 -fi
45 -
46 -inherit golang-base tmpfiles systemd ${SCM}
47 -unset SCM
48 -
49 -EGO_PN="code.gitea.io/gitea"
50 -
51 -DESCRIPTION="A painless self-hosted Git service"
52 -HOMEPAGE="https://gitea.io"
53 -
54 -if [[ ${PV} != 9999* ]] ; then
55 - SRC_URI="https://github.com/go-gitea/gitea/archive/v${PV}.tar.gz -> ${P}.tar.gz"
56 - KEYWORDS="~amd64 ~arm ~arm64"
57 -else
58 - EGIT_REPO_URI="https://github.com/go-gitea/gitea"
59 - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
60 - has test ${FEATURES} && EGIT_MIN_CLONE_TYPE="mirror"
61 -fi
62 -
63 -LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
64 -SLOT="0"
65 -IUSE="+acct pam sqlite"
66 -
67 -BDEPEND="dev-lang/go"
68 -DEPEND="pam? ( sys-libs/pam )"
69 -RDEPEND="${DEPEND}
70 - acct? (
71 - acct-group/git
72 - acct-user/git[gitea]
73 - )
74 - dev-vcs/git"
75 -
76 -DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
77 -S="${WORKDIR}/${P}/src/${EGO_PN}"
78 -
79 -PATCHES=( "${FILESDIR}/gitea-logflags.patch" )
80 -
81 -gitea_make() {
82 - local gitea_tags=(
83 - bindata
84 - $(usev pam)
85 - $(usex sqlite 'sqlite sqlite_unlock_notify' '')
86 - )
87 - local gitea_settings=(
88 - "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini"
89 - "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
90 - "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
91 - )
92 - local makeenv=(
93 - TAGS="${gitea_tags[@]}"
94 - LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}"
95 - GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)"
96 - )
97 - [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${PV}")
98 -
99 - env "${makeenv[@]}" emake "$@"
100 -}
101 -
102 -src_prepare() {
103 - default
104 -
105 - local sedcmds=(
106 - -e "s#^RUN_MODE = dev#RUN_MODE = prod#"
107 - -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
108 - -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
109 - -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#"
110 - -e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#"
111 - -e "s#^MODE = console#MODE = file#"
112 - -e "s#^LEVEL = Trace#LEVEL = Info#"
113 - -e "s#^LOG_SQL = true#LOG_SQL = false#"
114 - -e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#"
115 - -e "s#^APP_ID =#;APP_ID =#"
116 - -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#"
117 - )
118 -
119 - sed -i "${sedcmds[@]}" custom/conf/app.ini.sample || die
120 - if use sqlite ; then
121 - sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
122 - fi
123 -
124 - gitea_make generate
125 -}
126 -
127 -src_compile() {
128 - gitea_make build
129 -}
130 -
131 -src_test() {
132 - if has network-sandbox ${FEATURES}; then
133 - einfo "Remove tests which are known to fail with network-sandbox enabled."
134 - rm ./modules/migrations/github_test.go || die
135 - fi
136 -
137 - if [[ ${PV} != 9999* ]] ; then
138 - einfo "Remove tests which depend on gitea git-repo."
139 - rm ./modules/git/blob_test.go || die
140 - rm ./modules/git/repo_test.go || die
141 - fi
142 -
143 - default
144 -}
145 -
146 -src_install() {
147 - dobin gitea
148 -
149 - einstalldocs
150 -
151 - newconfd "${FILESDIR}/gitea.confd-r1" gitea
152 - newinitd "${FILESDIR}/gitea.initd-r3" gitea
153 - newtmpfiles - gitea.conf <<-EOF
154 - d /run/gitea 0755 git git
155 - EOF
156 - systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
157 -
158 - insinto /etc/gitea
159 - newins custom/conf/app.ini.sample app.ini
160 - if use acct ; then
161 - fowners root:git /etc/gitea/{,app.ini}
162 - fperms g+w,o-rwx /etc/gitea/{,app.ini}
163 -
164 - diropts -m0750 -o git -g git
165 - keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
166 - keepdir /var/log/gitea
167 - fi
168 -}
169
170 diff --git a/www-apps/gitea/gitea-1.11.5.ebuild b/www-apps/gitea/gitea-1.11.5.ebuild
171 deleted file mode 100644
172 index 44802e089f9..00000000000
173 --- a/www-apps/gitea/gitea-1.11.5.ebuild
174 +++ /dev/null
175 @@ -1,141 +0,0 @@
176 -# Copyright 1999-2020 Gentoo Authors
177 -# Distributed under the terms of the GNU General Public License v2
178 -
179 -EAPI=7
180 -
181 -if [[ ${PV} != 9999* ]] ; then
182 - SCM="golang-vcs-snapshot"
183 -else
184 - SCM="git-r3"
185 -fi
186 -
187 -inherit fcaps golang-base tmpfiles systemd ${SCM}
188 -unset SCM
189 -
190 -EGO_PN="code.gitea.io/gitea"
191 -
192 -DESCRIPTION="A painless self-hosted Git service"
193 -HOMEPAGE="https://gitea.io"
194 -
195 -if [[ ${PV} != 9999* ]] ; then
196 - SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz"
197 - KEYWORDS="~amd64 ~arm ~arm64"
198 -else
199 - EGIT_REPO_URI="https://github.com/go-gitea/gitea"
200 - EGIT_CHECKOUT_DIR="${WORKDIR}/${P}/src/${EGO_PN}"
201 - has test ${FEATURES} && EGIT_MIN_CLONE_TYPE="mirror"
202 -fi
203 -
204 -LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
205 -SLOT="0"
206 -IUSE="+acct build-client pam sqlite"
207 -
208 -BDEPEND="dev-lang/go
209 - build-client? ( >=net-libs/nodejs-10[npm] )"
210 -DEPEND="pam? ( sys-libs/pam )"
211 -RDEPEND="${DEPEND}
212 - acct? (
213 - acct-group/git
214 - acct-user/git[gitea]
215 - )
216 - dev-vcs/git"
217 -
218 -DOCS=( custom/conf/app.ini.sample CONTRIBUTING.md README.md )
219 -FILECAPS=( cap_net_bind_service+ep usr/bin/gitea )
220 -S="${WORKDIR}/${P}/src/${EGO_PN}"
221 -
222 -PATCHES=( "${FILESDIR}/gitea-logflags.patch" )
223 -
224 -gitea_make() {
225 - local gitea_tags=(
226 - bindata
227 - $(usev pam)
228 - $(usex sqlite 'sqlite sqlite_unlock_notify' '')
229 - )
230 - local gitea_settings=(
231 - "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini"
232 - "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
233 - "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
234 - )
235 - local makeenv=(
236 - TAGS="${gitea_tags[@]}"
237 - LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[@]}"
238 - GOPATH="${WORKDIR}/${P}:$(get_golibdir_gopath)"
239 - )
240 - [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${PV}")
241 -
242 - env "${makeenv[@]}" emake -j1 "$@"
243 -}
244 -
245 -src_prepare() {
246 - default
247 -
248 - local sedcmds=(
249 - -e "s#^RUN_MODE = dev#RUN_MODE = prod#"
250 - -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
251 - -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
252 - -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#"
253 - -e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#"
254 - -e "s#^MODE = console#MODE = file#"
255 - -e "s#^LEVEL = Trace#LEVEL = Info#"
256 - -e "s#^LOG_SQL = true#LOG_SQL = false#"
257 - -e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#"
258 - -e "s#^APP_ID =#;APP_ID =#"
259 - -e "s#^TRUSTED_FACETS =#;TRUSTED_FACETS =#"
260 - )
261 -
262 - sed -i "${sedcmds[@]}" custom/conf/app.ini.sample || die
263 - if use sqlite ; then
264 - sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.ini.sample || die
265 - fi
266 -
267 - # Remove already build assets (like frontend part)
268 - use build-client && gitea_make clean-all
269 -}
270 -
271 -src_compile() {
272 - if use build-client ; then
273 - gitea_make build
274 - else
275 - gitea_make backend
276 - fi
277 -}
278 -
279 -src_test() {
280 - if has network-sandbox ${FEATURES}; then
281 - einfo "Remove tests which are known to fail with network-sandbox enabled."
282 - rm ./modules/migrations/github_test.go || die
283 - fi
284 -
285 - if [[ ${PV} != 9999* ]] ; then
286 - einfo "Remove tests which depend on gitea git-repo."
287 - rm ./modules/git/blob_test.go || die
288 - rm ./modules/git/repo_test.go || die
289 - fi
290 -
291 - default
292 -}
293 -
294 -src_install() {
295 - dobin gitea
296 -
297 - einstalldocs
298 -
299 - newconfd "${FILESDIR}/gitea.confd-r1" gitea
300 - newinitd "${FILESDIR}/gitea.initd-r3" gitea
301 - newtmpfiles - gitea.conf <<-EOF
302 - d /run/gitea 0755 git git
303 - EOF
304 - systemd_newunit "${FILESDIR}"/gitea.service-r2 gitea.service
305 -
306 - insinto /etc/gitea
307 - newins custom/conf/app.ini.sample app.ini
308 - if use acct ; then
309 - fowners root:git /etc/gitea/{,app.ini}
310 - fperms g+w,o-rwx /etc/gitea/{,app.ini}
311 -
312 - diropts -m0750 -o git -g git
313 - keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
314 - keepdir /var/log/gitea
315 - fi
316 -}