diff --git a/net-im/jabberd2/ChangeLog b/net-im/jabberd2/ChangeLog new file mode 100644 index 0000000..29c89ee --- /dev/null +++ b/net-im/jabberd2/ChangeLog @@ -0,0 +1,8 @@ +*jabberd2-2.3.6 (06 Aug 2016) + + 06 Aug 2016; Manuel Friedli +files/jabberd2-2.3.1.pamd, + +files/jabberd2-2.3.2.init, +files/jabberd2-2.3.2.logrotate, + +files/jabberd2-2.3.4-optimization.patch, +jabberd2-2.3.6.ebuild, + +metadata.xml: + net-im/jabberd2: added ebuild for version 2.3.6, which is missing in the + official tree diff --git a/net-im/jabberd2/Manifest b/net-im/jabberd2/Manifest new file mode 100644 index 0000000..1373287 --- /dev/null +++ b/net-im/jabberd2/Manifest @@ -0,0 +1,9 @@ +AUX jabberd2-2.3.1.pamd 158 SHA256 eba4b5cc68b3dd327cfa1afdadbe5adf6d9383f4c79c7661169a4339e40b9a7b SHA512 a52bec9577f028f1141002d0ffaaf11615699a67a7b3677774d7e8aa6595c8291cb6ebcdc0f874e54f700e3b437ae05e05b8d7c8c717dee15cb7d908a954b979 WHIRLPOOL 2289538542300efe78a261285359c6e5ad9151cc01123e3c5579cc72393ce94308d713e38d73bc418c5bc9d7f7a200469568b7b3187b576b3efa8efa19dda919 +AUX jabberd2-2.3.2.init 1897 SHA256 a04c000fb56506abadad9df488368c09d34743414336a37d2596b640381aeff6 SHA512 eb91268d9edcfcd3a5610bdd4b9b9abe93f1092bb2bc4a76f47bad29ec1c2afbc74b029115c5c111d8c9a4fbab139366b050a9bee78a870b4e12cbed8511b39b WHIRLPOOL 8695d980c2f2af483815ff8fb2c7c7dbff6cdfb06e31a52c2bc027aa6ef8553fcc513205b2fc7ce5e1cacaffb1a56320303e1dd2853d907e7ba5b41ba7c797df +AUX jabberd2-2.3.2.logrotate 197 SHA256 bca314e2555e113ee0916d33060c27332381cc3cd633e00e3d092b1f7b0bd149 SHA512 1e3d74612dd08df2014af2ae0f0681e78c9902644dfbf37100369591803f2cf757d27967f7e9c99d3503cff8480ace7ce4b14303028d25866ebbd4ecf882d7c0 WHIRLPOOL c74129c39e571b811212e7d08d94c461c327f58510d9efa7cd1c96888524730024330c1c46accaafa7888b75d4af98302a91c35a4543928d0fb5e7eacebe6f2b +AUX jabberd2-2.3.4-optimization.patch 627 SHA256 8a10c307846425d0ca8f987c8f46c1559f57d7fb4a448744a93637ece01577bd SHA512 2f38d9eb597f7bea21082a56eee1e28474cc66b56d5dd7de45853c98a5cdecbe7d1e5ff951b6b1395f7c27a9a2ec13c4552031b711d882fbd946338116b7d83e WHIRLPOOL aa67b5f0cbb50a81b789ced5efd0f22a2b199a4d51d1c242cde17f8317b1c2fe00d54ba0b73654bc0f7dd4fd027df83646afe5401a7f665d174faae163151be5 +AUX jabberd2-2.3.6-configure.patch 593 SHA256 39d3cdbcf57ff2247c4ca21cc130f56173a7f0db9f37f71048cae4cd9a043e15 SHA512 15e12903af39209e94b2ee42b802f93d5dc9f5d5f6dc646b65402d4445e046df02fe8150be675024a2b7f4d8f21f2cd2af1976a28c81d429be2e91c3845a327a WHIRLPOOL ef49fd6dd2158804bbd7bb93994089d2f301878ba7dcfa2d93ad77e6c4cbaa52c26e61f6191013b911ca8852f6e3d64faea2fea248dc5ddbcf5f0808cd759faf +DIST jabberd-2.3.6.tar.xz 1503864 SHA256 33cbf58135f856f5e6e6a7769623fedfda21f0c5f88b3b687a22e04ad915c051 SHA512 c5efa443865028874e1c1f15937064edef4c1699afb14b55963e3cd86930a67dffed7830ab1ae77522cbf797ef9ab89d044ccb28ac65904ffa7e79dee155e8aa WHIRLPOOL 43f6c02d67c792fa1391cc87e7f4d60b6fe7089d8dc7796d54e0e25f1815ad29921eeb97aeb554b015261b7e5f83cd33d076abb61e60ff9fe9441971cb85bdcb +EBUILD jabberd2-2.3.6.ebuild 5270 SHA256 59d85fa7b59a21011e080f475ccb69bfdb0aed4b86120e64e746c03e870674db SHA512 091ed958d3e0b0e663965ae7200054f8dc3fcf8665b9232edf04c34b42081f81f80d3a13f18965d74da9ed578a96439f69468518f298fd5c555de8b5522c5274 WHIRLPOOL ddc22f6f4019a5759f8182e3524fdd14bf36083a0537bc7b3bee576845c0ccf92c424e85a806cdc85a7e3f5b5a01d9abd2e5cd26c1744044e231bf44797a8513 +MISC ChangeLog 350 SHA256 c54b729fa89c6fc316d6e82cd9c8caf39997300048a4a220faf41d314495b5fc SHA512 db9aec023709ad964f7ea1f739719ecc7ea61242a7bf5e311f1827814d85460fbcc3c92b4801e97d5ca3ada26182801a96d55310ea2a2d3e83a47b80a07aab4c WHIRLPOOL ae03b9ac67ed223b7b5315972eee4663f7d1918578075905f89a384a1325b4f46297cc3a0b8b902e23a539b37332f3c69ff23bebccb787b143d43ef207af6c57 +MISC metadata.xml 579 SHA256 70e01bf1f9b621d35d36cfd78ed7f99a214eadeca0dd5031adc86aff077b2023 SHA512 ebaf4fd332d1dede7f0e68e135e14c9e464b04ac22a11af32a43af91af2ec17836165d810e6fe4cab876ea33f120ef00fc9392da2c80b90813e7857c946abcda WHIRLPOOL 84043f101020e6bea68efe9be27c5d08fff6d0f06116c0643ce27b36a146068dadbb235aebe7a2d377dd9c269ece471ab4080fc1589263b315c04941c140dcf6 diff --git a/net-im/jabberd2/files/jabberd2-2.3.1.pamd b/net-im/jabberd2/files/jabberd2-2.3.1.pamd new file mode 100644 index 0000000..2c5a534 --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.1.pamd @@ -0,0 +1,6 @@ +#%PAM-1.0 + +auth required pam_nologin.so +auth include system-auth +account include system-auth +session include system-auth diff --git a/net-im/jabberd2/files/jabberd2-2.3.2.init b/net-im/jabberd2/files/jabberd2-2.3.2.init new file mode 100644 index 0000000..cf650fd --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.2.init @@ -0,0 +1,97 @@ +#!/sbin/openrc-run +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +extra_commands="reload" + +depend() { + need net + use mysql postgresql slapd + provide jabber-server +} + +stopJabberServices() { + + eindent + for pidfile in /var/run/jabber/*.pid; do + if [ -f "${pidfile}" ]; then + service=$(basename ${pidfile} .pid) + ebegin "Stopping ${service}" + start-stop-daemon \ + --stop \ + --pidfile ${pidfile} + eend $? + fi + done + eoutdent + +} + +start_pre() { + checkpath -d -o jabber /var/run/jabber +} + +start() { + + einfo "Starting Jabber Server ..." + local services executable cfgfile pidfile + services=$(grep -v ^# /etc/jabber/jabberd.cfg | grep '..*' | awk '{print $1 ":" $2}') + eindent + for service in ${services}; do + + cfgfile=$(echo ${service} | cut -d ':' -f 2) + service=$(echo ${service} | cut -d ':' -f 1) + if [ ! -f "${cfgfile}" ]; then + if [ -f "/etc/jabber/${service}.xml" ]; then + cfgfile="/etc/jabber/${service}.xml" + else + eerror "Can't find: ${cfgfile} or default /etc/jabber/${service}.xml" + stopJabberServices + return 1 + fi + fi + + executable=/usr/bin/${service} + + if [ ! -f "${executable}" ]; then + eerror "Can't find executable: ${executable}" + stopJabberServices + return 1 + fi + + ebegin "Starting ${service} (${cfgfile})" + pidfile="$(grep -v ^# ${cfgfile} | grep '' | sed 's#<.\?pidfile>##g')" + start-stop-daemon \ + --background \ + --start \ + --user jabber:jabber \ + --exec /usr/bin/${service} \ + --pid ${pidfile} \ + -- -c ${cfgfile} + eend $? + + done + eoutdent + +} + +reload() { + eindent + for pidfile in /var/run/jabber/*.pid; do + if [ -f "${pidfile}" ]; then + service=$(basename ${pidfile} .pid) + ebegin "Reloading ${service}" + kill -HUP $(cat ${pidfile}) + eend $? + fi + done + eoutdent +} + +stop() { + + einfo "Stopping Jabber Server" + stopJabberServices + +} diff --git a/net-im/jabberd2/files/jabberd2-2.3.2.logrotate b/net-im/jabberd2/files/jabberd2-2.3.2.logrotate new file mode 100644 index 0000000..fcec0f7 --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.2.logrotate @@ -0,0 +1,8 @@ +/var/log/jabber/c2s.log /var/log/jabber/s2s.log /var/log/jabber/sm.log /var/log/jabber/router.log { + su jabber jabber + sharedscripts + missingok + postrotate + /etc/init.d/jabberd reload + endscript +} diff --git a/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch b/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch new file mode 100644 index 0000000..4808162 --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.4-optimization.patch @@ -0,0 +1,21 @@ +Re-allow the use of O3/Os, since it seems to have been an old compiler +bug. + +See https://github.com/jabberd2/jabberd2/issues/34 + +--- configure.ac ++++ configure.ac +@@ -23,13 +23,6 @@ + LIBS="$LIBS $lt_cv_dlopen_libs" + fi + +-# check for optimisation level +-AC_MSG_CHECKING([CFLAGS optimization level]) +-[if echo $CFLAGS | grep '.*-O[3s].*' >/dev/null 2>&1; then] +- AC_MSG_ERROR([maximum allowed optimization level is -O2]) +-fi +-AC_MSG_RESULT([fine]) +- + # extra paths + AC_ARG_WITH([extra_include_path], AC_HELP_STRING([--with-extra-include-path], + [use additional include paths]), diff --git a/net-im/jabberd2/files/jabberd2-2.3.6-configure.patch b/net-im/jabberd2/files/jabberd2-2.3.6-configure.patch new file mode 100644 index 0000000..e4adb6a --- /dev/null +++ b/net-im/jabberd2/files/jabberd2-2.3.6-configure.patch @@ -0,0 +1,15 @@ +diff --git a/configure.ac b/configure.ac +index 4f52c86..d481583 100644 +--- a/configure.ac ++++ b/configure.ac +@@ -80,10 +80,6 @@ if test "x-$want_mio_debug" = "x-yes" ; then + AC_DEFINE(MIO_DEBUG,1,[Define to 1 if you want to enable managed IO debug output.]) + fi + +-# Colorized build output +-AX_CHECK_COMPILE_FLAG([-fdiagnostics-color], [CFLAGS="${CFLAGS} -fdiagnostics-color"], +- [AX_CHECK_COMPILE_FLAG([-fcolor-diagnostics], [CFLAGS="${CFLAGS} -fcolor-diagnostics"])]) +- + # Two-step header checking. First check for headers which don't + # require any other headers. + AC_HEADER_DIRENT diff --git a/net-im/jabberd2/jabberd2-2.3.6.ebuild b/net-im/jabberd2/jabberd2-2.3.6.ebuild new file mode 100644 index 0000000..37f245f --- /dev/null +++ b/net-im/jabberd2/jabberd2-2.3.6.ebuild @@ -0,0 +1,181 @@ +# Copyright 1999-2016 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Id$ + +EAPI=5 + +inherit autotools db-use eutils flag-o-matic pam + +DESCRIPTION="Open Source Jabber Server" +HOMEPAGE="http://jabberd2.org" +SRC_URI="https://github.com/jabberd2/jabberd2/releases/download/jabberd-${PV}/jabberd-${PV}.tar.xz" + +LICENSE="GPL-2" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~sparc ~x86 ~x86-fbsd" +IUSE="berkdb debug experimental ldap libressl memdebug mysql pam postgres sqlite ssl test websocket zlib" +REQUIRED_USE="memdebug? ( debug )" + +# broken +RESTRICT="test" + +DEPEND="dev-libs/expat + net-libs/udns + net-dns/libidn + virtual/gsasl + berkdb? ( >=sys-libs/db-4.1.25:= ) + ldap? ( net-nds/openldap ) + mysql? ( + virtual/libmysqlclient:= + virtual/mysql:= + ) + pam? ( virtual/pam ) + postgres? ( dev-db/postgresql:= ) + ssl? ( + !libressl? ( >=dev-libs/openssl-1.0.1:0[-bindist] ) + libressl? ( dev-libs/libressl:= ) + ) + sqlite? ( dev-db/sqlite:3 ) + websocket? ( net-libs/http-parser:= ) + zlib? ( sys-libs/zlib )" +RDEPEND="${DEPEND} + >=net-im/jabber-base-0.01" +DEPEND="${DEPEND} + app-arch/xz-utils + virtual/pkgconfig + test? ( dev-libs/check )" + +DOCS=( AUTHORS README ) + +S=${WORKDIR}/jabberd-${PV} + +pkg_pretend() { + if is-flagq '-O[3s]' ; then + ewarn "O3/Os compiler flags have been known to cause problems" + ewarn "with old gcc version. Be aware that this could break" + ewarn "port binding. Make sure to test this." + ewarn "See https://github.com/jabberd2/jabberd2/issues/34" + fi +} + +src_prepare() { + # Fix some default directory locations + sed -i \ + -e 's,@localstatedir@/@package@/pid/,/var/run/@package@/,g' \ + -e 's,@localstatedir@/@package@/run/pbx,/var/run/@package@/pbx,g' \ + -e 's,@localstatedir@/@package@/log/,/var/log/@package@/,g' \ + -e 's,@localstatedir@/lib/jabberd2/fs,@localstatedir@/@package@/fs,g' \ + -e 's,@localstatedir@,/var/spool,g' \ + -e 's,@package@,jabber,g' \ + etc/{sm,router,c2s,s2s}.xml.dist.in || die "fixing default directory locations failed!" + + # If the package wasn't merged with sqlite then default to use berkdb + use sqlite || + sed -i \ + -e 's,<\(module\|driver\)>sqlite<\/\1>,<\1>db,g' \ + etc/{c2s,sm}.xml.dist.in || die "setting berkdb as default failed!" + + # avoid file collision with x11-misc/screen-message wrt #453994 + sed -i \ + -e 's/@jabberd_router_bin@/jabberd2-router/' \ + -e 's/@jabberd_c2s_bin@/jabberd2-c2s/' \ + -e 's/@jabberd_s2s_bin@/jabberd2-s2s/' \ + -e 's/@jabberd_sm_bin@/jabberd2-sm/' \ + etc/jabberd*.in || die "fixing file collisions failed!" + + # rename pid files wrt #241472 + sed -i \ + -e '/pidfile/s/${id}\.pid/jabberd2-c2s\.pid/' \ + etc/c2s.xml.dist.in || die + sed -i \ + -e '/pidfile/s/${id}\.pid/jabberd2-router\.pid/' \ + etc/router.xml.dist.in || die + sed -i \ + -e '/pidfile/s/${id}\.pid/jabberd2-s2s\.pid/' \ + etc/s2s.xml.dist.in || die + sed -i \ + -e '/pidfile/s/${id}\.pid/jabberd2-sm\.pid/' \ + etc/sm.xml.dist.in || die + + epatch "${FILESDIR}"/${PN}-2.3.4-optimization.patch \ + "${FILESDIR}"/${P}-configure.patch + + eautoreconf +} + +src_configure() { + # --enable-pool-debug is currently broken + econf \ + --sysconfdir=/etc/jabber \ + $(usex debug "--enable-debug" "") \ + $(usex memdebug "--enable-nad-debug" "") \ + $(use_enable ssl) \ + $(use_enable mysql) \ + $(use_enable postgres pgsql) \ + $(use_enable sqlite) \ + $(use_enable berkdb db) \ + $(use_enable ldap) \ + $(use_enable pam) \ + --enable-pipe \ + --enable-anon \ + --enable-fs \ + $(use_enable websocket) \ + $(use_enable experimental) \ + $(use_enable test tests) \ + $(usex berkdb "--with-extra-include-path=$(db_includedir)" "") \ + $(use_with zlib) +} + +src_install() { + local i + + default + prune_libtool_files --modules + + keepdir /var/spool/jabber/{fs,db} + fowners jabber:jabber /usr/bin/{jabberd,router,sm,c2s,s2s} \ + /var/spool/jabber/{fs,db} + fperms 770 /var/spool/jabber/{fs,db} + fperms 750 /usr/bin/{jabberd,router,sm,c2s,s2s} + + # avoid file collision with x11-misc/screen-message wrt #453994 + for i in router sm c2s s2s ; do + einfo "renaming /usr/bin/${i} to /usr/bin/jabberd2-${i}" + mv "${ED%/}"/usr/bin/${i} "${ED%/}"/usr/bin/jabberd2-${i} || die + done + + newinitd "${FILESDIR}/${PN}-2.3.2.init" jabberd + newpamd "${FILESDIR}/${PN}-2.3.1.pamd" jabberd + insinto /etc/logrotate.d + newins "${FILESDIR}/${PN}-2.3.2.logrotate" jabberd + + docompress -x /usr/share/doc/${PF}/tools + docinto tools + dodoc tools/db-setup{.mysql,.pgsql,.sqlite} \ + tools/{migrate-jd14dir-2-sqlite.pl,pipe-auth.pl} + + # remove useless upstart files wrt #498900 + rm -rf "${ED%/}"/usr/etc +} + +pkg_postinst() { + if use pam; then + echo + ewarn 'Jabberd-2 PAM authentication requires your unix usernames to' + ewarn 'be in the form of "contactname@jabberdomain". This behavior' + ewarn 'is likely to change in future versions of jabberd-2. It may' + ewarn 'be advisable to avoid PAM authentication for the time being.' + echo + fi + + if use sqlite || use mysql || use postgres; then + echo + einfo "You will need to setup or update your database using the" + einfo "scripts in /usr/share/doc/${PF}/tools/" + echo + fi + + ewarn 'If you are upgrading from <=jabberd2-2.2.17 then you might have' + ewarn 'to update /etc/jabber/jabberd.cfg via etc-update because' + ewarn 'the binaries have been renamed to avoid file collisions!' +} diff --git a/net-im/jabberd2/metadata.xml b/net-im/jabberd2/metadata.xml new file mode 100644 index 0000000..1168644 --- /dev/null +++ b/net-im/jabberd2/metadata.xml @@ -0,0 +1,16 @@ + + + + + manuel@fritteli.ch + Manuel Friedli + + + Enable experimental features such as TLS Everywhere. + Enable nad and pool debug. Requires USE="debug" to be set. + Enable WebSocket support on C2S port. + + + jabberd2/jabberd2 + +