[prev in list] [next in list] [prev in thread] [next in thread] 

List:       opensuse-commit
Subject:    commit siproxd for openSUSE:Factory
From:       root () hilbert ! suse ! de (h_root)
Date:       2011-06-30 14:57:32
Message-ID: 20110630145732.3B7A0202A5 () hilbert ! suse ! de
[Download RAW message or body]


Hello community,

here is the log from the commit of package siproxd for openSUSE:Factory
checked in at Thu Jun 30 16:57:32 CEST 2011.



--------
--- siproxd/siproxd.changes	2008-04-04 10:45:38.000000000 +0200
+++ /mounts/work_src_done/STABLE/siproxd/siproxd.changes	2011-04-16 \
07:33:18.000000000 +0200 @@ -1,0 +2,42 @@
+Sat Apr 16 05:32:02 UTC 2011 - toganm@opensuse.org
+
+- Added syslog-ng.conf.addon as an example for use with syslog-ng 
+
+-------------------------------------------------------------------
+Tue Jan 18 23:55:32 UTC 2011 - toganm@opensuse.org
+
+- update to 0.8.0 
+  * added logrotate to Requires
+  * SuSEfirewall2.siproxd for services
+
+  * siproxd-libs.patch
+    Code to detect libltdl was placed before the code that populates
+    the library locations.
+    This caused libltdl to be undetected even after it was installed
+    locally. The patch moves the library detection code in front of
+    libltdl detection    and also adds standard library (and include)
+    locations, ie. /usr/local/lib After applying the patch, autogen.sh
+    needs to be run (which, among other things, rebuilds "configure").
+
+  * siproxd-log.c.patch
+    patch from debian use logger not user
+
+  * siproxd-plugin_shortdial.c.patch                
+    fixes warning comparison is always false due to limited range of data type
+
+  * siproxd-siproxd.c.patch
+    fixes the warning by using a more portable method of printing size_t values
+
+  * siproxd-sock.c.patch
+    Fixes compile warning
+  * siproxd-Makefile.am.patch
+  * siproxd-configure.in.patch
+    backported from 0.81.dev
+  * removed siproxd-md5.patch as fixed in upstream
+  * siproxd.plugin_fix_bogus_via.c.patch
+
+  * added man page for siproxd 
+  * use CFLAGS -Wall only with GCC compiler (patch)
+  * fixed UA masquerading which was always set ("foobar")- (patch
+
+-------------------------------------------------------------------

calling whatdependson for head-i586


Old:
----
  siproxd-0.7.0.tar.bz2

New:
----
  duplicate-line-siproxd.c.patch
  gcc-flags-fix.patch
  siproxd-0.8.0.tar.bz2
  siproxd-Makefile.am.patch
  siproxd-configure.in.patch
  siproxd-dejitter.c.patch
  siproxd-libs.patch
  siproxd-log.c.patch
  siproxd-plugin_shortdial.c.patch
  siproxd-siproxd.c.patch
  siproxd-sock.c.patch
  siproxd.8.gz
  siproxd.init.in
  siproxd.logrotate
  siproxd.plugin_fix_bogus_via.c.patch
  susefirewall2.siproxd
  syslog-ng.conf.addon

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ siproxd.spec ++++++
--- /var/tmp/diff_new_pack.pYoqbk/_old	2011-06-30 16:52:47.000000000 +0200
+++ /var/tmp/diff_new_pack.pYoqbk/_new	2011-06-30 16:52:47.000000000 +0200
@@ -1,7 +1,7 @@
 #
-# spec file for package siproxd (Version 0.7.0)
+# spec file for package siproxd
 #
-# Copyright (c) 2009 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -15,60 +15,163 @@
 # Please submit bugfixes or comments via http://bugs.opensuse.org/
 #
 
-# norootforbuild
 
+#
+%define piddir          /var/run/siproxd/
+%define regdir          /var/lib/siproxd/
+%define siproxduser     nobody
 
 Name:           siproxd
-BuildRequires:  libosip2-devel
-License:        GPL v2 or later
-Group:          Productivity/Networking/Other
+Version:        0.8.0
+Release:        1
+License:        GPLv2+
 Summary:        A SIP masquerading proxy with RTP support
-Version:        0.7.0
-Release:        44
-AutoReqProv:    on
-BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 Url:            http://siproxd.sourceforge.net/
-Source:         siproxd-%{version}.tar.bz2
-Patch:          siproxd-md5.patch
+Group:          Productivity/Networking/Other
+Source0:        %{name}-%{version}.tar.bz2
+Source1:        susefirewall2.%{name}
+Source2:        %name.init.in
+Source3:        %name.logrotate
+Source4:        %name.8.gz
+Source5:        syslog-ng.conf.addon	
+# PATCH-FIX-FOR-UPSTREAM -- \
http://sourceforge.net/tracker/?func=detail&aid=3086321&group_id=60374&atid=493974 \
+#Code to detect libltdl was placed before the code that populates the library \
locations. +#This caused libltdl to be undetected even after it was installed \
locally. +#The patch moves the library detection code in front of libltdl detection
+#and also adds standard library (and include) locations, ie. /usr/local/lib
+#After applying the patch, autogen.sh needs to be run (which, among other things, \
rebuilds "configure"). +Patch0:         siproxd-libs.patch
+#PATCH-FIX-FROM-DEBIAN use logger not user
+Patch1:         siproxd-log.c.patch
+# PATCH-FIX-FOR-UPSTREAM fixes warning comparison is always false due to limited \
range of data type +#http://sourceforge.net/tracker/?func=detail&aid=3086351&group_id=60374&atid=493974
 +Patch2:         siproxd-plugin_shortdial.c.patch		
