Package Details: asterisk 17.0.0-1

Git Clone URL: (read-only)
Package Base: asterisk
Description: A complete PBX solution
Upstream URL:
Licenses: GPL
Submitter: pressh
Maintainer: nkukard
Last Packager: nkukard
Votes: 103
Popularity: 1.71
First Submitted: 2008-01-27 13:42
Last Updated: 2019-11-21 10:27

Latest Comments

1 2 3 4 5 6 ... Next › Last »

GNUtoo commented on 2019-06-22 20:23


Here's a patch:


From 0b8eb034c73e858af14db5b9b3dd28da9114bd6d Mon Sep 17 00:00:00 2001
From: Denis 'GNUtoo' Carikli
Date: Tue, 8 Jan 2019 16:00:50 +0100
Subject: [PATCH] Fix most illegal instructions when shipping asterisk.

While this works in AUR, because users are building the PKGBUILD, distributions wanting to use this PKGBUILD as-is and ship packages produced with it will result in illegal instructions at runtime.

Without that fix, if you build this packages on a machine with a processor that supports avx (Advanced Vector Extensions), ended up with vpxor instructions that were also executed on machines with a processor that did not have such extension, which resulted in an illegal instruction at asterisk startup if the machine running it didn't have AVX.

Though for some reason, with this patch, building asterisk on a machine with avx still results in having one vpxor instruction.

Hopefully even with that, asterisk can still start on machines that do not have AVX.

To fix most illegal instructions: - Native builds were disabled by using the ChangeLog documentation: "Those who need different -march= values, please, go for ./configure make menuselect.makeopts or make menuselect ./menuselect/menuselect --disable BUILD_NATIVE" - The build configuration was changed to use an external pjproject library. The AUR PKGBUILD for pjproject also had several fixes to prevent it from causing illegal instructions.

On x86_64 I verified that most asterisk ELF files did not have vpxor instructions anymore with: $ pacman -Q -l asterisk | \ awk '{print $2}' | xargs file | grep ELF | \ sed 's#:.*##' | xargs objdump -D | grep vpxor

Signed-off-by: Denis 'GNUtoo' Carikli

PKGBUILD | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-)

diff --git a/PKGBUILD b/PKGBUILD index d2fa84e..037bdcd 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -3,10 +3,11 @@ # Contributor: Xavier Devlamynck # Contributor: Alessio Biancalana # Contributor: Maik Broemme +# Contributor: Denis 'GNUtoo' Carikli

pkgname=asterisk pkgver=16.4.0 -pkgrel=1 +pkgrel=2 pkgdesc="A complete PBX solution" arch=('i686' 'x86_64' 'aarch64' 'armv7h') backup=('etc/asterisk/acl.conf' @@ -120,7 +121,7 @@ backup=('etc/asterisk/acl.conf' 'etc/asterisk/xmpp.conf') url='' license=('GPL') -depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'opus' 'libedit') +depends=('alsa-lib' 'speex' 'popt' 'libvorbis' 'curl' 'libxml2' 'jansson' 'libxslt' 'opus' 'libedit' 'pjproject') makedepends=('sqlite3' 'gsm') optdepends=('lua51' 'libsrtp' 'postgresql' 'unixodbc' 'libpri' 'libss7' 'openr2' 'iksemel' 'radiusclient-ng' 'dahdi') install=${pkgname}.install @@ -135,7 +136,9 @@ sha256sums=('d870711299089d0b1f01708534b0e139c4e83d828cbb79dfc90ec59774be83fa'

build() { cd ${pkgname}-${pkgver} - ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin + ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin --with-pjproject-bundled=no + make menuselect.makeopts + ./menuselect/menuselect --disable BUILD_NATIVE make }

-- 2.21.0

DragonX256 commented on 2019-03-31 13:42

@tigran pkgconf lies in base-devel group. You should have installed this group in order to build packages from AUR.

tigran commented on 2019-03-30 20:36

A weird error in build macros: it gives message demanding libedit, while really it needs pkgconf.

You get that "please install libedit development package" configure message, you install it, and still keep getting the same message each time you try to build *, and you get driven crazy.

Just installing pkgconf sets the things.

DragonX256 commented on 2019-02-20 13:22

@emersonjr @Thulinma I've tested 16.2.0 building in clean chroot. pjproject builts correct, and there's no dependency on uriparser for asterisk.

Thulinma commented on 2019-02-19 10:09

Hi! It looks like "uriparser" is an unlisted dependency.

emersonjr commented on 2019-01-31 15:22

Just insert the following command sed -i 's/,5,/,10,/g' third-party/Makefile.rules into PKGBUILD above the ./configure ... line, which succesfully corrects the problem.

The file should now be like below:

build() {
  cd ${pkgname}-${pkgver}
  sed -i 's/,5,/,10,/g' third-party/Makefile.rules
  ./configure --prefix=/usr --sysconfdir=/etc --localstatedir=/var --sbindir=/usr/bin

Please @DragonX256 do the amendments

emersonjr commented on 2019-01-30 16:38

It seems there's problem again with pjproject 2.8

checking for RAII support... checking for gcc -fnested-functions... no
checking for clang strsep/strcmp optimization... no
checking for embedded pjproject (may have to download)... configuring
[pjproject]  Downloading to /tmp/pjproject-2.8.tar.bz2
[pjproject]  Retrying download
[pjproject]  Downloading to /tmp/pjproject-2.8.tar.bz2
make: *** [Makefile:90: /tmp/pjproject-2.8.tar.bz2] Error 4
make: *** Deleting file '/tmp/pjproject-2.8.tar.bz2'
configure: Unable to configure third-party/pjproject
configure: error: Re-run the ./configure command with 'NOISY_BUILD=yes' appended to see error details.
==> ERRO: Uma falha ocorreu em build().

How can it be solved?

DragonX256 commented on 2018-12-29 11:12

Fixed problems which were described by @jeremyvisser.

nimbius commented on 2018-12-21 15:48

the systemd service type for asterisk needs to be changed to basic. notify type causes errors when executing the dialplan application System() with bash redirections, or dialplan variables.

in addition, executed System() calls can report success when unable to create a file on the system.

jeremyvisser commented on 2018-12-19 11:07

When I try to install the package, I get these errors:

chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ chown: invalid user: ‘asterisk:asterisk’ error: command failed to execute correctly

I suspect this is because the post-install script is executed before the sysusers.d configuration is loaded.

Also, I noticed the post-remove script does a "killall -q asterisk". However, it's possible to get Asterisk to spawn subprocesses, so it would be better to do a "systemctl stop asterisk.service" in the post-remove script instead.