Update to new vendor version and fix nasty ru_utime flaw in presence XML module.

Thu, 22 Mar 2012 21:31:17 +0100

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Thu, 22 Mar 2012 21:31:17 +0100
changeset 410
b1bf69b8f573
parent 409
7cc1c5d3b5e7
child 411
e4385d1fd937

Update to new vendor version and fix nasty ru_utime flaw in presence XML module.

opensips/opensips.patch file | annotate | diff | comparison | revisions
opensips/opensips.spec file | annotate | diff | comparison | revisions
     1.1 --- a/opensips/opensips.patch	Thu Mar 22 21:04:45 2012 +0100
     1.2 +++ b/opensips/opensips.patch	Thu Mar 22 21:31:17 2012 +0100
     1.3 @@ -1,8 +1,8 @@
     1.4  Index: main.c
     1.5  diff -Nau main.c.orig main.c
     1.6 ---- main.c.orig	2009-12-10 14:11:03.590141302 +0100
     1.7 -+++ main.c	2009-12-10 14:11:07.246237908 +0100
     1.8 -@@ -1038,6 +1038,10 @@
     1.9 +--- main.c.orig	2012-03-21.orig 10:29:31.458420799 +0100
    1.10 ++++ main.c	2012-03-21 10:30:52.034994020 +0100
    1.11 +@@ -1025,6 +1025,10 @@
    1.12   	ret=-1;
    1.13   	my_argc=argc; my_argv=argv;
    1.14   
    1.15 @@ -13,7 +13,7 @@
    1.16   	/*init pkg mallocs (before parsing cfg or cmd line !)*/
    1.17   	if (init_pkg_mallocs()==-1)
    1.18   		goto error00;
    1.19 -@@ -1370,6 +1374,11 @@
    1.20 +@@ -1357,6 +1361,11 @@
    1.21   
    1.22   	/* init_daemon? */
    1.23   	if (!dont_fork){
    1.24 @@ -27,8 +27,8 @@
    1.25   	}
    1.26  Index: Makefile.defs
    1.27  diff -Nau Makefile.defs.orig Makefile.defs
    1.28 ---- Makefile.defs.orig	2007-12-13 14:39:06.000000000 +0100
    1.29 -+++ Makefile.defs	2008-01-14 16:48:02.811615000 +0100
    1.30 +--- Makefile.defs.orig	2012-03-21.orig 10:29:31.252995930 +0100
    1.31 ++++ Makefile.defs	2012-03-21 10:30:52.038327356 +0100
    1.32  @@ -220,7 +220,7 @@
    1.33   else
    1.34   	doc-dir = doc/$(MAIN_NAME)/
    1.35 @@ -51,8 +51,8 @@
    1.36   		DEFS+= -DUSE_SYSV_SEM  # try sys v sems
    1.37  Index: scripts/opensipsctl.8
    1.38  diff -Nau scripts/opensipsctl.8.orig scripts/opensipsctl.8
    1.39 ---- scripts/opensipsctl.8.orig	2009-03-25 00:22:16.771365571 +0100
    1.40 -+++ scripts/opensipsctl.8	2009-03-25 00:22:34.295365555 +0100
    1.41 +--- scripts/opensipsctl.8.orig	2012-03-21.orig 10:29:31.357825870 +0100
    1.42 ++++ scripts/opensipsctl.8	2012-03-21 10:30:52.039349015 +0100
    1.43  @@ -20,8 +20,6 @@
    1.44   
    1.45   .SH FILES
    1.46 @@ -64,8 +64,8 @@
    1.47   .I ~/.opensipsctlrc
    1.48  Index: scripts/osipsconsole
    1.49  diff -Nau scripts/osipsconsole.orig scripts/osipsconsole
    1.50 ---- scripts/osipsconsole.orig	2009-12-08 03:31:32.633224883 +0100
    1.51 -+++ scripts/osipsconsole	2009-12-08 03:31:51.119960848 +0100
    1.52 +--- scripts/osipsconsole.orig	2012-03-21.orig 10:29:31.335460757 +0100
    1.53 ++++ scripts/osipsconsole	2012-03-21 10:30:52.050666821 +0100
    1.54  @@ -30,7 +30,6 @@
    1.55   use Term::ReadLine;
    1.56   use DBI;
    1.57 @@ -89,8 +89,8 @@
    1.58   			 	$AWK = $arr[1]; 
    1.59  Index: modules/permissions/parse_config.c
    1.60  diff -Nau modules/permissions/parse_config.c.orig modules/permissions/parse_config.c
    1.61 ---- modules/permissions/parse_config.c.orig	2008-08-03 15:54:01 +0200
    1.62 -+++ modules/permissions/parse_config.c	2008-08-09 11:58:55 +0200
    1.63 +--- modules/permissions/parse_config.c.orig	2012-03-21.orig 10:29:32.047580003 +0100
    1.64 ++++ modules/permissions/parse_config.c	2012-03-21 10:30:52.052696686 +0100
    1.65  @@ -114,8 +114,11 @@
    1.66   	except = strstr(str, " EXCEPT ");
    1.67   	if (except) {
    1.68 @@ -115,11 +115,24 @@
    1.69   		*e_exceptions = NULL;
    1.70   	}
    1.71   
    1.72 +Index: parser/sdp/sdp_helpr_funcs.c
    1.73 +diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c
    1.74 +--- parser/sdp/sdp_helpr_funcs.c.orig	2012-03-21.orig 10:29:31.444187545 +0100
    1.75 ++++ parser/sdp/sdp_helpr_funcs.c	2012-03-21 10:30:52.057616045 +0100
    1.76 +@@ -396,7 +396,7 @@
    1.77 + 
    1.78 + 	cp1 = NULL;
    1.79 + 	for (cp = body->s; (len = body->s + body->len - cp) > 0;) {
    1.80 +-		cp1 = (char*)ser_memmem(cp, line, len, 2);
    1.81 ++		cp1 = (char*)ser_memmem(cp, line, len, strlen(line));
    1.82 + 		if (cp1 == NULL || cp1[-1] == '\n' || cp1[-1] == '\r')
    1.83 + 			break;
    1.84 + 		cp = cp1 + 2;
    1.85  Index: modules/nathelper/nathelper.c
    1.86  diff -Nau modules/nathelper/nathelper.c.orig modules/nathelper/nathelper.c
    1.87 ---- modules/nathelper/nathelper.c.orig	2010-12-20 14:33:50.000000000 +0100
    1.88 -+++ modules/nathelper/nathelper.c	2011-01-26 17:48:40.685941382 +0100
    1.89 -@@ -288,6 +288,9 @@
    1.90 +--- modules/nathelper/nathelper.c.orig	2012-03-21.orig 10:29:31.795178267 +0100
    1.91 ++++ modules/nathelper/nathelper.c	2012-03-21 10:30:52.055610362 +0100
    1.92 +@@ -289,6 +289,9 @@
    1.93   	return 0;
    1.94   }
    1.95   
    1.96 @@ -129,7 +142,7 @@
    1.97   
    1.98   
    1.99   
   1.100 -@@ -805,6 +808,7 @@
   1.101 +@@ -813,6 +816,7 @@
   1.102   #define	FIX_MEDIP	0x02
   1.103   #define	ADD_ANORTPPROXY	0x04
   1.104   #define	FIX_ORGIP	0x08
   1.105 @@ -137,7 +150,7 @@
   1.106   
   1.107   #define	ADIRECTION	"a=direction:active"
   1.108   #define	ADIRECTION_LEN	(sizeof(ADIRECTION) - 1)
   1.109 -@@ -821,7 +825,9 @@
   1.110 +@@ -829,7 +833,9 @@
   1.111   {
   1.112   	char *buf;
   1.113   	int offset;
   1.114 @@ -147,7 +160,7 @@
   1.115   	str omip, nip, oip;
   1.116   
   1.117   	/* check that updating mediaip is really necessary */
   1.118 -@@ -852,7 +858,19 @@
   1.119 +@@ -860,7 +866,19 @@
   1.120   		memcpy(buf, CRLF, CRLF_LEN);
   1.121   		memcpy(buf + CRLF_LEN, omip.s, omip.len);
   1.122   		memcpy(buf + CRLF_LEN + omip.len, oldip->s, oldip->len);
   1.123 @@ -168,7 +181,7 @@
   1.124   		    omip.len + oldip->len + CRLF_LEN, 0) == NULL) {
   1.125   			LM_ERR("insert_new_lump_after failed\n");
   1.126   			pkg_free(buf);
   1.127 -@@ -1038,6 +1056,12 @@
   1.128 +@@ -1046,6 +1064,12 @@
   1.129   		p= p->next;
   1.130   	}
   1.131   
   1.132 @@ -181,16 +194,3 @@
   1.133   	return 1;
   1.134   }
   1.135   
   1.136 -Index: parser/sdp/sdp_helpr_funcs.c
   1.137 -diff -Nau parser/sdp/sdp_helpr_funcs.c.orig parser/sdp/sdp_helpr_funcs.c
   1.138 ---- parser/sdp/sdp_helpr_funcs.c.orig	2010-12-08 15:14:06.000000000 +0100
   1.139 -+++ parser/sdp/sdp_helpr_funcs.c	2011-01-27 00:39:50.128212053 +0100
   1.140 -@@ -392,7 +392,7 @@
   1.141 - 
   1.142 - 	cp1 = NULL;
   1.143 - 	for (cp = body->s; (len = body->s + body->len - cp) > 0;) {
   1.144 --		cp1 = (char*)ser_memmem(cp, line, len, 2);
   1.145 -+		cp1 = (char*)ser_memmem(cp, line, len, strlen(line));
   1.146 - 		if (cp1 == NULL || cp1[-1] == '\n' || cp1[-1] == '\r')
   1.147 - 			break;
   1.148 - 		cp = cp1 + 2;
     2.1 --- a/opensips/opensips.spec	Thu Mar 22 21:04:45 2012 +0100
     2.2 +++ b/opensips/opensips.spec	Thu Mar 22 21:31:17 2012 +0100
     2.3 @@ -34,8 +34,8 @@
     2.4  Class:        PLUS
     2.5  Group:        VoIP
     2.6  License:      GPL
     2.7 -Version:      1.7.1
     2.8 -Release:      20111120
     2.9 +Version:      1.7.2
    2.10 +Release:      20120208
    2.11  
    2.12  #   package options
    2.13  %option       with_cons    yes
    2.14 @@ -63,10 +63,11 @@
    2.15  Source3:      fsl.opensips
    2.16  Source4:      opensips.cfg
    2.17  Patch0:       opensips.patch
    2.18 -Patch1:       opensips.patch.dict
    2.19 -Patch2:       opensips.patch.uac
    2.20 -Patch3:       opensips.patch.reg
    2.21 -Patch4:       opensips.patch.rtpproxy
    2.22 +Patch1:       opensips.patch.ctlrc
    2.23 +Patch2:       opensips.patch.dict
    2.24 +Patch3:       opensips.patch.uac
    2.25 +Patch4:       opensips.patch.reg
    2.26 +Patch5:       opensips.patch.rtpproxy
    2.27  
    2.28  #   build information
    2.29  Prefix:       %{l_prefix}
    2.30 @@ -185,8 +186,9 @@
    2.31      %patch -p0 -P 1
    2.32      %patch -p0 -P 2
    2.33      %patch -p0 -P 3
    2.34 +    %patch -p0 -P 4
    2.35      ( cd rtpproxy-%{V_rtpproxy}
    2.36 -      %patch -p0 -P 4
    2.37 +      %patch -p0 -P 5
    2.38      ) || exit $?
    2.39      %{l_shtool} subst \
    2.40          -e 's;^#! */bin/sh;#! %{l_prefix}/bin/bash;' \
    2.41 @@ -195,7 +197,7 @@
    2.42          -e 's;^#! */bin/bash;#! %{l_prefix}/bin/bash;' \
    2.43          modules/seas/doc/xml2sgml.sh \
    2.44          scripts/opensipsdbctl \
    2.45 -        test/*
    2.46 +        test/*.sh
    2.47      %{l_shtool} subst \
    2.48  %if "%{with_dbgmem}" == "yes"
    2.49          -e 's;\(-DF_MALLOC\);#\1;' \
    2.50 @@ -249,20 +251,11 @@
    2.51          scripts/opensipsdbctl \
    2.52          scripts/opensipsctl
    2.53      %{l_shtool} subst \
    2.54 -        -e 's;\(DB_PATH="\)[^"][^"]*;\1%{l_prefix}/var/opensips/db;' \
    2.55 -        -e 's;start opensips \(with 64MB share memory\).*;start \1 instead of default 32MB;' \
    2.56 -        -e 's;\(# STARTOPTIONS=.*\);\1"-m 64";' \
    2.57 -        scripts/osipsconsolerc \
    2.58 -        scripts/opensipsctlrc
    2.59 -    %{l_shtool} subst \
    2.60 -        -e 's;=/var/run/\(opensips.pid\);=%{l_prefix}/var/opensips/\1;g' \
    2.61          -e 's;/var/run/\(opensips.pid\);%{l_prefix}/var/opensips/\1;g' \
    2.62          -e 's;\(my \$fifo_reply_path\) = "/tmp/";\1 = "%{l_prefix}/var/opensips/";' \
    2.63          -e 's;\(my \$HISTORY_FILE\) = "/tmp/osipsconsole_history";\1 = "%{l_prefix}/var/opensips/osipsconsole_history";' \
    2.64          scripts/opensipsctl \
    2.65 -        scripts/opensipsctlrc \
    2.66          scripts/osipsconsole \
    2.67 -        scripts/osipsconsolerc
    2.68      %{l_shtool} subst \
    2.69          -e 's;/usr/local;;g' \
    2.70          -e 's;\(/etc/opensips/\)\.\(opensipsctlrc\);%{l_prefix}\1\2;g' \
    2.71 @@ -352,6 +345,9 @@
    2.72          -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libcurl libxml-2.0`;" \
    2.73          modules/xcap_client/Makefile
    2.74      %{l_shtool} subst \
    2.75 +        -e 's;^\(DEFS+= *\);\1 -D__EXTENSIONS__;' \
    2.76 +        modules/presence_xml/Makefile \
    2.77 +    %{l_shtool} subst \
    2.78          -e 's;^\(DEFS+=\).*\\$;\1 \\;' \
    2.79          -e "s;\-I[^ \t][^ \t]*;`%{l_prefix}/bin/pkg-config --cflags-only-I libxml-2.0`;g" \
    2.80          -e "s;^\(LIBS=\).*;\1`%{l_prefix}/bin/pkg-config --libs libxml-2.0`;" \
    2.81 @@ -504,6 +500,7 @@
    2.82      ) || exit $?
    2.83  
    2.84  %install
    2.85 +    #   clean build cruft
    2.86      rm -rf $RPM_BUILD_ROOT
    2.87  
    2.88      #   select modules

mercurial