From: Eric Edgar Date: Wed, 21 Dec 2005 06:32:09 +0000 (+0000) Subject: Remove requirement on md5sum,sha1sum,crc32 .. only need to have shash installed.... X-Git-Tag: CATALYST_2_0_6_916~500 X-Git-Url: http://git.tremily.us/?a=commitdiff_plain;h=570e4671e600b6a29e378cff7ddfe4f6c9ca5785;p=catalyst.git Remove requirement on md5sum,sha1sum,crc32 .. only need to have shash installed. Supports all of shashs algorithms as of 12_21_2005 git-svn-id: svn+ssh://svn.gentoo.org/var/svnroot/catalyst/trunk@994 d1e1f19c-881f-0410-ab34-b69fee027534 --- diff --git a/ChangeLog b/ChangeLog index 16bd1120..ac1a86be 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,9 @@ # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.481 2005/12/20 22:51:00 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/ChangeLog,v 1.482 2005/12/21 06:32:09 rocket Exp $ + + 21 Dec 2005; Eric Edgar modules/catalyst_support.py: + Remove requirement on md5sum,sha1sum,crc32 .. only need to have shash + installed. Supports all of shashs algorithms as of 12_21_2005 20 Dec 2005; Eric Edgar modules/generic_stage_target.py: diff --git a/modules/catalyst_support.py b/modules/catalyst_support.py index 8b2a8b48..309c2bb7 100644 --- a/modules/catalyst_support.py +++ b/modules/catalyst_support.py @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.65 2005/12/19 22:18:54 rocket Exp $ +# $Header: /var/cvsroot/gentoo/src/catalyst/modules/catalyst_support.py,v 1.66 2005/12/21 06:32:09 rocket Exp $ import sys,string,os,types,re,signal,traceback,time #import md5,sha @@ -95,17 +95,35 @@ def calc_hash2(file,cmd,cmd_args,id_string="MD5",verbose=False): #This has map must be defined after the function calc_hash #It is possible to call different functions from this but they must be defined before hash_map # Key,function,cmd,cmd_args,Print string -hash_map={"md5":[calc_hash,"md5sum","","MD5"],\ - "crc32":[calc_hash,"crc32","","CRC32"],\ - "sha1":[calc_hash,"sha1sum","","SHA1"],\ +hash_map={ + "adler32":[calc_hash2,"shash","-a ADLER32","ADLER32"],\ + "crc32":[calc_hash2,"shash","-a CRC32","CRC32"],\ + "crc32b":[calc_hash2,"shash","-a CRC32B","CRC32B"],\ + "gost":[calc_hash2,"shash","-a GOST","GOST"],\ + "haval128":[calc_hash2,"shash","-a HAVAL128","HAVAL128"],\ + "haval160":[calc_hash2,"shash","-a HAVAL160","HAVAL160"],\ + "haval192":[calc_hash2,"shash","-a HAVAL192","HAVAL192"],\ + "haval224":[calc_hash2,"shash","-a HAVAL224","HAVAL224"],\ + "haval256":[calc_hash2,"shash","-a HAVAL256","HAVAL256"],\ + "md2":[calc_hash2,"shash","-a MD2","MD2"],\ + "md4":[calc_hash2,"shash","-a MD4","MD4"],\ + "md5":[calc_hash2,"shash","-a MD5","MD5"],\ + "ripemd128":[calc_hash2,"shash","-a RIPEMD128","RIPEMD128"],\ + "ripemd160":[calc_hash2,"shash","-a RIPEMD160","RIPEMD160"],\ + "ripemd256":[calc_hash2,"shash","-a RIPEMD256","RIPEMD256"],\ + "ripemd320":[calc_hash2,"shash","-a RIPEMD320","RIPEMD320"],\ + "sha1":[calc_hash2,"shash","-a SHA1","SHA1"],\ "sha224":[calc_hash2,"shash","-a SHA224","SHA224"],\ "sha256":[calc_hash2,"shash","-a SHA256","SHA256"],\ "sha384":[calc_hash2,"shash","-a SHA384","SHA384"],\ "sha512":[calc_hash2,"shash","-a SHA512","SHA512"],\ - "ripemd128":[calc_hash2,"shash","-a RIPEMD128","RIPEMD128"],\ - "ripemd160":[calc_hash2,"shash","-a RIPEMD160","RIPEMD160"],\ - "ripemd256":[calc_hash2,"shash","-a RIPEMD256","RIPEMD256"],\ - "ripemd320":[calc_hash2,"shash","-a RIPEMD320","RIPEMD320"]} + "snefru128":[calc_hash2,"shash","-a SNEFRU128","SNEFRU128"],\ + "snefru256":[calc_hash2,"shash","-a SNEFRU256","SNEFRU256"],\ + "tiger":[calc_hash2,"shash","-a TIGER","TIGER"],\ + "tiger128":[calc_hash2,"shash","-a TIGER128","TIGER128"],\ + "tiger160":[calc_hash2,"shash","-a TIGER160","TIGER160"],\ + "whirlpool":[calc_hash2,"shash","-a WHIRLPOOL","WHIRLPOOL"],\ + } def read_from_clst(file): line = ''