[Lunar-commits] <moonbase> sun-jdk: updated to 7u5 sha chksum verification added

Zbigniew Luszpinski zbiggy at lunar-linux.org
Tue Jun 12 20:43:22 CEST 2012


commit 43925ab900c787b18fc529a0bb8f500426e97a36
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Tue Jun 12 20:43:22 2012 +0200

    sun-jdk: updated to 7u5 sha chksum verification added
---
 compilers/sun-jdk/DETAILS   |    6 +++---
 compilers/sun-jdk/PRE_BUILD |   33 ++++++++++++++++++++++++---------
 2 files changed, 27 insertions(+), 12 deletions(-)

diff --git a/compilers/sun-jdk/DETAILS b/compilers/sun-jdk/DETAILS
index fa09ca9..3cd67c8 100644
--- a/compilers/sun-jdk/DETAILS
+++ b/compilers/sun-jdk/DETAILS
@@ -1,7 +1,7 @@
           MODULE=sun-jdk
-         VERSION=7u4
-        FVERSION=$VERSION-b20
-        DVERSION=1.7.0_04
+         VERSION=7u5
+        FVERSION=$VERSION-b05
+        DVERSION=1.7.0_05
 SOURCE_DIRECTORY=$BUILD_DIRECTORY/jdk$DVERSION
         WEB_SITE=http://www.oracle.com/technetwork/java/javase/downloads/index.html
          LICENSE="proprietary"
diff --git a/compilers/sun-jdk/PRE_BUILD b/compilers/sun-jdk/PRE_BUILD
index 850cb82..b8a769c 100644
--- a/compilers/sun-jdk/PRE_BUILD
+++ b/compilers/sun-jdk/PRE_BUILD
@@ -7,18 +7,33 @@ else
    bits=i586
 fi &&
 
-JDK_ARCHIVE=jdk-${VERSION}-linux-$bits.tar.gz &&
+JDK_ARCHIVE=jdk-$VERSION-linux-$bits.tar.gz &&
 JDK_POLICY=UnlimitedJCEPolicyJDK7.zip &&
 
-wget -c --header "Cookie: gpw_e24=a" http://download.oracle.com/otn-pub/java/jdk/${FVERSION}/${JDK_ARCHIVE} &&
-wget -c --header "Cookie: gpw_e24=a" http://download.oracle.com/otn-pub/java/jce/7/${JDK_POLICY} &&
+wget -c --header "Cookie: gpw_e24=a" http://download.oracle.com/otn-pub/java/jdk/$FVERSION/$JDK_ARCHIVE &&
+wget -c --header "Cookie: gpw_e24=a" http://download.oracle.com/otn-pub/java/jce/7/$JDK_POLICY &&
 
-cd $BUILD_DIRECTORY &&
-
-tar -xzpvf $SOURCE_CACHE/${JDK_ARCHIVE} &&
+JCE_SHA1_VFY="7d3c9ee89536b82cd21c680088b1bced16017253  $JDK_POLICY" &&
+JCE_SHA1_TST=`sha1sum $JDK_POLICY` &&
+if [ "$JCE_SHA1_VFY" != "$JCE_SHA1_TST" ]; then
+message "Bad checksum of $JDK_POLICY file - deleting"
+rm -f $JDK_POLICY
+exit 1
+fi &&
+if [ "$bits" = i586 ]; then
+JDK_SHA1_VFY="faf6753458e6baeefcad7d365ef07e35ceb6f2a4  $JDK_ARCHIVE"
+else
+JDK_SHA1_VFY="4de692ac6fec1c97424b28f53ee8e2fdadfdb6a3  $JDK_ARCHIVE"
+fi &&
+JDK_SHA1_TST=`sha1sum $JDK_ARCHIVE` &&
+if [ "$JDK_SHA1_VFY" != "$JDK_SHA1_TST" ]; then
+message "Bad checksum of $JDK_ARCHIVE file - deleting"
+rm -f $JDK_ARCHIVE
+exit 1
+fi &&
 
+cd $BUILD_DIRECTORY &&
+tar -xzpvf $SOURCE_CACHE/$JDK_ARCHIVE &&
 cd $SOURCE_DIRECTORY/jre/lib/security &&
-
-unzip $SOURCE_CACHE/${JDK_POLICY} &&
-
+unzip $SOURCE_CACHE/$JDK_POLICY &&
 cd "$CURDIR"


More information about the Lunar-commits mailing list