diff options
author | Robin H. Johnson <robbat2@gentoo.org> | 2010-03-25 00:39:36 +0000 |
---|---|---|
committer | Robin H. Johnson <robbat2@gentoo.org> | 2010-03-25 00:39:36 +0000 |
commit | 6afa1f1672a9e189c3c4600522996c1e2313e077 (patch) | |
tree | 044adb59dc80125f52ab242b60224c49b4af2241 | |
parent | Version bump. (diff) | |
download | gentoo-2-6afa1f1672a9e189c3c4600522996c1e2313e077.tar.gz gentoo-2-6afa1f1672a9e189c3c4600522996c1e2313e077.tar.bz2 gentoo-2-6afa1f1672a9e189c3c4600522996c1e2313e077.zip |
Bug #311243: version bump. Also use Fedora patch for Digest::SHA support.
(Portage version: 2.2_rc63/cvs/Linux x86_64)
-rw-r--r-- | mail-filter/razor/ChangeLog | 8 | ||||
-rw-r--r-- | mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch | 119 | ||||
-rw-r--r-- | mail-filter/razor/razor-2.85.ebuild | 67 |
3 files changed, 193 insertions, 1 deletions
diff --git a/mail-filter/razor/ChangeLog b/mail-filter/razor/ChangeLog index f2b923d7fbb7..8db6be8388e1 100644 --- a/mail-filter/razor/ChangeLog +++ b/mail-filter/razor/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for mail-filter/razor # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/mail-filter/razor/ChangeLog,v 1.87 2010/01/01 18:23:45 fauli Exp $ +# $Header: /var/cvsroot/gentoo-x86/mail-filter/razor/ChangeLog,v 1.88 2010/03/25 00:39:36 robbat2 Exp $ + +*razor-2.85 (25 Mar 2010) + + 25 Mar 2010; Robin H. Johnson <robbat2@gentoo.org> +razor-2.85.ebuild, + +files/razor-2.85-use-sha-not-sha1.patch: + Bug #311243: version bump. Also use Fedora patch for Digest::SHA support. 01 Jan 2010; Christian Faulhammer <fauli@gentoo.org> razor-2.84.ebuild: Transfer Prefix keywords diff --git a/mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch b/mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch new file mode 100644 index 000000000000..ade2af67bd32 --- /dev/null +++ b/mail-filter/razor/files/razor-2.85-use-sha-not-sha1.patch @@ -0,0 +1,119 @@ +Patch-URL: http://cvs.fedoraproject.org/viewvc/devel/perl-Razor-Agent/razor-agents-2.85-use-sha-not-sha1.patch?view=log + +diff -urN razor-agents-2.85.orig/lib/Razor2/Client/Engine.pm razor-agents-2.85/lib/Razor2/Client/Engine.pm +--- razor-agents-2.85.orig/lib/Razor2/Client/Engine.pm 2005-06-13 19:42:25.000000000 -0400 ++++ razor-agents-2.85/lib/Razor2/Client/Engine.pm 2009-11-01 13:45:08.125369192 -0500 +@@ -1,7 +1,6 @@ + package Razor2::Client::Engine; + + use strict; +-use Digest::SHA1 qw(sha1_hex); + use Data::Dumper; + use Razor2::Signature::Ephemeral; + use Razor2::Engine::VR8; +diff -urN razor-agents-2.85.orig/lib/Razor2/Signature/Ephemeral.pm razor-agents-2.85/lib/Razor2/Signature/Ephemeral.pm +--- razor-agents-2.85.orig/lib/Razor2/Signature/Ephemeral.pm 2003-03-03 18:09:50.000000000 -0500 ++++ razor-agents-2.85/lib/Razor2/Signature/Ephemeral.pm 2009-11-01 13:45:08.125369192 -0500 +@@ -2,9 +2,13 @@ + + package Razor2::Signature::Ephemeral; + use strict; +-use Digest::SHA1; + use Data::Dumper; + ++BEGIN { ++ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 } ++ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) } ++} ++ + sub new { + + my ($class, %args) = @_; +@@ -86,16 +90,12 @@ + } + + my $digest; +- my $ctx = Digest::SHA1->new; + + if ($seclength > 128) { +- $ctx->add($section1); +- $ctx->add($section2); +- $digest = $ctx->hexdigest; ++ $digest = sha1_hex($section1, $section2); + } else { + debug("Sections too small... reverting back to orginal content."); +- $ctx->add($content); +- $digest = $ctx->hexdigest; ++ $digest = sha1_hex($content); + } + + debug("Computed e-hash is $digest"); +diff -urN razor-agents-2.85.orig/lib/Razor2/Signature/Whiplash.pm razor-agents-2.85/lib/Razor2/Signature/Whiplash.pm +--- razor-agents-2.85.orig/lib/Razor2/Signature/Whiplash.pm 2007-05-08 18:22:36.000000000 -0400 ++++ razor-agents-2.85/lib/Razor2/Signature/Whiplash.pm 2009-11-01 13:45:08.124368017 -0500 +@@ -7,7 +7,10 @@ + + package Razor2::Signature::Whiplash; + +-use Digest::SHA1; ++BEGIN { ++ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 } ++ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) } ++} + + sub new { + +@@ -683,13 +686,8 @@ + # the value of length to the nearest multiple of ``length_error''. + # Take the first 20 hex chars from SHA1 and call it the signature. + +- my $sha1 = Digest::SHA1->new(); +- +- $sha1->add($host); +- $sig = substr $sha1->hexdigest, 0, 12; +- +- $sha1->add($corrected_length); +- $sig .= substr $sha1->hexdigest, 0, 4; ++ $sig = substr sha1_hex($host), 0, 12; ++ $sig .= substr sha1_hex($corrected_length), 0, 4; + + push @sigs, $sig; + $sig_meta{$sig} = [$host, $corrected_length]; +diff -urN razor-agents-2.85.orig/lib/Razor2/String.pm razor-agents-2.85/lib/Razor2/String.pm +--- razor-agents-2.85.orig/lib/Razor2/String.pm 2005-06-13 17:09:59.000000000 -0400 ++++ razor-agents-2.85/lib/Razor2/String.pm 2009-11-01 13:45:08.123368518 -0500 +@@ -1,11 +1,15 @@ + # $Id: razor-2.85-use-sha-not-sha1.patch,v 1.1 2010/03/25 00:39:36 robbat2 Exp $ + package Razor2::String; + +-use Digest::SHA1 qw(sha1_hex); + use URI::Escape; + use Razor2::Preproc::enBase64; + use Data::Dumper; + ++BEGIN { ++ eval { require Digest::SHA; import Digest::SHA qw(sha1_hex); 1 } ++ or do { require Digest::SHA1; import Digest::SHA1 qw(sha1_hex) } ++} ++ + #use MIME::Parser; + + require Exporter; +@@ -69,15 +73,8 @@ + return unless $text && $iv1 && $iv2; + die "no ref's allowed" if ref($text); + +- my $ctx = Digest::SHA1->new; +- $ctx->add($iv2); +- $ctx->add($text); +- my $digest = $ctx->hexdigest; +- +- $ctx = Digest::SHA1->new; +- $ctx->add($iv1); +- $ctx->add($digest); +- $digest = $ctx->hexdigest; ++ my $digest = sha1_hex($iv2, $text); ++ $digest = sha1_hex($iv1, $digest); + + return (hextobase64($digest), $digest); + } diff --git a/mail-filter/razor/razor-2.85.ebuild b/mail-filter/razor/razor-2.85.ebuild new file mode 100644 index 000000000000..a59abf916540 --- /dev/null +++ b/mail-filter/razor/razor-2.85.ebuild @@ -0,0 +1,67 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/mail-filter/razor/razor-2.85.ebuild,v 1.1 2010/03/25 00:39:36 robbat2 Exp $ + +inherit perl-app + +DESCRIPTION="Vipul's Razor is a distributed, collaborative spam detection and filtering network" +HOMEPAGE="http://razor.sourceforge.net/" +SRC_URI="mirror://sourceforge/razor/razor-agents-${PV}.tar.bz2" +LICENSE="Artistic" +SLOT="0" +KEYWORDS="~alpha ~amd64 ~hppa ~ia64 ~ppc ~ppc64 ~sparc ~x86 ~amd64-linux ~x86-linux ~x86-macos" +IUSE="" + +DEPEND="dev-lang/perl" + +RDEPEND="dev-perl/Net-DNS + virtual/perl-net-ping + virtual/perl-Time-HiRes + || ( virtual/perl-Digest-SHA dev-perl/Digest-SHA1 ) + dev-perl/URI + dev-perl/Digest-Nilsimsa" + +PATCHES=( "${FILESDIR}/${PN}-2.85-use-sha-not-sha1.patch" ) + +S=${WORKDIR}/razor-agents-${PV} + +pkg_postinst() { + elog + elog "Run 'razor-admin -create' to create a default config file in your" + elog "home directory under /home/user/.razor. (Remember to change user to" + elog "your username from root before running razor-admin)" + elog + elog "Razor v2 requires reporters to be registered so their reputations can" + elog "be computed over time and they can participate in the revocation" + elog "mechanism. Registration is done with razor-admin -register. It has to be" + elog "manually invoked in either of the following ways:" + elog + elog "To register user foo with 's1kr3t' as password: " + elog + elog "razor-admin -register -user=foo -pass=s1kr3t" + elog + elog "To register with an email address and have the password assigned:" + elog + elog "razor-admin -register -user=foo@bar.com " + elog + elog "To have both (random) username and password assgined: " + elog + elog "razor-admin -register " + elog + elog "razor-admin -register negotiates a registration with the Nomination Server" + elog "and writes the identity information in" + elog "/home/user/.razor/identity-username, or /etc/razor/identity-username" + elog "when invoked as root." + elog + elog "You can edit razor-agent.conf to change the defaults. Config options" + elog "and their values are defined in the razor-agent.conf(5) manpage." + elog + elog "The next step is to integrate razor-check, razor-report and" + elog "razor-revoke in your mail system. If you are running Razor v1, the" + elog "change will be transparent, new versions of razor agents will overwrite" + elog "the old ones. You would still need to plugin razor-revoke in your MUA," + elog "since it's a new addition in Razor v2. If you are not running Razor v1," + elog "refer to manpages of razor-check(1), razor-report(1), and" + elog "razor-revoke(1) for integration instructions." + elog +} |