1 |
commit: e172bd677fe11bb073517ac058b154c80b3abecf |
2 |
Author: Tomáš Mózes <hydrapolic <AT> gmail <DOT> com> |
3 |
AuthorDate: Wed Sep 28 08:49:07 2022 +0000 |
4 |
Commit: Sam James <sam <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu Sep 29 02:16:02 2022 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e172bd67 |
7 |
|
8 |
www-apps/gitea: security bump to 1.17.2 |
9 |
|
10 |
Bug: https://bugs.gentoo.org/868996 |
11 |
Signed-off-by: Tomáš Mózes <hydrapolic <AT> gmail.com> |
12 |
Closes: https://github.com/gentoo/gentoo/pull/27506 |
13 |
Signed-off-by: Sam James <sam <AT> gentoo.org> |
14 |
|
15 |
www-apps/gitea/Manifest | 1 + |
16 |
www-apps/gitea/gitea-1.17.2.ebuild | 125 +++++++++++++++++++++++++++++++++++++ |
17 |
2 files changed, 126 insertions(+) |
18 |
|
19 |
diff --git a/www-apps/gitea/Manifest b/www-apps/gitea/Manifest |
20 |
index 7fa6b63e737a..67c39f569b76 100644 |
21 |
--- a/www-apps/gitea/Manifest |
22 |
+++ b/www-apps/gitea/Manifest |
23 |
@@ -1,3 +1,4 @@ |
24 |
DIST gitea-1.16.7.tar.gz 53657579 BLAKE2B ae9d67fa633bcc5156036f033a4ed084b5b6ac0d71ec6a1ec0d0c88848233f3f0f0c22ca1c33289dc0e9950a8b299e26a88417e03643972f6721f94097b37d85 SHA512 7a31330e46078e215eecfbb2ec28373be1a176790720afbcf9674f3530d66f300d8ef9e47b9b9124cda9ce585d26d40c975e4897e5a3477dcec28b6f2b16735c |
25 |
DIST gitea-1.16.9.tar.gz 53660093 BLAKE2B f289a6525b046efa56b0250a997c1b1957c58447b87d7b0f5a65754ff3278da5dd37e1cf090b6d27c61d779fe2f19c4405aff9be526c5689935fba88c8488ad5 SHA512 b27da6b77ac33829ba3108e54c8fab59fe80f2ce88cc5eeb95ec38186da4b34508cdfb1a5fe0a68013001403a69080ebddb8d5116a73e1cf47e27ee4cc3095f1 |
26 |
DIST gitea-1.17.1.tar.gz 52649181 BLAKE2B b8a444900a3efc9911cad17b32933ada7995dd3424bc92c034222fdf50ea7629fc0b190fad7563c4694228021784c66196ae2f5df533bbcc36e6e2eccd9e57c0 SHA512 9afa5e58e90fcda957f8f5eba76931d5a933554c47965180371c9b73c887810aa67e8e87fc619a1abcb954379de23750e9e93654d518c6ab77b2ca944eb186d6 |
27 |
+DIST gitea-1.17.2.tar.gz 52668293 BLAKE2B 02f50ee5ef30887fb5daf5d3543bdb4b0fe2e4f3903c29beedc134d861fe23df92f4d379d6faacfd984ff203eefff6d6c7dca06e6b974538557e3694f1f2a03b SHA512 fe0176cb4dee724ec91e5f44cb71851368d0e4234c20f17bcccbb422f90c6545184d1f620bbd5999ca24c477e0cf0de7c4a21ce93e3532f29e0b2bba7d03ffb9 |
28 |
|
29 |
diff --git a/www-apps/gitea/gitea-1.17.2.ebuild b/www-apps/gitea/gitea-1.17.2.ebuild |
30 |
new file mode 100644 |
31 |
index 000000000000..c0f056208ec7 |
32 |
--- /dev/null |
33 |
+++ b/www-apps/gitea/gitea-1.17.2.ebuild |
34 |
@@ -0,0 +1,125 @@ |
35 |
+# Copyright 2016-2022 Gentoo Authors |
36 |
+# Distributed under the terms of the GNU General Public License v2 |
37 |
+ |
38 |
+EAPI=8 |
39 |
+ |
40 |
+inherit fcaps go-module tmpfiles systemd flag-o-matic |
41 |
+ |
42 |
+DESCRIPTION="A painless self-hosted Git service" |
43 |
+HOMEPAGE="https://gitea.io https://github.com/go-gitea/gitea" |
44 |
+ |
45 |
+if [[ ${PV} == *9999 ]]; then |
46 |
+ inherit git-r3 |
47 |
+ EGIT_REPO_URI="https://github.com/go-gitea/gitea.git" |
48 |
+else |
49 |
+ SRC_URI="https://github.com/go-gitea/gitea/releases/download/v${PV}/gitea-src-${PV}.tar.gz -> ${P}.tar.gz" |
50 |
+ KEYWORDS="~amd64 ~arm ~arm64 ~x86" |
51 |
+fi |
52 |
+ |
53 |
+S="${WORKDIR}/${PN}-src-${PV}" |
54 |
+ |
55 |
+LICENSE="Apache-2.0 BSD BSD-2 ISC MIT MPL-2.0" |
56 |
+SLOT="0" |
57 |
+IUSE="+acct pam sqlite pie" |
58 |
+ |
59 |
+DEPEND=" |
60 |
+ acct? ( |
61 |
+ acct-group/git |
62 |
+ acct-user/git[gitea] ) |
63 |
+ pam? ( sys-libs/pam )" |
64 |
+RDEPEND="${DEPEND} |
65 |
+ dev-vcs/git" |
66 |
+ |
67 |
+DOCS=( |
68 |
+ custom/conf/app.example.ini CONTRIBUTING.md README.md |
69 |
+) |
70 |
+FILECAPS=( |
71 |
+ -m 711 cap_net_bind_service+ep usr/bin/gitea |
72 |
+) |
73 |
+ |
74 |
+RESTRICT="test" |
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 |
+ |
96 |
+src_configure() { |
97 |
+ # bug 832756 - PIE build issues |
98 |
+ filter-flags -fPIE |
99 |
+ filter-ldflags -fPIE -pie |
100 |
+} |
101 |
+ |
102 |
+src_compile() { |
103 |
+ local gitea_tags=( |
104 |
+ bindata |
105 |
+ $(usev pam) |
106 |
+ $(usex sqlite 'sqlite sqlite_unlock_notify' '') |
107 |
+ ) |
108 |
+ local gitea_settings=( |
109 |
+ "-X code.gitea.io/gitea/modules/setting.CustomConf=${EPREFIX}/etc/gitea/app.ini" |
110 |
+ "-X code.gitea.io/gitea/modules/setting.CustomPath=${EPREFIX}/var/lib/gitea/custom" |
111 |
+ "-X code.gitea.io/gitea/modules/setting.AppWorkPath=${EPREFIX}/var/lib/gitea" |
112 |
+ ) |
113 |
+ local makeenv=( |
114 |
+ DRONE_TAG="${PV}" |
115 |
+ LDFLAGS="-extldflags \"${LDFLAGS}\" ${gitea_settings[*]}" |
116 |
+ TAGS="${gitea_tags[*]}" |
117 |
+ ) |
118 |
+ |
119 |
+ GOFLAGS="" |
120 |
+ if use pie ; then |
121 |
+ GOFLAGS+="-buildmode=pie" |
122 |
+ fi |
123 |
+ |
124 |
+ env "${makeenv[@]}" emake EXTRA_GOFLAGS="${GOFLAGS}" backend |
125 |
+} |
126 |
+ |
127 |
+src_install() { |
128 |
+ dobin gitea |
129 |
+ |
130 |
+ einstalldocs |
131 |
+ |
132 |
+ newconfd "${FILESDIR}/gitea.confd-r1" gitea |
133 |
+ newinitd "${FILESDIR}/gitea.initd-r3" gitea |
134 |
+ newtmpfiles - gitea.conf <<-EOF |
135 |
+ d /run/gitea 0755 git git |
136 |
+ EOF |
137 |
+ systemd_newunit "${FILESDIR}"/gitea.service-r3 gitea.service |
138 |
+ |
139 |
+ insinto /etc/gitea |
140 |
+ newins custom/conf/app.example.ini app.ini |
141 |
+ if use acct; then |
142 |
+ fowners root:git /etc/gitea/{,app.ini} |
143 |
+ fperms g+w,o-rwx /etc/gitea/{,app.ini} |
144 |
+ |
145 |
+ diropts -m0750 -o git -g git |
146 |
+ keepdir /var/lib/gitea /var/lib/gitea/custom /var/lib/gitea/data |
147 |
+ keepdir /var/log/gitea |
148 |
+ fi |
149 |
+} |
150 |
+ |
151 |
+pkg_postinst() { |
152 |
+ fcaps_pkg_postinst |
153 |
+ tmpfiles_process gitea.conf |
154 |
+ |
155 |
+ ewarn "The default JWT signing algorithm changed in 1.15.0 from HS256 (symmetric) to" |
156 |
+ ewarn "RS256 (asymmetric). Gitea OAuth2 tokens (and potentially client secrets) will" |
157 |
+ ewarn "need to be regenerated unless you change your JWT_SIGNING_ALGORITHM back to HS256." |
158 |
+ ewarn "For other breaking changes, see <https://github.com/go-gitea/gitea/releases/tag/v1.15.0>." |
159 |
+} |