[Lunar-commits] <moonbase> sun-jre: use license less download from java.com, add checksum check

Zbigniew Luszpinski zbiggy at lunar-linux.org
Thu May 10 02:06:33 CEST 2012


commit e218a3d3f20852c8bc6df56a903f70e5c8cd5afb
Author: Zbigniew Luszpinski <zbiggy at lunar-linux.org>
Date:   Thu May 10 02:06:33 2012 +0200

    sun-jre: use license less download from java.com, add checksum check
---
 compilers/sun-jre/DETAILS        |    5 ++++-
 compilers/sun-jre/DETAILS.x86_64 |   20 ++++++++++++++++++++
 compilers/sun-jre/PRE_BUILD      |   29 ++++++++++-------------------
 3 files changed, 34 insertions(+), 20 deletions(-)

diff --git a/compilers/sun-jre/DETAILS b/compilers/sun-jre/DETAILS
index 4b739c1..c4cf5c1 100644
--- a/compilers/sun-jre/DETAILS
+++ b/compilers/sun-jre/DETAILS
@@ -2,11 +2,14 @@
          VERSION=7u4
         FVERSION=$VERSION-b20
         DVERSION=1.7.0_04
+          SOURCE=jre-$VERSION-linux-i586.tar.gz
+      SOURCE_URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=63202&/"
+      SOURCE_VFY=sha1:3b57a2ca8ba561fde4a71ce9e7bb540c595d5f2b
 SOURCE_DIRECTORY=$BUILD_DIRECTORY/jre$DVERSION
         WEB_SITE=http://www.oracle.com/technetwork/java/javase/downloads/index.html
          LICENSE="proprietary"
          ENTERED=20061113
-         UPDATED=20120505
+         UPDATED=20120509
            FUZZY=off
        LDD_CHECK=off
          ARCHIVE=off
diff --git a/compilers/sun-jre/DETAILS.x86_64 b/compilers/sun-jre/DETAILS.x86_64
new file mode 100644
index 0000000..b5e071f
--- /dev/null
+++ b/compilers/sun-jre/DETAILS.x86_64
@@ -0,0 +1,20 @@
+          MODULE=sun-jre
+         VERSION=7u4
+        FVERSION=$VERSION-b20
+        DVERSION=1.7.0_04
+          SOURCE=jre-$VERSION-linux-x64.tar.gz
+      SOURCE_URL="http://javadl.sun.com/webapps/download/AutoDL?BundleId=63204&/"
+      SOURCE_VFY=sha1:7b928735d9b47d5c4c7120640b193220109f62e2
+SOURCE_DIRECTORY=$BUILD_DIRECTORY/jre$DVERSION
+        WEB_SITE=http://www.oracle.com/technetwork/java/javase/downloads/index.html
+         LICENSE="proprietary"
+         ENTERED=20061113
+         UPDATED=20120509
+           FUZZY=off
+       LDD_CHECK=off
+         ARCHIVE=off
+           SHORT="SUN java runtime environment"
+cat << EOF
+sun-jre is only the run time environment, should be sufficient for
+most users.
+EOF
diff --git a/compilers/sun-jre/PRE_BUILD b/compilers/sun-jre/PRE_BUILD
index 4d126e0..6d1c6a4 100644
--- a/compilers/sun-jre/PRE_BUILD
+++ b/compilers/sun-jre/PRE_BUILD
@@ -1,24 +1,15 @@
+default_pre_build &&
 CURDIR="`pwd`" &&
 cd $SOURCE_CACHE &&
-
-if [ "$(arch)" == "x86_64" ]; then
-   bits=x64
-else
-   bits=i586
+JDK_POLICY=UnlimitedJCEPolicyJDK7.zip &&
+wget -c --header "Cookie: gpw_e24=a" http://download.oracle.com/otn-pub/java/jce/7/$JDK_POLICY &&
+JCE_SHA1_VFY='7d3c9ee89536b82cd21c680088b1bced16017253  UnlimitedJCEPolicyJDK7.zip' &&
+JCE_SHA1_TST=`sha1sum UnlimitedJCEPolicyJDK7.zip` &&
+if [ "$JCE_SHA1_VFY" != "$JCE_SHA1_TST" ]; then
+message "Bad checksum of $JDK_POLICY file - deleting"
+rm -f $JDK_POLICY
+exit 1
 fi &&
-
-JRE_ARCHIVE=jre-${VERSION}-linux-$bits.tar.gz &&
-JCE_POLICY=UnlimitedJCEPolicyJDK7.zip &&
-
-wget -c --header "Cookie: gpw_e24=a" http://download.oracle.com/otn-pub/java/jdk/${FVERSION}/${JRE_ARCHIVE} &&
-wget -c --header "Cookie: gpw_e24=a" http://download.oracle.com/otn-pub/java/jce/7/${JCE_POLICY} &&
-
-cd $BUILD_DIRECTORY &&
-
-tar -xzpvf $SOURCE_CACHE/${JRE_ARCHIVE} &&
-
 cd $SOURCE_DIRECTORY/lib/security &&
-
-unzip $SOURCE_CACHE/${JCE_POLICY} &&
-
+unzip $SOURCE_CACHE/$JDK_POLICY &&
 cd "$CURDIR"


More information about the Lunar-commits mailing list