Update version and new vendor, and reintroduce multiuser conference server.

Tue, 28 Aug 2012 18:30:40 +0200

author
Michael Schloh von Bennewitz <michael@schloh.com>
date
Tue, 28 Aug 2012 18:30:40 +0200
changeset 541
869d6847b13e
parent 540
6becb64fe77d
child 542
a9edd9452022

Update version and new vendor, and reintroduce multiuser conference server.

jabberd/jabberd.patch file | annotate | diff | comparison | revisions
jabberd/jabberd.spec file | annotate | diff | comparison | revisions
jabberd/rc.jabberd file | annotate | diff | comparison | revisions
     1.1 --- a/jabberd/jabberd.patch	Tue Aug 28 18:30:35 2012 +0200
     1.2 +++ b/jabberd/jabberd.patch	Tue Aug 28 18:30:40 2012 +0200
     1.3 @@ -1,7 +1,8 @@
     1.4 +diff -Nau etc/c2s.xml.dist.in.orig etc/c2s.xml.dist.in
     1.5  Index: etc/c2s.xml.dist.in
     1.6 ---- etc/c2s.xml.dist.in.orig	2009-06-30 11:38:16 +0200
     1.7 -+++ etc/c2s.xml.dist.in	2009-06-30 20:45:22 +0200
     1.8 -@@ -50,18 +50,16 @@
     1.9 +--- etc/c2s.xml.dist.in.orig	2012-05-22 22:27:51.000000000 +0200
    1.10 ++++ etc/c2s.xml.dist.in	2012-08-27 13:44:20.119445160 +0200
    1.11 +@@ -50,13 +50,13 @@
    1.12     </router>
    1.13   
    1.14     <!-- Log configuration - type is "syslog", "file" or "stdout" -->
    1.15 @@ -17,14 +18,9 @@
    1.16  +    <!-- <facility>local3</facility> -->
    1.17   
    1.18       <!-- If logging to file, this is the filename of the logfile -->
    1.19 --    <!--
    1.20 -     <file>@localstatedir@/jabberd/log/c2s.log</file>
    1.21 --    -->
    1.22 -   </log>
    1.23 - 
    1.24 -   <!-- Local network configuration -->
    1.25 -@@ -137,7 +135,7 @@
    1.26 -     <id password-change='true' /> -->
    1.27 +     <!--
    1.28 +@@ -154,7 +154,7 @@
    1.29 +     <id password-change='mu' /> -->
    1.30   
    1.31       <!-- IP address to bind to (default: 0.0.0.0) -->
    1.32  -    <ip>0.0.0.0</ip>
    1.33 @@ -32,7 +28,7 @@
    1.34   
    1.35       <!-- Port to bind to, or 0 to disable unencrypted access to the
    1.36            server (default: 5222) -->
    1.37 -@@ -331,7 +329,7 @@
    1.38 +@@ -370,7 +370,7 @@
    1.39       <path>@pkglibdir@</path>
    1.40   
    1.41       <!-- Backend module to use -->
    1.42 @@ -41,11 +37,12 @@
    1.43   
    1.44       <!-- Available authentication mechanisms -->
    1.45       <mechanisms>
    1.46 +diff -Nau etc/router.xml.dist.in.orig etc/router.xml.dist.in
    1.47  Index: etc/router.xml.dist.in
    1.48 ---- etc/router.xml.dist.in.orig	2009-06-30 11:38:16 +0200
    1.49 -+++ etc/router.xml.dist.in	2009-06-30 20:45:06 +0200
    1.50 -@@ -8,24 +8,22 @@
    1.51 -   <pidfile>@localstatedir@/jabberd/pid/router.pid</pidfile>
    1.52 +--- etc/router.xml.dist.in.orig	2012-05-04 18:24:36.000000000 +0200
    1.53 ++++ etc/router.xml.dist.in	2012-08-27 13:47:20.357743449 +0200
    1.54 +@@ -8,13 +8,13 @@
    1.55 +   <pidfile>@localstatedir@/@package@/pid/router.pid</pidfile>
    1.56   
    1.57     <!-- Log configuration - type is "syslog", "file" or "stdout" -->
    1.58  -  <log type='syslog'>
    1.59 @@ -60,11 +57,8 @@
    1.60  +    <!-- <facility>local3</facility> -->
    1.61   
    1.62       <!-- If logging to file, this is the filename of the logfile -->
    1.63 --    <!--
    1.64 -     <file>@localstatedir@/jabberd/log/router.log</file>
    1.65 --    -->
    1.66 -   </log>
    1.67 - 
    1.68 +     <!--
    1.69 +@@ -30,7 +30,7 @@
    1.70     <!-- Local network configuration -->
    1.71     <local>
    1.72       <!-- IP address to bind to (default: 0.0.0.0) -->
    1.73 @@ -73,10 +67,11 @@
    1.74   
    1.75       <!-- Port to bind to (default: 5347) -->
    1.76       <port>5347</port>
    1.77 +diff -Nau etc/s2s.xml.dist.in.orig etc/s2s.xml.dist.in
    1.78  Index: etc/s2s.xml.dist.in
    1.79 ---- etc/s2s.xml.dist.in.orig	2009-06-30 11:38:16 +0200
    1.80 -+++ etc/s2s.xml.dist.in	2009-06-30 20:45:06 +0200
    1.81 -@@ -60,25 +60,23 @@
    1.82 +--- etc/s2s.xml.dist.in.orig	2012-08-06 20:18:46.000000000 +0200
    1.83 ++++ etc/s2s.xml.dist.in	2012-08-27 13:45:50.771011934 +0200
    1.84 +@@ -60,13 +60,13 @@
    1.85     </router>
    1.86   
    1.87     <!-- Log configuration - type is "syslog", "file" or "stdout" -->
    1.88 @@ -92,12 +87,8 @@
    1.89  +    <!-- <facility>local3</facility> -->
    1.90   
    1.91       <!-- if logging to file, this is the filename of the logfile -->
    1.92 --    <!--
    1.93 -     <file>@localstatedir@/jabberd/log/s2s.log</file>
    1.94 --    -->
    1.95 -   </log>
    1.96 - 
    1.97 -   <!-- Local network configuration -->
    1.98 +     <!--
    1.99 +@@ -83,7 +83,7 @@
   1.100     <local>
   1.101       <!-- IP and port to listen for incoming s2s connections on
   1.102                                              (default: 0.0.0.0, 5269) -->
   1.103 @@ -106,9 +97,10 @@
   1.104       <port>5269</port>
   1.105   
   1.106       <!-- Multihomed machines (with more than one interface and IP address)
   1.107 +diff -Nau etc/sm.xml.dist.in.orig etc/sm.xml.dist.in
   1.108  Index: etc/sm.xml.dist.in
   1.109 ---- etc/sm.xml.dist.in.orig	2009-06-30 11:38:16 +0200
   1.110 -+++ etc/sm.xml.dist.in	2009-06-30 20:45:36 +0200
   1.111 +--- etc/sm.xml.dist.in.orig	2012-05-04 18:24:36.000000000 +0200
   1.112 ++++ etc/sm.xml.dist.in	2012-08-27 13:41:59.772838992 +0200
   1.113  @@ -50,13 +50,13 @@
   1.114     </router>
   1.115   
   1.116 @@ -126,7 +118,7 @@
   1.117   
   1.118       <!-- If logging to file, this is the filename of the logfile -->
   1.119       <!--
   1.120 -@@ -85,7 +85,7 @@
   1.121 +@@ -90,7 +90,7 @@
   1.122       <path>@pkglibdir@</path>
   1.123   
   1.124       <!-- By default, we use the SQLite driver for all storage -->
   1.125 @@ -135,9 +127,10 @@
   1.126   
   1.127       <!-- Its also possible to explicitly list alternate drivers for
   1.128            specific data types. -->
   1.129 +diff -Nau sm/mod_iq_time.c.orig sm/mod_iq_time.c
   1.130  Index: sm/mod_iq_time.c
   1.131 ---- sm/mod_iq_time.c.orig	2009-06-30 11:38:15 +0200
   1.132 -+++ sm/mod_iq_time.c	2009-06-30 20:45:06 +0200
   1.133 +--- sm/mod_iq_time.c.orig	2011-10-22 21:56:00.000000000 +0200
   1.134 ++++ sm/mod_iq_time.c	2012-08-27 13:41:59.773059371 +0200
   1.135  @@ -39,6 +39,7 @@
   1.136   static mod_ret_t _iq_time_pkt_sm(mod_instance_t mi, pkt_t pkt)
   1.137   {
   1.138 @@ -156,10 +149,11 @@
   1.139   #else
   1.140       snprintf(buf, 64, "%+03d:%02d", (int) tm->tm_gmtoff/(60*60), (int) tm->tm_gmtoff%(60*60));
   1.141   #endif
   1.142 +diff -Nau sm/mod_roster.c.orig sm/mod_roster.c
   1.143  Index: sm/mod_roster.c
   1.144 ---- sm/mod_roster.c.orig	2009-06-30 11:38:15 +0200
   1.145 -+++ sm/mod_roster.c	2009-06-30 20:45:06 +0200
   1.146 -@@ -635,6 +635,9 @@
   1.147 +--- sm/mod_roster.c.orig	2012-02-12 22:36:18.000000000 +0100
   1.148 ++++ sm/mod_roster.c	2012-08-27 13:41:59.773438877 +0200
   1.149 +@@ -717,6 +717,9 @@
   1.150       if(user->sessions == NULL)
   1.151           return mod_PASS;
   1.152   
   1.153 @@ -169,9 +163,10 @@
   1.154       /* build a new packet to push out to everyone */
   1.155       pkt = pkt_create(user->sm, "iq", "set", NULL, NULL);
   1.156       pkt_id_new(pkt);
   1.157 +diff -Nau util/util.h.orig util/util.h
   1.158  Index: util/util.h
   1.159 ---- util/util.h.orig	2009-06-30 11:38:16 +0200
   1.160 -+++ util/util.h	2009-06-30 20:45:06 +0200
   1.161 +--- util/util.h.orig	2012-08-22 08:03:58.000000000 +0200
   1.162 ++++ util/util.h	2012-08-27 13:41:59.773719964 +0200
   1.163  @@ -30,6 +30,8 @@
   1.164   #include <time.h>
   1.165   #include <errno.h>
     2.1 --- a/jabberd/jabberd.spec	Tue Aug 28 18:30:35 2012 +0200
     2.2 +++ b/jabberd/jabberd.spec	Tue Aug 28 18:30:40 2012 +0200
     2.3 @@ -23,7 +23,8 @@
     2.4  
     2.5  #   package version
     2.6  %define       V_major 2.2
     2.7 -%define       V_minor 14
     2.8 +%define       V_minor 17
     2.9 +%define       V_mucon 0.8
    2.10  
    2.11  #   package information
    2.12  Name:         jabberd
    2.13 @@ -36,16 +37,18 @@
    2.14  Group:        InstantMessaging
    2.15  License:      JOSL/GPL
    2.16  Version:      %{V_major}.%{V_minor}
    2.17 -Release:      20110602
    2.18 +Release:      20120800
    2.19  
    2.20  #   package options
    2.21  %option       with_sqlite no
    2.22  %option       with_mysql  no
    2.23  %option       with_pgsql  no
    2.24  %option       with_pam    no
    2.25 +%option       with_mucon  yes
    2.26  
    2.27  #   list of sources
    2.28 -Source0:      http://codex.xiaoka.com/pub/jabberd2/releases/jabberd-%{version}.tar.gz
    2.29 +Source0:      http://www.github.com/downloads/Jabberd2/jabberd2/jabberd-%{version}.tar.xz
    2.30 +Source1:      http://download.gna.org/mu-conference/mu-conference_%{V_mucon}.tar.gz
    2.31  Source1:      rc.jabberd
    2.32  Patch0:       jabberd.patch
    2.33  
    2.34 @@ -70,6 +73,10 @@
    2.35  BuildPreReq:  PAM
    2.36  PreReq:       PAM
    2.37  %endif
    2.38 +%if "%{with_mucon}" == "yes"
    2.39 +BuildPreReq:  glib, pkgconfig
    2.40 +PreReq:       glib
    2.41 +%endif
    2.42  
    2.43  %description
    2.44      JabberD is the original server implementation for the Jabber instant
    2.45 @@ -81,16 +88,45 @@
    2.46  %track
    2.47      prog jabberd = {
    2.48          version   = %{version}
    2.49 -        url       = http://codex.xiaoka.com/pub/jabberd2/releases/
    2.50 -        regex     = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.gz
    2.51 +        url       = http://www.github.com/downloads/Jabberd2/jabberd2/
    2.52 +        regex     = jabberd-(\d+\.\d+(\.\d+)*)\.tar\.xz
    2.53 +    }
    2.54 +    prog jabberd:mucon = {
    2.55 +        version   = %{V_mucon}
    2.56 +        url       = http://download.gna.org/mu-conference/
    2.57 +        regex     = mu-conference_(__VER__)\.tar\.gz
    2.58      }
    2.59  
    2.60  %prep
    2.61      %setup -q -n jabberd-%{version}
    2.62 -    %{l_sed} <%{PATCH0} -e 's;@l_prefix@;%{l_prefix};g' | %{l_patch} -p0 -b
    2.63 +    %setup -q -D -T -a 1
    2.64      %{l_shtool} subst \
    2.65          -e 's;exec perl;exec %{l_prefix}/bin/perl;' \
    2.66          tools/jabberd.in
    2.67 +    %{l_shtool} subst \
    2.68 +        -e 's;\$(initdir);;g' \
    2.69 +        etc/Makefile.in
    2.70 +%if "%{with_mucon}" == "yes"
    2.71 +    %{l_shtool} subst \
    2.72 +        -e 's;^\(CFLAGS\ *:=.*pkg-config --cflags glib-2.0\);\1 libidn;' \
    2.73 +        -e 's;^\(LIBS\ *:=.*\);\1 $(LOCLIBS);' \
    2.74 +        mu-conference_%{V_mucon}/src/Makefile
    2.75 +    %{l_shtool} subst \
    2.76 +        -e 's;mu-conference.log;muc.log;g' \
    2.77 +        mu-conference_%{V_mucon}/src/jcomp/jcr_log.c
    2.78 +    %{l_shtool} subst \
    2.79 +        -e 's;<port>[0-9][0-9]*</port>;<port>5347</port>;' \
    2.80 +        -e 's;<spool>.*</spool>;<spool>%{l_prefix}/var/jabberd/spool/rooms</spool>;' \
    2.81 +        -e 's;<logdir>\./syslogs</logdir>;<logdir>%{l_prefix}/var/jabberd/log</logdir>;' \
    2.82 +        -e 's;<logdir>\./logs/</logdir>;<logdir>%{l_prefix}/var/jabberd/spool/logs</logdir>;' \
    2.83 +        -e 's;<pidfile>.*</pidfile>;<pidfile>%{l_prefix}/var/jabberd/pid/muc.pid</pidfile>;' \
    2.84 +        -e 's;<URL>.*</URL>;<URL>http://name.host.tld/</URL>;' \
    2.85 +        -e 's;<stylesheet>.*</stylesheet>;<stylesheet>%{l_prefix}/share/jabberd/style.css</stylesheet>;' \
    2.86 +        mu-conference_%{V_mucon}/muc-default.xml
    2.87 +    echo \
    2.88 +        'muc         @sysconfdir@/muc.xml' \
    2.89 +        >>etc/jabberd.cfg.dist.in
    2.90 +%endif
    2.91  
    2.92  %build
    2.93      #   configure program
    2.94 @@ -149,7 +185,19 @@
    2.95          --enable-shared
    2.96  
    2.97      #   build program
    2.98 -    %{l_make} %{l_mflags}
    2.99 +    %{l_make} %{l_mflags -O}
   2.100 +
   2.101 +%if "%{with_mucon}" == "yes"
   2.102 +    loclibs=''
   2.103 +    case "%{l_platform -t}" in
   2.104 +        *-sunos* )
   2.105 +            loclibs='-lsocket -lnsl'
   2.106 +            ;;
   2.107 +    esac
   2.108 +    ( cd mu-conference_%{V_mucon}
   2.109 +      %{l_make} %{l_mflags -O} LOCLIBS=$loclibs
   2.110 +    ) || exit $?
   2.111 +%endif
   2.112  
   2.113  %install
   2.114      #   create installation filesystem structure
   2.115 @@ -165,13 +213,36 @@
   2.116      #   install components
   2.117      %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT
   2.118  
   2.119 +    #   install optional components
   2.120 +%if "%{with_mucon}" == "yes"
   2.121 +    %{l_shtool} mkdir -f -p -m 755 \
   2.122 +        $RPM_BUILD_ROOT%{l_prefix}/share/jabberd \
   2.123 +        $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/logs \
   2.124 +        $RPM_BUILD_ROOT%{l_prefix}/var/jabberd/spool/rooms
   2.125 +    %{l_shtool} install -c -m 644 \
   2.126 +        mu-conference_%{V_mucon}/muc-default.xml \
   2.127 +        $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/muc.xml
   2.128 +    %{l_shtool} install -c \
   2.129 +        mu-conference_%{V_mucon}/src/mu-conference \
   2.130 +        $RPM_BUILD_ROOT%{l_prefix}/bin/
   2.131 +    %{l_shtool} install -c \
   2.132 +        mu-conference_%{V_mucon}/style.css \
   2.133 +        $RPM_BUILD_ROOT%{l_prefix}/share/jabberd
   2.134 +%endif
   2.135 +
   2.136 +    #   strip installation
   2.137 +    strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
   2.138 +
   2.139      #   remove unnecessary files
   2.140      rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/*.dist
   2.141      rm -f $RPM_BUILD_ROOT%{l_prefix}/etc/jabberd/templates/*.dist
   2.142      rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/jabberd/*.a
   2.143  
   2.144 -    #   install run-command script
   2.145 +    #   install runcommand script
   2.146      %{l_shtool} install -c -m 755 %{l_value -s -a} \
   2.147 +%if "%{with_mucon}" == "yes"
   2.148 +        -e 's;\(jabberd_daemons\s*=.*\)\s\s*\(\w\w*\);\1 mucon\2;' \
   2.149 +%endif
   2.150          %{SOURCE rc.jabberd} \
   2.151          $RPM_BUILD_ROOT%{l_prefix}/etc/rc.d/
   2.152  
     3.1 --- a/jabberd/rc.jabberd	Tue Aug 28 18:30:35 2012 +0200
     3.2 +++ b/jabberd/rc.jabberd	Tue Aug 28 18:30:40 2012 +0200
     3.3 @@ -6,7 +6,7 @@
     3.4  %config
     3.5      jabberd_enable="$openpkg_rc_def"
     3.6      jabberd_hostname=`hostname`
     3.7 -    jabberd_daemons="c2s resolver router s2s sm"
     3.8 +    jabberd_daemons="c2s router s2s sm"
     3.9      jabberd_cfgfile="@l_prefix@/etc/jabberd/jabberd.cfg"
    3.10      jabberd_log_prolog="true"
    3.11      jabberd_log_epilog="true"

mercurial