summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetteri Räty <betelgeuse@gentoo.org>2005-12-28 22:48:54 +0000
committerPetteri Räty <betelgeuse@gentoo.org>2005-12-28 22:48:54 +0000
commit59849f7390fcbf054904f972e26d0b50811daf38 (patch)
tree37d8901d40e12cbe36d1b483b36f33bb46bd5501 /dev-java
parentversion added for security bug #116943 thanks ChazeFroy. removed older vulner... (diff)
downloadgentoo-2-59849f7390fcbf054904f972e26d0b50811daf38.tar.gz
gentoo-2-59849f7390fcbf054904f972e26d0b50811daf38.tar.bz2
gentoo-2-59849f7390fcbf054904f972e26d0b50811daf38.zip
Removed old versions as they can have security issues.
(Portage version: 2.1_pre2)
Diffstat (limited to 'dev-java')
-rw-r--r--dev-java/sun-jdk/ChangeLog7
-rw-r--r--dev-java/sun-jdk/Manifest17
-rw-r--r--dev-java/sun-jdk/files/digest-sun-jdk-1.4.2.092
-rw-r--r--dev-java/sun-jdk/files/digest-sun-jdk-1.5.0.053
-rw-r--r--dev-java/sun-jdk/files/javaws-waitid.c33
-rw-r--r--dev-java/sun-jdk/files/sun-jdk-1.4.2.0912
-rw-r--r--dev-java/sun-jdk/files/sun-jdk-1.5.0.0512
-rw-r--r--dev-java/sun-jdk/sun-jdk-1.4.2.09.ebuild205
-rw-r--r--dev-java/sun-jdk/sun-jdk-1.5.0.05.ebuild237
9 files changed, 6 insertions, 522 deletions
diff --git a/dev-java/sun-jdk/ChangeLog b/dev-java/sun-jdk/ChangeLog
index 5d9e692653f3..5406480d0901 100644
--- a/dev-java/sun-jdk/ChangeLog
+++ b/dev-java/sun-jdk/ChangeLog
@@ -1,6 +1,11 @@
# ChangeLog for dev-java/sun-jdk
# Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/ChangeLog,v 1.134 2005/12/28 20:58:00 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/ChangeLog,v 1.135 2005/12/28 22:48:54 betelgeuse Exp $
+
+ 28 Dec 2005; Petteri Räty <betelgeuse@gentoo.org>
+ -files/sun-jdk-1.4.2.09, -files/sun-jdk-1.5.0.05, -files/javaws-waitid.c,
+ -sun-jdk-1.4.2.09.ebuild, -sun-jdk-1.5.0.05.ebuild:
+ Removed old versions as they can have security issues.
28 Dec 2005; Petteri Räty <betelgeuse@gentoo.org>
sun-jdk-1.2.2.017.ebuild, sun-jdk-1.3.1.16.ebuild,
diff --git a/dev-java/sun-jdk/Manifest b/dev-java/sun-jdk/Manifest
index 9d24d05d7321..a2b6f3b35143 100644
--- a/dev-java/sun-jdk/Manifest
+++ b/dev-java/sun-jdk/Manifest
@@ -1,34 +1,17 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
MD5 185bf5be1c2acb61745fa3fc5abe5c09 ChangeLog 27629
MD5 92fc551c12c9a260dd9ced69d15cf0f3 files/digest-sun-jdk-1.2.2.017 78
MD5 7339eea38c2cfdfdc4cd777a02c4cbc1 files/digest-sun-jdk-1.3.1.16 76
MD5 368b26d168ecbf956f69a0ebe8780433 files/digest-sun-jdk-1.3.1.17 76
-MD5 ce8f1c0c94a74aadae5d58b68c254161 files/digest-sun-jdk-1.4.2.09 140
MD5 26916b6de74c3d0ffd1eb22f64073ead files/digest-sun-jdk-1.4.2.10 140
-MD5 40541411b01ed36dc30322d7a5ab2ee9 files/digest-sun-jdk-1.5.0.05 212
MD5 7aea6ff8bf86dffb57bf2427771e6ad7 files/digest-sun-jdk-1.5.0.06 212
-MD5 64ade01a917993ba9712b2c0d2f4a580 files/javaws-waitid.c 833
MD5 ac1c6e8860b4cb03e284664cacf7a977 files/sun-jdk-1.2.2.017 328
MD5 0b7cc36964f2fa50ad778e865f0cc851 files/sun-jdk-1.3.1.16 471
MD5 89f904e0a2b09062701aec14bcf95e7b files/sun-jdk-1.3.1.17 477
-MD5 ca5181076e4ba09c94548af2da8690dd files/sun-jdk-1.4.2.09 646
MD5 6149010c1ed7dcc5a315c6d9674c970b files/sun-jdk-1.4.2.10 640
-MD5 50d600429785f626eef0bb4048cbc009 files/sun-jdk-1.5.0.05 613
MD5 e20a02a5f2add3d89fcc46f9284efc42 files/sun-jdk-1.5.0.06 619
MD5 16c9e337522b7e477aece60ff98dde54 metadata.xml 239
MD5 856d8d35f9ed8086ddef976b89679004 sun-jdk-1.2.2.017.ebuild 2913
MD5 7502a0ee8d39826c9e0dbf2c79fa0beb sun-jdk-1.3.1.16.ebuild 4160
MD5 8338ceb273bced87a55887a861a5af5c sun-jdk-1.3.1.17.ebuild 4770
-MD5 b1b13cf5cad94fef710a044cbd740794 sun-jdk-1.4.2.09.ebuild 6881
MD5 3fd8ea7b0f5906ff04a248fd8041d7e4 sun-jdk-1.4.2.10.ebuild 6788
-MD5 54b696cdb8d65a9ca80f0e127cf80cf9 sun-jdk-1.5.0.05.ebuild 7365
MD5 3e0c484dd372af4ba0fded434931b21c sun-jdk-1.5.0.06.ebuild 7609
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v1.4.2 (GNU/Linux)
-
-iD8DBQFDsvxmQiJ/wx066S4RAh9aAJ9MmCwAB8UUQC2cT94PX0rAXboOKgCfaI5S
-wKwa53n1pWCt1VE7RbjzJac=
-=d6gW
------END PGP SIGNATURE-----
diff --git a/dev-java/sun-jdk/files/digest-sun-jdk-1.4.2.09 b/dev-java/sun-jdk/files/digest-sun-jdk-1.4.2.09
deleted file mode 100644
index 6299fed63f0b..000000000000
--- a/dev-java/sun-jdk/files/digest-sun-jdk-1.4.2.09
+++ /dev/null
@@ -1,2 +0,0 @@
-MD5 96173e3090a9820fd2338af88fbb2d09 j2sdk-1_4_2_09-linux-i586.bin 36429599
-MD5 ff961c5f5326191c5ac2e4624d756f7e jce_policy-1_4_2.zip 12195
diff --git a/dev-java/sun-jdk/files/digest-sun-jdk-1.5.0.05 b/dev-java/sun-jdk/files/digest-sun-jdk-1.5.0.05
deleted file mode 100644
index 409a9686fac0..000000000000
--- a/dev-java/sun-jdk/files/digest-sun-jdk-1.5.0.05
+++ /dev/null
@@ -1,3 +0,0 @@
-MD5 169441bba1ca95e84e030e116f258d79 jce_policy-1_5_0.zip 8826
-MD5 96e9743687a173287fc915665b81b939 jdk-1_5_0_05-linux-amd64.bin 43557465
-MD5 2f83bf2a38fff1f8ac51b02ec7391ca3 jdk-1_5_0_05-linux-i586.bin 48836045
diff --git a/dev-java/sun-jdk/files/javaws-waitid.c b/dev-java/sun-jdk/files/javaws-waitid.c
deleted file mode 100644
index eea428d79c75..000000000000
--- a/dev-java/sun-jdk/files/javaws-waitid.c
+++ /dev/null
@@ -1,33 +0,0 @@
-/* Quick and dirty pre-loaded DSO to make buggy javawsbin
- in JDK 1.4.2_07 work on Linux with kernel 2.6.x and
- glibc 2.3.4.
-
- Compilation:
- gcc -O2 -fPIC -g0 -shared -o mywait.so mywait.c
-
- Usage (Bash):
- LD_PRELOAD=/path/to/mywait.so /path/to/javaws <Launcher URL>
-
-
- Taken from: http://www.advogato.org/person/rmathew/diary.html?start=71
- */
-#include <dlfcn.h>
-#include <sys/wait.h>
-
- int (*real_waitid)( idtype_t, id_t, siginfo_t *, int);
-
- int
-waitid( idtype_t idtype, id_t id, siginfo_t *infop, int options)
-{
- int retVal = -1;
-
- void *handle = dlopen( "/lib/libc.so.6", RTLD_LAZY);
- real_waitid = dlsym( handle, "waitid");
-
- options = (options == 0) ? WEXITED : options;
- retVal = (*real_waitid)( idtype, id, infop, options);
-
- dlclose( handle);
-
- return retVal;
-} /* End pseudo-waitid() */
diff --git a/dev-java/sun-jdk/files/sun-jdk-1.4.2.09 b/dev-java/sun-jdk/files/sun-jdk-1.4.2.09
deleted file mode 100644
index 84183295e622..000000000000
--- a/dev-java/sun-jdk/files/sun-jdk-1.4.2.09
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/files/sun-jdk-1.4.2.09,v 1.1 2005/08/10 20:29:01 betelgeuse Exp $
-
-VERSION="Sun JDK @PV@"
-JAVA_HOME=/opt/@P@
-JDK_HOME=/opt/@P@
-JAVAC=${JAVA_HOME}/bin/javac
-ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin:${JAVA_HOME}/jre/javaws"
-ADDLDPATH="${JAVA_HOME}/jre/lib/@PLATFORM@/:${JAVA_HOME}/jre/lib/@PLATFORM@/native_threads/:${JAVA_HOME}/jre/lib/@PLATFORM@/classic/:${JAVA_HOME}/jre/lib/@PLATFORM@/server/"
-MANPATH="/opt/@P@/man"
-ENV_VARS="JAVA_HOME JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH"
diff --git a/dev-java/sun-jdk/files/sun-jdk-1.5.0.05 b/dev-java/sun-jdk/files/sun-jdk-1.5.0.05
deleted file mode 100644
index be585f8f3424..000000000000
--- a/dev-java/sun-jdk/files/sun-jdk-1.5.0.05
+++ /dev/null
@@ -1,12 +0,0 @@
-# Copyright 1999-2004 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/files/sun-jdk-1.5.0.05,v 1.1 2005/09/16 13:33:19 axxo Exp $
-
-VERSION="Sun JDK @PV@"
-JAVA_HOME=/opt/@P@
-JDK_HOME=/opt/@P@
-JAVAC=${JAVA_HOME}/bin/javac
-ADDPATH="${JAVA_HOME}/bin:${JAVA_HOME}/jre/bin"
-ADDLDPATH="${JAVA_HOME}/jre/lib/@PLATFORM@/:${JAVA_HOME}/jre/lib/@PLATFORM@/native_threads/:${JAVA_HOME}/jre/lib/@PLATFORM@/xawt/:${JAVA_HOME}/jre/lib/@PLATFORM@/server/"
-MANPATH="/opt/@P@/man"
-ENV_VARS="JAVA_HOME JDK_HOME JAVAC ADDPATH ADDLDPATH MANPATH"
diff --git a/dev-java/sun-jdk/sun-jdk-1.4.2.09.ebuild b/dev-java/sun-jdk/sun-jdk-1.4.2.09.ebuild
deleted file mode 100644
index 2cda3de3058a..000000000000
--- a/dev-java/sun-jdk/sun-jdk-1.4.2.09.ebuild
+++ /dev/null
@@ -1,205 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.4.2.09.ebuild,v 1.11 2005/12/28 20:58:00 betelgeuse Exp $
-
-inherit java eutils
-
-MY_PV=${PV%.*}_${PV##*.}
-MY_P=j2sdk${MY_PV}
-MY_PVB=${PV%.*}
-
-At="j2sdk-${PV//./_}-linux-i586.bin"
-jce_policy="jce_policy-${MY_PVB//./_}.zip"
-
-S="${WORKDIR}/${MY_P}"
-DESCRIPTION="Sun's J2SE Development Kit"
-HOMEPAGE="http://java.sun.com/j2se/1.4.2/"
-SRC_URI="${At}
- jce? ( ${jce_policy} )"
-SLOT="1.4"
-LICENSE="sun-bcla-java-vm"
-KEYWORDS="-* x86"
-RESTRICT="fetch stricter"
-IUSE="doc browserplugin nsplugin jce mozilla examples"
-
-#glibc dep: #102423
-DEPEND=">=dev-java/java-config-1.1.5
- >=sys-libs/glibc-2.3.5
- sys-apps/sed
- app-arch/unzip
- doc? ( =dev-java/java-sdk-docs-1.4.2* )"
-
-RDEPEND="sys-libs/lib-compat"
-
-PROVIDE="virtual/jre virtual/jdk"
-
-PACKED_JARS="lib/tools.jar jre/lib/rt.jar jre/lib/jsse.jar jre/lib/charsets.jar
-jre/lib/ext/localedata.jar jre/lib/plugin.jar jre/javaws/javaws.jar"
-
-# this is needed for proper operating under a PaX kernel without activated grsecurity acl
-CHPAX_CONSERVATIVE_FLAGS="pemrsv"
-
-DOWNLOAD_URL="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=j2sdk-${MY_PV}-oth-JPR&SiteId=JSC&TransactionId=noreg"
-DOWNLOAD_URL_JCE="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=7503-jce-${MY_PVB}-oth-JPR&SiteId=JSC&TransactionId=noreg"
-
-pkg_nofetch() {
- einfo "Please download ${At} from:"
- einfo ${DOWNLOAD_URL}
- einfo "(SDK 32-bit/64-bit for Windows/Linux/Solaris SPARC 32-bit for Solaris x86, then select download Linux Self-extracting."
- einfo "and move it to ${DISTDIR}"
- if use jce; then
- echo
- einfo "Also download ${jce_policy} from:"
- einfo ${DOWNLOAD_URL_JCE}
- einfo "Java(TM) Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files"
- einfo "and move it to ${DISTDIR}"
- fi
-}
-
-src_unpack() {
- if [ ! -r ${DISTDIR}/${At} ]; then
- die "cannot read ${At}.bin. Please check the permission and try again."
- fi
- if use jce; then
- if [ ! -r ${DISTDIR}/${jce_policy} ]; then
- die "cannot read ${jce_policy}. Please check the permission and try again."
- fi
- fi
- #Search for the ELF Header
- testExp=`echo -e "\177\105\114\106\001\001\001"`
- startAt=`grep -aonm 1 ${testExp} ${DISTDIR}/${At} | cut -d: -f1`
- tail -n +${startAt} ${DISTDIR}/${At} > install.sfx
- chmod +x install.sfx
- ./install.sfx || die
- rm install.sfx
-
- if [ -f ${S}/lib/unpack ]; then
- UNPACK_CMD=${S}/lib/unpack
- chmod +x $UNPACK_CMD
- sed -i 's#/tmp/unpack.log#/dev/null\x00\x00\x00\x00\x00\x00#g' $UNPACK_CMD
- for i in $PACKED_JARS; do
- PACK_FILE=${S}/`dirname $i`/`basename $i .jar`.pack
- if [ -f ${PACK_FILE} ]; then
- echo " unpacking: $i"
- $UNPACK_CMD ${PACK_FILE} ${S}/$i
- rm -f ${PACK_FILE}
- fi
- done
- fi
- #javaws hack
- cd ${S}
- sed -i "s,^exec,export LD_PRELOAD=/opt/${P}/jre/javaws/javaws-waitid.so\nexec," jre/javaws/javaws || die "javaws sed failed"
-}
-
-src_compile() {
- gcc -O2 -fPIC -g0 -shared -o ${S}/jre/javaws/javaws-waitid.so ${FILESDIR}/javaws-waitid.c || die "failed to compile javaws hack"
-}
-
-src_install() {
- local dirs="bin include jre lib man"
- dodir /opt/${P}
-
- for i in $dirs ; do
- cp -PR $i ${D}/opt/${P}/
- done
-
- dodoc COPYRIGHT README LICENSE THIRDPARTYLICENSEREADME.txt
- dohtml README.html
- dodir /opt/${P}/share/
- if use examples; then
- cp -pPR demo ${D}/opt/${P}/share/
- fi
- cp -pPR src.zip ${D}/opt/${P}/share/
-
- if use jce ; then
- # Using unlimited jce while still retaining the strong jce
- # May have repercussions when you find you cannot symlink libraries
- # in classpaths.
- cd ${D}/opt/${P}/jre/lib/security
- unzip ${DISTDIR}/${jce_policy}
- mv jce unlimited-jce
- dodir /opt/${P}/jre/lib/security/strong-jce
- mv ${D}/opt/${P}/jre/lib/security/US_export_policy.jar ${D}/opt/${P}/jre/lib/security/strong-jce
- mv ${D}/opt/${P}/jre/lib/security/local_policy.jar ${D}/opt/${P}/jre/lib/security/strong-jce
- dosym /opt/${P}/jre/lib/security/unlimited-jce/US_export_policy.jar /opt/${P}/jre/lib/security/
- dosym /opt/${P}/jre/lib/security/unlimited-jce/local_policy.jar /opt/${P}/jre/lib/security/
- fi
-
- if use nsplugin || # global useflag for netscape-compat plugins
- use browserplugin || # deprecated but honor for now
- use mozilla; then # wrong but used to honor it
- local plugin_dir="ns610"
- if has_version '>=sys-devel/gcc-3.2' ; then
- plugin_dir="ns610-gcc32"
- fi
-
- install_mozilla_plugin /opt/${P}/jre/plugin/i386/${plugin_dir}/libjavaplugin_oji.so
- fi
-
- # create dir for system preferences
- dodir /opt/${P}/.systemPrefs
-
- # install control panel for Gnome/KDE
- sed -e "s/INSTALL_DIR\/JRE_NAME_VERSION/\/opt\/${P}\/jre/" \
- -e "s/\(Name=Java\)/\1 Control Panel/" \
- ${D}/opt/${P}/jre/plugin/desktop/sun_java.desktop > \
- ${T}/sun_java.desktop
-
- domenu ${T}/sun_java.desktop
-
- set_java_env ${FILESDIR}/${VMHANDLE}
-}
-
-pkg_postinst() {
- # Create files used as storage for system preferences.
- touch /opt/${P}/.systemPrefs/.system.lock
- chmod 644 /opt/${P}/.systemPrefs/.system.lock
- touch /opt/${P}/.systemPrefs/.systemRootModFile
- chmod 644 /opt/${P}/.systemPrefs/.systemRootModFile
-
- # Set as default VM if none exists
- java_pkg_postinst
-
- #Show info about netscape
- if has_version '>=www-client/netscape-navigator-4.79-r1' || has_version '>=www-client/netscape-communicator-4.79-r1' ; then
- echo
- einfo "If you want to install the plugin for Netscape 4.x, type"
- einfo
- einfo " cd /usr/lib/nsbrowser/plugins/"
- einfo " ln -sf /opt/${P}/jre/plugin/i386/ns4/libjavaplugin.so"
- fi
-
- # if chpax is on the target system, set the appropriate PaX flags
- # this will not hurt the binary, it modifies only unused ELF bits
- # but may confuse things like AV scanners and automatic tripwire
- if has_version sys-apps/chpax
- then
- echo
- einfo "setting up conservative PaX flags for jar, javac and java"
-
- for paxkills in "jar" "javac" "java" "javah" "javadoc"
- do
- chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/bin/$paxkills
- done
-
- # /opt/sun-jdk-1.4.2.03/jre/bin/java_vm
- chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/jre/bin/java_vm
-
- einfo "you should have seen lots of chpax output above now"
- ewarn "make sure the grsec ACL contains those entries also"
- ewarn "because enabling it will override the chpax setting"
- ewarn "on the physical files - help for PaX and grsecurity"
- ewarn "can be given by #gentoo-hardened + hardened@gentoo.org"
- fi
-
- echo
- eerror "Some parts of Sun's JDK require virtual/x11 to be installed."
- eerror "Be careful which Java libraries you attempt to use."
-
- if ! use nsplugin && ( use browserplugin || use mozilla ); then
- echo
- ewarn "The 'browserplugin' and 'mozilla' useflags will not be honored in"
- ewarn "future jdk/jre ebuilds for plugin installation. Please"
- ewarn "update your USE to include 'nsplugin'."
- fi
-}
diff --git a/dev-java/sun-jdk/sun-jdk-1.5.0.05.ebuild b/dev-java/sun-jdk/sun-jdk-1.5.0.05.ebuild
deleted file mode 100644
index 963f86926c57..000000000000
--- a/dev-java/sun-jdk/sun-jdk-1.5.0.05.ebuild
+++ /dev/null
@@ -1,237 +0,0 @@
-# Copyright 1999-2005 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.5.0.05.ebuild,v 1.6 2005/12/28 20:58:00 betelgeuse Exp $
-
-inherit java eutils
-
-MY_PVL=${PV%.*}_${PV##*.}
-MY_PVA=${PV//./_}
-
-amd64file="jdk-${MY_PVA}-linux-amd64.bin"
-x86file="jdk-${MY_PVA}-linux-i586.bin"
-
-jcefile="jce_policy-${MY_PVA%_*}.zip"
-
-if use x86; then
- At=${x86file}
-elif use amd64; then
- At=${amd64file}
-fi
-
-S="${WORKDIR}/jdk${MY_PVL}"
-DESCRIPTION="Sun's J2SE Development Kit, version ${PV}"
-HOMEPAGE="http://java.sun.com/j2se/1.5.0/"
-SRC_URI="x86? ( $x86file ) amd64? ( $amd64file )
- jce? ( $jcefile )"
-SLOT="1.5"
-LICENSE="sun-bcla-java-vm"
-KEYWORDS="~x86 ~amd64 -*"
-RESTRICT="fetch nostrip stricter"
-IUSE="doc browserplugin nsplugin jce mozilla examples"
-
-#
-DEPEND=">=dev-java/java-config-1.2
- sys-apps/sed
- jce? ( app-arch/unzip )
- doc? ( =dev-java/java-sdk-docs-1.5.0* )"
-
-RDEPEND="x86? ( sys-libs/lib-compat )
- doc? ( =dev-java/java-sdk-docs-1.5.0* )"
-
-PROVIDE="virtual/jre
- virtual/jdk"
-
-PACKED_JARS="lib/tools.jar jre/lib/rt.jar jre/lib/jsse.jar jre/lib/charsets.jar jre/lib/ext/localedata.jar jre/lib/plugin.jar jre/lib/javaws.jar jre/lib/deploy.jar"
-
-# this is needed for proper operating under a PaX kernel without activated grsecurity acl
-CHPAX_CONSERVATIVE_FLAGS="pemsv"
-
-FETCH_SDK="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jdk-${MY_PVL}-oth-JPR&SiteId=JSC&TransactionId=noreg"
-FETCH_JCE="http://javashoplm.sun.com/ECom/docs/Welcome.jsp?StoreId=22&PartDetailId=jce_policy-${PV%.*}-oth-JPR&SiteId=JSC&TransactionId=noreg"
-
-
-pkg_nofetch() {
- local archtext=""
-
- if use x86; then
- archtext="Linux"
- elif use amd64; then
- archtext="Linux AMD64"
- fi
-
- einfo "Please download ${At} from:"
- einfo "${FETCH_SDK}"
- einfo "Select the ${archtext} self-extracting file"
- einfo "and move it to ${DISTDIR}"
-
- if use jce; then
- echo
- einfo "Also download ${jcefile} from:"
- einfo ${FETCH_JCE}
- einfo "Java(TM) Cryptography Extension (JCE) Unlimited Strength Jurisdiction Policy Files"
- einfo "and move it to ${DISTDIR}"
- fi
-
-}
-
-src_unpack() {
- if [ ! -r ${DISTDIR}/${At} ]; then
- die "cannot read ${At}. Please check the permission and try again."
- fi
- if use jce; then
- if [ ! -r ${DISTDIR}/${jcefile} ]; then
- die "cannot read ${jcefile}. Please check the permission and try again."
- fi
- fi
-
- #Search for the ELF Header
- testExp=`echo -e "\105\114\106"`
- startAt=`grep -aonm 1 ${testExp} ${DISTDIR}/${At} | cut -d: -f1`
- tail -n +${startAt} ${DISTDIR}/${At} > install.sfx
- chmod +x install.sfx
- ./install.sfx || die
- rm install.sfx
-
- if [ -f ${S}/bin/unpack200 ]; then
- UNPACK_CMD=${S}/bin/unpack200
- chmod +x $UNPACK_CMD
- sed -i 's#/tmp/unpack.log#/dev/null\x00\x00\x00\x00\x00\x00#g' $UNPACK_CMD
- for i in $PACKED_JARS; do
- PACK_FILE=${S}/`dirname $i`/`basename $i .jar`.pack
- if [ -f ${PACK_FILE} ]; then
- echo " unpacking: $i"
- $UNPACK_CMD ${PACK_FILE} ${S}/$i
- rm -f ${PACK_FILE}
- fi
- done
- rm -f ${UNPACK_CMD}
- else
- die "unpack not found"
- fi
- ${S}/bin/java -client -Xshare:dump
-}
-
-src_install() {
- dodir /opt/${P}
-
- for i in bin include jre lib man; do
- cp -pPR $i ${D}/opt/${P}/ || die "failed to copy ${i}"
- done
- dodoc COPYRIGHT LICENSE README.html
- dohtml README.html
- dodir /opt/${P}/share/
-
- cp -pPR src.zip ${D}/opt/${P}/share/
-
- if use examples; then
- cp -pPR demo ${D}/opt/${P}/share/
- if ( use x86 || use amd64 ); then
- cp -pPR sample ${D}/opt/${P}/share/
- fi
- fi
-
- if use jce ; then
- cd ${D}/opt/${P}/jre/lib/security
- unzip ${DISTDIR}/${jcefile} || die "failed to unzip jce"
- mv jce unlimited-jce
- dodir /opt/${P}/jre/lib/security/strong-jce
- mv ${D}/opt/${P}/jre/lib/security/US_export_policy.jar ${D}/opt/${P}/jre/lib/security/strong-jce
- mv ${D}/opt/${P}/jre/lib/security/local_policy.jar ${D}/opt/${P}/jre/lib/security/strong-jce
- dosym /opt/${P}/jre/lib/security/unlimited-jce/US_export_policy.jar /opt/${P}/jre/lib/security/
- dosym /opt/${P}/jre/lib/security/unlimited-jce/local_policy.jar /opt/${P}/jre/lib/security/
- fi
-
- if use nsplugin || # global useflag for netscape-compat plugins
- use browserplugin || # deprecated but honor for now
- use mozilla; then # wrong but used to honor it
- local plugin_dir="ns7-gcc29"
- if has_version '>=sys-devel/gcc-3' ; then
- plugin_dir="ns7"
- fi
-
- if use x86 ; then
- install_mozilla_plugin /opt/${P}/jre/plugin/i386/$plugin_dir/libjavaplugin_oji.so
- else
- eerror "No plugin available for amd64 arch"
- fi
- fi
-
- # create dir for system preferences
- dodir /opt/${P}/.systemPrefs
-
- # install control panel for Gnome/KDE
- sed -e "s/INSTALL_DIR\/JRE_NAME_VERSION/\/opt\/${P}\/jre/" \
- -e "s/\(Name=Java\)/\1 Control Panel/" \
- ${D}/opt/${P}/jre/plugin/desktop/sun_java.desktop > \
- ${T}/sun_java.desktop
-
- domenu ${T}/sun_java.desktop
-
- set_java_env ${FILESDIR}/${VMHANDLE}
-}
-
-pkg_postinst() {
- # Create files used as storage for system preferences.
- PREFS_LOCATION=/opt/${P}/jre
- mkdir -p ${PREFS_LOCATION}/.systemPrefs
- if [ ! -f ${PREFS_LOCATION}/.systemPrefs/.system.lock ] ; then
- touch $PREFS_LOCATION/.systemPrefs/.system.lock
- chmod 644 $PREFS_LOCATION/.systemPrefs/.system.lock
- fi
- if [ ! -f $PREFS_LOCATION/.systemPrefs/.systemRootModFile ] ; then
- touch $PREFS_LOCATION/.systemPrefs/.systemRootModFile
- chmod 644 $PREFS_LOCATION/.systemPrefs/.systemRootModFile
- fi
-
- # Set as default VM if none exists
- java_pkg_postinst
-
- #Show info about netscape
- if has_version '>=www-client/netscape-navigator-4.79-r1' || has_version '>=www-client/netscape-communicator-4.79-r1' ; then
- echo
- einfo "If you want to install the plugin for Netscape 4.x, type"
- einfo
- einfo " cd /usr/lib/nsbrowser/plugins/"
- einfo " ln -sf /opt/${P}/jre/plugin/i386/ns4/libjavaplugin.so"
- fi
-
- # if chpax is on the target system, set the appropriate PaX flags
- # this will not hurt the binary, it modifies only unused ELF bits
- # but may confuse things like AV scanners and automatic tripwire
- if has_version sys-apps/chpax
- then
- echo
- einfo "setting up conservative PaX flags for jar, javac and java"
-
- for paxkills in "jar" "javac" "java" "javah" "javadoc"
- do
- chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/bin/$paxkills
- done
-
- # /opt/$VM/jre/bin/java_vm
- chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/jre/bin/java_vm
-
- einfo "you should have seen lots of chpax output above now"
- ewarn "make sure the grsec ACL contains those entries also"
- ewarn "because enabling it will override the chpax setting"
- ewarn "on the physical files - help for PaX and grsecurity"
- ewarn "can be given by #gentoo-hardened + hardened@gentoo.org"
- fi
-
- echo
- eerror "Some parts of Sun's JDK require virtual/x11 and/or virtual/lpr to be installed."
- eerror "Be careful which Java libraries you attempt to use."
-
- echo
- einfo " Be careful: ${P}'s Java compiler uses"
- einfo " '-source 1.5' as default. Some keywords such as 'enum'"
- einfo " are not valid identifiers any more in that mode,"
- einfo " which can cause incompatibility with certain sources."
-
- if ! use nsplugin && ( use browserplugin || use mozilla ); then
- echo
- ewarn "The 'browserplugin' and 'mozilla' useflags will not be honored in"
- ewarn "future jdk/jre ebuilds for plugin installation. Please"
- ewarn "update your USE to include 'nsplugin'."
- fi
-}