summaryrefslogtreecommitdiff
path: root/pcr/asterisk/asterisk.install
diff options
context:
space:
mode:
authorDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-01-08 16:00:50 +0100
committerDenis 'GNUtoo' Carikli <GNUtoo@cyberdimension.org>2019-01-08 22:18:22 +0100
commit29e0c54e56c8a9dd68ab6844c56fc332ac46cb15 (patch)
treeab6ac3d1d33850e63b507ee583ac74e587cea162 /pcr/asterisk/asterisk.install
parent77b12b7a8bc5e704dacedfd0bc95a78fb7034b79 (diff)
pcr/asterisk: update to 16.1.1 and fix most illegal instructions
This is based on the PKGBUILD available on aur here: https://aur.archlinux.org/asterisk.git Before this package was built with -march=native, so if you build it on a machine with a processor that supports avx (Advanced Vector Extensions), libpjsip.so.2 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. Though for some reason, with this patch, building asterisk on a machine with avx still results in res_pjsip_send_to_voicemail.so having one vpxor instruction. Hopefully even with that, asterisk can still start. Changes from the aur PKGBUILD: - Parabola's change to always depend on pjproject was kept - 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" Without that the build machine processor - Parabola's minimum system requirements states that: "Parabola GNU/Linux-libre should run on any i686 compatible machine [...]" - Wikipedia states that i686 has MMX and SSE[2] The package build was tested on x86_64, i686 and armv7h. 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 <GNUtoo@cyberdimension.org>
Diffstat (limited to 'pcr/asterisk/asterisk.install')
-rw-r--r--pcr/asterisk/asterisk.install24
1 files changed, 11 insertions, 13 deletions
diff --git a/pcr/asterisk/asterisk.install b/pcr/asterisk/asterisk.install
index 84cc01d87..4c342129e 100644
--- a/pcr/asterisk/asterisk.install
+++ b/pcr/asterisk/asterisk.install
@@ -1,20 +1,18 @@
post_install() {
- groupadd -r asterisk
- useradd -MNr -s /bin/false -d /run/asterisk -g asterisk asterisk && passwd -l asterisk &>/dev/null
-
- post_upgrade
+ post_upgrade
}
-post_remove() {
- killall -q asterisk
- userdel asterisk &>/dev/null
- groupdel asterisk &>/dev/null
+pre_remove() {
+ systemctl stop asterisk.service
}
+
post_upgrade() {
- chown -R asterisk:asterisk /etc/asterisk
- chown -R asterisk:asterisk /var/lib/asterisk
- chown -R asterisk:asterisk /var/log/asterisk
- chown -R asterisk:asterisk /run/asterisk
- chown -R asterisk:asterisk /var/spool/asterisk
+ systemd-sysusers
+
+ chown -R asterisk:asterisk /etc/asterisk
+ chown -R asterisk:asterisk /var/lib/asterisk
+ chown -R asterisk:asterisk /var/log/asterisk
+ chown -R asterisk:asterisk /run/asterisk
+ chown -R asterisk:asterisk /var/spool/asterisk
}