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: Sat, 25 Dec 2021 23:20:25
Message-Id: 1640474403.40a824bb90d1beb52b0e1bf3d4699fedc78d331a.sam@gentoo
1 commit: 40a824bb90d1beb52b0e1bf3d4699fedc78d331a
2 Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com>
3 AuthorDate: Thu Dec 23 20:48:58 2021 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Dec 25 23:20:03 2021 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=40a824bb
7
8 www-apps/gitea: bump to 1.15.8
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.8.ebuild | 115 +++++++++++++++++++++++++++++++++++++
15 2 files changed, 116 insertions(+)
16
17 diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest
18 index 2895b7fa49ff..0632a8e636fa 100644
19 --- a/www-apps/gitea/Manifest
20 +++ b/www-apps/gitea/Manifest
21 @@ -1,3 +1,4 @@
22 DIST gitea-1.15.5.tar.gz 48677702 BLAKE2B fe46e16041861a477cd91e66e741d35cd43264f8e8c6bfeac5a858fd4aeac9e5e92e308608d6fe74a86a69f21a7c036c8e3409aacb8e5841cbf60ae67009574a SHA512 85522113f389d0a26d4f4b78c05a5454095da5f9f9a030c7392143588f985dc7711368d40194bdc6ea286f3ec15b1f9db428f1401f29aa4c46800d0431696a85
23 DIST gitea-1.15.6.tar.gz 48675768 BLAKE2B e7952cc981925ec36ab6576456266e3582ea88098a2ad83da161c875b3621be586ddbe63fe0d0ce7c62a0fa1e46663f20ce24ce998f3318645667bd92236ade1 SHA512 9492a3628c5b300a1322893ffdfffa42e904d1b94917c058ad339e0d9ca21155c834b11d55808cbc89e08533de5340fbf858b87487ad307713c4dc12f5e810c8
24 DIST gitea-1.15.7.tar.gz 48716399 BLAKE2B 4238dad8ce64f205bc18fb35a395b18f6da9f34e5bc0dd9d9bb33d5b8413895fb11f85e8514aca62485ce70f0af5091cb8dfeaccecd146fe5e37ca250227847d SHA512 9488776bb39d15a7390e6734e05c6ee9e092a52055575bc784660d6815125f29498d16a7807dac71ecbabc3f08c407c2da1514c36cce72855a17a9ed7b52fbb9
25 +DIST gitea-1.15.8.tar.gz 48705540 BLAKE2B fe51af1ac573958e615e600925a3e2a8f1bdfe44333304571198de58fa989e8f8c9ebc4f4714d7700c24f28cba60170a2e34c4416ed28ec201577af92d557a82 SHA512 026f8006fa5f51f6bd753228290f1f3714cd5b23c35e2041b309fc4d0d66be9f84fdaf4c7bd5759248fa26e3d3b9fe628fd5ee4c96e13ff6c99fa7facef4ab06
26
27 diff --git a/www-apps/gitea/gitea-1.15.8.ebuild b/www-apps/gitea/gitea-1.15.8.ebuild
28 new file mode 100644
29 index 000000000000..2bacf5e333f4
30 --- /dev/null
31 +++ b/www-apps/gitea/gitea-1.15.8.ebuild
32 @@ -0,0 +1,115 @@
33 +# Copyright 2016-2021 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=8
37 +
38 +inherit fcaps go-module tmpfiles systemd
39 +MY_PV="${PV/_rc/-rc}"
40 +
41 +DESCRIPTION="A painless self-hosted Git service"
42 +HOMEPAGE="https://gitea.io https://github.com/go-gitea/gitea"
43 +
44 +if [[ ${PV} != 9999* ]] ; then
45 + SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${MY_PV}/gitea-src-${MY_PV}.tar.gz -> ${P}.tar.gz"
46 + KEYWORDS="~amd64 ~arm ~arm64"
47 + S="${WORKDIR}"
48 +else
49 + EGIT_REPO_URI="https://github.com/go-gitea/gitea"
50 + inherit git-r3
51 + S="${WORKDIR}/${P}"
52 +fi
53 +
54 +LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0"
55 +SLOT="0"
56 +IUSE="+acct pam sqlite"
57 +
58 +DEPEND="
59 + acct? (
60 + acct-group/git
61 + acct-user/git[gitea] )
62 + pam? ( sys-libs/pam )"
63 +RDEPEND="${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 +
75 +src_prepare() {
76 + default
77 +
78 + local sedcmds=(
79 + -e "s#^ROOT =#ROOT = ${EPREFIX}/var/lib/gitea/gitea-repositories#"
80 + -e "s#^ROOT_PATH =#ROOT_PATH = ${EPREFIX}/var/log/gitea#"
81 + -e "s#^APP_DATA_PATH = data#APP_DATA_PATH = ${EPREFIX}/var/lib/gitea/data#"
82 + -e "s#^HTTP_ADDR = 0.0.0.0#HTTP_ADDR = 127.0.0.1#"
83 + -e "s#^MODE = console#MODE = file#"
84 + -e "s#^LEVEL = Trace#LEVEL = Info#"
85 + -e "s#^LOG_SQL = true#LOG_SQL = false#"
86 + -e "s#^DISABLE_ROUTER_LOG = false#DISABLE_ROUTER_LOG = true#"
87 + )
88 +
89 + sed -i "${sedcmds[@]}" custom/conf/app.example.ini || die
90 + if use sqlite ; then
91 + sed -i -e "s#^DB_TYPE = .*#DB_TYPE = sqlite3#" custom/conf/app.example.ini || die
92 + fi
93 +}
94 +
95 +src_compile() {
96 + local gitea_tags=(
97 + bindata
98 + $(usev pam)
99 + $(usex sqlite 'sqlite sqlite_unlock_notify' '')
100 + )
101 + local gitea_settings=(
102 + "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini"
103 + "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom"
104 + "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea"
105 + )
106 + local makeenv=(
107 + TAGS="${gitea_tags[*]}"
108 + LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}"
109 + )
110 + [[ ${PV} != 9999* ]] && makeenv+=("DRONE_TAG=${MY_PV}")
111 +
112 + env "${makeenv[@]}" emake backend
113 +}
114 +
115 +src_install() {
116 + dobin gitea
117 +
118 + einstalldocs
119 +
120 + newconfd "${FILESDIR}/gitea.confd-r1" gitea
121 + newinitd "${FILESDIR}/gitea.initd-r3" gitea
122 + newtmpfiles - gitea.conf <<-EOF
123 + d /run/gitea 0755 git git
124 + EOF
125 + systemd_newunit "${FILESDIR}"/gitea.service-r3 gitea.service
126 +
127 + insinto /etc/gitea
128 + newins custom/conf/app.example.ini app.ini
129 + if use acct ; then
130 + fowners root:git /etc/gitea/{,app.ini}
131 + fperms g+w,o-rwx /etc/gitea/{,app.ini}
132 +
133 + diropts -m0750 -o git -g git
134 + keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data
135 + keepdir /var/log/gitea
136 + fi
137 +}
138 +
139 +pkg_postinst() {
140 + fcaps_pkg_postinst
141 + tmpfiles_process gitea.conf
142 +
143 + ewarn "The default JWT signing algorithm changed in 1.15.0 from HS256 (symmetric) to"
144 + ewarn "RS256 (asymmetric). Gitea OAuth2 tokens (and potentially client secrets) will"
145 + ewarn "need to be regenerated unless you change your JWT_SIGNING_ALGORITHM back to HS256."
146 + ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.15.0>."
147 +}