From 14b7455e2f6537583f45f76219f5d411cac35337 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Apr 27 2012 11:38:53 +0000 Subject: Fixed systemd and added IPv6 Signed-off-by: Peter Lemenkov --- diff --git a/sems-0001-Force-to-use-system-wide-GSM-includes.patch b/sems-0001-Force-to-use-system-wide-GSM-includes.patch index 7dbad33..b61a654 100644 --- a/sems-0001-Force-to-use-system-wide-GSM-includes.patch +++ b/sems-0001-Force-to-use-system-wide-GSM-includes.patch @@ -1,7 +1,7 @@ From 6d521cb639807a7e93954d05c8440724a289a38f Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 31 Mar 2010 11:52:52 +0400 -Subject: [PATCH 01/12] Force to use system-wide GSM includes +Subject: [PATCH 01/14] Force to use system-wide GSM includes Signed-off-by: Peter Lemenkov --- diff --git a/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch b/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch index c460bd8..ca49438 100644 --- a/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch +++ b/sems-0002-Allow-rewrite-of-custom-makefiles-by-CMake.patch @@ -1,7 +1,7 @@ From 456f9912196a27bed7418b43ecaf1ac69768dbd5 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 31 Mar 2010 11:53:48 +0400 -Subject: [PATCH 02/12] Allow rewrite of custom makefiles by CMake +Subject: [PATCH 02/14] Allow rewrite of custom makefiles by CMake Signed-off-by: Peter Lemenkov --- diff --git a/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch b/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch index a4fc473..c1fa55b 100644 --- a/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch +++ b/sems-0003-Set-CFG_PREFIX-to-empty-string-by-default.patch @@ -1,7 +1,7 @@ From fb8a5f575cceba39e3a73561b50d565797fb5d37 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 31 Mar 2010 18:56:39 +0400 -Subject: [PATCH 03/12] Set CFG_PREFIX to empty string by default +Subject: [PATCH 03/14] Set CFG_PREFIX to empty string by default Signed-off-by: Peter Lemenkov --- diff --git a/sems-0004-Disable-mysql-in-conference-and-early_announce-modul.patch b/sems-0004-Disable-mysql-in-conference-and-early_announce-modul.patch index 06f278c..c0f4fbe 100644 --- a/sems-0004-Disable-mysql-in-conference-and-early_announce-modul.patch +++ b/sems-0004-Disable-mysql-in-conference-and-early_announce-modul.patch @@ -1,7 +1,7 @@ From 29cc8539cfa4030f40b0e92527893e34acbee009 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Fri, 25 Jun 2010 12:16:45 +0400 -Subject: [PATCH 04/12] Disable mysql++ in conference and early_announce +Subject: [PATCH 04/14] Disable mysql++ in conference and early_announce modules Unfortunately, this breaks existing configurations, which is a diff --git a/sems-0005-Add-sw_prepaid_sip-plugin-to-default-exclude-list-du.patch b/sems-0005-Add-sw_prepaid_sip-plugin-to-default-exclude-list-du.patch index acef2f3..c97001f 100644 --- a/sems-0005-Add-sw_prepaid_sip-plugin-to-default-exclude-list-du.patch +++ b/sems-0005-Add-sw_prepaid_sip-plugin-to-default-exclude-list-du.patch @@ -1,7 +1,7 @@ From 6f4fa250de15cf99e6dc21b308f9ee24c0a79086 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Mon, 27 Sep 2010 14:13:00 +0400 -Subject: [PATCH 05/12] Add sw_prepaid_sip plugin to default exclude list (due +Subject: [PATCH 05/14] Add sw_prepaid_sip plugin to default exclude list (due to missing cc_acc) Signed-off-by: Peter Lemenkov diff --git a/sems-0006-Don-t-start-py_sems-by-default.patch b/sems-0006-Don-t-start-py_sems-by-default.patch index 759d62c..573f2f3 100644 --- a/sems-0006-Don-t-start-py_sems-by-default.patch +++ b/sems-0006-Don-t-start-py_sems-by-default.patch @@ -1,7 +1,7 @@ From c1e9a77bfbafbdabd3afc0fcf64e635a0a83d030 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 29 Dec 2010 17:02:49 +0300 -Subject: [PATCH 06/12] Don't start py_sems by default +Subject: [PATCH 06/14] Don't start py_sems by default Signed-off-by: Peter Lemenkov --- diff --git a/sems-0007-Fix-unresolved-symbol-in-sbc-module-when-compiled-wi.patch b/sems-0007-Fix-unresolved-symbol-in-sbc-module-when-compiled-wi.patch index 9ce3b5d..4a22163 100644 --- a/sems-0007-Fix-unresolved-symbol-in-sbc-module-when-compiled-wi.patch +++ b/sems-0007-Fix-unresolved-symbol-in-sbc-module-when-compiled-wi.patch @@ -1,7 +1,7 @@ From 92da5b357c2245615e918938e69fad8bb7cad48c Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 24 Nov 2011 00:11:14 +0400 -Subject: [PATCH 07/12] Fix unresolved symbol in sbc module when compiled with +Subject: [PATCH 07/14] Fix unresolved symbol in sbc module when compiled with cmake Signed-off-by: Peter Lemenkov diff --git a/sems-0008-Change-default-msg_storage-path.patch b/sems-0008-Change-default-msg_storage-path.patch index 9331c59..7d938c5 100644 --- a/sems-0008-Change-default-msg_storage-path.patch +++ b/sems-0008-Change-default-msg_storage-path.patch @@ -1,7 +1,7 @@ From 94f6eefb1406c69943d18616a9933ae8685056d4 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 24 Nov 2011 19:57:05 +0400 -Subject: [PATCH 08/12] Change default msg_storage path +Subject: [PATCH 08/14] Change default msg_storage path Signed-off-by: Peter Lemenkov --- diff --git a/sems-0009-Drop-privileges-for-SEMS-process.patch b/sems-0009-Drop-privileges-for-SEMS-process.patch index f0a65d7..8727ccc 100644 --- a/sems-0009-Drop-privileges-for-SEMS-process.patch +++ b/sems-0009-Drop-privileges-for-SEMS-process.patch @@ -1,7 +1,7 @@ From a5c352a314db3ccd9d93e5e84d331a180e90d7a7 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 24 Nov 2011 23:51:59 +0400 -Subject: [PATCH 09/12] Drop privileges for SEMS process +Subject: [PATCH 09/14] Drop privileges for SEMS process Signed-off-by: Peter Lemenkov --- diff --git a/sems-0010-Missing-include-for-close-FILE.patch b/sems-0010-Missing-include-for-close-FILE.patch index 43c666e..d3f7d1f 100644 --- a/sems-0010-Missing-include-for-close-FILE.patch +++ b/sems-0010-Missing-include-for-close-FILE.patch @@ -1,7 +1,7 @@ From 219a33b20daf2d3a76264be17551475f25e46509 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 5 Apr 2012 15:11:18 +0400 -Subject: [PATCH 10/12] Missing include for close(FILE *) +Subject: [PATCH 10/14] Missing include for close(FILE *) This will affects only gcc 4.7.0+ users. Others won't see any difference. diff --git a/sems-0011-Fix-c-p-typo-in-cmake-files.patch b/sems-0011-Fix-c-p-typo-in-cmake-files.patch index 8b600cf..7198788 100644 --- a/sems-0011-Fix-c-p-typo-in-cmake-files.patch +++ b/sems-0011-Fix-c-p-typo-in-cmake-files.patch @@ -1,7 +1,7 @@ From ea2971ca52ab14fe6c6564c7c342728a64b592ed Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Thu, 5 Apr 2012 16:58:28 +0400 -Subject: [PATCH 11/12] Fix c/p typo in cmake-files +Subject: [PATCH 11/14] Fix c/p typo in cmake-files Signed-off-by: Peter Lemenkov --- diff --git a/sems-0012-Add-systemd-related-files-to-the-pkg-rpm-dir.patch b/sems-0012-Add-systemd-related-files-to-the-pkg-rpm-dir.patch index 46b19b5..0df05ac 100644 --- a/sems-0012-Add-systemd-related-files-to-the-pkg-rpm-dir.patch +++ b/sems-0012-Add-systemd-related-files-to-the-pkg-rpm-dir.patch @@ -1,7 +1,7 @@ From 17daf3faecfcd9961311b6c5a79a4750a71ca090 Mon Sep 17 00:00:00 2001 From: Peter Lemenkov Date: Wed, 18 Apr 2012 21:51:48 +0400 -Subject: [PATCH 12/12] Add systemd-related files to the pkg/rpm dir +Subject: [PATCH 12/14] Add systemd-related files to the pkg/rpm dir Signed-off-by: Peter Lemenkov --- diff --git a/sems-0013-Fix-building-with-IPv6-support.patch b/sems-0013-Fix-building-with-IPv6-support.patch new file mode 100644 index 0000000..632031f --- /dev/null +++ b/sems-0013-Fix-building-with-IPv6-support.patch @@ -0,0 +1,26 @@ +From b2220e1acf15ed4af828473de29b4f0cd89ab497 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Thu, 19 Apr 2012 16:43:45 +0400 +Subject: [PATCH 13/14] Fix building with IPv6 support + +Signed-off-by: Peter Lemenkov +--- + core/AmRtpStream.cpp | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/core/AmRtpStream.cpp b/core/AmRtpStream.cpp +index 651d19f..8a3aa1f 100644 +--- a/core/AmRtpStream.cpp ++++ b/core/AmRtpStream.cpp +@@ -159,7 +159,7 @@ void AmRtpStream::setLocalPort() + + l_port = port; + AmRtpReceiver::instance()->addStream(l_sd,this); +- DBG("added to RTP receiver (%s:%i)\n",get_addr_str(l_saddr.sin_addr).c_str(),l_port); ++ DBG("added to RTP receiver (%s:%i)\n",get_addr_str( ((struct sockaddr_in*)&l_saddr)->sin_addr ).c_str(),l_port); + } + + int AmRtpStream::ping() +-- +1.7.10 + diff --git a/sems-0014-Add-Install-directive-for-systemd.patch b/sems-0014-Add-Install-directive-for-systemd.patch new file mode 100644 index 0000000..17bb604 --- /dev/null +++ b/sems-0014-Add-Install-directive-for-systemd.patch @@ -0,0 +1,24 @@ +From 9920ee5c0062e306e6026a1af7d00853fb162b05 Mon Sep 17 00:00:00 2001 +From: Peter Lemenkov +Date: Fri, 27 Apr 2012 15:19:09 +0400 +Subject: [PATCH 14/14] Add [Install] directive for systemd + +Signed-off-by: Peter Lemenkov +--- + pkg/rpm/sems.systemd.service | 3 +++ + 1 file changed, 3 insertions(+) + +diff --git a/pkg/rpm/sems.systemd.service b/pkg/rpm/sems.systemd.service +index ffe2a60..7d66886 100644 +--- a/pkg/rpm/sems.systemd.service ++++ b/pkg/rpm/sems.systemd.service +@@ -9,3 +9,6 @@ Group=sems + EnvironmentFile=-/etc/sysconfig/sems + PIDFile=/var/run/sems/sems.pid + ExecStart=/usr/sbin/sems -E -u sems -g sems -P /var/run/sems/sems.pid $OPTIONS ++ ++[Install] ++WantedBy=multi-user.target +-- +1.7.10 + diff --git a/sems.spec b/sems.spec index e47ae98..03b6078 100644 --- a/sems.spec +++ b/sems.spec @@ -1,11 +1,11 @@ Summary: SIP Express Media Server, an extensible SIP media server Name: sems Version: 1.4.2 -Release: 5%{?dist} +Release: 6%{?dist} URL: http://www.iptel.org/sems Source0: http://ftp.iptel.org/pub/%{name}/%{name}-%{version}.tar.gz Source1: %{name}.sysconfig -%if 0%{?fc15}%{?fc16}%{?fc17}%{?fc18} +%if 0%{?fedora} > 14 BuildRequires: systemd-units %endif License: GPLv2+ @@ -35,6 +35,10 @@ Patch10: sems-0010-Missing-include-for-close-FILE.patch Patch11: sems-0011-Fix-c-p-typo-in-cmake-files.patch # Applied upstream Patch12: sems-0012-Add-systemd-related-files-to-the-pkg-rpm-dir.patch +# Already fixed upstream in 1.5.x +Patch13: sems-0013-Fix-building-with-IPv6-support.patch +# Applied upstream +Patch14: sems-0014-Add-Install-directive-for-systemd.patch BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n) BuildRequires: python >= 2.3 @@ -51,7 +55,7 @@ BuildRequires: mysql++-devel BuildRequires: cmake >= 2.4 Requires(pre): /usr/sbin/useradd #Initscripts -%if 0%{?fc15}%{?fc16}%{?fc17}%{?fc18} +%if 0%{?fedora} > 14 Requires(post): systemd-units Requires(preun): systemd-units Requires(postun): systemd-units @@ -231,6 +235,8 @@ rm -rf core/plug-in/gsm/gsm-1.0-pl10/ %patch10 -p1 -b .missing_include %patch11 -p1 -b .typo %patch12 -p1 -b .systemd_files +%patch13 -p1 -b .ipv6 +%patch14 -p1 -b .fix_systemd_install iconv -f iso8859-1 -t UTF-8 doc/Readme.diameter_client.txt > doc/Readme.diameter_client.utf8 && mv doc/Readme.diameter_client.{utf8,txt} @@ -247,7 +253,7 @@ mv ./apps/dsm/fsmc/readme.txt ./apps/dsm/fsmc/Readme.fsmc.txt -DSEMS_USE_TTS=yes \ -DSEMS_USE_OPENSSL=yes \ -DSEMS_USE_MONITORING=yes \ - -DSEMS_USE_IPV6=NO \ + -DSEMS_USE_IPV6=yes \ -DSEMS_CFG_PREFIX= \ -DSEMS_AUDIO_PREFIX=%{_datadir} \ -DSEMS_EXEC_PREFIX=%{_prefix} \ @@ -262,7 +268,7 @@ make install DESTDIR=$RPM_BUILD_ROOT install -D -m 0644 -p %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name} -%if 0%{?fc15}%{?fc16}%{?fc17}%{?fc18} +%if 0%{?fedora} > 14 # install systemd files install -D -m 0644 -p pkg/rpm/sems.systemd.service $RPM_BUILD_ROOT%{_unitdir}/%{name}.service install -D -m 0644 -p pkg/rpm/sems.systemd.tmpfiles.d.conf $RPM_BUILD_ROOT%{_sysconfdir}/tmpfiles.d/%{name}.conf @@ -296,7 +302,7 @@ getent passwd %{name} >/dev/null || \ %post -%if 0%{?fc15}%{?fc16}%{?fc17}%{?fc18} +%if 0%{?fedora} > 14 if [ $1 -eq 1 ] ; then # Initial installation /bin/systemctl daemon-reload >/dev/null 2>&1 || : @@ -309,7 +315,7 @@ fi %preun -%if 0%{?fc15}%{?fc16}%{?fc17}%{?fc18} +%if 0%{?fedora} > 14 if [ $1 -eq 0 ] ; then # Package removal, not upgrade /bin/systemctl --no-reload disable sems.service > /dev/null 2>&1 || : @@ -345,7 +351,7 @@ fi %config(noreplace) %{_sysconfdir}/sysconfig/%{name} -%if 0%{?fc15}%{?fc16}%{?fc17}%{?fc18} +%if 0%{?fedora} > 14 %{_unitdir}/%{name}.service %{_sysconfdir}/tmpfiles.d/%{name}.conf %dir %attr(0755, %{name}, %{name}) %{_localstatedir}/run/%{name} @@ -685,6 +691,10 @@ fi %{_libdir}/%{name}/plug-in/xmlrpc2di.so %changelog +* Fri Apr 27 2012 Peter Lemenkov - 1.4.2-6 +- Fixed systemd installation +- Enabled IPv6 (see rhbz #814229) + * Thu Apr 19 2012 Peter Lemenkov - 1.4.2-5 - Enabled iLBC ( https://bugzilla.redhat.com/728302#c26 )