rpms/tcl-trf/F-9 tcl-trf.spec, NONE, 1.1 trf2.1.3-havalfixes.patch, NONE, 1.1 trf2.1.3-noripemd.patch, NONE, 1.1 sources, 1.1, 1.2

Tom Callaway spot at fedoraproject.org
Fri Mar 13 14:05:57 UTC 2009


Author: spot

Update of /cvs/pkgs/rpms/tcl-trf/F-9
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv24110/F-9

Modified Files:
	sources 
Added Files:
	tcl-trf.spec trf2.1.3-havalfixes.patch trf2.1.3-noripemd.patch 
Log Message:
initial branching


--- NEW FILE tcl-trf.spec ---
%{!?tcl_version: %define tcl_version %(echo 'puts $tcl_version' | tclsh)}
%{!?tcl_sitearch: %define tcl_sitearch %{_libdir}/tcl%{tcl_version}}
%define realname trf

Name:		tcl-%{realname}
Version:	2.1.3
Release:	2%{?dist}
Summary:	Tcl extension providing "transformer" commands
Group:		System Environment/Libraries
License:	MIT and BSD and LGPLv2+ and GPLv2+ and Public Domain and OpenSSL
URL:		http://tcltrf.sourceforge.net
# We can't use the upstream source because it includes the non-free ripemd implementation
# Source0:	http://downloads.sourceforge.net/tcl%{realname}/%{realname}%{version}.tar.bz2
# To make the clean tarball, just run:
# rm -rf digests.ripemd128 digests.ripemd160 doc/ripemd160.man doc/html/ripemd160.html doc/html/ripemd128.html \
# tests/rmd128.test tests/rmd160.test tea.tests/rmd128_bb.test tea.tests/rmd160_bb.test generic/rmd128.c generic/rmd160.c \ 
# generic/ripemd/
Source0:	%{realname}%{version}-noripemd.tar.bz2
# BSD licensed haval bits, included code is older and has bad license
Source1:	http://labs.calyptix.com/haval-1.1.tar.gz
Patch0:		trf2.1.3-havalfixes.patch
Patch1:		trf2.1.3-noripemd.patch
BuildRoot:	%(mktemp -ud %{_tmppath}/%{name}-%{version}-%{release}-XXXXXX)
Provides:	%{realname} = %{version}-%{release}
BuildRequires:	tcl-devel, tk-devel, zlib-devel, bzip2-devel, openssl-devel
Requires:	tcl(abi) = 8.5
Requires:	bzip2, zlib, openssl

%description
Trf is an extension library to the script language tcl. It provides 
transformer procedures which change the flow of bytes through a channel 
in arbitrary ways. The underlying functionality in the core is that of 
stacked channels which allows code outside of the core to intercept all 
actions (read/write) on a channel.

Among the applications of the above provided here are compression, 
charset recording, error correction, and hash generation. 

%package devel
Summary:	Development files for tcl-%{realname}
Group:		Development/Libraries
Requires:	%{name} = %{version}-%{release}

%description devel
Development files for tcl-%{realname}.

%prep
%setup -q -n %{realname}%{version}
rm -rf generic/haval/ generic/haval.1996
pushd generic
tar xfz %{SOURCE1}
mv haval-1.1 haval/
ln -s haval haval.1996
popd
%patch0 -p1 -b .haval
%patch1 -p1

# Get rid of incorrect ripemd docs
rm -rf doc/digest/ripemd.inc doc/man/ripemd128.n doc/man/ripemd160.n doc/ripemd128.man doc/tmml/ripemd128.tmml doc/tmml/ripemd160.tmml

%build
%configure --with-zlib-lib-dir=%{_libdir} --with-ssl-lib-dir=%{_libdir} --with-bz2-lib-dir=%{_libdir}
make %{?_smp_mflags}

