Initial commit of Asterisk 16. Cleans up Makefile; the version number
now only occurs once in it.
Upstream removed the following modules:
- format_jpeg
- res_pjsip_registrar_expire (functionality was moved into
res_pjsip_registrar.)
pjsip has a new dependency, res-http-websocket.
Notes:
- replaced res_ninit patch
Replaced patch with the one from Alpine. It's a bit more flexible and
allows usage of res_ninit where available (when building against
glibc).
- fixed musl compiles
astmm.h now always gets included by asterisk.h, redefining allocators.
This causes breakage on musl:
ccache_cc -o chan_pjsip.o -c chan_pjsip.c -MD -MT chan_pjsip.o -MF .chan_pjsip.o.d -MP -pthread -I/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/asterisk-16.2.1/include -Os -pipe -mno-branch-likely -mips32r2 -mtune=24kc -fno-caller-saves -fno-plt -fhonour-copts -Wno-error=unused-but-set-variable -Wno-error=unused-result -msoft-float -mips16 -minterlink-mips16 -iremap/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/asterisk-16.2.1:asterisk-16.2.1 -Wformat -Werror=format-security -fstack-protector -D_FORTIFY_SOURCE=1 -Wl,-z,now -Wl,-z,relro -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libiconv-stub/include -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-stub/include -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/include -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/include -I/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/usr/include -I/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/include/fortify -I/home/sk/tmp/openwrt/staging_dir/toolchain-mips_24kc_gcc-7.4.0_musl/include -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libiconv-stub/include -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/lib/libintl-stub/include -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/include/libxml2 -Wall -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fPIC -DAST_MODULE=\"chan_pjsip\" -DAST_MODULE_SELF_SYM=__internal_chan_pjsip_self -DPJ_AUTOCONF=1 -DPJ_IS_BIG_ENDIAN=1 -DPJ_IS_LITTLE_ENDIAN=0 -fPIC -I/home/sk/tmp/openwrt/staging_dir/target-mips_24kc_musl/usr/include
In file included from /home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/asterisk-16.2.1/include/asterisk.h:23:0,
from chan_pjsip.c:35:
/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/asterisk-16.2.1/include/asterisk/astmm.h:158:35: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
Do_not_use_calloc__use_ast_calloc->fail(a, b)
^
/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/asterisk-16.2.1/include/asterisk/astmm.h:162:77: error: expected '=', ',', ';', 'asm' or '__attribute__' before '->' token
Do_not_use_free__use_ast_free_or_ast_std_free_for_remotely_allocated_memory->fail(a)
^
make[4]: *** [/home/sk/tmp/openwrt/build_dir/target-mips_24kc_musl/asterisk-16.2.1/Makefile.rules:153: chan_pjsip.o] Error 1
The problem is that with _GNU_SOURCE defined musl also declares calloc in
<sched.h> - and when asterisk's source includes <sched.h> _after_
"asterisk/astmm.h" the definition clashes with the macro. Timo Teräs from
Alpine Linux fixed this by including <pthread.h> in "asterisk/compat.h". He
chose to include <pthread.h> instead of <sched.h> because the original
header inclusion chain seems to be "asterisk/astobj2.h" ->
"asterisk/lock.h" -> <pthread.h> -> <sched.h>. It seems Asterisk
practically never includes <sched.h> directly.
- added loader workaround for musl
When the modules are loaded, asterisk segfaults on musl.
Asterisk Dynamic Loader Starting:
[Mar 2 22:30:05] NOTICE[20712]: loader.c:2230 load_modules: 91 modules will be loaded.
Segmentation fault
[48817.544248] do_page_fault(): sending SIGSEGV to asterisk for invalid read access from 00000000
[48817.544258] epc = 77f6b764 in libc.so[77ef8000+94000]
[48817.544285] ra = 0048d579 in asterisk[400000+160000]
The real problem is that the loader expects dlopen to always run the
constructor, which doesn't happen with musl, because its dlopen is
permanent.
This commit adds a new configure switch '--enable-permanent-dlopen'.
When enabled, the loader will manually call 'ast_module_register(...)'
and 'ast_module_unregister(...)' when needed.
- allow eventfd detection
Asterisk 16 wants to use eventfd, but it doesn't allow the detection
during cross-compiling. This results in runtime warnings, for instance
when shutting down:
[Mar 2 22:37:41] WARNING[21593]: alertpipe.c:112 ast_alertpipe_read: read() failed: Bad file descriptor
[Mar 2 22:37:41] WARNING[21593]: alertpipe.c:112 ast_alertpipe_read: read() failed: Bad file descriptor
[Mar 2 22:37:41] WARNING[21593]: alertpipe.c:112 ast_alertpipe_read: read() failed: Bad file descriptor
Relax the configure script so that eventfd can also be detected when
cross-compiling.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This adds two (three, really) sed scripts to update the default
configuration. All example accounts are getting disabled/commented. And
the module_path is set to the actual path.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The files in /usr/share/baresip are all read-only anyway, so
INSTALL_DATA can be used.
Use it as well for the included (default) modules, otherwise they'll
have different permissions than the extra modules.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
It is not a nice user experience when a package changes configuration
files during an upgrade. Remove this from the postinstall routine.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The ffmpeg full variant does not compile on i386_pentium currently.
Disable ffmpeg support on i386 to prevent breakage on the buildbots.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
It is not a nice user experience when a package changes configuration
files during an upgrade. Remove this from the postinstall routine.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The ffmpeg full variant does not compile on i386_pentium currently.
Disable mod_av on i386 to prevent breakage on the buildbots.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Add two patches that were submitted upstream to address warnings that
occur when using gcc 8.3 (like arc does currently) which turn into
errors (-Werror).
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The libhiredis package now contais a fix for its pkgconfig file. This
allows to add prefixes, which is needed when cross-compiling in
environments like OpenWrt.
Therefore, the workaround in kamailio is no longer needed and can be
removed.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Since the update to openssl-1.1.1a the compile fails like this:
CC src/libfreeswitch_la-switch_rtp.lo
src/switch_rtp.c: In function 'switch_rtp_get_random':
src/switch_rtp.c:2419:2: error: implicit declaration of function 'RAND_bytes'; did you mean 'RSA_bits'? [-Werror=implicit-function-declaration]
RAND_bytes(buf, len);
^~~~~~~~~~
RSA_bits
cc1: all warnings being treated as errors
make[4]: *** [Makefile:2377: src/libfreeswitch_la-switch_rtp.lo] Error 1
This patch adds the missing include.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- bump to 5.2.1
- drops sources.openwrt.org from PKG_SOURCE_URL because this mirror is
meant as last resort
- adds six new modules (app_python3 marked @BROKEN - doesn't compile
yet)
- 050-fix-kamailio-utils.patch refreshed. Alpine pushed a fix upstream
that fixes the quoting issue, so this part could be dropped. I found
some other issue with kamctl, where the prompt (for password) wasn't
shown because OpenWrt doesn't have /dev/stderr. So I fixed that and
added it to this patch as well. Sent upstream.
- hiredis handling was changed upstream. They changed the default
include from "hiredis/hiredis.h" (which worked for us) to "hiredis.h".
And the only way to get "hiredis/hiredis.h" is via pkg-config, which
upstream doesn't allow during cross-compile, probably because hiredis
pkg-config is rubbish. Patch added to forces pkg-config detection.
Also includes a fix for a logical error in the Makefile regarding
header setup. Sent upstream.
Patch to fix hiredis pkg-config file sent upstream (also to OpenWrt
package maintainer). Even without hiredis patch we can get away with
forcing pkg-config detection of hiredis.
- dropped two patches that were upstreamed
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In a previous commit I updated the copyright message. But that was not
correct as I am not affiliated with OpenWrt. And I cannot change the
copyright message from a third party either. This commit reverts the
changes.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In a previous commit I updated the copyright message. But that was not
correct as I am not affiliated with OpenWrt. And I cannot change the
copyright message from a third party either. This commit reverts the
changes.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In a previous commit I updated the copyright message. But that was not
correct as I am not affiliated with OpenWrt. This commit reverts the
change.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In a previous commit I updated the copyright message. But that was not
correct as I am not affiliated with OpenWrt. This commit reverts the
change.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In a previous commit I updated the copyright message. But that was not
correct as I am not affiliated with OpenWrt. This commit reverts the
change.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Maintainer is not affiliated with OpenWrt so copyright needs to be set
to maintainer instead of OpenWrt. Also correct the year - it should read
the year in which the Makefile was first written.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
sources.openwrt.org is used by the build system as a last-resort mirror.
It's not supposed to be used as a regular source mirror. Remove it from
PKG_SOURCE_URL.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Refresh patches + add patch to remove luajit detection, which was added
upstream for this release. luajit is available in OpenWrt, but seems to
always fail on the buildbots. To prevent surprises in the future disable
it for now.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Although siproxd normally logs to syslog, it's debug output appears to go
only to stderr. Adjust procd setup to also capture stderr in syslog.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
This has the advantage of being available in the package catalog and
hence anytime both pre- and post-installation for someone looking for
information, using only the 'opkg info siproxd' command.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Patch from upstream:
Summary Remote crash vulnerability DNS SRV and NAPTR lookups
Nature of Advisory Denial Of Service
Susceptibility Remote Unauthenticated Sessions
Severity Moderate
Exploits Known No
Reported On October 23, 2018
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- clean up variable names
- add options to uci config to enable/disable logging
- remove option change_perm as it's hacky
- change check before mkdir and friends to prevent
overwriting/chown/chmod of existing files/directories (important)
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Don't force freeswitch to off during postinstall. It's not common
practice (anywhere) and it may be confusing.
Add a link to the Wiki, too, and bump the revision.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
There is no point in keeping the hotplug script in an extra package.
Move it to the main package.
The priority of the script is changed from 99 to 90 as the freeswitch
init script uses the same.
The postinstall script will check if 99-freeswitch exists. If it does a
warning is displayed with the suggestion to uninstall the hotplug
package.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
procd runs as pid 1. When freeswitch realizes that its parent has pid 1,
it thinks that it has been orphaned and terminates the console thread.
That's why procd isn't able to get freeswitch's console output.
This commit mutes the check in src/switch_console.c. Now console output
is properly logged. The workaround parameters "-nc -nf" are replaced by
a proper "-c" ("console").
Additionally this commit hands control over killing freeswitch to procd.
It's no longer done by the script. This simplifies things quite a bit.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Following up the discussion in pull request #388 this commit removes the
depend on libx264 and prevents baresip from linking to libx264.
baresip can still use a H.264 encoder through ffmpeg, which is the
preferred way anyway.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Minor version bump. Two CVE patches can be removed as they're already
included in the source. One patch was refreshed.
Also:
- https://sources.openwrt.org is added as primary source URL to lessen
the load on kamailio upstream
- Build/Configure is defined as empty (because there is no configure
script in the source tree
- patch is added to fix dp_replace(); the function was first added in the
5.1 release and didn't work; patch was accepted upstream
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Remove the depend on mod-db-sqlite from some modules. They may depend on
a db module, but any will do. And mod-jsonrpcs also does not depend on
mod-json.
Maybe things were different in the past. But today these depends aren't
needed.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
kamailio can be started with multiple "-l" ("listen") parameters to tell
it which IPs to listen on. This can also be configured in kamailio.cfg,
of course.
This commit adds the ability to the init script to translate iface names
like "wan" into IP addresses and hand them over to kamailio as command
line arguments. This is useful when using a network connection where IPs
are dynamically assigned.
kamailio can also work with interface names, e.g. "eth0". But it may
listen to all IPs configured on the interface. To avoid this the commit
differentiates beteen IPv4 ("listen") and IPv6 ("listen6"). So if the
user wants kamailio to only listen on an IPv4 address configured on a
certain iface ("wan" for instance), he/she can just specify a list entry
"listen" with that iface.
An explanation is also added to the uci configuration file.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Commit f84dda74e6 ("kamailio-5.x: enable
FAST_LOCK for MIPS") turned out to be problematic, because it changed
the ARCH to "mips2" not only for "mips", but also for some "mipsel"
targets, which was unintentional.
Address this by filtering for "mips" specifically before setting the
variable.
Also, get rid of PKG_BUILD_PARALLEL, because adding it really didn't
change anything - due to the way "make" is called. Leave a comment to
prevent repetition (read: prevent _me_ from doing the same mistake again
in the future).
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit
- updates init script to use procd
- adds a default user 'kamailio' (kamailio will switch to this user)
- introduces uci init config (instead of /etc/default/kamailio)
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
rtpproxy expects IPs as parameters. Lots of OpenWrt devices use
connections where the IP is dynamically assigned. This commit adds shell
functions to convert an iface like 'wan' to an IP address before adding
the parameter to the rtpproxy command line.
Explanation is provided in /etc/config/rtpproxy. Some whitespace issues
were also fixed.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Add log_level option to uci config. Paired with the comment it makes
setting the log level easier when no man page is around.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Update rtpproxy init script to use procd.
Also increases the start priority to 90 (like the hotplug script) to
make sure rtpproxy is started before kamailio.
Fixes some whitespace issues along the way, too.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Install hotplug script along with rtpproxy. It will only be used if
enabled by the user (via uci config file).
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
With OpenWrt default awk - so awk from busybox - the filter is broken,
causing jsonrpc calls to fail, i.e. when running "kamctl ps". Below
patch makes the filter portable. Patch was already accepted upstream.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Add package for Opus codec support plugin. Variants for both asterisk13
and asterisk15 included.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
.. because the musl implementation doesn't seem to be fully compatible
with yate. We switched to the musl implementation in f6ad95d.
Yate has this regexp:
^([[:alpha:]][[:alnum:]]+:)?/?/?([^[:space:][:cntrl:]@]+@)?([[:alnum:]._+-]+|[[][[:xdigit:].:]+[]])(:[0-9]+)?
Given a string like
sip:012345678@11.111.11.111:5060;user=phone
musl's regexec() returns these matches:
index start end
0 -1 0
1 0 32 sip:012345678@11.111.11.111:5060
2 -1 -1
3 0 14 sip:012345678@
4 14 27 11.111.11.111
5 27 32 :5060
.. but this is what yate expects:
index start end
0 -1 0
1 0 32 sip:012345678@11.111.11.111:5060
2 0 4 sip:
3 4 14 012345678@
4 14 27 11.111.11.111
5 27 32 :5060
Fixes#378
Signed-off-by: Robert Högberg <robert.hogberg@gmail.com>
- bump version
- go back to using release tarballs (unavailable when 1.8.1 was
initially released)
- add OpenWrt mirror
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Add upstream fix for AST-2018-009: Remote crash vulnerability in HTTP
websocket upgrade
The vulnerability affects the res_http_websocket.so module.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Add upstream fix for AST-2018-009: Remote crash vulnerability in HTTP
websocket upgrade
The vulnerability affects the res_http_websocket.so module.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a crafted SIP message with
an invalid Via header causes a segmentation fault and crashes Kamailio. The
reason is missing input validation in the crcitt_string_array core function
for calculating a CRC hash for To tags. (An additional error is present in
the check_via_address core function: this function also misses input
validation.) This could result in denial of service and potentially the
execution of arbitrary code.
Patch from upstream.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit replaces /etc/default/freeswitch with /etc/config/freeswitch.
This way the init and hotplug configuration can be done with uci instead of
having to edit a file.
This also does away with the busybox ntpd warning. ntpd uses the same
configuration in system and it looks like busybox's ntpd is not used when
ntpd is installed.
Lastly some log strings are amended to start with a lowercase letter.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
There is a discussion ongoing if parallel builds should be enabled by
default. For freeswitch parallel builds are known to fail when certain
modules are enabled. This commit preemptively disables parallel builds
explicitly.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
A recent commit in packages/lang/perl is causing a problem with the
perlmod.mk include. Work around this by including perlver.mk instead and
setting up PERL_CMD and PERL_SITELIB manually.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
CVE-2018-14767: "In Kamailio before 5.0.7 and 5.1.x before 5.1.4, a
crafted SIP message with a double "To" header and an empty "To" tag
causes a segmentation fault and crash. The reason is missing input
validation in the "build_res_buf_from_sip_req" core function. This could
result in denial of service and potentially the execution of arbitrary
code."
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Sometimes freeswitch doesn't exit after receiving the SIGTERM signal.
This can be reproduced by sending SIGTERM to a freeswitch instance which
is initializing (which can take quite some time).
Instead of just giving up and exiting - leaving a hung freeswitch
process on the system - this commit adds some lines to the init script
that send SIGKILL to freeswitch in case the attempt to terminate it with
SIGTERM fails.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Applied a patch, submitted upstream at
https://freeswitch.org/jira/browse/FS-11193
that fixes two memory leaks in mod_event_multicast.c
Signed-off-by: Eneas U de Queiroz <cote2004-github@yahoo.com>
- Bump version from 1.6.20 to 1.8.1 (includes OpenSSL 1.1.0 support).
- Upstream didn't provide a source tarball yet, switch to git to grab
the release.
- freeradius-client got updated to 1.1.7 by upstream, update version and
checksum accordingly.
- tiff, libvpx and pcre patches are no longer needed, drop them.
- Refresh the remaining patches. Only minor changes were needed.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Remove the hack for iconv on uclibc. Instead include nls.mk which will
sort out the iconv depends.
This changes the iconv patch. AC_SEARCH_LIB doesn't work properly for
openwrt/lede. Instead use AC_CHECK_LIB.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The sed script used on libs/unimrcp is used to set LDFLAGS using
APR_SETVAR. Since nls.mk is included there are LDFLAGS with commas. But
the macro APR_SETVAR uses commas to separate arguments, so now the
LDFLAGS are only getting partially copied.
Solve this by surrounding LDFLAGS with brackets ([...]).
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Removes the uClibc iconv hack. Instead nls.mk is included to sort out
iconv depends.
mod_gsmopen isn't able to figure out if iconv's inbuf is const. In
OpenWrt this is the case with libiconv-full, not with libiconv-stub. To
aid mod_gsmopen update 270-fix-uclibc-iconv-in-gsmopen.patch so that we
can pass on if inbuf is const via CFLAGS.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The macro included in apr/apr-util is incorrect. It results in extra
brackets being put into conftest.c, for example:
#include "confdefs.h"
[
#include <stddef.h>
#include <iconv.h>
]
int main(int argc, const char *const *argv) {
[
iconv(0,(char **)0,(size_t *)0,(char **)0,(size_t *)0);
]
return 0; }
The test always fails with:
error: expected identifier or '(' before '[' token
The following checks are affected:
- variable length arrays
- type of inbuf parameter to iconv
Fix from upstream (Apache).
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libmariadb 10.2 needs to be linked in together with iconv. Include nls.mk
to help the build system find the iconv library.
Also update func_iconv's depend. We want to use the variable
$(ICONV_DEPENDS) provided by nls.mk. It resolves to
+BUILD_NLS:libiconv-full. This cannot be handled properly right now, as the
module depends filter cannot handle +<SYMBOL>:<package> depends. So add
another field to the Makefile's module function for complex depends, which
are passed on unfiltered.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
libmariadb 10.2 needs to be linked in together with iconv. Include nls.mk
to help the build system find the iconv library.
Also update func_iconv's depend. We want to use the variable
$(ICONV_DEPENDS) provided by nls.mk. It resolves to
+BUILD_NLS:libiconv-full. This cannot be handled properly right now, as the
module depends filter cannot handle +<SYMBOL>:<package> depends. So add
another field to the Makefile's module function for complex depends, which
are passed on unfiltered.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Since libmariadb 10.2.x requires to be linked in together with iconv,
include nls.mk to help the build system find it.
Also fix a type in PKG_CONFIG_DEPENDS.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently compiles fail with:
CC libfreeswitch_la-switch_regex.lo
src/switch_regex.c: In function 'switch_regex_compile':
src/switch_regex.c:40:9: error: return from incompatible pointer type [-Werror=incompatible-pointer-types]
return pcre_compile(pattern, options, errorptr, erroroffset, tables);
^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
cc1: all warnings being treated as errors
Makefile:2100: recipe for target 'libfreeswitch_la-switch_regex.lo' failed
make[5]: *** [libfreeswitch_la-switch_regex.lo] Error 1
Fix cherry-picked from upstream.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Switch to use procd for init, with support for jails. Clean up code and
restructure callback processing to be more robust and understandable. This
also fixes a bug processing multiple siproxd config sections, as reported
by Michael Kuron.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
When there is no sounds cache declared the build system will not attempt to
download any sound packs or their SHA1 checksums.
This is to be preferred because:
a) the build may occur offline, causing it to fail
b) plain http is used by the build system for downloading
There is no drawback here because the standard sound packs are included in
the Asterisk source tarball already.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
When there is no sounds cache declared the build system will not attempt to
download any sound packs or their SHA1 checksums.
This is to be preferred because:
a) the build may occur offline, causing it to fail
b) plain http is used by the build system for downloading
There is no drawback here because the standard sound packs are included in
the Asterisk source tarball already.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
When configure is called with '--with-mysql="$(STAGING_DIR)/usr"' it tries
to detect mysql manually instead of using mysql_config. This doesn't always
work:
<snip>
checking for MySQL in /var/lib/buildbot/slaves/slave-lede-builds4/i386_pentium4/build/sdk/staging_dir/target-i386_pentium4_musl/usr... no
<snip>
This commit changes the configure argument to '--with-mysql=yes/no'. When
'yes' is selected configure uses mysql_config and then the detection works
reliably.
<snip>
checking for MySQL using mysql_config... yes 10.1.32
checking whether MYSQL_OPT_RECONNECT is declared... yes
checking whether MYSQL_OPT_READ_TIMEOUT is declared... yes
checking whether MYSQL_OPT_WRITE_TIMEOUT is declared... yes
checking whether mysql_set_character_set is declared... yes
<snip>
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- patches refreshed
- menuselect is bootstrapped from main bootstrap script now, extra call
removed
- drop a module that was removed upstream for being incomplete
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- patches refreshed
- menuselect is bootstrapped from main bootstrap script now, extra call
removed
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Despite all previous efforts chan-lantiq is not built by the build bots.
Checking the logs of a target build reveals that the chan-lantiq builds are
not even attempted.
During the target builds CONFIG_ALL is not set, meaning no regular package
gets selected. CONFIG_ALL_NONSHARED on the other hand is set. But
chan-lantiq still will not be selected, because it depends on "asterisk",
meaning asterisk needs to be selected first for chan-lantiq to become
available.
This commit changes the asterisk depend to "+asterisk", meaning asterisk
will be selected if chan-lantiq is selected.
This was tested with the SDK. A seed config file was added with the
following:
CONFIG_ALL_NONSHARED=y
Running menuselect showed that now chan-lantiq is selected
automatically. This should fix the problem.
The problem with "+asterisk" is that this breaks the asterisk menus for all
asterisk plugins/utilities that follow chan-lantiq alphabetically. To
address this put the chan-lantiq modules into their own sub menu "Telephony
Lantiq". This is not nice, but the alternative would be to rename the
packages to something like asterisk13-z-chan-lantiq. This would make it
harder to find the packages. Maybe somebody has a better idea in the
future.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
chan-lantiq currently is still not built by the build bots. Split the
package in two, one for Asterisk 13, the other for 15, to avoid a VARIANT
build. Maybe the build bots do not support nonshared VARIANT builds.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Tidy up the flags passed on to FS build system for Perl and Python
modules. Some flags seem a bit too random to include - this commit
removes them.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Underscores should not be used in package base names as they're used as
semantic separators by opkg.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
mod-avformat is only built when mod-avcodec is selected. baresip sets it
up like that in mk/modules.mk:
ifneq ($(USE_AVCODEC),)
MODULES += avcodec
ifneq ($(USE_AVFORMAT),)
MODULES += avformat
endif
endif
This commit updates the mod-avformat DEPENDS accordingly.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
There are two pulseaudio packages, pulseaudio-daemon and
pulseaudio-daemon-avahi. Both provide pulseaudio. Depend on pulseaudio
so the user may choose which one to install.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Use explicit ident string ("siproxd") instead of NULL, as the latter is
not guaranteed to prepend the program name (e.g. unspecified in POSIX),
and may result in syslog messages identified only by PID.
Use consistent facility (LOG_DAEMON) across openlog() and syslog() calls.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Explain default configuration options and potential firewall settings.
Provide examples of using documented siproxd configuration directives.
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
Switch to using callback functions for UCI config processing, and remove
the unnecessary scan_interfaces() call together with related code.
Instead of explicitly handling every possible siproxd config option, use
callbacks to deal with those defined in the UCI config file, and directly
handle only selected options with desired default values. This shrinks
the init code by ~3.5 KB and simplifies updating to future siproxd
versions with new options.
(Note: this change exposed some long-standing, broken aspects of UCI
callback handling, fixed in https://github.com/openwrt/openwrt/pull/805.)
Signed-off-by: Tony Ambardar <itugrok@yahoo.com>
- The main package does not actually depend on libpopt. Only the utility
smsq does. This commit reflects that in the dependencies.
- libxslt is only used if generating the XML documentation, which this
package does not use. So remove the bogus dependency.
- app-sms does not depend on libpopt either. It has another dependency
on libstdcpp, which is already covered by the main package. This removes
both dependencies.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- The main package does not actually depend on libpopt. Only the utility
smsq does. This commit reflects that in the dependencies.
- libxslt is only used if generating the XML documentation, which this
package does not use. So remove the bogus dependency.
- app-sms does not depend on libpopt either. It has another dependency
on libstdcpp, which is already covered by the main package. This removes
both dependencies.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently libstdc++ is hardcoded. Change that and use whatever standard
C++ lib has preference.
Note: Two modules, event_zmq and v8, do not compile against libuClibc++.
For them to be available libstdcpp needs to have preference.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The module is never attempted to build in the regular buildbot package
cycle. Stick back the nonshared flag to get at least some log during
the target build cycle.
This also updates the dependency on kmod-ltq-vmmc to be selective (+).
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The module list is necessary, unfortunately. But having working
PKG_CONFIG_DEPENDS is nice and the list rarely needs updating.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The module and util lists are necessary, unfortunately. But having
working PKG_CONFIG_DEPENDS is nice and the lists rarely need updating.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Remove the hack. Instead just call make with .lastclean and afterward
make menuselect again. If .lastclean was not removed by menuselect this
will not do anything, which is nice.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The module and util lists are necessary, unfortunately. But having
working PKG_CONFIG_DEPENDS is nice and the lists rarely need updating.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Remove the hack. Instead just call make with .lastclean and afterward
make menuselect again. If .lastclean was not removed by menuselect this
will not do anything, which is nice.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Previous revert only works when libstdcpp is the default C++ lib. To
make the compile work in all scenarios LIBS needs to be defined and
MAKE_FLAGS are required instead of MAKE_VARS, otherwise the included
variables are overridden.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This reverts commit b8b9818a13.
In hindsight I have to admit I did not correctly understand the
implications of the uclibc++.mk include.
The include allows a package to follow the user's choice regarding which
C++ library should be the standard. Linking against uClibc++ instead of
libstd++ is not a problem when running musl (which is what I had
incorrectly assumed), as both C++ libs are separate packages. And
uClibc++ is a lot smaller than libstd++, which is probably why it is
even the default C++ lib on OpenWrt currently.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This reverts commit 6857bc21eb.
In hindsight I have to admit I did not correctly understand the
implications of the uclibc++.mk include.
The include allows a package to follow the user's choice regarding which
C++ library should be the standard. Linking against uClibc++ instead of
libstd++ is not a problem when running musl (which is what I had
incorrectly assumed), as both C++ libs are separate packages. And
uClibc++ is a lot smaller than libstd++, which is probably why it is
even the default C++ lib on OpenWrt currently.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently there are two simple patches for libvpx. This commit puts the
second patch into the first.
Also added:
- CPPFLAGS
- a flag to address CVE-2017-0641
- comments
A tiff patch got refreshed due to the above.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently the routine that sets up the modules.conf file resides in
Build/Prepare.
When PKG_CONFIG_DEPENDS causes a reconfiguration, Build/Prepare is not
triggered. So if another module gets selected in menuconfig, this module
would not be added to modules.conf, meaning the rebuild would fail.
Add the routine to Build/Compile to address this.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Some source files need to be copied into PKG_BUILD_DIR. This is
currently done in Build/Prepare.
When PKG_CONFIG_DEPENDS causes a reconfiguration, Build/Prepare is not
triggered again, meaning needed source files would not be copied.
Move these lines to Build/Compile to address this.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- Fixes:
AST-2018-004
AST-2018-005
AST-2018-006
- Remove res_pjsip_transport_management.so as it got moved into
res_pjsip's core as per AST-2018-003.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- Fixes:
AST-2018-004
AST-2018-005
- Remove res_pjsip_transport_management.so as it got moved into
res_pjsip's core as per AST-2018-003.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Use $(INSTALL_BIN) as the modules are installed by siproxd as
executables. Remove the wildcards from this line as they're not needed.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Remove LIBLTDL from the Makefile as well as a patch related to LTDL.
Both have in common that they accomplish absolutely nothing.
Also explicitly disable the use of the internal libltdl.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Use the default Build/Compile. Use MAKE_VARS to set up the variables
that are used by pcapsipdump's Makefile.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The include injects a lib depend on libuClibc++.so.0 into the package,
even on musl. Remove it and replace the depend with libstcpp instead.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Yate is the only package in OpenWrt which manually enables RTTI
(run-time type information). There's no explanation in the Makefile as
to why that would be needed or advisable. Remove it.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
With this include libuClibc++.so.0 gets added as a lib depend, even on
musl. readelf shows:
Dynamic section at offset 0x10ea60 contains 23 entries:
Tag Type Name/Value
0x0000000000000001 (NEEDED) Shared library: [libuClibc++.so.0]
0x0000000000000001 (NEEDED) Shared library: [libc.so]
0x0000000000000001 (NEEDED) Shared library: [libgcc_s.so.1]
0x000000000000000e (SONAME) Library soname: [libyate.so.6.0.0]
Remove the include from the Makefile and add a depend on libstdcpp
instead.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This reverts commit 4cc2afdcdc which
disabled FORTIFY_SOURCE by removing OpenWrt's CPPFLAGS from the built.
Instead PKG_FORTIFY_SOURCE:=0 is defined, which is the proper way to do
it.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
rtpproxy doesn't use OpenWrt's CPPFLAGS (i.e. used for including
fortify-source headers). Add them to CFLAGS.
Run autoreconf. It's usually a good idea.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- Version bump
- Refresh debug-disable patch
- Add patch to add missing includes to fix:
rtpp_record.c: In function 'rtpp_record_open':
rtpp_record.c:228:62: error: 'DEFFILEMODE' undeclared (first use in this function)
rrc->fd = open(rrc->spath, O_WRONLY | O_CREAT | O_TRUNC, DEFFILEMODE);
^
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- The libraries and the Berkeley DB recovery utility are currently in
Libraries/Telephony and Utilities/Telephony. That makes little sense
as the are not general purpose libraries/utilities, hence it is better
to move them to where Kamailio 5 sits in menuconfig.
- Rename them by adding prefixes "lib" and "util" to their name.
- Update their titles a bit.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The recently added mod-db-berkeley comes with a companion utility.
Package kambdb_recover so it becomes available.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit moves libkamailio-ims & libtrie into their own packages to
keep the main package small.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
kamailio comes with internal libraries. Some are not built when only the
standard group of modules is compiled (i.e. no modules selected in
menuconfig).
The problem is that there is no way to rely on specific internal
libraries being available in the main kamailio package.
To fix this this add some modules (if they are not already selected)
that will kick of the build of the internal libraries in any case.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The INSTALL file from kamailio suggests to make the target "cfg" first.
All settinggs will then be reused when make is called again.
This has the side effect that "$(FPIC)" can be dropped from CFLAGS as
the build system adds the flags automatically now.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
When not specifying "run_target" the kamailio build system assumes
$(DESTDIR)/var/run/kamailio to be the run directory on the target
device. Add the variable to address this.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The kamailio build system provides an RPATH "///usr/lib/kamailio/" when
linking. OpenWrt's rstrip.sh inspects this RPATH and drops it. Now the
modules cannot find the needed libraries. Fix this by specifying a path
that rstrip.sh accepts.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The initial commit for this plugin missed that it comes with a
configuration file and extra files that go into
/usr/share/kamailio/xhttp_pi.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This installs the snmp mibs files provided by mod_snmpstats. A patch is
added to make the kamailio build system install the files in a proper
location in PKG_INSTALL_DIR.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
The aim is to add the missing modules that Debian packages, minus the
ones for which depends are missing on OpenWrt.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- add install/conffile routine
- use it for main package
- setup BuildKamailio5Module to allow inclusion of configuration files
on a per-module basis (mod-tls is currently the only user)
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- dictionary.kamailio & kamailio-basic.cfg are gone, remove from
Makefilei accordingly
- Install the config files from PKG_INSTALL_DIR
- Use $(INSTALL_CONF) for config files
- Remove gratuitous directory creation
- Refresh 050-fix-kamailio-utils.patch
- Remove src/modules/cnxcc/Makefile change from 120-libevent-libs.patch
as $(EXTRA_LIBS) has been removed from Makefile in previous commit
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
- Removes TLS_HOOKS as this is default anyway
- Removes -DUSE_PTHREAD_MUTEX as on supported arches FAST_LOCK is used
by default, which according to doc/tutorials/locking.txt is fastest.
-DUSE_PTHREAD_MUTEX will be set by the build system automatically in
case FAST_LOCK is unsupported, e.g. on ARC.
- Add OpenWrt LDFLAGS via LD_EXTRA_OPTS.
- With OpenWrt LDFLAGS and CPPFLAGS in place there is no need to declare
PCREDEFS, PCRELIBS nor EXTRA_LIBS. Remove them all.
- With this setup mod-dialplan now links to libpcre as well; add the
depend accordingly.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit changes Build/Compile, Build/Install and Build/InstallDev to
prevent building/installing items that are not selected. I.e. when
freeswitch-stable is not selected, only libfreetdm-stable gets built.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
This commit renames libfreetdm to libfreetdm-stable. Also the depends
are changed to what they actually are, i.e. there is no depend on
freeswitch-stable anymore (libfreetdm.so is a standalone libary).
The FreeTDM modules get the same treatment.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
ilbcwebrtc and isaccodec currently depend on @!arc because the code does
not compile there. The code does not compile on aarch64 either.
Instead of adding @!aarch64 this commit adds a patch copied from Debian
that turns the error "Please add support for your architecture in
typedefs.h" into a warning, allowing the code to build.
Consequently this commit removes @!arc from the depends as well.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
Currently three copies of every library are installed. Save space by
installing symbolic links instead.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
yate cannot be compiled against fortify-source headers at this moment:
In file included from /home/sk/tmp/lede/staging_dir/toolchain-x86_64_gcc-5.5.0_musl/include/fortify/unistd.h:23:0,
from ../yateclass.h:32,
from ../yatengine.h:29,
from ../yatephone.h:29,
from server/ysnmpagent.cpp:22:
/home/sk/tmp/lede/staging_dir/toolchain-x86_64_gcc-5.5.0_musl/include/fortify/fortify-headers.h:20:42: error: type of 'TelEngine::strcat' is unknown
To work around this remove CPPFLAGS from CFLAGS.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
When gcc 7 is used, -Werror=format-truncation finds snprintf() calls in
mod_cdr_mongodb.c and suspects that they may result in truncation. As a
result the build fails.
Work around this by adding -Wno-error=format-truncation to CFLAGS when
gcc support this.
JIRA-10939 has been raised upstream to follow up on this.
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>