Commit graph

32 commits

Author SHA1 Message Date
Sebastian Kemper
5624908abe kamailio-5.x: make jsonrpc filter portable
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>
2018-10-13 10:01:49 +02:00
Sebastian Kemper
eb990a8775 kamailio-5.x: add fix for CVE-2018-16657
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>
2018-09-12 20:25:56 +02:00
Sebastian Kemper
4a0a578f43 kamailio-5.x: add fix for CVE-2018-14767
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>
2018-08-06 23:28:43 +02:00
Sebastian Kemper
5f04977bd6 kamailio-5.x: bump to 5.1.3
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-04-28 15:09:35 +02:00
Sebastian Kemper
7974fbbe3a kamailio-5.x: remove underscores from package names
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>
2018-04-10 21:18:16 +02:00
Sebastian Kemper
d5a8385a87 kamailio-5.x: build db_postgres for target ARC
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-04-08 11:51:49 +02:00
Sebastian Kemper
c218f8d79c kamailio-5.x: add PKG_CONFIG_DEPENDS
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>
2018-03-09 16:37:37 +01:00
Sebastian Kemper
f0bc3c6776 kamailio-5.x: version bump
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-03-09 16:36:19 +01:00
Sebastian Kemper
a885b29922 kamailio-5.x: update libs and utils handling
- 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>
2018-02-12 21:50:02 +01:00
Sebastian Kemper
9113396032 kamailio-5.x: add kambdb_recover utility
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>
2018-02-11 22:30:19 +01:00
Sebastian Kemper
28d380b376 kamailio-5.x: move lesser-used internal libraries into packages
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>
2018-02-11 19:43:16 +01:00
Sebastian Kemper
9bf1935987 kamailio-5.x: make internal libs available always
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>
2018-02-11 19:39:07 +01:00
Sebastian Kemper
0d8d91c39b kamailio-5.x: run make cfg
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>
2018-02-11 19:31:33 +01:00
Sebastian Kemper
fbf862318f kamailio-5.x: remove a gratuitous ":"
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-02-11 19:26:42 +01:00
Sebastian Kemper
bb248ce4ff kamailio-5.x: specify run directory
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>
2018-02-11 19:22:12 +01:00
Sebastian Kemper
4ac7a02e9f kamailio-5.x: fix RPATH of kamailio modules
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>
2018-02-11 19:18:07 +01:00
Sebastian Kemper
ae71bd2782 kamailio-5.x: add missing files from mod-xhttp_pi
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>
2018-02-11 19:13:15 +01:00
Sebastian Kemper
d3ebba27fd kamailio-5.x: add snmpstats mibs files
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>
2018-02-11 19:09:00 +01:00
Sebastian Kemper
2dd8c008bd kamailio-5.x: add various new modules
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>
2018-02-10 15:15:35 +01:00
Sebastian Kemper
606fe5f10e kamailio-5.x: update configuration file handling
- 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>
2018-02-10 15:12:51 +01:00
Sebastian Kemper
000b984212 kamailio-5.x: bump to version 5.1.1
- 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>
2018-02-10 15:07:45 +01:00
Sebastian Kemper
a088b930c4 kamailio-5.x: update PKG_MAKE_ARGS
- 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>
2018-02-07 22:24:37 +01:00
Sebastian Kemper
c8a788a164 kamailio-5.x: copy symbolic links instead of hard links
Currently three copies of every library are installed. Save space by
installing symbolic links instead.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-02-03 21:50:52 +01:00
Sebastian Kemper
d50b56ba15 kamailio-5.x: disable mod-db-postgres on ARC
postgresql does not build on ARC. This commit makes sure that it is not
pulled in.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-02-03 14:07:23 +01:00
Sebastian Kemper
8763b0703f kamailio-5.x: add CPPFLAGS to CFLAGS
Pass CPPFLAGS in the CFLAGS as otherwise the build system will ignore
them.

This way FORTIFY_SOURCE headers are passed to the compiler.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-02-03 14:02:39 +01:00
Sebastian Kemper
706ea18d8c kamailio-5.x: improve module selection
Currently INCL_MODULES is filled with all modules. This commit changes
this so that only the modules that are selected are added to it.

To further limit the number of modules built group_include="standard" is
added. This way only the modules of the standard group plus the modules
selected in menuconfig are built. The "standard" group only includes
modules without any depends.

This fixes build failures on targets where not all depends are
available, i.e. postgresql on ARC. Now these modules can be properly
prevented from being built.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-02-03 13:57:38 +01:00
Sebastian Kemper
07bcdd9fa7 kamailio-5.x: improve module depends
Currently the Makefile pulls in depends even for packages which are not
selected. Fix this by prefixing the depends with the respective
PACKAGE_* item.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-02-03 13:49:01 +01:00
Sebastian Kemper
24b13d2bd7 kamailio-5.x: remove KAM_MODULES use
Adding KAM_MODULES variable is not needed. Remove it and call
BuildPackage from BuildKamailio5Module instead. For this to work
PKG_MAKE_ARGS and Build/Compile need to be moved up, before the module
evals.

Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2018-02-03 13:46:24 +01:00
Alexander Couzens
2e291359c8
kamailio-5.x: remove build timestamp
Build timestamps prevent reproducible builds [0].

[0] https://reproducible-builds.org/docs/timestamps/

Signed-off-by: Alexander Couzens <lynxis@fe80.eu>
2017-12-07 15:06:24 +01:00
Jiri Slachta
e058c15661 kamailio-5.x: bump to 5.0.4
Signed-off-by: Jiri Slachta <jiri@slachta.eu>
2017-12-03 15:33:48 +01:00
Sebastian Kemper
45ed7d4afc telephony: use https:// PKG_SOURCE_URLs where possible
Signed-off-by: Sebastian Kemper <sebastian_ml@gmx.net>
2017-10-08 10:11:02 +02:00
Jiri Slachta
cf7b805fbe kamailio-5.x: introduce new package
Signed-off-by: Jiri Slachta <jiri@slachta.eu>
2017-08-13 20:29:23 +02:00