harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r389748 - in /incubator/harmony/enhanced/classlib/trunk/make: depends.properties depends.xml
Date Wed, 29 Mar 2006 10:39:16 GMT
Author: tellison
Date: Wed Mar 29 02:39:16 2006
New Revision: 389748

URL: http://svn.apache.org/viewcvs?rev=389748&view=rev
Log:
Apply patch HARMONY-270 (The make/depends.xml download target should verify checksums of downloaded
files)

Modified:
    incubator/harmony/enhanced/classlib/trunk/make/depends.properties
    incubator/harmony/enhanced/classlib/trunk/make/depends.xml

Modified: incubator/harmony/enhanced/classlib/trunk/make/depends.properties
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/depends.properties?rev=389748&r1=389747&r2=389748&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/depends.properties (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/depends.properties Wed Mar 29 02:39:16
2006
@@ -24,22 +24,28 @@
 xalan.dir=${depends.jars}/xalan-j_2.6.0
 xalan.jar=${xalan.dir}/xalan.jar
 xalan.url=${ibiblio.base}/maven/xalan/jars/xalan-2.6.0.jar
+xalan.md5=d4b8027f3c933e3ddea6051044245f1d
 
 xerces.dir=${depends.jars}/xerces_2.6.2
 resolver.jar=${xerces.dir}/resolver.jar
 resolver.url=${ibiblio.base}/maven/xml-resolver/jars/xml-resolver-1.1.jar
+resolver.md5=39546d6a7f9cf0fd971874d43214dbe4
 
 xerces.impl.jar=${xerces.dir}/xercesImpl.jar
 xerces.impl.url=${ibiblio.base}/pub/packages/maven2/xerces/xercesImpl/2.6.2/xercesImpl-2.6.2.jar
+xerces.impl.md5=c4c5a77f9e61f33d80780176451d71c2
 
 xml.apis.jar=${xerces.dir}/xml-apis.jar
 xml.apis.url=${ibiblio.base}/maven/xml-apis/jars/xml-apis-1.0.b2.jar
+xml.apis.md5=458715c0f7646a56b1c6ad3138098beb
 
 junit.dir=${depends.jars}/junit_3.8.1
 junit.jar=${junit.dir}/junit.jar
 junit.url=${ibiblio.base}/maven/junit/jars/junit-3.8.1.jar
+junit.md5=1f40fb782a4f2cf78f161d32670f7a3a
 
 bcprov.dir=${depends.jars}/bcprov-jdk14-131
 bcprov.jar=${bcprov.dir}/bcprov.jar
 signed.bcprov.jar=${bcprov.dir}/signed.bcprov.jar
+signed.bcprov.md5=a0c7889452d8b1ab430c1c4404358ef0
 bcprov.url=http://www.bouncycastle.org/download/bcprov-jdk14-131.jar

Modified: incubator/harmony/enhanced/classlib/trunk/make/depends.xml
URL: http://svn.apache.org/viewcvs/incubator/harmony/enhanced/classlib/trunk/make/depends.xml?rev=389748&r1=389747&r2=389748&view=diff
==============================================================================
--- incubator/harmony/enhanced/classlib/trunk/make/depends.xml (original)
+++ incubator/harmony/enhanced/classlib/trunk/make/depends.xml Wed Mar 29 02:39:16 2006
@@ -68,43 +68,73 @@
 		<antcall target="download-one-jar">
 			<param name="src" value="${xalan.url}" />
 			<param name="dest" value="${xalan.jar}" />
+                        <param name="md5" value="${xalan.md5}" />
 		</antcall>
 
 		<mkdir dir="${xerces.dir}" />
 		<antcall target="download-one-jar">
 			<param name="src" value="${resolver.url}" />
 			<param name="dest" value="${resolver.jar}" />
+                        <param name="md5" value="${resolver.md5}" />
 		</antcall>
 
 		<antcall target="download-one-jar">
 			<param name="src" value="${xerces.impl.url}" />
 			<param name="dest" value="${xerces.impl.jar}" />
+                        <param name="md5" value="${xerces.impl.md5}" />
 		</antcall>
 
 		<antcall target="download-one-jar">
 			<param name="src" value="${xml.apis.url}" />
 			<param name="dest" value="${xml.apis.jar}" />
+                        <param name="md5" value="${xml.apis.md5}" />
 		</antcall>
 
 		<mkdir dir="${junit.dir}" />
 		<antcall target="download-one-jar">
 			<param name="src" value="${junit.url}" />
 			<param name="dest" value="${junit.jar}" />
+                        <param name="md5" value="${junit.md5}" />
 		</antcall>
 
 		<mkdir dir="${bcprov.dir}" />
 		<antcall target="download-one-jar">
 			<param name="src" value="${bcprov.url}" />
 			<param name="dest" value="${signed.bcprov.jar}" />
+                        <param name="md5" value="${signed.bcprov.md5}" />
 		</antcall>
 	</target>
 
 	<target name="download-one-jar">
-		<get src="${src}" dest="${dest}" usetimestamp="true" verbose="true" />
+		<get src="${src}" dest="${dest}" usetimestamp="true"
+                     verbose="true" />
+                <checksum file="${dest}" property="new.md5" />
+                <condition property="md5.verified" value="true">
+                        <equals arg1="${new.md5}"
+                                arg2="${md5}" />
+                </condition>
+                <antcall target="remove-bad-jar">
+                        <param name="jar" value="${dest}" />
+                </antcall>
+		<fail unless="md5.verified">
+...
+
+File ${dest} has incorrect md5 checksum.  Expected:
+  ${md5}
+found:
+  ${new.md5}
+
+                </fail>
+                <echo>Checksum verified (${md5.verified})</echo>
 	</target>
 
+        <target name="remove-bad-jar" unless="md5.verified">
+                <delete file="${dest}" />
+        </target>
+
 	<target name="check-one-jar">
-		<available file="${dest}" type="file" property="${dest}.exists" />
+		<available file="${dest}" type="file"
+                           property="${dest}.exists" />
 		<fail>
 			<condition>
 				<not>



Mime
View raw message