From 7f71a53c5374a1a8822152a3ecdf146eecf5769b Mon Sep 17 00:00:00 2001 From: Jacek Konieczny Date: Fri, 15 Nov 2013 19:11:50 +0100 Subject: [PATCH] config patch is back - ejabberd-config.patch restored, updated for the YML syntax - service secret substitution updated --- ejabberd-config.patch | 28 ++++++++++++++++++++++++++++ ejabberd.spec | 17 ++++++++++------- 2 files changed, 38 insertions(+), 7 deletions(-) create mode 100644 ejabberd-config.patch diff --git a/ejabberd-config.patch b/ejabberd-config.patch new file mode 100644 index 0000000..afe8239 --- /dev/null +++ b/ejabberd-config.patch @@ -0,0 +1,28 @@ +diff -dur ejabberd-13.10.orig/ejabberd.yml.example ejabberd-13.10/ejabberd.yml.example +--- ejabberd-13.10.orig/ejabberd.yml.example 2013-09-27 11:19:22.000000000 +0200 ++++ ejabberd-13.10/ejabberd.yml.example 2013-11-15 19:08:28.341305894 +0100 +@@ -3,6 +3,12 @@ + ### + ### + ++### This is a setup for working "localhost" server. ++### To make fully functional world-accessible Jabber server you will need to: ++### - change 'localhost' everywhere below to your desired Jabber server domain name ++### - provide SSL certificates and uncomment ssl settings ++### - modify everything else according to your needs ++ + ### The parameters used in this configuration file are explained in more detail + ### in the ejabberd Installation and Operation Guide. + ### Please consult the Guide in case of doubts, it is included with +@@ -103,9 +109,9 @@ + ## ip: "127.0.0.1" + ## hosts: + ## "icq.example.org": +- ## password: "secret" ++ ## password: "@service_secret@" + ## "sms.example.org": +- ## password: "secret" ++ ## password: "@service_secret@" + + ## + ## ejabberd_stun: Handles STUN Binding requests diff --git a/ejabberd.spec b/ejabberd.spec index 69371fe..f3087de 100644 --- a/ejabberd.spec +++ b/ejabberd.spec @@ -54,10 +54,11 @@ Source24: ejabberd-p1_stun-20130624.tar.gz # Source24-md5: 9a1c5ad9b3b95364d3f76446fcf58dc3 # Patch0: %{realname}-paths.patch +Patch1: %{realname}-config.patch # not available for 13.10 -#Patch1: %{realname}-vcard-access-get.patch +#Patch2: %{realname}-vcard-access-get.patch # http://www.dp.uz.gov.ua/o.palij/mod_logdb/patch-mod_logdb-2.1.12.diff -Patch2: %{realname}-mod_logdb.patch +Patch3: %{realname}-mod_logdb.patch URL: http://www.ejabberd.im/ BuildRequires: autoconf BuildRequires: automake @@ -102,9 +103,10 @@ Server-side logging module. %prep %setup -q -a 10 -a 11 -a 12 -a 13 -a 14 -a 15 -a 16 -a 17 -a 18 -a 19 -a 20 -a 21 -a 22 -a 23 -a 24 %patch0 -p1 -#%%patch1 -p1 +%patch1 -p1 +#%%patch2 -p1 %if %{with logdb} -%patch2 -p0 +%patch3 -p0 %endif # Various parts of the build system use 'git describe' @@ -208,10 +210,11 @@ fi %post if [ -f %{_sysconfdir}/jabber/secret ] ; then - SECRET=`cat %{_sysconfdir}/jabber/secret` + SECRET="$(cat %{_sysconfdir}/jabber/secret)" if [ -n "$SECRET" ] ; then - echo "Updating component authentication secret in ejabberd config file..." - %{__sed} -i -e "s/>secret$SECRET&2 + %{__sed} -i -e "s/@service_secret@/$SECRET/" /etc/jabber/ejabberd.yml + echo "done" >&2 fi fi -- 2.44.0