%install
rm -rf %{buildroot}
make DESTDIR=%{buildroot} install
install -d %{buildroot}%{tcl_sitearch}
mv %{buildroot}%{_libdir}/Trf%{version} %{buildroot}%{tcl_sitearch}/Trf%{version}
rm -rf %{buildroot}%{tcl_sitearch}/Trf%{version}/*.a

%clean
rm -rf %{buildroot}

%files
%defattr(-,root,root,-)
%doc doc/ ANNOUNCE ChangeLog DESCRIPTION README*
%{tcl_sitearch}/Trf2.1.3

%files devel
%defattr(-,root,root,-)
%{_includedir}/transform.h
%{_includedir}/trfDecls.h

%changelog
* Thu Mar 12 2009 Tom "spot" Callaway <tcallawa at redhat.com> 2.1.3-2
- update haval implementation for proper licensing
- drop non-free ripemd bits
- fix license tag

* Tue Feb 3 2009 Tom "spot" Callaway <tcallawa at redhat.com> 2.1.3-1
- initial package for Fedora

trf2.1.3-havalfixes.patch:

--- NEW FILE trf2.1.3-havalfixes.patch ---
diff -up trf2.1.3/generic/haval/havalapp.h.haval trf2.1.3/generic/haval/havalapp.h
--- trf2.1.3/generic/haval/havalapp.h.haval	2003-01-20 00:44:48.000000000 -0500
+++ trf2.1.3/generic/haval/havalapp.h	2009-03-06 12:58:51.000000000 -0500
@@ -60,11 +60,15 @@
  *   FPTLEN   define the length of a fingerprint (128, 160, 192, 224 or 256)
  */
 
-#include "config.h"
+/*#undef LITTLE_ENDIAN -- aku */
 
-#ifdef THIS_IS_JUST_A_DUMMY_DIRECTIVE
-
-#undef LITTLE_ENDIAN
+/* aku -- use configure of Tcl-TRF */
+#ifdef  WORDS_BIGENDIAN
+#undef  LITTLE_ENDIAN
+#else
+#undef  LITTLE_ENDIAN
+#define LITTLE_ENDIAN
+#endif
 
 #ifndef PASS
 #define PASS       3        /* 3, 4, or 5 */
@@ -75,6 +79,4 @@
 #define FPTLEN     256      /* 128, 160, 192, 224 or 256 */
 #endif
 
-#endif /* THIS_IS_JUST_A_DUMMY_DIRECTIVE */
-
 
diff -up trf2.1.3/generic/haval/haval.c.haval trf2.1.3/generic/haval/haval.c
--- trf2.1.3/generic/haval/haval.c.haval	2003-01-20 00:44:48.000000000 -0500
+++ trf2.1.3/generic/haval/haval.c	2009-03-06 12:58:51.000000000 -0500
@@ -76,9 +76,8 @@ static char rcsid[] = "$Id: haval.c,v 1.
 
 #include <stdio.h>
 #include <string.h>
-/* #include "havalapp.h" */
-#include "config.h"
-#include "haval.h"
+#include "havalapp.h"
+/* #include "haval.h" */
 
 #define HAVAL_VERSION    1                   /* current version number */
 
@@ -103,26 +102,30 @@ static unsigned char padding[128] = {   
    0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0
 };
 
+/* aku, Jul 8, 1997, added () to eliminate gcc warnings:
+ * "suggest parentheses around arithmetic in operand of ^"
+ * semantics not changed!
+ */
 #define f_1(x6, x5, x4, x3, x2, x1, x0)          \
-           ((x1) & ((x0) ^ (x4)) ^ (x2) & (x5) ^ \
-            (x3) & (x6) ^ (x0))
+           (((x1) & ((x0) ^ (x4))) ^ ((x2) & (x5)) ^ \
+            ((x3) & (x6)) ^ (x0))
 
 #define f_2(x6, x5, x4, x3, x2, x1, x0)                         \
-           ((x2) & ((x1) & ~(x3) ^ (x4) & (x5) ^ (x6) ^ (x0)) ^ \
-            (x4) & ((x1) ^ (x5)) ^ (x3) & (x5) ^ (x0)) 
+           (((x2) & (((x1) & ~(x3)) ^ ((x4) & (x5)) ^ (x6) ^ (x0))) ^ \
+            ((x4) & ((x1) ^ (x5))) ^ ((x3) & (x5)) ^ (x0)) 
 
 #define f_3(x6, x5, x4, x3, x2, x1, x0)          \
