[asterisk-dev] Asterisk Docker Containers: Phase 1

Leif Madsen leif.madsen at avoxi.com
Thu Nov 19 20:24:27 CST 2015


Hey Corey!

The way it works is that major versions of Asterisk (and same with other
packages) are associated with specific releases of Fedora and RHEL, which
means the major versions are "stuck" to those releases.

However, you can still build the newer version of Asterisk by pulling the
spec file and sources from later Fedora versions (Fedora 23 for instance).

You can rebuild the RPMs supplied using fedpkg, as I've done in phase 1 of
my blog post. There are other ways you can do it was well, like with mock
etc.

(You'll need some dependencies in order to build everything).

If you look at my buildit.sh script, it provides the primitives for
building the dependencies. I'm doing this via a local build with rpmbuild
(because the script is run in the Docker container), but you could also
replace this with a fedpkg mock build which would build the RPMs in the
chroot for you. There might be some things that are slightly more
complicated in that method, because you'd have to get the resulting
dependency RPMs into the chroot (possible, it's just not super straight
forward if you haven't done it before).

I'd probably still suggest doing it in the Docker container, simply because
it's super simple to get things spun up. You can even use the local.repo
file I'm providing as well. Basically everything you need to build Asterisk
for your platform (Red Hat based) is in the repo linked above.

Note: this won't work on CentOS 6. There are some oddities with CentOS 6 in
Docker that resulted in me not being able to build Asterisk in the CentOS 6
container (gcc complained about not being able to result in a binary or
something).

Long story short, use fedpkg to build the RPMs from the Fedora
repositories. Just clone the Fedora 23 version (which gets you Asterisk
13.3.2 as of now), and then build it on top of the system you want (CentOS
6 or 7 for example).

Thanks!
Leif.

On Thu, Nov 19, 2015 at 2:23 PM, Corey Farrell <git at cfware.com> wrote:
>
> Jared,
>
> I just looked through the EPEL website at EPEL6 and EPEL7, only found
> Asterisk 1.8.  Can you point me to the spec file you are using or  an
> SRPM?
>
> Thanks,
> Corey
>
> On Thu, Nov 19, 2015 at 2:02 PM, Jared Smith <jaredsmith at jaredsmith.net>
wrote:
> >
> > On Thu, Nov 19, 2015 at 10:14 AM, Matthew Jordan <mjordan at digium.com>
wrote:
> >>
> >> Would it be appropriate to summarize the current state of things as "we
> >> need a spec file for Asterisk"?
> >
> >
> >
> > At one point, there was an awful .spec file in the Asterisk sources...
> > hopefully it's not around any more.
> >
> > That being said, I just took over as the main maintainer/contact for the
> > Asterisk packages in Fedora/EPEL -- It's one of the most complicated
spec
> > files in Fedora, but that obviously hasn't scared me off.
> >
> > I'd love feedback on things we can do to make those packages better,
and get
> > a tighter feedback loop between the Asterisk development community and
the
> > packagers in Fedora/RHEL/CentOS/etc.
>

--
Leif Madsen
Director of Engineering, Product Development
http://avoxi.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.digium.com/pipermail/asterisk-dev/attachments/20151119/91020fa4/attachment-0001.html>


More information about the asterisk-dev mailing list