summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorHanno Böck <hanno@gentoo.org>2020-08-23 12:41:55 +0200
committerHanno Böck <hanno@gentoo.org>2020-08-23 12:41:55 +0200
commit6c9d3c1ddd8330358a28d93940c1f4d4afce1ce9 (patch)
tree77a6ef7c274a81163bade4d15f50520f61d9cf2a /net-im/ejabberd
parentmedia-sound/audacity: leaving -Daudacity_use_pch to default in 2.4.2-r1 (diff)
downloadgentoo-6c9d3c1ddd8330358a28d93940c1f4d4afce1ce9.tar.gz
gentoo-6c9d3c1ddd8330358a28d93940c1f4d4afce1ce9.tar.bz2
gentoo-6c9d3c1ddd8330358a28d93940c1f4d4afce1ce9.zip
net-im/ejabberd: remove old
Signed-off-by: Hanno Böck <hanno@gentoo.org> Package-Manager: Portage-3.0.4, Repoman-3.0.1
Diffstat (limited to 'net-im/ejabberd')
-rw-r--r--net-im/ejabberd/Manifest2
-rw-r--r--net-im/ejabberd/ejabberd-17.04-r2.ebuild331
-rw-r--r--net-im/ejabberd/ejabberd-20.03.ebuild292
-rw-r--r--net-im/ejabberd/files/ejabberd-17.04-0001-Don-t-configure-or-compile-deps.patch53
-rw-r--r--net-im/ejabberd/files/ejabberd-17.04-ejabberdctl.patch62
-rw-r--r--net-im/ejabberd/metadata.xml3
6 files changed, 0 insertions, 743 deletions
diff --git a/net-im/ejabberd/Manifest b/net-im/ejabberd/Manifest
index 42042e3e5ded..2c690be71df3 100644
--- a/net-im/ejabberd/Manifest
+++ b/net-im/ejabberd/Manifest
@@ -1,3 +1 @@
-DIST ejabberd-17.04.tar.gz 1690441 BLAKE2B 2d31f1f0a393c6531653a55021b9deb729357bb53e86e85b85796a65f505257bcf7a14b0d168af2d13a6820e1524e1164ea7f17797df23ae41d7a8379f9e2066 SHA512 03467434dba92bd1ff2f70d78aa8fcf86fc73cb52aaaa73e4947229e1d14225e7b0d0133c3da7c8efe4c9db13aab932f40f757be46b120d0f280f96d62c203d7
-DIST ejabberd-20.03.tar.gz 2006603 BLAKE2B 67fa7d86e6802f24e783e91a8cb498375ca615bf22422ebe8bf630eb721e50574f468cfe25271172ebdfdca0c1df24dc6dd7f96a289153a017c32eb82af06d82 SHA512 f3ab666d9ffa596386ef121161dc7eeedca85cb7f5d290ad0882cd9557ea4166467bce9c082bdb423f932b44999c8e887d6a386d53564febf360f306feda3952
DIST ejabberd-20.04.tar.gz 2022319 BLAKE2B 02ce782bc58a808f38dff58715204059c51762187abff7f5c77ff08eb13330b66485234eb2204c4336770d75303417ee74077466a07e701aa512158ff641a578 SHA512 7c478bbd73577e06f21e26804f4eb57deb52a0ebdd12e45034e810314cb73bb2ec60b55c6f266271eb45d5ebc135a39c498a29706d6d1f5087fd2b509a8844ca
diff --git a/net-im/ejabberd/ejabberd-17.04-r2.ebuild b/net-im/ejabberd/ejabberd-17.04-r2.ebuild
deleted file mode 100644
index 45ea0080663f..000000000000
--- a/net-im/ejabberd/ejabberd-17.04-r2.ebuild
+++ /dev/null
@@ -1,331 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit autotools eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="https://www.process-one.net/downloads/${PN}/${PV}/${P}.tgz
- -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="amd64 ~arm ~ia64 ~sparc x86"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql nls odbc pam postgres redis
- riak roster-gw sqlite zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: >=dev-erlang/meck-0.8.4
-# TODO: >=dev-erlang/moka-1.0.5b
-# TODO: )
-CDEPEND="
- >=dev-erlang/cache_tab-1.0.7
- >=dev-erlang/esip-1.0.11
- >=dev-erlang/fast_tls-1.0.11
- >=dev-erlang/fast_xml-1.1.21
- >=dev-erlang/fast_yaml-1.0.9
- >=dev-erlang/jiffy-0.14.8
- >=dev-erlang/lager-3.2.1
- >=dev-erlang/luerl-0.2
- >=dev-erlang/p1_oauth2-0.6.1
- >=dev-erlang/p1_utils-1.0.8
- >=dev-erlang/stringprep-1.0.8
- >=dev-erlang/stun-1.0.10
- >=dev-erlang/xmpp-1.1.9
- <dev-erlang/xmpp-1.2.0
- >=dev-lang/erlang-17.1[hipe?,odbc?,ssl]
- >=net-im/jabber-base-0.01
- ldap? ( =net-nds/openldap-2* )
- mysql? ( >=dev-erlang/p1_mysql-1.0.2 )
- nls? ( >=dev-erlang/iconv-1.0.4 )
- odbc? ( dev-db/unixODBC )
- pam? ( >=dev-erlang/epam-1.0.2 )
- postgres? ( >=dev-erlang/p1_pgsql-1.1.2 )
- redis? ( >=dev-erlang/eredis-1.0.8 )
- riak? (
- >=dev-erlang/hamcrest-0.1.0_p20150103
- >=dev-erlang/riakc-2.4.1
- )
- sqlite? ( >=dev-erlang/sqlite3-1.1.5 )
- zlib? ( >=dev-erlang/ezlib-1.0.2 )"
-DEPEND="${CDEPEND}
- >=sys-apps/gawk-4.1"
-RDEPEND="${CDEPEND}
- captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( README )
-PATCHES=( "${FILESDIR}/${P}-ejabberdctl.patch"
- "${FILESDIR}/${P}-0001-Don-t-configure-or-compile-deps.patch"
- "${FILESDIR}/${P}-0002-Dont-overwrite-service-file.patch" )
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificates.
-# - Correct PAM service name.
-adjust_config() {
- sed -e "s|\"/path/to/ssl.pem\"|\"${EJABBERD_CERT}\"|g" \
- -e "s|\"pamservicename\"|\"xmpp\"|" \
- -i "${S}/ejabberd.yml.example" \
- || die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
- sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
- -i "${S}/Makefile.in" \
- || die 'failed to set ejabberd path in Makefile.in'
- sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
- -i "${S}/ejabberdctl.template" \
- || die 'failed to set ejabberd path in ejabberdctl.template'
- sed -e 's|\(captcha_cmd:[[:space:]]*"\).\+"|\1'$(get_ejabberd_path)'/priv/bin/captcha.sh"|' \
- -i "${S}/ejabberd.yml.example" \
- || die 'failed to correct path to captcha.sh in example config'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
- local epam_wrapper_src="$1"
- local epam_wrapper_dst="${S}/epam-wrapper"
-
- [[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
- sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
- "${epam_wrapper_src}" >"${epam_wrapper_dst}" \
- || die 'failed to install epam-wrapper'
-}
-
-# Disable mod_irc in example configuration file.
-disable_mod_irc() {
- local needs_iconv='needs dev-erlang/iconv (+nls USE flag)'
- sed -r \
- -e "s@^(\s*)(mod_irc\s*:.*$)@\1## \2 # ${needs_iconv}@" \
- -i "${S}/ejabberd.yml.example" \
- || die 'failed to modify example config'
-}
-
-# Check if there already exists a certificate.
-ejabberd_cert_exists() {
- local cert
-
- for cert in $(gawk -- \
- 'match($0, /^[[:space:]]*certfile: "([^"]+)"/, m) {print m[1];}' \
- "${EROOT%/}${JABBER_ETC}/ejabberd.yml"); do
- [[ -f ${cert} ]] && return 0
- done
-
- return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
- install_cert "${EJABBERD_CERT%.*}"
- chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
- chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-#
-# This is the path ./configure script Base for this path is path set in
-# ./configure script which is /usr/lib by default. If libdir is explicitely set
-# to something else than this should be adjusted here as well.
-get_ejabberd_path() {
- echo "/usr/$(get_libdir)/${P}"
-}
-
-# Check whether mod_irc is enabled in ejabberd configuration on target system.
-is_mod_irc_enabled() {
- egrep '^(\s*)(mod_irc\s*:.*$)' \
- "${EROOT%/}${JABBER_ETC}/ejabberd.yml"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
- sed -r \
- -e 's!@ctlscriptpath@!/usr/sbin!g' \
- -e 's!(User|Group)=(.*)!\1=jabber!' \
- "${PN}.service.template" >"${PN}.service" \
- || die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
- sed -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 "${S}/Makefile.in" \
- || die 'failed to set paths in Makefile.in'
- sed -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 "${S}/ejabberdctl.template" \
- || die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
- gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
- if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
- print $0;
- } else {
- next;
- }
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-pkg_setup() {
- if use pam; then
- einfo "Adding jabber user to epam group to allow ejabberd to use PAM" \
- "authentication"
- # See
- # <https://docs.ejabberd.im/admin/configuration/#pam-authentication>.
- # epam binary is installed by dev-erlang/epam package, therefore SUID
- # is set by that package. Instead of jabber group it uses epam group,
- # therefore we need to add jabber user to epam group.
- usermod -a -G epam jabber || die
- fi
-}
-
-src_prepare() {
- default
-
- rebar_remove_deps
- correct_ejabberd_paths
- set_jabberbase_paths
- make_ejabberd_service
- skip_docs
- adjust_config
- use nls || disable_mod_irc
- customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-
- rebar_fix_include_path fast_xml
- rebar_fix_include_path p1_utils
- rebar_fix_include_path xmpp
-
- # Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
- # rather than its parent which is default. That way ejabberd directory
- # takes precedence is module lookup.
- local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
- sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
- -i "${S}/ejabberdctl.template" \
- || die 'failed to set ERL_LIBS in ejabberdctl.template'
-
- # https://github.com/processone/ejabberd/commit/58110e4bc152100078dbc0cb66d4a5257ae645e0,
- # bug #651932, drop in next version
- sed -i -e 's/REQUIRE_ERLANG_MAX="9.0.0 (No Max)"/REQUIRE_ERLANG_MAX="100.0.0 (No Max)"/' configure.ac || die
- eautoreconf
-}
-
-src_configure() {
- econf \
- --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
- --enable-user=jabber \
- $(use_enable debug) \
- $(use_enable full-xml) \
- $(use_enable hipe) \
- $(use_enable mssql) \
- $(use_enable mysql) \
- $(use_enable nls iconv) \
- $(use_enable odbc) \
- $(use_enable pam) \
- $(use_enable postgres pgsql) \
- $(use_enable redis) \
- $(use_enable riak) \
- $(use_enable roster-gw roster-gateway-workaround) \
- $(use_enable sqlite) \
- $(use_enable zlib)
-}
-
-src_compile() {
- emake REBAR='rebar -v' src
-}
-
-src_install() {
- default
-
- if use pam; then
- local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
- pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
- into "$(get_ejabberd_path)/priv"
- newbin epam-wrapper epam
- fi
-
- newconfd "${FILESDIR}/${PN}.confd" "${PN}"
- newinitd "${FILESDIR}/${PN}.initd" "${PN}"
- systemd_dounit "${PN}.service"
- systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
- insinto /etc/logrotate.d
- newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_postinst() {
- if [[ ! ${REPLACING_VERSIONS} ]]; then
- echo
- elog "For configuration instructions, please see"
- elog " https://docs.ejabberd.im/"
- echo
- if [[ " ${REPLACING_VERSIONS} " =~ \ 2\. ]]; then
- ewarn "If you have used pubsub in ejabberd-2.* you may encounter issues after"
- ewarn "migration to ${PV}. pubsub data may not be migrated automatically and"
- ewarn "you may need to run migration script manually, see:"
- ewarn
- ewarn " https://github.com/processone/ejabberd/issues/479#issuecomment-124497456"
- ewarn
- ewarn "In case you don't care about all stored moods, activities, geoinfo and you"
- ewarn "know you don't store in pubsub anything important, you can just remove"
- ewarn "pubsub tables:"
- ewarn
- ewarn " rm ${EROOT%/}${JABBER_SPOOL}/pubsub_*"
- ewarn
- ewarn "See also: https://bugs.gentoo.org/show_bug.cgi?id=588244"
- echo
- fi
- elif [[ -f ${EROOT}etc/jabber/ejabberd.cfg ]]; then
- elog "Ejabberd now defaults to using a YAML format for its config file."
- elog "The old ejabberd.cfg file can be converted using the following instructions:"
- echo
- elog "1. Make sure all processes related to the previous version of ejabberd aren't"
- elog " running. Usually this just means the ejabberd and epmd daemons and possibly"
- elog " the pam-related process (epam) if pam support is enabled."
- elog "2. Run \`ejabberdctl start\` with sufficient permissions. Note that this can"
- elog " fail to start ejabberd properly for various reasons. Check ejabberd's main"
- elog " log file at /var/log/jabber/ejabberd.log to confirm it started successfully."
- elog "3. Run"
- elog " \`ejabberdctl convert_to_yaml /etc/jabber/ejabberd.cfg /etc/jabber/ejabberd.yml.new\`"
- elog " with sufficient permissions, edit and rename /etc/jabber/ejabberd.yml.new to"
- elog " /etc/jabber/ejabberd.yml, and finally restart ejabberd with the new config"
- elog " file."
- echo
- fi
-
- if ! ejabberd_cert_exists; then
- ejabberd_cert_install
- fi
-
- if ! use nls && is_mod_irc_enabled; then
- ewarn "nls support (dev-erlang/iconv) is required by mod_irc. Either rebuild ejabberd"
- ewarn "with nls enabled or disable mod_irc in ${EROOT%/}${JABBER_ETC}/ejabberd.yml."
- fi
-}
diff --git a/net-im/ejabberd/ejabberd-20.03.ebuild b/net-im/ejabberd/ejabberd-20.03.ebuild
deleted file mode 100644
index 7ed076748bb0..000000000000
--- a/net-im/ejabberd/ejabberd-20.03.ebuild
+++ /dev/null
@@ -1,292 +0,0 @@
-# Copyright 1999-2020 Gentoo Authors
-# Distributed under the terms of the GNU General Public License v2
-
-EAPI=6
-
-SSL_CERT_MANDATORY=1
-
-inherit eutils pam rebar ssl-cert systemd
-
-DESCRIPTION="Robust, scalable and extensible XMPP server"
-HOMEPAGE="https://www.ejabberd.im/ https://github.com/processone/ejabberd/"
-SRC_URI="https://static.process-one.net/${PN}/downloads/${PV}/${P}.tgz
- -> ${P}.tar.gz"
-
-LICENSE="GPL-2"
-SLOT="0"
-KEYWORDS="~amd64"
-REQUIRED_USE="mssql? ( odbc )"
-# TODO: Add 'tools' flag.
-IUSE="captcha debug full-xml hipe ldap mssql mysql odbc pam postgres redis
- roster-gw sip sqlite stun zlib"
-
-RESTRICT="test"
-
-# TODO: Add dependencies for 'tools' flag enabled.
-# TODO: tools? (
-# TODO: >=dev-erlang/luerl-0.3
-# TODO: )
-DEPEND=">=dev-lang/erlang-19.3[hipe?,odbc?,ssl]
- >=dev-erlang/cache_tab-1.0.22
- >=dev-erlang/eimp-1.0.14
- >=dev-erlang/fast_tls-1.1.4
- >=dev-erlang/fast_xml-1.1.39
- >=dev-erlang/fast_yaml-1.0.24
- >=dev-erlang/yconf-1.0.4
- >=dev-erlang/jiffy-1.0.1
- >=dev-erlang/jose-1.9.0
- >=dev-erlang/lager-3.6.10
- >=dev-erlang/p1_oauth2-0.6.6
- >=dev-erlang/p1_utils-1.0.18
- >=dev-erlang/stringprep-1.0.19
- >=dev-erlang/xmpp-1.4.5
- >=dev-erlang/pkix-1.0.5
- >=dev-erlang/mqtree-1.0.7
- >=dev-erlang/idna-6.0.0
- >=dev-erlang/p1_acme-1.0.5
- >=dev-erlang/base64url-1.0
- >=net-im/jabber-base-0.01
- ldap? ( =net-nds/openldap-2* )
- mysql? ( >=dev-erlang/p1_mysql-1.0.14 )
- odbc? ( dev-db/unixODBC )
- pam? ( >=dev-erlang/epam-1.0.7 )
- postgres? ( >=dev-erlang/p1_pgsql-1.1.9 )
- redis? ( >=dev-erlang/eredis-1.0.8 )
- sip? ( >=dev-erlang/esip-1.0.32 )
- sqlite? ( >=dev-erlang/sqlite3-1.1.6 )
- stun? ( >=dev-erlang/stun-1.0.31 )
- zlib? ( >=dev-erlang/ezlib-1.0.7 )"
-RDEPEND="${DEPEND}
- captcha? ( media-gfx/imagemagick[truetype,png] )"
-
-DOCS=( CHANGELOG.md README.md )
-PATCHES=( "${FILESDIR}/${PN}-19.08-ejabberdctl.patch"
- "${FILESDIR}/${PN}-17.04-0002-Dont-overwrite-service-file.patch")
-
-EJABBERD_CERT="${EPREFIX}/etc/ssl/ejabberd/server.pem"
-# Paths in net-im/jabber-base
-JABBER_ETC="${EPREFIX}/etc/jabber"
-JABBER_LOG="${EPREFIX}/var/log/jabber"
-JABBER_SPOOL="${EPREFIX}/var/spool/jabber"
-
-# Adjust example configuration file to Gentoo.
-# - Use our sample certificate.
-adjust_config() {
- sed -rne "/^#?\s+certfiles:/{p;a\ - ${EJABBERD_CERT}" -e ":a;n;/^#?\s+-/ba};p" \
- -i "${S}/ejabberd.yml.example" \
- || die 'failed to adjust example config'
- sed -re 's/^#\s+(certfiles)/\1/' \
- -i "${S}/ejabberd.yml.example" \
- || die 'failed to adjust example config'
-}
-
-# Set paths to ejabberd lib directory consistently to point always to directory
-# suffixed with version.
-correct_ejabberd_paths() {
- sed -e "/^EJABBERDDIR[[:space:]]*=/{s:ejabberd:${P}:}" \
- -i "${S}/Makefile.in" \
- || die 'failed to set ejabberd path in Makefile.in'
- sed -e "/EJABBERD_BIN_PATH=/{s:ejabberd:${P}:}" \
- -i "${S}/ejabberdctl.template" \
- || die 'failed to set ejabberd path in ejabberdctl.template'
-}
-
-# Get epam-wrapper from 'files' directory and correct path to lib directory in
-# it. epam-wrapper is placed into work directory. It is assumed no epam-wrapper
-# file exists there already.
-customize_epam_wrapper() {
- local epam_wrapper_src="$1"
- local epam_wrapper_dst="${S}/epam-wrapper"
-
- [[ -e ${epam_wrapper_dst} ]] && die 'epam-wrapper already exists'
- sed -r -e "s@^(ERL_LIBS=).*\$@\1${EPREFIX}$(get_erl_libs)@" \
- "${epam_wrapper_src}" >"${epam_wrapper_dst}" \
- || die 'failed to install epam-wrapper'
-}
-
-# Check if we are missing a default certificate.
-ejabberd_cert_missing() {
- if grep -qs "^\s\+- ${EJABBERD_CERT}" "${EROOT%/}${JABBER_ETC}/ejabberd.yml"; then
- if [[ -f "${EROOT%/}${EJABBERD_CERT}" ]]; then
- # default certificate is present in config and exists - not installing
- return 1
- else
- # default certificate is present in config
- # but doesn't exist - need to install one
- return 0
- fi
- fi
- # no default certificate in config - not installing
- return 1
-}
-
-# Generate and install sample ejabberd certificate. It's installed into
-# EJABBERD_CERT path.
-ejabberd_cert_install() {
- SSL_ORGANIZATION="${SSL_ORGANIZATION:-ejabberd XMPP Server}"
- install_cert "${EJABBERD_CERT%.*}"
- chown root:jabber "${EROOT%/}${EJABBERD_CERT}" || die
- chmod 0440 "${EROOT%/}${EJABBERD_CERT}" || die
-}
-
-# Get path to ejabberd lib directory.
-#
-# This is the path ./configure script Base for this path is path set in
-# ./configure script which is /usr/lib by default. If libdir is explicitely set
-# to something else than this should be adjusted here as well.
-get_ejabberd_path() {
- echo "/usr/$(get_libdir)/${P}"
-}
-
-# Make ejabberd.service for systemd from upstream provided template.
-make_ejabberd_service() {
- sed -r \
- -e 's!@ctlscriptpath@!/usr/sbin!g' \
- -e 's!^(User|Group)=(.*)!\1=jabber!' \
- -e 's!^(After)=(.*)!\1=epmd.service network.target!' \
- -e '/^After=/ a Requires=epmd.service' \
- "${PN}.service.template" >"${PN}.service" \
- || die 'failed to make ejabberd.service'
-}
-
-# Set paths to defined by net-im/jabber-base.
-set_jabberbase_paths() {
- sed -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 "${S}/Makefile.in" \
- || die 'failed to set paths in Makefile.in'
- sed -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 "${S}/ejabberdctl.template" \
- || die 'failed to set paths ejabberdctl.template'
-}
-
-# Skip installing docs because it's only COPYING that's installed by Makefile.
-skip_docs() {
- gawk -i inplace '
-/# Documentation/, /^[[:space:]]*#?[[:space:]]*$/ {
- if ($0 ~ /^[[:space:]]*#?[[:space:]]*$/) {
- print $0;
- } else {
- next;
- }
-}
-1
-' "${S}/Makefile.in" || die 'failed to remove docs section from Makefile.in'
-}
-
-src_prepare() {
- default
-
- rebar_remove_deps
- correct_ejabberd_paths
- set_jabberbase_paths
- make_ejabberd_service
- skip_docs
- adjust_config
- customize_epam_wrapper "${FILESDIR}/epam-wrapper"
-
- rebar_fix_include_path fast_xml
- rebar_fix_include_path p1_utils
- rebar_fix_include_path xmpp
-
- # Fix bug #591862. ERL_LIBS should point directly to ejabberd directory
- # rather than its parent which is default. That way ejabberd directory
- # takes precedence is module lookup.
- local ejabberd_erl_libs="$(get_ejabberd_path):$(get_erl_libs)"
- sed -e "s|\(ERL_LIBS=\){{libdir}}.*|\1${ejabberd_erl_libs}|" \
- -i "${S}/ejabberdctl.template" \
- || die 'failed to set ERL_LIBS in ejabberdctl.template'
-
- sed -e "s|\(AC_INIT(ejabberd, \)m4_esyscmd([^)]*)|\1[$PV]|" \
- -i configure.ac || die "Failed to write correct version to configure"
- # eautoreconf # required in case of download from github
-}
-
-src_configure() {
- econf \
- --docdir="${EPREFIX}/usr/share/doc/${PF}/html" \
- --enable-user=jabber \
- --disable-system-deps \
- $(use_enable debug) \
- $(use_enable full-xml) \
- $(use_enable hipe) \
- $(use_enable mssql) \
- $(use_enable mysql) \
- $(use_enable odbc) \
- $(use_enable pam) \
- $(use_enable postgres pgsql) \
- $(use_enable redis) \
- $(use_enable roster-gw roster-gateway-workaround) \
- $(use_enable sqlite) \
- $(use_enable sip) \
- $(use_enable stun) \
- $(use_enable zlib)
-
- # more options to support
- # --enable-elixir requires https://github.com/elixir-lang/elixir
-}
-
-src_compile() {
- emake REBAR='rebar -v' src
-}
-
-src_install() {
- default
-
- keepdir /var/lib/lock/ejabberdctl
- rm -rf "${ED%/}/var/log" || die
- rm -rf "${ED%/}/var/spool" || die
-
- if use pam; then
- local epam_path="$(get_ejabberd_path)/priv/bin/epam"
-
- pamd_mimic_system xmpp auth account || die "cannot create pam.d file"
- into "$(get_ejabberd_path)/priv"
- newbin epam-wrapper epam
- fi
-
- newconfd "${FILESDIR}/${PN}.confd" "${PN}"
- newinitd "${FILESDIR}/${PN}.initd" "${PN}"
- systemd_dounit "${PN}.service"
- systemd_dotmpfilesd "${FILESDIR}/${PN}.tmpfiles.conf"
-
- insinto /etc/logrotate.d
- newins "${FILESDIR}/${PN}.logrotate" "${PN}"
-}
-
-pkg_preinst() {
- if use pam; then
- einfo "Adding jabber user to epam group to allow ejabberd to use PAM" \
- "authentication"
- # See
- # <https://docs.ejabberd.im/admin/configuration/#pam-authentication>.
- # epam binary is installed by dev-erlang/epam package, therefore SUID
- # is set by that package. Instead of jabber group it uses epam group,
- # therefore we need to add jabber user to epam group.
- usermod -a -G epam jabber || die
- fi
-}
-
-pkg_postinst() {
- if [[ ! ${REPLACING_VERSIONS} ]]; then
- echo
- elog "For configuration instructions, please see"
- elog " https://docs.ejabberd.im/"
- echo
- fi
- if [[ " ${REPLACING_VERSIONS} " =~ \ 17\. ]]; then
- ewarn If you are updating from an older version like 17.x
- ewarn you may need to add an access_rules section to your
- ewarn ejabberd.yml config file.
- ewarn Otherwise authentication will be broken and users
- ewarn will not be able to log in.
- echo
- fi
-
- if ejabberd_cert_missing; then
- ejabberd_cert_install
- fi
-}
diff --git a/net-im/ejabberd/files/ejabberd-17.04-0001-Don-t-configure-or-compile-deps.patch b/net-im/ejabberd/files/ejabberd-17.04-0001-Don-t-configure-or-compile-deps.patch
deleted file mode 100644
index 0a42f549b58c..000000000000
--- a/net-im/ejabberd/files/ejabberd-17.04-0001-Don-t-configure-or-compile-deps.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 4086249e78cde107df84e6ad022e9d9821cecc40 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
-Date: Sun, 28 May 2017 14:22:08 +0100
-Subject: [PATCH] Don't configure or compile deps
-
----
- rebar.config.script | 23 -----------------------
- 1 file changed, 23 deletions(-)
-
-diff --git a/rebar.config.script b/rebar.config.script
-index 19142b9e..04f8b310 100644
---- a/rebar.config.script
-+++ b/rebar.config.script
-@@ -242,27 +242,6 @@ CtParams = fun(CompileOpts) ->
- TestConfig]
- end,
-
--GenDepConfigureLine =
--fun(DepPath, Flags) ->
-- ["sh -c 'if test ! -f ",DepPath,"config.status -o ",
-- "config.status -nt ",DepPath,"config.status; ",
-- "then (cd ", DepPath, " && ",
-- "CFLAGS=\"", CFlags,"\" ",
-- "CPPFLAGS=\"", CPPFlags, "\" "
-- "LDFLAGS=\"", LDFlags, "\"",
-- " ./configure ", string:join(Flags, " "),
-- "); fi'"]
--end,
--
--GenDepsConfigure =
--fun(Hooks) ->
-- lists:map(fun({Pkg, Flags}) ->
-- DepPath = ResolveDepPath("deps/" ++ Pkg ++ "/"),
-- {'compile',
-- lists:flatten(GenDepConfigureLine(DepPath, Flags))}
-- end, Hooks)
--end,
--
- ProcessErlOpt = fun(Vals) ->
- lists:map(
- fun({i, Path}) ->
-@@ -315,8 +294,6 @@ Rules = [
- AppendList([{coveralls, ".*", {git, "https://github.com/markusn/coveralls-erl.git", "master"}}]), []},
- {[post_hooks], [cover_enabled], os:getenv("TRAVIS") == "true",
- AppendList2(TravisPostHooks), [], false},
-- {[pre_hooks], [post_hook_configure], true,
-- AppendList2(GenDepsConfigure), [], []},
- {[ct_extra_params], [eunit_compile_opts], true,
- AppendStr2(CtParams), "", []},
- {[erl_opts], true,
---
-2.12.2
-
diff --git a/net-im/ejabberd/files/ejabberd-17.04-ejabberdctl.patch b/net-im/ejabberd/files/ejabberd-17.04-ejabberdctl.patch
deleted file mode 100644
index 6001c651f5d6..000000000000
--- a/net-im/ejabberd/files/ejabberd-17.04-ejabberdctl.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 185923a3c5f11c2d29599416a52b6594bc94d8c9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Amadeusz=20=C5=BBo=C5=82nowski?= <aidecoe@aidecoe.name>
-Date: Mon, 29 Aug 2016 22:29:41 +0100
-Subject: [PATCH] Adjust ejabberdctl for Gentoo jabberbase setup
-
-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.
----
- ejabberdctl.template | 8 ++++++--
- 1 file changed, 6 insertions(+), 2 deletions(-)
-
-diff --git a/ejabberdctl.template b/ejabberdctl.template
-index 5b34ebe..3c080fd 100755
---- a/ejabberdctl.template
-+++ b/ejabberdctl.template
-@@ -16,6 +16,7 @@ IEX={{bindir}}/iex
- EPMD={{epmd}}
- INSTALLUSER={{installuser}}
- ERL_LIBS={{libdir}}
-+SHELL=/bin/sh
-
- # check the proper system user is used if defined
- if [ "$INSTALLUSER" != "" ] ; then
-@@ -23,11 +24,11 @@ if [ "$INSTALLUSER" != "" ] ; then
- 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
-@@ -91,6 +92,7 @@ EJABBERD_LOG_PATH=$LOGS_DIR/ejabberd.log
- 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 mnesia options
- MNESIA_OPTS="-mnesia dir \"\\\"$SPOOL_DIR\\\"\" $MNESIA_OPTIONS"
-@@ -149,6 +151,8 @@ export ERL_MAX_ETS_TABLES
- export CONTRIB_MODULES_PATH
- export CONTRIB_MODULES_CONF_DIR
- export ERL_LIBS
-+export HOME
-+export SHELL
-
- shell_escape_str()
- {
---
-2.9.2
-
diff --git a/net-im/ejabberd/metadata.xml b/net-im/ejabberd/metadata.xml
index ecd307a3a00f..b81bfc19a41d 100644
--- a/net-im/ejabberd/metadata.xml
+++ b/net-im/ejabberd/metadata.xml
@@ -16,12 +16,9 @@
<flag name="mssql">Enable Microsoft SQL Server support (via ODBC) for
data storage</flag>
<flag name="mysql">Enable MySQL support for data storage</flag>
- <flag name="nls">Enable character set conversion for mod_irc</flag>
<flag name="odbc">Enable ODBC support to access data storage</flag>
<flag name="postgres">Enable PostgreSQL support for data storage</flag>
<flag name="redis">Enable Redis support for transient data</flag>
- <flag name="riak">Enable support for Riak - distributed NoSQL key-value
- data store</flag>
<flag name="roster-gw">Turn on workaround for processing gateway subscriptions</flag>
<flag name="sqlite">Enable SQLite database support</flag>
<flag name="sip">Enable SIP support</flag>