-           ((x3) & ((x1) & (x2) ^ (x6) ^ (x0)) ^ \
-            (x1) & (x4) ^ (x2) & (x5) ^ (x0))
+           (((x3) & (((x1) & (x2)) ^ (x6) ^ (x0))) ^ \
+            ((x1) & (x4)) ^ ((x2) & (x5)) ^ (x0))
 
 #define f_4(x6, x5, x4, x3, x2, x1, x0)                                 \
-           ((x4) & ((x5) & ~(x2) ^ (x3) & ~(x6) ^ (x1) ^ (x6) ^ (x0)) ^ \
-            (x3) & ((x1) & (x2) ^ (x5) ^ (x6)) ^                        \
-            (x2) & (x6) ^ (x0))
+           (((x4) & (((x5) & ~(x2)) ^ ((x3) & ~(x6)) ^ (x1) ^ (x6) ^ (x0))) ^ \
+            ((x3) & (((x1) & (x2)) ^ (x5) ^ (x6))) ^                        \
+            ((x2) & (x6)) ^ (x0))
 
 #define f_5(x6, x5, x4, x3, x2, x1, x0)             \
-           ((x0) & ((x1) & (x2) & (x3) ^ ~(x5)) ^   \
-            (x1) & (x4) ^ (x2) & (x5) ^ (x3) & (x6))
+           (((x0) & (((x1) & (x2) & (x3)) ^ ~(x5))) ^   \
+            ((x1) & (x4)) ^ ((x2) & (x5)) ^ ((x3) & (x6)))
 
 /*
  * Permutations phi_{i,j}, i=3,4,5, j=1,...,i.
diff -up trf2.1.3/generic/haval/havaltest.c.haval trf2.1.3/generic/haval/havaltest.c
--- trf2.1.3/generic/haval/havaltest.c.haval	2003-01-20 00:44:48.000000000 -0500
+++ trf2.1.3/generic/haval/havaltest.c	2009-03-06 12:58:51.000000000 -0500
@@ -65,9 +65,8 @@ static char rcsid[] = "$Id: havaltest.c,
 #include <time.h>
 #include <string.h>
 #include <unistd.h>
-/* #include "havalapp.h" */
+#include "havalapp.h"
 #include "haval.h"
-#include "config.h"
 
 /* #define NUMBER_OF_BLOCKS 5000 */               /* number of test blocks */
 /* #define BLOCK_SIZE       5000 */               /* number of bytes in a block */

trf2.1.3-noripemd.patch:

