[packages/jabberd] - updated to 2.3.6, tested with postgresql db

bszx bszx at pld-linux.org
Sun Apr 24 16:41:21 CEST 2016


commit dbf65a43d8ce7b57cd45c1b228222269333b917e
Author: Bartek Szady <bszx at bszx.eu>
Date:   Sun Apr 24 16:39:30 2016 +0200

    - updated to 2.3.6, tested with postgresql db

 db-setup.sqlite              | 172 -------------------------------------------
 jabberd-default_config.patch |  54 +++++++-------
 jabberd.spec                 |  26 +++++--
 3 files changed, 43 insertions(+), 209 deletions(-)
---
diff --git a/jabberd.spec b/jabberd.spec
index 478e659..0a262b5 100644
--- a/jabberd.spec
+++ b/jabberd.spec
@@ -16,15 +16,14 @@
 Summary:	Jabber/XMPP server
 Summary(pl.UTF-8):	Serwer Jabber/XMPP
 Name:		jabberd
-Version:	2.2.17
+Version:	2.3.6
 Release:	1
 License:	GPL
 Group:		Applications/Communications
-Source0:	https://github.com/downloads/jabberd2/jabberd2/%{name}-%{version}.tar.xz
-# Source0-md5:	8b7d654deaa6566e58ab6630112f9b10
+Source0:	https://github.com/jabberd2/jabberd2/releases/download/jabberd-%{version}/%{name}-%{version}.tar.xz
+# Source0-md5:	e582cfbc77a6e443171c4a6931d707fd
 Source1:	%{name}.init
 Source2:	%{name}.sysconfig
-Source3:	db-setup.sqlite
 Patch0:		%{name}-perlscript.patch
 Patch1:		%{name}-daemonize.patch
 Patch2:		%{name}-default_config.patch
@@ -33,8 +32,9 @@ Patch5:		%{name}-binary_path.patch
 Patch6:		%{name}-reconnect.patch
 #bcond bxmpp
 Patch22:	http://www.marquard.net/jabber/patches/patch-flash-v2
-URL:		http://jabberd.jabberstudio.org/
+URL:		http://jabberd2.org/
 BuildRequires:	autoconf
+BuildRequires:	autoconf-archive
 BuildRequires:	automake
 %{?with_db:BuildRequires:	db-devel >= 4.1.24}
 BuildRequires:	expat-devel
@@ -80,8 +80,6 @@ protokół XMPP.
 %patch22 -p0
 %endif
 
-install %{SOURCE3} tools/
-
 %build
 #http://j2.openaether.org/bugzilla/show_bug.cgi?id=17
 %{__libtoolize}
@@ -108,11 +106,13 @@ install %{SOURCE3} tools/
 %install
 rm -rf $RPM_BUILD_ROOT
 install -d $RPM_BUILD_ROOT{%{_sbindir},/var/lib/%{name}/{db,stats},/etc/{sysconfig,rc.d/init.d}}
+install -d $RPM_BUILD_ROOT%{systemdunitdir}
 
 %{__make} install \
 	DESTDIR=$RPM_BUILD_ROOT
 
 mv $RPM_BUILD_ROOT%{_libdir}/jabberd/jabberd $RPM_BUILD_ROOT%{_sbindir}
+mv $RPM_BUILD_ROOT/usr/lib/systemd/system/* $RPM_BUILD_ROOT%{systemdunitdir}/
 %{__rm} $RPM_BUILD_ROOT%{_sysconfdir}/jabber{,/templates}/*.dist 
 
 # drop Upstart configuration files
@@ -136,6 +136,7 @@ fi
 
 /sbin/chkconfig --add jabberd
 %service jabberd restart "Jabber server"
+%systemd_post jabberd.service
 
 %if %{with avatars}
 echo "This j2 package has new functionality, please read AVATARS file."
@@ -146,11 +147,15 @@ if [ "$1" = "0" ]; then
 	%service jabberd stop
 	/sbin/chkconfig --del jabberd
 fi
+%systemd_preun jabberd.service
+
+%postun
+%systemd_reload
 
 %files
 %defattr(644,root,root,755)
 %doc AUTHORS ChangeLog NEWS README TODO
-%doc tools/{db-setup.mysql,db-setup.pgsql,%{?with_sqlite:db-setup.sqlite,}pipe-auth.pl}
+%doc tools/{%{?with_mysql:db-*.mysql,}%{?with_pgsql:db-*.pgsql,}%{?with_sqlite:db-*.sqlite,}pipe-auth.pl}
 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/*.cfg
 %attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/*.xml
 %dir %{_sysconfdir}/jabber/templates
@@ -164,3 +169,8 @@ fi
 %attr(754,root,root) /etc/rc.d/init.d/%{name}
 %attr(640,root,root) %config(noreplace) %verify(not md5 mtime size) /etc/sysconfig/%{name}
 %{_mandir}/man*/*
