diff options
author | Tim Harder <radhermit@gentoo.org> | 2013-04-05 09:03:34 +0000 |
---|---|---|
committer | Tim Harder <radhermit@gentoo.org> | 2013-04-05 09:03:34 +0000 |
commit | ecc45de85a82afca237fa94ea3b28dc124a598b4 (patch) | |
tree | fa7e7cfd784c0881b194b35d04e36d3bfa655e23 /net-im/ejabberd | |
parent | Version bump, fixes bug #456652, #430550, #452860, #462924, and #436500 (diff) | |
download | gentoo-2-ecc45de85a82afca237fa94ea3b28dc124a598b4.tar.gz gentoo-2-ecc45de85a82afca237fa94ea3b28dc124a598b4.tar.bz2 gentoo-2-ecc45de85a82afca237fa94ea3b28dc124a598b4.zip |
Version bump. Fix variable name in init script (bug #443890) and add myself as a maintainer.
(Portage version: 2.2.0_alpha171/cvs/Linux x86_64, signed Manifest commit with key 4AB3E85B4F064CA3)
Diffstat (limited to 'net-im/ejabberd')
-rw-r--r-- | net-im/ejabberd/ChangeLog | 9 | ||||
-rw-r--r-- | net-im/ejabberd/ejabberd-2.1.12.ebuild | 214 | ||||
-rw-r--r-- | net-im/ejabberd/files/ejabberd-3.initd | 6 | ||||
-rw-r--r-- | net-im/ejabberd/metadata.xml | 4 |
4 files changed, 229 insertions, 4 deletions
diff --git a/net-im/ejabberd/ChangeLog b/net-im/ejabberd/ChangeLog index b2d0361031e0..deaa3873642b 100644 --- a/net-im/ejabberd/ChangeLog +++ b/net-im/ejabberd/ChangeLog @@ -1,6 +1,13 @@ # ChangeLog for net-im/ejabberd # Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.114 2013/01/31 00:42:15 radhermit Exp $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ChangeLog,v 1.115 2013/04/05 09:03:34 radhermit Exp $ + +*ejabberd-2.1.12 (05 Apr 2013) + + 05 Apr 2013; Tim Harder <radhermit@gentoo.org> +ejabberd-2.1.12.ebuild, + files/ejabberd-3.initd, metadata.xml: + Version bump. Fix variable name in init script (bug #443890) and add myself + as a maintainer. 31 Jan 2013; Tim Harder <radhermit@gentoo.org> metadata.xml: Another metadata whitespace fix. diff --git a/net-im/ejabberd/ejabberd-2.1.12.ebuild b/net-im/ejabberd/ejabberd-2.1.12.ebuild new file mode 100644 index 000000000000..f8414a26fd2b --- /dev/null +++ b/net-im/ejabberd/ejabberd-2.1.12.ebuild @@ -0,0 +1,214 @@ +# Copyright 1999-2013 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/ejabberd-2.1.12.ebuild,v 1.1 2013/04/05 09:03:34 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://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz + mod_statsdx? ( http://dev.gentoo.org/~radhermit/dist/${PN}-mod_statsdx-1118.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_OPTS="-p2" epatch "${WORKDIR}"/${PN}-mod_statsdx-1118.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() { + default + + # 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 + # Fix ssl cert permissions bug #369809 + chown root:jabber "${EROOT}/etc/ssl/ejabberd/server.pem" + chmod 0440 "${EROOT}/etc/ssl/ejabberd/server.pem" + 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-3.initd b/net-im/ejabberd/files/ejabberd-3.initd index 2d6d44d3c317..00a28aa49298 100644 --- a/net-im/ejabberd/files/ejabberd-3.initd +++ b/net-im/ejabberd/files/ejabberd-3.initd @@ -1,7 +1,7 @@ #!/sbin/runscript -# Copyright 1999-2010 Gentoo Foundation +# Copyright 1999-2013 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 $ +# $Header: /var/cvsroot/gentoo-x86/net-im/ejabberd/files/ejabberd-3.initd,v 1.4 2013/04/05 09:03:34 radhermit Exp $ depend() { use dns @@ -15,7 +15,7 @@ start() { return 0 fi ebegin "Starting ejabberd" - /usr/sbin/ejabberdctl ${EJABBERDCTL_OPT} start + /usr/sbin/ejabberdctl ${EJABBERDCTL_OPTS} start eend $? } diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml index 5db3e64fe2c2..0dd5b42ea3ab 100644 --- a/net-im/ejabberd/metadata.xml +++ b/net-im/ejabberd/metadata.xml @@ -2,6 +2,10 @@ <!DOCTYPE pkgmetadata SYSTEM "http://www.gentoo.org/dtd/metadata.dtd"> <pkgmetadata> <herd>net-im</herd> + <maintainer> + <email>radhermit@gentoo.org</email> + <name>Tim Harder</name> + </maintainer> <longdescription> Free and Open Source distributed fault-tolerant Jabber server. It's mostly written in Erlang, and works on many platforms. |