Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 28 Aug 2007 20:07:01 GMT
From:      Steven Kreuzer <skreuzer@exit2shell.com>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/115911: Patches for p5-File-HStore v0.09
Message-ID:  <200708282007.l7SK71UA041789@www.freebsd.org>
Resent-Message-ID: <200708282010.l7SKA14P079105@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>Number:         115911
>Category:       ports
>Synopsis:       Patches for p5-File-HStore v0.09
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          update
>Submitter-Id:   current-users
>Arrival-Date:   Tue Aug 28 20:10:00 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator:     Steven Kreuzer
>Release:        6.2-STABLE
>Organization:
>Environment:
FreeBSD escobar.exit2shell.com 6.2-STABLE FreeBSD 6.2-STABLE #6: Mon Apr 16 19:06:28 EDT 2007     root@escobar.exit2shell.com:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
The port of devel/p5-File-HStore is/was going to be removed from CVS because it depends on security/p5-Digest-SHA2 which has been deprecated in favor of Digest::SHA

I created patches so that File-HStore makes use of Digest::SHA instead of Digest::SHA1 and Digest::SHA2. I have contacted the original author to attempt to get this patches accepted upstream, but it has been roughly a month and I have not heard back from him so I am hoping I can get those patches accepted into the tree to prevent File-HStore from being removed.

Additional information can be found here:
http://lists.freebsd.org/pipermail/freebsd-perl/2007-August/001619.html
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

