summaryrefslogtreecommitdiff
path: root/net-im
diff options
context:
space:
mode:
authorTim Harder <radhermit@gentoo.org>2015-04-12 05:27:09 +0000
committerTim Harder <radhermit@gentoo.org>2015-04-12 05:27:09 +0000
commit3f348c372b06ef6646d546a3557f7cdd1ebf999d (patch)
tree5bd8367e7ea1b36ac853a27d0c4e571a92acca9a /net-im
parentAdd fixes from upstream for CVE-2015-1779 #544328 by Agostino Sarubbo. (diff)
downloadgentoo-2-3f348c372b06ef6646d546a3557f7cdd1ebf999d.tar.gz
gentoo-2-3f348c372b06ef6646d546a3557f7cdd1ebf999d.tar.bz2
gentoo-2-3f348c372b06ef6646d546a3557f7cdd1ebf999d.zip
Version bump (bug #487994).
(Portage version: 2.2.18/cvs/Linux x86_64, signed Manifest commit with key 4F064CA3)
Diffstat (limited to 'net-im')
-rw-r--r--net-im/ejabberd/ChangeLog8
-rw-r--r--net-im/ejabberd/ejabberd-15.03.ebuild131
-rw-r--r--net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch49
-rw-r--r--net-im/ejabberd/metadata.xml11
4 files changed, 195 insertions, 4 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog
index 348ae05a9ced..c00da30d829b 100644
--- a/net-im/ejabberd/ChangeLog
+++ b/net-im/ejabberd/ChangeLog
@@ -1,6 +1,12 @@
# ChangeLog for net-im/ejabberd
# Copyright 1999-2015 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.127 2015/03/20 21:40:41 radhermit Exp $
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.128 2015/04/12 05:27:09 radhermit Exp $
+
+*ejabberd-15.03 (12 Apr 2015)
+
+ 12 Apr 2015; Tim Harder <radhermit@gentoo.org> +ejabberd-15.03.ebuild,
+ +files/ejabberd-15.03-ejabberdctl.patch, metadata.xml:
+ Version bump (bug #487994).
20 Mar 2015; Tim Harder <radhermit@gentoo.org> metadata.xml:
Drop myself as maintainer.
diff --git a/net-im/ejabberd/ejabberd-15.03.ebuild b/net-im/ejabberd/ejabberd-15.03.ebuild
new file mode 100644
index 000000000000..2e18b98a1dcd
--- /dev/null
+++ b/net-im/ejabberd/ejabberd-15.03.ebuild
@@ -0,0 +1,131 @@
+# Copyright 1999-2015 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-15.03.ebuild,v 1.1 2015/04/12 05:27:09 radhermit Exp $
+
+EAPI=5
+
+inherit eutils multilib pam ssl-cert
+
+DESCRIPTION="The Erlang Jabber Daemon"
+HOMEPAGE="http://www.ejabberd.im/ https://github.com/processone/ejabberd/"
+SRC_URI="http://dev.gentoo.org/~radhermit/dist/${P}.tar.xz"
+# upstream tarball missing bundled erlang libs that are fetched via git
+#SRC_URI="https://www.process-one.net/downloads/downloads-action.php?file=/${PN}/${PV}/${P}.tgz -> ${P}.tar.gz"
+
+LICENSE="GPL-2"
+SLOT="0"
+KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
+EJABBERD_MODULES="mod_bosh mod_irc mod_muc mod_proxy65 mod_pubsub"
+IUSE="captcha debug elixir ldap mysql odbc pam postgres riak redis tools zlib ${EJABBERD_MODULES}"
+
+DEPEND=">=net-im/jabber-base-0.01
+ >=dev-libs/expat-1.95
+ >=dev-libs/libyaml-0.1.4
+ >=dev-lang/erlang-15.2[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-1.2.3 )"
+RDEPEND="${DEPEND}
+ >=sys-apps/shadow-4.1.4.2-r3
+ pam? ( virtual/pam )"
+
+# 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}-ejabberdctl.patch
+
+ # 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|\(ETC_DIR=\){{sysconfdir}}.*|\1${JABBER_ETC}|" \
+ -e "s|\(LOGS_DIR=\){{localstatedir}}.*|\1${JABBER_LOG}|" \
+ -e "s|\(SPOOL_DIR=\){{localstatedir}}.*|\1${JABBER_SPOOL}|" \
+ -i ejabberdctl.template || die
+
+ # fix up the ssl cert paths in ejabberd.yml to use our cert
+ sed -e "s:/path/to/ssl.pem:/etc/ssl/ejabberd/server.pem:g" \
+ -i ejabberd.yml.example || die
+
+ # correct path to captcha script in default ejabberd.yml
+ sed -e 's|\({captcha_cmd,[[:space:]]*"\).\+"}|\1/usr/'$(get_libdir)'/erlang/lib/'${P}'/priv/bin/captcha.sh"}|' \
+ -i ejabberd.yml.example || die
+
+ # disable mod_irc in ejabberd.yml
+ if ! use mod_irc; then
+ sed -e "s/{mod_irc,/%{mod_irc,/" \
+ -i ejabberd.yml.example || die
+ fi
+
+ epatch_user
+}
+
+src_configure() {
+ # run configure scripts for all prefetched deps
+ ./rebar get-deps
+
+ econf \
+ --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
+ --libdir="${EPREFIX}/usr/$(get_libdir)/erlang/lib/" \
+ $(use_enable tools) \
+ $(use_enable odbc) \
+ $(use_enable mysql) \
+ $(use_enable postgres pgsql) \
+ $(use_enable pam) \
+ $(use_enable zlib) \
+ $(use_enable riak) \
+ $(use_enable redis) \
+ $(use_enable mod_bosh json) \
+ $(use_enable elixir) \
+ $(use_enable mod_irc iconv) \
+ $(use_enable debug) \
+ --enable-lager \
+ --enable-user=jabber
+}
+
+src_compile() {
+ emake $(use debug && echo debug=true ejabberd_debug=true)
+}
+
+src_install() {
+ default
+
+ # Pam helper module permissions
+ if use pam; then
+ pamd_mimic_system xmpp auth account || die "Cannot create pam.d file"
+ fi
+
+ newinitd "${FILESDIR}"/${PN}-3.initd ${PN}
+ newconfd "${FILESDIR}"/${PN}-3.confd ${PN}
+}
+
+pkg_postinst() {
+ if [[ -z ${REPLACING_VERSIONS} ]] ; then
+ 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/"
+ else
+ elog "Ejabberd now defaults to using a YAML format for its config file."
+ elog "To convert your old Erlang term file run the following as root:"
+ elog "ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml"
+ echo
+ fi
+
+ SSL_ORGANIZATION="${SSL_ORGANIZATION:-Ejabberd XMPP Server}"
+ install_cert /etc/ssl/ejabberd/server
+ # Fix ssl cert permissions bug #369809
+ chown root:jabber "${EROOT}/etc/ssl/ejabberd/server.pem"
+ chmod 0440 "${EROOT}/etc/ssl/ejabberd/server.pem"
+}
diff --git a/net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch
new file mode 100644
index 000000000000..0d2ccf32485f
--- /dev/null
+++ b/net-im/ejabberd/files/ejabberd-15.03-ejabberdctl.patch
@@ -0,0 +1,49 @@
+Set SHELL since the generic jabber user used on Gentoo for jabber servers
+doesn't have a valid shell set by default and fix EXEC_CMD otherwise it fails
+with "This account is currently not available" again due to jabber not having
+a valid shell.
+
+Also, workaround the assumption that jabber's $HOME is a directory when instead
+it defaults to /dev/null on Gentoo.
+
+--- ejabberd-15.03/ejabberdctl.template
++++ ejabberd-15.03/ejabberdctl.template
+@@ -15,6 +15,7 @@
+ IEX={{bindir}}/iex
+ EPMD={{bindir}}/epmd
+ INSTALLUSER={{installuser}}
++SHELL=/bin/sh
+
+ # Compatibility in ZSH
+ #setopt shwordsplit 2>/dev/null
+@@ -25,11 +26,11 @@
+ for GID in `id -G`; do
+ if [ $GID -eq 0 ] ; then
+ INSTALLUSER_HOME=$(getent passwd "$INSTALLUSER" | cut -d: -f6)
+- if [ -n "$INSTALLUSER_HOME" ] && [ ! -d "$INSTALLUSER_HOME" ] ; then
++ if [ -n "$INSTALLUSER_HOME" ] && [ ! -e "$INSTALLUSER_HOME" ] ; then
+ mkdir -p "$INSTALLUSER_HOME"
+ chown "$INSTALLUSER" "$INSTALLUSER_HOME"
+ fi
+- EXEC_CMD="su $INSTALLUSER -c"
++ EXEC_CMD="su $INSTALLUSER -p -c"
+ fi
+ done
+ if [ `id -g` -eq `id -g $INSTALLUSER` ] ; then
+@@ -111,6 +112,7 @@
+ DATETIME=`date "+%Y%m%d-%H%M%S"`
+ ERL_CRASH_DUMP=$LOGS_DIR/erl_crash_$DATETIME.dump
+ ERL_INETRC=$ETC_DIR/inetrc
++HOME=$SPOOL_DIR
+
+ # define erl parameters
+ ERL_OPTIONS=$(echo $ERL_OPTIONS | sed 's/ /\\ /g')
+@@ -167,6 +169,8 @@
+ export ERL_INETRC
+ export ERL_MAX_PORTS
+ export ERL_MAX_ETS_TABLES
++export HOME
++export SHELL
+
+ # start server
+ start()
diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml
index 5db3e64fe2c2..a694512ebbc3 100644
--- a/net-im/ejabberd/metadata.xml
+++ b/net-im/ejabberd/metadata.xml
@@ -7,12 +7,17 @@
mostly written in Erlang, and works on many platforms.
</longdescription>
<use>
+ <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>
+ <flag name='elixir'>Enable Elixir language support (http://elixir-lang.org/)</flag>
+ <flag name='mod_bosh'>Enable support for XMPP over BOSH (XEP-0206)</flag>
<flag name='mod_irc'>Build irc gateway</flag>
<flag name='mod_muc'>Build Multi User Chat module</flag>
<flag name='mod_pubsub'>Build Pubsub module</flag>
+ <flag name='redis'>Enable Redis support</flag>
+ <flag name='riak'>Enable Riak support</flag>
+ <flag name='tools'>Build development tools</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>