From df52f8e84662078afac9906a5ccfa04aeb792185 Mon Sep 17 00:00:00 2001 From: Victor Seva Date: Fri, 29 Sep 2023 15:40:26 +0100 Subject: [PATCH] Import kamailio_5.7.2-1.debian.tar.xz [dgit import tarball kamailio 5.7.2-1 kamailio_5.7.2-1.debian.tar.xz] --- backports/jessie | 48 + backports/stretch | 23 + backports/wheezy | 83 ++ changelog | 1291 +++++++++++++++++ control | 860 +++++++++++ copyright | 289 ++++ gdb.conf | 8 + kamailio.README.Debian | 48 + kamailio.default | 28 + kamailio.examples | 1 + kamailio.init | 137 ++ kamailio.lintian-overrides | 14 + kamailio.postinst | 24 + kamailio.service | 26 + lintian-overrides | 78 + patches/0001-Stop-setting-march-on-arm.patch | 44 + patches/fix_export.patch | 22 + patches/no_INSTALL_file.patch | 21 + patches/no_lib64_on_64_bits.patch | 29 + .../no_tls_openssl_mutex_shared_util.patch | 30 + patches/series | 9 + .../upstream/dialplan-migrate-to-pcre2.patch | 453 ++++++ patches/upstream/lcr-pcre2-migration.patch | 452 ++++++ .../upstream/regex-migration-to-pcre2.patch | 427 ++++++ rules | 234 +++ source/format | 1 + upstream/metadata | 5 + watch | 3 + 28 files changed, 4688 insertions(+) create mode 100755 backports/jessie create mode 100755 backports/stretch create mode 100755 backports/wheezy create mode 100644 changelog create mode 100644 control create mode 100644 copyright create mode 100644 gdb.conf create mode 100644 kamailio.README.Debian create mode 100644 kamailio.default create mode 100644 kamailio.examples create mode 100644 kamailio.init create mode 100644 kamailio.lintian-overrides create mode 100644 kamailio.postinst create mode 100644 kamailio.service create mode 100644 lintian-overrides create mode 100644 patches/0001-Stop-setting-march-on-arm.patch create mode 100644 patches/fix_export.patch create mode 100644 patches/no_INSTALL_file.patch create mode 100644 patches/no_lib64_on_64_bits.patch create mode 100644 patches/no_tls_openssl_mutex_shared_util.patch create mode 100644 patches/series create mode 100644 patches/upstream/dialplan-migrate-to-pcre2.patch create mode 100644 patches/upstream/lcr-pcre2-migration.patch create mode 100644 patches/upstream/regex-migration-to-pcre2.patch create mode 100755 rules create mode 100644 source/format create mode 100644 upstream/metadata create mode 100644 watch diff --git a/backports/jessie b/backports/jessie new file mode 100755 index 00000000..ce56065c --- /dev/null +++ b/backports/jessie @@ -0,0 +1,48 @@ +#!/bin/bash +# +# Hook for automatic backports at buildserver.net +# +# Target dist: Debian Jessie +DIST=jessie + +# No mi_xmlrpc module +sed -i -e '/libxmlrpc-c3-dev/d' -e '/^Package: kamailio-xmlrpc-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ mi_xmlrpc[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mi_xmlrpc/' ${DIST}/rules + +# use old libfreeradius +sed -i 's/libradcli-dev/libfreeradius-client-dev/' ${DIST}/control +sed -i -e 's/RADCLI/FREERADIUS/' ${DIST}/rules + +# old mysql +sed -i -e 's/default-mysql-client/mysql-client/' \ + -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control +echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \ + ${DIST}/source.lintian-overrides +echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \ + ${DIST}/kamailio-mysql-modules.lintian-overrides + +# no libssl-dev +sed -i -e '/libssl-dev/d' ${DIST}/control + +# No geoip2 module +sed -i -e '/libmaxminddb-dev/d' -e '/^Package: kamailio-geoip2-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ geoip2[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ geoip2/' ${DIST}/rules + +# No phonenum module +sed -i -e '/libphonenumber-dev/d' -e '/^Package: kamailio-phonenum-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ phonenum[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ phonenum/' ${DIST}/rules + +# Mo mongodb +sed -i -e '/libmongoc-dev/d' -e '/^Package: kamailio-mongodb-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ mongodb[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mongodb/' ${DIST}/rules + +wrap-and-sort -sat -d ${DIST} + diff --git a/backports/stretch b/backports/stretch new file mode 100755 index 00000000..111079c5 --- /dev/null +++ b/backports/stretch @@ -0,0 +1,23 @@ +#!/bin/bash +# +# Target dist: Debian Stretch +DIST=stretch + +# No mi_xmlrpc module +sed -i -e '/libxmlrpc-c3-dev/d' -e '/^Package: kamailio-xmlrpc-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ mi_xmlrpc[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mi_xmlrpc/' ${DIST}/rules + +# No dnssec module: +sed -i -e '/libval-dev/d' -e '/^Package: kamailio-dnssec-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ dnssec[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ dnssec/' ${DIST}/rules + +# libbson not in libmongoc +sed -i 's/libmongoc-dev/libbson-dev,\n libmongoc-dev/' \ + ${DIST}/control + +wrap-and-sort -sat -d ${DIST} + diff --git a/backports/wheezy b/backports/wheezy new file mode 100755 index 00000000..4ac45e0d --- /dev/null +++ b/backports/wheezy @@ -0,0 +1,83 @@ +#!/bin/bash +# +# Target dist: Debian Wheezy +DIST=wheezy + +# No systemd +sed -i -e '/dh-systemd/d' ${DIST}/control +sed -i -e '/dh_systemd/d' ${DIST}/rules +rm ${DIST}/kamailio.service + +# No mi_xmlrpc module +sed -i -e '/libxmlrpc-c3-dev/d' -e '/^Package: kamailio-xmlrpc-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ mi_xmlrpc[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mi_xmlrpc/' ${DIST}/rules + +# No dnssec module: +sed -i -e '/libval-dev/d' -e '/^Package: kamailio-dnssec-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ dnssec[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ dnssec/' ${DIST}/rules + +# use old radius-client-ng +sed -i 's/libradcli-dev/libradiusclient-ng-dev/' ${DIST}/control +sed -i -e '/RADCLI/d' ${DIST}/rules + +# use old json +sed -i 's/libjson-c-dev/libjson0-dev/' ${DIST}/control + +# no kazoo module +sed -i -e '/librabbitmq-dev/d' -e '/^Package: kamailio-kazoo-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ kazoo[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ kazoo/' ${DIST}/rules + +# no cnxcc module +sed -i -e '/^Package: kamailio-cnxcc-modules/,/^$/d' ${DIST}/control +sed -i -e 's/ cnxcc[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ cnxcc/' ${DIST}/rules + +# no systemd module +sed -i -e '/libsystemd-dev/d' -e '/^Package: kamailio-systemd-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ systemd[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ systemd/' ${DIST}/rules + +# old mysql +sed -i -e 's/default-mysql-client/mysql-client/' \ + -e 's/default-libmysqlclient-dev/libmysqlclient-dev/' ${DIST}/control +echo "kamailio source: build-depends-on-obsolete-package build-depends: libmysqlclient-dev => default-libmysqlclient-dev" >> \ + ${DIST}/source.lintian-overrides +echo "kamailio-mysql-modules: depends-on-obsolete-package depends: mysql-client => default-mysql-client" >> \ + ${DIST}/kamailio-mysql-modules.lintian-overrides + +# no libssl-dev +sed -i -e '/libssl-dev/d' ${DIST}/control + +# no rabbitmq +sed -i -e '/librabbitmq-dev/d' \ + -e '/^Package: kamailio-rabbitmq-modules/,/^$/d' ${DIST}/control +sed -i -e 's/ rabbitmq[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ rabbitmq/' ${DIST}/rules + +# No geoip2 module +sed -i -e '/libmaxminddb-dev/d' -e '/^Package: kamailio-geoip2-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ geoip2[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ geoip2/' ${DIST}/rules + +# No phonenum module +sed -i -e '/libphonenumber-dev/d' -e '/^Package: kamailio-phonenum-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ phonenum[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ phonenum/' ${DIST}/rules + +# Mo mongodb +sed -i -e '/libmongoc-dev/d' -e '/^Package: kamailio-mongodb-modules/,/^$/d' \ + ${DIST}/control +sed -i -e 's/ mongodb[ ,$]*/ /' ${DIST}/rules +sed -i -e '/^EXTRA_EXCLUDED_MODULES=/s/$/ mongodb/' ${DIST}/rules + +wrap-and-sort -sat -d ${DIST} + diff --git a/changelog b/changelog new file mode 100644 index 00000000..9a392fc2 --- /dev/null +++ b/changelog @@ -0,0 +1,1291 @@ +kamailio (5.7.2-1) unstable; urgency=medium + + * New upstream version 5.7.2 + * pcre2 migration (Closes: #1000134) + * refresh patches + + -- Victor Seva Fri, 29 Sep 2023 16:40:26 +0200 + +kamailio (5.7.0-1) unstable; urgency=medium + + [ Debian Janitor ] + * Remove constraints unnecessary since buster (oldstable) + + [ Victor Seva ] + * New upstream version 5.7.0 + * remove already applied patches + * remove lsb-base and use libncurses-dev + * postinst: use /run instead of /var/run for kamailio user home + + -- Victor Seva Fri, 19 May 2023 11:49:49 +0200 + +kamailio (5.6.4-1) unstable; urgency=medium + + * New upstream version 5.6.4 + * remove already applied patches + + -- Victor Seva Tue, 09 May 2023 23:50:42 +0200 + +kamailio (5.6.3-2) unstable; urgency=medium + + * fix install rule for extras + + -- Victor Seva Tue, 31 Jan 2023 20:10:56 +0100 + +kamailio (5.6.3-1) unstable; urgency=medium + + * debian/rules: rework rules, try to fail properly on build + * New upstream version 5.6.3 + * fixes for app_python3 from upstream (Closes: #1027440) + + -- Victor Seva Tue, 31 Jan 2023 12:54:55 +0100 + +kamailio (5.6.2-1) unstable; urgency=medium + + * New upstream version 5.6.2 + + -- Victor Seva Tue, 25 Oct 2022 23:40:36 +0200 + +kamailio (5.6.1-1) unstable; urgency=medium + + * add AUTHORS file to all packages + * New upstream version 5.6.1 + + -- Victor Seva Mon, 11 Jul 2022 13:55:42 +0200 + +kamailio (5.6.0-2) unstable; urgency=medium + + * add AUTHORS file to docs + + -- Victor Seva Mon, 27 Jun 2022 09:32:53 +0200 + +kamailio (5.6.0-1) unstable; urgency=medium + + * New upstream version 5.6.0 + * add kamailio-nats-modules package + + -- Victor Seva Fri, 03 Jun 2022 11:27:40 +0200 + +kamailio (5.5.4-1) unstable; urgency=medium + + * New upstream version 5.5.4 + * remove already applied patches + * remove python3-dev dependency from binaries (Closes: #1005774) + + -- Victor Seva Thu, 17 Feb 2022 23:41:52 +0100 + +kamailio (5.5.3-2) unstable; urgency=medium + + [ Adrian Bunk ] + * Limit kamailio-secsipid-modules to architectures where libsecsipid is available + * Fix a race condition that sometimes resulted in FTBFS (Closes: #953090) + * Stop setting -march on arm + + -- Victor Seva Thu, 10 Feb 2022 11:51:37 +0100 + +kamailio (5.5.3-1) unstable; urgency=medium + + * New upstream version 5.5.3 + * update copyright paths and licences + * add upstream/metadata + * add lwsc and secsipid modules + + -- Victor Seva Fri, 03 Dec 2021 15:21:15 +0100 + +kamailio (5.4.3-1) unstable; urgency=medium + + * New upstream version 5.4.3 + * update Standards-Version, no changes needed + * fix duplicate-globbing-patterns at debian/copyright + + -- Victor Seva Tue, 15 Dec 2020 11:09:36 +0100 + +kamailio (5.4.2-1) unstable; urgency=medium + + * New upstream version 5.4.2 + + -- Victor Seva Wed, 28 Oct 2020 14:33:29 +0100 + +kamailio (5.4.1-1) unstable; urgency=medium + + * New upstream version 5.4.1 + + -- Victor Seva Tue, 01 Sep 2020 14:27:59 +0200 + +kamailio (5.4.0-2) unstable; urgency=medium + + * new kamailio-mqtt-modules package + + -- Victor Seva Thu, 30 Jul 2020 14:21:24 +0200 + +kamailio (5.4.0-1) unstable; urgency=medium + + * New upstream version 5.4.0 + + -- Victor Seva Thu, 30 Jul 2020 13:38:45 +0200 + +kamailio (5.3.5-1) unstable; urgency=medium + + * New upstream version 5.3.5 + + -- Victor Seva Tue, 23 Jun 2020 11:42:32 +0200 + +kamailio (5.3.4-1) unstable; urgency=medium + + * New upstream version 5.3.4 + + -- Victor Seva Mon, 11 May 2020 10:56:44 +0200 + +kamailio (5.3.3-1) unstable; urgency=medium + + * New upstream version 5.3.3 + + -- Victor Seva Mon, 30 Mar 2020 15:41:45 +0200 + +kamailio (5.3.2-1) unstable; urgency=medium + + * New upstream version 5.3.2 + + -- Victor Seva Fri, 10 Jan 2020 09:22:59 +0100 + +kamailio (5.3.1-1) unstable; urgency=medium + + * New upstream version 5.3.1 + * remove already applied patches + + -- Victor Seva Mon, 02 Dec 2019 12:47:34 +0100 + +kamailio (5.3.0-2) unstable; urgency=medium + + * allow group writes to RuntimeDirectory + + -- Victor Seva Wed, 23 Oct 2019 11:48:45 +0200 + +kamailio (5.3.0-1) unstable; urgency=medium + + * New upstream version 5.3.0 + * update systemd service file + * remove python2 support (closes: #936778) + * update rules to use the debhelper sequencer + * use debhelper-compat 12 + * clean lintian-overrides + * update lintian-overrides for examples configs + * add fixes fixed upstream + * don't build tls util, not necessary for 5.3.0 + * fix systemd-service-file-missing-documentation-key + * fix description-synopsis-starts-with-article + * update Standards-Version, no changes needed + * fix package-contains-empty-directory + + -- Victor Seva Wed, 23 Oct 2019 09:52:08 +0200 + +kamailio (5.2.3-1) unstable; urgency=medium + + * New upstream version 5.2.3 + + -- Victor Seva Mon, 03 Jun 2019 10:58:36 +0200 + +kamailio (5.2.2-1) unstable; urgency=medium + + * New upstream version 5.2.2 + + -- Victor Seva Wed, 27 Mar 2019 10:14:29 +0100 + +kamailio (5.2.1-1) unstable; urgency=medium + + * New upstream version 5.2.1 + * remove already applied upstream patches + + -- Victor Seva Thu, 17 Jan 2019 08:13:17 +0100 + +kamailio (5.2.0-2) unstable; urgency=medium + + * add kamailio-python3-modules + * add kamailio-ruby-modules + * add upstream fixes from 5.2 branch + + -- Victor Seva Sat, 05 Jan 2019 10:21:35 +0100 + +kamailio (5.2.0-1) unstable; urgency=medium + + [ Michael Prokop ] + * Drop deprecated lintian overrides for kamailio-java-modules + + [ Victor Seva ] + * New upstream version 5.2.0 + * add upstream fixes from 5.2 (Closes: #906233) + * remove kamailio-carrierroute-modules + * fix module names in pkg description + * add libmnl-dev for new ims_ipsec_pcscf module + * kamailio.service: update from upstream + + -- Victor Seva Mon, 03 Dec 2018 15:03:22 +0100 + +kamailio (5.1.6-1) unstable; urgency=medium + + * update standards-version to 4.1.2 no changes + * New upstream version 5.1.6 + + -- Victor Seva Fri, 19 Oct 2018 18:19:27 +0200 + +kamailio (5.1.5-1) unstable; urgency=medium + + * New upstream version 5.1.5 + + -- Victor Seva Fri, 24 Aug 2018 11:04:51 +0200 + +kamailio (5.1.4-1) unstable; urgency=medium + + * New upstream version 5.1.4 + * control: fix extended-description-line-too-long warning + + -- Victor Seva Wed, 06 Jun 2018 09:49:42 +0200 + +kamailio (5.1.3-1) unstable; urgency=medium + + * New upstream version 5.1.3 + * remove already applied patches + + -- Victor Seva Thu, 17 May 2018 18:03:31 +0200 + +kamailio (5.1.2-2) unstable; urgency=medium + + * remove kamailio-java-modules (closes: #892538, #893701) + + -- Victor Seva Thu, 22 Mar 2018 16:38:07 +0100 + +kamailio (5.1.2-1) unstable; urgency=medium + + * New upstream version 5.1.2 + * refresh upstream patches from 5.1 + + -- Victor Seva Tue, 06 Mar 2018 10:05:17 +0100 + +kamailio (5.1.1-1) unstable; urgency=medium + + [ Victor Seva ] + * update Vcs-* to salsa.debian.org + * New upstream version 5.1.1 (Closes: #886110) + * kamailio.service fix for /run in tmpfs (Closes: #837678) + * update upstream fixes from 5.1 branch + * fix debian-control-has-obsolete-dbg-package + * build-depends-on-obsolete-package build-depends + * fix debian-rules-parses-dpkg-parsechangelog + * fix debian-rules-sets-dpkg-architecture-variable + * fix wildcard-matches-nothing-in-dep5-copyright src/core/ + * fix wildcard-matches-nothing-in-dep5-copyright modules/usrloc/ul_rpc.* + * fix debian-watch-uses-insecure-uri + * fix lintian warnings + * fix missing examples + + [ Guillem Jover ] + * Wait for kamailio to exit before returning on sysvinit stop action + (Closes: #889745) + + -- Victor Seva Wed, 07 Feb 2018 18:03:02 +0100 + +kamailio (5.1.0-1) unstable; urgency=medium + + * New upstream version 5.1.0 + * update backports scripts + * new packages from 5.1.0 + * rules: remove usr/local from kamailio package + * upstream fixes from 5.1 branch + + -- Victor Seva Thu, 14 Dec 2017 19:20:49 +0100 + +kamailio (5.0.4-1) unstable; urgency=medium + + * [767c033] New upstream version 5.0.4 + + -- Victor Seva Thu, 26 Oct 2017 09:19:06 +0200 + +kamailio (5.0.3-1) unstable; urgency=medium + + * [384a20d] New upstream version 5.0.3 + + -- Victor Seva Sun, 01 Oct 2017 12:47:02 +0200 + +kamailio (5.0.2-2) unstable; urgency=medium + + * [66caa28] fix LIBDIR (Closes:#868270) + + -- Victor Seva Fri, 28 Jul 2017 12:36:08 +0200 + +kamailio (5.0.2-1) unstable; urgency=medium + + * [08870e2] New upstream version 5.0.0 + * [39e76f7] New upstream version 5.0.1 + * [d488c00] update debian copyright + * [40bf66b] remove purple module + * [34cc1c9] update descriptions and add new modules + * [36254e2] remove already applied patches + * [6289654] New upstream version 5.0.2 + * [39af62d] refresh debian patches + * [a56ccda] set LIBDIR for all rules + + -- Victor Seva Mon, 19 Jun 2017 09:04:29 +0200 + +kamailio (4.4.4-3) unstable; urgency=medium + + * [5e65291] tls: fix init checks (Closes: #844548) + + -- Victor Seva Fri, 31 Mar 2017 15:44:17 +0200 + +kamailio (4.4.4-2) unstable; urgency=medium + + * [622e541] add missing dependency (Closes: #852905) + + -- Victor Seva Mon, 30 Jan 2017 19:11:36 +0100 + +kamailio (4.4.4-1) unstable; urgency=medium + + * [b7185c8] remove dsnsec module (Closes: #843477) + * [74f07b7] New upstream version 4.4.4 + * [5c164a6] remove upstream patches already merged + + -- Victor Seva Wed, 09 Nov 2016 17:40:45 +0100 + +kamailio (4.4.3-2) unstable; urgency=medium + + * [e14ae9f] update upstream fixes from 4.4 branch (Closes: #828361) + * [120b3f0] debian/control: wrap-and-sort -sat + * [da95604] add lsb-base as dependency for kamailio + * [d0cd62a] update Standards-Version to 3.9.8 ( no changes needed ) + * [6b2f2c4] update lintian-overrides + + -- Victor Seva Thu, 27 Oct 2016 17:51:44 +0200 + +kamailio (4.4.3-1) unstable; urgency=medium + + * [6f08a2b] use default-mysql-* metapackages + * [a1c49be] New upstream version 4.4.3 + * [d6f6df9] remove creation of obsolete radius seqfile (Closes: #83736) + * [516952a] update upstream patches from 4.4 since 4.4.3 + + -- Victor Seva Mon, 19 Sep 2016 09:38:26 +0200 + +kamailio (4.4.2-3) unstable; urgency=medium + + * [93e246e] exclude kazoo modules from non linux archs + * [e102957] add upstream fixes from 4.4 branch since 4.4.2 + + -- Victor Seva Tue, 12 Jul 2016 14:12:53 +0200 + +kamailio (4.4.2-2) unstable; urgency=medium + + * [fd4e57f] exclude json modules from non linux archs + + -- Victor Seva Thu, 30 Jun 2016 17:08:03 +0200 + +kamailio (4.4.2-1) unstable; urgency=medium + + * [fad3987] fix build template for group modules + * [52adb13] Imported Upstream version 4.4.2 + * [65aae02] mention that http_client is included at + kamailio-utils-modules package + * [f275434] set linux-any for json modules + + -- Victor Seva Wed, 29 Jun 2016 17:39:48 +0200 + +kamailio (4.4.1-1) unstable; urgency=medium + + * [4b7bf4b] Imported Upstream version 4.4.1 + * [a835c6c] remove already applied upstream patches + * [774f7d4] use radcli lib for radius (Closes: #822338) + + -- Victor Seva Wed, 11 May 2016 14:20:52 +0200 + +kamailio (4.4.0-3) unstable; urgency=medium + + * [80d8989] update upstream patches from 4.4 branch + * [1065be0] debian/patches/series: update missing patches + + -- Victor Seva Mon, 25 Apr 2016 11:29:15 +0200 + +kamailio (4.4.0-2) unstable; urgency=medium + + * [84116d4] add upstream fixes. (Closes: #821039) + + -- Victor Seva Fri, 15 Apr 2016 09:33:53 +0200 + +kamailio (4.4.0-1) unstable; urgency=medium + + * [5cc268d] Imported Upstream version 4.4.0 + * [d3ea166] remove upstream patches from 4.3 branch + * [9463fb4] add upstream patches from 4.4 branch + * [4d45250] remove no_tls_certs_generate.patch already applied on 4.4 branch + + -- Victor Seva Mon, 04 Apr 2016 18:40:06 +0200 + +kamailio (4.3.5-2) unstable; urgency=medium + + * [e5b08dd] mono: remove support for powerpc + * [9d9559a] add upstream fixes from 4.3 branch + * [f86bdc5] update Standards-Version, no changes needed + * [ba4c66c] update Vcs-* fields to https ( fix lintian warning ) + + -- Victor Seva Wed, 16 Mar 2016 15:40:16 +0100 + +kamailio (4.3.5-1) unstable; urgency=medium + + * [198e0d7] fix typo at erlang module short description (Closes: #816235) + * [9301014] Imported Upstream version 4.3.5 + * [58f5cfe] use my DD account \o/ + * [c7f3947] remove already applied upstream patches + + -- Victor Seva Sun, 06 Mar 2016 19:54:59 +0100 + +kamailio (4.3.4-2) unstable; urgency=medium + + * [4c50b06] add upstream fixes for 4.3 branch (Closes: #815178) + + -- Victor Seva Tue, 23 Feb 2016 07:52:30 +0100 + +kamailio (4.3.4-1.1) unstable; urgency=medium + + * Non-maintainer upload. + * Refresh list of architectures supported by Mono (Closes: #808481) + + -- Jo Shields Mon, 21 Dec 2015 10:14:23 +0000 + +kamailio (4.3.4-1) unstable; urgency=medium + + * [3ca01af] Imported Upstream version 4.3.4 ( Closes: #806244 ) + * [9702243] remove applied upstream patches + + -- Victor Seva Thu, 26 Nov 2015 22:06:45 +0100 + +kamailio (4.3.3-3) unstable; urgency=medium + + * [c615681] upstream patch for mips FTBFS ( Closes: #804749 ) + + -- Victor Seva Wed, 11 Nov 2015 09:23:50 +0100 + +kamailio (4.3.3-2) unstable; urgency=medium + + * [dd21fe3] add upstream fixes from 4.3 branch (Closes: #804422 #804276) + * [592ea26] add systemd .service file and dh-systemd commands + * [207459f] allow virtual-mysql-client as valid + Depends for kamailio-mysql-modules + + -- Victor Seva Tue, 10 Nov 2015 11:44:28 +0100 + +kamailio (4.3.3-1) unstable; urgency=medium + + * [5dad250] Imported Upstream version 4.3.3 + * [cd88d69] refresh upstream patches since 4.3.3 + + -- Victor Seva Tue, 13 Oct 2015 12:22:53 +0200 + +kamailio (4.3.1-2) unstable; urgency=medium + + * [3c416e8] add kamcmd patch for reproducible builds + + -- Victor Seva Wed, 12 Aug 2015 08:46:43 +0200 + +kamailio (4.3.1-1) unstable; urgency=medium + + * [74a6255] kamailio.init: use NAME and chown HOMEDIR just after create it + * [9af988a] Imported Upstream version 4.3.1 + * [95a4304] remove already applied upstream patches + * [f155ce3] refresh debian patches + * [60a7dd9] upstream patch supporting repoducible builds + * [198047d] remove auto-generated tls certs + * [33b7028] add upstream fixes + + -- Victor Seva Tue, 11 Aug 2015 13:30:43 +0200 + +kamailio (4.3.0-1) unstable; urgency=medium + + * [45ed887] Imported Upstream version 4.3.0 + * [c2d68d8] add upstream patches from 4.3 branch + + -- Victor Seva Sat, 27 Jun 2015 14:57:38 +0200 + +kamailio (4.3.0~rc0-1) experimental; urgency=medium + + * [bfe18eb] Imported Upstream version 4.3.0~rc0 + * [6dba838] add new modules on 4.3 + * [a395fc4] update default private memory to 8Mb + * [0bb4a0c] add new modules to rules and update FLAGS + * [aa29319] debian/patches: remove applied patches upstream + + -- Victor Seva Fri, 29 May 2015 11:52:15 +0200 + +kamailio (4.2.5-1) unstable; urgency=medium + + * [a1f426d] Imported Upstream version 4.2.5 + * [5cfb580] fix FTBFS on powerpcspe because of AltiVec assumption. + Thanks to Roland Stigge (Closes: #729635) + * [a10699c] set Architecture: any when possible + * [58c114b] set Architecture: linux-any for sctp related + * [4ac4845] add powerpcspe to the list of architectures supported by mono module + * [bc35a5c] kamailio-berkeley-modules: fix lintian warning for empty dir + * [953678a] debian/control: wrap-and-short and some minor changes to descriptions + * [f57bbbb] debian/patches: add fix_manpage.patch fixing lintian warnings + * [8670eb9] debian/copyright: fix lintian warning + + -- Victor Seva Tue, 19 May 2015 22:29:42 +0200 + +kamailio (4.2.4-1) unstable; urgency=medium + + * [280cb6a] Imported Upstream version 4.2.1 + * [9fb944e] Imported Upstream version 4.2.4 (Closes: 783946) + * [0241997] exclude obsoleted and ser examples (Closes: #772314) + * [a295c13] update Standards-Version to 3.9.6 + + -- Victor Seva Sun, 03 May 2015 10:19:54 +0200 + +kamailio (4.2.0-2) unstable; urgency=medium + + * [d614569] fix fifo and ctl defaults pointing to unsecure /tmp dir + Closes: #775681 + + -- Victor Seva Wed, 28 Jan 2015 20:43:44 +0100 + +kamailio (4.2.0-1.1) unstable; urgency=low + + * Non-maintainer upload. + * Fix FTBFS on mipsel and mips. + Add mips/mipsel arch in debian/control. + Disable the Mono module on mips in debian/rules (like it is on ia64). + Add fix-mips.patch Patch by Dejan Latinovic + Closes: #767500. + + -- Anibal Monsalve Salazar Thu, 13 Nov 2014 10:48:28 +0000 + +kamailio (4.2.0-1) unstable; urgency=medium + + * [8774ae4] Imported Upstream version 4.2.0 + * [188e33e] add extra modules + + -- Victor Seva Tue, 21 Oct 2014 23:16:39 +0200 + +kamailio (4.1.5-1) unstable; urgency=medium + + * [ee9aba2] Imported Upstream version 4.1.5 + * [fb02772] remove applied upstream patches + + -- Victor Seva Sun, 10 Aug 2014 09:14:31 +0200 + +kamailio (4.1.4-1) unstable; urgency=medium + + * [b22c478] Imported Upstream version 4.1.4 + * [77a1c35] update upstream patches from 4.1.4 (Closes: #750079) + * [76f1000] Use gcj-jdk (Closes: #750831) + * [041d18f] update backports scripts + + -- Victor Seva Sun, 15 Jun 2014 10:57:16 +0200 + +kamailio (4.1.3-2) unstable; urgency=medium + + * [f3ecc41] Append pkg-config as Build-Depends (Closes: #747787) + * [256c082] Add upstream patches + + -- Victor Seva Mon, 12 May 2014 23:01:40 +0200 + +kamailio (4.1.3-1) unstable; urgency=medium + + * [b01b8f5] replace libjson0-dev with libjson-c-dev. (Closes: #745005) + * [599b843] remove pkg dir from sources + * [62ea52e] add debian gdb.conf + * [4aba97f] Imported Upstream version 4.1.3 + * [5e11caa] debian/backports: use old libjson0-dev when necessary + * [e4b2607] debian/patches: remove applied upstream patches + + -- Victor Seva Fri, 25 Apr 2014 10:00:29 +0200 + +kamailio (4.1.2-2) unstable; urgency=medium + + * [df4c597] remove sparc from the list of supported arch + * [414c743] Add upstream patches + + -- Victor Seva Tue, 25 Mar 2014 20:54:25 +0100 + +kamailio (4.1.2-1) unstable; urgency=medium + + * [18bf501] Imported Upstream version 4.1.2 + * [2472eed] fix init typo. Thanks to Corey Edwards. + * [5dfc30d] removed previous upstream patches and old debian patches + * [c60b687] clean lintian overrides + + -- Victor Seva Mon, 10 Mar 2014 11:55:33 +0100 + +kamailio (4.1.1-4) unstable; urgency=low + + [ Victor Seva ] + * fix init script + * use freeradius-client. (Closes: #739286) + * new vars to configure shared and private memory + and path for the configuration file. + + [ Tzafrir Cohen ] + * Save autover.h at clean to allow a clean git buildpackage. + + -- Tzafrir Cohen Wed, 26 Feb 2014 08:36:12 +0200 + +kamailio (4.1.1-2) unstable; urgency=medium + + * fix typo on kamailio-java-modules dependences. (Closes: #736212) + * do not try to build mono on excluded architectures. + * use db-utils from db-defaults. + * add Provides sip-router and add + stun-server | turn-server to Suggests. (Closes: #737760) + + -- Victor Seva Fri, 07 Feb 2014 10:45:50 +0100 + +kamailio (4.1.1-1) unstable; urgency=medium + + * New upstream release + * debian/patches: + - add upstream fixes + * Added tls outbound websocket autheph dnssec modules + - openssl exception added to their license + * removing sparc and ia64 from supported archs + for mono module (Closes: #728915) + + -- Victor Seva Mon, 06 Jan 2014 11:47:13 +0100 + +kamailio (4.0.4-1) unstable; urgency=low + + * New upstream release + * debian/patches: + - remove applied patches + + -- Victor Seva Thu, 03 Oct 2013 10:14:41 +0200 + +kamailio (4.0.3-2) unstable; urgency=low + + * fix init script exit status + * debian/patches/upstream: + - add upstream fixes + + -- Victor Seva Fri, 06 Sep 2013 11:42:07 +0200 + +kamailio (4.0.3-1) unstable; urgency=low + + [ Victor Seva ] + * New upstream release + * debian/control: + - change vcs info to our git repository + - add sqlite3 Recommends on sqlite-modules (Close: #715230) + - change Architecture to linux-any (Close: #712182) + * debian/patches/default_fifo.patch: + - fix kamctlrc defaults + * debian/patches/spelling_errors.patch: + - fix spelling errors on binaries + * debian/rules: + - use upstream CC_EXTRA_OPTS and LD_EXTRA_OPTS environment variables + to pass hardening flags (Close: #690396) + * debian/kamailio.init: + - use lsb init-functions + + -- Victor Seva Tue, 20 Aug 2013 11:45:03 +0200 + +kamailio (4.0.2-1) unstable; urgency=low + + * New upstream release + * debian/rules: + - changed depends for build-arch and build-indep rules + to build-stamp (Closes: #707038) + - added quiet=verbose as suggested by + Matthias Klose + * Added debian/patches/default_fifo.patch (Closes: #712083) + - use /var/run/kamailio/ dir instead of /tmp for fifo + + -- Victor Seva Thu, 13 Jun 2013 09:05:39 +0200 + +kamailio (4.0.1-1) unstable; urgency=low + + * New upstream release (Closes: #704118) + * debian/control.tls + + refreshed (Closes: #704683) + + added new websocket and outbound modules + * debian/control: + + added new ims modules + + remove openser stuff + * debian/rules: + + kambdb_recover binary is not in source. + + added ims module + * debian/patches/upstream: + + removed upstream fixes for the previous release. + * debian/patches: + + removed plumb_md5.patch and plumb_md5_fixes.patch + merged upstream ( Thanks miconda ) + + arm_fix.patch applied upstream (Closes: #690388) + Thanks Matthias Klose + * debian/backports/squeeze: + + remove call to dpkg-buildflags + + do not apply hardening_flags.patch + * debian/copyright: + + updated modules path + + -- Victor Seva Mon, 29 Apr 2013 11:34:47 +0200 + +kamailio (3.3.0-1) unstable; urgency=low + + [ Julien BLACHE ] + * OpenSER has been renamed to Kamailio (closes: #527615). + + s/openser/kamailio/ pretty much everywhere. + * debian/control: + + Add transitional openser* packages. + + Remove myself from Uploaders. + + Move openser-dbg and kamailio-dbg to debug section. + + [ Henning Westerholt ] + * finish renaming from openser to kamailio started from Julien Blache + * merge upstream changes in packaging scripts + * debian/control: + + add new modules with dependencies + + fix description for radius package + + add python to kamailio dependencies to fix lintian error + + add myself to Uploaders + * debian/kamailio.default: + + extend description in kamailio.default + * debian/kamailio.init: + + add example core dump directory setting to init file + + small reformatting in init file, mostly whitespace changes + + fix small error in package name definition + * debian/kamailio.README.Debian: + + add a note about upgrades from a previous OpenSER version + + provide links to the upstream upgrade guide + * debian/kamailio.dirs: + + its not necessary to create /var/run/kamailio in the package, + adduser should do this in the postinst script + * debian/kamailio.preinst, debian/kamailio-radius-modules.preinst: + + add preinst helper scripts to help upgrade from openser + + [ Victor Seva ] + * New upstream release + * debian/rules: + + replaced for the kamailio debian/rules. + + fix get-orig-source. Update URL + + change UPVERSION initialitation. Now bpo versions works too + + fix modules cleanup install. + * Switch to dpkg-source 3.0 (quilt) format + * debian/control: + + remove dpatch + + add myself as Uploader + + add ${misc:Depends} to all binary packages (lintian suggestion) + + multiarch support. + * debian/patches: + + remove all patches. + + added upstream fixes. + + no_lib64_on_64_bits.patch ( used on squeeze backport) + + multiarch_support.patch + + added no_INSTALL_file.patch + * debian/watch updated + * debian/kamailio.init: + + add $remote_fs (lintian suggestion) + * debian/copyright + + using copyright-format/1.0/ + * debian/backports + + added squeeze script + + [ Tzafrir Cohen ] + * Make sure hardening *FLAGS make it through the build system: + - hardening_flags.patch: get them through. + - Use buildflags.mk from dpkg-dev (and require 1.16.1.1). + - fix_export.patch - Related(?) link issue. + * Rebuild kambdb_recover that is shiped in the source. + * Package kamailio-berkeley-bin for kambdb_recover. + * Bump standards version to 3.9.3 while we're at it. + * plumb_md5.patch and plumb_md5_fixes.patch: avoid the RSA md5 code. + * Simpler editing of the defaults file: remmed-out by default. + * Removed unneeded manual library dependencies. + + -- Tzafrir Cohen Sat, 30 Jun 2012 14:18:32 +0300 + +openser (1.3.2-3) unstable; urgency=low + + * debian/patches/12_acc_enable_radius.dpatch: + + Updated; disable RADIUS support for the acc module in the sample config + file, otherwise the module fails to initialize and OpenSER can't start + (closes: #491705). + + -- Julien BLACHE Mon, 21 Jul 2008 22:34:44 +0200 + +openser (1.3.2-2) unstable; urgency=low + + * debian/control: + + Fix capitalization here and there (closes: #483753). + + Bump Standards-Version to 3.8.0 (no changes). + + -- Julien BLACHE Sat, 07 Jun 2008 12:20:27 +0200 + +openser (1.3.2-1) unstable; urgency=low + + [ Julien BLACHE ] + * New upstream release. + * debian/control, debian/rules, openser-osp-module.examples: + + Add osp module, disabled by default in Debian due to OpenSSL license + issues. + * openser.README.Debian: + + Add instructions to build the TLS variant and the OSP module. + * debian/patches/01_Makefile_fixes.dpatch: + + Removed; merged upstream. + + [ Patrick Matthäi ] + * debian/control: + + We do not need to conflict on older binary versions at openser-dbg while + we still depend on the right version. + * debian/control, debian/rules: + + Removed some useless whitespaces at EOL. + + -- Julien BLACHE Sun, 18 May 2008 11:19:28 +0200 + +openser (1.3.1-3) unstable; urgency=low + + [ Julien BLACHE ] + * debian/openser.init: + + Add more services dependencies to the LSB header. + + [ Victor Seva ] + * debian/openser.init: (Closes: #470535) + - Fixed a bug in creating necessary $HOMEDIR + Thanks to Marcos Hack for the hint and fix. + Thanks to Stefan Ebner + + -- Julien BLACHE Sat, 05 Apr 2008 17:21:41 +0200 + +openser (1.3.1-2) unstable; urgency=low + + * debian/openser.init: + + Fix echo -e bashism (closes: #472896). + + -- Julien BLACHE Fri, 28 Mar 2008 22:54:41 +0100 + +openser (1.3.1-1) unstable; urgency=low + + * New upstream release. + * debian/patches/01_fix_openser_cfg.dpatch: + + Removed; merged upstream. + * debian/patches/02_uac_fix_avp_parsing.dpatch: + + Removed; merged upstream. + * debian/patches/03_allow_empty_transformations.dpatch: + + Removed; merged upstream. + * debian/patches/04_perl_for_perl5.10.dpatch: + + Removed; merged upstream. + * debian/patches/01_Makefile_fixes.dpatch: + + Added; fix a typo in top-level Makefile. + + -- Julien BLACHE Wed, 12 Mar 2008 22:43:58 +0100 + +openser (1.3.0-3) unstable; urgency=low + + * debian/patches/04_perl_for_perl5.10.dpatch: + + Added; from upstream trunk r3742, fix perl module build with + perl 5.10 (closes: #466881). + * debian/copyright: + + Fix copyright notice. + * debian/control: + + Build-Depend on libdb-dev (>= 4.6.19) instead of libdb-dev (>= 4.6.19-1). + + -- Julien BLACHE Sat, 01 Mar 2008 20:36:31 +0100 + +openser (1.3.0-2) unstable; urgency=low + + * debian/patches/01_fix_openser_cfg.dpatch: + + Added; fix default openser.cfg, from rev 3376. + * debian/patches/02_uac_fix_avp_parsing.dpatch: + + Added; fix avp defintion parsing in the uac module, from rev 3414. + * debian/patches/03_allow_empty_transformations.dpatch: + + Added; allow some transformations to accept an empty buffer, from + rev 3436. + + -- Julien BLACHE Sun, 23 Dec 2007 14:42:55 +0100 + +openser (1.3.0-1) experimental; urgency=low + + * New upstream release. + + Adds new variable $adu to make it easier to check the auth digest URI + matches the To/R-URI; in response to CVE-2007-5469 (closes: #446956). + * debian/control: + + Add build-dependency on libcurl4-gnutls-dev. + * debian/rules: + + Add the xcap_client module in openser-presence-modules. + + -- Julien BLACHE Thu, 13 Dec 2007 17:47:34 +0100 + +openser (1.3.0~svn20071212-1) experimental; urgency=low + + * New SVN snapshot. + * debian/control: + + Rename openser-module-perl to openser-modules-perl and update the + description for the additional perlvdb module. + + Add openser-ldap-modules. + * debian/rules: + + Build the perlvdb module and install it. + + Add LDAP modules. + + -- Julien BLACHE Wed, 12 Dec 2007 17:01:19 +0100 + +openser (1.3.0~svn20071207-1) experimental; urgency=low + + * New SVN snapshot. + * debian/patches/12_acc_enable_radius.dpatch: + + Added; enable RADIUS accounting in the acc module. This effectively + pulls in libradiusclient-ng2 as a dependency of the main openser package, + but that dependency should go away in a future OpenSER release (closes: #454660). + * debian/control: + + Bump Standards-Version to 3.7.3 (no changes). + + -- Julien BLACHE Fri, 07 Dec 2007 13:24:24 +0100 + +openser (1.3.0~svn20071129-1) experimental; urgency=low + + * New SVN snapshot. + * debian/patches/12_kfreebsd_support.dpatch: + + Removed; merged upstream. + + -- Julien BLACHE Thu, 29 Nov 2007 21:37:28 +0100 + +openser (1.3.0~svn20071115-3) experimental; urgency=low + + * debian/control: + + openser-berkeley-module needs dbX.Y-util. + * debian/patches/12_kfreebsd_support.dpatch: + + Added; add kfreebsd support to the build system. + + -- Julien BLACHE Wed, 28 Nov 2007 17:52:32 +0100 + +openser (1.3.0~svn20071115-2) experimental; urgency=low + + * debian/rules: + + Force CFLAGS for the bdb_recover build, too (closes: #451908). + + -- Julien BLACHE Mon, 19 Nov 2007 10:56:18 +0100 + +openser (1.3.0~svn20071115-1) experimental; urgency=low + + * OpenSER 1.3.0 packaging pre-release. + + * debian/patches/01_psql_connect.dpatch: + + Removed; merged upstream. + * debian/patches/02_xmlrpc_update.dpatch: + + Removed; merged upstream. + * debian/control: + + New packages: openser-carrierroute-module, openser-berkeley-module. + + openser Suggests both new packages. + + Add Build-Dependencies on xsltproc, libconfuse-dev and libdb-dev. + * debian/rules: + + Update list of presence modules. + + Add the carrierroute and berkeley modules. + + Build db schemas and bdb utils. + + Install openser documentation. + + -- Julien BLACHE Thu, 15 Nov 2007 16:19:18 +0100 + +openser (1.2.2-3) unstable; urgency=low + + * debian/patches/02_xmlrpc_update.dpatch: + + Added; Backported from trunk rev 2870, update mi_xmlrpc code for newer + libxmlrpc versions (closes: #445111). + + -- Julien BLACHE Sat, 06 Oct 2007 12:04:46 +0200 + +openser (1.2.2-2) unstable; urgency=low + + [ Julien BLACHE ] + * debian/patches/01_psql_connect.dpatch: + + Added; Fix postgresql failure, from SVN (closes: #441960). + + [ Kilian Krause ] + * Add dpkg-dev (>= 1.13.19) to Build-Depends for binary:Version + * Update Maintainer to Debian VoIP Team + * Add myself to Uploaders. + + -- Julien BLACHE Wed, 12 Sep 2007 12:09:35 +0200 + +openser (1.2.2-1) unstable; urgency=low + + * New upstream release. + + Presence module users need to upgrade their database schema, see release + notes for details. + + -- Julien BLACHE Thu, 16 Aug 2007 18:04:41 +0200 + +openser (1.2.1-2) unstable; urgency=low + + * debian/control: + + Use ${binary:Version} instead of ${Source-Version}. + * debian/rules: + + Do not ignore make proper errors. + + -- Julien BLACHE Sun, 05 Aug 2007 20:46:22 +0200 + +openser (1.2.1-1) unstable; urgency=low + + * debian/control: + + Build-Depend on libsnmp-dev instead of libsnmp10-dev. + * debian/rules: + + Build at -O2 on arm again, now that #390694 is fixed. + * debian/openser.init: + + Create /var/run/openser if it doesn't exist. + + Add status support, patch from Henning Westerholt + . + * debian/openser.dirs: + + Added; add /var/run/openser to the package. + * debian/openser.examples: + + Install the whole examples/ directory. + * debian/patches/20_usrloc_lockset_fixes.dpatch: + + Removed; from upstream SVN. + * debian/patches/21_pua_lock_fix.dpatch: + + Removed; from upstream SVN. + * debian/patches/22_perl_sysv_sem.dpatch: + + Removed; merged upstream. + + -- Julien BLACHE Thu, 24 May 2007 15:31:21 +0200 + +openser (1.2.0-4) unstable; urgency=low + + * debian/patches/21_pua_lock_fix.dpatch: + + Added; fix typo in modules/pua/hash.c. + * debian/patches/22_perl_sysv_sem.dpatch: + + Added; fix perl module build with USE_SYSV_SEM. + + -- Julien BLACHE Wed, 25 Apr 2007 18:01:06 +0200 + +openser (1.2.0-3) unstable; urgency=low + + * debian/patches/20_usrloc_lockset_fixes.dpatch: + + Added; fix the usrloc module when not using fast locks. + + -- Julien BLACHE Sun, 22 Apr 2007 15:18:25 +0200 + +openser (1.2.0-2) unstable; urgency=low + + * debian/openser.init: + + exit 0 if fork=no is specified. + * debian/control: + + Build-Depend on libsnmp10-dev. + + -- Julien BLACHE Sat, 21 Apr 2007 11:33:02 +0200 + +openser (1.2.0-1) unstable; urgency=low + + * New upstream release. + * Source: use the OpenSER TLS tarball + + * debian/control: + + New packages: openser-presence-modules, openser-xmlrpc-module, + openser-perl-module, openser-snmpstats-module, openser-xmpp-module + (split from the -jabber-module package). + + Build-Depends: libxmlrpc-c3-dev, libperl-dev, libsnmp9-dev. + * debian/rules: + + Always build the non-TLS flavour for Debian builds. + + Add the new modules. + * debian/openser.init: + + Print out error messages if openser fails to start. + + No longer needs to be run as root to dump core. + * debian/patches/01_sourced_scripts.dpatch: + + Removed; merged upstream. + * debian/patches/02_openser.cfg.dpatch: + + Removed; no longer needed. + * debian/patches/12_fail_on_build_failure.dpatch: + + Removed; merged upstream. + * debian/patches/22_OpenPKG-SA-2006.042.dpatch: + + Removed; fixed upstream (different fix). + + -- Julien BLACHE Tue, 13 Mar 2007 17:00:58 +0100 + +openser (1.1.1-1) unstable; urgency=low + + * New upstream bugfix release. + * debian/patches/21_arm_register_overlap.dpatch: + + Removed; Merged upstream. + * debian/patches/20_pdt_domains.c_lockfix.dpatch: + + Removed; Merged upstream. + + -- Julien BLACHE Fri, 26 Jan 2007 16:58:48 +0100 + +openser (1.1.0-9) unstable; urgency=medium + + * debian/rules: + + Fix sed substitution pattern to properly get rid of the PATH variable + in the openserctl, openser_mysql and openser_postgresql scripts. + + -- Julien BLACHE Fri, 12 Jan 2007 15:20:26 +0100 + +openser (1.1.0-8) unstable; urgency=high + + * debian/patches/22_OpenPKG-SA-2006.042.dpatch: + + Added; security fix for OpenPKG-SA-2006.042 (closes: #404591). + + -- Julien BLACHE Tue, 26 Dec 2006 22:13:26 +0100 + +openser (1.1.0-7) unstable; urgency=low + + * Sync packaging fixes from upstream CVS. + * debian/control: + + Fix wrong RFC number in description (3621 vs. 3261), spotted by Dan Pascu. + * debian/rules: + + Add avp_radius to RADIUS_MODULES, from Bogdan-Andrei Iancu. + + -- Julien BLACHE Fri, 3 Nov 2006 13:35:18 +0100 + +openser (1.1.0-6) unstable; urgency=low + + * debian/patches/21_arm_register_overlap.dpatch: + + Added; fix register overlap on arm (closes: #393858). + + -- Julien BLACHE Sun, 22 Oct 2006 19:32:55 +0200 + +openser (1.1.0-5) unstable; urgency=low + + * debian/patches/20_20_pdt_domains.c_lockfix.dpatch: + + Added; fix typo in modules/pdt/domains.c:306. + + -- Julien BLACHE Sun, 8 Oct 2006 19:20:35 +0200 + +openser (1.1.0-4) unstable; urgency=low + + * debian/control: + + openser-dbg is Priority: extra. + * debian/patches/12_fail_on_build_failure.dpatch: + + Added; abort the build if a module fails to build. + * debian/rules: + + Temporarily decrease optimisation on arm (closes: #390005). + + -- Julien BLACHE Sun, 8 Oct 2006 12:11:55 +0200 + +openser (1.1.0-3) unstable; urgency=low + + * debian/rules: + + Remove DH_COMPAT 4 compatibility code which was introduced only for + Sarge backward-compatiblity in the upstream CVS; there's now a + packaging directory dedicated to Sarge. + * debian/control: + + Build-Depends cleanup. + * debian/patches/02_openser.cfg.dpatch: + + Remove the C-style comment block containing fork=no, otherwise the + default config file will trigger the test for fork=no in the + initscript (closes: #386464). + * debian/openser.README.Debian: + + Document initscript behaviour wrt fork=no. + * debian/openser.init: + + Add LSB header. + + -- Julien BLACHE Fri, 8 Sep 2006 15:04:58 +0200 + +openser (1.1.0-2) unstable; urgency=low + + * Initial Debian release (closes: #380450). + + * Official Debian builds have no TLS support due to the lack of OpenSSL + license exception for OpenSER. Building TLS packages is supported using + the upstream TLS tarball with no modifications (you'll need libssl-dev). + + * debian/openser.init: + + Do not start OpenSER in the start target if fork=no is specified in + the config file, so as to not break the boot process. + * debian/rules: + + Detect TLS/non-TLS sources, and enable TLS build accordingly. + + get-orig-source will fetch the non-TLS version for the official builds. + + Emulate debhelper v5 behaviour for debug symbols when build with + DH_COMPAT 4 to ease Sarge backports. + * debian/control: + + Drop build-dependency on libssl-dev for official Debian builds. + + Simplify dependencies/conflicts. + + -- Julien BLACHE Sun, 30 Jul 2006 15:23:13 +0200 + +openser (1.1.0-1) unstable; urgency=low + + * New upstream release. + + Packaging updated based on Daniel-Constantin's work upstream. + * debian/patches/02_postgres_module_build.dpatch: + + Removed; merged upstream. + * debian/patches/01_ungentooize.dpatch: + + Removed; merged upstream. + * debian/copyright: + + Updated based on upstream's. + * debian/openser.postinst: + + Change openser group GECOS to "OpenSER". + * debian/control: + + Rework package descriptions. + + Add openser-unixodbc-module package. + + Build-Depend on unixodbc-dev. + * debian/rules: + + Build the unixodbc module. + * debian/patches/01_sourced_scripts.dpatch: + + Added; remove the shebang line from scripts which aren't meant for + direct execution. + * debian/patches/10_no_lib64_on_64_bits.dpatch: + + Added; use /usr/lib even on 64bit architectures. + * debian/patches/11_always_smp.dpatch: + + Added; always build an SMP-enabled OpenSER. + + -- Julien BLACHE Wed, 12 Jul 2006 14:37:40 +0200 + +openser (1.0.1-1) unstable; urgency=low + + * Packaging sanitized. + * Remove everything debconf-related; setting up an HA cluster is an + advanced use of OpenSER which cannot be handled through debconf anyway. + * debian/control: + + Remove all -tls- packages. + + Add missing build-depends: zlib1g-dev, flex, bison. + + Build-Depend on libradiusclient-ng-dev, libmysqlclient15-dev. + + Packages descriptions rewritten. + + Add an openser-dbg package. + * debian/rules: + + Remove everything related to -tls- packages. + + Build with -g -Wall -O2 + * debian/patches/01_ungetooize.dpatch: + + Added; Do not override CFLAGS if set in the environment. Allows building + at a rational optimisation level, and passing extra CFLAGS for debugging. + * debian/patches/02_postgres_module_build.dpatch: + + Added; Remove unneeded architecture restriction for the PostgreSQL module + build. + + -- Julien BLACHE Fri, 30 Jun 2006 22:22:11 +0200 + +openser (1.0.1-0) unstable; urgency=low + + * OpenSER v1.0.1 Release. + + -- Daniel-Constantin Mierla Mon, 27 Feb 2006 19:23:00 +0200 + +openser (1.0.0-2) unstable; urgency=low + + * Create a sequence file for use if the radius accounting is enabled, + which is guaranteed to be writable by openser no matter what user + and group is running as. If radius accounting is used, this can be + added in your clients.conf that is used by openser as: + seqfile /var/run/openser/openser_radius.seq + * Fixed wording in the master_node template description + + -- Dan Pascu Fri, 03 Feb 2006 20:20:24 +0200 + +openser (1.0.0-1) unstable; urgency=low + + * Added support for debconf. A number of things can now be configured + when installing the package: if to start on boot, the ammount of + memory the openser server will use and if to dump core files when + the server crashes. + * Added support for storing startup options in /etc/default/openser. + This file is used by /etc/init.d/openser to setup various startup + options which no longer need to be modified in the startup script + itself. + * Fixed issue with not adding dependency on libradius-ng + * Fixed issue with the debian postinst scripts which resulted in the + openser system user not being created for the openser-tls package + * Fixed issue with some debhelper entries being added twice in the + openser postrm and prerm scripts + * Fixed issue with the openser system user not having his home + directory removed on purge + * Fixed a number of typos in the Suggests and Conflicts directives + in the debian control file + * Up to date with recent bugfixes from upstream + + -- Dan Pascu Thu, 02 Feb 2006 12:47:41 +0200 + +openser (1.0.0-0) unstable; urgency=low + + * First Public Release. + + -- Daniel-Constantin Mierla Tue, 07 Jun 2005 18:23:19 +0200 + + diff --git a/control b/control new file mode 100644 index 00000000..7cca35fc --- /dev/null +++ b/control @@ -0,0 +1,860 @@ +Source: kamailio +Section: net +Priority: optional +Maintainer: Debian VoIP Team +Uploaders: + Victor Seva , +Build-Depends: + bison, + debhelper-compat (= 13), + default-libmysqlclient-dev, + docbook-xml, + erlang-dev, + flex, + libcurl4-openssl-dev, + libdb-dev, + libev-dev, + libevent-dev, + libexpat1-dev, + libgeoip-dev, + libhiredis-dev, + libjansson-dev, + libjson-c-dev, + libldap2-dev, + liblua5.1-0-dev, + libmaxminddb-dev, + libmemcached-dev, + libmnl-dev, + libmongoc-dev, + libmono-2.0-dev [amd64 armel armhf i386 mipsel kfreebsd-amd64 kfreebsd-i386 ppc64 ppc64el s390x], + libmosquitto-dev, + libnats-dev, + libncurses-dev, + libpcre2-dev, + libperl-dev, + libphonenumber-dev, + libpq-dev, + librabbitmq-dev, + libradcli-dev, + libreadline-dev, + libsasl2-dev, + libsctp-dev [linux-any], + libsecsipid-dev [amd64 arm64 armel armhf hurd-i386 i386 powerpc ppc64 ppc64el riscv64 s390x], + libsnmp-dev, + libsqlite3-dev, + libssl-dev, + libsystemd-dev, + libwebsockets-dev, + libunistring-dev, + libxml2-dev, + openssl, + pkg-config, + python3, + python3-dev, + ruby-dev, + unixodbc-dev, + uuid-dev, + xsltproc, + zlib1g-dev, +Standards-Version: 4.6.0.1 +Homepage: http://www.kamailio.org/ +Vcs-Git: https://salsa.debian.org/pkg-voip-team/kamailio.git +Vcs-Browser: https://salsa.debian.org/pkg-voip-team/kamailio/ +Rules-Requires-Root: no + +Package: kamailio +Architecture: any +Multi-Arch: foreign +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + adduser, + python3, + ${misc:Depends}, + ${shlibs:Depends}, +Replaces: + kamailio-carrierroute-modules, +Suggests: + kamailio-berkeley-modules, + kamailio-cpl-modules, + kamailio-ldap-modules, + kamailio-lua-modules, + kamailio-mono-modules, + kamailio-mysql-modules, + kamailio-perl-modules, + kamailio-postgres-modules, + kamailio-presence-modules, + kamailio-python3-modules, + kamailio-radius-modules, + kamailio-redis-modules, + kamailio-snmpstats-modules, + kamailio-tls-modules, + kamailio-unixodbc-modules, + kamailio-xml-modules, + kamailio-xmpp-modules, + stun-server | turn-server, +Provides: + sip-router, +Description: very fast, dynamic and configurable SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, kamailio can handle thousands requests + per second even on low-budget hardware. It can be configured to act + as a SIP proxy, application server, session border controller, + or call load balancer to handle a set of media servers. + . + A C Shell like scripting language provides full control over the server's + behaviour. It's easy to integrate Kamailio with 3rd party API's and + applications using HTTP, AMQP, database drivers, LDAP, Radius and many other + solutions. In addition there is support for scripting using Lua, Python, Perl, + Java and a set of other languages using Mono. + . + Kamailio's modular architecture allows only required functionality to be + loaded. There are over 100 modules available: WebSockets for WebRTC, + authentication, multiple databases - both traditional SQL databases as well as + no-SQL, message bus systems like Rabbit MQ, instant messaging, a presence + agent, integration with REST-ful APIs using HTTP and JSON or XML, radius + authentication, record routing, an SMS gateway, a XMPP/jabber gateway, a + transaction and dialog module, OSP module, statistics support, + registrar and user location services, SNMP, SIMPLE Presence and much more. + . + This package contains the main Kamailio binary along with the principal + modules and support binaries. + +Package: kamailio-geoip-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: geoip module for the Kamailio SIP Server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the geoip module, an extension enabling + usage of the GeoIP API within the Kamailio configuration file. + +Package: kamailio-geoip2-modules +Architecture: linux-any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: geoip2 module for the Kamailio SIP Server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the geoip2 module, an extension enabling + real-time queries against the Max Mind GeoIP2 database within the Kamailio + configuration file. + +Package: kamailio-sqlite-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Recommends: + sqlite3, +Description: SQLite database connectivity module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the SQLite database driver for Kamailio. + +Package: kamailio-json-modules +Architecture: linux-any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Json parser and Json-RPC modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides a JSON parser for use in the Kamailio + configuration file and the JSON-RPC client over netstrings. + +Package: kamailio-memcached-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Replaces: + kamailio-memcached-module, +Description: interface to the memcached server, for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the memcached module, an interface to the memcached + server, a high-performance, distributed memory object caching system. + +Package: kamailio-lua-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: app_lua module for Kamailio Lua support + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the app_lua module, an extension allowing to + execute embedded Lua applications within the configuration file as + well as writing the entire configuration file in Lua. + +Package: kamailio-mono-modules +Architecture: amd64 armel i386 mipsel powerpc powerpcspe ppc64 s390x +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: app_mono module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the app_mono module, an extension allowing to + execute embedded Mono applications within the Kamailio SIP routing script. + +Package: kamailio-python3-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: app_python3 module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the app_python3 module, an extension allowing to + execute embedded Python applications within the Kamailio SIP routing script. + +Package: kamailio-ruby-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: app_ruby module for Kamailio Ruby support + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the app_ruby module, an extension allowing to + execute embedded Ruby applications within the Kamailio SIP routing script. + +Package: kamailio-redis-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Redis database connectivity module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the Redis NOSQL database driver for Kamailio. + +Package: kamailio-mysql-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + default-mysql-client | virtual-mysql-client, + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: MySQL database connectivity module for Kamailio + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the MySQL database driver for Kamailio. + +Package: kamailio-postgres-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + postgresql-client, + ${misc:Depends}, + ${shlibs:Depends}, +Description: PostgreSQL database connectivity module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the PostgreSQL database driver for Kamailio. + +Package: kamailio-cpl-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: CPL module (CPL interpreter engine) for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides a CPL (Call Processing Language) interpreter for + Kamailio, turning Kamailio into a CPL server (storage and interpreter). + +Package: kamailio-radius-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: RADIUS modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides a set of RADIUS modules for Kamailio, for + authentication, peering, group membership and messages URIs checking against a + RADIUS server. + +Package: kamailio-unixodbc-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: unixODBC database connectivity module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the unixODBC database driver for Kamailio. + +Package: kamailio-presence-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: SIP presence modules for Kamailio + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides several Kamailio modules for implementing a presence + server and presence user agent for rich presence, registrar-based presence, + external triggered presence with SIMPLE and XCAP support, as well as a + set of other SIP event packages.. + +Package: kamailio-perl-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Perl extensions and database driver for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides an interface for Kamailio to write Perl extensions and + the perlvdb database driver for Kamailio. + +Package: kamailio-snmpstats-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + snmpd, + ${misc:Depends}, + ${shlibs:Depends}, +Description: SNMP AgentX subagent module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the snmpstats module for Kamailio. This module acts + as an AgentX subagent which connects to a master agent. The Kamailio MIBS are + included. + +Package: kamailio-xmpp-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: XMPP gateway module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the SIP to XMPP IM translator module for Kamailio. + +Package: kamailio-xml-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Replaces: + kamailio-xml-module, + kamailio-xmlrpc-module, +Provides: + kamailio-xmlrpc-modules, +Description: XML based extensions for Kamailio's Management Interface + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides: + - the XMLRPC transport implementations for Kamailio's + Management and Control Interface. + - xmlops module for XPath operations in configuration file + +Package: kamailio-berkeley-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + db-util, + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Berkeley database module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the Berkeley database module for Kamailio, a + high-performance embedded database. All database tables are stored + in files, no additional server is necessary. + +Package: kamailio-berkeley-bin +Architecture: any +Multi-Arch: foreign +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Berkeley database module for Kamailio - helper program + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides helper modules for the Berkeley database module for + Kamailio, a high-performance embedded DB kernel. You should normally + install kamailio-berkeley-modules and not this package directly. + +Package: kamailio-ldap-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: LDAP modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the ldap and h350 modules for Kamailio, enabling LDAP + queries from the Kamailio routing scripts and storage of SIP account data in + an LDAP directory. + +Package: kamailio-ims-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: IMS module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package contains various Diameter interfaces and modules for Kamailio + to run as an IMS core. + +Package: kamailio-utils-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Utility functions for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides a set of utility functions for Kamailio, as well + as modules for restful HTTP API access using the CURL library in the + http_client module. + +Package: kamailio-sctp-modules +Architecture: linux-any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: SCTP SIP transport module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the SCTP SIP transport module for Kamailio. + +Package: kamailio-tls-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: TLS support for the Kamailio SIP server (authentication, transport) + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides TLS support for encrypted and authenticated + SIP connections as well as generic TLS support for many Kamailio modules. + +Package: kamailio-outbound-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: SIP Outbound module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package contains the "outbound" module implementing SIP outbound extension + +Package: kamailio-websocket-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: WebSocket module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package contains the module implementing WebSocket transport layer + for use in SIP over WebSockets, in combination with WebRTC media sessions.. + +Package: kamailio-autheph-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: authentication using ephemeral credentials for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the ephemeral authentication module for Kamailio, + enabling authentication using a Restful HTTP API. + +Package: kamailio-kazoo-modules +Architecture: linux-any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: kazoo modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the Kazoo application server integration module for + Kamailio. + +Package: kamailio-rabbitmq-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: RabbitMQ and AMQP integration modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the RabbitMQ module for Kamailio, enabling AMQP + integration into the SIP routing scripts for third party service + support. + +Package: kamailio-cnxcc-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: cnxcc modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the cnxcc call charging control module for Kamailio. + +Package: kamailio-erlang-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Erlang modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This Kamailio module provides interaction with the Erlang node from the + Kamailio SIP routing scripts. The module allows sending, receiving Erlang + messages and RPC calls between each other. + +Package: kamailio-systemd-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: systemd logging modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides logging to systemd journal directly from the + Kamailio configuration and routing scripts. + +Package: kamailio-phonenum-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: phonenum modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides real-time queries against the libphonenumber to be + performed directly from the Kamailio configuration and routing scripts. + +Package: kamailio-mongodb-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: mongodb modules for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides the mongodb database driver and non-db connector for + Kamailio. + +Package: kamailio-mqtt-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: MQTT modules for the Kamailio SIP Server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + MQTT module allows bidirectional publish/subscribe communication by + connecting Kamailio to a MQTT Broker. + . + Messages can be published from any point in the routing script. Also + the subscriptions can be fully controlled by scripting commands. + +Package: kamailio-secsipid-modules +Architecture: amd64 arm64 armel armhf hurd-i386 i386 powerpc ppc64 ppc64el riscv64 s390x +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: secsipid module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package contains the secsipid module, witch provides + STIR and SHAKEN (RFC8224, RFC8588). + +Package: kamailio-lwsc-modules +Architecture: linux-any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Libwebsockets module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package contains the lwcs module, which provides a client-side WebSockets + API through libwebsockets. + +Package: kamailio-nats-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Nats module for the Kamailio SIP server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package contains the nats module, which provides a NATS consumer for Kamailio. + NATS is a real time distributed messaging platform, more details about it can be + found at nats.io. + + +Package: kamailio-extra-modules +Architecture: any +Multi-Arch: same +Pre-Depends: + ${misc:Pre-Depends}, +Depends: + kamailio (= ${binary:Version}), + ${misc:Depends}, + ${shlibs:Depends}, +Description: Extra modules for the Kamailio SIP Server + Kamailio is a very fast and flexible SIP (RFC3261) + server. Written entirely in C, Kamailio can handle thousands calls + per second even on low-budget hardware. + . + This package provides a set of modules for compression of SIP attachments, + UUID usage, JSON data structure support, HTTP restful API asynchronous + access and a few more functions: + gzcompress uuid evapi jansson janssonrpcc http_async_client diff --git a/copyright b/copyright new file mode 100644 index 00000000..f65a2bfc --- /dev/null +++ b/copyright @@ -0,0 +1,289 @@ +Format: https://www.debian.org/doc/packaging-manuals/copyright-format/1.0/ +Upstream-Name: Kamailio +Upstream-Contact: sr-dev@lists.kamailio.org +Source: https://www.kamailio.org/pub/kamailio/ + +Files: * +Copyright: + 2001-2003 FhG Fokus + 2006-2010 iptelorg GmbH + Various others (see AUTHORS file) +License: GPL-2.0+ + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. + +Files: debian/* +Copyright: 2012-2021 Victor Seva + 2009-2011 Daniel-Constantin Mierla + 2010, Jon Bonilla + 2009, Jonas Bergler + 2009, Henning Westerholt + 2007, Julien BLACHE +License: GPL-2+ + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. + + +Files: src/core/* + src/modules/tm/rpc_uac.* src/modules/counters/counters.c + src/modules/tls/sbufq.h src/modules/tls/tls_bio.* + src/modules/tls/tls_cfg.* src/modules/tls/tls_ct_wrq.* + src/modules/tls/tls_ct_q.h + src/modules/tls/tls_server.* src/modules/tls/tls_locking.* + src/modules/malloc_test/malloc_test.c + src/modules/blst/blst.c +Copyright: 2006-2010 iptelorg GmbH +License: ISC + +Files: src/modules/tls/tls_rpc.* src/modules/tls/tls_domain.* +Copyright: 2001-2003 FhG Fokus + 2006-2010 iptelorg GmbH +License: ISC + +Files: src/modules/tls/tls_select.* src/modules/tls/tls_dump_vf.* +Copyright: 2005-2010 iptelorg GmbH +License: GPL-2 with OpenSSL exception + +Files: src/modules/websocket/* src/modules/outbound/* + src/modules/auth_ephemeral/* +Copyright: 2012-2013 Crocodile RCS Ltd +License: GPL-2 with OpenSSL exception + +License: GPL-2 with OpenSSL exception + On Debian systems, the full text of the GNU General Public + License version 2 can be found in the file `/usr/share/common-licenses/GPL-2'. + * Exception: permission to copy, modify, propagate, and distribute a work + * formed by combining OpenSSL toolkit software and the code in this file, + * such as linking with software components and libraries released under + * OpenSSL project license. + +Files: src/core/daemonize.* src/core/fastlock.h src/core/lock_ops.h + src/core/mem/mem.* src/core/mem/f_malloc.* + src/core/mem/meminfo.h src/core/mem/memtest.c src/core/mem/shm_mem.* + src/core/mem/q_malloc.* + src/core/pt.* src/core/sched_yield.h src/core/ut.* +Copyright: 2001-2003 FhG Fokus +License: ISC + +Files: src/core/events.* src/modules/topoh/* +Copyright: 2009 SIP-Router.org +License: ISC + +Files: src/modules/pv/pv_xavp.* + src/modules/usrloc/ul_rpc.* src/core/ppcfg.* src/core/xavp.* +Copyright: 2009-2010 Daniel-Constantin Mierla (asipto.com) +License: ISC + +Files: src/modules/xmpp/xsnprintf.c +Copyright: 1995-1998, The Apache Group +License: Apache-1.0 + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + . + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the Apache Group + for use in the Apache HTTP server project (http://www.apache.org/)." + . + 4. The names "Apache Server" and "Apache Group" must not be used to + endorse or promote products derived from this software without + prior written permission. + . + 5. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the Apache Group + for use in the Apache HTTP server project (http://www.apache.org/)." + . + THIS SOFTWARE IS PROVIDED BY THE APACHE GROUP ``AS IS'' AND ANY + EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE APACHE GROUP OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: src/core/list.h +Copyright: 1991, 1993 The Regents of the University of California +License: BSD-3-clause + +Files: src/modules/tm/t_serial.* +Copyright: 2008 Juha Heinanen +License: BSD-2-clause + +Files: src/core/parser/sdp/sdp.* src/core/parser/sdp/sdp_helpr_funcs.* + src/core/parser/sdp/sdp_cloner.h +Copyright: + 2008-2009 SOMA Networks, INC. + 2010 VoIP Embedded, Inc +License: BSD-2-clause + +Files: src/modules/tls/fixed_c_zlib.h +Copyright:1998-2005 The OpenSSL Project +Comment: file copied from OpenSSL 0.9.8, refers to OpenSSL License. Note that + this code will not build by default in the Debian packaging. +License: OpenSSL + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + . + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + . + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in + the documentation and/or other materials provided with the + distribution. + . + 3. All advertising materials mentioning features or use of this + software must display the following acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit. (http://www.openssl.org/)" + . + 4. The names "OpenSSL Toolkit" and "OpenSSL Project" must not be used to + endorse or promote products derived from this software without + prior written permission. For written permission, please contact + openssl-core@openssl.org. + . + 5. Products derived from this software may not be called "OpenSSL" + nor may "OpenSSL" appear in their names without prior written + permission of the OpenSSL Project. + . + 6. Redistributions of any form whatsoever must retain the following + acknowledgment: + "This product includes software developed by the OpenSSL Project + for use in the OpenSSL Toolkit (http://www.openssl.org/)" + . + THIS SOFTWARE IS PROVIDED BY THE OpenSSL PROJECT ``AS IS'' AND ANY + EXPRESSED OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR + PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE OpenSSL PROJECT OR + ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, + SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT + NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, + STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) + ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED + OF THE POSSIBILITY OF SUCH DAMAGE. + +Files: src/core/crypto/md5.* src/core/crypto/md5utils.* +Copyright: 1991-2, RSA Data Security, Inc +Comment: As for md5utils.c, according to a mail from Upstream (Daniel-Constantin + Mierla): while the initial commit log for it states that it is derived + from mddriver.c of RFC 1321, it seems that it was, in fact, written from + scratch by Jiri Kuthan (a core developer of SER at that time, working for + FhG Fokus Institute). As you can see it's rather trivial and uses a data + type of SER ("str"). I didn't reimplement it as it's too trivial and + looks like there's no other way to implement it. +License: public-domain-md5 + This code implements the MD5 message-digest algorithm. + The algorithm is due to Ron Rivest. This code was + written by Colin Plumb in 1993, no copyright is claimed. + This code is in the public domain; do with it what you wish. + +Files: src/core/mem/dl_* +Copyright: n/a +License: public-domain-mem + This is a version (aka dlmalloc) of malloc/free/realloc written by + Doug Lea and released to the public domain, as explained at + http://creativecommons.org/licenses/publicdomain. Send questions, + comments, complaints, performance data, etc to dl@cs.oswego.edu + +Files: src/core/rand/isaac/* +Copyright: n/a +License: public-domain-rand + By Bob Jenkins. My random number generator, ISAAC. Public Domain. + +License: ISC + Permission to use, copy, modify, and distribute this software for any + purpose with or without fee is hereby granted, provided that the above + copyright notice and this permission notice appear in all copies. + . + THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES + WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR + ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES + WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN + ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF + OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE. + +Files: src/core/utils/srjson.* +Copyright: 2009 Dave Gamble +License: MIT + Permission is hereby granted, free of charge, to any person obtaining a copy + of this software and associated documentation files (the "Software"), to deal + in the Software without restriction, including without limitation the rights + to use, copy, modify, merge, publish, distribute, sublicense, and/or sell + copies of the Software, and to permit persons to whom the Software is + furnished to do so, subject to the following conditions: + . + The above copyright notice and this permission notice shall be included in + all copies or substantial portions of the Software. + , + THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR + IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, + FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE + AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER + LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, + OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN + THE SOFTWARE. + +License: BSD-3-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions + are met: + 1. Redistributions of source code must retain the above copyright + notice, this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + 4. Neither the name of the University nor the names of its contributors + may be used to endorse or promote products derived from this software + without specific prior written permission. + . + THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND + ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE + IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE + ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE + FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL + DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS + OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) + HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT + LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY + OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF + SUCH DAMAGE. + +License: BSD-2-clause + Redistribution and use in source and binary forms, with or without + modification, are permitted provided that the following conditions are met: + . + 1. Redistributions of source code must retain the above copyright notice, + this list of conditions and the following disclaimer. + 2. Redistributions in binary form must reproduce the above copyright + notice, this list of conditions and the following disclaimer in the + documentation and/or other materials provided with the distribution. + . + THIS SOFTWARE IS PROVIDED BY THE FREEBSD PROJECT ``AS IS'' AND ANY EXPRESS OR + IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF + MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO + EVENT SHALL THE FREEBSD PROJECT OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, + INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, + BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, + DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY + OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING + NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, + EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. diff --git a/gdb.conf b/gdb.conf new file mode 100644 index 00000000..d9d8ad85 --- /dev/null +++ b/gdb.conf @@ -0,0 +1,8 @@ +[DEFAULT] +debian-branch = master +upstream-tag = upstream/%(version)s +debian-tag = debian/%(version)s +pristine-tar = True + +[git-import-orig] +filter = pkg diff --git a/kamailio.README.Debian b/kamailio.README.Debian new file mode 100644 index 00000000..d7a49561 --- /dev/null +++ b/kamailio.README.Debian @@ -0,0 +1,48 @@ +Kamailio for Debian +------------------- + +* init script check for fork=no +------------------------------- + +The Kamailio init script will not start Kamailio on boot if fork=no is +specified in the config file. The check in the initscript will match +any occurrence of fork=no in the file, even inside C-style comments. + +You can disable this check in the init script if you wish; just comment +out the calls to the check_fork function in the script. Your changes to +the init script will be preserved upon upgrade, as the file is tagged +as a conffile. + + +* different module defaults +--------------------------- + +upstream's default configs had been modified. See #775681 for more details. + +- mi_fifo: "fifo_name" => "/var/run/kamailio/kamailio_fifo" +- ctl: "binrpc" => "/var/run/kamailio/kamailio_ctl" + + +* Kamailio setup +---------------- + +To setup Kamailio, you need to: + - configure Kamailio properly to suit your needs + - edit /etc/default/kamailio, adjust the MEMORY parameter and set + RUN_KAMAILIO to "yes" + +If you are building an HA cluster using heartbeat or similar, you'll want +to disable the init script by running: + + update-rc.d kamailio remove + +so that Kamailio will not be launched at system startup. You still need +to set RUN_KAMAILIO to "yes" if you want to use the /etc/init.d/kamailio init +script. + +Set the DUMP_CORE parameter in /etc/default/kamailio to "yes" if you want to +get a core dump in case Kamailio crashes. The debug symbols for Kamailio are +provided by the kamailio-dbg package. + + + -- Victor Seva Wed, 28 Jan 2015 20:43:44 +0100 \ No newline at end of file diff --git a/kamailio.default b/kamailio.default new file mode 100644 index 00000000..8b20fc00 --- /dev/null +++ b/kamailio.default @@ -0,0 +1,28 @@ +# +# Kamailio startup options +# + +# Set to yes to enable kamailio, once configured properly. +#RUN_KAMAILIO=yes + +# User to run as +#USER=kamailio + +# Group to run as +#GROUP=kamailio + +# Amount of shared and private memory to allocate +# for the running Kamailio server (in Mb) +#SHM_MEMORY=64 +#PKG_MEMORY=8 + +# Config file +#CFGFILE=/etc/kamailio/kamailio.cfg + +# Enable the server to leave a core file when it crashes. +# Set this to 'yes' to enable Kamailio to leave a core file when it crashes +# or 'no' to disable this feature. This option is case sensitive and only +# accepts 'yes' and 'no' and only in lowercase letters. +# On some systems it is necessary to specify a directory for the core files +# to get a dump. Look into the kamailio init file for an example configuration. +#DUMP_CORE=yes diff --git a/kamailio.examples b/kamailio.examples new file mode 100644 index 00000000..a4ce6f43 --- /dev/null +++ b/kamailio.examples @@ -0,0 +1 @@ +misc/examples/* diff --git a/kamailio.init b/kamailio.init new file mode 100644 index 00000000..dd576467 --- /dev/null +++ b/kamailio.init @@ -0,0 +1,137 @@ +#! /bin/sh +# +### BEGIN INIT INFO +# Provides: kamailio +# Required-Start: $syslog $network $local_fs $remote_fs $time +# Should-Start: $named slapd mysql postgresql snmpd radiusd +# Should-Stop: $named slapd mysql postgresql snmpd radiusd +# Required-Stop: $syslog $network $local_fs $remote_fs +# Default-Start: 2 3 4 5 +# Default-Stop: 0 1 6 +# Short-Description: Start the Kamailio SIP proxy server +# Description: Start the Kamailio SIP proxy server +### END INIT INFO + +. /lib/lsb/init-functions + +PATH=/sbin:/bin:/usr/sbin:/usr/bin +DAEMON=/usr/sbin/kamailio +NAME=`basename "$0"` +DESC="Kamailio SIP Server" +HOMEDIR=/var/run/$NAME +PIDFILE=$HOMEDIR/$NAME.pid +DEFAULTS=/etc/default/$NAME +CFGFILE=/etc/$NAME/kamailio.cfg +RUN_KAMAILIO=no +USER=kamailio +GROUP=kamailio +# Amount of shared and private memory to allocate +# for the running Kamailio server (in Mb) +SHM_MEMORY=64 +PKG_MEMORY=8 +DUMP_CORE=no + +# Do not start kamailio if fork=no is set in the config file +# otherwise the boot process will just stop +check_fork () +{ + if grep -q "^[[:space:]]*fork[[:space:]]*=[[:space:]]*no.*" $CFGFILE; then + log_failure_msg "Not starting $DESC: fork=no specified in config file; run /etc/init.d/kamailio debug instead" + exit 0 + fi +} + +check_kamailio_config () +{ + # Check if kamailio configuration is valid before starting the server + set +e + out=$($DAEMON -f $CFGFILE -M $PKG_MEMORY -c 2>&1 > /dev/null) + retcode=$? + set -e + if [ "$retcode" != '0' ]; then + log_failure_msg "Not starting $DESC: invalid configuration file!" + log_failure_msg + log_failure_msg "$out" + log_failure_msg + exit 1 + fi +} + +test -f $DAEMON || exit 0 + +# Load startup options if available +if [ -f $DEFAULTS ]; then + . $DEFAULTS || true +fi + +if [ "$RUN_KAMAILIO" != "yes" ]; then + log_failure_msg "Kamailio not yet configured. Edit /etc/default/$NAME first." + exit 0 +fi + +set -e + +SHM_MEMORY=$((`echo $SHM_MEMORY | sed -e 's/[^0-9]//g'`)) +PKG_MEMORY=$((`echo $PKG_MEMORY | sed -e 's/[^0-9]//g'`)) +[ -z "$USER" ] && USER=kamailio +[ -z "$GROUP" ] && GROUP=kamailio +[ $SHM_MEMORY -le 0 ] && SHM_MEMORY=64 +[ $PKG_MEMORY -le 0 ] && PKG_MEMORY=4 + +if test "$DUMP_CORE" = "yes" ; then + # set proper ulimit + ulimit -c unlimited + + # directory for the core dump files + # COREDIR=/home/corefiles + # [ -d $COREDIR ] || mkdir $COREDIR + # chmod 777 $COREDIR + # echo "$COREDIR/core.%e.sig%s.%p" > /proc/sys/kernel/core_pattern +fi + +# /var/run can be a tmpfs +if [ ! -d $HOMEDIR ]; then + mkdir -p $HOMEDIR + chown ${USER}:${GROUP} $HOMEDIR +fi + +OPTIONS="-f $CFGFILE -P $PIDFILE -m $SHM_MEMORY -M $PKG_MEMORY -u $USER -g $GROUP" + +case "$1" in + start|debug) + check_kamailio_config + + if [ "$1" != "debug" ]; then + check_fork + fi + + log_daemon_msg "Starting $DESC: $NAME" + start-stop-daemon --start --quiet --pidfile $PIDFILE \ + --exec $DAEMON -- $OPTIONS || log_failure_msg " already running" + log_end_msg 0 + ;; + stop) + log_daemon_msg "Stopping $DESC: $NAME" + start-stop-daemon --oknodo --stop --quiet --pidfile $PIDFILE \ + --exec $DAEMON --retry 5 + log_end_msg 0 + ;; + restart|force-reload) + check_kamailio_config + + $0 stop + $0 start + ;; + status) + log_daemon_msg "Status of $DESC: " + + status_of_proc -p"$PIDFILE" $NAME $NAME + ;; + *) + N=/etc/init.d/$NAME + echo "Usage: $N {start|stop|restart|force-reload|status|debug}" >&2 + exit 1 + ;; +esac + +exit 0 diff --git a/kamailio.lintian-overrides b/kamailio.lintian-overrides new file mode 100644 index 00000000..b6f3d378 --- /dev/null +++ b/kamailio.lintian-overrides @@ -0,0 +1,14 @@ +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/exec/exec.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/ims/icscf/kamailio.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/ims/scscf/kamailio.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/kemi/kamailio-basic-kemi.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/mixed/kamailio-minimal-anycast.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/mixed/kamailio-minimal-proxy.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/edge.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/edge_websocket.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/outbound/registrar.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/pkg/kamailio-basic.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/pkg/kamailio-oob.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/pkg/sipcapture.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/webrtc/kamailio-default-websocket.cfg #!KAMAILIO +kamailio: example-interpreter-not-absolute usr/share/doc/kamailio/examples/webrtc/websocket.cfg #!KAMAILIO diff --git a/kamailio.postinst b/kamailio.postinst new file mode 100644 index 00000000..e2777808 --- /dev/null +++ b/kamailio.postinst @@ -0,0 +1,24 @@ +#! /bin/sh + +set -e + +case "$1" in + configure) + adduser --quiet --system --group --disabled-password \ + --shell /bin/false --gecos "Kamailio SIP Server" \ + --home /run/kamailio kamailio || true + + ;; + + abort-upgrade|abort-remove|abort-deconfigure) + + ;; + + *) + echo "postinst called with unknown argument \`$1'" >&2 + exit 1 + ;; +esac + +#DEBHELPER# + diff --git a/kamailio.service b/kamailio.service new file mode 100644 index 00000000..d46c5be5 --- /dev/null +++ b/kamailio.service @@ -0,0 +1,26 @@ +[Unit] +Description=Kamailio - the Open Source SIP Server +Documentation=man:kamailio(8) +Wants=network-online.target +After=network-online.target + +[Service] +Type=forking +User=kamailio +Group=kamailio +Environment='CFGFILE=/etc/kamailio/kamailio.cfg' +Environment='SHM_MEMORY=64' +Environment='PKG_MEMORY=8' +EnvironmentFile=-/etc/default/kamailio +EnvironmentFile=-/etc/default/kamailio.d/* +# PIDFile requires a full absolute path +PIDFile=/run/kamailio/kamailio.pid +# ExecStart requires a full absolute path +ExecStart=/usr/sbin/kamailio -P /run/kamailio/kamailio.pid -f $CFGFILE -m $SHM_MEMORY -M $PKG_MEMORY +Restart=on-failure +# /run/kamailio in tmpfs +RuntimeDirectory=kamailio +RuntimeDirectoryMode=0770 + +[Install] +WantedBy=multi-user.target diff --git a/lintian-overrides b/lintian-overrides new file mode 100644 index 00000000..442e4b6a --- /dev/null +++ b/lintian-overrides @@ -0,0 +1,78 @@ +kamailio-autheph-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/auth_ephemeral.so +kamailio-berkeley-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/db_berkeley.so +kamailio-carrierroute-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/carrierroute.so +kamailio-cnxcc-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/cnxcc.so +kamailio-cpl-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/cpl-c.so +kamailio-dnssec-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/dnssec.so +kamailio-erlang-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/erlang.so +kamailio-extra-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/evapi.so +kamailio-extra-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/gzcompress.so +kamailio-extra-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/jansson.so +kamailio-extra-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/janssonrpc-c.so +kamailio-extra-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/uuid.so +kamailio-geoip-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/geoip.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/libkamailio_ims.so.0.1 +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/cdp.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/cdp_avp.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_auth.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_charging.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_dialog.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_icscf.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_isc.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_qos.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_registrar_pcscf.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_registrar_scscf.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_usrloc_pcscf.so +kamailio-ims-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ims_usrloc_scscf.so +kamailio-json-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/json.so +kamailio-json-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/jsonrpc-c.so +kamailio-kazoo-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/kazoo.so +kamailio-ldap-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/db2_ldap.so +kamailio-ldap-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/h350.so +kamailio-ldap-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ldap.so +kamailio-lua-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/app_lua.so +kamailio-memcached-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/memcached.so +kamailio-mono-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/app_mono.so +kamailio-mysql-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/db_mysql.so +kamailio-outbound-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/outbound.so +kamailio-perl-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/app_perl.so +kamailio-perl-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/db_perlvdb.so +kamailio-postgres-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/db_postgres.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/presence.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/presence_conference.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/presence_dialoginfo.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/presence_mwi.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/presence_profile.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/presence_reginfo.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/presence_xml.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/pua.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/pua_bla.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/pua_dialoginfo.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/pua_mi.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/pua_reginfo.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/pua_usrloc.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/pua_xmpp.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/rls.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/xcap_client.so +kamailio-presence-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/xcap_server.so +kamailio-purple-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/purple.so +kamailio-python-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/app_python.so +kamailio-radius-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/acc_radius.so +kamailio-radius-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/auth_radius.so +kamailio-radius-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/misc_radius.so +kamailio-radius-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/peering.so +kamailio-redis-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/ndb_redis.so +kamailio-sctp-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/sctp.so +kamailio-snmpstats-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/snmpstats.so +kamailio-sqlite-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/db_sqlite.so +kamailio-tls-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/auth_identity.so +kamailio-tls-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/crypto.so +kamailio-tls-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/tls.so +kamailio-unixodbc-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/db_unixodbc.so +kamailio-utils-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/http_client.so +kamailio-utils-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/utils.so +kamailio-websocket-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/websocket.so +kamailio-xml-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/xhttp_pi.so +kamailio-xml-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/xmlops.so +kamailio-xml-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/xmlrpc.so +kamailio-xmpp-modules: hardening-no-bindnow usr/lib/x86_64-linux-gnu/kamailio/modules/xmpp.so diff --git a/patches/0001-Stop-setting-march-on-arm.patch b/patches/0001-Stop-setting-march-on-arm.patch new file mode 100644 index 00000000..bbf730ea --- /dev/null +++ b/patches/0001-Stop-setting-march-on-arm.patch @@ -0,0 +1,44 @@ +From: Adrian Bunk +Date: Wed, 9 Feb 2022 06:21:59 +0200 +Subject: Stop setting -march on arm + +This broke the Debian armhf build due to the Debian gcc maintainer +changing the semantics of -march to disable FPU support unless +fp +is included. +--- + src/Makefile.defs | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/src/Makefile.defs b/src/Makefile.defs +index 92b8027..3919b62 100644 +--- a/src/Makefile.defs ++++ b/src/Makefile.defs +@@ -1261,7 +1261,7 @@ ifeq ($(ARCH), arm) + ifeq ($(CC_NAME), gcc) + C_DEFS+=-DCC_GCC_LIKE_ASM + #common stuff +- CFLAGS+=-marm -march=armv5t $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE) ++ CFLAGS+=-marm $(CC_OPT) -funroll-loops -fsigned-char $(PROFILE) + #if gcc 4.5+ or 4.2+ + ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER)))) + CFLAGS+= -ftree-vectorize -fno-strict-overflow +@@ -1309,7 +1309,7 @@ ifeq ($(ARCH), arm6) + ifeq ($(CC_NAME), gcc) + C_DEFS+=-DCC_GCC_LIKE_ASM + #common stuff +- CFLAGS+=-march=armv6 $(CC_OPT) -funroll-loops -fsigned-char \ ++ CFLAGS+=-$(CC_OPT) -funroll-loops -fsigned-char \ + $(PROFILE) + #if gcc 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+ + ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER)))) +@@ -1355,8 +1355,8 @@ ifeq ($(ARCH), arm7) + # if gcc + ifeq ($(CC_NAME), gcc) + C_DEFS+=-DCC_GCC_LIKE_ASM +- #common stuff, use armv7-a as lowest common architecture +- CFLAGS+=-march=armv7-a $(CC_OPT) -funroll-loops -fsigned-char \ ++ #common stuff ++ CFLAGS+=-$(CC_OPT) -funroll-loops -fsigned-char \ + $(PROFILE) + #if gcc 7.0+, 6.0+, 5.0+, 4.5+ or 4.2+ + ifeq (,$(strip $(filter-out 4.2+ 4.5+ 5.0+ 6.0+ 7.0+ 8.0+ 9.0+,$(CC_SHORTVER)))) diff --git a/patches/fix_export.patch b/patches/fix_export.patch new file mode 100644 index 00000000..eae62227 --- /dev/null +++ b/patches/fix_export.patch @@ -0,0 +1,22 @@ +From: Tzafrir Cohen +Date: Fri, 29 Sep 2023 16:39:21 +0200 +Subject: make sure symbols are exported from main binary to allow loading + modules + +--- + src/Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/src/Makefile b/src/Makefile +index 7c78f6c..eb1a8c6 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -139,6 +139,8 @@ endif + main_makefile=1 + include Makefile.defs + ++$(MAIN_NAME): LDFLAGS += -Wl,--export-dynamic ++ + static_modules_path=$(addprefix modules/, $(static_modules)) + extra_sources=$(wildcard $(addsuffix /*.c, $(static_modules_path))) + extra_objs=$(extra_sources:.c=.o) diff --git a/patches/no_INSTALL_file.patch b/patches/no_INSTALL_file.patch new file mode 100644 index 00000000..168ea29a --- /dev/null +++ b/patches/no_INSTALL_file.patch @@ -0,0 +1,21 @@ +From: Victor Seva +Date: Fri, 29 Sep 2023 16:39:21 +0200 +Subject: Don't copy the INSTALL file to the docs dir + +--- + src/Makefile | 2 -- + 1 file changed, 2 deletions(-) + +diff --git a/src/Makefile b/src/Makefile +index 6c2b35b..7c78f6c 100644 +--- a/src/Makefile ++++ b/src/Makefile +@@ -858,8 +858,6 @@ install-modules-all: install-every-module install-every-module-doc + + + install-doc: $(doc_prefix)/$(doc_dir) install-every-module-doc +- $(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/INSTALL +- $(INSTALL_DOC) ../INSTALL $(doc_prefix)/$(doc_dir) + $(INSTALL_TOUCH) $(doc_prefix)/$(doc_dir)/README + $(INSTALL_DOC) ../README $(doc_prefix)/$(doc_dir) + diff --git a/patches/no_lib64_on_64_bits.patch b/patches/no_lib64_on_64_bits.patch new file mode 100644 index 00000000..1453ddd7 --- /dev/null +++ b/patches/no_lib64_on_64_bits.patch @@ -0,0 +1,29 @@ +From: Victor Seva +Date: Fri, 29 Sep 2023 16:39:21 +0200 +Subject: don't try to install to lib64 + +--- + src/Makefile.defs | 10 +--------- + 1 file changed, 1 insertion(+), 9 deletions(-) + +diff --git a/src/Makefile.defs b/src/Makefile.defs +index 287efec..92b8027 100644 +--- a/src/Makefile.defs ++++ b/src/Makefile.defs +@@ -458,15 +458,7 @@ endif + + $(info target architecture <$(ARCH)>, host architecture <$(HOST_ARCH)>) + +-LIBDIR ?= +-ifeq ($(LIBDIR),) +-ARCHBSZ= $(shell echo $(ARCH) | sed -e 's/.*64.*/64b/') +-ifeq ($(ARCHBSZ),64b) +- LIBDIR = lib64 +-else +- LIBDIR = lib +-endif +-endif ++LIBDIR ?= lib + + # dirs + cfg_dir = etc/$(MAIN_NAME)/ diff --git a/patches/no_tls_openssl_mutex_shared_util.patch b/patches/no_tls_openssl_mutex_shared_util.patch new file mode 100644 index 00000000..b6adb4d3 --- /dev/null +++ b/patches/no_tls_openssl_mutex_shared_util.patch @@ -0,0 +1,30 @@ +From: Victor Seva +Date: Tue, 22 Oct 2019 10:41:16 +0200 +Subject: no_tls_openssl_mutex_shared_util + +> +https://github.com/kamailio/kamailio/commit/a0ca4cd43f098d10aa5aadcc18453cbd0120dcef + +``` +**IMPORTANT: the workaround of using this preloaded shared library is no longer +needed starting with Kamailio v5.3.0-pre1 (git master branch after September 14, 2019). +The code of this shared library has been included in the core of Kamailio and the +same behaviour is now achieved by default.** +``` +--- + src/modules/tls/Makefile | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/src/modules/tls/Makefile b/src/modules/tls/Makefile +index 9112150..5004343 100644 +--- a/src/modules/tls/Makefile ++++ b/src/modules/tls/Makefile +@@ -72,7 +72,7 @@ LIBS+= $(TLS_EXTRA_LIBS) -lpthread + # dcm: tls.cfg installed via local 'install-cfg' to update paths + #MOD_INSTALL_CFGS=tls.cfg + +-MOD_INSTALL_UTILS=utils/openssl_mutex_shared ++MOD_INSTALL_UTILS= + + include ../../Makefile.modules + diff --git a/patches/series b/patches/series new file mode 100644 index 00000000..0b341342 --- /dev/null +++ b/patches/series @@ -0,0 +1,9 @@ +# debian fixes +no_lib64_on_64_bits.patch +no_INSTALL_file.patch +fix_export.patch +no_tls_openssl_mutex_shared_util.patch +0001-Stop-setting-march-on-arm.patch +upstream/dialplan-migrate-to-pcre2.patch +upstream/lcr-pcre2-migration.patch +upstream/regex-migration-to-pcre2.patch diff --git a/patches/upstream/dialplan-migrate-to-pcre2.patch b/patches/upstream/dialplan-migrate-to-pcre2.patch new file mode 100644 index 00000000..63a705ea --- /dev/null +++ b/patches/upstream/dialplan-migrate-to-pcre2.patch @@ -0,0 +1,453 @@ +From: Victor Seva +Date: Mon, 21 Aug 2023 12:27:43 +0200 +Subject: dialplan: migrate to pcre2 + +--- + src/modules/dialplan/Makefile | 11 ++--- + src/modules/dialplan/dialplan.c | 5 ++ + src/modules/dialplan/dialplan.h | 18 ++++--- + src/modules/dialplan/dp_db.c | 103 ++++++++++++++++++++++++---------------- + src/modules/dialplan/dp_repl.c | 54 +++++++++++++-------- + 5 files changed, 117 insertions(+), 74 deletions(-) + +diff --git a/src/modules/dialplan/Makefile b/src/modules/dialplan/Makefile +index abb4bf8..9fd2419 100644 +--- a/src/modules/dialplan/Makefile ++++ b/src/modules/dialplan/Makefile +@@ -6,20 +6,15 @@ auto_gen= + NAME=dialplan.so + + ifeq ($(CROSS_COMPILE),) +-PCRE_BUILDER = $(shell \ +- if pkg-config --exists libcre; then \ +- echo 'pkg-config libpcre'; \ +- else \ +- which pcre-config; \ +- fi) ++PCRE_BUILDER = $(shell command -v pcre2-config) + endif + + ifeq ($(PCRE_BUILDER),) + PCREDEFS=-I$(LOCALBASE)/include +- PCRELIBS=-L$(LOCALBASE)/lib -lpcre ++ PCRELIBS=-L$(LOCALBASE)/lib -lpcre2-8 + else + PCREDEFS = $(shell $(PCRE_BUILDER) --cflags) +- PCRELIBS = $(shell $(PCRE_BUILDER) --libs) ++ PCRELIBS = $(shell $(PCRE_BUILDER) --libs8) + endif + DEFS+=$(PCREDEFS) + LIBS=$(PCRELIBS) +diff --git a/src/modules/dialplan/dialplan.c b/src/modules/dialplan/dialplan.c +index 80b83a7..e163173 100644 +--- a/src/modules/dialplan/dialplan.c ++++ b/src/modules/dialplan/dialplan.c +@@ -5,6 +5,8 @@ + * + * Copyright (C) 2014 Olle E. Johansson, Edvina AB + * ++ * Copyright (C) 2023 Victor Seva ++ * + * This file is part of Kamailio, a free SIP server. + * + * Kamailio is free software; you can redistribute it and/or modify +@@ -80,6 +82,9 @@ static int ki_dp_translate_vars(sip_msg_t* msg, int id, str *input, str *output) + int dp_replace_fixup(void** param, int param_no); + int dp_replace_fixup_free(void** param, int param_no); + ++pcre2_general_context *dpl_gctx = NULL; ++pcre2_compile_context *dpl_ctx = NULL; ++ + str dp_attr_pvar_s = STR_NULL; + pv_spec_t *dp_attr_pvar = NULL; + +diff --git a/src/modules/dialplan/dialplan.h b/src/modules/dialplan/dialplan.h +index c47d53e..33b17bd 100644 +--- a/src/modules/dialplan/dialplan.h ++++ b/src/modules/dialplan/dialplan.h +@@ -13,8 +13,8 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +@@ -30,7 +30,8 @@ + #ifndef _DP_DIALPLAN_H + #define _DP_DIALPLAN_H + +-#include ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + #include "../../core/pvar.h" + #include "../../core/parser/msg_parser.h" + +@@ -43,6 +44,9 @@ + #define DP_TFLAGS_PV_MATCH (1 << 0) + #define DP_TFLAGS_PV_SUBST (1 << 1) + ++extern pcre2_general_context *dpl_gctx; ++extern pcre2_compile_context *dpl_ctx; ++ + typedef struct dpl_node { + int dpid; /* dialplan id */ + int pr; /* priority */ +@@ -51,8 +55,8 @@ typedef struct dpl_node { + str match_exp; /* match-first string */ + str subst_exp; /* match string with subtitution groupping */ + str repl_exp; /* replacement expression string */ +- pcre *match_comp; /* compiled matching expression */ +- pcre *subst_comp; /* compiled substitution expression */ ++ pcre2_code *match_comp; /* compiled matching expression */ ++ pcre2_code *subst_comp; /* compiled substitution expression */ + struct subst_expr *repl_comp; /* compiled replacement */ + str attrs; /* attributes string */ + unsigned int tflags; /* flags for type of values for matching */ +@@ -99,7 +103,7 @@ void repl_expr_free(struct subst_expr *se); + int dp_translate_helper(sip_msg_t *msg, str *user_name, str *repl_user, + dpl_id_p idp, str *); + int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, +- pcre *subst_comp, str *); ++ pcre2_code *subst_comp, str *); + +-pcre *reg_ex_comp(const char *pattern, int *cap_cnt, int mtype); ++pcre2_code *reg_ex_comp(const char *pattern, int *cap_cnt, int mtype); + #endif +diff --git a/src/modules/dialplan/dp_db.c b/src/modules/dialplan/dp_db.c +index 4275f02..94b4aad 100644 +--- a/src/modules/dialplan/dp_db.c ++++ b/src/modules/dialplan/dp_db.c +@@ -193,11 +193,31 @@ void dp_disconnect_db(void) + } + } + ++static void *pcre2_malloc(size_t size, void *ext) ++{ ++ return shm_malloc(size); ++} ++ ++static void pcre2_free(void *ptr, void *ext) ++{ ++ shm_free(ptr); ++ ptr = NULL; ++} + + int init_data(void) + { + int *p; + ++ if((dpl_gctx = pcre2_general_context_create(pcre2_malloc, pcre2_free, NULL)) ++ == NULL) { ++ LM_ERR("pcre2 general context creation failed\n"); ++ return -1; ++ } ++ if((dpl_ctx = pcre2_compile_context_create(dpl_gctx)) == NULL) { ++ LM_ERR("pcre2 compile context creation failed\n"); ++ return -1; ++ } ++ + dp_rules_hash = (dpl_id_p *)shm_malloc(2*sizeof(dpl_id_p)); + if(!dp_rules_hash) { + LM_ERR("out of shm memory\n"); +@@ -224,6 +244,14 @@ int init_data(void) + + void destroy_data(void) + { ++ if(dpl_ctx) { ++ pcre2_compile_context_free(dpl_ctx); ++ } ++ ++ if(dpl_gctx) { ++ pcre2_general_context_free(dpl_gctx); ++ } ++ + if(dp_rules_hash){ + destroy_hash(0); + destroy_hash(1); +@@ -368,55 +396,50 @@ int dpl_str_to_shm(str src, str *dest, int mterm) + + + /* Compile pcre pattern +- * if mtype==0 - return pointer to shm copy of result +- * if mtype==1 - return pcre pointer that has to be pcre_free() */ +-pcre *reg_ex_comp(const char *pattern, int *cap_cnt, int mtype) ++ * if mtype==0 - return pointer using shm ++ * if mtype==1 - return pcre2_code pointer that has to be pcre2_code_free() */ ++pcre2_code *reg_ex_comp(const char *pattern, int *cap_cnt, int mtype) + { +- pcre *re, *result; +- const char *error; +- int rc, err_offset; +- size_t size; +- +- re = pcre_compile(pattern, 0, &error, &err_offset, NULL); ++ pcre2_code *re; ++ int pcre_error_num = 0; ++ char pcre_error[128]; ++ size_t pcre_erroffset; ++ int rc; ++ ++ re = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, 0, ++ &pcre_error_num, &pcre_erroffset, mtype == 0 ? dpl_ctx : NULL); + if (re == NULL) { +- LM_ERR("PCRE compilation of '%s' failed at offset %d: %s\n", +- pattern, err_offset, error); +- return (pcre *)0; +- } +- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size); +- if (rc != 0) { +- pcre_free(re); +- LM_ERR("pcre_fullinfo on compiled pattern '%s' yielded error: %d\n", +- pattern, rc); +- return (pcre *)0; ++ switch(pcre2_get_error_message( ++ pcre_error_num, (PCRE2_UCHAR *)pcre_error, 128)) { ++ case PCRE2_ERROR_NOMEMORY: ++ snprintf(pcre_error, 128, ++ "unknown error[%d]: pcre2 error buffer too small", ++ pcre_error_num); ++ break; ++ case PCRE2_ERROR_BADDATA: ++ snprintf(pcre_error, 128, "unknown pcre2 error[%d]", ++ pcre_error_num); ++ break; ++ } ++ LM_ERR("PCRE compilation of '%s' failed at offset %zu: %s\n", pattern, ++ pcre_erroffset, pcre_error); ++ return NULL; + } +- rc = pcre_fullinfo(re, NULL, PCRE_INFO_CAPTURECOUNT, cap_cnt); ++ rc = pcre2_pattern_info(re, PCRE2_INFO_CAPTURECOUNT, cap_cnt); + if (rc != 0) { +- pcre_free(re); ++ pcre2_code_free(re); + LM_ERR("pcre_fullinfo on compiled pattern '%s' yielded error: %d\n", + pattern, rc); +- return (pcre *)0; +- } +- if(mtype==0) { +- result = (pcre *)shm_malloc(size); +- if (result == NULL) { +- pcre_free(re); +- LM_ERR("not enough shared memory for compiled PCRE pattern\n"); +- return (pcre *)0; +- } +- memcpy(result, re, size); +- pcre_free(re); +- return result; +- } else { +- return re; ++ return NULL; + } ++ return re; + } + + + /*compile the expressions, and if ok, build the rule */ + dpl_node_t * build_rule(db_val_t * values) + { +- pcre *match_comp, *subst_comp; ++ pcre2_code *match_comp, *subst_comp; + struct subst_expr *repl_comp; + dpl_node_t * new_rule; + str match_exp, subst_exp, repl_exp, attrs; +@@ -537,8 +560,8 @@ dpl_node_t * build_rule(db_val_t * values) + return new_rule; + + err: +- if(match_comp) shm_free(match_comp); +- if(subst_comp) shm_free(subst_comp); ++ if(match_comp) pcre2_code_free(match_comp); ++ if(subst_comp) pcre2_code_free(subst_comp); + if(repl_comp) repl_expr_free(repl_comp); + if(new_rule) destroy_rule(new_rule); + return NULL; +@@ -682,10 +705,10 @@ void destroy_rule(dpl_node_t * rule){ + rule->pr); + + if(rule->match_comp) +- shm_free(rule->match_comp); ++ pcre2_code_free(rule->match_comp); + + if(rule->subst_comp) +- shm_free(rule->subst_comp); ++ pcre2_code_free(rule->subst_comp); + + /*destroy repl_exp*/ + if(rule->repl_comp) +diff --git a/src/modules/dialplan/dp_repl.c b/src/modules/dialplan/dp_repl.c +index 05949c8..92565f5 100644 +--- a/src/modules/dialplan/dp_repl.c ++++ b/src/modules/dialplan/dp_repl.c +@@ -15,8 +15,8 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + * + */ +@@ -38,7 +38,7 @@ + + typedef struct dpl_dyn_pcre + { +- pcre *re; ++ pcre2_code *re; + int cnt; + str expr; + +@@ -175,9 +175,9 @@ int dpl_detect_avp_indx(const pv_elem_p elem, pv_elem_p *avp) + return 0; + } + +-pcre *dpl_dyn_pcre_comp(sip_msg_t *msg, str *expr, str *vexpr, int *cap_cnt) ++pcre2_code *dpl_dyn_pcre_comp(sip_msg_t *msg, str *expr, str *vexpr, int *cap_cnt) + { +- pcre *re = NULL; ++ pcre2_code *re = NULL; + int ccnt = 0; + + if(expr==NULL || expr->s==NULL || expr->len<=0 || +@@ -214,7 +214,7 @@ dpl_dyn_pcre_p dpl_dynamic_pcre_list(sip_msg_t *msg, str *expr) + dpl_dyn_pcre_p rt = NULL; + struct str_list *l = NULL; + struct str_list *t = NULL; +- pcre *re = NULL; ++ pcre2_code *re = NULL; + int cnt = 0; + str vexpr = STR_NULL; + +@@ -285,7 +285,7 @@ dpl_dyn_pcre_p dpl_dynamic_pcre_list(sip_msg_t *msg, str *expr) + error: + while(re_list) { + rt = re_list->next; +- if(re_list->re) pcre_free(re_list->re); ++ if(re_list->re) pcre2_code_free(re_list->re); + pkg_free(re_list); + re_list = rt; + } +@@ -387,15 +387,16 @@ error: + #define MAX_PHONE_NB_DIGITS 127 + static char dp_output_buf[MAX_PHONE_NB_DIGITS+1]; + int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, +- pcre *subst_comp, str *result) ++ pcre2_code *subst_comp, str *result) + { + int repl_nb, offset, match_nb, rc, cap_cnt; + struct replace_with token; + struct subst_expr * repl_comp; ++ pcre2_match_data *pcre_md = NULL; + str match; + pv_value_t sv; + str* uri; +- int ovector[3 * (MAX_REPLACE_WITH + 1)]; ++ PCRE2_SIZE *ovector = NULL; + char *p; + int size; + +@@ -411,8 +412,7 @@ int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, + + if(subst_comp){ + /*just in case something went wrong at load time*/ +- rc = pcre_fullinfo(subst_comp, NULL, PCRE_INFO_CAPTURECOUNT, +- &cap_cnt); ++ rc = pcre2_pattern_info(subst_comp, PCRE2_INFO_CAPTURECOUNT, &cap_cnt); + if (rc != 0) { + LM_ERR("pcre_fullinfo on compiled pattern yielded error: %d\n", + rc); +@@ -430,15 +430,19 @@ int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, + } + + /*search for the pattern from the compiled subst_exp*/ +- if (pcre_exec(subst_comp, NULL, instr->s, instr->len, +- 0, 0, ovector, 3 * (MAX_REPLACE_WITH + 1)) <= 0) { ++ pcre_md = pcre2_match_data_create_from_pattern(subst_comp, NULL); ++ if(pcre2_match(subst_comp, (PCRE2_SPTR)instr->s, (PCRE2_SIZE)instr->len, ++ 0, 0, pcre_md, NULL) <= 0) { + LM_DBG("the string %.*s matched " + "the match_exp %.*s but not the subst_exp %.*s!\n", + instr->len, instr->s, + rule->match_exp.len, rule->match_exp.s, + rule->subst_exp.len, rule->subst_exp.s); ++ if(pcre_md) ++ pcre2_match_data_free(pcre_md); + return -1; + } ++ ovector = pcre2_get_ovector_pointer(pcre_md); + } + + /*simply copy from the replacing string*/ +@@ -562,11 +566,15 @@ int rule_translate(sip_msg_t *msg, str *instr, dpl_node_t *rule, + } + + result->s[result->len] = '\0'; ++ if(pcre_md) ++ pcre2_match_data_free(pcre_md); + return 0; + + error: + result->s = 0; + result->len = 0; ++ if(pcre_md) ++ pcre2_match_data_free(pcre_md); + return -1; + } + +@@ -575,6 +583,7 @@ static char dp_attrs_buf[DP_MAX_ATTRS_LEN+1]; + int dp_translate_helper(sip_msg_t *msg, str *input, str *output, dpl_id_p idp, + str *attrs) + { ++ pcre2_match_data *pcre_md = NULL; + dpl_node_p rulep; + dpl_index_p indexp; + int user_len, rez; +@@ -615,21 +624,28 @@ search_rule: + rez = -1; + do { + if(rez<0) { +- rez = pcre_exec(re_list->re, NULL, input->s, input->len, +- 0, 0, NULL, 0); ++ pcre_md = pcre2_match_data_create_from_pattern( ++ re_list->re, NULL); ++ rez = pcre2_match(re_list->re, (PCRE2_SPTR)input->s, ++ (PCRE2_SIZE)input->len, 0, 0, pcre_md, ++ NULL); + LM_DBG("match check: [%.*s] %d\n", + re_list->expr.len, re_list->expr.s, rez); + } + else LM_DBG("match check skipped: [%.*s] %d\n", + re_list->expr.len, re_list->expr.s, rez); + rt = re_list->next; +- pcre_free(re_list->re); ++ pcre2_match_data_free(pcre_md); ++ pcre2_code_free(re_list->re); + pkg_free(re_list); + re_list = rt; + } while(re_list); + } else { +- rez = pcre_exec(rulep->match_comp, NULL, input->s, input->len, +- 0, 0, NULL, 0); ++ pcre_md = pcre2_match_data_create_from_pattern( ++ rulep->match_comp, NULL); ++ rez = pcre2_match(rulep->match_comp, (PCRE2_SPTR)input->s, ++ (PCRE2_SIZE)input->len, 0, 0, pcre_md, 0); ++ pcre2_match_data_free(pcre_md); + } + break; + +@@ -720,7 +736,7 @@ repl: + else LM_DBG("subst check skipped: [%.*s] %d\n", + re_list->expr.len, re_list->expr.s, rez); + rt = re_list->next; +- pcre_free(re_list->re); ++ pcre2_code_free(re_list->re); + pkg_free(re_list); + re_list = rt; + } while(re_list); diff --git a/patches/upstream/lcr-pcre2-migration.patch b/patches/upstream/lcr-pcre2-migration.patch new file mode 100644 index 00000000..a806b0c0 --- /dev/null +++ b/patches/upstream/lcr-pcre2-migration.patch @@ -0,0 +1,452 @@ +From: Victor Seva +Date: Mon, 21 Aug 2023 13:30:36 +0200 +Subject: lcr: pcre2 migration + +--- + src/modules/lcr/Makefile | 11 +-- + src/modules/lcr/hash.c | 20 +++--- + src/modules/lcr/hash.h | 8 +-- + src/modules/lcr/lcr_mod.c | 175 +++++++++++++++++++++++++++++++--------------- + src/modules/lcr/lcr_mod.h | 8 ++- + 5 files changed, 142 insertions(+), 80 deletions(-) + +diff --git a/src/modules/lcr/Makefile b/src/modules/lcr/Makefile +index 56be2e3..ad82bf6 100644 +--- a/src/modules/lcr/Makefile ++++ b/src/modules/lcr/Makefile +@@ -9,20 +9,15 @@ auto_gen= + NAME=lcr.so + + ifeq ($(CROSS_COMPILE),) +-PCRE_BUILDER = $(shell \ +- if pkg-config --exists libcre; then \ +- echo 'pkg-config libpcre'; \ +- else \ +- which pcre-config; \ +- fi) ++PCRE_BUILDER = $(shell command -v pcre2-config) + endif + + ifeq ($(PCRE_BUILDER),) + PCREDEFS=-I$(LOCALBASE)/include +- PCRELIBS=-L$(LOCALBASE)/lib -lpcre ++ PCRELIBS=-L$(LOCALBASE)/lib -lpcre2-8 + else + PCREDEFS = $(shell $(PCRE_BUILDER) --cflags) +- PCRELIBS = $(shell $(PCRE_BUILDER) --libs) ++ PCRELIBS = $(shell $(PCRE_BUILDER) --libs8) + endif + + DEFS+=$(PCREDEFS) +diff --git a/src/modules/lcr/hash.c b/src/modules/lcr/hash.c +index d49fb66..1546f1d 100644 +--- a/src/modules/lcr/hash.c ++++ b/src/modules/lcr/hash.c +@@ -15,8 +15,8 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@@ -36,9 +36,9 @@ + /* Add lcr entry into hash table */ + int rule_hash_table_insert(struct rule_info **hash_table, unsigned int lcr_id, + unsigned int rule_id, unsigned short prefix_len, char *prefix, +- unsigned short from_uri_len, char *from_uri, pcre *from_uri_re, ++ unsigned short from_uri_len, char *from_uri, pcre2_code *from_uri_re, + unsigned short mt_tvalue_len, char *mt_tvalue, +- unsigned short request_uri_len, char *request_uri, pcre *request_uri_re, ++ unsigned short request_uri_len, char *request_uri, pcre2_code *request_uri_re, + unsigned short stopper) + { + struct rule_info *rule; +@@ -50,9 +50,9 @@ int rule_hash_table_insert(struct rule_info **hash_table, unsigned int lcr_id, + if(rule == NULL) { + SHM_MEM_ERROR_FMT("for rule hash table entry\n"); + if(from_uri_re) +- shm_free(from_uri_re); ++ pcre2_code_free(from_uri_re); + if(request_uri_re) +- shm_free(request_uri_re); ++ pcre2_code_free(request_uri_re); + return 0; + } + memset(rule, 0, sizeof(struct rule_info)); +@@ -99,9 +99,9 @@ int rule_hash_table_insert(struct rule_info **hash_table, unsigned int lcr_id, + if(rid == NULL) { + PKG_MEM_ERROR_FMT("for rule_id hash table entry\n"); + if(from_uri_re) +- shm_free(from_uri_re); ++ pcre2_code_free(from_uri_re); + if(request_uri_re) +- shm_free(request_uri_re); ++ pcre2_code_free(request_uri_re); + shm_free(rule); + return 0; + } +@@ -209,10 +209,10 @@ void rule_hash_table_contents_free(struct rule_info **hash_table) + r = hash_table[i]; + while(r) { + if(r->from_uri_re) { +- shm_free(r->from_uri_re); ++ pcre2_code_free(r->from_uri_re); + } + if(r->request_uri_re) +- shm_free(r->request_uri_re); ++ pcre2_code_free(r->request_uri_re); + t = r->targets; + while(t) { + next_t = t->next; +diff --git a/src/modules/lcr/hash.h b/src/modules/lcr/hash.h +index 2ed741e..62a8448 100644 +--- a/src/modules/lcr/hash.h ++++ b/src/modules/lcr/hash.h +@@ -15,8 +15,8 @@ + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the + * GNU General Public License for more details. + * +- * You should have received a copy of the GNU General Public License +- * along with this program; if not, write to the Free Software ++ * You should have received a copy of the GNU General Public License ++ * along with this program; if not, write to the Free Software + * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA + */ + +@@ -34,9 +34,9 @@ + + int rule_hash_table_insert(struct rule_info **hash_table, unsigned int lcr_id, + unsigned int rule_id, unsigned short prefix_len, char *prefix, +- unsigned short from_uri_len, char *from_uri, pcre *from_uri_re, ++ unsigned short from_uri_len, char *from_uri, pcre2_code *from_uri_re, + unsigned short mt_tvalue_len, char *mt_tvalue, +- unsigned short request_uri_len, char *request_uri, pcre *request_uri_re, ++ unsigned short request_uri_len, char *request_uri, pcre2_code *request_uri_re, + unsigned short stopper); + + int rule_hash_table_insert_target(struct rule_info **hash_table, +diff --git a/src/modules/lcr/lcr_mod.c b/src/modules/lcr/lcr_mod.c +index be945fb..c28f318 100644 +--- a/src/modules/lcr/lcr_mod.c ++++ b/src/modules/lcr/lcr_mod.c +@@ -43,7 +43,8 @@ + #include + #include + #include +-#include ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + #include "../../core/locking.h" + #include "../../core/sr_module.h" + #include "../../core/dprint.h" +@@ -204,6 +205,9 @@ static unsigned int priority_ordering_param = 0; + /* mtree tree name */ + str mtree_param = {"lcr", 3}; + ++static pcre2_general_context *lcr_gctx = NULL; ++static pcre2_compile_context *lcr_ctx = NULL; ++ + /* + * Other module types and variables + */ +@@ -376,6 +380,17 @@ struct module_exports exports = { + }; + /* clang-format on */ + ++static void *pcre2_malloc(size_t size, void *ext) ++{ ++ return shm_malloc(size); ++} ++ ++static void pcre2_free(void *ptr, void *ext) ++{ ++ shm_free(ptr); ++ ptr = NULL; ++} ++ + static int lcr_db_init(const str *db_url) + { + if(lcr_dbf.init == 0) { +@@ -698,7 +713,15 @@ static int mod_init(void) + lcr_db_close(); + + /* rule shared memory */ +- ++ if((lcr_gctx = pcre2_general_context_create(pcre2_malloc, pcre2_free, NULL)) ++ == NULL) { ++ LM_ERR("pcre2 general context creation failed\n"); ++ goto err; ++ } ++ if((lcr_ctx = pcre2_compile_context_create(lcr_gctx)) == NULL) { ++ LM_ERR("pcre2 compile context creation failed\n"); ++ goto err; ++ } + /* rule hash table pointer table */ + /* pointer at index 0 points to temp rule hash table */ + rule_pt = (struct rule_info ***)shm_malloc( +@@ -774,6 +797,12 @@ dberror: + lcr_db_close(); + + err: ++ if(lcr_ctx) { ++ pcre2_compile_context_free(lcr_ctx); ++ } ++ if(lcr_gctx) { ++ pcre2_general_context_free(lcr_gctx); ++ } + free_shared_memory(); + return -1; + } +@@ -789,7 +818,12 @@ static int child_init(int rank) + static void destroy(void) + { + lcr_db_close(); +- ++ if(lcr_ctx) { ++ pcre2_compile_context_free(lcr_ctx); ++ } ++ if(lcr_gctx) { ++ pcre2_general_context_free(lcr_gctx); ++ } + free_shared_memory(); + } + +@@ -870,33 +904,32 @@ static int comp_matched(const void *m1, const void *m2) + + + /* Compile pattern into shared memory and return pointer to it. */ +-static pcre *reg_ex_comp(const char *pattern) ++static pcre2_code *reg_ex_comp(const char *pattern) + { +- pcre *re, *result; +- const char *error; +- int rc, err_offset; +- size_t size; +- +- re = pcre_compile(pattern, 0, &error, &err_offset, NULL); +- if(re == NULL) { +- LM_ERR("pcre compilation of '%s' failed at offset %d: %s\n", pattern, +- err_offset, error); +- return (pcre *)0; +- } +- rc = pcre_fullinfo(re, NULL, PCRE_INFO_SIZE, &size); +- if(rc != 0) { +- LM_ERR("pcre_fullinfo on compiled pattern '%s' yielded error: %d\n", +- pattern, rc); +- return (pcre *)0; +- } +- result = (pcre *)shm_malloc(size); ++ pcre2_code *result; ++ int pcre_error_num = 0; ++ char pcre_error[128]; ++ size_t pcre_erroffset; ++ ++ result = pcre2_compile((PCRE2_SPTR)pattern, PCRE2_ZERO_TERMINATED, 0, ++ &pcre_error_num, &pcre_erroffset, lcr_ctx); + if(result == NULL) { +- pcre_free(re); +- SHM_MEM_ERROR_FMT("for compiled PCRE pattern\n"); +- return (pcre *)0; ++ switch(pcre2_get_error_message( ++ pcre_error_num, (PCRE2_UCHAR *)pcre_error, 128)) { ++ case PCRE2_ERROR_NOMEMORY: ++ snprintf(pcre_error, 128, ++ "unknown error[%d]: pcre2 error buffer too small", ++ pcre_error_num); ++ break; ++ case PCRE2_ERROR_BADDATA: ++ snprintf(pcre_error, 128, "unknown pcre2 error[%d]", ++ pcre_error_num); ++ break; ++ } ++ LM_ERR("pcre compilation of '%s' failed at offset %zu: %s\n", pattern, ++ pcre_erroffset, pcre_error); ++ return NULL; + } +- memcpy(result, re, size); +- pcre_free(re); + return result; + } + +@@ -1405,7 +1438,7 @@ int reload_tables() + db_key_t gw_cols[13]; + db_key_t rule_cols[7]; + db_key_t target_cols[4]; +- pcre *from_uri_re, *request_uri_re; ++ pcre2_code *from_uri_re, *request_uri_re; + struct gw_info *gws, *gw_pt_tmp; + struct rule_info **rules, **rule_pt_tmp; + +@@ -2122,11 +2155,12 @@ void add_gws_into_avps(struct gw_info *gws, struct matched_gw_info *matched_gws, + int load_gws_dummy(int lcr_id, str *ruri_user, str *from_uri, str *request_uri, + unsigned int *gw_indexes) + { +- int i, j; ++ int i, j, rc; + unsigned int gw_index, now, dex; + struct rule_info **rules, *rule, *pl; + struct gw_info *gws; + struct target *t; ++ pcre2_match_data *pcre_md = NULL; + struct matched_gw_info matched_gws[MAX_NO_OF_GWS + 1]; + struct sip_uri furi; + struct usr_avp *avp; +@@ -2171,11 +2205,18 @@ int load_gws_dummy(int lcr_id, str *ruri_user, str *from_uri, str *request_uri, + || strncmp(rule->prefix, ruri_user->s, pl->prefix_len)) + goto next; + +- if((rule->from_uri_len != 0) +- && (pcre_exec(rule->from_uri_re, NULL, from_uri->s, +- from_uri->len, 0, 0, NULL, 0) +- < 0)) +- goto next; ++ if(rule->from_uri_len != 0) { ++ pcre_md = pcre2_match_data_create_from_pattern( ++ rule->from_uri_re, NULL); ++ rc = pcre2_match(rule->from_uri_re, (PCRE2_SPTR)from_uri->s, ++ (PCRE2_SIZE)from_uri->len, 0, 0, pcre_md, NULL); ++ if(pcre_md) { ++ pcre2_match_data_free(pcre_md); ++ pcre_md = NULL; ++ } ++ if(rc < 0) ++ goto next; ++ } + + if((from_uri->len > 0) && (rule->mt_tvalue_len > 0)) { + if(mtree_api.mt_match(&msg, &mtree_param, &(furi.user), 2) +@@ -2209,9 +2250,16 @@ int load_gws_dummy(int lcr_id, str *ruri_user, str *from_uri, str *request_uri, + "param has not been given.\n"); + return -1; + } +- if(pcre_exec(rule->request_uri_re, NULL, request_uri->s, +- request_uri->len, 0, 0, NULL, 0) +- < 0) ++ pcre_md = pcre2_match_data_create_from_pattern( ++ rule->request_uri_re, NULL); ++ rc = pcre2_match(rule->request_uri_re, ++ (PCRE2_SPTR)request_uri->s, ++ (PCRE2_SIZE)request_uri->len, 0, 0, pcre_md, NULL); ++ if(pcre_md) { ++ pcre2_match_data_free(pcre_md); ++ pcre_md = NULL; ++ } ++ if(rc < 0) + goto next; + } + +@@ -2275,9 +2323,10 @@ static int ki_load_gws_furi( + sip_msg_t *_m, int lcr_id, str *ruri_user, str *from_uri) + { + str *request_uri; +- int i, j; ++ int i, j, rc; + unsigned int gw_index, now, dex; + int_str val; ++ pcre2_match_data *pcre_md = NULL; + struct matched_gw_info matched_gws[MAX_NO_OF_GWS + 1]; + struct rule_info **rules, *rule, *pl; + struct gw_info *gws; +@@ -2336,14 +2385,22 @@ static int ki_load_gws_furi( + goto next; + + /* Match from uri */ +- if((rule->from_uri_len != 0) +- && (pcre_exec(rule->from_uri_re, NULL, from_uri->s, +- from_uri->len, 0, 0, NULL, 0) +- < 0)) { +- LM_DBG("from uri <%.*s> did not match to from regex <%.*s>\n", +- from_uri->len, from_uri->s, rule->from_uri_len, +- rule->from_uri); +- goto next; ++ if(rule->from_uri_len != 0) { ++ pcre_md = pcre2_match_data_create_from_pattern( ++ rule->from_uri_re, NULL); ++ rc = pcre2_match(rule->from_uri_re, (PCRE2_SPTR)from_uri->s, ++ (PCRE2_SIZE)from_uri->len, 0, 0, pcre_md, NULL); ++ if(pcre_md) { ++ pcre2_match_data_free(pcre_md); ++ pcre_md = NULL; ++ } ++ if(rc < 0) { ++ LM_DBG("from uri <%.*s> did not match to from regex " ++ "<%.*s>\n", ++ from_uri->len, from_uri->s, rule->from_uri_len, ++ rule->from_uri); ++ goto next; ++ } + } + + /* Match from uri user */ +@@ -2372,15 +2429,23 @@ static int ki_load_gws_furi( + } + + /* Match request uri */ +- if((rule->request_uri_len != 0) +- && (pcre_exec(rule->request_uri_re, NULL, request_uri->s, +- request_uri->len, 0, 0, NULL, 0) +- < 0)) { +- LM_DBG("request uri <%.*s> did not match to request regex " +- "<%.*s>\n", +- request_uri->len, request_uri->s, rule->request_uri_len, +- rule->request_uri); +- goto next; ++ if(rule->request_uri_len != 0) { ++ pcre_md = pcre2_match_data_create_from_pattern( ++ rule->request_uri_re, NULL); ++ rc = pcre2_match(rule->request_uri_re, ++ (PCRE2_SPTR)request_uri->s, ++ (PCRE2_SIZE)request_uri->len, 0, 0, pcre_md, NULL); ++ if(pcre_md) { ++ pcre2_match_data_free(pcre_md); ++ pcre_md = NULL; ++ } ++ if(rc < 0) { ++ LM_DBG("request uri <%.*s> did not match to request regex " ++ "<%.*s>\n", ++ request_uri->len, request_uri->s, ++ rule->request_uri_len, rule->request_uri); ++ goto next; ++ } + } + + /* Load gws associated with this rule */ +diff --git a/src/modules/lcr/lcr_mod.h b/src/modules/lcr/lcr_mod.h +index 421fe68..0255241 100644 +--- a/src/modules/lcr/lcr_mod.h ++++ b/src/modules/lcr/lcr_mod.h +@@ -2,6 +2,7 @@ + * Various lcr related constant, types, and external variables + * + * Copyright (C) 2005-2014 Juha Heinanen ++ * Copyright (C) 2023 Victor Seva + * + * This file is part of Kamailio, a free SIP server. + * +@@ -33,7 +34,8 @@ + #define LCR_MOD_H + + #include +-#include ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + #include "../../core/locking.h" + #include "../../core/parser/parse_uri.h" + #include "../../core/ip_addr.h" +@@ -60,10 +62,10 @@ struct rule_info + unsigned short from_uri_len; + char mt_tvalue[MAX_MT_TVALUE_LEN + 1]; + unsigned short mt_tvalue_len; +- pcre *from_uri_re; ++ pcre2_code *from_uri_re; + char request_uri[MAX_URI_LEN + 1]; + unsigned short request_uri_len; +- pcre *request_uri_re; ++ pcre2_code *request_uri_re; + unsigned short stopper; + unsigned int enabled; + struct target *targets; diff --git a/patches/upstream/regex-migration-to-pcre2.patch b/patches/upstream/regex-migration-to-pcre2.patch new file mode 100644 index 00000000..c299776c --- /dev/null +++ b/patches/upstream/regex-migration-to-pcre2.patch @@ -0,0 +1,427 @@ +From: Victor Seva +Date: Wed, 9 Aug 2023 10:48:41 +0000 +Subject: regex: migration to pcre2 + +--- + src/modules/regex/Makefile | 11 +- + src/modules/regex/regex_mod.c | 236 +++++++++++++++++++++++++++--------------- + 2 files changed, 155 insertions(+), 92 deletions(-) + +diff --git a/src/modules/regex/Makefile b/src/modules/regex/Makefile +index 3b8758a..db036b6 100644 +--- a/src/modules/regex/Makefile ++++ b/src/modules/regex/Makefile +@@ -5,20 +5,15 @@ auto_gen= + NAME=regex.so + + ifeq ($(CROSS_COMPILE),) +-PCRE_BUILDER = $(shell \ +- if pkg-config --exists libcre; then \ +- echo 'pkg-config libpcre'; \ +- else \ +- which pcre-config; \ +- fi) ++PCRE_BUILDER = $(shell command -v pcre2-config) + endif + + ifeq ($(PCRE_BUILDER),) + PCREDEFS=-I$(LOCALBASE)/include +- PCRELIBS=-L$(LOCALBASE)/lib -lpcre ++ PCRELIBS=-L$(LOCALBASE)/lib -lpcre2-8 + else + PCREDEFS = $(shell $(PCRE_BUILDER) --cflags) +- PCRELIBS = $(shell $(PCRE_BUILDER) --libs) ++ PCRELIBS = $(shell $(PCRE_BUILDER) --libs8) + endif + + DEFS+=$(PCREDEFS) +diff --git a/src/modules/regex/regex_mod.c b/src/modules/regex/regex_mod.c +index 2bc5210..c633a13 100644 +--- a/src/modules/regex/regex_mod.c ++++ b/src/modules/regex/regex_mod.c +@@ -2,6 +2,7 @@ + * regex module - pcre operations + * + * Copyright (C) 2008 Iñaki Baz Castillo ++ * Copyright (C) 2023 Victor Seva + * + * This file is part of Kamailio, a free SIP server. + * +@@ -32,7 +33,8 @@ + #include + #include + #include +-#include ++#define PCRE2_CODE_UNIT_WIDTH 8 ++#include + #include "../../core/sr_module.h" + #include "../../core/dprint.h" + #include "../../core/pt.h" +@@ -77,8 +79,11 @@ static int pcre_extended = 0; + /* + * Module internal parameter variables + */ +-static pcre **pcres; +-static pcre ***pcres_addr; ++static pcre2_general_context *pcres_gctx = NULL; ++static pcre2_match_context *pcres_mctx = NULL; ++static pcre2_compile_context *pcres_ctx = NULL; ++static pcre2_code **pcres; ++static pcre2_code ***pcres_addr; + static int *num_pcres; + static int pcre_options = 0x00000000; + +@@ -150,7 +155,16 @@ struct module_exports exports = { + destroy /*!< destroy function */ + }; + ++static void *pcre2_malloc(size_t size, void *ext) ++{ ++ return shm_malloc(size); ++} + ++static void pcre2_free(void *ptr, void *ext) ++{ ++ shm_free(ptr); ++ ptr = NULL; ++} + + /*! \brief + * Init module function +@@ -182,24 +196,39 @@ static int mod_init(void) + /* PCRE options */ + if (pcre_caseless != 0) { + LM_DBG("PCRE CASELESS enabled\n"); +- pcre_options = pcre_options | PCRE_CASELESS; ++ pcre_options = pcre_options | PCRE2_CASELESS; + } + if (pcre_multiline != 0) { + LM_DBG("PCRE MULTILINE enabled\n"); +- pcre_options = pcre_options | PCRE_MULTILINE; ++ pcre_options = pcre_options | PCRE2_MULTILINE; + } + if (pcre_dotall != 0) { + LM_DBG("PCRE DOTALL enabled\n"); +- pcre_options = pcre_options | PCRE_DOTALL; ++ pcre_options = pcre_options | PCRE2_DOTALL; + } + if (pcre_extended != 0) { + LM_DBG("PCRE EXTENDED enabled\n"); +- pcre_options = pcre_options | PCRE_EXTENDED; ++ pcre_options = pcre_options | PCRE2_EXTENDED; + } + LM_DBG("PCRE options: %i\n", pcre_options); + ++ if((pcres_gctx = pcre2_general_context_create( ++ pcre2_malloc, pcre2_free, NULL)) ++ == NULL) { ++ LM_ERR("pcre2 general context creation failed\n"); ++ return -1; ++ } ++ if((pcres_ctx = pcre2_compile_context_create(pcres_gctx)) == NULL) { ++ LM_ERR("pcre2 compile context creation failed\n"); ++ return -1; ++ } ++ if((pcres_mctx = pcre2_match_context_create(pcres_gctx)) == NULL) { ++ LM_ERR("pcre2 match context creation failed\n"); ++ return -1; ++ } ++ + /* Pointer to pcres */ +- if ((pcres_addr = shm_malloc(sizeof(pcre **))) == 0) { ++ if ((pcres_addr = shm_malloc(sizeof(pcre2_code **))) == 0) { + LM_ERR("no memory for pcres_addr\n"); + goto err; + } +@@ -222,6 +251,18 @@ static int mod_init(void) + + err: + free_shared_memory(); ++ ++ if(pcres_ctx) { ++ pcre2_compile_context_free(pcres_ctx); ++ } ++ ++ if(pcres_mctx) { ++ pcre2_match_context_free(pcres_mctx); ++ } ++ ++ if(pcres_gctx) { ++ pcre2_general_context_free(pcres_gctx); ++ } + return -1; + } + +@@ -239,13 +280,11 @@ static int load_pcres(int action) + FILE *f; + char line[FILE_MAX_LINE]; + char **patterns = NULL; +- pcre *pcre_tmp = NULL; +- size_t pcre_size; +- int pcre_rc; +- const char *pcre_error; +- int pcre_erroffset; ++ int pcre_error_num = 0; ++ char pcre_error[128]; ++ size_t pcre_erroffset; + int num_pcres_tmp = 0; +- pcre **pcres_tmp = NULL; ++ pcre2_code **pcres_tmp = NULL; + int llen; + + /* Get the lock */ +@@ -380,38 +419,35 @@ static int load_pcres(int action) + } + + /* Temporal pointer of pcres */ +- if ((pcres_tmp = pkg_malloc(sizeof(pcre *) * num_pcres_tmp)) == 0) { ++ if ((pcres_tmp = pkg_malloc(sizeof(pcre2_code *) * num_pcres_tmp)) == 0) { + LM_ERR("no more memory for pcres_tmp\n"); + goto err; + } +- for (i=0; is, pcre_options, &pcre_error, &pcre_erroffset, NULL); ++ pcre_re = pcre2_compile((PCRE2_SPTR)regex->s, PCRE2_ZERO_TERMINATED, ++ pcre_options, &pcre_error_num, &pcre_erroffset, pcres_ctx); + if (pcre_re == NULL) { +- LM_ERR("pcre_re compilation of '%s' failed at offset %d: %s\n", ++ switch(pcre2_get_error_message( ++ pcre_error_num, (PCRE2_UCHAR *)pcre_error, 128)) { ++ case PCRE2_ERROR_NOMEMORY: ++ snprintf(pcre_error, 128, ++ "unknown error[%d]: pcre2 error buffer too small", ++ pcre_error_num); ++ break; ++ case PCRE2_ERROR_BADDATA: ++ snprintf(pcre_error, 128, "unknown pcre2 error[%d]", ++ pcre_error_num); ++ break; ++ } ++ LM_ERR("pcre_re compilation of '%s' failed at offset %zu: %s\n", + regex->s, pcre_erroffset, pcre_error); + return -4; + } + +- pcre_rc = pcre_exec( +- pcre_re, /* the compiled pattern */ +- NULL, /* no extra data - we didn't study the pattern */ +- string->s, /* the matching string */ +- (int)(string->len), /* the length of the subject */ +- 0, /* start at offset 0 in the string */ +- 0, /* default options */ +- NULL, /* output vector for substring information */ +- 0); /* number of elements in the output vector */ ++ pcre_md = pcre2_match_data_create_from_pattern(pcre_re, pcres_gctx); ++ pcre_rc = pcre2_match(pcre_re, /* the compiled pattern */ ++ (PCRE2_SPTR)string->s, /* the matching string */ ++ (PCRE2_SIZE)(string->len), /* the length of the subject */ ++ 0, /* start at offset 0 in the string */ ++ 0, /* default options */ ++ pcre_md, /* the match data block */ ++ pcres_mctx); /* a match context; NULL means use defaults */ + + /* Matching failed: handle error cases */ + if (pcre_rc < 0) { + switch(pcre_rc) { +- case PCRE_ERROR_NOMATCH: ++ case PCRE2_ERROR_NOMATCH: + LM_DBG("'%s' doesn't match '%s'\n", string->s, regex->s); + break; + default: +- LM_DBG("matching error '%d'\n", pcre_rc); ++ switch(pcre2_get_error_message( ++ pcre_rc, (PCRE2_UCHAR *)pcre_error, 128)) { ++ case PCRE2_ERROR_NOMEMORY: ++ snprintf(pcre_error, 128, ++ "unknown error[%d]: pcre2 error buffer too " ++ "small", ++ pcre_rc); ++ break; ++ case PCRE2_ERROR_BADDATA: ++ snprintf(pcre_error, 128, "unknown pcre2 error[%d]", ++ pcre_rc); ++ break; ++ } ++ LM_ERR("matching error:'%s' failed[%d]\n", pcre_error, pcre_rc); + break; + } +- pcre_free(pcre_re); ++ if(pcre_md) ++ pcre2_match_data_free(pcre_md); ++ pcre2_code_free(pcre_re); + return -1; + } +- pcre_free(pcre_re); ++ if(pcre_md) ++ pcre2_match_data_free(pcre_md); ++ pcre2_code_free(pcre_re); + LM_DBG("'%s' matches '%s'\n", string->s, regex->s); + return 1; + } +@@ -595,6 +646,8 @@ static int w_pcre_match(struct sip_msg* _msg, char* _s1, char* _s2) + static int ki_pcre_match_group(sip_msg_t* _msg, str* string, int num_pcre) + { + int pcre_rc; ++ pcre2_match_data *pcre_md = NULL; ++ char pcre_error[128]; + + /* Check if group matching feature is enabled */ + if (file == NULL) { +@@ -610,26 +663,41 @@ static int ki_pcre_match_group(sip_msg_t* _msg, str* string, int num_pcre) + + lock_get(reload_lock); + +- pcre_rc = pcre_exec( +- (*pcres_addr)[num_pcre], /* the compiled pattern */ +- NULL, /* no extra data - we didn't study the pattern */ +- string->s, /* the matching string */ +- (int)(string->len), /* the length of the subject */ +- 0, /* start at offset 0 in the string */ +- 0, /* default options */ +- NULL, /* output vector for substring information */ +- 0); /* number of elements in the output vector */ ++ pcre_md = pcre2_match_data_create_from_pattern( ++ (*pcres_addr)[num_pcre], pcres_gctx); ++ pcre_rc = pcre2_match((*pcres_addr)[num_pcre], /* the compiled pattern */ ++ (PCRE2_SPTR)string->s, /* the matching string */ ++ (PCRE2_SIZE)(string->len), /* the length of the subject */ ++ 0, /* start at offset 0 in the string */ ++ 0, /* default options */ ++ pcre_md, /* the match data block */ ++ pcres_mctx); /* a match context; NULL means use defaults */ + + lock_release(reload_lock); ++ if(pcre_md) ++ pcre2_match_data_free(pcre_md); + + /* Matching failed: handle error cases */ + if (pcre_rc < 0) { + switch(pcre_rc) { +- case PCRE_ERROR_NOMATCH: ++ case PCRE2_ERROR_NOMATCH: + LM_DBG("'%s' doesn't match pcres[%i]\n", string->s, num_pcre); + break; + default: +- LM_DBG("matching error '%d'\n", pcre_rc); ++ switch(pcre2_get_error_message( ++ pcre_rc, (PCRE2_UCHAR *)pcre_error, 128)) { ++ case PCRE2_ERROR_NOMEMORY: ++ snprintf(pcre_error, 128, ++ "unknown error[%d]: pcre2 error buffer too " ++ "small", ++ pcre_rc); ++ break; ++ case PCRE2_ERROR_BADDATA: ++ snprintf(pcre_error, 128, "unknown pcre2 error[%d]", ++ pcre_rc); ++ break; ++ } ++ LM_ERR("matching error:'%s' failed[%d]\n", pcre_error, pcre_rc); + break; + } + return -1; diff --git a/rules b/rules new file mode 100755 index 00000000..9f3d1d7d --- /dev/null +++ b/rules @@ -0,0 +1,234 @@ +#!/usr/bin/make -f + +# Uncomment this to turn on verbose mode. +#export DH_VERBOSE=1 + +export DEB_BUILD_MAINT_OPTIONS = hardening=+all +DPKG_EXPORT_BUILDFLAGS = 1 + +include /usr/share/dpkg/architecture.mk +include /usr/share/dpkg/buildflags.mk +include /usr/share/dpkg/pkg-info.mk + +# Enable parallel builds. +NUMJOBS = 1 +ifneq (,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + NUMJOBS = $(patsubst parallel=%,%,$(filter parallel=%,$(DEB_BUILD_OPTIONS))) + MAKEFLAGS += -j$(NUMJOBS) +endif + +# Modules not in the "main" kamailio package: +EXCLUDED_MODULES = + +# Extra modules to skip, because they are not compilable now: +# - regardless if they go to the main kamailio package or to some module +# package, they will be excluded from compile and install of all. +EXTRA_EXCLUDED_MODULES += bdb +EXTRA_EXCLUDED_MODULES += dbtext +EXTRA_EXCLUDED_MODULES += dnssec +EXTRA_EXCLUDED_MODULES += iptrtpproxy +EXTRA_EXCLUDED_MODULES += java +EXTRA_EXCLUDED_MODULES += mi_xmlrpc +EXTRA_EXCLUDED_MODULES += oracle +EXTRA_EXCLUDED_MODULES += pa +EXTRA_EXCLUDED_MODULES += purple + +# Module groups that are packaged in seperate packages (with the name +# kamailio-$(group_name)-modules). +# Note: the order is important (should be in dependency order, the one +# on which other depend first) +PACKAGE_GROUPS += mysql +PACKAGE_GROUPS += postgres +PACKAGE_GROUPS += berkeley +PACKAGE_GROUPS += unixodbc +PACKAGE_GROUPS += radius +PACKAGE_GROUPS += presence +PACKAGE_GROUPS += ldap +PACKAGE_GROUPS += xml +PACKAGE_GROUPS += perl +PACKAGE_GROUPS += utils +PACKAGE_GROUPS += lua +PACKAGE_GROUPS += memcached +PACKAGE_GROUPS += carrierroute +PACKAGE_GROUPS += snmpstats +PACKAGE_GROUPS += xmpp +PACKAGE_GROUPS += cpl +PACKAGE_GROUPS += redis +PACKAGE_GROUPS += geoip +PACKAGE_GROUPS += geoip2 +PACKAGE_GROUPS += sqlite +PACKAGE_GROUPS += ruby +PACKAGE_GROUPS += ims +PACKAGE_GROUPS += sctp +PACKAGE_GROUPS += tls +PACKAGE_GROUPS += outbound +PACKAGE_GROUPS += websocket +PACKAGE_GROUPS += autheph +PACKAGE_GROUPS += cnxcc +PACKAGE_GROUPS += erlang +PACKAGE_GROUPS += systemd +PACKAGE_GROUPS += phonenum +PACKAGE_GROUPS += mongodb +PACKAGE_GROUPS += rabbitmq +PACKAGE_GROUPS += python3 +PACKAGE_GROUPS += mqtt +PACKAGE_GROUPS += lwsc +PACKAGE_GROUPS += nats + +# Module groups to be packaged onto kamailio-extra-modules. +EXTRA_GROUPS += ev +EXTRA_GROUPS += gzcompress +EXTRA_GROUPS += jansson +EXTRA_GROUPS += uuid + +# Mono not on all arches +ifneq ("$(wildcard /usr/share/mono/mono-archs.make)","") +PACKAGE_GROUPS += mono +else +EXCLUDED_MODULES += mono +endif + +# libsecsipid not on all arches +ifneq ("$(wildcard /usr/share/doc/libsecsipid-dev/copyright)","") +PACKAGE_GROUPS += secsipid +else +EXCLUDED_MODULES += secsipid +endif + +# FTBFS on kfreebsd +LINUX_MODULES += json +LINUX_MODULES += kazoo +ifeq ($(DEB_HOST_ARCH_OS),linux) +PACKAGE_GROUPS += $(LINUX_MODULES) +else +EXCLUDED_MODULES += $(LINUX_MODULES) +endif + +# select radius lib +ifeq ($(shell [ -f /usr/include/radcli/radcli.h ] && echo 1 || echo 0),1) +export RADCLI = 1 +else +export FREERADIUS = 1 +endif + +# FTBFS on powerpcspe because of AltiVec assumption #729635. +ifeq ($(DEB_HOST_ARCH),powerpcspe) +export NOALTIVEC = 1 +endif + +D = $(CURDIR)/debian/$(DEB_SOURCE) + +# Name of libdir in the path for libraries (e.g., the multiarch triplet). +export LIBDIR ?= lib/$(DEB_HOST_MULTIARCH) + +# Directories with possible duplicate libraries (that should be deleted +# from current module* packages). +DUP_LIBS_DIRS = $(D)/usr/$(LIBDIR)/kamailio \ + $(D)-db-modules/usr/$(LIBDIR)/kamailio + +# CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS +CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS) +CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS) +CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS) +# LDFLAGS -> LD_EXTRA_OPTS +LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS) + +# https://wiki.debian.org/ReproducibleBuilds/ +CC_EXTRA_OPTS += -DVERSION_NODATE + +BUILD_MODULES := $(addprefix build_, $(PACKAGE_GROUPS) $(EXTRA_GROUPS)) +INSTALL_MODULES := $(addprefix install_, $(PACKAGE_GROUPS)) +INSTALL_EXTRA := $(addprefix install_, $(EXTRA_GROUPS)) + +.PHONY: $(BUILD_MODULES) $(INSTALL_MODULES) $(INSTALL_EXTRA) +test_build_all-stamp: configure-stamp + $(MAKE) all quiet=verbose + touch test_build_all-stamp + +$(BUILD_MODULES): test_build_all-stamp + $(MAKE) every-module group_include="k$(subst build_,,$@)" quiet=verbose + +test_install_all-stamp: test_build_all-stamp + $(MAKE) install quiet=verbose LIBDIR=$(LIBDIR) group_include="kstandard" + touch test_install_all-stamp + +$(INSTALL_MODULES): test_install_all-stamp + $(MAKE) install-modules-all \ + quiet=verbose \ + LIBDIR=$(LIBDIR) \ + BASEDIR=$(D)-$(subst install_,,$@)-modules \ + cfg_prefix=$(D)-$(subst install_,,$@)-modules \ + doc-dir=share/doc/$(DEB_SOURCE)-$(subst install_,,$@)-modules \ + group_include="k$(subst install_,,$@)" + # Eliminate duplicate libs. + for d in $(DUP_LIBS_DIRS); do \ + test "$$d" != "$(D)-$${module}-modules/usr/$(LIBDIR)/kamailio" && \ + for r in `find $$d -name 'lib*' | xargs`; do \ + echo "removing $(subst install_,,$@) lib `basename $$r` present also in $$d"; \ + rm -f $(D)-$(subst install_,,$@)-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + done ; \ + done + # clean empty dirs + find $(D)-$(subst install_,,$@)-modules -depth -empty -type d -exec rmdir {} \; + +$(INSTALL_EXTRA): test_install_all-stamp + $(MAKE) install-modules-all \ + quiet=verbose \ + LIBDIR=$(LIBDIR) \ + BASEDIR=$(D)-extra-modules \ + cfg_prefix=$(D)-extra-modules \ + doc-dir=share/doc/$(DEB_SOURCE)-extra-modules \ + group_include="k$(subst install_,,$@)" + # Eliminate duplicate extra libs. + for d in $(DUP_LIBS_DIRS); do \ + test "$$d" != "$(D)-extra-modules/usr/$(LIBDIR)/kamailio" && \ + for r in `find $$d -name 'lib*' | xargs`; do \ + echo "removing extra lib `basename $$r` present also in $$d"; \ + rm -f $(D)-extra-modules/usr/$(LIBDIR)/kamailio/`basename "$$r"`; \ + done ; \ + done + # clean empty dirs + find $(D)-extra-modules -depth -empty -type d -exec rmdir {} \; + +%: + dh $@ + +override_dh_auto_configure: configure-stamp +configure-stamp: + $(MAKE) cfg \ + quiet=verbose \ + prefix=/usr \ + cfg_prefix=$(D) \ + cfg_target=/etc/kamailio/ \ + FLAVOUR=kamailio \ + BASEDIR=$(D) \ + CC_EXTRA_OPTS="$(CC_EXTRA_OPTS)" \ + LD_EXTRA_OPTS="$(LD_EXTRA_OPTS)" \ + skip_modules="$(EXCLUDED_MODULES) $(EXTRA_EXCLUDED_MODULES)" \ + group_include="kstandard" + touch configure-stamp + +override_dh_auto_build: $(BUILD_MODULES) + +override_dh_auto_clean: + if [ -r autover.h -a ! -r debian/autover.h ]; then cp -a autover.h debian/; fi + dh_auto_clean -- maintainer-clean + if [ -r debian/autover.h -a ! -r autover.h ]; then mv debian/autover.h .; fi + rm -f configure-stamp test_build_all-stamp test_install_all-stamp + +override_dh_auto_install: $(INSTALL_MODULES) $(INSTALL_EXTRA) + # Move binaries of kamailio-berkeley-modules to kamailio-berkeley-bin. + mkdir -p $(D)-berkeley-bin/usr/ + mv $(D)-berkeley-modules/usr/sbin \ + $(D)-berkeley-bin/usr/ + # remove if empty + -rm -r $(D)/usr/share/man/man7/ + +override_dh_installexamples: + dh_installexamples -Xobsoleted -Xsr + +override_dh_installchangelogs: + dh_installchangelogs ChangeLog + +override_dh_installdocs: + dh_installdocs -A doc/misc/AUTHORS diff --git a/source/format b/source/format new file mode 100644 index 00000000..163aaf8d --- /dev/null +++ b/source/format @@ -0,0 +1 @@ +3.0 (quilt) diff --git a/upstream/metadata b/upstream/metadata new file mode 100644 index 00000000..c8b59ecc --- /dev/null +++ b/upstream/metadata @@ -0,0 +1,5 @@ +Bug-Database: https://github.com/kamailio/kamailio/issues +Bug-Submit: https://github.com/kamailio/kamailio/issues/new +Repository: https://github.com/kamailio/kamailio.git +Repository-Browse: https://github.com/kamailio/kamailio/ +Documentation: http://www.kamailio.org/w/documentation/ diff --git a/watch b/watch new file mode 100644 index 00000000..202b656a --- /dev/null +++ b/watch @@ -0,0 +1,3 @@ +version=3 +opts=dversionmangle=s/\~svn([\d]+)//; \ +https://www.kamailio.org/pub/kamailio/([\d.]+)/src/kamailio-([\d.]+)_src\.tar\.gz -- 2.30.2