+++ /dev/null
---
--- 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 -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>
-->
</log>
-@@ -334,7 +334,7 @@
+@@ -350,7 +350,7 @@
<stats>
<!-- file containing count of packets that went through -->
<!--
-->
</stats>
-@@ -370,7 +370,7 @@
+@@ -386,7 +386,7 @@
<path>@pkglibdir@</path>
<!-- Backend module to use -->
<!-- Available authentication mechanisms -->
<mechanisms>
-@@ -421,7 +421,7 @@
+@@ -437,7 +437,7 @@
<!-- SQLite driver configuration -->
<sqlite>
<!-- Database name -->
<!-- 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 -->
+# 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'>
</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>
-->
</log>
-@@ -240,7 +240,7 @@
+@@ -245,7 +245,7 @@
<stats>
<!-- file containing count of packets that went through -->
<!--
-->
</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>
<!-- 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 -->
<!-- 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>
-->
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
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
%patch22 -p0
%endif
-install %{SOURCE3} tools/
-
%build
#http://j2.openaether.org/bugzilla/show_bug.cgi?id=17
%{__libtoolize}
%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
/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."
%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
%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