diff options
author | Peter Volkov <pva@gentoo.org> | 2011-06-22 13:02:33 +0000 |
---|---|---|
committer | Peter Volkov <pva@gentoo.org> | 2011-06-22 13:02:33 +0000 |
commit | 5ae60ca5db58bf9864c30730ca18bc49b32d824d (patch) | |
tree | e16babae88701d2ef8765acf556279f9fc0c517e /net-im/ejabberd | |
parent | Fix underlink. Bug #371823 (diff) | |
download | historical-5ae60ca5db58bf9864c30730ca18bc49b32d824d.tar.gz historical-5ae60ca5db58bf9864c30730ca18bc49b32d824d.tar.bz2 historical-5ae60ca5db58bf9864c30730ca18bc49b32d824d.zip |
Drop old and vulnerable versions.
Package-Manager: portage-2.1.10.3/cvs/Linux x86_64
Diffstat (limited to 'net-im/ejabberd')
-rw-r--r-- | net-im/ejabberd/ChangeLog | 11 | ||||
-rw-r--r-- | net-im/ejabberd/Manifest | 27 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-2.1.5.ebuild | 219 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-2.1.6.ebuild | 211 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-2.0.5-erlang-13.patch | 361 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-2.1.4-mod_shared_roster_ldap.patch | 13 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-2.1.5-md2-optional.patch | 259 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-2.confd | 23 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-2.initd | 54 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-wrapper-2.template | 49 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberdctl-wrapper-3.template | 46 | ||||
-rwxr-xr-x | net-im/ejabberd/files/self-cert-v2.sh | 41 | ||||
-rw-r--r-- | net-im/ejabberd/files/ssl.cnf | 36 |
13 files changed, 11 insertions, 1339 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog index 14bd694e3d20..e45263533d65 100644 --- a/net-im/ejabberd/ChangeLog +++ b/net-im/ejabberd/ChangeLog @@ -1,6 +1,15 @@ # 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.97 2011/06/19 13:43:55 maekke Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.98 2011/06/22 13:02:32 pva Exp $ + + 22 Jun 2011; Peter Volkov <pva@gentoo.org> + -files/ejabberd-2.0.5-erlang-13.patch, + -files/ejabberd-2.1.4-mod_shared_roster_ldap.patch, -ejabberd-2.1.5.ebuild, + -files/ejabberd-2.1.5-md2-optional.patch, -ejabberd-2.1.6.ebuild, + -files/ejabberd-2.confd, -files/ejabberd-2.initd, + -files/ejabberd-wrapper-2.template, -files/ejabberdctl-wrapper-3.template, + -files/self-cert-v2.sh, -files/ssl.cnf: + Drop old and vulnerable versions. 19 Jun 2011; Markus Meier <maekke@gentoo.org> ejabberd-2.1.8.ebuild: x86 stable, bug #370201 diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest index 5429304d870a..c7b7a6397a66 100644 --- a/net-im/ejabberd/Manifest +++ b/net-im/ejabberd/Manifest @@ -1,32 +1,7 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -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 2.1.1-mod_statsdx.patch.bz2 13041 RMD160 9cc6d71ff2a2d58b0e377a3facb564d22d46af25 SHA1 4ef326eff97283530ee137613c009fe132312644 SHA256 a290217d7fd2c338d9ddba73e25ee052a3735d7168aafd24750de113f43ebc5f -DIST ejabberd-2.1.5.tar.gz 2278008 RMD160 7abd6bc4a03f68d03e13ee8c1ff3a5fee6098dc6 SHA1 8966d6752219c9386f48a5b8e1f2f8fb0e7477ae SHA256 31a46228c6933d7c24435753300a4d2ae2e84568a6097175dc5d4e553299dd9d -DIST ejabberd-2.1.6.tar.gz 2874967 RMD160 9b6ed4986ffcd1ea90d23770e54cb002bc52304c SHA1 a1afbfc270f8e4c945bd91f64b7073781590535b SHA256 b54886b119a0ae9f19c8dd91a18e85e518fbd979d47812bee582e872cfbc3544 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 -DIST mod_shared_roster_ldap-0.5.1.tgz 607758 RMD160 5669a3d16fbca4d399e85a7d0dfda71643e6e2c7 SHA1 a9498d26e17752b882b3341b633d1804075d74ef SHA256 60e4ba0921d1ac65f9cca04fa2a7a3bbe3a9af52a26ad1a4fca4a3c6f1f0cc19 -EBUILD ejabberd-2.1.5.ebuild 8363 RMD160 7c23c35b3d3f41bb7e8947d7b5d37ab12dc480c6 SHA1 cfa596018e4b544dfb6c52dc1d5defb834822bbe SHA256 cb106a14aab74f7009433707713c3a77b5640cbcb0abb2d2f345ce84c4666581 -EBUILD ejabberd-2.1.6.ebuild 7948 RMD160 1c205869f9ef0639f56c32f18aeb5bf271153f8c SHA1 10d11a34ff6675dc1d7761bc3b72f73479a6e6db SHA256 c2ca8d8730e3326fc7b5ab6de5ddfbf09dd87bb2dd00d49cd6bcea4e400dbfe4 EBUILD ejabberd-2.1.8.ebuild 7921 RMD160 214754ab72a39c1d2f7a744ef2b3482fda9c1a24 SHA1 20a2a00080e3b73a22616d77ca408f5d7b50000d SHA256 1cc2c8c6ada4c540e4b04ca5bd15d35214bcf1b3c34de198ac07fbfa0f677a54 -MISC ChangeLog 19950 RMD160 5e5a8a695715c7efc14fba78c0a350cef7196ea9 SHA1 f1ab1b1dd65be92cf2aae7de5cfd4e60208fe6f8 SHA256 d0b8d2ba5ac799521d8c81ce23732a039e5c00bbc9fe1a05532c539e96229fb1 +MISC ChangeLog 20387 RMD160 e6203c5669f49994d6d0250955474a619a8653da SHA1 00e4b6c1ea26e82672066ab2b2c41be4f0991a7a SHA256 8e93439fed833f5f18adebadce5b0148567612a5d4812d9da8de001cde47d0b7 MISC metadata.xml 929 RMD160 3a456c8945da34e417ca2fb659807a280b834f85 SHA1 a7b3173f8b63655c049881629e1354c71ddd633e SHA256 4d46909fd72908dff8698bb9dfcf60132e973b28eabbfe75001397ed349ff11b ------BEGIN PGP SIGNATURE----- -Version: GnuPG v2.0.17 (GNU/Linux) - -iEYEARECAAYFAk39/TYACgkQkKaRLQcq0GK6PQCgoF7rPxUG1ntMmaQKD1aHsGGF -7jYAni59AJNHtiBxUWwCjKupwCrnHZn1 -=LVLo ------END PGP SIGNATURE----- diff --git a/net-im/ejabberd/ejabberd-2.1.5.ebuild b/net-im/ejabberd/ejabberd-2.1.5.ebuild deleted file mode 100644 index 995c5da3b24c..000000000000 --- a/net-im/ejabberd/ejabberd-2.1.5.ebuild +++ /dev/null @@ -1,219 +0,0 @@ -# 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.5.ebuild,v 1.4 2011/03/22 15:05:59 pva Exp $ - -EAPI=3 - -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/2.1.1-mod_statsdx.patch.bz2 ) - mod_srl? ( https://alioth.debian.org/frs/download.php/3283/mod_shared_roster_ldap-0.5.1.tgz )" - -LICENSE="GPL-2" -SLOT="0" -KEYWORDS="amd64 ~arm ~ia64 ~ppc ~sparc x86" -EJABBERD_MODULES="mod_irc mod_muc mod_proxy65 mod_pubsub mod_srl 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() { - epatch "${FILESDIR}/${P}-md2-optional.patch" #331299 - 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}/2.1.1-mod_statsdx.patch" - fi - - if use mod_srl; then - ewarn "mod_srl is not a part of upstream tarball but is a third-party module" - ewarn "taken from here: https://alioth.debian.org/projects/ejabberd-msrl/" - cp "${WORKDIR}"/src/mod_shared_roster_ldap{.{e,h}rl,_helpers.erl} "${S}" || die - epatch "${FILESDIR}/ejabberd-2.1.4-mod_shared_roster_ldap.patch" #328533 - 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) || die "compiling ejabberd core failed" -} - -src_install() { - emake DESTDIR="${ED}" install || die "install failed" - - # 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" - fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam" || die "Cannot adjust epam permissions" - fi - - cd "${WORKDIR}/${P}/doc" - dodoc "release_notes_${PV%%_rc*}.txt" || die - - #dodir /var/lib/ejabberd - newinitd "${FILESDIR}/${PN}-3.initd" ${PN} || die "Cannot install init.d script" - newconfd "${FILESDIR}/${PN}-3.confd" ${PN} || die "Cannot install conf.d file" -} - -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/ejabberd-2.1.6.ebuild b/net-im/ejabberd/ejabberd-2.1.6.ebuild deleted file mode 100644 index 73815f579f37..000000000000 --- a/net-im/ejabberd/ejabberd-2.1.6.ebuild +++ /dev/null @@ -1,211 +0,0 @@ -# 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=3 - -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/2.1.1-mod_statsdx.patch.bz2 )" - -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}/2.1.1-mod_statsdx.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) || die "compiling ejabberd core failed" -} - -src_install() { - emake DESTDIR="${ED}" install || die "install failed" - - # 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" || die - fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam" || die "Cannot adjust epam permissions" - fi - - cd "${WORKDIR}/${P}/doc" - dodoc "release_notes_${PV%%_rc*}.txt" || die - - #dodir /var/lib/ejabberd - newinitd "${FILESDIR}/${PN}-3.initd" ${PN} || die "Cannot install init.d script" - newconfd "${FILESDIR}/${PN}-3.confd" ${PN} || die "Cannot install conf.d file" -} - -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 deleted file mode 100644 index d52777ba3150..000000000000 --- a/net-im/ejabberd/files/ejabberd-2.0.5-erlang-13.patch +++ /dev/null @@ -1,361 +0,0 @@ -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 deleted file mode 100644 index 5fbf3ee867ee..000000000000 --- a/net-im/ejabberd/files/ejabberd-2.1.4-mod_shared_roster_ldap.patch +++ /dev/null @@ -1,13 +0,0 @@ -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 deleted file mode 100644 index e11cad3b7d12..000000000000 --- a/net-im/ejabberd/files/ejabberd-2.1.5-md2-optional.patch +++ /dev/null @@ -1,259 +0,0 @@ -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 deleted file mode 100644 index 0312ae7f3df2..000000000000 --- a/net-im/ejabberd/files/ejabberd-2.confd +++ /dev/null @@ -1,23 +0,0 @@ -# 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 deleted file mode 100644 index 8a150dc8eefb..000000000000 --- a/net-im/ejabberd/files/ejabberd-2.initd +++ /dev/null @@ -1,54 +0,0 @@ -#!/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-wrapper-2.template b/net-im/ejabberd/files/ejabberd-wrapper-2.template deleted file mode 100644 index 89f3ff4824e3..000000000000 --- a/net-im/ejabberd/files/ejabberd-wrapper-2.template +++ /dev/null @@ -1,49 +0,0 @@ -#!/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 deleted file mode 100644 index 05b67d8bca4b..000000000000 --- a/net-im/ejabberd/files/ejabberdctl-wrapper-3.template +++ /dev/null @@ -1,46 +0,0 @@ -#!/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 deleted file mode 100755 index b2f3b7dadd5e..000000000000 --- a/net-im/ejabberd/files/self-cert-v2.sh +++ /dev/null @@ -1,41 +0,0 @@ -#! /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 deleted file mode 100644 index 7a51d913b85d..000000000000 --- a/net-im/ejabberd/files/ssl.cnf +++ /dev/null @@ -1,36 +0,0 @@ -# $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 |