1.1 --- a/net-im/ejabberd/ChangeLog Tue Jan 11 14:21:27 2011 +0100
1.2 +++ b/net-im/ejabberd/ChangeLog Sun Feb 06 23:16:26 2011 +0100
1.3 @@ -2,6 +2,11 @@
1.4 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
1.5 # $Header: $
1.6
1.7 +*ejabberd-2.1.6-r1 (26 Dec 2010)
1.8 + 26 Dec 2010; Nikolaus Polak <nik@!NOSPAM!linuxlovers.at>
1.9 + net-im/ejabberd/ejabberd-2.1.6-r1.ebuild, files/ejabberd_ejab1381-21.patch :
1.10 + Added patch for remote roster management #EJAB-1381.
1.11 +
1.12 *ejabberd-2.1.6 (26 Dec 2010)
1.13 26 Dec 2010; Nikolaus Polak <nik@!NOSPAM!linuxlovers.at>
1.14 net-im/ejabberd/ejabberd-2.1.6.ebuild :
2.1 --- a/net-im/ejabberd/Manifest Tue Jan 11 14:21:27 2011 +0100
2.2 +++ b/net-im/ejabberd/Manifest Sun Feb 06 23:16:26 2011 +0100
2.3 @@ -1,6 +1,7 @@
2.4 AUX ejabberd-2.1.5-md2-optional.patch 6794 RMD160 0194fcb2b9e8add51256355d4a4c9548eb8eb031 SHA1 acde0e849cb626d0ba9184aaf9e995c9a06bd625 SHA256 c3414cf40f17f73dbf21f67b9ccb4e7d84b14a634848cf36960f3b51e21d0c9a
2.5 AUX ejabberd-3.confd 161 RMD160 3b2c2b2a871c42c75e854a3c592c0d399a5dd387 SHA1 01e72bda178e7bf26a66321c4330bbcc1607e540 SHA256 0296d3d281a321cd7380772c1d89a94e4a86f85b7f43bf9dc1af74935c2e6386
2.6 AUX ejabberd-3.initd 1018 RMD160 1d52bc9c664a6477d10b1396aba4a2c626da910a SHA1 fd0bb049df3d8a04410b3ccf59b9d78b40ee9d49 SHA256 1c07fa02152b42bee44a8d1cd3f031596aeee37276ec4a36d765e3c54aa23075
2.7 +AUX ejabberd_ejab1381-21.patch 12841 RMD160 95db55672a599d077377825a7ae65a72ab8e7507 SHA1 e05ceabdeece3db54d344d16c22a98ff6ff6eb2f SHA256 bd388dfa4bcc5fc45d698f3c610e644b4d84dba35bf49f3b1dca7a99be0304e7
2.8 AUX ejabberd_xmlrpc_svn1102.patch 18542 RMD160 44429ed17b12a8c6e092266a650ce4437f26ed6a SHA1 edb5649a2669909f797c71c71891e0677963d1cb SHA256 56147f6cdcc7ae9a792dd4528f1cf7c3c3a93a17d60f2cbf9d75d7769ad14cbf
2.9 AUX mod_admin_extra_svn1101.patch 69749 RMD160 d473f4e80690ee01399c853112a056f887f8c089 SHA1 7d13a4ce051176fb4c083c2030ef117b84c956a0 SHA256 191827454e4290f8d813daadf7bc2de1799ae85ca1fd8605169eaa176551d9db
2.10 AUX mod_cron_svn1034.patch 8131 RMD160 980dafbab6e7b70511e44deec66e21c6892d9142 SHA1 887fcb7be82ff375a86b2ba181c96236ed8ed5c6 SHA256 28c5f0b5cae086021b34718dea63d81a70b22f0b0231f74fe19916eeee92dc14
2.11 @@ -11,6 +12,7 @@
2.12 DIST ejabberd-2.1.6.tar.gz 2874967 RMD160 9b6ed4986ffcd1ea90d23770e54cb002bc52304c SHA1 a1afbfc270f8e4c945bd91f64b7073781590535b SHA256 b54886b119a0ae9f19c8dd91a18e85e518fbd979d47812bee582e872cfbc3544
2.13 DIST mod_shared_roster_ldap-0.5.3.tgz 663731 RMD160 c8905ccffe4bd99f77fe91d583502d0912b9a005 SHA1 5bb1991868341c7cfc995348747c43833820af2b SHA256 9e295065b60e5e37e839f7793503e9ae5e367c0a749e870cbbeeef3ce5609954
2.14 EBUILD ejabberd-2.1.5-r2.ebuild 9171 RMD160 10ad321f6474f7d1fefddd0805eeef74b646fa78 SHA1 6460474ffddabf3c4403ad1cb1f3231a46411178 SHA256 92455e49aba9aa92168924dbbb3af50c6795285924d30b0a272c30664ea71fae
2.15 +EBUILD ejabberd-2.1.6-r1.ebuild 9023 RMD160 0968a845c5840f14b1010935dadc35dec75abffc SHA1 9f3684dc522ac8e7099aa7079b3add9bfb573edd SHA256 a208c327481869f412132d7214af83dfdcc58821c89be61fbaed0dd847859224
2.16 EBUILD ejabberd-2.1.6.ebuild 8615 RMD160 057a0313ddf3ac13d229cd288e79edf01e93b8ac SHA1 44bd13b279cce3da93cdb282aeb91ce778cf911e SHA256 273e56f2ec020fa4314ff0912d53b0bb6dd038683c3d625f68d02566a2f03fed
2.17 -MISC ChangeLog 8918 RMD160 a3f4ab7602312306d6e2b75f05f1040ae1892d15 SHA1 24ad78b4fda60ea4ef04cb77f25fdb8a03a3cc0d SHA256 41c2f59d64cd25625adef0d22332181bcad5c6589a5040c6f597049fe434a5b9
2.18 +MISC ChangeLog 9145 RMD160 7ce13bd4033b5a54ef49704823cbec1d9e41e5e6 SHA1 4a89adaa42b4cc4d8ad780cbe4e1096d607ae502 SHA256 338711c477ad02e03c7d2e7a35128f1e3e13cc7acd67244ca6f2d56a95ebb6a5
2.19 MISC metadata.xml 1299 RMD160 0b8b4cf6f4c9d5dc0660a8646f62b46db07263a0 SHA1 8c9eb03e0007eab5f967b8f6d321c95f90ac44e3 SHA256 8c995bff2dcb53bee08ed12359358f6bc95537b61741da67af74e165073bd4be
3.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
3.2 +++ b/net-im/ejabberd/ejabberd-2.1.6-r1.ebuild Sun Feb 06 23:16:26 2011 +0100
3.3 @@ -0,0 +1,245 @@
3.4 +# Copyright 1999-2010 Gentoo Foundation
3.5 +# Distributed under the terms of the GNU General Public License v2
3.6 +# $Header
3.7 +
3.8 +EAPI=3
3.9 +
3.10 +inherit eutils multilib pam ssl-cert
3.11 +
3.12 +DESCRIPTION="The Erlang Jabber Daemon"
3.13 +HOMEPAGE="http://www.ejabberd.im/"
3.14 +SRC_URI="http://www.process-one.net/downloads/${PN}/${PV}/${P}.tar.gz
3.15 + mod_statsdx? ( mirror://gentoo/2.1.1-mod_statsdx.patch.bz2 )"
3.16 +
3.17 +LICENSE="GPL-2"
3.18 +SLOT="0"
3.19 +KEYWORDS="~amd64 ~arm ~ia64 ~ppc ~sparc ~x86"
3.20 +EJABBERD_MODULES="mod_irc mod_muc mod_proxy65 mod_pubsub mod_statsdx \
3.21 + mod_admin_extra mod_cron mod_s2s_log xmlrpc"
3.22 +IUSE="captcha debug ldap odbc pam +web zlib ${EJABBERD_MODULES} ejab1381"
3.23 +
3.24 +DEPEND=">=net-im/jabber-base-0.01
3.25 + >=dev-libs/expat-1.95
3.26 + >=dev-lang/erlang-12.2.5[ssl]
3.27 + odbc? ( dev-db/unixODBC )
3.28 + ldap? ( =net-nds/openldap-2* )
3.29 + >=dev-libs/openssl-0.9.8e
3.30 + captcha? ( media-gfx/imagemagick[truetype,png] )
3.31 + xmlrpc? ( >=dev-libs/xmlrpc-erlang-ipr2-1.13 )
3.32 + zlib? ( sys-libs/zlib )"
3.33 +#>=sys-apps/shadow-4.1.4.2-r3 - fixes bug in su that made ejabberdctl unworkable.
3.34 +RDEPEND="${DEPEND}
3.35 + >=sys-apps/shadow-4.1.4.2-r3"
3.36 +
3.37 +PROVIDE="virtual/jabber-server"
3.38 +
3.39 +S=${WORKDIR}/${P}/src
3.40 +
3.41 +# paths in net-im/jabber-base
3.42 +JABBER_ETC="${EPREFIX}/etc/jabber"
3.43 +#JABBER_RUN="/var/run/jabber"
3.44 +JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
3.45 +JABBER_LOG="${EPREFIX}/var/log/jabber"
3.46 +JABBER_DOC="${EPREFIX}/usr/share/doc/${PF}"
3.47 +
3.48 +src_prepare() {
3.49 + if use mod_statsdx; then
3.50 + ewarn "mod_statsdx is not a part of upstream tarball but is a third-party module"
3.51 + ewarn "taken from here: http://www.ejabberd.im/mod_stats2file"
3.52 + epatch "${WORKDIR}/2.1.1-mod_statsdx.patch"
3.53 + fi
3.54 +
3.55 + # adding community modules source files
3.56 + if useq xmlrpc ; then
3.57 + epatch "${FILESDIR}/ejabberd_xmlrpc_svn1102.patch"
3.58 + fi
3.59 + if useq mod_admin_extra ; then
3.60 + epatch "${FILESDIR}/mod_admin_extra_svn1101.patch"
3.61 + fi
3.62 + # older patches require change to work dir, not /src
3.63 + cd ${WORKDIR}/${P}
3.64 + if useq mod_cron ; then
3.65 + epatch "${FILESDIR}/mod_cron_svn1034.patch"
3.66 + fi
3.67 + if useq mod_s2s_log ; then
3.68 + epatch "${FILESDIR}/mod_s2s_log_svn701.patch"
3.69 + fi
3.70 + # adding patch from https://support.process-one.net/browse/EJAB-1381
3.71 + if useq ejab1381 ; then
3.72 + epatch "${FILESDIR}/ejabberd_ejab1381-21.patch"
3.73 + fi
3.74 + cd ${S}
3.75 +
3.76 + # don't install release notes (we'll do this manually)
3.77 + sed '/install .* [.][.]\/doc\/[*][.]txt $(DOCDIR)/d' -i Makefile.in || die
3.78 + # Set correct paths
3.79 + sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${PF}:}" \
3.80 + -e "/^ETCDIR[[:space:]]*=/{s:@sysconfdir@/ejabberd:${JABBER_ETC}:}" \
3.81 + -e "/^LOGDIR[[:space:]]*=/{s:@localstatedir@/log/ejabberd:${JABBER_LOG}:}" \
3.82 + -e "/^SPOOLDIR[[:space:]]*=/{s:@localstatedir@/lib/ejabberd:${JABBER_SPOOL}:}" \
3.83 + -i Makefile.in || die
3.84 + sed -e "/EJABBERDDIR=/{s:ejabberd:${PF}:}" \
3.85 + -e "s|\(ETCDIR=\)@SYSCONFDIR@.*|\1${JABBER_ETC}|" \
3.86 + -e "s|\(LOGS_DIR=\)@LOCALSTATEDIR@.*|\1${JABBER_LOG}|" \
3.87 + -e "s|\(SPOOLDIR=\)@LOCALSTATEDIR@.*|\1${JABBER_SPOOL}|" \
3.88 + -i ejabberdctl.template || die
3.89 +
3.90 + # Set shell, so it'll work even in case jabber user have no shell
3.91 + # This is gentoo specific I guess since other distributions may have
3.92 + # ejabberd user with reall shell, while we share this user among different
3.93 + # jabberd implementations.
3.94 + sed '/^HOME/aSHELL=/bin/sh' -i ejabberdctl.template || die
3.95 + sed '/^export HOME/aexport SHELL' -i ejabberdctl.template || die
3.96 +
3.97 + #sed -e "s:/share/doc/ejabberd/:${JABBER_DOC}:" -i web/ejabberd_web_admin.erl
3.98 +
3.99 + # fix up the ssl cert paths in ejabberd.cfg to use our cert
3.100 + sed -e "s:/path/to/ssl.pem:/etc/ssl/ejabberd/server.pem:g" \
3.101 + -i ejabberd.cfg.example || die "Failed sed ejabberd.cfg.example"
3.102 +
3.103 + # correct path to captcha script in default ejabberd.cfg
3.104 + sed -e 's|\({captcha_cmd,[[:space:]]*"\).\+"}|\1/usr/'$(get_libdir)'/erlang/lib/'${P}'/priv/bin/captcha.sh"}|' \
3.105 + -i ejabberd.cfg.example || die "Failed sed ejabberd.cfg.example"
3.106 +
3.107 + # disable mod_irc in ejabberd.cfg
3.108 + if ! use mod_irc; then
3.109 + sed -i -e "s/{mod_irc,/%{mod_irc,/" \
3.110 + -i ejabberd.cfg.example || die "Failed to disable mod_irc"
3.111 + fi
3.112 +}
3.113 +
3.114 +src_configure() {
3.115 + econf \
3.116 + --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
3.117 + --libdir="${EPREFIX}/usr/$(get_libdir)/erlang/lib/" \
3.118 + $(use_enable mod_irc) \
3.119 + $(use_enable ldap eldap) \
3.120 + $(use_enable mod_muc) \
3.121 + $(use_enable mod_proxy65) \
3.122 + $(use_enable mod_pubsub) \
3.123 + $(use_enable web) \
3.124 + $(use_enable odbc) \
3.125 + $(use_enable zlib ejabberd_zlib) \
3.126 + $(use_enable pam) \
3.127 + --enable-user=jabber
3.128 +}
3.129 +
3.130 +src_compile() {
3.131 + emake $(use debug && echo debug=true ejabberd_debug=true) || die "compiling ejabberd core failed"
3.132 +}
3.133 +
3.134 +src_install() {
3.135 + emake DESTDIR="${ED}" install || die "install failed"
3.136 +
3.137 + # Pam helper module permissions
3.138 + # http://www.process-one.net/docs/ejabberd/guide_en.html
3.139 + if use pam; then
3.140 + pamd_mimic_system xmpp auth account || die "Cannot create pam.d file"
3.141 + fperms 4750 "/usr/$(get_libdir)/erlang/lib/${PF}/priv/bin/epam" || die "Cannot adjust epam permissions"
3.142 + fi
3.143 +
3.144 + cd "${WORKDIR}/${P}/doc"
3.145 + dodoc "release_notes_${PV%%_rc*}.txt" || die
3.146 +
3.147 + #dodir /var/lib/ejabberd
3.148 + newinitd "${FILESDIR}/${PN}-3.initd" ${PN} || die "Cannot install init.d script"
3.149 + newconfd "${FILESDIR}/${PN}-3.confd" ${PN} || die "Cannot install conf.d file"
3.150 +}
3.151 +
3.152 +pkg_postinst() {
3.153 + elog "For configuration instructions, please see"
3.154 + elog "/usr/share/doc/${PF}/html/guide.html, or the online version at"
3.155 + elog "http://www.process-one.net/en/ejabberd/docs/guide_en/"
3.156 +
3.157 + if ! use web ; then
3.158 + ewarn
3.159 + ewarn "The web USE flag is off, this has disabled the web admin interface."
3.160 + ewarn
3.161 + fi
3.162 +
3.163 + elog
3.164 + elog '===================================================================='
3.165 + elog 'Quick Start Guide:'
3.166 + elog '1) Add output of `hostname -f` to /etc/jabber/ejabberd.cfg line 91'
3.167 + elog ' {hosts, ["localhost", "thehost"]}.'
3.168 + elog '2) Add an admin user to /etc/jabber/ejabberd.cfg line 360'
3.169 + elog ' {acl, admin, {user, "theadmin", "thehost"}}.'
3.170 + elog '3) Start the server'
3.171 + elog ' # /etc/init.d/ejabberd start'
3.172 + elog '4) Register the admin user'
3.173 + elog ' # /usr/sbin/ejabberdctl register theadmin thehost thepassword'
3.174 + elog '5) Log in with your favourite jabber client or using the web admin'
3.175 +
3.176 + # Upgrading from ejabberd-2.0.x:
3.177 + if grep -E '^[^#]*EJABBERD_NODE=' "${EROOT}/etc/conf.d/ejabberd" >/dev/null 2>&1; then
3.178 + source "${EROOT}/etc/conf.d/ejabberd"
3.179 + ewarn
3.180 + ewarn "!!! WARNING !!! WARNING !!! WARNING !!! WARNING !!!"
3.181 + ewarn "Starting with 2.1.x some paths and configuration files were"
3.182 + ewarn "changed to reflect upstream intentions better. Notable changes are:"
3.183 + ewarn
3.184 + ewarn "1. Everything (even init scripts) is now handled with ejabberdctl script."
3.185 + ewarn "Thus main configuration file became /etc/jabberd/ejabberdctl.cfg"
3.186 + ewarn "You must update ERLANG_NODE there with the value of EJABBERD_NODE"
3.187 + ewarn "from /etc/conf.d/ejebberd or ejabberd will refuse to start."
3.188 + ewarn
3.189 + ewarn "2. SSL certificate is now generated with ssl-cert eclass and resides"
3.190 + ewarn "at standard location: /etc/ssl/ejabberd/server.pem."
3.191 + ewarn
3.192 + ewarn "3. Cookie now resides at /var/spool/jabber/.erlang.cookie"
3.193 + ewarn
3.194 + ewarn "4. /var/log/jabber/sasl.log is now /var/log/jabber/erlang.log"
3.195 + ewarn
3.196 + ewarn "5. Crash dumps (if any) will be located at /var/log/jabber"
3.197 +
3.198 + local i ctlcfg new_ctlcfg
3.199 + i=0
3.200 + ctlcfg=${EROOT}/etc/jabber/ejabberdctl.cfg
3.201 + while :; do
3.202 + new_ctlcfg=$(printf "${EROOT}/etc/jabber/._cfg%04d_ejabberdctl.cfg" ${i})
3.203 + [[ ! -e ${new_ctlcfg} ]] && break
3.204 + ctlcfg=${new_ctlcfg}
3.205 + ((i++))
3.206 + done
3.207 +
3.208 + ewarn
3.209 + ewarn "Updating ${ctlcfg} (debug: ${new_ctlcfg})"
3.210 + sed -e "/#ERLANG_NODE=/aERLANG_NODE=$EJABBERD_NODE" "${ctlcfg}" > "${new_ctlcfg}" || die
3.211 +
3.212 + if [[ -e ${EROOT}/var/run/jabber/.erlang.cookie ]]; then
3.213 + ewarn "Moving .erlang.cookie..."
3.214 + if [[ -e ${EROOT}/var/spool/jabber/.erlang.cookie ]]; then
3.215 + mv -v "${EROOT}"/var/spool/jabber/.erlang.cookie{,bak}
3.216 + fi
3.217 + mv -v "${EROOT}"/var/{run/jabber,spool/jabber}/.erlang.cookie
3.218 + fi
3.219 + ewarn
3.220 + ewarn "We'll try to handle upgrade automagically but, please, do your"
3.221 + ewarn "own checks and do not forget to run 'etc-update'!"
3.222 + ewarn "PLEASE! Run 'etc-update' now!"
3.223 + fi
3.224 +
3.225 + SSL_ORGANIZATION="${SSL_ORGANIZATION:-Ejabberd XMPP Server}"
3.226 + install_cert /etc/ssl/ejabberd/server
3.227 + if [[ -e ${EROOT}/etc/jabber/ssl.pem ]]; then
3.228 + ewarn
3.229 + ewarn "The location of SSL certificates has changed. If you are"
3.230 + ewarn "upgrading from ${CATEGORY}/${PN}-2.0.5* or earlier you might"
3.231 + ewarn "want to move your old certificates from /etc/jabber into"
3.232 + ewarn "/etc/ssl/ejabberd/, update config files and"
3.233 + ewarn "rm /etc/jabber/ssl.pem to avoid this message."
3.234 + ewarn
3.235 + fi
3.236 +
3.237 + # community modules information
3.238 + if useq mod_admin_extra || useq mod_cron || useq mod_s2s_log || useq xmlrpc ; then
3.239 + elog "One or more community modules installed, to activate and configure "
3.240 + elog "them read their documentation on http://www.ejabberd.im/contributions"
3.241 + fi
3.242 +
3.243 + # ejab-1381 information
3.244 + if useq ejab138 ; then
3.245 + elog "Patch from #EJAB-1381 for remote roster management activated,"
3.246 + elog "read the documentation at http://spectrum.im/projects/spectrum/wiki/Remote_roster"
3.247 + fi
3.248 +}
4.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
4.2 +++ b/net-im/ejabberd/files/ejabberd_ejab1381-21.patch Sun Feb 06 23:16:26 2011 +0100
4.3 @@ -0,0 +1,343 @@
4.4 +From 96b73f67247fc174aa1a84c847d25014da37d4fd Mon Sep 17 00:00:00 2001
4.5 +From: Badlop <badlop@process-one.net>
4.6 +Date: Mon, 17 Jan 2011 11:46:14 +0100
4.7 +Subject: [PATCH] Partial support XEP-xxxx: Remote Roster Management (EJAB-1381)
4.8 +
4.9 +---
4.10 + doc/guide.tex | 14 ++++++-
4.11 + src/mod_roster.erl | 100 ++++++++++++++++++++++++++++++++++++++++++++--
4.12 + src/mod_roster_odbc.erl | 101 ++++++++++++++++++++++++++++++++++++++++++++--
4.13 + 3 files changed, 203 insertions(+), 12 deletions(-)
4.14 +
4.15 +diff --git a/doc/guide.tex b/doc/guide.tex
4.16 +index 0ae3053..d538df9 100644
4.17 +--- a/doc/guide.tex
4.18 ++++ b/doc/guide.tex
4.19 +@@ -3937,6 +3937,15 @@ It also supports Roster Versioning (\xepref{0237}).
4.20 + Options:
4.21 + \begin{description}
4.22 + \iqdiscitem{Roster Management (\ns{jabber:iq:roster})}
4.23 ++ \titem{\{managers, [Domainname]\}} \ind{options!managers}
4.24 ++ List of components (or servers) that can manage users rosters using
4.25 ++ \footahref{http://jkaluza.fedorapeople.org/remote-roster.html}{XEP-xxxx: Remote Roster Management}.
4.26 ++ The protocol sections implemented are:
4.27 ++ \term{2.3. Component requests user's roster},
4.28 ++ \term{2.4. Client sends roster update},
4.29 ++ \term{2.5. Component sends roster update}.
4.30 ++ A component only gets or can modify roster items that have the same domain as the component.
4.31 ++ Default value is: \term{[]}.
4.32 + \titem{\{versioning, false|true\}} \ind{options!versioning}Enables
4.33 + Roster Versioning.
4.34 + This option is disabled by default.
4.35 +@@ -3951,12 +3960,13 @@ Options:
4.36 + you must disable this option.
4.37 + \end{description}
4.38 +
4.39 +-This example configuration enables Roster Versioning with storage of current id:
4.40 ++This example configuration enables Roster Versioning with storage of current id.
4.41 ++The ICQ and MSN transports can get ICQ and MSN contacts, add them, or remove them for any local account:
4.42 + \begin{verbatim}
4.43 + {modules,
4.44 + [
4.45 + ...
4.46 +- {mod_roster, [{versioning, true}, {store_current_id, true}]},
4.47 ++ {mod_roster, [{versioning, true}, {store_current_id, true}, {["icq.example.org", "msn.example.org"]} ]},
4.48 + ...
4.49 + ]}.
4.50 + \end{verbatim}
4.51 +diff --git a/src/mod_roster.erl b/src/mod_roster.erl
4.52 +index 90c4601..254f8ab 100644
4.53 +--- a/src/mod_roster.erl
4.54 ++++ b/src/mod_roster.erl
4.55 +@@ -123,6 +123,8 @@ stop(Host) ->
4.56 + ?MODULE, webadmin_user, 50),
4.57 + gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_ROSTER).
4.58 +
4.59 ++process_iq(From, To, IQ) when ((From#jid.luser == "") andalso (From#jid.lresource == "")) ->
4.60 ++ process_iq_manager(From, To, IQ);
4.61 +
4.62 + process_iq(From, To, IQ) ->
4.63 + #iq{sub_el = SubEl} = IQ,
4.64 +@@ -281,12 +283,13 @@ item_to_xml(Item) ->
4.65 + {xmlelement, "item", Attrs4, SubEls}.
4.66 +
4.67 +
4.68 +-process_iq_set(From, To, #iq{sub_el = SubEl} = IQ) ->
4.69 ++process_iq_set(From, To, #iq{sub_el = SubEl, id = Id} = IQ) ->
4.70 + {xmlelement, _Name, _Attrs, Els} = SubEl,
4.71 +- lists:foreach(fun(El) -> process_item_set(From, To, El) end, Els),
4.72 ++ Managed = is_managed_from_id(Id),
4.73 ++ lists:foreach(fun(El) -> process_item_set(From, To, El, Managed) end, Els),
4.74 + IQ#iq{type = result, sub_el = []}.
4.75 +
4.76 +-process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.77 ++process_item_set(From, To, {xmlelement, _Name, Attrs, Els}, Managed) ->
4.78 + JID1 = jlib:string_to_jid(xml:get_attr_s("jid", Attrs)),
4.79 + #jid{user = User, luser = LUser, lserver = LServer} = From,
4.80 + case JID1 of
4.81 +@@ -308,7 +311,7 @@ process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.82 + groups = [],
4.83 + xs = []}
4.84 + end,
4.85 +- Item1 = process_item_attrs(Item, Attrs),
4.86 ++ Item1 = process_item_attrs_managed(Item, Attrs, Managed),
4.87 + Item2 = process_item_els(Item1, Els),
4.88 + case Item2#roster.subscription of
4.89 + remove ->
4.90 +@@ -316,6 +319,7 @@ process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.91 + _ ->
4.92 + mnesia:write(Item2)
4.93 + end,
4.94 ++ send_itemset_to_managers(From, Item2, Managed),
4.95 + %% If the item exist in shared roster, take the
4.96 + %% subscription information from there:
4.97 + Item3 = ejabberd_hooks:run_fold(roster_process_item,
4.98 +@@ -341,7 +345,7 @@ process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.99 + ok
4.100 + end
4.101 + end;
4.102 +-process_item_set(_From, _To, _) ->
4.103 ++process_item_set(_From, _To, _, _Managed) ->
4.104 + ok.
4.105 +
4.106 + process_item_attrs(Item, [{Attr, Val} | Attrs]) ->
4.107 +@@ -1098,3 +1102,89 @@ us_to_list({User, Server}) ->
4.108 + webadmin_user(Acc, _User, _Server, Lang) ->
4.109 + Acc ++ [?XE("h3", [?ACT("roster/", "Roster")])].
4.110 +
4.111 ++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4.112 ++
4.113 ++%% Implement http://jkaluza.fedorapeople.org/remote-roster.html#sect-id188012
4.114 ++
4.115 ++%% Handle 2.3 and 2.5
4.116 ++
4.117 ++process_iq_manager(From, To, IQ) ->
4.118 ++ %% Check what access is allowed for From to To
4.119 ++ MatchDomain = From#jid.lserver,
4.120 ++ case is_domain_managed(MatchDomain, To#jid.lserver) of
4.121 ++ true ->
4.122 ++ process_iq_manager2(MatchDomain, To, IQ);
4.123 ++ false ->
4.124 ++ #iq{sub_el = SubEl} = IQ,
4.125 ++ IQ#iq{type = error, sub_el = [SubEl, ?ERR_BAD_REQUEST]}
4.126 ++ end.
4.127 ++
4.128 ++process_iq_manager2(MatchDomain, To, IQ) ->
4.129 ++ %% If IQ is SET, filter the input IQ
4.130 ++ IQFiltered = maybe_filter_request(MatchDomain, IQ),
4.131 ++ %% Call the standard function with reversed JIDs
4.132 ++ IdInitial = IQFiltered#iq.id,
4.133 ++ ResIQ = process_iq(To, To, IQFiltered#iq{id = "roster-remotely-managed"}),
4.134 ++ %% Filter the output IQ
4.135 ++ filter_stanza(MatchDomain, ResIQ#iq{id = IdInitial}).
4.136 ++
4.137 ++is_domain_managed(ContactHost, UserHost) ->
4.138 ++ Managers = gen_mod:get_module_opt(UserHost, ?MODULE, managers, []),
4.139 ++ lists:member(ContactHost, Managers).
4.140 ++
4.141 ++maybe_filter_request(MatchDomain, IQ) when IQ#iq.type == set ->
4.142 ++ filter_stanza(MatchDomain, IQ);
4.143 ++maybe_filter_request(_MatchDomain, IQ) ->
4.144 ++ IQ.
4.145 ++
4.146 ++filter_stanza(_MatchDomain, #iq{sub_el = []} = IQ) ->
4.147 ++ IQ;
4.148 ++filter_stanza(MatchDomain, #iq{sub_el = [SubEl | _]} = IQ) ->
4.149 ++ #iq{sub_el = SubElFiltered} = IQRes =
4.150 ++ filter_stanza(MatchDomain, IQ#iq{sub_el = SubEl}),
4.151 ++ IQRes#iq{sub_el = [SubElFiltered]};
4.152 ++filter_stanza(MatchDomain, #iq{sub_el = SubEl} = IQ) ->
4.153 ++ {xmlelement, Type, Attrs, Items} = SubEl,
4.154 ++ ItemsFiltered = lists:filter(
4.155 ++ fun(Item) ->
4.156 ++ is_item_of_domain(MatchDomain, Item) end, Items),
4.157 ++ SubElFiltered = {xmlelement, Type, Attrs, ItemsFiltered},
4.158 ++ IQ#iq{sub_el = SubElFiltered}.
4.159 ++
4.160 ++is_item_of_domain(MatchDomain, {xmlelement, _, Attrs, _}) ->
4.161 ++ lists:any(fun(Attr) -> is_jid_of_domain(MatchDomain, Attr) end, Attrs);
4.162 ++is_item_of_domain(_MatchDomain, {xmlcdata, _}) ->
4.163 ++ false.
4.164 ++
4.165 ++is_jid_of_domain(MatchDomain, {"jid", JIDString}) ->
4.166 ++ case jlib:string_to_jid(JIDString) of
4.167 ++ JID when JID#jid.lserver == MatchDomain -> true;
4.168 ++ _ -> false
4.169 ++ end;
4.170 ++is_jid_of_domain(_, _) ->
4.171 ++ false.
4.172 ++
4.173 ++%% Handle 2.5
4.174 ++process_item_attrs_managed(Item, Attrs, true) ->
4.175 ++ process_item_attrs_ws(Item, Attrs);
4.176 ++process_item_attrs_managed(Item, _Attrs, false) ->
4.177 ++ process_item_attrs(Item, _Attrs).
4.178 ++
4.179 ++%% Handle 2.4
4.180 ++send_itemset_to_managers(_From, _Item, true) ->
4.181 ++ ok;
4.182 ++send_itemset_to_managers(From, Item, false) ->
4.183 ++ {_, UserHost} = Item#roster.us,
4.184 ++ {_ContactUser, ContactHost, _ContactResource} = Item#roster.jid,
4.185 ++
4.186 ++ %% Check if the component is an allowed manager
4.187 ++ IsManager = is_domain_managed(ContactHost, UserHost),
4.188 ++ case IsManager of
4.189 ++ true -> push_item("", ContactHost, "", From, Item);
4.190 ++ false -> ok
4.191 ++ end.
4.192 ++
4.193 ++is_managed_from_id("roster-remotely-managed") ->
4.194 ++ true;
4.195 ++is_managed_from_id(_Id) ->
4.196 ++ false.
4.197 +diff --git a/src/mod_roster_odbc.erl b/src/mod_roster_odbc.erl
4.198 +index 4159614..b6a5fef 100644
4.199 +--- a/src/mod_roster_odbc.erl
4.200 ++++ b/src/mod_roster_odbc.erl
4.201 +@@ -113,6 +113,8 @@ stop(Host) ->
4.202 + ?MODULE, webadmin_user, 50),
4.203 + gen_iq_handler:remove_iq_handler(ejabberd_sm, Host, ?NS_ROSTER).
4.204 +
4.205 ++process_iq(From, To, IQ) when ((From#jid.luser == "") andalso (From#jid.lresource == "")) ->
4.206 ++ process_iq_manager(From, To, IQ);
4.207 +
4.208 + process_iq(From, To, IQ) ->
4.209 + #iq{sub_el = SubEl} = IQ,
4.210 +@@ -306,12 +308,13 @@ item_to_xml(Item) ->
4.211 + {xmlelement, "item", Attrs, SubEls}.
4.212 +
4.213 +
4.214 +-process_iq_set(From, To, #iq{sub_el = SubEl} = IQ) ->
4.215 ++process_iq_set(From, To, #iq{sub_el = SubEl, id = Id} = IQ) ->
4.216 + {xmlelement, _Name, _Attrs, Els} = SubEl,
4.217 +- lists:foreach(fun(El) -> process_item_set(From, To, El) end, Els),
4.218 ++ Managed = is_managed_from_id(Id),
4.219 ++ lists:foreach(fun(El) -> process_item_set(From, To, El, Managed) end, Els),
4.220 + IQ#iq{type = result, sub_el = []}.
4.221 +
4.222 +-process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.223 ++process_item_set(From, To, {xmlelement, _Name, Attrs, Els}, Managed) ->
4.224 + JID1 = jlib:string_to_jid(xml:get_attr_s("jid", Attrs)),
4.225 + #jid{user = User, luser = LUser, lserver = LServer} = From,
4.226 + case JID1 of
4.227 +@@ -347,7 +350,7 @@ process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.228 + name = ""}
4.229 + end
4.230 + end,
4.231 +- Item1 = process_item_attrs(Item, Attrs),
4.232 ++ Item1 = process_item_attrs_managed(Item, Attrs, Managed),
4.233 + Item2 = process_item_els(Item1, Els),
4.234 + case Item2#roster.subscription of
4.235 + remove ->
4.236 +@@ -357,6 +360,7 @@ process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.237 + ItemGroups = groups_to_string(Item2),
4.238 + odbc_queries:update_roster(LServer, Username, SJID, ItemVals, ItemGroups)
4.239 + end,
4.240 ++ send_itemset_to_managers(From, Item2, Managed),
4.241 + %% If the item exist in shared roster, take the
4.242 + %% subscription information from there:
4.243 + Item3 = ejabberd_hooks:run_fold(roster_process_item,
4.244 +@@ -382,7 +386,7 @@ process_item_set(From, To, {xmlelement, _Name, Attrs, Els}) ->
4.245 + ok
4.246 + end
4.247 + end;
4.248 +-process_item_set(_From, _To, _) ->
4.249 ++process_item_set(_From, _To, _, _Managed) ->
4.250 + ok.
4.251 +
4.252 + process_item_attrs(Item, [{Attr, Val} | Attrs]) ->
4.253 +@@ -1197,3 +1201,90 @@ us_to_list({User, Server}) ->
4.254 +
4.255 + webadmin_user(Acc, _User, _Server, Lang) ->
4.256 + Acc ++ [?XE("h3", [?ACT("roster/", "Roster")])].
4.257 ++
4.258 ++%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
4.259 ++
4.260 ++%% Implement http://jkaluza.fedorapeople.org/remote-roster.html#sect-id188012
4.261 ++
4.262 ++%% Handle 2.3 and 2.5
4.263 ++
4.264 ++process_iq_manager(From, To, IQ) ->
4.265 ++ %% Check what access is allowed for From to To
4.266 ++ MatchDomain = From#jid.lserver,
4.267 ++ case is_domain_managed(MatchDomain, To#jid.lserver) of
4.268 ++ true ->
4.269 ++ process_iq_manager2(MatchDomain, To, IQ);
4.270 ++ false ->
4.271 ++ #iq{sub_el = SubEl} = IQ,
4.272 ++ IQ#iq{type = error, sub_el = [SubEl, ?ERR_BAD_REQUEST]}
4.273 ++ end.
4.274 ++
4.275 ++process_iq_manager2(MatchDomain, To, IQ) ->
4.276 ++ %% If IQ is SET, filter the input IQ
4.277 ++ IQFiltered = maybe_filter_request(MatchDomain, IQ),
4.278 ++ %% Call the standard function with reversed JIDs
4.279 ++ IdInitial = IQFiltered#iq.id,
4.280 ++ ResIQ = process_iq(To, To, IQFiltered#iq{id = "roster-remotely-managed"}),
4.281 ++ %% Filter the output IQ
4.282 ++ filter_stanza(MatchDomain, ResIQ#iq{id = IdInitial}).
4.283 ++
4.284 ++is_domain_managed(ContactHost, UserHost) ->
4.285 ++ Managers = gen_mod:get_module_opt(UserHost, ?MODULE, managers, []),
4.286 ++ lists:member(ContactHost, Managers).
4.287 ++
4.288 ++maybe_filter_request(MatchDomain, IQ) when IQ#iq.type == set ->
4.289 ++ filter_stanza(MatchDomain, IQ);
4.290 ++maybe_filter_request(_MatchDomain, IQ) ->
4.291 ++ IQ.
4.292 ++
4.293 ++filter_stanza(_MatchDomain, #iq{sub_el = []} = IQ) ->
4.294 ++ IQ;
4.295 ++filter_stanza(MatchDomain, #iq{sub_el = [SubEl | _]} = IQ) ->
4.296 ++ #iq{sub_el = SubElFiltered} = IQRes =
4.297 ++ filter_stanza(MatchDomain, IQ#iq{sub_el = SubEl}),
4.298 ++ IQRes#iq{sub_el = [SubElFiltered]};
4.299 ++filter_stanza(MatchDomain, #iq{sub_el = SubEl} = IQ) ->
4.300 ++ {xmlelement, Type, Attrs, Items} = SubEl,
4.301 ++ ItemsFiltered = lists:filter(
4.302 ++ fun(Item) ->
4.303 ++ is_item_of_domain(MatchDomain, Item) end, Items),
4.304 ++ SubElFiltered = {xmlelement, Type, Attrs, ItemsFiltered},
4.305 ++ IQ#iq{sub_el = SubElFiltered}.
4.306 ++
4.307 ++is_item_of_domain(MatchDomain, {xmlelement, _, Attrs, _}) ->
4.308 ++ lists:any(fun(Attr) -> is_jid_of_domain(MatchDomain, Attr) end, Attrs);
4.309 ++is_item_of_domain(_MatchDomain, {xmlcdata, _}) ->
4.310 ++ false.
4.311 ++
4.312 ++is_jid_of_domain(MatchDomain, {"jid", JIDString}) ->
4.313 ++ case jlib:string_to_jid(JIDString) of
4.314 ++ JID when JID#jid.lserver == MatchDomain -> true;
4.315 ++ _ -> false
4.316 ++ end;
4.317 ++is_jid_of_domain(_, _) ->
4.318 ++ false.
4.319 ++
4.320 ++%% Handle 2.5
4.321 ++process_item_attrs_managed(Item, Attrs, true) ->
4.322 ++ process_item_attrs_ws(Item, Attrs);
4.323 ++process_item_attrs_managed(Item, _Attrs, false) ->
4.324 ++ process_item_attrs(Item, _Attrs).
4.325 ++
4.326 ++%% Handle 2.4
4.327 ++send_itemset_to_managers(_From, _Item, true) ->
4.328 ++ ok;
4.329 ++send_itemset_to_managers(From, Item, false) ->
4.330 ++ {_, UserHost} = Item#roster.us,
4.331 ++ {_ContactUser, ContactHost, _ContactResource} = Item#roster.jid,
4.332 ++
4.333 ++ %% Check if the component is an allowed manager
4.334 ++ IsManager = is_domain_managed(ContactHost, UserHost),
4.335 ++ case IsManager of
4.336 ++ true -> push_item("", ContactHost, "", From, Item);
4.337 ++ false -> ok
4.338 ++ end.
4.339 ++
4.340 ++is_managed_from_id("roster-remotely-managed") ->
4.341 ++ true;
4.342 ++is_managed_from_id(_Id) ->
4.343 ++ false.
4.344 +--
4.345 +1.7.2.3
4.346 +
5.1 --- a/net-im/spectrum/ChangeLog Tue Jan 11 14:21:27 2011 +0100
5.2 +++ b/net-im/spectrum/ChangeLog Sun Feb 06 23:16:26 2011 +0100
5.3 @@ -2,6 +2,13 @@
5.4 # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2
5.5 # $Header: $
5.6
5.7 +*spectrum-1.4.7 (06 Feb 2011)
5.8 +
5.9 + 06 Feb 2011; Nikolaus Polak <nik@!NOSPAM!linuxlovers.at>
5.10 + -spectrum-1.4.6.ebuild, spectrum-1.4.7.ebuild :
5.11 + Updated to newest version, Ebuild based on Gentoo Bug #291437 (Conrad
5.12 + Konstecki, Marcel Pennewiß)
5.13 +
5.14 *spectrum-1.4.6 (11 Jan 2011)
5.15
5.16 11 Jan 2011; Nikolaus Polak <nik@!NOSPAM!linuxlovers.at>
6.1 --- a/net-im/spectrum/Manifest Tue Jan 11 14:21:27 2011 +0100
6.2 +++ b/net-im/spectrum/Manifest Sun Feb 06 23:16:26 2011 +0100
6.3 @@ -1,8 +1,7 @@
6.4 -AUX spectrum.cfg 4948 RMD160 b87e6fbc1711681d2cd43a7ee71a10a1934b2550 SHA1 ecf02c36fa5bdcfd06e293cc1f7e471eab845460 SHA256 18d0c375f19d79479e49c738a36f79d99b0ec3e91822465930a9e68aec011d21
6.5 -AUX spectrum.confd 158 RMD160 8f17f17da7df17d6ec608b538a3ab5b03a33f6b0 SHA1 c6c65f6d5f302ddf96018a5d43fa95dd61091c84 SHA256 fe7fa4db3d024fc64d22807c56e539617f05122869ab5a67a0b08e3aae29b914
6.6 -AUX spectrum.initd 549 RMD160 6bf03fdde82366e8144d1438b087e43c157ac0ae SHA1 4bf545bef37d4ff50822a2602a1c26a1631ef84e SHA256 ed414fc8f82c582d571e95a6b25dcc8c4b953acb945ebcab93b2d756af01b9a7
6.7 -AUX spectrum.symlink.cfg 4856 RMD160 c8b8cb2fdeffa2106b5f6a3040d9fdd6927de8ca SHA1 89a23f2fb2bd0c7be683786dc3321bf5831baab8 SHA256 03db78339741bfc2d43334c449127690a16fd10f275d4e8cbff27b0d64a22bf7
6.8 -DIST spectrum-1.4.6.tar.gz 228874 RMD160 1e39e779451ac9e73d59b59075b09a9644197b2d SHA1 677b3e67b5267f1379ebb119b7b44ee340a3ece5 SHA256 02ed75ad6ebb6d971891cfe802e040cac55ac0a4c4a9263d4b69b51afce6a4ec
6.9 -EBUILD spectrum-1.4.6.ebuild 3666 RMD160 b09d1ac38db8092f2a9268e6fbce430e2970f742 SHA1 df58b05526ed2002b224872b4b4482841714e091 SHA256 83d53b5b972c989be4baa7bac03dca8d6e4c5c62ebcf2986d1ac2d41846c0c27
6.10 -MISC ChangeLog 1970 RMD160 bb87ae47acbe77a9f2931dd5fb4cf2570bad508a SHA1 d60405b6d5f2c221db73f1adf5ffaf7697c9924d SHA256 6b490c21549daa259abfcfa173b4bd43e735cfcb199b727899f325d09f58ca4e
6.11 +AUX spectrum.cfg 5123 RMD160 deccea57242c42a1e200f85ca0dda7f80ffd88c1 SHA1 f1b3278bdacfc87958755511fbdbc4aa4990e11b SHA256 2972308145ea0c723f17c10c6d1ea68eb647cd2ddc5380cfb57d11e26ba36f54
6.12 +AUX spectrum.confd 247 RMD160 dc3090444320be374bea1a033bf0a6d0ab4ba0c4 SHA1 331d69874bc55223ca56af4fe46c326b7d27694d SHA256 7b4388d6d5f647cb443a905ce989793181e0c0bf85a8989a1967905e6b0f768d
6.13 +AUX spectrum.initd 1696 RMD160 9049b3162fb606ba91b0648b39d210f0ad72faf5 SHA1 823e793ffcc9fb414ae622faa644f3aee18b681a SHA256 e70ce9bf15bbb3360470d4d549105e4bbad58fb6b94d0e45ad03e34fae73477b
6.14 +DIST spectrum-1.4.7.tar.gz 235303 RMD160 22db29cdd321a1fc7d77db7eb09c19cb49c963d6 SHA1 d07c198090ee1b0404d7641546d2feb56e912ea7 SHA256 6e8049c7c2370613b94377a4c17c32806032488b194bb26e694f4a4e75bd550d
6.15 +EBUILD spectrum-1.4.7.ebuild 3591 RMD160 866214dab433204a6a22be44450299fa2c3a10f4 SHA1 14d36809b9c2dc93d52765c466d8274f0b1b31ea SHA256 472ba5029f09301240d9b7ce1223ae803d295a347907a0cc83f7c4bf6cd5b445
6.16 +MISC ChangeLog 2214 RMD160 0a9cf360189fa705d16e26d8fb1869af51f7256d SHA1 e821a31fe8c9c95c6d601e13e055d50b50d3a068 SHA256 12bfaba8e52492d95f21005226a4f7ee90b2be6c6f523540c8de6b039eea90ed
6.17 MISC metadata.xml 281 RMD160 0154b5b03c034db9af0dc427b81d54118cdf2f64 SHA1 44bf5b4750b4d82dc7df1772c48ad2b22e08cd75 SHA256 06e9321f72648cf711cd9542bf1abdbca85ad204725199ca88b2e88d77c97264
7.1 --- a/net-im/spectrum/files/spectrum.cfg Tue Jan 11 14:21:27 2011 +0100
7.2 +++ b/net-im/spectrum/files/spectrum.cfg Sun Feb 06 23:16:26 2011 +0100
7.3 @@ -3,7 +3,7 @@
7.4 enable=1
7.5
7.6 # one of: aim, facebook, gg, icq, irc, msn, myspace, qq, simple, xmpp, yahoo
7.7 -protocol=S2P
7.8 +protocol=$filename:protocol
7.9
7.10 # component ip
7.11 server=127.0.0.1
7.12 @@ -13,15 +13,15 @@
7.13 use_proxy=0
7.14
7.15 # component JID
7.16 -jid=S2P.example.com
7.17 +jid=$filename:protocol.example.com
7.18
7.19 # component secret
7.20 password=secret
7.21
7.22 # component port
7.23 -port=5347
7.24 +port=$filename:port
7.25
7.26 -config_interface = /var/run/spectrum/S2P.sock
7.27 +config_interface = /var/run/spectrum/$filename:protocol.sock
7.28
7.29 # IP:port where filetransfer proxy binds to. This has to be public IP.
7.30 #filetransfer_bind_address=192.0.2.1:12345
7.31 @@ -34,7 +34,7 @@
7.32 #admins=admin@example.com;foo@bar.cz
7.33
7.34 # directory where downloaded files will be saved
7.35 -filetransfer_cache=/var/lib/spectrum/S2P/filetransfer_cache
7.36 +filetransfer_cache=/var/lib/spectrum/$filename:protocol/filetransfer_cache
7.37
7.38 # URL used to acces filestransfer_cache directory from the web.
7.39 filetransfer_web=http://example.com/files/
7.40 @@ -44,7 +44,7 @@
7.41 #filetransfer_force_cache_storage=0
7.42
7.43 # name of transport (this will appear in service discovery)
7.44 -name=My S2P Transport
7.45 +name=My $filename:protocol Transport
7.46
7.47 # default language
7.48 language=en
7.49 @@ -74,7 +74,7 @@
7.50 #vip_features = avatars;chatstate;filetransfer
7.51
7.52 # pid file
7.53 -pid_file=/var/run/spectrum/S2P.pid
7.54 +pid_file=/var/run/spectrum/$filename:protocol.pid
7.55
7.56 # require_tls to connect legacy network
7.57 #require_tls=false
7.58 @@ -125,7 +125,7 @@
7.59
7.60 [logging]
7.61 # log file, needs to be unique for each spectrum instance
7.62 -log_file=/var/log/spectrum/S2P.log
7.63 +log_file=/var/log/spectrum/$filename:protocol.log
7.64
7.65 # log areas
7.66 # combination of: xml, purple
7.67 @@ -145,12 +145,12 @@
7.68 #password=password
7.69 # sqlite: set path to database file here
7.70 # mysql: set to name of database
7.71 -database=/var/lib/spectrum/S2P/database/S2P.sqlite
7.72 +database=/var/lib/spectrum/$filename:protocol/database/$filename:protocol.sqlite
7.73 # table prefix for multiple transport instances sharing the same database
7.74 -#prefix=S2P_
7.75 +#prefix=$filename:protocol_
7.76
7.77 [purple]
7.78 # avatar, vcard, roster storage
7.79 # needs to be unique for each spectrum instance
7.80 -userdir=/var/lib/spectrum/S2P/userdir
7.81 +userdir=/var/lib/spectrum/$filename:protocol/userdir
7.82
8.1 --- a/net-im/spectrum/files/spectrum.confd Tue Jan 11 14:21:27 2011 +0100
8.2 +++ b/net-im/spectrum/files/spectrum.confd Sun Feb 06 23:16:26 2011 +0100
8.3 @@ -1,8 +1,11 @@
8.4 -# /etc/conf.d/spectrum.S2P: config file for spectrum S2P transport
8.5 +# /etc/conf.d/spectrum.PROTOCOL config file for spectrum PROTOCOL transport
8.6 +
8.7 +# Start Transport when starting /etc/init.d/spectrum
8.8 +AUTOSTART="yes"
8.9
8.10 # Configfile
8.11 -CONFFILE="/etc/spectrum/S2P.cfg"
8.12 +CONFFILE="/etc/spectrum/PROTOCOL.cfg"
8.13
8.14 # PID
8.15 -PIDFILE="/var/run/spectrum/S2P.pid"
8.16 +PIDFILE="/var/run/spectrum/PROTOCOL.pid"
8.17
9.1 --- a/net-im/spectrum/files/spectrum.initd Tue Jan 11 14:21:27 2011 +0100
9.2 +++ b/net-im/spectrum/files/spectrum.initd Sun Feb 06 23:16:26 2011 +0100
9.3 @@ -1,23 +1,58 @@
9.4 #!/sbin/runscript
9.5 -# Copyright 1999-2010 Gentoo Foundation
9.6 +# Copyright 1999-2011 Gentoo Foundation
9.7 # Distributed under the terms of the GNU General Public License v2
9.8 -# $Header: $
9.9 +
9.10 +PROTOCOL=${SVCNAME#*.}
9.11
9.12 depend() {
9.13 need net
9.14 use jabber-server
9.15 }
9.16
9.17 +autostartstop() {
9.18 + count=0
9.19 + ret=0
9.20 +
9.21 + for transport in $(grep -l '^AUTOSTART=.\?yes.\?$' /etc/conf.d/spectrum.*); do
9.22 + /etc/init.d/$(basename ${transport}) $1
9.23 + ret=$[${ret}+$?]
9.24 + count=$[${count}+1]
9.25 + done
9.26 +
9.27 + if [[ ${count} -eq 0 ]]; then
9.28 + eerror "No transports for Autostart found. To use global autostart for"
9.29 + eerror "Spectrum please set AUTOSTART=\"yes\" in at least one"
9.30 + eerror "spectrum.* config file in /etc/conf.d"
9.31 + ret=1
9.32 + fi
9.33 +
9.34 + [[ ${ret} -gt 0 ]] && ret=1
9.35 + return ${ret}
9.36 +}
9.37 +
9.38 start() {
9.39 - ebegin "Starting S2P Spectrum Transport"
9.40 - start-stop-daemon --start --pidfile ${PIDFILE} \
9.41 - --chuid jabber:jabber --exec /usr/bin/spectrum -- ${CONFFILE}
9.42 - eend $?
9.43 + if [ -z "${PROTOCOL}" ] || [ ${SVCNAME} == "spectrum" ]; then
9.44 + ebegin "Starting Spectrum Transports"
9.45 + autostartstop start
9.46 + eend $?
9.47 + else
9.48 + ebegin "Starting ${PROTOCOL} Spectrum Transport"
9.49 + start-stop-daemon --start --pidfile ${PIDFILE} \
9.50 + --chuid jabber:jabber --exec /usr/bin/spectrum -- ${CONFFILE}
9.51 + eend $?
9.52 + fi
9.53 +
9.54 }
9.55
9.56 stop() {
9.57 - ebegin "Stopping S2P Spectrum Transport"
9.58 - start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
9.59 - eend $?
9.60 + if [ -z "${PROTOCOL}" ] || [ ${SVCNAME} == "spectrum" ]; then
9.61 + ebegin "Stopping Spectrum Transports"
9.62 + autostartstop stop
9.63 + eend $?
9.64 + else
9.65 + ebegin "Stopping ${PROTOCOL} Spectrum Transport"
9.66 + start-stop-daemon --stop --quiet --pidfile ${PIDFILE}
9.67 + eend $?
9.68 + fi
9.69 }
9.70
10.1 --- a/net-im/spectrum/files/spectrum.symlink.cfg Tue Jan 11 14:21:27 2011 +0100
10.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
10.3 @@ -1,152 +0,0 @@
10.4 -[service]
10.5 -# enable this spectrum instance
10.6 -enable=1
10.7 -
10.8 -# one of: aim, facebook, gg, icq, irc, msn, myspace, qq, simple, xmpp, yahoo
10.9 -protocol=$filename:protocol
10.10 -
10.11 -# component ip
10.12 -server=127.0.0.1
10.13 -
10.14 -# if use_proxy is 1, the http_proxy env var will be used as the proxy server
10.15 -# for example export http_proxy="http://user:passwd@your.proxy.server:port/"
10.16 -use_proxy=0
10.17 -
10.18 -# component JID
10.19 -jid=$protocol.example.com
10.20 -
10.21 -# component secret
10.22 -password=secret
10.23 -
10.24 -# component port
10.25 -port=$filename:port
10.26 -
10.27 -config_interface = /var/run/spectrum/$protocol.sock
10.28 -
10.29 -# IP:port where filetransfer proxy binds to. This has to be public IP.
10.30 -#filetransfer_bind_address=192.0.2.1:$port
10.31 -
10.32 -# IP:port which will be sent in filetransfer request as stream host.
10.33 -#filetransfer_public_address=192.0.2.1:$port
10.34 -
10.35 -# admin JIDs - Jabber IDs of transport administrators who have access to admin adhoc commands
10.36 -# separated by semicolons
10.37 -#admins=admin@example.com;foo@bar.cz
10.38 -
10.39 -# directory where downloaded files will be saved
10.40 -filetransfer_cache=/var/lib/spectrum/$protocol/filetransfer_cache
10.41 -
10.42 -# URL used to acces filestransfer_cache directory from the web.
10.43 -filetransfer_web=http://example.com/files/
10.44 -
10.45 -# name of transport (this will appear in service discovery)
10.46 -name=My $protocol Transport
10.47 -
10.48 -# default language
10.49 -language=en
10.50 -
10.51 -# transport features separated by semicolons
10.52 -# combination of: avatars, chatstate, filetransfer
10.53 -# if commented, all features will be used
10.54 -# This variable is DEPRECATED and will be removed in future versions. Use [features] instead.
10.55 -#transport_features = avatars;chatstate;filetransfer
10.56 -
10.57 -# if vip_mode is 1, users are divided to 2 groups according to 'vip' database field
10.58 -vip_mode=0
10.59 -
10.60 -# if vip_mode is 1, you can set transport to be availabe only for VIP users by setting only_for_vip to 1.
10.61 -only_for_vip=0
10.62 -
10.63 -# if vip_mode is 1 and only_for_vip is 1, users can connect from these servers even they are not VIP.
10.64 -# This feature is useful, if you want to enable transport only for users from your server, but also want
10.65 -# to give access to VIP users from other servers (for example from GTalk)
10.66 -# seperated by semicolons
10.67 -#allowed_servers=localhost
10.68 -
10.69 -# transport features separated by semicolons which will be used for VIP users.
10.70 -# combination of: avatars, chatstate, filetransfer
10.71 -# if commented, all features will be used
10.72 -# This variable is DEPRECATED and will be removed in future versions. Use [vip-features] instead.
10.73 -#vip_features = avatars;chatstate;filetransfer
10.74 -
10.75 -# pid file
10.76 -pid_file=/var/run/spectrum/$protocol.pid
10.77 -
10.78 -# require_tls to connect legacy network
10.79 -#require_tls=false
10.80 -
10.81 -# Eventloop used by Spectrum. Allows to change default use of poll to epoll,
10.82 -# which should be faster and handles more connections better.
10.83 -# WARNING: some 3rd party libpurple protocol plugins are not prepared to be
10.84 -# used with different eventloop, but protocols included in libpurple by default
10.85 -# works OK.
10.86 -#eventloop=glib
10.87 -
10.88 -[registration]
10.89 -# Set to 0 to disable transport registration to everyone except
10.90 -# people from host from allowed_servers list.
10.91 -#enable_public_registration=1
10.92 -
10.93 -# You can override username registered by transport user. This is useful
10.94 -# for example if you want to let users to register only their Facebook name
10.95 -# and internally connect them to facebook_name@chat.facebook.com.
10.96 -# $username variable is replaced by username which has been registered
10.97 -# by particular user.
10.98 -#username_mask = $username@chat.facebook.com
10.99 -
10.100 -# This option allows you to white-list newly created accounts according
10.101 -# to regexp. for example allowed_usernames=*.\.gmail\.com$ will allow only
10.102 -# GTalk users to register. If you use username_mask, then username_mask is
10.103 -# applied before this option.
10.104 -#allowed_usernames=regexp
10.105 -
10.106 -# Label used to described username field in registration form
10.107 -#username_label = Facebook username
10.108 -
10.109 -# This variable overrides default instructions text in registration form.
10.110 -#instructions = Type your Facebook name here:
10.111 -
10.112 -# Transport features, all features are enabled by default.
10.113 -[features]
10.114 -#filetransfer=1
10.115 -#avatars=1
10.116 -#chatstates=1
10.117 -#statistics=1
10.118 -
10.119 -# Transport features for VIP users, all features are enabled by default.
10.120 -[vip-features]
10.121 -#filetransfer=1
10.122 -#avatars=1
10.123 -#chatstates=1
10.124 -
10.125 -[logging]
10.126 -# log file, needs to be unique for each spectrum instance
10.127 -log_file=/var/log/spectrum/$protocol.log
10.128 -
10.129 -# log areas
10.130 -# combination of: xml, purple
10.131 -log_areas=xml;purple
10.132 -
10.133 -[database]
10.134 -# mysql or sqlite
10.135 -type=sqlite
10.136 -
10.137 -# hostname (not needed for sqlite)
10.138 -#host=localhost
10.139 -
10.140 -# username (not needed for sqlite)
10.141 -#user=user
10.142 -
10.143 -# password (not needed for sqlite)
10.144 -#password=password
10.145 -# sqlite: set path to database file here
10.146 -# mysql: set to name of database
10.147 -database=/var/lib/spectrum/$protocol/database/$protocol.sqlite
10.148 -# table prefix for multiple transport instances sharing the same database
10.149 -#prefix=$protocol_
10.150 -
10.151 -[purple]
10.152 -# avatar, vcard, roster storage
10.153 -# needs to be unique for each spectrum instance
10.154 -userdir=/var/lib/spectrum/$protocol/userdir
10.155 -
11.1 --- a/net-im/spectrum/spectrum-1.4.6.ebuild Tue Jan 11 14:21:27 2011 +0100
11.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000
11.3 @@ -1,107 +0,0 @@
11.4 -# Copyright 1999-2010 Gentoo Foundation
11.5 -# Distributed under the terms of the GNU General Public License v2
11.6 -# $Header: $
11.7 -EAPI=2
11.8 -
11.9 -inherit cmake-utils
11.10 -
11.11 -DESCRIPTION="Spectrum is an XMPP transport/gateway"
11.12 -HOMEPAGE="http://spectrum.im"
11.13 -
11.14 -SRC_URI="http://spectrum.im/attachments/download/34/spectrum-${PV}.tar.gz"
11.15 -
11.16 -LICENSE="GPL-2"
11.17 -SLOT="0"
11.18 -KEYWORDS="~amd64 ~x86"
11.19 -
11.20 -IUSE="mysql sqlite symlinks tools"
11.21 -
11.22 -RDEPEND=">=dev-libs/poco-1.3.3[mysql?,sqlite?]
11.23 - >=net-im/pidgin-2.6.0
11.24 - >=net-libs/gloox-1.0
11.25 - dev-python/xmpppy"
11.26 -DEPEND="${RDEPEND}
11.27 - sys-devel/gettext
11.28 - dev-util/cmake"
11.29 -
11.30 -pkg_setup() {
11.31 - if ! ( use sqlite || use mysql ); then
11.32 - ewarn "No database use flag set!"
11.33 - ewarn "You need to enable the mysql or sqlite use flag!"
11.34 - die
11.35 - fi
11.36 -}
11.37 -src_unpack() {
11.38 - unpack ${A}
11.39 -}
11.40 -
11.41 -src_install () {
11.42 - cmake-utils_src_install
11.43 -
11.44 - # Install transports with seperate config files (default).
11.45 - # If USE="symlinks" is set, install one config file with symlinks to all transports.
11.46 - if ! use symlinks ; then
11.47 - insinto /etc/spectrum
11.48 - for protocol in aim facebook gg icq irc msn msn_pecan myspace qq simple sipe twitter xmpp yahoo; do
11.49 - sed -e 's,S2P,'${protocol}',g' "${FILESDIR}/spectrum.cfg" > "${WORKDIR}/${protocol}.cfg" || die
11.50 - doins "${WORKDIR}/${protocol}.cfg" || die
11.51 -
11.52 - sed -e 's,S2P,'${protocol}',g' "${FILESDIR}/spectrum.initd" > "${WORKDIR}/spectrum.initd.${protocol}" || die
11.53 - newinitd "${WORKDIR}/spectrum.initd.${protocol}" "spectrum.${protocol}" || die
11.54 -
11.55 - sed -e 's,S2P,'${protocol}',g' "${FILESDIR}/spectrum.confd" > "${WORKDIR}/spectrum.confd.${protocol}" || die
11.56 - newconfd "${WORKDIR}/spectrum.confd.${protocol}" "spectrum.${protocol}" || die
11.57 - done
11.58 - else
11.59 - insinto /etc/spectrum
11.60 - newins "${FILESDIR}/spectrum.symlink.cfg" "spectrum.cfg" || die
11.61 - port=5437
11.62 - for protocol in aim facebook gg icq irc msn msn_pecan myspace qq simple sipe twitter xmpp yahoo; do
11.63 - dosym "${IMAGE}/etc/spectrum/spectrum.cfg" "${IMAGE}/etc/spectrum/${protocol}:${port}.cfg" || die
11.64 - port=$[${port}+1]
11.65 -
11.66 - sed -e 's,S2P,'${protocol}',g' "${FILESDIR}/spectrum.initd" > "${WORKDIR}/spectrum.initd.${protocol}" || die
11.67 - newinitd "${WORKDIR}/spectrum.initd.${protocol}" "spectrum.${protocol}" || die
11.68 -
11.69 - sed -e 's,S2P,'${protocol}',g' "${FILESDIR}/spectrum.confd" > "${WORKDIR}/spectrum.confd.${protocol}" || die
11.70 - sed -e 's,${protocol}.cfg,'${protocol}:${port}',g' "${FILESDIR}/spectrum.confd" > "${WORKDIR}/spectrum.confd.${protocol}"
11.71 - newconfd "${WORKDIR}/spectrum.confd.${protocol}" "spectrum.${protocol}" || die
11.72 - done
11.73 - fi
11.74 -
11.75 - # Directories
11.76 - dodir "${IMAGE}/var/lib/spectrum" || die
11.77 - dodir "${IMAGE}/var/log/spectrum" || die
11.78 - dodir "${IMAGE}/var/run/spectrum" || die
11.79 -
11.80 - # Directories for each transport
11.81 - for protocol in aim facebook gg icq irc msn msn_pecan myspace qq simple sipe twitter xmpp yahoo; do
11.82 - dodir "${IMAGE}/var/lib/spectrum/$protocol/database" || die
11.83 - dodir "${IMAGE}/var/lib/spectrum/$protocol/userdir" || die
11.84 - dodir "${IMAGE}/var/lib/spectrum/$protocol/filetransfer_cache" || die
11.85 - done
11.86 -
11.87 - # Install mysql schema
11.88 - if use mysql; then
11.89 - insinto "${IMAGE}/usr/share/spectrum/schemas"
11.90 - doins schemas/* || die
11.91 - fi
11.92 -
11.93 - # Install misc tools
11.94 - if use tools; then
11.95 - insinto "${IMAGE}/usr/share/spectrum/tools"
11.96 - doins tools/* || die
11.97 - fi
11.98 -}
11.99 -
11.100 -pkg_postinst() {
11.101 - # Set correct rights
11.102 - chown jabber:jabber -R "${IMAGE}/etc/spectrum" || die
11.103 - chown jabber:jabber -R "${IMAGE}/var/lib/spectrum" || die
11.104 - chown jabber:jabber -R "${IMAGE}/var/log/spectrum" || die
11.105 - chown jabber:jabber -R "${IMAGE}/var/run/spectrum" || die
11.106 - chmod 750 "${IMAGE}/etc/spectrum" || die
11.107 - chmod 750 "${IMAGE}/var/lib/spectrum" || die
11.108 - chmod 750 "${IMAGE}/var/log/spectrum" || die
11.109 - chmod 750 "${IMAGE}/var/run/spectrum" || die
11.110 -}
12.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000
12.2 +++ b/net-im/spectrum/spectrum-1.4.7.ebuild Sun Feb 06 23:16:26 2011 +0100
12.3 @@ -0,0 +1,130 @@
12.4 +# Copyright 1999-2010 Gentoo Foundation
12.5 +# Distributed under the terms of the GNU General Public License v2
12.6 +# $Header: $
12.7 +EAPI=2
12.8 +
12.9 +inherit cmake-utils
12.10 +
12.11 +DESCRIPTION="Spectrum is an XMPP transport/gateway"
12.12 +HOMEPAGE="http://spectrum.im"
12.13 +
12.14 +SRC_URI="http://spectrum.im/attachments/download/37/spectrum-${PV}.tar.gz"
12.15 +
12.16 +LICENSE="GPL-2"
12.17 +SLOT="0"
12.18 +KEYWORDS="~amd64 ~x86"
12.19 +
12.20 +IUSE="mysql sqlite symlinks tools staticport"
12.21 +
12.22 +RDEPEND=">=dev-libs/poco-1.3.3[mysql?,sqlite?]
12.23 + media-gfx/imagemagick[cxx]
12.24 + >=net-im/pidgin-2.6.0
12.25 + >=net-libs/gloox-1.0
12.26 + dev-python/xmpppy"
12.27 +DEPEND="${RDEPEND}
12.28 + sys-devel/gettext
12.29 + dev-util/cmake"
12.30 +
12.31 +PROTOCOL_LIST="aim facebook gg icq irc msn msn_pecan myspace qq simple sipe twitter xmpp yahoo"
12.32 +
12.33 +pkg_setup() {
12.34 + if ! ( use sqlite || use mysql ); then
12.35 + ewarn "No database use flag set!"
12.36 + ewarn "You need to enable the mysql or sqlite use flag!"
12.37 + die
12.38 + fi
12.39 +}
12.40 +
12.41 +src_install () {
12.42 + cmake-utils_src_install
12.43 +
12.44 + # Install transports with seperate config files (default).
12.45 + # If USE="symlinks" is set, install one config file with symlinks to all transports.
12.46 +
12.47 + port=5347
12.48 +
12.49 + # prepare config for mysql or just copy
12.50 + cp "${FILESDIR}/spectrum.cfg" "${WORKDIR}/spectrum.cfg"
12.51 +
12.52 + if use mysql ; then
12.53 + sed -e 's,^\(type\)=sqlite$,\1=mysql,' \
12.54 + -e 's,^#\(host=localhost\)$,\1,' \
12.55 + -e 's,^#\(user=user\)$,\1,' \
12.56 + -e 's,^#\(password=password\)$,\1,' \
12.57 + -e 's,^\(database=.*\),#\1,' \
12.58 + -e 's,^#\(prefix=.*\),\1,' \
12.59 + -i "${WORKDIR}/spectrum.cfg" || die
12.60 + fi
12.61 +
12.62 + # install shared-config when using symlinks
12.63 + if use symlinks; then
12.64 + insinto /etc/spectrum
12.65 + newins "${WORKDIR}"/spectrum.cfg spectrum-shared-conf || die
12.66 + fi
12.67 +
12.68 + # install protocol-specific configs or symlinks
12.69 + insinto /etc/spectrum
12.70 + for protocol in ${PROTOCOL_LIST}; do
12.71 + if use symlinks; then
12.72 + dosym spectrum-shared-conf "/etc/spectrum/${protocol}:${port}.cfg" || die
12.73 + sed -e 's,PROTOCOL,'${protocol}:${port}',g' \
12.74 + "${FILESDIR}"/spectrum.confd > "${WORKDIR}"/spectrum.confd
12.75 + else
12.76 + sed -e 's,\$filename:protocol,'${protocol}',g' \
12.77 + -e 's,\$filename:port,'${port}',g' \
12.78 + "${WORKDIR}"/spectrum.cfg > "${WORKDIR}/${protocol}.cfg" || die
12.79 + sed -e 's,PROTOCOL,'${protocol}',g' \
12.80 + "${FILESDIR}"/spectrum.confd > "${WORKDIR}"/spectrum.confd
12.81 + doins "${WORKDIR}/${protocol}.cfg" || die
12.82 + fi
12.83 +
12.84 + # install prepared confd
12.85 + newconfd "${WORKDIR}"/spectrum.confd spectrum.${protocol} || die
12.86 +
12.87 + if ! use staticport; then
12.88 + port=$[${port}+1]
12.89 + fi
12.90 + done
12.91 +
12.92 + # Install init files
12.93 + newinitd "${FILESDIR}"/spectrum.initd spectrum || die
12.94 + for protocol in ${PROTOCOL_LIST}; do
12.95 + dosym spectrum /etc/init.d/spectrum."${protocol}"
12.96 + done
12.97 +
12.98 + # Directories
12.99 + dodir "/var/lib/spectrum" || die
12.100 + dodir "/var/log/spectrum" || die
12.101 + dodir "/var/run/spectrum" || die
12.102 +
12.103 + # Directories for each transport
12.104 + for protocol in ${PROTOCOL_LIST}; do
12.105 + dodir "/var/lib/spectrum/$protocol/database" || die
12.106 + dodir "/var/lib/spectrum/$protocol/userdir" || die
12.107 + dodir "/var/lib/spectrum/$protocol/filetransfer_cache" || die
12.108 + done
12.109 +
12.110 + # Install mysql schema
12.111 + if use mysql; then
12.112 + insinto "/usr/share/spectrum/schemas"
12.113 + doins schemas/* || die
12.114 + fi
12.115 +
12.116 + # Install misc tools
12.117 + if use tools; then
12.118 + insinto "/usr/share/spectrum/tools"
12.119 + doins tools/* || die
12.120 + fi
12.121 +}
12.122 +
12.123 +pkg_postinst() {
12.124 + # Set correct rights
12.125 + chown jabber:jabber -R "/etc/spectrum" || die
12.126 + chown jabber:jabber -R "/var/lib/spectrum" || die
12.127 + chown jabber:jabber -R "/var/log/spectrum" || die
12.128 + chown jabber:jabber -R "/var/run/spectrum" || die
12.129 + chmod 750 "/etc/spectrum" || die
12.130 + chmod 750 "/var/lib/spectrum" || die
12.131 + chmod 750 "/var/log/spectrum" || die
12.132 + chmod 750 "/var/run/spectrum" || die
12.133 +}