git.iko.soy/typeable/nixpkgs
on master help sign in
jdkdistro: remove oraclejdk6, not maintained anymore
commit0ccb59b5622833fafbaec6b0fe8bfcd13b821c70 authorFranz Pletz <fpletz@fnordicwalking.de> dateMon 26 Sep 2016, 13:25 (10 years ago) parentfb8e541
3 files changed+1−363
pkgs/development/compilers/oraclejdk/jdk6-construct.sh−273 pkgs/development/compilers/oraclejdk/jdk6-linux.nix−84 pkgs/top-level/all-packages.nix+1−6
pkgs/development/compilers/oraclejdk/jdk6-construct.shdeleted−273
@@ -1,273 +0,0 @@
1−#!/bin/bash
2−# construct.sh
3−# example construction of JRE and JDK directories from the DLJ bundles
4−#
5−# Copyright � 2006 Sun Microsystems, Inc.
6−#
7−# Permission is hereby granted, free of charge, to any person obtaining
8−# a copy of this software and associated documentation files (the
9−# "Software"), to deal in the Software without restriction, including
10−# without limitation the rights to use, copy, modify, merge, publish,
11−# distribute, sublicense, and/or sell copies of the Software, and to
12−# permit persons to whom the Software is furnished to do so, subject to
13−# the following conditions:
14−#
15−# The above copyright notice and this permission notice shall be
16−# included in all copies or substantial portions of the Software.
17−#
18−# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
19−# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
20−# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
21−# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
22−# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
23−# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
24−# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
25−#
26−# Sun, Sun Microsystems, the Sun logo and Java, Java HotSpot,
27−# and JVM trademarks or registered trademarks of Sun Microsystems,
28−# Inc. in the U.S. and other countries.
29−
30−
31−program=`basename $0`
32−
33−usage () {
34− echo "usage: ${program} path/to/unbundle-jdk path/to/linux-jdk path/to/linux-jre"
35−}
36−
37−getargs() {
38− undir=$1
39− jdkdir=$2
40− jredir=$3
41− if [ ! -d $undir ]; then
42− echo "${program}: unbundle directory not found: $undir"
43− exit 2
44− fi
45− # make sure javahome is the JDK
46− javahome=`echo $undir/*/db/demo`
47− if [ ! -d $javahome ]; then
48− echo "${program}: unbundle directory incorrect: $undir"
49− echo " expecting $undir/jdk1.5.0_xx"
50− exit 2
51− else
52− javahome=$(dirname $(dirname $javahome))
53− fi
54− # verify JDK dir
55− jdkdirp=`dirname $jdkdir`
56− jdkbase=`basename $jdkdir`
57− if [ ! -d $jdkdirp ]; then
58− echo "${program}: parent directory for JDK does not exist: $jdkdirp"
59− exit 2
60− fi
61− savedir=`pwd`
62− cd $jdkdirp
63− jdkdirp=`pwd`
64− cd $savedir
65− jdkdir=$jdkdirp/$jdkbase
66− # verify JRE dir
67− jredirp=`dirname $jredir`
68− jrebase=`basename $jredir`
69− if [ ! -d $jredirp ]; then
70− echo "${program}: parent directory for JRE does not exist: $jredirp"
71− exit 2
72− fi
73− savedir=`pwd`
74− cd $jredirp
75− jredirp=`pwd`
76− cd $savedir
77− jredir=$jredirp/$jrebase
78−}
79−
80−checkfiles() {
81− if [ -r $jdkdir ]; then
82− echo "${program}: directory for JDK already exists: $jdkdir"
83− exit 2
84− fi
85− if [ -r $jredir ]; then
86− echo "${program}: directory for JRE already exists: $jredir"
87− exit 2
88− fi
89−}
90−
91−copytree() {
92− echo "copying over the JDK tree..."
93− cp -a $javahome $jdkdir
94−}
95−
96−linkrel() {
97− target=$1
98− link=$2
99− # make a softlink from the $link to the $target
100− # make this a relative link
101− targetb=(`echo $target | tr '/' ' '`)
102− linkb=(`echo $link | tr '/' ' '`)
103− (( n = ${#targetb[*]} ))
104− (( m = ${#linkb[*]} ))
105− c=$n # common length
106− if [ $m -lt $c ]; then
107− (( c = m ))
108− fi
109− for (( i = 0 ; i < c ; i++ )); do
110− if [ ${targetb[$i]} != ${linkb[$i]} ]; then
111− # echo components differ, stopping
112− break
113− fi
114− done
115− rel=""
116− for (( j = i + 1; j < m ; j++ )); do
117− if [ -z $rel ]; then
118− rel=".."
119− else
120− rel="$rel/.."
121− fi
122− done
123− for (( j = i; j < n ; j++ )); do
124− if [ -z $rel ]; then
125− rel=${targetb[$j]}
126− else
127− rel="$rel/${targetb[$j]}"
128− fi
129− done
130− ln -s $rel $link
131−}
132−
133−createjre() {
134− echo "creating JRE directory..."
135− # absolute link
136− # ln -s $jdkdir/jre $jredir
137− # relative link
138− linkrel $jdkdir/jre $jredir
139−}
140−
141−unpackjars() {
142− echo "unpacking jars..."
143− unpack200=$jdkdir/bin/unpack200
144− if [ ! -x $unpack200 ]; then
145− echo "${program}: file missing $unpack200"
146− exit 1
147− fi
148− cd $jdkdir
149− PACKED_JARS=`find . -name '*.pack'`
150− for i in $PACKED_JARS; do
151− # echo $i
152− jdir=`dirname $i`
153− jbase=`basename $i .pack`
154− if ! $unpack200 $jdkdir/$jdir/$jbase.pack $jdkdir/$jdir/$jbase.jar; then
155− echo "${program}: error unpacking $jdkdir/$jdir/$jbase.jar"
156− fi
157− if [ ! -r $jdkdir/$jdir/$jbase.jar ]; then
158− echo "${program}: missing $jdkdir/$jdir/$jbase.jar"
159− else
160− echo " $jdir/$jbase.jar"
161− # remove pack file
162− rm $jdkdir/$jdir/$jbase.pack
163− fi
164− done
165−}
166−
167−preparecds() {
168− # if this is a client installation...
169− compiler="`$jdkdir/bin/java -client -version 2>&1 | tail -n +3 | cut -d' ' -f1-4`"
170− if [ "X$compiler" = "XJava HotSpot(TM) Client VM" ]; then
171− # create the CDS archive
172− echo "creating the class data sharing archive..."
173− if ! $jdkdir/bin/java -client -Xshare:dump > /dev/null 2>&1; then
174− echo "returned error code $?"
175− fi
176− fi
177−}
178−
179−jreman () {
180− echo "setting up the JRE man pages..."
181− # note this list is slightly different for OpenSolaris bundles
182− jreman=/tmp/jre.man.txt
183−cat <<EOF > $jreman
184−man/ja_JP.eucJP/man1/java.1
185−man/ja_JP.eucJP/man1/javaws.1
186−man/ja_JP.eucJP/man1/keytool.1
187−man/ja_JP.eucJP/man1/orbd.1
188−man/ja_JP.eucJP/man1/pack200.1
189−man/ja_JP.eucJP/man1/policytool.1
190−man/ja_JP.eucJP/man1/rmid.1
191−man/ja_JP.eucJP/man1/rmiregistry.1
192−man/ja_JP.eucJP/man1/servertool.1
193−man/ja_JP.eucJP/man1/tnameserv.1
194−man/ja_JP.eucJP/man1/unpack200.1
195−man/man1/java.1
196−man/man1/javaws.1
197−man/man1/keytool.1
198−man/man1/orbd.1
199−man/man1/pack200.1
200−man/man1/policytool.1
201−man/man1/rmid.1
202−man/man1/rmiregistry.1
203−man/man1/servertool.1
204−man/man1/tnameserv.1
205−man/man1/unpack200.1
206−EOF
207− # create jre/man directory
208− # mkdir $jdkdir/jre/man
209− # move the real JRE man pages to jre/man
210− # link the JDK JRE man pages to jre/man
211− # real JDK man pages stay where they are
212− for m in `cat $jreman`; do
213− manpath=`dirname $jdkdir/jre/$m`
214− mkdir -p $manpath
215− mv $jdkdir/$m $jdkdir/jre/$m
216− linkrel $jdkdir/jre/$m $jdkdir/$m
217− done
218− # link in Japanese man pages
219− ln -s ja_JP.eucJP $jdkdir/jre/man/ja
220− rm $jreman
221−}
222−
223−elimdups() {
224− echo "eliminating duplication between the JDK and JDK/jre..."
225− jdkcomm=/tmp/jdk.bin.comm.txt
226−cat <<EOF > $jdkcomm
227−bin/ControlPanel
228−bin/java
229−bin/javaws
230−bin/keytool
231−bin/orbd
232−bin/pack200
233−bin/policytool
234−bin/rmid
235−bin/rmiregistry
236−bin/servertool
237−bin/tnameserv
238−bin/unpack200
239−EOF
240− # note there is little point in linking these common files
241− # COPYRIGHT
242− # LICENSE
243− # THIRDPARTYLICENSEREADME.txt
244− # And this file is unique to the JDK
245− # README.html
246− # And these files are unique to the JDK/jre/
247− # CHANGES
248− # README
249− # Welcome.html
250− for p in `cat $jdkcomm`; do
251− rm $jdkdir/$p
252− # this is a relative link
253− ln -s ../jre/$p $jdkdir/$p
254− done
255− rm $jdkcomm
256−}
257−
258−if [ $# -eq 3 ] ; then
259− getargs $1 $2 $3
260− checkfiles
261− copytree
262− createjre
263− unpackjars
264− preparecds
265− jreman
266− elimdups
267−else
268− usage
269− exit 1
270−fi
271−
272−exit 0
273−
pkgs/development/compilers/oraclejdk/jdk6-linux.nixdeleted−84
@@ -1,84 +0,0 @@
1−{ swingSupport ? true
2−, stdenv
3−, requireFile
4−, unzip
5−, makeWrapper
6−, xorg ? null
7−, installjdk ? true
8−, pluginSupport ? true
9−, installjce ? false
10−}:
11−
12−assert stdenv.system == "i686-linux" || stdenv.system == "x86_64-linux";
13−assert swingSupport -> xorg != null;
14−
15−let
16−
17− /**
18− * The JRE libraries are in directories that depend on the CPU.
19− */
20− architecture =
21− if stdenv.system == "i686-linux" then
22− "i386"
23− else if stdenv.system == "x86_64-linux" then
24− "amd64"
25− else
26− abort "jdk requires i686-linux or x86_64 linux";
27−
28− jce =
29− if installjce then
30− requireFile {
31− name = "jce_policy-6.zip";
32− url = http://www.oracle.com/technetwork/java/javase/downloads/jce-6-download-429243.html;
33− sha256 = "0qljzfxbikm8br5k7rkamibp1vkyjrf6blbxpx6hn4k46f62bhnh";
34− }
35− else
36− null;
37−in
38−
39−stdenv.mkDerivation {
40− name =
41− if installjdk then "jdk-1.6.0_45b06" else "jre-1.6.0_45b06";
42−
43− src =
44− if stdenv.system == "i686-linux" then
45− requireFile {
46− name = "jdk-6u45-linux-i586.bin";
47− url = http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html;
48− sha256 = "0mx3d2qlal5zyz1a7ld1yk2rs8pf9sjxs2jzasais3nq30jmlfym";
49− }
50− else if stdenv.system == "x86_64-linux" then
51− requireFile {
52− name = "jdk-6u45-linux-x64.bin";
53− url = http://www.oracle.com/technetwork/java/javase/downloads/jdk6downloads-1902814.html;
54− sha256 = "1s0j1pdr6y8c816d9i86rx4zp12nbhmas1rxksp0r53cn7m3ljbb";
55− }
56− else
57− abort "jdk requires i686-linux or x86_64 linux";
58−
59− builder = ./dlj-bundle-builder.sh;
60−
61− /**
62− * If jdk5 is added, make sure to use the original construct script.
63− * This copy removes references to kinit, klist, ktab, which seem to be
64− * gone in jdk6.
65− */
66− construct = ./jdk6-construct.sh;
67− inherit installjdk;
68−
69− buildInputs = [unzip makeWrapper];
70−
71− /**
72− * libXt is only needed on amd64
73− */
74− libraries =
75− [stdenv.cc.libc] ++
76− (if swingSupport then [xorg.libX11 xorg.libXext xorg.libXtst xorg.libXi xorg.libXp xorg.libXt] else []);
77−
78− inherit swingSupport pluginSupport architecture jce;
79− inherit (xorg) libX11;
80−
81− mozillaPlugin = if installjdk then "/jre/lib/${architecture}/plugins" else "/lib/${architecture}/plugins";
82−
83− meta.license = stdenv.lib.licenses.unfree;
84−}
pkgs/top-level/all-packages.nix+1−6
@@ -4884,8 +4884,6 @@ in
48844884
48854885 jrePlugin = jre8Plugin;
48864886
4887− jre6Plugin = lowPrio (pkgs.jdkdistro false true);
4888−
48894887 jre7Plugin = lowPrio (pkgs.oraclejdk7distro false true);
48904888
48914889 jre8Plugin = lowPrio (pkgs.oraclejdk8distro false true);
@@ -4894,10 +4892,7 @@ in
48944892 system == "i686-linux" ||
48954893 system == "x86_64-linux";
48964894
4897− jdkdistro = installjdk: pluginSupport:
4898− assert supportsJDK;
4899− (if pluginSupport then appendToName "with-plugin" else x: x)
4900− (callPackage ../development/compilers/oraclejdk/jdk6-linux.nix { });
4895+ jdkdistro = oraclejdk8distro;
49014896
49024897 oraclejdk7distro = installjdk: pluginSupport:
49034898 assert supportsJDK;