Ignore:
Timestamp:
Dec 15, 2017, 12:43:34 PM (2 years ago)
Author:
mabarracus
Message:

Package Java 8u151

File:
1 edited

Legend:

Unmodified
Added
Removed
  • oracle-java8-installer/trunk/fuentes/debian/oracle-java8-installer.postinst

    r2122 r6493  
    1212
    1313set -e
    14 
    1514VER='0.6alpha'
    1615
    1716case $(dpkg --print-architecture) in
    1817'i386'|'i586'|'i686') arch=i386; dld=i586;
    19   SHA256SUM_TGZ="7203592329877735bb6259844a3a30640edc61920d132f952c40ab2e2014b224" #must be modified for each release
    20   ;; 
     18  SHA256SUM_TGZ="8062f34f69dd1f1991bff517df52da606c53f5fa0d6677ceb46df30e93b53a70" #must be modified for each release
     19  ;;
    2120'amd64'  ) arch=amd64; dld=x64;
    22   SHA256SUM_TGZ="79a3f25e9b466cb9e969d1772ea38550de320c88e9119bf8aa11ce8547c39987" #must be modified for each release
    23   ;;
    24 arm*      )
    25   arch=arm
    26         if [ `uname -m` = "armv7l" ] || [ `uname -m` = "armv6l" ]; then
    27                 if [ -x /usr/bin/readelf ] ; then
    28                         HARDFLOAT=`readelf -A /proc/self/exe | grep Tag_ABI_VFP_args`
    29                         if [ -z "$HARDFLOAT" ]; then
    30                                 # Softfloat
    31                                 echo "Oracle Java 8 doesn't support ARM v6/v7 softfloat ABI."
    32                                 #dld='arm-vfp-sflt'
    33                                 #SHA256SUM_TGZ="5026a8f2eea8d350ea6ed7cfb8496b571ec9c1e43db82750a3ca8dc02569076e"
    34                         else
    35                                 # Hardfloat
    36                                 dld='arm32-vfp-hflt'
    37                                 SHA256SUM_TGZ="35855580355584865bade416d23cc164792d7fa2581a140e6034724c520be45c" #must be modified for each release
    38                         fi
    39                 fi
    40         elif [ `uname -m` = "armv8l" ] || [ `uname -m` = "arm64" ] || [ `uname -m` = "aarch64" ]; then
    41                 dld='arm64-vfp-hflt'
    42                 SHA256SUM_TGZ="29ead39d88c2fbf5eebf126ded24c2a129227a3ae9f255f1b5688a2403912527" #must be modified for each release
    43         else
    44                 echo "Oracle JDK 8 only supports ARM v6/v7/v8 hardfloat."
    45                 arch=''
    46         fi
    47         ;;
     21  SHA256SUM_TGZ="c78200ce409367b296ec39be4427f020e2c585470c4eed01021feada576f027f" #must be modified for each release
     22  ;;
    4823*         )
    4924    echo "Please report to author unsupported platform '`uname -m`'.";
     
    5530
    5631if [ ! $arch = "arm" ]; then
    57         JAVA_VERSION=8u92 #must be modified for each release jdk-8u5-linux-x64.tar.gz
    58         J_DIR=jdk1.8.0_92 #must be modified for each release
     32        JAVA_VERSION=8u151 #must be modified for each release jdk-8u5-linux-x64.tar.gz
     33        J_DIR=jdk1.8.0_151 #must be modified for each release
    5934        FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
    60         PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u92-b14/$FILENAME #must be modified for each release
    61         for JAVA_VERSION_OLD2 in `seq 1 91`; do #must be modified for each release
     35        #PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u151-b12/$FILENAME #must be modified for each release
     36        for JAVA_VERSION_OLD2 in `seq 1 150`; do #must be modified for each release
    6237           FILENAMES_OLD2="jdk-8u${JAVA_VERSION_OLD2}-linux-${dld}*.tar.gz $FILENAMES_OLD2"
    6338        done
    64 else
    65         JAVA_VERSION=8u65 #must be modified for each release jdk-8-linux-arm-vfp-hflt.tar.gz
    66         J_DIR=jdk1.8.0_65 #must be modified for each release
    67         FILENAME=jdk-${JAVA_VERSION}-linux-${dld}.tar.gz
    68         PARTNER_URL=http://download.oracle.com/otn-pub/java/jdk/8u65-b17/$FILENAME #must be modified for each release
    69         for JAVA_VERSION_OLD1 in `seq 1 64`; do #must be modified for each release
    70                 FILENAMES_OLD1="jdk-8u${JAVA_VERSION_OLD1}-linux-${dld}*.tar.gz $FILENAMES_OLD1 jdk-8-*.tar.gz"
    71         done
    72 fi
    73 
    74 for JAVA_VERSION_OLD in `seq 53 132`; do #must be modified for each release
    75   FILENAMES_OLD="jdk-8-ea-bin-b${JAVA_VERSION_OLD}-linux-${dld}-*.tar.gz $FILENAMES_OLD" #old name
    76   FILENAMES_OLD_N="jdk-8-fcs-bin-b${JAVA_VERSION_OLD}-linux-${dld}*.tar.gz $FILENAMES_OLD_N" #new name
    77   FILENAMES_OLD_NA="jdk-8-fcs-b${JAVA_VERSION_OLD}-linux-${dld}*.tar.gz $FILENAMES_OLD_NA" #arm
    78 done
    79 
     39fi
    8040J_INSTALL_DIR=/usr/lib/jvm/java-8-oracle
    8141
     
    10464}
    10565
    106 fp_download_and_unpack() {
    107 
    108         cd /var/cache/oracle-jdk8-installer
    109 
    110         db_get oracle-java8-installer/local
    111         if [ -d "$RET" -a -f "$RET"/$FILENAME ]; then
    112 
    113                 echo "Installing from local file $RET/$FILENAME"
    114                 cp -f -p "$RET"/$FILENAME ${FILENAME}_TEMP
    115                 mv -f ${FILENAME}_TEMP $FILENAME
    116         else # no local file
    117 
    118                 # use apt proxy
    119                 APT_PROXIES=$(apt-config shell \
    120                 http_proxy Acquire::http::Proxy \
    121                 https_proxy Acquire::https::Proxy \
    122                 ftp_proxy Acquire::ftp::Proxy \
    123                 dl_direct Acquire::http::Proxy::download.oracle.com \
    124                 dl_direct Acquire::http::Proxy::*.java.net \
    125                 )
    126 
    127                 if [ -n "$APT_PROXIES" ]; then
    128                         eval export $APT_PROXIES
    129                 fi
    130 
    131     if [ "$dl_direct" = "DIRECT" ]; then
    132         unset http_proxy
    133         unset https_proxy
    134         unset ftp_proxy
    135     fi
    136 
    137                 # setting wget options
    138                 :> wgetrc
    139                 echo "noclobber = off" >> wgetrc
    140                 echo "dir_prefix = ." >> wgetrc
    141                 echo "dirstruct = off" >> wgetrc
    142                 echo "verbose = on" >> wgetrc
    143                 echo "progress = dot:mega" >> wgetrc
    144                 echo "tries = 5" >> wgetrc
    145 
    146                 # downloading jdk8
    147                 echo "Downloading Oracle Java 8..."
    148                 WGETRC=wgetrc wget --continue --no-check-certificate -O $FILENAME --header "Cookie: oraclelicense=a" $PARTNER_URL \
    149                         || fp_exit_with_error "download failed"
    150                 echo "Download done."
    151 
    152 
    153         fi # end if local file
    154 
    155         # Removing outdated cached downloads
    156         echo "Removing outdated cached downloads..."
    157         rm -vf $FILENAMES_OLD
    158         rm -vf $FILENAMES_OLD1
    159         rm -vf $FILENAMES_OLD2
    160         rm -vf $FILENAMES_OLD_N
    161         rm -vf $FILENAMES_OLD_NA
    162         if [ ! $arch = "arm" ]; then
    163                 rm -vf jdk-8-linux* #temp
    164         fi
    165 
    166         # verify SHA256 checksum of (copied or downloaded) tarball
    167         rm -rf jdk*/
    168         echo "$SHA256SUM_TGZ  $FILENAME" | sha256sum -c > /dev/null 2>&1 \
    169                 || fp_exit_with_error "sha256sum mismatch $FILENAME"
    170 
    171         # unpacking and checking the plugin
    172         tar xzf $FILENAME || fp_exit_with_error "cannot unpack jdk8"
    173 }
    174 
    17566OLDDIR=/usr/lib/oracle-jdk8-installer-unpackdir
    17667NEWDIR=/var/cache/oracle-jdk8-installer
     
    18172}
    18273
    183 # Lliurex -----------------------------------05/11/2013
    184 #Comentar descarga y copiar desde directorio
    185 #fp_download_and_unpack
     74
     75# lliurex LLIUREX CHANGES
     76
    18677ORACLE_DIR=/var/cache/oracle-jdk8-installer
    18778cd $ORACLE_DIR
    18879tar xzf $FILENAME || fp_exit_with_error "cannot unpack jdk8"
    189 # FIN Lliurex -------------------------------05/11/2013
     80
     81# LLX DONE
    19082
    19183# Copy JDK to the right dir
Note: See TracChangeset for help on using the changeset viewer.