summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'net-im/ejabberd')
-rw-r--r--net-im/ejabberd/ChangeLog485
-rw-r--r--net-im/ejabberd/Manifest16
-rw-r--r--net-im/ejabberd/ejabberd-2.1.8.ebuild211
-rw-r--r--net-im/ejabberd/files/ejabberd-2.0.5-erlang-13.patch361
-rw-r--r--net-im/ejabberd/files/ejabberd-2.1.4-mod_shared_roster_ldap.patch13
-rw-r--r--net-im/ejabberd/files/ejabberd-2.1.5-md2-optional.patch259
-rw-r--r--net-im/ejabberd/files/ejabberd-2.confd23
-rw-r--r--net-im/ejabberd/files/ejabberd-2.initd54
-rw-r--r--net-im/ejabberd/files/ejabberd-3.confd5
-rw-r--r--net-im/ejabberd/files/ejabberd-3.initd47
-rw-r--r--net-im/ejabberd/files/ejabberd-wrapper-2.template49
-rw-r--r--net-im/ejabberd/files/ejabberdctl-wrapper-3.template46
-rwxr-xr-xnet-im/ejabberd/files/self-cert-v2.sh41
-rw-r--r--net-im/ejabberd/files/ssl.cnf36
-rw-r--r--net-im/ejabberd/metadata.xml18
15 files changed, 1664 insertions, 0 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog
new file mode 100644
index 0000000..796c276
--- /dev/null
+++ b/net-im/ejabberd/ChangeLog
@@ -0,0 +1,485 @@
+# ChangeLog for net-im/ejabberd
+# Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.93 2011/03/25 11:18:22 tomka Exp $
+
+ 25 Mar 2011; Thomas Kahle <tomka@gentoo.org> ejabberd-2.1.6.ebuild:
+ x86 stable per bug 359961
+
+ 22 Mar 2011; Christoph Mende <angelos@gentoo.org> ejabberd-2.1.6.ebuild:
+ Stable on amd64 wrt bug #359961
+
+ 22 Mar 2011; Peter Volkov <pva@gentoo.org> ejabberd-2.1.5.ebuild,
+ -ejabberd-2.1.5-r3.ebuild, ejabberd-2.1.6.ebuild:
+ Drop PROVIDE=virtual/jabber-server, bug #358833, thank Ulrich Müller for
+ report. Drop unused.
+
+ 21 Mar 2011; Kevin McCarthy <signals@gentoo.org> ejabberd-2.1.5.ebuild,
+ ejabberd-2.1.5-r3.ebuild, ejabberd-2.1.6.ebuild:
+ RDEPEND virtual/pam if pam use flag set. WRT #351932
+
+*ejabberd-2.1.6 (20 Dec 2010)
+
+ 20 Dec 2010; Peter Volkov <pva@gentoo.org> -ejabberd-2.1.5-r2.ebuild,
+ +ejabberd-2.1.6.ebuild:
+ Version bump, thank krigstask for report. Note, shared roster ldap module
+ (USE=mod_srl) is now included upstream. Drop unused.
+
+*ejabberd-2.1.5-r3 (18 Nov 2010)
+
+ 18 Nov 2010; Peter Volkov <pva@gentoo.org> +ejabberd-2.1.5-r3.ebuild:
+ Fix unix_chkpwd authentication failure (jabber owner on epam), bug
+ #345909, thank bathizte for report.
+
+*ejabberd-2.1.5-r2 (15 Oct 2010)
+
+ 15 Oct 2010; Peter Volkov <pva@gentoo.org> -ejabberd-2.1.5-r1.ebuild,
+ +ejabberd-2.1.5-r2.ebuild:
+ Another mod_srl update, drop broken, bug #341131 thank Nickolaj Stjujsckij
+ for this job.
+
+ 07 Sep 2010; Peter Volkov <pva@gentoo.org> -ejabberd-2.0.5-r3.ebuild,
+ -ejabberd-2.1.4.ebuild:
+ Drop old and openssl-1 incompatible versions as Samuli requested.
+
+*ejabberd-2.1.5-r1 (30 Aug 2010)
+
+ 30 Aug 2010; Peter Volkov <pva@gentoo.org> +ejabberd-2.1.5-r1.ebuild:
+ Updated mod_srl, thank krigstask for this job.
+
+ 09 Aug 2010; Peter Volkov <pva@gentoo.org> ejabberd-2.1.5.ebuild,
+ +files/ejabberd-2.1.5-md2-optional.patch:
+ Fix openssl breakage due to missed md2 support, bug 331299, thank Rion for
+ report and Samuli Suominen for quick fix.
+
+*ejabberd-2.1.5 (05 Aug 2010)
+
+ 05 Aug 2010; Peter Volkov <pva@gentoo.org> +ejabberd-2.1.5.ebuild:
+ Version bump. SSL is now required (per upstream, see release notes). Thank
+ Rion for report.
+
+ 22 Jul 2010; Peter Volkov <pva@gentoo.org> ejabberd-2.1.4.ebuild,
+ +files/ejabberd-2.1.4-mod_shared_roster_ldap.patch:
+ Added patch for mod_shared_roster_ldap, thank Andrian Nord for report and
+ fix in bug #328533!
+
+ 12 Jul 2010; Markos Chandras <hwoarang@gentoo.org> ejabberd-2.1.4.ebuild:
+ Stable on amd64 wrt bug #308047
+
+ 10 Jul 2010; Raúl Porcel <armin76@gentoo.org> ejabberd-2.0.5-r3.ebuild,
+ ejabberd-2.1.4.ebuild:
+ Add ~sparc wrt #259802
+
+ 03 Jul 2010; Christian Faulhammer <fauli@gentoo.org>
+ ejabberd-2.1.4.ebuild:
+ stable x86, security bug 308047
+
+*ejabberd-2.1.4 (07 Jun 2010)
+
+ 07 Jun 2010; Peter Volkov <pva@gentoo.org> -ejabberd-2.1.3.ebuild,
+ +ejabberd-2.1.4.ebuild:
+ Version bump, thank Rion for report in bug #281366
+
+ 07 Jun 2010; Peter Volkov <pva@gentoo.org> ejabberd-2.1.3.ebuild:
+ Updated required shadow version.
+
+ 07 Jun 2010; Peter Volkov <pva@gentoo.org> +files/2.1.1-mod_statsdx.patch:
+ Added missed 2.1.1-mod_statsdx.patch, bug #281366, thank jamatik for
+ report.
+
+ 02 Jun 2010; Peter Volkov <pva@gentoo.org> files/ejabberd-3.initd:
+ Make stop at init script working again, thank krigstask for report.
+
+ 02 Jun 2010; Torsten Veller <tove@gentoo.org> metadata.xml:
+ Remove caleb from metadata.xml (#317071)
+
+ 01 Jun 2010; Peter Volkov <pva@gentoo.org> ejabberd-2.1.3.ebuild,
+ metadata.xml:
+ Added LDAP shared roster module, fixed some typos, thank krigstask for
+ this job.
+
+ 28 May 2010; Peter Volkov <pva@gentoo.org> files/ejabberd-3.initd:
+ Make init script a bit more resistant, e.g. restart should now work, thank
+ Rion for report.
+
+ 27 May 2010; Peter Volkov <pva@gentoo.org> ejabberd-2.1.3.ebuild:
+ Fixed future build problem reproducible with -rX, where X!=0, thank Rion
+ fo report.
+
+*ejabberd-2.1.3 (26 May 2010)
+
+ 26 May 2010; Peter Volkov <pva@gentoo.org> +files/2.1.1-mod_statsdx.patch,
+ +ejabberd-2.1.3.ebuild, +files/ejabberd-3.confd, +files/ejabberd-3.initd:
+ Version bump, #281366 thank Vadim Efimov for report and jamatik for
+ preliminary testing (that helped greately)! Fixes conflict with GSecurity
+ TPE bug 202616, thank Andrian Nord for report. Init script rewriten, fixes
+ bugs #210234, #279613 and #306593, thank Luca Barbato, Roy Marples,
+ Luke-Jr and Livid. Fixed ssl related build issue, bug 288414 by Michał
+ Masłowski. Fixes DoS, security bug 308047, thank Stefan Behte for report.
+
+ 30 Dec 2009; Christian Faulhammer <fauli@gentoo.org>
+ -files/1.1.4-missing-declaration.patch, -ejabberd-1.1.4-r1.ebuild,
+ -ejabberd-1.1.4-r2.ebuild, -files/ejabberd-1.1.4-erlang-12.patch,
+ -files/2.0.0-erlang12-s2s-in.patch, -files/ejabberd-1.1.4.confd,
+ -ejabberd-2.0.4.ebuild, -files/2.0.1-parallel-make.patch,
+ -files/ejabberd-1.1.4.initd, -files/ejabberd-2.0.4-fix-EJAB-890.patch,
+ -ejabberd-2.0.5.ebuild, -ejabberd-2.0.5-r1.ebuild,
+ -ejabberd-2.0.5-r2.ebuild, -files/ejabberdctl-wrapper-2.template,
+ -files/2.0.0-ejab-542-mod_proxy65.patch,
+ -files/2.0.0-missing-declaration.patch, -files/ejabberd,
+ -files/ejabberdctl, -files/inetrc, -files/self-cert.sh:
+ clean up
+
+ 25 Nov 2009; Markus Meier <maekke@gentoo.org> ejabberd-2.0.5-r3.ebuild:
+ amd64 stable, bug #291744
+
+ 19 Nov 2009; Christian Faulhammer <fauli@gentoo.org>
+ ejabberd-2.0.5-r3.ebuild:
+ stable x86, bug 291744
+
+ 05 Nov 2009; Raúl Porcel <armin76@gentoo.org> ejabberd-2.0.5-r3.ebuild:
+ Add ~arm/~ia64
+
+ 05 Jun 2009; Peter Volkov <pva@gentoo.org> +ejabberd-2.0.5.ebuild,
+ +ejabberd-2.0.5-r1.ebuild:
+ Revert recent stable versions back, bug #271321, thank Marat Radchenko for
+ report. Added <erlang-13 dependency too, bug #267524.
+
+*ejabberd-2.0.5-r3 (03 Jun 2009)
+
+ 03 Jun 2009; Christian Faulhammer <fauli@gentoo.org>
+ +files/ejabberd-2.0.5-erlang-13.patch, +ejabberd-2.0.5-r3.ebuild:
+ revision bump to fix runtime failures with Erlang 13, as reported and fixed
+ by Karl-Johan Karlsson <creideiki+gentoo-bugzilla AT lysator DOT liu DOT se>
+ in bug 267524
+
+ 20 May 2009; Caleb Tennis <caleb@gentoo.org> ejabberd-2.0.4.ebuild:
+ Add erlang 13 dep to the stable build as well
+
+ 20 May 2009; Caleb Tennis <caleb@gentoo.org> -ejabberd-2.0.1_p2-r1.ebuild,
+ -ejabberd-2.0.2.ebuild, -ejabberd-2.0.2-r1.ebuild,
+ -ejabberd-2.0.4-r1.ebuild, -ejabberd-2.0.5.ebuild,
+ -ejabberd-2.0.5-r1.ebuild:
+ Remove old ebuilds
+
+ 20 May 2009; Caleb Tennis <caleb@gentoo.org> ejabberd-2.0.5-r2.ebuild:
+ Not compatible with erlang 13, so make sure we're using 12 for now per
+ #267524
+
+*ejabberd-2.0.5-r2 (27 Apr 2009)
+
+ 27 Apr 2009; Caleb Tennis <caleb@gentoo.org>
+ +files/ejabberdctl-wrapper-3.template, +ejabberd-2.0.5-r2.ebuild:
+ Bump adding a new debug shell patch to the wrapper, from bug #250861
+
+ 22 Apr 2009; Markus Meier <maekke@gentoo.org> ejabberd-2.0.5-r1:
+ amd64 stable, bug #265341
+
+*ejabberd-2.0.5-r1 (20 Apr 2009)
+
+ 20 Apr 2009; Peter Volkov <pva@gentoo.org> +ejabberd-2.0.5-r1.ebuild:
+ Fixed permissions handling on amd64, thank Markus Meier for report in bug
+ #265341.
+
+ 19 Apr 2009; Markus Meier <maekke@gentoo.org> ejabberd-2.0.5:
+ x86 stable, bug #265341
+
+*ejabberd-2.0.5 (09 Apr 2009)
+
+ 09 Apr 2009; Peter Volkov <pva@gentoo.org> -files/ejabberd-2.0.1.confd,
+ -files/ejabberd-2.0.1.initd, -files/ejabberd-wrapper-2.0.1.template,
+ -files/ejabberdctl-wrapper-2.0.1.template, -files/ejabberd-2.0.2.confd,
+ -files/ejabberd-2.0.2.initd, -files/ejabberd-wrapper-2.0.2.template,
+ -files/ejabberdctl-wrapper-2.0.2.template, -files/ejabberd-2.0.4.confd,
+ -files/ejabberd-2.0.4.initd, -files/ejabberd-wrapper-2.0.4.template,
+ -files/ejabberdctl-wrapper-2.0.4.template, +files/ejabberd-2.confd,
+ +files/ejabberd-2.initd, +files/ejabberd-wrapper-2.template,
+ +files/ejabberdctl-wrapper-2.template, ejabberd-2.0.1_p2-r1.ebuild,
+ ejabberd-2.0.2.ebuild, ejabberd-2.0.2-r1.ebuild, ejabberd-2.0.4.ebuild,
+ ejabberd-2.0.4-r1.ebuild, +ejabberd-2.0.5.ebuild:
+ Version bump, bug #265341 thank candrews for report and Vadim Efimov for
+ this work.
+
+*ejabberd-2.0.4-r1 (28 Mar 2009)
+
+ 28 Mar 2009; Peter Volkov <pva@gentoo.org>
+ +files/ejabberd-2.0.4-fix-EJAB-890.patch, +ejabberd-2.0.4-r1.ebuild:
+ Fixed EJAB-890 (subscription request produces many authorization requests
+ with some clients and transports), bug #263950, thank Vadim Efimov for
+ report and fix.
+
+ 27 Mar 2009; Hanno Boeck <hanno@gentoo.org> files/ejabberd-2.0.1.initd,
+ files/ejabberd-2.0.2.initd, files/ejabberd-2.0.4.initd:
+ Fix SMPOPT to be auto for smp-enabled systems.
+
+ 23 Mar 2009; Markus Meier <maekke@gentoo.org> ejabberd-2.0.4.ebuild:
+ amd64/x86 stable, bug #262696
+
+*ejabberd-2.0.4 (21 Mar 2009)
+
+ 21 Mar 2009; Caleb Tennis <caleb@gentoo.org> +files/ejabberd-2.0.4.confd,
+ +files/ejabberd-2.0.4.initd, +files/ejabberd-wrapper-2.0.4.template,
+ +files/ejabberdctl-wrapper-2.0.4.template, +ejabberd-2.0.4.ebuild:
+ Version bump
+
+*ejabberd-1.1.4-r2 (01 Feb 2009)
+
+ 01 Feb 2009; Patrick Lauer <patrick@gentoo.org> +ejabberd-1.1.4-r2.ebuild:
+ Fixing doc installation, closes #155101
+
+*ejabberd-2.0.2-r1 (01 Feb 2009)
+
+ 01 Feb 2009; Patrick Lauer <patrick@gentoo.org> ejabberd-2.0.2.ebuild,
+ +ejabberd-2.0.2-r1.ebuild:
+ Small doc fix, docs are actually installed now
+
+*ejabberd-2.0.2 (09 Sep 2008)
+
+ 09 Sep 2008; Caleb Tennis <caleb@gentoo.org> -ejabberd-2.0.2_beta1.ebuild,
+ +ejabberd-2.0.2.ebuild:
+ version bump
+
+ 05 Aug 2008; Thomas Anderson <gentoofan23@gentoo.org> metadata.xml:
+ Add USE flag description to metadata as per GLEP 56.
+
+ 03 Aug 2008; Caleb Tennis <caleb@gentoo.org>
+ -files/ejabberd-1.1.1-r1.initd, -files/ejabberd-1.1.1.confd,
+ -files/ejabberd-2.0.0.confd, -files/ejabberd-2.0.0.initd,
+ -files/ejabberd-wrapper-2.0.0.template,
+ -files/ejabberdctl-wrapper-2.0.0.template, -ejabberd-1.1.4.ebuild,
+ -ejabberd-2.0.0-r1.ebuild, -ejabberd-2.0.1_p2.ebuild:
+ remove older versions
+
+*ejabberd-2.0.2_beta1 (03 Aug 2008)
+
+ 03 Aug 2008; Caleb Tennis <caleb@gentoo.org> +files/ejabberd-2.0.2.confd,
+ +files/ejabberd-2.0.2.initd, +files/ejabberd-wrapper-2.0.2.template,
+ +files/ejabberdctl-wrapper-2.0.2.template, +ejabberd-2.0.2_beta1.ebuild:
+ version bump
+
+ 27 Jul 2008; Caleb Tennis <caleb@gentoo.org> ejabberd-2.0.1_p2-r1.ebuild:
+ amd64 the revbump too
+
+ 26 Jul 2008; Dawid Węgliński <cla@gentoo.org>
+ ejabberd-2.0.1_p2-r1.ebuild:
+ Stable on x86 (bug #231676)
+
+*ejabberd-2.0.1_p2-r1 (19 Jul 2008)
+
+ 19 Jul 2008; Caleb Tennis <caleb@gentoo.org>
+ +files/2.0.1-parallel-make.patch, +ejabberd-2.0.1_p2-r1.ebuild:
+ Add parallel make patch per 225565
+
+ 19 Jul 2008; Caleb Tennis <caleb@gentoo.org> ejabberd-2.0.1_p2.ebuild:
+ amd64 stable per #231676
+
+ 25 May 2008; Caleb Tennis <caleb@gentoo.org> ejabberd-2.0.1_p2.ebuild:
+ make /var/lib/ejabberd directory
+
+ 23 May 2008; Caleb Tennis <caleb@gentoo.org> ejabberd-2.0.1_p2.ebuild:
+ add pam use flag and set permissions on pam helper
+
+*ejabberd-2.0.1_p2 (23 May 2008)
+
+ 23 May 2008; Caleb Tennis <caleb@gentoo.org> -ejabberd-2.0.1.ebuild,
+ +ejabberd-2.0.1_p2.ebuild:
+ bump to a new upstream version
+
+ 22 May 2008; Caleb Tennis <caleb@gentoo.org> files/ejabberd-2.0.1.initd,
+ +files/ejabberd-wrapper-2.0.1.template,
+ +files/ejabberdctl-wrapper-2.0.1.template, ejabberd-2.0.1.ebuild:
+ add some fixes from 207586
+
+*ejabberd-2.0.1 (22 May 2008)
+
+ 22 May 2008; Caleb Tennis <caleb@gentoo.org> files/ejabberd-2.0.0.initd,
+ +ejabberd-2.0.1.ebuild:
+ version bump
+
+ 13 Apr 2008; Caleb Tennis <caleb@gentoo.org> files/self-cert-v2.sh,
+ ejabberd-2.0.0-r1.ebuild:
+ Update self-cert-v2.sh
+
+ 13 Apr 2008; Caleb Tennis <caleb@gentoo.org> ejabberd-2.0.0-r1.ebuild:
+ Fix homepage
+
+*ejabberd-2.0.0-r1 (13 Apr 2008)
+
+ 13 Apr 2008; Caleb Tennis <caleb@gentoo.org> +files/ejabberd-2.0.0.confd,
+ files/ejabberd-2.0.0.initd, +files/ejabberd-wrapper-2.0.0.template,
+ +files/ejabberdctl-wrapper-2.0.0.template,
+ +files/2.0.0-ejab-542-mod_proxy65.patch,
+ +files/2.0.0-erlang12-s2s-in.patch, -ejabberd-2.0.0.ebuild,
+ +ejabberd-2.0.0-r1.ebuild:
+ Bump revision with a whole new ebuild, thanks to the folks in bug #207586
+
+ 17 Mar 2008; Tony Vroon <chainsaw@gentoo.org> metadata.xml:
+ Mark caleb as maintainer of this package.
+
+ 22 Feb 2008; Caleb Tennis <caleb@gentoo.org> +files/ejabberd-1.1.4.confd,
+ ejabberd-1.1.4.ebuild, ejabberd-1.1.4-r1.ebuild:
+ 1.1.4 was using the 1.1.3 conf file, so create a 1.1.4 conf file and update
+ the ebuilds to use it
+
+*ejabberd-2.0.0 (22 Feb 2008)
+
+ 22 Feb 2008; Caleb Tennis <caleb@gentoo.org> -files/ejabberd-1.1.3.confd,
+ -files/1.1.3-missing-declaration.patch, -ejabberd-1.1.3.ebuild,
+ -ejabberd-1.1.3-r1.ebuild, -ejabberd-1.1.3-r2.ebuild,
+ -ejabberd-2.0.0_rc1.ebuild, +ejabberd-2.0.0.ebuild:
+ bump to 2.0.0, remove old versions
+
+ 10 Feb 2008; Luca Barbato <lu_zero@gentoo.org> ejabberd-2.0.0_rc1.ebuild:
+ Marked ~ppc
+
+*ejabberd-2.0.0_rc1 (05 Feb 2008)
+
+ 05 Feb 2008; Caleb Tennis <caleb@gentoo.org> +files/ejabberd-2.0.0.initd,
+ +files/2.0.0-missing-declaration.patch, +ejabberd-2.0.0_rc1.ebuild:
+ Version bump, from bug #207586
+
+ 31 Jan 2008; Christian Faulhammer <opfer@gentoo.org>
+ ejabberd-1.1.4-r1.ebuild:
+ emergency stable x86
+
+*ejabberd-1.1.4-r1 (11 Jan 2008)
+
+ 11 Jan 2008; Christian Faulhammer <opfer@gentoo.org>
+ +files/ejabberd-1.1.4-erlang-12.patch, +ejabberd-1.1.4-r1.ebuild:
+ make ejabberd compile with Erlang 12B, patch take from Debian, reported in
+ bug 202114 by Conrad Kostecki <ConiKost AT gmx DOT de>, thanks to Anton
+ Romanov <theli AT ukr DOT net>
+
+ 08 Dec 2007; Ulrich Mueller <ulm@gentoo.org>
+ +files/ejabberd-1.1.1-r1.initd, +files/ejabberd-1.1.1.confd:
+ Restore initd and confd files that are still needed.
+
+ 08 Dec 2007; Tony Vroon <chainsaw@gentoo.org> -files/ejabberd-0.7.5.confd,
+ -files/ejabberd-0.7.5.initd, -files/ejabberd-1.1.1-r1.initd,
+ -files/ejabberd-1.1.1.confd, -files/ejabberd-1.1.1.initd,
+ -ejabberd-0.7.5.ebuild, -ejabberd-1.1.1.ebuild, -ejabberd-1.1.1-r1.ebuild,
+ -ejabberd-1.1.2-r1.ebuild:
+ Remove old ebuilds, including 1.1.1 which used an insecure docert statement
+ (per suggestion of Ulrich Mueller <ulm@gentoo.org> on IRC). Closes bug
+ #201677.
+
+*ejabberd-1.1.4 (14 Sep 2007)
+
+ 14 Sep 2007; Tony Vroon <chainsaw@gentoo.org> +files/ejabberd-1.1.4.initd,
+ +files/1.1.4-missing-declaration.patch, +ejabberd-1.1.4.ebuild:
+ Version bump, closes bugs #188679, #192012 and #190266.
+
+ 01 Sep 2007; Christian Faulhammer <opfer@gentoo.org>
+ ejabberd-1.1.3-r2.ebuild:
+ add a space that got lost in my previous change, reported by OlegON
+ <olegon.mail@gmail.com> in bug 190944
+
+ 29 Aug 2007; Christian Faulhammer <opfer@gentoo.org>
+ ejabberd-1.1.3-r2.ebuild:
+ remove restriction on lower erlang versions, see bug 184419; added some
+ quotes around variables
+
+*ejabberd-1.1.3-r2 (13 Jul 2007)
+
+ 13 Jul 2007; Tony Vroon <chainsaw@gentoo.org> +ejabberd-1.1.3-r2.ebuild:
+ Debugging support by Justin <justin-gentoo@openaether.org>, closes bug
+ #174734. Do not attempt to automatically generate a key, this ends up being
+ interactive on some systems. Closes bug #178615 by Robin Johnson
+ <robbat2@gentoo.org>. Revert defective change from bug #161252, without
+ sname the daemon can not be stopped. Thanks to Conrad Kostecki
+ <ConiKost@gmx.de>, closes bug #181745. Restrict erlang dep to <11.2.5 to
+ avoid EOF during handshake, as reported by Santiago Gala <sgala@apache.org>,
+ closes bug #184419. Restrict openssl dep to >=0.9.8e so a messy die on
+ USE="zlib" in openssl is no longer required. Also a report by Conrad
+ Kostecki <ConiKost@gmx.de>, this closes bug #185009.
+
+ 28 Apr 2007; Sven Wegener <swegener@gentoo.org> ejabberd-0.7.5.ebuild:
+ Fix *initd, *confd and *envd calls (#173884, #174266)
+
+ 21 Apr 2007; Tony Vroon <chainsaw@gentoo.org> ejabberd-0.7.5.ebuild:
+ Stop using insinto /etc/conf.d and use the newconfd function instead, bug
+ #174266.
+
+*ejabberd-1.1.3-r1 (11 Apr 2007)
+
+ 11 Apr 2007; Tony Vroon <chainsaw@gentoo.org> +files/ejabberd-1.1.3.confd,
+ +files/1.1.3-missing-declaration.patch, +ejabberd-1.1.3-r1.ebuild:
+ Revision bump, closes bugs #161252, #171427 and #171551.
+
+ 11 Mar 2007; Markus Rothe <corsair@gentoo.org> ejabberd-1.1.3.ebuild:
+ Adding ~amd64 to 1.1.3, too.
+
+ 11 Mar 2007; Peter Weller <welp@gentoo.org> ejabberd-1.1.2-r1.ebuild:
+ Keyworded ~amd64 wrt bug 141302
+
+ 28 Feb 2007; Christian Faulhammer <opfer@gentoo.org>
+ files/ejabberd-1.1.1-r1.initd, ejabberd-1.1.3.ebuild:
+ corrected init file; removed dodoc entry; stable x86; security bug 159580
+
+*ejabberd-1.1.3 (27 Feb 2007)
+
+ 27 Feb 2007; Stefan Cornelius <dercorny@gentoo.org> +ejabberd-1.1.3.ebuild:
+ Bumping to version 1.1.3 wrt security bug #159580
+
+ 27 Feb 2007; Gustavo Felisberto <humpback@gentoo.org>; metadata.xml:
+ Corrected maintainer in metadata.
+
+ 22 Feb 2007; Piotr Jaroszyński <peper@gentoo.org> ChangeLog:
+ Transition to Manifest2.
+
+*ejabberd-1.1.2-r1 (16 Oct 2006)
+
+ 16 Oct 2006; Tony Vroon <chainsaw@gentoo.org> -ejabberd-1.1.2.ebuild,
+ +ejabberd-1.1.2-r1.ebuild:
+ Pull set of utterly broken and apparently completely untested patches, bug
+ #137724 now closed as WONTFIX.
+
+*ejabberd-1.1.2 (13 Oct 2006)
+
+ 13 Oct 2006; Tony Vroon <chainsaw@gentoo.org> +ejabberd-1.1.2.ebuild:
+ New upstream version. Patchball updated with mod_presence, all thanks to
+ Nikolaus Polak <nik@linuxlovers.at> in bug #137724.
+
+*ejabberd-1.1.1-r1 (12 Oct 2006)
+
+ 12 Oct 2006; Tony Vroon <chainsaw@gentoo.org>
+ +files/ejabberd-1.1.1-r1.initd, +files/self-cert-v2.sh, +files/ssl.cnf,
+ ejabberd-1.1.1.ebuild, +ejabberd-1.1.1-r1.ebuild:
+ Revision bump, robust start/stop script thanks to Chris Carlin
+ <ccarlin@physics.tamu.edu> and Dustin J. Mitchell <dustin@v.igoro.us> in bug
+ #145373. Statsdx & SOCKS5 proxy support thanks to Nikolaus Polak
+ <nik@linuxlovers.at> in bug #137724. And finally, thanks to Micha Krause
+ <linux@krausam.de> for pointing out that the SSL eclass did not create
+ certificates usable for S2S connections in bug #150088.
+
+ 01 Aug 2006; Joshua Jackson <tsunam@gentoo.org> ejabberd-1.1.1.ebuild:
+ Stable x86; bug #141302
+
+*ejabberd-1.1.1 (19 Jun 2006)
+
+ 19 Jun 2006; Tony Vroon <chainsaw@gentoo.org> +files/ejabberd-1.1.1.confd,
+ +files/ejabberd-1.1.1.initd, +ejabberd-1.1.1.ebuild:
+ Version bump, thanks to all contributors in bug #101708.
+
+ 05 May 2006; Diego Pettenò <flameeyes@gentoo.org> ejabberd-0.7.5.ebuild:
+ Fix enewuser/enewgroup location, bug #130849.
+
+ 23 Aug 2005; Gustavo Felisberto <humpback@gentoo.org>;
+ ejabberd-0.7.5.ebuild:
+ QA issue #103421
+
+ 16 Apr 2005; Gustavo Felisberto <humpback@gentoo.org>; files/ejabberd,
+ ejabberd-0.7.5.ebuild:
+ Small file permission patches
+
+ 10 Apr 2005; Gustavo Felisberto <humpback@gentoo.org>;
+ files/ejabberd-0.7.5.initd, +files/self-cert.sh, ejabberd-0.7.5.ebuild:
+ Added ssl.pem generator script and einfo.
+
+*ejabberd-0.7.5 (08 Apr 2005)
+
+ 08 Apr 2005; Gustavo Felisberto <humpback@gentoo.org>; +files/ejabberd,
+ +files/ejabberd-0.7.5.confd, +files/ejabberd-0.7.5.initd,
+ +files/ejabberdctl, +files/inetrc, +ejabberd-0.7.5.ebuild:
+ Initial import. This is masked for a reason :) if you have problems bug #63472
+ is your friend.
+
diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
new file mode 100644
index 0000000..7d30c13
--- /dev/null
+++ b/net-im/ejabberd/Manifest
@@ -0,0 +1,16 @@
+AUX ejabberd-2.0.5-erlang-13.patch 16877 RMD160 4b8924f5b37de85823dec539523e7800c394bc7c SHA1 663ffc03f29613d695589c199222bc0382a24c76 SHA256 3d5cb7c163647580e1776a4e31ca3f8e03b1b411288b8273c861d17db5fa1e4a
+AUX ejabberd-2.1.4-mod_shared_roster_ldap.patch 418 RMD160 a810f3b5c23e5985aed699a68e32c749494e021d SHA1 4276671d435c04ab00ec7b6e2d5f0acb58845753 SHA256 72fb86c7be4a62518f0de7a42b77ea4ba3cf858247636a34b3f267862e1dc624
+AUX ejabberd-2.1.5-md2-optional.patch 6794 RMD160 0194fcb2b9e8add51256355d4a4c9548eb8eb031 SHA1 acde0e849cb626d0ba9184aaf9e995c9a06bd625 SHA256 c3414cf40f17f73dbf21f67b9ccb4e7d84b14a634848cf36960f3b51e21d0c9a
+AUX ejabberd-2.confd 834 RMD160 7beb5337d15b33d4b1d802edb03995cddb73e162 SHA1 53e754dcbd03edb27f9982f51323e355dafd1f73 SHA256 c48f5cb90c409bde333d5d7a6159995bbf02e265c9d06528c1ec35b764ca9f21
+AUX ejabberd-2.initd 1126 RMD160 8c696768e686efdc9865446ce5a3fbb2ae7302f6 SHA1 27c6b2fd8e1ff6b74d83688d9d68e8721aa0580e SHA256 9b6f076c452a8db149b689db12082fade95e1975a76e52a67a942220ee99aa2f
+AUX ejabberd-3.confd 161 RMD160 3b2c2b2a871c42c75e854a3c592c0d399a5dd387 SHA1 01e72bda178e7bf26a66321c4330bbcc1607e540 SHA256 0296d3d281a321cd7380772c1d89a94e4a86f85b7f43bf9dc1af74935c2e6386
+AUX ejabberd-3.initd 1018 RMD160 1d52bc9c664a6477d10b1396aba4a2c626da910a SHA1 fd0bb049df3d8a04410b3ccf59b9d78b40ee9d49 SHA256 1c07fa02152b42bee44a8d1cd3f031596aeee37276ec4a36d765e3c54aa23075
+AUX ejabberd-wrapper-2.template 1243 RMD160 989700850578dd86fe6cefeb465a1c84ba49df48 SHA1 115d10f04dd92ca090e853013dde3e5ffa3d6904 SHA256 1d3abfbb1b4dd79ba9fed74a5c86c97af70dc11927d8fa109a1486999d5f7a96
+AUX ejabberdctl-wrapper-3.template 908 RMD160 c5378d8e089ae1c180b7be76639a99d5cad16f11 SHA1 4ee6996c492360c4e44a05e011fb228eecff56b9 SHA256 c3c377ae8b00143e21ab4ccff7cffe539f6a6b95336aa5636cb8d6bba49c9592
+AUX self-cert-v2.sh 1017 RMD160 3beb0f05e8cc3041abd2f689d31d410bc7d5088d SHA1 1f07299b2e49541dcbf5c2b81b26280bbf0b6aeb SHA256 34b2c9cb36c424ffd1117bd20b67d0f4a05168b0bc6237e287c2dcabd0e27972
+AUX ssl.cnf 1042 RMD160 47d2542942fb21f4be1e827d47eb4e0468e73910 SHA1 7347bae5a195ad158881fe5313f55ee41e85cb81 SHA256 ed066f7720fd9f4c2d57ffb2ebcbc4b2810d2b7ca22b67ec8c1dc1227baaa635
+DIST ejabberd-2.1.8.tar.gz 3382833 RMD160 24d3042565a8631447bbf56f998f3a2377c23822 SHA1 3f8ecc944e0719577bfc45a68e974b1945ffa296 SHA256 dedf7684f9e96efbbc12f08f175096ef50b3f75b284bd27d172eaf75cecded7f
+DIST ejabberd-mod_statsdx-1080.patch.gz 14024 RMD160 eb40aa4c3b7b4529a317c8b521a883d156f90ce9 SHA1 ba669e917393b4400878613464ff83a84ff414da SHA256 0f3a3a991c14d797e795ef4fffcf19aa9a54608f5053b759187ec7d3696b9edb
+EBUILD ejabberd-2.1.8.ebuild 7771 RMD160 bd54a2e3afca587b5d86611fc2df2db7dacc558c SHA1 4943c909639a9a8f9634d9c49fcaa8221aab299c SHA256 614a15cb2a3bb5dadd6451f1656a5b3c697b0753c29251f21fc42ca9991ad8ad
+MISC ChangeLog 19299 RMD160 197a4a55ffd74db66f71f5077d7577a480e38084 SHA1 25378353cabdf066284a325896df034bd546e043 SHA256 b7e05f55cdd277ceec40c3f05384c5046b82cc70b85e30331c243a718f2c54d8
+MISC metadata.xml 929 RMD160 3a456c8945da34e417ca2fb659807a280b834f85 SHA1 a7b3173f8b63655c049881629e1354c71ddd633e SHA256 4d46909fd72908dff8698bb9dfcf60132e973b28eabbfe75001397ed349ff11b
diff --git a/net-im/ejabberd/ejabberd-2.1.8.ebuild b/net-im/ejabberd/ejabberd-2.1.8.ebuild
new file mode 100644
index 0000000..28cba71
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-2.1.8.ebuild
@@ -0,0 +1,211 @@
+# Copyright 1999-2011 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.1.6.ebuild,v 1.5 2011/03/25 11:18:22 tomka Exp $
+
+EAPI=4
+
+inherit eutils multilib pam ssl-cert
+
+DESCRIPTION="The Erlang Jabber Daemon"
+HOMEPAGE="http://www.ejabberd.im/"
+SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tar.gz
+ mod_statsdx? ( mirror://gentoo/ejabberd-mod_statsdx-1080.patch.gz )"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="amd64 ~arm ~ia64 ~ppc ~sparc x86"
+EJABBERD_MODULES="mod_irc mod_muc mod_proxy65 mod_pubsub mod_statsdx"
+IUSE="captcha debug ldap odbc pam +web zlib ${EJABBERD_MODULES}"
+
+DEPEND=">=net-im/jabber-base-0.01
+ >=dev-libs/expat-1.95
+ >=dev-lang/erlang-12.2.5[ssl]
+ odbc? ( dev-db/unixODBC )
+ ldap? ( =net-nds/openldap-2* )
+ >=dev-libs/openssl-0.9.8e
+ captcha? ( media-gfx/imagemagick[truetype,png] )
+ zlib? ( sys-libs/zlib )"
+#>=sys-apps/shadow-4.1.4.2-r3 - fixes bug in su that made ejabberdctl unworkable.
+RDEPEND="${DEPEND}
+ >=sys-apps/shadow-4.1.4.2-r3
+ pam? ( virtual/pam )"
+
+S=${WORKDIR}/${P}/src
+
+# paths in net-im/jabber-base
+JABBER_ETC="${EPREFIX}/etc/jabber"
+#JABBER_RUN="/var/run/jabber"
+JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
+JABBER_LOG="${EPREFIX}/var/log/jabber"
+JABBER_DOC="${EPREFIX}/usr/share/doc/${PF}"
+
+src_prepare() {
+ if use mod_statsdx; then
+ ewarn "mod_statsdx is not a part of upstream tarball but is a third-party module"
+ ewarn "taken from here: http://www.ejabberd.im/mod_stats2file"
+ epatch "${WORKDIR}/ejabberd-mod_statsdx-1080.patch"
+ fi
+
+ # don't install release notes (we'll do this manually)
+ sed '/install .* [.][.]\/doc\/[*][.]txt $(DOCDIR)/d' -i Makefile.in || die
+ # Set correct paths
+ sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${PF}:}" \
+ -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
+ -e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
+ -e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
+ -i Makefile.in || die
+ sed -e "/EJABBERDDIR=/{s:ejabberd:${PF}:}" \
+ -e "s|\(ETCDIR=\)@SYSCONFDIR@.*|\1${JABBER_ETC}|" \
+ -e "s|\(LOGS_DIR=\)@LOCALSTATEDIR@.*|\1${JABBER_LOG}|" \
+ -e "s|\(SPOOLDIR=\)@LOCALSTATEDIR@.*|\1${JABBER_SPOOL}|" \
+ -i ejabberdctl.template || die
+
+ # Set shell, so it'll work even in case jabber user have no shell
+ # This is gentoo specific I guess since other distributions may have
+ # ejabberd user with reall shell, while we share this user among different
+ # jabberd implementations.
+ sed '/^HOME/aSHELL=/bin/sh' -i ejabberdctl.template || die
+ sed '/^export HOME/aexport SHELL' -i ejabberdctl.template || die
+
+ #sed -e "s:/share/doc/ejabberd/:${JABBER_DOC}:" -i web/ejabberd_web_admin.erl
+
+ # fix up the ssl cert paths in ejabberd.cfg to use our cert
+ sed -e "s:/path/to/ssl.pem:/etc/ssl/ejabberd/server.pem:g" \
+ -i ejabberd.cfg.example || die "Failed sed ejabberd.cfg.example"
+
+ # correct path to captcha script in default ejabberd.cfg
+ sed -e 's|\({captcha_cmd,[[:space:]]*"\).\+"}|\1/usr/'$(get_libdir)'/erlang/lib/'${P}'/priv/bin/captcha.sh"}|' \
+ -i ejabberd.cfg.example || die "Failed sed ejabberd.cfg.example"
+
+ # disable mod_irc in ejabberd.cfg
+ if ! use mod_irc; then
+ sed -i -e "s/{mod_irc,/%{mod_irc,/" \
+ -i ejabberd.cfg.example || die "Failed to disable mod_irc"
+ fi
+
+}
+
+src_configure() {
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)/erlang/lib/" \
+ $(use_enable mod_irc) \
+ $(use_enable ldap eldap) \
+ $(use_enable mod_muc) \
+ $(use_enable mod_proxy65) \
+ $(use_enable mod_pubsub) \
+ $(use_enable web) \
+ $(use_enable odbc) \
+ $(use_enable zlib ejabberd_zlib) \
+ $(use_enable pam) \
+ --enable-user=jabber
+}
+
+src_compile() {
+ emake $(use debug && echo debug=true ejabberd_debug=true)
+}
+
+src_install() {
+ emake DESTDIR="${ED}" install
+
+ # Pam helper module permissions
+ # http://www.process-one.net/docs/ejabberd/guide_en.html
+ if use pam; then
+ pamd_mimic_system xmpp auth account || die "Cannot create pam.d file"
+ fowners root:jabber "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam"
+ fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam"
+ fi
+
+ cd "${WORKDIR}/${P}/doc"
+ dodoc "release_notes_${PV%%_rc*}.txt"
+
+ #dodir /var/lib/ejabberd
+ newinitd "${FILESDIR}/${PN}-3.initd" ${PN}
+ newconfd "${FILESDIR}/${PN}-3.confd" ${PN}
+}
+
+pkg_postinst() {
+ elog "For configuration instructions, please see"
+ elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
+ elog "http://www.process-one.net/en/ejabberd/docs/guide_en/"
+
+ if ! use web ; then
+ ewarn
+ ewarn "The web USE flag is off, this has disabled the web admin interface."
+ ewarn
+ fi
+
+ elog
+ elog '===================================================================='
+ elog 'Quick Start Guide:'
+ elog '1) Add output of `hostname -f` to /etc/jabber/ejabberd.cfg line 91'
+ elog ' {hosts, ["localhost", "thehost"]}.'
+ elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 360'
+ elog ' {acl, admin, {user, "theadmin", "thehost"}}.'
+ elog '3) Start the server'
+ elog ' # /etc/init.d/ejabberd start'
+ elog '4) Register the admin user'
+ elog ' # /usr/sbin/ejabberdctl register theadmin thehost thepassword'
+ elog '5) Log in with your favourite jabber client or using the web admin'
+
+ # Upgrading from ejabberd-2.0.x:
+ if grep -E '^[^#]*EJABBERD_NODE=' "${EROOT}/etc/conf.d/ejabberd" >/dev/null 2>&1; then
+ source "${EROOT}/etc/conf.d/ejabberd"
+ ewarn
+ ewarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
+ ewarn "Starting with 2.1.x some paths and configuration files were"
+ ewarn "changed to reflect upstream intentions better. Notable changes are:"
+ ewarn
+ ewarn "1. Everything (even init scripts) is now handled with ejabberdctl script."
+ ewarn "Thus main configuration file became /etc/jabberd/ejabberdctl.cfg"
+ ewarn "You must update ERLANG_NODE there with the value of EJABBERD_NODE"
+ ewarn "from /etc/conf.d/ejebberd or ejabberd will refuse to start."
+ ewarn
+ ewarn "2. SSL certificate is now generated with ssl-cert eclass and resides"
+ ewarn "at standard location: /etc/ssl/ejabberd/server.pem."
+ ewarn
+ ewarn "3. Cookie now resides at /var/spool/jabber/.erlang.cookie"
+ ewarn
+ ewarn "4. /var/log/jabber/sasl.log is now /var/log/jabber/erlang.log"
+ ewarn
+ ewarn "5. Crash dumps (if any) will be located at /var/log/jabber"
+
+ local i ctlcfg new_ctlcfg
+ i=0
+ ctlcfg=${EROOT}/etc/jabber/ejabberdctl.cfg
+ while :; do
+ new_ctlcfg=$(printf "${EROOT}/etc/jabber/._cfg%04d_ejabberdctl.cfg" ${i})
+ [[ ! -e ${new_ctlcfg} ]] && break
+ ctlcfg=${new_ctlcfg}
+ ((i++))
+ done
+
+ ewarn
+ ewarn "Updating ${ctlcfg} (debug: ${new_ctlcfg})"
+ sed -e "/#ERLANG_NODE=/aERLANG_NODE=$EJABBERD_NODE" "${ctlcfg}" > "${new_ctlcfg}" || die
+
+ if [[ -e ${EROOT}/var/run/jabber/.erlang.cookie ]]; then
+ ewarn "Moving .erlang.cookie..."
+ if [[ -e ${EROOT}/var/spool/jabber/.erlang.cookie ]]; then
+ mv -v "${EROOT}"/var/spool/jabber/.erlang.cookie{,bak}
+ fi
+ mv -v "${EROOT}"/var/{run/jabber,spool/jabber}/.erlang.cookie
+ fi
+ ewarn
+ ewarn "We'll try to handle upgrade automagically but, please, do your"
+ ewarn "own checks and do not forget to run 'etc-update'!"
+ ewarn "PLEASE! Run 'etc-update' now!"
+ fi
+
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Ejabberd XMPP Server}"
+ install_cert /etc/ssl/ejabberd/server
+ if [[ -e ${EROOT}/etc/jabber/ssl.pem ]]; then
+ ewarn
+ ewarn "The location of SSL certificates has changed. If you are"
+ ewarn "upgrading from ${CATEGORY}/${PN}-2.0.5* or earlier you might"
+ ewarn "want to move your old certificates from /etc/jabber into"
+ ewarn "/etc/ssl/ejabberd/, update config files and"
+ ewarn "rm /etc/jabber/ssl.pem to avoid this message."
+ ewarn
+ fi
+}
diff --git a/net-im/ejabberd/files/ejabberd-2.0.5-erlang-13.patch b/net-im/ejabberd/files/ejabberd-2.0.5-erlang-13.patch
new file mode 100644
index 0000000..d52777b
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-2.0.5-erlang-13.patch
@@ -0,0 +1,361 @@
+diff --git a/src/dynamic_compile.erl b/src/dynamic_compile.erl
+new file mode 100644
+index 0000000..1fe2dca
+--- /dev/null
++++ dynamic_compile.erl
+@@ -0,0 +1,268 @@
++%% Copyright (c) 2007
++%% Mats Cronqvist <mats.cronqvist@ericsson.com>
++%% Chris Newcombe <chris.newcombe@gmail.com>
++%% Jacob Vorreuter <jacob.vorreuter@gmail.com>
++%%
++%% Permission is hereby granted, free of charge, to any person
++%% obtaining a copy of this software and associated documentation
++%% files (the "Software"), to deal in the Software without
++%% restriction, including without limitation the rights to use,
++%% copy, modify, merge, publish, distribute, sublicense, and/or sell
++%% copies of the Software, and to permit persons to whom the
++%% Software is furnished to do so, subject to the following
++%% conditions:
++%%
++%% The above copyright notice and this permission notice shall be
++%% included in all copies or substantial portions of the Software.
++%%
++%% THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
++%% EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
++%% OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
++%% NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
++%% HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
++%% WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
++%% FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
++%% OTHER DEALINGS IN THE SOFTWARE.
++
++%%%-------------------------------------------------------------------
++%%% File : dynamic_compile.erl
++%%% Description :
++%%% Authors : Mats Cronqvist <mats.cronqvist@ericsson.com>
++%%% Chris Newcombe <chris.newcombe@gmail.com>
++%%% Jacob Vorreuter <jacob.vorreuter@gmail.com>
++%%% TODO :
++%%% - add support for limit include-file depth (and prevent circular references)
++%%% prevent circular macro expansion set FILE correctly when -module() is found
++%%% -include_lib support $ENVVAR in include filenames
++%%% substitute-stringize (??MACRO)
++%%% -undef/-ifdef/-ifndef/-else/-endif
++%%% -file(File, Line)
++%%%-------------------------------------------------------------------
++-module(dynamic_compile).
++
++%% API
++-export([from_string/1, from_string/2]).
++
++-import(lists, [reverse/1, keyreplace/4]).
++
++%%====================================================================
++%% API
++%%====================================================================
++%%--------------------------------------------------------------------
++%% Function:
++%% Description:
++%% Returns a binary that can be used with
++%% code:load_binary(Module, ModuleFilenameForInternalRecords, Binary).
++%%--------------------------------------------------------------------
++from_string(CodeStr) ->
++ from_string(CodeStr, []).
++
++% takes Options as for compile:forms/2
++from_string(CodeStr, CompileFormsOptions) ->
++ %% Initialise the macro dictionary with the default predefined macros,
++ %% (adapted from epp.erl:predef_macros/1
++ Filename = "compiled_from_string",
++ %%Machine = list_to_atom(erlang:system_info(machine)),
++ Ms0 = dict:new(),
++ % Ms1 = dict:store('FILE', {[], "compiled_from_string"}, Ms0),
++ % Ms2 = dict:store('LINE', {[], 1}, Ms1), % actually we might add special code for this
++ % Ms3 = dict:store('MODULE', {[], undefined}, Ms2),
++ % Ms4 = dict:store('MODULE_STRING', {[], undefined}, Ms3),
++ % Ms5 = dict:store('MACHINE', {[], Machine}, Ms4),
++ % InitMD = dict:store(Machine, {[], true}, Ms5),
++ InitMD = Ms0,
++
++ %% From the docs for compile:forms:
++ %% When encountering an -include or -include_dir directive, the compiler searches for header files in the following directories:
++ %% 1. ".", the current working directory of the file server;
++ %% 2. the base name of the compiled file;
++ %% 3. the directories specified using the i option. The directory specified last is searched first.
++ %% In this case, #2 is meaningless.
++ IncludeSearchPath = ["." | reverse([Dir || {i, Dir} <- CompileFormsOptions])],
++ {RevForms, _OutMacroDict} = scan_and_parse(CodeStr, Filename, 1, [], InitMD, IncludeSearchPath),
++ Forms = reverse(RevForms),
++
++ %% note: 'binary' is forced as an implicit option, whether it is provided or not.
++ case compile:forms(Forms, CompileFormsOptions) of
++ {ok, ModuleName, CompiledCodeBinary} when is_binary(CompiledCodeBinary) ->
++ {ModuleName, CompiledCodeBinary};
++ {ok, ModuleName, CompiledCodeBinary, []} when is_binary(CompiledCodeBinary) -> % empty warnings list
++ {ModuleName, CompiledCodeBinary};
++ {ok, _ModuleName, _CompiledCodeBinary, Warnings} ->
++ throw({?MODULE, warnings, Warnings});
++ Other ->
++ throw({?MODULE, compile_forms, Other})
++ end.
++
++%%====================================================================
++%% Internal functions
++%%====================================================================
++%%% Code from Mats Cronqvist
++%%% See http://www.erlang.org/pipermail/erlang-questions/2007-March/025507.html
++%%%## 'scan_and_parse'
++%%%
++%%% basically we call the OTP scanner and parser (erl_scan and
++%%% erl_parse) line-by-line, but check each scanned line for (or
++%%% definitions of) macros before parsing.
++%% returns {ReverseForms, FinalMacroDict}
++scan_and_parse([], _CurrFilename, _CurrLine, RevForms, MacroDict, _IncludeSearchPath) ->
++ {RevForms, MacroDict};
++
++scan_and_parse(RemainingText, CurrFilename, CurrLine, RevForms, MacroDict, IncludeSearchPath) ->
++ case scanner(RemainingText, CurrLine, MacroDict) of
++ {tokens, NLine, NRemainingText, Toks} ->
++ {ok, Form} = erl_parse:parse_form(Toks),
++ scan_and_parse(NRemainingText, CurrFilename, NLine, [Form | RevForms], MacroDict, IncludeSearchPath);
++ {macro, NLine, NRemainingText, NMacroDict} ->
++ scan_and_parse(NRemainingText, CurrFilename, NLine, RevForms,NMacroDict, IncludeSearchPath);
++ {include, NLine, NRemainingText, IncludeFilename} ->
++ IncludeFileRemainingTextents = read_include_file(IncludeFilename, IncludeSearchPath),
++ %%io:format("include file ~p contents: ~n~p~nRemainingText = ~p~n", [IncludeFilename,IncludeFileRemainingTextents, RemainingText]),
++ %% Modify the FILE macro to reflect the filename
++ %%IncludeMacroDict = dict:store('FILE', {[],IncludeFilename}, MacroDict),
++ IncludeMacroDict = MacroDict,
++
++ %% Process the header file (inc. any nested header files)
++ {RevIncludeForms, IncludedMacroDict} = scan_and_parse(IncludeFileRemainingTextents, IncludeFilename, 1, [], IncludeMacroDict, IncludeSearchPath),
++ %io:format("include file results = ~p~n", [R]),
++ %% Restore the FILE macro in the NEW MacroDict (so we keep any macros defined in the header file)
++ %%NMacroDict = dict:store('FILE', {[],CurrFilename}, IncludedMacroDict),
++ NMacroDict = IncludedMacroDict,
++
++ %% Continue with the original file
++ scan_and_parse(NRemainingText, CurrFilename, NLine, RevIncludeForms ++ RevForms, NMacroDict, IncludeSearchPath);
++ done ->
++ scan_and_parse([], CurrFilename, CurrLine, RevForms, MacroDict, IncludeSearchPath)
++ end.
++
++scanner(Text, Line, MacroDict) ->
++ case erl_scan:tokens([],Text,Line) of
++ {done, {ok,Toks,NLine}, LeftOverChars} ->
++ case pre_proc(Toks, MacroDict) of
++ {tokens, NToks} -> {tokens, NLine, LeftOverChars, NToks};
++ {macro, NMacroDict} -> {macro, NLine, LeftOverChars, NMacroDict};
++ {include, Filename} -> {include, NLine, LeftOverChars, Filename}
++ end;
++ {more, _Continuation} ->
++ %% This is supposed to mean "term is not yet complete" (i.e. a '.' has
++ %% not been reached yet).
++ %% However, for some bizarre reason we also get this if there is a comment after the final '.' in a file.
++ %% So we check to see if Text only consists of comments.
++ case is_only_comments(Text) of
++ true ->
++ done;
++ false ->
++ throw({incomplete_term, Text, Line})
++ end
++ end.
++
++is_only_comments(Text) -> is_only_comments(Text, not_in_comment).
++
++is_only_comments([], _) -> true;
++is_only_comments([$ |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment
++is_only_comments([$\t |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment
++is_only_comments([$\n |T], not_in_comment) -> is_only_comments(T, not_in_comment); % skipping whitspace outside of comment
++is_only_comments([$% |T], not_in_comment) -> is_only_comments(T, in_comment); % found start of a comment
++is_only_comments(_, not_in_comment) -> false;
++% found any significant char NOT in a comment
++is_only_comments([$\n |T], in_comment) -> is_only_comments(T, not_in_comment); % found end of a comment
++is_only_comments([_ |T], in_comment) -> is_only_comments(T, in_comment). % skipping over in-comment chars
++
++%%%## 'pre-proc'
++%%%
++%%% have to implement a subset of the pre-processor, since epp insists
++%%% on running on a file.
++%%% only handles 2 cases;
++%% -define(MACRO, something).
++%% -define(MACRO(VAR1,VARN),{stuff,VAR1,more,stuff,VARN,extra,stuff}).
++pre_proc([{'-',_},{atom,_,define},{'(',_},{_,_,Name}|DefToks],MacroDict) ->
++ false = dict:is_key(Name, MacroDict),
++ case DefToks of
++ [{',',_} | Macro] ->
++ {macro, dict:store(Name, {[], macro_body_def(Macro, [])}, MacroDict)};
++ [{'(',_} | Macro] ->
++ {macro, dict:store(Name, macro_params_body_def(Macro, []), MacroDict)}
++ end;
++
++pre_proc([{'-',_}, {atom,_,include}, {'(',_}, {string,_,Filename}, {')',_}, {dot,_}], _MacroDict) ->
++ {include, Filename};
++
++pre_proc(Toks,MacroDict) ->
++ {tokens, subst_macros(Toks, MacroDict)}.
++
++macro_params_body_def([{')',_},{',',_} | Toks], RevParams) ->
++ {reverse(RevParams), macro_body_def(Toks, [])};
++macro_params_body_def([{var,_,Param} | Toks], RevParams) ->
++ macro_params_body_def(Toks, [Param | RevParams]);
++macro_params_body_def([{',',_}, {var,_,Param} | Toks], RevParams) ->
++ macro_params_body_def(Toks, [Param | RevParams]).
++
++macro_body_def([{')',_}, {dot,_}], RevMacroBodyToks) ->
++ reverse(RevMacroBodyToks);
++macro_body_def([Tok|Toks], RevMacroBodyToks) ->
++ macro_body_def(Toks, [Tok | RevMacroBodyToks]).
++
++subst_macros(Toks, MacroDict) ->
++ reverse(subst_macros_rev(Toks, MacroDict, [])).
++
++%% returns a reversed list of tokes
++subst_macros_rev([{'?',_}, {_,LineNum,'LINE'} | Toks], MacroDict, RevOutToks) ->
++ %% special-case for ?LINE, to avoid creating a new MacroDict for every line in the source file
++ subst_macros_rev(Toks, MacroDict, [{integer,LineNum,LineNum}] ++ RevOutToks);
++
++subst_macros_rev([{'?',_}, {_,_,Name}, {'(',_} = Paren | Toks], MacroDict, RevOutToks) ->
++ case dict:fetch(Name, MacroDict) of
++ {[], MacroValue} ->
++ %% This macro does not have any vars, so ignore the fact that the invocation is followed by "(...stuff"
++ %% Recursively expand any macro calls inside this macro's value
++ %% TODO: avoid infinite expansion due to circular references (even indirect ones)
++ RevExpandedOtherMacrosToks = subst_macros_rev(MacroValue, MacroDict, []),
++ subst_macros_rev([Paren|Toks], MacroDict, RevExpandedOtherMacrosToks ++ RevOutToks);
++ ParamsAndBody ->
++ %% This macro does have vars.
++ %% Collect all of the passe arguments, in an ordered list
++ {NToks, Arguments} = subst_macros_get_args(Toks, []),
++ %% Expand the varibles
++ ExpandedParamsToks = subst_macros_subst_args_for_vars(ParamsAndBody, Arguments),
++ %% Recursively expand any macro calls inside this macro's value
++ %% TODO: avoid infinite expansion due to circular references (even indirect ones)
++ RevExpandedOtherMacrosToks = subst_macros_rev(ExpandedParamsToks, MacroDict, []),
++ subst_macros_rev(NToks, MacroDict, RevExpandedOtherMacrosToks ++ RevOutToks)
++ end;
++
++subst_macros_rev([{'?',_}, {_,_,Name} | Toks], MacroDict, RevOutToks) ->
++ %% This macro invocation does not have arguments.
++ %% Therefore the definition should not have parameters
++ {[], MacroValue} = dict:fetch(Name, MacroDict),
++
++ %% Recursively expand any macro calls inside this macro's value
++ %% TODO: avoid infinite expansion due to circular references (even indirect ones)
++ RevExpandedOtherMacrosToks = subst_macros_rev(MacroValue, MacroDict, []),
++ subst_macros_rev(Toks, MacroDict, RevExpandedOtherMacrosToks ++ RevOutToks);
++
++subst_macros_rev([Tok|Toks], MacroDict, RevOutToks) ->
++subst_macros_rev(Toks, MacroDict, [Tok|RevOutToks]);
++subst_macros_rev([], _MacroDict, RevOutToks) -> RevOutToks.
++
++subst_macros_get_args([{')',_} | Toks], RevArgs) ->
++ {Toks, reverse(RevArgs)};
++subst_macros_get_args([{',',_}, {var,_,ArgName} | Toks], RevArgs) ->
++ subst_macros_get_args(Toks, [ArgName| RevArgs]);
++subst_macros_get_args([{var,_,ArgName} | Toks], RevArgs) ->
++ subst_macros_get_args(Toks, [ArgName | RevArgs]).
++
++subst_macros_subst_args_for_vars({[], BodyToks}, []) ->
++ BodyToks;
++subst_macros_subst_args_for_vars({[Param | Params], BodyToks}, [Arg|Args]) ->
++ NBodyToks = keyreplace(Param, 3, BodyToks, {var,1,Arg}),
++ subst_macros_subst_args_for_vars({Params, NBodyToks}, Args).
++
++read_include_file(Filename, IncludeSearchPath) ->
++ case file:path_open(IncludeSearchPath, Filename, [read, raw, binary]) of
++ {ok, IoDevice, FullName} ->
++ {ok, Data} = file:read(IoDevice, filelib:file_size(FullName)),
++ file:close(IoDevice),
++ binary_to_list(Data);
++ {error, Reason} ->
++ throw({failed_to_read_include_file, Reason, Filename, IncludeSearchPath})
++ end.
+\ No newline at end of file
+diff --git a/src/ejabberd.app b/src/ejabberd.app
+index 1ff41ec..7f0948f 100644
+--- ejabberd.app
++++ ejabberd.app
+@@ -115,7 +115,6 @@
+ nodetree_virtual,
+ p1_fsm,
+ p1_mnesia,
+- ram_file_io_server,
+ randoms,
+ sha,
+ shaper,
+diff --git a/src/ejabberd_loglevel.erl b/src/ejabberd_loglevel.erl
+index 3134d4d..2a34060 100644
+--- ejabberd_loglevel.erl
++++ ejabberd_loglevel.erl
+@@ -38,51 +38,30 @@
+ -define(LOGMODULE, "error_logger").
+
+ %% Error levels:
+-%% 0 -> No log
+-%% 1 -> Critical
+-%% 2 -> Error
+-%% 3 -> Warning
+-%% 4 -> Info
+-%% 5 -> Debug
++-define(LOG_LEVELS,[ {0, no_log, "No log"}
++ ,{1, critical, "Critical"}
++ ,{2, error, "Error"}
++ ,{3, warning, "Warning"}
++ ,{4, info, "Info"}
++ ,{5, debug, "Debug"}
++ ]).
++
++set(LogLevel) when is_atom(LogLevel) ->
++ set(level_to_integer(LogLevel));
+ set(Loglevel) when is_integer(Loglevel) ->
+- Forms = compile_string(?LOGMODULE, ejabberd_logger_src(Loglevel)),
+- load_logger(Forms, ?LOGMODULE, Loglevel);
++ try
++ {Mod,Code} = dynamic_compile:from_string(ejabberd_logger_src(Loglevel)),
++ code:load_binary(Mod, ?LOGMODULE ++ ".erl", Code)
++ catch
++ Type:Error -> ?CRITICAL_MSG("Error compiling logger (~p): ~p~n", [Type, Error])
++ end;
+ set(_) ->
+ exit("Loglevel must be an integer").
+-
+-%% --------------------------------------------------------------
+-%% Compile a string into a module and returns the binary
+-compile_string(Mod, Str) ->
+- Fname = Mod ++ ".erl",
+- {ok, Fd} = open_ram_file(Fname),
+- file:write(Fd, Str),
+- file:position(Fd, 0),
+- case epp_dodger:parse(Fd) of
+- {ok, Tree} ->
+- Forms = revert_tree(Tree),
+- close_ram_file(Fd),
+- Forms;
+- Error ->
+- close_ram_file(Fd),
+- Error
+- end.
+-
+-open_ram_file(Fname) ->
+- ram_file_io_server:start(self(), Fname, [read,write]).
+-
+-close_ram_file(Fd) ->
+- file:close(Fd).
+-
+-revert_tree(Tree) ->
+- [erl_syntax:revert(T) || T <- Tree].
+
+-load_logger(Forms, Mod, Loglevel) ->
+- Fname = Mod ++ ".erl",
+- case compile:forms(Forms, [binary, {d,'LOGLEVEL',Loglevel}]) of
+- {ok, M, Bin} ->
+- code:load_binary(M, Fname, Bin);
+- Error ->
+- ?CRITICAL_MSG("Error ~p~n", [Error])
++level_to_integer(Level) ->
++ case lists:keyfind(Level, 2, ?LOG_LEVELS) of
++ {Int, Level, _Desc} -> Int;
++ _ -> erlang:error({no_such_loglevel, Level})
+ end.
diff --git a/net-im/ejabberd/files/ejabberd-2.1.4-mod_shared_roster_ldap.patch b/net-im/ejabberd/files/ejabberd-2.1.4-mod_shared_roster_ldap.patch
new file mode 100644
index 0000000..5fbf3ee
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-2.1.4-mod_shared_roster_ldap.patch
@@ -0,0 +1,13 @@
+diff --git a/src/mod_shared_roster_ldap.erl b/src/mod_shared_roster_ldap.erl
+index 8097385..44fd48e 100644
+--- a/src/mod_shared_roster_ldap.erl
++++ b/src/mod_shared_roster_ldap.erl
+@@ -142,7 +142,7 @@ init([Host, Opts]) ->
+ State#state.port,
+ State#state.dn,
+ State#state.password,
+- none);
++ []);
+ _ ->
+ eldap:start_link(State#state.eldap_id,
+ State#state.servers,
diff --git a/net-im/ejabberd/files/ejabberd-2.1.5-md2-optional.patch b/net-im/ejabberd/files/ejabberd-2.1.5-md2-optional.patch
new file mode 100644
index 0000000..e11cad3
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-2.1.5-md2-optional.patch
@@ -0,0 +1,259 @@
+commit d2d8a09b4afdb5f77b903411ff16fbb0b739d3e4
+Author: Evgeniy Khramtsov <ekhramtsov@process-one.net>
+Date: Sat Aug 7 22:04:57 2010 +1000
+
+ Make MD2 autodetected (EJAB-1285)
+
+diff --git a/src/Makefile.in b/src/Makefile.in
+index 7d225f3..4e56181 100644
+--- a/src/Makefile.in
++++ b/src/Makefile.in
+@@ -64,6 +64,11 @@ ifeq (@transient_supervisors@, false)
+ EFLAGS+=-DNO_TRANSIENT_SUPERVISORS
+ endif
+
++ifeq (@md2@, true)
++ EFLAGS+=-DHAVE_MD2
++ ERLANG_CFLAGS += -DHAVE_MD2
++endif
++
+ INSTALL_EPAM=
+ ifeq (@pam@, pam)
+ INSTALL_EPAM=install -m 750 $(O_USER) epam $(PBINDIR)
+diff --git a/src/configure.ac b/src/configure.ac
+index 1497643..1d25dd8 100644
+--- a/src/configure.ac
++++ b/src/configure.ac
+@@ -148,6 +148,9 @@ if test "$ENABLEUSER" != ""; then
+ AC_SUBST([INSTALLUSER], [$ENABLEUSER])
+ fi
+
++AC_CHECK_HEADER(openssl/md2.h, md2=true, md2=false)
++AC_SUBST(md2)
++
+ AC_CANONICAL_SYSTEM
+ #AC_DEFINE_UNQUOTED(CPU_VENDOR_OS, "$target")
+ #AC_SUBST(target_os)
+diff --git a/src/mod_caps.erl b/src/mod_caps.erl
+index 7fb011e..d9f4f30 100644
+--- a/src/mod_caps.erl
++++ b/src/mod_caps.erl
+@@ -276,25 +276,8 @@ feature_response(#iq{type = result,
+ sub_el = [{xmlelement, _, _, Els}]},
+ Host, From, Caps, [SubNode | SubNodes]) ->
+ BinaryNode = node_to_binary(Caps#caps.node, SubNode),
+- IsValid = case Caps#caps.hash of
+- "md2" ->
+- Caps#caps.version == make_disco_hash(Els, md2);
+- "md5" ->
+- Caps#caps.version == make_disco_hash(Els, md5);
+- "sha-1" ->
+- Caps#caps.version == make_disco_hash(Els, sha1);
+- "sha-224" ->
+- Caps#caps.version == make_disco_hash(Els, sha224);
+- "sha-256" ->
+- Caps#caps.version == make_disco_hash(Els, sha256);
+- "sha-384" ->
+- Caps#caps.version == make_disco_hash(Els, sha384);
+- "sha-512" ->
+- Caps#caps.version == make_disco_hash(Els, sha512);
+- _ ->
+- true
+- end,
+- if IsValid ->
++ case check_hash(Caps, Els) of
++ true ->
+ Features = lists:flatmap(
+ fun({xmlelement, "feature", FAttrs, _}) ->
+ [xml:get_attr_s("var", FAttrs)];
+@@ -304,7 +287,7 @@ feature_response(#iq{type = result,
+ mnesia:dirty_write(
+ #caps_features{node_pair = BinaryNode,
+ features = features_to_binary(Features)});
+- true ->
++ false ->
+ mnesia:dirty_write(#caps_features{node_pair = BinaryNode})
+ end,
+ feature_request(Host, From, Caps, SubNodes);
+@@ -349,6 +332,7 @@ make_my_disco_hash(Host) ->
+ ""
+ end.
+
++-ifdef(HAVE_MD2).
+ make_disco_hash(DiscoEls, Algo) ->
+ Concat = [concat_identities(DiscoEls),
+ concat_features(DiscoEls),
+@@ -370,6 +354,64 @@ make_disco_hash(DiscoEls, Algo) ->
+ sha:sha512(Concat)
+ end).
+
++check_hash(Caps, Els) ->
++ case Caps#caps.hash of
++ "md2" ->
++ Caps#caps.version == make_disco_hash(Els, md2);
++ "md5" ->
++ Caps#caps.version == make_disco_hash(Els, md5);
++ "sha-1" ->
++ Caps#caps.version == make_disco_hash(Els, sha1);
++ "sha-224" ->
++ Caps#caps.version == make_disco_hash(Els, sha224);
++ "sha-256" ->
++ Caps#caps.version == make_disco_hash(Els, sha256);
++ "sha-384" ->
++ Caps#caps.version == make_disco_hash(Els, sha384);
++ "sha-512" ->
++ Caps#caps.version == make_disco_hash(Els, sha512);
++ _ ->
++ true
++ end.
++-else.
++make_disco_hash(DiscoEls, Algo) ->
++ Concat = [concat_identities(DiscoEls),
++ concat_features(DiscoEls),
++ concat_info(DiscoEls)],
++ base64:encode_to_string(
++ if Algo == md5 ->
++ crypto:md5(Concat);
++ Algo == sha1 ->
++ crypto:sha(Concat);
++ Algo == sha224 ->
++ sha:sha224(Concat);
++ Algo == sha256 ->
++ sha:sha256(Concat);
++ Algo == sha384 ->
++ sha:sha384(Concat);
++ Algo == sha512 ->
++ sha:sha512(Concat)
++ end).
++
++check_hash(Caps, Els) ->
++ case Caps#caps.hash of
++ "md5" ->
++ Caps#caps.version == make_disco_hash(Els, md5);
++ "sha-1" ->
++ Caps#caps.version == make_disco_hash(Els, sha1);
++ "sha-224" ->
++ Caps#caps.version == make_disco_hash(Els, sha224);
++ "sha-256" ->
++ Caps#caps.version == make_disco_hash(Els, sha256);
++ "sha-384" ->
++ Caps#caps.version == make_disco_hash(Els, sha384);
++ "sha-512" ->
++ Caps#caps.version == make_disco_hash(Els, sha512);
++ _ ->
++ true
++ end.
++-endif.
++
+ concat_features(Els) ->
+ lists:usort(
+ lists:flatmap(
+diff --git a/src/sha.erl b/src/sha.erl
+index 64c15c1..06dd3c2 100644
+--- a/src/sha.erl
++++ b/src/sha.erl
+@@ -28,7 +28,11 @@
+ -author('alexey@process-one.net').
+
+ -export([start/0, sha/1, sha1/1, sha224/1, sha256/1, sha384/1,
+- sha512/1, md2/1]).
++ sha512/1]).
++
++-ifdef(HAVE_MD2).
++-export([md2/1]).
++-endif.
+
+ -include("ejabberd.hrl").
+
+@@ -80,8 +84,10 @@ sha384(Text) ->
+ sha512(Text) ->
+ erlang:port_control(?DRIVER, 512, Text).
+
++-ifdef(HAVE_MD2).
+ md2(Text) ->
+ erlang:port_control(?DRIVER, 2, Text).
++-endif.
+
+ driver_path() ->
+ Suffix = case os:type() of
+diff --git a/src/tls/Makefile.in b/src/tls/Makefile.in
+index 4458796..ee40f93 100644
+--- a/src/tls/Makefile.in
++++ b/src/tls/Makefile.in
+@@ -30,6 +30,11 @@ ifdef debug
+ EFLAGS+=+debug_info +export_all
+ endif
+
++ifeq (@md2@, true)
++ EFLAGS+=-DHAVE_MD2
++ ERLANG_CFLAGS += -DHAVE_MD2
++endif
++
+ ERLSHLIBS = ../tls_drv.so ../sha_drv.so
+ OUTDIR = ..
+ SOURCES = $(wildcard *.erl)
+diff --git a/src/tls/sha_drv.c b/src/tls/sha_drv.c
+index 13d6580..8e6de32 100644
+--- a/src/tls/sha_drv.c
++++ b/src/tls/sha_drv.c
+@@ -20,7 +20,9 @@
+
+ #include <erl_driver.h>
+ #include <openssl/sha.h>
++#ifdef HAVE_MD2
+ #include <openssl/md2.h>
++#endif
+
+ static ErlDrvData sha_drv_start(ErlDrvPort port, char *buf)
+ {
+@@ -36,11 +38,13 @@ static int sha_drv_control(ErlDrvData handle,
+ ErlDrvBinary *b = NULL;
+
+ switch (command) {
++#ifdef HAVE_MD2
+ case 2:
+ rlen = MD2_DIGEST_LENGTH;
+ b = driver_alloc_binary(rlen);
+ if (b) MD2((unsigned char*)buf, len, (unsigned char*)b->orig_bytes);
+ break;
++#endif
+ case 224:
+ rlen = SHA224_DIGEST_LENGTH;
+ b = driver_alloc_binary(rlen);
+
+
+commit b14899d41ae8f0d3e750ba42e297ea5815bf30c1
+Author: Badlop <badlop@process-one.net>
+Date: Sat Aug 7 19:42:56 2010 +0200
+
+ Update the 'configure' script
+
+diff --git a/src/configure b/src/configure
+index 2d44646..d515abc 100755
+--- a/src/configure
++++ b/src/configure
+@@ -608,6 +608,7 @@ build_os
+ build_vendor
+ build_cpu
+ build
++md2
+ INSTALLUSER
+ SSL_CFLAGS
+ SSL_LIBS
+@@ -4822,6 +4823,16 @@ if test "$ENABLEUSER" != ""; then
+
+ fi
+
++ac_fn_c_check_header_mongrel "$LINENO" "openssl/md2.h" "ac_cv_header_openssl_md2_h" "$ac_includes_default"
++if test "x$ac_cv_header_openssl_md2_h" = x""yes; then :
++ md2=true
++else
++ md2=false
++fi
++
++
++
++
+ ac_aux_dir=
+ for ac_dir in "$srcdir" "$srcdir/.." "$srcdir/../.."; do
+ for ac_t in install-sh install.sh shtool; do
diff --git a/net-im/ejabberd/files/ejabberd-2.confd b/net-im/ejabberd/files/ejabberd-2.confd
new file mode 100644
index 0000000..0312ae7
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-2.confd
@@ -0,0 +1,23 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.confd,v 1.1 2009/04/09 05:40:39 pva Exp $
+
+# Name of your ejabberd node. Used by ejabberdctl to determine which
+# node to communicate with.
+EJABBERD_NODE="ejabberd@`hostname -s`"
+
+# Max number of open network connections. Default is 1024. Increasing
+# this will slightly increase memory usage.
+#ERL_MAX_PORTS=1024
+
+# Return memory to the system after using it, instead of keeping it
+# allocated for future use. Decreases the memory required by ejabberd,
+# but makes it run slower. Default is unset, set to any value to
+# activate.
+#ERL_FULLSWEEP_AFTER=0
+
+# set to 1, "true" or "yes" if you have a symmetric-multi-processor
+# default is non smp
+#HAVE_SMP=0
+
+
diff --git a/net-im/ejabberd/files/ejabberd-2.initd b/net-im/ejabberd/files/ejabberd-2.initd
new file mode 100644
index 0000000..8a150dc
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-2.initd
@@ -0,0 +1,54 @@
+#!/sbin/runscript
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-2.initd,v 1.1 2009/04/09 05:40:39 pva Exp $
+
+opts="${opts} reload"
+
+depend() {
+ use dns
+ need net
+ provide jabber-server
+}
+
+checkconfig() {
+ if [ ! -e /etc/jabber/ejabberd.cfg ] ; then
+ eerror "You need a /etc/jabber/ejabberd.cfg file to run ejabberd"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+ ebegin "Starting ejabberd"
+ # the process name of beam is different depending whether smp is used.
+ # set it explicitly so start-stop-daemon works
+ case "$HAVE_SMP" in
+ "1"|"true"|"yes")
+ BEAMNAME="beam.smp"
+ SMPOPT="auto"
+ ;;
+ *)
+ BEAMNAME="beam"
+ SMPOPT="disable"
+ ;;
+ esac
+ cd /var/lib/ejabberd
+ start-stop-daemon --start --quiet --chuid jabber:jabber \
+ --name $BEAMNAME \
+ --exec /usr/sbin/ejabberd -- -detached -noinput -smp $SMPOPT
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping ejabberd"
+ /usr/sbin/ejabberdctl stop
+ eend $?
+}
+
+reload() {
+ ebegin "Reloading ejabberd"
+ /usr/sbin/ejabberdctl reopen-log
+ eend $?
+}
+
diff --git a/net-im/ejabberd/files/ejabberd-3.confd b/net-im/ejabberd/files/ejabberd-3.confd
new file mode 100644
index 0000000..b1e984e
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-3.confd
@@ -0,0 +1,5 @@
+# Please configure everything at /etc/jabber/ejabberdctl.cfg
+# Put here only command line arguments for ejabberdctl (if any are required)
+
+#EJABBERDCTL_OPTS=""
+
diff --git a/net-im/ejabberd/files/ejabberd-3.initd b/net-im/ejabberd/files/ejabberd-3.initd
new file mode 100644
index 0000000..2d6d44d
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-3.initd
@@ -0,0 +1,47 @@
+#!/sbin/runscript
+# Copyright 1999-2010 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-3.initd,v 1.3 2010/06/02 07:12:27 pva Exp $
+
+depend() {
+ use dns
+ need net
+ provide jabber-server
+}
+
+start() {
+ if ejabberdctl status >/dev/null 2>&1; then
+ ewarn "ejabberd is already started (manually?)."
+ return 0
+ fi
+ ebegin "Starting ejabberd"
+ /usr/sbin/ejabberdctl ${EJABBERDCTL_OPT} start
+ eend $?
+}
+
+stop() {
+ ejabberdctl status >/dev/null 2>&1
+ if test $? = 3; then
+ ewarn "ejabberd is already stopped (manually?)."
+ return 0
+ fi
+ ebegin "Stopping ejabberd"
+ if /usr/sbin/ejabberdctl stop >/dev/null 2>&1; then
+ cnt=0
+ sleep 1
+ while ejabberdctl status >/dev/null 2>&1 || test $? = 1; do
+ echo -n .
+ cnt=`expr $cnt + 1`
+ if [ $cnt -ge 60 ] ; then
+ eend 1
+ break
+ fi
+ sleep 1
+ done
+ eend 0
+ else
+ eend 1
+ einfo "Please, run '/usr/sbin/ejabberdctl stop' to see what's going on."
+ fi
+ eend 0
+}
diff --git a/net-im/ejabberd/files/ejabberd-wrapper-2.template b/net-im/ejabberd/files/ejabberd-wrapper-2.template
new file mode 100644
index 0000000..89f3ff4
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-wrapper-2.template
@@ -0,0 +1,49 @@
+#!/bin/sh
+
+[ -f /etc/conf.d/ejabberd ] && . /etc/conf.d/ejabberd
+
+# provide some default configuration
+ERL=/usr/bin/erl
+CONFIG=/etc/jabber/ejabberd.cfg
+INETRC=/etc/jabber/inetrc
+LOG_PATH=/var/log/jabber/ejabberd.log
+SASL_LOG=/var/log/jabber/sasl.log
+SPOOL=/var/spool/jabber
+
+ARGS=
+while [ $# -ne 0 ] ; do
+ PARAM=$1
+ shift
+ case $PARAM in
+ --) break ;;
+ --node) EJABBERD_NODE=$1; shift ;;
+ --config) CONFIG=$1 ; shift ;;
+ --log) LOG_PATH=$1 ; shift ;;
+ --sasl-log) SASL_LOG=$1 ; shift ;;
+ --spool) SPOOL=$1 ; shift ;;
+ *) ARGS="$ARGS $PARAM" ;;
+ esac
+done
+
+if [ "$EJABBERD_NODE" = "${EJABBERD_NODE%.*}" ] ; then
+ SNAME=-sname
+else
+ SNAME=-name
+fi
+
+# export ejabberd configuration environment variables
+export HOME=/var/run/jabber
+export EJABBERD_EBIN=/usr/@libdir@/erlang/lib/ejabberd-@version@/ebin
+export EJABBERD_MSGS_PATH=/usr/@libdir@/erlang/lib/ejabberd-@version@/priv/msgs
+export EJABBERD_SO_PATH=/usr/@libdir@/erlang/lib/ejabberd-@version@/priv/lib
+export EJABBERD_LOG_PATH=$LOG_PATH
+export EJABBERD_CONFIG_PATH=$CONFIG
+
+exec $ERL $SNAME $EJABBERD_NODE \
+ -s ejabberd \
+ -kernel inetrc \"$INETRC\" \
+ -sasl sasl_error_logger \{file,\"$SASL_LOG\"\} \
+ -mnesia dir \"$SPOOL\" \
+ $ERL_OPTIONS $ARGS "$@"
+
+
diff --git a/net-im/ejabberd/files/ejabberdctl-wrapper-3.template b/net-im/ejabberd/files/ejabberdctl-wrapper-3.template
new file mode 100644
index 0000000..05b67d8
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberdctl-wrapper-3.template
@@ -0,0 +1,46 @@
+#!/bin/sh
+
+[ -f /etc/conf.d/ejabberd ] && . /etc/conf.d/ejabberd
+
+if [ -r /var/run/jabber/.erlang.cookie ] ; then
+ HOME=/var/run/jabber
+ export HOME
+fi
+
+ERL=/usr/bin/erl
+
+if [ $# -ne 0 ] ; then
+ case $1 in
+ --node) shift ; EJABBERD_NODE=$1 ; shift ;;
+ esac
+fi
+
+if [ "$EJABBERD_NODE" = "${EJABBERD_NODE%.*}" ] ; then
+ SNAME=-sname
+else
+ SNAME=-name
+fi
+
+case $1 in
+ debug)
+ shift
+
+ if [ "$EJABBERD_NODE" = "${EJABBERD_NODE%@*}" ] ; then
+ EJABBERD_NODE=$EJABBERD_NODE@$(hostname -s)
+ fi
+
+ echo "Attaching Erlang shell to node $EJABBERD_NODE."
+ echo "To detach it, press: Ctrl+G, q, Return"
+ echo ""
+ exec $ERL $SNAME ejabberddebug \
+ -remsh $EJABBERD_NODE \
+ "$@"
+ ;;
+ *)
+exec $ERL $SNAME ejabberdctl \
+ -pa /usr/@libdir@/erlang/lib/ejabberd-@version@/ebin \
+ -s ejabberd_ctl \
+ -noinput \
+ -extra $EJABBERD_NODE "$@"
+ ;;
+esac
diff --git a/net-im/ejabberd/files/self-cert-v2.sh b/net-im/ejabberd/files/self-cert-v2.sh
new file mode 100755
index 0000000..b2f3b7d
--- /dev/null
+++ b/net-im/ejabberd/files/self-cert-v2.sh
@@ -0,0 +1,41 @@
+#! /bin/sh
+#
+# self-cert.sh for ejabberd, stolen from:
+# mkimapdcert,v 1.1 2001/01/02 03:54:25 drobbins Exp
+#
+# Copyright 2000 Double Precision, Inc. See COPYING for
+# distribution information.
+#
+# This is a short script to quickly generate a self-signed X.509 key for
+# eJabberd. Normally this script would get called by an automatic
+# package installation routine.
+
+test -x /usr/bin/openssl || exit 0
+
+prefix="/usr"
+pemfile="/etc/jabber/ssl.pem"
+randfile="/etc/jabber/ssl.rand"
+
+if test -f $pemfile
+then
+ echo "$pemfile already exists."
+ exit 1
+fi
+
+cp /dev/null $pemfile
+chmod 640 $pemfile
+chown root:jabber $pemfile
+
+cleanup() {
+ rm -f $pemfile
+ rm -f $randfile
+ exit 1
+}
+
+dd if=/dev/urandom of=$randfile count=1 2>/dev/null
+/usr/bin/openssl req -new -x509 -days 365 -nodes \
+ -config /etc/jabber/ssl.cnf -out $pemfile -keyout $pemfile || cleanup
+/usr/bin/openssl gendh -rand $randfile 512 >> $pemfile || cleanup
+/usr/bin/openssl x509 -subject -dates -fingerprint -noout -in $pemfile || cleanup
+rm -f $randfile
+
diff --git a/net-im/ejabberd/files/ssl.cnf b/net-im/ejabberd/files/ssl.cnf
new file mode 100644
index 0000000..7a51d91
--- /dev/null
+++ b/net-im/ejabberd/files/ssl.cnf
@@ -0,0 +1,36 @@
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ssl.cnf,v 1.1 2006/10/12 16:26:07 chainsaw Exp $
+# This is the openssl config file to generate keys for ejabberd
+# It is read by self-cert.sh
+
+[ req ]
+# you can increase this value, but be aware that it will make things much slower
+# this should be a power of 2!
+default_bits = 1024
+# leave the rest of these alone!
+encrypt_key = yes
+distinguished_name = req_dn
+x509_extensions = cert_type
+prompt = no
+
+[ req_dn ]
+# 2-Letter ISO country code
+C=UK
+# FULL name of state/province/district
+# NO abbreviations!
+ST=Cambridgeshire
+# FULL name of city
+# NO abbreviations!
+L=Peterborough
+# Full Name of your organization
+# NO abbreviations!
+O=Bits and Bobs Ltd.
+# Leave this alone unless specifically need to change it!
+OU=Automatically-generated ejabberd SSL key
+# This should be a FQDN that resolves to the IP of your server
+CN=localhost
+# This should be the email address for the administrator of the server
+emailAddress=root@localhost
+
+# Leave this alone!
+[ cert_type ]
+nsCertType = server
diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml
new file mode 100644
index 0000000..15a7c07
--- /dev/null
+++ b/net-im/ejabberd/metadata.xml
@@ -0,0 +1,18 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd">
+
+<pkgmetadata>
+<herd>net-im</herd>
+<longdescription> Free and Open Source distributed fault-tolerant Jabber server. It's mostly written in Erlang, and works on many platforms.</longdescription>
+ <use>
+ <flag name='mod_irc'>Build irc gateway </flag>
+ <flag name='mod_muc'>Build Multi User Chat module</flag>
+ <flag name='mod_srl'>Build LDAP shared roster module
+ (https://alioth.debian.org/projects/ejabberd-msrl/)</flag>
+ <flag name='mod_pubsub'>Build Pubsub module</flag>
+ <flag name='web'>Enable web admin interface</flag>
+ <flag name="captcha">Support for CAPTCHA Forms (XEP-158)</flag>
+ <flag name="mod_proxy65">Support for SOCKS5 Bytestreams (XEP-0065)</flag>
+ <flag name="mod_statsdx">Measures several statistics, and provides a new section in ejabberd Web Admin to view them.</flag>
+ </use>
+</pkgmetadata>