# HG changeset patch # User Michael Schloh von Bennewitz # Date 1332448277 -3600 # Node ID b1bf69b8f57329f35dbb24bba4fa518b98d1f2c6 # Parent 7cc1c5d3b5e758faffa0d6cbfa43634d019ec4e6 Update to new vendor version and fix nasty ru_utime flaw in presence XML module. diff -r 7cc1c5d3b5e7 -r b1bf69b8f573 opensips/opensips.patch --- a/opensips/opensips.patch Thu Mar 22 21:04:45 2012 +0100 +++ b/opensips/opensips.patch Thu Mar 22 21:31:17 2012 +0100 @@ -1,8 +1,8 @@ Index: main.c diff -Nau main.c.orig main.c ---- main.c.orig 2009-12-10 14:11:03.590141302 +0100 -+++ main.c 2009-12-10 14:11:07.246237908 +0100 -@@ -1038,6 +1038,10 @@ +--- main.c.orig 2012-03-21.orig 10:29:31.458420799 +0100 ++++ main.c 2012-03-21 10:30:52.034994020 +0100 +@@ -1025,6 +1025,10 @@ ret=-1; my_argc=argc; my_argv=argv; @@ -13,7 +13,7 @@ /*init pkg mallocs (before parsing cfg or cmd line !)*/ if (init_pkg_mallocs()==-1) goto error00; -@@ -1370,6 +1374,11 @@ +@@ -1357,6 +1361,11 @@ /* init_daemon? */ if (!dont_fork){ @@ -27,8 +27,8 @@ } Index: Makefile.defs diff -Nau Makefile.defs.orig Makefile.defs ---- Makefile.defs.orig 2007-12-13 14:39:06.000000000 +0100 -+++ Makefile.defs 2008-01-14 16:48:02.811615000 +0100 +--- Makefile.defs.orig 2012-03-21.orig 10:29:31.252995930 +0100 ++++ Makefile.defs 2012-03-21 10:30:52.038327356 +0100 @@ -220,7 +220,7 @@ else doc-dir = doc/$(MAIN_NAME)/ @@ -51,8 +51,8 @@ DEFS+= -DUSE_SYSV_SEM # try sys v sems Index: scripts/opensipsctl.8 diff -Nau scripts/opensipsctl.8.orig scripts/opensipsctl.8 ---- scripts/opensipsctl.8.orig 2009-03-25 00:22:16.771365571 +0100 -+++ scripts/opensipsctl.8 2009-03-25 00:22:34.295365555 +0100 +--- scripts/opensipsctl.8.orig 2012-03-21.orig 10:29:31.357825870 +0100 ++++ scripts/opensipsctl.8 2012-03-21 10:30:52.039349015 +0100 @@ -20,8 +20,6 @@ .SH FILES @@ -64,8 +64,8 @@ .I ~/.opensipsctlrc Index: scripts/osipsconsole diff -Nau scripts/osipsconsole.orig scripts/osipsconsole ---- scripts/osipsconsole.orig 2009-12-08 03:31:32.633224883 +0100 -+++ scripts/osipsconsole 2009-12-08 03:31:51.119960848 +0100 +--- scripts/osipsconsole.orig 2012-03-21.orig 10:29:31.335460757 +0100 ++++ scripts/osipsconsole 2012-03-21 10:30:52.050666821 +0100 @@ -30,7 +30,6 @@ use Term::ReadLine; use DBI; @@ -89,8 +89,8 @@ $AWK = $arr[1]; Index: modules/permissions/parse_config.c diff -Nau modules/permissions/parse_config.c.orig modules/permissions/parse_config.c ---- modules/permissions/parse_config.c.orig 2008-08-03 15:54:01 +0200 -+++ modules/permissions/parse_config.c 2008-08-09 11:58:55 +0200 +--- modules/permissions/parse_config.c.orig 2012-03-21.orig 10:29:32.047580003 +0100 ++++ modules/permissions/parse_config.c 2012-03-21 10:30:52.052696686 +0100 @@ -114,8 +114,11 @@ except = strstr(str, " EXCEPT "); if (except) { @@ -115,11 +115,24 @@ *e_exceptions = NULL; } +Index: parser/sdp/sdp_helpr_funcs.c +diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c +--- parser/sdp/sdp_helpr_funcs.c.orig 2012-03-21.orig 10:29:31.444187545 +0100 ++++ parser/sdp/sdp_helpr_funcs.c 2012-03-21 10:30:52.057616045 +0100 +@@ -396,7 +396,7 @@ + + cp1 = NULL; + for (cp = body->s; (len = body->s + body->len - cp) > 0;) { +- cp1 = (char*)ser_memmem(cp, line, len, 2); ++ cp1 = (char*)ser_memmem(cp, line, len, strlen(line)); + if (cp1 == NULL || cp1[-1] == '\n' || cp1[-1] == '\r') + break; + cp = cp1 + 2; Index: modules/nathelper/nathelper.c diff -Nau modules/nathelper/nathelper.c.orig modules/nathelper/nathelper.c ---- modules/nathelper/nathelper.c.orig 2010-12-20 14:33:50.000000000 +0100 -+++ modules/nathelper/nathelper.c 2011-01-26 17:48:40.685941382 +0100 -@@ -288,6 +288,9 @@ +--- modules/nathelper/nathelper.c.orig 2012-03-21.orig 10:29:31.795178267 +0100 ++++ modules/nathelper/nathelper.c 2012-03-21 10:30:52.055610362 +0100 +@@ -289,6 +289,9 @@ return 0; } @@ -129,7 +142,7 @@ -@@ -805,6 +808,7 @@ +@@ -813,6 +816,7 @@ #define FIX_MEDIP 0x02 #define ADD_ANORTPPROXY 0x04 #define FIX_ORGIP 0x08 @@ -137,7 +150,7 @@ #define ADIRECTION "a=direction:active" #define ADIRECTION_LEN (sizeof(ADIRECTION) - 1) -@@ -821,7 +825,9 @@ +@@ -829,7 +833,9 @@ { char *buf; int offset; @@ -147,7 +160,7 @@ str omip, nip, oip; /* check that updating mediaip is really necessary */ -@@ -852,7 +858,19 @@ +@@ -860,7 +866,19 @@ memcpy(buf, CRLF, CRLF_LEN); memcpy(buf + CRLF_LEN, omip.s, omip.len); memcpy(buf + CRLF_LEN + omip.len, oldip->s, oldip->len); @@ -168,7 +181,7 @@ omip.len + oldip->len + CRLF_LEN, 0) == NULL) { LM_ERR("insert_new_lump_after failed\n"); pkg_free(buf); -@@ -1038,6 +1056,12 @@ +@@ -1046,6 +1064,12 @@ p= p->next; } @@ -181,16 +194,3 @@ return 1; } -Index: parser/sdp/sdp_helpr_funcs.c -diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c ---- parser/sdp/sdp_helpr_funcs.c.orig 2010-12-08 15:14:06.000000000 +0100 -+++ parser/sdp/sdp_helpr_funcs.c 2011-01-27 00:39:50.128212053 +0100 -@@ -392,7 +392,7 @@ - - cp1 = NULL; - for (cp = body->s; (len = body->s + body->len - cp) > 0;) { -- cp1 = (char*)ser_memmem(cp, line, len, 2); -+ cp1 = (char*)ser_memmem(cp, line, len, strlen(line)); - if (cp1 == NULL || cp1[-1] == '\n' || cp1[-1] == '\r') - break; - cp = cp1 + 2; diff -r 7cc1c5d3b5e7 -r b1bf69b8f573 opensips/opensips.spec --- a/opensips/opensips.spec Thu Mar 22 21:04:45 2012 +0100 +++ b/opensips/opensips.spec Thu Mar 22 21:31:17 2012 +0100 @@ -34,8 +34,8 @@ Class: PLUS Group: VoIP License: GPL -Version: 1.7.1 -Release: 20111120 +Version: 1.7.2 +Release: 20120208 # package options %option with_cons yes @@ -63,10 +63,11 @@ Source3: fsl.opensips Source4: opensips.cfg Patch0: opensips.patch -Patch1: opensips.patch.dict -Patch2: opensips.patch.uac -Patch3: opensips.patch.reg -Patch4: opensips.patch.rtpproxy +Patch1: opensips.patch.ctlrc +Patch2: opensips.patch.dict +Patch3: opensips.patch.uac +Patch4: opensips.patch.reg +Patch5: opensips.patch.rtpproxy # build information Prefix: %{l_prefix} @@ -185,8 +186,9 @@ %patch -p0 -P 1 %patch -p0 -P 2 %patch -p0 -P 3 + %patch -p0 -P 4 ( cd rtpproxy-%{V_rtpproxy} - %patch -p0 -P 4 + %patch -p0 -P 5 ) || exit $? %{l_shtool} subst \ -e 's;^#! */bin/sh;#! %{l_prefix}/bin/bash;' \ @@ -195,7 +197,7 @@ -e 's;^#! */bin/bash;#! %{l_prefix}/bin/bash;' \ modules/seas/doc/xml2sgml.sh \ scripts/opensipsdbctl \ - test/* + test/*.sh %{l_shtool} subst \ %if "%{with_dbgmem}" == "yes" -e 's;\(-DF_MALLOC\);#\1;' \ @@ -249,20 +251,11 @@ scripts/opensipsdbctl \ scripts/opensipsctl %{l_shtool} subst \ - -e 's;\(DB_PATH="\)[^"][^"]*;\1%{l_prefix}/var/opensips/db;' \ - -e 's;start opensips \(with 64MB share memory\).*;start \1 instead of default 32MB;' \ - -e 's;\(# STARTOPTIONS=.*\);\1"-m 64";' \ - scripts/osipsconsolerc \ - scripts/opensipsctlrc - %{l_shtool} subst \ - -e 's;=/var/run/\(opensips.pid\);=%{l_prefix}/var/opensips/\1;g' \ -e 's;/var/run/\(opensips.pid\);%{l_prefix}/var/opensips/\1;g' \ -e 's;\(my \$fifo_reply_path\) = "/tmp/";\1 = "%{l_prefix}/var/opensips/";' \ -e 's;\(my \$HISTORY_FILE\) = "/tmp/osipsconsole_history";\1 = "%{l_prefix}/var/opensips/osipsconsole_history";' \ scripts/opensipsctl \ - scripts/opensipsctlrc \ scripts/osipsconsole \ - scripts/osipsconsolerc %{l_shtool} subst \ -e 's;/usr/local;;g' \ -e 's;\(/etc/opensips/\)\.\(opensipsctlrc\);%{l_prefix}\1\2;g' \ @@ -352,6 +345,9 @@ -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libcurl libxml-2.0`;" \ modules/xcap_client/Makefile %{l_shtool} subst \ + -e 's;^\(DEFS+= *\);\1 -D__EXTENSIONS__;' \ + modules/presence_xml/Makefile \ + %{l_shtool} subst \ -e 's;^\(DEFS+=\).*\\$;\1 \\;' \ -e "s;\-I[^ \t][^ \t]*;`%{l_prefix}/bin/pkg-config --cflags-only-I libxml-2.0`;g" \ -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libxml-2.0`;" \ @@ -504,6 +500,7 @@ ) || exit $? %install + # clean build cruft rm -rf $RPM_BUILD_ROOT # select modules