# This is a shell archive.  Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file".  Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
#	p5-File-HStore
#	p5-File-HStore/Makefile
#	p5-File-HStore/distinfo
#	p5-File-HStore/pkg-descr
#	p5-File-HStore/pkg-plist
#	p5-File-HStore/files
#	p5-File-HStore/files/patch-Makefile.PL
#	p5-File-HStore/files/patch-HStore.pm
#
echo c - p5-File-HStore
mkdir -p p5-File-HStore > /dev/null 2>&1
echo x - p5-File-HStore/Makefile
sed 's/^X//' >p5-File-HStore/Makefile << 'END-of-p5-File-HStore/Makefile'
X# New ports collection makefile for:	p5-File-HStore
X# Date created:		2006-07-21
X# Whom:			Gea-Suan Lin <gslin@gslin.org>
X#
X# $FreeBSD: ports/devel/p5-File-HStore/Makefile,v 1.3 2006/12/12 00:55:21 clsung Exp $
X#
X
XPORTNAME=	File-HStore
XPORTVERSION=	0.09
XCATEGORIES=	devel perl5
XMASTER_SITES=	${MASTER_SITE_PERL_CPAN}
XMASTER_SITE_SUBDIR=	../../authors/id/A/AD/ADULAU
XPKGNAMEPREFIX=	p5-
X
XMAINTAINER=	perl@FreeBSD.org
XCOMMENT=	Store files on a filesystem using a very simple hash-based storage
X
XRUN_DEPENDS=	${SITE_PERL}/${PERL_ARCH}/Digest/SHA.pm:${PORTSDIR}/security/p5-Digest-SHA
X
XPERL_CONFIGURE=	yes
X
XMAN3=		File::HStore.3
X
X.include <bsd.port.pre.mk>
X
X.if ${PERL_LEVEL} < 500600
XIGNORE=		requires Perl 5.6.0 or newer. Install lang/perl5.8 and try again
X.endif
X
X.include <bsd.port.post.mk>
END-of-p5-File-HStore/Makefile
echo x - p5-File-HStore/distinfo
sed 's/^X//' >p5-File-HStore/distinfo << 'END-of-p5-File-HStore/distinfo'
XMD5 (File-HStore-0.09.tar.gz) = 271f3f2dfc0fa4e237bd82bbbd68ee49
XSHA256 (File-HStore-0.09.tar.gz) = 5fff377d1506b05020793b54cfb52a87dff0bc9155e564fdb1e7af8a05ca645f
XSIZE (File-HStore-0.09.tar.gz) = 5164
END-of-p5-File-HStore/distinfo
echo x - p5-File-HStore/pkg-descr
sed 's/^X//' >p5-File-HStore/pkg-descr << 'END-of-p5-File-HStore/pkg-descr'
XFile-HStore is a very minimalist perl library to store files on a
Xfilesystem using a very simple hash-based storage.
X
XFile-HStore is nothing more than a simple wrapper interface to a
Xstorage containing a specific directory structure where files are hold
Xbased on their hashes. The name of the directories is based on the
Xfirst two bytes of the hexadecimal form of the digest. The file is
Xstored and named with its full hexadecimal form in the corresponding
Xprefixed directory.
X
XThe current version is supporting the SHA-1 and SHA-2 (256 bits)
Xalgorithm. The FAT (Free Archive Toolkit) format is also supported and
Xit is composed of the date of submission plus the SHA-2 real digest
Xpart.
X
XWWW:	http://search.cpan.org/dist/File-HStore/
END-of-p5-File-HStore/pkg-descr
echo x - p5-File-HStore/pkg-plist
sed 's/^X//' >p5-File-HStore/pkg-plist << 'END-of-p5-File-HStore/pkg-plist'
X@comment $FreeBSD: ports/devel/p5-File-HStore/pkg-plist,v 1.1 2006/07/21 14:58:36 clsung Exp $
X%%SITE_PERL%%/%%PERL_ARCH%%/auto/File/HStore/.packlist
X%%SITE_PERL%%/File/HStore.pm
X%%SITE_PERL%%/auto/File/HStore/autosplit.ix
X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/File/HStore
X@dirrmtry %%SITE_PERL%%/%%PERL_ARCH%%/auto/File
X@dirrmtry %%SITE_PERL%%/auto/File/HStore
X@dirrmtry %%SITE_PERL%%/auto/File
X@dirrmtry %%SITE_PERL%%/File
END-of-p5-File-HStore/pkg-plist
echo c - p5-File-HStore/files
mkdir -p p5-File-HStore/files > /dev/null 2>&1
echo x - p5-File-HStore/files/patch-Makefile.PL
sed 's/^X//' >p5-File-HStore/files/patch-Makefile.PL << 'END-of-p5-File-HStore/files/patch-Makefile.PL'
X--- ../File-HStore-0.09-original/Makefile.PL	Sun Nov 26 11:05:53 2006
X+++ Makefile.PL	Tue Jul 17 18:08:11 2007
X@@ -5,8 +5,7 @@
X WriteMakefile(
X     NAME              => 'File::HStore',
X     VERSION_FROM      => 'lib/File/HStore.pm', # finds $VERSION
X-    PREREQ_PM         => { 'Digest::SHA1' => '0', 
X-			   'Digest::SHA2' => '0', 
X+    PREREQ_PM         => { 'Digest::SHA' => '0', 
X 			   'File::Copy' => '0',
X 			   'Test::More' => '0',
X 			   'File::Path' => '0' }, # e.g., Module::Name => 1.1
END-of-p5-File-HStore/files/patch-Makefile.PL
echo x - p5-File-HStore/files/patch-HStore.pm
sed 's/^X//' >p5-File-HStore/files/patch-HStore.pm << 'END-of-p5-File-HStore/files/patch-HStore.pm'
X--- ../File-HStore-0.09-original/lib/File/HStore.pm	Sun Nov 26 11:43:50 2006
X+++ lib/File/HStore.pm	Tue Jul 17 18:24:13 2007
X@@ -2,8 +2,7 @@
X 
X use strict;
X use warnings;
X-use Digest::SHA1;
X-use Digest::SHA2;
X+use Digest::SHA;
X use File::Copy;
X use File::Path;
X 
X@@ -24,7 +23,7 @@
X 
X our @EXPORT = qw( );
X 
X-our $VERSION = '0.09';
X+our $VERSION = '0.10';
X 
X sub new {
X 
X@@ -69,7 +68,7 @@
X     my $lSubmitDate;
X 
X     if ( $self->{digest} eq "FAT" ) {
X-        $ldigest = "SHA2";
X+        $ldigest = "sha256";
X     }
X     else {
X         $ldigest = $self->{digest};
X@@ -191,10 +190,10 @@
X     my $sha;
X     open( FILED, "$file" ) or die "Unable to open file $file";
X     if ( $digestdef eq "SHA1" ) {
X-        $sha = Digest::SHA1->new;
X+        $sha = Digest::SHA->new("sha1");
X     }
X     elsif ( $digestdef eq "SHA2" ) {
X-        $sha = Digest::SHA2->new;
X+        $sha = Digest::SHA->new("sha256");
X     }
X     else {
X         print "unknown digest method";
X@@ -242,7 +241,7 @@
X 
X   use File::HStore;
X   my $store = File::HStore ("/tmp/.mystore");
X-  
X+
X   # Add a file in the store
X   my $id = $store->add("/foo/bar.txt");
X 
X@@ -272,7 +271,7 @@
X =head1 METHODS
X 
X The object  oriented interface to C<File::HFile> is  described in this
X-section.  
X+section.
X 
X The following methods are provided:
X 
X@@ -302,7 +301,7 @@
X 
X =item $store->remove($hashvalue)
X 
X-The $hashvalue is the file to be removed from the store. 
X+The $hashvalue is the file to be removed from the store.
X 
X Return false on success and undef on error.
X 
END-of-p5-File-HStore/files/patch-HStore.pm
exit



>Release-Note:
>Audit-Trail:
>Unformatted:



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200708282007.l7SK71UA041789>