+%{systemdunitdir}/jabberd-c2s.service
+%{systemdunitdir}/jabberd-router.service
+%{systemdunitdir}/jabberd-s2s.service
+%{systemdunitdir}/jabberd-sm.service
+%{systemdunitdir}/jabberd.service
diff --git a/db-setup.sqlite b/db-setup.sqlite
deleted file mode 100644
index 1a3e229..0000000
--- a/db-setup.sqlite
+++ /dev/null
@@ -1,172 +0,0 @@
---
--- This is the required schema for sqlite.
---
---     sqlite3 jabberd2.db <  db-setup.sqlite
---
--- Please create database at /var/lib/jabberd/
---
-
---
--- c2s authentication/registration table
---
-CREATE TABLE 'authreg' (
-    'username' TEXT,
-    'realm' TEXT,
-    'password' TEXT,
-    'token' VARCHAR(10),
-    'sequence' INTEGER,
-    'hash' VARCHAR(40) );
-
---
--- Session manager tables 
---
-
---
--- Active (seen) users
--- Used by: core
---
-CREATE TABLE 'active' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'time' INT );
-
---
--- Logout times
--- Used by: mod_iq_last
---
-CREATE TABLE 'logout' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'time' INT );
-
---
--- Roster items
--- Used by: mod_roster
---
-CREATE TABLE 'roster-items' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'jid' TEXT,
-    'name' TEXT,
-    'to' BOOL,
-    'from' BOOL,
-    'ask' INTEGER );
-
---
--- Roster groups
--- Used by: mod_roster
---
-CREATE TABLE 'roster-groups' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'jid' TEXT,
-    'group' TEXT );
-
---
--- vCard (user profile information)
--- Used by: mod_iq_vcard
---
-CREATE TABLE 'vcard' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'fn' TEXT,
-    'nickname' TEXT,
-    'url' TEXT,
-    'tel' TEXT,
-    'email' TEXT,
-    'title' TEXT,
-    'role' TEXT,
-    'bday' TEXT,
-    'desc' TEXT,
-    'n-given' TEXT,
-    'n-family' TEXT,
-    'adr-street' TEXT,
-    'adr-extadd' TEXT,
-    'adr-locality' TEXT,
-    'adr-region' TEXT,
-    'adr-pcode' TEXT,
-    'adr-country' TEXT,
-    'org-orgname' TEXT,
-    'org-orgunit' TEXT );
-
---
--- Offline message queue
--- Used by: mod_offline
---
-CREATE TABLE 'queue' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'xml' TEXT );
-
---
--- Private XML storage
--- Used by: mod_iq_private
---
-CREATE TABLE 'private' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'ns' TEXT,
-    'xml' TEXT );
-
---
--- Message Of The Day (MOTD) messages (announcements)
--- Used by: mod_announce
---
-CREATE TABLE 'motd-message' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'xml' TEXT );
-
---
--- Times of last MOTD message for each user
--- Used by: mod_announce
---
-CREATE TABLE 'motd-times' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'time' INTEGER );
-
---
--- User-published discovery items
--- Used by: mod_disco_publish
---
-CREATE TABLE 'disco-items' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'jid' TEXT,
-    'name' TEXT,
-    'node' TEXT );
-
---
--- Default privacy list
--- Used by: mod_privacy
---
-CREATE TABLE 'privacy-default' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'default' TEXT );
-
---
--- Privacy lists
--- Used by: mod_privacy
---
-CREATE TABLE 'privacy-items' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'list' TEXT,
-    'type' TEXT,
-    'value' TEXT,
-    'deny' BOOL,
-    'order' INTEGER,
-    'block' INTEGER );
-
---
--- Vacation settings
--- Used by: mod_vacation
---
-CREATE TABLE 'vacation-settings' (
-    'collection-owner' TEXT NOT NULL,
-    'object-sequence' INTEGER PRIMARY KEY,
-    'start' INTEGER,
-    'end' INTEGER,
-    'message' TEXT );
diff --git a/jabberd-default_config.patch b/jabberd-default_config.patch
index 5196d3b..5773fbb 100644
--- a/jabberd-default_config.patch
+++ b/jabberd-default_config.patch
@@ -1,12 +1,11 @@
-diff -ur jabberd-2.2.17.orig/etc/c2s.xml.dist.in jabberd-2.2.17/etc/c2s.xml.dist.in
---- jabberd-2.2.17.orig/etc/c2s.xml.dist.in	2012-05-22 20:27:51.000000000 +0000
-+++ jabberd-2.2.17/etc/c2s.xml.dist.in	2013-07-23 17:06:14.939179197 +0000
+--- jabberd-2.3.6/etc/c2s.xml.dist.in.orig	2016-02-09 10:47:02.000000000 +0100
++++ jabberd-2.3.6/etc/c2s.xml.dist.in	2016-04-24 11:17:20.330413849 +0200
 @@ -5,7 +5,7 @@
  
    <!-- The process ID file. Comment this out if you don't need to know
         the process ID from outside the process (eg for control scripts) -->
