Gentoo Archives: gentoo-commits

From: "Tony Vroon (chainsaw)" <chainsaw@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in net-misc/asterisk: ChangeLog asterisk-11.2.1-r1.ebuild
Date: Tue, 05 Mar 2013 13:54:33
Message-Id: 20130305135429.98BD92171D@flycatcher.gentoo.org
1 chainsaw 13/03/05 13:54:29
2
3 Modified: ChangeLog
4 Added: asterisk-11.2.1-r1.ebuild
5 Log:
6 Fix by Jaco Kroon to correctly handle error returns for dundi lookups, previously resulting in segmentation faults. Closes bug #460406.
7
8 (Portage version: 2.1.11.55/cvs/Linux x86_64, signed Manifest commit with key 0xB5058F9A)
9
10 Revision Changes Path
11 1.445 net-misc/asterisk/ChangeLog
12
13 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.445&view=markup
14 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?rev=1.445&content-type=text/plain
15 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/ChangeLog?r1=1.444&r2=1.445
16
17 Index: ChangeLog
18 ===================================================================
19 RCS file: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v
20 retrieving revision 1.444
21 retrieving revision 1.445
22 diff -u -r1.444 -r1.445
23 --- ChangeLog 26 Feb 2013 11:00:27 -0000 1.444
24 +++ ChangeLog 5 Mar 2013 13:54:29 -0000 1.445
25 @@ -1,6 +1,12 @@
26 # ChangeLog for net-misc/asterisk
27 # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
28 -# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.444 2013/02/26 11:00:27 ago Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/ChangeLog,v 1.445 2013/03/05 13:54:29 chainsaw Exp $
30 +
31 +*asterisk-11.2.1-r1 (05 Mar 2013)
32 +
33 + 05 Mar 2013; Tony Vroon <chainsaw@g.o> +asterisk-11.2.1-r1.ebuild:
34 + Fix by Jaco Kroon to correctly handle error returns for dundi lookups,
35 + previously resulting in segmentation faults. Closes bug #460406.
36
37 26 Feb 2013; Agostino Sarubbo <ago@g.o> asterisk-11.2.1.ebuild:
38 Stable for x86, wrt bug #458126
39
40
41
42 1.1 net-misc/asterisk/asterisk-11.2.1-r1.ebuild
43
44 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.2.1-r1.ebuild?rev=1.1&view=markup
45 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/net-misc/asterisk/asterisk-11.2.1-r1.ebuild?rev=1.1&content-type=text/plain
46
47 Index: asterisk-11.2.1-r1.ebuild
48 ===================================================================
49 # Copyright 1999-2013 Gentoo Foundation
50 # Distributed under the terms of the GNU General Public License v2
51 # $Header: /var/cvsroot/gentoo-x86/net-misc/asterisk/asterisk-11.2.1-r1.ebuild,v 1.1 2013/03/05 13:54:29 chainsaw Exp $
52
53 EAPI=5
54 inherit autotools base eutils linux-info multilib
55
56 MY_P="${PN}-${PV/_/-}"
57
58 DESCRIPTION="Asterisk: A Modular Open Source PBX System"
59 HOMEPAGE="http://www.asterisk.org/"
60 SRC_URI="http://downloads.asterisk.org/pub/telephony/asterisk/releases/${MY_P}.tar.gz
61 mirror://gentoo/gentoo-asterisk-patchset-3.3.tar.bz2"
62 LICENSE="GPL-2"
63 SLOT="0"
64 KEYWORDS="~amd64 ~x86"
65
66 IUSE_VOICEMAIL_STORAGE="
67 +voicemail_storage_file
68 voicemail_storage_odbc
69 voicemail_storage_imap
70 "
71 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"
72 IUSE_EXPAND="VOICEMAIL_STORAGE"
73 REQUIRED_USE="gtalk? ( jabber )
74 ^^ ( ${IUSE_VOICEMAIL_STORAGE/+/} )
75 voicemail_storage_odbc? ( odbc )
76 "
77
78 EPATCH_SUFFIX="patch"
79 PATCHES=( "${WORKDIR}/asterisk-patchset" )
80
81 RDEPEND="dev-db/sqlite:3
82 dev-libs/popt
83 dev-libs/libxml2
84 dev-libs/openssl
85 sys-libs/ncurses
86 sys-libs/zlib
87 alsa? ( media-libs/alsa-lib )
88 bluetooth? ( net-wireless/bluez )
89 calendar? ( net-libs/neon
90 dev-libs/libical
91 dev-libs/iksemel )
92 caps? ( sys-libs/libcap )
93 cluster? ( sys-cluster/corosync )
94 curl? ( net-misc/curl )
95 dahdi? ( >=net-libs/libpri-1.4.12_beta2
96 net-misc/dahdi-tools )
97 freetds? ( dev-db/freetds )
98 gtalk? ( dev-libs/iksemel )
99 http? ( dev-libs/gmime:2.4 )
100 iconv? ( virtual/libiconv )
101 ilbc? ( dev-libs/ilbc-rfc3951 )
102 jabber? ( dev-libs/iksemel )
103 ldap? ( net-nds/openldap )
104 libedit? ( dev-libs/libedit )
105 lua? ( dev-lang/lua )
106 mysql? ( virtual/mysql )
107 newt? ( dev-libs/newt )
108 odbc? ( dev-db/unixODBC )
109 osplookup? ( net-libs/osptoolkit )
110 portaudio? ( media-libs/portaudio )
111 postgres? ( dev-db/postgresql-base )
112 radius? ( net-dialup/radiusclient-ng )
113 selinux? ( sec-policy/selinux-asterisk )
114 snmp? ( net-analyzer/net-snmp )
115 span? ( media-libs/spandsp )
116 speex? ( media-libs/speex )
117 srtp? ( net-libs/libsrtp )
118 vorbis? ( media-libs/libvorbis )"
119
120 DEPEND="${RDEPEND}
121 !net-libs/openh323
122 voicemail_storage_imap? ( virtual/imap-c-client )
123 "
124
125 RDEPEND="${RDEPEND}
126 syslog? ( virtual/logger )"
127
128 PDEPEND="net-misc/asterisk-core-sounds
129 net-misc/asterisk-extra-sounds
130 net-misc/asterisk-moh-opsound"
131
132 S="${WORKDIR}/${MY_P}"
133
134 pkg_setup() {
135 CONFIG_CHECK="~!NF_CONNTRACK_SIP"
136 local WARNING_NF_CONNTRACK_SIP="SIP (NAT) connection tracking is enabled. Some users
137 have reported that this module dropped critical SIP packets in their deployments. You
138 may want to disable it if you see such problems."
139 check_extra_config
140
141 enewgroup asterisk
142 enewgroup dialout 20
143 enewuser asterisk -1 -1 /var/lib/asterisk "asterisk,dialout"
144 }
145
146 src_prepare() {
147 base_src_prepare
148 AT_M4DIR=autoconf eautoreconf
149 }
150
151 src_configure() {
152 local vmst
153
154 econf \
155 --libdir="/usr/$(get_libdir)" \
156 --localstatedir="/var" \
157 --with-crypto \
158 --with-gsm=internal \
159 --with-popt \
160 --with-ssl \
161 --with-z \
162 --without-pwlib \
163 $(use_with caps cap) \
164 $(use_with http gmime) \
165 $(use_with newt) \
166 $(use_with portaudio)
167
168 # Blank out sounds/sounds.xml file to prevent
169 # asterisk from installing sounds files (we pull them in via
170 # asterisk-{core,extra}-sounds and asterisk-moh-opsound.
171 >"${S}"/sounds/sounds.xml
172
173 # Compile menuselect binary for optional components
174 emake menuselect.makeopts
175
176 # Broken functionality is forcibly disabled (bug #360143)
177 menuselect/menuselect --disable chan_misdn menuselect.makeopts
178 menuselect/menuselect --disable chan_ooh323 menuselect.makeopts
179
180 # Utility set is forcibly enabled (bug #358001)
181 menuselect/menuselect --enable smsq menuselect.makeopts
182 menuselect/menuselect --enable streamplayer menuselect.makeopts
183 menuselect/menuselect --enable aelparse menuselect.makeopts
184 menuselect/menuselect --enable astman menuselect.makeopts
185
186 # this is connected, otherwise it would not find
187 # ast_pktccops_gate_alloc symbol
188 menuselect/menuselect --enable chan_mgcp menuselect.makeopts
189 menuselect/menuselect --enable res_pktccops menuselect.makeopts
190
191 # SSL is forcibly enabled, IAX2 & DUNDI are expected to be available
192 menuselect/menuselect --enable pbx_dundi menuselect.makeopts
193 menuselect/menuselect --enable func_aes menuselect.makeopts
194 menuselect/menuselect --enable chan_iax2 menuselect.makeopts
195
196 # SQlite3 is now the main database backend, enable related features
197 menuselect/menuselect --enable cdr_sqlite3_custom menuselect.makeopts
198 menuselect/menuselect --enable cel_sqlite3_custom menuselect.makeopts
199
200 # The others are based on USE-flag settings
201 use_select() {
202 local state=$(use "$1" && echo enable || echo disable)
203 shift # remove use from parameters
204
205 while [[ -n $1 ]]; do
206 menuselect/menuselect --${state} "$1" menuselect.makeopts
207 shift
208 done
209 }
210
211 use_select alsa chan_alsa
212 use_select bluetooth chan_mobile
213 use_select calendar res_calendar res_calendar_{caldav,ews,exchange,icalendar}
214 use_select cluster res_corosync
215 use_select curl func_curl res_config_curl res_curl
216 use_select dahdi app_dahdibarge app_dahdiras chan_dahdi codec_dahdi res_timing_dahdi
217 use_select freetds {cdr,cel}_tds
218 use_select gtalk chan_motif
219 use_select http res_http_post
220 use_select iconv func_iconv
221 use_select jabber res_xmpp
222 use_select ilbc codec_ilbc format_ilbc
223 use_select ldap res_config_ldap
224 use_select lua pbx_lua
225 use_select mysql app_mysql cdr_mysql res_config_mysql
226 use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc
227 use_select osplookup app_osplookup
228 use_select oss chan_oss
229 use_select postgres {cdr,cel}_pgsql res_config_pgsql
230 use_select radius {cdr,cel}_radius
231 use_select snmp res_snmp
232 use_select span res_fax_spandsp
233 use_select speex {codec,func}_speex
234 use_select srtp res_srtp
235 use_select syslog cdr_syslog
236 use_select vorbis format_ogg_vorbis
237
238 # Voicemail storage ...
239 for vmst in ${IUSE_VOICEMAIL_STORAGE/+/}; do
240 if use ${vmst}; then
241 menuselect/menuselect --enable $(echo ${vmst##*_} | tr '[:lower:]' '[:upper:]')_STORAGE menuselect.makeopts
242 fi
243 done
244 }
245
246 src_compile() {
247 ASTLDFLAGS="${LDFLAGS}" emake
248 }
249
250 src_install() {
251 mkdir -p "${D}"usr/$(get_libdir)/pkgconfig || die
252 emake DESTDIR="${D}" installdirs
253 emake DESTDIR="${D}" install
254
255 if use radius; then
256 insinto /etc/radiusclient-ng/
257 doins contrib/dictionary.digium
258 fi
259 if use samples; then
260 emake DESTDIR="${D}" samples
261 for conffile in "${D}"etc/asterisk/*.*
262 do
263 chown asterisk:asterisk $conffile
264 chmod 0660 $conffile
265 done
266 einfo "Sample files have been installed"
267 else
268 einfo "Skipping installation of sample files..."
269 rm -f "${D}"var/lib/asterisk/mohmp3/* || die
270 rm -f "${D}"var/lib/asterisk/sounds/demo-* || die
271 rm -f "${D}"var/lib/asterisk/agi-bin/* || die
272 rm -f "${D}"etc/asterisk/* || die
273 fi
274 rm -rf "${D}"var/spool/asterisk/voicemail/default || die
275
276 # keep directories
277 diropts -m 0770 -o asterisk -g asterisk
278 keepdir /etc/asterisk
279 keepdir /var/lib/asterisk
280 keepdir /var/spool/asterisk
281 keepdir /var/spool/asterisk/{system,tmp,meetme,monitor,dictate,voicemail}
282 diropts -m 0750 -o asterisk -g asterisk
283 keepdir /var/log/asterisk/{cdr-csv,cdr-custom}
284
285 newinitd "${FILESDIR}"/1.8.0/asterisk.initd5 asterisk
286 newconfd "${FILESDIR}"/1.8.0/asterisk.confd asterisk
287
288 # install the upgrade documentation
289 #
290 dodoc README UPGRADE* BUGS CREDITS
291
292 # install extra documentation
293 #
294 if use doc
295 then
296 dodoc doc/*.txt
297 dodoc doc/*.pdf
298 fi
299
300 # install SIP scripts; bug #300832
301 #
302 dodoc "${FILESDIR}/1.6.2/sip_calc_auth"
303 dodoc "${FILESDIR}/1.8.0/find_call_sip_trace.sh"
304 dodoc "${FILESDIR}/1.8.0/find_call_ids.sh"
305 dodoc "${FILESDIR}/1.6.2/call_data.txt"
306
307 # install logrotate snippet; bug #329281
308 #
309 insinto /etc/logrotate.d
310 newins "${FILESDIR}/1.6.2/asterisk.logrotate3" asterisk
311 }
312
313 pkg_postinst() {
314 #
315 # Announcements, warnings, reminders...
316 #
317 einfo "Asterisk has been installed"
318 echo
319 elog "If you want to know more about asterisk, visit these sites:"
320 elog "http://www.asteriskdocs.org/"
321 elog "http://www.voip-info.org/wiki-Asterisk"
322 echo
323 elog "http://www.automated.it/guidetoasterisk.htm"
324 echo
325 elog "Gentoo VoIP IRC Channel:"
326 elog "#gentoo-voip @ irc.freenode.net"
327 echo
328 echo
329 elog "Please read the Asterisk 11 upgrade document:"
330 elog "https://wiki.asterisk.org/wiki/display/AST/Upgrading+to+Asterisk+11"
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 }