summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRobin H. Johnson <robbat2@gentoo.org>2008-07-05 09:46:28 +0000
committerRobin H. Johnson <robbat2@gentoo.org>2008-07-05 09:46:28 +0000
commitae2ee5ce8246f099913012db6ce4d33b4f79cd1a (patch)
treeaef1313d4d7dc88c9a4083c4289f0d3efaa3adea /dev-perl
parentVersion bump & Cleanup (diff)
downloadgentoo-2-ae2ee5ce8246f099913012db6ce4d33b4f79cd1a.tar.gz
gentoo-2-ae2ee5ce8246f099913012db6ce4d33b4f79cd1a.tar.bz2
gentoo-2-ae2ee5ce8246f099913012db6ce4d33b4f79cd1a.zip
Bug #204022, do not install a bad bit of cron foo.
(Portage version: 2.2_rc1/cvs/Linux 2.6.26-rc4-00103-g1beee8d x86_64)
Diffstat (limited to 'dev-perl')
-rw-r--r--dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/ChangeLog11
-rw-r--r--dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1.ebuild46
-rw-r--r--dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron5
-rw-r--r--dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh6
4 files changed, 65 insertions, 3 deletions
diff --git a/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/ChangeLog b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/ChangeLog
index 4bba7889e76a..cc451fdc557a 100644
--- a/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/ChangeLog
+++ b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/ChangeLog
@@ -1,6 +1,13 @@
# ChangeLog for dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing
-# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/ChangeLog,v 1.1 2007/10/17 08:47:40 robbat2 Exp $
+# Copyright 1999-2008 Gentoo Foundation; Distributed under the GPL v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/ChangeLog,v 1.2 2008/07/05 09:46:27 robbat2 Exp $
+
+*Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1 (05 Jul 2008)
+
+ 05 Jul 2008; Robin H. Johnson <robbat2@gentoo.org>
+ +files/update_google_safebrowsing.cron,
+ +Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1.ebuild:
+ Bug #204022, do not install a bad bit of cron foo.
*Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03 (17 Oct 2007)
diff --git a/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1.ebuild b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1.ebuild
new file mode 100644
index 000000000000..4425dbdab7c9
--- /dev/null
+++ b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1.ebuild
@@ -0,0 +1,46 @@
+# Copyright 1999-2008 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing-1.03-r1.ebuild,v 1.1 2008/07/05 09:46:27 robbat2 Exp $
+
+MODULE_AUTHOR="DANBORN"
+inherit perl-module
+
+DESCRIPTION="SpamAssassin plugin to score mail based on Google blocklists."
+
+IUSE="test"
+
+SLOT="0"
+LICENSE="Apache-2.0"
+KEYWORDS="~amd64 ~x86 ~ppc"
+RDEPEND="dev-perl/Net-Google-SafeBrowsing-Blocklist
+ dev-perl/Net-Google-SafeBrowsing-UpdateRequest
+ mail-filter/spamassassin"
+DEPEND="${RDEPEND}
+ test? ( dev-perl/Test-Pod )"
+
+SRC_TEST="do"
+
+src_install() {
+ perl-module_src_install
+ insinto /etc/mail/spamassassin
+ doins "${FILESDIR}"/init_google_safebrowsing.pre
+ doins "${FILESDIR}"/24_google_safebrowsing.cf
+ insinto /etc/cron.d/
+ newins "${FILESDIR}"/update_google_safebrowsing.cron update_google_safebrowsing
+ dosbin "${FILESDIR}"/update_google_safebrowsing.sh
+ keepdir /var/lib/spamassassin/google_safebrowsing/
+}
+
+pkg_postinst() {
+ if [ -f ${ROOT}/etc/cron.d/update_google_safebrowsing.sh ]; then
+ ewarn "You MUST remove ${ROOT}/etc/cron.d/update_google_safebrowsing.sh"
+ fi
+ elog "To use this package:"
+ elog "1. You MUST apply for a free apikey at:"
+ elog " http://code.google.com/apis/safebrowsing/key_signup.html"
+ elog "2. Place the key into /etc/mail/spamassassin/24_google_safebrowsing.cf"
+ elog "3. Manually run the script /usr/sbin/update_google_safebrowsing.sh"
+ elog "4. Enable the plugin by uncommenting the loadplugin entry in"
+ elog " /etc/mail/spamassassin/init_google_safebrowsing.pre"
+ elog "5. Restart spamd"
+}
diff --git a/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron
new file mode 100644
index 000000000000..8e902fb2c15c
--- /dev/null
+++ b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron
@@ -0,0 +1,5 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.cron,v 1.1 2008/07/05 09:46:28 robbat2 Exp $
+#
+*/30 * * * * root /usr/sbin/update_google_safebrowsing.sh
diff --git a/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh
index 72b89fcabce9..a0f989659df2 100644
--- a/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh
+++ b/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh
@@ -1,7 +1,7 @@
#!/bin/sh
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh,v 1.1 2007/10/17 08:47:41 robbat2 Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-perl/Mail-SpamAssassin-Plugin-GoogleSafeBrowsing/files/update_google_safebrowsing.sh,v 1.2 2008/07/05 09:46:28 robbat2 Exp $
# This cron script updates the Google SafeBrowsing lists for the use of the
# Mail-SpamAssassin-Plugin-GoogleSafeBrowsing plugin.
# It should be run every 25-30 minutes! http://code.google.com/apis/safebrowsing/developers_guide.html#AcceptableUsage
@@ -9,6 +9,10 @@ CONFFILE="/etc/mail/spamassassin/24_google_safebrowsing.cf"
OUTDIR="$(awk '/^google_safebrowsing_dir/{print $2}' "${CONFFILE}")"
APIKEY="$(awk '/^google_safebrowsing_apikey/{print $2}' "${CONFFILE}")"
LISTS="$(awk '/^google_safebrowsing_blocklist/{printf "%s ",$2}' "${CONFFILE}")"
+if [ "$APIKEY" == "DEADBEEF" ]; then
+ echo "No API key!" 1>&2
+ exit 1
+fi
# Wait a little while, to avoid hammering the server
sleep $(($RANDOM % 120))
# Use LISTS unquoted!