1 |
chainsaw 09/12/01 10:39:12 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.6.1.11.ebuild |
5 |
Removed: asterisk-1.6.1.10.ebuild asterisk-1.6.1.9.ebuild |
6 |
Log: |
7 |
Version bump as requested by Rajiv Aaron Manglani <rajiv@g.o> in security bug #295270. Fixes a remote crash caused by a comfort noise payload over 24 bytes in length. Also contains an SDP regression fix, upstream bug reports #16368 & #16238. Vulnerable 1.6 branch ebuilds killed. |
8 |
(Portage version: 2.1.7.9/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.229 net-misc/asterisk/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.229&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.229&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.228&r2=1.229 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
20 |
retrieving revision 1.228 |
21 |
retrieving revision 1.229 |
22 |
diff -u -r1.228 -r1.229 |
23 |
--- ChangeLog 19 Nov 2009 14:53:33 -0000 1.228 |
24 |
+++ ChangeLog 1 Dec 2009 10:39:11 -0000 1.229 |
25 |
@@ -1,6 +1,16 @@ |
26 |
# ChangeLog for net-misc/asterisk |
27 |
# Copyright 1999-2009 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.228 2009/11/19 14:53:33 chainsaw Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.229 2009/12/01 10:39:11 chainsaw Exp $ |
30 |
+ |
31 |
+*asterisk-1.6.1.11 (01 Dec 2009) |
32 |
+ |
33 |
+ 01 Dec 2009; <chainsaw@g.o> -asterisk-1.6.1.9.ebuild, |
34 |
+ -asterisk-1.6.1.10.ebuild, +asterisk-1.6.1.11.ebuild: |
35 |
+ Version bump as requested by Rajiv Aaron Manglani <rajiv@g.o> in |
36 |
+ security bug #295270. Fixes a remote crash caused by a comfort noise |
37 |
+ payload over 24 bytes in length. Also contains an SDP regression fix, |
38 |
+ upstream bug reports #16368 & #16238. Vulnerable 1.6 branch ebuilds |
39 |
+ killed. |
40 |
|
41 |
*asterisk-1.6.1.10 (19 Nov 2009) |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
1.1 net-misc/asterisk/asterisk-1.6.1.11.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.11.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.11.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: asterisk-1.6.1.11.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2009 Gentoo Foundation |
54 |
# Distributed under the terms of the GNU General Public License v2 |
55 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.6.1.11.ebuild,v 1.1 2009/12/01 10:39:11 chainsaw Exp $ |
56 |
|
57 |
EAPI=1 |
58 |
inherit eutils autotools |
59 |
|
60 |
MY_P="${PN}-${PV/_/-}" |
61 |
|
62 |
DESCRIPTION="Asterisk: A Modular Open Source PBX System" |
63 |
HOMEPAGE="http://www.asterisk.org/" |
64 |
SRC_URI="http://downloads.digium.com/pub/asterisk/releases/${MY_P}.tar.gz" |
65 |
LICENSE="GPL-2" |
66 |
SLOT="0" |
67 |
KEYWORDS="~amd64 ~x86" |
68 |
|
69 |
IUSE="alsa +caps curl dahdi debug freetds iconv jabber ldap keepsrc misdn newt nosamples odbc oss postgres radius snmp span speex ssl sqlite static vorbis" |
70 |
|
71 |
RDEPEND="sys-libs/ncurses |
72 |
dev-libs/popt |
73 |
sys-libs/zlib |
74 |
alsa? ( media-libs/alsa-lib ) |
75 |
caps? ( sys-libs/libcap ) |
76 |
curl? ( net-misc/curl ) |
77 |
dahdi? ( >=net-libs/libpri-1.4.7 |
78 |
net-misc/dahdi-tools ) |
79 |
freetds? ( dev-db/freetds ) |
80 |
iconv? ( virtual/libiconv ) |
81 |
jabber? ( dev-libs/iksemel ) |
82 |
ldap? ( net-nds/openldap ) |
83 |
misdn? ( net-dialup/misdnuser ) |
84 |
newt? ( dev-libs/newt ) |
85 |
odbc? ( dev-db/unixODBC ) |
86 |
postgres? ( virtual/postgresql-base ) |
87 |
radius? ( net-dialup/radiusclient-ng ) |
88 |
snmp? ( net-analyzer/net-snmp ) |
89 |
span? ( media-libs/spandsp ) |
90 |
speex? ( media-libs/speex ) |
91 |
sqlite? ( dev-db/sqlite ) |
92 |
ssl? ( dev-libs/openssl ) |
93 |
vorbis? ( media-libs/libvorbis )" |
94 |
|
95 |
DEPEND="${RDEPEND} |
96 |
!<net-misc/asterisk-addons-1.6 |
97 |
!net-misc/zaptel" |
98 |
|
99 |
S="${WORKDIR}/${MY_P}" |
100 |
|
101 |
# |
102 |
# shortcuts |
103 |
# |
104 |
|
105 |
# update from asterisk-1.0.x |
106 |
is_ast10update() { |
107 |
return $(has_version "=net-misc/asterisk-1.0*") |
108 |
} |
109 |
|
110 |
# update from asterisk-1.2.x |
111 |
is_ast12update() { |
112 |
return $(has_version "=net-misc/asterisk-1.2*") |
113 |
} |
114 |
|
115 |
# update from asterisk 1.4.x |
116 |
is_ast14update() { |
117 |
return $(has_version "=net-misc/asterisk-1.4*") |
118 |
} |
119 |
|
120 |
# update in the asterisk-1.6.x line |
121 |
is_astupdate() { |
122 |
if ! is_ast10update && ! is_ast12update && !is_ast14update; then |
123 |
return $(has_version "<net-misc/asterisk-${PV}") |
124 |
fi |
125 |
return 0 |
126 |
} |
127 |
|
128 |
get_available_modules() { |
129 |
local modules mod x |
130 |
|
131 |
# build list of available modules... |
132 |
for x in app cdr codec format func pbx res; do |
133 |
|
134 |
for mod in $(find "${S}" -type f -name "${x}_*.c*" -print) |
135 |
do |
136 |
modules="${modules} $(basename ${mod/%.c*})" |
137 |
done |
138 |
done |
139 |
|
140 |
echo "${modules}" |
141 |
} |
142 |
|
143 |
pkg_setup() { |
144 |
local checkfailed=0 waitaftermsg=0 |
145 |
|
146 |
if is_ast12update ; then |
147 |
ewarn "Please note that the configuration style (particularly the dial plan) has changed significantly." |
148 |
ewarn "sip.conf: insecure=very -> insecure=port,invite" |
149 |
ewarn "asterisk.conf: please familiarise yourself with [compat]" |
150 |
ewarn "extensions.conf: use comma instead of pipe as a separator" |
151 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 after the installation!" |
152 |
echo |
153 |
waitaftermsg=1 |
154 |
fi |
155 |
|
156 |
if [[ $waitaftermsg -eq 1 ]]; then |
157 |
einfo "Press Ctrl+C to abort" |
158 |
echo |
159 |
ebeep 10 |
160 |
fi |
161 |
|
162 |
# |
163 |
# Regular checks |
164 |
# |
165 |
einfo "Running some pre-flight checks..." |
166 |
echo |
167 |
|
168 |
if [[ -n "${ASTERISK_MODULES}" ]] ; then |
169 |
ewarn "You are overriding ASTERISK_MODULES. We will assume you know what you are doing. There is no support for this option, try without if you see breakage." |
170 |
fi |
171 |
} |
172 |
|
173 |
src_unpack() { |
174 |
unpack ${A} |
175 |
cd "${S}" |
176 |
|
177 |
# |
178 |
# put pid file(s) into /var/run/asterisk |
179 |
# |
180 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-var_rundir.patch || die "patch failed" |
181 |
|
182 |
# |
183 |
# fix gsm codec cflags (e.g. i586 core epias) and disable |
184 |
# assembler optimizations |
185 |
# |
186 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-gsm-pic.patch || die "patch failed" |
187 |
|
188 |
# |
189 |
# add missing LIBS for uclibc |
190 |
# |
191 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-uclibc.patch || die "patch failed" |
192 |
|
193 |
# |
194 |
# make sure FXO ports are usable immediately, without requiring an inbound call first |
195 |
# https://issues.asterisk.org/view.php?id=14577 |
196 |
# |
197 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch || die "patch failed" |
198 |
|
199 |
# |
200 |
# do not ignore alarm-cleared event while V23 caller ID detection is in progress |
201 |
# otherwise automated British Telecom line test causes permanent red alarm |
202 |
# https://issues.asterisk.org/view.php?id=14163 |
203 |
# |
204 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.6-bt-line-test.patch || die "patch failed" |
205 |
|
206 |
AT_M4DIR=autoconf eautoreconf |
207 |
|
208 |
# parse modules list |
209 |
if [[ -n "${ASTERISK_MODULES}" ]]; then |
210 |
local x modules="$(get_available_modules)" |
211 |
|
212 |
einfo "Custom list of modules specified, checking..." |
213 |
|
214 |
use debug && { |
215 |
einfo "Available modules: ${modules}" |
216 |
einfo " Selected modules: ${ASTERISK_MODULES}" |
217 |
} |
218 |
|
219 |
for x in ${ASTERISK_MODULES}; do |
220 |
if [[ "${x}" = "-*" ]]; then |
221 |
MODULES_LIST="" |
222 |
else |
223 |
if has ${x} ${modules} |
224 |
then |
225 |
MODULES_LIST="${MODULES_LIST} ${x}" |
226 |
else |
227 |
eerror "Unknown module: ${x}" |
228 |
fi |
229 |
fi |
230 |
done |
231 |
|
232 |
export MODULES_LIST |
233 |
fi |
234 |
} |
235 |
|
236 |
src_compile() { |
237 |
# |
238 |
# start with configure |
239 |
# |
240 |
econf \ |
241 |
--libdir="/usr/$(get_libdir)" \ |
242 |
--localstatedir="/var" \ |
243 |
--with-gsm=internal \ |
244 |
--with-popt \ |
245 |
--with-z \ |
246 |
$(use_with alsa asound) \ |
247 |
$(use_with caps cap) \ |
248 |
$(use_with curl) \ |
249 |
$(use_with dahdi pri) \ |
250 |
$(use_with dahdi tonezone) \ |
251 |
$(use_with dahdi) \ |
252 |
$(use_with freetds tds) \ |
253 |
$(use_with iconv) \ |
254 |
$(use_with jabber iksemel) \ |
255 |
$(use_with misdn isdnnet) \ |
256 |
$(use_with misdn suppserv) \ |
257 |
$(use_with misdn) \ |
258 |
$(use_with newt) \ |
259 |
$(use_with odbc) \ |
260 |
$(use_with oss) \ |
261 |
$(use_with postgres) \ |
262 |
$(use_with radius) \ |
263 |
$(use_with snmp netsnmp) \ |
264 |
$(use_with span spandsp) \ |
265 |
$(use_with speex) \ |
266 |
$(use_with speex speexdsp) \ |
267 |
$(use_with sqlite sqlite3) \ |
268 |
$(use_with ssl crypto) \ |
269 |
$(use_with ssl) \ |
270 |
$(use_with vorbis ogg) \ |
271 |
$(use_with vorbis) || die "econf failed" |
272 |
|
273 |
# |
274 |
# custom module filter |
275 |
# run menuselect to evaluate the list of modules |
276 |
# and rewrite the list afterwards |
277 |
# |
278 |
if [[ -n "${MODULES_LIST}" ]] |
279 |
then |
280 |
local mod category tmp_list failed_list |
281 |
|
282 |
### |
283 |
# run menuselect |
284 |
|
285 |
emake menuselect.makeopts || die "emake menuselect.makeopts failed" |
286 |
|
287 |
### |
288 |
# get list of modules with failed dependencies |
289 |
|
290 |
failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)" |
291 |
|
292 |
### |
293 |
# traverse our list of modules |
294 |
|
295 |
for category in app cdr codec format func pbx res; do |
296 |
tmp_list="" |
297 |
|
298 |
# search list of modules for matching ones first... |
299 |
for mod in ${MODULES_LIST}; do |
300 |
# module is from current category? |
301 |
if [[ "${mod/%_*}" = "${category}" ]] |
302 |
then |
303 |
# check menuselect thinks the dependencies are met |
304 |
if has ${mod} ${failed_list} |
305 |
then |
306 |
eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!" |
307 |
else |
308 |
tmp_list="${tmp_list} ${mod}" |
309 |
fi |
310 |
fi |
311 |
done |
312 |
|
313 |
use debug && echo "${category} tmp: ${tmp_list}" |
314 |
|
315 |
# replace the module list for $category with our custom one |
316 |
if [[ -n "${tmp_list}" ]] |
317 |
then |
318 |
category="$(echo ${category} | tr '[:lower:]' '[:upper:]')" |
319 |
sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \ |
320 |
menuselect.makeopts || die "failed to set list of ${category} applications" |
321 |
fi |
322 |
done |
323 |
fi |
324 |
|
325 |
emake || die "emake failed" |
326 |
} |
327 |
|
328 |
src_install() { |
329 |
# setup directory structure |
330 |
# |
331 |
mkdir -p "${D}"usr/lib/pkgconfig |
332 |
|
333 |
emake DESTDIR="${D}" install || die "emake install failed" |
334 |
emake DESTDIR="${D}" samples || die "emake samples failed" |
335 |
|
336 |
# remove installed sample files if nosamples flag is set |
337 |
if use nosamples; then |
338 |
einfo "Skipping installation of sample files..." |
339 |
rm -f "${D}"var/lib/asterisk/mohmp3/* |
340 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* |
341 |
rm -f "${D}"var/lib/asterisk/agi-bin/* |
342 |
else |
343 |
einfo "Sample files have been installed" |
344 |
fi |
345 |
rm -rf "${D}"var/spool/asterisk/voicemail/default |
346 |
|
347 |
# move sample configuration files to doc directory |
348 |
if is_ast10update || is_ast12update || is_ast14update; then |
349 |
einfo "Updating from old (pre-1.6) asterisk version, new configuration files have been installed" |
350 |
einfo "into "${ROOT}"etc/asterisk, use etc-update or dispatch-conf to update them" |
351 |
fi |
352 |
|
353 |
einfo "Configuration samples have been moved to: "${ROOT}"/usr/share/doc/${PF}/conf" |
354 |
insinto /usr/share/doc/${PF}/conf |
355 |
doins "${D}"etc/asterisk/*.conf* |
356 |
|
357 |
# keep directories |
358 |
diropts -m 0770 -o asterisk -g asterisk |
359 |
keepdir /etc/asterisk |
360 |
keepdir /var/lib/asterisk |
361 |
keepdir /var/run/asterisk |
362 |
keepdir /var/spool/asterisk |
363 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
364 |
diropts -m 0750 -o asterisk -g asterisk |
365 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
366 |
|
367 |
newinitd "${FILESDIR}"/1.6.1/asterisk.initd asterisk |
368 |
newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk |
369 |
|
370 |
# some people like to keep the sources around for custom patching |
371 |
# copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there |
372 |
if use keepsrc |
373 |
then |
374 |
einfo "keepsrc useflag enabled, copying source..." |
375 |
dodir /usr/src |
376 |
|
377 |
cp -dPR "${S}" "${D}"/usr/src/${PF} || die "copying source tree failed" |
378 |
|
379 |
ebegin "running make clean..." |
380 |
emake -C "${D}"/usr/src/${PF} clean >/dev/null || die "make clean failed" |
381 |
eend $? |
382 |
|
383 |
einfo "Source files have been saved to "${ROOT}"usr/src/${PF}" |
384 |
fi |
385 |
|
386 |
# install the upgrade documentation |
387 |
# |
388 |
dodoc README UPGRADE* BUGS CREDITS |
389 |
|
390 |
# install snmp mib files |
391 |
# |
392 |
if use snmp |
393 |
then |
394 |
insinto /usr/share/snmp/mibs/ |
395 |
doins doc/digium-mib.txt doc/asterisk-mib.txt |
396 |
fi |
397 |
} |
398 |
|
399 |
pkg_preinst() { |
400 |
enewgroup asterisk |
401 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
402 |
} |
403 |
|
404 |
pkg_postinst() { |
405 |
ebegin "Fixing up permissions" |
406 |
chown -R asterisk:asterisk "${ROOT}"var/log/asterisk |
407 |
chmod -R u=rwX,g=rX,o= "${ROOT}"var/log/asterisk |
408 |
|
409 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/ |
410 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/*.adsi |
411 |
chown asterisk:asterisk "${ROOT}"etc/asterisk/extensions.ael |
412 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/ |
413 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/*.adsi |
414 |
chmod u=rwX,g=rwX,o= "${ROOT}"etc/asterisk/extensions.ael |
415 |
eend $? |
416 |
|
417 |
# |
418 |
# Announcements, warnings, reminders... |
419 |
# |
420 |
einfo "Asterisk has been installed" |
421 |
echo |
422 |
elog "If you want to know more about asterisk, visit these sites:" |
423 |
elog "http://www.asteriskdocs.org/" |
424 |
elog "http://www.voip-info.org/wiki-Asterisk" |
425 |
echo |
426 |
elog "http://www.automated.it/guidetoasterisk.htm" |
427 |
echo |
428 |
elog "Gentoo VoIP IRC Channel:" |
429 |
elog "#gentoo-voip @ irc.freenode.net" |
430 |
echo |
431 |
echo |
432 |
|
433 |
# |
434 |
# Warning about 1.x -> 1.6 changes... |
435 |
# |
436 |
if is_ast10update || is_ast12update || is_ast14update; then |
437 |
ewarn "" |
438 |
ewarn "- Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 before continuing" |
439 |
ewarn "" |
440 |
fi |
441 |
} |
442 |
|
443 |
pkg_config() { |
444 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
445 |
|
446 |
read tmp |
447 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
448 |
|
449 |
if [[ "$tmp" = "y" ]] ||\ |
450 |
[[ "$tmp" = "yes" ]] |
451 |
then |
452 |
einfo "Resetting permissions to defaults..." |
453 |
|
454 |
for x in spool run lib log; do |
455 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
456 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
457 |
done |
458 |
|
459 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
460 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
461 |
|
462 |
einfo "done" |
463 |
else |
464 |
einfo "skipping" |
465 |
fi |
466 |
} |