1 |
commit: bad3fd83670890991c47b80d0d0609749f75dcb4 |
2 |
Author: Stijn Tintel <stijn <AT> linux-ipv6 <DOT> be> |
3 |
AuthorDate: Tue Nov 30 05:57:53 2021 +0000 |
4 |
Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org> |
5 |
CommitDate: Tue Nov 30 07:54:22 2021 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=bad3fd83 |
7 |
|
8 |
www-apps/gitea: bump to 1.15.6 |
9 |
|
10 |
Package-Manager: Portage-3.0.28, Repoman-3.0.3 |
11 |
Signed-off-by: Stijn Tintel <stijn <AT> linux-ipv6.be> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/23120 |
13 |
Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org> |
14 |
|
15 |
www-apps/gitea/Manifest | 1 + |
16 |
www-apps/gitea/gitea-1.15.6.ebuild | 123 +++++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 124 insertions(+) |
18 |
|
19 |
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest |
20 |
index 6af1748c2e91..55d3c7ed0a2c 100644 |
21 |
--- a/www-apps/gitea/Manifest |
22 |
+++ b/www-apps/gitea/Manifest |
23 |
@@ -1 +1,2 @@ |
24 |
DIST gitea-1.15.5.tar.gz 48677702 BLAKE2B fe46e16041861a477cd91e66e741d35cd43264f8e8c6bfeac5a858fd4aeac9e5e92e308608d6fe74a86a69f21a7c036c8e3409aacb8e5841cbf60ae67009574a SHA512 85522113f389d0a26d4f4b78c05a5454095da5f9f9a030c7392143588f985dc7711368d40194bdc6ea286f3ec15b1f9db428f1401f29aa4c46800d0431696a85 |
25 |
+DIST gitea-1.15.6.tar.gz 48675768 BLAKE2B e7952cc981925ec36ab6576456266e3582ea88098a2ad83da161c875b3621be586ddbe63fe0d0ce7c62a0fa1e46663f20ce24ce998f3318645667bd92236ade1 SHA512 9492a3628c5b300a1322893ffdfffa42e904d1b94917c058ad339e0d9ca21155c834b11d55808cbc89e08533de5340fbf858b87487ad307713c4dc12f5e810c8 |
26 |
|
27 |
diff --git a/www-apps/gitea/gitea-1.15.6.ebuild b/www-apps/gitea/gitea-1.15.6.ebuild |
28 |
new file mode 100644 |
29 |
index 000000000000..a5eec77f6034 |
30 |
--- /dev/null |
31 |
+++ b/www-apps/gitea/gitea-1.15.6.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 |
+} |