Lenz Emilitri
2016-Jun-14 09:02 UTC
[asterisk-users] Pet project: one step Asterisk compile on Centos 7
Hi all, I thought I'd share I script I made (based on some of Leif's works) that lets you download, compile and install Asterisk all in one go; and then removed the dev tools used. We use it quite a bit to provision systems using Ansible, but it is easier than remembering everything every time even if you are using a shell. At the moment I have scripts for Centos 7 and Asterisk 13, but plan to port them to other versions of Asterisk as there is a need to do so. Contribs welcome! Project located at https://github.com/l3nz/CompileAsteriskPBX Thanks l. -- Loway - home of QueueMetrics - http://queuemetrics.com Try the WombatDialer auto-dialer @ http://wombatdialer.com
Tzafrir Cohen
2016-Jun-14 15:44 UTC
[asterisk-users] Pet project: one step Asterisk compile on Centos 7
On Tue, Jun 14, 2016 at 11:02:17AM +0200, Lenz Emilitri wrote:> Hi all, > I thought I'd share I script I made (based on some of Leif's works) > that lets you download, compile and install Asterisk all in one go; > and then removed the dev tools used. > > We use it quite a bit to provision systems using Ansible, but it is > easier than remembering everything every time even if you are using a > shell. > > At the moment I have scripts for Centos 7 and Asterisk 13, but plan to > port them to other versions of Asterisk as there is a need to do so. > Contribs welcome! > > Project located at https://github.com/l3nz/CompileAsteriskPBX1. Asterisk basically has such a script inside. 2. Asterisk has an RPM package. An RPM package is exactly a reproducible build (listing dependecies, and such). 3. You are reinventing RPM. Badly. Do you people really want to run: - As root - A huge blob nobody can inspect - that is executable, and hence has tons of places to add nice hooks in? Learn how to use rpmbuild. -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com
Lenz Emilitri
2016-Jun-14 16:22 UTC
[asterisk-users] Pet project: one step Asterisk compile on Centos 7
2016-06-14 17:44 GMT+02:00 Tzafrir Cohen <tzafrir.cohen at xorcom.com>:> > 1. Asterisk basically has such a script inside.It is - as you say - inside. This is outside and does the download for you.> 2. Asterisk has an RPM package. An RPM package is exactly a reproducible > build (listing dependecies, and such).It's true. They are very interesting, especially if you are a historian of software. http://packages.asterisk.org/centos/ If you need something less, say, "vintage", you may need to compile it yourself.> 3. You are reinventing RPM. Badly. Do you people really want to run: > - As root > - A huge blob nobody can inspect > - that is executable, and hence has tons of places to add nice hooks > in? > > Learn how to use rpmbuild.I personally happen to have shipped RPMs for about 10 years now. But building a RPM might be overkill if you are deploying a test, throwaway box, or just once for a Docker image. Of course I would not use this as an RPM substitute, and if I were to use something like this I'd fork it or at least read it (it is maybe 20 lines). YMMV. And IIRC there is more places to ship "nice hooks" into a binary you ship as an RPM than in a shell script that does what you would manually from the terminal! l. -- Loway - home of QueueMetrics - http://queuemetrics.com Try the WombatDialer auto-dialer @ http://wombatdialer.com
Tzafrir Cohen
2016-Jun-14 17:50 UTC
[asterisk-users] Pet project: one step Asterisk compile on Centos 7
Off-topic: On Tue, Jun 14, 2016 at 11:02:17AM +0200, Lenz Emilitri wrote:> Project located at https://github.com/l3nz/CompileAsteriskPBX>From the build script:# build Asterisk cd $TARGET_DIR/$ASTVERSION ./configure --libdir=/usr/lib64 cd $TARGET_DIR/$ASTVERSION/menuselect make menuselect cd $TARGET_DIR/$ASTVERSION make menuselect-tree ./menuselect/menuselect \ #[snip menuselect parameters] # we want mp3's ./contrib/scripts/get_mp3_source.sh make (This is not intended to criticise Lenz) All of this magic (specifically the bits before the menuselect) is needed for a proper build? * Why is an explicit libdir packameter needed? What break if it is not passed? * Why is there a need to build menuselect manually? What about 'make menuselect'? Do we need a Makefile target to build menuselect but not run it? -- Tzafrir Cohen icq#16849755 jabber:tzafrir.cohen at xorcom.com +972-50-7952406 mailto:tzafrir.cohen at xorcom.com http://www.xorcom.com
Nasir Iqbal
2016-Jun-16 10:43 UTC
[asterisk-users] Pet project: one step Asterisk compile on Centos 7
Hi All, Thanks to Tzafrir Cohen who described very well that why RPM is better then any other script and how easy to build one. However for those like me still enough lazy to collect dependencies or setup mock builder, I recommend Koji build system for them. Either one can host his/her own Koji server or can freely signup for Community Koji Build system being hosted by CentOs and Fedora After you have access to koji build system it is very simple and quick to make your own custom RPM for any target distribution and architecture of your choice! Regards Nasir Iqbal ICTBroadcast - an Auto Dialer software for ITSP <https://www.ictbroadcast.com/how-become-internet-telephony-service-provider-itsp-using-ictbroadcast-sp-edition> SMS, Fax and Voice broadcasting & Inbound / Outbound Campaigns http://www.ictbroadcast.com/ On Tue, Jun 14, 2016 at 10:50 PM, Tzafrir Cohen <tzafrir.cohen at xorcom.com> wrote:> Off-topic: > > On Tue, Jun 14, 2016 at 11:02:17AM +0200, Lenz Emilitri wrote: > > > Project located at https://github.com/l3nz/CompileAsteriskPBX > > From the build script: > > # build Asterisk > cd $TARGET_DIR/$ASTVERSION > ./configure --libdir=/usr/lib64 > cd $TARGET_DIR/$ASTVERSION/menuselect > make menuselect > cd $TARGET_DIR/$ASTVERSION > make menuselect-tree > > ./menuselect/menuselect \ > > #[snip menuselect parameters] > > # we want mp3's > ./contrib/scripts/get_mp3_source.sh > > make > > (This is not intended to criticise Lenz) > > All of this magic (specifically the bits before the menuselect) is > needed for a proper build? > > * Why is an explicit libdir packameter needed? What break if it is not > passed? > * Why is there a need to build menuselect manually? What about 'make > menuselect'? Do we need a Makefile target to build menuselect but not > run it? > > -- > Tzafrir Cohen > icq#16849755 jabber:tzafrir.cohen at xorcom.com > +972-50-7952406 mailto:tzafrir.cohen at xorcom.com > http://www.xorcom.com > > -- > _____________________________________________________________________ > -- Bandwidth and Colocation Provided by http://www.api-digital.com -- > New to Asterisk? Join us for a live introductory webinar every Thurs: > http://www.asterisk.org/hello > > asterisk-users mailing list > To UNSUBSCRIBE or update options visit: > http://lists.digium.com/mailman/listinfo/asterisk-users >-------------- next part -------------- An HTML attachment was scrubbed... URL: <http://lists.digium.com/pipermail/asterisk-users/attachments/20160616/69ac58d3/attachment.html>