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 C0C76138330 for ; Mon, 5 Sep 2016 18:10:46 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 6B487E0A41; Mon, 5 Sep 2016 18:10:44 +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 E0B99E0A41 for ; Mon, 5 Sep 2016 18:10:43 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id EB842340775 for ; Mon, 5 Sep 2016 18:10:41 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id B69EA2452 for ; Mon, 5 Sep 2016 18:10:39 +0000 (UTC) From: "Michael Orlitzky" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Michael Orlitzky" Message-ID: <1473098911.a3fce5aa83016c4bd16d56a82b4ef00433225423.mjo@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: mail-filter/spamassassin/ X-VCS-Repository: repo/gentoo X-VCS-Files: mail-filter/spamassassin/spamassassin-3.4.1-r7.ebuild mail-filter/spamassassin/spamassassin-3.4.1-r8.ebuild X-VCS-Directories: mail-filter/spamassassin/ X-VCS-Committer: mjo X-VCS-Committer-Name: Michael Orlitzky X-VCS-Revision: a3fce5aa83016c4bd16d56a82b4ef00433225423 X-VCS-Branch: master Date: Mon, 5 Sep 2016 18:10:39 +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: 59ecaf37-3b4d-48d1-98c5-de943be878c2 X-Archives-Hash: dac0f759e6bce403cf1dc795a36b6e55 commit: a3fce5aa83016c4bd16d56a82b4ef00433225423 Author: Michael Orlitzky gentoo org> AuthorDate: Mon Sep 5 17:47:53 2016 +0000 Commit: Michael Orlitzky gentoo org> CommitDate: Mon Sep 5 18:08:31 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=a3fce5aa mail-filter/spamassassin: new revision with correct build dependencies. The existing dependencies for spamassassin were all thrown into DEPEND and then propagated to RDEPEND -- even the ones that were obviously only needed at runtime. Marcin Mirosław helped track down the correct value of DEPEND, and the rest of the optional dependencies were moved to RDEPEND. The required and optional dependencies are now stored in REQDEPEND/OPTDEPEND variables to eliminate duplication. This is primarily useful with USE=test, which makes DEPEND a superset of RDEPEND, since the other inclusion alreads holds normally. Once the test suite had the correct dependencies, the RESTRICT=test was removed, and problematic spamc/spamd tests were disabled. The test suite should pass now. Gentoo-Bug: 592682 Package-Manager: portage-2.2.28 ....4.1-r7.ebuild => spamassassin-3.4.1-r8.ebuild} | 87 ++++++++++++++-------- 1 file changed, 56 insertions(+), 31 deletions(-) diff --git a/mail-filter/spamassassin/spamassassin-3.4.1-r7.ebuild b/mail-filter/spamassassin/spamassassin-3.4.1-r8.ebuild similarity index 77% rename from mail-filter/spamassassin/spamassassin-3.4.1-r7.ebuild rename to mail-filter/spamassassin/spamassassin-3.4.1-r8.ebuild index 00838ba..78eb6b5 100644 --- a/mail-filter/spamassassin/spamassassin-3.4.1-r7.ebuild +++ b/mail-filter/spamassassin/spamassassin-3.4.1-r8.ebuild @@ -4,7 +4,7 @@ EAPI=6 -inherit toolchain-funcs systemd +inherit perl-functions systemd toolchain-funcs MY_P="Mail-SpamAssassin-${PV//_/-}" S="${WORKDIR}/${MY_P}" @@ -20,31 +20,43 @@ IUSE="+bayes berkdb cron ipv6 ldap libressl mysql postgres qmail sqlite ssl test # You can do without a database unless you need the Bayes features. REQUIRED_USE="bayes? ( || ( berkdb mysql postgres sqlite ) )" +# The Makefile.PL script checks for dependencies, but only fails if a +# required (i.e. not optional) dependency is missing. We therefore +# require most of the optional modules only at runtime. +REQDEPEND="dev-lang/perl + dev-perl/HTML-Parser + dev-perl/Net-DNS + dev-perl/NetAddr-IP + virtual/perl-Archive-Tar + virtual/perl-Digest-SHA + virtual/perl-IO-Zlib + virtual/perl-Time-HiRes + ssl? ( + !libressl? ( dev-libs/openssl:0 ) + libressl? ( dev-libs/libressl ) + )" + # SpamAssassin doesn't use libwww-perl except as a fallback for when # curl/wget are missing, so we depend on one of those instead. Some # mirrors use https, so we need those utilities to support SSL. # # re2c is needed to compile the rules (sa-compile). # -DEPEND="app-crypt/gnupg - dev-lang/perl +# We still need the old Digest-SHA1 because razor2 has not been ported +# to Digest-SHA. +OPTDEPEND="app-crypt/gnupg dev-perl/Digest-SHA1 dev-perl/Encode-Detect dev-perl/Geo-IP - dev-perl/HTML-Parser dev-perl/HTTP-Date dev-perl/Mail-DKIM dev-perl/Mail-SPF - dev-perl/Net-DNS dev-perl/Net-Patricia - dev-perl/NetAddr-IP + dev-perl/Net-CIDR-Lite dev-util/re2c || ( net-misc/wget[ssl] net-misc/curl[ssl] ) - virtual/perl-Archive-Tar - virtual/perl-IO-Zlib virtual/perl-MIME-Base64 virtual/perl-Pod-Parser - virtual/perl-Time-HiRes berkdb? ( virtual/perl-DB_File ) ipv6? ( dev-perl/IO-Socket-INET6 ) ldap? ( dev-perl/perl-ldap ) @@ -60,18 +72,14 @@ DEPEND="app-crypt/gnupg dev-perl/DBI dev-perl/DBD-SQLite ) - ssl? ( - dev-perl/IO-Socket-SSL - !libressl? ( dev-libs/openssl:0 ) - libressl? ( dev-libs/libressl ) - )" - -RDEPEND="${DEPEND} - dev-perl/Net-CIDR-Lite" + ssl? ( dev-perl/IO-Socket-SSL )" -# Some spamd tests fail, and it looks like the whole suite eventually -# hangs. -RESTRICT=test +DEPEND="${REQDEPEND} + test? ( + ${OPTDEPEND} + virtual/perl-Test-Harness + )" +RDEPEND="${REQDEPEND} ${OPTDEPEND}" PATCHES=( "${FILESDIR}/spamassassin-3.4.1-bug_7199.patch" @@ -80,13 +88,22 @@ PATCHES=( "${FILESDIR}/spamassassin-3.4.1-bug_7265.patch" ) -src_configure() { - # spamc can be built with ssl support. - local use_ssl="no" - if use ssl; then - use_ssl="yes" - fi +src_prepare() { + default + + # The sa_compile test does some weird stuff like hopping around in + # the directory tree and calling "make" to create a dist tarball + # from ${S}. It fails, and is more trouble than it's worth... + perl_rm_files t/sa_compile.t || die 'failed to remove sa_compile test' + + # The spamc tests (which need the networked spamd daemon) fail for + # irrelevant reasons. It's too hard to disable them (unlike the + # spamd tests themselves -- see src_test), so use a crude + # workaround. + perl_rm_files t/spamc_*.t || die 'failed to remove spamc tests' +} +src_configure() { # Set SYSCONFDIR explicitly so we can't get bitten by bug 48205 again # (just to be sure, nobody knows how it could happen in the first place). # @@ -98,9 +115,9 @@ src_configure() { SYSCONFDIR="${EPREFIX}/etc" \ DATADIR="${EPREFIX}/usr/share/spamassassin" \ PERL_BIN="${EPREFIX}/usr/bin/perl" \ - ENABLE_SSL="${use_ssl}" \ + ENABLE_SSL="$(usex ssl)" \ DESTDIR="${D}" \ - || die "Unable to build!" + || die 'failed to create a Makefile using Makefile.PL' # Now configure spamc. emake CC="$(tc-getCC)" LDFLAGS="${LDFLAGS}" spamc/Makefile @@ -133,12 +150,12 @@ src_install () { # Disable plugin by default sed -i -e 's/^loadplugin/\#loadplugin/g' \ - "${ED}"/etc/mail/spamassassin/init.pre \ + "${ED}/etc/mail/spamassassin/init.pre" \ || die "failed to disable plugins by default" # Add the init and config scripts. - newinitd "${FILESDIR}"/3.4.1-spamd.init spamd - newconfd "${FILESDIR}"/3.4.1-spamd.conf spamd + newinitd "${FILESDIR}/3.4.1-spamd.init" spamd + newconfd "${FILESDIR}/3.4.1-spamd.conf" spamd systemd_newunit "${FILESDIR}/${PN}.service-r1" "${PN}.service" systemd_install_serviced "${FILESDIR}/${PN}.service.conf" @@ -197,6 +214,14 @@ src_install () { fi } +src_test() { + # Trick the test suite into skipping the spamd tests. Setting + # SPAMD_HOST to a non-localhost value causes SKIP_SPAMD_TESTS to be + # set in SATest.pm. + export SPAMD_HOST=disabled + default +} + pkg_postinst() { elog elog 'No rules are installed by default. You will need to run sa-update'