+# PATCH-FIX-FOR-UPSTREAM \
http://sourceforge.net/tracker/?func=detail&aid=3086593&group_id=60374&atid=493974 \
+#The fixes the warning by using a more portable method of printing size_t values \
+Patch3:         siproxd-siproxd.c.patch +# PATCH-FIX-FOR-UPSTREAM Fixes compile \
warning +#http://sourceforge.net/tracker/?func=detail&aid=3086371&group_id=60374&atid=493974
 +Patch4:         siproxd-sock.c.patch
+#backported from 0.81.dev
+Patch5:         siproxd-Makefile.am.patch
+Patch6:         siproxd-configure.in.patch
+#fixed in upstream
+Patch7:         siproxd-md5.patch 
+# PATCH-FIXED-IN-UPSTREAM simplify linked-list addressing
+#http://sourceforge.net/tracker/?func=detail&aid=3086381&group_id=60374&atid=493974
+Patch8:         siproxd-dejitter.c.patch
+Patch9:         siproxd.plugin_fix_bogus_via.c.patch
+#PATCH backported from 0.8.1.dev
+Patch10:        duplicate-line-siproxd.c.patch
+Patch11:        gcc-flags-fix.patch 
+BuildRequires:  docbook-utils libltdl libosip2 libosip2-devel libtool
+Requires:       logrotate
+Suggests:       SuSEfirewall2
+
+BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 
 %description
-Siprox is an proxy/masquerading daemon for the SIP protocol. It handles
+Siproxd is an proxy/masquerading daemon for the SIP protocol. It handles
 registrations of SIP clients on a private IP network and performs
 rewriting of the SIP message bodies to make SIP connections possible
 via an masquerading firewall. It allows SIP clients (like kphone,
 linphone) to work behind an IP masquerading firewall or router.
 
+%package doc
+Summary:        Documentation for %{name}
+License:        GPLv2+
+Group:          Documentation/Other 
 
-
-Authors:
---------
-    Thomas Ries  <tries@gmx.net>
+%description doc
+HTML and pdf documentation for %{name}
 
 %prep
-%setup -q -n siproxd-0.7.0
-%patch
+%setup -q  
+
+%patch0 -p1	 
+%patch1  
+%patch2 
+%patch3	
+%patch4
+%patch5
+%patch6 -p1
+#%%patch7
+#%%patch8
+%patch9 -p1
+%patch10
+%patch11
+
+cp %{S:5} .
 
 %build
 autoreconf --install --force
-CFLAGS="$RPM_OPT_FLAGS" ./configure \
-  --prefix=%_prefix \
-  --sysconfdir=%{_sysconfdir}
-make
+CFLAGS="%{optflags} -fno-strict-aliasing" ./configure \
+  --prefix=%{_prefix} \
+  --sysconfdir=%{_sysconfdir} \
+  --disable-static \
+  --libdir=%{_libdir}\
+  --docdir=%{_defaultdocdir}
+
+%{__make} %{?_smp_mflags}
 
 %install
