[1.7] RFC: Allow NetX to be disabled
Dr Andrew John Hughes
ahughes at redhat.com
Wed Nov 17 06:13:16 PST 2010
And here's the patch for 1.7, the most hideous of the three:
2010-11-11 Andrew John Hughes <ahughes at redhat.com>
* Makefile.am:
(NETX_DIR): Define only when NetX is enabled
and set to syntax for jar (like LIVECONNECT_DIR).
(ICEDTEA_PATCHES): Only apply icedtea-webstart.patch,
icedtea-copy-plugs.patch and icedtea-webstart-umask.patch
if NetX is enabled.
(ICEDTEA_ECJ_PATCHES): Drop icedtea-ant.patch, redundant.
(ICEDTEA_ENV): Only add IMPORT_BINARY_PLUGS and
ALT_BINARY_PLUGS_PATH if NetX is enabled.
(distclean-local): Add clean-about.
(.PHONY): Likewise.
(icedtea): Depend on about.stamp. Add
ENABLE_NETX conditional.
(icedtea-debug): Likewise.
(netx): Add ENABLE_NETX conditional.
(netx-dist): Likewise.
(extra-class-files): Likewise.
(about): New target (from extra-lib/about.jar).
Add ENABLE_NETX conditional.
(clean-about): New target to remove about.jar.
(rt-source-files): Filter out NetX sources if not
building NetX.
(rt-class-files): Only add NetX resources if building
NetX.
(rt): Replace '-C lib/rt net' with NETX_DIR so NetX
sources are only included if NetX is enabled.
* acinclude.m4:
(IT_CHECK_OLD_PLUGIN): Remove outdated version warning
about old plugin.
(IT_CHECK_PLUGIN_DEPENDENCIES): Require IT_CHECK_NETX.
Disable both plugins if NetX is turned off.
(IT_CHECK_NETX): Add --disable-webstart option.
* patches/ecj/icedtea-ant.patch:
Dropped. Was wrongly applied to openjdk, not
openjdk-ecj and breaks when netx is turned off.
* patches/icedtea-copy-plugs.patch:
Only include segments related to plug installation
and apply only when building NetX.
* patches/getannotation-cast.patch,
* patches/snmp.patch:
New patches broken out from copy-plugs.patch which
are always applied.
Ok to commit?
--
Andrew :)
Free Java Software Engineer
Red Hat, Inc. (http://www.redhat.com)
Support Free Java!
Contribute to GNU Classpath and the OpenJDK
http://www.gnu.org/software/classpath
http://openjdk.java.net
PGP Key: 94EFD9D8 (http://subkeys.pgp.net)
Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8
-------------- next part --------------
diff -r fcc8fa217369 Makefile.am
--- a/Makefile.am Mon Oct 18 12:52:22 2010 -0400
+++ b/Makefile.am Wed Nov 17 13:36:41 2010 +0000
@@ -138,6 +138,10 @@
endif
endif
+if ENABLE_NETX
+NETX_DIR = -C lib/rt net
+endif
+
if WITH_VISUALVM
NB_PLATFORM= $(shell ls /usr/share/netbeans | grep platform | tail -n1)
NB_APISUPPORT=$(shell ls /usr/share/netbeans | grep apisupport | tail -n1)
@@ -272,12 +276,9 @@
patches/icedtea-lucene-crash.patch \
patches/icedtea-version.patch \
patches/icedtea-version-hotspot.patch \
- patches/icedtea-copy-plugs.patch \
patches/icedtea-text-relocations.patch \
patches/icedtea-ssl.patch \
$(PLUGIN_PATCH) \
- patches/icedtea-webstart.patch \
- patches/icedtea-webstart-umask.patch \
patches/icedtea-rmi_amd64.patch \
patches/icedtea-tools.patch \
patches/icedtea-timezone.patch \
@@ -370,7 +371,9 @@
patches/openjdk/6638712-wildcard_types.patch \
patches/openjdk/6650759-missing_inference.patch \
patches/numa_on_early_glibc.patch \
- patches/openjdk/6853592-badwindow-warning-fix.patch
+ patches/openjdk/6853592-badwindow-warning-fix.patch \
+ patches/snmp.patch \
+ patches/getannotation-cast.patch
if WITH_ALT_HSBUILD
ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \
@@ -386,6 +389,13 @@
patches/hotspot/original/6539464-consistent-math.patch
endif
+if ENABLE_NETX
+ICEDTEA_PATCHES += \
+ patches/icedtea-webstart.patch \
+ patches/icedtea-webstart-umask.patch \
+ patches/icedtea-copy-plugs.patch
+endif
+
if WITH_RHINO
ICEDTEA_PATCHES += \
patches/icedtea-rhino.patch
@@ -440,7 +450,7 @@
# Bootstrapping patches
-ICEDTEA_ECJ_PATCHES = patches/ecj/icedtea-ant.patch \
+ICEDTEA_ECJ_PATCHES = \
patches/ecj/icedtea.patch \
patches/ecj/icedtea-hotspot.patch \
patches/ecj/icedtea-spp.patch \
@@ -476,7 +486,6 @@
PLUGIN_VERSION = $(ICEDTEA_NAME) $(PACKAGE_VERSION)$(ICEDTEA_REV)$(ICEDTEA_PKG)
ICEDTEA_ENV = \
- IMPORT_BINARY_PLUGS=true \
ALT_JDK_IMPORT_PATH="$(ICEDTEA_BOOT_DIR)" \
ANT="$(ANT)" \
BUILD_NUMBER="$(OPENJDK_VERSION)" \
@@ -486,7 +495,6 @@
LANG="C" \
PATH="$(abs_top_builddir)/bootstrap/jdk1.6.0/bin:$(OS_PATH):$$PATH" \
ALT_BOOTDIR="$(ICEDTEA_BOOT_DIR)" \
- ALT_BINARY_PLUGS_PATH="$(abs_top_builddir)/bootstrap/jdk1.7.0" \
BUILD_ARCH_DIR="$(BUILD_ARCH_DIR)" \
ICEDTEA_RT="$(ICEDTEA_RT)" \
ICEDTEA_BUILD_DIR="$(ICEDTEA_BUILD_DIR)" \
@@ -519,6 +527,12 @@
DEBUG_CLASSFILES="true" \
DEBUG_BINARIES="true"
+if ENABLE_NETX
+ICEDTEA_ENV += \
+ IMPORT_BINARY_PLUGS=true \
+ ALT_BINARY_PLUGS_PATH="$(abs_top_builddir)/bootstrap/jdk1.7.0"
+endif
+
if WITH_CACAO
ICEDTEA_ENV += \
ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)"
@@ -674,7 +688,7 @@
check-local: jtregcheck
#FIXME (clean): Should become clean-local.
-distclean-local: clean-copy clean-jtreg clean-jtreg-reports clean-pulse-java
+distclean-local: clean-copy clean-jtreg clean-jtreg-reports clean-pulse-java clean-about
rm -rf stamps
rm -f rt-source-files.txt \
hotspot-tools-source-files.txt \
@@ -717,7 +731,7 @@
clean-tools-jar clean-shared-objects clean-visualvm clean-nbplatform \
clean-copy clean-hotspot-tools clean-rt $(ICEDTEAPLUGIN_CLEAN) \
$(ICEDTEANPPLUGIN_CLEAN) hotspot hotspot-helper clean-extra clean-jtreg \
- clean-jtreg-reports
+ clean-jtreg-reports clean-about
env:
@echo 'unset JAVA_HOME'
@@ -1304,7 +1318,7 @@
stamps/hotspot-tools.stamp stamps/plugs.stamp \
stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \
$(ICEDTEAPLUGIN_TARGET) \
- extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp \
+ stamps/about.stamp stamps/cacao.stamp stamps/visualvm.stamp \
stamps/pulse-java.stamp stamps/rewrite-rhino.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1357,6 +1371,7 @@
cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
$(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
endif
+if ENABLE_NETX
cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/about.jnlp \
extra-lib/about.jar \
$(BUILD_OUTPUT_DIR)/j2re-image/lib ; \
@@ -1371,6 +1386,7 @@
cp $(NETX_SRCDIR)/javaws.1 \
$(BUILD_OUTPUT_DIR)/j2re-image/man/man1 ; \
fi
+endif
if ZERO_BUILD
printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg
endif
@@ -1415,7 +1431,7 @@
stamps/hotspot-tools.stamp stamps/plugs.stamp \
stamps/ports.stamp stamps/patch.stamp stamps/overlay.stamp \
$(ICEDTEAPLUGIN_TARGET) \
- extra-lib/about.jar stamps/cacao.stamp stamps/visualvm.stamp \
+ stamps/about.stamp stamps/cacao.stamp stamps/visualvm.stamp \
stamps/pulse-java.stamp stamps/rewrite-rhino.stamp
$(ARCH_PREFIX) $(MAKE) \
$(ICEDTEA_ENV) \
@@ -1468,6 +1484,7 @@
cp -r netbeans/nbbuild/netbeans_visualvm/profiler3 \
$(BUILD_OUTPUT_DIR)/j2sdk-image/lib/visualvm
endif
+if ENABLE_NETX
cp $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources/default.jnlp \
extra-lib/about.jar \
$(BUILD_OUTPUT_DIR)-debug/j2re-image/lib ; \
@@ -1482,6 +1499,7 @@
cp $(NETX_SRCDIR)/javaws.1 \
$(DEBUG_BUILD_OUTPUT_DIR)/j2re-image/man/man1 ; \
fi
+endif
if ZERO_BUILD
printf -- '-zero ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg
endif
@@ -1685,6 +1703,7 @@
stamps/extra-class-files.stamp: extra-source-files.txt \
bootstrap/jdk1.7.0/jre/lib/rt-closed.jar
+if ENABLE_NETX
mkdir -p extra-lib
if ! test -d $(ICEDTEA_BOOT_DIR) ; \
then \
@@ -1700,6 +1719,7 @@
fi
cp -r $(abs_top_srcdir)/extra/net/sourceforge/jnlp/about/resources \
extra-lib/net/sourceforge/jnlp/about
+endif
mkdir -p stamps
touch $@
@@ -1708,13 +1728,21 @@
rm -f stamps/extra-class-files.stamp
rm -f extra-source-files.txt
-extra-lib/about.jar: stamps/extra-class-files.stamp
+stamps/about.stamp: stamps/extra-class-files.stamp
+if ENABLE_NETX
if ! test -d $(ICEDTEA_BOOT_DIR) ; \
then \
- $(JAR) cf $@ -C extra-lib net ; \
+ $(JAR) cf extra-lib/about.jar -C extra-lib net ; \
else \
- $(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C extra-lib net ; \
+ $(ICEDTEA_BOOT_DIR)/bin/jar cf extra-lib/about.jar -C extra-lib net ; \
fi
+endif
+ mkdir -p stamps
+ touch $@
+
+clean-about:
+ rm -f extra-lib/about.jar
+ rm -f stamps/about.stamp
# PulseAudio based mixer
# (pulse-java)
@@ -2265,7 +2293,12 @@
# rt-closed.jar class files.
rt-source-files.txt: stamps/replace-hotspot.stamp stamps/copy-source-files.stamp
find $(abs_top_srcdir)/rt $(abs_top_builddir)/rt $(LIVECONNECT_SRCS) -name '*.java' \
- | sort -u > $@
+ | sort -u > rt-source-files.tmp.txt
+if ENABLE_NETX
+ mv rt-source-files.tmp.txt $@
+else
+ cat rt-source-files.tmp.txt | grep -v 'sourceforge' > $@
+endif
stamps/rt-class-files.stamp: rt-source-files.txt
mkdir -p lib/rt
@@ -2283,8 +2316,10 @@
'$(OPENJDK_SOURCEPATH_DIRS):$(abs_top_builddir)/generated' \
-classpath \'\' -bootclasspath \'\' @$< ; \
fi
+if ENABLE_NETX
cp -r $(abs_top_srcdir)/rt/net/sourceforge/jnlp/resources \
lib/rt/net/sourceforge/jnlp/
+endif
mkdir -p stamps
touch stamps/rt-class-files.stamp
@@ -2325,10 +2360,10 @@
if ! test -d $(ICEDTEA_BOOT_DIR) ; \
then \
$(JAR) cf $@ -C lib/rt com -C lib/rt java \
- -C lib/rt javax $(LIVECONNECT_DIR) -C lib/rt net -C lib/rt sun ; \
+ -C lib/rt javax $(LIVECONNECT_DIR) $(NETX_DIR) -C lib/rt sun ; \
else \
$(ICEDTEA_BOOT_DIR)/bin/jar cf $@ -C lib/rt com -C lib/rt java \
- -C lib/rt javax $(LIVECONNECT_DIR) -C lib/rt net -C lib/rt sun ; \
+ -C lib/rt javax $(LIVECONNECT_DIR) $(NETX_DIR) -C lib/rt sun ; \
fi
if test -d bootstrap/ecj/jre/lib ; \
then \
diff -r fcc8fa217369 acinclude.m4
--- a/acinclude.m4 Mon Oct 18 12:52:22 2010 -0400
+++ b/acinclude.m4 Wed Nov 17 13:36:41 2010 +0000
@@ -1267,7 +1267,7 @@
[enable_plugin="${enableval}"], [enable_plugin="no"])
AC_MSG_RESULT(${enable_plugin})
if test "x${enable_plugin}" = "xyes"; then
- AC_MSG_WARN([The old plugin is no longer maintained and will be removed in 1.7.5.])
+ AC_MSG_WARN([The old plugin is no longer maintained.])
fi
])
@@ -1285,8 +1285,14 @@
[
dnl Check for plugin support headers and libraries.
dnl FIXME: use unstable
+AC_REQUIRE([IT_CHECK_NETX])
AC_REQUIRE([IT_CHECK_OLD_PLUGIN])
AC_REQUIRE([IT_CHECK_NEW_PLUGIN])
+if test "x${enable_netx}" = "xno" ; then
+ AC_MSG_WARN([Plugin can not be built without NetX; disabling plugin])
+ enable_plugin=no;
+ enable_npplugin=no;
+fi
if test "x${enable_plugin}" = "xyes" -o "x${enable_npplugin}" = "xyes" ; then
PKG_CHECK_MODULES(GTK, gtk+-2.0)
PKG_CHECK_MODULES(GLIB, glib-2.0)
@@ -1350,3 +1356,14 @@
AM_CONDITIONAL([HAS_PAX], test x"${it_cv_pax}" = "xyes")
AC_PROVIDE([$0])dnl
])
+
+AC_DEFUN_ONCE([IT_CHECK_NETX],
+[
+AC_MSG_CHECKING([whether to build NetX])
+AC_ARG_ENABLE([webstart],
+ [AS_HELP_STRING([--disable-webstart],
+ [Disable compilation of Web Start support])],
+ [enable_netx="${enableval}"], [enable_netx="yes"])
+AC_MSG_RESULT(${enable_netx})
+AM_CONDITIONAL(ENABLE_NETX, test "x${enable_netx}" = "xyes")
+])
diff -r fcc8fa217369 patches/ecj/icedtea-ant.patch
--- a/patches/ecj/icedtea-ant.patch Mon Oct 18 12:52:22 2010 -0400
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,20 +0,0 @@
---- iopenjdk/jaxws/make/Makefile 2007-10-12 03:52:21.000000000 -0400
-+++ openjdk/jaxws/make/Makefile 2007-11-13 11:02:07.000000000 -0500
-@@ -80,6 +80,7 @@
- endif
-
- ifdef ALT_BOOTDIR
-+ ANT_OPTIONS += -Dplugs=$(ALT_BINARY_PLUGS_PATH)
- ANT_JAVA_HOME = JAVA_HOME=$(ALT_BOOTDIR)
- endif
-
---- iopenjdk/jaxws/make/build.xml 2007-10-12 03:52:21.000000000 -0400
-+++ openjdk/jaxws/make/build.xml 2007-11-13 11:02:43.000000000 -0500
-@@ -109,6 +109,7 @@
- memoryMaximumSize="${javac.memoryMaximumSize}"
- target="${javac.target}"
- excludes="com/sun/tools/internal/txw2/**">
-+ <compilerarg line="-bootclasspath ${build.dir}/../../jaxp/build/classes:${build.classes.dir}:../../../generated:${plugs}/jre/lib/tools.jar:${plugs}/jre/lib/rt-closed.jar"/>
- <compilerarg value="-J-Xbootclasspath/p:${bootstrap.dir}/lib/javac.jar"/>
- <compilerarg line="${javac.version.opt}"/>
- <compilerarg line="${javac.no.jdk.warnings}"/>
diff -r fcc8fa217369 patches/getannotation-cast.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/getannotation-cast.patch Wed Nov 17 13:36:41 2010 +0000
@@ -0,0 +1,24 @@
+diff -urN openjdk.orig/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java openjdk/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java
+--- openjdk.orig/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java 2008-08-28 04:12:12.000000000 -0400
++++ openjdk/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java 2008-11-05 17:18:36.000000000 -0500
+@@ -1154,7 +1154,7 @@
+ Set<BitSet> getterIndexSets = newSet();
+ for (Constructor<?> constr : annotatedConstrList) {
+ String[] propertyNames =
+- constr.getAnnotation(propertyNamesClass).value();
++ ((ConstructorProperties)constr.getAnnotation(propertyNamesClass)).value();
+
+ Type[] paramTypes = constr.getGenericParameterTypes();
+ if (paramTypes.length != propertyNames.length) {
+diff -urN openjdk.orig/jdk/src/share/classes/java/beans/MetaData.java openjdk/jdk/src/share/classes/java/beans/MetaData.java
+--- openjdk.orig/jdk/src/share/classes/java/beans/MetaData.java 2008-08-28 04:12:48.000000000 -0400
++++ openjdk/jdk/src/share/classes/java/beans/MetaData.java 2008-11-05 17:18:36.000000000 -0500
+@@ -1628,7 +1628,7 @@
+ }
+
+ private static String[] getAnnotationValue(Constructor<?> constructor) {
+- ConstructorProperties annotation = constructor.getAnnotation(ConstructorProperties.class);
++ ConstructorProperties annotation = ((ConstructorProperties) constructor.getAnnotation(ConstructorProperties.class));
+ return (annotation != null)
+ ? annotation.value()
+ : null;
diff -r fcc8fa217369 patches/icedtea-copy-plugs.patch
--- a/patches/icedtea-copy-plugs.patch Mon Oct 18 12:52:22 2010 -0400
+++ b/patches/icedtea-copy-plugs.patch Wed Nov 17 13:36:41 2010 +0000
@@ -123,40 +123,3 @@
# Binary plug start/complete messages
-diff -urN openjdk.orig/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java openjdk/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java
---- openjdk.orig/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java 2008-08-28 04:12:12.000000000 -0400
-+++ openjdk/jdk/src/share/classes/com/sun/jmx/mbeanserver/OpenConverter.java 2008-11-05 17:18:36.000000000 -0500
-@@ -1154,7 +1154,7 @@
- Set<BitSet> getterIndexSets = newSet();
- for (Constructor<?> constr : annotatedConstrList) {
- String[] propertyNames =
-- constr.getAnnotation(propertyNamesClass).value();
-+ ((ConstructorProperties)constr.getAnnotation(propertyNamesClass)).value();
-
- Type[] paramTypes = constr.getGenericParameterTypes();
- if (paramTypes.length != propertyNames.length) {
-diff -urN openjdk.orig/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java openjdk/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java
---- openjdk.orig/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2008-08-28 04:12:14.000000000 -0400
-+++ openjdk/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2008-11-05 17:18:36.000000000 -0500
-@@ -78,6 +78,9 @@
- */
- public long timeStamp ;
-
-+ // TODO: IcedTea: I am a stub.
-+ static public int trapAuthenticationFailure = 0;
-+
-
-
- /**
-diff -urN openjdk.orig/jdk/src/share/classes/java/beans/MetaData.java openjdk/jdk/src/share/classes/java/beans/MetaData.java
---- openjdk.orig/jdk/src/share/classes/java/beans/MetaData.java 2008-08-28 04:12:48.000000000 -0400
-+++ openjdk/jdk/src/share/classes/java/beans/MetaData.java 2008-11-05 17:18:36.000000000 -0500
-@@ -1628,7 +1628,7 @@
- }
-
- private static String[] getAnnotationValue(Constructor<?> constructor) {
-- ConstructorProperties annotation = constructor.getAnnotation(ConstructorProperties.class);
-+ ConstructorProperties annotation = ((ConstructorProperties) constructor.getAnnotation(ConstructorProperties.class));
- return (annotation != null)
- ? annotation.value()
- : null;
diff -r fcc8fa217369 patches/snmp.patch
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/patches/snmp.patch Wed Nov 17 13:36:41 2010 +0000
@@ -0,0 +1,13 @@
+diff -urN openjdk.orig/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java openjdk/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java
+--- openjdk.orig/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2008-08-28 04:12:14.000000000 -0400
++++ openjdk/jdk/src/share/classes/com/sun/jmx/snmp/SnmpPduTrap.java 2008-11-05 17:18:36.000000000 -0500
+@@ -78,6 +78,9 @@
+ */
+ public long timeStamp ;
+
++ // TODO: IcedTea: I am a stub.
++ static public int trapAuthenticationFailure = 0;
++
+
+
+ /**
More information about the distro-pkg-dev
mailing list