Gentoo Archives: gentoo-commits

From: Joonas Niilola <juippis@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] repo/gentoo:master commit in: net-misc/asterisk/
Date: Sat, 30 Nov 2019 07:50:17
Message-Id: 1575100136.b44a1be8b8e28517ce843e630e30ccc1ddf3fae4.juippis@gentoo
1 commit: b44a1be8b8e28517ce843e630e30ccc1ddf3fae4
2 Author: Jaco Kroon <jaco <AT> uls <DOT> co <DOT> za>
3 AuthorDate: Sun Nov 10 18:29:19 2019 +0000
4 Commit: Joonas Niilola <juippis <AT> gentoo <DOT> org>
5 CommitDate: Sat Nov 30 07:48:56 2019 +0000
6 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=b44a1be8
7
8 net-misc/asterisk: version bump to 13.29.1 + maintainership
9
10 Converted to GLEP 81 for user+group.
11 Consolidated a few DEPEND issues.
12 Dropped pkg_config phase function.
13 Took maintainership.
14 Fixed a bunch of other issues from pkgcheck (${D} and ${ROOT} not having
15 a / following it directly).
16 Bumped to EAPI=7
17 Use $ED over $D where applicable.
18 Fix statsd integration.
19 Update depend on virtual/mysql to db/mysql-connector-c
20 Enable NOISY_BUILD as requested (instructed) by slyfox.
21 Fix /usr/share/doc/${PV} being asterisk: owned.
22 Make SSL optional.
23
24 This commit enables progress on the GLSA bug: https://bugs.gentoo.org/689796
25
26 Might close: https://bugs.gentoo.org/594160 (SIGILL, may be GRSEC, or #667498)
27
28 Package-Manager: Portage-2.3.76, Repoman-2.3.16
29 Closes: https://bugs.gentoo.org/631464
30 Closes: https://bugs.gentoo.org/654710
31 Closes: https://bugs.gentoo.org/656472
32 Closes: https://bugs.gentoo.org/666004
33 Closes: https://bugs.gentoo.org/667498
34 Closes: https://bugs.gentoo.org/670522
35 Closes: https://bugs.gentoo.org/679804
36 Closes: https://bugs.gentoo.org/686906
37 Closes: https://bugs.gentoo.org/692696
38 Signed-off-by: Jaco Kroon <jaco <AT> uls.co.za>
39 Closes: https://github.com/gentoo/gentoo/pull/13649
40 Signed-off-by: Joonas Niilola <juippis <AT> gentoo.org>
41
42 net-misc/asterisk/Manifest | 2 +
43 net-misc/asterisk/asterisk-13.29.1.ebuild | 327 ++++++++++++++++++++++++++++++
44 net-misc/asterisk/metadata.xml | 21 +-
45 3 files changed, 342 insertions(+), 8 deletions(-)
46
47 diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest
48 index 01ba4b2e0a9..613d2ddb039 100644
49 --- a/net-misc/asterisk/Manifest
50 +++ b/net-misc/asterisk/Manifest
51 @@ -1,4 +1,6 @@
52 DIST asterisk-11.25.3.tar.gz 35134682 BLAKE2B 9da24d5d6a674ab660edb103e5fc56ddfbcc58cd86166cc08cceb0598a63b51eae36133565e09a30ad11ff6623ba8945437dfb561d2916f68341d398540dabce SHA512 9c0521d55e5b69663ea40066d52e397ba6c165a4b20cd0a1e5e375b9c0e5a6e4f37908e50b0b580e288dec9be252af9a8bce7bceb03ba029f902fb757e6311ed
53 DIST asterisk-13.23.1.tar.gz 33064056 BLAKE2B 7f531766df5f2db29b562e7c7d4e265d5cf610f192188691279c0294195b835bb62beef19d7e9554862e6b44764064b21d50a3e307bbf85dd12b67a2df8be459 SHA512 227bfc80b2e6382019d608296c4e1c8e992ba867636fa2c8ee578d0aa406b8828bf7962b24035d9b581c433afd18be7cbe98eb954112661b9759b6296ee686dd
54 +DIST asterisk-13.29.1.tar.gz 33061969 BLAKE2B b581a3b706438fd0f685cab9c6148f9803d09f878d2ec824cd7b3edb299d5514e7c473622f135caa8a7905ab70dff915b83ff9dcbcf80cb04955ba8dea03c968 SHA512 3c32324f67413abdf73a3146b8e280fd23d65854df23b87b01e7f20c635c304606f6216c49c6dcd44c3a09b945d15124a5d70182c4b69e5ed8e542a13589d2df
55 DIST gentoo-asterisk-patchset-3.17.tar.bz2 5074 BLAKE2B 3c945e77b54b2449253acb9fcea8d289a7a3184729190622c14aff5557d36c93556efa83320fe4e7ae84021960c09f35ae9f997e8015706eef933aae2948309e SHA512 37f86f3c699b2643afd8080391e817a282571694bb56e00efd0734918dbc33d6c12a2463dbc24667597420863b4f506870140fbb8ef3f1700124ef790ae7252d
56 DIST gentoo-asterisk-patchset-4.07.tar.bz2 2471 BLAKE2B d9026e7e8c12431496c24f204d117ed715741623195af10c838ec3ac5ce6a26fbb2d76d4c45c538881b532084e2ce74d2de83a27a0abaa5f65791be91416ef6d SHA512 73a9f92e6a737687c311941100c45bbc573f54fa79d0284318996c0d70274a4d2218693406d71b371496d27123d4d99bbc159974388e6547a682c06084d3b4c5
57 +DIST gentoo-asterisk-patchset-4.08.tar.bz2 2176 BLAKE2B 7f8c9b5fda855091e66b2534d2be23fb1616f565480459f71f766826e5deeeecb24899e2ee9eefe74323e892624d32ab954ec7e9be6a002431ff029fc13493ed SHA512 365c1b8628882c48c279e1fd77d982e6d0820ba7d7122e97bb4988f875d7010caa956798c833c3b01d389004fa08a63a9de2c1b452c9e5701c6106e29fd8e9e1
58
59 diff --git a/net-misc/asterisk/asterisk-13.29.1.ebuild b/net-misc/asterisk/asterisk-13.29.1.ebuild
60 new file mode 100644
61 index 00000000000..94ab40d59c9
62 --- /dev/null
63 +++ b/net-misc/asterisk/asterisk-13.29.1.ebuild
64 @@ -0,0 +1,327 @@
65 +# Copyright 1999-2019 Gentoo Authors
66 +# Distributed under the terms of the GNU General Public License v2
67 +
68 +EAPI=7
69 +inherit autotools linux-info systemd
70 +
71 +MY_P="${PN}-${PV/_/-}"
72 +
73 +DESCRIPTION="Asterisk: A Modular Open Source PBX System"
74 +HOMEPAGE="https://www.asterisk.org/"
75 +SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
76 + https://downloads.uls.co.za/gentoo/asterisk/gentoo-asterisk-patchset-4.08.tar.bz2"
77 +LICENSE="GPL-2"
78 +SLOT="0"
79 +KEYWORDS="~amd64 ~ppc ~x86"
80 +
81 +IUSE_VOICEMAIL_STORAGE="
82 + +voicemail_storage_file
83 + voicemail_storage_odbc
84 + voicemail_storage_imap
85 +"
86 +IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc ldap libedit libressl lua mysql newt +samples odbc osplookup oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog vorbis xmpp"
87 +IUSE_EXPAND="VOICEMAIL_STORAGE"
88 +REQUIRED_USE="gtalk? ( xmpp )
89 + ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
90 + voicemail_storage_odbc? ( odbc )
91 +"
92 +
93 +PATCHES=( "${WORKDIR}/asterisk-patchset" )
94 +
95 +DEPEND="acct-user/asterisk
96 + acct-group/asterisk
97 + dev-db/sqlite:3
98 + dev-libs/popt
99 + dev-libs/jansson
100 + dev-libs/libxml2:2
101 + dev-libs/libxslt
102 + sys-libs/ncurses:0=
103 + sys-libs/zlib:=
104 +
105 + alsa? ( media-libs/alsa-lib )
106 + bluetooth? ( net-wireless/bluez:= )
107 + calendar? (
108 + net-libs/neon:=
109 + dev-libs/libical:=
110 + dev-libs/iksemel
111 + )
112 + caps? ( sys-libs/libcap )
113 + cluster? ( sys-cluster/corosync )
114 + curl? ( net-misc/curl )
115 + dahdi? (
116 + net-libs/libpri
117 + net-misc/dahdi-tools
118 + )
119 + freetds? ( dev-db/freetds )
120 + gtalk? ( dev-libs/iksemel )
121 + http? ( dev-libs/gmime:2.6 )
122 + iconv? ( virtual/libiconv )
123 + ilbc? ( dev-libs/ilbc-rfc3951 )
124 + ldap? ( net-nds/openldap )
125 + libedit? ( dev-libs/libedit )
126 + lua? ( dev-lang/lua:* )
127 + mysql? ( dev-db/mysql-connector-c:= )
128 + newt? ( dev-libs/newt )
129 + odbc? ( dev-db/unixODBC )
130 + osplookup? ( net-libs/osptoolkit )
131 + pjproject? ( net-libs/pjproject )
132 + portaudio? ( media-libs/portaudio )
133 + postgres? ( dev-db/postgresql:* )
134 + radius? ( net-dialup/freeradius-client )
135 + snmp? ( net-analyzer/net-snmp:= )
136 + span? ( media-libs/spandsp )
137 + speex? (
138 + media-libs/speex
139 + media-libs/speexdsp
140 + )
141 + srtp? ( net-libs/libsrtp:0 )
142 + ssl? (
143 + !libressl? ( dev-libs/openssl:0= )
144 + libressl? ( dev-libs/libressl:0= )
145 + )
146 + vorbis? ( media-libs/libvorbis )
147 + voicemail_storage_imap? ( virtual/imap-c-client )
148 + xmpp? ( dev-libs/iksemel )
149 +"
150 +
151 +RDEPEND="${DEPEND}
152 + net-misc/asterisk-core-sounds
153 + net-misc/asterisk-extra-sounds
154 + net-misc/asterisk-moh-opsound
155 +
156 + selinux? ( sec-policy/selinux-asterisk )
157 + syslog? ( virtual/logger )"
158 +
159 +BDEPEND="virtual/pkgconfig"
160 +
161 +S="${WORKDIR}/${MY_P}"
162 +
163 +QA_DT_NEEDED="/usr/lib.*/libasteriskssl[.]so[.][0-9]\+"
164 +
165 +pkg_setup() {
166 + CONFIG_CHECK="~!NF_CONNTRACK_SIP"
167 + local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
168 + have reported that this module dropped critical SIP packets in their deployments. You
169 + may want to disable it if you see such problems."
170 + check_extra_config
171 +}
172 +
173 +src_prepare() {
174 + default
175 + AT_M4DIR="autoconf third-party third-party/pjproject third-party/jansson" eautoreconf
176 +}
177 +
178 +function menuselect()
179 +{
180 + menuselect/menuselect "$@" || die "menuselect $* failed."
181 +}
182 +
183 +src_configure() {
184 + local vmst
185 +
186 + econf \
187 + --libdir="/usr/$(get_libdir)" \
188 + --localstatedir="/var" \
189 + --with-crypto \
190 + --with-gsm=internal \
191 + --with-popt \
192 + --with-z \
193 + --without-libedit \
194 + $(use_with caps cap) \
195 + $(use_with http gmime) \
196 + $(use_with newt) \
197 + $(use_with pjproject) \
198 + $(use_with portaudio) \
199 + $(use_with ssl)
200 +
201 + # Blank out sounds/sounds.xml file to prevent
202 + # asterisk from installing sounds files (we pull them in via
203 + # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
204 + >"${S}"/sounds/sounds.xml
205 +
206 + # That NATIVE_ARCH chatter really is quite bothersome
207 + sed -i 's/NATIVE_ARCH=/NATIVE_ARCH=0/' build_tools/menuselect-deps || die "Unable to squelch noisy build system"
208 +
209 + # Compile menuselect binary for optional components
210 + emake NOISE_BUILD=yes menuselect.makeopts
211 +
212 + # Disable BUILD_NATIVE (bug #667498)
213 + menuselect --disable build_native menuselect.makeopts
214 +
215 + # Broken functionality is forcibly disabled (bug #360143)
216 + menuselect --disable chan_misdn menuselect.makeopts
217 + menuselect --disable chan_ooh323 menuselect.makeopts
218 +
219 + # Utility set is forcibly enabled (bug #358001)
220 + menuselect --enable smsq menuselect.makeopts
221 + menuselect --enable streamplayer menuselect.makeopts
222 + menuselect --enable aelparse menuselect.makeopts
223 + menuselect --enable astman menuselect.makeopts
224 +
225 + # this is connected, otherwise it would not find
226 + # ast_pktccops_gate_alloc symbol
227 + menuselect --enable chan_mgcp menuselect.makeopts
228 + menuselect --enable res_pktccops menuselect.makeopts
229 +
230 + # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
231 + menuselect --enable pbx_dundi menuselect.makeopts
232 + menuselect --enable func_aes menuselect.makeopts
233 + menuselect --enable chan_iax2 menuselect.makeopts
234 +
235 + # SQlite3 is now the main database backend, enable related features
236 + menuselect --enable cdr_sqlite3_custom menuselect.makeopts
237 + menuselect --enable cel_sqlite3_custom menuselect.makeopts
238 +
239 + # The others are based on USE-flag settings
240 + use_select() {
241 + local state=$(use "$1" && echo enable || echo disable)
242 + shift # remove use from parameters
243 +
244 + while [[ -n $1 ]]; do
245 + menuselect --${state} "$1" menuselect.makeopts
246 + shift
247 + done
248 + }
249 +
250 + use_select alsa chan_alsa
251 + use_select bluetooth chan_mobile
252 + use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
253 + use_select cluster res_corosync
254 + use_select curl func_curl res_config_curl res_curl
255 + use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi
256 + use_select freetds {cdr,cel}_tds
257 + use_select gtalk chan_motif
258 + use_select http res_http_post
259 + use_select iconv func_iconv
260 + use_select ilbc codec_ilbc format_ilbc
261 + use_select ldap res_config_ldap
262 + use_select lua pbx_lua
263 + use_select mysql app_mysql cdr_mysql res_config_mysql
264 + use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
265 + use_select osplookup app_osplookup
266 + use_select oss chan_oss
267 + use_select postgres {cdr,cel}_pgsql res_config_pgsql
268 + use_select radius {cdr,cel}_radius
269 + use_select snmp res_snmp
270 + use_select span res_fax_spandsp
271 + use_select speex {codec,func}_speex
272 + use_select srtp res_srtp
273 + use_select statsd res_statsd res_{endpoint,chan}_stats
274 + use_select syslog cdr_syslog
275 + use_select vorbis format_ogg_vorbis
276 + use_select xmpp res_xmpp
277 +
278 + # Voicemail storage ...
279 + for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
280 + if use ${vmst}; then
281 + menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
282 + fi
283 + done
284 +
285 + if use debug; then
286 + for o in DONT_OPTIMIZE DEBUG_THREADS BETTER_BACKTRACES; do
287 + menuselect --enable $o menuselect.makeopts
288 + done
289 + fi
290 +}
291 +
292 +src_compile() {
293 + emake ASTCFLAGS="${CFLAGS}" ASTLDFLAGS="${LDFLAGS}" NOISY_BUILD=yes
294 +}
295 +
296 +src_install() {
297 + local d
298 +
299 + mkdir -p "${ED}/usr/$(get_libdir)/pkgconfig" || die
300 + emake DESTDIR="${D}" NOISY_BUILD=yes installdirs
301 + emake DESTDIR="${D}" NOISY_BUILD=yes install
302 +
303 + if use radius; then
304 + insinto /etc/radiusclient/
305 + doins contrib/dictionary.digium
306 + fi
307 + diropts -m 0750 -o root -g asterisk
308 + keepdir /etc/asterisk
309 + if use samples; then
310 + emake NOISY_BUILD=yes DESTDIR="${ED}" samples
311 + for conffile in "${ED}/etc/asterisk/"*
312 + do
313 + fowners root:root "${conffile#${ED}}"
314 + fperms 0644 "${conffile#${ED}}"
315 + done
316 + einfo "Sample files have been installed"
317 + else
318 + einfo "Skipping installation of sample files..."
319 + rm "${ED}"/var/lib/asterisk/mohmp3/* || die
320 + rm "${ED}"/var/lib/asterisk/sounds/demo-* || die
321 + rm "${ED}"/var/lib/asterisk/agi-bin/* || die
322 + rm "${ED}"/etc/asterisk/* || die
323 + fi
324 + rm -r "${ED}"/var/spool/asterisk/voicemail/default || die
325 +
326 + # keep directories
327 + diropts -m 0770 -o asterisk asterisk
328 + keepdir /var/lib/asterisk
329 + keepdir /var/spool/asterisk
330 + keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
331 + diropts -m 0750 -o asterisk -g asterisk
332 + keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
333 +
334 + newinitd "${FILESDIR}"/1.8.0/asterisk.initd8 asterisk
335 + newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
336 +
337 + systemd_dounit "${FILESDIR}"/asterisk.service
338 + systemd_newtmpfilesd "${FILESDIR}"/asterisk.tmpfiles.conf asterisk.conf
339 + systemd_install_serviced "${FILESDIR}"/asterisk.service.conf
340 +
341 + # Reset diropts else dodoc uses it for doc installations.
342 + diropts -m0755
343 +
344 + # install the upgrade documentation
345 + dodoc UPGRADE* BUGS CREDITS
346 +
347 + # install extra documentation
348 + if use doc; then
349 + dodoc doc/*.txt
350 + dodoc doc/*.pdf
351 + fi
352 +
353 + # install SIP scripts; bug #300832
354 + #
355 + dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
356 + dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
357 + dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
358 + dodoc "${FILESDIR}/1.6.2/call_data.txt"
359 +
360 + # install logrotate snippet; bug #329281
361 + #
362 + insinto /etc/logrotate.d
363 + newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk
364 +
365 + # Asterisk installs a few folders that's empty by design,
366 + # but still required. This finds them, and marks them for
367 + # portage.
368 + for d in $(find "${ED}"/var -type d -empty || die "Find failed."); do
369 + keepdir "${d#${ED}}"
370 + done
371 +}
372 +
373 +pkg_postinst() {
374 + #
375 + # Announcements, warnings, reminders...
376 + #
377 + einfo "Asterisk has been installed"
378 + echo
379 + elog "If you want to know more about asterisk, visit these sites:"
380 + elog "http://www.asteriskdocs.org/"
381 + elog "http://www.voip-info.org/wiki-Asterisk"
382 + echo
383 + elog "http://www.automated.it/guidetoasterisk.htm"
384 + echo
385 + elog "Gentoo VoIP IRC Channel:"
386 + elog "#gentoo-voip @ irc.freenode.net"
387 + echo
388 + echo
389 + elog "Please read the Asterisk 13 upgrade document:"
390 + elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+13"
391 +}
392
393 diff --git a/net-misc/asterisk/metadata.xml b/net-misc/asterisk/metadata.xml
394 index 7790ac2d905..c47b7729514 100644
395 --- a/net-misc/asterisk/metadata.xml
396 +++ b/net-misc/asterisk/metadata.xml
397 @@ -2,20 +2,25 @@
398 <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
399 <pkgmetadata>
400 <maintainer type="person">
401 - <email>chainsaw@g.o</email>
402 - <name>Tony Vroon</name>
403 + <email>jaco@××××××.za</email>
404 + <name>Jaco Kroon</name>
405 + </maintainer>
406 + <maintainer type="project">
407 + <email>proxy-maint@g.o</email>
408 + <name>Proxy Maintainers</name>
409 </maintainer>
410 <use>
411 - <flag name="newt">Include additional tools that require redhats windowing toolkit</flag>
412 + <flag name="cluster">Enable high-availability support through the Corosync Cluster Engine</flag>
413 <flag name="dahdi">Support Digium compatible hardware (formerly known as Zaptel).</flag>
414 - <flag name="span">Enable support for the spandsp codec</flag>
415 - <flag name="samples">Install sample sound and configuration files (default: on)</flag>
416 - <flag name="srtp">Enable support for encrypted voice transmission (secure RTP)</flag>
417 <flag name="gtalk">Enable support for Google Talk services</flag>
418 - <flag name="osplookup">Support secure peering using the Open Settlement Protocol</flag>
419 <flag name="http">Enable embedded web server</flag>
420 - <flag name="cluster">Enable high-availability support through the Corosync Cluster Engine</flag>
421 <flag name="ilbc">Enable the Internet Low Bitrate Codec (iLBC)</flag>
422 + <flag name="newt">Include additional tools that require redhats windowing toolkit</flag>
423 + <flag name="osplookup">Support secure peering using the Open Settlement Protocol</flag>
424 <flag name="pjproject">Enable support for pjproject (pjsip)</flag>
425 + <flag name="samples">Install sample sound and configuration files (default: on)</flag>
426 + <flag name="span">Enable support for the spandsp codec</flag>
427 + <flag name="srtp">Enable support for encrypted voice transmission (secure RTP)</flag>
428 + <flag name="statsd">Enable statsd integration</flag>
429 </use>
430 </pkgmetadata>