--- NEW FILE trf2.1.3-noripemd.patch ---
diff -up trf2.1.3/configure.in.noripemd trf2.1.3/configure.in
--- trf2.1.3/configure.in.noripemd	2009-03-12 11:59:56.000000000 -0400
+++ trf2.1.3/configure.in	2009-03-12 12:00:09.000000000 -0400
@@ -86,7 +86,6 @@ TEA_ADD_SOURCES([otpcode.c qpcode.c refl
 TEA_ADD_SOURCES([dig_opt.c digest.c])
 TEA_ADD_SOURCES([crc.c crc_zlib.c adler.c])
 TEA_ADD_SOURCES([md5dig.c haval.c sha.c md2.c sha1.c])
-TEA_ADD_SOURCES([rmd160.c rmd128.c])
 TEA_ADD_SOURCES([otpmd5.c otpsha1.c])
 
 TEA_ADD_SOURCES([rs_ecc.c])
diff -up trf2.1.3/configure.noripemd trf2.1.3/configure
--- trf2.1.3/configure.noripemd	2009-03-12 11:59:23.000000000 -0400
+++ trf2.1.3/configure	2009-03-12 11:59:47.000000000 -0400
@@ -6566,7 +6566,7 @@ echo "$as_me: error: could not find sour
 
 
 
-    vars="rmd160.c rmd128.c"
+    vars=""
     for i in $vars; do
 	case $i in
 	    \$*)
diff -up trf2.1.3/DESCRIPTION.noripemd trf2.1.3/DESCRIPTION
--- trf2.1.3/DESCRIPTION.noripemd	2008-12-05 16:00:23.000000000 -0500
+++ trf2.1.3/DESCRIPTION	2009-03-12 11:57:40.000000000 -0400
@@ -26,7 +26,7 @@ extension trf {
     keywords {
 	tcl, conversion, message digests,
 	data compression, error-correction, binary io, crc, md2, md5,
-	sha, sha-1, haval, adler, ripemd-160, dual, hexadecimal, octal,
+	sha, sha-1, haval, adler, dual, hexadecimal, octal,
 	uuencode, base64, ascii85, reed-solomon, zlib, otp_md5, otp_sha1,
 	otp_words
     }
diff -up trf2.1.3/doc/trf.man.noripemd trf2.1.3/doc/trf.man
--- trf2.1.3/doc/trf.man.noripemd	2008-12-05 16:00:23.000000000 -0500
+++ trf2.1.3/doc/trf.man	2009-03-12 11:57:40.000000000 -0400
@@ -102,10 +102,6 @@ The second category are message digests 
 [cmd sha1_otp]
 [enum]
 [cmd haval]
-[enum]
-[cmd ripemd-160]
-[enum]
-[cmd ripemd-128]
 [list_end]
 [nl]
 
@@ -134,7 +130,7 @@ compression, error correction and others
 
 [list_end]
 
-[see_also oct hex oct base64 uuencode ascii85 otp_words quoted-printable crc-zlib crc adler md2 md5 md5_otp sha sha1 sha1_otp haval ripemd-160 ripemd-128 crypt md5crypt transform rs_ecc zip bz2]
+[see_also oct hex oct base64 uuencode ascii85 otp_words quoted-printable crc-zlib crc adler md2 md5 md5_otp sha sha1 sha1_otp haval crypt md5crypt transform rs_ecc zip bz2]
 [keywords transformation encoding {message digest} compression {error correction}]
 [manpage_end]
 
diff -up trf2.1.3/LSM.noripemd trf2.1.3/LSM
--- trf2.1.3/LSM.noripemd	2008-12-05 16:00:23.000000000 -0500
+++ trf2.1.3/LSM	2009-03-12 11:57:40.000000000 -0400
@@ -18,7 +18,7 @@ Description:    A loadable extension to 
 	an official part of the core.
 Keywords:       tcl, conversion, message digests, data compression,
 	error-correction, binary io, crc, md2, md5, sha, sha-1, haval, adler,
-	ripemd-160, dual, hexadecimal, octal, uuencode, base64, ascii85,
+	dual, hexadecimal, octal, uuencode, base64, ascii85,
 	reed-solomon, zlib, otp_md5, otp_sha1, otp_words
 Author:         Andreas Kupries (a.kupries at westend.com)
 Maintained-by:  Andreas Kupries (a.kupries at westend.com)
diff -up trf2.1.3/PREPARE.noripemd trf2.1.3/PREPARE
--- trf2.1.3/PREPARE.noripemd	2008-12-05 16:26:05.000000000 -0500
+++ trf2.1.3/PREPARE	2009-03-12 11:57:40.000000000 -0400
@@ -89,7 +89,7 @@ puts Generating digests (please wait)...
 set files [exec /usr/bin/find . -type f -print]
 regsub -all "\n" $files { } files
 
-foreach md {crc crc-zlib adler md5 sha haval ripemd128 ripemd160} {
+foreach md {crc crc-zlib adler md5 sha haval} {
     puts $md ...
     catch {eval exec md -a $md $files > digests.$md}
 }
diff -up trf2.1.3/tea.tests/common_md.test.noripemd trf2.1.3/tea.tests/common_md.test
--- trf2.1.3/tea.tests/common_md.test.noripemd	2009-03-12 11:58:29.000000000 -0400
+++ trf2.1.3/tea.tests/common_md.test	2009-03-12 11:58:40.000000000 -0400
@@ -13,7 +13,7 @@
 # $Id: common_md.test,v 1.2 2000/11/18 22:42:32 aku Exp $
 
 
-# message digests: adler, crc, crc_zlib, haval, md5, md2, sha, rmd160, rmd128
+# message digests: adler, crc, crc_zlib, haval, md5, md2, sha
 # tests done with builtin digest 'crc'.
 
 foreach {i opt ovalue} {
diff -up trf2.1.3/tea.tests/________.noripemd trf2.1.3/tea.tests/________
--- trf2.1.3/tea.tests/________.noripemd	2008-12-05 16:00:23.000000000 -0500
+++ trf2.1.3/tea.tests/________	2009-03-12 11:57:40.000000000 -0400
@@ -13,7 +13,7 @@
 
 cd ../unix
 
-foreach md {crc crc-zlib adler md5 sha haval ripemd128 ripemd160} {
+foreach md {crc crc-zlib adler md5 sha haval} {
     set fail [catch {
 	exec ./tclsh ../tools/mdwrap -a $md -c digests.$md | sed -e {s/^/	/} >@ stdout
     } msg];#{}
@@ -27,7 +27,7 @@ cd ../tests
 if {0} {
     cd ..
 
-    foreach md {crc crc-zlib adler md5 sha haval ripemd128 ripemd160} {
+    foreach md {crc crc-zlib adler md5 sha haval} {
 	set fail [catch {
 	    exec unix/tclsh tools/md -a $md -c digests.$md | sed -e {s/^/	/} >@ stdout
 	} msg];#{}
diff -up trf2.1.3/tests/common.md.test.noripemd trf2.1.3/tests/common.md.test
--- trf2.1.3/tests/common.md.test.noripemd	2009-03-12 11:58:58.000000000 -0400
+++ trf2.1.3/tests/common.md.test	2009-03-12 11:59:09.000000000 -0400
@@ -14,7 +14,7 @@
 
 if {[string compare test [info procs test]] == 1} then {source defs}
 
-# message digests: adler, crc, crc_zlib, haval, md5, md2, sha, rmd160, rmd128
+# message digests: adler, crc, crc_zlib, haval, md5, md2, sha
 # tests done with builtin digest 'crc'.
 
 foreach {i opt ovalue} {
diff -up trf2.1.3/tests/________.noripemd trf2.1.3/tests/________
--- trf2.1.3/tests/________.noripemd	2008-12-05 16:00:23.000000000 -0500
+++ trf2.1.3/tests/________	2009-03-12 11:57:40.000000000 -0400
@@ -13,7 +13,7 @@
 
 cd ../unix
 
-foreach md {crc crc-zlib adler md5 sha haval ripemd128 ripemd160} {
+foreach md {crc crc-zlib adler md5 sha haval} {
     set fail [catch {
 	exec ./tclsh ../tools/mdwrap -a $md -c digests.$md | sed -e {s/^/	/} >@ stdout
     } msg];#{}
@@ -27,7 +27,7 @@ cd ../tests
 if {0} {
     cd ..
 
-    foreach md {crc crc-zlib adler md5 sha haval ripemd128 ripemd160} {
+    foreach md {crc crc-zlib adler md5 sha haval} {
 	set fail [catch {
 	    exec unix/tclsh tools/md -a $md -c digests.$md | sed -e {s/^/	/} >@ stdout
 	} msg];#{}
diff -up trf2.1.3/tools/md.noripemd trf2.1.3/tools/md
--- trf2.1.3/tools/md.noripemd	2008-12-05 16:00:23.000000000 -0500
+++ trf2.1.3/tools/md	2009-03-12 11:57:40.000000000 -0400
@@ -41,7 +41,7 @@ proc usage {args} {
     puts stdout "\t-c file\t\tenter check mode, read data from file"
     puts stdout "\t-a alg\t\tuse specified algorithm to generate/check digests"
     puts stdout ""
-    puts stdout "\tallowed algorithms are: md5, haval, sha, crc, crc-zlib, adler, ripemd160, ripemd128"
+    puts stdout "\tallowed algorithms are: md5, haval, sha, crc, crc-zlib, adler"
     puts stdout ""
 
     exit


Index: sources
===================================================================
RCS file: /cvs/pkgs/rpms/tcl-trf/F-9/sources,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- sources	13 Mar 2009 13:58:06 -0000	1.1
+++ sources	13 Mar 2009 14:05:27 -0000	1.2
@@ -0,0 +1,2 @@
+95f63280f1a71a3e7a041fcb148bea52  haval-1.1.tar.gz
+00113b594c6cc32b76096b7bb11534be  trf2.1.3-noripemd.tar.bz2




More information about the fedora-extras-commits mailing list