1 |
chainsaw 13/03/28 17:17:54 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-11.2.2.ebuild asterisk-1.8.20.2.ebuild |
5 |
Removed: asterisk-11.2.1-r2.ebuild asterisk-1.8.20.0.ebuild |
6 |
asterisk-11.2.0.ebuild asterisk-11.1.2.ebuild |
7 |
asterisk-1.8.19.1.ebuild |
8 |
Log: |
9 |
Security upgrade to address a boundary error in H264 video SDP handling, naive Content-Length variable parsing in HTTP POST requests and an information leak around account existence for the SIP channel driver. |
10 |
|
11 |
(Portage version: 2.1.11.58/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A) |
12 |
|
13 |
Revision Changes Path |
14 |
1.447 net-misc/asterisk/ChangeLog |
15 |
|
16 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.447&view=markup |
17 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.447&content-type=text/plain |
18 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.446&r2=1.447 |
19 |
|
20 |
Index: ChangeLog |
21 |
=================================================================== |
22 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
23 |
retrieving revision 1.446 |
24 |
retrieving revision 1.447 |
25 |
diff -u -r1.446 -r1.447 |
26 |
--- ChangeLog 6 Mar 2013 23:16:36 -0000 1.446 |
27 |
+++ ChangeLog 28 Mar 2013 17:17:54 -0000 1.447 |
28 |
@@ -1,6 +1,17 @@ |
29 |
# ChangeLog for net-misc/asterisk |
30 |
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 |
31 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.446 2013/03/06 23:16:36 chainsaw Exp $ |
32 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.447 2013/03/28 17:17:54 chainsaw Exp $ |
33 |
+ |
34 |
+*asterisk-11.2.2 (28 Mar 2013) |
35 |
+*asterisk-1.8.20.2 (28 Mar 2013) |
36 |
+ |
37 |
+ 28 Mar 2013; Tony Vroon <chainsaw@g.o> -asterisk-1.8.19.1.ebuild, |
38 |
+ -asterisk-1.8.20.0.ebuild, +asterisk-1.8.20.2.ebuild, |
39 |
+ -asterisk-11.1.2.ebuild, -asterisk-11.2.0.ebuild, -asterisk-11.2.1-r2.ebuild, |
40 |
+ +asterisk-11.2.2.ebuild: |
41 |
+ Security upgrade to address a boundary error in H264 video SDP handling, |
42 |
+ naive Content-Length variable parsing in HTTP POST requests and an |
43 |
+ information leak around account existence for the SIP channel driver. |
44 |
|
45 |
*asterisk-11.2.1-r2 (06 Mar 2013) |
46 |
|
47 |
|
48 |
|
49 |
|
50 |
1.1 net-misc/asterisk/asterisk-11.2.2.ebuild |
51 |
|
52 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.2.2.ebuild?rev=1.1&view=markup |
53 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.2.2.ebuild?rev=1.1&content-type=text/plain |
54 |
|
55 |
Index: asterisk-11.2.2.ebuild |
56 |
=================================================================== |
57 |
# Copyright 1999-2013 Gentoo Foundation |
58 |
# Distributed under the terms of the GNU General Public License v2 |
59 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.2.2.ebuild,v 1.1 2013/03/28 17:17:54 chainsaw Exp $ |
60 |
|
61 |
EAPI=5 |
62 |
inherit autotools base eutils linux-info multilib |
63 |
|
64 |
MY_P="${PN}-${PV/_/-}" |
65 |
|
66 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
67 |
HOMEPAGE="http://www.asterisk.org/" |
68 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
69 |
mirror://gentoo/gentoo-asterisk-patchset-3.4.tar.bz2" |
70 |
LICENSE="GPL-2" |
71 |
SLOT="0" |
72 |
KEYWORDS="~amd64 ~x86" |
73 |
|
74 |
IUSE_VOICEMAIL_STORAGE=" |
75 |
+voicemail_storage_file |
76 |
voicemail_storage_odbc |
77 |
voicemail_storage_imap |
78 |
" |
79 |
IUSE="${IUSE_VOICEMAIL_STORAGE} alsa bluetooth calendar +caps cluster curl dahdi debug doc freetds gtalk http iconv ilbc jabber ldap libedit lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex srtp static syslog vorbis" |
80 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
81 |
REQUIRED_USE="gtalk? ( jabber ) |
82 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
83 |
voicemail_storage_odbc? ( odbc ) |
84 |
" |
85 |
|
86 |
EPATCH_SUFFIX="patch" |
87 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
88 |
|
89 |
RDEPEND="dev-db/sqlite:3 |
90 |
dev-libs/popt |
91 |
dev-libs/libxml2 |
92 |
dev-libs/openssl |
93 |
sys-libs/ncurses |
94 |
sys-libs/zlib |
95 |
alsa? ( media-libs/alsa-lib ) |
96 |
bluetooth? ( net-wireless/bluez ) |
97 |
calendar? ( net-libs/neon |
98 |
dev-libs/libical |
99 |
dev-libs/iksemel ) |
100 |
caps? ( sys-libs/libcap ) |
101 |
cluster? ( sys-cluster/corosync ) |
102 |
curl? ( net-misc/curl ) |
103 |
dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
104 |
net-misc/dahdi-tools ) |
105 |
freetds? ( dev-db/freetds ) |
106 |
gtalk? ( dev-libs/iksemel ) |
107 |
http? ( dev-libs/gmime:2.4 ) |
108 |
iconv? ( virtual/libiconv ) |
109 |
ilbc? ( dev-libs/ilbc-rfc3951 ) |
110 |
jabber? ( dev-libs/iksemel ) |
111 |
ldap? ( net-nds/openldap ) |
112 |
libedit? ( dev-libs/libedit ) |
113 |
lua? ( dev-lang/lua ) |
114 |
mysql? ( virtual/mysql ) |
115 |
newt? ( dev-libs/newt ) |
116 |
odbc? ( dev-db/unixODBC ) |
117 |
osplookup? ( net-libs/osptoolkit ) |
118 |
portaudio? ( media-libs/portaudio ) |
119 |
postgres? ( dev-db/postgresql-base ) |
120 |
radius? ( net-dialup/radiusclient-ng ) |
121 |
selinux? ( sec-policy/selinux-asterisk ) |
122 |
snmp? ( net-analyzer/net-snmp ) |
123 |
span? ( media-libs/spandsp ) |
124 |
speex? ( media-libs/speex ) |
125 |
srtp? ( net-libs/libsrtp ) |
126 |
vorbis? ( media-libs/libvorbis )" |
127 |
|
128 |
DEPEND="${RDEPEND} |
129 |
!net-libs/openh323 |
130 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
131 |
" |
132 |
|
133 |
RDEPEND="${RDEPEND} |
134 |
syslog? ( virtual/logger )" |
135 |
|
136 |
PDEPEND="net-misc/asterisk-core-sounds |
137 |
net-misc/asterisk-extra-sounds |
138 |
net-misc/asterisk-moh-opsound" |
139 |
|
140 |
S="${WORKDIR}/${MY_P}" |
141 |
|
142 |
pkg_setup() { |
143 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
144 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
145 |
have reported that this module dropped critical SIP packets in their deployments. You |
146 |
may want to disable it if you see such problems." |
147 |
check_extra_config |
148 |
|
149 |
enewgroup asterisk |
150 |
enewgroup dialout 20 |
151 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
152 |
} |
153 |
|
154 |
src_prepare() { |
155 |
base_src_prepare |
156 |
AT_M4DIR=autoconf eautoreconf |
157 |
} |
158 |
|
159 |
src_configure() { |
160 |
local vmst |
161 |
|
162 |
econf \ |
163 |
--libdir="/usr/$(get_libdir)" \ |
164 |
--localstatedir="/var" \ |
165 |
--with-crypto \ |
166 |
--with-gsm=internal \ |
167 |
--with-popt \ |
168 |
--with-ssl \ |
169 |
--with-z \ |
170 |
--without-pwlib \ |
171 |
$(use_with caps cap) \ |
172 |
$(use_with http gmime) \ |
173 |
$(use_with newt) \ |
174 |
$(use_with portaudio) |
175 |
|
176 |
# Blank out sounds/sounds.xml file to prevent |
177 |
# asterisk from installing sounds files (we pull them in via |
178 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
179 |
>"${S}"/sounds/sounds.xml |
180 |
|
181 |
# Compile menuselect binary for optional components |
182 |
emake menuselect.makeopts |
183 |
|
184 |
# Broken functionality is forcibly disabled (bug #360143) |
185 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
186 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
187 |
|
188 |
# Utility set is forcibly enabled (bug #358001) |
189 |
menuselect/menuselect --enable smsq menuselect.makeopts |
190 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
191 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
192 |
menuselect/menuselect --enable astman menuselect.makeopts |
193 |
|
194 |
# this is connected, otherwise it would not find |
195 |
# ast_pktccops_gate_alloc symbol |
196 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
197 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
198 |
|
199 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
200 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
201 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
202 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
203 |
|
204 |
# SQlite3 is now the main database backend, enable related features |
205 |
menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts |
206 |
menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts |
207 |
|
208 |
# The others are based on USE-flag settings |
209 |
use_select() { |
210 |
local state=$(use "$1" && echo enable || echo disable) |
211 |
shift # remove use from parameters |
212 |
|
213 |
while [[ -n $1 ]]; do |
214 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
215 |
shift |
216 |
done |
217 |
} |
218 |
|
219 |
use_select alsa chan_alsa |
220 |
use_select bluetooth chan_mobile |
221 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
222 |
use_select cluster res_corosync |
223 |
use_select curl func_curl res_config_curl res_curl |
224 |
use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi |
225 |
use_select freetds {cdr,cel}_tds |
226 |
use_select gtalk chan_motif |
227 |
use_select http res_http_post |
228 |
use_select iconv func_iconv |
229 |
use_select jabber res_xmpp |
230 |
use_select ilbc codec_ilbc format_ilbc |
231 |
use_select ldap res_config_ldap |
232 |
use_select lua pbx_lua |
233 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
234 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
235 |
use_select osplookup app_osplookup |
236 |
use_select oss chan_oss |
237 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
238 |
use_select radius {cdr,cel}_radius |
239 |
use_select snmp res_snmp |
240 |
use_select span res_fax_spandsp |
241 |
use_select speex {codec,func}_speex |
242 |
use_select srtp res_srtp |
243 |
use_select syslog cdr_syslog |
244 |
use_select vorbis format_ogg_vorbis |
245 |
|
246 |
# Voicemail storage ... |
247 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
248 |
if use ${vmst}; then |
249 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
250 |
fi |
251 |
done |
252 |
} |
253 |
|
254 |
src_compile() { |
255 |
ASTLDFLAGS="${LDFLAGS}" emake |
256 |
} |
257 |
|
258 |
src_install() { |
259 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
260 |
emake DESTDIR="${D}" installdirs |
261 |
emake DESTDIR="${D}" install |
262 |
|
263 |
if use radius; then |
264 |
insinto /etc/radiusclient-ng/ |
265 |
doins contrib/dictionary.digium |
266 |
fi |
267 |
if use samples; then |
268 |
emake DESTDIR="${D}" samples |
269 |
for conffile in "${D}"etc/asterisk/*.* |
270 |
do |
271 |
chown asterisk:asterisk $conffile |
272 |
chmod 0660 $conffile |
273 |
done |
274 |
einfo "Sample files have been installed" |
275 |
else |
276 |
einfo "Skipping installation of sample files..." |
277 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
278 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
279 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
280 |
rm -f "${D}"etc/asterisk/* || die |
281 |
fi |
282 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
283 |
|
284 |
# keep directories |
285 |
diropts -m 0770 -o asterisk -g asterisk |
286 |
keepdir /etc/asterisk |
287 |
keepdir /var/lib/asterisk |
288 |
keepdir /var/spool/asterisk |
289 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
290 |
diropts -m 0750 -o asterisk -g asterisk |
291 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
292 |
|
293 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd5 asterisk |
294 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
295 |
|
296 |
# install the upgrade documentation |
297 |
# |
298 |
dodoc README UPGRADE* BUGS CREDITS |
299 |
|
300 |
# install extra documentation |
301 |
# |
302 |
if use doc |
303 |
then |
304 |
dodoc doc/*.txt |
305 |
dodoc doc/*.pdf |
306 |
fi |
307 |
|
308 |
# install SIP scripts; bug #300832 |
309 |
# |
310 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
311 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
312 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
313 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
314 |
|
315 |
# install logrotate snippet; bug #329281 |
316 |
# |
317 |
insinto /etc/logrotate.d |
318 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
319 |
} |
320 |
|
321 |
pkg_postinst() { |
322 |
# |
323 |
# Announcements, warnings, reminders... |
324 |
# |
325 |
einfo "Asterisk has been installed" |
326 |
echo |
327 |
elog "If you want to know more about asterisk, visit these sites:" |
328 |
elog "http://www.asteriskdocs.org/" |
329 |
elog "http://www.voip-info.org/wiki-Asterisk" |
330 |
echo |
331 |
elog "http://www.automated.it/guidetoasterisk.htm" |
332 |
echo |
333 |
elog "Gentoo VoIP IRC Channel:" |
334 |
elog "#gentoo-voip @ irc.freenode.net" |
335 |
echo |
336 |
echo |
337 |
elog "Please read the Asterisk 11 upgrade document:" |
338 |
elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11" |
339 |
} |
340 |
|
341 |
pkg_config() { |
342 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
343 |
|
344 |
read tmp |
345 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
346 |
|
347 |
if [[ "$tmp" = "y" ]] ||\ |
348 |
[[ "$tmp" = "yes" ]] |
349 |
then |
350 |
einfo "Resetting permissions to defaults..." |
351 |
|
352 |
for x in spool run lib log; do |
353 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
354 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
355 |
done |
356 |
|
357 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
358 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
359 |
|
360 |
einfo "done" |
361 |
else |
362 |
einfo "skipping" |
363 |
fi |
364 |
} |
365 |
|
366 |
|
367 |
|
368 |
1.1 net-misc/asterisk/asterisk-1.8.20.2.ebuild |
369 |
|
370 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.8.20.2.ebuild?rev=1.1&view=markup |
371 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.8.20.2.ebuild?rev=1.1&content-type=text/plain |
372 |
|
373 |
Index: asterisk-1.8.20.2.ebuild |
374 |
=================================================================== |
375 |
# Copyright 1999-2013 Gentoo Foundation |
376 |
# Distributed under the terms of the GNU General Public License v2 |
377 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.8.20.2.ebuild,v 1.1 2013/03/28 17:17:54 chainsaw Exp $ |
378 |
|
379 |
EAPI=5 |
380 |
inherit autotools base eutils linux-info multilib |
381 |
|
382 |
MY_P="${PN}-${PV/_/-}" |
383 |
|
384 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
385 |
HOMEPAGE="http://www.asterisk.org/" |
386 |
SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz |
387 |
mirror://gentoo/gentoo-asterisk-patchset-1.17.tar.bz2" |
388 |
LICENSE="GPL-2" |
389 |
SLOT="0" |
390 |
KEYWORDS="~amd64 ~x86" |
391 |
|
392 |
IUSE_VOICEMAIL_STORAGE=" |
393 |
+voicemail_storage_file |
394 |
voicemail_storage_odbc |
395 |
voicemail_storage_imap |
396 |
" |
397 |
IUSE="${IUSE_VOICEMAIL_STORAGE} ais alsa bluetooth calendar +caps curl dahdi debug doc freetds gtalk http iconv jabber jingle ldap lua mysql newt +samples odbc osplookup oss portaudio postgres radius selinux snmp span speex sqlite sqlite3 srtp static syslog vorbis" |
398 |
|
399 |
IUSE_EXPAND="VOICEMAIL_STORAGE" |
400 |
|
401 |
REQUIRED_USE=" |
402 |
gtalk? ( jabber ) |
403 |
^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} ) |
404 |
voicemail_storage_odbc? ( odbc ) |
405 |
" |
406 |
|
407 |
EPATCH_SUFFIX="patch" |
408 |
PATCHES=( "${WORKDIR}/asterisk-patchset" ) |
409 |
|
410 |
RDEPEND="dev-libs/popt |
411 |
dev-libs/libxml2 |
412 |
dev-libs/openssl |
413 |
sys-libs/ncurses |
414 |
sys-libs/zlib |
415 |
ais? ( sys-cluster/openais ) |
416 |
alsa? ( media-libs/alsa-lib ) |
417 |
bluetooth? ( net-wireless/bluez ) |
418 |
calendar? ( net-libs/neon |
419 |
dev-libs/libical |
420 |
dev-libs/iksemel ) |
421 |
caps? ( sys-libs/libcap ) |
422 |
curl? ( net-misc/curl ) |
423 |
dahdi? ( >=net-libs/libpri-1.4.12_beta2 |
424 |
net-misc/dahdi-tools ) |
425 |
freetds? ( dev-db/freetds ) |
426 |
gtalk? ( dev-libs/iksemel ) |
427 |
http? ( dev-libs/gmime:2.4 ) |
428 |
iconv? ( virtual/libiconv ) |
429 |
jabber? ( dev-libs/iksemel ) |
430 |
jingle? ( dev-libs/iksemel ) |
431 |
ldap? ( net-nds/openldap ) |
432 |
lua? ( dev-lang/lua ) |
433 |
mysql? ( virtual/mysql ) |
434 |
newt? ( dev-libs/newt ) |
435 |
odbc? ( dev-db/unixODBC ) |
436 |
osplookup? ( net-libs/osptoolkit ) |
437 |
portaudio? ( media-libs/portaudio ) |
438 |
postgres? ( dev-db/postgresql-base ) |
439 |
radius? ( net-dialup/radiusclient-ng ) |
440 |
selinux? ( sec-policy/selinux-asterisk ) |
441 |
snmp? ( net-analyzer/net-snmp ) |
442 |
span? ( media-libs/spandsp ) |
443 |
speex? ( media-libs/speex ) |
444 |
sqlite? ( dev-db/sqlite:0 ) |
445 |
sqlite3? ( dev-db/sqlite:3 ) |
446 |
srtp? ( net-libs/libsrtp ) |
447 |
vorbis? ( media-libs/libvorbis )" |
448 |
|
449 |
DEPEND="${RDEPEND} |
450 |
voicemail_storage_imap? ( virtual/imap-c-client ) |
451 |
!net-libs/openh323" |
452 |
|
453 |
RDEPEND="${RDEPEND} |
454 |
syslog? ( virtual/logger )" |
455 |
|
456 |
PDEPEND="net-misc/asterisk-core-sounds |
457 |
net-misc/asterisk-extra-sounds |
458 |
net-misc/asterisk-moh-opsound" |
459 |
|
460 |
S="${WORKDIR}/${MY_P}" |
461 |
|
462 |
pkg_setup() { |
463 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
464 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
465 |
have reported that this module dropped critical SIP packets in their deployments. You |
466 |
may want to disable it if you see such problems." |
467 |
check_extra_config |
468 |
|
469 |
enewgroup asterisk |
470 |
enewgroup dialout 20 |
471 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
472 |
} |
473 |
|
474 |
src_prepare() { |
475 |
base_src_prepare |
476 |
AT_M4DIR=autoconf eautoreconf |
477 |
} |
478 |
|
479 |
src_configure() { |
480 |
local vmst |
481 |
|
482 |
econf \ |
483 |
--libdir="/usr/$(get_libdir)" \ |
484 |
--localstatedir="/var" \ |
485 |
--with-crypto \ |
486 |
--with-gsm=internal \ |
487 |
--with-popt \ |
488 |
--with-ssl \ |
489 |
--with-z \ |
490 |
--without-pwlib \ |
491 |
$(use_with caps cap) \ |
492 |
$(use_with http gmime) \ |
493 |
$(use_with newt) \ |
494 |
$(use_with portaudio) |
495 |
|
496 |
# Blank out sounds/sounds.xml file to prevent |
497 |
# asterisk from installing sounds files (we pull them in via |
498 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
499 |
>"${S}"/sounds/sounds.xml |
500 |
|
501 |
# Compile menuselect binary for optional components |
502 |
emake menuselect.makeopts |
503 |
|
504 |
# Broken functionality is forcibly disabled (bug #360143) |
505 |
menuselect/menuselect --disable chan_misdn menuselect.makeopts |
506 |
menuselect/menuselect --disable chan_ooh323 menuselect.makeopts |
507 |
|
508 |
# Utility set is forcibly enabled (bug #358001) |
509 |
menuselect/menuselect --enable smsq menuselect.makeopts |
510 |
menuselect/menuselect --enable streamplayer menuselect.makeopts |
511 |
menuselect/menuselect --enable aelparse menuselect.makeopts |
512 |
menuselect/menuselect --enable astman menuselect.makeopts |
513 |
|
514 |
# this is connected, otherwise it would not find |
515 |
# ast_pktccops_gate_alloc symbol |
516 |
menuselect/menuselect --enable chan_mgcp menuselect.makeopts |
517 |
menuselect/menuselect --enable res_pktccops menuselect.makeopts |
518 |
|
519 |
# SSL is forcibly enabled, IAX2 & DUNDI are expected to be available |
520 |
menuselect/menuselect --enable pbx_dundi menuselect.makeopts |
521 |
menuselect/menuselect --enable func_aes menuselect.makeopts |
522 |
menuselect/menuselect --enable chan_iax2 menuselect.makeopts |
523 |
|
524 |
# The others are based on USE-flag settings |
525 |
use_select() { |
526 |
local state=$(use "$1" && echo enable || echo disable) |
527 |
shift # remove use from parameters |
528 |
|
529 |
while [[ -n $1 ]]; do |
530 |
menuselect/menuselect --${state} "$1" menuselect.makeopts |
531 |
shift |
532 |
done |
533 |
} |
534 |
|
535 |
use_select ais res_ais |
536 |
use_select alsa chan_alsa |
537 |
use_select bluetooth chan_mobile |
538 |
use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar} |
539 |
use_select curl func_curl res_config_curl res_curl |
540 |
use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi |
541 |
use_select freetds {cdr,cel}_tds |
542 |
use_select gtalk chan_gtalk |
543 |
use_select http res_http_post |
544 |
use_select iconv func_iconv |
545 |
use_select jabber res_jabber |
546 |
use_select jingle chan_jingle |
547 |
use_select ldap res_config_ldap |
548 |
use_select lua pbx_lua |
549 |
use_select mysql app_mysql cdr_mysql res_config_mysql |
550 |
use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc |
551 |
use_select osplookup app_osplookup |
552 |
use_select oss chan_oss |
553 |
use_select postgres {cdr,cel}_pgsql res_config_pgsql |
554 |
use_select radius {cdr,cel}_radius |
555 |
use_select snmp res_snmp |
556 |
use_select span res_fax_spandsp |
557 |
use_select speex {codec,func}_speex |
558 |
use_select sqlite cdr_sqlite |
559 |
use_select sqlite3 {cdr,cel}_sqlite3_custom |
560 |
use_select srtp res_srtp |
561 |
use_select syslog cdr_syslog |
562 |
use_select vorbis format_ogg_vorbis |
563 |
|
564 |
# Voicemail storage ... |
565 |
for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do |
566 |
if use ${vmst}; then |
567 |
menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts |
568 |
fi |
569 |
done |
570 |
} |
571 |
|
572 |
src_compile() { |
573 |
ASTLDFLAGS="${LDFLAGS}" emake |
574 |
} |
575 |
|
576 |
src_install() { |
577 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die |
578 |
emake DESTDIR="${D}" installdirs |
579 |
emake DESTDIR="${D}" install |
580 |
|
581 |
if use radius; then |
582 |
insinto /etc/radiusclient-ng/ |
583 |
doins contrib/dictionary.digium |
584 |
fi |
585 |
if use samples; then |
586 |
emake DESTDIR="${D}" samples |
587 |
for conffile in "${D}"etc/asterisk/*.* |
588 |
do |
589 |
chown asterisk:asterisk $conffile |
590 |
chmod 0660 $conffile |
591 |
done |
592 |
einfo "Sample files have been installed" |
593 |
else |
594 |
einfo "Skipping installation of sample files..." |
595 |
rm -f "${D}"var/lib/asterisk/mohmp3/* || die |
596 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* || die |
597 |
rm -f "${D}"var/lib/asterisk/agi-bin/* || die |
598 |
rm -f "${D}"etc/asterisk/* || die |
599 |
fi |
600 |
rm -rf "${D}"var/spool/asterisk/voicemail/default || die |
601 |
|
602 |
# keep directories |
603 |
diropts -m 0770 -o asterisk -g asterisk |
604 |
keepdir /etc/asterisk |
605 |
keepdir /var/lib/asterisk |
606 |
keepdir /var/spool/asterisk |
607 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
608 |
diropts -m 0750 -o asterisk -g asterisk |
609 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
610 |
|
611 |
newinitd "${FILESDIR}"/1.8.0/asterisk.initd5 asterisk |
612 |
newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk |
613 |
|
614 |
# install the upgrade documentation |
615 |
# |
616 |
dodoc README UPGRADE* BUGS CREDITS |
617 |
|
618 |
# install extra documentation |
619 |
# |
620 |
if use doc |
621 |
then |
622 |
dodoc doc/*.txt |
623 |
dodoc doc/*.pdf |
624 |
fi |
625 |
|
626 |
# install SIP scripts; bugs #300832 & #414585 |
627 |
# |
628 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
629 |
dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh" |
630 |
dodoc "${FILESDIR}/1.8.0/find_call_ids.sh" |
631 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
632 |
|
633 |
# install logrotate snippet; bug #329281 |
634 |
# |
635 |
insinto /etc/logrotate.d |
636 |
newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk |
637 |
} |
638 |
|
639 |
pkg_postinst() { |
640 |
# |
641 |
# Announcements, warnings, reminders... |
642 |
# |
643 |
einfo "Asterisk has been installed" |
644 |
echo |
645 |
elog "If you want to know more about asterisk, visit these sites:" |
646 |
elog "http://www.asteriskdocs.org/" |
647 |
elog "http://www.voip-info.org/wiki-Asterisk" |
648 |
echo |
649 |
elog "http://www.automated.it/guidetoasterisk.htm" |
650 |
echo |
651 |
elog "Gentoo VoIP IRC Channel:" |
652 |
elog "#gentoo-voip @ irc.freenode.net" |
653 |
echo |
654 |
echo |
655 |
elog "1.6 -> 1.8 changes that you may care about:" |
656 |
elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" |
657 |
elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" |
658 |
} |
659 |
|
660 |
pkg_config() { |
661 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
662 |
|
663 |
read tmp |
664 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
665 |
|
666 |
if [[ "$tmp" = "y" ]] ||\ |
667 |
[[ "$tmp" = "yes" ]] |
668 |
then |
669 |
einfo "Resetting permissions to defaults..." |
670 |
|
671 |
for x in spool run lib log; do |
672 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
673 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
674 |
done |
675 |
|
676 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
677 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
678 |
|
679 |
einfo "done" |
680 |
else |
681 |
einfo "skipping" |
682 |
fi |
683 |
} |