--  <pidfile>@localstatedir@/@package@/pid/c2s.pid</pidfile>
-+  <pidfile>@localstatedir@/run/jabber/c2s.pid</pidfile>
+-  <pidfile>@localstatedir@/@package@/pid/${id}.pid</pidfile>
++  <pidfile>@localstatedir@/run/jabber/${id}.pid</pidfile>
  
    <!-- Router connection configuration -->
    <router>
@@ -25,7 +24,7 @@ diff -ur jabberd-2.2.17.orig/etc/c2s.xml.dist.in jabberd-2.2.17/etc/c2s.xml.dist
      -->
    </log>
  
-@@ -334,7 +334,7 @@
+@@ -350,7 +350,7 @@
    <stats>
      <!-- file containing count of packets that went through -->
      <!--
@@ -34,7 +33,7 @@ diff -ur jabberd-2.2.17.orig/etc/c2s.xml.dist.in jabberd-2.2.17/etc/c2s.xml.dist
      -->
    </stats>
  
-@@ -370,7 +370,7 @@
+@@ -386,7 +386,7 @@
      <path>@pkglibdir@</path>
  
      <!-- Backend module to use -->
@@ -43,7 +42,7 @@ diff -ur jabberd-2.2.17.orig/etc/c2s.xml.dist.in jabberd-2.2.17/etc/c2s.xml.dist
  
      <!-- Available authentication mechanisms -->
      <mechanisms>
-@@ -421,7 +421,7 @@
+@@ -437,7 +437,7 @@
      <!-- SQLite driver configuration -->
      <sqlite>
        <!-- Database name -->
@@ -52,7 +51,7 @@ diff -ur jabberd-2.2.17.orig/etc/c2s.xml.dist.in jabberd-2.2.17/etc/c2s.xml.dist
  
        <!-- Transacation support. If this is commented out, transactions
             will be disabled. This might make database accesses faster,
-@@ -502,7 +502,7 @@
+@@ -559,7 +559,7 @@
      <!-- Berkeley DB module configuration -->
      <db>
        <!-- Directory to store database files under -->
@@ -75,15 +74,14 @@ diff -ur jabberd-2.2.17.orig/etc/jabberd.cfg.dist.in jabberd-2.2.17/etc/jabberd.
 +# and proper SRV records are set in DNS uncoment this to enable communication
 +# with other Jabber servers
 +#@jabberd_s2s_bin@         @sysconfdir@/s2s.xml
-diff -ur jabberd-2.2.17.orig/etc/router.xml.dist.in jabberd-2.2.17/etc/router.xml.dist.in
---- jabberd-2.2.17.orig/etc/router.xml.dist.in	2012-05-04 16:24:36.000000000 +0000
-+++ jabberd-2.2.17/etc/router.xml.dist.in	2013-07-23 17:00:56.309179075 +0000
+--- jabberd-2.3.6/etc/router.xml.dist.in.orig	2016-02-09 10:47:02.000000000 +0100
++++ jabberd-2.3.6/etc/router.xml.dist.in	2016-04-24 11:19:38.213753642 +0200
 @@ -5,7 +5,7 @@
  
    <!-- The process ID file. Comment this out if you don't need to know
         the process ID from outside the process (eg for control scripts) -->
--  <pidfile>@localstatedir@/@package@/pid/router.pid</pidfile>
-+  <pidfile>@localstatedir@/run/jabber/router.pid</pidfile>
+-  <pidfile>@localstatedir@/@package@/pid/${id}.pid</pidfile>
++  <pidfile>@localstatedir@/run/jabber/${id}.pid</pidfile>
  
    <!-- Log configuration - type is "syslog", "file" or "stdout" -->
    <log type='syslog'>
@@ -121,15 +119,14 @@ diff -ur jabberd-2.2.17.orig/etc/router.xml.dist.in jabberd-2.2.17/etc/router.xm
    </aliases>
  
    <!-- Access control information -->
