1 |
chainsaw 11/01/19 13:55:24 |
2 |
|
3 |
Modified: ChangeLog |
4 |
Added: asterisk-1.4.39.1.ebuild |
5 |
Removed: asterisk-1.4.37.ebuild |
6 |
Log: |
7 |
Trim down 1.4 branch by culling vulnerable ebuild for security bug #352059. Adding 1.4.39.1 which fixes a stack buffer overflow in SIP URI encoding. Patchset repackaged but otherwise unchanged. |
8 |
|
9 |
(Portage version: 2.1.9.31/cvs/Linux x86_64) |
10 |
|
11 |
Revision Changes Path |
12 |
1.285 net-misc/asterisk/ChangeLog |
13 |
|
14 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.285&view=markup |
15 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.285&content-type=text/plain |
16 |
diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.284&r2=1.285 |
17 |
|
18 |
Index: ChangeLog |
19 |
=================================================================== |
20 |
RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v |
21 |
retrieving revision 1.284 |
22 |
retrieving revision 1.285 |
23 |
diff -u -r1.284 -r1.285 |
24 |
--- ChangeLog 19 Jan 2011 13:19:44 -0000 1.284 |
25 |
+++ ChangeLog 19 Jan 2011 13:55:24 -0000 1.285 |
26 |
@@ -1,6 +1,19 @@ |
27 |
# ChangeLog for net-misc/asterisk |
28 |
# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 |
29 |
-# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.284 2011/01/19 13:19:44 chainsaw Exp $ |
30 |
+# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.285 2011/01/19 13:55:24 chainsaw Exp $ |
31 |
+ |
32 |
+*asterisk-1.4.39.1 (19 Jan 2011) |
33 |
+ |
34 |
+ 19 Jan 2011; Tony Vroon <chainsaw@g.o> |
35 |
+ -files/1.4.0/asterisk-1.4.0-uclibc.patch, |
36 |
+ -files/1.4.0/asterisk-1.4.0-var_rundir.patch, |
37 |
+ -files/1.4.0/asterisk-1.4.33-gsm-pic.patch, |
38 |
+ -files/1.4.0/asterisk-1.4.33-inband-indications.patch, |
39 |
+ -asterisk-1.4.37.ebuild, -files/1.4.0/asterisk-1.4.37-imap-libs.patch, |
40 |
+ +asterisk-1.4.39.1.ebuild: |
41 |
+ Trim down 1.4 branch by culling vulnerable ebuild for security bug #352059. |
42 |
+ Adding 1.4.39.1 which fixes a stack buffer overflow in SIP URI encoding. |
43 |
+ Patchset repackaged but otherwise unchanged. |
44 |
|
45 |
*asterisk-1.6.2.16.1 (19 Jan 2011) |
46 |
|
47 |
|
48 |
|
49 |
|
50 |
1.1 net-misc/asterisk/asterisk-1.4.39.1.ebuild |
51 |
|
52 |
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.4.39.1.ebuild?rev=1.1&view=markup |
53 |
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-1.4.39.1.ebuild?rev=1.1&content-type=text/plain |
54 |
|
55 |
Index: asterisk-1.4.39.1.ebuild |
56 |
=================================================================== |
57 |
# Copyright 1999-2011 Gentoo Foundation |
58 |
# Distributed under the terms of the GNU General Public License v2 |
59 |
# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-1.4.39.1.ebuild,v 1.1 2011/01/19 13:55:24 chainsaw Exp $ |
60 |
|
61 |
EAPI=3 |
62 |
inherit autotools base eutils flag-o-matic 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-ast14-patchset-0.1.tar.bz2" |
70 |
LICENSE="GPL-2" |
71 |
SLOT="0" |
72 |
KEYWORDS="~amd64" |
73 |
|
74 |
IUSE="alsa +caps dahdi debug doc freetds imap jabber keepsrc misdn newt +samples odbc oss postgres radius snmp speex ssl sqlite static vanilla vorbis" |
75 |
|
76 |
EPATCH_SUFFIX="patch" |
77 |
PATCHES=( "${WORKDIR}/ast14-patchset" ) |
78 |
|
79 |
RDEPEND="sys-libs/ncurses |
80 |
dev-libs/popt |
81 |
sys-libs/zlib |
82 |
alsa? ( media-libs/alsa-lib ) |
83 |
caps? ( sys-libs/libcap ) |
84 |
dahdi? ( >=net-libs/libpri-1.4.7 |
85 |
net-misc/dahdi-tools ) |
86 |
freetds? ( dev-db/freetds ) |
87 |
imap? ( >=net-libs/c-client-2007[ssl=] ) |
88 |
jabber? ( dev-libs/iksemel ) |
89 |
misdn? ( net-dialup/misdnuser ) |
90 |
newt? ( dev-libs/newt ) |
91 |
odbc? ( dev-db/unixODBC ) |
92 |
postgres? ( dev-db/postgresql-base ) |
93 |
radius? ( net-dialup/radiusclient-ng ) |
94 |
snmp? ( net-analyzer/net-snmp ) |
95 |
speex? ( media-libs/speex ) |
96 |
sqlite? ( dev-db/sqlite ) |
97 |
ssl? ( dev-libs/openssl ) |
98 |
vorbis? ( media-libs/libvorbis )" |
99 |
|
100 |
DEPEND="${RDEPEND} |
101 |
!<net-misc/asterisk-addons-1.4 |
102 |
!>=net-misc/asterisk-addons-1.6 |
103 |
!net-misc/zaptel" |
104 |
|
105 |
PDEPEND="net-misc/asterisk-core-sounds |
106 |
net-misc/asterisk-extra-sounds |
107 |
net-misc/asterisk-moh-opsound" |
108 |
|
109 |
S="${WORKDIR}/${MY_P}" |
110 |
|
111 |
pkg_setup() { |
112 |
CONFIG_CHECK="~!NF_CONNTRACK_SIP" |
113 |
local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users |
114 |
have reported that this module dropped critical SIP packets in their deployments. You |
115 |
may want to disable it if you see such problems." |
116 |
check_extra_config |
117 |
} |
118 |
|
119 |
src_prepare() { |
120 |
base_src_prepare |
121 |
AT_M4DIR=autoconf eautoreconf |
122 |
|
123 |
# add custom device state function (func_devstate) |
124 |
# |
125 |
# http://asterisk.org/node/48360 |
126 |
# http://svncommunity.digium.com/svn/russell/func_devstate-1.4/README.txt |
127 |
# |
128 |
cp "${FILESDIR}"/1.4.0/func_devstate-r6.c "${S}"/funcs/func_devstate.c |
129 |
|
130 |
# Add technology-independent volume control function |
131 |
# |
132 |
cp "${FILESDIR}"/1.4.0/func_volume.c "${S}"/funcs/func_volume.c |
133 |
|
134 |
# Custom menuselect options are defined in this file (it may remain empty) |
135 |
# |
136 |
>"${S}"/gentoo.makeopts |
137 |
|
138 |
# Enable various debugging options if requested |
139 |
# |
140 |
if use debug; then |
141 |
local debug_opts="DEBUG_CHANNEL_LOCKS DEBUG_THREADS DEBUG_FD_LEAKS" |
142 |
einfo "Enabling debugging options: ${debug_opts}" |
143 |
echo "MENUSELECT_CFLAGS=${debug_opts}" >> "${S}"/gentoo.makeopts |
144 |
fi |
145 |
|
146 |
# Enable IMAP storage in app_voicemail if requested |
147 |
# |
148 |
use imap && echo "MENUSELECT_OPTS_app_voicemail=IMAP_STORAGE" >> "${S}"/gentoo.makeopts |
149 |
} |
150 |
|
151 |
src_configure() { |
152 |
if use debug; then |
153 |
# Tone down the compiler flags somewhat. This should be less aggressive |
154 |
# than the DONT_OPTIMIZE option whilst still producing useful results. |
155 |
# |
156 |
strip-flags |
157 |
replace-flags -O? -O0 |
158 |
fi |
159 |
|
160 |
if use imap; then |
161 |
local imap_libs |
162 |
has_version net-libs/c-client[pam] && imap_libs="-lpam" |
163 |
has_version net-libs/c-client[ssl] && imap_libs="${imap_libs} -lssl" |
164 |
export IMAP_LIBS="${imap_libs}" |
165 |
fi |
166 |
|
167 |
econf \ |
168 |
--libdir="/usr/$(get_libdir)" \ |
169 |
--localstatedir="/var" \ |
170 |
--with-gsm=internal \ |
171 |
--with-ncurses \ |
172 |
--with-popt \ |
173 |
--with-z \ |
174 |
--without-curses \ |
175 |
--without-h323 \ |
176 |
--without-nbs \ |
177 |
--without-osptk \ |
178 |
--without-pwlib \ |
179 |
--without-kde \ |
180 |
--without-usb \ |
181 |
--without-vpb \ |
182 |
--without-zaptel \ |
183 |
$(use_with alsa asound) \ |
184 |
$(use_with caps cap) \ |
185 |
$(use_with dahdi pri) \ |
186 |
$(use_with dahdi tonezone) \ |
187 |
$(use_with dahdi) \ |
188 |
$(use_with freetds tds) \ |
189 |
$(use_with imap imap system) \ |
190 |
$(use_with jabber iksemel) \ |
191 |
$(use_with misdn isdnnet) \ |
192 |
$(use_with misdn suppserv) \ |
193 |
$(use_with misdn) \ |
194 |
$(use_with newt) \ |
195 |
$(use_with odbc) \ |
196 |
$(use_with oss) \ |
197 |
$(use_with postgres) \ |
198 |
$(use_with radius) \ |
199 |
$(use_with snmp netsnmp) \ |
200 |
$(use_with speex) \ |
201 |
$(use_with speex speexdsp) \ |
202 |
$(use_with sqlite) \ |
203 |
$(use_with ssl) \ |
204 |
$(use_with vorbis ogg) \ |
205 |
$(use_with vorbis) || die "econf failed" |
206 |
|
207 |
# |
208 |
# blank out sounds/sounds.xml file to prevent |
209 |
# asterisk from installing sounds files (we pull them in via |
210 |
# asterisk-{core,extra}-sounds and asterisk-moh-opsound. |
211 |
# |
212 |
>"${S}"/sounds/sounds.xml |
213 |
} |
214 |
|
215 |
src_compile() { |
216 |
ASTLDFLAGS="${LDFLAGS}" emake USER_MAKEOPTS="${S}"/gentoo.makeopts || die "emake failed" |
217 |
} |
218 |
|
219 |
src_install() { |
220 |
# setup directory structure |
221 |
# |
222 |
mkdir -p "${D}"usr/$(get_libdir)/pkgconfig |
223 |
|
224 |
emake DESTDIR="${D}" install || die "emake install failed" |
225 |
|
226 |
if use samples; then |
227 |
emake DESTDIR="${D}" samples || die "emake samples failed" |
228 |
for conffile in "${D}"etc/asterisk/*.* |
229 |
do |
230 |
chown asterisk:asterisk $conffile |
231 |
chmod 0660 $conffile |
232 |
done |
233 |
einfo "Sample files have been installed" |
234 |
else |
235 |
einfo "Skipping installation of sample files..." |
236 |
rm -f "${D}"var/lib/asterisk/mohmp3/* |
237 |
rm -f "${D}"var/lib/asterisk/sounds/demo-* |
238 |
rm -f "${D}"var/lib/asterisk/agi-bin/* |
239 |
rm -f "${D}"etc/asterisk/* |
240 |
fi |
241 |
rm -rf "${D}"var/spool/asterisk/voicemail/default |
242 |
|
243 |
# keep directories |
244 |
diropts -m 0770 -o asterisk -g asterisk |
245 |
keepdir /etc/asterisk |
246 |
keepdir /var/lib/asterisk |
247 |
keepdir /var/run/asterisk |
248 |
keepdir /var/spool/asterisk |
249 |
keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail} |
250 |
diropts -m 0750 -o asterisk -g asterisk |
251 |
keepdir /var/log/asterisk/{cdr-csv,cdr-custom} |
252 |
|
253 |
newinitd "${FILESDIR}"/1.4.0/asterisk.initd asterisk |
254 |
newconfd "${FILESDIR}"/1.4.0/asterisk.confd asterisk |
255 |
|
256 |
# some people like to keep the sources around for custom patching |
257 |
# copy the whole source tree to /usr/src/asterisk-${PVF} and run make clean there |
258 |
if use keepsrc |
259 |
then |
260 |
dodir /usr/src |
261 |
|
262 |
ebegin "Copying sources into /usr/src" |
263 |
cp -dPR "${S}" "${D}"/usr/src/${PF} || die "Unable to copy sources" |
264 |
eend $? |
265 |
|
266 |
ebegin "Cleaning source tree" |
267 |
emake -C "${D}"/usr/src/${PF} clean &>/dev/null || die "Unable to clean sources" |
268 |
eend $? |
269 |
|
270 |
einfo "Clean sources are available in "${ROOT}"usr/src/${PF}" |
271 |
fi |
272 |
|
273 |
# install the upgrade documentation |
274 |
# |
275 |
dodoc README UPGRADE* BUGS CREDITS |
276 |
|
277 |
# install extra documentation |
278 |
# |
279 |
if use doc |
280 |
then |
281 |
dodoc doc/*.txt |
282 |
dodoc doc/*.pdf |
283 |
dodoc doc/PEERING |
284 |
dodoc doc/CODING-GUIDELINES |
285 |
dodoc doc/tex/*.pdf |
286 |
fi |
287 |
|
288 |
# install snmp mib files |
289 |
# |
290 |
if use snmp |
291 |
then |
292 |
insinto /usr/share/snmp/mibs/ |
293 |
doins doc/digium-mib.txt doc/asterisk-mib.txt |
294 |
fi |
295 |
|
296 |
# install SIP scripts; bug #300832 |
297 |
# |
298 |
dodoc "${FILESDIR}/1.6.2/sip_calc_auth" |
299 |
dodoc "${FILESDIR}/1.6.2/find_call_sip_trace.sh" |
300 |
dodoc "${FILESDIR}/1.6.2/find_call_ids.sh" |
301 |
dodoc "${FILESDIR}/1.6.2/call_data.txt" |
302 |
|
303 |
insinto /etc/logrotate.d |
304 |
newins "${FILESDIR}/1.4.0/asterisk.logrotate" asterisk |
305 |
} |
306 |
|
307 |
pkg_preinst() { |
308 |
enewgroup asterisk |
309 |
enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout" |
310 |
} |
311 |
|
312 |
pkg_postinst() { |
313 |
# |
314 |
# Announcements, warnings, reminders... |
315 |
# |
316 |
einfo "Asterisk has been installed" |
317 |
echo |
318 |
elog "If you want to know more about asterisk, visit these sites:" |
319 |
elog "http://www.asteriskdocs.org/" |
320 |
elog "http://www.voip-info.org/wiki-Asterisk" |
321 |
echo |
322 |
elog "http://www.automated.it/guidetoasterisk.htm" |
323 |
echo |
324 |
elog "Gentoo VoIP IRC Channel:" |
325 |
elog "#gentoo-voip @ irc.freenode.net" |
326 |
echo |
327 |
echo |
328 |
if has_version "=net-misc/asterisk-1.2*"; then |
329 |
ewarn "Please read "${ROOT}"usr/share/doc/${PF}/UPGRADE.txt.bz2 before continuing" |
330 |
fi |
331 |
} |
332 |
|
333 |
pkg_config() { |
334 |
einfo "Do you want to reset file permissions and ownerships (y/N)?" |
335 |
|
336 |
read tmp |
337 |
tmp="$(echo $tmp | tr '[:upper:]' '[:lower:]')" |
338 |
|
339 |
if [[ "$tmp" = "y" ]] ||\ |
340 |
[[ "$tmp" = "yes" ]] |
341 |
then |
342 |
einfo "Resetting permissions to defaults..." |
343 |
|
344 |
for x in spool run lib log; do |
345 |
chown -R asterisk:asterisk "${ROOT}"var/${x}/asterisk |
346 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"var/${x}/asterisk |
347 |
done |
348 |
|
349 |
chown -R root:asterisk "${ROOT}"etc/asterisk |
350 |
chmod -R u=rwX,g=rwX,o= "${ROOT}"etc/asterisk |
351 |
|
352 |
einfo "done" |
353 |
else |
354 |
einfo "skipping" |
355 |
fi |
356 |
} |