# HG changeset patch # User Michael Schloh von Bennewitz # Date 1346171495 -7200 # Node ID 1c75a8bb0fec9ce87438ba6960cb85139d6b4159 # Parent 7894123eadbf58e0e7df696675417b28d1176b8e Update to new version, correct new flaky menuconfig implementation, modernize packaging, and only conditionally implement strsep(3) on SVR4 missing it. diff -r 7894123eadbf -r 1c75a8bb0fec opensips/opensips.patch --- a/opensips/opensips.patch Tue Aug 28 18:31:20 2012 +0200 +++ b/opensips/opensips.patch Tue Aug 28 18:31:35 2012 +0200 @@ -2,7 +2,7 @@ diff -Nau main.c.orig main.c --- 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 @@ +@@ -1029,6 +1029,10 @@ ret=-1; my_argc=argc; my_argv=argv; @@ -10,10 +10,10 @@ + /* ...so unconditionally log to syslog for now */ + openlog(argv[0], LOG_PID|LOG_CONS, log_facility); + - /*init pkg mallocs (before parsing cfg or cmd line !)*/ - if (init_pkg_mallocs()==-1) - goto error00; -@@ -1357,6 +1361,11 @@ + /* process pkg mem size from command line */ + opterr=0; + options="f:cCm:M:b:l:n:N:rRvdDETSVhw:t:u:g:P:G:W:o:"; +@@ -1387,6 +1391,11 @@ /* init_daemon? */ if (!dont_fork){ @@ -38,7 +38,7 @@ LOCALBASE ?= $(SYSBASE)/local endif endif -@@ -1432,6 +1432,10 @@ +@@ -1411,6 +1411,10 @@ LIBS+= -lsctp endif @@ -74,7 +74,7 @@ use IO::Socket; use Socket; #use Net::IP; -@@ -378,6 +377,12 @@ +@@ -376,6 +375,12 @@ } } @@ -225,3 +225,32 @@ d = d->next; } return 0; +Index: menuconfig/Makefile +diff -Nau menuconfig/Makefile.orig menuconfig/Makefile +--- menuconfig/Makefile.orig 2012-03-26 12:11:03.000000000 +0200 ++++ menuconfig/Makefile 2012-08-21 21:44:18.781092313 +0200 +@@ -5,10 +5,10 @@ + CFLAGS=-g -Wall -DMENUCONFIG_CFG_PATH=\"$(MENUCONFIG_CFG_PATH)\" \ + -DMENUCONFIG_GEN_PATH=\"$(MENUCONFIG_GEN_PATH)\" \ + -DMENUCONFIG_HAVE_SOURCES=$(MENUCONFIG_HAVE_SOURCES) +-MY_LDFLAGS=-lcurses ++MY_LDFLAGS=-lncurses + EXEC_NAME=configure + all: $(MENUCONFIG_FILES) +- $(CC) -o $(EXEC_NAME) $(CFLAGS) $^ $(MY_LDFLAGS) ++ $(CC) -o $(EXEC_NAME) $(CFLAGS) $(CPPFLAGS) $^ $(LDFLAGS) $(LIBS) + + proper: + rm -f $(EXEC_NAME) +Index: menuconfig/Makefile +diff -Nau menuconfig/Makefile.orig menuconfig/Makefile +--- menuconfig/curses.c.orig 2012-03-23 11:47:37.000000000 +0100 ++++ menuconfig/curses.c 2012-08-21 21:49:29.506561887 +0200 +@@ -28,6 +28,7 @@ + #include + + #include ++#include + #include + + #include "curses.h" diff -r 7894123eadbf -r 1c75a8bb0fec opensips/opensips.patch.ctlrc --- a/opensips/opensips.patch.ctlrc Tue Aug 28 18:31:20 2012 +0200 +++ b/opensips/opensips.patch.ctlrc Tue Aug 28 18:31:35 2012 +0200 @@ -3,7 +3,7 @@ --- scripts/opensipsctlrc.orig 2011-08-24 10:12:07.000000000 +0200 +++ scripts/opensipsctlrc 2012-03-22 19:04:38.092856433 +0100 @@ -1,22 +1,16 @@ --# $Id: opensipsctlrc 8290 2011-08-23 14:14:10Z razvancrainea $ +-# $Id: opensipsctlrc 9049 2012-05-24 14:03:31Z osas $ -# -# The OpenSIPS configuration file for the control tools. -# diff -r 7894123eadbf -r 1c75a8bb0fec opensips/opensips.patch.reg --- a/opensips/opensips.patch.reg Tue Aug 28 18:31:20 2012 +0200 +++ b/opensips/opensips.patch.reg Tue Aug 28 18:31:35 2012 +0200 @@ -2,7 +2,7 @@ diff -Nau modules/registrar/save.c.orig modules/registrar/save.c --- modules/registrar/save.c.orig 2008-08-03 15:53:57.000000000 +0200 +++ modules/registrar/save.c 2009-03-24 21:44:46.182865192 +0100 -@@ -76,7 +76,7 @@ +@@ -77,7 +77,7 @@ struct save_ctx { unsigned int flags; str aor; @@ -11,7 +11,7 @@ }; -@@ -388,7 +388,7 @@ +@@ -394,7 +394,7 @@ if (e == 0) continue; @@ -20,7 +20,7 @@ if (_sctx->flags®_SAVE_FORCE_REG_FLAG) { /* we are overflowing the number of maximum contacts, so remove the first (oldest) one to prevent this */ -@@ -494,6 +494,7 @@ +@@ -501,6 +501,7 @@ contact_t* _c, struct save_ctx *_sctx) { ucontact_info_t *ci; @@ -28,7 +28,7 @@ ucontact_t* c; int e; unsigned int cflags; -@@ -554,7 +555,7 @@ +@@ -561,7 +562,7 @@ continue; /* we need to add a new contact -> too many ?? */ @@ -37,7 +37,7 @@ if (_sctx->flags®_SAVE_FORCE_REG_FLAG) { /* we are overflowing the number of maximum contacts, so remove the first (oldest) one to prevent this */ -@@ -581,6 +582,23 @@ +@@ -588,6 +589,23 @@ goto error; } diff -r 7894123eadbf -r 1c75a8bb0fec opensips/opensips.patch.rtpproxy --- a/opensips/opensips.patch.rtpproxy Tue Aug 28 18:31:20 2012 +0200 +++ b/opensips/opensips.patch.rtpproxy Tue Aug 28 18:31:35 2012 +0200 @@ -22,7 +22,7 @@ static void handle_query(struct cfg *, int, struct sockaddr_storage *, socklen_t, char *, struct rtpp_session *, int); -+#if defined(__sun__) ++#if defined(__sun) && defined(__SVR4) && !defined(GE_SOL11) +static char +*strsep(char **stringp, const char *delim) +{ diff -r 7894123eadbf -r 1c75a8bb0fec opensips/opensips.spec --- a/opensips/opensips.spec Tue Aug 28 18:31:20 2012 +0200 +++ b/opensips/opensips.spec Tue Aug 28 18:31:35 2012 +0200 @@ -34,8 +34,8 @@ Class: PLUS Group: VoIP License: GPL -Version: 1.7.2 -Release: 20120208 +Version: 1.8.1 +Release: 20120800 # package options %option with_cons yes @@ -70,12 +70,10 @@ Patch5: opensips.patch.rtpproxy # build information -Prefix: %{l_prefix} -BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, make, gcc, flex, bison, sed -PreReq: OpenPKG, openpkg >= 20060823, bash -BuildPreReq: libxml, expat, curl, pkgconfig -PreReq: libxml, expat, curl +BuildPreReq: OpenPKG, openpkg >= 20100101, make, gcc, flex, bison, sed +PreReq: OpenPKG, openpkg >= 20100101, bash +BuildPreReq: libxml, expat, curl, ncurses, pkgconfig +PreReq: libxml, expat, curl, ncurses %if "%{with_cons}" == "yes" PreReq: perl-dbi, perl-term %endif @@ -135,8 +133,6 @@ BuildPreReq: geoip PreReq: geoip %endif -AutoReq: no -AutoReqProv: no %description OpenSIPS is (beside Kamailio) a successor to OpenSER, which in @@ -206,8 +202,7 @@ -e 's;\(-DF_MALLOC\);#\1;' \ -e 's;#\(-DDBG_QM_MALLOC\);\1;' \ %endif - -e 's;\(#define PKG_MEM_POOL_SIZE\) \(1024\*1024\);\1 4*\2;' \ - Makefile.defs \ + -e 's;\(#define PKG_MEM_SIZE\) 2;\1 4;' \ config.h %{l_shtool} subst \ %if "%{with_fsl}" == "yes" @@ -236,6 +231,7 @@ -e 's;\(s#/usr/local/sbin\)#;\1/*#;g' \ -e 's;\(s#/usr/share/doc/$(NAME)/#$(doc-target)\)#;\1/#;g' \ -e 's;\(\$(MAKE).*\) \(install_module_custom\);\1 makefile_defs=0 \2;' \ + -e 's#\(cd menuconfig;\)\$(MAKE) proper;#\1 CC="%{l_cc}" CPPFLAGS="%{l_cppflags ncurses}" LDFLAGS="%{l_ldflags}" LIBS="-lncurses" #' \ Makefile %{l_shtool} subst \ -e 's;^\(LIBS=\).*;\1-L`%{l_prefix}/bin/pkg-config --libs db`;' \ @@ -258,7 +254,7 @@ -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/osipsconsole \ + scripts/osipsconsole %{l_shtool} subst \ -e 's;/usr/local;;g' \ -e 's;\(/etc/opensips/\)\.\(opensipsctlrc\);%{l_prefix}\1\2;g' \ @@ -492,10 +488,21 @@ prefix=%{l_prefix} \ modules + # build menuconfig + %{l_make} %{l_mflags} \ + prefix=%{l_prefix} \ + cfg-prefix=$RPM_BUILD_ROOT%{l_prefix}/etc \ + data-prefix=$RPM_BUILD_ROOT%{l_prefix}/share \ + opensipsmc + # build rtpproxy extension ( cd rtpproxy-%{V_rtpproxy} export CC="%{l_cc}" export CFLAGS="%{l_cflags -O}" + export CPPFLAGS="" + case "%{l_platform -t}" in + *-sunos5.11 ) CPPFLAGS="$CPPFLAGS -DGE_SOL11" ;; + esac export LIBS="" case "%{l_platform -t}" in *-sunos* ) LIBS="$LIBS -lsocket -lnsl -lrt" ;; @@ -506,9 +513,6 @@ ) || exit $? %install - # clean build cruft - rm -rf $RPM_BUILD_ROOT - # select modules modslist='b2b_entities b2b_logic cpl-c db_http identity jabber perl perlvdb presence presence_dialoginfo presence_mwi presence_xml pua pua_bla pua_dialoginfo pua_mi pua_usrloc pua_xmpp regex rls tlsops xcap_client xmpp' %if "%{with_croute}" == "yes" @@ -612,7 +616,6 @@ %files -f files %clean - rm -rf $RPM_BUILD_ROOT %post # on install, setup database (osipsconsole db create /pfx/var/opensips/db)