From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 6C400139694 for ; Sun, 28 May 2017 18:06:34 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 90346E0BB3; Sun, 28 May 2017 18:06:33 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 58C93E0BB3 for ; Sun, 28 May 2017 18:06:33 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id A7C0534168E for ; Sun, 28 May 2017 18:06:31 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 6F4627449 for ; Sun, 28 May 2017 18:06:30 +0000 (UTC) From: "Amadeusz Piotr Żołnowski" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Amadeusz Piotr Żołnowski" Message-ID: <1495994786.0912204c84b553560a7a48ad1393b7906cccf351.aidecoe@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: net-im/ejabberd/ X-VCS-Repository: repo/gentoo X-VCS-Files: net-im/ejabberd/ejabberd-16.09.ebuild net-im/ejabberd/ejabberd-17.01-r1.ebuild net-im/ejabberd/ejabberd-17.01.ebuild net-im/ejabberd/ejabberd-17.04.ebuild X-VCS-Directories: net-im/ejabberd/ X-VCS-Committer: aidecoe X-VCS-Committer-Name: Amadeusz Piotr Żołnowski X-VCS-Revision: 0912204c84b553560a7a48ad1393b7906cccf351 X-VCS-Branch: master Date: Sun, 28 May 2017 18:06:30 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: 190a4f26-d532-451d-9eba-f342e54002a1 X-Archives-Hash: c48cba00d4b088c44a57699cace8d5b8 commit: 0912204c84b553560a7a48ad1393b7906cccf351 Author: Amadeusz Żołnowski gentoo org> AuthorDate: Sun May 28 18:06:04 2017 +0000 Commit: Amadeusz Piotr Żołnowski gentoo org> CommitDate: Sun May 28 18:06:26 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0912204c net-im/ejabberd: Disable mod_irc if nls USE flag is disbled mod_irc is only required for mod_irc. If nls support is disabled, disable mod_irc in example configuration file and warn user if he/she has mod_irc enabled in configuration. Otherwise ejabberd will fail to start. Gentoo-Bug: 603822 Package-Manager: Portage-2.3.5, Repoman-2.3.2 net-im/ejabberd/ejabberd-16.09.ebuild | 21 +++++++++++++++++++++ net-im/ejabberd/ejabberd-17.01-r1.ebuild | 21 +++++++++++++++++++++ net-im/ejabberd/ejabberd-17.01.ebuild | 21 +++++++++++++++++++++ net-im/ejabberd/ejabberd-17.04.ebuild | 21 +++++++++++++++++++++ 4 files changed, 84 insertions(+) diff --git a/net-im/ejabberd/ejabberd-16.09.ebuild b/net-im/ejabberd/ejabberd-16.09.ebuild index 5621156189e..99e4a3aabcc 100644 --- a/net-im/ejabberd/ejabberd-16.09.ebuild +++ b/net-im/ejabberd/ejabberd-16.09.ebuild @@ -107,6 +107,15 @@ customize_epam_wrapper() { || 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 @@ -138,6 +147,12 @@ 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 \ @@ -184,6 +199,7 @@ src_prepare() { make_ejabberd_service skip_docs adjust_config + use nls || disable_mod_irc customize_epam_wrapper "${FILESDIR}/epam-wrapper" # Fix bug #591862. ERL_LIBS should point directly to ejabberd directory @@ -294,4 +310,9 @@ pkg_postinst() { chmod g+r "${EROOT%/}${epam_path}" \ || die "failed to correct ${epam_path} permissions" 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-17.01-r1.ebuild b/net-im/ejabberd/ejabberd-17.01-r1.ebuild index 6ee9e157db6..7c2e9586ebd 100644 --- a/net-im/ejabberd/ejabberd-17.01-r1.ebuild +++ b/net-im/ejabberd/ejabberd-17.01-r1.ebuild @@ -108,6 +108,15 @@ customize_epam_wrapper() { || 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 @@ -139,6 +148,12 @@ 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 \ @@ -198,6 +213,7 @@ src_prepare() { make_ejabberd_service skip_docs adjust_config + use nls || disable_mod_irc customize_epam_wrapper "${FILESDIR}/epam-wrapper" rebar_fix_include_path fast_xml @@ -299,4 +315,9 @@ pkg_postinst() { 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-17.01.ebuild b/net-im/ejabberd/ejabberd-17.01.ebuild index a55828a551e..061059b6183 100644 --- a/net-im/ejabberd/ejabberd-17.01.ebuild +++ b/net-im/ejabberd/ejabberd-17.01.ebuild @@ -108,6 +108,15 @@ customize_epam_wrapper() { || 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 @@ -139,6 +148,12 @@ 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 \ @@ -185,6 +200,7 @@ src_prepare() { make_ejabberd_service skip_docs adjust_config + use nls || disable_mod_irc customize_epam_wrapper "${FILESDIR}/epam-wrapper" rebar_fix_include_path fast_xml @@ -298,4 +314,9 @@ pkg_postinst() { chmod g+r "${EROOT%/}${epam_path}" \ || die "failed to correct ${epam_path} permissions" 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-17.04.ebuild b/net-im/ejabberd/ejabberd-17.04.ebuild index 8b82f975af8..1cec62f2eba 100644 --- a/net-im/ejabberd/ejabberd-17.04.ebuild +++ b/net-im/ejabberd/ejabberd-17.04.ebuild @@ -108,6 +108,15 @@ customize_epam_wrapper() { || 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 @@ -139,6 +148,12 @@ 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 \ @@ -198,6 +213,7 @@ src_prepare() { make_ejabberd_service skip_docs adjust_config + use nls || disable_mod_irc customize_epam_wrapper "${FILESDIR}/epam-wrapper" rebar_fix_include_path fast_xml @@ -300,4 +316,9 @@ pkg_postinst() { 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 }