-diff -ur jabberd-2.2.17.orig/etc/s2s.xml.dist.in jabberd-2.2.17/etc/s2s.xml.dist.in
---- jabberd-2.2.17.orig/etc/s2s.xml.dist.in	2012-08-06 18:18:46.000000000 +0000
-+++ jabberd-2.2.17/etc/s2s.xml.dist.in	2013-07-23 17:04:54.683054085 +0000
+--- jabberd-2.3.6/etc/s2s.xml.dist.in.orig	2016-02-09 10:47:02.000000000 +0100
++++ jabberd-2.3.6/etc/s2s.xml.dist.in	2016-04-24 11:23:03.290429917 +0200
 @@ -5,7 +5,7 @@
  
    <!-- The process ID file. Comment this out if you don't need to know
         the process ID from outside the process (eg for control scripts) -->
--  <pidfile>@localstatedir@/@package@/pid/s2s.pid</pidfile>
-+  <pidfile>@localstatedir@/run/jabber/s2s.pid</pidfile>
+-  <pidfile>@localstatedir@/@package@/pid/${id}.pid</pidfile>
++  <pidfile>@localstatedir@/@package@/run/jabber/${id}.pid</pidfile>
  
    <!-- Router connection configuration -->
    <router>
@@ -148,7 +145,7 @@ diff -ur jabberd-2.2.17.orig/etc/s2s.xml.dist.in jabberd-2.2.17/etc/s2s.xml.dist
      -->
    </log>
  
-@@ -240,7 +240,7 @@
+@@ -245,7 +245,7 @@
    <stats>
      <!-- file containing count of packets that went through -->
      <!--
@@ -157,15 +154,14 @@ diff -ur jabberd-2.2.17.orig/etc/s2s.xml.dist.in jabberd-2.2.17/etc/s2s.xml.dist
      -->
    </stats>
  
-diff -ur jabberd-2.2.17.orig/etc/sm.xml.dist.in jabberd-2.2.17/etc/sm.xml.dist.in
---- jabberd-2.2.17.orig/etc/sm.xml.dist.in	2012-05-04 16:24:36.000000000 +0000
-+++ jabberd-2.2.17/etc/sm.xml.dist.in	2013-07-23 17:33:43.782116230 +0000
+--- jabberd-2.3.6/etc/sm.xml.dist.in.orig	2016-02-09 10:47:02.000000000 +0100
++++ jabberd-2.3.6/etc/sm.xml.dist.in	2016-04-24 11:23:42.243765074 +0200
 @@ -5,7 +5,7 @@
  
    <!-- The process ID file. Comment this out if you don't need to know
         the process ID from outside the process (eg for control scripts) -->
--  <pidfile>@localstatedir@/@package@/pid/sm.pid</pidfile>
-+  <pidfile>@localstatedir@/run/jabber/sm.pid</pidfile>
+-  <pidfile>@localstatedir@/@package@/pid/${id}.pid</pidfile>
++  <pidfile>@localstatedir@/@package@/run/jabber/${id}.pid</pidfile>
  
    <!-- Router connection configuration -->
    <router>
@@ -193,16 +189,16 @@ diff -ur jabberd-2.2.17.orig/etc/sm.xml.dist.in jabberd-2.2.17/etc/sm.xml.dist.i
  
      <!-- Its also possible to explicitly list alternate drivers for
           specific data types. -->
-@@ -133,7 +133,7 @@
+@@ -139,7 +139,7 @@
      <!-- SQLite driver configuration -->
      <sqlite>
        <!-- Database name -->
 -      <dbname>@localstatedir@/@package@/db/sqlite.db</dbname>
 +      <dbname>@localstatedir@/lib/jabberd/sqlite.db</dbname>
  
-       <!-- Transacation support. If this is commented out, transactions
+       <!-- Transaction support. If this is commented out, transactions
             will be disabled. This might make database accesses faster,
-@@ -199,7 +199,7 @@
+@@ -208,7 +208,7 @@
           implementation does not implement the 'count' callback). -->
      <db>
        <!-- Directory to store database files under -->
@@ -211,7 +207,7 @@ diff -ur jabberd-2.2.17.orig/etc/sm.xml.dist.in jabberd-2.2.17/etc/sm.xml.dist.i
  
        <!-- Synchronize the database to disk after each write. If you
             disable this, database accesses may be faster, but data may
-@@ -595,6 +595,8 @@
+@@ -620,6 +620,8 @@
      </serverinfo>
      -->
  
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/jabberd.git/commitdiff/dbf65a43d8ce7b57cd45c1b228222269333b917e



More information about the pld-cvs-commit mailing list