Gentoo Archives: gentoo-commits

From: Sam James <sam@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/unrealircd/, net-irc/unrealircd/files/
Date: Sat, 29 Jan 2022 07:02:57
Message-Id: 1643439766.c7a608d77cd26f4bee0362c7af21df67c4fe3a88.sam@gentoo
1 commit: c7a608d77cd26f4bee0362c7af21df67c4fe3a88
2 Author: Sam James <sam <AT> gentoo <DOT> org>
3 AuthorDate: Sat Jan 29 07:02:39 2022 +0000
4 Commit: Sam James <sam <AT> gentoo <DOT> org>
5 CommitDate: Sat Jan 29 07:02:46 2022 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c7a608d7
7
8 net-irc/unrealircd: add 5.2.4, 6.0.2
9
10 Bug: https://bugs.gentoo.org/832272
11 Signed-off-by: Sam James <sam <AT> gentoo.org>
12
13 net-irc/unrealircd/Manifest | 2 +
14 net-irc/unrealircd/files/unrealircd.tmpfiles | 2 +
15 net-irc/unrealircd/unrealircd-5.2.4.ebuild | 175 +++++++++++++++++++++++++
16 net-irc/unrealircd/unrealircd-6.0.2.ebuild | 184 +++++++++++++++++++++++++++
17 4 files changed, 363 insertions(+)
18
19 diff --git a/net-irc/unrealircd/Manifest b/net-irc/unrealircd/Manifest
20 index 44a768ff3f4a..0b7548eca211 100644
21 --- a/net-irc/unrealircd/Manifest
22 +++ b/net-irc/unrealircd/Manifest
23 @@ -1,3 +1,5 @@
24 DIST unrealircd-5.2.2.tar.gz 7192024 BLAKE2B aa700c943cbab1dcc751e32c6cc0608cd27936b0910bbc62987dd2fe87ee5261e7a5eb2aa67dd77ed5ecb39d1d4f149c8810159e2c6f752ee65ce34e46548f60 SHA512 9d36eb1567431bc4a5420bc830bfc8dc89daa08ed1746efd6102e5ef161f67baf52e75e373454df7df6a443c4f575fb300d3c289d4dd99239a6de7d2b2a555a0
25 DIST unrealircd-5.2.3.tar.gz 7200834 BLAKE2B af15b97219d5552a8fe6ecd77b4d0d0b8bcbe8c2f65ab531a7322471c05af3001000cc3799db68291b9abe8c3a5ea7d04559f858774d1b12a764a20fb4ab2bd0 SHA512 c92c631340cb81b030006646a047fde4ee738edc8362870ba4eb979133d851806c7d4764848a35cbd48c787708eab9f051f257008798a494673d9986d16b2405
26 +DIST unrealircd-5.2.4.tar.gz 7201203 BLAKE2B 06afc8b5e28bbd56971b2ce21da3e000e39366444472786891bfe000754f5fed37b59850f9539b4f01914d6b33c1f9f17a15fe69569620ba5213f39fce1cfcad SHA512 b6784d011bc56b0b8253d61fb1edddb2133e791e9ce4ae978f90059563d11f3f7b3ebca1cf13765b4077ebc39f0699e101bdfc71cbb0c5cf51d508c5a5fdacb3
27 DIST unrealircd-6.0.1.1.tar.gz 8616313 BLAKE2B 9b8462523d7605ce7bf17ccc6aed3455a9f100826ee6a1554b3576654d611e8a0a68594f5fb8a6b3d9d929c0b52ca8cf33ece9bf6898453789b70cdea36b6df0 SHA512 44bf9358d6159c298f8a3e97e16aa6e7364e06c4e59bb9e12bc34610414bbabb9cd8049c164260ee78fcdcafc669716eb03390aa8f4f8b097b65298d074f9ab0
28 +DIST unrealircd-6.0.2.tar.gz 8672255 BLAKE2B d52f2984f32331c489528b429f4671189713e4e308a7a7fd2f70933bfd606a938a9b6a6e581170b41fa9a948d1cc04c0cd8bb90c595c01c39b473cf341494a27 SHA512 041f97ad82d89222ad49bdc7db83869fc5133a049dd5354c34759c33c16307b9d60c25d3ef4e19a549059e3a0030699d061bd03fa8118428ded1f1e79d483398
29
30 diff --git a/net-irc/unrealircd/files/unrealircd.tmpfiles b/net-irc/unrealircd/files/unrealircd.tmpfiles
31 new file mode 100644
32 index 000000000000..37afe71d1d30
33 --- /dev/null
34 +++ b/net-irc/unrealircd/files/unrealircd.tmpfiles
35 @@ -0,0 +1,2 @@
36 +d /run/unrealircd 755 unrealircd unrealircd
37 +
38
39 diff --git a/net-irc/unrealircd/unrealircd-5.2.4.ebuild b/net-irc/unrealircd/unrealircd-5.2.4.ebuild
40 new file mode 100644
41 index 000000000000..8c1dd56eddc6
42 --- /dev/null
43 +++ b/net-irc/unrealircd/unrealircd-5.2.4.ebuild
44 @@ -0,0 +1,175 @@
45 +# Copyright 1999-2022 Gentoo Authors
46 +# Distributed under the terms of the GNU General Public License v2
47 +
48 +EAPI=7
49 +
50 +SSL_CERT_MANDATORY=1
51 +inherit autotools ssl-cert systemd
52 +
53 +DESCRIPTION="An advanced Internet Relay Chat daemon"
54 +HOMEPAGE="https://www.unrealircd.org/"
55 +SRC_URI="https://www.unrealircd.org/downloads/${P}.tar.gz"
56 +
57 +LICENSE="GPL-2"
58 +SLOT="0"
59 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
60 +IUSE="class-nofakelag curl +operoverride operoverride-verify +prefixaq showlistmodes"
61 +
62 +RDEPEND="acct-group/unrealircd
63 + acct-user/unrealircd
64 + >=app-crypt/argon2-20171227-r1:=
65 + dev-libs/libpcre2
66 + dev-libs/libsodium:=
67 + dev-libs/openssl:0=
68 + >=net-dns/c-ares-1.7:=
69 + virtual/libcrypt:=
70 + curl? ( net-misc/curl[adns] )"
71 +DEPEND="${RDEPEND}"
72 +BDEPEND="virtual/pkgconfig"
73 +
74 +DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} )
75 +
76 +src_prepare() {
77 + # QA check against bundled pkgs
78 + rm -r extras || die
79 +
80 + # building third-party modules (which we don't do) cause a sandbox violation
81 + # bug 704444
82 + echo "" > src/buildmod || die
83 +
84 + sed -e 's/$(MODULEFLAGS)/$(LDFLAGS) &/' -i src/modules/{,*/}Makefile.in || die
85 +
86 + if use class-nofakelag; then
87 + sed -i -e 's:^//#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die
88 + fi
89 +
90 + # File is missing from the 5.0.9.1 tarball
91 + sed -i -e '/unrealircd-upgrade-script/d' configure.ac || die
92 +
93 + default
94 + eautoreconf
95 +}
96 +
97 +src_configure() {
98 + # Default value for privatelibdir adds a build path to -Wl,-rpath.
99 + econf \
100 + --with-bindir="${EPREFIX}"/usr/bin \
101 + --with-cachedir="${EPREFIX}"/var/lib/${PN} \
102 + --with-confdir="${EPREFIX}"/etc/${PN} \
103 + --with-datadir="${EPREFIX}"/var/lib/${PN} \
104 + --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \
105 + --with-logdir="${EPREFIX}"/var/log/${PN} \
106 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)"/${PN}/modules \
107 + --without-privatelibdir \
108 + --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \
109 + --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \
110 + --with-maxconnections=1024 \
111 + --with-nick-history=2000 \
112 + --with-permissions=0640 \
113 + --with-system-argon2 \
114 + --with-system-cares \
115 + --with-system-pcre2 \
116 + --enable-dynamic-linking \
117 + --enable-ssl="${EPREFIX}"/usr \
118 + $(use_enable curl libcurl "${EPREFIX}"/usr) \
119 + $(use_enable prefixaq) \
120 + $(use_with showlistmodes) \
121 + $(use_with !operoverride no-operoverride) \
122 + $(use_with operoverride-verify)
123 +}
124 +
125 +src_install() {
126 + keepdir /var/log/${PN}
127 + keepdir /var/lib/${PN}/tmp
128 +
129 + newbin src/ircd ${PN}
130 +
131 + (
132 + cd src/modules || die
133 + for subdir in $(find . -type d -print); do
134 + if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then
135 + exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}"
136 + doexe "${subdir}"/*.so
137 + fi
138 + done
139 + )
140 +
141 + insinto /etc/${PN}
142 + # Purposefully omitting the examples/ and ssl/ subdirectories. ssl
143 + # is redundant with app-misc/ca-certificates and examples will all
144 + # be in docs anyway.
145 + doins -r doc/conf/{aliases,help}
146 + doins doc/conf/*.conf
147 + newins doc/conf/examples/example.conf ${PN}.conf
148 + keepdir /etc/${PN}/tls
149 +
150 + einstalldocs
151 +
152 + newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN}
153 + newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN}
154 +
155 + # config should be read-only
156 + fperms -R 0640 /etc/${PN}
157 + fperms 0750 /etc/${PN}{,/aliases,/help}
158 + fperms 0750 /etc/${PN}/tls
159 + # state is editable but not owned by unrealircd directly
160 + fperms 0770 /var/log/${PN}
161 + fperms 0770 /var/lib/${PN}{,/tmp}
162 + fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN}
163 +
164 + # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix
165 + # that to look for ca-certificates-provided file instead. %s is
166 + # CONFDIR. #618066
167 + dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt
168 +
169 + systemd_dounit "${FILESDIR}"/${PN}.service
170 +}
171 +
172 +pkg_postinst() {
173 + # Move docert call from src_install() to install_cert in pkg_postinst for
174 + # bug #201682
175 + if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then
176 + if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then
177 + ewarn "The location ${PN} looks for SSL certificates has changed"
178 + ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls."
179 + ewarn "Please move your existing certificates."
180 + else
181 + (
182 + umask 0037
183 + install_cert /etc/${PN}/tls/server.cert
184 + chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.*
185 + ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem
186 + )
187 + fi
188 + fi
189 +
190 + local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf
191 + # Fix up the default cloak keys.
192 + if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then
193 + ebegin "Generating cloak-keys"
194 + local keys=(
195 + $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 3")
196 + )
197 + [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]]
198 + eend $?
199 +
200 + ebegin "Substituting cloak-keys into ${unrealircd_conf}"
201 + sed -i \
202 + -e '/cloak-keys/ {
203 +n
204 +s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/
205 +n
206 +s/"and another one";/"'"${keys[1]}"'";/
207 +n
208 +s/"and another one";/"'"${keys[2]}"'";/
209 +}' \
210 + "${unrealircd_conf}"
211 + eend $?
212 + fi
213 +
214 + elog "UnrealIRCd will not run until you've set up ${EROOT}/etc/unrealircd/unrealircd.conf"
215 + elog
216 + elog "You can also configure ${PN} start at boot with rc-update(1)."
217 + elog "It is recommended to run unrealircd as an unprivileged user."
218 + elog "The provided init.d script does this for you."
219 +}
220
221 diff --git a/net-irc/unrealircd/unrealircd-6.0.2.ebuild b/net-irc/unrealircd/unrealircd-6.0.2.ebuild
222 new file mode 100644
223 index 000000000000..275c8a7ffa4b
224 --- /dev/null
225 +++ b/net-irc/unrealircd/unrealircd-6.0.2.ebuild
226 @@ -0,0 +1,184 @@
227 +# Copyright 1999-2022 Gentoo Authors
228 +# Distributed under the terms of the GNU General Public License v2
229 +
230 +EAPI=8
231 +
232 +SSL_CERT_MANDATORY=1
233 +inherit autotools ssl-cert systemd tmpfiles
234 +
235 +DESCRIPTION="An advanced Internet Relay Chat daemon"
236 +HOMEPAGE="https://www.unrealircd.org/"
237 +SRC_URI="https://www.unrealircd.org/downloads/${P}.tar.gz"
238 +
239 +LICENSE="GPL-2"
240 +SLOT="0"
241 +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86 ~amd64-linux"
242 +IUSE="class-nofakelag curl geoip +operoverride operoverride-verify"
243 +
244 +RDEPEND="acct-group/unrealircd
245 + acct-user/unrealircd
246 + >=app-crypt/argon2-20171227-r1:=
247 + dev-libs/libpcre2
248 + dev-libs/libsodium:=
249 + dev-libs/openssl:=
250 + dev-libs/jansson:=
251 + >=net-dns/c-ares-1.7:=
252 + virtual/libcrypt:=
253 + curl? ( net-misc/curl[adns] )
254 + geoip? ( dev-libs/libmaxminddb )"
255 +DEPEND="${RDEPEND}"
256 +BDEPEND="virtual/pkgconfig"
257 +
258 +DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} )
259 +
260 +src_prepare() {
261 + # QA check against bundled pkgs
262 + rm -r extras || die
263 +
264 + # building third-party modules (which we don't do) cause a sandbox violation
265 + # bug 704444
266 + echo "" > src/buildmod || die
267 +
268 + sed -e 's/$(MODULEFLAGS)/$(LDFLAGS) &/' -i src/modules/{,*/}Makefile.in || die
269 +
270 + if use class-nofakelag; then
271 + sed -i -e 's:^//#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die
272 + fi
273 +
274 + # File is missing from the 5.0.9.1 tarball
275 + sed -i -e '/unrealircd-upgrade-script/d' configure.ac || die
276 +
277 + default
278 + eautoreconf
279 +}
280 +
281 +src_configure() {
282 + # Default value for privatelibdir adds a build path to -Wl,-rpath.
283 + econf \
284 + --with-bindir="${EPREFIX}"/usr/bin \
285 + --with-cachedir="${EPREFIX}"/var/lib/${PN} \
286 + --with-confdir="${EPREFIX}"/etc/${PN} \
287 + --with-datadir="${EPREFIX}"/var/lib/${PN} \
288 + --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \
289 + --with-logdir="${EPREFIX}"/var/log/${PN} \
290 + --with-modulesdir="${EPREFIX}/usr/$(get_libdir)"/${PN}/modules \
291 + --without-privatelibdir \
292 + --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \
293 + --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \
294 + --with-maxconnections=1024 \
295 + --with-nick-history=2000 \
296 + --with-permissions=0640 \
297 + --with-system-argon2 \
298 + --with-system-cares \
299 + --with-system-pcre2 \
300 + --with-system-sodium \
301 + --with-system-jansson \
302 + --enable-dynamic-linking \
303 + --with-controlfile="${EPREFIX}"/run/${PN}/unrealircd.ctl \
304 + --enable-ssl="${EPREFIX}"/usr \
305 + $(use_enable curl libcurl "${EPREFIX}"/usr) \
306 + $(use_with !operoverride no-operoverride) \
307 + $(use_with operoverride-verify) \
308 + $(use_enable geoip libmaxminddb)
309 +}
310 +
311 +src_install() {
312 + keepdir /var/log/${PN}
313 + keepdir /var/lib/${PN}/tmp
314 +
315 + newbin src/ircd ${PN}
316 + dobin src/unrealircdctl
317 +
318 + newtmpfiles "${FILESDIR}"/unrealircd.tmpfiles unrealircd.conf
319 +
320 + (
321 + cd src/modules || die
322 + for subdir in $(find . -type d -print); do
323 + if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then
324 + exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}"
325 + doexe "${subdir}"/*.so
326 + fi
327 + done
328 + )
329 +
330 + insinto /etc/${PN}
331 + # Purposefully omitting the examples/ and ssl/ subdirectories. ssl
332 + # is redundant with app-misc/ca-certificates and examples will all
333 + # be in docs anyway.
334 + doins -r doc/conf/{aliases,help}
335 + doins doc/conf/*.conf
336 + newins doc/conf/examples/example.conf ${PN}.conf
337 + keepdir /etc/${PN}/tls
338 +
339 + einstalldocs
340 +
341 + newinitd "${FILESDIR}"/${PN}.initd-r3 ${PN}
342 + newconfd "${FILESDIR}"/${PN}.confd-r4 ${PN}
343 +
344 + # config should be read-only
345 + fperms -R 0640 /etc/${PN}
346 + fperms 0750 /etc/${PN}{,/aliases,/help}
347 + fperms 0750 /etc/${PN}/tls
348 + # state is editable but not owned by unrealircd directly
349 + fperms 0770 /var/log/${PN}
350 + fperms 0770 /var/lib/${PN}{,/tmp}
351 + fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN}
352 +
353 + # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix
354 + # that to look for ca-certificates-provided file instead. %s is
355 + # CONFDIR. #618066
356 + dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt
357 +
358 + systemd_dounit "${FILESDIR}"/${PN}.service
359 +}
360 +
361 +pkg_postinst() {
362 + tmpfiles_process unrealircd.conf
363 +
364 + # Move docert call from src_install() to install_cert in pkg_postinst for
365 + # bug #201682
366 + if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then
367 + if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then
368 + ewarn "The location ${PN} looks for SSL certificates has changed"
369 + ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls."
370 + ewarn "Please move your existing certificates."
371 + else
372 + (
373 + umask 0037
374 + install_cert /etc/${PN}/tls/server.cert
375 + chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.*
376 + ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem
377 + )
378 + fi
379 + fi
380 +
381 + local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf
382 + # Fix up the default cloak keys.
383 + if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"Oozahho1raezoh0iMee4ohvegaifahv5xaepeitaich9tahdiquaid0geecipahdauVaij3zieph4ahi";$' "${unrealircd_conf}"; then
384 + ebegin "Generating cloak-keys"
385 + local keys=(
386 + $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 6 | head -n 3")
387 + )
388 + [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]]
389 + eend $?
390 +
391 + ebegin "Substituting cloak-keys into ${unrealircd_conf}"
392 + sed -i \
393 + -e '/cloak-keys/ {
394 +n
395 +s/"Oozahho1raezoh0iMee4ohvegaifahv5xaepeitaich9tahdiquaid0geecipahdauVaij3zieph4ahi";/'${keys[0]}'/
396 +n
397 +s/"and another one";/'${keys[1]}'/
398 +n
399 +s/"and another one";/'${keys[2]}'/
400 +}' \
401 + "${unrealircd_conf}"
402 + eend $?
403 + fi
404 +
405 + elog "UnrealIRCd will not run until you've set up ${EROOT}/etc/unrealircd/unrealircd.conf"
406 + elog
407 + elog "You can also configure ${PN} start at boot with rc-update(1)."
408 + elog "It is recommended to run unrealircd as an unprivileged user."
409 + elog "The provided init.d script does this for you."
410 +}