-rm -rf $RPM_BUILD_ROOT
-make DESTDIR=$RPM_BUILD_ROOT install
+%make_install
+find %{buildroot} -type f -name "*.la" -delete -print
+%{__mkdir} -p %{buildroot}%{_sysconfdir}/%{name}
+%{__mv} %{buildroot}%{_sysconfdir}/%{name}.conf.example \
+   %{buildroot}%{_sysconfdir}/%{name}/%{name}.conf
+
+%{__install} -d %{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/  
+%{__install} -m 644 %{S:1} \
%{buildroot}%{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}   +
+%{__install} -d %buildroot/%{_sysconfdir}/logrotate.d/  
+%{__install} -m 0644 %{S:3} %buildroot/%{_sysconfdir}/logrotate.d/%{name}
+
+%{__install} -d %buildroot/%{_sysconfdir}/init.d 
+%{__install} %{S:2} %buildroot/%{_sysconfdir}/init.d/%{name}  
+%{__sed} -i "s#@%{name}_PIDDIR@#%{_localstatedir}/run/%{name}#" \
%buildroot/%{_sysconfdir}/init.d/%{name} +
+%{__mkdir} -p %buildroot%_mandir/man8
+%__install -m 0644 %{S:4} %{buildroot}%{_mandir}/man8/%name.8.gz
+
 # cleanup
-rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/siproxd.conf.example
-rm -f $RPM_BUILD_ROOT/%{_sysconfdir}/siproxd_passwd.cfg
+%{__rm} -f %{buildroot}%{_sysconfdir}/siproxd_passwd.cfg
+%{__rm} -f %{buildroot}%{_libdir}/%{name}/*.a 
+%{__rm} -rf %{buildroot}/usr/share/doc/%{name}
 
 %clean
-rm -rf $RPM_BUILD_ROOT
+%{__rm} -rf %{buildroot}
+
+%post -p  /sbin/ldconfig
+
+%postun -p /sbin/ldconfig
+
+%preun
+%stop_on_removal %{name}
 
 %files
 %defattr(-,root,root)
-%doc COPYING README AUTHORS INSTALL NEWS ChangeLog
-%doc doc/siproxd.conf.example doc/siproxd_passwd.cfg
-%{_sbindir}/siproxd
+%doc COPYING README AUTHORS INSTALL ChangeLog syslog-ng.conf.addon 
+%doc doc/siproxd.conf.example doc/siproxd_passwd.cfg doc/FAQ doc/KNOWN_BUGS \
doc/sample_*  +%attr(0755,root,root) %{_libdir}/%{name}/
+%{_sbindir}/%name
+%attr(0755,root,root) %{_sysconfdir}/init.d/%name
+%config %{_sysconfdir}/logrotate.d/%{name}
+%config(noreplace) %{_sysconfdir}/%{name}/%{name}.conf
+
+%config %{_sysconfdir}/sysconfig/SuSEfirewall2.d/services/%{name}  
+
+%_mandir/man8/%name.8*
+
+%dir %_sysconfdir/%name
+
+%if %suse_version > 1120
+ #make rpm know about a directory but do not package it
+   %attr(0750,nobody,root) %ghost %{_localstatedir}/run/%{name}
+%endif
+
+%files doc
+%defattr(-,root,root)
+%doc doc/html/* doc/pdf/*
 
 %changelog

++++++ duplicate-line-siproxd.c.patch ++++++
--- src/siproxd.c.orig
+++ src/siproxd.c
@@ -81,7 +81,6 @@ static cfgopts_t main_cfg_opts[] = {
    { "default_expires",     TYP_INT4,   \
&configuration.default_expires,		{DEFAULT_EXPIRES, NULL} },  { \
"autosave_registrations",TYP_INT4, &configuration.autosave_registrations,	{0, NULL} \
},  { "ua_string",           TYP_STRING, &configuration.ua_string,		{0, NULL} },
-   { "ua_string",           TYP_STRING, &configuration.ua_string,		{0, "foobar"} },
    { "use_rport",           TYP_INT4,   &configuration.use_rport,		{0, NULL} },
    { "obscure_loops",       TYP_INT4,   &configuration.obscure_loops,		{0, NULL} },
    { "plugindir",           TYP_STRING, &configuration.plugin_dir,		{0, NULL} },
++++++ gcc-flags-fix.patch ++++++
--- src/Makefile.am.orig
+++ src/Makefile.am
@@ -19,7 +19,7 @@
 #
 
 
-AM_CFLAGS = -Wall -D_GNU_SOURCE \
+AM_CFLAGS = -D_GNU_SOURCE \
             -DBUILDSTR="\"`cat .buildno`\""
 
 #
--- src/Makefile.in.orig
+++ src/Makefile.in
@@ -264,7 +264,7 @@ target_alias = @target_alias@
 target_cpu = @target_cpu@
 target_os = @target_os@
 target_vendor = @target_vendor@
-AM_CFLAGS = -Wall -D_GNU_SOURCE \
+AM_CFLAGS =  -D_GNU_SOURCE \
             -DBUILDSTR="\"`cat .buildno`\""
 
 
++++++ siproxd-0.7.0.tar.bz2 -> siproxd-0.8.0.tar.bz2 ++++++
++++ 87769 lines of diff (skipped)

++++++ siproxd-Makefile.am.patch ++++++
--- Makefile.am.orig
+++ Makefile.am
@@ -19,7 +19,11 @@
 #
 
 
-SUBDIRS = libltdl src doc scripts contrib
+if use_convenience_ltdl
+	OPT_LTDL_DIR=libtdl
+endif
+
+SUBDIRS = $(OPT_LTDL_DIR) src doc scripts contrib
 INCLUDES = $(LTDLINCL)
 
 EXTRA_DIST = TODO RELNOTES siproxd.spec autogen.sh
++++++ siproxd-configure.in.patch ++++++
--- siproxd-0.8.0/configure.in	2010-02-23 23:23:18.000000000 +0100
+++ siproxd-0.8.1dev/configure.in	2010-09-13 19:05:10.000000000 +0200
@@ -47,6 +47,9 @@
 dnl				be statically linked into siproxd)
 dnl	19-Feb-2010	tries	CVE-2009-3736: use libltdl on host if existing
 dnl				and fall back using convenienve libltdl (WARN)
+dnl	26-Apr-2010	tries	Fresh building from distribuion TAR did fail if
+dnl				the host-installed libltdl lib is used (and not the
+dnl				convenience lib)
 dnl
 dnl
 
@@ -108,6 +111,9 @@
 
 if test "x$use_native_ltdl" = "xno"; then
    AC_LIBLTDL_CONVENIENCE
+   AM_CONDITIONAL(use_convenience_ltdl,true)
+else
+   AM_CONDITIONAL(use_convenience_ltdl,false)
 fi
 
 dnl
@@ -121,12 +127,14 @@
 dnl this is only done if no native libltdl is found.
 
 if test "x$use_native_ltdl" = "xyes"; then
+   true;
    LIBS="$LIBS -lltdl";
 else
+   true;
    AC_SUBST(LTDLINCL)
    AC_SUBST(LIBLTDL)
-   AC_CONFIG_SUBDIRS(libltdl)
 fi
+AC_CONFIG_SUBDIRS(libltdl)
 
 
 dnl **********************************************
@@ -463,6 +471,7 @@
 AC_CHECK_FUNCS(getopt_long setsid syslog)
 AC_CHECK_FUNCS(getuid setuid getgid setgid getpwnam chroot)
 AC_CHECK_FUNCS(socket bind select read send sendto fcntl)
+AC_CHECK_FUNCS(getifaddrs)
 AC_CHECK_FUNCS(strcmp strcasecmp)
 AC_CHECK_FUNCS(strncpy strchr strstr sprintf vfprintf vsnprintf)
 AC_CHECK_FUNCS(listen accept)
++++++ siproxd-dejitter.c.patch ++++++
--- src/dejitter.c.orig
+++ src/dejitter.c
@@ -93,7 +93,7 @@ void dejitter_delayedsendto(int s, const
                             const struct timeval *current_tv,
                             rtp_proxytable_t *errret, int nolock) {
    rtp_delayed_message *m;
-   rtp_delayed_message **linkin;
+   rtp_delayed_message *linkin;
 
    if (!free_memory) send_top_of_que(nolock);
 
@@ -113,13 +113,13 @@ void dejitter_delayedsendto(int s, const
       msg_que = m;
       send_top_of_que(nolock);
    } else {
-      linkin = &msg_que;
-      while ((*linkin != NULL) &&
-             (cmp_time_values(&((*linkin)->transm_time),tv) < 0)) {
-         linkin = (rtp_delayed_message **)&((*linkin)->next);
+      linkin = msg_que;
+      while ((linkin != NULL) &&
+             (cmp_time_values(&((linkin->transm_time),tv) < 0)) {
+	     linkin = linkin->next;
       }
-      m->next = *linkin;
-      *linkin = m;
+      m->next = linkin;
+      linkin = m;
    }
 }
 
@@ -127,19 +127,19 @@ void dejitter_delayedsendto(int s, const
  * Cancel a message
  */
 void dejitter_cancel(rtp_proxytable_t *dropentry) {
-   rtp_delayed_message **linkout;
+   rtp_delayed_message *linkout;
    rtp_delayed_message *m;
 
-   linkout = &msg_que;
+   linkout = msg_que;
 
-   while (*linkout != NULL) {
-      if ((*linkout)->errret == dropentry) {
-         m = *linkout;
-         *linkout = m->next;
+   while (linkout != NULL) {
+      if ((linkout->errret == dropentry) {
+         m = linkout;
+         linkout = m->next;
          m->next = free_memory;
          free_memory = m;
       } else {
-         linkout = (rtp_delayed_message **)&((*linkout)->next);
+	 linkout = linkout->next;
       }
    }
 }
@@ -392,7 +392,7 @@ static void send_top_of_que(int nolock)
          if ((sts == -1) && (m->errret != NULL) && (errno != ECONNREFUSED)) {
             osip_call_id_t callid;
 
-            ERROR("sendto() [%s:%i size=%i] delayed call failed: %s",
+            ERROR("sendto() [%s:%i size=%zd] delayed call failed: %s",
                   utils_inet_ntoa(m->errret->remote_ipaddr),
                   m->errret->remote_port, m->message_len, strerror(errno));
 
++++++ siproxd-libs.patch ++++++
--- siproxd-0.8.0/configure.in.orig
+++ siproxd-0.8.0/configure.in
@@ -133,6 +133,9 @@ dnl ************************************
 dnl * Location of libraries / headerfiles
 dnl **********************************************
 
+SRCH_INC="/usr/include"
+SRCH_LIB="/usr/lib"
+
 dnl
 dnl    --with-extra-includes
 dnl    --with-extra-libs
@@ -159,6 +162,12 @@ for each in $extra_libs; do
    LIBS="$LIBS -L$each";
 done
 
+LDFLAGS="$LDFLAGS $LIBS"
+AC_MSG_NOTICE([using CPPFLAGS=$CPPFLAGS])
+AC_MSG_NOTICE([using LDFLAGS=$LDFLAGS])
+
+
+
 
 dnl **********************************************
 dnl * Building doc
++++++ siproxd-log.c.patch ++++++
--- src/log.c.orig
+++ src/log.c
@@ -249,7 +249,7 @@ static void output_to_syslog(const char
    va_copy(ap_copy, ap);
    vsnprintf(outbuf, sizeof(outbuf), format, ap_copy);
    va_end(ap_copy);
-   syslog(LOG_USER|level, "%s:%i %s%s", file, line, label, outbuf);
+   syslog(LOG_DAEMON|level, "%s:%i %s%s", file, line, label, outbuf);
    return;
 }
 
++++++ siproxd-plugin_shortdial.c.patch ++++++
--- src/plugin_shortdial.c.orig
+++ src/plugin_shortdial.c
@@ -136,7 +136,7 @@ static int plugin_shortdial(sip_ticket_t
       return STS_SUCCESS; /* ignore */
 
    shortcut_no = atoi(&(req_url->username[1]));
-   if ((shortcut_no <= 0) || (shortcut_no >= LONG_MAX)) return STS_SUCCESS; /* not a \
number */ +   if ((shortcut_no <= 0) || (shortcut_no >= INT_MAX)) return STS_SUCCESS; \
/* not a number */  
    /* requested number is not defined (out of range) */
    if (shortcut_no > plugin_cfg.shortdial_entry.used) {
++++++ siproxd-siproxd.c.patch ++++++
--- src/siproxd.c.orig
+++ src/siproxd.c
@@ -384,7 +384,7 @@ int main (int argc, char *argv[])
        * got input, process
        */
       buflen = (size_t)sts;
-      DEBUGC(DBCLASS_BABBLE,"received %i bytes of data", buflen);
+      DEBUGC(DBCLASS_BABBLE,"received %zd bytes of data", buflen);
       ticket.direction=0;
       buff[buflen]='\0';
 
++++++ siproxd-sock.c.patch ++++++
--- src/sock.c.orig
+++ src/sock.c
@@ -724,7 +724,7 @@ static int tcp_connect(struct sockaddr_i
       return -1;
    }
 
-   sts=connect(sock, &dst_addr, sizeof(struct sockaddr_in));
+   sts=connect(sock, (struct sockaddr *)&dst_addr, sizeof(struct sockaddr_in));
    if ((sts == -1 ) && (errno == EINPROGRESS)) {
       /* if non-blocking connect(), wait until connection 
          successful, discarded or timeout */
@@ -750,11 +750,11 @@ static int tcp_connect(struct sockaddr_i
          } else if (sts > 0) {
             /* fd available for write */
             int valopt;
-            int optlen=sizeof(valopt);
+            socklen_t optlen=sizeof(valopt);
 
             /* get error status from delayed connect() */
             if (getsockopt(sock, SOL_SOCKET, SO_ERROR, 
-                           (void*)(&valopt), &optlen) < 0) {
+		    	   &valopt, &optlen) < 0) {
                ERROR("getsockopt(SO_ERROR) failed: %s",strerror(errno));
                close(sock);
                return -1;
++++++ siproxd.init.in ++++++
#!/bin/sh
#
#     Template SUSE system startup script for example service/daemon siproxd
#     Copyright (C) 1995--2005  Kurt Garloff, SUSE / Novell Inc.
#          
#     This library is free software; you can redistribute it and/or modify it
#     under the terms of the GNU Lesser General Public License as published by
#     the Free Software Foundation; either version 2.1 of the License, or (at
#     your option) any later version.
#			      
#     This library is distributed in the hope that it will be useful, but
#     WITHOUT ANY WARRANTY; without even the implied warranty of
#     MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
#     Lesser General Public License for more details.
#      
#     You should have received a copy of the GNU Lesser General Public
#     License along with this library; if not, write to the Free Software
#     Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307,
#     USA.
#
# /etc/init.d/siproxd
#   and its symbolic link
# /(usr/)sbin/rcsiproxd
#
# Template system startup script for some example service/daemon siproxd
#
# LSB compatible service control script; see http://www.linuxbase.org/spec/
# 
# Note: This template uses functions rc_XXX defined in /etc/rc.status on
# UnitedLinux/SUSE/Novell based Linux distributions. If you want to base your
# script on this template and ensure that it works on non UL based LSB 
# compliant Linux distributions, you either have to provide the rc.status
# functions from UL or change the script to work without them.
# See skeleton.compat for a template that works with other distros as well.
#
### BEGIN INIT INFO
# Provides:          siproxd
# Required-Start:    $syslog $network $remote_fs
# Should-Start:      SuSEfirewall2_setup
# Required-Stop:     $syslog 
# Should-Stop:       $null
# Default-Start:     3 5
# Default-Stop:      0 1 2 6
# Short-Description: siproxd provedes proxy functionality for sip
# Description:       siproxd provedes proxy functionality for sip
#	veri useful to bypass SIP-NAT problems
### END INIT INFO
# 
# Any extensions to the keywords given above should be preceeded by 
# X-VendorTag- (X-UnitedLinux- X-SuSE- for us) according to LSB.
# 
# Notes on Required-Start/Should-Start:
# * There are two different issues that are solved by Required-Start
#    and Should-Start
# (a) Hard dependencies: This is used by the runlevel editor to determine
#     which services absolutely need to be started to make the start of
#     this service make sense. Example: nfsserver should have
#     Required-Start: $portmap
#     Also, required services are started before the dependent ones.
#     The runlevel editor will warn about such missing hard dependencies
#     and suggest enabling. During system startup, you may expect an error,
#     if the dependency is not fulfilled.
# (b) Specifying the init script ordering, not real (hard) dependencies.
#     This is needed by insserv to determine which service should be
#     started first (and at a later stage what services can be started
#     in parallel). The tag Should-Start: is used for this.
#     It tells, that if a service is available, it should be started
#     before. If not, never mind.
# * When specifying hard dependencies or ordering requirements, you can 
#   use names of services (contents of their Provides: section)
#   or pseudo names starting with a $. The following ones are available
#   according to LSB (1.1):
#	$local_fs		all local file systems are mounted
#				(most services should need this!)
#	$remote_fs		all remote file systems are mounted
#				(note that /usr may be remote, so
#				 many services should Require this!)
#	$syslog			system logging facility up
#	$network		low level networking (eth card, ...)
#	$named			hostname resolution available
#	$netdaemons		all network daemons are running
#   The $netdaemons pseudo service has been removed in LSB 1.2.
#   For now, we still offer it for backward compatibility.
#   These are new (LSB 1.2):
#	$time			the system time has been set correctly	
#	$portmap		SunRPC portmapping service available
#   UnitedLinux extensions:
#	$ALL			indicates that a script should be inserted
#				at the end
# * The services specified in the stop tags 
#   (Required-Stop/Should-Stop)
#   specify which services need to be still running when this service
#   is shut down. Often the entries there are just copies or a subset 
#   from the respective start tag.
# * Should-Start/Stop are now part of LSB as of 2.0,
#   formerly SUSE/Unitedlinux used X-UnitedLinux-Should-Start/-Stop.
#   insserv does support both variants.
# * X-UnitedLinux-Default-Enabled: yes/no is used at installation time
#   (%fillup_and_insserv macro in %post of many RPMs) to specify whether
#   a startup script should default to be enabled after installation.
#   It's not used by insserv.
#
# Note on runlevels:
# 0 - halt/poweroff 			6 - reboot
# 1 - single user			2 - multiuser without network exported
# 3 - multiuser w/ network (text mode)  5 - multiuser w/ network and X11 (xdm)
# 
# Note on script names:
# http://www.linuxbase.org/spec/refspecs/LSB_1.3.0/gLSB/gLSB/scrptnames.html
# A registry has been set up to manage the init script namespace.
# http://www.lanana.org/
# Please use the names already registered or register one or use a
# vendor prefix.


# Check for missing binaries (stale symlinks should not happen)
# Note: Special treatment of stop for LSB conformance
siproxd_BIN=/usr/sbin/siproxd
test -x $siproxd_BIN || { echo "$siproxd_BIN not installed"; 
	if [ "$1" = "stop" ]; then exit 0;
	else exit 5; fi; }

# Check for existence of needed config file and read it
#siproxd_CONFIG=/etc/sysconfig/siproxd
#test -r $siproxd_CONFIG || { echo "$siproxd_CONFIG not existing";
#	if [ "$1" = "stop" ]; then exit 0;
#	else exit 6; fi; }

# Read config	
#. $siproxd_CONFIG

# Check for existence of siproxd.conf file
siproxd_CONF=/etc/siproxd/siproxd.conf
test -r $siproxd_CONF || { echo "$siproxd_CONF not existing please provide one \
(copying template), see rpm -ql siproxd";  if [ "$1" = "stop" ]; then exit 0;
	else exit 6; fi; }

siproxd_PIDDIR=@siproxd_PIDDIR@
if [ ! -d $siproxd_PIDDIR ]; then
 mkdir -p $siproxd_PIDDIR
 chown nobody:root $siproxd_PIDDIR
fi


# Source LSB init functions
# providing start_daemon, killproc, pidofproc, 
# log_success_msg, log_failure_msg and log_warning_msg.
# This is currently not used by UnitedLinux based distributions and
# not needed for init scripts for UnitedLinux only. If it is used,
# the functions from rc.status should not be sourced or used.
#. /lib/lsb/init-functions

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     be verbose in local rc status and clear it afterwards
#      rc_status -v -r  ditto and clear both the local and overall rc status
#      rc_status -s     display "skipped" and exit with status 3
#      rc_status -u     display "unused" and exit with status 3
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num>
#      rc_reset         clear both the local and overall rc status
#      rc_exit          exit appropriate to overall rc status
#      rc_active        checks whether a service is activated by symlinks
. /etc/rc.status

# Reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0	  - success
# 1       - generic or unspecified error
# 2       - invalid or excess argument(s)
# 3       - unimplemented feature (e.g. "reload")
# 4       - user had insufficient privileges
# 5       - program is not installed
# 6       - program is not configured
# 7       - program is not running
# 8--199  - reserved (8--99 LSB, 100--149 distrib, 150--199 appl)
# 
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signaling is not supported) are
# considered a success.

case "$1" in
    start)
	echo -n "Starting siproxd "
	## Start daemon with startproc(8). If this fails
	## the return value is set appropriately by startproc.
        [ -d /var/run/siproxd ] || install -o nobody -d $siproxd_PIDDIR
	/sbin/startproc $siproxd_BIN -c /etc/siproxd/siproxd.conf -p \
$siproxd_PIDDIR/siproxd.pid

	# Remember status and be verbose
	rc_status -v
	;;
    stop)
	echo -n "Shutting down siproxd "
	## Stop daemon with killproc(8) and if this fails
	## killproc sets the return value according to LSB.

	/sbin/killproc -TERM $siproxd_BIN

	# Remember status and be verbose
	rc_status -v
	;;
    try-restart|condrestart)
	## Do a restart only if the service was active before.
	## Note: try-restart is now part of LSB (as of 1.9).
	## RH has a similar command named condrestart.
	if test "$1" = "condrestart"; then
		echo "${attn} Use try-restart ${done}(LSB)${attn} rather than condrestart \
${warn}(RH)${norm}"  fi
	$0 status
	if test $? = 0; then
		$0 restart
	else
		rc_reset	# Not running is not a failure.
	fi
	# Remember status and be quiet
	rc_status
	;;
    restart)
	## Stop the service and regardless of whether it was
	## running or not, start it again.
	$0 stop
	$0 start

	# Remember status and be quiet
	rc_status
	;;
    force-reload)
	## Signal the daemon to reload its config. Most daemons
	## do this on signal 1 (SIGHUP).
	## If it does not support it, restart the service if it
	## is running.

	echo -n "Reload service siproxd "
	## if it supports it:
	#/sbin/killproc -HUP $siproxd_BIN
	#touch /var/run/siproxd.pid
	#rc_status -v

	## Otherwise:
	$0 try-restart
	rc_status
	;;
    reload)
	## Like force-reload, but if daemon does not support
	## signaling, do nothing (!)

	# If it supports signaling:
	#echo -n "Reload service siproxd "
	#/sbin/killproc -HUP $siproxd_BIN
	#touch /var/run/siproxd.pid
	#rc_status -v
	
	## Otherwise if it does not support reload:
	rc_failed 3
	rc_status -v
	;;
    status)
	echo -n "Checking for service siproxd "
	## Check status with checkproc(8), if process is running
	## checkproc will return with exit status 0.

	# Return value is slightly different for the status command:
	# 0 - service up and running
	# 1 - service dead, but /var/run/  pid  file exists
	# 2 - service dead, but /var/lock/ lock file exists
	# 3 - service not running (unused)
	# 4 - service status unknown :-(
	# 5--199 reserved (5--99 LSB, 100--149 distro, 150--199 appl.)
	
	# NOTE: checkproc returns LSB compliant status values.
	/sbin/checkproc $siproxd_BIN
	# NOTE: rc_status knows that we called this init script with
	# "status" option and adapts its messages accordingly.
	rc_status -v
	;;
    probe)
	## Optional: Probe for the necessity of a reload, print out the
	## argument to this init script which is required for a reload.
	## Note: probe is not (yet) part of LSB (as of 1.9)

	test /etc/siproxd/siproxd.conf -nt $siproxd_PIDDIR/siproxd.pid && echo reload
	;;
    *)
	echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}"
	exit 1
	;;
