Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 156135 | Differences between
and this patch

Collapse All | Expand All

(-)sun-jdk-1.5.0.09-r1.ebuild (-29 / +8 lines)
Lines 2-8 Link Here
2
# Distributed under the terms of the GNU General Public License v2
2
# Distributed under the terms of the GNU General Public License v2
3
# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.5.0.09-r1.ebuild,v 1.1 2006/11/22 23:25:15 caster Exp $
3
# $Header: /var/cvsroot/gentoo-x86/dev-java/sun-jdk/sun-jdk-1.5.0.09-r1.ebuild,v 1.1 2006/11/22 23:25:15 caster Exp $
4
4
5
inherit java-vm-2 eutils
5
inherit java-vm-2 eutils pax-utils
6
6
7
MY_PVL=${PV%.*}_${PV##*.}
7
MY_PVL=${PV%.*}_${PV##*.}
8
MY_PVA=${PV//./_}
8
MY_PVA=${PV//./_}
Lines 52-60 Link Here
52
52
53
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"
53
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"
54
54
55
# this is needed for proper operating under a PaX kernel without activated grsecurity acl
56
CHPAX_CONSERVATIVE_FLAGS="pemsv"
57
58
src_unpack() {
55
src_unpack() {
59
	if [ ! -r ${DISTDIR}/${At} ]; then
56
	if [ ! -r ${DISTDIR}/${At} ]; then
60
		die "cannot read ${At}. Please check the permission and try again."
57
		die "cannot read ${At}. Please check the permission and try again."
Lines 65-70 Link Here
65
62
66
src_install() {
63
src_install() {
67
	local dirs="bin include jre lib man"
64
	local dirs="bin include jre lib man"
65
66
	# Set PaX markings on all JDK/JRE executables to allow code-generation on
67
	# the heap by the JIT compiler.
68
	pax-mark m $(list-paxables ${S}{,/jre}/bin/*)
69
68
	dodir /opt/${P}
70
	dodir /opt/${P}
69
71
70
	for i in $dirs ; do
72
	for i in $dirs ; do
Lines 132-166 Link Here
132
	# Set as default VM if none exists
134
	# Set as default VM if none exists
133
	java-vm-2_pkg_postinst
135
	java-vm-2_pkg_postinst
134
136
135
	# if chpax is on the target system, set the appropriate PaX flags
136
	# this will not hurt the binary, it modifies only unused ELF bits
137
	# but may confuse things like AV scanners and automatic tripwire
138
	if has_version sys-apps/chpax
139
	then
140
		echo
141
		einfo "setting up conservative PaX flags for jar, javac and java"
142
143
		for paxkills in "jar" "javac" "java" "javah" "javadoc"
144
		do
145
			chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/bin/$paxkills
146
		done
147
148
		# /opt/$VM/jre/bin/java_vm
149
		chpax -${CHPAX_CONSERVATIVE_FLAGS} /opt/${P}/jre/bin/java_vm
150
151
		einfo "you should have seen lots of chpax output above now"
152
		ewarn "make sure the grsec ACL contains those entries also"
153
		ewarn "because enabling it will override the chpax setting"
154
		ewarn "on the physical files - help for PaX and grsecurity"
155
		ewarn "can be given by #gentoo-hardened + hardened@gentoo.org"
156
	fi
157
158
	if ! use X; then
137
	if ! use X; then
159
		local xwarn="virtual/x11 and/or"
138
		local xwarn="virtual/x11 and/or "
160
	fi
139
	fi
161
140
162
	echo
141
	echo
163
	ewarn "Some parts of Sun's JDK require ${xwarn} virtual/lpr to be installed."
142
	ewarn "Some parts of Sun's JDK require ${xwarn}virtual/lpr to be installed."
164
	ewarn "Be careful which Java libraries you attempt to use."
143
	ewarn "Be careful which Java libraries you attempt to use."
165
144
166
	echo
145
	echo

Return to bug 156135