Gentoo Archives: gentoo-commits

From: Michael Palimaka <kensington@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-irc/unrealircd/
Date: Tue, 02 Jun 2020 13:27:11
Message-Id: 1591104414.d68571210ff5c814d42dd55219a26dc79a13ab0c.kensington@gentoo
1 commit: d68571210ff5c814d42dd55219a26dc79a13ab0c
2 Author: Michael Palimaka <kensington <AT> gentoo <DOT> org>
3 AuthorDate: Tue Jun 2 13:26:35 2020 +0000
4 Commit: Michael Palimaka <kensington <AT> gentoo <DOT> org>
5 CommitDate: Tue Jun 2 13:26:54 2020 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d6857121
7
8 net-irc/unrealircd: version bump 5.0.5.1
9
10 Package-Manager: Portage-2.3.99, Repoman-2.3.22
11 Signed-off-by: Michael Palimaka <kensington <AT> gentoo.org>
12
13 net-irc/unrealircd/Manifest | 1 +
14 net-irc/unrealircd/unrealircd-5.0.5.1.ebuild | 171 +++++++++++++++++++++++++++
15 2 files changed, 172 insertions(+)
16
17 diff --git a/net-irc/unrealircd/Manifest b/net-irc/unrealircd/Manifest
18 index 3210cf1e4f1..099df45415a 100644
19 --- a/net-irc/unrealircd/Manifest
20 +++ b/net-irc/unrealircd/Manifest
21 @@ -1,3 +1,4 @@
22 DIST unrealircd-4.2.4.1.tar.gz 6090725 BLAKE2B 817a7c2a13a495944676d08ed90b36f6795fe43ee171efc6661980e6da9a8cc8d98c4fb0eb8221ac6af85ab1a9b5578a2e992d7b41696434430e58918bc30145 SHA512 752573c4af1f92a10739bb2b0cdaade1948207b46d28ae5177e1dfd6b0663044bc22dce5ffe8549882cd70325e3ef7e3296182fffbb84e08d59dbbdd6551a686
23 DIST unrealircd-5.0.3.1.tar.gz 4902967 BLAKE2B d3c2e2399091b3aa9906583231d5ba42534234c4c40ce7412609fe8866438848bb69a4fc3cd378e0ed9ab13970ba2a7b27ba9fccdaaaea3585ec0a05aa5f89c2 SHA512 1bf3e2aab2f14d68a02ae6925d9e91135a92cf08886f703be0cd203c8b4b323bfc3930254d2bda381e60b3991f379115c954fa1fd262e28d7a27172a25bb172a
24 DIST unrealircd-5.0.4.tar.gz 4907069 BLAKE2B 223c45dbd060cf13afabafd13325bb76889fa64f663fff1be753de703df50265c6a05658edfe7300e97cf1431f54992b7e37801ef4773b02add9d5edca80237c SHA512 cdd83fa55bdf1960499fff48ba656b66cf5a1c43a360658bc37add217af36933f00280f7eaddcbbd39720058a401650b944a5f0ce79ae3ca6749bd58c9cd5241
25 +DIST unrealircd-5.0.5.1.tar.gz 4957950 BLAKE2B 7e92f941662cec0a202589aecf372578e568559360761e17735d4637785ff737ec24c07593b666dd830b0fc1f36293a700693134c34ad32095839a73e7368677 SHA512 57272afa9b758c71522730a5a5a45819731271c02b25f6e0b9da30671d38ecfbc1adc0e91eef9dc4c1d67b2e1fa4fc9a09377152f2b0e3e97e8f7fe4f144288b
26
27 diff --git a/net-irc/unrealircd/unrealircd-5.0.5.1.ebuild b/net-irc/unrealircd/unrealircd-5.0.5.1.ebuild
28 new file mode 100644
29 index 00000000000..d2f7a8a96ec
30 --- /dev/null
31 +++ b/net-irc/unrealircd/unrealircd-5.0.5.1.ebuild
32 @@ -0,0 +1,171 @@
33 +# Copyright 1999-2020 Gentoo Authors
34 +# Distributed under the terms of the GNU General Public License v2
35 +
36 +EAPI=7
37 +
38 +SSL_CERT_MANDATORY=1
39 +inherit ssl-cert systemd
40 +
41 +DESCRIPTION="An advanced Internet Relay Chat daemon"
42 +HOMEPAGE="https://www.unrealircd.org/"
43 +SRC_URI="https://www.unrealircd.org/downloads/${P}.tar.gz"
44 +
45 +LICENSE="GPL-2"
46 +SLOT="0"
47 +KEYWORDS="~amd64 ~ppc ~x86 ~amd64-linux"
48 +IUSE="class-nofakelag curl libressl +operoverride operoverride-verify +prefixaq showlistmodes"
49 +
50 +RDEPEND="
51 + acct-group/unrealircd
52 + acct-user/unrealircd
53 + >=app-crypt/argon2-20171227-r1:=
54 + dev-libs/libpcre2
55 + >=net-dns/c-ares-1.7:=
56 + !libressl? ( dev-libs/openssl:0= )
57 + libressl? ( dev-libs/libressl:= )
58 + curl? ( net-misc/curl[adns] )
59 +"
60 +DEPEND="${RDEPEND}"
61 +BDEPEND="virtual/pkgconfig"
62 +
63 +DOCS=( doc/{Authors,Donation,RELEASE-NOTES.md,tao.of.irc,technical/,translations.txt} )
64 +
65 +src_prepare() {
66 + # QA check against bundled pkgs
67 + rm -r extras || die
68 +
69 + # building third-party modules (which we don't do) cause a sandbox violation
70 + # bug 704444
71 + echo "" > src/buildmod || die
72 +
73 + if use class-nofakelag; then
74 + sed -i -e 's:#undef\( FAKELAG_CONFIGURABLE\):#define\1:' include/config.h || die
75 + fi
76 +
77 + eapply_user
78 +}
79 +
80 +src_configure() {
81 + # Default value for privatelibdir adds a build path to -Wl,-rpath.
82 + econf \
83 + --with-bindir="${EPREFIX}"/usr/bin \
84 + --with-cachedir="${EPREFIX}"/var/lib/${PN} \
85 + --with-confdir="${EPREFIX}"/etc/${PN} \
86 + --with-datadir="${EPREFIX}"/var/lib/${PN} \
87 + --with-docdir="${EPREFIX}"/usr/share/doc/${PF} \
88 + --with-logdir="${EPREFIX}"/var/log/${PN} \
89 + --with-modulesdir="${EPREFIX}"/usr/"$(get_libdir)"/${PN}/modules \
90 + --without-privatelibdir \
91 + --with-pidfile="${EPREFIX}"/run/${PN}/ircd.pid \
92 + --with-tmpdir="${EPREFIX}"/var/lib/${PN}/tmp \
93 + --with-maxconnections=1024 \
94 + --with-nick-history=2000 \
95 + --with-permissions=0640 \
96 + --with-system-argon2 \
97 + --with-system-cares \
98 + --with-system-pcre2 \
99 + --enable-dynamic-linking \
100 + --enable-ssl="${EPREFIX}"/usr \
101 + $(use_enable curl libcurl "${EPREFIX}"/usr) \
102 + $(use_enable prefixaq) \
103 + $(use_with showlistmodes) \
104 + $(use_with !operoverride no-operoverride) \
105 + $(use_with operoverride-verify)
106 +}
107 +
108 +src_install() {
109 + keepdir /var/log/${PN}
110 + keepdir /var/lib/${PN}/tmp
111 +
112 + newbin src/ircd ${PN}
113 +
114 + (
115 + cd src/modules || die
116 + for subdir in $(find . -type d -print); do
117 + if [[ -n $(shopt -s nullglob; echo ${subdir}/*.so) ]]; then
118 + exeinto /usr/$(get_libdir)/${PN}/modules/"${subdir}"
119 + doexe "${subdir}"/*.so
120 + fi
121 + done
122 + )
123 +
124 + insinto /etc/${PN}
125 + # Purposefully omitting the examples/ and ssl/ subdirectories. ssl
126 + # is redundant with app-misc/ca-certificates and examples will all
127 + # be in docs anyway.
128 + doins -r doc/conf/{aliases,help}
129 + doins doc/conf/*.conf
130 + newins doc/conf/examples/example.conf ${PN}.conf
131 + keepdir /etc/${PN}/tls
132 +
133 + einstalldocs
134 +
135 + newinitd "${FILESDIR}"/${PN}.initd-r2 ${PN}
136 + newconfd "${FILESDIR}"/${PN}.confd-r3 ${PN}
137 +
138 + # config should be read-only
139 + fperms -R 0640 /etc/${PN}
140 + fperms 0750 /etc/${PN}{,/aliases,/help}
141 + fperms 0750 /etc/${PN}/tls
142 + # state is editable but not owned by unrealircd directly
143 + fperms 0770 /var/log/${PN}
144 + fperms 0770 /var/lib/${PN}{,/tmp}
145 + fowners -R root:unrealircd /{etc,var/{lib,log}}/${PN}
146 +
147 + # By default looks in /etc/unrealircd/ssl/curl-ca-bundle.crt. Fix
148 + # that to look for ca-certificates-provided file instead. %s is
149 + # CONFDIR. #618066
150 + dosym ../../ssl/certs/ca-certificates.crt /etc/${PN}/tls/curl-ca-bundle.crt
151 +
152 + insinto $(systemd_get_systemunitdir)
153 + doins "${FILESDIR}"/${PN}.service
154 +}
155 +
156 +pkg_postinst() {
157 + # Move docert call from src_install() to install_cert in pkg_postinst for
158 + # bug #201682
159 + if [[ ! -f "${EROOT}"/etc/${PN}/tls/server.cert.key ]]; then
160 + if [[ -f "${EROOT}"/etc/${PN}/ssl/server.cert.key ]]; then
161 + ewarn "The location ${PN} looks for SSL certificates has changed"
162 + ewarn "from ${EROOT}/etc/${PN}/ssl to ${EROOT}/etc/${PN}/tls."
163 + ewarn "Please move your existing certificates."
164 + else
165 + (
166 + umask 0037
167 + install_cert /etc/${PN}/tls/server.cert
168 + chown unrealircd "${EROOT}"/etc/${PN}/tls/server.cert.*
169 + ln -snf server.cert.key "${EROOT}"/etc/${PN}/tls/server.key.pem
170 + )
171 + fi
172 + fi
173 +
174 + local unrealircd_conf="${EROOT}"/etc/${PN}/${PN}.conf
175 + # Fix up the default cloak keys.
176 + if grep -qe '"and another one";$' "${unrealircd_conf}" && grep -qe '"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";$' "${unrealircd_conf}"; then
177 + ebegin "Generating cloak-keys"
178 + local keys=(
179 + $(su ${PN} -s /bin/sh -c "${PN} -k 2>&1 | tail -n 3")
180 + )
181 + [[ -n ${keys[0]} || -n ${keys[1]} || -n ${keys[2]} ]]
182 + eend $?
183 +
184 + ebegin "Substituting cloak-keys into ${unrealircd_conf}"
185 + sed -i \
186 + -e '/cloak-keys/ {
187 +n
188 +s/"aoAr1HnR6gl3sJ7hVz4Zb7x4YwpW";/"'"${keys[0]}"'";/
189 +n
190 +s/"and another one";/"'"${keys[1]}"'";/
191 +n
192 +s/"and another one";/"'"${keys[2]}"'";/
193 +}' \
194 + "${unrealircd_conf}"
195 + eend $?
196 + fi
197 +
198 + elog "UnrealIRCd will not run until you've set up /etc/unrealircd/unrealircd.conf"
199 + elog
200 + elog "You can also configure ${PN} start at boot with rc-update(1)."
201 + elog "It is recommended to run unrealircd as an unprivileged user."
202 + elog "The provided init.d script does this for you."
203 +}