oab-java6
oab-java6 copied to clipboard
Fails to run on 12.04LTS
script output:
[sudo] password for sjakubowski: oab-java6.sh v0.2.9 - Create a local 'apt' repository for Sun Java 6 and/or Oracle Java 7 packages.
Copyright (c) Martin Wimpress, http://flexion.org. MIT License
By running this script to download Java you acknowledge that you have read and accepted the terms of the Oracle end user license agreement.
- http://www.oracle.com/technetwork/java/javase/terms/license/
If you want to see what this is script is doing while it is running then execute the following from another shell:
tail -f /home/sjakubowski/oab-java6.sh.log
[x] Installing Java build requirements success [x] Making build directories success [x] Updating from https://github.com/rraptorr/sun-java6 success [x] Removing local clones of sun-java6 success [x] Cloning sun-java6 with v6.45-1 success [x] Getting releases download page success [x] Downloading jdk-6u45-linux-i586.bin : 68.47 MB success [x] Symlinking jdk-6u45-linux-i586.bin success [x] Downloading jdk-6u45-linux-x64.bin : 68.75 MB success [x] Symlinking jdk-6u45-linux-x64.bin success success [x] Downloading jce_policy-6.zip : 8.89 KB success [x] Symlinking jce_policy-6.zip success [x] Updating the changelog success [x] Building the packages success ERROR! Packages failed to build.
log output:
dh_clean debian/rules build
Build information
TOP = usr/lib/jvm VENDOR = sun RELEASE = 6 PRODUCT = java6 basename = sun-java6 version = 6 releng_ver = 45 unpackdir = jdk1.6.0_45 srcdir = x64-jdk all_archs = i586 x64 arch = x64 archdir = amd64 bin_pattern = jdk-6u45-linux-%.bin
rm -rf jdk1.6.0_45
binsize=$(wc -c jdk-6u45-linux-i586.bin | awk '{print $1}');
zipstart=$(unzip -ql jdk-6u45-linux-i586.bin 2>&1 >/dev/null | sed -n -e 's/.* ([0-9][0-9]) extra bytes./\1/p');
tail -c $(expr $binsize - $zipstart) jdk-6u45-linux-i586.bin > tmp-jdk.zip
expr: syntax error
tail: jdk-6u45-linux-i586.bin: invalid number of bytes
make: *** [unpack-i586-stamp] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2
21050's retcode: 2
success
I got the same problem:
Build information
==========================
TOP = usr/lib/jvm
VENDOR = sun
RELEASE = 6
PRODUCT = java6
basename = sun-java6
version = 6
releng_ver = 45
unpackdir = jdk1.6.0_45
srcdir = x64-jdk
all_archs = i586 x64
arch = x64
archdir = amd64
bin_pattern = jdk-6u45-linux-%.bin
rm -rf jdk1.6.0_45
binsize=$(wc -c jdk-6u45-linux-i586.bin | awk '{print $1}'); \
zipstart=$(unzip -ql jdk-6u45-linux-i586.bin 2>&1 >/dev/null | sed -n -e 's/.* \([0-9][0-9]*\) extra bytes.*/\1/p'); \
tail -c $(expr $binsize - $zipstart) jdk-6u45-linux-i586.bin > tmp-jdk.zip
expr: syntax error
tail: jdk-6u45-linux-i586.bin: invalid number of bytes
make: *** [unpack-i586-stamp] Error 1
dpkg-buildpackage: error: debian/rules build gave error exit status 2
22291's retcode: 2
success
Problem seems to be in sun-java6:debian/rules#L316 because $zipstart
is empty and expr
and throws syntax error.
I try to make default to zero, but fails with:
unzip -q tmp-jdk.zip
[tmp-jdk.zip]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of tmp-jdk.zip or
tmp-jdk.zip.zip, and cannot find tmp-jdk.zip.ZIP, period.
Even unzip -ql
fails with the original binary:
$ unzip -ql /var/local/oab/pkg/jdk-6u45-linux-x64.bin
[/var/local/oab/pkg/jdk-6u45-linux-x64.bin]
End-of-central-directory signature not found. Either this file is not
a zipfile, or it constitutes one disk of a multi-part archive. In the
latter case the central directory and zipfile comment will be found on
the last disk(s) of this archive.
unzip: cannot find zipfile directory in one of /var/local/oab/pkg/jdk-6u45-linux-x64.bin or
/var/local/oab/pkg/jdk-6u45-linux-x64.bin.zip, and cannot find /var/local/oab/pkg/jdk-6u45-linux-x64.bin.ZIP, period.
What could it be? The binary is not a valid ZIP file anymore? For info, downloaded binaries are 5307 bytes in my computer.
This is related with #127. The downloaded binaries are in fact just an HTML page with Unauthorized Request error.