diff options
author | V3n3RiX <venerix@koprulu.sector> | 2023-08-11 15:35:17 +0100 |
---|---|---|
committer | V3n3RiX <venerix@koprulu.sector> | 2023-08-11 15:35:17 +0100 |
commit | 75949673f38270397841d9c2322dbb774ac41554 (patch) | |
tree | efeb01f94fd2a5bf01d3c892bd0c0d5a32b63770 /net-misc | |
parent | 7e2b5bc2c2e2e045de6095d46c24ee857453adf2 (diff) |
gentoo auto-resync : 11:08:2023 - 15:35:17
Diffstat (limited to 'net-misc')
19 files changed, 859 insertions, 74 deletions
diff --git a/net-misc/Manifest.gz b/net-misc/Manifest.gz Binary files differindex 1e5e87ce9cfb..4a1e49db2743 100644 --- a/net-misc/Manifest.gz +++ b/net-misc/Manifest.gz diff --git a/net-misc/asterisk-base/Manifest b/net-misc/asterisk-base/Manifest new file mode 100644 index 000000000000..f4c71239a19e --- /dev/null +++ b/net-misc/asterisk-base/Manifest @@ -0,0 +1,9 @@ +AUX asterisk.service-1 456 BLAKE2B 4a5da9f0e45aa3b1eff29d59317d09e061e0a0e3c0e38cd39732e7880e96b7f34a68b44001d2608a7636b1259803f567b94bdb85ef15428727427fa1081ee385 SHA512 d443c3821d50e78a76b7cad8906f560ab0f4b58007f6c9322256626bc4a502bdbd844f1ee48cdaf86d499bf78f50cebb0cfc88a0cab0c4876f4e853bc2e76aa8 +AUX asterisk.service-1.conf 311 BLAKE2B df7af706230a92fa0110f4b081d305c2302a7e6e5aff094ea3f32cfbf7a3f0dcae3c70c5f6a648d47067913450cbb0280b7a69bd2e6dcd3d1b7eaba858739794 SHA512 449d25743b53e2b1947de4af4c63a77e0226d6195c38f4cc9639e9c0c11a360bcbf1ec6492d6c1f6c17325c508f51bc3f82db5e8d80ce33619e353a651c6c092 +AUX asterisk_wrapper-1 7221 BLAKE2B c4c696e6e79329903e5e33cec03cd11db752e2915c247cd4d503cfc00bbafab56a560dc37c8045604b4c793b2289e03096f7b0e66535df53a375e1d74b617dbd SHA512 472ee92546dbf725e9f1fca19e258e0d6c4005923edb27bf0b6bc08a18a86913a54f85edd610c114cd867c601fc029928d49f55afec4387b54566ed3835fca7d +AUX confd-1 4050 BLAKE2B cda2632a9b951f2061d4d7e25b221d0473c623860aa96eeb2bf0b8a8354606cc6b22e98ac3450d160e13507c21174d086ebecce3a4b6a470a3e19dc6a6a98784 SHA512 922c59f08f75f9c18955d7337caa8e1b12a0037909903f6afee707ffca8b784011ba35188b8a921ea8b9c6238556dc70bdd1b5716af7894c09821c03b4808340 +AUX initd-1 8882 BLAKE2B 0dd7507254955ccc21688068107211380289ff468ad74140f135097d2babdb1b31db161bf2d91fa237a883a94c4d1af84c31856cee88f07cee52a17f212ad720 SHA512 2dd51d8342e212df4d98576de8b1017d6e7fdd257a70b49d2baf78bc1640911e351ec89b14fe4c55d905d738e277f2b65d4e627535eecc5eb195e7678b3d9759 +AUX logrotate-1 848 BLAKE2B db047c4cc1c3b1ea20ce6a3313332622374bfae9728b09f8b5bb2bfa6136000b95dbfd0a58ac172ac6c41b99c846d8e4ee630ac091f28552b39cfd758772ab4b SHA512 02eba497df35690755755c840534cc00f7851c75f4103381edec2d9c21681c302e2e4a48f218792292bf378b269b6f6a0e4d0b2b571a4e25921624710764b841 +AUX tmpfiles-1.conf 84 BLAKE2B 133761739570a08bebb88059df1a870ddaef194bd1c5a1a4d4626d3791e3cb664b03ff51260892167a22c3cfca2caa02d162e7476070ec1374a92ef24ec799dc SHA512 680a4478d3a501c26fa19e29fad18389e7e02f04c8b9a676ae0f192fa6afbed95a826b74696c6c5459aba5aba6a16c57df8a9c5ff486e9dc8f1cbd01185e9320 +EBUILD asterisk-base-1.ebuild 1011 BLAKE2B 5c179eca530964d6bfd7f975c785a096e1d745b9c7d56576df40041261d3928273882dbf7c01dfae8d6fefb06458d395552f46f1944563311bb63485136c981b SHA512 c5a56ce709c5249d3e2d928ae373745b3240d4cd194450e68434cebc4ecc0085eea7780bb2b456b0dec364e3219e764c340226677446ae7b361d0aec6343519a +MISC metadata.xml 388 BLAKE2B 8627eaf1867246255f9cf5e886749300fe854b6fc4add00c1fb7395a41349a42aeaf9bcd1866b1ef8a6b3ecd04416cd6ebb7dcebd266ae341af4aaa144de510d SHA512 238ec6ad37a6fcb588eeb6f5f00befa9e9f483cbd012d7e98b9627a3bf3f401ea74aee560a1909458a471e6c44b3ea13eb3a7d30e5f5a1f5c5464c9775d5614d diff --git a/net-misc/asterisk-base/asterisk-base-1.ebuild b/net-misc/asterisk-base/asterisk-base-1.ebuild new file mode 100644 index 000000000000..9767eed48da7 --- /dev/null +++ b/net-misc/asterisk-base/asterisk-base-1.ebuild @@ -0,0 +1,40 @@ +# Copyright 2023 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +EAPI=8 + +inherit systemd tmpfiles + +DESCRIPTION="Gentoo Asterisk init scripts" +HOMEPAGE="https://www.gentoo.org/wiki/No_homepage" +# Need to set S due to PMS saying we need it existing, but no SRC_URI +S="${WORKDIR}" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" + +RDEPEND=" + net-misc/asterisk + !<=net-misc/asterisk-16.30.0:0/16 + !<=net-misc/asterisk-18.18.0:0/18 + !<=net-misc/asterisk-20.3.0:0/20 +" + +src_install() { + newinitd "${FILESDIR}/initd-1" asterisk + newconfd "${FILESDIR}/confd-1" asterisk + newsbin "${FILESDIR}/asterisk_wrapper-1" asterisk_wrapper + + systemd_newunit "${FILESDIR}/asterisk.service-1" asterisk.service + systemd_install_serviced "${FILESDIR}/asterisk.service-1.conf" asterisk.service + + newtmpfiles "${FILESDIR}/tmpfiles-1.conf" asterisk.conf + + insinto /etc/logrotate.d + newins "${FILESDIR}/logrotate-1" asterisk +} + +pkg_postinst() { + tmpfiles_process asterisk.conf +} diff --git a/net-misc/asterisk-base/files/asterisk.service-1 b/net-misc/asterisk-base/files/asterisk.service-1 new file mode 100644 index 000000000000..08245d9fe87f --- /dev/null +++ b/net-misc/asterisk-base/files/asterisk.service-1 @@ -0,0 +1,23 @@ +[Unit] +Description=Asterisk PBX and telephony daemon. +After=network.target + +[Service] +Type=simple +WorkingDirectory=/var/lib/asterisk +User=asterisk +Group=asterisk +ExecStart=/usr/sbin/asterisk -f -C /etc/asterisk/asterisk.conf +ExecStop=/usr/sbin/asterisk -rx 'core stop now' +ExecReload=/usr/sbin/asterisk -rx 'core reload' + +LimitNOFILE=4096 +ProtectSystem=full +ProtectHome=yes +PrivateTmp=yes + +Restart=always +RestartSec=5 + +[Install] +WantedBy=multi-user.target diff --git a/net-misc/asterisk-base/files/asterisk.service-1.conf b/net-misc/asterisk-base/files/asterisk.service-1.conf new file mode 100644 index 000000000000..d94a08d78190 --- /dev/null +++ b/net-misc/asterisk-base/files/asterisk.service-1.conf @@ -0,0 +1,10 @@ +# Uncomment the following 7 lines to start asterisk with a console on tty7 +# +# Warning! Use only for debugging, this is a potential security issue! +# +# [Service] +# ExecStart=/usr/sbin/asterisk -f -c -C /etc/asterisk/asterisk.conf +# TTYPath=/dev/tty7 +# StandardInput=tty +# StandardOutput=tty +# StandardError=tty diff --git a/net-misc/asterisk-base/files/asterisk_wrapper-1 b/net-misc/asterisk-base/files/asterisk_wrapper-1 new file mode 100644 index 000000000000..1a85eccf9b25 --- /dev/null +++ b/net-misc/asterisk-base/files/asterisk_wrapper-1 @@ -0,0 +1,227 @@ +#! /bin/sh +# Copyright 1999-2022 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +progname="$(basename "$0")" + +T="$(getopt -o "h" --long "help,corecompress:,corerename:,crashemail:,dumpcore:,instance:,maxfd:,nicelevel:,restartdelay:,rundir:,syslog,tty:" -n "$progname" -- "$@")" +eval set -- "${T}" + +# bash builtins are special ... +echo_e="$([ "${SHELL}" = "/bin/bash" ] && echo "echo -e" || echo echo)" + +rundir=/run/asterisk +restartdelay=5 +nicelevel=0 +maxfd=4096 +dumpcore=0 +unset tty instance syslog corecompress corerename crashemail + +usage() { + cat <<USAGE +USAGE: $progname [options] -- asterisk options" +OPTIONS: + -h|--help + Output this text and exit. + --corecompress[=tool] + asterisk's address space can get quite large, compressing the core dumps can + save significant space, especially if asterisk core dumps frequently. + --corerename pattern + It's assumed core files (if enabled) will go into PWD, this specifies a + rename pattern. The following % codes are recognised: + %h - hostname + %D - date in format YYYYMMDD + %T - time in format HHMMSS + It must be mentioned that if kernel.core_pattern (sysctl) is modified + from the default 'core' value this option is unlikely to work. + --crashemail email@address + This will send an email whenver asterisk crashes (does not terminate + cleanly with a zero exit code). You need a working sendmail binary. + --dumpcore sizelimit + Maximum size of core limit, or the word unlimited. Default is disabled + (sizelimit of 0). + --instance name + Updated label for sylog logger. + --maxfd maxfd + Sets the maximum number of file descriptors (default 4096). + --nicelevel nicelevel + Will set the asterisk nice level to the specified value. + --restartdelay delay_in_seconds + Number of seconds to wait before attempting to restart asterisk. This helps + to avoid tight-loop crashes. Defaults to 5s. Minimum 1. + --rundir path + Where to store the asterisk asterisk_wrapper.pid file. In order to terminate the + wrapper (when asterisk next terminates), remove this file. + --syslog + Pass to redirect output to syslog rather than using stdout and stderr. + --tty tty + If asterisk should be attached to a TTY device, then pass this, eg --tty /dev/tty8. + Use of this is not recommended in general. + +NOTE: There are some quirks with bash getopt shunting non-options prior to -- + to asterisk options, so be careful of this. Typically stuff will break. +USAGE +} + +matchreg() { + local v=$1 + shift + echo "$v" | grep -q "$@" +} + +while [ "$1" != "--" ]; do + case "$1" in + --corecompress|--corerename|--crashemail|--dumpcore|--instance|--maxfd|--nicelevel|--restartdelay|--rundir|--tty) + eval "${1#--}=\"\${2}\"" + shift 2 + ;; + --syslog) + eval "${1#--}=1" + shift + ;; + --help|-h) + usage + exit 0 + ;; + *) + echo "BUG: Don't know how to process option $1." >&2 + usage >&2 + exit 1 + ;; + esac +done +shift # -- + +if ! matchreg "${restartdelay}" "^[1-9][0-9]*$"; then + echo "Invalid --restartdelay value ${restartdelay}, resetting to 5." >&2 + restartdelay=5 +fi + +if ! matchreg "${maxfd}" "^[1-9][0-9]*$"; then + echo "Invalid --maxfd value, resetting to 4096." >&2 + maxfd=4096 +fi + +if [ $maxfd -lt 1024 ]; then + echo "maxfd is guaranteed too low, bumping to at least 1024" >&2 + maxfd=1024 +fi + +if [ -n "${nicelevel}" ] && ! matchreg "${nicelevel}" -E "^-?[0-9]+$"; then + echo "Invalid --nicelevel which much be a valid integer (values from -20 to 20 makes sense)." + exit 1 +fi + +if [ -n "${corecompress}" -a ! -x "${corecompress}" ]; then + corecompress=$(which "${corecompress}" 2>/dev/null) + [ -z "${corecompress}" ] && echo "Error locating core compression tool, disabling core compression." >&2 +fi + +# Before here will still be output (potentially munged, to the terminal). +if [ -n "${syslog}" ]; then + tdir="$(mktemp -d)" + tfifo="${tdir}/asterisk_wrapper.logger.fifo" + mkfifo "${tfifo}" + logger -t "asterisk_wrapper${instance:+:}${instance}" --id=$$ >/dev/null 2>&1 <"${tfifo}" & + exec 1>"${tfifo}" + exec 2>&1 + + rm "${tfifo}" + rmdir "${tdir}" +fi + +echo "Initializing ${progname}" + +cleanup(){ + # There is a tiny race here, if this gets replaced inbetween the read and the rm. + # To fix this is quite complex in that we need to keep an fd, compare inode numbers + # and manage flock's. + [ -r "${rundir}/${progname}.pid" ] && \ + [ "$(cat "${rundir}/${progname}.pid")" = $$ ] && \ + rm "${rundir}/${progname}.pid" +} +trap cleanup EXIT + +# We could be clobbering an old version's pid, in which case it'll just terminate on +# it's next iteration. Towards this end, if asterisk.pid exists, attempt to find it's +# config file and request a core stop when convenient so that we can take over. +echo $$ > "${rundir}/${progname}.pid" +if [ -r "${rundir}/asterisk.pid" ]; then + ast_pid="$(cat "${rundir}/asterisk.pid")" + [ -r "/proc/${ast_pid}/cmdline" ] && ast_conf="$(tr '\0' '\n' < "/proc/${ast_pid}/cmdline" | grep -A1 '^-C$' | tail -n1)" && /usr/sbin/asterisk -C "${ast_conf:-/etc/asterisk/asterisk.conf}" -rx "core stop when convenient" + # We may hit a few (depending on how busy the server is a great many number) loop failures still ... +fi + +prlimit --core=${dumpcore} --pid=$$ +prlimit --nofile=${maxfd} --pid=$$ + +ast_cmd=/usr/sbin/asterisk +if [ -n "${nicelevel}" ]; then + ast_cmd="nice -n ${nicelevel} ${ast_cmd}" +fi + +while [ -r "${rundir}/${progname}.pid" ]; do + # Another instance is looking to replace us, so terminate. + if [ "$(cat "${rundir}/${progname}.pid")" != $$ ]; then + break + fi + + echo "Starting asterisk with ${ast_cmd} $*" + if [ -n "${tty+yes}" ]; then + /bin/stty -F "${tty}" sane + ${ast_cmd} "$@" >"${tty}" 2>&1 <"${tty}" + result=$? + else + # Purposefully leave stderr alone, this will under certain odd cases (like exceptions, + # and other odd cases logged from glibc) result in those logs at least being captured + # in syslog. + ${ast_cmd} "$@" </dev/null >/dev/null + result=$? + fi + + if [ "$result" -eq 0 ]; then + echo "Asterisk terminated normally." + break + fi + + if [ "$result" -gt 128 ]; then + signal="$(( result - 128 ))" + signame="$(kill -l $signal 2>/dev/null)" + MSG="Asterisk terminated with Signal: $signal (SIG${signame:-???})" + + # TODO: figure out how to use /proc/sys/kernel/core_pattern here, but if someone is using + # that, chances are they're already dealing with what we want here. + if [ -r core ]; then + if [ -n "${corerename+yes}" ]; then + core_target="$(echo "${core_pattern}" | sed -e "s/%h/$(hostname)/" \ + -e "s/%D/$(date +%Y%m%d)/" -e "s/%T/$(date +%H%M%S)/")" + mv core "${core_target}" + core_target=$(readlink -f "${core_target}") + else + core_target=$(readlink -f core) + fi + + if [ -n "${corecompress}" && -x "${corecompress}" ]; then + "${corecompress}" "${core_target}" + fi + + MSG="${MSG}\r\nCore dumped: ${core_target}" + fi + else + MSG="Asterisk terminated with return code: $result" + fi + + [ -n "${tty+yes}" ] \ + && echo "${MSG}" >"${tty}" \ + || echo "${MSG}" + + if [ -n "${crashemail+yes}" && -x /usr/sbin/sendmail ]; then + $echo_e -n "Subject: Asterisk crashed\r\n${MSG}\r\n" |\ + /usr/sbin/sendmail "${crashemail}" + fi + echo "Restarting asterisk after ${restartdelay}s ..." + sleep "${restartdelay}" +done + +echo "Terminating $progname." +exit 0 diff --git a/net-misc/asterisk-base/files/confd-1 b/net-misc/asterisk-base/files/confd-1 new file mode 100644 index 000000000000..c350b7e9161d --- /dev/null +++ b/net-misc/asterisk-base/files/confd-1 @@ -0,0 +1,169 @@ +# Copyright 1999-2020 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +# +# Additional options for asterisk +# +# see "asterisk -h" for a list of options +# +# No default. +# +#ASTERISK_OPTS="" + +# +# User and group to run asterisk as +# +# Value: double-colon separated list of user and group, or empty to run as root: +# +# +# "asterisk:asterisk" to run as user "asterisk" and group "asterisk" +# "asterisk" to run as user "asterisk" and all groups that user "asterisk" is a member of +# ":asterisk" to run as user "root" and group "asterisk" +# +# Default: asterisk +# +#ASTERISK_USER="asterisk" + +# +# Nicelevel +# +# Set the priority of the asterisk process +# +# Value: (highest) -20..19 (lowest) +# +# No default (leave scheduling to be system default). +# +#ASTERISK_NICE="19" + +# Send crash notifications emails to this address +# (needs a working mail service and /usr/sbin/sendmail to do so (e.g. ssmtp)) +# +# Value: Email address or empty to disable +# +# No default. +# +#ASTERISK_NOTIFY_EMAIL="root" + +# +# Send asterisk's output to this terminal +# +# Value: Full path to device node or a number +# +# No default. +# +#ASTERISK_TTY="/dev/tty9" + +# +# Start an asterisk console on the terminal specified by ASTERISK_TTY +# +# Warning! Use only for debugging, this is a potential security issue! +# +# Value: yes/no +# +# Default: no +# +#ASTERISK_CONSOLE="no" + +# +# Maximum size of core files. +# +# Value: Size in bytes, unlimited for no limit or empty to disable. +# +# Default: do not generate core dumps +# +#ASTERISK_CORE_SIZE="unlimited" + +# +# ASTERISK_CORE_DIR +# +# Value: Directory (will be created if non-existant). +# +# Default: /tmp +# +#ASTERISK_CORE_DIR="/var/lib/asterisk/core" + +# +# Max number of filedescriptors. asterisk can trivially run out of +# descriptors. In most (SIP) cases it uses at least four descriptors per call, +# and this is a conservative value. +# +# Value: Number of descriptors +# +# Default: leave system default in place. +# +ASTERISK_MAX_FD="4096" + +# +# Delay time before restarting asterisk after a crash. +# +# Value: Number of seconds to sleep after a crash before restarting. +# +# Default: 5 +# +#ASTERISK_RESTART_DELAY=5 + +# +# The stop mechanism to use. Asterisk can do gracefully, when convenient or now. +# By default we expect you to want to stop as soon as possible, so we default +# +# Default: gracefully +# +#ASTERISK_STOP_METHOD="when convenient" + +# +# By default the init script waits two minutes for asterisk to stop. This allows +# you to change that, or even completely disable and go into wait for ever mode (-1). +# The value here is in seconds. +# +# Default: 120 +# +#ASTERISK_STOP_TIMEOUT=-1 + +# +# ASTERISK_CONFDIR +# +# If you'd like an alternative folder to /etc/${RC_SVCNAME} to be used +# (typically /etc/asterisk) to be used for configuration. +# +# Default: /etc/${RC_SVCNAME} +# +#ASTERISK_CONFDIR="/etc/foo/bar" + +# ASTERISK_CACHEDIR +# +# Value: Directory to which astcachedir in asterisk.conf is set. +# +# Default: /var/cache/asterisk +# +#ASTERISK_CACHEDIR="/var/cache/asterisk" + + +# +# Normally the init script will not wait for asterisk to fully boot. With this +# setting set to yes/true/1 it will issue a "core waitfullybooted" directly +# after starting asterisk, and wait for asterisk to start up completely. This +# is useful in certain conditions where other software requires asterisk to be +# properly started before they themselves can be started. +# +# Default: no +# +#ASTERISK_WAITBOOTED=yes + +# +# When core-dumping, the default was to generate core-$(date +%Y%m%d-%H%M%S). +# In certain highly unusual configurations it's helpful to also get the +# hostname into this filename. By enabling this option the wrapper loop will +# adjust the core file to be named core-$(hostname)-$(date ...). +# +# Default: no +# +#ASTERISK_CORE_USEHOSTNAME=yes + +# +# When core-dumping, the default is to not compress these files. However, as it turns +# out, compressing these core files can save significant amount of space, so if you +# want them compressed, specify the tool to use here. +# +# Default: do not compress +# +#ASTERISK_CORE_COMPRESS=bzip2 diff --git a/net-misc/asterisk-base/files/initd-1 b/net-misc/asterisk-base/files/initd-1 new file mode 100644 index 000000000000..7d48b36456bf --- /dev/null +++ b/net-misc/asterisk-base/files/initd-1 @@ -0,0 +1,311 @@ +#!/sbin/openrc-run +# Copyright 1999-2021 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +extra_started_commands="forcestop reload" + +depend() { + need net + use nscd dns dahdi mysql postgresql slapd capi +} + +is_running() { + [ -r "${ast_rundir}/asterisk.pid" ] || return 1 + PID="$(cat "${ast_rundir}/asterisk.pid")" + [ -d "/proc/${PID}" ] || return 1 + EXE="$(readlink -f /proc/${PID}/exe)" + EXE="${EXE% (deleted)}" # in case asterisk got upgraded and we're still looking at an old one. + [ "${EXE}" = /usr/sbin/asterisk ] || return 1 # pid got re-used for another process. + + # PID reported in pidfile is active, and is still an asterisk instance. + return 0 +} + +# Sets up a few variables for us for use +# ast_instancename: eg, asterisk when RC_SVCNAME=asterisk, or asterisk(foo) when asterisk.foo. +# ast_rundir: directory to be used as run folder (pid and ctl files). +setup_svc_variables() +{ + local t + + ast_instancename=asterisk + ast_rundir=/run/${RC_SVCNAME} + ast_logdir=/var/log/${RC_SVCNAME} + ast_confdir=/etc/${RC_SVCNAME} + ast_cachedir=/var/cache/asterisk + ast_stop_timeout=120 + ast_stop_method="gracefully" + + if [ "${RC_SVCNAME}" != "asterisk" ]; then + t="${RC_SVCNAME#asterisk.}" + if [ "${RC_SVCNAME}" = "${t}" ]; then + eerror "Invalid SVCNAME of ${RC_SVCNAME}, must be of the format asterisk.name." + return 1 + fi + ast_instancename="${ast_instancename}(${t})" + fi + + [ -n "${ASTERISK_RUNDIR}" ] && ast_rundir="${ASTERISK_RUNDIR}" + [ -n "${ASTERISK_LOGDIR}" ] && ast_logdir="${ASTERISK_LOGDIR}" + [ -n "${ASTERISK_CONFDIR}" ] && ast_confdir="${ASTERISK_CONFDIR}" + [ -n "${ASTERISK_CACHEDIR}" ] && ast_confdir="${ASTERISK_CACHEDIR}" + [ -n "${ASTERISK_STOP_TIMEOUT}" ] && ast_stop_timeout="${ASTERISK_STOP_TIMEOUT}" + case "${ASTERISK_STOP_METHOD}" in + gracefully|when\ convenient|now) + ast_stop_method="${ASTERISK_STOP_METHOD}" + ;; + esac + ast_group= + if [ -n "${ASTERISK_USER}" ]; then + ast_user="${ASTERISK_USER%%:*}" + if [ "${ast_user}" != "${ASTERISK_USER}" ]; then + ast_group="${ASTERISK_USER#*:}" + ast_group="${ast_group%%:*}" + fi + fi + + [ -z "${ast_user}" ] && ast_user=asterisk + + ast_pgroup="$(getent group $(getent passwd "${ast_user}" | awk -F: '{ print $4 }') | sed -re 's/:.*//')" + + return 0 +} + +start() { + local OPTS PID + local tmp x + + local OPTS ARGS WRAPPER_OPTS + + setup_svc_variables || return $? + + ebegin "Starting ${ast_instancename} PBX" + + eindent + + # filter (redundant) arguments + OPTS="$(echo "${ASTERISK_OPTS}" | sed -re "s:-[cfF]::g")" + + # default options + OPTS="${OPTS}${OPTS:+ }-C ${ast_confdir}/asterisk.conf -f" # don't fork / detach breaks wrapper script... + + WRAPPER_OPTS="--syslog" + if [ "${RC_SVCNAME}" != "asterisk" ]; then + WRAPPER_OPTS="${WRAPPER_OPTS} --instance ${RC_SVCNAME#asterisk.}" + fi + WRAPPER_OPTS="${WRAPPER_OPTS} --rundir ${ast_rundir}" + + # ensure that ASTERISK_RESTART_DELAY is integer. + ASTERISK_RESTART_DELAY="$(echo "${ASTERISK_RESTART_DELAY}" | sed -re 's/^([0-9]*).*/\1/')" + [ -z "${ASTERISK_RESTART_DELAY}" ] && ASTERISK_RESTART_DELAY=5 + WRAPPER_OPTS="${WRAPPER_OPTS} --restartdelay ${ASTERISK_RESTART_DELAY}" + + if [ -n "${ASTERISK_CORE_SIZE}" ] && + [ "${ASTERISK_CORE_SIZE}" != "0" ]; then + WRAPPER_OPTS="${WRAPPER_OPTS} --dumpcore ${ASTERISK_CORE_SIZE}" + OPTS="${OPTS} -g" + + if [ -n "${ASTERISK_CORE_DIR}" ] && \ + [ ! -d "${ASTERISK_CORE_DIR}" ] + then + checkpath -d -m 0755 -o ${ast_user}:${ast_group} "${ASTERISK_CORE_DIR}" + fi + ASTERISK_CORE_DIR="${ASTERISK_CORE_DIR:-/tmp}" + + cd "${ASTERISK_CORE_DIR}" + einfo "Core dump size : ${ASTERISK_CORE_SIZE}" + einfo "Core dump location : ${ASTERISK_CORE_DIR}" + + if [ -n "${ASTERISK_CORE_COMPRESS}" ]; then + einfo "Core compression tool : ${ASTERISK_CORE_COMPRESS}" + WRAPPER_OPTS="${WRAPPER_OPTS} --corecompress ${ASTERISK_CORE_COMPRESS}" + fi + + if yesno "${ASTERISK_CORE_USEHOSTNAME}"; then + WRAPPER_OPTS="${WRAPPER_OPTS} --corerename core-%H-%D-%T" + else + WRAPPER_OPTS="${WRAPPER_OPTS} --corerename core-%D-%T" + fi + else + cd / + fi + + if [ -n "${ASTERISK_MAX_FD}" ]; then + WRAPPER_OPTS="${WRAPPER_OPTS} --maxfd ${ASTERISK_MAX_FD}" + einfo "Max open filedescriptors : ${ASTERISK_MAX_FD}" + fi + + if [ -n "${ASTERISK_NICE}" ]; then + if [ ${ASTERISK_NICE} -ge -20 ] && \ + [ ${ASTERISK_NICE} -le 19 ]; then + einfo "Nice level : ${ASTERISK_NICE}" + WRAPPER_OPTS="${WRAPPER_OPTS} --nicelevel ${ASTERISK_NICE}" + else + eerror "Nice value must be between -20 and 19" + return 1 + fi + fi + + if [ -n "${ASTERISK_NOTIFY_EMAIL}" ]; then + if [ -x /usr/sbin/sendmail ]; then + einfo "Email notifications go to : ${ASTERISK_NOTIFY_EMAIL}" + WRAPPER_OPTS="${WRAPPER_OPTS} --crashemail ${ASTERISK_NOTIFY_EMAIL}" + else + ewarn "Notifications disabled, /usr/sbin/sendmail doesn't exist or is not executable!" + fi + fi + + if [ -n "${ASTERISK_TTY}" ]; then + for x in "${ASTERISK_TTY}" \ + "/dev/tty${ASTERISK_TTY}" \ + "/dev/vc/${ASTERISK_TTY}" + do + if [ -c "${x}" ]; then + TTY="${x}" + fi + done + if [ -n "${TTY}" ]; then + einfo "Messages are sent to : ${TTY}" + WRAPPER_OPTS="${WRAPPER_OPTS} --tty ${TTY}" + else + ewarn "ASTERISK_TTY=${TTY} ignored, not valid." + fi + fi + + if yesno "${ASTERISK_CONSOLE}" && [ -n "${TTY}" ]; then + einfo "Starting Asterisk console : Yes" + OPTS="${OPTS} -c" + fi + + if ! getent passwd "${ast_user}" >/dev/null 2>&1; then + eerror "Requested to run asterisk as ${ast_user}, which doesn't exist." + return 1 + fi + OPTS="${OPTS} -U ${ast_user}" + + if [ -n "${ast_group}" ] && ! getent group "${ast_group}" >/dev/null 2>&1; then + eerror "Requested to run ${ast_instancename} with group ${ast_group}, which doesn't exist." + return 1 + fi + [ -n "${ast_group}" ] && OPTS="${OPTS} -G ${ast_group}" + + if [ "${ast_user}" = root ]; then + ewarn "Starting asterisk as root is not recommended (SERIOUS SECURITY CONSIDERATIONS)." + elif [ "${ast_group}" = root ]; then + ewarn "Starting asterisk with group root is not recommended (SERIOUS SECURITY CONSIDERATIONS)." + fi + + checkpath -d -m 0755 -o "${ast_user}:${ast_group}" "${ast_logdir}" "${ast_rundir}" + checkpath -d -m 0750 -o "${ast_user}:${ast_group}" "${ast_cachedir}" + + einfo "Starting asterisk as : ${ast_user}:${ast_group:-${ast_pgroup} (+supplementaries)}" + einfo "Wrapper options : ${WRAPPER_OPTS}" + einfo "Asterisk options : ${OPTS}" + + /usr/sbin/asterisk_wrapper ${WRAPPER_OPTS} -- ${OPTS} & + result=$? + + if [ $result -eq 0 ]; then + # 2 seconds should be enough for asterisk to start + sleep 2 + is_running + result=$? + + [ $result -eq 0 ] || wrapperstop + fi + + eoutdent + eend $result + + if [ $result -eq 0 ] && yesno "${ASTERISK_WAITBOOTED}"; then + if [ ! -r "${ast_rundir}/asterisk.ctl" ]; then + # asterisk can crash during startup ... + ebegin "Waiting for ctl file to appear" + while is_running && [ ! -r "${ast_rundir}/asterisk.ctl" ]; do + sleep 1 + done + is_running + result=$? + eend $result + fi + if [ $result -eq 0 ]; then + ebegin "Waiting for ${ast_instancename} to fully boot" + /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "core waitfullybooted" >/dev/null 2>&1 + eend $? + fi + fi + + return $result +} + +wrapperstop() { + # Older path. + if [ -r "${ast_rundir}/wrapper_loop.running" ]; then + ebegin "Signalling ${ast_instancename} wrapper script to terminate" + rm "${ast_rundir}/wrapper_loop.running" + eend $? + fi + + if [ -r "${ast_rundir}/asterisk_wrapper.pid" ]; then + ebegin "Signalling ${ast_instancename} wrapper script to terminate" + rm "${ast_rundir}/asterisk_wrapper.pid" + eend $? + fi + + return 0 +} + +forcestop() { + setup_svc_variables || return $? + + # Just to be sure - when we want to forcestop we should make it all tear down. + wrapperstop + + ebegin "Stopping ${ast_instancename} PBX" + start-stop-daemon --stop --pidfile /run/asterisk/asterisk.pid + eend $? +} + +stop() { + setup_svc_variables || return $? + + wrapperstop + + if ! is_running; then + eerror "${ast_instancename} is not running!" + return 0 + fi + + ebegin "Stopping ${ast_instancename} PBX ${ast_stop_method}" + /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "core stop ${ast_stop_method}" >/dev/null 2>&1 + # Now we have to wait until asterisk has _really_ stopped. + sleep 1 + if is_running; then + einfon "Waiting for ${ast_instancename} to shutdown ." + local cnt=0 + while is_running; do + cnt="$(expr $cnt + 2)" + if [ ${ast_stop_timeout} -gt 0 -a $cnt -gt ${ast_stop_timeout} ] ; then + echo + eend 1 "Failed waiting for ${ast_instancename} to stop." + return 1 + fi + sleep 2 + printf "." + done + echo + fi + eend 0 +} + +reload() { + setup_svc_variables || return $? + + if is_running; then + ebegin "Requesting ${ast_instancename} to reload configuration" + /usr/sbin/asterisk -C "${ast_confdir}/asterisk.conf" -r -x "module reload" >/dev/null 2>&1 + eend $? + else + eerror "${ast_instancename} is not running!" + fi +} diff --git a/net-misc/asterisk-base/files/logrotate-1 b/net-misc/asterisk-base/files/logrotate-1 new file mode 100644 index 000000000000..2286efc1e7e9 --- /dev/null +++ b/net-misc/asterisk-base/files/logrotate-1 @@ -0,0 +1,27 @@ +/var/log/asterisk/messages { + missingok + notifempty + + postrotate + test -e /run/openrc/softlevel && /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true + test -e /run/systemd/system && systemctl is-active --quiet asterisk.service && /usr/sbin/asterisk -rnx "logger reload" || /bin/true + endscript +} + +/var/log/asterisk/debug /var/log/asterisk/full { + missingok + notifempty + daily + + postrotate + test -e /run/openrc/softlevel && /etc/init.d/asterisk --quiet status && /usr/sbin/asterisk -rnx "logger reload" || /bin/true + test -e /run/systemd/system && systemctl is-active --quiet asterisk.service && /usr/sbin/asterisk -rnx "logger reload" || /bin/true + endscript +} + +/var/log/asterisk/cdr-csv/*.csv /var/log/asterisk/cdr-custom/*.csv /var/log/asterisk/queue_log { + missingok + notifempty + weekly + rotate 52 +} diff --git a/net-misc/asterisk-base/files/tmpfiles-1.conf b/net-misc/asterisk-base/files/tmpfiles-1.conf new file mode 100644 index 000000000000..224d060a3c92 --- /dev/null +++ b/net-misc/asterisk-base/files/tmpfiles-1.conf @@ -0,0 +1,2 @@ +d /run/asterisk 0750 asterisk asterisk +d /var/cache/asterisk 0750 asterisk asterisk diff --git a/net-misc/asterisk-base/metadata.xml b/net-misc/asterisk-base/metadata.xml new file mode 100644 index 000000000000..6aebbc46f559 --- /dev/null +++ b/net-misc/asterisk-base/metadata.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE pkgmetadata SYSTEM "https://www.gentoo.org/dtd/metadata.dtd"> +<pkgmetadata> + <maintainer type="person" proxied="yes"> + <email>jaco@uls.co.za</email> + <name>Jaco Kroon</name> + </maintainer> + <maintainer type="project" proxied="proxy"> + <email>proxy-maint@gentoo.org</email> + <name>Proxy Maintainers</name> + </maintainer> +</pkgmetadata> diff --git a/net-misc/asterisk/Manifest b/net-misc/asterisk/Manifest index e95b76eb7541..a07cedbfeb09 100644 --- a/net-misc/asterisk/Manifest +++ b/net-misc/asterisk/Manifest @@ -10,18 +10,18 @@ AUX asterisk_wrapper-18.17.1-20.2.1 7221 BLAKE2B c4c696e6e79329903e5e33cec03cd11 AUX confd-16.26.1-18.12.1 4050 BLAKE2B cda2632a9b951f2061d4d7e25b221d0473c623860aa96eeb2bf0b8a8354606cc6b22e98ac3450d160e13507c21174d086ebecce3a4b6a470a3e19dc6a6a98784 SHA512 922c59f08f75f9c18955d7337caa8e1b12a0037909903f6afee707ffca8b784011ba35188b8a921ea8b9c6238556dc70bdd1b5716af7894c09821c03b4808340 AUX initd-16.26.1-18.12.1 8869 BLAKE2B ac5d389e3af994453f258b23a1cd5c5630d19b7a1c9af78804517eab219a71d6c7bb901048ea052ed1ba89f4f553d1bf4d40252bc7838f0169e9561855574a90 SHA512 ceb6b484c97800e4e1ddfed9f1e6a8d91788f41b4abd3214882d716ea4eb01c39a2fb828351b2aa33bd1f053dee1af8f2a1c416fdf98df43860996463bf1c13c AUX initd-18.17.1-20.2.1 8882 BLAKE2B 0dd7507254955ccc21688068107211380289ff468ad74140f135097d2babdb1b31db161bf2d91fa237a883a94c4d1af84c31856cee88f07cee52a17f212ad720 SHA512 2dd51d8342e212df4d98576de8b1017d6e7fdd257a70b49d2baf78bc1640911e351ec89b14fe4c55d905d738e277f2b65d4e627535eecc5eb195e7678b3d9759 -DIST asterisk-16.29.1.tar.gz 28104161 BLAKE2B 030d0c2ce296db9c38ebd45b69b8a57f368e97f6121aca77c5b1dd4eeaa9f274f4d0e404bbae1317c1c02497e155ca9fef06b82d003987621d2c46984e5f5d2c SHA512 5ae5c22b48ea0ff83a655d64a0122923e736e84d612b7936d157614b01ed1f12da76a8adb10c045023a9464dce26563c8458fcea80af3f26176ed1fcbe4e5376 DIST asterisk-16.30.0.tar.gz 28131110 BLAKE2B f230155a6347e891b531e54fe2821f1d477ed83699dd4a90c67b3307965430dbcdd04bd0ced49803776d349e29846492a6ef96e19ad3665dc610623be8de25cc SHA512 59cfbc1463dbad6ae7c6307d96b1a220fb02b3e398f96708654e58db788d57f2ca7aac8d4a290ed04f333b5c82c514ec9b95681125e3bdddc237e6c778fd2aec -DIST asterisk-18.15.1.tar.gz 28216621 BLAKE2B f354a49111b22fe37caf72ba552d8ecc3dec17605771d153d05b01d7e3017c6a50087309c37078d32b6dc375bbb14dfee89356eb46355f47374a08d5427179a1 SHA512 c8bee50023b137d95b02ce770c9983fc3d8cfc10f7d714ab658fb118813ccf29d97b0ada64bfd2795ce3a0f9ecfe82bd85ab3abefe9c8cc83454cd50ff8e5cf5 +DIST asterisk-16.30.1.tar.gz 28234979 BLAKE2B a9cd732feb00408876f90328d7f14dbfe426829e607f9b8e812ff25823c8dc1facab1ecd423e1d4f33c1623f3769197fa3b1fe3181efad0b231c96c0afb1dd16 SHA512 1624d207e80351f976c084344d09d67fe37b526a42970da007f5407be006d107e951093209415a68c891e2bd9cb142421e7acd1ac9fba2c1b1c064aee2224cb6 DIST asterisk-18.17.0.tar.gz 28293243 BLAKE2B 8a162d7cac92df2b6dd430fedc1446a302b1b9c1061ddd4a236fd5797e8be17d53d7179d23a7c8bd4260c73d34dea2db2b9ebffd4eebb2ed714a286838bc5ddf SHA512 1a5dd9715811a8b699d49b057ef42f68ddc88cc22a568836a6a778f6ff22d3923f81840aef425819bb59f28bb27e321154ef9e1d3deba5ed7d39c7eca562e40e -DIST asterisk-18.17.1.tar.gz 28284281 BLAKE2B ab60d993f18ff7fec6a58358862e3477488a62f55b72a6c60ade87503818ee6db5a1a0eeed906abf1050517e0487461f619a671ca37a54a7867f98d4b62419cc SHA512 75311693a090c001a323ad673d0df7befbed87bf1250ff836eded552b0329a38a019c6ad9f9ed8fcd58e09798900ebb3c5546f2a571d601adf63d34559242151 DIST asterisk-18.18.0.tar.gz 28407407 BLAKE2B 2e49da8b93651268e2aa2f7f5e2b8ffb2f74c39eb74a4514593be39826912774584c4c33f3839a951ec068218e8db43153fee0a543a9adb94a90cc9338ad40c3 SHA512 bf3d73ef5b6a196d599771c913ae95596b0bfae8fc35cdf66181d7b56ffb4bd78078e25627e271c62988ed6342e69162a1f120cae6049dda6f1596d0759bee59 +DIST asterisk-18.18.1.tar.gz 28407009 BLAKE2B b3c3325a8958fa25364c735508357e35e4ad3ea2390b4f83d7b132c4263b2b0b56a65abab60f337e55cbc3edd4df580f3904164ba76abd4198ce1be112c93d38 SHA512 d5058399beffd2f74a17b0fdcc97720e08540383facb2f3691376cb2086e3d2f8df5b0c9110699d09cffe1ed6b2fbdfe9926d0698af0fce39c6c0a9bb4643d30 DIST asterisk-20.3.0.tar.gz 28176546 BLAKE2B 488cfe449c040c282afe438847d14f6cc20d1fb034fbb33555f8e43803b481d3f2b890ac01cc7d43278b41040093f8cedfc609c025cfab73fd8b9d23a0f67016 SHA512 332c24c089abca7059d80794b37a4f5dc34f0468a07f5534b0df26c5103e0508c9c5f3f35a02826ed6b33973c26503be2829fd51fa23a8056a58fa2b50b17730 -EBUILD asterisk-16.29.1.ebuild 11876 BLAKE2B f26e339dab2fd90cecafe8b0c075dcef4ae75a3602a1c7adb22ec9792166cbb3c3639349f718a7a895b5071876af76982163896bde31245b1e614d830461cb0a SHA512 57624034782f857b181fda0c92ffcbe502ec1ef94a45e1f2f5c27b2863000fee46661d47acd79658450a37dc331b90f8439e9a5bb66999216abda86fbd48b852 +DIST asterisk-20.3.1.tar.gz 28176262 BLAKE2B 9ee75ee297dc4df37f51f75444d46af083b794cb444ae77b601f17308889db22240939edf04761eb3d41e74e2a67a3329d427861a5a5d34fec6016d6660793bd SHA512 4e34de731211aebe916d19948c41aff370187bfadc1202837a96ebc7f218e5bd7c3936b5b4e34ba6e79c079f77eb5ed038239c903800d5a56ceda2f342218613 EBUILD asterisk-16.30.0.ebuild 11876 BLAKE2B f26e339dab2fd90cecafe8b0c075dcef4ae75a3602a1c7adb22ec9792166cbb3c3639349f718a7a895b5071876af76982163896bde31245b1e614d830461cb0a SHA512 57624034782f857b181fda0c92ffcbe502ec1ef94a45e1f2f5c27b2863000fee46661d47acd79658450a37dc331b90f8439e9a5bb66999216abda86fbd48b852 -EBUILD asterisk-18.15.1.ebuild 11838 BLAKE2B ee5dc893fb2138d7f6b3984d861306dc236027bd19f6a84232d5d2739df5aacbea04cb545b4fc6c991bff3a4b1097b63e32e449a3037380084c9705e02db2277 SHA512 1ddf9419cc19b13198b22a33bb49f2c15583e01e21cf6d9967614f39f7bc806ff6fdda956c9b1eea3b1ec252f90acf307aa8ea4556593331602d9e7466ecfdf4 +EBUILD asterisk-16.30.1.ebuild 11350 BLAKE2B c203e6b554c2c6cda6b06727a404925825561437759e573288f2baf6ef1bb2feac932310c8e0b432d46a1f74664d62477077dda7e584c815ca2c7d1b3dc5ae31 SHA512 40cfc7fec80be5222cbfc2c98f41728e64f9feaee8f973563a90a43c185ab12dcf4d6f0295d241cfa197c76113cc2fdb8c04459fcd65922df92f6d01a4e15e83 EBUILD asterisk-18.17.0.ebuild 11772 BLAKE2B 516b9c98aa80a7dfaed5f7ba375110cfa39c288d9c22dbb754b46f8ddf62f6ef75198fd1ea8a76e71e319a26e7e34111bca0a9768b40a37b081affed53368981 SHA512 56af8b4d9ede9c4c9a2edd94b9ffaaeffeb07c94c24a633e150ded3423141867dcd83f1ba2072f97431f3a6c0411d9bdaa81c82500c691b9ecd6da2ec7208f76 -EBUILD asterisk-18.17.1.ebuild 11893 BLAKE2B e279eb21e2093e64b4f5169d05de382abb3d408cd07c5d4c4a65b58241cf15b8fd87af8e09624cc1e3dc2aac260cd68ae0a8cf0a6ece035161ef5d7ff9ae6f15 SHA512 cff623204429a910877a18217f9e166adcbf9175991dd006e44b994b6ed140d91ce984489776f50fe6b9efdeeec2e5eeefde205f25013f10bf8d560d321d397d EBUILD asterisk-18.18.0.ebuild 11893 BLAKE2B e279eb21e2093e64b4f5169d05de382abb3d408cd07c5d4c4a65b58241cf15b8fd87af8e09624cc1e3dc2aac260cd68ae0a8cf0a6ece035161ef5d7ff9ae6f15 SHA512 cff623204429a910877a18217f9e166adcbf9175991dd006e44b994b6ed140d91ce984489776f50fe6b9efdeeec2e5eeefde205f25013f10bf8d560d321d397d +EBUILD asterisk-18.18.1.ebuild 11367 BLAKE2B 13cd1ca578b472c067bb0ca964b82a015bb46131d91889f41d89c8010862b8ed907208322f30dddd0d4bd63c1513b836fbce89c9a5cdaedf8e3b9e7d260cf415 SHA512 852a52f60d9ced2b265f3de9387dce85673ba836f7c4974e215c14dbdaf190b63a3f2303489ae5edc97d94dbb7bf5f8398923a16be5d498114959e3ffb9b492e EBUILD asterisk-20.3.0.ebuild 11716 BLAKE2B e36fa8e3fc140dbc04838127a792b6693c662feee0111b09e5753563ae099789266e5d70239e234b2ec4d8b9d1ed33d11de21dc3e24592ae4a75aacac92ef49d SHA512 458434726c5a5418c99a9c8b6bfee6067e38ef4053b78593dc6eed5807801e1080c559d55e644c0ec3f78ed0181489a639588cda154f050826e276bf3a0ddf3c +EBUILD asterisk-20.3.1.ebuild 11190 BLAKE2B dea0a8c3e06389e2a37759948d6d29c061426a0484686b9cd31876991794e0a465c08e90ee4181542a3f6843bb85d8f6ae5c21c84eca98f8fe4928bba20cbe07 SHA512 83f7a70bfbfa83d30d3a733ffdeddbd6a5e325fe9a722d290e679996e58eda7dadc40314762dd8a865ceccec8230e691e69e47944d5f60635f3e57c76177778d MISC metadata.xml 1565 BLAKE2B c41d24677c65e3006de867263e723e2530cae9185e260235576df5245e64c49244db82bb2febeb30935b38b5ec1eb5d26f3756f2559868248e766084fe6abcd8 SHA512 465a0a71dbafc0144a2bef2d3cdfe35dbc8e070a8bdd8cfed75c53971a6d9334ca81b4dc575d676cbb43a77f7004a92f992cf9eab3c8bfdd5c8c976dee0d210e diff --git a/net-misc/asterisk/asterisk-16.29.1.ebuild b/net-misc/asterisk/asterisk-16.30.1.ebuild index a684412a9be4..52643047a17e 100644 --- a/net-misc/asterisk/asterisk-16.29.1.ebuild +++ b/net-misc/asterisk/asterisk-16.30.1.ebuild @@ -5,14 +5,14 @@ EAPI=8 LUA_COMPAT=( lua5-{1..4} ) -inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles +inherit autotools linux-info lua-single toolchain-funcs DESCRIPTION="Asterisk: A Modular Open Source PBX System" HOMEPAGE="https://www.asterisk.org/" SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz" LICENSE="GPL-2" SLOT="0/${PV%%.*}" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" IUSE_VOICEMAIL_STORAGE=( +voicemail_storage_file @@ -96,6 +96,7 @@ DEPEND="acct-user/asterisk " RDEPEND="${DEPEND} + net-misc/asterisk-base net-misc/asterisk-core-sounds net-misc/asterisk-extra-sounds net-misc/asterisk-moh-opsound @@ -313,14 +314,6 @@ src_install() { diropts -m 0750 -o asterisk -g asterisk keepdir /var/log/asterisk/{cdr-csv,cdr-custom} - newsbin "${FILESDIR}/asterisk_wrapper-16.26.1-18.12.1" asterisk_wrapper - newinitd "${FILESDIR}"/initd-16.26.1-18.12.1 asterisk - newconfd "${FILESDIR}"/confd-16.26.1-18.12.1 asterisk - - systemd_dounit "${FILESDIR}"/asterisk.service - newtmpfiles "${FILESDIR}"/asterisk.tmpfiles-16.22.0-18.8.0.conf asterisk.conf - systemd_install_serviced "${FILESDIR}"/asterisk.service.conf - # Reset diropts else dodoc uses it for doc installations. diropts -m0755 @@ -330,11 +323,6 @@ src_install() { # install extra documentation use doc && dodoc doc/*.{txt,pdf} - # install logrotate snippet; bug #329281 - # - insinto /etc/logrotate.d - newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk - # Asterisk installs a few folders that's empty by design, # but still required. This finds them, and marks them for # portage. @@ -344,8 +332,6 @@ src_install() { } pkg_postinst() { - tmpfiles_process asterisk.conf - if [ -z "${REPLACING_VERSIONS}" ]; then elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/" elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat" diff --git a/net-misc/asterisk/asterisk-18.17.1.ebuild b/net-misc/asterisk/asterisk-18.18.1.ebuild index b2e2fa41bd6b..b13c063ce72c 100644 --- a/net-misc/asterisk/asterisk-18.17.1.ebuild +++ b/net-misc/asterisk/asterisk-18.18.1.ebuild @@ -5,7 +5,7 @@ EAPI=8 LUA_COMPAT=( lua5-{1..4} ) -inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles +inherit autotools linux-info lua-single toolchain-funcs DESCRIPTION="Asterisk: A Modular Open Source PBX System" HOMEPAGE="https://www.asterisk.org/" @@ -94,6 +94,7 @@ DEPEND="acct-user/asterisk " RDEPEND="${DEPEND} + net-misc/asterisk-base net-misc/asterisk-core-sounds net-misc/asterisk-extra-sounds net-misc/asterisk-moh-opsound @@ -312,14 +313,6 @@ src_install() { diropts -m 0750 -o asterisk -g asterisk keepdir /var/log/asterisk/{cdr-csv,cdr-custom} - newsbin "${FILESDIR}/asterisk_wrapper-18.17.1-20.2.1" asterisk_wrapper - newinitd "${FILESDIR}"/initd-18.17.1-20.2.1 asterisk - newconfd "${FILESDIR}"/confd-16.26.1-18.12.1 asterisk - - systemd_dounit "${FILESDIR}"/asterisk.service - newtmpfiles "${FILESDIR}"/asterisk.tmpfiles-16.22.0-18.8.0.conf asterisk.conf - systemd_install_serviced "${FILESDIR}"/asterisk.service.conf - # Reset diropts else dodoc uses it for doc installations. diropts -m0755 @@ -329,11 +322,6 @@ src_install() { # install extra documentation use doc && dodoc doc/*.{txt,pdf} - # install logrotate snippet; bug #329281 - # - insinto /etc/logrotate.d - newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk - # Asterisk installs a few folders that's empty by design, # but still required. This finds them, and marks them for # portage. @@ -343,8 +331,6 @@ src_install() { } pkg_postinst() { - tmpfiles_process asterisk.conf - if [ -z "${REPLACING_VERSIONS}" ]; then elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/" elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat" diff --git a/net-misc/asterisk/asterisk-18.15.1.ebuild b/net-misc/asterisk/asterisk-20.3.1.ebuild index cefe69e90f87..f5f88881f09f 100644 --- a/net-misc/asterisk/asterisk-18.15.1.ebuild +++ b/net-misc/asterisk/asterisk-20.3.1.ebuild @@ -5,20 +5,20 @@ EAPI=8 LUA_COMPAT=( lua5-{1..4} ) -inherit autotools linux-info lua-single systemd toolchain-funcs tmpfiles +inherit autotools linux-info lua-single toolchain-funcs DESCRIPTION="Asterisk: A Modular Open Source PBX System" HOMEPAGE="https://www.asterisk.org/" SRC_URI="https://downloads.asterisk.org/pub/telephony/asterisk/releases/${P}.tar.gz" LICENSE="GPL-2" SLOT="0/${PV%%.*}" -KEYWORDS="amd64 ~arm ~arm64 ~ppc ~ppc64 x86" +KEYWORDS="~amd64 ~arm ~arm64 ~ppc ~ppc64 ~x86" IUSE_VOICEMAIL_STORAGE=( voicemail_storage_odbc voicemail_storage_imap ) -IUSE="${IUSE_VOICEMAIL_STORAGE[*]} alsa blocks bluetooth calendar +caps cluster codec2 curl dahdi debug deprecated doc freetds gtalk http iconv ilbc ldap lua mysql newt odbc oss pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd syslog systemd unbound vorbis xmpp" +IUSE="${IUSE_VOICEMAIL_STORAGE[*]} alsa blocks bluetooth calendar +caps cluster codec2 curl dahdi debug deprecated doc freetds gtalk http iconv ilbc ldap lua mysql newt odbc pjproject portaudio postgres radius selinux snmp span speex srtp +ssl static statsd systemd unbound vorbis xmpp" IUSE_EXPAND="VOICEMAIL_STORAGE" REQUIRED_USE="gtalk? ( xmpp ) lua? ( ${LUA_REQUIRED_USE} ) @@ -27,7 +27,7 @@ REQUIRED_USE="gtalk? ( xmpp ) PATCHES=( "${FILESDIR}/asterisk-16.16.2-no-var-run-install.patch" - "${FILESDIR}/asterisk-16.29.1_18.15.1_20.0.1-noexec_stack.patch" + "${FILESDIR}/asterisk-18.17.1-20.2.1-configure-fix-test-code-to-match-gethostbyname_r-pro.patch" ) DEPEND="acct-user/asterisk @@ -94,11 +94,11 @@ DEPEND="acct-user/asterisk " RDEPEND="${DEPEND} + net-misc/asterisk-base net-misc/asterisk-core-sounds net-misc/asterisk-extra-sounds net-misc/asterisk-moh-opsound - selinux? ( sec-policy/selinux-asterisk ) - syslog? ( virtual/logger )" + selinux? ( sec-policy/selinux-asterisk )" BDEPEND="dev-libs/libxml2:2 virtual/pkgconfig" @@ -115,6 +115,7 @@ _make_args=( "DESTDIR=${D}" "CONFIG_SRC=configs/samples" "CONFIG_EXTEN=.sample" + "AST_FORTIFY_SOURCE=" ) pkg_pretend() { @@ -202,7 +203,6 @@ src_configure() { _menuselect --disable build_native menuselect.makeopts # Broken functionality is forcibly disabled (bug #360143) - _menuselect --disable chan_misdn menuselect.makeopts _menuselect --disable chan_ooh323 menuselect.makeopts # Utility set is forcibly enabled (bug #358001) @@ -235,8 +235,8 @@ src_configure() { _use_select cluster res_corosync _use_select codec2 codec_codec2 _use_select curl func_curl res_config_curl res_curl - _use_select dahdi app_dahdiras app_meetme chan_dahdi codec_dahdi res_timing_dahdi - _use_select deprecated app_macro + _use_select dahdi app_meetme chan_dahdi codec_dahdi res_timing_dahdi + _use_select deprecated app_macro chan_sip res_monitor _use_select freetds {cdr,cel}_tds _use_select gtalk chan_motif _use_select http res_http_post @@ -244,9 +244,8 @@ src_configure() { _use_select ilbc codec_ilbc format_ilbc _use_select ldap res_config_ldap _use_select lua pbx_lua - _use_select mysql app_mysql cdr_mysql res_config_mysql + _use_select mysql res_config_mysql _use_select odbc cdr_adaptive_odbc res_config_odbc {cdr,cel,res,func}_odbc - _use_select oss chan_oss _use_select postgres {cdr,cel}_pgsql res_config_pgsql _use_select radius {cdr,cel}_radius _use_select snmp res_snmp @@ -255,7 +254,6 @@ src_configure() { _use_select speex format_ogg_speex _use_select srtp res_srtp _use_select statsd res_statsd res_{endpoint,chan}_stats - _use_select syslog cdr_syslog _use_select vorbis format_ogg_vorbis _use_select xmpp res_xmpp @@ -311,14 +309,6 @@ src_install() { diropts -m 0750 -o asterisk -g asterisk keepdir /var/log/asterisk/{cdr-csv,cdr-custom} - newsbin "${FILESDIR}/asterisk_wrapper-16.26.1-18.12.1" asterisk_wrapper - newinitd "${FILESDIR}"/initd-16.26.1-18.12.1 asterisk - newconfd "${FILESDIR}"/confd-16.26.1-18.12.1 asterisk - - systemd_dounit "${FILESDIR}"/asterisk.service - newtmpfiles "${FILESDIR}"/asterisk.tmpfiles-16.22.0-18.8.0.conf asterisk.conf - systemd_install_serviced "${FILESDIR}"/asterisk.service.conf - # Reset diropts else dodoc uses it for doc installations. diropts -m0755 @@ -328,11 +318,6 @@ src_install() { # install extra documentation use doc && dodoc doc/*.{txt,pdf} - # install logrotate snippet; bug #329281 - # - insinto /etc/logrotate.d - newins "${FILESDIR}/1.6.2/asterisk.logrotate4" asterisk - # Asterisk installs a few folders that's empty by design, # but still required. This finds them, and marks them for # portage. @@ -342,8 +327,6 @@ src_install() { } pkg_postinst() { - tmpfiles_process asterisk.conf - if [ -z "${REPLACING_VERSIONS}" ]; then elog "Asterisk Wiki: https://wiki.asterisk.org/wiki/" elog "Gentoo VoIP IRC Channel: #gentoo-voip @ irc.libera.chat" diff --git a/net-misc/zerotier/Manifest b/net-misc/zerotier/Manifest index ec2516542f93..47a5b6b18592 100644 --- a/net-misc/zerotier/Manifest +++ b/net-misc/zerotier/Manifest @@ -186,7 +186,7 @@ DIST winreg-0.10.1.crate 25725 BLAKE2B db536f2a098e4ff6ae4ff80a19bd2029030d68007 DIST zerotier-1.10.1.tar.gz 84019609 BLAKE2B 317177c3f64818a78aed3f24e0d5fa8f164bb3778fcf123f222983b784aa8ed4a5bfd842857b3da7bca39e09e74a99b88c541921f2d1ed7633282cc9bae19bd2 SHA512 6a4c9c30b4aad389a60bd72b154f2a0c34303925a5c0efb815b4651db0db5e7b79740b5cfc4f2825bda7c158d374fff277b2f5ba57cd2cf5c740168198e7bbbd DIST zerotier-1.10.6.tar.gz 15259391 BLAKE2B 48a47744502f976584c622f0f117ae2b7f73addd69bdb19c0829b1c0b99fa387618b2cd7203eb4f8838cb59c85ec658792066f55c650f2d9d9774029779d267c SHA512 e22982e0898d5db4748ca009480cc6ea07b13e1cf3dcb2c78fbba5036519c0d08afe8bdad20766669f52fef03679ff228414337e2478990fd5ba5d3dbece1972 DIST zerotier-1.6.4.tar.gz 16021448 BLAKE2B b45219c2e54f3e789fb970fc8cd9d26ce6175c9737f02838efd11c07223ca49c10480935319292e609cb24bef46aaf7f5eebc8335e84af642d25e87ea5a8e163 SHA512 b1cd96cdc76cfd7929016382bc4a373a88d468010134cd65efbe32fc23e1cb56e0306f84ae10b3ad6d65e7a3fa6aebe79ec6c019840123f770bbc6fe2152723c -EBUILD zerotier-1.10.1.ebuild 1342 BLAKE2B 6fc9a0c73c10e645ce1bf070bbae2ac66d7c7e875d2f0fd09a6c8f75de1243383c793acd5a5d59115a28b06fc0bda4d456e68a96864823848d0783fa7c3073d9 SHA512 5cd827beda429e5b9f26a4a6590beaf8e8b76af9bf1e6b005b81b8088e744a19ab1cc112071b1a17cfa3a86e2a3214a3f1f76213c7b3bd770b3d21ed435bb281 -EBUILD zerotier-1.10.6.ebuild 5898 BLAKE2B a2c0619d55666098172f6cbf06721bc02e82e9b2a2b82278d8b21053d1a3f89b88c64a46847b8cf4b3d589d2944c737cf5cc030dbb9a27ae1e68d11151359ba3 SHA512 07f8b16368d2e1be5ea91c9eb4f182214f44c89cfc6bcd2f9bba673a71c9de548e3bf1e40aa65d0dd7812f0e5a484db50520f3ff6d57fbbb741aa82fcfcef4a5 -EBUILD zerotier-1.6.4.ebuild 1811 BLAKE2B e322dffb348bd3150f528a363dbc371b162c638c16e72a5a5da93d627980039fc8f8f2a0eee1e780e91e23b643d72835310db73d41e6d119c9ea964756eabc57 SHA512 912d1a950617ea9db70f5d71329cad3fc5f3e669d0ffbaa02bc7dacf127f67ae62abb6e987b7a39a02a3c0093d1d8c670b5af4190a47443321449862a7d8270d +EBUILD zerotier-1.10.1.ebuild 1343 BLAKE2B 0547025346e58df3cd0a3991ae7e10d38d4be889815a00f15955d6dad7b5c646b24255558893752b9d253526797bc35ed3b8eff047e022a63428ffdc61ab06de SHA512 62eb9da4d3ada5f379f380d86b4db4e8bbfadb10727655fdd78b77e12eabd118d1ab0f55fd410af992387019d6aa9ae179a20ea0895bfd40e887c660bcbacf61 +EBUILD zerotier-1.10.6.ebuild 5899 BLAKE2B d0f79bfca0ddc4f68bfb5758349cd3d6acc9bae3f7435c46ec347f19c65fe26d68e776015a12f4ab935652a928d9443d6ac824401f70689ba5999e9859161c8e SHA512 570850268019bcf85af37766eb0657ec83e1e10a35331f759cc1828e410478fd4ca7beb1f804247b8aa3989f8f34f09b657b076baf3f3602abb136df7773066f +EBUILD zerotier-1.6.4.ebuild 1812 BLAKE2B c443114df182b65275453ff47fb8315bd6f9da08a383bf5d768b0a1202fbcfd844f574e984ca39ffa6c39c347715ac0770b52a986f3e6eaf0dfe982e91aff5cd SHA512 07437bc4272e94e468515513db98901d81310e578cd7cf8558413ba75b14615729393b81b1e45b9e961ddb19d130f008a558cb80686c8970eb9e0e301b1a6109 MISC metadata.xml 499 BLAKE2B 3ec01bdcd8fb1c7fa065f8f23a2300c653b1b2a36be15f6c620f0c16a9fea50390c4b68ba2644dcadceb4ca436a30df68500c6631c4e1f5ded33863de5156597 SHA512 1f76771ef7ea85f7639b9dd077fdfa4ab51e3e44023a7b3c0a6c03b95fb0e4979cfae51e4f7a92008f4628607813c8157bba89a8cf17fae0b10b307c634bf0cb diff --git a/net-misc/zerotier/zerotier-1.10.1.ebuild b/net-misc/zerotier/zerotier-1.10.1.ebuild index fff14d007687..2e74f67d3f82 100644 --- a/net-misc/zerotier/zerotier-1.10.1.ebuild +++ b/net-misc/zerotier/zerotier-1.10.1.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=8 @@ -10,7 +10,7 @@ HOMEPAGE="https://www.zerotier.com/" SRC_URI="https://github.com/zerotier/ZeroTierOne/archive/${PV}.tar.gz -> ${P}.tar.gz" S="${WORKDIR}"/ZeroTierOne-${PV} -LICENSE="BSL-1.1" +LICENSE="BUSL-1.1" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" IUSE="cpu_flags_arm_neon" diff --git a/net-misc/zerotier/zerotier-1.10.6.ebuild b/net-misc/zerotier/zerotier-1.10.6.ebuild index 1aa50e362d74..cae03fbe000e 100644 --- a/net-misc/zerotier/zerotier-1.10.6.ebuild +++ b/net-misc/zerotier/zerotier-1.10.6.ebuild @@ -202,7 +202,7 @@ SRC_URI=" " S="${WORKDIR}"/ZeroTierOne-${PV} -LICENSE="BSL-1.1" +LICENSE="BUSL-1.1" # Crate licenses LICENSE+=" sso? ( Apache-2.0 BSD ISC MIT MPL-2.0 Unicode-DFS-2016 )" SLOT="0" diff --git a/net-misc/zerotier/zerotier-1.6.4.ebuild b/net-misc/zerotier/zerotier-1.6.4.ebuild index 174e38f2dce1..256d078e8427 100644 --- a/net-misc/zerotier/zerotier-1.6.4.ebuild +++ b/net-misc/zerotier/zerotier-1.6.4.ebuild @@ -1,4 +1,4 @@ -# Copyright 1999-2022 Gentoo Authors +# Copyright 1999-2023 Gentoo Authors # Distributed under the terms of the GNU General Public License v2 EAPI=7 @@ -9,7 +9,7 @@ HOMEPAGE="https://www.zerotier.com/" DESCRIPTION="A software-based managed Ethernet switch for planet Earth" SRC_URI="https://github.com/zerotier/ZeroTierOne/archive/${PV}.tar.gz -> ${P}.tar.gz" -LICENSE="BSL-1.1" +LICENSE="BUSL-1.1" SLOT="0" KEYWORDS="~amd64 ~arm ~arm64 ~riscv ~x86" IUSE="clang cpu_flags_arm_neon" |