esac
rc_exit
++++++ siproxd.logrotate ++++++
#
# Please note, that changing of log file permissions in this
# file is not sufficient if syslog-ng is used as log daemon.
#
# It is required to specify the permissions in the syslog-ng
# configuration file /etc/syslog-ng/syslog-ng.conf as well.
#

# the firewall,acpid,NetworkManager log files
# are used by syslog-ng and rsyslog only, the
# other by all syslog daemons.
/var/log/siproxd.log {
    compress
    dateext
    maxage 365
    rotate 99
    missingok
    notifempty
    size +4096k
    create 640 root root
    sharedscripts
    postrotate
        /etc/init.d/siproxd restart
    endscript
}
++++++ siproxd.plugin_fix_bogus_via.c.patch ++++++
diff -ur siproxd-0.8.1dev.orig/src/plugin_fix_bogus_via.c \
                siproxd-0.8.1dev/src/plugin_fix_bogus_via.c
--- siproxd-0.8.1dev.orig/src/plugin_fix_bogus_via.c	2010-01-07 12:44:38.000000000 \
                +0100
+++ siproxd-0.8.1dev/src/plugin_fix_bogus_via.c	2010-11-01 23:07:12.142684601 +0100
@@ -103,7 +103,7 @@
 
    /* Incoming SIP message? */
 DEBUGC(DBCLASS_PLUGIN, "plugin_fix_bogus_via: type=%i", type);
