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