-
+# TODO:
+# - package all deps (tarballs 10-29) into separate spec files
+# (like in fedora)
# Conditional build:
%bcond_with pam # PAM authentication support
%bcond_without logdb # enable mod_logdb (server-side message logging)
-%bcond_with weaker_crypto # enable SSLv3
+%bcond_with new_sql_schema # build with the new SQL schema
Summary: Fault-tolerant distributed Jabber/XMPP server
Summary(pl.UTF-8): Odporny na awarie rozproszony serwer Jabbera/XMPP
Name: ejabberd
-Version: 15.03
-Release: 1
+Version: 19.08
+Release: 2
License: GPL
Group: Applications/Communications
Source0: http://www.process-one.net/downloads/ejabberd/%{version}/%{name}-%{version}.tgz
-# Source0-md5: cc4c7fee048d972264c74d46ca1bbd76
+# Source0-md5: c8a3215a85bc3c5f021306747f76b730
Source1: %{name}.init
Source2: %{name}.sysconfig
Source3: %{name}.service
Source4: %{name}.logrotate
#
# Archives created with the ejabberd-pack_deps.sh script (in this repo)
-Source10: ejabberd-ehyperloglog-20131012.tar.gz
-# Source10-md5: 71e3e8e0d0b509eafe1e23b0674ba408
-Source11: ejabberd-elixir-20150317.tar.gz
-# Source11-md5: 667189dc1df85d105c0deb7a11c56f26
-Source12: ejabberd-esip-20150204.tar.gz
-# Source12-md5: c6f3cb921288c968df4f59048344fb68
-Source13: ejabberd-goldrush-20140123.tar.gz
-# Source13-md5: 40ad415a0474de146552a7dfdc427f94
-Source14: ejabberd-jiffy-20150203.tar.gz
-# Source14-md5: a37dad15b021fb9d9dafb9990844ed59
-Source15: ejabberd-lager-20150212.tar.gz
-# Source15-md5: fca565749f17cad57c86d81d41172c72
-Source16: ejabberd-p1_cache_tab-20150109.tar.gz
-# Source16-md5: 37b197df478cc9d505da32e147e73a7e
-Source17: ejabberd-p1_iconv-20150223.tar.gz
-# Source17-md5: 3d69e8ad57939194d794417eb16a12b0
-Source18: ejabberd-p1_mysql-20150204.tar.gz
-# Source18-md5: e7e733d14a8917e8cf74cd4f54087958
-Source19: ejabberd-p1_pgsql-20150204.tar.gz
-# Source19-md5: e1d3a6ca1521e0c8e29dd2e4a0007288
-Source20: ejabberd-p1_stringprep-20150204.tar.gz
-# Source20-md5: b1fd67a1790a46085769465469287546
-Source21: ejabberd-p1_stun-20150204.tar.gz
-# Source21-md5: 8824f9356efc5cb7e7ad6ccc3a9e4afc
-Source22: ejabberd-p1_tls-20150204.tar.gz
-# Source22-md5: 0b7a556ada6e4b474edbbe4a3d8b469e
-Source23: ejabberd-p1_utils-20150204.tar.gz
-# Source23-md5: ba005fc5f6e86a474ead5b1631826516
-Source24: ejabberd-p1_xml-20150210.tar.gz
-# Source24-md5: f3704ad2a771e38d0d500dc459fc720a
-Source25: ejabberd-p1_yaml-20150204.tar.gz
-# Source25-md5: 56532600503a5a09441dd2e02db52ac0
-Source26: ejabberd-p1_zlib-20150223.tar.gz
-# Source26-md5: f0de4ca87b4802a7727ba5eaf78e4a58
-Source27: ejabberd-rebar_elixir_plugin-20140818.tar.gz
-# Source27-md5: cd9a76ae94b6d1b19499cdab7248fcf6
-#
+Source10: %{name}-base64url-20190617.tar.gz
+# Source10-md5: 5a12fd2fb1f992c850aba5115aab3dd4
+Source11: %{name}-cache_tab-20190802.tar.gz
+# Source11-md5: cf0e72d17802d2e10d850f0e339a1c11
+Source12: %{name}-eimp-20190802.tar.gz
+# Source12-md5: ec256209f4c1798f1fc4c863881f9e43
+Source13: %{name}-elixir-20170515.tar.gz
+# Source13-md5: 73be42f7d0cda7aeee5c0e6dadc0c451
+Source14: %{name}-ezlib-20190523.tar.gz
+# Source14-md5: e521f10bba8fd2208aa5c15272050399
+Source15: %{name}-fast_tls-20190802.tar.gz
+# Source15-md5: 80359622cc6d929923d5c316f9b9061f
+Source16: %{name}-fast_xml-20190802.tar.gz
+# Source16-md5: 628bc356a896e6921818700738d977e5
+Source17: %{name}-fast_yaml-20190802.tar.gz
+# Source17-md5: 9a277749887e10ef34a50ff08c6b2d82
+Source18: %{name}-goldrush-20160531.tar.gz
+# Source18-md5: acac73f0fc85d23671f0c49c68f8df8a
+Source19: %{name}-jiffy-20160331.tar.gz
+# Source19-md5: 78f31a7dea7538ef3e63f77351f4d0b7
+Source20: %{name}-jose-20170518.tar.gz
+# Source20-md5: b1675bfc57c1b3b7e154270e2bcd4559
+Source21: %{name}-lager-20190430.tar.gz
+# Source21-md5: 66205d931dd27b496529c19addf6d7d9
+Source22: %{name}-mqtree-20190802.tar.gz
+# Source22-md5: 16cd0ea398c505e12bd886c5fd311012
+Source23: %{name}-p1_mysql-20190831.tar.gz
+# Source23-md5: 8cc96c4fcc8341b2c0565f818de2ba6d
+Source24: %{name}-p1_oauth2-20190523.tar.gz
+# Source24-md5: 5a1284f4e055d414f5867fdf54baf164
+Source25: %{name}-p1_pgsql-20190523.tar.gz
+# Source25-md5: 348772eb0ccb9952cb202a7900eb905d
+Source26: %{name}-p1_utils-20190802.tar.gz
+# Source26-md5: 19c97dcdc6a37a4b574f67bdce6b9566
+Source27: %{name}-pkix-20190802.tar.gz
+# Source27-md5: 96c39ddde79ccce22e3ed3785be4861d
+Source28: %{name}-rebar_elixir_plugin-20160105.tar.gz
+# Source28-md5: 6a069a566d71c3daa45fc4736364adf0
+Source29: %{name}-sqlite3-20180130.tar.gz
+# Source29-md5: cc8950eb769eb6ceb13723a7b61fe507
+Source30: %{name}-stringprep-20190802.tar.gz
+# Source30-md5: cd354de1ee12712a2434c39241cf5488
+Source31: %{name}-xmpp-20190802.tar.gz
+# Source31-md5: 73587aa235b062e592d5f043b32fe3b8
+Source32: %{name}-yconf-20190802.tar.gz
+# Source32-md5: 8ad82ed92e339c67a63f3ef5e3f95a2c
+
Patch0: %{name}-paths.patch
Patch1: %{name}-config.patch
-# not available for 13.10
-#Patch2: %{name}-vcard-access-get.patch
-# http://www.dp.uz.gov.ua/o.palij/mod_logdb/patch-mod_logdb-13.12.diff
+# https://paleg.github.io/mod_logdb/
+# https://github.com/paleg/ejabberd/compare/paleg:19.08...paleg:19.08-mod_logdb.patch
Patch3: %{name}-mod_logdb.patch
-Patch4: %{name}-no_sslv3_or_3des.patch
+Patch4: ping-bug-3010.patch
URL: http://www.ejabberd.im/
BuildRequires: autoconf
BuildRequires: automake
-BuildRequires: erlang >= 1:R15B01
+BuildRequires: erlang >= 1:R16B03
BuildRequires: expat-devel >= 1.95
BuildRequires: openssl-devel
%if %{with pam}
BuildRequires: pam-devel
%endif
+BuildRequires: git-core
BuildRequires: rpmbuild(macros) >= 1.671
+BuildRequires: sqlite3-devel
BuildRequires: yaml-devel
BuildRequires: zlib-devel
-BuildRequires: git-core
Requires(post): /usr/bin/perl
Requires(post): jabber-common
Requires(post): sed >= 4.0
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 -a 25 -a 26 -a 27
+%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 -a 25 -a 26 -a 27 -a 28 -a 29 -a 30 -a 31 -a 32
%patch0 -p1
%patch1 -p1
#%%patch2 -p1
%if %{with logdb}
%patch3 -p1
%endif
-%if %{without weaker_crypto}
%patch4 -p1
-%endif
# Various parts of the build system use 'git describe'
# which returns nonsense on manual builds using the builder script
%configure \
%{?with_pam --enable-pam} \
--enable-user=jabber \
+ %{__enable_disable new_sql_schema new-sql-schema} \
--enable-elixir \
--enable-full-xml \
- --enable-nif \
--enable-odbc \
--enable-mysql \
--enable-pgsql \
+ --enable-sqlite --with-sqlite3 \
%{?with_pam:--enable-pam} \
- --enable-zlib \
- --enable-json \
- --enable-iconv \
- --enable-lager
+ --enable-zlib
touch deps/.got
-cd deps/p1_iconv
-%configure
-cd ../..
-cd deps/p1_stringprep
+cd deps/stringprep
%configure
cd ../..
-cd deps/p1_tls
+cd deps/fast_tls
%configure
cd ../..
-cd deps/p1_xml
-%configure \
- --enable-nif \
- --enable-full-xml
-cd ../..
-cd deps/p1_yaml
+cd deps/fast_xml
%configure
cd ../..
-cd deps/p1_zlib
+cd deps/fast_yaml
%configure
cd ../..
-cd deps/esip
+cd deps/ezlib
%configure
cd ../..
+# for elixir VM
+LC_ALL=en_US.UTF-8; export LC_ALL
%{__make} -j1
%install
DESTDIR=$RPM_BUILD_ROOT
sed -e's,@libdir@,%{_libdir},g' -e 's,@EJABBERD_DOC_PATH@,%{_docdir}/%{name}-%{version}/doc,g' %{SOURCE1} > $RPM_BUILD_ROOT/etc/rc.d/init.d/%{name}
-install %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
-install %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
-install %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
+cp -p %{SOURCE2} $RPM_BUILD_ROOT/etc/sysconfig/%{name}
+cp -p %{SOURCE3} $RPM_BUILD_ROOT%{systemdunitdir}/%{name}.service
+cp -p %{SOURCE4} $RPM_BUILD_ROOT/etc/logrotate.d/%{name}
chmod u+rw $RPM_BUILD_ROOT%{_sbindir}/%{name}*
-chmod 755 $RPM_BUILD_ROOT%{_libdir}/ejabberd/priv/lib/*.so
+chmod 755 $RPM_BUILD_ROOT%{_libdir}/*/priv/lib/*.so
rm -rf _doc 2>/dev/null || :
mv $RPM_BUILD_ROOT%{_docdir}/%{name} _doc
%defattr(644,root,root,755)
%doc sql _doc/*
%attr(755,root,root) %{_sbindir}/*
+%attr(755,root,root) %{_bindir}/elixir
+%attr(755,root,root) %{_bindir}/iex
+%attr(755,root,root) %{_bindir}/mix
%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/ejabberd-inetrc
%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/ejabberd.yml
%attr(640,root,jabber) %config(noreplace) %verify(not md5 mtime size) %{_sysconfdir}/jabber/ejabberdctl.cfg
%attr(770,root,jabber) /var/log/%{name}
%attr(770,root,jabber) /var/log/archive/%{name}
%if %{with logdb}
-%exclude %{_libdir}/ejabberd/ebin/mod_logdb*
+%exclude %{_libdir}/ejabberd-%{version}/ebin/mod_logdb*
%endif
-%{_libdir}/ejabberd
+%{_libdir}/ejabberd-%{version}
+%{_libdir}/base64url-*
+%{_libdir}/cache_tab-*
+%dir %{_libdir}/eimp-*
+%dir %{_libdir}/eimp-*/priv
+%dir %{_libdir}/eimp-*/priv/bin
+%attr(755,root,root) %{_libdir}/eimp-*/priv/bin/eimp
+%{_libdir}/eimp-*/ebin
+%{_libdir}/eimp-*/LICENSE.txt
+%{_libdir}/elixir-*
+%{_libdir}/ezlib-*
+%{_libdir}/fast_tls-*
+%{_libdir}/fast_xml-*
+%{_libdir}/fast_yaml-*
+%{_libdir}/goldrush-*
+%{_libdir}/jiffy-*
+%{_libdir}/jose-*
+%{_libdir}/lager-*
+%dir %{_libdir}/mqtree-*
+%{_libdir}/mqtree-*/ebin
+%dir %{_libdir}/mqtree-*/priv
+%dir %{_libdir}/mqtree-*/priv/lib
+%attr(755,root,root) %{_libdir}/mqtree-*/priv/lib/mqtree.so
+%{_libdir}/p1_mysql-*
+%{_libdir}/p1_oauth2-*
+%{_libdir}/p1_pgsql-*
+%{_libdir}/p1_utils-*
+%dir %{_libdir}/pkix-*
+%{_libdir}/pkix-*/ebin
+%{_libdir}/pkix-*/LICENSE
+%{_libdir}/rebar_elixir_plugin-*
+%{_libdir}/sqlite3-*/ebin
+%dir %{_libdir}/sqlite3-*
+%dir %{_libdir}/sqlite3-*/priv
+%attr(755,root,root) %{_libdir}/sqlite3-*/priv/sqlite3_drv.so
+%{_libdir}/stringprep-*
+%{_libdir}/xmpp-*
+%{_libdir}/yconf-*
%dir %attr(770,root,jabber) /var/lib/ejabberd
%ghost %attr(400,jabber,jabber) %ghost %config(noreplace) %verify(not md5 mtime size) /var/lib/ejabberd/.erlang.cookie
%attr(754,root,root) /etc/rc.d/init.d/%{name}
%if %{with logdb}
%files logdb
%defattr(644,root,root,755)
-%{_libdir}/ejabberd/ebin/mod_logdb*
+%{_libdir}/ejabberd-%{version}/ebin/mod_logdb*
%endif