diff --git a/debian/ngcp-kamailio.kamailio-lb.service b/debian/ngcp-kamailio.kamailio-lb.service index 06bc8239a..b9d6c01d3 100644 --- a/debian/ngcp-kamailio.kamailio-lb.service +++ b/debian/ngcp-kamailio.kamailio-lb.service @@ -17,7 +17,6 @@ PIDFile=/run/kamailio/kamailio.lb.pid RuntimeDirectory=kamailio RuntimeDirectoryMode=0750 RuntimeDirectoryPreserve=yes -Environment='LD_PRELOAD=/usr/lib/x86_64-linux-gnu/kamailio/openssl_mutex_shared/openssl_mutex_shared.so' Environment='CFGFILE=/etc/kamailio/lb/kamailio.cfg' # Values of SHM_MEMORY=64 and PKG_MEMORY=16 taken from old sysvinit file # Amount of shared memory to allocate for the running Kamailio server (in MiB) diff --git a/debian/patches/debian/no_lib64_on_64_bits.patch b/debian/patches/debian/no_lib64_on_64_bits.patch index d28fe10c4..d04d7da2b 100644 --- a/debian/patches/debian/no_lib64_on_64_bits.patch +++ b/debian/patches/debian/no_lib64_on_64_bits.patch @@ -1,6 +1,6 @@ --- a/src/Makefile.defs +++ b/src/Makefile.defs -@@ -388,15 +388,7 @@ endif +@@ -424,15 +424,7 @@ endif $(info target architecture <$(ARCH)>, host architecture <$(HOST_ARCH)>) diff --git a/debian/patches/series b/debian/patches/series index 452eae55a..48fcd85a5 100644 --- a/debian/patches/series +++ b/debian/patches/series @@ -52,6 +52,5 @@ sipwise/db_redis_master_sets.patch sipwise/db_redis_fixes.patch sipwise/sca-fix-memleaks.patch sipwise/presence_dfks_null_ptr_fixes.patch -sipwise/switch_from_python2_to_python3.patch sipwise/rtpengine_play_dtmf.patch sipwise/db_redis_eval_fix.patch diff --git a/debian/patches/sipwise/openssl-locking.patch b/debian/patches/sipwise/openssl-locking.patch index e8d2191e4..a46342ab1 100644 --- a/debian/patches/sipwise/openssl-locking.patch +++ b/debian/patches/sipwise/openssl-locking.patch @@ -78,7 +78,7 @@ +} --- a/src/modules/tls/Makefile +++ b/src/modules/tls/Makefile -@@ -33,6 +33,8 @@ +@@ -34,6 +34,8 @@ # dcm: tls.cfg installed via local 'install-cfg' to update paths #MOD_INSTALL_CFGS=tls.cfg diff --git a/debian/patches/sipwise/rtpengine-play-media.patch b/debian/patches/sipwise/rtpengine-play-media.patch index dac3242b3..2971422a1 100644 --- a/debian/patches/sipwise/rtpengine-play-media.patch +++ b/debian/patches/sipwise/rtpengine-play-media.patch @@ -108,7 +108,7 @@ static bencode_item_t *rtpp_function_call_ok(bencode_buffer_t *bencbuf, struct sip_msg *msg, enum rtpe_operation op, const char *flags_str, str *body) { -@@ -3340,8 +3381,9 @@ +@@ -3349,8 +3390,9 @@ return 1; } @@ -120,7 +120,7 @@ { int ret, more; -@@ -3354,7 +3396,7 @@ +@@ -3363,7 +3405,7 @@ if (!selected_rtpp_set_2 || selected_rtpp_set_2 == selected_rtpp_set_1) more = 0; @@ -129,7 +129,7 @@ if (ret < 0) return ret; -@@ -3365,17 +3407,18 @@ +@@ -3374,17 +3416,18 @@ if (set_rtpengine_set_from_avp(msg, direction) == -1) return -1; @@ -152,7 +152,7 @@ { str flags; -@@ -3387,27 +3430,23 @@ +@@ -3396,27 +3439,23 @@ } } @@ -189,7 +189,7 @@ } -@@ -3553,88 +3592,45 @@ +@@ -3562,88 +3601,45 @@ return -1; } @@ -285,7 +285,7 @@ } static int -@@ -3708,160 +3704,102 @@ +@@ -3717,160 +3713,102 @@ } @@ -493,7 +493,7 @@ void **parms; pv_param_t *param; pv_value_t *res; -@@ -3915,7 +3853,7 @@ +@@ -3924,7 +3862,7 @@ parms[0] = param; parms[1] = res; @@ -502,7 +502,7 @@ } static int -@@ -3940,54 +3878,55 @@ +@@ -3949,54 +3887,55 @@ * */ static int ki_rtpengine_manage0(sip_msg_t *msg) { diff --git a/debian/patches/sipwise/rtpengine-tcp-forwarding.patch b/debian/patches/sipwise/rtpengine-tcp-forwarding.patch index adad14b80..5f30973c7 100644 --- a/debian/patches/sipwise/rtpengine-tcp-forwarding.patch +++ b/debian/patches/sipwise/rtpengine-tcp-forwarding.patch @@ -55,7 +55,7 @@ { if (ng_flags.directional) bencode_dictionary_add_str(ng_flags.dict, "from-tag", &ng_flags.from_tag); -@@ -3807,6 +3823,44 @@ +@@ -3816,6 +3832,44 @@ return rtpengine_rtpp_set_wrap(msg, rtpengine_unblock_media_wrap, flags.s, 1); } diff --git a/debian/patches/sipwise/rtpengine-trickle-ice-sdp.patch b/debian/patches/sipwise/rtpengine-trickle-ice-sdp.patch index a85193a29..bc763ee81 100644 --- a/debian/patches/sipwise/rtpengine-trickle-ice-sdp.patch +++ b/debian/patches/sipwise/rtpengine-trickle-ice-sdp.patch @@ -91,7 +91,7 @@ goto select_node; } -@@ -3546,6 +3557,26 @@ +@@ -3555,6 +3566,26 @@ return rtpengine_rtpp_set_wrap(msg, rtpengine_manage_wrap, flags.s, 1); } diff --git a/debian/patches/sipwise/rtpengine_next_branch_parm.patch b/debian/patches/sipwise/rtpengine_next_branch_parm.patch index b1881ea42..fc7aae9be 100644 --- a/debian/patches/sipwise/rtpengine_next_branch_parm.patch +++ b/debian/patches/sipwise/rtpengine_next_branch_parm.patch @@ -72,7 +72,7 @@ if (ret == -1 || viabranch.len == 0) { LM_ERR("can't get Via branch/extra ID\n"); goto error; -@@ -3545,7 +3568,7 @@ rtpengine_answer1_f(struct sip_msg *msg, +@@ -3554,7 +3577,7 @@ rtpengine_answer1_f(struct sip_msg *msg, } static int diff --git a/debian/patches/sipwise/rtpengine_play_dtmf.patch b/debian/patches/sipwise/rtpengine_play_dtmf.patch index 3306c26e8..f5a576132 100644 --- a/debian/patches/sipwise/rtpengine_play_dtmf.patch +++ b/debian/patches/sipwise/rtpengine_play_dtmf.patch @@ -26,7 +26,7 @@ {"rtpengine_offer", (cmd_function)rtpengine_offer1_f, 0, 0, 0, ANY_ROUTE}, -@@ -3788,6 +3793,12 @@ +@@ -3797,6 +3802,12 @@ } static int diff --git a/debian/patches/sipwise/switch_from_python2_to_python3.patch b/debian/patches/sipwise/switch_from_python2_to_python3.patch deleted file mode 100644 index f727f554c..000000000 --- a/debian/patches/sipwise/switch_from_python2_to_python3.patch +++ /dev/null @@ -1,86 +0,0 @@ ---- a/utils/kamctl/dbtextdb/__init__.py -+++ b/utils/kamctl/dbtextdb/__init__.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # - # Copyright 2008 Google Inc. All Rights Reserved. - ---- a/utils/kamctl/dbtextdb/dbtextdb.py -+++ b/utils/kamctl/dbtextdb/dbtextdb.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # - # Copyright 2008 Google Inc. All Rights Reserved. - -@@ -27,7 +27,7 @@ else: - def Debug(msg): - """Debug print method.""" - if DEBUG: -- print msg -+ print(msg) - - - class DBText(object): -@@ -958,11 +958,11 @@ class DBText(object): - try: - if val: - val = eval(val) -- except NameError, e: -+ except NameError as e: - raise ExecuteError('Failed to parse %s in %s ' - '(unable to convert to type %s): %s' % - (col, self.table, self.header[col]['type'], e)) -- except SyntaxError, e: -+ except SyntaxError as e: - raise ExecuteError('Failed to parse %s in %s ' - '(unable to convert to type %s): %s' % - (col, self.table, self.header[col]['type'], e)) -@@ -1045,7 +1045,7 @@ class DBText(object): - self.data = self._GetData() - self.orig_data = self.data[:] # save a copy of the data before modifying - -- except IOError, e: -+ except IOError as e: - raise ExecuteError('Unable to open table %s: %s' % (self.table, e)) - - Debug('Header is: %s' % self.header) -@@ -1172,11 +1172,11 @@ class ExecuteError(Error): - def main(argv): - - if len(argv) < 2: -- print 'Usage %s query' % argv[0] -+ print('Usage %s query' % argv[0]) - sys.exit(1) - - if 'DBTEXT_PATH' not in os.environ or not os.environ['DBTEXT_PATH']: -- print 'DBTEXT_PATH must be set' -+ print('DBTEXT_PATH must be set') - sys.exit(1) - else: - location = os.environ['DBTEXT_PATH'] -@@ -1187,11 +1187,11 @@ def main(argv): - if dataset: - for row in dataset: - if conn.command != 'SELECT': -- print 'Updated %s, rows affected: %d' % (conn.table, row) -+ print('Updated %s, rows affected: %d' % (conn.table, row)) - else: -- print row -- except Error, e: -- print e -+ print(row) -+ except Error as e: -+ print(e) - sys.exit(1) - - ---- a/utils/kamctl/dbtextdb/dbtextdb_test.py -+++ b/utils/kamctl/dbtextdb/dbtextdb_test.py -@@ -1,4 +1,4 @@ --#!/usr/bin/python -+#!/usr/bin/python3 - # - # Copyright 2008 Google Inc. All Rights Reserved. - diff --git a/debian/rules b/debian/rules index a07746b5c..f8ba52676 100755 --- a/debian/rules +++ b/debian/rules @@ -121,6 +121,10 @@ LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS) # https://wiki.debian.org/ReproducibleBuilds/ CC_EXTRA_OPTS += -DVERSION_NODATE +# Fix for UDP buffer issue when TLS is enabled +CC_EXTRA_OPTS += -pthread -DKSR_PTHREAD_MUTEX_SHARED +LD_EXTRA_OPTS += -pthread -rdynamic -ldl -Wl,-Bsymbolic-functions + %: dh $@