-   if (type == REQTYP_INCOMING) {
+   if (type == REQTYP_INCOMING ) {
 
       if((via = osip_list_get(&(ticket->sipmsg->vias), 0)) == NULL) {
          WARN("no Via header found in incoming SIP message");
@@ -121,6 +121,9 @@
          if (sip_patch_topvia(ticket) == STS_FAILURE) {
             ERROR("patching inbound Via failed!");
          }
+      } else {
+	 char *in=inet_ntoa(from.sin_addr);
+	 DEBUGC(DBCLASS_PLUGIN, "plugin_fix_bogus_via: addr %s non in network acl %s", in, \
plugin_cfg.networks);  }
    }
    return STS_SUCCESS;
Solo in siproxd-0.8.1dev/src: tags
++++++ susefirewall2.siproxd ++++++
#
# For a more detailed description of the individual variables see
# the comments for FW_SERVICES_*_EXT in /etc/sysconfig/SuSEfirewall2
#

## Name: VOIP with siproxd 
## Description: opens ports for siproxd in order to allow sip and rtp

# space separated list of allowed UDP ports
UDP="5060 7070:7079"

### variables below are only needed in very special cases

# space separated list of net,protocol[,sport[,dport]]
# see FW_SERVICES_ACCEPT_RELATED_EXT
# net 0/0 means IPv4 and IPv6. If this sevice should only work for
# IPv4 use 0.0.0.0/0
RELATED=""

# additional kernel modules needed for this service
# see FW_LOAD_MODULES
MODULES=""
++++++ syslog-ng.conf.addon ++++++
#to disable logging in messages file, please correct syntax!!!!
filter f_messages   { not facility(news, mail) and not filter(f_iptables) [and not \
filter(yourfilter)] and not filter(f_siproxd); };

#in filter section
filter f_siproxd    { facility(user) and match('^siproxd'); };

#in destination section
#
# siproxd messages in one file
#
destination siproxd { file("/var/log/siproxd.log"); };
log { source(src); filter(f_siproxd); destination(siproxd); };


++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++



Remember to have fun...

-- 
To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org
For additional commands, e-mail: opensuse-commit+help@opensuse.org


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic