1 |
chainsaw 10/02/02 22:48:09 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.6.2.2.ebuild |
5 |
Removed: asterisk-1.6.2.1.ebuild asterisk-1.6.2.0.ebuild |
6 |
Log: |
7 |
Security update for AST-2010-001; remote T.38 over SIP crash by sitting FaxMaxDatagram to a negative or exceptionally large value. Init script update by Jaco Kroon closes bug #303265. Remove vulnerable 1.6.2 branch ebuilds. |
8 |
(Portage version: 2.2_rc62/cvs/Linux x86_64) |
9 |
|
10 |
Revision Changes Path |
11 |
1.244 net-misc/asterisk/ChangeLog |
12 |
|
13 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.244&view=markup |
14 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.244&content-type=text/plain |
15 |
diff : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.243&r2=1.244 |
16 |
|
17 |
Index: ChangeLog |
18 |
=================================================================== |
19 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
20 |
retrieving revision 1.243 |
21 |
retrieving revision 1.244 |
22 |
diff -u -r1.243 -r1.244 |
23 |
--- ChangeLog 27 Jan 2010 15:14:38 -0000 1.243 |
24 |
+++ ChangeLog 2 Feb 2010 22:48:08 -0000 1.244 |
25 |
@@ -1,6 +1,16 @@ |
26 |
# ChangeLog for net-misc/asterisk |
27 |
# Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 |
28 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.243 2010/01/27 15:14:38 chainsaw Exp $ |
29 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.244 2010/02/02 22:48:08 chainsaw Exp $ |
30 |
+ |
31 |
+*asterisk-1.6.2.2 (02 Feb 2010) |
32 |
+ |
33 |
+ 02 Feb 2010; <chainsaw@g.o> +files/1.6.1/asterisk.initd3, |
34 |
+ -asterisk-1.6.2.0.ebuild, -asterisk-1.6.2.1.ebuild, |
35 |
+ +asterisk-1.6.2.2.ebuild: |
36 |
+ Security update for AST-2010-001; remote T.38 over SIP crash by sitting |
37 |
+ FaxMaxDatagram to a negative or exceptionally large value. Init script |
38 |
+ update by Jaco Kroon closes bug #303265. Remove vulnerable 1.6.2 branch |
39 |
+ ebuilds. |
40 |
|
41 |
*asterisk-1.6.1.13 (27 Jan 2010) |
42 |
|
43 |
|
44 |
|
45 |
|
46 |
1.1 net-misc/asterisk/asterisk-1.6.2.2.ebuild |
47 |
|
48 |
file : http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.2.ebuild?rev=1.1&view=markup |
49 |
plain: http://sources.gentoo.org/viewcvs.py/gentoo-x86/net-misc/asterisk/asterisk-1.6.2.2.ebuild?rev=1.1&content-type=text/plain |
50 |
|
51 |
Index: asterisk-1.6.2.2.ebuild |
52 |
=================================================================== |
53 |
# Copyright 1999-2010 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.2.2.ebuild,v 1.1 2010/02/02 22:48:08 chainsaw Exp $ |
56 |
|
57 |
EAPI=1 |
58 |
inherit eutils autotools linux-info |
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 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 |
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 |
!net-misc/asterisk-chan_unistim |
97 |
!net-misc/zaptel" |
98 |
|
99 |
S="${WORKDIR}/${MY_P}" |
100 |
|
101 |
get_available_modules() { |
102 |
local modules mod x |
103 |
|
104 |
# build list of available modules... |
105 |
for x in app cdr codec format func pbx res; do |
106 |
|
107 |
for mod in $(find "${S}" -type f -name "${x}_*.c*" -print) |
108 |
do |
109 |
modules="${modules} $(basename ${mod/%.c*})" |
110 |
done |
111 |
done |
112 |
|
113 |
echo "${modules}" |
114 |
} |
115 |
|
116 |
pkg_setup() { |
117 |
if [[ -n "${ASTERISK_MODULES}" ]] ; then |
118 |
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." |
119 |
fi |
120 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
121 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is a module written for a single SIP client talking to a |
122 |
remote server. It is not able to track multiple remote SIP clients registering with |
123 |
a local server. Critical SIP packets may be dropped." |
124 |
check_extra_config |
125 |
} |
126 |
|
127 |
src_unpack() { |
128 |
unpack ${A} |
129 |
cd "${S}" |
130 |
|
131 |
# |
132 |
# fix gsm codec cflags (e.g. i586 core epias) and disable |
133 |
# assembler optimizations |
134 |
# |
135 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-gsm-pic.patch || die "patch failed" |
136 |
|
137 |
# |
138 |
# add missing LIBS for uclibc |
139 |
# |
140 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1-uclibc.patch || die "patch failed" |
141 |
|
142 |
# |
143 |
# make sure FXO ports are usable immediately, without requiring an inbound call first |
144 |
# https://issues.asterisk.org/view.php?id=14577 |
145 |
# |
146 |
epatch "${FILESDIR}"/1.6.1/${PN}-1.6.1.6-fxsks-hookstate.patch || die "patch failed" |
147 |
|
148 |
# |
149 |
# do not ignore alarm-cleared event while V23 caller ID detection is in progress |
150 |
# otherwise automated British Telecom line test causes permanent red alarm |
151 |
# https://issues.asterisk.org/view.php?id=14163 |
152 |
# |
153 |
epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.0-bt-line-test.patch || die "patch failed" |
154 |
|
155 |
# |
156 |
# sprinkle some plus signs in strategic locations for maximum parallel make happiness |
157 |
# https://issues.asterisk.org/view.php?id=16489 |
158 |
# |
159 |
epatch "${FILESDIR}"/1.6.2/${PN}-1.6.2.1-parallel-make.patch || die "patch failed" |
160 |
|
161 |
AT_M4DIR=autoconf eautoreconf |
162 |
|
163 |
# parse modules list |
164 |
if [[ -n "${ASTERISK_MODULES}" ]]; then |
165 |
local x modules="$(get_available_modules)" |
166 |
|
167 |
einfo "Custom list of modules specified, checking..." |
168 |
|
169 |
use debug && { |
170 |
einfo "Available modules: ${modules}" |
171 |
einfo " Selected modules: ${ASTERISK_MODULES}" |
172 |
} |
173 |
|
174 |
for x in ${ASTERISK_MODULES}; do |
175 |
if [[ "${x}" = "-*" ]]; then |
176 |
MODULES_LIST="" |
177 |
else |
178 |
if has ${x} ${modules} |
179 |
then |
180 |
MODULES_LIST="${MODULES_LIST} ${x}" |
181 |
else |
182 |
eerror "Unknown module: ${x}" |
183 |
fi |
184 |
fi |
185 |
done |
186 |
|
187 |
export MODULES_LIST |
188 |
fi |
189 |
} |
190 |
|
191 |
src_compile() { |
192 |
# |
193 |
# start with configure |
194 |
# |
195 |
econf \ |
196 |
--libdir="/usr/$(get_libdir)" \ |
197 |
--localstatedir="/var" \ |
198 |
--with-gsm=internal \ |
199 |
--with-popt \ |
200 |
--with-z \ |
201 |
$(use_with alsa asound) \ |
202 |
$(use_with caps cap) \ |
203 |
$(use_with curl) \ |
204 |
$(use_with dahdi pri) \ |
205 |
$(use_with dahdi tonezone) \ |
206 |
$(use_with dahdi) \ |
207 |
$(use_with freetds tds) \ |
208 |
$(use_with iconv) \ |
209 |
$(use_with jabber iksemel) \ |
210 |
$(use_with misdn isdnnet) \ |
211 |
$(use_with misdn suppserv) \ |
212 |
$(use_with misdn) \ |
213 |
$(use_with newt) \ |
214 |
$(use_with oss) \ |
215 |
$(use_with postgres) \ |
216 |
$(use_with radius) \ |
217 |
$(use_with snmp netsnmp) \ |
218 |
$(use_with span spandsp) \ |
219 |
$(use_with speex) \ |
220 |
$(use_with speex speexdsp) \ |
221 |
$(use_with sqlite sqlite3) \ |
222 |
$(use_with ssl crypto) \ |
223 |
$(use_with ssl) \ |
224 |
$(use_with vorbis ogg) \ |
225 |
$(use_with vorbis) || die "econf failed" |
226 |
|
227 |
# |
228 |
# custom module filter |
229 |
# run menuselect to evaluate the list of modules |
230 |
# and rewrite the list afterwards |
231 |
# |
232 |
if [[ -n "${MODULES_LIST}" ]] |
233 |
then |
234 |
local mod category tmp_list failed_list |
235 |
|
236 |
### |
237 |
# run menuselect |
238 |
|
239 |
emake menuselect.makeopts || die "emake menuselect.makeopts failed" |
240 |
|
241 |
### |
242 |
# get list of modules with failed dependencies |
243 |
|
244 |
failed_list="$(awk -F= '/^MENUSELECT_DEPSFAILED=/{ print $3 }' menuselect.makeopts)" |
245 |
|
246 |
### |
247 |
# traverse our list of modules |
248 |
|
249 |
for category in app cdr codec format func pbx res; do |
250 |
tmp_list="" |
251 |
|
252 |
# search list of modules for matching ones first... |
253 |
for mod in ${MODULES_LIST}; do |
254 |
# module is from current category? |
255 |
if [[ "${mod/%_*}" = "${category}" ]] |
256 |
then |
257 |
# check menuselect thinks the dependencies are met |
258 |
if has ${mod} ${failed_list} |
259 |
then |
260 |
eerror "${mod}: dependencies required to build this module are not met, NOT BUILDING!" |
261 |
else |
262 |
tmp_list="${tmp_list} ${mod}" |
263 |
fi |
264 |
fi |
265 |
done |
266 |
|
267 |
use debug && echo "${category} tmp: ${tmp_list}" |
268 |
|
269 |
# replace the module list for $category with our custom one |
270 |
if [[ -n "${tmp_list}" ]] |
271 |
then |
272 |
category="$(echo ${category} | tr '[:lower:]' '[:upper:]')" |
273 |
sed -i -e "s:^\(MENUSELECT_${category}S?\):\1=${tmp_list}:" \ |
274 |
menuselect.makeopts || die "failed to set list of ${category} applications" |
275 |
fi |
276 |
done |
277 |
fi |
278 |
|
279 |
ASTLDFLAGS="${LDFLAGS}" emake || die "emake failed" |
280 |
} |
281 |
|
282 |
src_install() { |
283 |
# setup directory structure |
284 |
# |
285 |
mkdir -p "${D}"usr/lib/pkgconfig |
286 |
|
287 |
emake DESTDIR="${D}" install || die "emake install failed" |
288 |
emake DESTDIR="${D}" samples || die "emake samples failed" |
289 |
|
290 |
# remove installed sample files if nosamples flag is set |
291 |
if use nosamples; then |
292 |
einfo "Skipping installation of sample files..." |
293 |
rm -f "${D}"var/lib/asterisk/mohmp3/* |
294 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* |
295 |
rm -f "${D}"var/lib/asterisk/agi-bin/* |
296 |
else |
297 |
einfo "Sample files have been installed" |
298 |
fi |
299 |
rm -rf "${D}"var/spool/asterisk/voicemail/default |
300 |
|
301 |
einfo "Configuration samples have been moved to: "${ROOT}"/usr/share/doc/${PF}/conf" |
302 |
insinto /usr/share/doc/${PF}/conf |
303 |
doins "${D}"etc/asterisk/*.conf* |
304 |
|
305 |
cd "${D}" |
306 |
for conffile in etc/asterisk/*.* |
307 |
do |
308 |
fowners asterisk:asterisk $conffile |
309 |
fperms 0660 $conffile |
310 |
done |
311 |
cd "${S}" |
312 |
|
313 |
# keep directories |
314 |
diropts -m 0770 -o asterisk -g asterisk |
315 |
keepdir /etc/asterisk |
316 |
keepdir /var/lib/asterisk |
317 |
keepdir /var/run/asterisk |
318 |
keepdir /var/spool/asterisk |
319 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
320 |
diropts -m 0750 -o asterisk -g asterisk |
321 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
322 |
|
323 |
newinitd "${FILESDIR}"/1.6.1/asterisk.initd3 asterisk |
324 |
newconfd "${FILESDIR}"/1.6.0/asterisk.confd asterisk |
325 |
|
326 |
# some people like to keep the sources around for custom patching |
327 |
# copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there |
328 |
if use keepsrc |
329 |
then |
330 |
dodir /usr/src |
331 |
|
332 |
ebegin "Copying sources into /usr/src" |
333 |
cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources" |
334 |
eend $? |
335 |
|
336 |
ebegin "Cleaning source tree" |
337 |
emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources" |
338 |
eend $? |
339 |
|
340 |
einfo "Clean sources are available in "${ROOT}"usr/src/${PF}" |
341 |
fi |
342 |
|
343 |
# install the upgrade documentation |
344 |
# |
345 |
dodoc README UPGRADE* BUGS CREDITS |
346 |
|
347 |
# install snmp mib files |
348 |
# |
349 |
if use snmp |
350 |
then |
351 |
insinto /usr/share/snmp/mibs/ |
352 |
doins doc/digium-mib.txt doc/asterisk-mib.txt |
353 |
fi |
354 |
} |
355 |
|
356 |
pkg_preinst() { |
357 |
enewgroup asterisk |
358 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
359 |
} |
360 |
|
361 |
pkg_postinst() { |
362 |
# |
363 |
# Announcements, warnings, reminders... |
364 |
# |
365 |
einfo "Asterisk has been installed" |
366 |
echo |
367 |
elog "If you want to know more about asterisk, visit these sites:" |
368 |
elog "http://www.asteriskdocs.org/" |
369 |
elog "http://www.voip-info.org/wiki-Asterisk" |
370 |
echo |
371 |
elog "http://www.automated.it/guidetoasterisk.htm" |
372 |
echo |
373 |
elog "Gentoo VoIP IRC Channel:" |
374 |
elog "#gentoo-voip @ irc.freenode.net" |
375 |
echo |
376 |
echo |
377 |
elog "1.6.1 -> 1.6.2 changes that you may care about:" |
378 |
elog "canreinvite -> directmedia (sip.conf)" |
379 |
elog "extensive T.38 (fax) changes" |
380 |
elog "http://svn.asterisk.org/svn/${PN}/tags/${PV}/UPGRADE.txt" |
381 |
elog "or: bzless ${ROOT}usr/share/doc/${PF}/UPGRADE.txt.bz2" |
382 |
} |
383 |
|
384 |
pkg_config() { |
385 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
386 |
|
387 |
read tmp |
388 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
389 |
|
390 |
if [[ "$tmp" = "y" ]] ||\ |
391 |
[[ "$tmp" = "yes" ]] |
392 |
then |
393 |
einfo "Resetting permissions to defaults..." |
394 |
|
395 |
for x in spool run lib log; do |
396 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
397 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
398 |
done |
399 |
|
400 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
401 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
402 |
|
403 |
einfo "done" |
404 |
else |
405 |
einfo "skipping" |
406 |
fi |
407 |
} |