From ptisnovs at icedtea.classpath.org Tue Feb 1 00:21:13 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Tue, 01 Feb 2011 08:21:13 +0000 Subject: /hg/icedtea6: Added two new regression tests which check correct... Message-ID: changeset 0c86bdc188d3 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0c86bdc188d3 author: ptisnovs date: Tue Feb 01 09:20:39 2011 +0100 Added two new regression tests which check correct behaviour of PNG reader. diffstat: 4 files changed, 997 insertions(+), 1 deletion(-) ChangeLog | 6 Makefile.am | 3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/xlfn0g04.png | 13 patches/jtreg-png-reader.patch | 976 ++++++++++ diffs (truncated from 1336 to 500 lines): diff -r cd6310f10fab -r 0c86bdc188d3 ChangeLog --- a/ChangeLog Sun Jan 30 00:45:18 2011 +0000 +++ b/ChangeLog Tue Feb 01 09:20:39 2011 +0100 @@ -1,3 +1,9 @@ 2011-01-29 Andrew John Hughes + + * patches/jtreg-png-reader.patch: + Added two new regression tests which check correct behaviour of PNG + reader. + 2011-01-29 Andrew John Hughes * patches/gcc-suffix.patch, diff -r cd6310f10fab -r 0c86bdc188d3 Makefile.am --- a/Makefile.am Sun Jan 30 00:45:18 2011 +0000 +++ b/Makefile.am Tue Feb 01 09:20:39 2011 +0100 @@ -275,7 +275,8 @@ ICEDTEA_PATCHES = \ patches/jtreg-international-fonts-styles.patch \ patches/openjdk/6736649-text_bearings.patch \ patches/openjdk/6797139-jbutton_truncation.patch \ - patches/openjdk/6883341-text_bearing_exception.patch + patches/openjdk/6883341-text_bearing_exception.patch \ + patches/jtreg-png-reader.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/x00n0g01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/x00n0g01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/xcrn0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/xcrn0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/xlfn0g04.png --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/xlfn0g04.png Tue Feb 01 09:20:39 2011 +0100 @@ -0,0 +1,13 @@ +?PNG + + + + + +IHDR ???)?IDATx?]?? +?0 P*@??#? + +#T??10lPF`??F=???IQ?*??u??`%qk? +H????????m??????? ??=,?f?OK + +???t??(???????F ;?P????{xp?]9?/p?*$(?*?y??????????@?C?  c?q??N?U#?)11?.??r??f?0???gh(??t???E???kIEND?B`? \ No newline at end of file diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi4a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi4a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi4a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi4a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi6a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi6a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi6a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basi6a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn4a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn4a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn4a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn4a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn6a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn6a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn6a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/basn6a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgai4a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgai4a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgai4a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgai4a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgan6a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgan6a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgan6a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgan6a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgbn4a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgbn4a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bggn4a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bggn4a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgwn6a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgwn6a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgyn6a16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/bgyn6a16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ccwn2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ccwn2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ccwn3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ccwn3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdfn2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdfn2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdhn2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdhn2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdsn2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdsn2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdun2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cdun2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ch1n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ch1n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ch2n3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ch2n3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cm0n0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cm0n0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cm7n0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cm7n0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cm9n0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cm9n0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs3n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs3n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs3n3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs3n3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs5n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs5n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs5n3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs5n3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs8n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs8n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs8n3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/cs8n3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ct0n0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ct0n0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ct1n0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ct1n0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ctzn0g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ctzn0g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f00n0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f00n0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f00n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f00n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f01n0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f01n0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f01n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f01n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f02n0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f02n0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f02n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f02n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f03n0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f03n0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f03n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f03n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f04n0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f04n0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f04n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/f04n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g03n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g03n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g03n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g03n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g03n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g03n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g04n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g04n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g04n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g04n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g04n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g04n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g05n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g05n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g05n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g05n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g05n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g05n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g07n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g07n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g07n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g07n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g07n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g07n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g10n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g10n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g10n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g10n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g10n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g10n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g25n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g25n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g25n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g25n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g25n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/g25n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi1n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi1n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi1n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi1n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi2n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi2n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi2n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi2n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi4n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi4n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi4n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi4n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi9n0g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi9n0g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi9n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/oi9n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/pngsuite_logo.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/pngsuite_logo.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/pp0n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/pp0n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/pp0n6a08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/pp0n6a08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps1n0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps1n0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps1n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps1n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps2n0g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps2n0g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps2n2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/ps2n2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s01i3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s01i3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s01n3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s01n3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s02i3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s02i3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s02n3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s02n3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s03i3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s03i3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s03n3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s03n3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s04i3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s04i3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s04n3p01.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s04n3p01.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s05i3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s05i3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s05n3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s05n3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s06i3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s06i3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s06n3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s06n3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s07i3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s07i3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s07n3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s07n3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s08i3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s08i3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s08n3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s08n3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s09i3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s09i3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s09n3p02.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s09n3p02.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s32i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s32i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s32n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s32n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s33i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s33i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s33n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s33n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s34i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s34i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s34n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s34n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s35i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s35i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s35n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s35n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s36i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s36i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s36n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s36n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s37i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s37i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s37n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s37n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s38i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s38i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s38n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s38n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s39i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s39i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s39n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s39n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s40i3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s40i3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s40n3p04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/s40n3p04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbbn1g04.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbbn1g04.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbbn2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbbn2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbbn3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbbn3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbgn2c16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbgn2c16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbgn3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbgn3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbrn2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbrn2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbwn1g16.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbwn1g16.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbwn3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbwn3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbyn3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tbyn3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp0n1g08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp0n1g08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp0n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp0n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp0n3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp0n3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp1n3p08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/tp1n3p08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z00n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z00n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z03n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z03n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z06n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z06n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z09n2c08.png Binary file overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/good_images/z09n2c08.png has changed diff -r cd6310f10fab -r 0c86bdc188d3 patches/jtreg-png-reader.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jtreg-png-reader.patch Tue Feb 01 09:20:39 2011 +0100 @@ -0,0 +1,976 @@ +diff -Nu old/AbstractImageProcessor.java PngReader/AbstractImageProcessor.java +--- openjdk/jdk/test/javax/imageio/plugins/png/PngReader/AbstractImageProcessor.java 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk-old/jdk/test/javax/imageio/plugins/png/PngReader/AbstractImageProcessor.java 2011-01-31 13:59:40.976990000 +0100 +@@ -0,0 +1,316 @@ ++/* ++ * Copyright 2011 Red Hat, Inc. All Rights Reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ */ ++ ++ ++import java.awt.image.BufferedImage; ++import java.awt.image.RenderedImage; ++import java.io.File; ++import java.io.IOException; ++import java.util.Arrays; ++import java.util.HashMap; ++import java.util.Map; ++ ++import javax.imageio.IIOImage; ++import javax.imageio.ImageIO; ++import javax.imageio.ImageReader; ++import javax.imageio.stream.ImageInputStream; ++ ++/** ++ * Abstract class containing only one visible method named run. This method ++ * tries to read all images from given directory and then check if no exception ++ * is thrown during image reading or if expected exception is really thrown. ++ * ++ * This method also prints basic information for each image. Names of files ++ * containing images are based on schema proposed by Willem van Schaik, such ++ * files are included in PNGSUITE. For more information about the images ++ * please see file pngsuite.doc or look at page: ++ * http://www.schaik.com/pngsuite/pngsuite.html ++ * ++ * @author Pavel Tisnovsky ++ */ ++public class AbstractImageProcessor { ++ ++ // maps used for decoding image attributes from file name ++ static final Map testTypes = new HashMap(); ++ static final Map colorTypes = new HashMap(); ++ ++ static { ++ // Background tests ++ testTypes.put("bga", "alpha no"); ++ testTypes.put("bgw", "alpha white"); ++ testTypes.put("bgg", "alpha gray"); ++ testTypes.put("bgb", "alpha black"); ++ testTypes.put("bgy", "alpha yellow"); ++ ++ // Gamma tests ++ testTypes.put("g03", "0.35:2.8"); ++ testTypes.put("g04", "0.45:2.2 (PC)"); ++ testTypes.put("g05", "0.55:1.8 (Mac)"); ++ testTypes.put("g07", "0.70:1.4"); ++ testTypes.put("g10", "1.00:1.0 (NeXT)"); ++ testTypes.put("g25", "2.50:0.4"); ++ ++ // Transparency tests ++ testTypes.put("tp0", "not transparent for reference"); ++ testTypes.put("tp1", "transparent, but no background chunk"); ++ testTypes.put("tbw", "transparent + white background"); ++ testTypes.put("tbg", "transparent + gray background"); ++ testTypes.put("tbb", "transparent + black background"); ++ testTypes.put("tby", "transparent + yellow background"); ++ testTypes.put("tbr", "transparent + red background"); ++ ++ // Filtering tests ++ testTypes.put("f00", "no"); ++ testTypes.put("f01", "sub"); ++ testTypes.put("f02", "up"); ++ testTypes.put("f03", "average"); ++ testTypes.put("f04", "paeth"); ++ ++ // Additional palette tests ++ testTypes.put("pp", "normal palette chunk"); ++ testTypes.put("ps", "suggested palette chunk"); ++ ++ // Chunk ordering tests ++ testTypes.put("oi1", "mother image with 1 idat-chunk"); ++ testTypes.put("oi2", "image with 2 idat-chunks"); ++ testTypes.put("oi4", "image with 4 unequal sized idat-chunks"); ++ testTypes.put("oi9", "all idat-chunks of length one"); ++ ++ // Auxiliary chunks tests ++ testTypes.put("cs3", "3 significant bits"); ++ testTypes.put("cs5", "5 significant bits"); ++ testTypes.put("cs8", "8 significant bits (reference)"); ++ testTypes.put("cdf", "physical pixel dimensions, 8x32 flat pixels"); ++ testTypes.put("cdh", "physical pixel dimensions, 32x8 high pixels"); ++ testTypes.put("cds", "physical pixel dimensions, 8x8 square pixels"); ++ testTypes.put("cdu", "physical pixel dimensions, with unit-specifier"); ++ testTypes.put("ccw", "primary chromaticities and white point"); ++ testTypes.put("ch1", "histogram 15 colors"); ++ testTypes.put("ch2", "histogram 256 colors"); ++ testTypes.put("cm7", "modification time, 01-jan-1970"); ++ testTypes.put("cm9", "modification time, 31-dec-1999"); ++ testTypes.put("cm0", "modification time, 01-jan-2000"); ++ testTypes.put("ct0", "no textual data"); ++ testTypes.put("ct1", "with textual data"); ++ testTypes.put("ctz", "with compressed textual data"); ++ ++ // Corrupted images ++ testTypes.put("x00", "empty IDAT chunk"); ++ testTypes.put("xcr", "added cr bytes"); ++ testTypes.put("xlf", "added lf bytes"); ++ testTypes.put("xc0", "color type 0"); ++ testTypes.put("xc9", "color type 9"); ++ testTypes.put("xd0", "bit-depth 0"); ++ testTypes.put("xd3", "bit-depth 3"); ++ testTypes.put("xd9", "bit-depth 99"); ++ testTypes.put("xcs", "incorrect IDAT checksum"); ++ ++ // Color types ++ colorTypes.put("0g", "grayscale"); ++ colorTypes.put("1g", "grayscale"); ++ colorTypes.put("2c", "RGB color"); ++ colorTypes.put("3p", "palette"); ++ colorTypes.put("4a", "grayscale + alpha"); ++ colorTypes.put("6a", "RGB color + alpha"); ++ } ++ ++ /** ++ * This method tries to read external file containing raster image using ++ * ImageReader. When the image file is corrupted or does not contains any ++ * data, exception is thrown. From ptisnovs at redhat.com Tue Feb 1 05:41:46 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Tue, 01 Feb 2011 14:41:46 +0100 Subject: CubicCurve2D backports - review In-Reply-To: <2067109601.606552.1296516752508.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <2067109601.606552.1296516752508.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <4D480D9A.4010207@redhat.com> Hi Denis, looks ok for me. I just have one question - is there any regression test for checking old and new way for calculating quad curves? I mean tests mainly for these issues: S4493128: CubicCurve2D intersects method fails S4724552: CubicCurve2D.contains(Rectangle2D) returns true when only partially contained. S4645692: solveCubic does not return all solutions. Cheers, Pavel Denis Lila wrote: > Hi. > > I'd like to backport the three attached patches. > > > hg diff: > > diff -r cd6310f10fab ChangeLog > --- a/ChangeLog Sun Jan 30 00:45:18 2011 +0000 > +++ b/ChangeLog Mon Jan 31 13:28:19 2011 -0500 > @@ -1,3 +1,11 @@ > +2011-01-31 Denis Lila > + > + * NEWS: Update with the 3 backports > + * Makefile.am (ICEDTEA_PATCHES): Add the patches > + * patches/openjdk/4493128-CubicCurve2D.patch: New file. > + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: Likewise. > + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. > + > 2011-01-29 Andrew John Hughes > > * patches/gcc-suffix.patch, > diff -r cd6310f10fab Makefile.am > --- a/Makefile.am Sun Jan 30 00:45:18 2011 +0000 > +++ b/Makefile.am Mon Jan 31 13:28:19 2011 -0500 > @@ -275,7 +275,10 @@ > patches/jtreg-international-fonts-styles.patch \ > patches/openjdk/6736649-text_bearings.patch \ > patches/openjdk/6797139-jbutton_truncation.patch \ > - patches/openjdk/6883341-text_bearing_exception.patch > + patches/openjdk/6883341-text_bearing_exception.patch \ > + patches/openjdk/4724552-CubicCurve2D.patch \ > + patches/openjdk/4493128-CubicCurve2D.patch \ > + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r cd6310f10fab NEWS > --- a/NEWS Sun Jan 30 00:45:18 2011 +0000 > +++ b/NEWS Mon Jan 31 13:28:19 2011 -0500 > @@ -403,6 +403,9 @@ > - S6736649: test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java fails on Linux > - S6797139: JButton title is truncating for some strings irrespective of preferred size. > - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw exceptions when running Java2D demo by clicking Paint ta > + - S4493128: CubicCurve2D intersects method fails > + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when only partially contained. > + - S4645692: solveCubic does not return all solutions. > * Bug fixes > - RH647157, RH582455: Update fontconfig files for rhel 6 > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > > ...(and here should be the diff of the patches, but those are attached). > > Thank you, > Denis. > From ahughes at redhat.com Tue Feb 1 06:14:49 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 14:14:49 +0000 Subject: [SECURITY] IcedTea6 1.7.8, 1.8.5, 1.9.5 Released! In-Reply-To: <20101124141550.GC1530@rivendell.middle-earth.co.uk> References: <20101124141550.GC1530@rivendell.middle-earth.co.uk> Message-ID: <20110201141449.GC17735@rivendell.middle-earth.co.uk> We are pleased to announce a new set of security releases, IcedTea6 1.7.8, IcedTea6 1.8.5 and IcedTea6 1.9.5. This update contains the following security updates: * RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass The IcedTea project provides a harness to build the source code from OpenJDK6 using Free Software build tools. It also includes the only Free Java plugin and Web Start implementation, and support for additional architectures over and above x86, x86_64 and SPARC via the Zero assembler port. What?s New? ?????? IcedTea6 1.7.8 ============== * Security updates - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * Backports - S6687968: PNGImageReader leaks native memory through an Inflater - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk - S6782079: PNG: reading metadata may cause OOM on truncated images * Fixes: - RH647157, RH582455: Update fontconfig files for rhel 6 - PR619: Improper finalization by the plugin can crash the browser IcedTea6 1.8.5 ============== * Security updates - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * Backports - S6687968: PNGImageReader leaks native memory through an Inflater - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk - S6782079: PNG: reading metadata may cause OOM on truncated images * Fixes - RH647157, RH582455: Update fontconfig files for rhel 6 - PR619: Improper finalization by the plugin can crash the browser IcedTea6 1.9.5 ============== * Security updates - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * Backports - S6687968: PNGImageReader leaks native memory through an Inflater - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk - S6782079: PNG: reading metadata may cause OOM on truncated images * Fixes - RH647157, RH582455: Update fontconfig files for rhel 6 - PR619: Improper finalization by the plugin can crash the browser The tarballs can be downloaded from: * http://icedtea.classpath.org/download/source/icedtea6-1.7.8.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.8.5.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.9.5.tar.gz SHA256 sums: a1cbb4e5962d1fed0c816cebce33b6896b61a9f19b404f5e91439b9e7ffcd97c icedtea6-1.7.8.tar.gz 1ee081368587507e7ea75bd3351be0eafadd3f7020930db68448bcec6fa5c452 icedtea6-1.8.5.tar.gz dac8ad42c452b3211b4daf26446da090f1f6c45952d9dbf52f66447adef73a29 icedtea6-1.9.5.tar.gz The following people helped with these releases: Deepak Bhole, Andrew John Hughes, Jiri Vanek We would also like to thank the bug reporters and testers! To get started: $ tar xzf icedtea6-.tar.gz $ cd icedtea6- Full build requirements and instructions are in INSTALL: $ ./configure [--enable-zero --enable-pulse-java --enable-systemtap ...] $ make -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 06:30:11 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 14:30:11 +0000 Subject: [Bug 624] New: JVM crashes with Tomcat Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=624 Summary: JVM crashes with Tomcat Product: IcedTea Version: 6-1.7.5 Platform: x86 OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: boris at alum.mit.edu I am getting this crash repeatedly when users visit a particular page of a web application. Will attach the stack trace. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Tue Feb 1 06:31:04 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 14:31:04 +0000 Subject: /hg/release/icedtea6-1.9: 3 new changesets Message-ID: changeset 388e5f866df3 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=388e5f866df3 author: Andrew John Hughes date: Tue Jan 25 15:38:10 2011 +0000 RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass 2011-01-24 Deepak Bhole RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeResources): Prompt user only if there is a single certificate that signs all jars in the jnlp file, otherwise treat as unsigned. * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to getCertPath and make it return a CertPath. * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs variable to certPath and change its type to CertPath. (buildTree): Use new certPath variable. (populateTable): Same. * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts to getCertPath and make it return a CertPath. * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs variable to be a hashmap that stores certs and the number of entries they have signed. (totalSignableEntries): New variable to track how many signable entries have been encountered. (getCerts): Updated method to return certs from new hashmap. (isFullySignedByASingleCert): New method. Returns if there is a single cert that signs all the entries in the jars specified in the jnlp file. (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so that the data is not lost when the next jar is processed. After verifying each jar, see if there is a single signer, and prompt the user if there is such an untrusted signer. (verifyJar): Increment totalSignableEntries for each signable entry encountered and the count for each cert when it signs an entry. Move checkTrustedCerts() out of the function into verifyJars(). changeset a55e0ec59e42 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=a55e0ec59e42 author: Andrew John Hughes date: Tue Feb 01 14:30:40 2011 +0000 Bump for 1.9.5. 2011-01-25 Andrew John Hughes * NEWS: Update for 1.9.5 release. * configure.ac: Bump to 1.9.5. changeset c6d1d36e4c26 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=c6d1d36e4c26 author: Andrew John Hughes date: Tue Feb 01 14:30:45 2011 +0000 Added tag icedtea6-1.9.5 for changeset a55e0ec59e42 diffstat: 9 files changed, 119 insertions(+), 42 deletions(-) .hgtags | 1 ChangeLog | 35 +++++ NEWS | 6 configure.ac | 2 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 2 netx/net/sourceforge/jnlp/security/CertVerifier.java | 2 netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 19 +- netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 4 netx/net/sourceforge/jnlp/tools/JarSigner.java | 90 +++++++++---- diffs (337 lines): diff -r 09eef2decb0f -r c6d1d36e4c26 .hgtags --- a/.hgtags Thu Jan 20 11:11:20 2011 -0500 +++ b/.hgtags Tue Feb 01 14:30:45 2011 +0000 @@ -24,3 +24,4 @@ c298e31212047871e12f07d6900d7580f83b5831 c298e31212047871e12f07d6900d7580f83b5831 icedtea6-1.9.2 42cb6cbb7ba6fbbcdd3499ea91c283637994db98 icedtea6-1.9.3 fdefc65b1e3f7ab140ce4da42716c2439796dfda icedtea6-1.9.4 +a55e0ec59e4287f9df15f666503dbe500f1a61ea icedtea6-1.9.5 diff -r 09eef2decb0f -r c6d1d36e4c26 ChangeLog --- a/ChangeLog Thu Jan 20 11:11:20 2011 -0500 +++ b/ChangeLog Tue Feb 01 14:30:45 2011 +0000 @@ -1,3 +1,38 @@ 2011-01-20 Deepak Bhole + + * NEWS: Update for 1.9.5 release. + * configure.ac: Bump to 1.9.5. + +2011-01-24 Deepak Bhole + + RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Prompt user only if there is a single certificate + that signs all jars in the jnlp file, otherwise treat as unsigned. + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to + getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs + variable to certPath and change its type to CertPath. + (buildTree): Use new certPath variable. + (populateTable): Same. + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts + to getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs + variable to be a hashmap that stores certs and the number of entries they + have signed. + (totalSignableEntries): New variable to track how many signable entries + have been encountered. + (getCerts): Updated method to return certs from new hashmap. + (isFullySignedByASingleCert): New method. Returns if there is a single + cert that signs all the entries in the jars specified in the jnlp file. + (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so + that the data is not lost when the next jar is processed. After verifying + each jar, see if there is a single signer, and prompt the user if there is + such an untrusted signer. + (verifyJar): Increment totalSignableEntries for each signable entry + encountered and the count for each cert when it signs an entry. Move + checkTrustedCerts() out of the function into verifyJars(). + 2011-01-20 Deepak Bhole PR619: Improper finalization by the plugin can crash the browser diff -r 09eef2decb0f -r c6d1d36e4c26 NEWS --- a/NEWS Thu Jan 20 11:11:20 2011 -0500 +++ b/NEWS Tue Feb 01 14:30:45 2011 +0000 @@ -8,14 +8,16 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.9.5 (2011-XX-XX): +New in release 1.9.5 (2011-02-01): +* Security updates + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * Backports - S6687968: PNGImageReader leaks native memory through an Inflater - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk - S6782079: PNG: reading metadata may cause OOM on truncated images * Fixes - - RH647157,RH582455: Update fontconfig files for rhel 6 + - RH647157, RH582455: Update fontconfig files for rhel 6 - PR619: Improper finalization by the plugin can crash the browser New in release 1.9.4 (2011-01-18): diff -r 09eef2decb0f -r c6d1d36e4c26 configure.ac --- a/configure.ac Thu Jan 20 11:11:20 2011 -0500 +++ b/configure.ac Tue Feb 01 14:30:45 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.9.5pre],[distro-pk -AC_INIT([icedtea6],[1.9.5pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.9.5],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 09eef2decb0f -r c6d1d36e4c26 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 14:30:45 2011 +0000 @@ -397,7 +397,7 @@ public class JNLPClassLoader extends URL } //Case when at least one jar has some signing - if (js.anyJarsSigned()){ + if (js.anyJarsSigned() && js.isFullySignedByASingleCert()){ signing = true; if (!js.allJarsSigned() && diff -r 09eef2decb0f -r c6d1d36e4c26 netx/net/sourceforge/jnlp/security/CertVerifier.java --- a/netx/net/sourceforge/jnlp/security/CertVerifier.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertVerifier.java Tue Feb 01 14:30:45 2011 +0000 @@ -76,7 +76,7 @@ public interface CertVerifier { * Return a valid certificate path to this certificate(s) being verified * @return The CertPath */ - public ArrayList getCerts(); + public CertPath getCertPath(); /** * Returns the application's publisher's certificate. diff -r 09eef2decb0f -r c6d1d36e4c26 netx/net/sourceforge/jnlp/security/CertsInfoPane.java --- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Tue Feb 01 14:30:45 2011 +0000 @@ -65,7 +65,7 @@ import net.sourceforge.jnlp.tools.*; */ public class CertsInfoPane extends SecurityDialogPanel { - private ArrayList certs; + private CertPath certPath; private JList list; protected JTree tree; private JTable table; @@ -85,12 +85,9 @@ public class CertsInfoPane extends Secur * Builds the JTree out of CertPaths. */ void buildTree() { - certs = parent.getJarSigner().getCerts(); - //for now, we're only going to display the first signer, even though - //jars can be signed by multiple people. - CertPath firstPath = certs.get(0); + certPath = parent.getJarSigner().getCertPath(); X509Certificate firstCert = - ((X509Certificate)firstPath.getCertificates().get(0)); + ((X509Certificate)certPath.getCertificates().get(0)); String subjectString = SecurityUtil.getCN(firstCert.getSubjectX500Principal().getName()); String issuerString = @@ -102,9 +99,9 @@ public class CertsInfoPane extends Secur //not self signed if (!firstCert.getSubjectDN().equals(firstCert.getIssuerDN()) - && (firstPath.getCertificates().size() > 1)) { + && (certPath.getCertificates().size() > 1)) { X509Certificate secondCert = - ((X509Certificate)firstPath.getCertificates().get(1)); + ((X509Certificate)certPath.getCertificates().get(1)); subjectString = SecurityUtil.getCN(secondCert.getSubjectX500Principal().getName()); issuerString = @@ -123,12 +120,12 @@ public class CertsInfoPane extends Secur * Fills in certsNames, certsData with data from the certificates. */ protected void populateTable() { - certNames = new String[certs.get(0).getCertificates().size()]; + certNames = new String[certPath.getCertificates().size()]; certsData = new ArrayList(); - for (int i = 0; i < certs.get(0).getCertificates().size(); i++) { + for (int i = 0; i < certPath.getCertificates().size(); i++) { - X509Certificate c = (X509Certificate) certs.get(0).getCertificates().get(i); + X509Certificate c = (X509Certificate) certPath.getCertificates().get(i); certsData.add(parseCert(c)); certNames[i] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; diff -r 09eef2decb0f -r c6d1d36e4c26 netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Tue Feb 01 14:30:45 2011 +0000 @@ -82,7 +82,7 @@ public class HttpsCertVerifier implement return isTrusted; } - public ArrayList getCerts() { + public CertPath getCertPath() { ArrayList list = new ArrayList(); for (int i=0; i < chain.length; i++) @@ -98,7 +98,7 @@ public class HttpsCertVerifier implement // carry on } - return certPaths; + return certPaths.get(0); } public ArrayList getDetails() { diff -r 09eef2decb0f -r c6d1d36e4c26 netx/net/sourceforge/jnlp/tools/JarSigner.java --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 14:30:45 2011 +0000 @@ -142,10 +142,12 @@ public class JarSigner implements CertVe private ArrayList unverifiedJars = null; /** the certificates used for jar verification */ - private ArrayList certs = null; + private HashMap certs = new HashMap(); /** details of this signing */ private ArrayList details = new ArrayList(); + + private int totalSignableEntries = 0; /* (non-Javadoc) * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher() @@ -195,18 +197,41 @@ public class JarSigner implements CertVe * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts() */ public ArrayList getCerts() { - return certs; + return new ArrayList(certs.keySet()); + } + + /** + * Returns whether or not all entries have a common signer. + * + * It is possible to create jars where only some entries are signed. In + * such cases, we should not prompt the user to accept anything, as the whole + * application must be treated as unsigned. This method should be called by a + * caller before it is about to ask the user to accept a cert and determine + * whether the application is trusted or not. + * + * @return Whether or not all entries have a common signer + */ + public boolean isFullySignedByASingleCert() { + + for (CertPath cPath : certs.keySet()) { + // If this cert has signed everything, return true + if (certs.get(cPath) == totalSignableEntries) + return true; + } + + // No cert found that signed all entries. Return false. + return false; } public void verifyJars(List jars, ResourceTracker tracker) throws Exception { - certs = new ArrayList(); + verifiedJars = new ArrayList(); + unverifiedJars = new ArrayList(); + for (int i = 0; i < jars.size(); i++) { JARDesc jar = (JARDesc) jars.get(i); - verifiedJars = new ArrayList(); - unverifiedJars = new ArrayList(); try { @@ -235,16 +260,28 @@ public class JarSigner implements CertVe throw e; } } + + //we really only want the first certPath + for (CertPath cPath : certs.keySet()) { + + if (certs.get(cPath) != totalSignableEntries) + continue; + else + certPath = cPath; + + // check if the certs added above are in the trusted path + checkTrustedCerts(); + + if (alreadyTrustPublisher || rootInCacerts) + break; + } + } public verifyResult verifyJar(String jarName) throws Exception { boolean anySigned = false; boolean hasUnsignedEntry = false; JarFile jarFile = null; - - // certs could be uninitialized if one calls this method directly - if (certs == null) - certs = new ArrayList(); try { jarFile = new JarFile(jarName, true); @@ -283,21 +320,23 @@ public class JarSigner implements CertVe CodeSigner[] signers = je.getCodeSigners(); boolean isSigned = (signers != null); anySigned |= isSigned; - hasUnsignedEntry |= !je.isDirectory() && !isSigned - && !signatureRelated(name); + + boolean shouldHaveSignature = !je.isDirectory() + && !signatureRelated(name); + + hasUnsignedEntry |= shouldHaveSignature && !isSigned; + + if (shouldHaveSignature) + totalSignableEntries++; + if (isSigned) { - // TODO: Perhaps we should check here that - // signers.length is only of size 1, and throw an - // exception if it's not? for (int i = 0; i < signers.length; i++) { CertPath certPath = signers[i].getSignerCertPath(); - if (!certs.contains(certPath)) - certs.add(certPath); - //we really only want the first certPath - if (!certPath.equals(this.certPath)){ - this.certPath = certPath; - } + if (!certs.containsKey(certPath)) + certs.put(certPath, 1); + else + certs.put(certPath, certs.get(certPath) + 1); Certificate cert = signers[i].getSignerCertPath() .getCertificates().get(0); @@ -317,7 +356,13 @@ public class JarSigner implements CertVe } } } //while e has more elements - } //if man not null + } else { //if man not null + + // Else increment totalEntries by 1 so that unsigned jars with + // no manifests can't sneak in + totalSignableEntries++; + + } //Alert the user if any of the following are true. if (!anySigned) { @@ -357,9 +402,6 @@ public class JarSigner implements CertVe jarFile.close(); } } - - // check if the certs added above are in the trusted path - checkTrustedCerts(); //anySigned does not guarantee that all files were signed. return (anySigned && !(hasUnsignedEntry || hasExpiredCert From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 06:31:18 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 14:31:18 +0000 Subject: [Bug 624] JVM crashes with Tomcat Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=624 ------- Comment #1 from boris at alum.mit.edu 2011-02-01 14:31 ------- Created an attachment (id=457) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=457&action=view) stacktrace -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Tue Feb 1 06:34:18 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 14:34:18 +0000 Subject: /hg/release/icedtea6-1.8: 3 new changesets Message-ID: changeset 8c1dc32cd058 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=8c1dc32cd058 author: Andrew John Hughes date: Tue Jan 25 15:39:15 2011 +0000 RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass 2011-01-24 Deepak Bhole RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeResources): Prompt user only if there is a single certificate that signs all jars in the jnlp file, otherwise treat as unsigned. * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to getCertPath and make it return a CertPath. * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs variable to certPath and change its type to CertPath. (buildTree): Use new certPath variable. (populateTable): Same. * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts to getCertPath and make it return a CertPath. * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs variable to be a hashmap that stores certs and the number of entries they have signed. (totalSignableEntries): New variable to track how many signable entries have been encountered. (getCerts): Updated method to return certs from new hashmap. (isFullySignedByASingleCert): New method. Returns if there is a single cert that signs all the entries in the jars specified in the jnlp file. (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so that the data is not lost when the next jar is processed. After verifying each jar, see if there is a single signer, and prompt the user if there is such an untrusted signer. (verifyJar): Increment totalSignableEntries for each signable entry encountered and the count for each cert when it signs an entry. Move checkTrustedCerts() out of the function into verifyJars(). changeset e41dfe105a41 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=e41dfe105a41 author: Andrew John Hughes date: Tue Feb 01 14:31:53 2011 +0000 Bump to 1.8.5. 2011-01-25 Andrew John Hughes * NEWS: Update for 1.8.5 release. * configure.ac: Bump to 1.8.5. changeset a7282f501aeb in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=a7282f501aeb author: Andrew John Hughes date: Tue Feb 01 14:31:59 2011 +0000 Added tag icedtea6-1.8.5 for changeset e41dfe105a41 diffstat: 9 files changed, 120 insertions(+), 43 deletions(-) .hgtags | 1 ChangeLog | 35 +++++ NEWS | 6 configure.ac | 2 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 2 netx/net/sourceforge/jnlp/security/CertVerifier.java | 2 netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 20 +- netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 4 netx/net/sourceforge/jnlp/tools/JarSigner.java | 91 +++++++++---- diffs (340 lines): diff -r 83b92103693a -r a7282f501aeb .hgtags --- a/.hgtags Thu Jan 20 11:11:20 2011 -0500 +++ b/.hgtags Tue Feb 01 14:31:59 2011 +0000 @@ -25,3 +25,4 @@ e96213dd3cd67306ded33a13319e8681728c7299 e96213dd3cd67306ded33a13319e8681728c7299 icedtea6-1.8.2 4f06af1897c3feff8708ff35a94df642f363d190 icedtea6-1.8.3 975f7989ae6615f5d0cbce3089291a7c8841364f icedtea6-1.8.4 +e41dfe105a4113a351e90bd1ce22c81f06f3e68c icedtea6-1.8.5 diff -r 83b92103693a -r a7282f501aeb ChangeLog --- a/ChangeLog Thu Jan 20 11:11:20 2011 -0500 +++ b/ChangeLog Tue Feb 01 14:31:59 2011 +0000 @@ -1,3 +1,38 @@ 2011-01-20 Deepak Bhole + + * NEWS: Update for 1.8.5 release. + * configure.ac: Bump to 1.8.5. + +2011-01-24 Deepak Bhole + + RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Prompt user only if there is a single certificate + that signs all jars in the jnlp file, otherwise treat as unsigned. + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to + getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs + variable to certPath and change its type to CertPath. + (buildTree): Use new certPath variable. + (populateTable): Same. + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts + to getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs + variable to be a hashmap that stores certs and the number of entries they + have signed. + (totalSignableEntries): New variable to track how many signable entries + have been encountered. + (getCerts): Updated method to return certs from new hashmap. + (isFullySignedByASingleCert): New method. Returns if there is a single + cert that signs all the entries in the jars specified in the jnlp file. + (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so + that the data is not lost when the next jar is processed. After verifying + each jar, see if there is a single signer, and prompt the user if there is + such an untrusted signer. + (verifyJar): Increment totalSignableEntries for each signable entry + encountered and the count for each cert when it signs an entry. Move + checkTrustedCerts() out of the function into verifyJars(). + 2011-01-20 Deepak Bhole PR619: Improper finalization by the plugin can crash the browser diff -r 83b92103693a -r a7282f501aeb NEWS --- a/NEWS Thu Jan 20 11:11:20 2011 -0500 +++ b/NEWS Tue Feb 01 14:31:59 2011 +0000 @@ -8,14 +8,16 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.8.5 (2011-XX-XX): +New in release 1.8.5 (2011-02-01): +* Security updates + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * Backports - S6687968: PNGImageReader leaks native memory through an Inflater - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk - S6782079: PNG: reading metadata may cause OOM on truncated images * Fixes - - RH647157,RH582455: Update fontconfig files for rhel 6 + - RH647157, RH582455: Update fontconfig files for rhel 6 - PR619: Improper finalization by the plugin can crash the browser New in release 1.8.4 (2011-01-18): diff -r 83b92103693a -r a7282f501aeb configure.ac --- a/configure.ac Thu Jan 20 11:11:20 2011 -0500 +++ b/configure.ac Tue Feb 01 14:31:59 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.8.5pre],[distro-pk -AC_INIT([icedtea6],[1.8.5pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.8.5],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 83b92103693a -r a7282f501aeb netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 14:31:59 2011 +0000 @@ -398,7 +398,7 @@ public class JNLPClassLoader extends URL } //Case when at least one jar has some signing - if (js.anyJarsSigned()){ + if (js.anyJarsSigned() && js.isFullySignedByASingleCert()){ signing = true; if (!js.allJarsSigned() && diff -r 83b92103693a -r a7282f501aeb netx/net/sourceforge/jnlp/security/CertVerifier.java --- a/netx/net/sourceforge/jnlp/security/CertVerifier.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertVerifier.java Tue Feb 01 14:31:59 2011 +0000 @@ -76,7 +76,7 @@ public interface CertVerifier { * Return a valid certificate path to this certificate(s) being verified * @return The CertPath */ - public ArrayList getCerts(); + public CertPath getCertPath(); /** * Returns the application's publisher's certificate. diff -r 83b92103693a -r a7282f501aeb netx/net/sourceforge/jnlp/security/CertsInfoPane.java --- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Tue Feb 01 14:31:59 2011 +0000 @@ -65,7 +65,7 @@ import net.sourceforge.jnlp.tools.*; */ public class CertsInfoPane extends SecurityDialogUI { - private ArrayList certs; + private CertPath certPath; private JList list; protected JTree tree; private JTable table; @@ -84,12 +84,10 @@ public class CertsInfoPane extends Secur * Builds the JTree out of CertPaths. */ void buildTree() { - certs = ((SecurityWarningDialog)optionPane).getJarSigner().getCerts(); - //for now, we're only going to display the first signer, even though - //jars can be signed by multiple people. - CertPath firstPath = certs.get(0); + certPath = ((SecurityWarningDialog)optionPane).getJarSigner().getCertPath(); + X509Certificate firstCert = - ((X509Certificate)firstPath.getCertificates().get(0)); + ((X509Certificate)certPath.getCertificates().get(0)); String subjectString = SecurityUtil.getCN(firstCert.getSubjectX500Principal().getName()); String issuerString = @@ -101,9 +99,9 @@ public class CertsInfoPane extends Secur //not self signed if (!firstCert.getSubjectDN().equals(firstCert.getIssuerDN()) - && (firstPath.getCertificates().size() > 1)) { + && (certPath.getCertificates().size() > 1)) { X509Certificate secondCert = - ((X509Certificate)firstPath.getCertificates().get(1)); + ((X509Certificate)certPath.getCertificates().get(1)); subjectString = SecurityUtil.getCN(secondCert.getSubjectX500Principal().getName()); issuerString = @@ -122,12 +120,12 @@ public class CertsInfoPane extends Secur * Fills in certsNames, certsData with data from the certificates. */ protected void populateTable() { - certNames = new String[certs.get(0).getCertificates().size()]; + certNames = new String[certPath.getCertificates().size()]; certsData = new ArrayList(); - for (int i = 0; i < certs.get(0).getCertificates().size(); i++) { + for (int i = 0; i < certPath.getCertificates().size(); i++) { - X509Certificate c = (X509Certificate) certs.get(0).getCertificates().get(i); + X509Certificate c = (X509Certificate) certPath.getCertificates().get(i); certsData.add(parseCert(c)); certNames[i] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; diff -r 83b92103693a -r a7282f501aeb netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Tue Feb 01 14:31:59 2011 +0000 @@ -82,7 +82,7 @@ public class HttpsCertVerifier implement return isTrusted; } - public ArrayList getCerts() { + public CertPath getCertPath() { ArrayList list = new ArrayList(); for (int i=0; i < chain.length; i++) @@ -98,7 +98,7 @@ public class HttpsCertVerifier implement // carry on } - return certPaths; + return certPaths.get(0); } public ArrayList getDetails() { diff -r 83b92103693a -r a7282f501aeb netx/net/sourceforge/jnlp/tools/JarSigner.java --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Thu Jan 20 11:11:20 2011 -0500 +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 14:31:59 2011 +0000 @@ -142,11 +142,13 @@ public class JarSigner implements CertVe private ArrayList unverifiedJars = null; /** the certificates used for jar verification */ - private ArrayList certs = null; + private HashMap certs = new HashMap(); /** details of this signing */ private ArrayList details = new ArrayList(); + private int totalSignableEntries = 0; + /* (non-Javadoc) * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher() */ @@ -195,18 +197,41 @@ public class JarSigner implements CertVe * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts() */ public ArrayList getCerts() { - return certs; + return new ArrayList(certs.keySet()); } + /** + * Returns whether or not all entries have a common signer. + * + * It is possible to create jars where only some entries are signed. In + * such cases, we should not prompt the user to accept anything, as the whole + * application must be treated as unsigned. This method should be called by a + * caller before it is about to ask the user to accept a cert and determine + * whether the application is trusted or not. + * + * @return Whether or not all entries have a common signer + */ + public boolean isFullySignedByASingleCert() { + + for (CertPath cPath : certs.keySet()) { + // If this cert has signed everything, return true + if (certs.get(cPath) == totalSignableEntries) + return true; + } + + // No cert found that signed all entries. Return false. + return false; + } + public void verifyJars(List jars, ResourceTracker tracker) throws Exception { - certs = new ArrayList(); + verifiedJars = new ArrayList(); + unverifiedJars = new ArrayList(); + for (int i = 0; i < jars.size(); i++) { JARDesc jar = (JARDesc) jars.get(i); - verifiedJars = new ArrayList(); - unverifiedJars = new ArrayList(); try { @@ -235,6 +260,22 @@ public class JarSigner implements CertVe throw e; } } + + //we really only want the first certPath + for (CertPath cPath : certs.keySet()) { + + if (certs.get(cPath) != totalSignableEntries) + continue; + else + certPath = cPath; + + // check if the certs added above are in the trusted path + checkTrustedCerts(); + + if (alreadyTrustPublisher || rootInCacerts) + break; + } + } public verifyResult verifyJar(String jarName) throws Exception { @@ -242,10 +283,6 @@ public class JarSigner implements CertVe boolean hasUnsignedEntry = false; JarFile jarFile = null; - // certs could be uninitialized if one calls this method directly - if (certs == null) - certs = new ArrayList(); - try { jarFile = new JarFile(jarName, true); Vector entriesVec = new Vector(); @@ -283,21 +320,23 @@ public class JarSigner implements CertVe CodeSigner[] signers = je.getCodeSigners(); boolean isSigned = (signers != null); anySigned |= isSigned; - hasUnsignedEntry |= !je.isDirectory() && !isSigned - && !signatureRelated(name); + + boolean shouldHaveSignature = !je.isDirectory() + && !signatureRelated(name); + + hasUnsignedEntry |= shouldHaveSignature && !isSigned; + + if (shouldHaveSignature) + totalSignableEntries++; + if (isSigned) { - // TODO: Perhaps we should check here that - // signers.length is only of size 1, and throw an - // exception if it's not? for (int i = 0; i < signers.length; i++) { CertPath certPath = signers[i].getSignerCertPath(); - if (!certs.contains(certPath)) - certs.add(certPath); - - //we really only want the first certPath - if (!certPath.equals(this.certPath)){ - this.certPath = certPath; - } + + if (!certs.containsKey(certPath)) + certs.put(certPath, 1); + else + certs.put(certPath, certs.get(certPath) + 1); Certificate cert = signers[i].getSignerCertPath() .getCertificates().get(0); @@ -317,7 +356,12 @@ public class JarSigner implements CertVe } } } //while e has more elements - } //if man not null + } else { //if man not null + + // Else increment totalEntries by 1 so that unsigned jars with + // no manifests can't sneak in + totalSignableEntries++; + } //Alert the user if any of the following are true. if (!anySigned) { @@ -357,9 +401,6 @@ public class JarSigner implements CertVe jarFile.close(); } } - - // check if the certs added above are in the trusted path - checkTrustedCerts(); //anySigned does not guarantee that all files were signed. return (anySigned && !(hasUnsignedEntry || hasExpiredCert From andrew at icedtea.classpath.org Tue Feb 1 06:36:56 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 14:36:56 +0000 Subject: /hg/release/icedtea6-1.7: 3 new changesets Message-ID: changeset 1db6ba4a4593 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=1db6ba4a4593 author: Andrew John Hughes date: Tue Jan 25 15:39:52 2011 +0000 RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass 2011-01-24 Deepak Bhole RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeResources): Prompt user only if there is a single certificate that signs all jars in the jnlp file, otherwise treat as unsigned. * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to getCertPath and make it return a CertPath. * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs variable to certPath and change its type to CertPath. (buildTree): Use new certPath variable. (populateTable): Same. * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts to getCertPath and make it return a CertPath. * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs variable to be a hashmap that stores certs and the number of entries they have signed. (totalSignableEntries): New variable to track how many signable entries have been encountered. (getCerts): Updated method to return certs from new hashmap. (isFullySignedByASingleCert): New method. Returns if there is a single cert that signs all the entries in the jars specified in the jnlp file. (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so that the data is not lost when the next jar is processed. After verifying each jar, see if there is a single signer, and prompt the user if there is such an untrusted signer. (verifyJar): Increment totalSignableEntries for each signable entry encountered and the count for each cert when it signs an entry. Move checkTrustedCerts() out of the function into verifyJars(). changeset 626c4d1e1fa4 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=626c4d1e1fa4 author: Andrew John Hughes date: Tue Feb 01 14:35:07 2011 +0000 Bump to 1.7.8. 2011-01-25 Andrew John Hughes * NEWS: Update for 1.7.8 release. * configure.ac: Bump to 1.7.8. changeset 392843c37e47 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=392843c37e47 author: Andrew John Hughes date: Tue Feb 01 14:35:18 2011 +0000 Added tag icedtea6-1.7.8 for changeset 626c4d1e1fa4 diffstat: 9 files changed, 120 insertions(+), 43 deletions(-) .hgtags | 1 ChangeLog | 35 +++++ NEWS | 6 configure.ac | 2 rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 2 rt/net/sourceforge/jnlp/security/CertVerifier.java | 2 rt/net/sourceforge/jnlp/security/CertsInfoPane.java | 20 +-- rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 4 rt/net/sourceforge/jnlp/tools/JarSigner.java | 91 ++++++++++----- diffs (340 lines): diff -r 500f06b81c78 -r 392843c37e47 .hgtags --- a/.hgtags Thu Jan 20 11:11:20 2011 -0500 +++ b/.hgtags Tue Feb 01 14:35:18 2011 +0000 @@ -29,3 +29,4 @@ 6282308dea7401c00bb779bd4ab2ff7f4d269114 6282308dea7401c00bb779bd4ab2ff7f4d269114 icedtea6-1.7.5 f5667b14ce7eb0dc9b121164a28d3b3fcd516c61 icedtea6-1.7.6 8784e22fa2897df7373ca8869e7dab8d3af8c8c9 icedtea6-1.7.7 +626c4d1e1fa47b492bb41c8438f66aacd35146ae icedtea6-1.7.8 diff -r 500f06b81c78 -r 392843c37e47 ChangeLog --- a/ChangeLog Thu Jan 20 11:11:20 2011 -0500 +++ b/ChangeLog Tue Feb 01 14:35:18 2011 +0000 @@ -1,3 +1,38 @@ 2011-01-20 Deepak Bhole + + * NEWS: Update for 1.7.8 release. + * configure.ac: Bump to 1.7.8. + +2011-01-24 Deepak Bhole + + RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Prompt user only if there is a single certificate + that signs all jars in the jnlp file, otherwise treat as unsigned. + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to + getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs + variable to certPath and change its type to CertPath. + (buildTree): Use new certPath variable. + (populateTable): Same. + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts + to getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs + variable to be a hashmap that stores certs and the number of entries they + have signed. + (totalSignableEntries): New variable to track how many signable entries + have been encountered. + (getCerts): Updated method to return certs from new hashmap. + (isFullySignedByASingleCert): New method. Returns if there is a single + cert that signs all the entries in the jars specified in the jnlp file. + (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so + that the data is not lost when the next jar is processed. After verifying + each jar, see if there is a single signer, and prompt the user if there is + such an untrusted signer. + (verifyJar): Increment totalSignableEntries for each signable entry + encountered and the count for each cert when it signs an entry. Move + checkTrustedCerts() out of the function into verifyJars(). + 2011-01-20 Deepak Bhole PR619: Improper finalization by the plugin can crash the browser diff -r 500f06b81c78 -r 392843c37e47 NEWS --- a/NEWS Thu Jan 20 11:11:20 2011 -0500 +++ b/NEWS Tue Feb 01 14:35:18 2011 +0000 @@ -8,14 +8,16 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.7.8 (2011-XX-XX): +New in release 1.7.8 (2011-02-01): +* Security updates + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * Backports - S6687968: PNGImageReader leaks native memory through an Inflater - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk - S6782079: PNG: reading metadata may cause OOM on truncated images * Fixes: - - RH647157,RH582455: Update fontconfig files for rhel 6 + - RH647157, RH582455: Update fontconfig files for rhel 6 - PR619: Improper finalization by the plugin can crash the browser New in release 1.7.7 (2011-01-18): diff -r 500f06b81c78 -r 392843c37e47 configure.ac --- a/configure.ac Thu Jan 20 11:11:20 2011 -0500 +++ b/configure.ac Tue Feb 01 14:35:18 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [1.7.8pre], [distro- -AC_INIT([icedtea6], [1.7.8pre], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.7.8], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 500f06b81c78 -r 392843c37e47 rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Jan 20 11:11:20 2011 -0500 +++ b/rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 14:35:18 2011 +0000 @@ -399,7 +399,7 @@ public class JNLPClassLoader extends URL } //Case when at least one jar has some signing - if (js.anyJarsSigned()){ + if (js.anyJarsSigned() && js.isFullySignedByASingleCert()){ signing = true; if (!js.allJarsSigned() && diff -r 500f06b81c78 -r 392843c37e47 rt/net/sourceforge/jnlp/security/CertVerifier.java --- a/rt/net/sourceforge/jnlp/security/CertVerifier.java Thu Jan 20 11:11:20 2011 -0500 +++ b/rt/net/sourceforge/jnlp/security/CertVerifier.java Tue Feb 01 14:35:18 2011 +0000 @@ -76,7 +76,7 @@ public interface CertVerifier { * Return a valid certificate path to this certificate(s) being verified * @return The CertPath */ - public ArrayList getCerts(); + public CertPath getCertPath(); /** * Returns the application's publisher's certificate. diff -r 500f06b81c78 -r 392843c37e47 rt/net/sourceforge/jnlp/security/CertsInfoPane.java --- a/rt/net/sourceforge/jnlp/security/CertsInfoPane.java Thu Jan 20 11:11:20 2011 -0500 +++ b/rt/net/sourceforge/jnlp/security/CertsInfoPane.java Tue Feb 01 14:35:18 2011 +0000 @@ -65,7 +65,7 @@ import net.sourceforge.jnlp.tools.*; */ public class CertsInfoPane extends SecurityDialogUI { - private ArrayList certs; + private CertPath certPath; private JList list; protected JTree tree; private JTable table; @@ -84,12 +84,10 @@ public class CertsInfoPane extends Secur * Builds the JTree out of CertPaths. */ void buildTree() { - certs = ((SecurityWarningDialog)optionPane).getJarSigner().getCerts(); - //for now, we're only going to display the first signer, even though - //jars can be signed by multiple people. - CertPath firstPath = certs.get(0); + certPath = ((SecurityWarningDialog)optionPane).getJarSigner().getCertPath(); + X509Certificate firstCert = - ((X509Certificate)firstPath.getCertificates().get(0)); + ((X509Certificate)certPath.getCertificates().get(0)); String subjectString = SecurityUtil.getCN(firstCert.getSubjectX500Principal().getName()); String issuerString = @@ -101,9 +99,9 @@ public class CertsInfoPane extends Secur //not self signed if (!firstCert.getSubjectDN().equals(firstCert.getIssuerDN()) - && (firstPath.getCertificates().size() > 1)) { + && (certPath.getCertificates().size() > 1)) { X509Certificate secondCert = - ((X509Certificate)firstPath.getCertificates().get(1)); + ((X509Certificate)certPath.getCertificates().get(1)); subjectString = SecurityUtil.getCN(secondCert.getSubjectX500Principal().getName()); issuerString = @@ -122,12 +120,12 @@ public class CertsInfoPane extends Secur * Fills in certsNames, certsData with data from the certificates. */ protected void populateTable() { - certNames = new String[certs.get(0).getCertificates().size()]; + certNames = new String[certPath.getCertificates().size()]; certsData = new ArrayList(); - for (int i = 0; i < certs.get(0).getCertificates().size(); i++) { + for (int i = 0; i < certPath.getCertificates().size(); i++) { - X509Certificate c = (X509Certificate) certs.get(0).getCertificates().get(i); + X509Certificate c = (X509Certificate) certPath.getCertificates().get(i); certsData.add(parseCert(c)); certNames[i] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; diff -r 500f06b81c78 -r 392843c37e47 rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java Thu Jan 20 11:11:20 2011 -0500 +++ b/rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java Tue Feb 01 14:35:18 2011 +0000 @@ -82,7 +82,7 @@ public class HttpsCertVerifier implement return isTrusted; } - public ArrayList getCerts() { + public CertPath getCertPath() { ArrayList list = new ArrayList(); for (int i=0; i < chain.length; i++) @@ -98,7 +98,7 @@ public class HttpsCertVerifier implement // carry on } - return certPaths; + return certPaths.get(0); } public ArrayList getDetails() { diff -r 500f06b81c78 -r 392843c37e47 rt/net/sourceforge/jnlp/tools/JarSigner.java --- a/rt/net/sourceforge/jnlp/tools/JarSigner.java Thu Jan 20 11:11:20 2011 -0500 +++ b/rt/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 14:35:18 2011 +0000 @@ -142,11 +142,13 @@ public class JarSigner implements CertVe private ArrayList unverifiedJars = null; /** the certificates used for jar verification */ - private ArrayList certs = null; + private HashMap certs = new HashMap(); /** details of this signing */ private ArrayList details = new ArrayList(); + private int totalSignableEntries = 0; + /* (non-Javadoc) * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher() */ @@ -195,18 +197,41 @@ public class JarSigner implements CertVe * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts() */ public ArrayList getCerts() { - return certs; + return new ArrayList(certs.keySet()); } + /** + * Returns whether or not all entries have a common signer. + * + * It is possible to create jars where only some entries are signed. In + * such cases, we should not prompt the user to accept anything, as the whole + * application must be treated as unsigned. This method should be called by a + * caller before it is about to ask the user to accept a cert and determine + * whether the application is trusted or not. + * + * @return Whether or not all entries have a common signer + */ + public boolean isFullySignedByASingleCert() { + + for (CertPath cPath : certs.keySet()) { + // If this cert has signed everything, return true + if (certs.get(cPath) == totalSignableEntries) + return true; + } + + // No cert found that signed all entries. Return false. + return false; + } + public void verifyJars(List jars, ResourceTracker tracker) throws Exception { - certs = new ArrayList(); + verifiedJars = new ArrayList(); + unverifiedJars = new ArrayList(); + for (int i = 0; i < jars.size(); i++) { JARDesc jar = (JARDesc) jars.get(i); - verifiedJars = new ArrayList(); - unverifiedJars = new ArrayList(); try { @@ -235,6 +260,22 @@ public class JarSigner implements CertVe throw e; } } + + //we really only want the first certPath + for (CertPath cPath : certs.keySet()) { + + if (certs.get(cPath) != totalSignableEntries) + continue; + else + certPath = cPath; + + // check if the certs added above are in the trusted path + checkTrustedCerts(); + + if (alreadyTrustPublisher || rootInCacerts) + break; + } + } public verifyResult verifyJar(String jarName) throws Exception { @@ -242,10 +283,6 @@ public class JarSigner implements CertVe boolean hasUnsignedEntry = false; JarFile jarFile = null; - // certs could be uninitialized if one calls this method directly - if (certs == null) - certs = new ArrayList(); - try { jarFile = new JarFile(jarName, true); Vector entriesVec = new Vector(); @@ -283,21 +320,23 @@ public class JarSigner implements CertVe CodeSigner[] signers = je.getCodeSigners(); boolean isSigned = (signers != null); anySigned |= isSigned; - hasUnsignedEntry |= !je.isDirectory() && !isSigned - && !signatureRelated(name); + + boolean shouldHaveSignature = !je.isDirectory() + && !signatureRelated(name); + + hasUnsignedEntry |= shouldHaveSignature && !isSigned; + + if (shouldHaveSignature) + totalSignableEntries++; + if (isSigned) { - // TODO: Perhaps we should check here that - // signers.length is only of size 1, and throw an - // exception if it's not? for (int i = 0; i < signers.length; i++) { CertPath certPath = signers[i].getSignerCertPath(); - if (!certs.contains(certPath)) - certs.add(certPath); - - //we really only want the first certPath - if (!certPath.equals(this.certPath)){ - this.certPath = certPath; - } + + if (!certs.containsKey(certPath)) + certs.put(certPath, 1); + else + certs.put(certPath, certs.get(certPath) + 1); Certificate cert = signers[i].getSignerCertPath() .getCertificates().get(0); @@ -317,7 +356,12 @@ public class JarSigner implements CertVe } } } //while e has more elements - } //if man not null + } else { //if man not null + + // Else increment totalEntries by 1 so that unsigned jars with + // no manifests can't sneak in + totalSignableEntries++; + } //Alert the user if any of the following are true. if (!anySigned) { @@ -357,9 +401,6 @@ public class JarSigner implements CertVe jarFile.close(); } } - - // check if the certs added above are in the trusted path - checkTrustedCerts(); //anySigned does not guarantee that all files were signed. return (anySigned && !(hasUnsignedEntry || hasExpiredCert From ahughes at redhat.com Tue Feb 1 06:43:15 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 14:43:15 +0000 Subject: Reviewer needed - two new regression tests for checking PNG reader behaviour In-Reply-To: <4D46F62D.4060203@redhat.com> References: <4D46E767.1030006@redhat.com> <20110131173215.GD18251@rivendell.middle-earth.co.uk> <4D46F62D.4060203@redhat.com> Message-ID: <20110201144315.GE17735@rivendell.middle-earth.co.uk> On 18:49 Mon 31 Jan , Pavel Tisnovsky wrote: > Dr Andrew John Hughes wrote: > > On 17:46 Mon 31 Jan , Pavel Tisnovsky wrote: > > > > Looks good. Do you plan to post these for inclusion in OpenJDK7? > > Hi Andrew, > > I'll try of course, but I'm not sure if Willem van Schaik's permission > to use his PNG images will be appropriate for OpenJDK licence policy :-) > > Pavel Oh yeah, good point, probably not appropriate for the 'give me all your rights' brigade ;-) IcedTea inclusion is fine. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From dlila at redhat.com Tue Feb 1 07:25:54 2011 From: dlila at redhat.com (Denis Lila) Date: Tue, 1 Feb 2011 10:25:54 -0500 (EST) Subject: CubicCurve2D backports - review In-Reply-To: <4D480D9A.4010207@redhat.com> Message-ID: <1972811023.648205.1296573954202.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi Pavel. > I just have one question - is there any regression test for checking > old and new way for calculating quad curves? Yes, there are. I pushed 3 regression tests, one for each bug, with this changeset: ----- Original Message ----- > Hi Denis, > > looks ok for me. > > > I mean tests mainly for these issues: > S4493128: CubicCurve2D intersects method fails > S4724552: CubicCurve2D.contains(Rectangle2D) returns true when only > partially contained. > S4645692: solveCubic does not return all solutions. > > > Cheers, > Pavel > > Denis Lila wrote: > > Hi. > > > > I'd like to backport the three attached patches. > > > > > > hg diff: > > > > diff -r cd6310f10fab ChangeLog > > --- a/ChangeLog Sun Jan 30 00:45:18 2011 +0000 > > +++ b/ChangeLog Mon Jan 31 13:28:19 2011 -0500 > > @@ -1,3 +1,11 @@ > > +2011-01-31 Denis Lila > > + > > + * NEWS: Update with the 3 backports > > + * Makefile.am (ICEDTEA_PATCHES): Add the patches > > + * patches/openjdk/4493128-CubicCurve2D.patch: New file. > > + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: Likewise. > > + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. > > + > > 2011-01-29 Andrew John Hughes > > > > * patches/gcc-suffix.patch, > > diff -r cd6310f10fab Makefile.am > > --- a/Makefile.am Sun Jan 30 00:45:18 2011 +0000 > > +++ b/Makefile.am Mon Jan 31 13:28:19 2011 -0500 > > @@ -275,7 +275,10 @@ > > patches/jtreg-international-fonts-styles.patch \ > > patches/openjdk/6736649-text_bearings.patch \ > > patches/openjdk/6797139-jbutton_truncation.patch \ > > - patches/openjdk/6883341-text_bearing_exception.patch > > + patches/openjdk/6883341-text_bearing_exception.patch \ > > + patches/openjdk/4724552-CubicCurve2D.patch \ > > + patches/openjdk/4493128-CubicCurve2D.patch \ > > + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch > > > > if !WITH_ALT_HSBUILD > > ICEDTEA_PATCHES += \ > > diff -r cd6310f10fab NEWS > > --- a/NEWS Sun Jan 30 00:45:18 2011 +0000 > > +++ b/NEWS Mon Jan 31 13:28:19 2011 -0500 > > @@ -403,6 +403,9 @@ > > - S6736649: > > test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java > > fails on Linux > > - S6797139: JButton title is truncating for some strings > > irrespective of preferred size. > > - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw > > exceptions when running Java2D demo by clicking Paint ta > > + - S4493128: CubicCurve2D intersects method fails > > + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when > > only partially contained. > > + - S4645692: solveCubic does not return all solutions. > > * Bug fixes > > - RH647157, RH582455: Update fontconfig files for rhel 6 > > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have > > wrong colors > > > > ...(and here should be the diff of the patches, but those are > > attached). > > > > Thank you, > > Denis. > > From dlila at redhat.com Tue Feb 1 07:29:42 2011 From: dlila at redhat.com (Denis Lila) Date: Tue, 1 Feb 2011 10:29:42 -0500 (EST) Subject: CubicCurve2D backports - review In-Reply-To: <1972811023.648205.1296573954202.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <214332941.648339.1296574182008.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > Yes, there are. I pushed 3 regression tests, one for each bug, with > this changeset: I'm sorry, I accidentally sent this incomplete email because of a shortcut mishap. But yes, the regression tests are here: http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4cf20706dbfa I didn't include them in the backport because it would have made things a bit more painful, they didn't seem very important, and I'm trying to backport all of the changesets to openjdk6, so we'll get them with the next release of that. Thank you, Denis. ----- Original Message ----- > Hi Pavel. > > > I just have one question - is there any regression test for checking > > old and new way for calculating quad curves? > > > ----- Original Message ----- > > Hi Denis, > > > > looks ok for me. > > > > > > > I mean tests mainly for these issues: > > S4493128: CubicCurve2D intersects method fails > > S4724552: CubicCurve2D.contains(Rectangle2D) returns true when only > > partially contained. > > S4645692: solveCubic does not return all solutions. > > > > > > Cheers, > > Pavel > > > > Denis Lila wrote: > > > Hi. > > > > > > I'd like to backport the three attached patches. > > > > > > > > > hg diff: > > > > > > diff -r cd6310f10fab ChangeLog > > > --- a/ChangeLog Sun Jan 30 00:45:18 2011 +0000 > > > +++ b/ChangeLog Mon Jan 31 13:28:19 2011 -0500 > > > @@ -1,3 +1,11 @@ > > > +2011-01-31 Denis Lila > > > + > > > + * NEWS: Update with the 3 backports > > > + * Makefile.am (ICEDTEA_PATCHES): Add the patches > > > + * patches/openjdk/4493128-CubicCurve2D.patch: New file. > > > + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: > > > Likewise. > > > + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. > > > + > > > 2011-01-29 Andrew John Hughes > > > > > > * patches/gcc-suffix.patch, > > > diff -r cd6310f10fab Makefile.am > > > --- a/Makefile.am Sun Jan 30 00:45:18 2011 +0000 > > > +++ b/Makefile.am Mon Jan 31 13:28:19 2011 -0500 > > > @@ -275,7 +275,10 @@ > > > patches/jtreg-international-fonts-styles.patch \ > > > patches/openjdk/6736649-text_bearings.patch \ > > > patches/openjdk/6797139-jbutton_truncation.patch \ > > > - patches/openjdk/6883341-text_bearing_exception.patch > > > + patches/openjdk/6883341-text_bearing_exception.patch \ > > > + patches/openjdk/4724552-CubicCurve2D.patch \ > > > + patches/openjdk/4493128-CubicCurve2D.patch \ > > > + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch > > > > > > if !WITH_ALT_HSBUILD > > > ICEDTEA_PATCHES += \ > > > diff -r cd6310f10fab NEWS > > > --- a/NEWS Sun Jan 30 00:45:18 2011 +0000 > > > +++ b/NEWS Mon Jan 31 13:28:19 2011 -0500 > > > @@ -403,6 +403,9 @@ > > > - S6736649: > > > test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java > > > fails on Linux > > > - S6797139: JButton title is truncating for some strings > > > irrespective of preferred size. > > > - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw > > > exceptions when running Java2D demo by clicking Paint ta > > > + - S4493128: CubicCurve2D intersects method fails > > > + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when > > > only partially contained. > > > + - S4645692: solveCubic does not return all solutions. > > > * Bug fixes > > > - RH647157, RH582455: Update fontconfig files for rhel 6 > > > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have > > > wrong colors > > > > > > ...(and here should be the diff of the patches, but those are > > > attached). > > > > > > Thank you, > > > Denis. > > > From ahughes at redhat.com Tue Feb 1 07:30:36 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 15:30:36 +0000 Subject: CubicCurve2D backports - review In-Reply-To: <2067109601.606552.1296516752508.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <667167320.606502.1296516446494.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <2067109601.606552.1296516752508.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110201153035.GF17735@rivendell.middle-earth.co.uk> On 18:32 Mon 31 Jan , Denis Lila wrote: > Hi. > > I'd like to backport the three attached patches. > > > hg diff: > > diff -r cd6310f10fab ChangeLog > --- a/ChangeLog Sun Jan 30 00:45:18 2011 +0000 > +++ b/ChangeLog Mon Jan 31 13:28:19 2011 -0500 > @@ -1,3 +1,11 @@ > +2011-01-31 Denis Lila > + > + * NEWS: Update with the 3 backports > + * Makefile.am (ICEDTEA_PATCHES): Add the patches > + * patches/openjdk/4493128-CubicCurve2D.patch: New file. > + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: Likewise. > + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. > + > 2011-01-29 Andrew John Hughes > > * patches/gcc-suffix.patch, > diff -r cd6310f10fab Makefile.am > --- a/Makefile.am Sun Jan 30 00:45:18 2011 +0000 > +++ b/Makefile.am Mon Jan 31 13:28:19 2011 -0500 > @@ -275,7 +275,10 @@ > patches/jtreg-international-fonts-styles.patch \ > patches/openjdk/6736649-text_bearings.patch \ > patches/openjdk/6797139-jbutton_truncation.patch \ > - patches/openjdk/6883341-text_bearing_exception.patch > + patches/openjdk/6883341-text_bearing_exception.patch \ > + patches/openjdk/4724552-CubicCurve2D.patch \ > + patches/openjdk/4493128-CubicCurve2D.patch \ > + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r cd6310f10fab NEWS > --- a/NEWS Sun Jan 30 00:45:18 2011 +0000 > +++ b/NEWS Mon Jan 31 13:28:19 2011 -0500 > @@ -403,6 +403,9 @@ > - S6736649: test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java fails on Linux > - S6797139: JButton title is truncating for some strings irrespective of preferred size. > - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw exceptions when running Java2D demo by clicking Paint ta > + - S4493128: CubicCurve2D intersects method fails > + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when only partially contained. > + - S4645692: solveCubic does not return all solutions. > * Bug fixes > - RH647157, RH582455: Update fontconfig files for rhel 6 > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > > ...(and here should be the diff of the patches, but those are attached). > Would be easier to just attach the result of hg diff which would include the patches :-) Approved. > Thank you, > Denis. > --- openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java.old 2011-01-31 12:38:24.340733697 -0500 > +++ openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-01-31 12:54:27.462601773 -0500 > @@ -1387,203 +1387,13 @@ > return false; > } > > - // Trivially accept if either endpoint is inside the rectangle > - // (not on its border since it may end there and not go inside) > - // Record where they lie with respect to the rectangle. > - // -1 => left, 0 => inside, 1 => right > - double x1 = getX1(); > - double y1 = getY1(); > - int x1tag = getTag(x1, x, x+w); > - int y1tag = getTag(y1, y, y+h); > - if (x1tag == INSIDE && y1tag == INSIDE) { > - return true; > - } > - double x2 = getX2(); > - double y2 = getY2(); > - int x2tag = getTag(x2, x, x+w); > - int y2tag = getTag(y2, y, y+h); > - if (x2tag == INSIDE && y2tag == INSIDE) { > - return true; > - } > - > - double ctrlx1 = getCtrlX1(); > - double ctrly1 = getCtrlY1(); > - double ctrlx2 = getCtrlX2(); > - double ctrly2 = getCtrlY2(); > - int ctrlx1tag = getTag(ctrlx1, x, x+w); > - int ctrly1tag = getTag(ctrly1, y, y+h); > - int ctrlx2tag = getTag(ctrlx2, x, x+w); > - int ctrly2tag = getTag(ctrly2, y, y+h); > - > - // Trivially reject if all points are entirely to one side of > - // the rectangle. > - if (x1tag < INSIDE && x2tag < INSIDE && > - ctrlx1tag < INSIDE && ctrlx2tag < INSIDE) > - { > - return false; // All points left > - } > - if (y1tag < INSIDE && y2tag < INSIDE && > - ctrly1tag < INSIDE && ctrly2tag < INSIDE) > - { > - return false; // All points above > - } > - if (x1tag > INSIDE && x2tag > INSIDE && > - ctrlx1tag > INSIDE && ctrlx2tag > INSIDE) > - { > - return false; // All points right > - } > - if (y1tag > INSIDE && y2tag > INSIDE && > - ctrly1tag > INSIDE && ctrly2tag > INSIDE) > - { > - return false; // All points below > - } > - > - // Test for endpoints on the edge where either the segment > - // or the curve is headed "inwards" from them > - // Note: These tests are a superset of the fast endpoint tests > - // above and thus repeat those tests, but take more time > - // and cover more cases > - if (inwards(x1tag, x2tag, ctrlx1tag) && > - inwards(y1tag, y2tag, ctrly1tag)) > - { > - // First endpoint on border with either edge moving inside > - return true; > - } > - if (inwards(x2tag, x1tag, ctrlx2tag) && > - inwards(y2tag, y1tag, ctrly2tag)) > - { > - // Second endpoint on border with either edge moving inside > - return true; > - } > - > - // Trivially accept if endpoints span directly across the rectangle > - boolean xoverlap = (x1tag * x2tag <= 0); > - boolean yoverlap = (y1tag * y2tag <= 0); > - if (x1tag == INSIDE && x2tag == INSIDE && yoverlap) { > - return true; > - } > - if (y1tag == INSIDE && y2tag == INSIDE && xoverlap) { > - return true; > - } > - > - // We now know that both endpoints are outside the rectangle > - // but the 4 points are not all on one side of the rectangle. > - // Therefore the curve cannot be contained inside the rectangle, > - // but the rectangle might be contained inside the curve, or > - // the curve might intersect the boundary of the rectangle. > - > - double[] eqn = new double[4]; > - double[] res = new double[4]; > - if (!yoverlap) { > - // Both y coordinates for the closing segment are above or > - // below the rectangle which means that we can only intersect > - // if the curve crosses the top (or bottom) of the rectangle > - // in more than one place and if those crossing locations > - // span the horizontal range of the rectangle. > - fillEqn(eqn, (y1tag < INSIDE ? y : y+h), y1, ctrly1, ctrly2, y2); > - int num = solveCubic(eqn, res); > - num = evalCubic(res, num, true, true, null, > - x1, ctrlx1, ctrlx2, x2); > - // odd counts imply the crossing was out of [0,1] bounds > - // otherwise there is no way for that part of the curve to > - // "return" to meet its endpoint > - return (num == 2 && > - getTag(res[0], x, x+w) * getTag(res[1], x, x+w) <= 0); > - } > - > - // Y ranges overlap. Now we examine the X ranges > - if (!xoverlap) { > - // Both x coordinates for the closing segment are left of > - // or right of the rectangle which means that we can only > - // intersect if the curve crosses the left (or right) edge > - // of the rectangle in more than one place and if those > - // crossing locations span the vertical range of the rectangle. > - fillEqn(eqn, (x1tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); > - int num = solveCubic(eqn, res); > - num = evalCubic(res, num, true, true, null, > - y1, ctrly1, ctrly2, y2); > - // odd counts imply the crossing was out of [0,1] bounds > - // otherwise there is no way for that part of the curve to > - // "return" to meet its endpoint > - return (num == 2 && > - getTag(res[0], y, y+h) * getTag(res[1], y, y+h) <= 0); > - } > - > - // The X and Y ranges of the endpoints overlap the X and Y > - // ranges of the rectangle, now find out how the endpoint > - // line segment intersects the Y range of the rectangle > - double dx = x2 - x1; > - double dy = y2 - y1; > - double k = y2 * x1 - x2 * y1; > - int c1tag, c2tag; > - if (y1tag == INSIDE) { > - c1tag = x1tag; > - } else { > - c1tag = getTag((k + dx * (y1tag < INSIDE ? y : y+h)) / dy, x, x+w); > - } > - if (y2tag == INSIDE) { > - c2tag = x2tag; > - } else { > - c2tag = getTag((k + dx * (y2tag < INSIDE ? y : y+h)) / dy, x, x+w); > - } > - // If the part of the line segment that intersects the Y range > - // of the rectangle crosses it horizontally - trivially accept > - if (c1tag * c2tag <= 0) { > - return true; > - } > - > - // Now we know that both the X and Y ranges intersect and that > - // the endpoint line segment does not directly cross the rectangle. > - // > - // We can almost treat this case like one of the cases above > - // where both endpoints are to one side, except that we may > - // get one or three intersections of the curve with the vertical > - // side of the rectangle. This is because the endpoint segment > - // accounts for the other intersection in an even pairing. Thus, > - // with the endpoint crossing we end up with 2 or 4 total crossings. > - // > - // (Remember there is overlap in both the X and Y ranges which > - // means that the segment itself must cross at least one vertical > - // edge of the rectangle - in particular, the "near vertical side" > - // - leaving an odd number of intersections for the curve.) > - // > - // Now we calculate the y tags of all the intersections on the > - // "near vertical side" of the rectangle. We will have one with > - // the endpoint segment, and one or three with the curve. If > - // any pair of those vertical intersections overlap the Y range > - // of the rectangle, we have an intersection. Otherwise, we don't. > - > - // c1tag = vertical intersection class of the endpoint segment > - // > - // Choose the y tag of the endpoint that was not on the same > - // side of the rectangle as the subsegment calculated above. > - // Note that we can "steal" the existing Y tag of that endpoint > - // since it will be provably the same as the vertical intersection. > - c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); > - > - // Now we have to calculate an array of solutions of the curve > - // with the "near vertical side" of the rectangle. Then we > - // need to sort the tags and do a pairwise range test to see > - // if either of the pairs of crossings spans the Y range of > - // the rectangle. > - // > - // Note that the c2tag can still tell us which vertical edge > - // to test against. > - fillEqn(eqn, (c2tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); > - int num = solveCubic(eqn, res); > - num = evalCubic(res, num, true, true, null, y1, ctrly1, ctrly2, y2); > - > - // Now put all of the tags into a bucket and sort them. There > - // is an intersection iff one of the pairs of tags "spans" the > - // Y range of the rectangle. > - int tags[] = new int[num+1]; > - for (int i = 0; i < num; i++) { > - tags[i] = getTag(res[i], y, y+h); > - } > - tags[num] = c1tag; > - Arrays.sort(tags); > - return ((num >= 1 && tags[0] * tags[1] <= 0) || > - (num >= 3 && tags[2] * tags[3] <= 0)); > + int numCrossings = rectCrossings(x, y, w, h); > + // the intended return value is > + // numCrossings != 0 || numCrossings == Curve.RECT_INTERSECTS > + // but if (numCrossings != 0) numCrossings == INTERSECTS won't matter > + // and if !(numCrossings != 0) then numCrossings == 0, so > + // numCrossings != RECT_INTERSECT > + return numCrossings != 0; > } > > /** > --- openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java.old 2011-01-31 12:54:27.462601773 -0500 > +++ openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-01-31 12:58:12.813545289 -0500 > @@ -31,6 +31,10 @@ > import java.io.Serializable; > import sun.awt.geom.Curve; > > +import static java.lang.Math.abs; > +import static java.lang.Math.max; > +import static java.lang.Math.ulp; > + > /** > * The CubicCurve2D class defines a cubic parametric curve > * segment in {@code (x,y)} coordinate space. > @@ -1083,95 +1087,286 @@ > * @since 1.3 > */ > public static int solveCubic(double eqn[], double res[]) { > - // From Numerical Recipes, 5.6, Quadratic and Cubic Equations > - double d = eqn[3]; > - if (d == 0.0) { > - // The cubic has degenerated to quadratic (or line or ...). > + // From Graphics Gems: > + // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c > + final double d = eqn[3]; > + if (d == 0) { > return QuadCurve2D.solveQuadratic(eqn, res); > } > - double a = eqn[2] / d; > - double b = eqn[1] / d; > - double c = eqn[0] / d; > - int roots = 0; > - double Q = (a * a - 3.0 * b) / 9.0; > - double R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0; > - double R2 = R * R; > - double Q3 = Q * Q * Q; > - a = a / 3.0; > - if (R2 < Q3) { > - double theta = Math.acos(R / Math.sqrt(Q3)); > - Q = -2.0 * Math.sqrt(Q); > + > + /* normal form: x^3 + Ax^2 + Bx + C = 0 */ > + final double A = eqn[2] / d; > + final double B = eqn[1] / d; > + final double C = eqn[0] / d; > + > + > + // substitute x = y - A/3 to eliminate quadratic term: > + // x^3 +Px + Q = 0 > + // > + // Since we actually need P/3 and Q/2 for all of the > + // calculations that follow, we will calculate > + // p = P/3 > + // q = Q/2 > + // instead and use those values for simplicity of the code. > + double sq_A = A * A; > + double p = 1.0/3 * (-1.0/3 * sq_A + B); > + double q = 1.0/2 * (2.0/27 * A * sq_A - 1.0/3 * A * B + C); > + > + /* use Cardano's formula */ > + > + double cb_p = p * p * p; > + double D = q * q + cb_p; > + > + final double sub = 1.0/3 * A; > + > + int num; > + if (D < 0) { /* Casus irreducibilis: three real solutions */ > + // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method > + double phi = 1.0/3 * Math.acos(-q / Math.sqrt(-cb_p)); > + double t = 2 * Math.sqrt(-p); > + > if (res == eqn) { > - // Copy the eqn so that we don't clobber it with the > - // roots. This is needed so that fixRoots can do its > - // work with the original equation. > - eqn = new double[4]; > - System.arraycopy(res, 0, eqn, 0, 4); > + eqn = Arrays.copyOf(eqn, 4); > } > - res[roots++] = Q * Math.cos(theta / 3.0) - a; > - res[roots++] = Q * Math.cos((theta + Math.PI * 2.0)/ 3.0) - a; > - res[roots++] = Q * Math.cos((theta - Math.PI * 2.0)/ 3.0) - a; > - fixRoots(res, eqn); > - } else { > - boolean neg = (R < 0.0); > - double S = Math.sqrt(R2 - Q3); > - if (neg) { > - R = -R; > + > + res[ 0 ] = ( t * Math.cos(phi)); > + res[ 1 ] = (-t * Math.cos(phi + Math.PI / 3)); > + res[ 2 ] = (-t * Math.cos(phi - Math.PI / 3)); > + num = 3; > + > + for (int i = 0; i < num; ++i) { > + res[ i ] -= sub; > } > - double A = Math.pow(R + S, 1.0 / 3.0); > - if (!neg) { > - A = -A; > + > + } else { > + // Please see the comment in fixRoots marked 'XXX' before changing > + // any of the code in this case. > + double sqrt_D = Math.sqrt(D); > + double u = Math.cbrt(sqrt_D - q); > + double v = - Math.cbrt(sqrt_D + q); > + double uv = u+v; > + > + num = 1; > + > + double err = 1200000000*ulp(abs(uv) + abs(sub)); > + if (iszero(D, err) || within(u, v, err)) { > + if (res == eqn) { > + eqn = Arrays.copyOf(eqn, 4); > + } > + res[1] = -(uv / 2) - sub; > + num = 2; > } > - double B = (A == 0.0) ? 0.0 : (Q / A); > - res[roots++] = (A + B) - a; > + // this must be done after the potential Arrays.copyOf > + res[ 0 ] = uv - sub; > } > - return roots; > + > + if (num > 1) { // num == 3 || num == 2 > + num = fixRoots(eqn, res, num); > + } > + if (num > 2 && (res[2] == res[1] || res[2] == res[0])) { > + num--; > + } > + if (num > 1 && res[1] == res[0]) { > + res[1] = res[--num]; // Copies res[2] to res[1] if needed > + } > + return num; > + } > + > + // preconditions: eqn != res && eqn[3] != 0 && num > 1 > + // This method tries to improve the accuracy of the roots of eqn (which > + // should be in res). It also might eliminate roots in res if it decideds > + // that they're not real roots. It will not check for roots that the > + // computation of res might have missed, so this method should only be > + // used when the roots in res have been computed using an algorithm > + // that never underestimates the number of roots (such as solveCubic above) > + private static int fixRoots(double[] eqn, double[] res, int num) { > + double[] intervals = {eqn[1], 2*eqn[2], 3*eqn[3]}; > + int critCount = QuadCurve2D.solveQuadratic(intervals, intervals); > + if (critCount == 2 && intervals[0] == intervals[1]) { > + critCount--; > + } > + if (critCount == 2 && intervals[0] > intervals[1]) { > + double tmp = intervals[0]; > + intervals[0] = intervals[1]; > + intervals[1] = tmp; > + } > + > + // below we use critCount to possibly filter out roots that shouldn't > + // have been computed. We require that eqn[3] != 0, so eqn is a proper > + // cubic, which means that its limits at -/+inf are -/+inf or +/-inf. > + // Therefore, if critCount==2, the curve is shaped like a sideways S, > + // and it could have 1-3 roots. If critCount==0 it is monotonic, and > + // if critCount==1 it is monotonic with a single point where it is > + // flat. In the last 2 cases there can only be 1 root. So in cases > + // where num > 1 but critCount < 2, we eliminate all roots in res > + // except one. > + > + if (num == 3) { > + double xe = getRootUpperBound(eqn); > + double x0 = -xe; > + > + Arrays.sort(res, 0, num); > + if (critCount == 2) { > + // this just tries to improve the accuracy of the computed > + // roots using Newton's method. > + res[0] = refineRootWithHint(eqn, x0, intervals[0], res[0]); > + res[1] = refineRootWithHint(eqn, intervals[0], intervals[1], res[1]); > + res[2] = refineRootWithHint(eqn, intervals[1], xe, res[2]); > + return 3; > + } else if (critCount == 1) { > + // we only need fx0 and fxe for the sign of the polynomial > + // at -inf and +inf respectively, so we don't need to do > + // fx0 = solveEqn(eqn, 3, x0); fxe = solveEqn(eqn, 3, xe) > + double fxe = eqn[3]; > + double fx0 = -fxe; > + > + double x1 = intervals[0]; > + double fx1 = solveEqn(eqn, 3, x1); > + > + // if critCount == 1 or critCount == 0, but num == 3 then > + // something has gone wrong. This branch and the one below > + // would ideally never execute, but if they do we can't know > + // which of the computed roots is closest to the real root; > + // therefore, we can't use refineRootWithHint. But even if > + // we did know, being here most likely means that the > + // curve is very flat close to two of the computed roots > + // (or maybe even all three). This might make Newton's method > + // fail altogether, which would be a pain to detect and fix. > + // This is why we use a very stable bisection method. > + if (oppositeSigns(fx0, fx1)) { > + res[0] = bisectRootWithHint(eqn, x0, x1, res[0]); > + } else if (oppositeSigns(fx1, fxe)) { > + res[0] = bisectRootWithHint(eqn, x1, xe, res[2]); > + } else /* fx1 must be 0 */ { > + res[0] = x1; > + } > + // return 1 > + } else if (critCount == 0) { > + res[0] = bisectRootWithHint(eqn, x0, xe, res[1]); > + // return 1 > + } > + } else if (num == 2 && critCount == 2) { > + // XXX: here we assume that res[0] has better accuracy than res[1]. > + // This is true because this method is only used from solveCubic > + // which puts in res[0] the root that it would compute anyway even > + // if num==1. If this method is ever used from any other method, or > + // if the solveCubic implementation changes, this assumption should > + // be reevaluated, and the choice of goodRoot might have to become > + // goodRoot = (abs(eqn'(res[0])) > abs(eqn'(res[1]))) ? res[0] : res[1] > + // where eqn' is the derivative of eqn. > + double goodRoot = res[0]; > + double badRoot = res[1]; > + double x1 = intervals[0]; > + double x2 = intervals[1]; > + // If a cubic curve really has 2 roots, one of those roots must be > + // at a critical point. That can't be goodRoot, so we compute x to > + // be the farthest critical point from goodRoot. If there are two > + // roots, x must be the second one, so we evaluate eqn at x, and if > + // it is zero (or close enough) we put x in res[1] (or badRoot, if > + // |solveEqn(eqn, 3, badRoot)| < |solveEqn(eqn, 3, x)| but this > + // shouldn't happen often). > + double x = abs(x1 - goodRoot) > abs(x2 - goodRoot) ? x1 : x2; > + double fx = solveEqn(eqn, 3, x); > + > + if (iszero(fx, 10000000*ulp(x))) { > + double badRootVal = solveEqn(eqn, 3, badRoot); > + res[1] = abs(badRootVal) < abs(fx) ? badRoot : x; > + return 2; > + } > + } // else there can only be one root - goodRoot, and it is already in res[0] > + > + return 1; > } > > - /* > - * This pruning step is necessary since solveCubic uses the > - * cosine function to calculate the roots when there are 3 > - * of them. Since the cosine method can have an error of > - * +/- 1E-14 we need to make sure that we don't make any > - * bad decisions due to an error. > - * > - * If the root is not near one of the endpoints, then we will > - * only have a slight inaccuracy in calculating the x intercept > - * which will only cause a slightly wrong answer for some > - * points very close to the curve. While the results in that > - * case are not as accurate as they could be, they are not > - * disastrously inaccurate either. > - * > - * On the other hand, if the error happens near one end of > - * the curve, then our processing to reject values outside > - * of the t=[0,1] range will fail and the results of that > - * failure will be disastrous since for an entire horizontal > - * range of test points, we will either overcount or undercount > - * the crossings and get a wrong answer for all of them, even > - * when they are clearly and obviously inside or outside the > - * curve. > - * > - * To work around this problem, we try a couple of Newton-Raphson > - * iterations to see if the true root is closer to the endpoint > - * or further away. If it is further away, then we can stop > - * since we know we are on the right side of the endpoint. If > - * we change direction, then either we are now being dragged away > - * from the endpoint in which case the first condition will cause > - * us to stop, or we have passed the endpoint and are headed back. > - * In the second case, we simply evaluate the slope at the > - * endpoint itself and place ourselves on the appropriate side > - * of it or on it depending on that result. > - */ > - private static void fixRoots(double res[], double eqn[]) { > - final double EPSILON = 1E-5; > + // use newton's method. > + private static double refineRootWithHint(double[] eqn, double min, double max, double t) { > + if (!inInterval(t, min, max)) { > + return t; > + } > + double[] deriv = {eqn[1], 2*eqn[2], 3*eqn[3]}; > + double origt = t; > for (int i = 0; i < 3; i++) { > - double t = res[i]; > - if (Math.abs(t) < EPSILON) { > - res[i] = findZero(t, 0, eqn); > - } else if (Math.abs(t - 1) < EPSILON) { > - res[i] = findZero(t, 1, eqn); > + double slope = solveEqn(deriv, 2, t); > + double y = solveEqn(eqn, 3, t); > + double delta = - (y / slope); > + double newt = t + delta; > + > + if (slope == 0 || y == 0 || t == newt) { > + break; > } > + > + t = newt; > + } > + if (within(t, origt, 1000*ulp(origt)) && inInterval(t, min, max)) { > + return t; > } > + return origt; > + } > + > + private static double bisectRootWithHint(double[] eqn, double x0, double xe, double hint) { > + double delta1 = Math.min(abs(hint - x0) / 64, 0.0625); > + double delta2 = Math.min(abs(hint - xe) / 64, 0.0625); > + double x02 = hint - delta1; > + double xe2 = hint + delta2; > + double fx02 = solveEqn(eqn, 3, x02); > + double fxe2 = solveEqn(eqn, 3, xe2); > + while (oppositeSigns(fx02, fxe2)) { > + if (x02 >= xe2) { > + return x02; > + } > + x0 = x02; > + xe = xe2; > + delta1 /= 64; > + delta2 /= 64; > + x02 = hint - delta1; > + xe2 = hint + delta2; > + fx02 = solveEqn(eqn, 3, x02); > + fxe2 = solveEqn(eqn, 3, xe2); > + } > + if (fx02 == 0) { > + return x02; > + } > + if (fxe2 == 0) { > + return xe2; > + } > + > + return bisectRoot(eqn, x0, xe); > + } > + > + private static double bisectRoot(double[] eqn, double x0, double xe) { > + double fx0 = solveEqn(eqn, 3, x0); > + double m = x0 + (xe - x0) / 2; > + while (m != x0 && m != xe) { > + double fm = solveEqn(eqn, 3, m); > + if (fm == 0) { > + return m; > + } > + if (oppositeSigns(fx0, fm)) { > + xe = m; > + } else { > + fx0 = fm; > + x0 = m; > + } > + m = x0 + (xe-x0)/2; > + } > + return m; > + } > + > + private static boolean inInterval(double t, double min, double max) { > + return min <= t && t <= max; > + } > + > + private static boolean within(double x, double y, double err) { > + double d = y - x; > + return (d <= err && d >= -err); > + } > + > + private static boolean iszero(double x, double err) { > + return within(x, 0, err); > + } > + > + private static boolean oppositeSigns(double x1, double x2) { > + return (x1 < 0 && x2 > 0) || (x1 > 0 && x2 < 0); > } > > private static double solveEqn(double eqn[], int order, double t) { > @@ -1182,60 +1377,26 @@ > return v; > } > > - private static double findZero(double t, double target, double eqn[]) { > - double slopeqn[] = {eqn[1], 2*eqn[2], 3*eqn[3]}; > - double slope; > - double origdelta = 0; > - double origt = t; > - while (true) { > - slope = solveEqn(slopeqn, 2, t); > - if (slope == 0) { > - // At a local minima - must return > - return t; > - } > - double y = solveEqn(eqn, 3, t); > - if (y == 0) { > - // Found it! - return it > - return t; > - } > - // assert(slope != 0 && y != 0); > - double delta = - (y / slope); > - // assert(delta != 0); > - if (origdelta == 0) { > - origdelta = delta; > - } > - if (t < target) { > - if (delta < 0) return t; > - } else if (t > target) { > - if (delta > 0) return t; > - } else { /* t == target */ > - return (delta > 0 > - ? (target + java.lang.Double.MIN_VALUE) > - : (target - java.lang.Double.MIN_VALUE)); > - } > - double newt = t + delta; > - if (t == newt) { > - // The deltas are so small that we aren't moving... > - return t; > - } > - if (delta * origdelta < 0) { > - // We have reversed our path. > - int tag = (origt < t > - ? getTag(target, origt, t) > - : getTag(target, t, origt)); > - if (tag != INSIDE) { > - // Local minima found away from target - return the middle > - return (origt + t) / 2; > - } > - // Local minima somewhere near target - move to target > - // and let the slope determine the resulting t. > - t = target; > - } else { > - t = newt; > - } > - } > + /* > + * Computes M+1 where M is an upper bound for all the roots in of eqn. > + * See: http://en.wikipedia.org/wiki/Sturm%27s_theorem#Applications. > + * The above link doesn't contain a proof, but I [dlila] proved it myself > + * so the result is reliable. The proof isn't difficult, but it's a bit > + * long to include here. > + * Precondition: eqn must represent a cubic polynomial > + */ > + private static double getRootUpperBound(double[] eqn) { > + double d = eqn[3]; > + double a = eqn[2]; > + double b = eqn[1]; > + double c = eqn[0]; > + > + double M = 1 + max(max(abs(a), abs(b)), abs(c)) / abs(d); > + M += ulp(M) + 1; > + return M; > } > > + > /** > * {@inheritDoc} > * @since 1.2 > @@ -1273,110 +1434,6 @@ > return contains(p.getX(), p.getY()); > } > > - /* > - * Fill an array with the coefficients of the parametric equation > - * in t, ready for solving against val with solveCubic. > - * We currently have: > - *
> -     *   val = P(t) = C1(1-t)^3 + 3CP1 t(1-t)^2 + 3CP2 t^2(1-t) + C2 t^3
> -     *              = C1 - 3C1t + 3C1t^2 - C1t^3 +
> -     *                3CP1t - 6CP1t^2 + 3CP1t^3 +
> -     *                3CP2t^2 - 3CP2t^3 +
> -     *                C2t^3
> -     *            0 = (C1 - val) +
> -     *                (3CP1 - 3C1) t +
> -     *                (3C1 - 6CP1 + 3CP2) t^2 +
> -     *                (C2 - 3CP2 + 3CP1 - C1) t^3
> -     *            0 = C + Bt + At^2 + Dt^3
> -     *     C = C1 - val
> -     *     B = 3*CP1 - 3*C1
> -     *     A = 3*CP2 - 6*CP1 + 3*C1
> -     *     D = C2 - 3*CP2 + 3*CP1 - C1
> -     * 
> - */ > - private static void fillEqn(double eqn[], double val, > - double c1, double cp1, double cp2, double c2) { > - eqn[0] = c1 - val; > - eqn[1] = (cp1 - c1) * 3.0; > - eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0; > - eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1; > - return; > - } > - > - /* > - * Evaluate the t values in the first num slots of the vals[] array > - * and place the evaluated values back into the same array. Only > - * evaluate t values that are within the range <0, 1>, including > - * the 0 and 1 ends of the range iff the include0 or include1 > - * booleans are true. If an "inflection" equation is handed in, > - * then any points which represent a point of inflection for that > - * cubic equation are also ignored. > - */ > - private static int evalCubic(double vals[], int num, > - boolean include0, > - boolean include1, > - double inflect[], > - double c1, double cp1, > - double cp2, double c2) { > - int j = 0; > - for (int i = 0; i < num; i++) { > - double t = vals[i]; > - if ((include0 ? t >= 0 : t > 0) && > - (include1 ? t <= 1 : t < 1) && > - (inflect == null || > - inflect[1] + (2*inflect[2] + 3*inflect[3]*t)*t != 0)) > - { > - double u = 1 - t; > - vals[j++] = c1*u*u*u + 3*cp1*t*u*u + 3*cp2*t*t*u + c2*t*t*t; > - } > - } > - return j; > - } > - > - private static final int BELOW = -2; > - private static final int LOWEDGE = -1; > - private static final int INSIDE = 0; > - private static final int HIGHEDGE = 1; > - private static final int ABOVE = 2; > - > - /* > - * Determine where coord lies with respect to the range from > - * low to high. It is assumed that low <= high. The return > - * value is one of the 5 values BELOW, LOWEDGE, INSIDE, HIGHEDGE, > - * or ABOVE. > - */ > - private static int getTag(double coord, double low, double high) { > - if (coord <= low) { > - return (coord < low ? BELOW : LOWEDGE); > - } > - if (coord >= high) { > - return (coord > high ? ABOVE : HIGHEDGE); > - } > - return INSIDE; > - } > - > - /* > - * Determine if the pttag represents a coordinate that is already > - * in its test range, or is on the border with either of the two > - * opttags representing another coordinate that is "towards the > - * inside" of that test range. In other words, are either of the > - * two "opt" points "drawing the pt inward"? > - */ > - private static boolean inwards(int pttag, int opt1tag, int opt2tag) { > - switch (pttag) { > - case BELOW: > - case ABOVE: > - default: > - return false; > - case LOWEDGE: > - return (opt1tag >= INSIDE || opt2tag >= INSIDE); > - case INSIDE: > - return true; > - case HIGHEDGE: > - return (opt1tag <= INSIDE || opt2tag <= INSIDE); > - } > - } > - > /** > * {@inheritDoc} > * @since 1.2 > --- openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java.old 2011-01-20 18:54:14.000000000 -0500 > +++ openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-01-31 12:38:24.340733697 -0500 > @@ -1602,20 +1602,32 @@ > if (w <= 0 || h <= 0) { > return false; > } > - // Assertion: Cubic curves closed by connecting their > - // endpoints form either one or two convex halves with > - // the closing line segment as an edge of both sides. > - if (!(contains(x, y) && > - contains(x + w, y) && > - contains(x + w, y + h) && > - contains(x, y + h))) { > - return false; > + > + int numCrossings = rectCrossings(x, y, w, h); > + return !(numCrossings == 0 || numCrossings == Curve.RECT_INTERSECTS); > + } > + > + private int rectCrossings(double x, double y, double w, double h) { > + int crossings = 0; > + if (!(getX1() == getX2() && getY1() == getY2())) { > + crossings = Curve.rectCrossingsForLine(crossings, > + x, y, > + x+w, y+h, > + getX1(), getY1(), > + getX2(), getY2()); > + if (crossings == Curve.RECT_INTERSECTS) { > + return crossings; > + } > } > - // Either the rectangle is entirely inside one of the convex > - // halves or it crosses from one to the other, in which case > - // it must intersect the closing line segment. > - Rectangle2D rect = new Rectangle2D.Double(x, y, w, h); > - return !rect.intersectsLine(getX1(), getY1(), getX2(), getY2()); > + // we call this with the curve's direction reversed, because we wanted > + // to call rectCrossingsForLine first, because it's cheaper. > + return Curve.rectCrossingsForCubic(crossings, > + x, y, > + x+w, y+h, > + getX2(), getY2(), > + getCtrlX2(), getCtrlY2(), > + getCtrlX1(), getCtrlY1(), > + getX1(), getY1(), 0); > } > > /** -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From ahughes at redhat.com Tue Feb 1 07:33:43 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 15:33:43 +0000 Subject: CubicCurve2D backports - review In-Reply-To: <214332941.648339.1296574182008.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <1972811023.648205.1296573954202.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <214332941.648339.1296574182008.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110201153343.GG17735@rivendell.middle-earth.co.uk> On 10:29 Tue 01 Feb , Denis Lila wrote: > > Yes, there are. I pushed 3 regression tests, one for each bug, with > > this changeset: > > I'm sorry, I accidentally sent this incomplete email because of a > shortcut mishap. > > But yes, the regression tests are here: > http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4cf20706dbfa > > I didn't include them in the backport because it would have made things > a bit more painful, they didn't seem very important, and I'm trying to > backport all of the changesets to openjdk6, so we'll get them with the > next release of that. > Please include a complete backport of 4645692 now. The tests are important. > Thank you, > Denis. > > ----- Original Message ----- > > Hi Pavel. > > > > > I just have one question - is there any regression test for checking > > > old and new way for calculating quad curves? > > > > > > > ----- Original Message ----- > > > Hi Denis, > > > > > > looks ok for me. > > > > > > > > > > > I mean tests mainly for these issues: > > > S4493128: CubicCurve2D intersects method fails > > > S4724552: CubicCurve2D.contains(Rectangle2D) returns true when only > > > partially contained. > > > S4645692: solveCubic does not return all solutions. > > > > > > > > > Cheers, > > > Pavel > > > > > > Denis Lila wrote: > > > > Hi. > > > > > > > > I'd like to backport the three attached patches. > > > > > > > > > > > > hg diff: > > > > > > > > diff -r cd6310f10fab ChangeLog > > > > --- a/ChangeLog Sun Jan 30 00:45:18 2011 +0000 > > > > +++ b/ChangeLog Mon Jan 31 13:28:19 2011 -0500 > > > > @@ -1,3 +1,11 @@ > > > > +2011-01-31 Denis Lila > > > > + > > > > + * NEWS: Update with the 3 backports > > > > + * Makefile.am (ICEDTEA_PATCHES): Add the patches > > > > + * patches/openjdk/4493128-CubicCurve2D.patch: New file. > > > > + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: > > > > Likewise. > > > > + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. > > > > + > > > > 2011-01-29 Andrew John Hughes > > > > > > > > * patches/gcc-suffix.patch, > > > > diff -r cd6310f10fab Makefile.am > > > > --- a/Makefile.am Sun Jan 30 00:45:18 2011 +0000 > > > > +++ b/Makefile.am Mon Jan 31 13:28:19 2011 -0500 > > > > @@ -275,7 +275,10 @@ > > > > patches/jtreg-international-fonts-styles.patch \ > > > > patches/openjdk/6736649-text_bearings.patch \ > > > > patches/openjdk/6797139-jbutton_truncation.patch \ > > > > - patches/openjdk/6883341-text_bearing_exception.patch > > > > + patches/openjdk/6883341-text_bearing_exception.patch \ > > > > + patches/openjdk/4724552-CubicCurve2D.patch \ > > > > + patches/openjdk/4493128-CubicCurve2D.patch \ > > > > + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch > > > > > > > > if !WITH_ALT_HSBUILD > > > > ICEDTEA_PATCHES += \ > > > > diff -r cd6310f10fab NEWS > > > > --- a/NEWS Sun Jan 30 00:45:18 2011 +0000 > > > > +++ b/NEWS Mon Jan 31 13:28:19 2011 -0500 > > > > @@ -403,6 +403,9 @@ > > > > - S6736649: > > > > test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java > > > > fails on Linux > > > > - S6797139: JButton title is truncating for some strings > > > > irrespective of preferred size. > > > > - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw > > > > exceptions when running Java2D demo by clicking Paint ta > > > > + - S4493128: CubicCurve2D intersects method fails > > > > + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when > > > > only partially contained. > > > > + - S4645692: solveCubic does not return all solutions. > > > > * Bug fixes > > > > - RH647157, RH582455: Update fontconfig files for rhel 6 > > > > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have > > > > wrong colors > > > > > > > > ...(and here should be the diff of the patches, but those are > > > > attached). > > > > > > > > Thank you, > > > > Denis. > > > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 07:58:55 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 15:58:55 +0000 Subject: [Bug 624] JVM crashes with Tomcat Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=624 boris at alum.mit.edu changed: What |Removed |Added ---------------------------------------------------------------------------- Version|6-1.7.5 |6-1.7.7 ------- Comment #2 from boris at alum.mit.edu 2011-02-01 15:58 ------- I upgraded to 1.7.7, the latest available from RedHat EL 5, and replicated that this bug still exists. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From dbhole at icedtea.classpath.org Tue Feb 1 08:00:53 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Tue, 01 Feb 2011 16:00:53 +0000 Subject: /hg/release/icedtea-web-1.0: RH672262, CVE-2011-0025: IcedTea ja... Message-ID: changeset 3bd328e4b515 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=3bd328e4b515 author: Deepak Bhole date: Tue Feb 01 10:53:44 2011 -0500 RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass Fixes JAR signature handling so that multiply/partially signed jars are correctly handled. diffstat: 7 files changed, 109 insertions(+), 40 deletions(-) ChangeLog | 30 ++++ NEWS | 1 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 2 netx/net/sourceforge/jnlp/security/CertVerifier.java | 3 netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 19 +- netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 4 netx/net/sourceforge/jnlp/tools/JarSigner.java | 90 +++++++++---- diffs (309 lines): diff -r e84432bca9a3 -r 3bd328e4b515 ChangeLog --- a/ChangeLog Fri Jan 28 15:51:03 2011 -0500 +++ b/ChangeLog Tue Feb 01 10:53:44 2011 -0500 @@ -1,3 +1,33 @@ 2011-01-28 Deepak Bhole + + RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Prompt user only if there is a single certificate + that signs all jars in the jnlp file, otherwise treat as unsigned. + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to + getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs + variable to certPath and change its type to CertPath. + (buildTree): Use new certPath variable. + (populateTable): Same. + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts + to getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs + variable to be a hashmap that stores certs and the number of entries they + have signed. + (totalSignableEntries): New variable to track how many signable entries + have been encountered. + (getCerts): Updated method to return certs from new hashmap. + (isFullySignedByASingleCert): New method. Returns if there is a single + cert that signs all the entries in the jars specified in the jnlp file. + (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so + that the data is not lost when the next jar is processed. After verifying + each jar, see if there is a single signer, and prompt the user if there is + such an untrusted signer. + (verifyJar): Increment totalSignableEntries for each signable entry + encountered and the count for each cert when it signs an entry. Move + checkTrustedCerts() out of the function into verifyJars(). + 2011-01-28 Deepak Bhole * Makefile.am diff -r e84432bca9a3 -r 3bd328e4b515 NEWS --- a/NEWS Fri Jan 28 15:51:03 2011 -0500 +++ b/NEWS Tue Feb 01 10:53:44 2011 -0500 @@ -14,6 +14,7 @@ New in release 1.0 (2011-XX-XX): * Security updates - RH645843, CVE-2010-3860: IcedTea System property information leak via public static - RH663680, CVE-2010-4351: IcedTea JNLP SecurityManager bypass + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * New Features - IcedTea-Web now uses a deployment.properties file to specify configuration - System-level as well as user-level deployment.properties files with locked configuration are supported diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Jan 28 15:51:03 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 @@ -430,7 +430,7 @@ public class JNLPClassLoader extends URL } //Case when at least one jar has some signing - if (js.anyJarsSigned()) { + if (js.anyJarsSigned() && js.isFullySignedByASingleCert()) { signing = true; if (!js.allJarsSigned() && diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/security/CertVerifier.java --- a/netx/net/sourceforge/jnlp/security/CertVerifier.java Fri Jan 28 15:51:03 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertVerifier.java Tue Feb 01 10:53:44 2011 -0500 @@ -76,7 +76,7 @@ public interface CertVerifier { * Return a valid certificate path to this certificate(s) being verified * @return The CertPath */ - public ArrayList getCerts(); + public CertPath getCertPath(); /** * Returns the application's publisher's certificate. @@ -89,4 +89,5 @@ public interface CertVerifier { * the event that the application is self signed. */ public abstract Certificate getRoot(); + } diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/security/CertsInfoPane.java --- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Fri Jan 28 15:51:03 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Tue Feb 01 10:53:44 2011 -0500 @@ -67,7 +67,7 @@ import net.sourceforge.jnlp.tools.*; */ public class CertsInfoPane extends SecurityDialogPanel { - private ArrayList certs; + private CertPath certPath; private JList list; protected JTree tree; private JTable table; @@ -87,12 +87,9 @@ public class CertsInfoPane extends Secur * Builds the JTree out of CertPaths. */ void buildTree() { - certs = parent.getJarSigner().getCerts(); - //for now, we're only going to display the first signer, even though - //jars can be signed by multiple people. - CertPath firstPath = certs.get(0); + certPath = parent.getJarSigner().getCertPath(); X509Certificate firstCert = - ((X509Certificate) firstPath.getCertificates().get(0)); + ((X509Certificate) certPath.getCertificates().get(0)); String subjectString = SecurityUtil.getCN(firstCert.getSubjectX500Principal().getName()); String issuerString = @@ -104,9 +101,9 @@ public class CertsInfoPane extends Secur //not self signed if (!firstCert.getSubjectDN().equals(firstCert.getIssuerDN()) - && (firstPath.getCertificates().size() > 1)) { + && (certPath.getCertificates().size() > 1)) { X509Certificate secondCert = - ((X509Certificate) firstPath.getCertificates().get(1)); + ((X509Certificate) certPath.getCertificates().get(1)); subjectString = SecurityUtil.getCN(secondCert.getSubjectX500Principal().getName()); issuerString = @@ -125,12 +122,12 @@ public class CertsInfoPane extends Secur * Fills in certsNames, certsData with data from the certificates. */ protected void populateTable() { - certNames = new String[certs.get(0).getCertificates().size()]; + certNames = new String[certPath.getCertificates().size()]; certsData = new ArrayList(); - for (int i = 0; i < certs.get(0).getCertificates().size(); i++) { + for (int i = 0; i < certPath.getCertificates().size(); i++) { - X509Certificate c = (X509Certificate) certs.get(0).getCertificates().get(i); + X509Certificate c = (X509Certificate) certPath.getCertificates().get(i); certsData.add(parseCert(c)); certNames[i] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Jan 28 15:51:03 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Tue Feb 01 10:53:44 2011 -0500 @@ -83,7 +83,7 @@ public class HttpsCertVerifier implement return isTrusted; } - public ArrayList getCerts() { + public CertPath getCertPath() { ArrayList list = new ArrayList(); for (int i = 0; i < chain.length; i++) @@ -99,7 +99,7 @@ public class HttpsCertVerifier implement // carry on } - return certPaths; + return certPaths.get(0); } public ArrayList getDetails() { diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/tools/JarSigner.java --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Fri Jan 28 15:51:03 2011 -0500 +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 @@ -138,10 +138,12 @@ public class JarSigner implements CertVe private ArrayList unverifiedJars = null; /** the certificates used for jar verification */ - private ArrayList certs = null; + private HashMap certs = new HashMap(); /** details of this signing */ private ArrayList details = new ArrayList(); + + private int totalSignableEntries = 0; /* (non-Javadoc) * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher() @@ -191,18 +193,41 @@ public class JarSigner implements CertVe * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts() */ public ArrayList getCerts() { - return certs; + return new ArrayList(certs.keySet()); + } + + /** + * Returns whether or not all entries have a common signer. + * + * It is possible to create jars where only some entries are signed. In + * such cases, we should not prompt the user to accept anything, as the whole + * application must be treated as unsigned. This method should be called by a + * caller before it is about to ask the user to accept a cert and determine + * whether the application is trusted or not. + * + * @return Whether or not all entries have a common signer + */ + public boolean isFullySignedByASingleCert() { + + for (CertPath cPath : certs.keySet()) { + // If this cert has signed everything, return true + if (certs.get(cPath) == totalSignableEntries) + return true; + } + + // No cert found that signed all entries. Return false. + return false; } public void verifyJars(List jars, ResourceTracker tracker) throws Exception { - certs = new ArrayList(); + verifiedJars = new ArrayList(); + unverifiedJars = new ArrayList(); + for (int i = 0; i < jars.size(); i++) { JARDesc jar = jars.get(i); - verifiedJars = new ArrayList(); - unverifiedJars = new ArrayList(); try { @@ -231,16 +256,28 @@ public class JarSigner implements CertVe throw e; } } + + //we really only want the first certPath + for (CertPath cPath : certs.keySet()) { + + if (certs.get(cPath) != totalSignableEntries) + continue; + else + certPath = cPath; + + // check if the certs added above are in the trusted path + checkTrustedCerts(); + + if (alreadyTrustPublisher || rootInCacerts) + break; + } + } public verifyResult verifyJar(String jarName) throws Exception { boolean anySigned = false; boolean hasUnsignedEntry = false; JarFile jarFile = null; - - // certs could be uninitialized if one calls this method directly - if (certs == null) - certs = new ArrayList(); try { jarFile = new JarFile(jarName, true); @@ -280,21 +317,22 @@ public class JarSigner implements CertVe CodeSigner[] signers = je.getCodeSigners(); boolean isSigned = (signers != null); anySigned |= isSigned; - hasUnsignedEntry |= !je.isDirectory() && !isSigned - && !signatureRelated(name); + + boolean shouldHaveSignature = !je.isDirectory() + && !signatureRelated(name); + + hasUnsignedEntry |= shouldHaveSignature && !isSigned; + + if (shouldHaveSignature) + totalSignableEntries++; + if (isSigned) { - // TODO: Perhaps we should check here that - // signers.length is only of size 1, and throw an - // exception if it's not? for (int i = 0; i < signers.length; i++) { CertPath certPath = signers[i].getSignerCertPath(); - if (!certs.contains(certPath)) - certs.add(certPath); - - //we really only want the first certPath - if (!certPath.equals(this.certPath)) { - this.certPath = certPath; - } + if (!certs.containsKey(certPath)) + certs.put(certPath, 1); + else + certs.put(certPath, certs.get(certPath) + 1); Certificate cert = signers[i].getSignerCertPath() .getCertificates().get(0); @@ -314,7 +352,12 @@ public class JarSigner implements CertVe } } } //while e has more elements - } //if man not null + } else { //if man not null + + // Else increment totalEntries by 1 so that unsigned jars with + // no manifests can't sneak in + totalSignableEntries++; + } //Alert the user if any of the following are true. if (!anySigned) { @@ -354,9 +397,6 @@ public class JarSigner implements CertVe jarFile.close(); } } - - // check if the certs added above are in the trusted path - checkTrustedCerts(); //anySigned does not guarantee that all files were signed. return (anySigned && !(hasUnsignedEntry || hasExpiredCert From dbhole at icedtea.classpath.org Tue Feb 1 08:02:10 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Tue, 01 Feb 2011 16:02:10 +0000 Subject: /hg/icedtea-web: RH672262, CVE-2011-0025: IcedTea jarfile signat... Message-ID: changeset 97f40ebebbdf in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=97f40ebebbdf author: Deepak Bhole date: Tue Feb 01 10:53:44 2011 -0500 RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass Fixes JAR signature handling so that multiply/partially signed jars are correctly handled. diffstat: 7 files changed, 109 insertions(+), 40 deletions(-) ChangeLog | 30 ++++ NEWS | 1 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 2 netx/net/sourceforge/jnlp/security/CertVerifier.java | 3 netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 19 +- netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 4 netx/net/sourceforge/jnlp/tools/JarSigner.java | 90 +++++++++---- diffs (309 lines): diff -r 43c8a57314af -r 97f40ebebbdf ChangeLog --- a/ChangeLog Fri Jan 28 11:41:23 2011 -0500 +++ b/ChangeLog Tue Feb 01 10:53:44 2011 -0500 @@ -1,3 +1,33 @@ 2011-01-28 Omair Majid + + RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Prompt user only if there is a single certificate + that signs all jars in the jnlp file, otherwise treat as unsigned. + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to + getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs + variable to certPath and change its type to CertPath. + (buildTree): Use new certPath variable. + (populateTable): Same. + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts + to getCertPath and make it return a CertPath. + * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs + variable to be a hashmap that stores certs and the number of entries they + have signed. + (totalSignableEntries): New variable to track how many signable entries + have been encountered. + (getCerts): Updated method to return certs from new hashmap. + (isFullySignedByASingleCert): New method. Returns if there is a single + cert that signs all the entries in the jars specified in the jnlp file. + (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so + that the data is not lost when the next jar is processed. After verifying + each jar, see if there is a single signer, and prompt the user if there is + such an untrusted signer. + (verifyJar): Increment totalSignableEntries for each signable entry + encountered and the count for each cert when it signs an entry. Move + checkTrustedCerts() out of the function into verifyJars(). + 2011-01-28 Omair Majid * Makefile.am: Move ICEDTEA_REV, ICEDTEA_PKG to acinclude.m4. Use diff -r 43c8a57314af -r 97f40ebebbdf NEWS --- a/NEWS Fri Jan 28 11:41:23 2011 -0500 +++ b/NEWS Tue Feb 01 10:53:44 2011 -0500 @@ -17,6 +17,7 @@ New in release 1.0 (2010-XX-XX): * Initial release of IcedTea-Web * Security updates - RH645843, CVE-2010-3860: IcedTea System property information leak via public static + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass * Plugin - PR542: Plugin fails with NPE on http://www.openprocessing.org/visuals/iframe.php?visualID=2615 - PR552: Support for FreeBSD's pthread implementation diff -r 43c8a57314af -r 97f40ebebbdf netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Jan 28 11:41:23 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 @@ -430,7 +430,7 @@ public class JNLPClassLoader extends URL } //Case when at least one jar has some signing - if (js.anyJarsSigned()) { + if (js.anyJarsSigned() && js.isFullySignedByASingleCert()) { signing = true; if (!js.allJarsSigned() && diff -r 43c8a57314af -r 97f40ebebbdf netx/net/sourceforge/jnlp/security/CertVerifier.java --- a/netx/net/sourceforge/jnlp/security/CertVerifier.java Fri Jan 28 11:41:23 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertVerifier.java Tue Feb 01 10:53:44 2011 -0500 @@ -76,7 +76,7 @@ public interface CertVerifier { * Return a valid certificate path to this certificate(s) being verified * @return The CertPath */ - public ArrayList getCerts(); + public CertPath getCertPath(); /** * Returns the application's publisher's certificate. @@ -89,4 +89,5 @@ public interface CertVerifier { * the event that the application is self signed. */ public abstract Certificate getRoot(); + } diff -r 43c8a57314af -r 97f40ebebbdf netx/net/sourceforge/jnlp/security/CertsInfoPane.java --- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Fri Jan 28 11:41:23 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Tue Feb 01 10:53:44 2011 -0500 @@ -64,7 +64,7 @@ import javax.swing.tree.TreeSelectionMod */ public class CertsInfoPane extends SecurityDialogPanel { - private ArrayList certs; + private CertPath certPath; private JList list; protected JTree tree; private JTable table; @@ -84,12 +84,9 @@ public class CertsInfoPane extends Secur * Builds the JTree out of CertPaths. */ void buildTree() { - certs = parent.getJarSigner().getCerts(); - //for now, we're only going to display the first signer, even though - //jars can be signed by multiple people. - CertPath firstPath = certs.get(0); + certPath = parent.getJarSigner().getCertPath(); X509Certificate firstCert = - ((X509Certificate) firstPath.getCertificates().get(0)); + ((X509Certificate) certPath.getCertificates().get(0)); String subjectString = SecurityUtil.getCN(firstCert.getSubjectX500Principal().getName()); String issuerString = @@ -101,9 +98,9 @@ public class CertsInfoPane extends Secur //not self signed if (!firstCert.getSubjectDN().equals(firstCert.getIssuerDN()) - && (firstPath.getCertificates().size() > 1)) { + && (certPath.getCertificates().size() > 1)) { X509Certificate secondCert = - ((X509Certificate) firstPath.getCertificates().get(1)); + ((X509Certificate) certPath.getCertificates().get(1)); subjectString = SecurityUtil.getCN(secondCert.getSubjectX500Principal().getName()); issuerString = @@ -122,12 +119,12 @@ public class CertsInfoPane extends Secur * Fills in certsNames, certsData with data from the certificates. */ protected void populateTable() { - certNames = new String[certs.get(0).getCertificates().size()]; + certNames = new String[certPath.getCertificates().size()]; certsData = new ArrayList(); - for (int i = 0; i < certs.get(0).getCertificates().size(); i++) { + for (int i = 0; i < certPath.getCertificates().size(); i++) { - X509Certificate c = (X509Certificate) certs.get(0).getCertificates().get(i); + X509Certificate c = (X509Certificate) certPath.getCertificates().get(i); certsData.add(parseCert(c)); certNames[i] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; diff -r 43c8a57314af -r 97f40ebebbdf netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Jan 28 11:41:23 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Tue Feb 01 10:53:44 2011 -0500 @@ -83,7 +83,7 @@ public class HttpsCertVerifier implement return isTrusted; } - public ArrayList getCerts() { + public CertPath getCertPath() { ArrayList list = new ArrayList(); for (int i = 0; i < chain.length; i++) @@ -99,7 +99,7 @@ public class HttpsCertVerifier implement // carry on } - return certPaths; + return certPaths.get(0); } public ArrayList getDetails() { diff -r 43c8a57314af -r 97f40ebebbdf netx/net/sourceforge/jnlp/tools/JarSigner.java --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Fri Jan 28 11:41:23 2011 -0500 +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 @@ -96,10 +96,12 @@ public class JarSigner implements CertVe private ArrayList unverifiedJars = null; /** the certificates used for jar verification */ - private ArrayList certs = null; + private HashMap certs = new HashMap(); /** details of this signing */ private ArrayList details = new ArrayList(); + + private int totalSignableEntries = 0; /* (non-Javadoc) * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher() @@ -149,18 +151,41 @@ public class JarSigner implements CertVe * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts() */ public ArrayList getCerts() { - return certs; + return new ArrayList(certs.keySet()); + } + + /** + * Returns whether or not all entries have a common signer. + * + * It is possible to create jars where only some entries are signed. In + * such cases, we should not prompt the user to accept anything, as the whole + * application must be treated as unsigned. This method should be called by a + * caller before it is about to ask the user to accept a cert and determine + * whether the application is trusted or not. + * + * @return Whether or not all entries have a common signer + */ + public boolean isFullySignedByASingleCert() { + + for (CertPath cPath : certs.keySet()) { + // If this cert has signed everything, return true + if (certs.get(cPath) == totalSignableEntries) + return true; + } + + // No cert found that signed all entries. Return false. + return false; } public void verifyJars(List jars, ResourceTracker tracker) throws Exception { - certs = new ArrayList(); + verifiedJars = new ArrayList(); + unverifiedJars = new ArrayList(); + for (int i = 0; i < jars.size(); i++) { JARDesc jar = jars.get(i); - verifiedJars = new ArrayList(); - unverifiedJars = new ArrayList(); try { @@ -189,16 +214,28 @@ public class JarSigner implements CertVe throw e; } } + + //we really only want the first certPath + for (CertPath cPath : certs.keySet()) { + + if (certs.get(cPath) != totalSignableEntries) + continue; + else + certPath = cPath; + + // check if the certs added above are in the trusted path + checkTrustedCerts(); + + if (alreadyTrustPublisher || rootInCacerts) + break; + } + } public verifyResult verifyJar(String jarName) throws Exception { boolean anySigned = false; boolean hasUnsignedEntry = false; JarFile jarFile = null; - - // certs could be uninitialized if one calls this method directly - if (certs == null) - certs = new ArrayList(); try { jarFile = new JarFile(jarName, true); @@ -238,21 +275,22 @@ public class JarSigner implements CertVe CodeSigner[] signers = je.getCodeSigners(); boolean isSigned = (signers != null); anySigned |= isSigned; - hasUnsignedEntry |= !je.isDirectory() && !isSigned - && !signatureRelated(name); + + boolean shouldHaveSignature = !je.isDirectory() + && !signatureRelated(name); + + hasUnsignedEntry |= shouldHaveSignature && !isSigned; + + if (shouldHaveSignature) + totalSignableEntries++; + if (isSigned) { - // TODO: Perhaps we should check here that - // signers.length is only of size 1, and throw an - // exception if it's not? for (int i = 0; i < signers.length; i++) { CertPath certPath = signers[i].getSignerCertPath(); - if (!certs.contains(certPath)) - certs.add(certPath); - - //we really only want the first certPath - if (!certPath.equals(this.certPath)) { - this.certPath = certPath; - } + if (!certs.containsKey(certPath)) + certs.put(certPath, 1); + else + certs.put(certPath, certs.get(certPath) + 1); Certificate cert = signers[i].getSignerCertPath() .getCertificates().get(0); @@ -272,7 +310,12 @@ public class JarSigner implements CertVe } } } //while e has more elements - } //if man not null + } else { //if man not null + + // Else increment totalEntries by 1 so that unsigned jars with + // no manifests can't sneak in + totalSignableEntries++; + } //Alert the user if any of the following are true. if (!anySigned) { @@ -312,9 +355,6 @@ public class JarSigner implements CertVe jarFile.close(); } } - - // check if the certs added above are in the trusted path - checkTrustedCerts(); //anySigned does not guarantee that all files were signed. return (anySigned && !(hasUnsignedEntry || hasExpiredCert From dlila at redhat.com Tue Feb 1 08:40:02 2011 From: dlila at redhat.com (Denis Lila) Date: Tue, 1 Feb 2011 11:40:02 -0500 (EST) Subject: CubicCurve2D backports - review In-Reply-To: <20110201153035.GF17735@rivendell.middle-earth.co.uk> Message-ID: <2013519971.656912.1296578402985.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > Would be easier to just attach the result of hg diff which would > include the patches :-) Yeah, I thought about that, but I always find it unpleasant to read the patch contents in an hg diff because of all the '++' and such. > Please include a complete backport of 4645692 now. The tests are important. Ok. I attached the new hg.diff. Is this good to go? Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: hg.diff Type: text/x-patch Size: 44881 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110201/40b5c94b/hg.diff From ahughes at redhat.com Tue Feb 1 09:49:05 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 17:49:05 +0000 Subject: /hg/release/icedtea-web-1.0: RH672262, CVE-2011-0025: IcedTea ja... In-Reply-To: References: Message-ID: <20110201174905.GI17735@rivendell.middle-earth.co.uk> On 16:00 Tue 01 Feb , dbhole at icedtea.classpath.org wrote: > changeset 3bd328e4b515 in /hg/release/icedtea-web-1.0 > details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=3bd328e4b515 > author: Deepak Bhole > date: Tue Feb 01 10:53:44 2011 -0500 > > RH672262, CVE-2011-0025: IcedTea jarfile signature verification > bypass > > Fixes JAR signature handling so that multiply/partially signed jars > are correctly handled. > > > diffstat: > > 7 files changed, 109 insertions(+), 40 deletions(-) > ChangeLog | 30 ++++ > NEWS | 1 > netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 2 > netx/net/sourceforge/jnlp/security/CertVerifier.java | 3 > netx/net/sourceforge/jnlp/security/CertsInfoPane.java | 19 +- > netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java | 4 > netx/net/sourceforge/jnlp/tools/JarSigner.java | 90 +++++++++---- > > diffs (309 lines): > > diff -r e84432bca9a3 -r 3bd328e4b515 ChangeLog > --- a/ChangeLog Fri Jan 28 15:51:03 2011 -0500 > +++ b/ChangeLog Tue Feb 01 10:53:44 2011 -0500 > @@ -1,3 +1,33 @@ 2011-01-28 Deepak Bhole +2011-01-24 Deepak Bhole > + > + RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass > + * rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > + (initializeResources): Prompt user only if there is a single certificate > + that signs all jars in the jnlp file, otherwise treat as unsigned. > + * rt/net/sourceforge/jnlp/security/CertVerifier.java: Rename getCerts to > + getCertPath and make it return a CertPath. > + * rt/net/sourceforge/jnlp/security/CertsInfoPane.java: Rename certs > + variable to certPath and change its type to CertPath. > + (buildTree): Use new certPath variable. > + (populateTable): Same. > + * rt/net/sourceforge/jnlp/security/HttpsCertVerifier.java: Rename getCerts > + to getCertPath and make it return a CertPath. > + * rt/net/sourceforge/jnlp/tools/JarSigner.java: Change type for certs > + variable to be a hashmap that stores certs and the number of entries they > + have signed. > + (totalSignableEntries): New variable to track how many signable entries > + have been encountered. > + (getCerts): Updated method to return certs from new hashmap. > + (isFullySignedByASingleCert): New method. Returns if there is a single > + cert that signs all the entries in the jars specified in the jnlp file. > + (verifyJars): Move verifiedJars and unverifiedJars out of the for loop so > + that the data is not lost when the next jar is processed. After verifying > + each jar, see if there is a single signer, and prompt the user if there is > + such an untrusted signer. > + (verifyJar): Increment totalSignableEntries for each signable entry > + encountered and the count for each cert when it signs an entry. Move > + checkTrustedCerts() out of the function into verifyJars(). > + > 2011-01-28 Deepak Bhole > > * Makefile.am > diff -r e84432bca9a3 -r 3bd328e4b515 NEWS > --- a/NEWS Fri Jan 28 15:51:03 2011 -0500 > +++ b/NEWS Tue Feb 01 10:53:44 2011 -0500 > @@ -14,6 +14,7 @@ New in release 1.0 (2011-XX-XX): > * Security updates > - RH645843, CVE-2010-3860: IcedTea System property information leak via public static > - RH663680, CVE-2010-4351: IcedTea JNLP SecurityManager bypass > + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass > * New Features > - IcedTea-Web now uses a deployment.properties file to specify configuration > - System-level as well as user-level deployment.properties files with locked configuration are supported > diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Jan 28 15:51:03 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 > @@ -430,7 +430,7 @@ public class JNLPClassLoader extends URL > } > > //Case when at least one jar has some signing > - if (js.anyJarsSigned()) { > + if (js.anyJarsSigned() && js.isFullySignedByASingleCert()) { > signing = true; > > if (!js.allJarsSigned() && > diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/security/CertVerifier.java > --- a/netx/net/sourceforge/jnlp/security/CertVerifier.java Fri Jan 28 15:51:03 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/security/CertVerifier.java Tue Feb 01 10:53:44 2011 -0500 > @@ -76,7 +76,7 @@ public interface CertVerifier { > * Return a valid certificate path to this certificate(s) being verified > * @return The CertPath > */ > - public ArrayList getCerts(); > + public CertPath getCertPath(); > > /** > * Returns the application's publisher's certificate. > @@ -89,4 +89,5 @@ public interface CertVerifier { > * the event that the application is self signed. > */ > public abstract Certificate getRoot(); > + > } > diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/security/CertsInfoPane.java > --- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Fri Jan 28 15:51:03 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Tue Feb 01 10:53:44 2011 -0500 > @@ -67,7 +67,7 @@ import net.sourceforge.jnlp.tools.*; > */ > public class CertsInfoPane extends SecurityDialogPanel { > > - private ArrayList certs; > + private CertPath certPath; > private JList list; > protected JTree tree; > private JTable table; > @@ -87,12 +87,9 @@ public class CertsInfoPane extends Secur > * Builds the JTree out of CertPaths. > */ > void buildTree() { > - certs = parent.getJarSigner().getCerts(); > - //for now, we're only going to display the first signer, even though > - //jars can be signed by multiple people. > - CertPath firstPath = certs.get(0); > + certPath = parent.getJarSigner().getCertPath(); > X509Certificate firstCert = > - ((X509Certificate) firstPath.getCertificates().get(0)); > + ((X509Certificate) certPath.getCertificates().get(0)); > String subjectString = > SecurityUtil.getCN(firstCert.getSubjectX500Principal().getName()); > String issuerString = > @@ -104,9 +101,9 @@ public class CertsInfoPane extends Secur > > //not self signed > if (!firstCert.getSubjectDN().equals(firstCert.getIssuerDN()) > - && (firstPath.getCertificates().size() > 1)) { > + && (certPath.getCertificates().size() > 1)) { > X509Certificate secondCert = > - ((X509Certificate) firstPath.getCertificates().get(1)); > + ((X509Certificate) certPath.getCertificates().get(1)); > subjectString = > SecurityUtil.getCN(secondCert.getSubjectX500Principal().getName()); > issuerString = > @@ -125,12 +122,12 @@ public class CertsInfoPane extends Secur > * Fills in certsNames, certsData with data from the certificates. > */ > protected void populateTable() { > - certNames = new String[certs.get(0).getCertificates().size()]; > + certNames = new String[certPath.getCertificates().size()]; > certsData = new ArrayList(); > > - for (int i = 0; i < certs.get(0).getCertificates().size(); i++) { > + for (int i = 0; i < certPath.getCertificates().size(); i++) { > > - X509Certificate c = (X509Certificate) certs.get(0).getCertificates().get(i); > + X509Certificate c = (X509Certificate) certPath.getCertificates().get(i); > certsData.add(parseCert(c)); > certNames[i] = SecurityUtil.getCN(c.getSubjectX500Principal().getName()) > + " (" + SecurityUtil.getCN(c.getIssuerX500Principal().getName()) + ")"; > diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java > --- a/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Fri Jan 28 15:51:03 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/security/HttpsCertVerifier.java Tue Feb 01 10:53:44 2011 -0500 > @@ -83,7 +83,7 @@ public class HttpsCertVerifier implement > return isTrusted; > } > > - public ArrayList getCerts() { > + public CertPath getCertPath() { > > ArrayList list = new ArrayList(); > for (int i = 0; i < chain.length; i++) > @@ -99,7 +99,7 @@ public class HttpsCertVerifier implement > // carry on > } > > - return certPaths; > + return certPaths.get(0); > } > > public ArrayList getDetails() { > diff -r e84432bca9a3 -r 3bd328e4b515 netx/net/sourceforge/jnlp/tools/JarSigner.java > --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Fri Jan 28 15:51:03 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 > @@ -138,10 +138,12 @@ public class JarSigner implements CertVe > private ArrayList unverifiedJars = null; > > /** the certificates used for jar verification */ > - private ArrayList certs = null; > + private HashMap certs = new HashMap(); > > /** details of this signing */ > private ArrayList details = new ArrayList(); > + > + private int totalSignableEntries = 0; > > /* (non-Javadoc) > * @see net.sourceforge.jnlp.tools.CertVerifier2#getAlreadyTrustPublisher() > @@ -191,18 +193,41 @@ public class JarSigner implements CertVe > * @see net.sourceforge.jnlp.tools.CertVerifier2#getCerts() > */ > public ArrayList getCerts() { > - return certs; > + return new ArrayList(certs.keySet()); > + } > + > + /** > + * Returns whether or not all entries have a common signer. > + * > + * It is possible to create jars where only some entries are signed. In > + * such cases, we should not prompt the user to accept anything, as the whole > + * application must be treated as unsigned. This method should be called by a > + * caller before it is about to ask the user to accept a cert and determine > + * whether the application is trusted or not. > + * > + * @return Whether or not all entries have a common signer > + */ > + public boolean isFullySignedByASingleCert() { > + > + for (CertPath cPath : certs.keySet()) { > + // If this cert has signed everything, return true > + if (certs.get(cPath) == totalSignableEntries) > + return true; > + } > + > + // No cert found that signed all entries. Return false. > + return false; > } > > public void verifyJars(List jars, ResourceTracker tracker) > throws Exception { > > - certs = new ArrayList(); > + verifiedJars = new ArrayList(); > + unverifiedJars = new ArrayList(); > + > for (int i = 0; i < jars.size(); i++) { > > JARDesc jar = jars.get(i); > - verifiedJars = new ArrayList(); > - unverifiedJars = new ArrayList(); > > try { > > @@ -231,16 +256,28 @@ public class JarSigner implements CertVe > throw e; > } > } > + > + //we really only want the first certPath > + for (CertPath cPath : certs.keySet()) { > + > + if (certs.get(cPath) != totalSignableEntries) > + continue; > + else > + certPath = cPath; > + > + // check if the certs added above are in the trusted path > + checkTrustedCerts(); > + > + if (alreadyTrustPublisher || rootInCacerts) > + break; > + } > + > } > > public verifyResult verifyJar(String jarName) throws Exception { > boolean anySigned = false; > boolean hasUnsignedEntry = false; > JarFile jarFile = null; > - > - // certs could be uninitialized if one calls this method directly > - if (certs == null) > - certs = new ArrayList(); > > try { > jarFile = new JarFile(jarName, true); > @@ -280,21 +317,22 @@ public class JarSigner implements CertVe > CodeSigner[] signers = je.getCodeSigners(); > boolean isSigned = (signers != null); > anySigned |= isSigned; > - hasUnsignedEntry |= !je.isDirectory() && !isSigned > - && !signatureRelated(name); > + > + boolean shouldHaveSignature = !je.isDirectory() > + && !signatureRelated(name); > + > + hasUnsignedEntry |= shouldHaveSignature && !isSigned; > + > + if (shouldHaveSignature) > + totalSignableEntries++; > + > if (isSigned) { > - // TODO: Perhaps we should check here that > - // signers.length is only of size 1, and throw an > - // exception if it's not? > for (int i = 0; i < signers.length; i++) { > CertPath certPath = signers[i].getSignerCertPath(); > - if (!certs.contains(certPath)) > - certs.add(certPath); > - > - //we really only want the first certPath > - if (!certPath.equals(this.certPath)) { > - this.certPath = certPath; > - } > + if (!certs.containsKey(certPath)) > + certs.put(certPath, 1); > + else > + certs.put(certPath, certs.get(certPath) + 1); > > Certificate cert = signers[i].getSignerCertPath() > .getCertificates().get(0); > @@ -314,7 +352,12 @@ public class JarSigner implements CertVe > } > } > } //while e has more elements > - } //if man not null > + } else { //if man not null > + > + // Else increment totalEntries by 1 so that unsigned jars with > + // no manifests can't sneak in > + totalSignableEntries++; > + } > > //Alert the user if any of the following are true. > if (!anySigned) { > @@ -354,9 +397,6 @@ public class JarSigner implements CertVe > jarFile.close(); > } > } > - > - // check if the certs added above are in the trusted path > - checkTrustedCerts(); > > //anySigned does not guarantee that all files were signed. > return (anySigned && !(hasUnsignedEntry || hasExpiredCert Are we having the planned release today? You don't seem to be reachable on IRC. I would like some time to test your recent patches didn't break anything but I can do that shortly. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From ahughes at redhat.com Tue Feb 1 09:51:39 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 17:51:39 +0000 Subject: CubicCurve2D backports - review In-Reply-To: <2013519971.656912.1296578402985.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <20110201153035.GF17735@rivendell.middle-earth.co.uk> <2013519971.656912.1296578402985.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110201175139.GJ17735@rivendell.middle-earth.co.uk> On 11:40 Tue 01 Feb , Denis Lila wrote: > > Would be easier to just attach the result of hg diff which would > > include the patches :-) > > Yeah, I thought about that, but I always find it unpleasant to > read the patch contents in an hg diff because of all the '++' > and such. > But it means no-one can apply the exact patch as you have it. > > Please include a complete backport of 4645692 now. The tests are important. > > Ok. I attached the new hg.diff. > Is this good to go? > Assuming all these are now complete backports of the original changesets (as I originally supposed, as you didn't state otherwise), then yes. > Thank you, > Denis. > diff -r 0c86bdc188d3 ChangeLog > --- a/ChangeLog Tue Feb 01 09:20:39 2011 +0100 > +++ b/ChangeLog Tue Feb 01 11:40:06 2011 -0500 > @@ -1,3 +1,11 @@ > +2011-02-01 Denis Lila > + > + * NEWS: Update with the 3 backports > + * Makefile.am (ICEDTEA_PATCHES): Add the patches > + * patches/openjdk/4493128-CubicCurve2D.patch: New file. > + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: Likewise. > + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. > + > 2011-02-01 Pavel Tisnovsky > > * patches/jtreg-png-reader.patch: > diff -r 0c86bdc188d3 Makefile.am > --- a/Makefile.am Tue Feb 01 09:20:39 2011 +0100 > +++ b/Makefile.am Tue Feb 01 11:40:06 2011 -0500 > @@ -276,7 +276,10 @@ > patches/openjdk/6736649-text_bearings.patch \ > patches/openjdk/6797139-jbutton_truncation.patch \ > patches/openjdk/6883341-text_bearing_exception.patch \ > - patches/jtreg-png-reader.patch > + patches/jtreg-png-reader.patch \ > + patches/openjdk/4724552-CubicCurve2D.patch \ > + patches/openjdk/4493128-CubicCurve2D.patch \ > + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r 0c86bdc188d3 NEWS > --- a/NEWS Tue Feb 01 09:20:39 2011 +0100 > +++ b/NEWS Tue Feb 01 11:40:06 2011 -0500 > @@ -403,6 +403,9 @@ > - S6736649: test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java fails on Linux > - S6797139: JButton title is truncating for some strings irrespective of preferred size. > - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw exceptions when running Java2D demo by clicking Paint ta > + - S4493128: CubicCurve2D intersects method fails > + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when partially contained. > + - S4645692: CubicCurve2D.solveCubic does not return all solutions. > * Bug fixes > - RH647157, RH582455: Update fontconfig files for rhel 6 > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > diff -r 0c86bdc188d3 patches/openjdk/4493128-CubicCurve2D.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/4493128-CubicCurve2D.patch Tue Feb 01 11:40:06 2011 -0500 > @@ -0,0 +1,213 @@ > +--- openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java.old 2011-01-31 12:38:24.340733697 -0500 > ++++ openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-01-31 12:54:27.462601773 -0500 > +@@ -1387,203 +1387,13 @@ > + return false; > + } > + > +- // Trivially accept if either endpoint is inside the rectangle > +- // (not on its border since it may end there and not go inside) > +- // Record where they lie with respect to the rectangle. > +- // -1 => left, 0 => inside, 1 => right > +- double x1 = getX1(); > +- double y1 = getY1(); > +- int x1tag = getTag(x1, x, x+w); > +- int y1tag = getTag(y1, y, y+h); > +- if (x1tag == INSIDE && y1tag == INSIDE) { > +- return true; > +- } > +- double x2 = getX2(); > +- double y2 = getY2(); > +- int x2tag = getTag(x2, x, x+w); > +- int y2tag = getTag(y2, y, y+h); > +- if (x2tag == INSIDE && y2tag == INSIDE) { > +- return true; > +- } > +- > +- double ctrlx1 = getCtrlX1(); > +- double ctrly1 = getCtrlY1(); > +- double ctrlx2 = getCtrlX2(); > +- double ctrly2 = getCtrlY2(); > +- int ctrlx1tag = getTag(ctrlx1, x, x+w); > +- int ctrly1tag = getTag(ctrly1, y, y+h); > +- int ctrlx2tag = getTag(ctrlx2, x, x+w); > +- int ctrly2tag = getTag(ctrly2, y, y+h); > +- > +- // Trivially reject if all points are entirely to one side of > +- // the rectangle. > +- if (x1tag < INSIDE && x2tag < INSIDE && > +- ctrlx1tag < INSIDE && ctrlx2tag < INSIDE) > +- { > +- return false; // All points left > +- } > +- if (y1tag < INSIDE && y2tag < INSIDE && > +- ctrly1tag < INSIDE && ctrly2tag < INSIDE) > +- { > +- return false; // All points above > +- } > +- if (x1tag > INSIDE && x2tag > INSIDE && > +- ctrlx1tag > INSIDE && ctrlx2tag > INSIDE) > +- { > +- return false; // All points right > +- } > +- if (y1tag > INSIDE && y2tag > INSIDE && > +- ctrly1tag > INSIDE && ctrly2tag > INSIDE) > +- { > +- return false; // All points below > +- } > +- > +- // Test for endpoints on the edge where either the segment > +- // or the curve is headed "inwards" from them > +- // Note: These tests are a superset of the fast endpoint tests > +- // above and thus repeat those tests, but take more time > +- // and cover more cases > +- if (inwards(x1tag, x2tag, ctrlx1tag) && > +- inwards(y1tag, y2tag, ctrly1tag)) > +- { > +- // First endpoint on border with either edge moving inside > +- return true; > +- } > +- if (inwards(x2tag, x1tag, ctrlx2tag) && > +- inwards(y2tag, y1tag, ctrly2tag)) > +- { > +- // Second endpoint on border with either edge moving inside > +- return true; > +- } > +- > +- // Trivially accept if endpoints span directly across the rectangle > +- boolean xoverlap = (x1tag * x2tag <= 0); > +- boolean yoverlap = (y1tag * y2tag <= 0); > +- if (x1tag == INSIDE && x2tag == INSIDE && yoverlap) { > +- return true; > +- } > +- if (y1tag == INSIDE && y2tag == INSIDE && xoverlap) { > +- return true; > +- } > +- > +- // We now know that both endpoints are outside the rectangle > +- // but the 4 points are not all on one side of the rectangle. > +- // Therefore the curve cannot be contained inside the rectangle, > +- // but the rectangle might be contained inside the curve, or > +- // the curve might intersect the boundary of the rectangle. > +- > +- double[] eqn = new double[4]; > +- double[] res = new double[4]; > +- if (!yoverlap) { > +- // Both y coordinates for the closing segment are above or > +- // below the rectangle which means that we can only intersect > +- // if the curve crosses the top (or bottom) of the rectangle > +- // in more than one place and if those crossing locations > +- // span the horizontal range of the rectangle. > +- fillEqn(eqn, (y1tag < INSIDE ? y : y+h), y1, ctrly1, ctrly2, y2); > +- int num = solveCubic(eqn, res); > +- num = evalCubic(res, num, true, true, null, > +- x1, ctrlx1, ctrlx2, x2); > +- // odd counts imply the crossing was out of [0,1] bounds > +- // otherwise there is no way for that part of the curve to > +- // "return" to meet its endpoint > +- return (num == 2 && > +- getTag(res[0], x, x+w) * getTag(res[1], x, x+w) <= 0); > +- } > +- > +- // Y ranges overlap. Now we examine the X ranges > +- if (!xoverlap) { > +- // Both x coordinates for the closing segment are left of > +- // or right of the rectangle which means that we can only > +- // intersect if the curve crosses the left (or right) edge > +- // of the rectangle in more than one place and if those > +- // crossing locations span the vertical range of the rectangle. > +- fillEqn(eqn, (x1tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); > +- int num = solveCubic(eqn, res); > +- num = evalCubic(res, num, true, true, null, > +- y1, ctrly1, ctrly2, y2); > +- // odd counts imply the crossing was out of [0,1] bounds > +- // otherwise there is no way for that part of the curve to > +- // "return" to meet its endpoint > +- return (num == 2 && > +- getTag(res[0], y, y+h) * getTag(res[1], y, y+h) <= 0); > +- } > +- > +- // The X and Y ranges of the endpoints overlap the X and Y > +- // ranges of the rectangle, now find out how the endpoint > +- // line segment intersects the Y range of the rectangle > +- double dx = x2 - x1; > +- double dy = y2 - y1; > +- double k = y2 * x1 - x2 * y1; > +- int c1tag, c2tag; > +- if (y1tag == INSIDE) { > +- c1tag = x1tag; > +- } else { > +- c1tag = getTag((k + dx * (y1tag < INSIDE ? y : y+h)) / dy, x, x+w); > +- } > +- if (y2tag == INSIDE) { > +- c2tag = x2tag; > +- } else { > +- c2tag = getTag((k + dx * (y2tag < INSIDE ? y : y+h)) / dy, x, x+w); > +- } > +- // If the part of the line segment that intersects the Y range > +- // of the rectangle crosses it horizontally - trivially accept > +- if (c1tag * c2tag <= 0) { > +- return true; > +- } > +- > +- // Now we know that both the X and Y ranges intersect and that > +- // the endpoint line segment does not directly cross the rectangle. > +- // > +- // We can almost treat this case like one of the cases above > +- // where both endpoints are to one side, except that we may > +- // get one or three intersections of the curve with the vertical > +- // side of the rectangle. This is because the endpoint segment > +- // accounts for the other intersection in an even pairing. Thus, > +- // with the endpoint crossing we end up with 2 or 4 total crossings. > +- // > +- // (Remember there is overlap in both the X and Y ranges which > +- // means that the segment itself must cross at least one vertical > +- // edge of the rectangle - in particular, the "near vertical side" > +- // - leaving an odd number of intersections for the curve.) > +- // > +- // Now we calculate the y tags of all the intersections on the > +- // "near vertical side" of the rectangle. We will have one with > +- // the endpoint segment, and one or three with the curve. If > +- // any pair of those vertical intersections overlap the Y range > +- // of the rectangle, we have an intersection. Otherwise, we don't. > +- > +- // c1tag = vertical intersection class of the endpoint segment > +- // > +- // Choose the y tag of the endpoint that was not on the same > +- // side of the rectangle as the subsegment calculated above. > +- // Note that we can "steal" the existing Y tag of that endpoint > +- // since it will be provably the same as the vertical intersection. > +- c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); > +- > +- // Now we have to calculate an array of solutions of the curve > +- // with the "near vertical side" of the rectangle. Then we > +- // need to sort the tags and do a pairwise range test to see > +- // if either of the pairs of crossings spans the Y range of > +- // the rectangle. > +- // > +- // Note that the c2tag can still tell us which vertical edge > +- // to test against. > +- fillEqn(eqn, (c2tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); > +- int num = solveCubic(eqn, res); > +- num = evalCubic(res, num, true, true, null, y1, ctrly1, ctrly2, y2); > +- > +- // Now put all of the tags into a bucket and sort them. There > +- // is an intersection iff one of the pairs of tags "spans" the > +- // Y range of the rectangle. > +- int tags[] = new int[num+1]; > +- for (int i = 0; i < num; i++) { > +- tags[i] = getTag(res[i], y, y+h); > +- } > +- tags[num] = c1tag; > +- Arrays.sort(tags); > +- return ((num >= 1 && tags[0] * tags[1] <= 0) || > +- (num >= 3 && tags[2] * tags[3] <= 0)); > ++ int numCrossings = rectCrossings(x, y, w, h); > ++ // the intended return value is > ++ // numCrossings != 0 || numCrossings == Curve.RECT_INTERSECTS > ++ // but if (numCrossings != 0) numCrossings == INTERSECTS won't matter > ++ // and if !(numCrossings != 0) then numCrossings == 0, so > ++ // numCrossings != RECT_INTERSECT > ++ return numCrossings != 0; > + } > + > + /** > diff -r 0c86bdc188d3 patches/openjdk/4645692-CubicCurve2D.solveCubic.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/4645692-CubicCurve2D.solveCubic.patch Tue Feb 01 11:40:06 2011 -0500 > @@ -0,0 +1,717 @@ > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java ./openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java > +--- ./openjdk.old/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-02-01 10:52:21.560149275 -0500 > ++++ ./openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-02-01 10:52:37.112148647 -0500 > +@@ -31,6 +31,10 @@ > + import java.io.Serializable; > + import sun.awt.geom.Curve; > + > ++import static java.lang.Math.abs; > ++import static java.lang.Math.max; > ++import static java.lang.Math.ulp; > ++ > + /** > + * The CubicCurve2D class defines a cubic parametric curve > + * segment in {@code (x,y)} coordinate space. > +@@ -1083,95 +1087,286 @@ > + * @since 1.3 > + */ > + public static int solveCubic(double eqn[], double res[]) { > +- // From Numerical Recipes, 5.6, Quadratic and Cubic Equations > +- double d = eqn[3]; > +- if (d == 0.0) { > +- // The cubic has degenerated to quadratic (or line or ...). > ++ // From Graphics Gems: > ++ // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c > ++ final double d = eqn[3]; > ++ if (d == 0) { > + return QuadCurve2D.solveQuadratic(eqn, res); > + } > +- double a = eqn[2] / d; > +- double b = eqn[1] / d; > +- double c = eqn[0] / d; > +- int roots = 0; > +- double Q = (a * a - 3.0 * b) / 9.0; > +- double R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0; > +- double R2 = R * R; > +- double Q3 = Q * Q * Q; > +- a = a / 3.0; > +- if (R2 < Q3) { > +- double theta = Math.acos(R / Math.sqrt(Q3)); > +- Q = -2.0 * Math.sqrt(Q); > ++ > ++ /* normal form: x^3 + Ax^2 + Bx + C = 0 */ > ++ final double A = eqn[2] / d; > ++ final double B = eqn[1] / d; > ++ final double C = eqn[0] / d; > ++ > ++ > ++ // substitute x = y - A/3 to eliminate quadratic term: > ++ // x^3 +Px + Q = 0 > ++ // > ++ // Since we actually need P/3 and Q/2 for all of the > ++ // calculations that follow, we will calculate > ++ // p = P/3 > ++ // q = Q/2 > ++ // instead and use those values for simplicity of the code. > ++ double sq_A = A * A; > ++ double p = 1.0/3 * (-1.0/3 * sq_A + B); > ++ double q = 1.0/2 * (2.0/27 * A * sq_A - 1.0/3 * A * B + C); > ++ > ++ /* use Cardano's formula */ > ++ > ++ double cb_p = p * p * p; > ++ double D = q * q + cb_p; > ++ > ++ final double sub = 1.0/3 * A; > ++ > ++ int num; > ++ if (D < 0) { /* Casus irreducibilis: three real solutions */ > ++ // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method > ++ double phi = 1.0/3 * Math.acos(-q / Math.sqrt(-cb_p)); > ++ double t = 2 * Math.sqrt(-p); > ++ > + if (res == eqn) { > +- // Copy the eqn so that we don't clobber it with the > +- // roots. This is needed so that fixRoots can do its > +- // work with the original equation. > +- eqn = new double[4]; > +- System.arraycopy(res, 0, eqn, 0, 4); > ++ eqn = Arrays.copyOf(eqn, 4); > + } > +- res[roots++] = Q * Math.cos(theta / 3.0) - a; > +- res[roots++] = Q * Math.cos((theta + Math.PI * 2.0)/ 3.0) - a; > +- res[roots++] = Q * Math.cos((theta - Math.PI * 2.0)/ 3.0) - a; > +- fixRoots(res, eqn); > +- } else { > +- boolean neg = (R < 0.0); > +- double S = Math.sqrt(R2 - Q3); > +- if (neg) { > +- R = -R; > ++ > ++ res[ 0 ] = ( t * Math.cos(phi)); > ++ res[ 1 ] = (-t * Math.cos(phi + Math.PI / 3)); > ++ res[ 2 ] = (-t * Math.cos(phi - Math.PI / 3)); > ++ num = 3; > ++ > ++ for (int i = 0; i < num; ++i) { > ++ res[ i ] -= sub; > + } > +- double A = Math.pow(R + S, 1.0 / 3.0); > +- if (!neg) { > +- A = -A; > ++ > ++ } else { > ++ // Please see the comment in fixRoots marked 'XXX' before changing > ++ // any of the code in this case. > ++ double sqrt_D = Math.sqrt(D); > ++ double u = Math.cbrt(sqrt_D - q); > ++ double v = - Math.cbrt(sqrt_D + q); > ++ double uv = u+v; > ++ > ++ num = 1; > ++ > ++ double err = 1200000000*ulp(abs(uv) + abs(sub)); > ++ if (iszero(D, err) || within(u, v, err)) { > ++ if (res == eqn) { > ++ eqn = Arrays.copyOf(eqn, 4); > ++ } > ++ res[1] = -(uv / 2) - sub; > ++ num = 2; > + } > +- double B = (A == 0.0) ? 0.0 : (Q / A); > +- res[roots++] = (A + B) - a; > ++ // this must be done after the potential Arrays.copyOf > ++ res[ 0 ] = uv - sub; > + } > +- return roots; > ++ > ++ if (num > 1) { // num == 3 || num == 2 > ++ num = fixRoots(eqn, res, num); > ++ } > ++ if (num > 2 && (res[2] == res[1] || res[2] == res[0])) { > ++ num--; > ++ } > ++ if (num > 1 && res[1] == res[0]) { > ++ res[1] = res[--num]; // Copies res[2] to res[1] if needed > ++ } > ++ return num; > ++ } > ++ > ++ // preconditions: eqn != res && eqn[3] != 0 && num > 1 > ++ // This method tries to improve the accuracy of the roots of eqn (which > ++ // should be in res). It also might eliminate roots in res if it decideds > ++ // that they're not real roots. It will not check for roots that the > ++ // computation of res might have missed, so this method should only be > ++ // used when the roots in res have been computed using an algorithm > ++ // that never underestimates the number of roots (such as solveCubic above) > ++ private static int fixRoots(double[] eqn, double[] res, int num) { > ++ double[] intervals = {eqn[1], 2*eqn[2], 3*eqn[3]}; > ++ int critCount = QuadCurve2D.solveQuadratic(intervals, intervals); > ++ if (critCount == 2 && intervals[0] == intervals[1]) { > ++ critCount--; > ++ } > ++ if (critCount == 2 && intervals[0] > intervals[1]) { > ++ double tmp = intervals[0]; > ++ intervals[0] = intervals[1]; > ++ intervals[1] = tmp; > ++ } > ++ > ++ // below we use critCount to possibly filter out roots that shouldn't > ++ // have been computed. We require that eqn[3] != 0, so eqn is a proper > ++ // cubic, which means that its limits at -/+inf are -/+inf or +/-inf. > ++ // Therefore, if critCount==2, the curve is shaped like a sideways S, > ++ // and it could have 1-3 roots. If critCount==0 it is monotonic, and > ++ // if critCount==1 it is monotonic with a single point where it is > ++ // flat. In the last 2 cases there can only be 1 root. So in cases > ++ // where num > 1 but critCount < 2, we eliminate all roots in res > ++ // except one. > ++ > ++ if (num == 3) { > ++ double xe = getRootUpperBound(eqn); > ++ double x0 = -xe; > ++ > ++ Arrays.sort(res, 0, num); > ++ if (critCount == 2) { > ++ // this just tries to improve the accuracy of the computed > ++ // roots using Newton's method. > ++ res[0] = refineRootWithHint(eqn, x0, intervals[0], res[0]); > ++ res[1] = refineRootWithHint(eqn, intervals[0], intervals[1], res[1]); > ++ res[2] = refineRootWithHint(eqn, intervals[1], xe, res[2]); > ++ return 3; > ++ } else if (critCount == 1) { > ++ // we only need fx0 and fxe for the sign of the polynomial > ++ // at -inf and +inf respectively, so we don't need to do > ++ // fx0 = solveEqn(eqn, 3, x0); fxe = solveEqn(eqn, 3, xe) > ++ double fxe = eqn[3]; > ++ double fx0 = -fxe; > ++ > ++ double x1 = intervals[0]; > ++ double fx1 = solveEqn(eqn, 3, x1); > ++ > ++ // if critCount == 1 or critCount == 0, but num == 3 then > ++ // something has gone wrong. This branch and the one below > ++ // would ideally never execute, but if they do we can't know > ++ // which of the computed roots is closest to the real root; > ++ // therefore, we can't use refineRootWithHint. But even if > ++ // we did know, being here most likely means that the > ++ // curve is very flat close to two of the computed roots > ++ // (or maybe even all three). This might make Newton's method > ++ // fail altogether, which would be a pain to detect and fix. > ++ // This is why we use a very stable bisection method. > ++ if (oppositeSigns(fx0, fx1)) { > ++ res[0] = bisectRootWithHint(eqn, x0, x1, res[0]); > ++ } else if (oppositeSigns(fx1, fxe)) { > ++ res[0] = bisectRootWithHint(eqn, x1, xe, res[2]); > ++ } else /* fx1 must be 0 */ { > ++ res[0] = x1; > ++ } > ++ // return 1 > ++ } else if (critCount == 0) { > ++ res[0] = bisectRootWithHint(eqn, x0, xe, res[1]); > ++ // return 1 > ++ } > ++ } else if (num == 2 && critCount == 2) { > ++ // XXX: here we assume that res[0] has better accuracy than res[1]. > ++ // This is true because this method is only used from solveCubic > ++ // which puts in res[0] the root that it would compute anyway even > ++ // if num==1. If this method is ever used from any other method, or > ++ // if the solveCubic implementation changes, this assumption should > ++ // be reevaluated, and the choice of goodRoot might have to become > ++ // goodRoot = (abs(eqn'(res[0])) > abs(eqn'(res[1]))) ? res[0] : res[1] > ++ // where eqn' is the derivative of eqn. > ++ double goodRoot = res[0]; > ++ double badRoot = res[1]; > ++ double x1 = intervals[0]; > ++ double x2 = intervals[1]; > ++ // If a cubic curve really has 2 roots, one of those roots must be > ++ // at a critical point. That can't be goodRoot, so we compute x to > ++ // be the farthest critical point from goodRoot. If there are two > ++ // roots, x must be the second one, so we evaluate eqn at x, and if > ++ // it is zero (or close enough) we put x in res[1] (or badRoot, if > ++ // |solveEqn(eqn, 3, badRoot)| < |solveEqn(eqn, 3, x)| but this > ++ // shouldn't happen often). > ++ double x = abs(x1 - goodRoot) > abs(x2 - goodRoot) ? x1 : x2; > ++ double fx = solveEqn(eqn, 3, x); > ++ > ++ if (iszero(fx, 10000000*ulp(x))) { > ++ double badRootVal = solveEqn(eqn, 3, badRoot); > ++ res[1] = abs(badRootVal) < abs(fx) ? badRoot : x; > ++ return 2; > ++ } > ++ } // else there can only be one root - goodRoot, and it is already in res[0] > ++ > ++ return 1; > + } > + > +- /* > +- * This pruning step is necessary since solveCubic uses the > +- * cosine function to calculate the roots when there are 3 > +- * of them. Since the cosine method can have an error of > +- * +/- 1E-14 we need to make sure that we don't make any > +- * bad decisions due to an error. > +- * > +- * If the root is not near one of the endpoints, then we will > +- * only have a slight inaccuracy in calculating the x intercept > +- * which will only cause a slightly wrong answer for some > +- * points very close to the curve. While the results in that > +- * case are not as accurate as they could be, they are not > +- * disastrously inaccurate either. > +- * > +- * On the other hand, if the error happens near one end of > +- * the curve, then our processing to reject values outside > +- * of the t=[0,1] range will fail and the results of that > +- * failure will be disastrous since for an entire horizontal > +- * range of test points, we will either overcount or undercount > +- * the crossings and get a wrong answer for all of them, even > +- * when they are clearly and obviously inside or outside the > +- * curve. > +- * > +- * To work around this problem, we try a couple of Newton-Raphson > +- * iterations to see if the true root is closer to the endpoint > +- * or further away. If it is further away, then we can stop > +- * since we know we are on the right side of the endpoint. If > +- * we change direction, then either we are now being dragged away > +- * from the endpoint in which case the first condition will cause > +- * us to stop, or we have passed the endpoint and are headed back. > +- * In the second case, we simply evaluate the slope at the > +- * endpoint itself and place ourselves on the appropriate side > +- * of it or on it depending on that result. > +- */ > +- private static void fixRoots(double res[], double eqn[]) { > +- final double EPSILON = 1E-5; > ++ // use newton's method. > ++ private static double refineRootWithHint(double[] eqn, double min, double max, double t) { > ++ if (!inInterval(t, min, max)) { > ++ return t; > ++ } > ++ double[] deriv = {eqn[1], 2*eqn[2], 3*eqn[3]}; > ++ double origt = t; > + for (int i = 0; i < 3; i++) { > +- double t = res[i]; > +- if (Math.abs(t) < EPSILON) { > +- res[i] = findZero(t, 0, eqn); > +- } else if (Math.abs(t - 1) < EPSILON) { > +- res[i] = findZero(t, 1, eqn); > ++ double slope = solveEqn(deriv, 2, t); > ++ double y = solveEqn(eqn, 3, t); > ++ double delta = - (y / slope); > ++ double newt = t + delta; > ++ > ++ if (slope == 0 || y == 0 || t == newt) { > ++ break; > + } > ++ > ++ t = newt; > ++ } > ++ if (within(t, origt, 1000*ulp(origt)) && inInterval(t, min, max)) { > ++ return t; > + } > ++ return origt; > ++ } > ++ > ++ private static double bisectRootWithHint(double[] eqn, double x0, double xe, double hint) { > ++ double delta1 = Math.min(abs(hint - x0) / 64, 0.0625); > ++ double delta2 = Math.min(abs(hint - xe) / 64, 0.0625); > ++ double x02 = hint - delta1; > ++ double xe2 = hint + delta2; > ++ double fx02 = solveEqn(eqn, 3, x02); > ++ double fxe2 = solveEqn(eqn, 3, xe2); > ++ while (oppositeSigns(fx02, fxe2)) { > ++ if (x02 >= xe2) { > ++ return x02; > ++ } > ++ x0 = x02; > ++ xe = xe2; > ++ delta1 /= 64; > ++ delta2 /= 64; > ++ x02 = hint - delta1; > ++ xe2 = hint + delta2; > ++ fx02 = solveEqn(eqn, 3, x02); > ++ fxe2 = solveEqn(eqn, 3, xe2); > ++ } > ++ if (fx02 == 0) { > ++ return x02; > ++ } > ++ if (fxe2 == 0) { > ++ return xe2; > ++ } > ++ > ++ return bisectRoot(eqn, x0, xe); > ++ } > ++ > ++ private static double bisectRoot(double[] eqn, double x0, double xe) { > ++ double fx0 = solveEqn(eqn, 3, x0); > ++ double m = x0 + (xe - x0) / 2; > ++ while (m != x0 && m != xe) { > ++ double fm = solveEqn(eqn, 3, m); > ++ if (fm == 0) { > ++ return m; > ++ } > ++ if (oppositeSigns(fx0, fm)) { > ++ xe = m; > ++ } else { > ++ fx0 = fm; > ++ x0 = m; > ++ } > ++ m = x0 + (xe-x0)/2; > ++ } > ++ return m; > ++ } > ++ > ++ private static boolean inInterval(double t, double min, double max) { > ++ return min <= t && t <= max; > ++ } > ++ > ++ private static boolean within(double x, double y, double err) { > ++ double d = y - x; > ++ return (d <= err && d >= -err); > ++ } > ++ > ++ private static boolean iszero(double x, double err) { > ++ return within(x, 0, err); > ++ } > ++ > ++ private static boolean oppositeSigns(double x1, double x2) { > ++ return (x1 < 0 && x2 > 0) || (x1 > 0 && x2 < 0); > + } > + > + private static double solveEqn(double eqn[], int order, double t) { > +@@ -1182,60 +1377,26 @@ > + return v; > + } > + > +- private static double findZero(double t, double target, double eqn[]) { > +- double slopeqn[] = {eqn[1], 2*eqn[2], 3*eqn[3]}; > +- double slope; > +- double origdelta = 0; > +- double origt = t; > +- while (true) { > +- slope = solveEqn(slopeqn, 2, t); > +- if (slope == 0) { > +- // At a local minima - must return > +- return t; > +- } > +- double y = solveEqn(eqn, 3, t); > +- if (y == 0) { > +- // Found it! - return it > +- return t; > +- } > +- // assert(slope != 0 && y != 0); > +- double delta = - (y / slope); > +- // assert(delta != 0); > +- if (origdelta == 0) { > +- origdelta = delta; > +- } > +- if (t < target) { > +- if (delta < 0) return t; > +- } else if (t > target) { > +- if (delta > 0) return t; > +- } else { /* t == target */ > +- return (delta > 0 > +- ? (target + java.lang.Double.MIN_VALUE) > +- : (target - java.lang.Double.MIN_VALUE)); > +- } > +- double newt = t + delta; > +- if (t == newt) { > +- // The deltas are so small that we aren't moving... > +- return t; > +- } > +- if (delta * origdelta < 0) { > +- // We have reversed our path. > +- int tag = (origt < t > +- ? getTag(target, origt, t) > +- : getTag(target, t, origt)); > +- if (tag != INSIDE) { > +- // Local minima found away from target - return the middle > +- return (origt + t) / 2; > +- } > +- // Local minima somewhere near target - move to target > +- // and let the slope determine the resulting t. > +- t = target; > +- } else { > +- t = newt; > +- } > +- } > ++ /* > ++ * Computes M+1 where M is an upper bound for all the roots in of eqn. > ++ * See: http://en.wikipedia.org/wiki/Sturm%27s_theorem#Applications. > ++ * The above link doesn't contain a proof, but I [dlila] proved it myself > ++ * so the result is reliable. The proof isn't difficult, but it's a bit > ++ * long to include here. > ++ * Precondition: eqn must represent a cubic polynomial > ++ */ > ++ private static double getRootUpperBound(double[] eqn) { > ++ double d = eqn[3]; > ++ double a = eqn[2]; > ++ double b = eqn[1]; > ++ double c = eqn[0]; > ++ > ++ double M = 1 + max(max(abs(a), abs(b)), abs(c)) / abs(d); > ++ M += ulp(M) + 1; > ++ return M; > + } > + > ++ > + /** > + * {@inheritDoc} > + * @since 1.2 > +@@ -1273,110 +1434,6 @@ > + return contains(p.getX(), p.getY()); > + } > + > +- /* > +- * Fill an array with the coefficients of the parametric equation > +- * in t, ready for solving against val with solveCubic. > +- * We currently have: > +- *
> +-     *   val = P(t) = C1(1-t)^3 + 3CP1 t(1-t)^2 + 3CP2 t^2(1-t) + C2 t^3
> +-     *              = C1 - 3C1t + 3C1t^2 - C1t^3 +
> +-     *                3CP1t - 6CP1t^2 + 3CP1t^3 +
> +-     *                3CP2t^2 - 3CP2t^3 +
> +-     *                C2t^3
> +-     *            0 = (C1 - val) +
> +-     *                (3CP1 - 3C1) t +
> +-     *                (3C1 - 6CP1 + 3CP2) t^2 +
> +-     *                (C2 - 3CP2 + 3CP1 - C1) t^3
> +-     *            0 = C + Bt + At^2 + Dt^3
> +-     *     C = C1 - val
> +-     *     B = 3*CP1 - 3*C1
> +-     *     A = 3*CP2 - 6*CP1 + 3*C1
> +-     *     D = C2 - 3*CP2 + 3*CP1 - C1
> +-     * 
> +- */ > +- private static void fillEqn(double eqn[], double val, > +- double c1, double cp1, double cp2, double c2) { > +- eqn[0] = c1 - val; > +- eqn[1] = (cp1 - c1) * 3.0; > +- eqn[2] = (cp2 - cp1 - cp1 + c1) * 3.0; > +- eqn[3] = c2 + (cp1 - cp2) * 3.0 - c1; > +- return; > +- } > +- > +- /* > +- * Evaluate the t values in the first num slots of the vals[] array > +- * and place the evaluated values back into the same array. Only > +- * evaluate t values that are within the range <0, 1>, including > +- * the 0 and 1 ends of the range iff the include0 or include1 > +- * booleans are true. If an "inflection" equation is handed in, > +- * then any points which represent a point of inflection for that > +- * cubic equation are also ignored. > +- */ > +- private static int evalCubic(double vals[], int num, > +- boolean include0, > +- boolean include1, > +- double inflect[], > +- double c1, double cp1, > +- double cp2, double c2) { > +- int j = 0; > +- for (int i = 0; i < num; i++) { > +- double t = vals[i]; > +- if ((include0 ? t >= 0 : t > 0) && > +- (include1 ? t <= 1 : t < 1) && > +- (inflect == null || > +- inflect[1] + (2*inflect[2] + 3*inflect[3]*t)*t != 0)) > +- { > +- double u = 1 - t; > +- vals[j++] = c1*u*u*u + 3*cp1*t*u*u + 3*cp2*t*t*u + c2*t*t*t; > +- } > +- } > +- return j; > +- } > +- > +- private static final int BELOW = -2; > +- private static final int LOWEDGE = -1; > +- private static final int INSIDE = 0; > +- private static final int HIGHEDGE = 1; > +- private static final int ABOVE = 2; > +- > +- /* > +- * Determine where coord lies with respect to the range from > +- * low to high. It is assumed that low <= high. The return > +- * value is one of the 5 values BELOW, LOWEDGE, INSIDE, HIGHEDGE, > +- * or ABOVE. > +- */ > +- private static int getTag(double coord, double low, double high) { > +- if (coord <= low) { > +- return (coord < low ? BELOW : LOWEDGE); > +- } > +- if (coord >= high) { > +- return (coord > high ? ABOVE : HIGHEDGE); > +- } > +- return INSIDE; > +- } > +- > +- /* > +- * Determine if the pttag represents a coordinate that is already > +- * in its test range, or is on the border with either of the two > +- * opttags representing another coordinate that is "towards the > +- * inside" of that test range. In other words, are either of the > +- * two "opt" points "drawing the pt inward"? > +- */ > +- private static boolean inwards(int pttag, int opt1tag, int opt2tag) { > +- switch (pttag) { > +- case BELOW: > +- case ABOVE: > +- default: > +- return false; > +- case LOWEDGE: > +- return (opt1tag >= INSIDE || opt2tag >= INSIDE); > +- case INSIDE: > +- return true; > +- case HIGHEDGE: > +- return (opt1tag <= INSIDE || opt2tag <= INSIDE); > +- } > +- } > +- > + /** > + * {@inheritDoc} > + * @since 1.2 > +diff -Nr --unified=3 ./openjdk.old/jdk/test/java/awt/geom/CubicCurve2D/ContainsTest.java ./openjdk/jdk/test/java/awt/geom/CubicCurve2D/ContainsTest.java > +--- ./openjdk.old/jdk/test/java/awt/geom/CubicCurve2D/ContainsTest.java 1969-12-31 19:00:00.000000000 -0500 > ++++ ./openjdk/jdk/test/java/awt/geom/CubicCurve2D/ContainsTest.java 2011-02-01 10:54:07.105148995 -0500 > +@@ -0,0 +1,46 @@ > ++/* > ++ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/** > ++ * @test > ++ * @bug 4724552 > ++ * @summary Verifies that CubicCurve2D.contains(Rectangle2D) does not return > ++ * true when the rectangle is only partially contained. > ++ * @run main ContainsTest > ++ */ > ++ > ++ > ++import java.awt.geom.CubicCurve2D; > ++import java.awt.geom.Rectangle2D; > ++ > ++public class ContainsTest { > ++ > ++ public static void main(String[] args) throws Exception { > ++ CubicCurve2D c = new CubicCurve2D.Double(0, 0, 4, -4, -2, -4, 2, 0); > ++ Rectangle2D r = new Rectangle2D.Double(0.75, -2.5, 0.5, 2); > ++ > ++ if (c.contains(r)) { > ++ throw new Exception("The rectangle should not be contained in the curve"); > ++ } > ++ } > ++} > +diff -Nr --unified=3 ./openjdk.old/jdk/test/java/awt/geom/CubicCurve2D/IntersectsTest.java ./openjdk/jdk/test/java/awt/geom/CubicCurve2D/IntersectsTest.java > +--- ./openjdk.old/jdk/test/java/awt/geom/CubicCurve2D/IntersectsTest.java 1969-12-31 19:00:00.000000000 -0500 > ++++ ./openjdk/jdk/test/java/awt/geom/CubicCurve2D/IntersectsTest.java 2011-02-01 10:54:07.105148995 -0500 > +@@ -0,0 +1,48 @@ > ++/* > ++ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/** > ++ * @test > ++ * @bug 4493128 > ++ * @summary Verifies that CubicCurve2D returns true for obvious intersection > ++ * @run main IntersectsTest > ++ */ > ++ > ++import java.awt.geom.CubicCurve2D; > ++import java.awt.geom.Rectangle2D; > ++ > ++public class IntersectsTest { > ++ > ++ public static void main(String[] args) throws Exception { > ++ CubicCurve2D c = new CubicCurve2D.Double(50.0, 300.0, > ++ 150.0, 166.6666717529297, > ++ 238.0, 456.66668701171875, > ++ 350.0, 300.0); > ++ Rectangle2D r = new Rectangle2D.Double(260, 300, 10, 10); > ++ > ++ if (!c.intersects(r)) { > ++ throw new Exception("The rectangle is contained. " + > ++ "intersects(Rectangle2D) should return true"); > ++ } > ++ } > ++} > +diff -Nr --unified=3 ./openjdk.old/jdk/test/java/awt/geom/CubicCurve2D/SolveCubicTest.java ./openjdk/jdk/test/java/awt/geom/CubicCurve2D/SolveCubicTest.java > +--- ./openjdk.old/jdk/test/java/awt/geom/CubicCurve2D/SolveCubicTest.java 1969-12-31 19:00:00.000000000 -0500 > ++++ ./openjdk/jdk/test/java/awt/geom/CubicCurve2D/SolveCubicTest.java 2011-02-01 10:54:07.105148995 -0500 > +@@ -0,0 +1,43 @@ > ++/* > ++ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/** > ++ * @test > ++ * @bug 4645692 > ++ * @summary Verifies that SolveCubic doesn't miss any roots. > ++ * @run main SolveCubicTest > ++ */ > ++ > ++import static java.awt.geom.CubicCurve2D.solveCubic; > ++ > ++public class SolveCubicTest { > ++ > ++ public static void main(String[] args) throws Exception { > ++ > ++ double[] eqn = {0, 0, 1, 1}; > ++ int numRoots = solveCubic(eqn, eqn); > ++ if (numRoots < 2) { > ++ throw new Exception("There are 2 roots. Only " + numRoots + " were found."); > ++ } > ++ } > ++} > diff -r 0c86bdc188d3 patches/openjdk/4724552-CubicCurve2D.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/4724552-CubicCurve2D.patch Tue Feb 01 11:40:06 2011 -0500 > @@ -0,0 +1,48 @@ > +--- openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java.old 2011-01-20 18:54:14.000000000 -0500 > ++++ openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-01-31 12:38:24.340733697 -0500 > +@@ -1602,20 +1602,32 @@ > + if (w <= 0 || h <= 0) { > + return false; > + } > +- // Assertion: Cubic curves closed by connecting their > +- // endpoints form either one or two convex halves with > +- // the closing line segment as an edge of both sides. > +- if (!(contains(x, y) && > +- contains(x + w, y) && > +- contains(x + w, y + h) && > +- contains(x, y + h))) { > +- return false; > ++ > ++ int numCrossings = rectCrossings(x, y, w, h); > ++ return !(numCrossings == 0 || numCrossings == Curve.RECT_INTERSECTS); > ++ } > ++ > ++ private int rectCrossings(double x, double y, double w, double h) { > ++ int crossings = 0; > ++ if (!(getX1() == getX2() && getY1() == getY2())) { > ++ crossings = Curve.rectCrossingsForLine(crossings, > ++ x, y, > ++ x+w, y+h, > ++ getX1(), getY1(), > ++ getX2(), getY2()); > ++ if (crossings == Curve.RECT_INTERSECTS) { > ++ return crossings; > ++ } > + } > +- // Either the rectangle is entirely inside one of the convex > +- // halves or it crosses from one to the other, in which case > +- // it must intersect the closing line segment. > +- Rectangle2D rect = new Rectangle2D.Double(x, y, w, h); > +- return !rect.intersectsLine(getX1(), getY1(), getX2(), getY2()); > ++ // we call this with the curve's direction reversed, because we wanted > ++ // to call rectCrossingsForLine first, because it's cheaper. > ++ return Curve.rectCrossingsForCubic(crossings, > ++ x, y, > ++ x+w, y+h, > ++ getX2(), getY2(), > ++ getCtrlX2(), getCtrlY2(), > ++ getCtrlX1(), getCtrlY1(), > ++ getX1(), getY1(), 0); > + } > + > + /** -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 10:05:58 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:05:58 +0000 Subject: [Bug 624] JVM crashes with Tomcat Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=624 ------- Comment #3 from gnu_andrew at member.fsf.org 2011-02-01 18:05 ------- Are you able to build the recent 1.9.5 release to see if the issue is fixed there? See http://blog.fuseyism.com/index.php/2011/02/01/security-icedtea6-178-185-195-released/ The 1.7 series has an older release of HotSpot and this bug may be fixed in the newer version. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Tue Feb 1 10:14:31 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:14:31 +0000 Subject: /hg/release/icedtea6-1.7: Prepare for 1.7.9. Message-ID: changeset d55f3f8e8d6c in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=d55f3f8e8d6c author: Andrew John Hughes date: Tue Feb 01 18:14:24 2011 +0000 Prepare for 1.7.9. 2011-02-01 Andrew John Hughes * NEWS: Update for 1.7.9. * configure.ac: Bump to 1.7.9pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r 392843c37e47 -r d55f3f8e8d6c ChangeLog --- a/ChangeLog Tue Feb 01 14:35:18 2011 +0000 +++ b/ChangeLog Tue Feb 01 18:14:24 2011 +0000 @@ -1,3 +1,8 @@ 2011-01-25 Andrew John Hughes + + * NEWS: Update for 1.7.9. + * configure.ac: Bump to 1.7.9pre. + 2011-01-25 Andrew John Hughes * NEWS: Update for 1.7.8 release. diff -r 392843c37e47 -r d55f3f8e8d6c NEWS --- a/NEWS Tue Feb 01 14:35:18 2011 +0000 +++ b/NEWS Tue Feb 01 18:14:24 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.7.9 (20XX-XX-XX): New in release 1.7.8 (2011-02-01): diff -r 392843c37e47 -r d55f3f8e8d6c configure.ac --- a/configure.ac Tue Feb 01 14:35:18 2011 +0000 +++ b/configure.ac Tue Feb 01 18:14:24 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [1.7.8], [distro-pkg -AC_INIT([icedtea6], [1.7.8], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.7.9pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Tue Feb 1 10:15:42 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:15:42 +0000 Subject: /hg/release/icedtea6-1.8: Prepare for 1.8.6. Message-ID: changeset 6e111db7700c in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=6e111db7700c author: Andrew John Hughes date: Tue Feb 01 18:15:36 2011 +0000 Prepare for 1.8.6. 2011-02-01 Andrew John Hughes * NEWS: Update for 1.8.6. * configure.ac: Bump to 1.8.6pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r a7282f501aeb -r 6e111db7700c ChangeLog --- a/ChangeLog Tue Feb 01 14:31:59 2011 +0000 +++ b/ChangeLog Tue Feb 01 18:15:36 2011 +0000 @@ -1,3 +1,8 @@ 2011-01-25 Andrew John Hughes + + * NEWS: Update for 1.8.6. + * configure.ac: Bump to 1.8.6pre. + 2011-01-25 Andrew John Hughes * NEWS: Update for 1.8.5 release. diff -r a7282f501aeb -r 6e111db7700c NEWS --- a/NEWS Tue Feb 01 14:31:59 2011 +0000 +++ b/NEWS Tue Feb 01 18:15:36 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.8.6 (20XX-XX-XX): New in release 1.8.5 (2011-02-01): diff -r a7282f501aeb -r 6e111db7700c configure.ac --- a/configure.ac Tue Feb 01 14:31:59 2011 +0000 +++ b/configure.ac Tue Feb 01 18:15:36 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.8.5],[distro-pkg-d -AC_INIT([icedtea6],[1.8.5],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.8.6pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Tue Feb 1 10:17:37 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:17:37 +0000 Subject: /hg/release/icedtea6-1.9: Prepare for 1.9.6. Message-ID: changeset 5328f1ab65e1 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=5328f1ab65e1 author: Andrew John Hughes date: Tue Feb 01 18:17:32 2011 +0000 Prepare for 1.9.6. 2011-02-01 Andrew John Hughes * NEWS: Update for 1.9.6. * configure.ac: Bump to 1.9.6pre. diffstat: 3 files changed, 9 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 3 +++ configure.ac | 2 +- diffs (34 lines): diff -r c6d1d36e4c26 -r 5328f1ab65e1 ChangeLog --- a/ChangeLog Tue Feb 01 14:30:45 2011 +0000 +++ b/ChangeLog Tue Feb 01 18:17:32 2011 +0000 @@ -1,3 +1,8 @@ 2011-01-25 Andrew John Hughes + + * NEWS: Update for 1.9.6. + * configure.ac: Bump to 1.9.6pre. + 2011-01-25 Andrew John Hughes * NEWS: Update for 1.9.5 release. diff -r c6d1d36e4c26 -r 5328f1ab65e1 NEWS --- a/NEWS Tue Feb 01 14:30:45 2011 +0000 +++ b/NEWS Tue Feb 01 18:17:32 2011 +0000 @@ -7,6 +7,9 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.9.6 (20XX-XX-XX): + New in release 1.9.5 (2011-02-01): diff -r c6d1d36e4c26 -r 5328f1ab65e1 configure.ac --- a/configure.ac Tue Feb 01 14:30:45 2011 +0000 +++ b/configure.ac Tue Feb 01 18:17:32 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.9.5],[distro-pkg-d -AC_INIT([icedtea6],[1.9.5],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.9.6pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Tue Feb 1 10:22:24 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:22:24 +0000 Subject: /hg/icedtea6: Add NEWS annoucements for 1.7.8, 1.8.5 and 1.9.5. Message-ID: changeset 82d83ff8b150 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=82d83ff8b150 author: Andrew John Hughes date: Tue Feb 01 18:22:19 2011 +0000 Add NEWS annoucements for 1.7.8, 1.8.5 and 1.9.5. 2011-02-01 Andrew John Hughes * NEWS: Add announcements for 1.7.8, 1.8.5 and 1.9.5. diffstat: 2 files changed, 41 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 37 ++++++++++++++++++++++++++++++++++++- diffs (60 lines): diff -r 0c86bdc188d3 -r 82d83ff8b150 ChangeLog --- a/ChangeLog Tue Feb 01 09:20:39 2011 +0100 +++ b/ChangeLog Tue Feb 01 18:22:19 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-01 Pavel Tisnovsky + + * NEWS: Add announcements for 1.7.8, + 1.8.5 and 1.9.5. + 2011-02-01 Pavel Tisnovsky * patches/jtreg-png-reader.patch: diff -r 0c86bdc188d3 -r 82d83ff8b150 NEWS --- a/NEWS Tue Feb 01 09:20:39 2011 +0100 +++ b/NEWS Tue Feb 01 18:22:19 2011 +0000 @@ -404,8 +404,43 @@ New in release 1.10 (2011-XX-XX): - S6797139: JButton title is truncating for some strings irrespective of preferred size. - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw exceptions when running Java2D demo by clicking Paint ta * Bug fixes + - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors + +New in release 1.9.5 (2011-02-01): + +* Security updates + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass +* Backports + - S6687968: PNGImageReader leaks native memory through an Inflater + - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk + - S6782079: PNG: reading metadata may cause OOM on truncated images +* Fixes - RH647157, RH582455: Update fontconfig files for rhel 6 - - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors + - PR619: Improper finalization by the plugin can crash the browser + +New in release 1.8.5 (2011-02-01): + +* Security updates + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass +* Backports + - S6687968: PNGImageReader leaks native memory through an Inflater + - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk + - S6782079: PNG: reading metadata may cause OOM on truncated images +* Fixes + - RH647157, RH582455: Update fontconfig files for rhel 6 + - PR619: Improper finalization by the plugin can crash the browser + +New in release 1.7.8 (2011-02-01): + +* Security updates + - RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass +* Backports + - S6687968: PNGImageReader leaks native memory through an Inflater + - S6541476, RH665355: PNG imageio plugin incorrectly handles iTXt chunk + - S6782079: PNG: reading metadata may cause OOM on truncated images +* Fixes: + - RH647157, RH582455: Update fontconfig files for rhel 6 + - PR619: Improper finalization by the plugin can crash the browser New in release 1.9.4 (2011-01-18): From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 10:32:14 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:32:14 +0000 Subject: [Bug 395] firefox with openjdk-plugin hangs whenever jmol app is used Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=395 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugin |Plugin Product|IcedTea |IcedTea-Web ------- Comment #3 from gnu_andrew at member.fsf.org 2011-02-01 18:32 ------- Refiling under IcedTea-Web. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 10:32:39 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:32:39 +0000 Subject: [Bug 411] Applet cannot load j2pkcs11 library Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=411 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugin |Plugin Product|IcedTea |IcedTea-Web Version|6-1.6 |hg ------- Comment #1 from gnu_andrew at member.fsf.org 2011-02-01 18:32 ------- Refiling under IcedTea-Web. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 10:32:45 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:32:45 +0000 Subject: [Bug 443] Iceweasel freezes and is unresponsive Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=443 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugin |Plugin Product|IcedTea |IcedTea-Web ------- Comment #3 from gnu_andrew at member.fsf.org 2011-02-01 18:32 ------- Refiling under IcedTea-Web. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Feb 1 10:32:56 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Feb 2011 18:32:56 +0000 Subject: [Bug 510] System.load on applet hang the second time Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=510 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Component|Plugin |Plugin Product|IcedTea |IcedTea-Web Version|6-1.8 |hg ------- Comment #6 from gnu_andrew at member.fsf.org 2011-02-01 18:32 ------- Refiling under IcedTea-Web. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Tue Feb 1 10:36:01 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 18:36:01 +0000 Subject: IcedTea-Web Bugs Message-ID: <20110201183601.GL17735@rivendell.middle-earth.co.uk> http://icedtea.classpath.org/bugzilla/buglist.cgi?product=IcedTea-Web&bug_status=NEW&bug_status=ASSIGNED&bug_status=REOPENED 46 at present. It's probably worth checking if any of these have been fixed and listing them in NEWS. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 From dlila at icedtea.classpath.org Tue Feb 1 11:28:50 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Tue, 01 Feb 2011 19:28:50 +0000 Subject: /hg/icedtea6: CubicCurve2D backports: S4493128, S4645692, S4724552. Message-ID: changeset eee57a146340 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=eee57a146340 author: dlila date: Tue Feb 01 14:21:02 2011 -0500 CubicCurve2D backports: S4493128, S4645692, S4724552. diffstat: 6 files changed, 993 insertions(+), 1 deletion(-) ChangeLog | 8 Makefile.am | 5 NEWS | 3 patches/openjdk/4493128-CubicCurve2D.patch | 213 +++++ patches/openjdk/4645692-CubicCurve2D.solveCubic.patch | 717 +++++++++++++++++ patches/openjdk/4724552-CubicCurve2D.patch | 48 + diffs (truncated from 1033 to 500 lines): diff -r 82d83ff8b150 -r eee57a146340 ChangeLog --- a/ChangeLog Tue Feb 01 18:22:19 2011 +0000 +++ b/ChangeLog Tue Feb 01 14:21:02 2011 -0500 @@ -1,3 +1,11 @@ 2011-02-01 Andrew John Hughes + + * NEWS: Update with the 3 backports + * Makefile.am (ICEDTEA_PATCHES): Add the patches + * patches/openjdk/4493128-CubicCurve2D.patch: New file. + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: Likewise. + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. + 2011-02-01 Andrew John Hughes * NEWS: Add announcements for 1.7.8, diff -r 82d83ff8b150 -r eee57a146340 Makefile.am --- a/Makefile.am Tue Feb 01 18:22:19 2011 +0000 +++ b/Makefile.am Tue Feb 01 14:21:02 2011 -0500 @@ -276,7 +276,10 @@ ICEDTEA_PATCHES = \ patches/openjdk/6736649-text_bearings.patch \ patches/openjdk/6797139-jbutton_truncation.patch \ patches/openjdk/6883341-text_bearing_exception.patch \ - patches/jtreg-png-reader.patch + patches/jtreg-png-reader.patch \ + patches/openjdk/4724552-CubicCurve2D.patch \ + patches/openjdk/4493128-CubicCurve2D.patch \ + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 82d83ff8b150 -r eee57a146340 NEWS --- a/NEWS Tue Feb 01 18:22:19 2011 +0000 +++ b/NEWS Tue Feb 01 14:21:02 2011 -0500 @@ -403,6 +403,9 @@ New in release 1.10 (2011-XX-XX): - S6736649: test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java fails on Linux - S6797139: JButton title is truncating for some strings irrespective of preferred size. - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw exceptions when running Java2D demo by clicking Paint ta + - S4493128: CubicCurve2D intersects method fails + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when partially contained. + - S4645692: CubicCurve2D.solveCubic does not return all solutions. * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors diff -r 82d83ff8b150 -r eee57a146340 patches/openjdk/4493128-CubicCurve2D.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/4493128-CubicCurve2D.patch Tue Feb 01 14:21:02 2011 -0500 @@ -0,0 +1,213 @@ +--- openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java.old 2011-01-31 12:38:24.340733697 -0500 ++++ openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-01-31 12:54:27.462601773 -0500 +@@ -1387,203 +1387,13 @@ + return false; + } + +- // Trivially accept if either endpoint is inside the rectangle +- // (not on its border since it may end there and not go inside) +- // Record where they lie with respect to the rectangle. +- // -1 => left, 0 => inside, 1 => right +- double x1 = getX1(); +- double y1 = getY1(); +- int x1tag = getTag(x1, x, x+w); +- int y1tag = getTag(y1, y, y+h); +- if (x1tag == INSIDE && y1tag == INSIDE) { +- return true; +- } +- double x2 = getX2(); +- double y2 = getY2(); +- int x2tag = getTag(x2, x, x+w); +- int y2tag = getTag(y2, y, y+h); +- if (x2tag == INSIDE && y2tag == INSIDE) { +- return true; +- } +- +- double ctrlx1 = getCtrlX1(); +- double ctrly1 = getCtrlY1(); +- double ctrlx2 = getCtrlX2(); +- double ctrly2 = getCtrlY2(); +- int ctrlx1tag = getTag(ctrlx1, x, x+w); +- int ctrly1tag = getTag(ctrly1, y, y+h); +- int ctrlx2tag = getTag(ctrlx2, x, x+w); +- int ctrly2tag = getTag(ctrly2, y, y+h); +- +- // Trivially reject if all points are entirely to one side of +- // the rectangle. +- if (x1tag < INSIDE && x2tag < INSIDE && +- ctrlx1tag < INSIDE && ctrlx2tag < INSIDE) +- { +- return false; // All points left +- } +- if (y1tag < INSIDE && y2tag < INSIDE && +- ctrly1tag < INSIDE && ctrly2tag < INSIDE) +- { +- return false; // All points above +- } +- if (x1tag > INSIDE && x2tag > INSIDE && +- ctrlx1tag > INSIDE && ctrlx2tag > INSIDE) +- { +- return false; // All points right +- } +- if (y1tag > INSIDE && y2tag > INSIDE && +- ctrly1tag > INSIDE && ctrly2tag > INSIDE) +- { +- return false; // All points below +- } +- +- // Test for endpoints on the edge where either the segment +- // or the curve is headed "inwards" from them +- // Note: These tests are a superset of the fast endpoint tests +- // above and thus repeat those tests, but take more time +- // and cover more cases +- if (inwards(x1tag, x2tag, ctrlx1tag) && +- inwards(y1tag, y2tag, ctrly1tag)) +- { +- // First endpoint on border with either edge moving inside +- return true; +- } +- if (inwards(x2tag, x1tag, ctrlx2tag) && +- inwards(y2tag, y1tag, ctrly2tag)) +- { +- // Second endpoint on border with either edge moving inside +- return true; +- } +- +- // Trivially accept if endpoints span directly across the rectangle +- boolean xoverlap = (x1tag * x2tag <= 0); +- boolean yoverlap = (y1tag * y2tag <= 0); +- if (x1tag == INSIDE && x2tag == INSIDE && yoverlap) { +- return true; +- } +- if (y1tag == INSIDE && y2tag == INSIDE && xoverlap) { +- return true; +- } +- +- // We now know that both endpoints are outside the rectangle +- // but the 4 points are not all on one side of the rectangle. +- // Therefore the curve cannot be contained inside the rectangle, +- // but the rectangle might be contained inside the curve, or +- // the curve might intersect the boundary of the rectangle. +- +- double[] eqn = new double[4]; +- double[] res = new double[4]; +- if (!yoverlap) { +- // Both y coordinates for the closing segment are above or +- // below the rectangle which means that we can only intersect +- // if the curve crosses the top (or bottom) of the rectangle +- // in more than one place and if those crossing locations +- // span the horizontal range of the rectangle. +- fillEqn(eqn, (y1tag < INSIDE ? y : y+h), y1, ctrly1, ctrly2, y2); +- int num = solveCubic(eqn, res); +- num = evalCubic(res, num, true, true, null, +- x1, ctrlx1, ctrlx2, x2); +- // odd counts imply the crossing was out of [0,1] bounds +- // otherwise there is no way for that part of the curve to +- // "return" to meet its endpoint +- return (num == 2 && +- getTag(res[0], x, x+w) * getTag(res[1], x, x+w) <= 0); +- } +- +- // Y ranges overlap. Now we examine the X ranges +- if (!xoverlap) { +- // Both x coordinates for the closing segment are left of +- // or right of the rectangle which means that we can only +- // intersect if the curve crosses the left (or right) edge +- // of the rectangle in more than one place and if those +- // crossing locations span the vertical range of the rectangle. +- fillEqn(eqn, (x1tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); +- int num = solveCubic(eqn, res); +- num = evalCubic(res, num, true, true, null, +- y1, ctrly1, ctrly2, y2); +- // odd counts imply the crossing was out of [0,1] bounds +- // otherwise there is no way for that part of the curve to +- // "return" to meet its endpoint +- return (num == 2 && +- getTag(res[0], y, y+h) * getTag(res[1], y, y+h) <= 0); +- } +- +- // The X and Y ranges of the endpoints overlap the X and Y +- // ranges of the rectangle, now find out how the endpoint +- // line segment intersects the Y range of the rectangle +- double dx = x2 - x1; +- double dy = y2 - y1; +- double k = y2 * x1 - x2 * y1; +- int c1tag, c2tag; +- if (y1tag == INSIDE) { +- c1tag = x1tag; +- } else { +- c1tag = getTag((k + dx * (y1tag < INSIDE ? y : y+h)) / dy, x, x+w); +- } +- if (y2tag == INSIDE) { +- c2tag = x2tag; +- } else { +- c2tag = getTag((k + dx * (y2tag < INSIDE ? y : y+h)) / dy, x, x+w); +- } +- // If the part of the line segment that intersects the Y range +- // of the rectangle crosses it horizontally - trivially accept +- if (c1tag * c2tag <= 0) { +- return true; +- } +- +- // Now we know that both the X and Y ranges intersect and that +- // the endpoint line segment does not directly cross the rectangle. +- // +- // We can almost treat this case like one of the cases above +- // where both endpoints are to one side, except that we may +- // get one or three intersections of the curve with the vertical +- // side of the rectangle. This is because the endpoint segment +- // accounts for the other intersection in an even pairing. Thus, +- // with the endpoint crossing we end up with 2 or 4 total crossings. +- // +- // (Remember there is overlap in both the X and Y ranges which +- // means that the segment itself must cross at least one vertical +- // edge of the rectangle - in particular, the "near vertical side" +- // - leaving an odd number of intersections for the curve.) +- // +- // Now we calculate the y tags of all the intersections on the +- // "near vertical side" of the rectangle. We will have one with +- // the endpoint segment, and one or three with the curve. If +- // any pair of those vertical intersections overlap the Y range +- // of the rectangle, we have an intersection. Otherwise, we don't. +- +- // c1tag = vertical intersection class of the endpoint segment +- // +- // Choose the y tag of the endpoint that was not on the same +- // side of the rectangle as the subsegment calculated above. +- // Note that we can "steal" the existing Y tag of that endpoint +- // since it will be provably the same as the vertical intersection. +- c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); +- +- // Now we have to calculate an array of solutions of the curve +- // with the "near vertical side" of the rectangle. Then we +- // need to sort the tags and do a pairwise range test to see +- // if either of the pairs of crossings spans the Y range of +- // the rectangle. +- // +- // Note that the c2tag can still tell us which vertical edge +- // to test against. +- fillEqn(eqn, (c2tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); +- int num = solveCubic(eqn, res); +- num = evalCubic(res, num, true, true, null, y1, ctrly1, ctrly2, y2); +- +- // Now put all of the tags into a bucket and sort them. There +- // is an intersection iff one of the pairs of tags "spans" the +- // Y range of the rectangle. +- int tags[] = new int[num+1]; +- for (int i = 0; i < num; i++) { +- tags[i] = getTag(res[i], y, y+h); +- } +- tags[num] = c1tag; +- Arrays.sort(tags); +- return ((num >= 1 && tags[0] * tags[1] <= 0) || +- (num >= 3 && tags[2] * tags[3] <= 0)); ++ int numCrossings = rectCrossings(x, y, w, h); ++ // the intended return value is ++ // numCrossings != 0 || numCrossings == Curve.RECT_INTERSECTS ++ // but if (numCrossings != 0) numCrossings == INTERSECTS won't matter ++ // and if !(numCrossings != 0) then numCrossings == 0, so ++ // numCrossings != RECT_INTERSECT ++ return numCrossings != 0; + } + + /** diff -r 82d83ff8b150 -r eee57a146340 patches/openjdk/4645692-CubicCurve2D.solveCubic.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/4645692-CubicCurve2D.solveCubic.patch Tue Feb 01 14:21:02 2011 -0500 @@ -0,0 +1,717 @@ +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java ./openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java +--- ./openjdk.old/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-02-01 10:52:21.560149275 -0500 ++++ ./openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-02-01 10:52:37.112148647 -0500 +@@ -31,6 +31,10 @@ + import java.io.Serializable; + import sun.awt.geom.Curve; + ++import static java.lang.Math.abs; ++import static java.lang.Math.max; ++import static java.lang.Math.ulp; ++ + /** + * The CubicCurve2D class defines a cubic parametric curve + * segment in {@code (x,y)} coordinate space. +@@ -1083,95 +1087,286 @@ + * @since 1.3 + */ + public static int solveCubic(double eqn[], double res[]) { +- // From Numerical Recipes, 5.6, Quadratic and Cubic Equations +- double d = eqn[3]; +- if (d == 0.0) { +- // The cubic has degenerated to quadratic (or line or ...). ++ // From Graphics Gems: ++ // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c ++ final double d = eqn[3]; ++ if (d == 0) { + return QuadCurve2D.solveQuadratic(eqn, res); + } +- double a = eqn[2] / d; +- double b = eqn[1] / d; +- double c = eqn[0] / d; +- int roots = 0; +- double Q = (a * a - 3.0 * b) / 9.0; +- double R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0; +- double R2 = R * R; +- double Q3 = Q * Q * Q; +- a = a / 3.0; +- if (R2 < Q3) { +- double theta = Math.acos(R / Math.sqrt(Q3)); +- Q = -2.0 * Math.sqrt(Q); ++ ++ /* normal form: x^3 + Ax^2 + Bx + C = 0 */ ++ final double A = eqn[2] / d; ++ final double B = eqn[1] / d; ++ final double C = eqn[0] / d; ++ ++ ++ // substitute x = y - A/3 to eliminate quadratic term: ++ // x^3 +Px + Q = 0 ++ // ++ // Since we actually need P/3 and Q/2 for all of the ++ // calculations that follow, we will calculate ++ // p = P/3 ++ // q = Q/2 ++ // instead and use those values for simplicity of the code. ++ double sq_A = A * A; ++ double p = 1.0/3 * (-1.0/3 * sq_A + B); ++ double q = 1.0/2 * (2.0/27 * A * sq_A - 1.0/3 * A * B + C); ++ ++ /* use Cardano's formula */ ++ ++ double cb_p = p * p * p; ++ double D = q * q + cb_p; ++ ++ final double sub = 1.0/3 * A; ++ ++ int num; ++ if (D < 0) { /* Casus irreducibilis: three real solutions */ ++ // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method ++ double phi = 1.0/3 * Math.acos(-q / Math.sqrt(-cb_p)); ++ double t = 2 * Math.sqrt(-p); ++ + if (res == eqn) { +- // Copy the eqn so that we don't clobber it with the +- // roots. This is needed so that fixRoots can do its +- // work with the original equation. +- eqn = new double[4]; +- System.arraycopy(res, 0, eqn, 0, 4); ++ eqn = Arrays.copyOf(eqn, 4); + } +- res[roots++] = Q * Math.cos(theta / 3.0) - a; +- res[roots++] = Q * Math.cos((theta + Math.PI * 2.0)/ 3.0) - a; +- res[roots++] = Q * Math.cos((theta - Math.PI * 2.0)/ 3.0) - a; +- fixRoots(res, eqn); +- } else { +- boolean neg = (R < 0.0); +- double S = Math.sqrt(R2 - Q3); +- if (neg) { +- R = -R; ++ ++ res[ 0 ] = ( t * Math.cos(phi)); ++ res[ 1 ] = (-t * Math.cos(phi + Math.PI / 3)); ++ res[ 2 ] = (-t * Math.cos(phi - Math.PI / 3)); ++ num = 3; ++ ++ for (int i = 0; i < num; ++i) { ++ res[ i ] -= sub; + } +- double A = Math.pow(R + S, 1.0 / 3.0); +- if (!neg) { +- A = -A; ++ ++ } else { ++ // Please see the comment in fixRoots marked 'XXX' before changing ++ // any of the code in this case. ++ double sqrt_D = Math.sqrt(D); ++ double u = Math.cbrt(sqrt_D - q); ++ double v = - Math.cbrt(sqrt_D + q); ++ double uv = u+v; ++ ++ num = 1; ++ ++ double err = 1200000000*ulp(abs(uv) + abs(sub)); ++ if (iszero(D, err) || within(u, v, err)) { ++ if (res == eqn) { ++ eqn = Arrays.copyOf(eqn, 4); ++ } ++ res[1] = -(uv / 2) - sub; ++ num = 2; + } +- double B = (A == 0.0) ? 0.0 : (Q / A); +- res[roots++] = (A + B) - a; ++ // this must be done after the potential Arrays.copyOf ++ res[ 0 ] = uv - sub; + } +- return roots; ++ ++ if (num > 1) { // num == 3 || num == 2 ++ num = fixRoots(eqn, res, num); ++ } ++ if (num > 2 && (res[2] == res[1] || res[2] == res[0])) { ++ num--; ++ } ++ if (num > 1 && res[1] == res[0]) { ++ res[1] = res[--num]; // Copies res[2] to res[1] if needed ++ } ++ return num; ++ } ++ ++ // preconditions: eqn != res && eqn[3] != 0 && num > 1 ++ // This method tries to improve the accuracy of the roots of eqn (which ++ // should be in res). It also might eliminate roots in res if it decideds ++ // that they're not real roots. It will not check for roots that the ++ // computation of res might have missed, so this method should only be ++ // used when the roots in res have been computed using an algorithm ++ // that never underestimates the number of roots (such as solveCubic above) ++ private static int fixRoots(double[] eqn, double[] res, int num) { ++ double[] intervals = {eqn[1], 2*eqn[2], 3*eqn[3]}; ++ int critCount = QuadCurve2D.solveQuadratic(intervals, intervals); ++ if (critCount == 2 && intervals[0] == intervals[1]) { ++ critCount--; ++ } ++ if (critCount == 2 && intervals[0] > intervals[1]) { ++ double tmp = intervals[0]; ++ intervals[0] = intervals[1]; ++ intervals[1] = tmp; ++ } ++ ++ // below we use critCount to possibly filter out roots that shouldn't ++ // have been computed. We require that eqn[3] != 0, so eqn is a proper ++ // cubic, which means that its limits at -/+inf are -/+inf or +/-inf. ++ // Therefore, if critCount==2, the curve is shaped like a sideways S, ++ // and it could have 1-3 roots. If critCount==0 it is monotonic, and ++ // if critCount==1 it is monotonic with a single point where it is ++ // flat. In the last 2 cases there can only be 1 root. So in cases ++ // where num > 1 but critCount < 2, we eliminate all roots in res ++ // except one. ++ ++ if (num == 3) { ++ double xe = getRootUpperBound(eqn); ++ double x0 = -xe; ++ ++ Arrays.sort(res, 0, num); ++ if (critCount == 2) { ++ // this just tries to improve the accuracy of the computed ++ // roots using Newton's method. ++ res[0] = refineRootWithHint(eqn, x0, intervals[0], res[0]); ++ res[1] = refineRootWithHint(eqn, intervals[0], intervals[1], res[1]); ++ res[2] = refineRootWithHint(eqn, intervals[1], xe, res[2]); ++ return 3; ++ } else if (critCount == 1) { ++ // we only need fx0 and fxe for the sign of the polynomial ++ // at -inf and +inf respectively, so we don't need to do ++ // fx0 = solveEqn(eqn, 3, x0); fxe = solveEqn(eqn, 3, xe) ++ double fxe = eqn[3]; ++ double fx0 = -fxe; ++ ++ double x1 = intervals[0]; ++ double fx1 = solveEqn(eqn, 3, x1); ++ ++ // if critCount == 1 or critCount == 0, but num == 3 then ++ // something has gone wrong. This branch and the one below ++ // would ideally never execute, but if they do we can't know ++ // which of the computed roots is closest to the real root; ++ // therefore, we can't use refineRootWithHint. But even if ++ // we did know, being here most likely means that the ++ // curve is very flat close to two of the computed roots ++ // (or maybe even all three). This might make Newton's method ++ // fail altogether, which would be a pain to detect and fix. ++ // This is why we use a very stable bisection method. ++ if (oppositeSigns(fx0, fx1)) { ++ res[0] = bisectRootWithHint(eqn, x0, x1, res[0]); ++ } else if (oppositeSigns(fx1, fxe)) { ++ res[0] = bisectRootWithHint(eqn, x1, xe, res[2]); ++ } else /* fx1 must be 0 */ { ++ res[0] = x1; ++ } ++ // return 1 ++ } else if (critCount == 0) { ++ res[0] = bisectRootWithHint(eqn, x0, xe, res[1]); ++ // return 1 ++ } ++ } else if (num == 2 && critCount == 2) { ++ // XXX: here we assume that res[0] has better accuracy than res[1]. ++ // This is true because this method is only used from solveCubic ++ // which puts in res[0] the root that it would compute anyway even ++ // if num==1. If this method is ever used from any other method, or ++ // if the solveCubic implementation changes, this assumption should ++ // be reevaluated, and the choice of goodRoot might have to become ++ // goodRoot = (abs(eqn'(res[0])) > abs(eqn'(res[1]))) ? res[0] : res[1] ++ // where eqn' is the derivative of eqn. ++ double goodRoot = res[0]; ++ double badRoot = res[1]; ++ double x1 = intervals[0]; ++ double x2 = intervals[1]; ++ // If a cubic curve really has 2 roots, one of those roots must be ++ // at a critical point. That can't be goodRoot, so we compute x to ++ // be the farthest critical point from goodRoot. If there are two ++ // roots, x must be the second one, so we evaluate eqn at x, and if ++ // it is zero (or close enough) we put x in res[1] (or badRoot, if ++ // |solveEqn(eqn, 3, badRoot)| < |solveEqn(eqn, 3, x)| but this ++ // shouldn't happen often). ++ double x = abs(x1 - goodRoot) > abs(x2 - goodRoot) ? x1 : x2; ++ double fx = solveEqn(eqn, 3, x); ++ ++ if (iszero(fx, 10000000*ulp(x))) { From ahughes at redhat.com Tue Feb 1 13:07:24 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 21:07:24 +0000 Subject: [icedtea-web-1.0] RFC: Add configure output for jre tree detection Message-ID: <20110201210724.GM17735@rivendell.middle-earth.co.uk> This is just a simple patch to make the configure additions from Deepak's previous jre detection addition print some output. 2010-02-01 Andrew John Hughes * configure.ac: Call IT_CHECK_JRE_PREFIX macro rather than doing so inline. * acinclude.m4 (IT_CHECK_JRE_PREFIX): Additions from configure.ac supplemented with configure output (AC_MSG_CHECKING/AC_MSG_RESULT). Ok for 1.0? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 -------------- next part -------------- diff -r 3bd328e4b515 acinclude.m4 --- a/acinclude.m4 Tue Feb 01 10:53:44 2011 -0500 +++ b/acinclude.m4 Tue Feb 01 21:05:52 2011 +0000 @@ -667,3 +667,16 @@ fi AC_PROVIDE([$0])dnl ]) + +AC_DEFUN_ONCE([IT_CHECK_JRE_PREFIX],[ +# Set JRE prefix based on whether top-level prefix is a JDK dir or a JRE dir +AC_MSG_CHECKING([whether the chosen prefix contains a jre tree]) +if test -d ${prefix}/jre ; then + JRE_DIR_PREFIX="/jre"; + AC_MSG_RESULT([yes]) +else + JRE_DIR_PREFIX=""; + AC_MSG_RESULT([no]) +fi ; +AC_SUBST([JRE_DIR_PREFIX]) +]) diff -r 3bd328e4b515 configure.ac --- a/configure.ac Tue Feb 01 10:53:44 2011 -0500 +++ b/configure.ac Tue Feb 01 21:05:52 2011 +0000 @@ -38,6 +38,7 @@ IT_GET_PKGVERSION IT_OBTAIN_HG_REVISIONS IT_CHECK_XULRUNNER_VERSION +IT_CHECK_JRE_PREFIX AC_CHECK_LIB(z, main,, [AC_MSG_ERROR("zlib not found - try installing zlib-devel")]) dnl Check for libX11 headers and libraries. @@ -78,12 +79,4 @@ IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE -# Set JRE prefix based on whether to-level prefix is a JDK dir or a JRE dir -if test -d ${prefix}/jre ; then - JRE_DIR_PREFIX="/jre" ; -else - JRE_DIR_PREFIX="" ; -fi ; -AC_SUBST([JRE_DIR_PREFIX]) - AC_OUTPUT From dbhole at redhat.com Tue Feb 1 13:09:58 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 1 Feb 2011 16:09:58 -0500 Subject: [icedtea-web-1.0] RFC: Add configure output for jre tree detection In-Reply-To: <20110201210724.GM17735@rivendell.middle-earth.co.uk> References: <20110201210724.GM17735@rivendell.middle-earth.co.uk> Message-ID: <20110201210958.GA25818@redhat.com> * Dr Andrew John Hughes [2011-02-01 16:08]: > This is just a simple patch to make the configure additions from Deepak's > previous jre detection addition print some output. > Looks good to me. Okay for 1.0. Thanks! Deepak > 2010-02-01 Andrew John Hughes > > * configure.ac: Call IT_CHECK_JRE_PREFIX macro > rather than doing so inline. > * acinclude.m4 > (IT_CHECK_JRE_PREFIX): Additions from configure.ac > supplemented with configure output > (AC_MSG_CHECKING/AC_MSG_RESULT). > > Ok for 1.0? > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: 94EFD9D8 (http://subkeys.pgp.net) > Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 > diff -r 3bd328e4b515 acinclude.m4 > --- a/acinclude.m4 Tue Feb 01 10:53:44 2011 -0500 > +++ b/acinclude.m4 Tue Feb 01 21:05:52 2011 +0000 > @@ -667,3 +667,16 @@ > fi > AC_PROVIDE([$0])dnl > ]) > + > +AC_DEFUN_ONCE([IT_CHECK_JRE_PREFIX],[ > +# Set JRE prefix based on whether top-level prefix is a JDK dir or a JRE dir > +AC_MSG_CHECKING([whether the chosen prefix contains a jre tree]) > +if test -d ${prefix}/jre ; then > + JRE_DIR_PREFIX="/jre"; > + AC_MSG_RESULT([yes]) > +else > + JRE_DIR_PREFIX=""; > + AC_MSG_RESULT([no]) > +fi ; > +AC_SUBST([JRE_DIR_PREFIX]) > +]) > diff -r 3bd328e4b515 configure.ac > --- a/configure.ac Tue Feb 01 10:53:44 2011 -0500 > +++ b/configure.ac Tue Feb 01 21:05:52 2011 +0000 > @@ -38,6 +38,7 @@ > IT_GET_PKGVERSION > IT_OBTAIN_HG_REVISIONS > IT_CHECK_XULRUNNER_VERSION > +IT_CHECK_JRE_PREFIX > > AC_CHECK_LIB(z, main,, [AC_MSG_ERROR("zlib not found - try installing zlib-devel")]) > dnl Check for libX11 headers and libraries. > @@ -78,12 +79,4 @@ > IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) > IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE > > -# Set JRE prefix based on whether to-level prefix is a JDK dir or a JRE dir > -if test -d ${prefix}/jre ; then > - JRE_DIR_PREFIX="/jre" ; > -else > - JRE_DIR_PREFIX="" ; > -fi ; > -AC_SUBST([JRE_DIR_PREFIX]) > - > AC_OUTPUT From ahughes at redhat.com Tue Feb 1 13:56:36 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 1 Feb 2011 21:56:36 +0000 Subject: [icedtea-web-1.0] RFC: The Devil's in the DESTDIR Message-ID: <20110201215636.GN17735@rivendell.middle-earth.co.uk> When installing IcedTea-Web under Gentoo, DESTDIR is used to do a staged install in /var during make. The portage system copies it to the main tree later. Trying this with IcedTea-Web revealed a number of issues with DESTDIR that I've resolved in the attached patch, mainly because there was an implicit assumption that ${DESTDIR}${prefix} == ${prefix}. * We need to check if there is a ${prefix}/jre/bin not a ${DESTDIR}${prefix}/jre/bin as this may only contain what was installed by us. * The plugin install needs to go last or the installation of pluginappletviewer (which I believe is unnecessary anyway) will have already created the bin directory, causing mkinstalldirs to fail. * We should only create ${DESTDIR}${prefix}/jre/lib/${INSTALL_ARCH_DIR} if we are installing the plugin. I also tied things up a little to make it clearer. The two binaries are tested and linked at the same time rather than in separate if blocks. 2010-02-01 Andrew John Hughes Fix issues with use of DESTDIR pointing to an empty tree for staging. * Makefile.am: (install-exec-local): Create just bin and jre/lib for the main (NetX) install, creating jre/lib/$(INSTALL_ARCH_DIR) only for the plugin install. Amalgamate the if blocks and test for ${prefix}/jre/bin not ${DESTDIR}${prefix}/jre/bin to ensure we check the installed JDK and not the staging tree. Move plugin installation to the end to avoid mkinstalldirs from failing by trying to create ${DESTDIR}${prefix}/bin a second time. Ok for 1.0? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: 94EFD9D8 (http://subkeys.pgp.net) Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 -------------- next part -------------- diff -r 0db0d2392ef2 Makefile.am --- a/Makefile.am Tue Feb 01 21:20:37 2011 +0000 +++ b/Makefile.am Tue Feb 01 21:51:55 2011 +0000 @@ -102,32 +102,32 @@ clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs install-exec-local: - ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) -if ENABLE_PLUGIN - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar -endif + ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/netx.jar ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(prefix)/bin - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib + ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin + if [ -d $(prefix)/jre/bin ] ; then \ + ${mkinstalldirs} $(DESTDIR)$(prefix)/jre/bin ; \ if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ fi ; \ + if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ + rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ + fi ; \ if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ ln -s ../../bin/javaws $(DESTDIR)$(prefix)/jre/bin ; \ fi ; \ - fi - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib - ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ - fi ; \ if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ ln -s ../../bin/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ fi ; \ fi +if ENABLE_PLUGIN + ${mkinstalldirs} $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar +endif install-data-local: ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 From dbhole at redhat.com Tue Feb 1 14:35:30 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 1 Feb 2011 17:35:30 -0500 Subject: [icedtea-web-1.0] RFC: The Devil's in the DESTDIR In-Reply-To: <20110201215636.GN17735@rivendell.middle-earth.co.uk> References: <20110201215636.GN17735@rivendell.middle-earth.co.uk> Message-ID: <20110201223530.GC25818@redhat.com> * Dr Andrew John Hughes [2011-02-01 16:58]: > When installing IcedTea-Web under Gentoo, DESTDIR is used to do a > staged install in /var during make. The portage system copies it to > the main tree later. > > Trying this with IcedTea-Web revealed a number of issues with DESTDIR > that I've resolved in the attached patch, mainly because there was > an implicit assumption that ${DESTDIR}${prefix} == ${prefix}. > > * We need to check if there is a ${prefix}/jre/bin not a > ${DESTDIR}${prefix}/jre/bin as this may only contain what was installed by us. > * The plugin install needs to go last or the installation of pluginappletviewer > (which I believe is unnecessary anyway) will have already created the bin > directory, causing mkinstalldirs to fail. > * We should only create ${DESTDIR}${prefix}/jre/lib/${INSTALL_ARCH_DIR} if we are installing > the plugin. > > I also tied things up a little to make it clearer. The two binaries are tested and > linked at the same time rather than in separate if blocks. > Nice catch! Patch looks good to me. Okay for 1.0. Thanks, Deepak > 2010-02-01 Andrew John Hughes > > Fix issues with use of DESTDIR pointing > to an empty tree for staging. > * Makefile.am: > (install-exec-local): Create just bin and > jre/lib for the main (NetX) install, creating > jre/lib/$(INSTALL_ARCH_DIR) only for the plugin > install. Amalgamate the if blocks and test for > ${prefix}/jre/bin not ${DESTDIR}${prefix}/jre/bin > to ensure we check the installed JDK and not the > staging tree. Move plugin installation to the end > to avoid mkinstalldirs from failing by trying to > create ${DESTDIR}${prefix}/bin a second time. > > Ok for 1.0? > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: 94EFD9D8 (http://subkeys.pgp.net) > Fingerprint = F8EF F1EA 401E 2E60 15FA 7927 142C 2591 94EF D9D8 > diff -r 0db0d2392ef2 Makefile.am > --- a/Makefile.am Tue Feb 01 21:20:37 2011 +0000 > +++ b/Makefile.am Tue Feb 01 21:51:55 2011 +0000 > @@ -102,32 +102,32 @@ > clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs > > install-exec-local: > - ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) > -if ENABLE_PLUGIN > - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ > - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) > - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar > -endif > + ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib > ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/netx.jar > ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(prefix)/bin > - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ > + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib > + ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin > + if [ -d $(prefix)/jre/bin ] ; then \ > + ${mkinstalldirs} $(DESTDIR)$(prefix)/jre/bin ; \ > if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ > rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ > fi ; \ > + if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ > + rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ > + fi ; \ > if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ > ln -s ../../bin/javaws $(DESTDIR)$(prefix)/jre/bin ; \ > fi ; \ > - fi > - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib > - ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin > - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ > - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ > - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ > - fi ; \ > if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ > ln -s ../../bin/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ > fi ; \ > fi > +if ENABLE_PLUGIN > + ${mkinstalldirs} $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) > + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ > + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) > + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar > +endif > > install-data-local: > ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 From andrew at icedtea.classpath.org Tue Feb 1 15:24:51 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 01 Feb 2011 23:24:51 +0000 Subject: /hg/release/icedtea-web-1.0: 2 new changesets Message-ID: changeset 0db0d2392ef2 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=0db0d2392ef2 author: Andrew John Hughes date: Tue Feb 01 21:20:37 2011 +0000 Make check for /jre tree produce output during configure. 2010-02-01 Andrew John Hughes * configure.ac: Call IT_CHECK_JRE_PREFIX macro rather than doing so inline. * acinclude.m4 (IT_CHECK_JRE_PREFIX): Additions from configure.ac supplemented with configure output (AC_MSG_CHECKING/AC_MSG_RESULT). changeset 8e02f38c3b6a in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=8e02f38c3b6a author: Andrew John Hughes date: Tue Feb 01 23:24:46 2011 +0000 Support DESTDIR correctly when installing to an empty directory. 2010-02-01 Andrew John Hughes Fix issues with use of DESTDIR pointing to an empty tree for staging. * Makefile.am: (install-exec-local): Create just bin and jre/lib for the main (NetX) install, creating jre/lib/$(INSTALL_ARCH_DIR) only for the plugin install. Amalgamate the if blocks and test for ${prefix}/jre/bin not ${DESTDIR}${prefix}/jre/bin to ensure we check the installed JDK and not the staging tree. Move plugin installation to the end to avoid mkinstalldirs from failing by trying to create ${DESTDIR}${prefix}/bin a second time. diffstat: 4 files changed, 52 insertions(+), 22 deletions(-) ChangeLog | 24 ++++++++++++++++++++++++ Makefile.am | 28 ++++++++++++++-------------- acinclude.m4 | 13 +++++++++++++ configure.ac | 9 +-------- diffs (125 lines): diff -r 3bd328e4b515 -r 8e02f38c3b6a ChangeLog --- a/ChangeLog Tue Feb 01 10:53:44 2011 -0500 +++ b/ChangeLog Tue Feb 01 23:24:46 2011 +0000 @@ -1,3 +1,27 @@ 2011-01-24 Deepak Bhole + + Fix issues with use of DESTDIR pointing + to an empty tree for staging. + * Makefile.am: + (install-exec-local): Create just bin and + jre/lib for the main (NetX) install, creating + jre/lib/$(INSTALL_ARCH_DIR) only for the plugin + install. Amalgamate the if blocks and test for + ${prefix}/jre/bin not ${DESTDIR}${prefix}/jre/bin + to ensure we check the installed JDK and not the + staging tree. Move plugin installation to the end + to avoid mkinstalldirs from failing by trying to + create ${DESTDIR}${prefix}/bin a second time. + +2010-02-01 Andrew John Hughes + + * configure.ac: Call IT_CHECK_JRE_PREFIX macro + rather than doing so inline. + * acinclude.m4 + (IT_CHECK_JRE_PREFIX): Additions from configure.ac + supplemented with configure output + (AC_MSG_CHECKING/AC_MSG_RESULT). + 2011-01-24 Deepak Bhole RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass diff -r 3bd328e4b515 -r 8e02f38c3b6a Makefile.am --- a/Makefile.am Tue Feb 01 10:53:44 2011 -0500 +++ b/Makefile.am Tue Feb 01 23:24:46 2011 +0000 @@ -102,32 +102,32 @@ clean-local: clean-netx clean-plugin cle clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs install-exec-local: - ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) -if ENABLE_PLUGIN - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar -endif + ${mkinstalldirs} $(DESTDIR)$(prefix)/bin $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/netx.jar ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(prefix)/bin - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib + ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin + if [ -d $(prefix)/jre/bin ] ; then \ + ${mkinstalldirs} $(DESTDIR)$(prefix)/jre/bin ; \ if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ fi ; \ + if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ + rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ + fi ; \ if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ ln -s ../../bin/javaws $(DESTDIR)$(prefix)/jre/bin ; \ - fi ; \ - fi - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib - ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(prefix)/bin - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ fi ; \ if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ ln -s ../../bin/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ fi ; \ fi +if ENABLE_PLUGIN + ${mkinstalldirs} $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR) + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/$(INSTALL_ARCH_DIR)/ + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar +endif install-data-local: ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 diff -r 3bd328e4b515 -r 8e02f38c3b6a acinclude.m4 --- a/acinclude.m4 Tue Feb 01 10:53:44 2011 -0500 +++ b/acinclude.m4 Tue Feb 01 23:24:46 2011 +0000 @@ -667,3 +667,16 @@ fi fi AC_PROVIDE([$0])dnl ]) + +AC_DEFUN_ONCE([IT_CHECK_JRE_PREFIX],[ +# Set JRE prefix based on whether top-level prefix is a JDK dir or a JRE dir +AC_MSG_CHECKING([whether the chosen prefix contains a jre tree]) +if test -d ${prefix}/jre ; then + JRE_DIR_PREFIX="/jre"; + AC_MSG_RESULT([yes]) +else + JRE_DIR_PREFIX=""; + AC_MSG_RESULT([no]) +fi ; +AC_SUBST([JRE_DIR_PREFIX]) +]) diff -r 3bd328e4b515 -r 8e02f38c3b6a configure.ac --- a/configure.ac Tue Feb 01 10:53:44 2011 -0500 +++ b/configure.ac Tue Feb 01 23:24:46 2011 +0000 @@ -38,6 +38,7 @@ IT_GET_PKGVERSION IT_GET_PKGVERSION IT_OBTAIN_HG_REVISIONS IT_CHECK_XULRUNNER_VERSION +IT_CHECK_JRE_PREFIX AC_CHECK_LIB(z, main,, [AC_MSG_ERROR("zlib not found - try installing zlib-devel")]) dnl Check for libX11 headers and libraries. @@ -78,12 +79,4 @@ IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAG IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE -# Set JRE prefix based on whether to-level prefix is a JDK dir or a JRE dir -if test -d ${prefix}/jre ; then - JRE_DIR_PREFIX="/jre" ; -else - JRE_DIR_PREFIX="" ; -fi ; -AC_SUBST([JRE_DIR_PREFIX]) - AC_OUTPUT From omajid at redhat.com Tue Feb 1 17:00:31 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 01 Feb 2011 20:00:31 -0500 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars Message-ID: <4D48ACAF.6000904@redhat.com> Hi, The attached patch fixes a bug in icedtea-web where clicking on the "more information" button on a security prompt involving nested jars, throws an exception. Ok to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: classloader-nested-jar.patch Type: text/x-patch Size: 1637 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110201/b8db1e33/classloader-nested-jar.patch From dbhole at redhat.com Tue Feb 1 17:08:44 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 1 Feb 2011 20:08:44 -0500 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars In-Reply-To: <4D48ACAF.6000904@redhat.com> References: <4D48ACAF.6000904@redhat.com> Message-ID: <20110202010844.GD25818@redhat.com> * Omair Majid [2011-02-01 20:02]: > Hi, > > The attached patch fixes a bug in icedtea-web where clicking on the > "more information" button on a security prompt involving nested > jars, throws an exception. > > Ok to commit? > Yep, looks good to me. Okay for HEAD, 1.0, icedtea6-1.7, icedtea6-1.8 and icedtea6-1.9 (which are also affected). Thanks, Deepak > Cheers, > Omair > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 19:54:11 2011 -0500 > @@ -693,7 +693,11 @@ > } > > JarSigner signer = new JarSigner(); > - signer.verifyJar(extractedJarLocation); > + List jars = new ArrayList(); > + JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); > + jars.add(jarDesc); > + tracker.addResource(new File(extractedJarLocation).toURL(), null, null); > + signer.verifyJars(jars, tracker); > > if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { > checkTrustWithUser(signer); > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/tools/JarSigner.java > --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 19:54:11 2011 -0500 > @@ -232,7 +232,7 @@ > > } > > - public verifyResult verifyJar(String jarName) throws Exception { > + private verifyResult verifyJar(String jarName) throws Exception { > boolean anySigned = false; > boolean hasUnsignedEntry = false; > JarFile jarFile = null; From omajid at icedtea.classpath.org Tue Feb 1 18:08:03 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 02 Feb 2011 02:08:03 +0000 Subject: /hg/icedtea-web: Verify nested jars just like main jars Message-ID: changeset 2d39fa58036e in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=2d39fa58036e author: Omair Majid date: Tue Feb 01 21:07:03 2011 -0500 Verify nested jars just like main jars Fix an exception that occurs when More Information is clicked in the Certificate warning dialog when dealing with signed nested jars. 2011-02-01 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (activateJars): Add the nested jar to ResourceTracker. Use JarSigner.verifyJars instead of JarSigner.verifyJar. * netx/net/sourceforge/jnlp/tools/JarSigner.java (verifyJar): Make private to indicate nothing should be using this directly. diffstat: 3 files changed, 15 insertions(+), 2 deletions(-) ChangeLog | 9 +++++++++ netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 6 +++++- netx/net/sourceforge/jnlp/tools/JarSigner.java | 2 +- diffs (44 lines): diff -r 97f40ebebbdf -r 2d39fa58036e ChangeLog --- a/ChangeLog Tue Feb 01 10:53:44 2011 -0500 +++ b/ChangeLog Tue Feb 01 21:07:03 2011 -0500 @@ -1,3 +1,12 @@ 2011-01-24 Deepak Bhole + + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (activateJars): Add the nested jar to ResourceTracker. Use + JarSigner.verifyJars instead of JarSigner.verifyJar. + * netx/net/sourceforge/jnlp/tools/JarSigner.java + (verifyJar): Make private to indicate nothing should be using this + directly. + 2011-01-24 Deepak Bhole RH672262, CVE-2011-0025: IcedTea jarfile signature verification bypass diff -r 97f40ebebbdf -r 2d39fa58036e netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 21:07:03 2011 -0500 @@ -693,7 +693,11 @@ public class JNLPClassLoader extends URL } JarSigner signer = new JarSigner(); - signer.verifyJar(extractedJarLocation); + List jars = new ArrayList(); + JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); + jars.add(jarDesc); + tracker.addResource(new File(extractedJarLocation).toURL(), null, null); + signer.verifyJars(jars, tracker); if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { checkTrustWithUser(signer); diff -r 97f40ebebbdf -r 2d39fa58036e netx/net/sourceforge/jnlp/tools/JarSigner.java --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 21:07:03 2011 -0500 @@ -232,7 +232,7 @@ public class JarSigner implements CertVe } - public verifyResult verifyJar(String jarName) throws Exception { + private verifyResult verifyJar(String jarName) throws Exception { boolean anySigned = false; boolean hasUnsignedEntry = false; JarFile jarFile = null; From omajid at icedtea.classpath.org Tue Feb 1 18:11:27 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 02 Feb 2011 02:11:27 +0000 Subject: /hg/release/icedtea-web-1.0: Verify nested jars just like main jars Message-ID: changeset 4b7fe3bb41fa in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=4b7fe3bb41fa author: Omair Majid date: Tue Feb 01 21:11:11 2011 -0500 Verify nested jars just like main jars Fix an exception that occurs when More Information is clicked in the Certificate warning dialog when dealing with signed nested jars. 2011-02-01 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (activateJars): Add the nested jar to ResourceTracker. Use JarSigner.verifyJars instead of JarSigner.verifyJar. * netx/net/sourceforge/jnlp/tools/JarSigner.java (verifyJar): Make private to indicate nothing should be using this directly. diffstat: 3 files changed, 15 insertions(+), 2 deletions(-) ChangeLog | 9 +++++++++ netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 6 +++++- netx/net/sourceforge/jnlp/tools/JarSigner.java | 2 +- diffs (44 lines): diff -r 8e02f38c3b6a -r 4b7fe3bb41fa ChangeLog --- a/ChangeLog Tue Feb 01 23:24:46 2011 +0000 +++ b/ChangeLog Tue Feb 01 21:11:11 2011 -0500 @@ -1,3 +1,12 @@ 2010-02-01 Andrew John Hughes + + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (activateJars): Add the nested jar to ResourceTracker. Use + JarSigner.verifyJars instead of JarSigner.verifyJar. + * netx/net/sourceforge/jnlp/tools/JarSigner.java + (verifyJar): Make private to indicate nothing should be using this + directly. + 2010-02-01 Andrew John Hughes Fix issues with use of DESTDIR pointing diff -r 8e02f38c3b6a -r 4b7fe3bb41fa netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 23:24:46 2011 +0000 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 21:11:11 2011 -0500 @@ -693,7 +693,11 @@ public class JNLPClassLoader extends URL } JarSigner signer = new JarSigner(); - signer.verifyJar(extractedJarLocation); + List jars = new ArrayList(); + JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); + jars.add(jarDesc); + tracker.addResource(new File(extractedJarLocation).toURL(), null, null); + signer.verifyJars(jars, tracker); if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { checkTrustWithUser(signer); diff -r 8e02f38c3b6a -r 4b7fe3bb41fa netx/net/sourceforge/jnlp/tools/JarSigner.java --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 23:24:46 2011 +0000 +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 21:11:11 2011 -0500 @@ -274,7 +274,7 @@ public class JarSigner implements CertVe } - public verifyResult verifyJar(String jarName) throws Exception { + private verifyResult verifyJar(String jarName) throws Exception { boolean anySigned = false; boolean hasUnsignedEntry = false; JarFile jarFile = null; From dbhole at redhat.com Tue Feb 1 18:48:36 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 1 Feb 2011 21:48:36 -0500 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars In-Reply-To: <20110202010844.GD25818@redhat.com> References: <4D48ACAF.6000904@redhat.com> <20110202010844.GD25818@redhat.com> Message-ID: <20110202024836.GA23298@redhat.com> * Deepak Bhole [2011-02-01 20:09]: > * Omair Majid [2011-02-01 20:02]: > > Hi, > > > > The attached patch fixes a bug in icedtea-web where clicking on the > > "more information" button on a security prompt involving nested > > jars, throws an exception. > > > > Ok to commit? > > > > Yep, looks good to me. Okay for HEAD, 1.0, icedtea6-1.7, icedtea6-1.8 > and icedtea6-1.9 (which are also affected). > Just noticed that this commit breaks the build. I didn't notice it the first time with a clean build because it built with the JarSigner from the previous netx.jar in the JDK. A rebuild on top of that fails. A grep in the icedtea-web dir for JarRunner shows nothing is using it. Attached patch removes the file which makes icedtea-web buildable again. Okay for commit? Cheers, Deepak -------------- next part -------------- diff -r 4b7fe3bb41fa ChangeLog --- a/ChangeLog Tue Feb 01 21:11:11 2011 -0500 +++ b/ChangeLog Tue Feb 01 21:44:27 2011 -0500 @@ -1,3 +1,7 @@ +2011-02-01 Deepak Bhole + + * netx/net/sourceforge/jnlp/tools/JarRunner.java: Removed unused file. + 2011-02-01 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java diff -r 4b7fe3bb41fa netx/net/sourceforge/jnlp/tools/JarRunner.java --- a/netx/net/sourceforge/jnlp/tools/JarRunner.java Tue Feb 01 21:11:11 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -package net.sourceforge.jnlp.tools; - -import net.sourceforge.jnlp.tools.JarSigner; - -public class JarRunner { - - public static void main(String[] args) throws Exception { - - //JarSigner.main(args); - JarSigner js = new JarSigner(); - js.verifyJar(args[0]); - } - -} From omajid at redhat.com Tue Feb 1 18:53:47 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 01 Feb 2011 21:53:47 -0500 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars In-Reply-To: <20110202024836.GA23298@redhat.com> References: <4D48ACAF.6000904@redhat.com> <20110202010844.GD25818@redhat.com> <20110202024836.GA23298@redhat.com> Message-ID: <4D48C73B.2000209@redhat.com> On 02/01/2011 09:48 PM, Deepak Bhole wrote: > * Deepak Bhole [2011-02-01 20:09]: >> * Omair Majid [2011-02-01 20:02]: >>> Hi, >>> >>> The attached patch fixes a bug in icedtea-web where clicking on the >>> "more information" button on a security prompt involving nested >>> jars, throws an exception. >>> >>> Ok to commit? >>> >> >> Yep, looks good to me. Okay for HEAD, 1.0, icedtea6-1.7, icedtea6-1.8 >> and icedtea6-1.9 (which are also affected). >> > > Just noticed that this commit breaks the build. I didn't notice it the > first time with a clean build because it built with the JarSigner > from the previous netx.jar in the JDK. A rebuild on top of that fails. > Sorry, my fault. I only tested the patch with icedtea-web HEAD, which (unlike icedtea-web 1.0) does not have JarRunner. > A grep in the icedtea-web dir for JarRunner shows nothing is using it. > Attached patch removes the file which makes icedtea-web buildable again. > > Okay for commit? > As a partial backport of http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-December/011325.html, this looks fine to me. Please go ahead and commit. Cheers, Omair From dbhole at icedtea.classpath.org Tue Feb 1 19:07:37 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Wed, 02 Feb 2011 03:07:37 +0000 Subject: /hg/release/icedtea-web-1.0: 2011-02-01 Deepak Bhole changeset b305521c43c7 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=b305521c43c7 author: Deepak Bhole date: Tue Feb 01 22:07:45 2011 -0500 2011-02-01 Deepak Bhole * netx/net/sourceforge/jnlp/tools/JarRunner.java: Removed unused file. diffstat: 2 files changed, 4 insertions(+), 14 deletions(-) ChangeLog | 4 ++++ netx/net/sourceforge/jnlp/tools/JarRunner.java | 14 -------------- diffs (29 lines): diff -r 4b7fe3bb41fa -r b305521c43c7 ChangeLog --- a/ChangeLog Tue Feb 01 21:11:11 2011 -0500 +++ b/ChangeLog Tue Feb 01 22:07:45 2011 -0500 @@ -1,3 +1,7 @@ 2011-02-01 Omair Majid + + * netx/net/sourceforge/jnlp/tools/JarRunner.java: Removed unused file. + 2011-02-01 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java diff -r 4b7fe3bb41fa -r b305521c43c7 netx/net/sourceforge/jnlp/tools/JarRunner.java --- a/netx/net/sourceforge/jnlp/tools/JarRunner.java Tue Feb 01 21:11:11 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,14 +0,0 @@ -package net.sourceforge.jnlp.tools; - -import net.sourceforge.jnlp.tools.JarSigner; - -public class JarRunner { - - public static void main(String[] args) throws Exception { - - //JarSigner.main(args); - JarSigner js = new JarSigner(); - js.verifyJar(args[0]); - } - -} From ahughes at redhat.com Wed Feb 2 05:46:52 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 2 Feb 2011 13:46:52 +0000 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars In-Reply-To: <20110202010844.GD25818@redhat.com> References: <4D48ACAF.6000904@redhat.com> <20110202010844.GD25818@redhat.com> Message-ID: <20110202134652.GC8290@rivendell.middle-earth.co.uk> On 20:08 Tue 01 Feb , Deepak Bhole wrote: > * Omair Majid [2011-02-01 20:02]: > > Hi, > > > > The attached patch fixes a bug in icedtea-web where clicking on the > > "more information" button on a security prompt involving nested > > jars, throws an exception. > > > > Ok to commit? > > > > Yep, looks good to me. Okay for HEAD, 1.0, icedtea6-1.7, icedtea6-1.8 > and icedtea6-1.9 (which are also affected). > NEWS update please! > Thanks, > Deepak > > > Cheers, > > Omair > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 > > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 19:54:11 2011 -0500 > > @@ -693,7 +693,11 @@ > > } > > > > JarSigner signer = new JarSigner(); > > - signer.verifyJar(extractedJarLocation); > > + List jars = new ArrayList(); > > + JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); > > + jars.add(jarDesc); > > + tracker.addResource(new File(extractedJarLocation).toURL(), null, null); > > + signer.verifyJars(jars, tracker); > > > > if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { > > checkTrustWithUser(signer); > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/tools/JarSigner.java > > --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 > > +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 19:54:11 2011 -0500 > > @@ -232,7 +232,7 @@ > > > > } > > > > - public verifyResult verifyJar(String jarName) throws Exception { > > + private verifyResult verifyJar(String jarName) throws Exception { > > boolean anySigned = false; > > boolean hasUnsignedEntry = false; > > JarFile jarFile = null; > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dbhole at redhat.com Wed Feb 2 07:02:31 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 2 Feb 2011 10:02:31 -0500 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars In-Reply-To: <20110202134652.GC8290@rivendell.middle-earth.co.uk> References: <4D48ACAF.6000904@redhat.com> <20110202010844.GD25818@redhat.com> <20110202134652.GC8290@rivendell.middle-earth.co.uk> Message-ID: <20110202150230.GA1279@redhat.com> * Dr Andrew John Hughes [2011-02-02 08:46]: > On 20:08 Tue 01 Feb , Deepak Bhole wrote: > > * Omair Majid [2011-02-01 20:02]: > > > Hi, > > > > > > The attached patch fixes a bug in icedtea-web where clicking on the > > > "more information" button on a security prompt involving nested > > > jars, throws an exception. > > > > > > Ok to commit? > > > > > > > Yep, looks good to me. Okay for HEAD, 1.0, icedtea6-1.7, icedtea6-1.8 > > and icedtea6-1.9 (which are also affected). > > > > NEWS update please! > Do we do news updates for all bug fixes? This one didn't have an open ticket.. speaking of which, is there a policy (in icedtea6) of opening tickets for minor regressions like this? Cheers, Deepak > > Thanks, > > Deepak > > > > > Cheers, > > > Omair > > > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > > > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 > > > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 19:54:11 2011 -0500 > > > @@ -693,7 +693,11 @@ > > > } > > > > > > JarSigner signer = new JarSigner(); > > > - signer.verifyJar(extractedJarLocation); > > > + List jars = new ArrayList(); > > > + JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); > > > + jars.add(jarDesc); > > > + tracker.addResource(new File(extractedJarLocation).toURL(), null, null); > > > + signer.verifyJars(jars, tracker); > > > > > > if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { > > > checkTrustWithUser(signer); > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/tools/JarSigner.java > > > --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 > > > +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 19:54:11 2011 -0500 > > > @@ -232,7 +232,7 @@ > > > > > > } > > > > > > - public verifyResult verifyJar(String jarName) throws Exception { > > > + private verifyResult verifyJar(String jarName) throws Exception { > > > boolean anySigned = false; > > > boolean hasUnsignedEntry = false; > > > JarFile jarFile = null; > > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dbhole at redhat.com Wed Feb 2 09:04:06 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 2 Feb 2011 12:04:06 -0500 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars In-Reply-To: <20110202134652.GC8290@rivendell.middle-earth.co.uk> References: <4D48ACAF.6000904@redhat.com> <20110202010844.GD25818@redhat.com> <20110202134652.GC8290@rivendell.middle-earth.co.uk> Message-ID: <20110202170405.GA8300@redhat.com> * Dr Andrew John Hughes [2011-02-02 08:46]: > On 20:08 Tue 01 Feb , Deepak Bhole wrote: > > * Omair Majid [2011-02-01 20:02]: > > > Hi, > > > > > > The attached patch fixes a bug in icedtea-web where clicking on the > > > "more information" button on a security prompt involving nested > > > jars, throws an exception. > > > > > > Ok to commit? > > > > > > > Yep, looks good to me. Okay for HEAD, 1.0, icedtea6-1.7, icedtea6-1.8 > > and icedtea6-1.9 (which are also affected). > > > > NEWS update please! > BZ entry created: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=625 Omair, please add it to the news when committing to icedtea6. You may want to combine the patches mentioned in PR625 into a single one and push that for icedtea6... Cheers, Deepak > > Thanks, > > Deepak > > > > > Cheers, > > > Omair > > > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > > > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 > > > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 19:54:11 2011 -0500 > > > @@ -693,7 +693,11 @@ > > > } > > > > > > JarSigner signer = new JarSigner(); > > > - signer.verifyJar(extractedJarLocation); > > > + List jars = new ArrayList(); > > > + JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); > > > + jars.add(jarDesc); > > > + tracker.addResource(new File(extractedJarLocation).toURL(), null, null); > > > + signer.verifyJars(jars, tracker); > > > > > > if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { > > > checkTrustWithUser(signer); > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/tools/JarSigner.java > > > --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 > > > +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 19:54:11 2011 -0500 > > > @@ -232,7 +232,7 @@ > > > > > > } > > > > > > - public verifyResult verifyJar(String jarName) throws Exception { > > > + private verifyResult verifyJar(String jarName) throws Exception { > > > boolean anySigned = false; > > > boolean hasUnsignedEntry = false; > > > JarFile jarFile = null; > > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dbhole at icedtea.classpath.org Wed Feb 2 09:10:24 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Wed, 02 Feb 2011 17:10:24 +0000 Subject: /hg/release/icedtea-web-1.0: Updated NEWS file, added entry for ... Message-ID: changeset ee0be35126c8 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=ee0be35126c8 author: Deepak Bhole date: Wed Feb 02 12:10:36 2011 -0500 Updated NEWS file, added entry for PR625 diffstat: 2 files changed, 5 insertions(+) ChangeLog | 4 ++++ NEWS | 1 + diffs (22 lines): diff -r b305521c43c7 -r ee0be35126c8 ChangeLog --- a/ChangeLog Tue Feb 01 22:07:45 2011 -0500 +++ b/ChangeLog Wed Feb 02 12:10:36 2011 -0500 @@ -1,3 +1,7 @@ 2011-02-01 Deepak Bhole + + * NEWS: Added entry for PR625. + 2011-02-01 Deepak Bhole * netx/net/sourceforge/jnlp/tools/JarRunner.java: Removed unused file. diff -r b305521c43c7 -r ee0be35126c8 NEWS --- a/NEWS Tue Feb 01 22:07:45 2011 -0500 +++ b/NEWS Wed Feb 02 12:10:36 2011 -0500 @@ -33,6 +33,7 @@ New in release 1.0 (2011-XX-XX): - Applications with non-public main classes are now supported. - JNLP files containing as well as will now work - The javaws.desktop file now points explicitly to NetX's javaws binary + - PR625: Regression in NetX when dealing with nested jars * Plugin improvements and fixes - PR542: Plugin fails with NPE on http://www.openprocessing.org/visuals/iframe.php?visualID=2615 - PR552: Support for FreeBSD's pthread implementation From dbhole at icedtea.classpath.org Wed Feb 2 09:12:26 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Wed, 02 Feb 2011 17:12:26 +0000 Subject: /hg/release/icedtea-web-1.0: 2 new changesets Message-ID: changeset 3973cfa67927 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=3973cfa67927 author: Deepak Bhole date: Wed Feb 02 12:12:10 2011 -0500 2011-02-01 Deepak Bhole * NEWS: Update for 1.0 release. * configure.ac: Bump to 1.0. changeset 3ab412a5739b in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=3ab412a5739b author: Deepak Bhole date: Wed Feb 02 12:12:33 2011 -0500 Added tag icedtea-web-1.0 for changeset 3973cfa67927 diffstat: 4 files changed, 8 insertions(+), 2 deletions(-) .hgtags | 1 + ChangeLog | 5 +++++ NEWS | 2 +- configure.ac | 2 +- diffs (39 lines): diff -r ee0be35126c8 -r 3ab412a5739b .hgtags --- a/.hgtags Wed Feb 02 12:10:36 2011 -0500 +++ b/.hgtags Wed Feb 02 12:12:33 2011 -0500 @@ -1,1 +1,2 @@ 692d7e5b31039156aff1600fd7f5034fead2f258 692d7e5b31039156aff1600fd7f5034fead2f258 icedtea-web-1.0-branch +3973cfa679272d5057f2a1527483796964a1de6c icedtea-web-1.0 diff -r ee0be35126c8 -r 3ab412a5739b ChangeLog --- a/ChangeLog Wed Feb 02 12:10:36 2011 -0500 +++ b/ChangeLog Wed Feb 02 12:12:33 2011 -0500 @@ -1,3 +1,8 @@ 2011-02-02 Deepak Bhole + + * NEWS: Update for 1.0 release. + * configure.ac: Bump to 1.0. + 2011-02-02 Deepak Bhole * NEWS: Added entry for PR625. diff -r ee0be35126c8 -r 3ab412a5739b NEWS --- a/NEWS Wed Feb 02 12:10:36 2011 -0500 +++ b/NEWS Wed Feb 02 12:12:33 2011 -0500 @@ -8,7 +8,7 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.0 (2011-XX-XX): +New in release 1.0 (2011-02-02): * Initial release of IcedTea-Web * Security updates diff -r ee0be35126c8 -r 3ab412a5739b configure.ac --- a/configure.ac Wed Feb 02 12:10:36 2011 -0500 +++ b/configure.ac Wed Feb 02 12:12:33 2011 -0500 @@ -1,4 +1,4 @@ AC_INIT([icedtea-web],[1.0pre],[distro-p -AC_INIT([icedtea-web],[1.0pre],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) +AC_INIT([icedtea-web],[1.0],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From ahughes at redhat.com Wed Feb 2 09:26:11 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 2 Feb 2011 17:26:11 +0000 Subject: [icedtea-web] RFC: show more information about certificates when verifying nested jars In-Reply-To: <20110202170405.GA8300@redhat.com> References: <4D48ACAF.6000904@redhat.com> <20110202010844.GD25818@redhat.com> <20110202134652.GC8290@rivendell.middle-earth.co.uk> <20110202170405.GA8300@redhat.com> Message-ID: <20110202172610.GC12251@rivendell.middle-earth.co.uk> On 12:04 Wed 02 Feb , Deepak Bhole wrote: > * Dr Andrew John Hughes [2011-02-02 08:46]: > > On 20:08 Tue 01 Feb , Deepak Bhole wrote: > > > * Omair Majid [2011-02-01 20:02]: > > > > Hi, > > > > > > > > The attached patch fixes a bug in icedtea-web where clicking on the > > > > "more information" button on a security prompt involving nested > > > > jars, throws an exception. > > > > > > > > Ok to commit? > > > > > > > > > > Yep, looks good to me. Okay for HEAD, 1.0, icedtea6-1.7, icedtea6-1.8 > > > and icedtea6-1.9 (which are also affected). > > > > > > > NEWS update please! > > > > BZ entry created: > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=625 > > Omair, please add it to the news when committing to icedtea6. You may > want to combine the patches mentioned in PR625 into a single one and > push that for icedtea6... > Yes, that sounds a sensible move. Make sure to include both ChangeLogs though in the one commit. > Cheers, > Deepak > > > > Thanks, > > > Deepak > > > > > > > Cheers, > > > > Omair > > > > > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > > > > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 10:53:44 2011 -0500 > > > > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 01 19:54:11 2011 -0500 > > > > @@ -693,7 +693,11 @@ > > > > } > > > > > > > > JarSigner signer = new JarSigner(); > > > > - signer.verifyJar(extractedJarLocation); > > > > + List jars = new ArrayList(); > > > > + JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); > > > > + jars.add(jarDesc); > > > > + tracker.addResource(new File(extractedJarLocation).toURL(), null, null); > > > > + signer.verifyJars(jars, tracker); > > > > > > > > if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { > > > > checkTrustWithUser(signer); > > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/tools/JarSigner.java > > > > --- a/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 10:53:44 2011 -0500 > > > > +++ b/netx/net/sourceforge/jnlp/tools/JarSigner.java Tue Feb 01 19:54:11 2011 -0500 > > > > @@ -232,7 +232,7 @@ > > > > > > > > } > > > > > > > > - public verifyResult verifyJar(String jarName) throws Exception { > > > > + private verifyResult verifyJar(String jarName) throws Exception { > > > > boolean anySigned = false; > > > > boolean hasUnsignedEntry = false; > > > > JarFile jarFile = null; > > > > > > > -- > > Andrew :) > > > > Free Java Software Engineer > > Red Hat, Inc. (http://www.redhat.com) > > > > Support Free Java! > > Contribute to GNU Classpath and IcedTea > > http://www.gnu.org/software/classpath > > http://icedtea.classpath.org > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dbhole at redhat.com Wed Feb 2 10:17:59 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 2 Feb 2011 13:17:59 -0500 Subject: Announcing IcedTea-Web 1.0! Message-ID: <20110202181758.GA24767@redhat.com> Hi, We have released the first version of IcedTea-Web 1.0! IcedTea-Web is an addon component to IcedTea. It is open source (GPL + LGPL for some parts) and provides a Java web browser plugin (IcedTea NP Plugin) and Java Web Start implementation (i.e. javaws binary, based on NetX and referred to as such). Additionally, release 1.0 also contains an alpha preview of itweb-settings, a GUI tool to control deployment settings for NetX and the plugin. So what is new in the plugin and NetX in icedtea-web you ask? Well, lots! Improvements: * NetX and plugin configuration can now be specified via a deployment.properties file * System-level as well as user-level deployment.properties files with locked configuration are supported * Applications and applets can now have a Look and Feel different from rest of IcedTea-Web * Native directories are correctly cleaned on exit * Cached files with special characters in file names are now handled correctly * Interfaces javax.jnlp.IntegrationService and javax.jnlp.DownloadService2 are now available * javaws now supports a new -Xclearcache option * Applications with non-public main classes are now supported. * JNLP files containing as well as will now work * JNLP files referenced in the applet tag are now parsed to detect applet properties * Applets are now double-buffered to eliminate flicker in ones that do heavy drawing Bug fixes: * PR592: NetX can create invalid desktop entry files * PR542: Plugin fails with NPE www.openprocessing.org * PR552: Support for FreeBSD?s pthread implementation * PR554: System.err writes content two times * PR556: Applet initialization code is prone to race conditions * PR557: Applet opens in a separate window if tab is closed when the applet loads * PR565: UIDefaults.getUI fails with jgoodies:looks 2.3.1 * PR593: Increment of invalidated iterator in IcedTeaPluginUtils * PR597: Entities are parsed incorrectly in PARAM tag in applet plugin * PR619: Improper finalization by the plugin can crash the browser * RH665104: OpenJDK Firefox Java plugin loses a cookie It can be downloaded here: http://icedtea.classpath.org/download/source/icedtea-web-1.0.tar.gz Build instructions are here: http://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web SHA256 sum: e33413768cdf2ffce66aaff00fed5dd06deb09ed7eb28e522cdad4f29b78e594 icedtea-web-1.0.tar.gz A big thanks to Andrew John Hughes, Omair Majid and Andrew Su for helping make this happen! Cheers, Deepak From ahughes at redhat.com Wed Feb 2 14:46:01 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 2 Feb 2011 22:46:01 +0000 Subject: Announcing IcedTea-Web 1.0! In-Reply-To: <20110202181758.GA24767@redhat.com> References: <20110202181758.GA24767@redhat.com> Message-ID: <20110202224601.GA26812@rivendell.middle-earth.co.uk> On 13:17 Wed 02 Feb , Deepak Bhole wrote: > Hi, > > We have released the first version of IcedTea-Web 1.0! > > IcedTea-Web is an addon component to IcedTea. It is open source (GPL + LGPL for > some parts) and provides a Java web browser plugin (IcedTea NP Plugin) and Java > Web Start implementation (i.e. javaws binary, based on NetX and referred to as > such). Additionally, release 1.0 also contains an alpha preview of > itweb-settings, a GUI tool to control deployment settings for NetX and the > plugin. > > So what is new in the plugin and NetX in icedtea-web you ask? Well, lots! > > Improvements: > > * NetX and plugin configuration can now be specified via a > deployment.properties file * System-level as well as user-level > deployment.properties files with locked configuration are supported > > * Applications and applets can now have a Look and Feel different from rest of > IcedTea-Web * Native directories are correctly cleaned on exit > > * Cached files with special characters in file names are now handled correctly > > * Interfaces javax.jnlp.IntegrationService and javax.jnlp.DownloadService2 are > now available > > * javaws now supports a new -Xclearcache option > > * Applications with non-public main classes are now supported. > > * JNLP files containing as well as will > now work > > * JNLP files referenced in the applet tag are now parsed to detect applet > properties > > * Applets are now double-buffered to eliminate flicker in ones that do heavy > drawing > > Bug fixes: > > * PR592: NetX can create invalid desktop entry files > * PR542: Plugin fails with NPE www.openprocessing.org > * PR552: Support for FreeBSD?s pthread implementation > * PR554: System.err writes content two times > * PR556: Applet initialization code is prone to race conditions > * PR557: Applet opens in a separate window if tab is closed when the applet > loads > * PR565: UIDefaults.getUI fails with jgoodies:looks 2.3.1 > * PR593: Increment of invalidated iterator in IcedTeaPluginUtils > * PR597: Entities are parsed incorrectly in PARAM tag in applet plugin > * PR619: Improper finalization by the plugin can crash the browser > * RH665104: OpenJDK Firefox Java plugin loses a cookie > > It can be downloaded here: > http://icedtea.classpath.org/download/source/icedtea-web-1.0.tar.gz > > Build instructions are here: > http://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web > > SHA256 sum: > e33413768cdf2ffce66aaff00fed5dd06deb09ed7eb28e522cdad4f29b78e594 icedtea-web-1.0.tar.gz > > A big thanks to Andrew John Hughes, Omair Majid and Andrew Su for helping make this happen! > > Cheers, > Deepak Hurrah! -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Wed Feb 2 16:54:41 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 03 Feb 2011 00:54:41 +0000 Subject: [Bug 627] New: SIGSEGV in GCTaskThread Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=627 Summary: SIGSEGV in GCTaskThread Product: IcedTea Version: 6-1.8.4 Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: AddVM AssignedTo: unassigned at icedtea.classpath.org ReportedBy: francis+icedtea at unchartedbackwaters.co.uk JVM segfaults usually within a minute when running the application (class files and sources) here: http://www.doc.ic.ac.uk/~tora/aoo/AntsLecture.jar This has been observed on a Debian testing 64-bit system using the version of OpenJDK packaged in Debian 6b18-1.8.4-1. It has also been observed on a 64-bit Ubuntu lucid system with version 6b18-1.8.1-0ubuntu1. It appears to be GC related as the segfault always appears to occur in GCTaskThread. Supplying -Xincgc to the JVM causes it not to manifest. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 2 17:02:19 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 03 Feb 2011 01:02:19 +0000 Subject: [Bug 627] SIGSEGV in GCTaskThread Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=627 ------- Comment #1 from francis+icedtea at unchartedbackwaters.co.uk 2011-02-03 01:02 ------- Created an attachment (id=458) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=458&action=view) Error report -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 3 10:11:16 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 03 Feb 2011 18:11:16 +0000 Subject: [Bug 595] ExceptionInInitializerError/AccessControlException in AppletAudioClip.play() Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=595 ------- Comment #8 from lgunsch at gmail.com 2011-02-03 18:11 ------- Hi, This bug seems to happen to me as well. You should be able to reproduce it with the java player at the following URL http://pjil.streamonfiber.com/?a=0 Stream log: 2011-01-27 06:39:48 - Java Version: 1.6.0 2011-01-27 06:39:48 - Flash Player Version: 10.1.103 2011-01-27 06:39:51 - Stream running. [Java] 2011-01-27 06:39:52 - Version = 2.91 Instance UID = dpg2zhuxp6o 2011-01-27 06:39:52 - Connection 1 established to: http://pjil.streamon.fm:8000/pjil-44k.ogg?starttime=1296128387&uid=boru6m5xm 2011-01-27 06:39:52 - Connected to server: dc2r1.streamon.fm 2011-01-27 06:39:53 - Volume changed to 0.85. 2011-01-27 06:39:58 - Mixer[0] = Name:\'PulseAudio Mixer\' Vend:\'IcedTea\' Ver:\'0.02\'. 2011-01-27 06:39:58 - Mixer[1] = Name:\'default [default]\' Vend:\'ALSA (http://www.alsa-project.org)\' Ver:\'1.0.23\'. 2011-01-27 06:39:58 - Mixer[2] = Name:\'Intel [plughw:0,0]\' Vend:\'ALSA (http://www.alsa-project.org)\' Ver:\'1.0.23\'. 2011-01-27 06:39:58 - Mixer[3] = Name:\'Intel [plughw:0,1]\' Vend:\'ALSA (http://www.alsa-project.org)\' Ver:\'1.0.23\'. 2011-01-27 06:39:58 - Mixer[4] = Name:\'Intel [plughw:0,2]\' Vend:\'ALSA (http://www.alsa-project.org)\' Ver:\'1.0.23\'. 2011-01-27 06:39:58 - Mixer[5] = Name:\'Port Intel [hw:0]\' Vend:\'ALSA (http://www.alsa-project.org)\' Ver:\'1.0.23\'. 2011-01-27 06:39:58 - Producer player had error: 2011-01-27 06:39:58 - Exception class: java.lang.ExceptionInInitializerError 2011-01-27 06:39:58 - Exception message: null 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openImpl(PulseAudioMixer.java:654) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:588) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.PulseAudioMixer.openLocal(PulseAudioMixer.java:584) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.PulseAudioMixer.open(PulseAudioMixer.java:579) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.PulseAudioDataLine.open(PulseAudioDataLine.java:95) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.PulseAudioSourceDataLine.open(PulseAudioSourceDataLine.java:75) 2011-01-27 06:39:58 - at sof.aB.s(Unknown Source) 2011-01-27 06:39:58 - at sof.aB.a(Unknown Source) 2011-01-27 06:39:58 - at sof.bh.m(Unknown Source) 2011-01-27 06:39:58 - at sof.aB.m(Unknown Source) 2011-01-27 06:39:58 - at sof.av.run(Unknown Source) 2011-01-27 06:39:58 - at sof.r.run(Unknown Source) 2011-01-27 06:39:58 - at sof.ak.run(Unknown Source) 2011-01-27 06:39:58 - Caused by: java.security.AccessControlException: access denied (java.io.FilePermission /usr/lib/jvm/java-6-openjdk/jre/lib/ext/i386/libpulse-java.so read) 2011-01-27 06:39:58 - at java.security.AccessControlContext.checkPermission(AccessControlContext.java:342) 2011-01-27 06:39:58 - at java.security.AccessController.checkPermission(AccessController.java:553) 2011-01-27 06:39:58 - at java.lang.SecurityManager.checkPermission(SecurityManager.java:549) 2011-01-27 06:39:58 - at net.sourceforge.jnlp.runtime.JNLPSecurityManager.checkPermission(JNLPSecurityManager.java:250) 2011-01-27 06:39:58 - at java.lang.SecurityManager.checkRead(SecurityManager.java:888) 2011-01-27 06:39:58 - at java.io.File.exists(File.java:748) 2011-01-27 06:39:58 - at sun.misc.Launcher$ExtClassLoader.findLibrary(Launcher.java:214) 2011-01-27 06:39:58 - at java.lang.ClassLoader.loadLibrary(ClassLoader.java:1652) 2011-01-27 06:39:58 - at java.lang.Runtime.loadLibrary0(Runtime.java:840) 2011-01-27 06:39:58 - at java.lang.System.loadLibrary(System.java:1047) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.SecurityWrapper$1.run(SecurityWrapper.java:18) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.SecurityWrapper$1.run(SecurityWrapper.java:15) 2011-01-27 06:39:58 - at java.security.AccessController.doPrivileged(Native Method) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.SecurityWrapper.loadNativeLibrary(SecurityWrapper.java:24) 2011-01-27 06:39:58 - at org.classpath.icedtea.pulseaudio.EventLoop.(EventLoop.java:105) 2011-01-27 06:39:58 - ... 13 more -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Thu Feb 3 14:59:34 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 03 Feb 2011 22:59:34 +0000 Subject: /hg/icedtea6: PR99, PR616: Don't statically link libstdc++ or li... Message-ID: changeset d4bc091312e0 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d4bc091312e0 author: Andrew John Hughes date: Thu Feb 03 23:55:59 2011 +0100 PR99, PR616: Don't statically link libstdc++ or libgcc. 2011-02-03 Andrew John Hughes PR616, PR99: * Makefile.am: Add new patch. * patches/jtreg-6929067-fix.patch: Link against pthread explicitly now libstdc++ is no longer static. * patches/no-static-linking.patch: Don't statically link libstdc++ or libgcc. * NEWS: Updated. diffstat: 5 files changed, 60 insertions(+), 2 deletions(-) ChangeLog | 12 ++++++++++ Makefile.am | 3 +- NEWS | 1 patches/jtreg-6929067-fix.patch | 2 - patches/no-static-linking.patch | 44 +++++++++++++++++++++++++++++++++++++++ diffs (103 lines): diff -r eee57a146340 -r d4bc091312e0 ChangeLog --- a/ChangeLog Tue Feb 01 14:21:02 2011 -0500 +++ b/ChangeLog Thu Feb 03 23:55:59 2011 +0100 @@ -1,3 +1,15 @@ 2011-02-01 Denis Lila + + PR616, PR99: + * Makefile.am: Add new patch. + * patches/jtreg-6929067-fix.patch: + Link against pthread explicitly now + libstdc++ is no longer static. + * patches/no-static-linking.patch: + Don't statically link libstdc++ or + libgcc. + * NEWS: Updated. + 2011-02-01 Denis Lila * NEWS: Update with the 3 backports diff -r eee57a146340 -r d4bc091312e0 Makefile.am --- a/Makefile.am Tue Feb 01 14:21:02 2011 -0500 +++ b/Makefile.am Thu Feb 03 23:55:59 2011 +0100 @@ -279,7 +279,8 @@ ICEDTEA_PATCHES = \ patches/jtreg-png-reader.patch \ patches/openjdk/4724552-CubicCurve2D.patch \ patches/openjdk/4493128-CubicCurve2D.patch \ - patches/openjdk/4645692-CubicCurve2D.solveCubic.patch + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ + patches/no-static-linking.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r eee57a146340 -r d4bc091312e0 NEWS --- a/NEWS Tue Feb 01 14:21:02 2011 -0500 +++ b/NEWS Thu Feb 03 23:55:59 2011 +0100 @@ -408,6 +408,7 @@ New in release 1.10 (2011-XX-XX): - S4645692: CubicCurve2D.solveCubic does not return all solutions. * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors + - PR616, PR99: Don't statically link libstdc++ or libgcc New in release 1.9.5 (2011-02-01): diff -r eee57a146340 -r d4bc091312e0 patches/jtreg-6929067-fix.patch --- a/patches/jtreg-6929067-fix.patch Tue Feb 01 14:21:02 2011 -0500 +++ b/patches/jtreg-6929067-fix.patch Thu Feb 03 23:55:59 2011 +0100 @@ -45,7 +45,7 @@ +gcc ${COMP_FLAG} -o invoke \ +-L${TESTJAVA}/jre/lib/${ARCH}/client \ +-L${TESTJAVA}/jre/lib/${ARCH}/server \ -+-ljvm -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ++-ljvm -lpthread -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c + ./invoke exit $? diff -r eee57a146340 -r d4bc091312e0 patches/no-static-linking.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/no-static-linking.patch Thu Feb 03 23:55:59 2011 +0100 @@ -0,0 +1,44 @@ +diff -r f7afe7a5e086 make/common/shared/Compiler-gcc.gmk +--- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk Fri Jan 21 16:21:28 2011 -0800 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk Thu Feb 03 11:34:13 2011 +0000 +@@ -61,7 +61,7 @@ + CC = $(COMPILER_PATH)gcc + CPP = $(COMPILER_PATH)gcc -E + # statically link libstdc++ before C++ ABI is stablized on Linux +- STATIC_CXX = true ++ STATIC_CXX = false + ifeq ($(STATIC_CXX),true) + # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" + # We need to use gcc to statically link the C++ runtime. gcc and g++ use +diff -r 9797bcda6c12 make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make Fri Jan 21 16:20:02 2011 -0800 ++++ openjdk/hotspot/make/linux/makefiles/vm.make Thu Feb 03 15:01:10 2011 +0000 +@@ -137,15 +137,7 @@ + vm.def: $(Res_Files) $(Obj_Files) + sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@ + +-ifeq ($(SHARK_BUILD), true) +- STATIC_CXX = false +-else +- ifeq ($(ZERO_LIBARCH), ppc64) +- STATIC_CXX = false +- else +- STATIC_CXX = true +- endif +-endif ++STATIC_CXX = false + + ifeq ($(LINK_INTO),AOUT) + LIBJVM.o = +diff -r 05436b84e93a make/common/shared/Compiler-gcc.gmk +--- openjdk.orig/corba/make/common/shared/Compiler-gcc.gmk Sat Jan 16 01:04:04 2010 +0000 ++++ openjdk/corba/make/common/shared/Compiler-gcc.gmk Thu Feb 03 16:01:37 2011 +0000 +@@ -61,7 +61,7 @@ + CC = $(COMPILER_PATH)gcc + CPP = $(COMPILER_PATH)gcc -E + # statically link libstdc++ before C++ ABI is stablized on Linux +- STATIC_CXX = true ++ STATIC_CXX = false + ifeq ($(STATIC_CXX),true) + # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" + # We need to use gcc to statically link the C++ runtime. gcc and g++ use From omajid at redhat.com Thu Feb 3 23:35:46 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 04 Feb 2011 02:35:46 -0500 Subject: [icedtea-web] RFC: make browser proxy less noisy Message-ID: <4D4BAC52.2000902@redhat.com> Hi, The attached patch makes netx's firefox integration print fewer messages on stdout/err. The messages refer to missing things that were not implemented before, so not informing the user about it isnt a regression. Thoughts? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: less-noisy-browser-proxy.patch Type: text/x-patch Size: 1184 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110204/563e5ec5/less-noisy-browser-proxy.patch From dbhole at redhat.com Thu Feb 3 23:51:11 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Fri, 4 Feb 2011 08:51:11 +0100 Subject: [icedtea-web] RFC: make browser proxy less noisy In-Reply-To: <4D4BAC52.2000902@redhat.com> References: <4D4BAC52.2000902@redhat.com> Message-ID: <20110204075111.GB4044@redhat.com> * Omair Majid [2011-02-04 08:37]: > Hi, > > The attached patch makes netx's firefox integration print fewer > messages on stdout/err. The messages refer to missing things that > were not implemented before, so not informing the user about it isnt > a regression. > > Thoughts? > Most users probably won't know what it means and it might alarm them unnecessarily. It is probably best to keep it silent. Patch looks good to me, okay for HEAD after adding ChangeLog entry. Thanks, Deepak > Cheers, > Omair > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java > --- a/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Tue Feb 01 10:53:44 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Fri Feb 04 02:28:17 2011 -0500 > @@ -120,7 +120,10 @@ > } > > try { > - browserAutoConfigUrl = new URL(prefs.get("network.proxy.autoconfig_url")); > + String url = prefs.get("network.proxy.autoconfig_url"); > + if (url != null) { > + browserAutoConfigUrl = new URL(url); > + } > } catch (MalformedURLException e) { > e.printStackTrace(); > } > @@ -195,7 +198,9 @@ > if (optionDescription == null) { > optionDescription = "Unknown"; > } > - System.err.println(R("RProxyFirefoxOptionNotImplemented", browserProxyType, optionDescription)); > + if (JNLPRuntime.isDebug()) { > + System.err.println(R("RProxyFirefoxOptionNotImplemented", browserProxyType, optionDescription)); > + } > proxies.add(Proxy.NO_PROXY); > } > From ahughes at redhat.com Fri Feb 4 01:12:26 2011 From: ahughes at redhat.com (Andrew John Hughes) Date: Fri, 4 Feb 2011 10:12:26 +0100 Subject: [icedtea-web] RFC: make browser proxy less noisy In-Reply-To: <20110204075111.GB4044@redhat.com> References: <4D4BAC52.2000902@redhat.com> <20110204075111.GB4044@redhat.com> Message-ID: <20110204091226.GD2774@shelob.middle-earth.co.uk> On Fri, Feb 04, 2011 at 08:51:11AM +0100, Deepak Bhole wrote: > * Omair Majid [2011-02-04 08:37]: > > Hi, > > > > The attached patch makes netx's firefox integration print fewer > > messages on stdout/err. The messages refer to missing things that > > were not implemented before, so not informing the user about it isnt > > a regression. > > > > Thoughts? > > > > Most users probably won't know what it means and it might alarm them > unnecessarily. It is probably best to keep it silent. > > Patch looks good to me, okay for HEAD after adding ChangeLog entry. > How is debug mode turned on? Is this an option to NetX? > Thanks, > Deepak > > > Cheers, > > Omair > > > diff -r 97f40ebebbdf netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java > > --- a/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Tue Feb 01 10:53:44 2011 -0500 > > +++ b/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Fri Feb 04 02:28:17 2011 -0500 > > @@ -120,7 +120,10 @@ > > } > > > > try { > > - browserAutoConfigUrl = new URL(prefs.get("network.proxy.autoconfig_url")); > > + String url = prefs.get("network.proxy.autoconfig_url"); > > + if (url != null) { > > + browserAutoConfigUrl = new URL(url); > > + } > > } catch (MalformedURLException e) { > > e.printStackTrace(); > > } > > @@ -195,7 +198,9 @@ > > if (optionDescription == null) { > > optionDescription = "Unknown"; > > } > > - System.err.println(R("RProxyFirefoxOptionNotImplemented", browserProxyType, optionDescription)); > > + if (JNLPRuntime.isDebug()) { > > + System.err.println(R("RProxyFirefoxOptionNotImplemented", browserProxyType, optionDescription)); > > + } > > proxies.add(Proxy.NO_PROXY); > > } > > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Fri Feb 4 01:25:14 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 04 Feb 2011 04:25:14 -0500 Subject: [icedtea-web] RFC: make browser proxy less noisy In-Reply-To: <20110204091226.GD2774@shelob.middle-earth.co.uk> References: <4D4BAC52.2000902@redhat.com> <20110204075111.GB4044@redhat.com> <20110204091226.GD2774@shelob.middle-earth.co.uk> Message-ID: <4D4BC5FA.9030707@redhat.com> On 02/04/2011 04:12 AM, Andrew John Hughes wrote: > On Fri, Feb 04, 2011 at 08:51:11AM +0100, Deepak Bhole wrote: >> * Omair Majid [2011-02-04 08:37]: >>> Hi, >>> >>> The attached patch makes netx's firefox integration print fewer >>> messages on stdout/err. The messages refer to missing things that >>> were not implemented before, so not informing the user about it isnt >>> a regression. >>> >>> Thoughts? >>> >> >> Most users probably won't know what it means and it might alarm them >> unnecessarily. It is probably best to keep it silent. >> >> Patch looks good to me, okay for HEAD after adding ChangeLog entry. >> > > How is debug mode turned on? Is this an option to NetX? > Yup: $ javaws -verbose Turns on debug mode. Cheers, Omair From dlila at redhat.com Fri Feb 4 08:50:39 2011 From: dlila at redhat.com (Denis Lila) Date: Fri, 4 Feb 2011 11:50:39 -0500 (EST) Subject: reviewer needed: rendering performance backport. In-Reply-To: <2113609566.101390.1296837943568.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <116403479.101473.1296838239526.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hello. I would like to "backport" my rendering performance changeset from openjdk7. I say "backport" because it has been approved for pushing but we're still ironing out some regression test issues (which don't affect icedtea because the tests in question are already in icedtea6): http://mail.openjdk.java.net/pipermail/2d-dev/2011-February/001841.html The webrev with all the changes is this: http://icedtea.classpath.org/~dlila/webrevs/perfWebrev/webrev/ Besides, a straightforward backport would be impossible because the openjdk7 changeset depends on another changeset that hasn't been backported yet. ChangeLog: +2011-02-04 Denis Lila + + * NEWS: Updated with the backport + * Makefile.am (ICEDTEA_PATCHES): Added the patch + * patches/openjdk/7016856-renderer-perf.patch: New file. + Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: hg.diff Type: text/x-patch Size: 95925 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110204/7be37092/hg.diff From ahughes at redhat.com Sat Feb 5 01:12:57 2011 From: ahughes at redhat.com (Andrew John Hughes) Date: Sat, 5 Feb 2011 10:12:57 +0100 Subject: reviewer needed: rendering performance backport. In-Reply-To: <116403479.101473.1296838239526.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <2113609566.101390.1296837943568.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <116403479.101473.1296838239526.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110205091257.GA2281@shelob.middle-earth.co.uk> On Fri, Feb 04, 2011 at 11:50:39AM -0500, Denis Lila wrote: > Hello. > > I would like to "backport" my rendering performance changeset from > openjdk7. I say "backport" because it has been approved for pushing > but we're still ironing out some regression test issues (which don't > affect icedtea because the tests in question are already in icedtea6): > http://mail.openjdk.java.net/pipermail/2d-dev/2011-February/001841.html > > The webrev with all the changes is this: > http://icedtea.classpath.org/~dlila/webrevs/perfWebrev/webrev/ > > Besides, a straightforward backport would be impossible because the > openjdk7 changeset depends on another changeset that hasn't been > backported yet. > Hmm, so what was changed from the 7 version? And which changeset does this depend on? Could we not backport that first? > ChangeLog: > +2011-02-04 Denis Lila > + > + * NEWS: Updated with the backport > + * Makefile.am (ICEDTEA_PATCHES): Added the patch > + * patches/openjdk/7016856-renderer-perf.patch: New file. > + > > Thank you, > Denis. > diff -r d4bc091312e0 ChangeLog > --- a/ChangeLog Thu Feb 03 23:55:59 2011 +0100 > +++ b/ChangeLog Fri Feb 04 11:45:09 2011 -0500 > @@ -1,3 +1,9 @@ > +2011-02-04 Denis Lila > + > + * NEWS: Updated with the backport > + * Makefile.am (ICEDTEA_PATCHES): Added the patch > + * patches/openjdk/7016856-renderer-perf.patch: New file. > + > 2011-02-03 Andrew John Hughes > > PR616, PR99: > diff -r d4bc091312e0 Makefile.am > --- a/Makefile.am Thu Feb 03 23:55:59 2011 +0100 > +++ b/Makefile.am Fri Feb 04 11:45:09 2011 -0500 > @@ -280,7 +280,8 @@ > patches/openjdk/4724552-CubicCurve2D.patch \ > patches/openjdk/4493128-CubicCurve2D.patch \ > patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ > - patches/no-static-linking.patch > + patches/no-static-linking.patch \ > + patches/openjdk/7016856-renderer-perf.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r d4bc091312e0 NEWS > --- a/NEWS Thu Feb 03 23:55:59 2011 +0100 > +++ b/NEWS Fri Feb 04 11:45:09 2011 -0500 > @@ -406,6 +406,7 @@ > - S4493128: CubicCurve2D intersects method fails > - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when partially contained. > - S4645692: CubicCurve2D.solveCubic does not return all solutions. > + - S7016856: Renderer performance improvement and dashing performance regression fix. > * Bug fixes > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > - PR616, PR99: Don't statically link libstdc++ or libgcc > diff -r d4bc091312e0 patches/openjdk/7016856-renderer-perf.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/7016856-renderer-perf.patch Fri Feb 04 11:45:09 2011 -0500 > @@ -0,0 +1,2266 @@ > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Curve.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Curve.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Curve.java 2011-02-04 11:09:54.297266131 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Curve.java 2011-02-04 11:12:18.038769405 -0500 > +@@ -1,5 +1,5 @@ > + /* > +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. > ++ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > +@@ -27,7 +27,7 @@ > + > + import java.util.Iterator; > + > +-class Curve { > ++final class Curve { > + > + float ax, ay, bx, by, cx, cy, dx, dy; > + float dax, day, dbx, dby; > +@@ -101,14 +101,6 @@ > + return t * (t * day + dby) + cy; > + } > + > +- private float ddxat(float t) { > +- return 2 * dax * t + dbx; > +- } > +- > +- private float ddyat(float t) { > +- return 2 * day * t + dby; > +- } > +- > + int dxRoots(float[] roots, int off) { > + return Helpers.quadraticRoots(dax, dbx, cx, roots, off); > + } > +@@ -131,17 +123,17 @@ > + // finds points where the first and second derivative are > + // perpendicular. This happens when g(t) = f'(t)*f''(t) == 0 (where > + // * is a dot product). Unfortunately, we have to solve a cubic. > +- private int perpendiculardfddf(float[] pts, int off, final float err) { > ++ private int perpendiculardfddf(float[] pts, int off) { > + assert pts.length >= off + 4; > + > +- // these are the coefficients of g(t): > ++ // these are the coefficients of some multiple of g(t) (not g(t), > ++ // because the roots of a polynomial are not changed after multiplication > ++ // by a constant, and this way we save a few multiplications). > + final float a = 2*(dax*dax + day*day); > + final float b = 3*(dax*dbx + day*dby); > + final float c = 2*(dax*cx + day*cy) + dbx*dbx + dby*dby; > + final float d = dbx*cx + dby*cy; > +- // TODO: We might want to divide the polynomial by a to make the > +- // coefficients smaller. This won't change the roots. > +- return Helpers.cubicRootsInAB(a, b, c, d, pts, off, err, 0f, 1f); > ++ return Helpers.cubicRootsInAB(a, b, c, d, pts, off, 0f, 1f); > + } > + > + // Tries to find the roots of the function ROC(t)-w in [0, 1). It uses > +@@ -161,7 +153,7 @@ > + // no OOB exception, because by now off<=6, and roots.length >= 10 > + assert off <= 6 && roots.length >= 10; > + int ret = off; > +- int numPerpdfddf = perpendiculardfddf(roots, off, err); > ++ int numPerpdfddf = perpendiculardfddf(roots, off); > + float t0 = 0, ft0 = ROCsq(t0) - w*w; > + roots[off + numPerpdfddf] = 1f; // always check interval end points > + numPerpdfddf++; > +@@ -189,8 +181,9 @@ > + // A slight modification of the false position algorithm on wikipedia. > + // This only works for the ROCsq-x functions. It might be nice to have > + // the function as an argument, but that would be awkward in java6. > +- // It is something to consider for java7, depending on how closures > +- // and function objects turn out. Same goes for the newton's method > ++ // TODO: It is something to consider for java8 (or whenever lambda > ++ // expressions make it into the language), depending on how closures > ++ // and turn out. Same goes for the newton's method > + // algorithm in Helpers.java > + private float falsePositionROCsqMinusX(float x0, float x1, > + final float x, final float err) > +@@ -203,7 +196,7 @@ > + for (int i = 0; i < iterLimit && Math.abs(t - s) > err * Math.abs(t + s); i++) { > + r = (fs * t - ft * s) / (fs - ft); > + fr = ROCsq(r) - x; > +- if (fr * ft > 0) {// have the same sign > ++ if (sameSign(fr, ft)) { > + ft = fr; t = r; > + if (side < 0) { > + fs /= (1 << (-side)); > +@@ -226,55 +219,65 @@ > + return r; > + } > + > ++ private static boolean sameSign(double x, double y) { > ++ // another way is to test if x*y > 0. This is bad for small x, y. > ++ return (x < 0 && y < 0) || (x > 0 && y > 0); > ++ } > ++ > + // returns the radius of curvature squared at t of this curve > + // see http://en.wikipedia.org/wiki/Radius_of_curvature_(applications) > + private float ROCsq(final float t) { > +- final float dx = dxat(t); > +- final float dy = dyat(t); > +- final float ddx = ddxat(t); > +- final float ddy = ddyat(t); > ++ // dx=xat(t) and dy=yat(t). These calls have been inlined for efficiency > ++ final float dx = t * (t * dax + dbx) + cx; > ++ final float dy = t * (t * day + dby) + cy; > ++ final float ddx = 2 * dax * t + dbx; > ++ final float ddy = 2 * day * t + dby; > + final float dx2dy2 = dx*dx + dy*dy; > + final float ddx2ddy2 = ddx*ddx + ddy*ddy; > + final float ddxdxddydy = ddx*dx + ddy*dy; > +- float ret = ((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy))*dx2dy2; > +- return ret; > ++ return dx2dy2*((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy)); > + } > + > +- // curve to be broken should be in pts[0] > +- // this will change the contents of both pts and Ts > ++ // curve to be broken should be in pts > ++ // this will change the contents of pts but not Ts > + // TODO: There's no reason for Ts to be an array. All we need is a sequence > + // of t values at which to subdivide. An array statisfies this condition, > + // but is unnecessarily restrictive. Ts should be an Iterator instead. > + // Doing this will also make dashing easier, since we could easily make > + // LengthIterator an Iterator and feed it to this function to simplify > + // the loop in Dasher.somethingTo. > +- static Iterator breakPtsAtTs(final float[][] pts, final int type, > ++ static Iterator breakPtsAtTs(final float[] pts, final int type, > + final float[] Ts, final int numTs) > + { > +- assert pts.length >= 2 && pts[0].length >= 8 && numTs <= Ts.length; > +- return new Iterator() { > +- int nextIdx = 0; > ++ assert pts.length >= 2*type && numTs <= Ts.length; > ++ return new Iterator() { > ++ // these prevent object creation and destruction during autoboxing. > ++ // Because of this, the compiler should be able to completely > ++ // eliminate the boxing costs. > ++ final Integer i0 = 0; > ++ final Integer itype = type; > + int nextCurveIdx = 0; > ++ Integer curCurveOff = i0; > + float prevT = 0; > + > + public boolean hasNext() { > + return nextCurveIdx < numTs + 1; > + } > + > +- public float[] next() { > +- float[] ret; > ++ public Integer next() { > ++ Integer ret; > + if (nextCurveIdx < numTs) { > + float curT = Ts[nextCurveIdx]; > + float splitT = (curT - prevT) / (1 - prevT); > + Helpers.subdivideAt(splitT, > +- pts[nextIdx], 0, > +- pts[nextIdx], 0, > +- pts[1-nextIdx], 0, type); > +- updateTs(Ts, Ts[nextCurveIdx], nextCurveIdx + 1, numTs - nextCurveIdx - 1); > +- ret = pts[nextIdx]; > +- nextIdx = 1 - nextIdx; > ++ pts, curCurveOff, > ++ pts, 0, > ++ pts, type, type); > ++ prevT = curT; > ++ ret = i0; > ++ curCurveOff = itype; > + } else { > +- ret = pts[nextIdx]; > ++ ret = curCurveOff; > + } > + nextCurveIdx++; > + return ret; > +@@ -283,12 +286,5 @@ > + public void remove() {} > + }; > + } > +- > +- // precondition: ts[off]...ts[off+len-1] must all be greater than t. > +- private static void updateTs(float[] ts, final float t, final int off, final int len) { > +- for (int i = off; i < off + len; i++) { > +- ts[i] = (ts[i] - t) / (1 - t); > +- } > +- } > + } > + > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Dasher.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Dasher.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Dasher.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Dasher.java 2011-02-04 11:12:26.902822611 -0500 > +@@ -1,5 +1,5 @@ > + /* > +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. > ++ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > +@@ -38,7 +38,7 @@ > + * semantics are unclear. > + * > + */ > +-public class Dasher implements sun.awt.geom.PathConsumer2D { > ++final class Dasher implements sun.awt.geom.PathConsumer2D { > + > + private final PathConsumer2D out; > + private final float[] dash; > +@@ -169,7 +169,7 @@ > + float dx = x1 - x0; > + float dy = y1 - y0; > + > +- float len = (float) Math.hypot(dx, dy); > ++ float len = (float) Math.sqrt(dx*dx + dy*dy); > + > + if (len == 0) { > + return; > +@@ -226,7 +226,7 @@ > + return; > + } > + if (li == null) { > +- li = new LengthIterator(4, 0.0001f); > ++ li = new LengthIterator(4, 0.01f); > + } > + li.initializeIterationOnCurve(curCurvepts, type); > + > +@@ -237,9 +237,9 @@ > + while ((t = li.next(leftInThisDashSegment)) < 1) { > + if (t != 0) { > + Helpers.subdivideAt((t - lastSplitT) / (1 - lastSplitT), > +- curCurvepts, curCurveoff, > +- curCurvepts, 0, > +- curCurvepts, type, type); > ++ curCurvepts, curCurveoff, > ++ curCurvepts, 0, > ++ curCurvepts, type, type); > + lastSplitT = t; > + goTo(curCurvepts, 2, type); > + curCurveoff = type; > +@@ -307,6 +307,11 @@ > + private int recLevel; > + private boolean done; > + > ++ // the lengths of the lines of the control polygon. Only its first > ++ // curveType/2 - 1 elements are valid. This is an optimization. See > ++ // next(float) for more detail. > ++ private float[] curLeafCtrlPolyLengths = new float[3]; > ++ > + public LengthIterator(int reclimit, float err) { > + this.limit = reclimit; > + this.minTincrement = 1f / (1 << limit); > +@@ -344,11 +349,52 @@ > + this.lastSegLen = 0; > + } > + > ++ // 0 == false, 1 == true, -1 == invalid cached value. > ++ private int cachedHaveLowAcceleration = -1; > ++ > ++ private boolean haveLowAcceleration(float err) { > ++ if (cachedHaveLowAcceleration == -1) { > ++ final float len1 = curLeafCtrlPolyLengths[0]; > ++ final float len2 = curLeafCtrlPolyLengths[1]; > ++ // the test below is equivalent to !within(len1/len2, 1, err). > ++ // It is using a multiplication instead of a division, so it > ++ // should be a bit faster. > ++ if (!Helpers.within(len1, len2, err*len2)) { > ++ cachedHaveLowAcceleration = 0; > ++ return false; > ++ } > ++ if (curveType == 8) { > ++ final float len3 = curLeafCtrlPolyLengths[2]; > ++ // if len1 is close to 2 and 2 is close to 3, that probably > ++ // means 1 is close to 3 so the second part of this test might > ++ // not be needed, but it doesn't hurt to include it. > ++ if (!(Helpers.within(len2, len3, err*len3) && > ++ Helpers.within(len1, len3, err*len3))) { > ++ cachedHaveLowAcceleration = 0; > ++ return false; > ++ } > ++ } > ++ cachedHaveLowAcceleration = 1; > ++ return true; > ++ } > ++ > ++ return (cachedHaveLowAcceleration == 1); > ++ } > ++ > ++ // we want to avoid allocations/gc so we keep this array so we > ++ // can put roots in it, > ++ private float[] nextRoots = new float[4]; > ++ > ++ // caches the coefficients of the current leaf in its flattened > ++ // form (see inside next() for what that means). The cache is > ++ // invalid when it's third element is negative, since in any > ++ // valid flattened curve, this would be >= 0. > ++ private float[] flatLeafCoefCache = new float[] {0, 0, -1, 0}; > + // returns the t value where the remaining curve should be split in > + // order for the left subdivided curve to have length len. If len > + // is >= than the length of the uniterated curve, it returns 1. > +- public float next(float len) { > +- float targetLength = lenAtLastSplit + len; > ++ public float next(final float len) { > ++ final float targetLength = lenAtLastSplit + len; > + while(lenAtNextT < targetLength) { > + if (done) { > + lastSegLen = lenAtNextT - lenAtLastSplit; > +@@ -357,8 +403,46 @@ > + goToNextLeaf(); > + } > + lenAtLastSplit = targetLength; > +- float t = binSearchForLen(lenAtLastSplit - lenAtLastT, > +- recCurveStack[recLevel], curveType, lenAtNextT - lenAtLastT, ERR); > ++ final float leaflen = lenAtNextT - lenAtLastT; > ++ float t = (targetLength - lenAtLastT) / leaflen; > ++ > ++ // cubicRootsInAB is a fairly expensive call, so we just don't do it > ++ // if the acceleration in this section of the curve is small enough. > ++ if (!haveLowAcceleration(0.05f)) { > ++ // We flatten the current leaf along the x axis, so that we're > ++ // left with a, b, c which define a 1D Bezier curve. We then > ++ // solve this to get the parameter of the original leaf that > ++ // gives us the desired length. > ++ > ++ if (flatLeafCoefCache[2] < 0) { > ++ float x = 0+curLeafCtrlPolyLengths[0], > ++ y = x+curLeafCtrlPolyLengths[1]; > ++ if (curveType == 8) { > ++ float z = y + curLeafCtrlPolyLengths[2]; > ++ flatLeafCoefCache[0] = 3*(x - y) + z; > ++ flatLeafCoefCache[1] = 3*(y - 2*x); > ++ flatLeafCoefCache[2] = 3*x; > ++ flatLeafCoefCache[3] = -z; > ++ } else if (curveType == 6) { > ++ flatLeafCoefCache[0] = 0f; > ++ flatLeafCoefCache[1] = y - 2*x; > ++ flatLeafCoefCache[2] = 2*x; > ++ flatLeafCoefCache[3] = -y; > ++ } > ++ } > ++ float a = flatLeafCoefCache[0]; > ++ float b = flatLeafCoefCache[1]; > ++ float c = flatLeafCoefCache[2]; > ++ float d = t*flatLeafCoefCache[3]; > ++ > ++ // we use cubicRootsInAB here, because we want only roots in 0, 1, > ++ // and our quadratic root finder doesn't filter, so it's just a > ++ // matter of convenience. > ++ int n = Helpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0, 1); > ++ if (n == 1 && !Float.isNaN(nextRoots[0])) { > ++ t = nextRoots[0]; > ++ } > ++ } > + // t is relative to the current leaf, so we must make it a valid parameter > + // of the original curve. > + t = t * (nextT - lastT) + lastT; > +@@ -379,36 +463,6 @@ > + return lastSegLen; > + } > + > +- // Returns t such that if leaf is subdivided at t the left > +- // curve will have length len. leafLen must be the length of leaf. > +- private static Curve bsc = new Curve(); > +- private static float binSearchForLen(float len, float[] leaf, int type, > +- float leafLen, float err) > +- { > +- assert len <= leafLen; > +- bsc.set(leaf, type); > +- float errBound = err*len; > +- float left = 0, right = 1; > +- while (left < right) { > +- float m = (left + right) / 2; > +- if (m == left || m == right) { > +- return m; > +- } > +- float x = bsc.xat(m); > +- float y = bsc.yat(m); > +- float leftLen = Helpers.linelen(leaf[0], leaf[1], x, y); > +- if (Math.abs(leftLen - len) < errBound) { > +- return m; > +- } > +- if (leftLen < len) { > +- left = m; > +- } else { > +- right = m; > +- } > +- } > +- return left; > +- } > +- > + // go to the next leaf (in an inorder traversal) in the recursion tree > + // preconditions: must be on a leaf, and that leaf must not be the root. > + private void goToNextLeaf() { > +@@ -437,6 +491,9 @@ > + lenAtLastT = lenAtNextT; > + nextT += (1 << (limit - recLevel)) * minTincrement; > + lenAtNextT += len; > ++ // invalidate caches > ++ flatLeafCoefCache[2] = -1; > ++ cachedHaveLowAcceleration = -1; > + } else { > + Helpers.subdivide(recCurveStack[recLevel], 0, > + recCurveStack[recLevel+1], 0, > +@@ -450,15 +507,27 @@ > + // this is a bit of a hack. It returns -1 if we're not on a leaf, and > + // the length of the leaf if we are on a leaf. > + private float onLeaf() { > +- float polylen = Helpers.polyLineLength(recCurveStack[recLevel], 0, curveType); > +- float linelen = Helpers.linelen(recCurveStack[recLevel][0], recCurveStack[recLevel][1], > +- recCurveStack[recLevel][curveType - 2], recCurveStack[recLevel][curveType - 1]); > +- return (polylen - linelen < ERR || recLevel == limit) ? > +- (polylen + linelen)/2 : -1; > ++ float[] curve = recCurveStack[recLevel]; > ++ float polyLen = 0; > ++ > ++ float x0 = curve[0], y0 = curve[1]; > ++ for (int i = 2; i < curveType; i += 2) { > ++ final float x1 = curve[i], y1 = curve[i+1]; > ++ final float len = Helpers.linelen(x0, y0, x1, y1); > ++ polyLen += len; > ++ curLeafCtrlPolyLengths[i/2 - 1] = len; > ++ x0 = x1; > ++ y0 = y1; > ++ } > ++ > ++ final float lineLen = Helpers.linelen(curve[0], curve[1], curve[curveType-2], curve[curveType-1]); > ++ if (polyLen - lineLen < ERR || recLevel == limit) { > ++ return (polyLen + lineLen)/2; > ++ } > ++ return -1; > + } > + } > + > +- > + public void curveTo(float x1, float y1, > + float x2, float y2, > + float x3, float y3) > +@@ -470,7 +539,6 @@ > + somethingTo(8); > + } > + > +- > + public void quadTo(float x1, float y1, float x2, float y2) { > + curCurvepts[0] = x0; curCurvepts[1] = y0; > + curCurvepts[2] = x1; curCurvepts[3] = y1; > +@@ -497,7 +565,6 @@ > + out.pathDone(); > + } > + > +- > + public long getNativeConsumer() { > + throw new InternalError("Dasher does not use a native consumer"); > + } > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Helpers.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Helpers.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Helpers.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Helpers.java 2011-02-04 11:10:55.052142852 -0500 > +@@ -1,5 +1,5 @@ > + /* > +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. > ++ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > +@@ -26,6 +26,12 @@ > + package sun.java2d.pisces; > + > + import java.util.Arrays; > ++import static java.lang.Math.PI; > ++import static java.lang.Math.cos; > ++import static java.lang.Math.sqrt; > ++import static java.lang.Math.cbrt; > ++import static java.lang.Math.acos; > ++ > + > + final class Helpers { > + private Helpers() { > +@@ -75,100 +81,74 @@ > + return ret - off; > + } > + > +- // find the roots of g(t) = a*t^3 + b*t^2 + c*t + d in [A,B) > +- // We will not use Cardano's method, since it is complicated and > +- // involves too many square and cubic roots. We will use Newton's method. > +- // TODO: this should probably return ALL roots. Then the user can do > +- // his own filtering of roots outside [A,B). > +- static int cubicRootsInAB(final float a, final float b, > +- final float c, final float d, > +- float[] pts, final int off, final float E, > ++ // find the roots of g(t) = d*t^3 + a*t^2 + b*t + c in [A,B) > ++ static int cubicRootsInAB(float d, float a, float b, float c, > ++ float[] pts, final int off, > + final float A, final float B) > + { > +- if (a == 0) { > +- return quadraticRoots(b, c, d, pts, off); > +- } > +- // the coefficients of g'(t). no dc variable because dc=c > +- // we use these to get the critical points of g(t), which > +- // we then use to chose starting points for Newton's method. These > +- // should be very close to the actual roots. > +- final float da = 3 * a; > +- final float db = 2 * b; > +- int numCritPts = quadraticRoots(da, db, c, pts, off+1); > +- numCritPts = filterOutNotInAB(pts, off+1, numCritPts, A, B) - off - 1; > +- // need them sorted. > +- if (numCritPts == 2 && pts[off+1] > pts[off+2]) { > +- float tmp = pts[off+1]; > +- pts[off+1] = pts[off+2]; > +- pts[off+2] = tmp; > +- } > +- > +- int ret = off; > +- > +- // we don't actually care much about the extrema themselves. We > +- // only use them to ensure that g(t) is monotonic in each > +- // interval [pts[i],pts[i+1] (for i in off...off+numCritPts+1). > +- // This will allow us to determine intervals containing exactly > +- // one root. > +- // The end points of the interval are always local extrema. > +- pts[off] = A; > +- pts[off + numCritPts + 1] = B; > +- numCritPts += 2; > +- > +- float x0 = pts[off], fx0 = evalCubic(a, b, c, d, x0); > +- for (int i = off; i < off + numCritPts - 1; i++) { > +- float x1 = pts[i+1], fx1 = evalCubic(a, b, c, d, x1); > +- if (fx0 == 0f) { > +- pts[ret++] = x0; > +- } else if (fx1 * fx0 < 0f) { // have opposite signs > +- pts[ret++] = CubicNewton(a, b, c, d, > +- x0 + fx0 * (x1 - x0) / (fx0 - fx1), E); > ++ if (d == 0) { > ++ int num = quadraticRoots(a, b, c, pts, off); > ++ return filterOutNotInAB(pts, off, num, A, B) - off; > ++ } > ++ // From Graphics Gems: > ++ // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c > ++ // (also from awt.geom.CubicCurve2D. But here we don't need as > ++ // much accuracy and we don't want to create arrays so we use > ++ // our own customized version). > ++ > ++ /* normal form: x^3 + ax^2 + bx + c = 0 */ > ++ a /= d; > ++ b /= d; > ++ c /= d; > ++ > ++ // substitute x = y - A/3 to eliminate quadratic term: > ++ // x^3 +Px + Q = 0 > ++ // > ++ // Since we actually need P/3 and Q/2 for all of the > ++ // calculations that follow, we will calculate > ++ // p = P/3 > ++ // q = Q/2 > ++ // instead and use those values for simplicity of the code. > ++ double sq_A = a * a; > ++ double p = 1.0/3 * (-1.0/3 * sq_A + b); > ++ double q = 1.0/2 * (2.0/27 * a * sq_A - 1.0/3 * a * b + c); > ++ > ++ /* use Cardano's formula */ > ++ > ++ double cb_p = p * p * p; > ++ double D = q * q + cb_p; > ++ > ++ int num; > ++ if (D < 0) { > ++ // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method > ++ final double phi = 1.0/3 * acos(-q / sqrt(-cb_p)); > ++ final double t = 2 * sqrt(-p); > ++ > ++ pts[ off+0 ] = (float)( t * cos(phi)); > ++ pts[ off+1 ] = (float)(-t * cos(phi + PI / 3)); > ++ pts[ off+2 ] = (float)(-t * cos(phi - PI / 3)); > ++ num = 3; > ++ } else { > ++ final double sqrt_D = sqrt(D); > ++ final double u = cbrt(sqrt_D - q); > ++ final double v = - cbrt(sqrt_D + q); > ++ > ++ pts[ off ] = (float)(u + v); > ++ num = 1; > ++ > ++ if (within(D, 0, 1e-8)) { > ++ pts[off+1] = -(pts[off] / 2); > ++ num = 2; > + } > +- x0 = x1; > +- fx0 = fx1; > + } > +- return ret - off; > +- } > + > +- // precondition: the polynomial to be evaluated must not be 0 at x0. > +- static float CubicNewton(final float a, final float b, > +- final float c, final float d, > +- float x0, final float err) > +- { > +- // considering how this function is used, 10 should be more than enough > +- final int itlimit = 10; > +- float fx0 = evalCubic(a, b, c, d, x0); > +- float x1; > +- int count = 0; > +- while(true) { > +- x1 = x0 - (fx0 / evalCubic(0, 3 * a, 2 * b, c, x0)); > +- if (Math.abs(x1 - x0) < err * Math.abs(x1 + x0) || count == itlimit) { > +- break; > +- } > +- x0 = x1; > +- fx0 = evalCubic(a, b, c, d, x0); > +- count++; > +- } > +- return x1; > +- } > ++ final float sub = 1.0f/3 * a; > + > +- // fills the input array with numbers 0, INC, 2*INC, ... > +- static void fillWithIdxes(final float[] data, final int[] idxes) { > +- if (idxes.length > 0) { > +- idxes[0] = 0; > +- for (int i = 1; i < idxes.length; i++) { > +- idxes[i] = idxes[i-1] + (int)data[idxes[i-1]]; > +- } > ++ for (int i = 0; i < num; ++i) { > ++ pts[ off+i ] -= sub; > + } > +- } > + > +- static void fillWithIdxes(final int[] idxes, final int inc) { > +- if (idxes.length > 0) { > +- idxes[0] = 0; > +- for (int i = 1; i < idxes.length; i++) { > +- idxes[i] = idxes[i-1] + inc; > +- } > +- } > ++ return filterOutNotInAB(pts, off, num, A, B) - off; > + } > + > + // These use a hardcoded factor of 2 for increasing sizes. Perhaps this > +@@ -182,6 +162,7 @@ > + } > + return Arrays.copyOf(in, 2 * (cursize + numToAdd)); > + } > ++ > + static int[] widenArray(int[] in, final int cursize, final int numToAdd) { > + if (in.length >= cursize + numToAdd) { > + return in; > +@@ -208,7 +189,7 @@ > + { > + int ret = off; > + for (int i = off; i < off + len; i++) { > +- if (nums[i] > a && nums[i] < b) { > ++ if (nums[i] >= a && nums[i] < b) { > + nums[ret++] = nums[i]; > + } > + } > +@@ -225,7 +206,9 @@ > + } > + > + static float linelen(float x1, float y1, float x2, float y2) { > +- return (float)Math.hypot(x2 - x1, y2 - y1); > ++ final float dx = x2 - x1; > ++ final float dy = y2 - y1; > ++ return (float)Math.sqrt(dx*dx + dy*dy); > + } > + > + static void subdivide(float[] src, int srcoff, float[] left, int leftoff, > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java 2011-02-04 11:12:33.709564632 -0500 > +@@ -32,7 +32,7 @@ > + * > + * @see PiscesRenderer#render > + */ > +-public final class PiscesCache { > ++final class PiscesCache { > + > + final int bboxX0, bboxY0, bboxX1, bboxY1; > + > +@@ -167,7 +167,6 @@ > + rowAARLE[row][1] = end; > + } > + > +- > + public String toString() { > + String ret = "bbox = ["+ > + bboxX0+", "+bboxY0+" => "+ > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java 2011-02-04 11:12:36.101250340 -0500 > +@@ -1,5 +1,5 @@ > + /* > +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. > ++ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > +@@ -27,7 +27,6 @@ > + > + import java.awt.Shape; > + import java.awt.BasicStroke; > +-import java.awt.geom.NoninvertibleTransformException; > + import java.awt.geom.Path2D; > + import java.awt.geom.AffineTransform; > + import java.awt.geom.PathIterator; > +@@ -250,7 +249,7 @@ > + float dashphase, > + PathConsumer2D pc2d) > + { > +- // We use inat and outat so that in Stroker and Dasher we can work only > ++ // We use strokerat and outat so that in Stroker and Dasher we can work only > + // with the pre-transformation coordinates. This will repeat a lot of > + // computations done in the path iterator, but the alternative is to > + // work with transformed paths and compute untransformed coordinates > +@@ -265,7 +264,7 @@ > + // transformation after the path processing has been done. > + // We can't do this if normalization is on, because it isn't a good > + // idea to normalize before the transformation is applied. > +- AffineTransform inat = null; > ++ AffineTransform strokerat = null; > + AffineTransform outat = null; > + > + PathIterator pi = null; > +@@ -284,9 +283,9 @@ > + // again so, nothing can be drawn. > + > + // Every path needs an initial moveTo and a pathDone. If these > +- // aren't there this causes a SIGSEV in libawt.so (at the time > ++ // are not there this causes a SIGSEGV in libawt.so (at the time > + // of writing of this comment (September 16, 2010)). Actually, > +- // I'm not sure if the moveTo is necessary to avoid the SIGSEV > ++ // I am not sure if the moveTo is necessary to avoid the SIGSEGV > + // but the pathDone is definitely needed. > + pc2d.moveTo(0, 0); > + pc2d.pathDone(); > +@@ -313,25 +312,32 @@ > + if (normalize != NormMode.OFF) { > + pi = new NormalizingPathIterator(pi, normalize); > + } > +- // leave inat and outat null. > ++ // by now strokerat == null && outat == null. Input paths to > ++ // stroker (and maybe dasher) will have the full transform at > ++ // applied to them and nothing will happen to the output paths. > + } else { > +- // We only need the inverse if normalization is on. Otherwise > +- // we just don't transform the input paths, do all the stroking > +- // and then transform out output (instead of making PathIterator > +- // apply the transformation, us applying the inverse, and then > +- // us applying the transform again to our output). > +- outat = at; > + if (normalize != NormMode.OFF) { > +- try { > +- inat = outat.createInverse(); > +- } catch (NoninvertibleTransformException e) { > +- // we made sure this can't happen > +- e.printStackTrace(); > +- } > ++ strokerat = at; > + pi = src.getPathIterator(at); > + pi = new NormalizingPathIterator(pi, normalize); > ++ // by now strokerat == at && outat == null. Input paths to > ++ // stroker (and maybe dasher) will have the full transform at > ++ // applied to them, then they will be normalized, and then > ++ // the inverse of *only the non translation part of at* will > ++ // be applied to the normalized paths. This won't cause problems > ++ // in stroker, because, suppose at = T*A, where T is just the > ++ // translation part of at, and A is the rest. T*A has already > ++ // been applied to Stroker/Dasher's input. Then Ainv will be > ++ // applied. Ainv*T*A is not equal to T, but it is a translation, > ++ // which means that none of stroker's assumptions about its > ++ // input will be violated. After all this, A will be applied > ++ // to stroker's output. > + } else { > ++ outat = at; > + pi = src.getPathIterator(null); > ++ // outat == at && strokerat == null. This is because if no > ++ // normalization is done, we can just apply all our > ++ // transformations to stroker's output. > + } > + } > + } else { > +@@ -343,13 +349,17 @@ > + } > + } > + > ++ // by now, at least one of outat and strokerat will be null. Unless at is not > ++ // a constant multiple of an orthogonal transformation, they will both be > ++ // null. In other cases, outat == at if normalization is off, and if > ++ // normalization is on, strokerat == at. > + pc2d = TransformingPathConsumer2D.transformConsumer(pc2d, outat); > ++ pc2d = TransformingPathConsumer2D.deltaTransformConsumer(pc2d, strokerat); > + pc2d = new Stroker(pc2d, width, caps, join, miterlimit); > + if (dashes != null) { > + pc2d = new Dasher(pc2d, dashes, dashphase); > + } > +- pc2d = TransformingPathConsumer2D.transformConsumer(pc2d, inat); > +- > ++ pc2d = TransformingPathConsumer2D.inverseDeltaTransformConsumer(pc2d, strokerat); > + pathTo(pi, pc2d); > + } > + > +@@ -557,6 +567,69 @@ > + return ptg; > + } > + > ++ public AATileGenerator getAATileGenerator(double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2, > ++ Region clip, > ++ int bbox[]) > ++ { > ++ // REMIND: Deal with large coordinates! > ++ double ldx1, ldy1, ldx2, ldy2; > ++ boolean innerpgram = (lw1 > 0 && lw2 > 0); > ++ > ++ if (innerpgram) { > ++ ldx1 = dx1 * lw1; > ++ ldy1 = dy1 * lw1; > ++ ldx2 = dx2 * lw2; > ++ ldy2 = dy2 * lw2; > ++ x -= (ldx1 + ldx2) / 2.0; > ++ y -= (ldy1 + ldy2) / 2.0; > ++ dx1 += ldx1; > ++ dy1 += ldy1; > ++ dx2 += ldx2; > ++ dy2 += ldy2; > ++ if (lw1 > 1 && lw2 > 1) { > ++ // Inner parallelogram was entirely consumed by stroke... > ++ innerpgram = false; > ++ } > ++ } else { > ++ ldx1 = ldy1 = ldx2 = ldy2 = 0; > ++ } > ++ > ++ Renderer r = new Renderer(3, 3, > ++ clip.getLoX(), clip.getLoY(), > ++ clip.getWidth(), clip.getHeight(), > ++ PathIterator.WIND_EVEN_ODD); > ++ > ++ r.moveTo((float) x, (float) y); > ++ r.lineTo((float) (x+dx1), (float) (y+dy1)); > ++ r.lineTo((float) (x+dx1+dx2), (float) (y+dy1+dy2)); > ++ r.lineTo((float) (x+dx2), (float) (y+dy2)); > ++ r.closePath(); > ++ > ++ if (innerpgram) { > ++ x += ldx1 + ldx2; > ++ y += ldy1 + ldy2; > ++ dx1 -= 2.0 * ldx1; > ++ dy1 -= 2.0 * ldy1; > ++ dx2 -= 2.0 * ldx2; > ++ dy2 -= 2.0 * ldy2; > ++ r.moveTo((float) x, (float) y); > ++ r.lineTo((float) (x+dx1), (float) (y+dy1)); > ++ r.lineTo((float) (x+dx1+dx2), (float) (y+dy1+dy2)); > ++ r.lineTo((float) (x+dx2), (float) (y+dy2)); > ++ r.closePath(); > ++ } > ++ > ++ r.pathDone(); > ++ > ++ r.endRendering(); > ++ PiscesTileGenerator ptg = new PiscesTileGenerator(r, r.MAX_AA_ALPHA); > ++ ptg.getBbox(bbox); > ++ return ptg; > ++ } > ++ > + /** > + * Returns the minimum pen width that the antialiasing rasterizer > + * can represent without dropouts occuring. > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java 2011-02-04 11:12:38.242283934 -0500 > +@@ -30,7 +30,7 @@ > + > + import sun.java2d.pipe.AATileGenerator; > + > +-public final class PiscesTileGenerator implements AATileGenerator { > ++final class PiscesTileGenerator implements AATileGenerator { > + public static final int TILE_SIZE = PiscesCache.TILE_SIZE; > + > + // perhaps we should be using weak references here, but right now > +@@ -250,4 +250,4 @@ > + * No further calls will be made on this instance. > + */ > + public void dispose() {} > +-} > +\ No newline at end of file > ++} > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Renderer.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Renderer.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Renderer.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Renderer.java 2011-02-04 11:12:53.420858385 -0500 > +@@ -1,5 +1,5 @@ > + /* > +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. > ++ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > +@@ -25,12 +25,9 @@ > + > + package sun.java2d.pisces; > + > +-import java.util.Arrays; > +-import java.util.Iterator; > +- > + import sun.awt.geom.PathConsumer2D; > + > +-public class Renderer implements PathConsumer2D { > ++final class Renderer implements PathConsumer2D { > + > + private class ScanlineIterator { > + > +@@ -39,115 +36,81 @@ > + // crossing bounds. The bounds are not necessarily tight (the scan line > + // at minY, for example, might have no crossings). The x bounds will > + // be accumulated as crossings are computed. > +- private int minY, maxY; > ++ private final int maxY; > + private int nextY; > + > + // indices into the segment pointer lists. They indicate the "active" > + // sublist in the segment lists (the portion of the list that contains > + // all the segments that cross the next scan line). > +- private int elo, ehi; > +- private final int[] edgePtrs; > +- private int qlo, qhi; > +- private final int[] quadPtrs; > +- private int clo, chi; > +- private final int[] curvePtrs; > ++ private int edgeCount; > ++ private int[] edgePtrs; > + > + private static final int INIT_CROSSINGS_SIZE = 10; > + > + private ScanlineIterator() { > + crossings = new int[INIT_CROSSINGS_SIZE]; > +- > +- edgePtrs = new int[numEdges]; > +- Helpers.fillWithIdxes(edgePtrs, SIZEOF_EDGE); > +- qsort(edges, edgePtrs, YMIN, 0, numEdges - 1); > +- > +- quadPtrs = new int[numQuads]; > +- Helpers.fillWithIdxes(quadPtrs, SIZEOF_QUAD); > +- qsort(quads, quadPtrs, YMIN, 0, numQuads - 1); > +- > +- curvePtrs = new int[numCurves]; > +- Helpers.fillWithIdxes(curvePtrs, SIZEOF_CURVE); > +- qsort(curves, curvePtrs, YMIN, 0, numCurves - 1); > ++ edgePtrs = new int[INIT_CROSSINGS_SIZE]; > + > + // We don't care if we clip some of the line off with ceil, since > + // no scan line crossings will be eliminated (in fact, the ceil is > + // the y of the first scan line crossing). > +- nextY = minY = Math.max(boundsMinY, (int)Math.ceil(edgeMinY)); > +- maxY = Math.min(boundsMaxY, (int)Math.ceil(edgeMaxY)); > +- > +- for (elo = 0; elo < numEdges && edges[edgePtrs[elo]+YMAX] <= minY; elo++) > +- ; > +- // the active list is *edgePtrs[lo] (inclusive) *edgePtrs[hi] (exclusive) > +- for (ehi = elo; ehi < numEdges && edges[edgePtrs[ehi]+YMIN] <= minY; ehi++) > +- edgeSetCurY(edgePtrs[ehi], minY);// TODO: make minY a float to avoid casts > +- > +- for (qlo = 0; qlo < numQuads && quads[quadPtrs[qlo]+YMAX] <= minY; qlo++) > +- ; > +- for (qhi = qlo; qhi < numQuads && quads[quadPtrs[qhi]+YMIN] <= minY; qhi++) > +- quadSetCurY(quadPtrs[qhi], minY); > +- > +- for (clo = 0; clo < numCurves && curves[curvePtrs[clo]+YMAX] <= minY; clo++) > +- ; > +- for (chi = clo; chi < numCurves && curves[curvePtrs[chi]+YMIN] <= minY; chi++) > +- curveSetCurY(curvePtrs[chi], minY); > ++ final int minY = getFirstScanLineCrossing(); > ++ nextY = minY; > ++ maxY = getScanLineCrossingEnd()-1; > ++ edgeCount = 0; > + } > + > + private int next() { > +- // we go through the active lists and remove segments that don't cross > +- // the nextY scanline. > +- int crossingIdx = 0; > +- for (int i = elo; i < ehi; i++) { > +- if (edges[edgePtrs[i]+YMAX] <= nextY) { > +- edgePtrs[i] = edgePtrs[elo++]; > ++ int cury = nextY++; > ++ int bucket = cury - boundsMinY; > ++ int count = this.edgeCount; > ++ int ptrs[] = this.edgePtrs; > ++ int bucketcount = edgeBucketCounts[bucket]; > ++ if ((bucketcount & 0x1) != 0) { > ++ int newCount = 0; > ++ for (int i = 0; i < count; i++) { > ++ int ecur = ptrs[i]; > ++ if (edges[ecur+YMAX] > cury) { > ++ ptrs[newCount++] = ecur; > ++ } > + } > ++ count = newCount; > + } > +- for (int i = qlo; i < qhi; i++) { > +- if (quads[quadPtrs[i]+YMAX] <= nextY) { > +- quadPtrs[i] = quadPtrs[qlo++]; > ++ ptrs = Helpers.widenArray(ptrs, count, bucketcount >> 1); > ++ for (int ecur = edgeBuckets[bucket]; ecur != NULL; ecur = (int)edges[ecur+NEXT]) { > ++ ptrs[count++] = ecur; > ++ // REMIND: Adjust start Y if necessary > ++ } > ++ this.edgePtrs = ptrs; > ++ this.edgeCount = count; > ++// if ((count & 0x1) != 0) { > ++// System.out.println("ODD NUMBER OF EDGES!!!!"); > ++// } > ++ int xings[] = this.crossings; > ++ if (xings.length < count) { > ++ this.crossings = xings = new int[ptrs.length]; > ++ } > ++ for (int i = 0; i < count; i++) { > ++ int ecur = ptrs[i]; > ++ float curx = edges[ecur+CURX]; > ++ int cross = ((int) curx) << 1; > ++ edges[ecur+CURX] = curx + edges[ecur+SLOPE]; > ++ if (edges[ecur+OR] > 0) { > ++ cross |= 1; > + } > +- } > +- for (int i = clo; i < chi; i++) { > +- if (curves[curvePtrs[i]+YMAX] <= nextY) { > +- curvePtrs[i] = curvePtrs[clo++]; > ++ int j = i; > ++ while (--j >= 0) { > ++ int jcross = xings[j]; > ++ if (jcross <= cross) { > ++ break; > ++ } > ++ xings[j+1] = jcross; > ++ ptrs[j+1] = ptrs[j]; > + } > ++ xings[j+1] = cross; > ++ ptrs[j+1] = ecur; > + } > +- > +- crossings = Helpers.widenArray(crossings, 0, ehi-elo+qhi-qlo+chi-clo); > +- > +- // Now every edge between lo and hi crosses nextY. Compute it's > +- // crossing and put it in the crossings array. > +- for (int i = elo; i < ehi; i++) { > +- int ptr = edgePtrs[i]; > +- addCrossing(nextY, (int)edges[ptr+CURX], edges[ptr+OR], crossingIdx); > +- edgeGoToNextY(ptr); > +- crossingIdx++; > +- } > +- for (int i = qlo; i < qhi; i++) { > +- int ptr = quadPtrs[i]; > +- addCrossing(nextY, (int)quads[ptr+CURX], quads[ptr+OR], crossingIdx); > +- quadGoToNextY(ptr); > +- crossingIdx++; > +- } > +- for (int i = clo; i < chi; i++) { > +- int ptr = curvePtrs[i]; > +- addCrossing(nextY, (int)curves[ptr+CURX], curves[ptr+OR], crossingIdx); > +- curveGoToNextY(ptr); > +- crossingIdx++; > +- } > +- > +- nextY++; > +- // Expand active lists to include new edges. > +- for (; ehi < numEdges && edges[edgePtrs[ehi]+YMIN] <= nextY; ehi++) { > +- edgeSetCurY(edgePtrs[ehi], nextY); > +- } > +- for (; qhi < numQuads && quads[quadPtrs[qhi]+YMIN] <= nextY; qhi++) { > +- quadSetCurY(quadPtrs[qhi], nextY); > +- } > +- for (; chi < numCurves && curves[curvePtrs[chi]+YMIN] <= nextY; chi++) { > +- curveSetCurY(curvePtrs[chi], nextY); > +- } > +- Arrays.sort(crossings, 0, crossingIdx); > +- return crossingIdx; > ++ return count; > + } > + > + private boolean hasNext() { > +@@ -157,321 +120,97 @@ > + private int curY() { > + return nextY - 1; > + } > +- > +- private void addCrossing(int y, int x, float or, int idx) { > +- x <<= 1; > +- crossings[idx] = ((or > 0) ? (x | 0x1) : x); > +- } > +- } > +- // quicksort implementation for sorting the edge indices ("pointers") > +- // by increasing y0. first, last are indices into the "pointer" array > +- // It sorts the pointer array from first (inclusive) to last (inclusive) > +- private static void qsort(final float[] data, final int[] ptrs, > +- final int fieldForCmp, int first, int last) > +- { > +- if (last > first) { > +- int p = partition(data, ptrs, fieldForCmp, first, last); > +- if (first < p - 1) { > +- qsort(data, ptrs, fieldForCmp, first, p - 1); > +- } > +- if (p < last) { > +- qsort(data, ptrs, fieldForCmp, p, last); > +- } > +- } > + } > + > +- // i, j are indices into edgePtrs. > +- private static int partition(final float[] data, final int[] ptrs, > +- final int fieldForCmp, int i, int j) > +- { > +- int pivotValFieldForCmp = ptrs[i]+fieldForCmp; > +- while (i <= j) { > +- // edges[edgePtrs[i]+1] is equivalent to (*(edgePtrs[i])).y0 in C > +- while (data[ptrs[i]+fieldForCmp] < data[pivotValFieldForCmp]) > +- i++; > +- while (data[ptrs[j]+fieldForCmp] > data[pivotValFieldForCmp]) > +- j--; > +- if (i <= j) { > +- int tmp = ptrs[i]; > +- ptrs[i] = ptrs[j]; > +- ptrs[j] = tmp; > +- i++; > +- j--; > +- } > +- } > +- return i; > +- } > +-//============================================================================ > +- > + > + ////////////////////////////////////////////////////////////////////////////// > + // EDGE LIST > + ////////////////////////////////////////////////////////////////////////////// > + // TODO(maybe): very tempting to use fixed point here. A lot of opportunities > + // for shifts and just removing certain operations altogether. > +-// TODO: it might be worth it to make an EdgeList class. It would probably > +-// clean things up a bit and not impact performance much. > + > + // common to all types of input path segments. > +- private static final int YMIN = 0; > +- private static final int YMAX = 1; > +- private static final int CURX = 2; > +- // this and OR are meant to be indeces into "int" fields, but arrays must > ++ private static final int YMAX = 0; > ++ private static final int CURX = 1; > ++ // NEXT and OR are meant to be indices into "int" fields, but arrays must > + // be homogenous, so every field is a float. However floats can represent > + // exactly up to 26 bit ints, so we're ok. > +- private static final int CURY = 3; > +- private static final int OR = 4; > +- > +- // for straight lines only: > +- private static final int SLOPE = 5; > +- > +- // for quads and cubics: > +- private static final int X0 = 5; > +- private static final int Y0 = 6; > +- private static final int XL = 7; > +- private static final int COUNT = 8; > +- private static final int CURSLOPE = 9; > +- private static final int DX = 10; > +- private static final int DY = 11; > +- private static final int DDX = 12; > +- private static final int DDY = 13; > +- > +- // for cubics only > +- private static final int DDDX = 14; > +- private static final int DDDY = 15; > ++ private static final int OR = 2; > ++ private static final int SLOPE = 3; > ++ private static final int NEXT = 4; > + > + private float edgeMinY = Float.POSITIVE_INFINITY; > + private float edgeMaxY = Float.NEGATIVE_INFINITY; > + private float edgeMinX = Float.POSITIVE_INFINITY; > + private float edgeMaxX = Float.NEGATIVE_INFINITY; > + > +- private static final int SIZEOF_EDGE = 6; > ++ private static final int SIZEOF_EDGE = 5; > ++ // don't just set NULL to -1, because we want NULL+NEXT to be negative. > ++ private static final int NULL = -SIZEOF_EDGE; > + private float[] edges = null; > ++ private int[] edgeBuckets = null; > ++ private int[] edgeBucketCounts = null; // 2*newedges + (1 if pruning needed) > + private int numEdges; > +- // these are static because we need them to be usable from ScanlineIterator > +- private void edgeSetCurY(final int idx, int y) { > +- edges[idx+CURX] += (y - edges[idx+CURY]) * edges[idx+SLOPE]; > +- edges[idx+CURY] = y; > +- } > +- private void edgeGoToNextY(final int idx) { > +- edges[idx+CURY] += 1; > +- edges[idx+CURX] += edges[idx+SLOPE]; > +- } > +- > +- > +- private static final int SIZEOF_QUAD = 14; > +- private float[] quads = null; > +- private int numQuads; > +- // This function should be called exactly once, to set the first scanline > +- // of the curve. Before it is called, the curve should think its first > +- // scanline is CEIL(YMIN). > +- private void quadSetCurY(final int idx, final int y) { > +- assert y < quads[idx+YMAX]; > +- assert (quads[idx+CURY] > y); > +- assert (quads[idx+CURY] == Math.ceil(quads[idx+CURY])); > +- > +- while (quads[idx+CURY] < ((float)y)) { > +- quadGoToNextY(idx); > +- } > +- } > +- private void quadGoToNextY(final int idx) { > +- quads[idx+CURY] += 1; > +- // this will get overriden if the while executes. > +- quads[idx+CURX] += quads[idx+CURSLOPE]; > +- int count = (int)quads[idx+COUNT]; > +- // this loop should never execute more than once because our > +- // curve is monotonic in Y. Still we put it in because you can > +- // never be too sure when dealing with floating point. > +- while(quads[idx+CURY] >= quads[idx+Y0] && count > 0) { > +- float x0 = quads[idx+X0], y0 = quads[idx+Y0]; > +- count = executeQuadAFDIteration(idx); > +- float x1 = quads[idx+X0], y1 = quads[idx+Y0]; > +- // our quads are monotonic, so this shouldn't happen, but > +- // it is conceivable that for very flat quads with different > +- // y values at their endpoints AFD might give us a horizontal > +- // segment. > +- if (y1 == y0) { > +- continue; > +- } > +- quads[idx+CURSLOPE] = (x1 - x0) / (y1 - y0); > +- quads[idx+CURX] = x0 + (quads[idx+CURY] - y0) * quads[idx+CURSLOPE]; > +- } > +- } > +- > +- > +- private static final int SIZEOF_CURVE = 16; > +- private float[] curves = null; > +- private int numCurves; > +- private void curveSetCurY(final int idx, final int y) { > +- assert y < curves[idx+YMAX]; > +- assert (curves[idx+CURY] > y); > +- assert (curves[idx+CURY] == Math.ceil(curves[idx+CURY])); > +- > +- while (curves[idx+CURY] < ((float)y)) { > +- curveGoToNextY(idx); > +- } > +- } > +- private void curveGoToNextY(final int idx) { > +- curves[idx+CURY] += 1; > +- // this will get overriden if the while executes. > +- curves[idx+CURX] += curves[idx+CURSLOPE]; > +- int count = (int)curves[idx+COUNT]; > +- // this loop should never execute more than once because our > +- // curve is monotonic in Y. Still we put it in because you can > +- // never be too sure when dealing with floating point. > +- while(curves[idx+CURY] >= curves[idx+Y0] && count > 0) { > +- float x0 = curves[idx+X0], y0 = curves[idx+Y0]; > +- count = executeCurveAFDIteration(idx); > +- float x1 = curves[idx+X0], y1 = curves[idx+Y0]; > +- // our curves are monotonic, so this shouldn't happen, but > +- // it is conceivable that for very flat curves with different > +- // y values at their endpoints AFD might give us a horizontal > +- // segment. > +- if (y1 == y0) { > +- continue; > +- } > +- curves[idx+CURSLOPE] = (x1 - x0) / (y1 - y0); > +- curves[idx+CURX] = x0 + (curves[idx+CURY] - y0) * curves[idx+CURSLOPE]; > +- } > +- } > +- > + > + private static final float DEC_BND = 20f; > + private static final float INC_BND = 8f; > ++ > ++ // each bucket is a linked list. this method adds eptr to the > ++ // start "bucket"th linked list. > ++ private void addEdgeToBucket(final int eptr, final int bucket) { > ++ edges[eptr+NEXT] = edgeBuckets[bucket]; > ++ edgeBuckets[bucket] = eptr; > ++ edgeBucketCounts[bucket] += 2; > ++ } > ++ > + // Flattens using adaptive forward differencing. This only carries out > + // one iteration of the AFD loop. All it does is update AFD variables (i.e. > + // X0, Y0, D*[X|Y], COUNT; not variables used for computing scanline crossings). > +- private int executeQuadAFDIteration(int idx) { > +- int count = (int)quads[idx+COUNT]; > +- float ddx = quads[idx+DDX]; > +- float ddy = quads[idx+DDY]; > +- float dx = quads[idx+DX]; > +- float dy = quads[idx+DY]; > +- > +- while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { > +- ddx = ddx / 4; > +- ddy = ddy / 4; > +- dx = (dx - ddx) / 2; > +- dy = (dy - ddy) / 2; > ++ private void quadBreakIntoLinesAndAdd(float x0, float y0, > ++ final Curve c, > ++ final float x2, final float y2) { > ++ final float QUAD_DEC_BND = 32; > ++ final int countlg = 4; > ++ int count = 1 << countlg; > ++ int countsq = count * count; > ++ float maxDD = Math.max(c.dbx / countsq, c.dby / countsq); > ++ while (maxDD > QUAD_DEC_BND) { > ++ maxDD /= 4; > + count <<= 1; > + } > +- // can only do this on even "count" values, because we must divide count by 2 > +- while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { > +- dx = 2 * dx + ddx; > +- dy = 2 * dy + ddy; > +- ddx = 4 * ddx; > +- ddy = 4 * ddy; > +- count >>= 1; > +- } > +- count--; > +- if (count > 0) { > +- quads[idx+X0] += dx; > +- dx += ddx; > +- quads[idx+Y0] += dy; > +- dy += ddy; > +- } else { > +- quads[idx+X0] = quads[idx+XL]; > +- quads[idx+Y0] = quads[idx+YMAX]; > +- } > +- quads[idx+COUNT] = count; > +- quads[idx+DDX] = ddx; > +- quads[idx+DDY] = ddy; > +- quads[idx+DX] = dx; > +- quads[idx+DY] = dy; > +- return count; > +- } > +- private int executeCurveAFDIteration(int idx) { > +- int count = (int)curves[idx+COUNT]; > +- float ddx = curves[idx+DDX]; > +- float ddy = curves[idx+DDY]; > +- float dx = curves[idx+DX]; > +- float dy = curves[idx+DY]; > +- float dddx = curves[idx+DDDX]; > +- float dddy = curves[idx+DDDY]; > +- > +- while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { > +- dddx /= 8; > +- dddy /= 8; > +- ddx = ddx/4 - dddx; > +- ddy = ddy/4 - dddy; > +- dx = (dx - ddx) / 2; > +- dy = (dy - ddy) / 2; > +- count <<= 1; > +- } > +- // can only do this on even "count" values, because we must divide count by 2 > +- while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { > +- dx = 2 * dx + ddx; > +- dy = 2 * dy + ddy; > +- ddx = 4 * (ddx + dddx); > +- ddy = 4 * (ddy + dddy); > +- dddx = 8 * dddx; > +- dddy = 8 * dddy; > +- count >>= 1; > +- } > +- count--; > +- if (count > 0) { > +- curves[idx+X0] += dx; > +- dx += ddx; > +- ddx += dddx; > +- curves[idx+Y0] += dy; > +- dy += ddy; > +- ddy += dddy; > +- } else { > +- curves[idx+X0] = curves[idx+XL]; > +- curves[idx+Y0] = curves[idx+YMAX]; > +- } > +- curves[idx+COUNT] = count; > +- curves[idx+DDDX] = dddx; > +- curves[idx+DDDY] = dddy; > +- curves[idx+DDX] = ddx; > +- curves[idx+DDY] = ddy; > +- curves[idx+DX] = dx; > +- curves[idx+DY] = dy; > +- return count; > +- } > +- > + > +- private void initLine(final int idx, float[] pts, int or) { > +- edges[idx+SLOPE] = (pts[2] - pts[0]) / (pts[3] - pts[1]); > +- edges[idx+CURX] = pts[0] + (edges[idx+CURY] - pts[1]) * edges[idx+SLOPE]; > +- } > +- > +- private void initQuad(final int idx, float[] points, int or) { > +- final int countlg = 3; > +- final int count = 1 << countlg; > ++ countsq = count * count; > ++ final float ddx = c.dbx / countsq; > ++ final float ddy = c.dby / countsq; > ++ float dx = c.bx / countsq + c.cx / count; > ++ float dy = c.by / countsq + c.cy / count; > + > +- // the dx and dy refer to forward differencing variables, not the last > +- // coefficients of the "points" polynomial > +- final float ddx, ddy, dx, dy; > +- c.set(points, 6); > +- > +- ddx = c.dbx / (1 << (2 * countlg)); > +- ddy = c.dby / (1 << (2 * countlg)); > +- dx = c.bx / (1 << (2 * countlg)) + c.cx / (1 << countlg); > +- dy = c.by / (1 << (2 * countlg)) + c.cy / (1 << countlg); > +- > +- quads[idx+DDX] = ddx; > +- quads[idx+DDY] = ddy; > +- quads[idx+DX] = dx; > +- quads[idx+DY] = dy; > +- quads[idx+COUNT] = count; > +- quads[idx+XL] = points[4]; > +- quads[idx+X0] = points[0]; > +- quads[idx+Y0] = points[1]; > +- executeQuadAFDIteration(idx); > +- float x1 = quads[idx+X0], y1 = quads[idx+Y0]; > +- quads[idx+CURSLOPE] = (x1 - points[0]) / (y1 - points[1]); > +- quads[idx+CURX] = points[0] + (quads[idx+CURY] - points[1])*quads[idx+CURSLOPE]; > ++ while (count-- > 1) { > ++ float x1 = x0 + dx; > ++ dx += ddx; > ++ float y1 = y0 + dy; > ++ dy += ddy; > ++ addLine(x0, y0, x1, y1); > ++ x0 = x1; > ++ y0 = y1; > ++ } > ++ addLine(x0, y0, x2, y2); > + } > + > +- private void initCurve(final int idx, float[] points, int or) { > ++ // x0, y0 and x3,y3 are the endpoints of the curve. We could compute these > ++ // using c.xat(0),c.yat(0) and c.xat(1),c.yat(1), but this might introduce > ++ // numerical errors, and our callers already have the exact values. > ++ // Another alternative would be to pass all the control points, and call c.set > ++ // here, but then too many numbers are passed around. > ++ private void curveBreakIntoLinesAndAdd(float x0, float y0, > ++ final Curve c, > ++ final float x3, final float y3) { > + final int countlg = 3; > +- final int count = 1 << countlg; > ++ int count = 1 << countlg; > + > + // the dx and dy refer to forward differencing variables, not the last > + // coefficients of the "points" polynomial > +- final float dddx, dddy, ddx, ddy, dx, dy; > +- c.set(points, 8); > ++ float dddx, dddy, ddx, ddy, dx, dy; > + dddx = 2f * c.dax / (1 << (3 * countlg)); > + dddy = 2f * c.day / (1 << (3 * countlg)); > + > +@@ -480,93 +219,100 @@ > + dx = c.ax / (1 << (3 * countlg)) + c.bx / (1 << (2 * countlg)) + c.cx / (1 << countlg); > + dy = c.ay / (1 << (3 * countlg)) + c.by / (1 << (2 * countlg)) + c.cy / (1 << countlg); > + > +- curves[idx+DDDX] = dddx; > +- curves[idx+DDDY] = dddy; > +- curves[idx+DDX] = ddx; > +- curves[idx+DDY] = ddy; > +- curves[idx+DX] = dx; > +- curves[idx+DY] = dy; > +- curves[idx+COUNT] = count; > +- curves[idx+XL] = points[6]; > +- curves[idx+X0] = points[0]; > +- curves[idx+Y0] = points[1]; > +- executeCurveAFDIteration(idx); > +- float x1 = curves[idx+X0], y1 = curves[idx+Y0]; > +- curves[idx+CURSLOPE] = (x1 - points[0]) / (y1 - points[1]); > +- curves[idx+CURX] = points[0] + (curves[idx+CURY] - points[1])*curves[idx+CURSLOPE]; > +- } > +- > +- private void addPathSegment(float[] pts, final int type, final int or) { > +- int idx; > +- float[] addTo; > +- switch (type) { > +- case 4: > +- idx = numEdges * SIZEOF_EDGE; > +- addTo = edges = Helpers.widenArray(edges, numEdges*SIZEOF_EDGE, SIZEOF_EDGE); > +- numEdges++; > +- break; > +- case 6: > +- idx = numQuads * SIZEOF_QUAD; > +- addTo = quads = Helpers.widenArray(quads, numQuads*SIZEOF_QUAD, SIZEOF_QUAD); > +- numQuads++; > +- break; > +- case 8: > +- idx = numCurves * SIZEOF_CURVE; > +- addTo = curves = Helpers.widenArray(curves, numCurves*SIZEOF_CURVE, SIZEOF_CURVE); > +- numCurves++; > +- break; > +- default: > +- throw new InternalError(); > +- } > +- // set the common fields, except CURX, for which we must know the kind > +- // of curve. NOTE: this must be done before the type specific fields > +- // are initialized, because those depend on the common ones. > +- addTo[idx+YMIN] = pts[1]; > +- addTo[idx+YMAX] = pts[type-1]; > +- addTo[idx+OR] = or; > +- addTo[idx+CURY] = (float)Math.ceil(pts[1]); > +- switch (type) { > +- case 4: > +- initLine(idx, pts, or); > +- break; > +- case 6: > +- initQuad(idx, pts, or); > +- break; > +- case 8: > +- initCurve(idx, pts, or); > +- break; > +- default: > +- throw new InternalError(); > +- } > +- } > +- > +- // precondition: the curve in pts must be monotonic and increasing in y. > +- private void somethingTo(float[] pts, final int type, final int or) { > +- // NOTE: it's very important that we check for or >= 0 below (as > +- // opposed to or == 1, or or > 0, or anything else). That's > +- // because if we check for or==1, when the curve being added > +- // is a horizontal line, or will be 0 so or==1 will be false and > +- // x0 and y0 will be updated to pts[0] and pts[1] instead of pts[type-2] > +- // and pts[type-1], which is the correct thing to do. > +- this.x0 = or >= 0 ? pts[type - 2] : pts[0]; > +- this.y0 = or >= 0 ? pts[type - 1] : pts[1]; > +- > +- float minY = pts[1], maxY = pts[type - 1]; > +- if (Math.ceil(minY) >= Math.ceil(maxY) || > +- Math.ceil(minY) >= boundsMaxY || maxY < boundsMinY) > +- { > ++ // we use x0, y0 to walk the line > ++ float x1 = x0, y1 = y0; > ++ while (count > 0) { > ++ while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { > ++ dddx /= 8; > ++ dddy /= 8; > ++ ddx = ddx/4 - dddx; > ++ ddy = ddy/4 - dddy; > ++ dx = (dx - ddx) / 2; > ++ dy = (dy - ddy) / 2; > ++ count <<= 1; > ++ } > ++ // can only do this on even "count" values, because we must divide count by 2 > ++ while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { > ++ dx = 2 * dx + ddx; > ++ dy = 2 * dy + ddy; > ++ ddx = 4 * (ddx + dddx); > ++ ddy = 4 * (ddy + dddy); > ++ dddx = 8 * dddx; > ++ dddy = 8 * dddy; > ++ count >>= 1; > ++ } > ++ count--; > ++ if (count > 0) { > ++ x1 += dx; > ++ dx += ddx; > ++ ddx += dddx; > ++ y1 += dy; > ++ dy += ddy; > ++ ddy += dddy; > ++ } else { > ++ x1 = x3; > ++ y1 = y3; > ++ } > ++ addLine(x0, y0, x1, y1); > ++ x0 = x1; > ++ y0 = y1; > ++ } > ++ } > ++ > ++ // Preconditions: y2 > y1 and the curve must cross some scanline > ++ // i.e.: y1 <= y < y2 for some y such that boundsMinY <= y < boundsMaxY > ++ private void addLine(float x1, float y1, float x2, float y2) { > ++ float or = 1; // orientation of the line. 1 if y increases, 0 otherwise. > ++ if (y2 < y1) { > ++ or = y2; // no need to declare a temp variable. We have or. > ++ y2 = y1; > ++ y1 = or; > ++ or = x2; > ++ x2 = x1; > ++ x1 = or; > ++ or = 0; > ++ } > ++ final int firstCrossing = Math.max((int) Math.ceil(y1), boundsMinY); > ++ final int lastCrossing = Math.min((int)Math.ceil(y2), boundsMaxY); > ++ if (firstCrossing >= lastCrossing) { > + return; > + } > + > +- if (minY < edgeMinY) { edgeMinY = minY; } > +- if (maxY > edgeMaxY) { edgeMaxY = maxY; } > ++ if (y1 < edgeMinY) { edgeMinY = y1; } > ++ if (y2 > edgeMaxY) { edgeMaxY = y2; } > ++ > ++ final float slope = (x2 - x1) / (y2 - y1); > ++ > ++ if (slope > 0) { // <==> x1 < x2 > ++ if (x1 < edgeMinX) { edgeMinX = x1; } > ++ if (x2 > edgeMaxX) { edgeMaxX = x2; } > ++ } else { > ++ if (x2 < edgeMinX) { edgeMinX = x2; } > ++ if (x1 > edgeMaxX) { edgeMaxX = x1; } > ++ } > ++ > ++ final int ptr = numEdges * SIZEOF_EDGE; > ++ edges = Helpers.widenArray(edges, ptr, SIZEOF_EDGE); > ++ numEdges++; > ++ edges[ptr+OR] = or; > ++ edges[ptr+CURX] = x1 + (firstCrossing - y1) * slope; > ++ edges[ptr+SLOPE] = slope; > ++ edges[ptr+YMAX] = y2; > ++ final int bucketIdx = firstCrossing - boundsMinY; > ++ addEdgeToBucket(ptr, bucketIdx); > ++ if (lastCrossing < boundsMaxY) { > ++ edgeBucketCounts[lastCrossing - boundsMinY] |= 1; > ++ } > ++ } > + > +- int minXidx = (pts[0] < pts[type-2] ? 0 : type - 2); > +- float minX = pts[minXidx]; > +- float maxX = pts[type - 2 - minXidx]; > +- if (minX < edgeMinX) { edgeMinX = minX; } > +- if (maxX > edgeMaxX) { edgeMaxX = maxX; } > +- addPathSegment(pts, type, or); > ++ // preconditions: should not be called before the last line has been added > ++ // to the edge list (even though it will return a correct answer at that > ++ // point in time, it's not meant to be used that way). > ++ private int getFirstScanLineCrossing() { > ++ return Math.max(boundsMinY, (int)Math.ceil(edgeMinY)); > ++ } > ++ private int getScanLineCrossingEnd() { > ++ return Math.min(boundsMaxY, (int)Math.ceil(edgeMaxY)); > + } > + > + // END EDGE LIST > +@@ -619,6 +365,10 @@ > + this.boundsMinY = pix_boundsY * SUBPIXEL_POSITIONS_Y; > + this.boundsMaxX = (pix_boundsX + pix_boundsWidth) * SUBPIXEL_POSITIONS_X; > + this.boundsMaxY = (pix_boundsY + pix_boundsHeight) * SUBPIXEL_POSITIONS_Y; > ++ > ++ edgeBuckets = new int[boundsMaxY - boundsMinY]; > ++ java.util.Arrays.fill(edgeBuckets, NULL); > ++ edgeBucketCounts = new int[edgeBuckets.length]; > + } > + > + private float tosubpixx(float pix_x) { > +@@ -636,74 +386,34 @@ > + this.x0 = tosubpixx(pix_x0); > + } > + > +- public void lineJoin() { /* do nothing */ } > +- > +- private final float[][] pts = new float[2][8]; > +- private final float[] ts = new float[4]; > +- > +- private static void invertPolyPoints(float[] pts, int off, int type) { > +- for (int i = off, j = off + type - 2; i < j; i += 2, j -= 2) { > +- float tmp = pts[i]; > +- pts[i] = pts[j]; > +- pts[j] = tmp; > +- tmp = pts[i+1]; > +- pts[i+1] = pts[j+1]; > +- pts[j+1] = tmp; > +- } > +- } > +- > +- // return orientation before making the curve upright. > +- private static int makeMonotonicCurveUpright(float[] pts, int off, int type) { > +- float y0 = pts[off + 1]; > +- float y1 = pts[off + type - 1]; > +- if (y0 > y1) { > +- invertPolyPoints(pts, off, type); > +- return -1; > +- } else if (y0 < y1) { > +- return 1; > +- } > +- return 0; > +- } > +- > + public void lineTo(float pix_x1, float pix_y1) { > +- pts[0][0] = x0; pts[0][1] = y0; > +- pts[0][2] = tosubpixx(pix_x1); pts[0][3] = tosubpixy(pix_y1); > +- int or = makeMonotonicCurveUpright(pts[0], 0, 4); > +- somethingTo(pts[0], 4, or); > ++ float x1 = tosubpixx(pix_x1); > ++ float y1 = tosubpixy(pix_y1); > ++ addLine(x0, y0, x1, y1); > ++ x0 = x1; > ++ y0 = y1; > + } > + > + Curve c = new Curve(); > +- private void curveOrQuadTo(int type) { > +- c.set(pts[0], type); > +- int numTs = c.dxRoots(ts, 0); > +- numTs += c.dyRoots(ts, numTs); > +- numTs = Helpers.filterOutNotInAB(ts, 0, numTs, 0, 1); > +- Helpers.isort(ts, 0, numTs); > +- > +- Iterator it = Curve.breakPtsAtTs(pts, type, ts, numTs); > +- while(it.hasNext()) { > +- float[] curCurve = it.next(); > +- int or = makeMonotonicCurveUpright(curCurve, 0, type); > +- somethingTo(curCurve, type, or); > +- } > +- } > +- > + public void curveTo(float x1, float y1, > + float x2, float y2, > + float x3, float y3) > + { > +- pts[0][0] = x0; pts[0][1] = y0; > +- pts[0][2] = tosubpixx(x1); pts[0][3] = tosubpixy(y1); > +- pts[0][4] = tosubpixx(x2); pts[0][5] = tosubpixy(y2); > +- pts[0][6] = tosubpixx(x3); pts[0][7] = tosubpixy(y3); > +- curveOrQuadTo(8); > ++ final float xe = tosubpixx(x3); > ++ final float ye = tosubpixy(y3); > ++ c.set(x0, y0, tosubpixx(x1), tosubpixy(y1), tosubpixx(x2), tosubpixy(y2), xe, ye); > ++ curveBreakIntoLinesAndAdd(x0, y0, c, xe, ye); > ++ x0 = xe; > ++ y0 = ye; > + } > + > + public void quadTo(float x1, float y1, float x2, float y2) { > +- pts[0][0] = x0; pts[0][1] = y0; > +- pts[0][2] = tosubpixx(x1); pts[0][3] = tosubpixy(y1); > +- pts[0][4] = tosubpixx(x2); pts[0][5] = tosubpixy(y2); > +- curveOrQuadTo(6); > ++ final float xe = tosubpixx(x2); > ++ final float ye = tosubpixy(y2); > ++ c.set(x0, y0, tosubpixx(x1), tosubpixy(y1), xe, ye); > ++ quadBreakIntoLinesAndAdd(x0, y0, c, xe, ye); > ++ x0 = xe; > ++ y0 = ye; > + } > + > + public void closePath() { > +@@ -715,8 +425,6 @@ > + closePath(); > + } > + > +- > +- > + public long getNativeConsumer() { > + throw new InternalError("Renderer does not use a native consumer."); > + } > +@@ -728,9 +436,9 @@ > + // 0x1 if EVEN_ODD, all bits if NON_ZERO > + int mask = (windingRule == WIND_EVEN_ODD) ? 0x1 : ~0x0; > + > +- // add 1 to better deal with the last pixel in a pixel row. > +- int width = pix_bboxx1 - pix_bboxx0 + 1; > +- int[] alpha = new int[width+1]; > ++ // add 2 to better deal with the last pixel in a pixel row. > ++ int width = pix_bboxx1 - pix_bboxx0; > ++ int[] alpha = new int[width+2]; > + > + int bboxx0 = pix_bboxx0 << SUBPIXEL_LG_POSITIONS_X; > + int bboxx1 = pix_bboxx1 << SUBPIXEL_LG_POSITIONS_X; > +@@ -766,7 +474,8 @@ > + for (int i = 0; i < numCrossings; i++) { > + int curxo = crossings[i]; > + int curx = curxo >> 1; > +- int crorientation = ((curxo & 0x1) == 0x1) ? 1 : -1; > ++ // to turn {0, 1} into {-1, 1}, multiply by 2 and subtract 1. > ++ int crorientation = ((curxo & 0x1) << 1) -1; > + if ((sum & mask) != 0) { > + int x0 = Math.max(prev, bboxx0); > + int x1 = Math.min(curx, bboxx1); > +@@ -811,26 +520,26 @@ > + } > + > + public void endRendering() { > +- final int bminx = boundsMinX >> SUBPIXEL_LG_POSITIONS_X; > +- final int bmaxx = boundsMaxX >> SUBPIXEL_LG_POSITIONS_X; > +- final int bminy = boundsMinY >> SUBPIXEL_LG_POSITIONS_Y; > +- final int bmaxy = boundsMaxY >> SUBPIXEL_LG_POSITIONS_Y; > +- final int eminx = ((int)Math.floor(edgeMinX)) >> SUBPIXEL_LG_POSITIONS_X; > +- final int emaxx = ((int)Math.ceil(edgeMaxX)) >> SUBPIXEL_LG_POSITIONS_X; > +- final int eminy = ((int)Math.floor(edgeMinY)) >> SUBPIXEL_LG_POSITIONS_Y; > +- final int emaxy = ((int)Math.ceil(edgeMaxY)) >> SUBPIXEL_LG_POSITIONS_Y; > +- > +- final int minX = Math.max(bminx, eminx); > +- final int maxX = Math.min(bmaxx, emaxx); > +- final int minY = Math.max(bminy, eminy); > +- final int maxY = Math.min(bmaxy, emaxy); > +- if (minX > maxX || minY > maxY) { > +- this.cache = new PiscesCache(bminx, bminy, bmaxx, bmaxy); > ++ int spminX = Math.max((int)Math.ceil(edgeMinX), boundsMinX); > ++ int spmaxX = Math.min((int)Math.ceil(edgeMaxX), boundsMaxX); > ++ int spminY = Math.max((int)Math.ceil(edgeMinY), boundsMinY); > ++ int spmaxY = Math.min((int)Math.ceil(edgeMaxY), boundsMaxY); > ++ > ++ int pminX = spminX >> SUBPIXEL_LG_POSITIONS_X; > ++ int pmaxX = (spmaxX + SUBPIXEL_MASK_X) >> SUBPIXEL_LG_POSITIONS_X; > ++ int pminY = spminY >> SUBPIXEL_LG_POSITIONS_Y; > ++ int pmaxY = (spmaxY + SUBPIXEL_MASK_Y) >> SUBPIXEL_LG_POSITIONS_Y; > ++ > ++ if (pminX > pmaxX || pminY > pmaxY) { > ++ this.cache = new PiscesCache(boundsMinX >> SUBPIXEL_LG_POSITIONS_X, > ++ boundsMinY >> SUBPIXEL_LG_POSITIONS_Y, > ++ boundsMaxX >> SUBPIXEL_LG_POSITIONS_X, > ++ boundsMaxY >> SUBPIXEL_LG_POSITIONS_Y); > + return; > + } > + > +- this.cache = new PiscesCache(minX, minY, maxX, maxY); > +- _endRendering(minX, minY, maxX, maxY); > ++ this.cache = new PiscesCache(pminX, pminY, pmaxX, pmaxY); > ++ _endRendering(pminX, pminY, pmaxX, pmaxY); > + } > + > + public PiscesCache getCache() { > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Stroker.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/Stroker.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java 2011-02-04 11:13:02.477269895 -0500 > +@@ -1,5 +1,5 @@ > + /* > +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. > ++ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > +@@ -33,7 +33,7 @@ > + // TODO: some of the arithmetic here is too verbose and prone to hard to > + // debug typos. We should consider making a small Point/Vector class that > + // has methods like plus(Point), minus(Point), dot(Point), cross(Point)and such > +-public class Stroker implements PathConsumer2D { > ++final class Stroker implements PathConsumer2D { > + > + private static final int MOVE_TO = 0; > + private static final int DRAWING_OP_TO = 1; // ie. curve, line, or quad > +@@ -130,7 +130,7 @@ > + private static void computeOffset(final float lx, final float ly, > + final float w, final float[] m) > + { > +- final float len = (float)Math.hypot(lx, ly); > ++ final float len = (float)Math.sqrt(lx*lx + ly*ly); > + if (len == 0) { > + m[0] = m[1] = 0; > + } else { > +@@ -758,7 +758,7 @@ > + // This is where the curve to be processed is put. We give it > + // enough room to store 2 curves: one for the current subdivision, the > + // other for the rest of the curve. > +- private float[][] middle = new float[2][8]; > ++ private float[] middle = new float[2*8]; > + private float[] lp = new float[8]; > + private float[] rp = new float[8]; > + private static final int MAX_N_CURVES = 11; > +@@ -766,55 +766,55 @@ > + > + private void somethingTo(final int type) { > + // need these so we can update the state at the end of this method > +- final float xf = middle[0][type-2], yf = middle[0][type-1]; > +- float dxs = middle[0][2] - middle[0][0]; > +- float dys = middle[0][3] - middle[0][1]; > +- float dxf = middle[0][type - 2] - middle[0][type - 4]; > +- float dyf = middle[0][type - 1] - middle[0][type - 3]; > ++ final float xf = middle[type-2], yf = middle[type-1]; > ++ float dxs = middle[2] - middle[0]; > ++ float dys = middle[3] - middle[1]; > ++ float dxf = middle[type - 2] - middle[type - 4]; > ++ float dyf = middle[type - 1] - middle[type - 3]; > + switch(type) { > + case 6: > + if ((dxs == 0f && dys == 0f) || > + (dxf == 0f && dyf == 0f)) { > +- dxs = dxf = middle[0][4] - middle[0][0]; > +- dys = dyf = middle[0][5] - middle[0][1]; > ++ dxs = dxf = middle[4] - middle[0]; > ++ dys = dyf = middle[5] - middle[1]; > + } > + break; > + case 8: > + boolean p1eqp2 = (dxs == 0f && dys == 0f); > + boolean p3eqp4 = (dxf == 0f && dyf == 0f); > + if (p1eqp2) { > +- dxs = middle[0][4] - middle[0][0]; > +- dys = middle[0][5] - middle[0][1]; > ++ dxs = middle[4] - middle[0]; > ++ dys = middle[5] - middle[1]; > + if (dxs == 0f && dys == 0f) { > +- dxs = middle[0][6] - middle[0][0]; > +- dys = middle[0][7] - middle[0][1]; > ++ dxs = middle[6] - middle[0]; > ++ dys = middle[7] - middle[1]; > + } > + } > + if (p3eqp4) { > +- dxf = middle[0][6] - middle[0][2]; > +- dyf = middle[0][7] - middle[0][3]; > ++ dxf = middle[6] - middle[2]; > ++ dyf = middle[7] - middle[3]; > + if (dxf == 0f && dyf == 0f) { > +- dxf = middle[0][6] - middle[0][0]; > +- dyf = middle[0][7] - middle[0][1]; > ++ dxf = middle[6] - middle[0]; > ++ dyf = middle[7] - middle[1]; > + } > + } > + } > + if (dxs == 0f && dys == 0f) { > + // this happens iff the "curve" is just a point > +- lineTo(middle[0][0], middle[0][1]); > ++ lineTo(middle[0], middle[1]); > + return; > + } > + // if these vectors are too small, normalize them, to avoid future > + // precision problems. > + if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) { > +- double len = Math.hypot(dxs, dys); > +- dxs = (float)(dxs / len); > +- dys = (float)(dys / len); > ++ float len = (float)Math.sqrt(dxs*dxs + dys*dys); > ++ dxs /= len; > ++ dys /= len; > + } > + if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) { > +- double len = Math.hypot(dxf, dyf); > +- dxf = (float)(dxf / len); > +- dyf = (float)(dyf / len); > ++ float len = (float)Math.sqrt(dxf*dxf + dyf*dyf); > ++ dxf /= len; > ++ dyf /= len; > + } > + > + computeOffset(dxs, dys, lineWidth2, offset[0]); > +@@ -822,20 +822,20 @@ > + final float my = offset[0][1]; > + drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, mx, my); > + > +- int nSplits = findSubdivPoints(middle[0], subdivTs, type,lineWidth2); > ++ int nSplits = findSubdivPoints(middle, subdivTs, type, lineWidth2); > + > + int kind = 0; > +- Iterator it = Curve.breakPtsAtTs(middle, type, subdivTs, nSplits); > ++ Iterator it = Curve.breakPtsAtTs(middle, type, subdivTs, nSplits); > + while(it.hasNext()) { > +- float[] curCurve = it.next(); > ++ int curCurveOff = it.next(); > + > + kind = 0; > + switch (type) { > + case 8: > +- kind = computeOffsetCubic(curCurve, 0, lp, rp); > ++ kind = computeOffsetCubic(middle, curCurveOff, lp, rp); > + break; > + case 6: > +- kind = computeOffsetQuad(curCurve, 0, lp, rp); > ++ kind = computeOffsetQuad(middle, curCurveOff, lp, rp); > + break; > + } > + if (kind != 0) { > +@@ -871,8 +871,7 @@ > + // to get good offset curves a distance of w away from the middle curve. > + // Stores the points in ts, and returns how many of them there were. > + private static Curve c = new Curve(); > +- private static int findSubdivPoints(float[] pts, float[] ts, > +- final int type, final float w) > ++ private static int findSubdivPoints(float[] pts, float[] ts, final int type, final float w) > + { > + final float x12 = pts[2] - pts[0]; > + final float y12 = pts[3] - pts[1]; > +@@ -919,6 +918,7 @@ > + // now we must subdivide at points where one of the offset curves will have > + // a cusp. This happens at ts where the radius of curvature is equal to w. > + ret += c.rootsOfROCMinusW(ts, ret, w, 0.0001f); > ++ > + ret = Helpers.filterOutNotInAB(ts, 0, ret, 0.0001f, 0.9999f); > + Helpers.isort(ts, 0, ret); > + return ret; > +@@ -928,10 +928,10 @@ > + float x2, float y2, > + float x3, float y3) > + { > +- middle[0][0] = cx0; middle[0][1] = cy0; > +- middle[0][2] = x1; middle[0][3] = y1; > +- middle[0][4] = x2; middle[0][5] = y2; > +- middle[0][6] = x3; middle[0][7] = y3; > ++ middle[0] = cx0; middle[1] = cy0; > ++ middle[2] = x1; middle[3] = y1; > ++ middle[4] = x2; middle[5] = y2; > ++ middle[6] = x3; middle[7] = y3; > + somethingTo(8); > + } > + > +@@ -940,9 +940,9 @@ > + } > + > + public void quadTo(float x1, float y1, float x2, float y2) { > +- middle[0][0] = cx0; middle[0][1] = cy0; > +- middle[0][2] = x1; middle[0][3] = y1; > +- middle[0][4] = x2; middle[0][5] = y2; > ++ middle[0] = cx0; middle[1] = cy0; > ++ middle[2] = x1; middle[3] = y1; > ++ middle[4] = x2; middle[5] = y2; > + somethingTo(6); > + } > + > +@@ -1037,7 +1037,6 @@ > + } > + } > + > +- > + public String toString() { > + String ret = ""; > + int nc = numCurves; > +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java ./openjdk/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java > +--- ./openjdk.old/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java 2011-02-04 11:09:54.298266201 -0500 > ++++ ./openjdk/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java 2011-02-04 11:10:55.113151025 -0500 > +@@ -1,5 +1,5 @@ > + /* > +- * Copyright (c) 2007, Oracle and/or its affiliates. All rights reserved. > ++ * Copyright (c) 2007, 2010, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > +@@ -28,7 +28,7 @@ > + import sun.awt.geom.PathConsumer2D; > + import java.awt.geom.AffineTransform; > + > +-public class TransformingPathConsumer2D { > ++final class TransformingPathConsumer2D { > + public static PathConsumer2D > + transformConsumer(PathConsumer2D out, > + AffineTransform at) > +@@ -50,17 +50,72 @@ > + return new TranslateFilter(out, Mxt, Myt); > + } > + } else { > +- return new ScaleFilter(out, Mxx, Myy, Mxt, Myt); > ++ if (Mxt == 0f && Myt == 0f) { > ++ return new DeltaScaleFilter(out, Mxx, Myy); > ++ } else { > ++ return new ScaleFilter(out, Mxx, Myy, Mxt, Myt); > ++ } > + } > ++ } else if (Mxt == 0f && Myt == 0f) { > ++ return new DeltaTransformFilter(out, Mxx, Mxy, Myx, Myy); > + } else { > + return new TransformFilter(out, Mxx, Mxy, Mxt, Myx, Myy, Myt); > + } > + } > + > +- static class TranslateFilter implements PathConsumer2D { > +- PathConsumer2D out; > +- float tx; > +- float ty; > ++ public static PathConsumer2D > ++ deltaTransformConsumer(PathConsumer2D out, > ++ AffineTransform at) > ++ { > ++ if (at == null) { > ++ return out; > ++ } > ++ float Mxx = (float) at.getScaleX(); > ++ float Mxy = (float) at.getShearX(); > ++ float Myx = (float) at.getShearY(); > ++ float Myy = (float) at.getScaleY(); > ++ if (Mxy == 0f && Myx == 0f) { > ++ if (Mxx == 1f && Myy == 1f) { > ++ return out; > ++ } else { > ++ return new DeltaScaleFilter(out, Mxx, Myy); > ++ } > ++ } else { > ++ return new DeltaTransformFilter(out, Mxx, Mxy, Myx, Myy); > ++ } > ++ } > ++ > ++ public static PathConsumer2D > ++ inverseDeltaTransformConsumer(PathConsumer2D out, > ++ AffineTransform at) > ++ { > ++ if (at == null) { > ++ return out; > ++ } > ++ float Mxx = (float) at.getScaleX(); > ++ float Mxy = (float) at.getShearX(); > ++ float Myx = (float) at.getShearY(); > ++ float Myy = (float) at.getScaleY(); > ++ if (Mxy == 0f && Myx == 0f) { > ++ if (Mxx == 1f && Myy == 1f) { > ++ return out; > ++ } else { > ++ return new DeltaScaleFilter(out, 1.0f/Mxx, 1.0f/Myy); > ++ } > ++ } else { > ++ float det = Mxx * Myy - Mxy * Myx; > ++ return new DeltaTransformFilter(out, > ++ Myy / det, > ++ -Mxy / det, > ++ -Myx / det, > ++ Mxx / det); > ++ } > ++ } > ++ > ++ static final class TranslateFilter implements PathConsumer2D { > ++ private final PathConsumer2D out; > ++ private final float tx; > ++ private final float ty; > + > + TranslateFilter(PathConsumer2D out, > + float tx, float ty) > +@@ -107,12 +162,12 @@ > + } > + } > + > +- static class ScaleFilter implements PathConsumer2D { > +- PathConsumer2D out; > +- float sx; > +- float sy; > +- float tx; > +- float ty; > ++ static final class ScaleFilter implements PathConsumer2D { > ++ private final PathConsumer2D out; > ++ private final float sx; > ++ private final float sy; > ++ private final float tx; > ++ private final float ty; > + > + ScaleFilter(PathConsumer2D out, > + float sx, float sy, float tx, float ty) > +@@ -161,14 +216,14 @@ > + } > + } > + > +- static class TransformFilter implements PathConsumer2D { > +- PathConsumer2D out; > +- float Mxx; > +- float Mxy; > +- float Mxt; > +- float Myx; > +- float Myy; > +- float Myt; > ++ static final class TransformFilter implements PathConsumer2D { > ++ private final PathConsumer2D out; > ++ private final float Mxx; > ++ private final float Mxy; > ++ private final float Mxt; > ++ private final float Myx; > ++ private final float Myy; > ++ private final float Myt; > + > + TransformFilter(PathConsumer2D out, > + float Mxx, float Mxy, float Mxt, > +@@ -226,4 +281,113 @@ > + return 0; > + } > + } > ++ > ++ static final class DeltaScaleFilter implements PathConsumer2D { > ++ private final float sx, sy; > ++ private final PathConsumer2D out; > ++ > ++ public DeltaScaleFilter(PathConsumer2D out, float Mxx, float Myy) { > ++ sx = Mxx; > ++ sy = Myy; > ++ this.out = out; > ++ } > ++ > ++ public void moveTo(float x0, float y0) { > ++ out.moveTo(x0 * sx, y0 * sy); > ++ } > ++ > ++ public void lineTo(float x1, float y1) { > ++ out.lineTo(x1 * sx, y1 * sy); > ++ } > ++ > ++ public void quadTo(float x1, float y1, > ++ float x2, float y2) > ++ { > ++ out.quadTo(x1 * sx, y1 * sy, > ++ x2 * sx, y2 * sy); > ++ } > ++ > ++ public void curveTo(float x1, float y1, > ++ float x2, float y2, > ++ float x3, float y3) > ++ { > ++ out.curveTo(x1 * sx, y1 * sy, > ++ x2 * sx, y2 * sy, > ++ x3 * sx, y3 * sy); > ++ } > ++ > ++ public void closePath() { > ++ out.closePath(); > ++ } > ++ > ++ public void pathDone() { > ++ out.pathDone(); > ++ } > ++ > ++ public long getNativeConsumer() { > ++ return 0; > ++ } > ++ } > ++ > ++ static final class DeltaTransformFilter implements PathConsumer2D { > ++ private PathConsumer2D out; > ++ private final float Mxx; > ++ private final float Mxy; > ++ private final float Myx; > ++ private final float Myy; > ++ > ++ DeltaTransformFilter(PathConsumer2D out, > ++ float Mxx, float Mxy, > ++ float Myx, float Myy) > ++ { > ++ this.out = out; > ++ this.Mxx = Mxx; > ++ this.Mxy = Mxy; > ++ this.Myx = Myx; > ++ this.Myy = Myy; > ++ } > ++ > ++ public void moveTo(float x0, float y0) { > ++ out.moveTo(x0 * Mxx + y0 * Mxy, > ++ x0 * Myx + y0 * Myy); > ++ } > ++ > ++ public void lineTo(float x1, float y1) { > ++ out.lineTo(x1 * Mxx + y1 * Mxy, > ++ x1 * Myx + y1 * Myy); > ++ } > ++ > ++ public void quadTo(float x1, float y1, > ++ float x2, float y2) > ++ { > ++ out.quadTo(x1 * Mxx + y1 * Mxy, > ++ x1 * Myx + y1 * Myy, > ++ x2 * Mxx + y2 * Mxy, > ++ x2 * Myx + y2 * Myy); > ++ } > ++ > ++ public void curveTo(float x1, float y1, > ++ float x2, float y2, > ++ float x3, float y3) > ++ { > ++ out.curveTo(x1 * Mxx + y1 * Mxy, > ++ x1 * Myx + y1 * Myy, > ++ x2 * Mxx + y2 * Mxy, > ++ x2 * Myx + y2 * Myy, > ++ x3 * Mxx + y3 * Mxy, > ++ x3 * Myx + y3 * Myy); > ++ } > ++ > ++ public void closePath() { > ++ out.closePath(); > ++ } > ++ > ++ public void pathDone() { > ++ out.pathDone(); > ++ } > ++ > ++ public long getNativeConsumer() { > ++ return 0; > ++ } > ++ } > + } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Sun Feb 6 05:09:12 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Sun, 06 Feb 2011 13:09:12 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset cbf4a48aae30 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=cbf4a48aae30 author: Andrew John Hughes date: Sun Feb 06 13:02:20 2011 +0000 S4993545: NativeInLightFixer adds asynchronousity S6637796: setBounds doesn't enlarge Component S6607660: java.awt.Container.getMouseEventTargetImpl should be invoked while holding the TreeLock S6607170: Focus not set by requestFocus S6616323: consider benefits of replacing a component array with other collection from the awt.Container class S6682046: Mixing code does not always recalculate shapes correctly when resizing components S6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7 S6725214: D3D: forward-port the new pipeline from 6u10 2011-02-06 Andrew John Hughes * Makefile.am: Add patches below. * patches/openjdk/4993545-nativeinlightfixer.patch, * patches/openjdk/6607170-request_focus.patch, * patches/openjdk/6607660-treelock.patch, * patches/openjdk/6616323-component_array.patch, * patches/openjdk/6637796-set_bounds.patch, * patches/openjdk/6682046-shape_calculation.patch, New AWT backports from OpenJDK7. * patches/openjdk/6725214-direct3d-01.patch: Rejigged against new patches with Oracle copyrights added. * patches/openjdk/6797195-hw_lw_mixing.patch: New AWT backport from OpenJDK7. * NEWS: Updated. changeset fb1fdfc2f882 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fb1fdfc2f882 author: Andrew John Hughes date: Sun Feb 06 13:08:35 2011 +0000 Merge diffstat: 16 files changed, 32537 insertions(+), 11992 deletions(-) ChangeLog | 35 Makefile.am | 23 NEWS | 12 patches/jtreg-6929067-fix.patch | 2 patches/no-static-linking.patch | 44 patches/openjdk/4493128-CubicCurve2D.patch | 213 patches/openjdk/4645692-CubicCurve2D.solveCubic.patch | 717 patches/openjdk/4724552-CubicCurve2D.patch | 48 patches/openjdk/4993545-nativeinlightfixer.patch | 408 patches/openjdk/6607170-request_focus.patch | 709 patches/openjdk/6607660-treelock.patch | 112 patches/openjdk/6616323-component_array.patch | 1083 patches/openjdk/6637796-set_bounds.patch | 465 patches/openjdk/6682046-shape_calculation.patch | 506 patches/openjdk/6725214-direct3d-01.patch |36815 +++++++++++------ patches/openjdk/6797195-hw_lw_mixing.patch | 3337 + diffs (truncated from 48404 to 500 lines): diff -r 82d83ff8b150 -r fb1fdfc2f882 ChangeLog --- a/ChangeLog Tue Feb 01 18:22:19 2011 +0000 +++ b/ChangeLog Sun Feb 06 13:08:35 2011 +0000 @@ -1,3 +1,38 @@ 2011-02-01 Andrew John Hughes + + * Makefile.am: Add patches below. + * patches/openjdk/4993545-nativeinlightfixer.patch, + * patches/openjdk/6607170-request_focus.patch, + * patches/openjdk/6607660-treelock.patch, + * patches/openjdk/6616323-component_array.patch, + * patches/openjdk/6637796-set_bounds.patch, + * patches/openjdk/6682046-shape_calculation.patch, + New AWT backports from OpenJDK7. + * patches/openjdk/6725214-direct3d-01.patch: + Rejigged against new patches with Oracle copyrights added. + * patches/openjdk/6797195-hw_lw_mixing.patch: + New AWT backport from OpenJDK7. + +2011-02-03 Andrew John Hughes + + PR616, PR99: + * Makefile.am: Add new patch. + * patches/jtreg-6929067-fix.patch: + Link against pthread explicitly now + libstdc++ is no longer static. + * patches/no-static-linking.patch: + Don't statically link libstdc++ or + libgcc. + * NEWS: Updated. + +2011-02-01 Denis Lila + + * NEWS: Update with the 3 backports + * Makefile.am (ICEDTEA_PATCHES): Add the patches + * patches/openjdk/4493128-CubicCurve2D.patch: New file. + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: Likewise. + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. + 2011-02-01 Andrew John Hughes * NEWS: Add announcements for 1.7.8, diff -r 82d83ff8b150 -r fb1fdfc2f882 Makefile.am --- a/Makefile.am Tue Feb 01 18:22:19 2011 +0000 +++ b/Makefile.am Sun Feb 06 13:08:35 2011 +0000 @@ -178,6 +178,17 @@ SECURITY_PATCHES = ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ + patches/openjdk/4993545-nativeinlightfixer.patch \ + patches/openjdk/6637796-set_bounds.patch \ + patches/openjdk/6607660-treelock.patch \ + patches/openjdk/6607170-request_focus.patch \ + patches/openjdk/6616323-component_array.patch \ + patches/openjdk/6682046-shape_calculation.patch \ + patches/openjdk/6797195-hw_lw_mixing.patch \ + patches/openjdk/6725214-direct3d-01.patch \ + patches/openjdk/6791612-opengl-jni-fix.patch \ + patches/openjdk/6755274-glgetstring-crash.patch \ + patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ patches/icedtea-notice-safepoints.patch \ patches/icedtea-parisc-opt.patch \ patches/icedtea-lucene-crash.patch \ @@ -276,7 +287,11 @@ ICEDTEA_PATCHES = \ patches/openjdk/6736649-text_bearings.patch \ patches/openjdk/6797139-jbutton_truncation.patch \ patches/openjdk/6883341-text_bearing_exception.patch \ - patches/jtreg-png-reader.patch + patches/jtreg-png-reader.patch \ + patches/openjdk/4724552-CubicCurve2D.patch \ + patches/openjdk/4493128-CubicCurve2D.patch \ + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ + patches/no-static-linking.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ @@ -310,12 +325,8 @@ endif endif if ENABLE_XRENDER -ICEDTEA_PATCHES += patches/openjdk/6725214-direct3d-01.patch \ - patches/openjdk/6307603-xrender-01.patch \ +ICEDTEA_PATCHES += patches/openjdk/6307603-xrender-01.patch \ patches/openjdk/6961633-xrender-02.patch \ - patches/openjdk/6791612-opengl-jni-fix.patch \ - patches/openjdk/6755274-glgetstring-crash.patch \ - patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ patches/xrender-gc-cleanup.patch endif diff -r 82d83ff8b150 -r fb1fdfc2f882 NEWS --- a/NEWS Tue Feb 01 18:22:19 2011 +0000 +++ b/NEWS Sun Feb 06 13:08:35 2011 +0000 @@ -403,8 +403,20 @@ New in release 1.10 (2011-XX-XX): - S6736649: test/closed/javax/swing/JMenuItem/6458123/ManualBug6458123.java fails on Linux - S6797139: JButton title is truncating for some strings irrespective of preferred size. - S6883341: SWAT: jdk7-b72 swat build(2009-09-17) threw exceptions when running Java2D demo by clicking Paint ta + - S4493128: CubicCurve2D intersects method fails + - S4724552: CubicCurve2D.contains(Rectangle2D) returns true when partially contained. + - S4645692: CubicCurve2D.solveCubic does not return all solutions. + - S4993545: NativeInLightFixer adds asynchronousity + - S6637796: setBounds doesn't enlarge Component + - S6607660: java.awt.Container.getMouseEventTargetImpl should be invoked while holding the TreeLock + - S6607170: Focus not set by requestFocus + - S6616323: consider benefits of replacing a component array with other collection from the awt.Container class + - S6682046: Mixing code does not always recalculate shapes correctly when resizing components + - S6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7 + - S6725214: D3D: forward-port the new pipeline from 6u10 * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors + - PR616, PR99: Don't statically link libstdc++ or libgcc New in release 1.9.5 (2011-02-01): diff -r 82d83ff8b150 -r fb1fdfc2f882 patches/jtreg-6929067-fix.patch --- a/patches/jtreg-6929067-fix.patch Tue Feb 01 18:22:19 2011 +0000 +++ b/patches/jtreg-6929067-fix.patch Sun Feb 06 13:08:35 2011 +0000 @@ -45,7 +45,7 @@ +gcc ${COMP_FLAG} -o invoke \ +-L${TESTJAVA}/jre/lib/${ARCH}/client \ +-L${TESTJAVA}/jre/lib/${ARCH}/server \ -+-ljvm -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c ++-ljvm -lpthread -I${TESTJAVA}/include -I${TESTJAVA}/include/linux invoke.c + ./invoke exit $? diff -r 82d83ff8b150 -r fb1fdfc2f882 patches/no-static-linking.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/no-static-linking.patch Sun Feb 06 13:08:35 2011 +0000 @@ -0,0 +1,44 @@ +diff -r f7afe7a5e086 make/common/shared/Compiler-gcc.gmk +--- openjdk.orig/jdk/make/common/shared/Compiler-gcc.gmk Fri Jan 21 16:21:28 2011 -0800 ++++ openjdk/jdk/make/common/shared/Compiler-gcc.gmk Thu Feb 03 11:34:13 2011 +0000 +@@ -61,7 +61,7 @@ + CC = $(COMPILER_PATH)gcc + CPP = $(COMPILER_PATH)gcc -E + # statically link libstdc++ before C++ ABI is stablized on Linux +- STATIC_CXX = true ++ STATIC_CXX = false + ifeq ($(STATIC_CXX),true) + # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" + # We need to use gcc to statically link the C++ runtime. gcc and g++ use +diff -r 9797bcda6c12 make/linux/makefiles/vm.make +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make Fri Jan 21 16:20:02 2011 -0800 ++++ openjdk/hotspot/make/linux/makefiles/vm.make Thu Feb 03 15:01:10 2011 +0000 +@@ -137,15 +137,7 @@ + vm.def: $(Res_Files) $(Obj_Files) + sh $(GAMMADIR)/make/linux/makefiles/build_vm_def.sh *.o > $@ + +-ifeq ($(SHARK_BUILD), true) +- STATIC_CXX = false +-else +- ifeq ($(ZERO_LIBARCH), ppc64) +- STATIC_CXX = false +- else +- STATIC_CXX = true +- endif +-endif ++STATIC_CXX = false + + ifeq ($(LINK_INTO),AOUT) + LIBJVM.o = +diff -r 05436b84e93a make/common/shared/Compiler-gcc.gmk +--- openjdk.orig/corba/make/common/shared/Compiler-gcc.gmk Sat Jan 16 01:04:04 2010 +0000 ++++ openjdk/corba/make/common/shared/Compiler-gcc.gmk Thu Feb 03 16:01:37 2011 +0000 +@@ -61,7 +61,7 @@ + CC = $(COMPILER_PATH)gcc + CPP = $(COMPILER_PATH)gcc -E + # statically link libstdc++ before C++ ABI is stablized on Linux +- STATIC_CXX = true ++ STATIC_CXX = false + ifeq ($(STATIC_CXX),true) + # g++ always dynamically links libstdc++, even we use "-Wl,-Bstatic -lstdc++" + # We need to use gcc to statically link the C++ runtime. gcc and g++ use diff -r 82d83ff8b150 -r fb1fdfc2f882 patches/openjdk/4493128-CubicCurve2D.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/4493128-CubicCurve2D.patch Sun Feb 06 13:08:35 2011 +0000 @@ -0,0 +1,213 @@ +--- openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java.old 2011-01-31 12:38:24.340733697 -0500 ++++ openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-01-31 12:54:27.462601773 -0500 +@@ -1387,203 +1387,13 @@ + return false; + } + +- // Trivially accept if either endpoint is inside the rectangle +- // (not on its border since it may end there and not go inside) +- // Record where they lie with respect to the rectangle. +- // -1 => left, 0 => inside, 1 => right +- double x1 = getX1(); +- double y1 = getY1(); +- int x1tag = getTag(x1, x, x+w); +- int y1tag = getTag(y1, y, y+h); +- if (x1tag == INSIDE && y1tag == INSIDE) { +- return true; +- } +- double x2 = getX2(); +- double y2 = getY2(); +- int x2tag = getTag(x2, x, x+w); +- int y2tag = getTag(y2, y, y+h); +- if (x2tag == INSIDE && y2tag == INSIDE) { +- return true; +- } +- +- double ctrlx1 = getCtrlX1(); +- double ctrly1 = getCtrlY1(); +- double ctrlx2 = getCtrlX2(); +- double ctrly2 = getCtrlY2(); +- int ctrlx1tag = getTag(ctrlx1, x, x+w); +- int ctrly1tag = getTag(ctrly1, y, y+h); +- int ctrlx2tag = getTag(ctrlx2, x, x+w); +- int ctrly2tag = getTag(ctrly2, y, y+h); +- +- // Trivially reject if all points are entirely to one side of +- // the rectangle. +- if (x1tag < INSIDE && x2tag < INSIDE && +- ctrlx1tag < INSIDE && ctrlx2tag < INSIDE) +- { +- return false; // All points left +- } +- if (y1tag < INSIDE && y2tag < INSIDE && +- ctrly1tag < INSIDE && ctrly2tag < INSIDE) +- { +- return false; // All points above +- } +- if (x1tag > INSIDE && x2tag > INSIDE && +- ctrlx1tag > INSIDE && ctrlx2tag > INSIDE) +- { +- return false; // All points right +- } +- if (y1tag > INSIDE && y2tag > INSIDE && +- ctrly1tag > INSIDE && ctrly2tag > INSIDE) +- { +- return false; // All points below +- } +- +- // Test for endpoints on the edge where either the segment +- // or the curve is headed "inwards" from them +- // Note: These tests are a superset of the fast endpoint tests +- // above and thus repeat those tests, but take more time +- // and cover more cases +- if (inwards(x1tag, x2tag, ctrlx1tag) && +- inwards(y1tag, y2tag, ctrly1tag)) +- { +- // First endpoint on border with either edge moving inside +- return true; +- } +- if (inwards(x2tag, x1tag, ctrlx2tag) && +- inwards(y2tag, y1tag, ctrly2tag)) +- { +- // Second endpoint on border with either edge moving inside +- return true; +- } +- +- // Trivially accept if endpoints span directly across the rectangle +- boolean xoverlap = (x1tag * x2tag <= 0); +- boolean yoverlap = (y1tag * y2tag <= 0); +- if (x1tag == INSIDE && x2tag == INSIDE && yoverlap) { +- return true; +- } +- if (y1tag == INSIDE && y2tag == INSIDE && xoverlap) { +- return true; +- } +- +- // We now know that both endpoints are outside the rectangle +- // but the 4 points are not all on one side of the rectangle. +- // Therefore the curve cannot be contained inside the rectangle, +- // but the rectangle might be contained inside the curve, or +- // the curve might intersect the boundary of the rectangle. +- +- double[] eqn = new double[4]; +- double[] res = new double[4]; +- if (!yoverlap) { +- // Both y coordinates for the closing segment are above or +- // below the rectangle which means that we can only intersect +- // if the curve crosses the top (or bottom) of the rectangle +- // in more than one place and if those crossing locations +- // span the horizontal range of the rectangle. +- fillEqn(eqn, (y1tag < INSIDE ? y : y+h), y1, ctrly1, ctrly2, y2); +- int num = solveCubic(eqn, res); +- num = evalCubic(res, num, true, true, null, +- x1, ctrlx1, ctrlx2, x2); +- // odd counts imply the crossing was out of [0,1] bounds +- // otherwise there is no way for that part of the curve to +- // "return" to meet its endpoint +- return (num == 2 && +- getTag(res[0], x, x+w) * getTag(res[1], x, x+w) <= 0); +- } +- +- // Y ranges overlap. Now we examine the X ranges +- if (!xoverlap) { +- // Both x coordinates for the closing segment are left of +- // or right of the rectangle which means that we can only +- // intersect if the curve crosses the left (or right) edge +- // of the rectangle in more than one place and if those +- // crossing locations span the vertical range of the rectangle. +- fillEqn(eqn, (x1tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); +- int num = solveCubic(eqn, res); +- num = evalCubic(res, num, true, true, null, +- y1, ctrly1, ctrly2, y2); +- // odd counts imply the crossing was out of [0,1] bounds +- // otherwise there is no way for that part of the curve to +- // "return" to meet its endpoint +- return (num == 2 && +- getTag(res[0], y, y+h) * getTag(res[1], y, y+h) <= 0); +- } +- +- // The X and Y ranges of the endpoints overlap the X and Y +- // ranges of the rectangle, now find out how the endpoint +- // line segment intersects the Y range of the rectangle +- double dx = x2 - x1; +- double dy = y2 - y1; +- double k = y2 * x1 - x2 * y1; +- int c1tag, c2tag; +- if (y1tag == INSIDE) { +- c1tag = x1tag; +- } else { +- c1tag = getTag((k + dx * (y1tag < INSIDE ? y : y+h)) / dy, x, x+w); +- } +- if (y2tag == INSIDE) { +- c2tag = x2tag; +- } else { +- c2tag = getTag((k + dx * (y2tag < INSIDE ? y : y+h)) / dy, x, x+w); +- } +- // If the part of the line segment that intersects the Y range +- // of the rectangle crosses it horizontally - trivially accept +- if (c1tag * c2tag <= 0) { +- return true; +- } +- +- // Now we know that both the X and Y ranges intersect and that +- // the endpoint line segment does not directly cross the rectangle. +- // +- // We can almost treat this case like one of the cases above +- // where both endpoints are to one side, except that we may +- // get one or three intersections of the curve with the vertical +- // side of the rectangle. This is because the endpoint segment +- // accounts for the other intersection in an even pairing. Thus, +- // with the endpoint crossing we end up with 2 or 4 total crossings. +- // +- // (Remember there is overlap in both the X and Y ranges which +- // means that the segment itself must cross at least one vertical +- // edge of the rectangle - in particular, the "near vertical side" +- // - leaving an odd number of intersections for the curve.) +- // +- // Now we calculate the y tags of all the intersections on the +- // "near vertical side" of the rectangle. We will have one with +- // the endpoint segment, and one or three with the curve. If +- // any pair of those vertical intersections overlap the Y range +- // of the rectangle, we have an intersection. Otherwise, we don't. +- +- // c1tag = vertical intersection class of the endpoint segment +- // +- // Choose the y tag of the endpoint that was not on the same +- // side of the rectangle as the subsegment calculated above. +- // Note that we can "steal" the existing Y tag of that endpoint +- // since it will be provably the same as the vertical intersection. +- c1tag = ((c1tag * x1tag <= 0) ? y1tag : y2tag); +- +- // Now we have to calculate an array of solutions of the curve +- // with the "near vertical side" of the rectangle. Then we +- // need to sort the tags and do a pairwise range test to see +- // if either of the pairs of crossings spans the Y range of +- // the rectangle. +- // +- // Note that the c2tag can still tell us which vertical edge +- // to test against. +- fillEqn(eqn, (c2tag < INSIDE ? x : x+w), x1, ctrlx1, ctrlx2, x2); +- int num = solveCubic(eqn, res); +- num = evalCubic(res, num, true, true, null, y1, ctrly1, ctrly2, y2); +- +- // Now put all of the tags into a bucket and sort them. There +- // is an intersection iff one of the pairs of tags "spans" the +- // Y range of the rectangle. +- int tags[] = new int[num+1]; +- for (int i = 0; i < num; i++) { +- tags[i] = getTag(res[i], y, y+h); +- } +- tags[num] = c1tag; +- Arrays.sort(tags); +- return ((num >= 1 && tags[0] * tags[1] <= 0) || +- (num >= 3 && tags[2] * tags[3] <= 0)); ++ int numCrossings = rectCrossings(x, y, w, h); ++ // the intended return value is ++ // numCrossings != 0 || numCrossings == Curve.RECT_INTERSECTS ++ // but if (numCrossings != 0) numCrossings == INTERSECTS won't matter ++ // and if !(numCrossings != 0) then numCrossings == 0, so ++ // numCrossings != RECT_INTERSECT ++ return numCrossings != 0; + } + + /** diff -r 82d83ff8b150 -r fb1fdfc2f882 patches/openjdk/4645692-CubicCurve2D.solveCubic.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/4645692-CubicCurve2D.solveCubic.patch Sun Feb 06 13:08:35 2011 +0000 @@ -0,0 +1,717 @@ +diff -Nr --unified=3 ./openjdk.old/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java ./openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java +--- ./openjdk.old/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-02-01 10:52:21.560149275 -0500 ++++ ./openjdk/jdk/src/share/classes/java/awt/geom/CubicCurve2D.java 2011-02-01 10:52:37.112148647 -0500 +@@ -31,6 +31,10 @@ + import java.io.Serializable; + import sun.awt.geom.Curve; + ++import static java.lang.Math.abs; ++import static java.lang.Math.max; ++import static java.lang.Math.ulp; ++ + /** + * The CubicCurve2D class defines a cubic parametric curve + * segment in {@code (x,y)} coordinate space. +@@ -1083,95 +1087,286 @@ + * @since 1.3 + */ + public static int solveCubic(double eqn[], double res[]) { +- // From Numerical Recipes, 5.6, Quadratic and Cubic Equations +- double d = eqn[3]; +- if (d == 0.0) { +- // The cubic has degenerated to quadratic (or line or ...). ++ // From Graphics Gems: ++ // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c ++ final double d = eqn[3]; ++ if (d == 0) { + return QuadCurve2D.solveQuadratic(eqn, res); + } +- double a = eqn[2] / d; +- double b = eqn[1] / d; +- double c = eqn[0] / d; +- int roots = 0; +- double Q = (a * a - 3.0 * b) / 9.0; +- double R = (2.0 * a * a * a - 9.0 * a * b + 27.0 * c) / 54.0; +- double R2 = R * R; +- double Q3 = Q * Q * Q; +- a = a / 3.0; +- if (R2 < Q3) { +- double theta = Math.acos(R / Math.sqrt(Q3)); +- Q = -2.0 * Math.sqrt(Q); ++ ++ /* normal form: x^3 + Ax^2 + Bx + C = 0 */ ++ final double A = eqn[2] / d; ++ final double B = eqn[1] / d; ++ final double C = eqn[0] / d; ++ ++ ++ // substitute x = y - A/3 to eliminate quadratic term: ++ // x^3 +Px + Q = 0 ++ // ++ // Since we actually need P/3 and Q/2 for all of the ++ // calculations that follow, we will calculate ++ // p = P/3 ++ // q = Q/2 ++ // instead and use those values for simplicity of the code. ++ double sq_A = A * A; ++ double p = 1.0/3 * (-1.0/3 * sq_A + B); ++ double q = 1.0/2 * (2.0/27 * A * sq_A - 1.0/3 * A * B + C); ++ ++ /* use Cardano's formula */ ++ ++ double cb_p = p * p * p; ++ double D = q * q + cb_p; ++ ++ final double sub = 1.0/3 * A; ++ ++ int num; ++ if (D < 0) { /* Casus irreducibilis: three real solutions */ ++ // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method ++ double phi = 1.0/3 * Math.acos(-q / Math.sqrt(-cb_p)); ++ double t = 2 * Math.sqrt(-p); ++ + if (res == eqn) { +- // Copy the eqn so that we don't clobber it with the +- // roots. This is needed so that fixRoots can do its +- // work with the original equation. +- eqn = new double[4]; +- System.arraycopy(res, 0, eqn, 0, 4); ++ eqn = Arrays.copyOf(eqn, 4); + } +- res[roots++] = Q * Math.cos(theta / 3.0) - a; +- res[roots++] = Q * Math.cos((theta + Math.PI * 2.0)/ 3.0) - a; +- res[roots++] = Q * Math.cos((theta - Math.PI * 2.0)/ 3.0) - a; +- fixRoots(res, eqn); +- } else { +- boolean neg = (R < 0.0); +- double S = Math.sqrt(R2 - Q3); +- if (neg) { +- R = -R; ++ ++ res[ 0 ] = ( t * Math.cos(phi)); ++ res[ 1 ] = (-t * Math.cos(phi + Math.PI / 3)); ++ res[ 2 ] = (-t * Math.cos(phi - Math.PI / 3)); ++ num = 3; ++ ++ for (int i = 0; i < num; ++i) { ++ res[ i ] -= sub; + } +- double A = Math.pow(R + S, 1.0 / 3.0); +- if (!neg) { +- A = -A; ++ ++ } else { ++ // Please see the comment in fixRoots marked 'XXX' before changing ++ // any of the code in this case. From dlila at redhat.com Mon Feb 7 06:04:31 2011 From: dlila at redhat.com (Denis Lila) Date: Mon, 7 Feb 2011 09:04:31 -0500 (EST) Subject: reviewer needed: rendering performance backport. In-Reply-To: <20110205091257.GA2281@shelob.middle-earth.co.uk> Message-ID: <169604068.31088.1297087471920.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > Hmm, so what was changed from the 7 version? And which changeset does > this depend on? It depends on http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/47cd69eff641 and http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4d6f9aaa2600 > Could we not backport that first? We could, but the above also depend on some other changes that would need backporting. I'm not sure what these are yet. Should I look into it and backport everything necessary for the direct patch from openjdk7 to apply*? Thanks, Denis. *Note: this still won't be completely possible, since in openjdk7 I use @Override notations on methods that implement interface methods, and ecj doesn't like this, which causes problems with our build. From omajid at icedtea.classpath.org Tue Feb 8 13:54:03 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Tue, 08 Feb 2011 21:54:03 +0000 Subject: /hg/icedtea-web: Try to be as silent about proxy settings as pos... Message-ID: changeset c0d4bd69b8f7 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c0d4bd69b8f7 author: Omair Majid date: Tue Feb 08 16:51:56 2011 -0500 Try to be as silent about proxy settings as possible 2011-02-08 Omair Majid * netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java (initFromBrowserConfig): Do not try to create a URL from null. (getFromBrowser): Only print informational messages in debug mode. diffstat: 2 files changed, 13 insertions(+), 2 deletions(-) ChangeLog | 6 ++++++ netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java | 9 +++++++-- diffs (39 lines): diff -r 2d39fa58036e -r c0d4bd69b8f7 ChangeLog --- a/ChangeLog Tue Feb 01 21:07:03 2011 -0500 +++ b/ChangeLog Tue Feb 08 16:51:56 2011 -0500 @@ -1,3 +1,9 @@ 2011-02-01 Omair Majid + + * netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java + (initFromBrowserConfig): Do not try to create a URL from null. + (getFromBrowser): Only print informational messages in debug mode. + 2011-02-01 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java diff -r 2d39fa58036e -r c0d4bd69b8f7 netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java --- a/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Tue Feb 01 21:07:03 2011 -0500 +++ b/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Tue Feb 08 16:51:56 2011 -0500 @@ -120,7 +120,10 @@ public class BrowserAwareProxySelector e } try { - browserAutoConfigUrl = new URL(prefs.get("network.proxy.autoconfig_url")); + String url = prefs.get("network.proxy.autoconfig_url"); + if (url != null) { + browserAutoConfigUrl = new URL(url); + } } catch (MalformedURLException e) { e.printStackTrace(); } @@ -195,7 +198,9 @@ public class BrowserAwareProxySelector e if (optionDescription == null) { optionDescription = "Unknown"; } - System.err.println(R("RProxyFirefoxOptionNotImplemented", browserProxyType, optionDescription)); + if (JNLPRuntime.isDebug()) { + System.err.println(R("RProxyFirefoxOptionNotImplemented", browserProxyType, optionDescription)); + } proxies.add(Proxy.NO_PROXY); } From omajid at redhat.com Tue Feb 8 13:54:27 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 08 Feb 2011 16:54:27 -0500 Subject: [icedtea-web] RFC: make browser proxy less noisy In-Reply-To: <20110204075111.GB4044@redhat.com> References: <4D4BAC52.2000902@redhat.com> <20110204075111.GB4044@redhat.com> Message-ID: <4D51BB93.2010805@redhat.com> On 02/04/2011 02:51 AM, Deepak Bhole wrote: > * Omair Majid [2011-02-04 08:37]: >> Hi, >> >> The attached patch makes netx's firefox integration print fewer >> messages on stdout/err. The messages refer to missing things that >> were not implemented before, so not informing the user about it isnt >> a regression. >> >> Thoughts? >> > > Most users probably won't know what it means and it might alarm them > unnecessarily. It is probably best to keep it silent. > > Patch looks good to me, okay for HEAD after adding ChangeLog entry. > Done and pushed. Cheers, Omair From ahughes at redhat.com Tue Feb 8 13:56:45 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 8 Feb 2011 21:56:45 +0000 Subject: reviewer needed: rendering performance backport. In-Reply-To: <169604068.31088.1297087471920.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <20110205091257.GA2281@shelob.middle-earth.co.uk> <169604068.31088.1297087471920.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110208215645.GD29027@rivendell.middle-earth.co.uk> On 09:04 Mon 07 Feb , Denis Lila wrote: > > Hmm, so what was changed from the 7 version? And which changeset does > > this depend on? > > It depends on > http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/47cd69eff641 > and > http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4d6f9aaa2600 > These both look like they should be backported. > > Could we not backport that first? > > We could, but the above also depend on some other changes that would > need backporting. I'm not sure what these are yet. Should I look > into it and backport everything necessary for the direct patch from > openjdk7 to apply*? > Depends what's needed; we have to decide on a case-by-case basis. > Thanks, > Denis. > > *Note: this still won't be completely possible, since in openjdk7 > I use @Override notations on methods that implement interface methods, > and ecj doesn't like this, which causes problems with our build. That feature is part of 6 not 7 (and very badly documented). It's not a problem for ecj when set up with the correct source/target options. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dlila at redhat.com Tue Feb 8 14:04:21 2011 From: dlila at redhat.com (Denis Lila) Date: Tue, 8 Feb 2011 17:04:21 -0500 (EST) Subject: reviewer needed: rendering performance backport. In-Reply-To: <20110208215645.GD29027@rivendell.middle-earth.co.uk> Message-ID: <1969368915.115945.1297202661328.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > Depends what's needed; we have to decide on a case-by-case basis. Very well. Then I'll start making a list of everything and we can start backporting them. Regards, Denis. ----- Original Message ----- > On 09:04 Mon 07 Feb , Denis Lila wrote: > > > Hmm, so what was changed from the 7 version? And which changeset > > > does > > > this depend on? > > > > It depends on > > http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/47cd69eff641 > > and > > http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4d6f9aaa2600 > > > > These both look like they should be backported. > > > > Could we not backport that first? > > > > We could, but the above also depend on some other changes that would > > need backporting. I'm not sure what these are yet. Should I look > > into it and backport everything necessary for the direct patch from > > openjdk7 to apply*? > > > > > > Thanks, > > Denis. > > > > *Note: this still won't be completely possible, since in openjdk7 > > I use @Override notations on methods that implement interface > > methods, > > and ecj doesn't like this, which causes problems with our build. > > That feature is part of 6 not 7 (and very badly documented). It's not > a problem for ecj when set up with the correct source/target options. > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Tue Feb 8 16:19:02 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 08 Feb 2011 19:19:02 -0500 Subject: [icedtea-web] RFC: fix bug in proxy settings in control panel Message-ID: <4D51DD76.9020906@redhat.com> Hi, The attached fixes a bug in control panel. The bug makes the control panel lose part of the proxy address when "Advanced..." is clicked. Ok to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: controlpanel-fix-http-proxy-values.patch Type: text/x-patch Size: 867 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110208/bb79e6cd/controlpanel-fix-http-proxy-values.patch From dbhole at redhat.com Tue Feb 8 16:46:04 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 8 Feb 2011 19:46:04 -0500 Subject: [icedtea-web] RFC: fix bug in proxy settings in control panel In-Reply-To: <4D51DD76.9020906@redhat.com> References: <4D51DD76.9020906@redhat.com> Message-ID: <20110209004603.GI20763@redhat.com> * Omair Majid [2011-02-08 19:20]: > Hi, > > The attached fixes a bug in control panel. The bug makes the control > panel lose part of the proxy address when "Advanced..." is clicked. > > Ok to commit? > ChangeLog is missing. OK for commit to HEAD and 1.0 after that. Cheers, Deepak > Cheers, > Omair > diff -r 2d39fa58036e netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > --- a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Tue Feb 01 21:07:03 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Sat Feb 05 20:03:20 2011 -0500 > @@ -114,7 +114,7 @@ > addressField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1])); > > final JTextField portField = new JTextField(config.getProperty(properties[2]), 3); > - portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1])); > + portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[2])); > > // Create the button which allows setting of other types of proxy. > JButton advancedProxyButton = new JButton(Translator.R("NSAdvanced") + "..."); From andrew at icedtea.classpath.org Wed Feb 9 02:47:39 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 09 Feb 2011 10:47:39 +0000 Subject: /hg/icedtea6: S4421494, CVE-2010-4476: infinite loop while parsi... Message-ID: changeset a3ab67013879 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a3ab67013879 author: Andrew John Hughes date: Wed Feb 09 10:47:23 2011 +0000 S4421494, CVE-2010-4476: infinite loop while parsing double literal. 2011-02-09 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/security/20110209/4421494.patch: Add floating point bug fix. diffstat: 4 files changed, 116 insertions(+), 1 deletion(-) ChangeLog | 7 ++ Makefile.am | 2 NEWS | 2 patches/security/20110209/4421494.patch | 106 +++++++++++++++++++++++++++++++ diffs (148 lines): diff -r fb1fdfc2f882 -r a3ab67013879 ChangeLog --- a/ChangeLog Sun Feb 06 13:08:35 2011 +0000 +++ b/ChangeLog Wed Feb 09 10:47:23 2011 +0000 @@ -1,3 +1,10 @@ 2011-02-06 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/security/20110209/4421494.patch: + Add floating point bug fix. + 2011-02-06 Andrew John Hughes * Makefile.am: Add patches below. diff -r fb1fdfc2f882 -r a3ab67013879 Makefile.am --- a/Makefile.am Sun Feb 06 13:08:35 2011 +0000 +++ b/Makefile.am Wed Feb 09 10:47:23 2011 +0000 @@ -174,7 +174,7 @@ REWRITER_SRCS = $(abs_top_srcdir)/rewrit ICEDTEA_FSG_PATCHES = -SECURITY_PATCHES = +SECURITY_PATCHES = patches/security/20110209/4421494.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ diff -r fb1fdfc2f882 -r a3ab67013879 NEWS --- a/NEWS Sun Feb 06 13:08:35 2011 +0000 +++ b/NEWS Wed Feb 09 10:47:23 2011 +0000 @@ -15,6 +15,8 @@ New in release 1.10 (2011-XX-XX): * Shark provided upstream rather than as part of IcedTea. * The option --with-openjdk becomes --with-jdk-home and --disable-bootstrap * Support for building with HotSpot 20 from its stable tree +* Security updates + - S4421494, CVE-2010-4476: infinite loop while parsing double literal. * Import of OpenJDK6 b21 including upgrade to HotSpot 19 - S6961870: More rebranding fixes for templates/gpl-*-header files - S6976186: Shark build system changes diff -r fb1fdfc2f882 -r a3ab67013879 patches/security/20110209/4421494.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/security/20110209/4421494.patch Wed Feb 09 10:47:23 2011 +0000 @@ -0,0 +1,106 @@ +# HG changeset patch +# User alanb +# Date 1297019854 0 +# Node ID d00080320e439c339594d380f0322c865553a046 +# Parent f7afe7a5e086a6af1f23dd6304bcbe7fb2b6226a +4421494: infinite loop while parsing double literal +Reviewed-by: darcy, alanb +Contributed-by: dmitry.nadezhin at oracle.com + +diff --git a/src/share/classes/sun/misc/FloatingDecimal.java b/src/share/classes/sun/misc/FloatingDecimal.java +--- openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java ++++ openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java +@@ -1547,7 +1547,7 @@ public class FloatingDecimal{ + if ( (cmpResult = bigB.cmp( bigD ) ) > 0 ){ + overvalue = true; // our candidate is too big. + diff = bigB.sub( bigD ); +- if ( (bigIntNBits == 1) && (bigIntExp > -expBias) ){ ++ if ( (bigIntNBits == 1) && (bigIntExp > -expBias+1) ){ + // candidate is a normalized exact power of 2 and + // is too big. We will be subtracting. + // For our purposes, ulp is the ulp of the +diff --git a/test/java/lang/Double/ParseDouble.java b/test/java/lang/Double/ParseDouble.java +--- openjdk/jdk/test/java/lang/Double/ParseDouble.java ++++ openjdk/jdk/test/java/lang/Double/ParseDouble.java +@@ -23,11 +23,12 @@ + + /* + * @test +- * @bug 4160406 4705734 4707389 4826774 4895911 ++ * @bug 4160406 4705734 4707389 4826774 4895911 4421494 + * @summary Test for Double.parseDouble method and acceptance regex + */ + + import java.util.regex.*; ++import java.math.BigDecimal; + + public class ParseDouble { + +@@ -416,7 +417,15 @@ public class ParseDouble { + + "0x00100p1", + "0x00.100p1", +- "0x001.100p1" ++ "0x001.100p1", ++ ++ // Limits ++ ++ "1.7976931348623157E308", // Double.MAX_VALUE ++ "4.9e-324", // Double.MIN_VALUE ++ "2.2250738585072014e-308", // Double.MIN_NORMAL ++ ++ "2.2250738585072012e-308", // near Double.MIN_NORMAL + }; + + static String paddedBadStrings[]; +@@ -546,6 +555,42 @@ public class ParseDouble { + + } + ++ /** ++ * For each subnormal power of two, test at boundaries of ++ * region that should convert to that value. ++ */ ++ private static void testSubnormalPowers() { ++ BigDecimal TWO = BigDecimal.valueOf(2); ++ // An ulp is the same for all subnormal values ++ BigDecimal ulp_BD = new BigDecimal(Double.MIN_VALUE); ++ ++ System.out.println("Testing subnormal powers of two."); ++ for(int i = -1074; i <= -1022; i++) { ++ double d = Math.scalb(1.0, i); ++ ++ /* ++ * The region [d - ulp/2, d + ulp/2] should round to d. ++ */ ++ BigDecimal d_BD = new BigDecimal(d); ++ ++ BigDecimal lowerBound = d_BD.subtract(ulp_BD.divide(TWO)); ++ BigDecimal upperBound = d_BD.add(ulp_BD.divide(TWO)); ++ ++ double convertedLowerBound = Double.parseDouble(lowerBound.toString()); ++ double convertedUpperBound = Double.parseDouble(upperBound.toString()); ++ ++ if (convertedLowerBound != d) { ++ System.out.printf("Exponent %d, unexpected lower bound converted to %a, not %a.%n", ++ i, convertedLowerBound, d); ++ } ++ ++ if (convertedUpperBound != d) { ++ System.out.printf("Exponent %d, unexpected upper bound converted to %a, not %a.%n", ++ i, convertedUpperBound, d); ++ } ++ } ++ } ++ + public static void main(String[] args) throws Exception { + rudimentaryTest(); + +@@ -558,5 +603,7 @@ public class ParseDouble { + testRegex(paddedGoodStrings, false); + testRegex(badStrings, true); + testRegex(paddedBadStrings, true); ++ ++ testSubnormalPowers(); + } + } From andrew at icedtea.classpath.org Wed Feb 9 04:19:23 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 09 Feb 2011 12:19:23 +0000 Subject: /hg/release/icedtea6-1.7: 3 new changesets Message-ID: changeset e274c7313fff in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=e274c7313fff author: Andrew John Hughes date: Wed Feb 09 11:16:33 2011 +0000 S4421494, CVE-2010-4476: infinite loop while parsing double literal. 2011-02-09 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/security/20110209/4421494.patch: Add floating point bug fix. changeset 988c75b2751e in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=988c75b2751e author: Andrew John Hughes date: Wed Feb 09 11:17:48 2011 +0000 Bump to 1.7.9. 2011-02-09 Andrew John Hughes * NEWS: Update release date. * configure.ac: Bump to 1.7.9. changeset e989cf4930ff in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=e989cf4930ff author: Andrew John Hughes date: Wed Feb 09 12:12:20 2011 +0000 Added tag icedtea6-1.7.9 for changeset 988c75b2751e diffstat: 6 files changed, 126 insertions(+), 3 deletions(-) .hgtags | 1 ChangeLog | 12 +++ Makefile.am | 3 NEWS | 5 + configure.ac | 2 patches/security/20110209/4421494.patch | 106 +++++++++++++++++++++++++++++++ diffs (174 lines): diff -r d55f3f8e8d6c -r e989cf4930ff .hgtags --- a/.hgtags Tue Feb 01 18:14:24 2011 +0000 +++ b/.hgtags Wed Feb 09 12:12:20 2011 +0000 @@ -30,3 +30,4 @@ f5667b14ce7eb0dc9b121164a28d3b3fcd516c61 f5667b14ce7eb0dc9b121164a28d3b3fcd516c61 icedtea6-1.7.6 8784e22fa2897df7373ca8869e7dab8d3af8c8c9 icedtea6-1.7.7 626c4d1e1fa47b492bb41c8438f66aacd35146ae icedtea6-1.7.8 +988c75b2751e89209b8126b7a3d6d1379aa3e56e icedtea6-1.7.9 diff -r d55f3f8e8d6c -r e989cf4930ff ChangeLog --- a/ChangeLog Tue Feb 01 18:14:24 2011 +0000 +++ b/ChangeLog Wed Feb 09 12:12:20 2011 +0000 @@ -1,3 +1,15 @@ 2011-02-01 Andrew John Hughes + + * NEWS: Update release date. + * configure.ac: Bump to 1.7.9. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/security/20110209/4421494.patch: + Add floating point bug fix. + 2011-02-01 Andrew John Hughes * NEWS: Update for 1.7.9. diff -r d55f3f8e8d6c -r e989cf4930ff Makefile.am --- a/Makefile.am Tue Feb 01 18:14:24 2011 +0000 +++ b/Makefile.am Wed Feb 09 12:12:20 2011 +0000 @@ -260,7 +260,8 @@ SECURITY_PATCHES = \ patches/security/20101012/6961084.patch \ patches/security/20101012/6963285.patch \ patches/security/20101012/6981426.patch \ - patches/security/20101012/6990437.patch + patches/security/20101012/6990437.patch \ + patches/security/20110209/4421494.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ diff -r d55f3f8e8d6c -r e989cf4930ff NEWS --- a/NEWS Tue Feb 01 18:14:24 2011 +0000 +++ b/NEWS Wed Feb 09 12:12:20 2011 +0000 @@ -8,7 +8,10 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.7.9 (20XX-XX-XX): +New in release 1.7.9 (2011-02-09): + +* Security updates + - S4421494, CVE-2010-4476: infinite loop while parsing double literal. New in release 1.7.8 (2011-02-01): diff -r d55f3f8e8d6c -r e989cf4930ff configure.ac --- a/configure.ac Tue Feb 01 18:14:24 2011 +0000 +++ b/configure.ac Wed Feb 09 12:12:20 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [1.7.9pre], [distro- -AC_INIT([icedtea6], [1.7.9pre], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.7.9], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r d55f3f8e8d6c -r e989cf4930ff patches/security/20110209/4421494.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/security/20110209/4421494.patch Wed Feb 09 12:12:20 2011 +0000 @@ -0,0 +1,106 @@ +# HG changeset patch +# User alanb +# Date 1297019854 0 +# Node ID d00080320e439c339594d380f0322c865553a046 +# Parent f7afe7a5e086a6af1f23dd6304bcbe7fb2b6226a +4421494: infinite loop while parsing double literal +Reviewed-by: darcy, alanb +Contributed-by: dmitry.nadezhin at oracle.com + +diff --git a/src/share/classes/sun/misc/FloatingDecimal.java b/src/share/classes/sun/misc/FloatingDecimal.java +--- openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java ++++ openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java +@@ -1547,7 +1547,7 @@ public class FloatingDecimal{ + if ( (cmpResult = bigB.cmp( bigD ) ) > 0 ){ + overvalue = true; // our candidate is too big. + diff = bigB.sub( bigD ); +- if ( (bigIntNBits == 1) && (bigIntExp > -expBias) ){ ++ if ( (bigIntNBits == 1) && (bigIntExp > -expBias+1) ){ + // candidate is a normalized exact power of 2 and + // is too big. We will be subtracting. + // For our purposes, ulp is the ulp of the +diff --git a/test/java/lang/Double/ParseDouble.java b/test/java/lang/Double/ParseDouble.java +--- openjdk/jdk/test/java/lang/Double/ParseDouble.java ++++ openjdk/jdk/test/java/lang/Double/ParseDouble.java +@@ -23,11 +23,12 @@ + + /* + * @test +- * @bug 4160406 4705734 4707389 4826774 4895911 ++ * @bug 4160406 4705734 4707389 4826774 4895911 4421494 + * @summary Test for Double.parseDouble method and acceptance regex + */ + + import java.util.regex.*; ++import java.math.BigDecimal; + + public class ParseDouble { + +@@ -416,7 +417,15 @@ public class ParseDouble { + + "0x00100p1", + "0x00.100p1", +- "0x001.100p1" ++ "0x001.100p1", ++ ++ // Limits ++ ++ "1.7976931348623157E308", // Double.MAX_VALUE ++ "4.9e-324", // Double.MIN_VALUE ++ "2.2250738585072014e-308", // Double.MIN_NORMAL ++ ++ "2.2250738585072012e-308", // near Double.MIN_NORMAL + }; + + static String paddedBadStrings[]; +@@ -546,6 +555,42 @@ public class ParseDouble { + + } + ++ /** ++ * For each subnormal power of two, test at boundaries of ++ * region that should convert to that value. ++ */ ++ private static void testSubnormalPowers() { ++ BigDecimal TWO = BigDecimal.valueOf(2); ++ // An ulp is the same for all subnormal values ++ BigDecimal ulp_BD = new BigDecimal(Double.MIN_VALUE); ++ ++ System.out.println("Testing subnormal powers of two."); ++ for(int i = -1074; i <= -1022; i++) { ++ double d = Math.scalb(1.0, i); ++ ++ /* ++ * The region [d - ulp/2, d + ulp/2] should round to d. ++ */ ++ BigDecimal d_BD = new BigDecimal(d); ++ ++ BigDecimal lowerBound = d_BD.subtract(ulp_BD.divide(TWO)); ++ BigDecimal upperBound = d_BD.add(ulp_BD.divide(TWO)); ++ ++ double convertedLowerBound = Double.parseDouble(lowerBound.toString()); ++ double convertedUpperBound = Double.parseDouble(upperBound.toString()); ++ ++ if (convertedLowerBound != d) { ++ System.out.printf("Exponent %d, unexpected lower bound converted to %a, not %a.%n", ++ i, convertedLowerBound, d); ++ } ++ ++ if (convertedUpperBound != d) { ++ System.out.printf("Exponent %d, unexpected upper bound converted to %a, not %a.%n", ++ i, convertedUpperBound, d); ++ } ++ } ++ } ++ + public static void main(String[] args) throws Exception { + rudimentaryTest(); + +@@ -558,5 +603,7 @@ public class ParseDouble { + testRegex(paddedGoodStrings, false); + testRegex(badStrings, true); + testRegex(paddedBadStrings, true); ++ ++ testSubnormalPowers(); + } + } From andrew at icedtea.classpath.org Wed Feb 9 05:24:29 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 09 Feb 2011 13:24:29 +0000 Subject: /hg/release/icedtea6-1.8: 3 new changesets Message-ID: changeset 04cd613daca9 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=04cd613daca9 author: Andrew John Hughes date: Wed Feb 09 12:36:05 2011 +0000 S4421494, CVE-2010-4476: infinite loop while parsing double literal. 2011-02-09 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/security/20110209/4421494.patch: Add floating point bug fix. changeset c43e42301ab8 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=c43e42301ab8 author: Andrew John Hughes date: Wed Feb 09 12:37:22 2011 +0000 Bump to 1.8.6. 2011-02-09 Andrew John Hughes * NEWS: Update release date. * configure.ac: Bump to 1.8.6. changeset ee9e4603217a in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=ee9e4603217a author: Andrew John Hughes date: Wed Feb 09 12:59:53 2011 +0000 Added tag icedtea6-1.8.6 for changeset c43e42301ab8 diffstat: 6 files changed, 121 insertions(+), 3 deletions(-) .hgtags | 1 ChangeLog | 7 ++ Makefile.am | 3 NEWS | 5 + configure.ac | 2 patches/security/20110209/4421494.patch | 106 +++++++++++++++++++++++++++++++ diffs (169 lines): diff -r 6e111db7700c -r ee9e4603217a .hgtags --- a/.hgtags Tue Feb 01 18:15:36 2011 +0000 +++ b/.hgtags Wed Feb 09 12:59:53 2011 +0000 @@ -26,3 +26,4 @@ 4f06af1897c3feff8708ff35a94df642f363d190 4f06af1897c3feff8708ff35a94df642f363d190 icedtea6-1.8.3 975f7989ae6615f5d0cbce3089291a7c8841364f icedtea6-1.8.4 e41dfe105a4113a351e90bd1ce22c81f06f3e68c icedtea6-1.8.5 +c43e42301ab86152257fc7eb9c249b2be2c1accc icedtea6-1.8.6 diff -r 6e111db7700c -r ee9e4603217a ChangeLog --- a/ChangeLog Tue Feb 01 18:15:36 2011 +0000 +++ b/ChangeLog Wed Feb 09 12:59:53 2011 +0000 @@ -1,3 +1,10 @@ 2011-02-01 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/security/20110209/4421494.patch: + Add floating point bug fix. + 2011-02-01 Andrew John Hughes * NEWS: Update for 1.8.6. diff -r 6e111db7700c -r ee9e4603217a Makefile.am --- a/Makefile.am Tue Feb 01 18:15:36 2011 +0000 +++ b/Makefile.am Wed Feb 09 12:59:53 2011 +0000 @@ -251,7 +251,8 @@ SECURITY_PATCHES = \ patches/security/20101012/6961084.patch \ patches/security/20101012/6963285.patch \ patches/security/20101012/6981426.patch \ - patches/security/20101012/6990437.patch + patches/security/20101012/6990437.patch \ + patches/security/20110209/4421494.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ diff -r 6e111db7700c -r ee9e4603217a NEWS --- a/NEWS Tue Feb 01 18:15:36 2011 +0000 +++ b/NEWS Wed Feb 09 12:59:53 2011 +0000 @@ -8,7 +8,10 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.8.6 (20XX-XX-XX): +New in release 1.8.6 (2011-02-09): + +* Security updates + - S4421494, CVE-2010-4476: infinite loop while parsing double literal. New in release 1.8.5 (2011-02-01): diff -r 6e111db7700c -r ee9e4603217a configure.ac --- a/configure.ac Tue Feb 01 18:15:36 2011 +0000 +++ b/configure.ac Wed Feb 09 12:59:53 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.8.6pre],[distro-pk -AC_INIT([icedtea6],[1.8.6pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.8.6],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 6e111db7700c -r ee9e4603217a patches/security/20110209/4421494.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/security/20110209/4421494.patch Wed Feb 09 12:59:53 2011 +0000 @@ -0,0 +1,106 @@ +# HG changeset patch +# User alanb +# Date 1297019854 0 +# Node ID d00080320e439c339594d380f0322c865553a046 +# Parent f7afe7a5e086a6af1f23dd6304bcbe7fb2b6226a +4421494: infinite loop while parsing double literal +Reviewed-by: darcy, alanb +Contributed-by: dmitry.nadezhin at oracle.com + +diff --git a/src/share/classes/sun/misc/FloatingDecimal.java b/src/share/classes/sun/misc/FloatingDecimal.java +--- openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java ++++ openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java +@@ -1547,7 +1547,7 @@ public class FloatingDecimal{ + if ( (cmpResult = bigB.cmp( bigD ) ) > 0 ){ + overvalue = true; // our candidate is too big. + diff = bigB.sub( bigD ); +- if ( (bigIntNBits == 1) && (bigIntExp > -expBias) ){ ++ if ( (bigIntNBits == 1) && (bigIntExp > -expBias+1) ){ + // candidate is a normalized exact power of 2 and + // is too big. We will be subtracting. + // For our purposes, ulp is the ulp of the +diff --git a/test/java/lang/Double/ParseDouble.java b/test/java/lang/Double/ParseDouble.java +--- openjdk/jdk/test/java/lang/Double/ParseDouble.java ++++ openjdk/jdk/test/java/lang/Double/ParseDouble.java +@@ -23,11 +23,12 @@ + + /* + * @test +- * @bug 4160406 4705734 4707389 4826774 4895911 ++ * @bug 4160406 4705734 4707389 4826774 4895911 4421494 + * @summary Test for Double.parseDouble method and acceptance regex + */ + + import java.util.regex.*; ++import java.math.BigDecimal; + + public class ParseDouble { + +@@ -416,7 +417,15 @@ public class ParseDouble { + + "0x00100p1", + "0x00.100p1", +- "0x001.100p1" ++ "0x001.100p1", ++ ++ // Limits ++ ++ "1.7976931348623157E308", // Double.MAX_VALUE ++ "4.9e-324", // Double.MIN_VALUE ++ "2.2250738585072014e-308", // Double.MIN_NORMAL ++ ++ "2.2250738585072012e-308", // near Double.MIN_NORMAL + }; + + static String paddedBadStrings[]; +@@ -546,6 +555,42 @@ public class ParseDouble { + + } + ++ /** ++ * For each subnormal power of two, test at boundaries of ++ * region that should convert to that value. ++ */ ++ private static void testSubnormalPowers() { ++ BigDecimal TWO = BigDecimal.valueOf(2); ++ // An ulp is the same for all subnormal values ++ BigDecimal ulp_BD = new BigDecimal(Double.MIN_VALUE); ++ ++ System.out.println("Testing subnormal powers of two."); ++ for(int i = -1074; i <= -1022; i++) { ++ double d = Math.scalb(1.0, i); ++ ++ /* ++ * The region [d - ulp/2, d + ulp/2] should round to d. ++ */ ++ BigDecimal d_BD = new BigDecimal(d); ++ ++ BigDecimal lowerBound = d_BD.subtract(ulp_BD.divide(TWO)); ++ BigDecimal upperBound = d_BD.add(ulp_BD.divide(TWO)); ++ ++ double convertedLowerBound = Double.parseDouble(lowerBound.toString()); ++ double convertedUpperBound = Double.parseDouble(upperBound.toString()); ++ ++ if (convertedLowerBound != d) { ++ System.out.printf("Exponent %d, unexpected lower bound converted to %a, not %a.%n", ++ i, convertedLowerBound, d); ++ } ++ ++ if (convertedUpperBound != d) { ++ System.out.printf("Exponent %d, unexpected upper bound converted to %a, not %a.%n", ++ i, convertedUpperBound, d); ++ } ++ } ++ } ++ + public static void main(String[] args) throws Exception { + rudimentaryTest(); + +@@ -558,5 +603,7 @@ public class ParseDouble { + testRegex(paddedGoodStrings, false); + testRegex(badStrings, true); + testRegex(paddedBadStrings, true); ++ ++ testSubnormalPowers(); + } + } From andrew at icedtea.classpath.org Wed Feb 9 05:24:49 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 09 Feb 2011 13:24:49 +0000 Subject: /hg/release/icedtea6-1.9: 3 new changesets Message-ID: changeset 0719a880282c in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=0719a880282c author: Andrew John Hughes date: Wed Feb 09 10:57:48 2011 +0000 S4421494, CVE-2010-4476: infinite loop while parsing double literal. 2011-02-09 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/security/20110209/4421494.patch: Add floating point bug fix. changeset 03258f7ff910 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=03258f7ff910 author: Andrew John Hughes date: Wed Feb 09 10:59:03 2011 +0000 Bump to 1.9.6. 2011-02-09 Andrew John Hughes * NEWS: Update release date. * configure.ac: Bump to 1.9.6. changeset 9bd3a32c627d in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=9bd3a32c627d author: Andrew John Hughes date: Wed Feb 09 13:24:43 2011 +0000 Added tag icedtea6-1.9.6 for changeset 03258f7ff910 diffstat: 6 files changed, 125 insertions(+), 3 deletions(-) .hgtags | 1 ChangeLog | 12 +++ Makefile.am | 3 NEWS | 4 - configure.ac | 2 patches/security/20110209/4421494.patch | 106 +++++++++++++++++++++++++++++++ diffs (174 lines): diff -r 5328f1ab65e1 -r 9bd3a32c627d .hgtags --- a/.hgtags Tue Feb 01 18:17:32 2011 +0000 +++ b/.hgtags Wed Feb 09 13:24:43 2011 +0000 @@ -25,3 +25,4 @@ 42cb6cbb7ba6fbbcdd3499ea91c283637994db98 42cb6cbb7ba6fbbcdd3499ea91c283637994db98 icedtea6-1.9.3 fdefc65b1e3f7ab140ce4da42716c2439796dfda icedtea6-1.9.4 a55e0ec59e4287f9df15f666503dbe500f1a61ea icedtea6-1.9.5 +03258f7ff9107c7e3be6931df2093b8395db89e4 icedtea6-1.9.6 diff -r 5328f1ab65e1 -r 9bd3a32c627d ChangeLog --- a/ChangeLog Tue Feb 01 18:17:32 2011 +0000 +++ b/ChangeLog Wed Feb 09 13:24:43 2011 +0000 @@ -1,3 +1,15 @@ 2011-02-01 Andrew John Hughes + + * NEWS: Update release date. + * configure.ac: Bump to 1.9.6. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/security/20110209/4421494.patch: + Add floating point bug fix. + 2011-02-01 Andrew John Hughes * NEWS: Update for 1.9.6. diff -r 5328f1ab65e1 -r 9bd3a32c627d Makefile.am --- a/Makefile.am Tue Feb 01 18:17:32 2011 +0000 +++ b/Makefile.am Wed Feb 09 13:24:43 2011 +0000 @@ -218,7 +218,8 @@ SECURITY_PATCHES = \ patches/security/20101012/6961084.patch \ patches/security/20101012/6963285.patch \ patches/security/20101012/6981426.patch \ - patches/security/20101012/6990437.patch + patches/security/20101012/6990437.patch \ + patches/security/20110209/4421494.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ diff -r 5328f1ab65e1 -r 9bd3a32c627d NEWS --- a/NEWS Tue Feb 01 18:17:32 2011 +0000 +++ b/NEWS Wed Feb 09 13:24:43 2011 +0000 @@ -8,8 +8,10 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.9.6 (20XX-XX-XX): +New in release 1.9.6 (2011-02-09): +* Security updates + - S4421494, CVE-2010-4476: infinite loop while parsing double literal. New in release 1.9.5 (2011-02-01): diff -r 5328f1ab65e1 -r 9bd3a32c627d configure.ac --- a/configure.ac Tue Feb 01 18:17:32 2011 +0000 +++ b/configure.ac Wed Feb 09 13:24:43 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.9.6pre],[distro-pk -AC_INIT([icedtea6],[1.9.6pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.9.6],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 5328f1ab65e1 -r 9bd3a32c627d patches/security/20110209/4421494.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/security/20110209/4421494.patch Wed Feb 09 13:24:43 2011 +0000 @@ -0,0 +1,106 @@ +# HG changeset patch +# User alanb +# Date 1297019854 0 +# Node ID d00080320e439c339594d380f0322c865553a046 +# Parent f7afe7a5e086a6af1f23dd6304bcbe7fb2b6226a +4421494: infinite loop while parsing double literal +Reviewed-by: darcy, alanb +Contributed-by: dmitry.nadezhin at oracle.com + +diff --git a/src/share/classes/sun/misc/FloatingDecimal.java b/src/share/classes/sun/misc/FloatingDecimal.java +--- openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java ++++ openjdk/jdk/src/share/classes/sun/misc/FloatingDecimal.java +@@ -1547,7 +1547,7 @@ public class FloatingDecimal{ + if ( (cmpResult = bigB.cmp( bigD ) ) > 0 ){ + overvalue = true; // our candidate is too big. + diff = bigB.sub( bigD ); +- if ( (bigIntNBits == 1) && (bigIntExp > -expBias) ){ ++ if ( (bigIntNBits == 1) && (bigIntExp > -expBias+1) ){ + // candidate is a normalized exact power of 2 and + // is too big. We will be subtracting. + // For our purposes, ulp is the ulp of the +diff --git a/test/java/lang/Double/ParseDouble.java b/test/java/lang/Double/ParseDouble.java +--- openjdk/jdk/test/java/lang/Double/ParseDouble.java ++++ openjdk/jdk/test/java/lang/Double/ParseDouble.java +@@ -23,11 +23,12 @@ + + /* + * @test +- * @bug 4160406 4705734 4707389 4826774 4895911 ++ * @bug 4160406 4705734 4707389 4826774 4895911 4421494 + * @summary Test for Double.parseDouble method and acceptance regex + */ + + import java.util.regex.*; ++import java.math.BigDecimal; + + public class ParseDouble { + +@@ -416,7 +417,15 @@ public class ParseDouble { + + "0x00100p1", + "0x00.100p1", +- "0x001.100p1" ++ "0x001.100p1", ++ ++ // Limits ++ ++ "1.7976931348623157E308", // Double.MAX_VALUE ++ "4.9e-324", // Double.MIN_VALUE ++ "2.2250738585072014e-308", // Double.MIN_NORMAL ++ ++ "2.2250738585072012e-308", // near Double.MIN_NORMAL + }; + + static String paddedBadStrings[]; +@@ -546,6 +555,42 @@ public class ParseDouble { + + } + ++ /** ++ * For each subnormal power of two, test at boundaries of ++ * region that should convert to that value. ++ */ ++ private static void testSubnormalPowers() { ++ BigDecimal TWO = BigDecimal.valueOf(2); ++ // An ulp is the same for all subnormal values ++ BigDecimal ulp_BD = new BigDecimal(Double.MIN_VALUE); ++ ++ System.out.println("Testing subnormal powers of two."); ++ for(int i = -1074; i <= -1022; i++) { ++ double d = Math.scalb(1.0, i); ++ ++ /* ++ * The region [d - ulp/2, d + ulp/2] should round to d. ++ */ ++ BigDecimal d_BD = new BigDecimal(d); ++ ++ BigDecimal lowerBound = d_BD.subtract(ulp_BD.divide(TWO)); ++ BigDecimal upperBound = d_BD.add(ulp_BD.divide(TWO)); ++ ++ double convertedLowerBound = Double.parseDouble(lowerBound.toString()); ++ double convertedUpperBound = Double.parseDouble(upperBound.toString()); ++ ++ if (convertedLowerBound != d) { ++ System.out.printf("Exponent %d, unexpected lower bound converted to %a, not %a.%n", ++ i, convertedLowerBound, d); ++ } ++ ++ if (convertedUpperBound != d) { ++ System.out.printf("Exponent %d, unexpected upper bound converted to %a, not %a.%n", ++ i, convertedUpperBound, d); ++ } ++ } ++ } ++ + public static void main(String[] args) throws Exception { + rudimentaryTest(); + +@@ -558,5 +603,7 @@ public class ParseDouble { + testRegex(paddedGoodStrings, false); + testRegex(badStrings, true); + testRegex(paddedBadStrings, true); ++ ++ testSubnormalPowers(); + } + } From ahughes at redhat.com Wed Feb 9 05:29:57 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 9 Feb 2011 13:29:57 +0000 Subject: [SECURITY] IcedTea6 1.7.9, 1.8.6, 1.9.6 Released! Message-ID: <20110209132957.GD17151@rivendell.middle-earth.co.uk> We are pleased to announce a new set of security releases, IcedTea6 1.7.9, IcedTea6 1.8.6 and IcedTea6 1.9.6. This update contains the following security updates: * S4421494, CVE-2010-4476: infinite loop while parsing double literal. The IcedTea project provides a harness to build the source code from OpenJDK6 using Free Software build tools. It also includes the only Free Java plugin and Web Start implementation, and support for additional architectures over and above x86, x86_64 and SPARC via the Zero assembler port. What?s New? ?????? IcedTea6 1.7.9 ============== * Security updates - S4421494, CVE-2010-4476: infinite loop while parsing double literal. IcedTea6 1.8.6 ============== * Security updates - S4421494, CVE-2010-4476: infinite loop while parsing double literal. IcedTea6 1.9.6 ============== * Security updates - S4421494, CVE-2010-4476: infinite loop while parsing double literal. The tarballs can be downloaded from: * http://icedtea.classpath.org/download/source/icedtea6-1.7.9.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.8.6.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.9.6.tar.gz SHA256 sums: 496b615ccad2a950783b1a2f30a8657956f8c9d9bccb6ab9effc1164ab830792 icedtea6-1.7.9.tar.gz d392c95e76b5bdf21fb4bce8fc5cdc530bdf5bda014cb96fa9cd3efdfdbeff87 icedtea6-1.8.6.tar.gz 100e61fbc3157b4839413951b0247f7ccabb0dcff6d037fbb372d5a13088adc2 icedtea6-1.9.6.tar.gz The following people helped with these releases: Andrew Haley, Andrew John Hughes, Dmitry Nadezhin We would also like to thank the bug reporters and testers! To get started: $ tar xzf icedtea6-.tar.gz $ cd icedtea6- Full build requirements and instructions are in INSTALL: $ ./configure [--enable-zero --enable-pulse-java --enable-systemtap ...] $ make -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From asu at redhat.com Wed Feb 9 05:55:42 2011 From: asu at redhat.com (Andrew Su) Date: Wed, 9 Feb 2011 08:55:42 -0500 (EST) Subject: [icedtea-web] RFC: fix bug in proxy settings in control panel In-Reply-To: <20110209004603.GI20763@redhat.com> Message-ID: <1378521674.366730.1297259742793.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Deepak Bhole" > To: "Omair Majid" > Cc: "IcedTea" > Sent: Tuesday, February 8, 2011 7:46:04 PM > Subject: Re: [icedtea-web] RFC: fix bug in proxy settings in control panel > * Omair Majid [2011-02-08 19:20]: > > Hi, > > > > The attached fixes a bug in control panel. The bug makes the control > > panel lose part of the proxy address when "Advanced..." is clicked. > > > > Ok to commit? > > > > ChangeLog is missing. OK for commit to HEAD and 1.0 after that. Hi, 1.0 doesn't use DocumentAdapter. So it should be in HEAD only. Cheers, Andrew > > > diff -r 2d39fa58036e > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > --- > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > Tue Feb 01 21:07:03 2011 -0500 > > +++ > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > Sat Feb 05 20:03:20 2011 -0500 > > @@ -114,7 +114,7 @@ > > addressField.getDocument().addDocumentListener(new > > DocumentAdapter(config, properties[1])); > > > > final JTextField portField = new > > JTextField(config.getProperty(properties[2]), 3); > > - portField.getDocument().addDocumentListener(new > > DocumentAdapter(config, properties[1])); > > + portField.getDocument().addDocumentListener(new > > DocumentAdapter(config, properties[2])); > > > > // Create the button which allows setting of other types of > > proxy. > > JButton advancedProxyButton = new > > JButton(Translator.R("NSAdvanced") + "..."); From omajid at icedtea.classpath.org Wed Feb 9 07:03:02 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 09 Feb 2011 15:03:02 +0000 Subject: /hg/icedtea-web: Fix bug where proxy settings in itweb-settings ... Message-ID: changeset a6b173d91ad1 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=a6b173d91ad1 author: Omair Majid date: Wed Feb 09 10:02:46 2011 -0500 Fix bug where proxy settings in itweb-settings were being lost 2011-02-09 Omair Majid * netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java (addComponents): Fix the listener attached to the port field to update the right config option. diffstat: 2 files changed, 7 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java | 2 +- diffs (25 lines): diff -r c0d4bd69b8f7 -r a6b173d91ad1 ChangeLog --- a/ChangeLog Tue Feb 08 16:51:56 2011 -0500 +++ b/ChangeLog Wed Feb 09 10:02:46 2011 -0500 @@ -1,3 +1,9 @@ 2011-02-08 Omair Majid + + * netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java + (addComponents): Fix the listener attached to the port field to update the + right config option. + 2011-02-08 Omair Majid * netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java diff -r c0d4bd69b8f7 -r a6b173d91ad1 netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java --- a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Tue Feb 08 16:51:56 2011 -0500 +++ b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Wed Feb 09 10:02:46 2011 -0500 @@ -114,7 +114,7 @@ public class NetworkSettingsPanel extend addressField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1])); final JTextField portField = new JTextField(config.getProperty(properties[2]), 3); - portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1])); + portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[2])); // Create the button which allows setting of other types of proxy. JButton advancedProxyButton = new JButton(Translator.R("NSAdvanced") + "..."); From omajid at redhat.com Wed Feb 9 07:03:22 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 09 Feb 2011 10:03:22 -0500 Subject: [icedtea-web] RFC: fix bug in proxy settings in control panel In-Reply-To: <20110209004603.GI20763@redhat.com> References: <4D51DD76.9020906@redhat.com> <20110209004603.GI20763@redhat.com> Message-ID: <4D52ACBA.80402@redhat.com> On 02/08/2011 07:46 PM, Deepak Bhole wrote: > * Omair Majid [2011-02-08 19:20]: >> Hi, >> >> The attached fixes a bug in control panel. The bug makes the control >> panel lose part of the proxy address when "Advanced..." is clicked. >> >> Ok to commit? >> > > ChangeLog is missing. OK for commit to HEAD and 1.0 after that. > I have pushed it to HEAD with a changelog. Cheers, Omair From omajid at redhat.com Wed Feb 9 07:05:11 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 09 Feb 2011 10:05:11 -0500 Subject: [icedtea-web] RFC: stop JNLPPolicy from granting duplicate permissions to a CodeSource In-Reply-To: <4D0BE9A4.8080100@redhat.com> References: <4D0BE9A4.8080100@redhat.com> Message-ID: <4D52AD27.2030707@redhat.com> On 12/17/2010 05:52 PM, Omair Majid wrote: > Hi, > > The attached patch modifies JNLPPolicy so that it does grant permissions > that the CodeSource already has. > > As described in Java 2 Platform Security Second Edition section 5.6 (and > can be seen in the implementation of ProtectionDomain and Policy > classes), whenever permission checks are needed, static permissions and > then dynamic permissions are consulted. > > Static permission to CodeSources are granted by the (subclasses of) > SecureClassLoader, while dynamic permissions are granted by the current > Policy. > > In IcedTea-Web, JNLPPolicy consults JNLPClassLoader to grant all the > static permissions again (in addition to any dynamic ones). The result > is that CodeSources are given the same permissions twice. This is > unnecessary and should be fixed. The attached patch accomplishes that. > > This is not a major problem but it does make stepping through the > JNLPPolicy class a little annoying. It also gives the impression that to > grant a CodeSource different permissions than those granted by the > JNLPClassLoader, modifying the JNLPPolicy is enough, which may lead to > subtle bugs later on. > > Cheers, > Omair Ping. Any thoughts? Thanks, Omair From omajid at redhat.com Wed Feb 9 07:06:00 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 09 Feb 2011 10:06:00 -0500 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <4D4087DF.3030303@redhat.com> References: <4D40873E.7010502@redhat.com> <4D4087DF.3030303@redhat.com> Message-ID: <4D52AD58.9060804@redhat.com> On 01/26/2011 03:45 PM, Omair Majid wrote: > On 01/26/2011 03:42 PM, Omair Majid wrote: >> Hi, >> >> The attached patch adds support for packEnabled and versionEnabled >> properties in JNLP files. This allows JNLP applications to use pack200 >> compression and versioned jars without requiring special server >> configuration/software. It also fixes bug RH669942. >> > > More information about packEnabled and versionEnabled is available at > http://download.oracle.com/javase/6/docs/technotes/guides/jweb/tools/pack200.html > > Ping. Any thoughts or comments? Cheers, Omair From omajid at redhat.com Wed Feb 9 07:10:58 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 09 Feb 2011 10:10:58 -0500 Subject: [icedtea-web] RFC: remove pluginappletviewer binary Message-ID: <4D52AE82.20605@redhat.com> Hi, The attached patch removes the pluginappletviewer binary from icedtea-web. Okay to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: remove-pluginappletviewer-binary-01.patch Type: text/x-patch Size: 2707 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110209/cb2a2430/remove-pluginappletviewer-binary-01.patch From ahughes at redhat.com Wed Feb 9 08:42:56 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 9 Feb 2011 16:42:56 +0000 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <4D40873E.7010502@redhat.com> References: <4D40873E.7010502@redhat.com> Message-ID: <20110209164256.GH17151@rivendell.middle-earth.co.uk> On 15:42 Wed 26 Jan , Omair Majid wrote: > Hi, > > The attached patch adds support for packEnabled and versionEnabled > properties in JNLP files. This allows JNLP applications to use pack200 > compression and versioned jars without requiring special server > configuration/software. It also fixes bug RH669942. > > The patch adds a new class DownloadOptions which specify download > options for jars (currently just version and pack200 support). Another > new class ResourceUrlCreator is used to get a list of valid urls for a > resource. ResourceTracker now uses ResourceUrlCreator to get the list of > valid urls for downloading a jar and then tries to find the best one. > initializeResource() and downloadResource() both use this url. > downloadResource() has been modified to look at the file extension as > well as the content-encoding when deciding whether a file is compressed > or not. > > The patch is much bigger than I had expected it to be. It also affects > core functionality - downloading jars. I would appreciate any comments > and suggestions for improvements. > > Thanks, > Omair > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=669942 Comments inline. > diff -r 64da2a80df88 NEWS > --- a/NEWS Tue Jan 25 10:19:20 2011 -0500 > +++ b/NEWS Wed Jan 26 15:31:51 2011 -0500 > @@ -8,6 +8,10 @@ > > CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY > > +New in release 1.1 (2011-XX-XX): > +* Netx fixes and improvements > + - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) > + > New in release 1.0 (2010-XX-XX): > > * Initial release of IcedTea-Web > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/DownloadOptions.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/DownloadOptions.java Wed Jan 26 15:31:51 2011 -0500 > @@ -0,0 +1,63 @@ > +/* DownloadOptions.java > + Copyright (C) 2011 Red Hat, Inc > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +IcedTea is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. */ > + > +package net.sourceforge.jnlp; > + > +public class DownloadOptions { > + > + private final boolean usePack200; > + private final boolean useVersion; > + > + public DownloadOptions(boolean usePack, boolean useVersion) { > + this.usePack200 = usePack; > + this.useVersion = useVersion; > + } > + > + public boolean useExplicitPack() { > + return usePack200; > + } > + > + public boolean useExplicitVersion() { > + return useVersion; > + } > + > + @Override > + public String toString() { > + return "use pack: " + usePack200 + "; use version: " + useVersion; > + } > + > +} > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/JNLPFile.java > --- a/netx/net/sourceforge/jnlp/JNLPFile.java Tue Jan 25 10:19:20 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Wed Jan 26 15:31:51 2011 -0500 > @@ -248,7 +248,7 @@ > > try { > ResourceTracker tracker = new ResourceTracker(false); // no prefetch > - tracker.addResource(location, version, policy); > + tracker.addResource(location, version, null, policy); > > return tracker.getInputStream(location); > } catch (Exception ex) { > @@ -362,7 +362,7 @@ > } > > /** > - * Returns the information section of the JNLP file for the > + * Returns the resources section of the JNLP file for the > * specified locale, os, and arch. > */ > public ResourcesDesc getResources(final Locale locale, final String os, final String arch) { > @@ -392,6 +392,31 @@ > } > > /** > + * Returns the resources section of the JNLP file as viewed > + * through the default locale and the os.name and os.arch > + * properties. > + */ > + public ResourcesDesc[] getResourceDescs() { > + return getResourcesDescs(defaultLocale, defaultOS, defaultArch); > + } > + > + /** > + * Returns the resources section of the JNLP file for the > + * specified locale, os, and arch. > + */ > + public ResourcesDesc[] getResourcesDescs(final Locale locale, final String os, final String arch) { > + List matchingResources = new ArrayList(); > + for (ResourcesDesc rescDesc: resources) { > + if (localMatches(locale, rescDesc.getLocales()) > + && stringMatches(os, rescDesc.getOS()) > + && stringMatches(arch, rescDesc.getArch())) { > + matchingResources.add(rescDesc); > + } > + } > + return matchingResources.toArray(new ResourcesDesc[0]); > + } > + > + /** > * Returns an object of one of the following types: AppletDesc, > * ApplicationDesc and InstallerDesc > */ > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/Launcher.java > --- a/netx/net/sourceforge/jnlp/Launcher.java Tue Jan 25 10:19:20 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Jan 26 15:31:51 2011 -0500 > @@ -417,7 +417,7 @@ > IconDesc.SPLASH, preferredWidth, preferredHeight); > if (splashImageURL != null) { > ResourceTracker resourceTracker = new ResourceTracker(true); > - resourceTracker.addResource(splashImageURL, file.getFileVersion(), updatePolicy); > + resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, updatePolicy); > splashScreen = new JNLPSplashScreen(resourceTracker, null, null); > splashScreen.setSplashImageURL(splashImageURL); > if (splashScreen.isSplashScreenValid()) { > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/CacheUtil.java > --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Tue Jan 25 10:19:20 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Wed Jan 26 15:31:51 2011 -0500 > @@ -76,7 +76,7 @@ > */ > public static URL getCachedResource(URL location, Version version, UpdatePolicy policy) { > ResourceTracker rt = new ResourceTracker(); > - rt.addResource(location, version, policy); > + rt.addResource(location, version, null, policy); > try { > File f = rt.getCacheFile(location); > // TODO: Should be toURI().toURL() > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/Resource.java > --- a/netx/net/sourceforge/jnlp/cache/Resource.java Tue Jan 25 10:19:20 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Wed Jan 26 15:31:51 2011 -0500 > @@ -67,6 +67,9 @@ > /** the remote location of the resource */ > URL location; > > + /** the location to use when downloading */ > + private URL downloadLocation; > + > /** the local file downloaded to */ > File localFile; > > @@ -96,6 +99,7 @@ > */ > private Resource(URL location, Version requestVersion, UpdatePolicy updatePolicy) { > this.location = location; > + this.downloadLocation = location; > this.requestVersion = requestVersion; > this.updatePolicy = updatePolicy; > } > @@ -130,6 +134,24 @@ > } > > /** > + * Returns the URL to use for downloading the resource. This can be > + * different from the original location since it may use a different > + * file name to support versioning and compression > + * @return the url to use when downloading > + */ > + public URL getDownloadLocation() { > + return downloadLocation; > + } > + > + /** > + * Set the url to use for downloading the resource > + * @param location > + */ > + public void setDownloadLocation(URL location) { > + downloadLocation = location; > + } > + > + /** > * Returns the tracker that first created or monitored the > * resource, or null if no trackers are monitoring the resource. > */ > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceTracker.java > --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jan 25 10:19:20 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Jan 26 15:31:51 2011 -0500 > @@ -29,12 +29,15 @@ > import java.net.URL; > import java.net.URLConnection; > import java.util.ArrayList; > +import java.util.HashMap; > import java.util.List; > +import java.util.Map; > import java.util.jar.JarOutputStream; > import java.util.jar.Pack200; > import java.util.jar.Pack200.Unpacker; > import java.util.zip.GZIPInputStream; > > +import net.sourceforge.jnlp.DownloadOptions; > import net.sourceforge.jnlp.Version; > import net.sourceforge.jnlp.event.DownloadEvent; > import net.sourceforge.jnlp.event.DownloadListener; > @@ -117,6 +120,9 @@ > /** resources requested to be downloaded */ > private static ArrayList queue = new ArrayList(); > > + private static Map downloadOptions = > + new HashMap(); > + > /** resource trackers threads are working for (used for load balancing across multi-tracker downloads) */ > private static ArrayList active = > new ArrayList(); // > @@ -163,7 +169,7 @@ > * @param version the resource version > * @param updatePolicy whether to check for updates if already in cache > */ > - public void addResource(URL location, Version version, UpdatePolicy updatePolicy) { > + public void addResource(URL location, Version version, DownloadOptions options, UpdatePolicy updatePolicy) { > if (location == null) > throw new IllegalArgumentException("location==null"); > > @@ -177,6 +183,11 @@ > resources.add(resource); > } > > + if (options == null) { > + options = new DownloadOptions(false, false); > + } > + downloadOptions.put(resource, options); > + > // checkCache may take a while (loads properties file). this > // should really be synchronized on resources, but the worst > // case should be that the resource will be updated once even > @@ -621,7 +632,8 @@ > > try { > // create out second in case in does not exist > - URLConnection con = getVersionedResourceURL(resource).openConnection(); > + URL realLocation = resource.getDownloadLocation(); > + URLConnection con = realLocation.openConnection(); > con.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); > > con.connect(); > @@ -636,16 +648,16 @@ > String contentEncoding = con.getContentEncoding(); > > if (JNLPRuntime.isDebug()) { > - System.err.println("Content encoding for " + resource.location + ": " > - + contentEncoding); > + System.out.println("Downloading" + resource.location + " using " + > + realLocation + " (encoding : " + contentEncoding + ")"); > + Shouldn't this still be System.err? > } > > - if (contentEncoding != null) { > - if (contentEncoding.equals("gzip")) { > - downloadLocation = new URL(downloadLocation.toString() + ".gz"); > - } else if (contentEncoding.equals("pack200-gzip")) { > - downloadLocation = new URL(downloadLocation.toString() + ".pack.gz"); > - } > + if ("gzip".equals(contentEncoding)) { > + downloadLocation = new URL(downloadLocation.toString() + ".gz"); > + } else if ("pack200-gzip".equals(contentEncoding) || > + realLocation.getPath().endsWith(".pack.gz")) { > + downloadLocation = new URL(downloadLocation.toString() + ".pack.gz"); > } > > InputStream in = new BufferedInputStream(con.getInputStream()); > @@ -668,8 +680,8 @@ > /* > * If the file was compressed, uncompress it. > */ > - if (contentEncoding != null) { > - if (contentEncoding.equals("gzip")) { > + > + if ("gzip".equals(contentEncoding)) { > GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil > .getCacheFile(downloadLocation, resource.downloadVersion))); > InputStream inputStream = new BufferedInputStream(gzInputStream); > @@ -686,7 +698,8 @@ > inputStream.close(); > gzInputStream.close(); > > - } else if (contentEncoding.equals("pack200-gzip")) { > + } else if ("pack200-gzip".equals(contentEncoding) || > + realLocation.getPath().endsWith(".pack.gz")) { > GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( > CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); > InputStream inputStream = new BufferedInputStream(gzInputStream); > @@ -701,7 +714,7 @@ > inputStream.close(); > gzInputStream.close(); > } > - } > + I'm not sure these changes are necessary. Although you eliminate the null check, it does create a lot of additional noise for no apparent change. Maybe something for a seperate patch? > > resource.changeStatus(DOWNLOADING, DOWNLOADED); > synchronized (lock) { > @@ -731,7 +744,9 @@ > File localFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); > > // connect > - URLConnection connection = getVersionedResourceURL(resource).openConnection(); // this won't change so should be okay unsynchronized > + URL finalLocation = findBestUrl(resource); > + resource.setDownloadLocation(finalLocation); > + URLConnection connection = finalLocation.openConnection(); // this won't change so should be okay unsynchronized > connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); > > int size = connection.getContentLength(); > @@ -777,27 +792,45 @@ > } > > /** > - * Returns the versioned url for a resource > - * @param resource the resource to get the url for > + * Returns the best URL to use for downloading the resource > + * > + * @param resource the resource > + * @return a URL or null > */ > - private URL getVersionedResourceURL(Resource resource) { > - String actualLocation = resource.location.getProtocol() + "://" > - + resource.location.getHost(); > - if (resource.location.getPort() != -1) { > - actualLocation += ":" + resource.location.getPort(); > + private URL findBestUrl(Resource resource) { > + DownloadOptions options = downloadOptions.get(resource); > + if (options == null) { > + options = new DownloadOptions(false, false); > } > - actualLocation += resource.location.getPath(); > - if (resource.requestVersion != null > - && resource.requestVersion.isVersionId()) { > - actualLocation += "?version-id=" + resource.requestVersion; > + > + List urls = new ResourceUrlCreator(resource, options).getUrls(); > + if (JNLPRuntime.isDebug()) { > + System.out.println(urls); System.err? Possibly with some kind of description of what is being printed. > } > - URL versionedURL; > - try { > - versionedURL = new URL(actualLocation); > - } catch (MalformedURLException e) { > - return resource.location; > + URL bestUrl = null; > + for (int i = 0; i < urls.size(); i++) { > + URL url = urls.get(i); > + try { > + URLConnection connection = url.openConnection(); > + connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); > + if (connection instanceof HttpURLConnection) { > + HttpURLConnection con = (HttpURLConnection)connection; > + int responseCode = con.getResponseCode(); > + if (responseCode == -1 || responseCode < 200 || responseCode >= 300) { > + continue; > + } > + } > + if (JNLPRuntime.isDebug()) { > + System.out.println("best url for " + resource.toString() + " is " + url.toString()); > + } > + bestUrl = url; > + break; > + } catch (IOException e) { > + // continue > + } > } > - return versionedURL; > + > + return bestUrl; > } > > /** > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Wed Jan 26 15:31:51 2011 -0500 > @@ -0,0 +1,163 @@ > +/* ResourceUrlCreator.java > + Copyright (C) 2011 Red Hat, Inc > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +IcedTea is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. */ > + > +package net.sourceforge.jnlp.cache; > + > +import java.net.MalformedURLException; > +import java.net.URL; > +import java.util.LinkedList; > +import java.util.List; > + > +import net.sourceforge.jnlp.DownloadOptions; > + > +public class ResourceUrlCreator { > + > + protected final Resource resource; > + protected final DownloadOptions downloadOptions; > + > + public ResourceUrlCreator(Resource resource, DownloadOptions downloadOptions) { > + this.resource = resource; > + this.downloadOptions = downloadOptions; > + } > + > + /** > + * Returns a list of URLs that the resources might be downloadable from. > + * The Resources may not be downloadable from any of them. The returned order is the order > + * the urls should be attempted in. > + * @return > + */ > + public List getUrls() { > + List urls = new LinkedList(); > + URL url = null; > + > + if (downloadOptions.useExplicitPack() && downloadOptions.useExplicitVersion()) { > + url = getUrl(resource, true, true); > + if (url != null) { > + urls.add(url); > + } > + url = getUrl(resource, false, true); > + if (url != null) { > + urls.add(url); > + } > + url = getUrl(resource, true, false); > + if (url != null) { > + urls.add(url); > + } > + } else if (downloadOptions.useExplicitPack()) { > + url = getUrl(resource, true, false); > + if (url != null) { > + urls.add(url); > + } > + } else if (downloadOptions.useExplicitVersion()) { > + url = getUrl(resource, false, true); > + if (url != null) { > + urls.add(url); > + } > + } > + > + url = getVersionedUrlUsingQuery(resource); > + urls.add(url); > + > + urls.add(resource.getLocation()); > + > + return urls; > + } > + > + /** > + * Returns a url for the resource. > + * @param resource the resource > + * @param usePack whether the URL should point to the pack200 file > + * @param useVersion whether the URL should be modified to include the version > + * @return a URL for the resource or null if an appropraite URL can not be found > + */ > + protected URL getUrl(Resource resource, boolean usePack, boolean useVersion) { getURL? > + if (!(usePack || useVersion)) { > + throw new IllegalArgumentException("either pack200 or version required"); > + } > + > + String location = resource.getLocation().toString(); > + int lastSlash = resource.getLocation().toString().lastIndexOf('/'); > + if (lastSlash == -1) { > + return resource.getLocation(); > + } > + String filename = location.substring(lastSlash + 1); > + if (useVersion && resource.requestVersion != null) { > + String parts[] = filename.split("\\.", 2); > + String name = parts[0]; > + String extension = parts[1]; > + filename = name + "__V" + resource.requestVersion + "." + extension; > + } > + if (usePack) { > + filename = filename.replace(".jar", ".pack.gz"); > + } > + > + location = location.substring(0, lastSlash + 1) + filename; > + try { > + URL newUrl = new URL(location); > + return newUrl; > + } catch (MalformedURLException e) { > + return null; > + } > + } > + > + /** > + * Returns the URL for a resource, relying on HTTP query for getting the > + * right version > + * > + * @param resource the resource to get the url for > + */ > + protected URL getVersionedUrlUsingQuery(Resource resource) { > + String actualLocation = resource.getLocation().getProtocol() + "://" > + + resource.getLocation().getHost(); > + if (resource.getLocation().getPort() != -1) { > + actualLocation += ":" + resource.getLocation().getPort(); > + } > + actualLocation += resource.getLocation().getPath(); > + if (resource.requestVersion != null > + && resource.requestVersion.isVersionId()) { > + actualLocation += "?version-id=" + resource.requestVersion; > + } > + URL versionedURL; > + try { > + versionedURL = new URL(actualLocation); > + } catch (MalformedURLException e) { > + return resource.getLocation(); > + } > + return versionedURL; > + } > + > +} > \ No newline at end of file > diff -r 64da2a80df88 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Jan 25 10:19:20 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Jan 26 15:31:51 2011 -0500 > @@ -45,6 +45,7 @@ > import java.util.jar.JarEntry; > import java.util.jar.JarFile; > > +import net.sourceforge.jnlp.DownloadOptions; > import net.sourceforge.jnlp.ExtensionDesc; > import net.sourceforge.jnlp.JARDesc; > import net.sourceforge.jnlp.JNLPFile; > @@ -406,6 +407,7 @@ > > tracker.addResource(jars[i].getLocation(), > jars[i].getVersion(), > + getDownloadOptionsForJar(jars[i]), > jars[i].isCacheable() ? JNLPRuntime.getDefaultUpdatePolicy() : UpdatePolicy.FORCE > ); > } > @@ -1003,6 +1005,7 @@ > > tracker.addResource(desc.getLocation(), > desc.getVersion(), > + null, > JNLPRuntime.getDefaultUpdatePolicy() > ); > > @@ -1243,4 +1246,27 @@ > jarLocationSecurityMap.put(key, extLoader.jarLocationSecurityMap.get(key)); > } > } > + > + private DownloadOptions getDownloadOptionsForJar(JARDesc jar) { > + boolean usePack = false; > + boolean useVersion = false; > + > + ResourcesDesc[] descs = file.getResourceDescs(); > + for (ResourcesDesc desc: descs) { > + JARDesc[] jars = desc.getJARs(); > + for (JARDesc aJar: jars) { > + if (jar == aJar) { > + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.packEnabled"))) { > + usePack = true; > + } > + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.versionEnabled"))) { > + useVersion = true; > + } Is Boolean.valueOf necessary? Won't autoboxing handle this? > + } > + } > + } > + > + return new DownloadOptions(usePack, useVersion); > + } > + > } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Wed Feb 9 08:47:24 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 09 Feb 2011 16:47:24 +0000 Subject: /hg/release/icedtea6-1.9: Prepare for 1.9.7 Message-ID: changeset 358ff8b91c6e in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=358ff8b91c6e author: Andrew John Hughes date: Wed Feb 09 16:47:14 2011 +0000 Prepare for 1.9.7 2011-02-09 Andrew John Hughes * NEWS: Add 1.9.7. * configure.ac: Bump to 1.9.7pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r 9bd3a32c627d -r 358ff8b91c6e ChangeLog --- a/ChangeLog Wed Feb 09 13:24:43 2011 +0000 +++ b/ChangeLog Wed Feb 09 16:47:14 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-09 Andrew John Hughes + + * NEWS: Add 1.9.7. + * configure.ac: Bump to 1.9.7pre. + 2011-02-09 Andrew John Hughes * NEWS: Update release date. diff -r 9bd3a32c627d -r 358ff8b91c6e NEWS --- a/NEWS Wed Feb 09 13:24:43 2011 +0000 +++ b/NEWS Wed Feb 09 16:47:14 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.9.7 (2011-XX-XX): New in release 1.9.6 (2011-02-09): diff -r 9bd3a32c627d -r 358ff8b91c6e configure.ac --- a/configure.ac Wed Feb 09 13:24:43 2011 +0000 +++ b/configure.ac Wed Feb 09 16:47:14 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.9.6],[distro-pkg-d -AC_INIT([icedtea6],[1.9.6],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.9.7pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Wed Feb 9 09:57:10 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 09 Feb 2011 17:57:10 +0000 Subject: /hg/release/icedtea6-1.8: Prepare for 1.8.7. Message-ID: changeset 2b6e470ee8b5 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=2b6e470ee8b5 author: Andrew John Hughes date: Wed Feb 09 17:56:54 2011 +0000 Prepare for 1.8.7. 2011-02-09 Andrew John Hughes * NEWS: Add 1.8.7. * configure.ac: Bump to 1.8.7pre. diffstat: 3 files changed, 13 insertions(+), 1 deletion(-) ChangeLog | 10 ++++++++++ NEWS | 2 ++ configure.ac | 2 +- diffs (38 lines): diff -r ee9e4603217a -r 2b6e470ee8b5 ChangeLog --- a/ChangeLog Wed Feb 09 12:59:53 2011 +0000 +++ b/ChangeLog Wed Feb 09 17:56:54 2011 +0000 @@ -1,3 +1,13 @@ 2011-02-09 Andrew John Hughes + + * NEWS: Add 1.8.7. + * configure.ac: Bump to 1.8.7pre. + +2011-02-09 Andrew John Hughes + + * NEWS: Update release date. + * configure.ac: Bump to 1.8.6. + 2011-02-09 Andrew John Hughes * Makefile.am: Add patch. diff -r ee9e4603217a -r 2b6e470ee8b5 NEWS --- a/NEWS Wed Feb 09 12:59:53 2011 +0000 +++ b/NEWS Wed Feb 09 17:56:54 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.8.7 (2011-XX-XX): New in release 1.8.6 (2011-02-09): diff -r ee9e4603217a -r 2b6e470ee8b5 configure.ac --- a/configure.ac Wed Feb 09 12:59:53 2011 +0000 +++ b/configure.ac Wed Feb 09 17:56:54 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.8.6],[distro-pkg-d -AC_INIT([icedtea6],[1.8.6],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.8.7pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Wed Feb 9 09:58:43 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 09 Feb 2011 17:58:43 +0000 Subject: /hg/release/icedtea6-1.7: Prepare for 1.7.10. Message-ID: changeset 24077bd3fcd4 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=24077bd3fcd4 author: Andrew John Hughes date: Wed Feb 09 17:58:33 2011 +0000 Prepare for 1.7.10. 2011-02-09 Andrew John Hughes * NEWS: Add 1.7.10. * configure.ac: Bump to 1.7.10pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r e989cf4930ff -r 24077bd3fcd4 ChangeLog --- a/ChangeLog Wed Feb 09 12:12:20 2011 +0000 +++ b/ChangeLog Wed Feb 09 17:58:33 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-09 Andrew John Hughes + + * NEWS: Add 1.7.10. + * configure.ac: Bump to 1.7.10pre. + 2011-02-09 Andrew John Hughes * NEWS: Update release date. diff -r e989cf4930ff -r 24077bd3fcd4 NEWS --- a/NEWS Wed Feb 09 12:12:20 2011 +0000 +++ b/NEWS Wed Feb 09 17:58:33 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.7.10 (2011-XX-XX): New in release 1.7.9 (2011-02-09): diff -r e989cf4930ff -r 24077bd3fcd4 configure.ac --- a/configure.ac Wed Feb 09 12:12:20 2011 +0000 +++ b/configure.ac Wed Feb 09 17:58:33 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [1.7.9], [distro-pkg -AC_INIT([icedtea6], [1.7.9], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.7.10pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From omajid at redhat.com Wed Feb 9 10:04:56 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 09 Feb 2011 13:04:56 -0500 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <20110209164256.GH17151@rivendell.middle-earth.co.uk> References: <4D40873E.7010502@redhat.com> <20110209164256.GH17151@rivendell.middle-earth.co.uk> Message-ID: <4D52D748.7020701@redhat.com> On 02/09/2011 11:42 AM, Dr Andrew John Hughes wrote: > On 15:42 Wed 26 Jan , Omair Majid wrote: >> Hi, >> >> The attached patch adds support for packEnabled and versionEnabled >> properties in JNLP files. This allows JNLP applications to use pack200 >> compression and versioned jars without requiring special server >> configuration/software. It also fixes bug RH669942. >> >> The patch adds a new class DownloadOptions which specify download >> options for jars (currently just version and pack200 support). Another >> new class ResourceUrlCreator is used to get a list of valid urls for a >> resource. ResourceTracker now uses ResourceUrlCreator to get the list of >> valid urls for downloading a jar and then tries to find the best one. >> initializeResource() and downloadResource() both use this url. >> downloadResource() has been modified to look at the file extension as >> well as the content-encoding when deciding whether a file is compressed >> or not. >> >> The patch is much bigger than I had expected it to be. It also affects >> core functionality - downloading jars. I would appreciate any comments >> and suggestions for improvements. >> >> Thanks, >> Omair >> >> [1] https://bugzilla.redhat.com/show_bug.cgi?id=669942 > > Comments inline. > Thanks for looking it over. >> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceTracker.java >> --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jan 25 10:19:20 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Jan 26 15:31:51 2011 -0500 >> @@ -636,16 +648,16 @@ >> String contentEncoding = con.getContentEncoding(); >> >> if (JNLPRuntime.isDebug()) { >> - System.err.println("Content encoding for " + resource.location + ": " >> - + contentEncoding); >> + System.out.println("Downloading" + resource.location + " using " + >> + realLocation + " (encoding : " + contentEncoding + ")"); >> + > > Shouldn't this still be System.err? > I like to send most debug output to System.out, but I dont think it's a big deal. I can change it if you like. >> @@ -686,7 +698,8 @@ >> inputStream.close(); >> gzInputStream.close(); >> >> - } else if (contentEncoding.equals("pack200-gzip")) { >> + } else if ("pack200-gzip".equals(contentEncoding) || >> + realLocation.getPath().endsWith(".pack.gz")) { >> GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( >> CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); >> InputStream inputStream = new BufferedInputStream(gzInputStream); > > I'm not sure these changes are necessary. Although you eliminate the null check, it does create > a lot of additional noise for no apparent change. Maybe something for a seperate patch? > No, it's actually required here. It's the simplest way I can think of to make the existing code that dealt with content-encoding also work for pack.gz files. Before, we would ask the server for foo.jar and the server could send it with content-encoding pack200-gzip (by actually sending foo.pack.gz). With this patch, we ask the server for foo.pack.gz directly. The server sends foo.pack.gz with null content encoding. We must deal with this in the exact same way as foo.jar with content encoding pack200-gzip. Notice these lines in the patch: - } else if (contentEncoding.equals("pack200-gzip")) { + } else if ("pack200-gzip".equals(contentEncoding) || + realLocation.getPath().endsWith(".pack.gz")) { If realLocation.getPath().endsWith(".pack.gz") is true, then contentEncoding is null. Perhaps I should have made it more explicit. >> @@ -777,27 +792,45 @@ >> } >> >> /** >> - * Returns the versioned url for a resource >> - * @param resource the resource to get the url for >> + * Returns the best URL to use for downloading the resource >> + * >> + * @param resource the resource >> + * @return a URL or null >> */ >> - private URL getVersionedResourceURL(Resource resource) { >> - String actualLocation = resource.location.getProtocol() + "://" >> - + resource.location.getHost(); >> - if (resource.location.getPort() != -1) { >> - actualLocation += ":" + resource.location.getPort(); >> + private URL findBestUrl(Resource resource) { >> + DownloadOptions options = downloadOptions.get(resource); >> + if (options == null) { >> + options = new DownloadOptions(false, false); >> } >> - actualLocation += resource.location.getPath(); >> - if (resource.requestVersion != null >> -&& resource.requestVersion.isVersionId()) { >> - actualLocation += "?version-id=" + resource.requestVersion; >> + >> + List urls = new ResourceUrlCreator(resource, options).getUrls(); >> + if (JNLPRuntime.isDebug()) { >> + System.out.println(urls); > > System.err? Possibly with some kind of description of what is being printed. > I have still left it as System.out, but added a better description. >> } >> - URL versionedURL; >> - try { >> - versionedURL = new URL(actualLocation); >> - } catch (MalformedURLException e) { >> - return resource.location; >> + URL bestUrl = null; >> + for (int i = 0; i< urls.size(); i++) { >> + URL url = urls.get(i); >> + try { >> + URLConnection connection = url.openConnection(); >> + connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); >> + if (connection instanceof HttpURLConnection) { >> + HttpURLConnection con = (HttpURLConnection)connection; >> + int responseCode = con.getResponseCode(); >> + if (responseCode == -1 || responseCode< 200 || responseCode>= 300) { >> + continue; >> + } >> + } >> + if (JNLPRuntime.isDebug()) { >> + System.out.println("best url for " + resource.toString() + " is " + url.toString()); >> + } >> + bestUrl = url; >> + break; >> + } catch (IOException e) { >> + // continue >> + } >> } >> - return versionedURL; >> + >> + return bestUrl; >> } >> >> /** >> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Wed Jan 26 15:31:51 2011 -0500 >> @@ -0,0 +1,163 @@ >> +/* ResourceUrlCreator.java >> + Copyright (C) 2011 Red Hat, Inc >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or modify >> +it under the terms of the GNU General Public License as published by >> +the Free Software Foundation; either version 2, or (at your option) >> +any later version. >> + >> +IcedTea is distributed in the hope that it will be useful, but >> +WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to the >> +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give you >> +permission to link this library with independent modules to produce an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. */ >> + >> +package net.sourceforge.jnlp.cache; >> + >> +import java.net.MalformedURLException; >> +import java.net.URL; >> +import java.util.LinkedList; >> +import java.util.List; >> + >> +import net.sourceforge.jnlp.DownloadOptions; >> + >> +public class ResourceUrlCreator { >> + >> + protected final Resource resource; >> + protected final DownloadOptions downloadOptions; >> + >> + public ResourceUrlCreator(Resource resource, DownloadOptions downloadOptions) { >> + this.resource = resource; >> + this.downloadOptions = downloadOptions; >> + } >> + >> + /** >> + * Returns a list of URLs that the resources might be downloadable from. >> + * The Resources may not be downloadable from any of them. The returned order is the order >> + * the urls should be attempted in. >> + * @return >> + */ >> + public List getUrls() { >> + List urls = new LinkedList(); >> + URL url = null; >> + >> + if (downloadOptions.useExplicitPack()&& downloadOptions.useExplicitVersion()) { >> + url = getUrl(resource, true, true); >> + if (url != null) { >> + urls.add(url); >> + } >> + url = getUrl(resource, false, true); >> + if (url != null) { >> + urls.add(url); >> + } >> + url = getUrl(resource, true, false); >> + if (url != null) { >> + urls.add(url); >> + } >> + } else if (downloadOptions.useExplicitPack()) { >> + url = getUrl(resource, true, false); >> + if (url != null) { >> + urls.add(url); >> + } >> + } else if (downloadOptions.useExplicitVersion()) { >> + url = getUrl(resource, false, true); >> + if (url != null) { >> + urls.add(url); >> + } >> + } >> + >> + url = getVersionedUrlUsingQuery(resource); >> + urls.add(url); >> + >> + urls.add(resource.getLocation()); >> + >> + return urls; >> + } >> + >> + /** >> + * Returns a url for the resource. >> + * @param resource the resource >> + * @param usePack whether the URL should point to the pack200 file >> + * @param useVersion whether the URL should be modified to include the version >> + * @return a URL for the resource or null if an appropraite URL can not be found >> + */ >> + protected URL getUrl(Resource resource, boolean usePack, boolean useVersion) { > > getURL? > I have been naming variables/methods as *Url* for a while now, including multiple methods in this patch itself (look at the method above this one). The advice mentioned on http://www.ibm.com/developerworks/library/ws-tip-namingconv.html#h7 makes sense to me. What do you think? >> + if (!(usePack || useVersion)) { >> + throw new IllegalArgumentException("either pack200 or version required"); >> + } >> + >> + String location = resource.getLocation().toString(); >> + int lastSlash = resource.getLocation().toString().lastIndexOf('/'); >> + if (lastSlash == -1) { >> + return resource.getLocation(); >> + } >> + String filename = location.substring(lastSlash + 1); >> + if (useVersion&& resource.requestVersion != null) { >> + String parts[] = filename.split("\\.", 2); >> + String name = parts[0]; >> + String extension = parts[1]; >> + filename = name + "__V" + resource.requestVersion + "." + extension; >> + } >> + if (usePack) { >> + filename = filename.replace(".jar", ".pack.gz"); >> + } >> + >> + location = location.substring(0, lastSlash + 1) + filename; >> + try { >> + URL newUrl = new URL(location); >> + return newUrl; >> + } catch (MalformedURLException e) { >> + return null; >> + } >> + } >> + >> + /** >> + * Returns the URL for a resource, relying on HTTP query for getting the >> + * right version >> + * >> + * @param resource the resource to get the url for >> + */ >> + protected URL getVersionedUrlUsingQuery(Resource resource) { >> + String actualLocation = resource.getLocation().getProtocol() + "://" >> + + resource.getLocation().getHost(); >> + if (resource.getLocation().getPort() != -1) { >> + actualLocation += ":" + resource.getLocation().getPort(); >> + } >> + actualLocation += resource.getLocation().getPath(); >> + if (resource.requestVersion != null >> +&& resource.requestVersion.isVersionId()) { >> + actualLocation += "?version-id=" + resource.requestVersion; >> + } >> + URL versionedURL; >> + try { >> + versionedURL = new URL(actualLocation); >> + } catch (MalformedURLException e) { >> + return resource.getLocation(); >> + } >> + return versionedURL; >> + } >> + >> +} >> \ No newline at end of file >> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java >> --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Jan 25 10:19:20 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Jan 26 15:31:51 2011 -0500 >> @@ -1243,4 +1246,27 @@ >> jarLocationSecurityMap.put(key, extLoader.jarLocationSecurityMap.get(key)); >> } >> } >> + >> + private DownloadOptions getDownloadOptionsForJar(JARDesc jar) { >> + boolean usePack = false; >> + boolean useVersion = false; >> + >> + ResourcesDesc[] descs = file.getResourceDescs(); >> + for (ResourcesDesc desc: descs) { >> + JARDesc[] jars = desc.getJARs(); >> + for (JARDesc aJar: jars) { >> + if (jar == aJar) { >> + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.packEnabled"))) { >> + usePack = true; >> + } >> + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.versionEnabled"))) { >> + useVersion = true; >> + } > > Is Boolean.valueOf necessary? Won't autoboxing handle this? > propertiesMap is a Map. It contains key,value pairs for system properties (eg "swing.useSystemFontSettings"). So autoboxing cant handle it. Any other thoughts or comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: 669942-add-pack-and-version-03.patch Type: text/x-patch Size: 25507 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110209/f7320382/669942-add-pack-and-version-03.patch From ahughes at redhat.com Wed Feb 9 14:33:09 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 9 Feb 2011 22:33:09 +0000 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <4D52D748.7020701@redhat.com> References: <4D40873E.7010502@redhat.com> <20110209164256.GH17151@rivendell.middle-earth.co.uk> <4D52D748.7020701@redhat.com> Message-ID: <20110209223309.GN17151@rivendell.middle-earth.co.uk> On 13:04 Wed 09 Feb , Omair Majid wrote: > On 02/09/2011 11:42 AM, Dr Andrew John Hughes wrote: > > On 15:42 Wed 26 Jan , Omair Majid wrote: > >> Hi, > >> > >> The attached patch adds support for packEnabled and versionEnabled > >> properties in JNLP files. This allows JNLP applications to use pack200 > >> compression and versioned jars without requiring special server > >> configuration/software. It also fixes bug RH669942. > >> > >> The patch adds a new class DownloadOptions which specify download > >> options for jars (currently just version and pack200 support). Another > >> new class ResourceUrlCreator is used to get a list of valid urls for a > >> resource. ResourceTracker now uses ResourceUrlCreator to get the list of > >> valid urls for downloading a jar and then tries to find the best one. > >> initializeResource() and downloadResource() both use this url. > >> downloadResource() has been modified to look at the file extension as > >> well as the content-encoding when deciding whether a file is compressed > >> or not. > >> > >> The patch is much bigger than I had expected it to be. It also affects > >> core functionality - downloading jars. I would appreciate any comments > >> and suggestions for improvements. > >> > >> Thanks, > >> Omair > >> > >> [1] https://bugzilla.redhat.com/show_bug.cgi?id=669942 > > > > Comments inline. > > > > Thanks for looking it over. > > >> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceTracker.java > >> --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jan 25 10:19:20 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Jan 26 15:31:51 2011 -0500 > >> @@ -636,16 +648,16 @@ > >> String contentEncoding = con.getContentEncoding(); > >> > >> if (JNLPRuntime.isDebug()) { > >> - System.err.println("Content encoding for " + resource.location + ": " > >> - + contentEncoding); > >> + System.out.println("Downloading" + resource.location + " using " + > >> + realLocation + " (encoding : " + contentEncoding + ")"); > >> + > > > > Shouldn't this still be System.err? > > > > I like to send most debug output to System.out, but I dont think it's a > big deal. I can change it if you like. > I'd prefer System.err but I could live with System.out as long as we're consistent. Is there output on System.out that appears regardless of whether debugging is on or off? If so, the debug dependent stuff should be on System.err so it can be captured separately. > >> @@ -686,7 +698,8 @@ > >> inputStream.close(); > >> gzInputStream.close(); > >> > >> - } else if (contentEncoding.equals("pack200-gzip")) { > >> + } else if ("pack200-gzip".equals(contentEncoding) || > >> + realLocation.getPath().endsWith(".pack.gz")) { > >> GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( > >> CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); > >> InputStream inputStream = new BufferedInputStream(gzInputStream); > > > > I'm not sure these changes are necessary. Although you eliminate the null check, it does create > > a lot of additional noise for no apparent change. Maybe something for a seperate patch? > > > > No, it's actually required here. It's the simplest way I can think of to > make the existing code that dealt with content-encoding also work for > pack.gz files. Before, we would ask the server for foo.jar and the > server could send it with content-encoding pack200-gzip (by actually > sending foo.pack.gz). With this patch, we ask the server for foo.pack.gz > directly. The server sends foo.pack.gz with null content encoding. We > must deal with this in the exact same way as foo.jar with content > encoding pack200-gzip. > > Notice these lines in the patch: > - } else if (contentEncoding.equals("pack200-gzip")) { > + } else if ("pack200-gzip".equals(contentEncoding) || > + realLocation.getPath().endsWith(".pack.gz")) { > > If realLocation.getPath().endsWith(".pack.gz") is true, then > contentEncoding is null. Perhaps I should have made it more explicit. You've snipped some of what I was commenting about. I agree the additional conditional needs to be there but there's a lot of change in that area just to flip the equals comparison which hides the actual if extension. The bit above that you snipped is JUST a change in the equals and could be done in a separate patch. > > >> @@ -777,27 +792,45 @@ > >> } > >> > >> /** > >> - * Returns the versioned url for a resource > >> - * @param resource the resource to get the url for > >> + * Returns the best URL to use for downloading the resource > >> + * > >> + * @param resource the resource > >> + * @return a URL or null > >> */ > >> - private URL getVersionedResourceURL(Resource resource) { > >> - String actualLocation = resource.location.getProtocol() + "://" > >> - + resource.location.getHost(); > >> - if (resource.location.getPort() != -1) { > >> - actualLocation += ":" + resource.location.getPort(); > >> + private URL findBestUrl(Resource resource) { > >> + DownloadOptions options = downloadOptions.get(resource); > >> + if (options == null) { > >> + options = new DownloadOptions(false, false); > >> } > >> - actualLocation += resource.location.getPath(); > >> - if (resource.requestVersion != null > >> -&& resource.requestVersion.isVersionId()) { > >> - actualLocation += "?version-id=" + resource.requestVersion; > >> + > >> + List urls = new ResourceUrlCreator(resource, options).getUrls(); > >> + if (JNLPRuntime.isDebug()) { > >> + System.out.println(urls); > > > > System.err? Possibly with some kind of description of what is being printed. > > > > I have still left it as System.out, but added a better description. > > >> } > >> - URL versionedURL; > >> - try { > >> - versionedURL = new URL(actualLocation); > >> - } catch (MalformedURLException e) { > >> - return resource.location; > >> + URL bestUrl = null; > >> + for (int i = 0; i< urls.size(); i++) { > >> + URL url = urls.get(i); > >> + try { > >> + URLConnection connection = url.openConnection(); > >> + connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); > >> + if (connection instanceof HttpURLConnection) { > >> + HttpURLConnection con = (HttpURLConnection)connection; > >> + int responseCode = con.getResponseCode(); > >> + if (responseCode == -1 || responseCode< 200 || responseCode>= 300) { > >> + continue; > >> + } > >> + } > >> + if (JNLPRuntime.isDebug()) { > >> + System.out.println("best url for " + resource.toString() + " is " + url.toString()); > >> + } > >> + bestUrl = url; > >> + break; > >> + } catch (IOException e) { > >> + // continue > >> + } > >> } > >> - return versionedURL; > >> + > >> + return bestUrl; > >> } > >> > >> /** > >> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java > >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > >> +++ b/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Wed Jan 26 15:31:51 2011 -0500 > >> @@ -0,0 +1,163 @@ > >> +/* ResourceUrlCreator.java > >> + Copyright (C) 2011 Red Hat, Inc > >> + > >> +This file is part of IcedTea. > >> + > >> +IcedTea is free software; you can redistribute it and/or modify > >> +it under the terms of the GNU General Public License as published by > >> +the Free Software Foundation; either version 2, or (at your option) > >> +any later version. > >> + > >> +IcedTea is distributed in the hope that it will be useful, but > >> +WITHOUT ANY WARRANTY; without even the implied warranty of > >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > >> +General Public License for more details. > >> + > >> +You should have received a copy of the GNU General Public License > >> +along with IcedTea; see the file COPYING. If not, write to the > >> +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > >> +02110-1301 USA. > >> + > >> +Linking this library statically or dynamically with other modules is > >> +making a combined work based on this library. Thus, the terms and > >> +conditions of the GNU General Public License cover the whole > >> +combination. > >> + > >> +As a special exception, the copyright holders of this library give you > >> +permission to link this library with independent modules to produce an > >> +executable, regardless of the license terms of these independent > >> +modules, and to copy and distribute the resulting executable under > >> +terms of your choice, provided that you also meet, for each linked > >> +independent module, the terms and conditions of the license of that > >> +module. An independent module is a module which is not derived from > >> +or based on this library. If you modify this library, you may extend > >> +this exception to your version of the library, but you are not > >> +obligated to do so. If you do not wish to do so, delete this > >> +exception statement from your version. */ > >> + > >> +package net.sourceforge.jnlp.cache; > >> + > >> +import java.net.MalformedURLException; > >> +import java.net.URL; > >> +import java.util.LinkedList; > >> +import java.util.List; > >> + > >> +import net.sourceforge.jnlp.DownloadOptions; > >> + > >> +public class ResourceUrlCreator { > >> + > >> + protected final Resource resource; > >> + protected final DownloadOptions downloadOptions; > >> + > >> + public ResourceUrlCreator(Resource resource, DownloadOptions downloadOptions) { > >> + this.resource = resource; > >> + this.downloadOptions = downloadOptions; > >> + } > >> + > >> + /** > >> + * Returns a list of URLs that the resources might be downloadable from. > >> + * The Resources may not be downloadable from any of them. The returned order is the order > >> + * the urls should be attempted in. > >> + * @return > >> + */ > >> + public List getUrls() { > >> + List urls = new LinkedList(); > >> + URL url = null; > >> + > >> + if (downloadOptions.useExplicitPack()&& downloadOptions.useExplicitVersion()) { > >> + url = getUrl(resource, true, true); > >> + if (url != null) { > >> + urls.add(url); > >> + } > >> + url = getUrl(resource, false, true); > >> + if (url != null) { > >> + urls.add(url); > >> + } > >> + url = getUrl(resource, true, false); > >> + if (url != null) { > >> + urls.add(url); > >> + } > >> + } else if (downloadOptions.useExplicitPack()) { > >> + url = getUrl(resource, true, false); > >> + if (url != null) { > >> + urls.add(url); > >> + } > >> + } else if (downloadOptions.useExplicitVersion()) { > >> + url = getUrl(resource, false, true); > >> + if (url != null) { > >> + urls.add(url); > >> + } > >> + } > >> + > >> + url = getVersionedUrlUsingQuery(resource); > >> + urls.add(url); > >> + > >> + urls.add(resource.getLocation()); > >> + > >> + return urls; > >> + } > >> + > >> + /** > >> + * Returns a url for the resource. > >> + * @param resource the resource > >> + * @param usePack whether the URL should point to the pack200 file > >> + * @param useVersion whether the URL should be modified to include the version > >> + * @return a URL for the resource or null if an appropraite URL can not be found > >> + */ > >> + protected URL getUrl(Resource resource, boolean usePack, boolean useVersion) { > > > > getURL? > > > > I have been naming variables/methods as *Url* for a while now, including > multiple methods in this patch itself (look at the method above this > one). The advice mentioned on > http://www.ibm.com/developerworks/library/ws-tip-namingconv.html#h7 > makes sense to me. What do you think? > Sounds ok. It just looked odd at first glance. > >> + if (!(usePack || useVersion)) { > >> + throw new IllegalArgumentException("either pack200 or version required"); > >> + } > >> + > >> + String location = resource.getLocation().toString(); > >> + int lastSlash = resource.getLocation().toString().lastIndexOf('/'); > >> + if (lastSlash == -1) { > >> + return resource.getLocation(); > >> + } > >> + String filename = location.substring(lastSlash + 1); > >> + if (useVersion&& resource.requestVersion != null) { > >> + String parts[] = filename.split("\\.", 2); > >> + String name = parts[0]; > >> + String extension = parts[1]; > >> + filename = name + "__V" + resource.requestVersion + "." + extension; > >> + } > >> + if (usePack) { > >> + filename = filename.replace(".jar", ".pack.gz"); > >> + } > >> + > >> + location = location.substring(0, lastSlash + 1) + filename; > >> + try { > >> + URL newUrl = new URL(location); > >> + return newUrl; > >> + } catch (MalformedURLException e) { > >> + return null; > >> + } > >> + } > >> + > >> + /** > >> + * Returns the URL for a resource, relying on HTTP query for getting the > >> + * right version > >> + * > >> + * @param resource the resource to get the url for > >> + */ > >> + protected URL getVersionedUrlUsingQuery(Resource resource) { > >> + String actualLocation = resource.getLocation().getProtocol() + "://" > >> + + resource.getLocation().getHost(); > >> + if (resource.getLocation().getPort() != -1) { > >> + actualLocation += ":" + resource.getLocation().getPort(); > >> + } > >> + actualLocation += resource.getLocation().getPath(); > >> + if (resource.requestVersion != null > >> +&& resource.requestVersion.isVersionId()) { > >> + actualLocation += "?version-id=" + resource.requestVersion; > >> + } > >> + URL versionedURL; > >> + try { > >> + versionedURL = new URL(actualLocation); > >> + } catch (MalformedURLException e) { > >> + return resource.getLocation(); > >> + } > >> + return versionedURL; > >> + } > >> + > >> +} > >> \ No newline at end of file > >> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > >> --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Jan 25 10:19:20 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Jan 26 15:31:51 2011 -0500 > >> @@ -1243,4 +1246,27 @@ > >> jarLocationSecurityMap.put(key, extLoader.jarLocationSecurityMap.get(key)); > >> } > >> } > >> + > >> + private DownloadOptions getDownloadOptionsForJar(JARDesc jar) { > >> + boolean usePack = false; > >> + boolean useVersion = false; > >> + > >> + ResourcesDesc[] descs = file.getResourceDescs(); > >> + for (ResourcesDesc desc: descs) { > >> + JARDesc[] jars = desc.getJARs(); > >> + for (JARDesc aJar: jars) { > >> + if (jar == aJar) { > >> + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.packEnabled"))) { > >> + usePack = true; > >> + } > >> + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.versionEnabled"))) { > >> + useVersion = true; > >> + } > > > > Is Boolean.valueOf necessary? Won't autoboxing handle this? > > > > propertiesMap is a Map. It contains key,value pairs for > system properties (eg "swing.useSystemFontSettings"). So autoboxing cant > handle it. Ah sorry, I assumed it was returning a Boolean. > > Any other thoughts or comments? > Just check the System.out/err stuff and separate the equals flipping into a separate patch. > Cheers, > Omair > diff -r a6b173d91ad1 NEWS > --- a/NEWS Wed Feb 09 10:02:46 2011 -0500 > +++ b/NEWS Wed Feb 09 12:57:54 2011 -0500 > @@ -11,6 +11,7 @@ > New in release 1.1 (2011-XX-XX): > * NetX > - Use Firefox's proxy settings if possible > + - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) > > New in release 1.0 (2010-XX-XX): > > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/DownloadOptions.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/DownloadOptions.java Wed Feb 09 12:57:54 2011 -0500 > @@ -0,0 +1,63 @@ > +/* DownloadOptions.java > + Copyright (C) 2011 Red Hat, Inc > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +IcedTea is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. */ > + > +package net.sourceforge.jnlp; > + > +public class DownloadOptions { > + > + private final boolean usePack200; > + private final boolean useVersion; > + > + public DownloadOptions(boolean usePack, boolean useVersion) { > + this.usePack200 = usePack; > + this.useVersion = useVersion; > + } > + > + public boolean useExplicitPack() { > + return usePack200; > + } > + > + public boolean useExplicitVersion() { > + return useVersion; > + } > + > + @Override > + public String toString() { > + return "use pack: " + usePack200 + "; use version: " + useVersion; > + } > + > +} > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/JNLPFile.java > --- a/netx/net/sourceforge/jnlp/JNLPFile.java Wed Feb 09 10:02:46 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Wed Feb 09 12:57:54 2011 -0500 > @@ -248,7 +248,7 @@ > > try { > ResourceTracker tracker = new ResourceTracker(false); // no prefetch > - tracker.addResource(location, version, policy); > + tracker.addResource(location, version, null, policy); > > return tracker.getInputStream(location); > } catch (Exception ex) { > @@ -362,7 +362,7 @@ > } > > /** > - * Returns the information section of the JNLP file for the > + * Returns the resources section of the JNLP file for the > * specified locale, os, and arch. > */ > public ResourcesDesc getResources(final Locale locale, final String os, final String arch) { > @@ -392,6 +392,31 @@ > } > > /** > + * Returns the resources section of the JNLP file as viewed > + * through the default locale and the os.name and os.arch > + * properties. > + */ > + public ResourcesDesc[] getResourceDescs() { > + return getResourcesDescs(defaultLocale, defaultOS, defaultArch); > + } > + > + /** > + * Returns the resources section of the JNLP file for the > + * specified locale, os, and arch. > + */ > + public ResourcesDesc[] getResourcesDescs(final Locale locale, final String os, final String arch) { > + List matchingResources = new ArrayList(); > + for (ResourcesDesc rescDesc: resources) { > + if (localMatches(locale, rescDesc.getLocales()) > + && stringMatches(os, rescDesc.getOS()) > + && stringMatches(arch, rescDesc.getArch())) { > + matchingResources.add(rescDesc); > + } > + } > + return matchingResources.toArray(new ResourcesDesc[0]); > + } > + > + /** > * Returns an object of one of the following types: AppletDesc, > * ApplicationDesc and InstallerDesc > */ > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/Launcher.java > --- a/netx/net/sourceforge/jnlp/Launcher.java Wed Feb 09 10:02:46 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/Launcher.java Wed Feb 09 12:57:54 2011 -0500 > @@ -417,7 +417,7 @@ > IconDesc.SPLASH, preferredWidth, preferredHeight); > if (splashImageURL != null) { > ResourceTracker resourceTracker = new ResourceTracker(true); > - resourceTracker.addResource(splashImageURL, file.getFileVersion(), updatePolicy); > + resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, updatePolicy); > splashScreen = new JNLPSplashScreen(resourceTracker, null, null); > splashScreen.setSplashImageURL(splashImageURL); > if (splashScreen.isSplashScreenValid()) { > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/cache/CacheUtil.java > --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Wed Feb 09 10:02:46 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Wed Feb 09 12:57:54 2011 -0500 > @@ -76,7 +76,7 @@ > */ > public static URL getCachedResource(URL location, Version version, UpdatePolicy policy) { > ResourceTracker rt = new ResourceTracker(); > - rt.addResource(location, version, policy); > + rt.addResource(location, version, null, policy); > try { > File f = rt.getCacheFile(location); > // TODO: Should be toURI().toURL() > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/cache/Resource.java > --- a/netx/net/sourceforge/jnlp/cache/Resource.java Wed Feb 09 10:02:46 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Wed Feb 09 12:57:54 2011 -0500 > @@ -67,6 +67,9 @@ > /** the remote location of the resource */ > URL location; > > + /** the location to use when downloading */ > + private URL downloadLocation; > + > /** the local file downloaded to */ > File localFile; > > @@ -96,6 +99,7 @@ > */ > private Resource(URL location, Version requestVersion, UpdatePolicy updatePolicy) { > this.location = location; > + this.downloadLocation = location; > this.requestVersion = requestVersion; > this.updatePolicy = updatePolicy; > } > @@ -130,6 +134,24 @@ > } > > /** > + * Returns the URL to use for downloading the resource. This can be > + * different from the original location since it may use a different > + * file name to support versioning and compression > + * @return the url to use when downloading > + */ > + public URL getDownloadLocation() { > + return downloadLocation; > + } > + > + /** > + * Set the url to use for downloading the resource > + * @param location > + */ > + public void setDownloadLocation(URL location) { > + downloadLocation = location; > + } > + > + /** > * Returns the tracker that first created or monitored the > * resource, or null if no trackers are monitoring the resource. > */ > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/cache/ResourceTracker.java > --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Feb 09 10:02:46 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Feb 09 12:57:54 2011 -0500 > @@ -29,12 +29,15 @@ > import java.net.URL; > import java.net.URLConnection; > import java.util.ArrayList; > +import java.util.HashMap; > import java.util.List; > +import java.util.Map; > import java.util.jar.JarOutputStream; > import java.util.jar.Pack200; > import java.util.jar.Pack200.Unpacker; > import java.util.zip.GZIPInputStream; > > +import net.sourceforge.jnlp.DownloadOptions; > import net.sourceforge.jnlp.Version; > import net.sourceforge.jnlp.event.DownloadEvent; > import net.sourceforge.jnlp.event.DownloadListener; > @@ -117,6 +120,9 @@ > /** resources requested to be downloaded */ > private static ArrayList queue = new ArrayList(); > > + private static Map downloadOptions = > + new HashMap(); > + > /** resource trackers threads are working for (used for load balancing across multi-tracker downloads) */ > private static ArrayList active = > new ArrayList(); // > @@ -163,7 +169,7 @@ > * @param version the resource version > * @param updatePolicy whether to check for updates if already in cache > */ > - public void addResource(URL location, Version version, UpdatePolicy updatePolicy) { > + public void addResource(URL location, Version version, DownloadOptions options, UpdatePolicy updatePolicy) { > if (location == null) > throw new IllegalArgumentException("location==null"); > > @@ -177,6 +183,11 @@ > resources.add(resource); > } > > + if (options == null) { > + options = new DownloadOptions(false, false); > + } > + downloadOptions.put(resource, options); > + > // checkCache may take a while (loads properties file). this > // should really be synchronized on resources, but the worst > // case should be that the resource will be updated once even > @@ -621,7 +632,8 @@ > > try { > // create out second in case in does not exist > - URLConnection con = getVersionedResourceURL(resource).openConnection(); > + URL realLocation = resource.getDownloadLocation(); > + URLConnection con = realLocation.openConnection(); > con.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); > > con.connect(); > @@ -636,16 +648,16 @@ > String contentEncoding = con.getContentEncoding(); > > if (JNLPRuntime.isDebug()) { > - System.err.println("Content encoding for " + resource.location + ": " > - + contentEncoding); > + System.out.println("Downloading" + resource.location + " using " + > + realLocation + " (encoding : " + contentEncoding + ")"); > + > } > > - if (contentEncoding != null) { > - if (contentEncoding.equals("gzip")) { > - downloadLocation = new URL(downloadLocation.toString() + ".gz"); > - } else if (contentEncoding.equals("pack200-gzip")) { > - downloadLocation = new URL(downloadLocation.toString() + ".pack.gz"); > - } > + if ("gzip".equals(contentEncoding)) { > + downloadLocation = new URL(downloadLocation.toString() + ".gz"); > + } else if ("pack200-gzip".equals(contentEncoding) || > + realLocation.getPath().endsWith(".pack.gz")) { > + downloadLocation = new URL(downloadLocation.toString() + ".pack.gz"); > } > > InputStream in = new BufferedInputStream(con.getInputStream()); > @@ -668,8 +680,8 @@ > /* > * If the file was compressed, uncompress it. > */ > - if (contentEncoding != null) { > - if (contentEncoding.equals("gzip")) { > + > + if ("gzip".equals(contentEncoding)) { > GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil > .getCacheFile(downloadLocation, resource.downloadVersion))); > InputStream inputStream = new BufferedInputStream(gzInputStream); > @@ -686,7 +698,8 @@ > inputStream.close(); > gzInputStream.close(); > > - } else if (contentEncoding.equals("pack200-gzip")) { > + } else if ("pack200-gzip".equals(contentEncoding) || > + realLocation.getPath().endsWith(".pack.gz")) { > GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( > CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); > InputStream inputStream = new BufferedInputStream(gzInputStream); > @@ -701,7 +714,7 @@ > inputStream.close(); > gzInputStream.close(); > } > - } > + > > resource.changeStatus(DOWNLOADING, DOWNLOADED); > synchronized (lock) { > @@ -731,7 +744,9 @@ > File localFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); > > // connect > - URLConnection connection = getVersionedResourceURL(resource).openConnection(); // this won't change so should be okay unsynchronized > + URL finalLocation = findBestUrl(resource); > + resource.setDownloadLocation(finalLocation); > + URLConnection connection = finalLocation.openConnection(); // this won't change so should be okay unsynchronized > connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); > > int size = connection.getContentLength(); > @@ -777,27 +792,46 @@ > } > > /** > - * Returns the versioned url for a resource > - * @param resource the resource to get the url for > + * Returns the best URL to use for downloading the resource > + * > + * @param resource the resource > + * @return a URL or null > */ > - private URL getVersionedResourceURL(Resource resource) { > - String actualLocation = resource.location.getProtocol() + "://" > - + resource.location.getHost(); > - if (resource.location.getPort() != -1) { > - actualLocation += ":" + resource.location.getPort(); > + private URL findBestUrl(Resource resource) { > + DownloadOptions options = downloadOptions.get(resource); > + if (options == null) { > + options = new DownloadOptions(false, false); > } > - actualLocation += resource.location.getPath(); > - if (resource.requestVersion != null > - && resource.requestVersion.isVersionId()) { > - actualLocation += "?version-id=" + resource.requestVersion; > + > + List urls = new ResourceUrlCreator(resource, options).getUrls(); > + if (JNLPRuntime.isDebug()) { > + System.out.println("All possible urls for " + > + resource.toString() + " : " + urls); > } > - URL versionedURL; > - try { > - versionedURL = new URL(actualLocation); > - } catch (MalformedURLException e) { > - return resource.location; > + URL bestUrl = null; > + for (int i = 0; i < urls.size(); i++) { > + URL url = urls.get(i); > + try { > + URLConnection connection = url.openConnection(); > + connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); > + if (connection instanceof HttpURLConnection) { > + HttpURLConnection con = (HttpURLConnection)connection; > + int responseCode = con.getResponseCode(); > + if (responseCode == -1 || responseCode < 200 || responseCode >= 300) { > + continue; > + } > + } > + if (JNLPRuntime.isDebug()) { > + System.out.println("best url for " + resource.toString() + " is " + url.toString()); > + } > + bestUrl = url; > + break; > + } catch (IOException e) { > + // continue > + } > } > - return versionedURL; > + > + return bestUrl; > } > > /** > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Wed Feb 09 12:57:54 2011 -0500 > @@ -0,0 +1,163 @@ > +/* ResourceUrlCreator.java > + Copyright (C) 2011 Red Hat, Inc > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +IcedTea is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. */ > + > +package net.sourceforge.jnlp.cache; > + > +import java.net.MalformedURLException; > +import java.net.URL; > +import java.util.LinkedList; > +import java.util.List; > + > +import net.sourceforge.jnlp.DownloadOptions; > + > +public class ResourceUrlCreator { > + > + protected final Resource resource; > + protected final DownloadOptions downloadOptions; > + > + public ResourceUrlCreator(Resource resource, DownloadOptions downloadOptions) { > + this.resource = resource; > + this.downloadOptions = downloadOptions; > + } > + > + /** > + * Returns a list of URLs that the resources might be downloadable from. > + * The Resources may not be downloadable from any of them. The returned order is the order > + * the urls should be attempted in. > + * @return > + */ > + public List getUrls() { > + List urls = new LinkedList(); > + URL url = null; > + > + if (downloadOptions.useExplicitPack() && downloadOptions.useExplicitVersion()) { > + url = getUrl(resource, true, true); > + if (url != null) { > + urls.add(url); > + } > + url = getUrl(resource, false, true); > + if (url != null) { > + urls.add(url); > + } > + url = getUrl(resource, true, false); > + if (url != null) { > + urls.add(url); > + } > + } else if (downloadOptions.useExplicitPack()) { > + url = getUrl(resource, true, false); > + if (url != null) { > + urls.add(url); > + } > + } else if (downloadOptions.useExplicitVersion()) { > + url = getUrl(resource, false, true); > + if (url != null) { > + urls.add(url); > + } > + } > + > + url = getVersionedUrlUsingQuery(resource); > + urls.add(url); > + > + urls.add(resource.getLocation()); > + > + return urls; > + } > + > + /** > + * Returns a url for the resource. > + * @param resource the resource > + * @param usePack whether the URL should point to the pack200 file > + * @param useVersion whether the URL should be modified to include the version > + * @return a URL for the resource or null if an appropraite URL can not be found > + */ > + protected URL getUrl(Resource resource, boolean usePack, boolean useVersion) { > + if (!(usePack || useVersion)) { > + throw new IllegalArgumentException("either pack200 or version required"); > + } > + > + String location = resource.getLocation().toString(); > + int lastSlash = resource.getLocation().toString().lastIndexOf('/'); > + if (lastSlash == -1) { > + return resource.getLocation(); > + } > + String filename = location.substring(lastSlash + 1); > + if (useVersion && resource.requestVersion != null) { > + String parts[] = filename.split("\\.", 2); > + String name = parts[0]; > + String extension = parts[1]; > + filename = name + "__V" + resource.requestVersion + "." + extension; > + } > + if (usePack) { > + filename = filename.replace(".jar", ".pack.gz"); > + } > + > + location = location.substring(0, lastSlash + 1) + filename; > + try { > + URL newUrl = new URL(location); > + return newUrl; > + } catch (MalformedURLException e) { > + return null; > + } > + } > + > + /** > + * Returns the URL for a resource, relying on HTTP query for getting the > + * right version > + * > + * @param resource the resource to get the url for > + */ > + protected URL getVersionedUrlUsingQuery(Resource resource) { > + String actualLocation = resource.getLocation().getProtocol() + "://" > + + resource.getLocation().getHost(); > + if (resource.getLocation().getPort() != -1) { > + actualLocation += ":" + resource.getLocation().getPort(); > + } > + actualLocation += resource.getLocation().getPath(); > + if (resource.requestVersion != null > + && resource.requestVersion.isVersionId()) { > + actualLocation += "?version-id=" + resource.requestVersion; > + } > + URL versionedURL; > + try { > + versionedURL = new URL(actualLocation); > + } catch (MalformedURLException e) { > + return resource.getLocation(); > + } > + return versionedURL; > + } > + > +} > \ No newline at end of file > diff -r a6b173d91ad1 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Feb 09 10:02:46 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Feb 09 12:57:54 2011 -0500 > @@ -45,6 +45,7 @@ > import java.util.jar.JarEntry; > import java.util.jar.JarFile; > > +import net.sourceforge.jnlp.DownloadOptions; > import net.sourceforge.jnlp.ExtensionDesc; > import net.sourceforge.jnlp.JARDesc; > import net.sourceforge.jnlp.JNLPFile; > @@ -406,6 +407,7 @@ > > tracker.addResource(jars[i].getLocation(), > jars[i].getVersion(), > + getDownloadOptionsForJar(jars[i]), > jars[i].isCacheable() ? JNLPRuntime.getDefaultUpdatePolicy() : UpdatePolicy.FORCE > ); > } > @@ -696,7 +698,7 @@ > List jars = new ArrayList(); > JARDesc jarDesc = new JARDesc(new File(extractedJarLocation).toURL(), null, null, false, false, false, false); > jars.add(jarDesc); > - tracker.addResource(new File(extractedJarLocation).toURL(), null, null); > + tracker.addResource(new File(extractedJarLocation).toURL(), null, null, null); > signer.verifyJars(jars, tracker); > > if (signer.anyJarsSigned() && !signer.getAlreadyTrustPublisher()) { > @@ -1007,6 +1009,7 @@ > > tracker.addResource(desc.getLocation(), > desc.getVersion(), > + null, > JNLPRuntime.getDefaultUpdatePolicy() > ); > > @@ -1247,4 +1250,27 @@ > jarLocationSecurityMap.put(key, extLoader.jarLocationSecurityMap.get(key)); > } > } > + > + private DownloadOptions getDownloadOptionsForJar(JARDesc jar) { > + boolean usePack = false; > + boolean useVersion = false; > + > + ResourcesDesc[] descs = file.getResourceDescs(); > + for (ResourcesDesc desc: descs) { > + JARDesc[] jars = desc.getJARs(); > + for (JARDesc aJar: jars) { > + if (jar == aJar) { > + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.packEnabled"))) { > + usePack = true; > + } > + if (Boolean.valueOf(desc.getPropertiesMap().get("jnlp.versionEnabled"))) { > + useVersion = true; > + } > + } > + } > + } > + > + return new DownloadOptions(usePack, useVersion); > + } > + > } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Wed Feb 9 15:13:09 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 09 Feb 2011 18:13:09 -0500 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <20110209223309.GN17151@rivendell.middle-earth.co.uk> References: <4D40873E.7010502@redhat.com> <20110209164256.GH17151@rivendell.middle-earth.co.uk> <4D52D748.7020701@redhat.com> <20110209223309.GN17151@rivendell.middle-earth.co.uk> Message-ID: <4D531F85.6040905@redhat.com> On 02/09/2011 05:33 PM, Dr Andrew John Hughes wrote: > On 13:04 Wed 09 Feb , Omair Majid wrote: >> On 02/09/2011 11:42 AM, Dr Andrew John Hughes wrote: >>> On 15:42 Wed 26 Jan , Omair Majid wrote: >>>> Hi, >>>> >>>> The attached patch adds support for packEnabled and versionEnabled >>>> properties in JNLP files. This allows JNLP applications to use pack200 >>>> compression and versioned jars without requiring special server >>>> configuration/software. It also fixes bug RH669942. >>>> >>>> The patch adds a new class DownloadOptions which specify download >>>> options for jars (currently just version and pack200 support). Another >>>> new class ResourceUrlCreator is used to get a list of valid urls for a >>>> resource. ResourceTracker now uses ResourceUrlCreator to get the list of >>>> valid urls for downloading a jar and then tries to find the best one. >>>> initializeResource() and downloadResource() both use this url. >>>> downloadResource() has been modified to look at the file extension as >>>> well as the content-encoding when deciding whether a file is compressed >>>> or not. >>>> >>>> The patch is much bigger than I had expected it to be. It also affects >>>> core functionality - downloading jars. I would appreciate any comments >>>> and suggestions for improvements. >>>> >>>> Thanks, >>>> Omair >>>> >>>> [1] https://bugzilla.redhat.com/show_bug.cgi?id=669942 >>> >>> Comments inline. >>> >> >> Thanks for looking it over. >> >>>> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceTracker.java >>>> --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jan 25 10:19:20 2011 -0500 >>>> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Jan 26 15:31:51 2011 -0500 >>>> @@ -636,16 +648,16 @@ >>>> String contentEncoding = con.getContentEncoding(); >>>> >>>> if (JNLPRuntime.isDebug()) { >>>> - System.err.println("Content encoding for " + resource.location + ": " >>>> - + contentEncoding); >>>> + System.out.println("Downloading" + resource.location + " using " + >>>> + realLocation + " (encoding : " + contentEncoding + ")"); >>>> + >>> >>> Shouldn't this still be System.err? >>> >> >> I like to send most debug output to System.out, but I dont think it's a >> big deal. I can change it if you like. >> > > I'd prefer System.err but I could live with System.out as long as we're consistent. > > Is there output on System.out that appears regardless of whether debugging is on or off? > If so, the debug dependent stuff should be on System.err so it can be captured separately. > Netx is not supposed to output anything to console - other than exceptions that we want the user to see. If it does (outside of debug/verbose mode) it's a bug. At the moment, it's a fairly mixed bag: some parts use system.out, others use system.err: $ grep -rin 'err.print' netx | wc -l 43 $ grep -rin 'out.print' netx | wc -l 130 I suppose I can make everything use System.err, but that would be separate patch. For this patch, which one should I use? >>>> @@ -686,7 +698,8 @@ >>>> inputStream.close(); >>>> gzInputStream.close(); >>>> >>>> - } else if (contentEncoding.equals("pack200-gzip")) { >>>> + } else if ("pack200-gzip".equals(contentEncoding) || >>>> + realLocation.getPath().endsWith(".pack.gz")) { >>>> GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( >>>> CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); >>>> InputStream inputStream = new BufferedInputStream(gzInputStream); >>> >>> I'm not sure these changes are necessary. Although you eliminate the null check, it does create >>> a lot of additional noise for no apparent change. Maybe something for a seperate patch? >>> >> >> No, it's actually required here. It's the simplest way I can think of to >> make the existing code that dealt with content-encoding also work for >> pack.gz files. Before, we would ask the server for foo.jar and the >> server could send it with content-encoding pack200-gzip (by actually >> sending foo.pack.gz). With this patch, we ask the server for foo.pack.gz >> directly. The server sends foo.pack.gz with null content encoding. We >> must deal with this in the exact same way as foo.jar with content >> encoding pack200-gzip. >> >> Notice these lines in the patch: >> - } else if (contentEncoding.equals("pack200-gzip")) { >> + } else if ("pack200-gzip".equals(contentEncoding) || >> + realLocation.getPath().endsWith(".pack.gz")) { >> >> If realLocation.getPath().endsWith(".pack.gz") is true, then >> contentEncoding is null. Perhaps I should have made it more explicit. > > You've snipped some of what I was commenting about. I agree the additional > conditional needs to be there but there's a lot of change in that area just > to flip the equals comparison which hides the actual if extension. The bit > above that you snipped is JUST a change in the equals and could be done > in a separate patch. > Yes, but it's necessary here. This was the overall code before: if (contentEncoding != null) { if (contentEncoding.equals("gzip")) { // handle gzip } else if (contentEncoding.equals("pack200-gzip")) { // handle pack200-gzip } } I want to execute the same code as in the pack200-gzip branch but using explicit files. In this case, realLocation.getPath().endsWith(".pack.gz") is true but contentEncoding is null (since the server does not encode the content). So the code becomes: if (contentEncoding.equals("gzip")) { // handle gzip } else if (contentEncoding.equals("pack200-gzip") || realLocation.getPath().endsWith(".pack.gz")) { // handle pack200-gzip } But since contentEncoding is null, the first if statement will throw a NullPointerException. The smallest change I can think of to make this work is to flip the equals (since "constant string".equals(null) returns false). The following code handles (or should handle, barring any bugs) both implicit and explicit pack200 compression correctly. if ("gzip".equals(contentEncoding)) { // handle gzip } else if ("pack200-gzip".equals(contentEncoding) || realLocation.getPath().endsWith(".pack.gz")) { // handle pack200-gzip } Does that make more sense? As a side note, this patch messes up indentation - I have removed the original "if (contentEncoding != null)" but left the indentation there. Cheers, Omair From dbhole at redhat.com Wed Feb 9 15:25:59 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 9 Feb 2011 18:25:59 -0500 Subject: [icedtea-web] Couple of minor enhancement patches Message-ID: <20110209232558.GA25546@redhat.com> Hi, I would like to add these patches to 1.0 and HEAD. Any objections? The package access one restricts access to net.sourceforge.jnlp.* classes as a pre-emptive measure to thwart potential security issues. I tested it with various JNLP services and found no issues. ChangeLog: * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): Restrict access to net.sourceforge.jnlp.* classes by untrusted classes. The latter adds an encoding entry to the desktop files. ChangeLog: * itweb-settings.desktop.in: Added UTF-8 encoding for the file. * javaws.desktop.in: Same. I will commit the patches separately. Cheers, Deepak -------------- next part -------------- diff -r 06940cdcfef8 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Jan 20 11:06:41 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Feb 02 13:09:29 2011 -0500 @@ -222,6 +222,9 @@ Authenticator.setDefault(new JNLPAuthenticator()); ProxySelector.setDefault(new JNLPProxySelector()); + // Restrict access to netx classes + Security.setProperty("package.access", Security.getProperty("package.access")+",net.sourceforge.jnlp"); + initialized = true; } -------------- next part -------------- diff -up ./itweb-settings.desktop.in.sav ./itweb-settings.desktop.in --- ./itweb-settings.desktop.in.sav 2011-02-04 15:19:48.120684952 +0100 +++ ./itweb-settings.desktop.in 2011-02-04 15:20:26.743684949 +0100 @@ -6,3 +6,4 @@ Icon=javaws Terminal=false Type=Application Categories=Settings; +Encoding=UTF-8 diff -up ./javaws.desktop.in.sav ./javaws.desktop.in --- ./javaws.desktop.in.sav 2011-02-04 15:19:54.201684943 +0100 +++ ./javaws.desktop.in 2011-02-04 15:20:14.118684930 +0100 @@ -8,3 +8,4 @@ Type=Application NoDisplay=true Categories=Network;WebBrowser; MimeType=application/x-java-jnlp-file; +Encoding=UTF-8 From omajid at redhat.com Wed Feb 9 15:52:06 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 09 Feb 2011 18:52:06 -0500 Subject: [icedtea-web] Couple of minor enhancement patches In-Reply-To: <20110209232558.GA25546@redhat.com> References: <20110209232558.GA25546@redhat.com> Message-ID: <4D5328A6.6060108@redhat.com> On 02/09/2011 06:25 PM, Deepak Bhole wrote: > Hi, > > I would like to add these patches to 1.0 and HEAD. Any objections? > > The package access one restricts access to net.sourceforge.jnlp.* > classes as a pre-emptive measure to thwart potential security issues. I > tested it with various JNLP services and found no issues. > > ChangeLog: > > * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): > Restrict access to net.sourceforge.jnlp.* classes by untrusted > classes. > This looks fine to me. > > The latter adds an encoding entry to the desktop files. > ChangeLog: > > * itweb-settings.desktop.in: Added UTF-8 encoding for the file. > * javaws.desktop.in: Same. > Is there a reason for adding this patch? The Encoding key was deprecated in the Desktop Entry Specification 0.9.4 [1] (which was released in 2006). $ desktop-file-validate javaws.desktop javaws.desktop: warning: key "Encoding" in group "Desktop Entry" is deprecated Thanks, Omair [1] http://cgit.freedesktop.org/xdg/xdg-specs/commit/?id=6855384d021d88557f80674798c584c15b547f36 From ahughes at redhat.com Thu Feb 10 00:19:13 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 10 Feb 2011 08:19:13 +0000 Subject: [icedtea-web] Couple of minor enhancement patches In-Reply-To: <20110209232558.GA25546@redhat.com> References: <20110209232558.GA25546@redhat.com> Message-ID: <20110210081913.GP17151@rivendell.middle-earth.co.uk> On 18:25 Wed 09 Feb , Deepak Bhole wrote: > Hi, > > I would like to add these patches to 1.0 and HEAD. Any objections? > > The package access one restricts access to net.sourceforge.jnlp.* > classes as a pre-emptive measure to thwart potential security issues. I > tested it with various JNLP services and found no issues. > > ChangeLog: > > * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): > Restrict access to net.sourceforge.jnlp.* classes by untrusted > classes. > The setProperty line needs splitting onto two lines. Otherwise, ok. > > The latter adds an encoding entry to the desktop files. > ChangeLog: > > * itweb-settings.desktop.in: Added UTF-8 encoding for the file. > * javaws.desktop.in: Same. > I'll wait on your response to Omair's post. > > I will commit the patches separately. > > Cheers, > Deepak > diff -r 06940cdcfef8 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Jan 20 11:06:41 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Feb 02 13:09:29 2011 -0500 > @@ -222,6 +222,9 @@ > Authenticator.setDefault(new JNLPAuthenticator()); > ProxySelector.setDefault(new JNLPProxySelector()); > > + // Restrict access to netx classes > + Security.setProperty("package.access", Security.getProperty("package.access")+",net.sourceforge.jnlp"); > + > initialized = true; > > } > diff -up ./itweb-settings.desktop.in.sav ./itweb-settings.desktop.in > --- ./itweb-settings.desktop.in.sav 2011-02-04 15:19:48.120684952 +0100 > +++ ./itweb-settings.desktop.in 2011-02-04 15:20:26.743684949 +0100 > @@ -6,3 +6,4 @@ Icon=javaws > Terminal=false > Type=Application > Categories=Settings; > +Encoding=UTF-8 > diff -up ./javaws.desktop.in.sav ./javaws.desktop.in > --- ./javaws.desktop.in.sav 2011-02-04 15:19:54.201684943 +0100 > +++ ./javaws.desktop.in 2011-02-04 15:20:14.118684930 +0100 > @@ -8,3 +8,4 @@ Type=Application > NoDisplay=true > Categories=Network;WebBrowser; > MimeType=application/x-java-jnlp-file; > +Encoding=UTF-8 -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 10 00:26:21 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 10 Feb 2011 08:26:21 +0000 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <4D531F85.6040905@redhat.com> References: <4D40873E.7010502@redhat.com> <20110209164256.GH17151@rivendell.middle-earth.co.uk> <4D52D748.7020701@redhat.com> <20110209223309.GN17151@rivendell.middle-earth.co.uk> <4D531F85.6040905@redhat.com> Message-ID: <20110210082621.GR17151@rivendell.middle-earth.co.uk> On 18:13 Wed 09 Feb , Omair Majid wrote: > On 02/09/2011 05:33 PM, Dr Andrew John Hughes wrote: > > On 13:04 Wed 09 Feb , Omair Majid wrote: > >> On 02/09/2011 11:42 AM, Dr Andrew John Hughes wrote: > >>> On 15:42 Wed 26 Jan , Omair Majid wrote: > >>>> Hi, > >>>> > >>>> The attached patch adds support for packEnabled and versionEnabled > >>>> properties in JNLP files. This allows JNLP applications to use pack200 > >>>> compression and versioned jars without requiring special server > >>>> configuration/software. It also fixes bug RH669942. > >>>> > >>>> The patch adds a new class DownloadOptions which specify download > >>>> options for jars (currently just version and pack200 support). Another > >>>> new class ResourceUrlCreator is used to get a list of valid urls for a > >>>> resource. ResourceTracker now uses ResourceUrlCreator to get the list of > >>>> valid urls for downloading a jar and then tries to find the best one. > >>>> initializeResource() and downloadResource() both use this url. > >>>> downloadResource() has been modified to look at the file extension as > >>>> well as the content-encoding when deciding whether a file is compressed > >>>> or not. > >>>> > >>>> The patch is much bigger than I had expected it to be. It also affects > >>>> core functionality - downloading jars. I would appreciate any comments > >>>> and suggestions for improvements. > >>>> > >>>> Thanks, > >>>> Omair > >>>> > >>>> [1] https://bugzilla.redhat.com/show_bug.cgi?id=669942 > >>> > >>> Comments inline. > >>> > >> > >> Thanks for looking it over. > >> > >>>> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceTracker.java > >>>> --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jan 25 10:19:20 2011 -0500 > >>>> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Jan 26 15:31:51 2011 -0500 > >>>> @@ -636,16 +648,16 @@ > >>>> String contentEncoding = con.getContentEncoding(); > >>>> > >>>> if (JNLPRuntime.isDebug()) { > >>>> - System.err.println("Content encoding for " + resource.location + ": " > >>>> - + contentEncoding); > >>>> + System.out.println("Downloading" + resource.location + " using " + > >>>> + realLocation + " (encoding : " + contentEncoding + ")"); > >>>> + > >>> > >>> Shouldn't this still be System.err? > >>> > >> > >> I like to send most debug output to System.out, but I dont think it's a > >> big deal. I can change it if you like. > >> > > > > I'd prefer System.err but I could live with System.out as long as we're consistent. > > > > Is there output on System.out that appears regardless of whether debugging is on or off? > > If so, the debug dependent stuff should be on System.err so it can be captured separately. > > > > Netx is not supposed to output anything to console - other than > exceptions that we want the user to see. If it does (outside of > debug/verbose mode) it's a bug. > > At the moment, it's a fairly mixed bag: some parts use system.out, > others use system.err: > > $ grep -rin 'err.print' netx | wc -l > 43 > $ grep -rin 'out.print' netx | wc -l > 130 > > I suppose I can make everything use System.err, but that would be > separate patch. For this patch, which one should I use? > Ok so use System.out for the exceptions the user should always see, and System.err for debug output. Then 2> can capture the debug output separate from the other output. I agree it should be a separate cleanup patch. I think they are both if (debug) cases in this patch so use System.err. > >>>> @@ -686,7 +698,8 @@ > >>>> inputStream.close(); > >>>> gzInputStream.close(); > >>>> > >>>> - } else if (contentEncoding.equals("pack200-gzip")) { > >>>> + } else if ("pack200-gzip".equals(contentEncoding) || > >>>> + realLocation.getPath().endsWith(".pack.gz")) { > >>>> GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( > >>>> CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); > >>>> InputStream inputStream = new BufferedInputStream(gzInputStream); > >>> > >>> I'm not sure these changes are necessary. Although you eliminate the null check, it does create > >>> a lot of additional noise for no apparent change. Maybe something for a seperate patch? > >>> > >> > >> No, it's actually required here. It's the simplest way I can think of to > >> make the existing code that dealt with content-encoding also work for > >> pack.gz files. Before, we would ask the server for foo.jar and the > >> server could send it with content-encoding pack200-gzip (by actually > >> sending foo.pack.gz). With this patch, we ask the server for foo.pack.gz > >> directly. The server sends foo.pack.gz with null content encoding. We > >> must deal with this in the exact same way as foo.jar with content > >> encoding pack200-gzip. > >> > >> Notice these lines in the patch: > >> - } else if (contentEncoding.equals("pack200-gzip")) { > >> + } else if ("pack200-gzip".equals(contentEncoding) || > >> + realLocation.getPath().endsWith(".pack.gz")) { > >> > >> If realLocation.getPath().endsWith(".pack.gz") is true, then > >> contentEncoding is null. Perhaps I should have made it more explicit. > > > > You've snipped some of what I was commenting about. I agree the additional > > conditional needs to be there but there's a lot of change in that area just > > to flip the equals comparison which hides the actual if extension. The bit > > above that you snipped is JUST a change in the equals and could be done > > in a separate patch. > > > > Yes, but it's necessary here. This was the overall code before: > > if (contentEncoding != null) { > if (contentEncoding.equals("gzip")) { > // handle gzip > } else if (contentEncoding.equals("pack200-gzip")) { > // handle pack200-gzip > } > } > > I want to execute the same code as in the pack200-gzip branch but using > explicit files. In this case, > realLocation.getPath().endsWith(".pack.gz") is true but contentEncoding > is null (since the server does not encode the content). So the code becomes: > > if (contentEncoding.equals("gzip")) { > // handle gzip > } else if (contentEncoding.equals("pack200-gzip") || > realLocation.getPath().endsWith(".pack.gz")) { > // handle pack200-gzip > } > > But since contentEncoding is null, the first if statement will throw a > NullPointerException. The smallest change I can think of to make this > work is to flip the equals (since "constant string".equals(null) returns > false). The following code handles (or should handle, barring any bugs) > both implicit and explicit pack200 compression correctly. > > if ("gzip".equals(contentEncoding)) { > // handle gzip > } else if ("pack200-gzip".equals(contentEncoding) || > realLocation.getPath().endsWith(".pack.gz")) { > // handle pack200-gzip > } > > Does that make more sense? > Ok. My concern was not with this block but the one prior to it which you snipped from the e-mail. > As a side note, this patch messes up indentation - I have removed the > original "if (contentEncoding != null)" but left the indentation there. > > Cheers, > Omair -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 10 00:27:28 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 10 Feb 2011 08:27:28 +0000 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <20110210082621.GR17151@rivendell.middle-earth.co.uk> References: <4D40873E.7010502@redhat.com> <20110209164256.GH17151@rivendell.middle-earth.co.uk> <4D52D748.7020701@redhat.com> <20110209223309.GN17151@rivendell.middle-earth.co.uk> <4D531F85.6040905@redhat.com> <20110210082621.GR17151@rivendell.middle-earth.co.uk> Message-ID: <20110210082728.GS17151@rivendell.middle-earth.co.uk> On 08:26 Thu 10 Feb , Dr Andrew John Hughes wrote: > On 18:13 Wed 09 Feb , Omair Majid wrote: > > On 02/09/2011 05:33 PM, Dr Andrew John Hughes wrote: > > > On 13:04 Wed 09 Feb , Omair Majid wrote: > > >> On 02/09/2011 11:42 AM, Dr Andrew John Hughes wrote: > > >>> On 15:42 Wed 26 Jan , Omair Majid wrote: > > >>>> Hi, > > >>>> > > >>>> The attached patch adds support for packEnabled and versionEnabled > > >>>> properties in JNLP files. This allows JNLP applications to use pack200 > > >>>> compression and versioned jars without requiring special server > > >>>> configuration/software. It also fixes bug RH669942. > > >>>> > > >>>> The patch adds a new class DownloadOptions which specify download > > >>>> options for jars (currently just version and pack200 support). Another > > >>>> new class ResourceUrlCreator is used to get a list of valid urls for a > > >>>> resource. ResourceTracker now uses ResourceUrlCreator to get the list of > > >>>> valid urls for downloading a jar and then tries to find the best one. > > >>>> initializeResource() and downloadResource() both use this url. > > >>>> downloadResource() has been modified to look at the file extension as > > >>>> well as the content-encoding when deciding whether a file is compressed > > >>>> or not. > > >>>> > > >>>> The patch is much bigger than I had expected it to be. It also affects > > >>>> core functionality - downloading jars. I would appreciate any comments > > >>>> and suggestions for improvements. > > >>>> > > >>>> Thanks, > > >>>> Omair > > >>>> > > >>>> [1] https://bugzilla.redhat.com/show_bug.cgi?id=669942 > > >>> > > >>> Comments inline. > > >>> > > >> > > >> Thanks for looking it over. > > >> > > >>>> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceTracker.java > > >>>> --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jan 25 10:19:20 2011 -0500 > > >>>> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Jan 26 15:31:51 2011 -0500 > > >>>> @@ -636,16 +648,16 @@ > > >>>> String contentEncoding = con.getContentEncoding(); > > >>>> > > >>>> if (JNLPRuntime.isDebug()) { > > >>>> - System.err.println("Content encoding for " + resource.location + ": " > > >>>> - + contentEncoding); > > >>>> + System.out.println("Downloading" + resource.location + " using " + > > >>>> + realLocation + " (encoding : " + contentEncoding + ")"); > > >>>> + > > >>> > > >>> Shouldn't this still be System.err? > > >>> > > >> > > >> I like to send most debug output to System.out, but I dont think it's a > > >> big deal. I can change it if you like. > > >> > > > > > > I'd prefer System.err but I could live with System.out as long as we're consistent. > > > > > > Is there output on System.out that appears regardless of whether debugging is on or off? > > > If so, the debug dependent stuff should be on System.err so it can be captured separately. > > > > > > > Netx is not supposed to output anything to console - other than > > exceptions that we want the user to see. If it does (outside of > > debug/verbose mode) it's a bug. > > > > At the moment, it's a fairly mixed bag: some parts use system.out, > > others use system.err: > > > > $ grep -rin 'err.print' netx | wc -l > > 43 > > $ grep -rin 'out.print' netx | wc -l > > 130 > > > > I suppose I can make everything use System.err, but that would be > > separate patch. For this patch, which one should I use? > > > > Ok so use System.out for the exceptions the user should always see, > and System.err for debug output. Then 2> can capture the debug output > separate from the other output. > > I agree it should be a separate cleanup patch. > > I think they are both if (debug) cases in this patch so use System.err. > > > >>>> @@ -686,7 +698,8 @@ > > >>>> inputStream.close(); > > >>>> gzInputStream.close(); > > >>>> > > >>>> - } else if (contentEncoding.equals("pack200-gzip")) { > > >>>> + } else if ("pack200-gzip".equals(contentEncoding) || > > >>>> + realLocation.getPath().endsWith(".pack.gz")) { > > >>>> GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( > > >>>> CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); > > >>>> InputStream inputStream = new BufferedInputStream(gzInputStream); > > >>> > > >>> I'm not sure these changes are necessary. Although you eliminate the null check, it does create > > >>> a lot of additional noise for no apparent change. Maybe something for a seperate patch? > > >>> > > >> > > >> No, it's actually required here. It's the simplest way I can think of to > > >> make the existing code that dealt with content-encoding also work for > > >> pack.gz files. Before, we would ask the server for foo.jar and the > > >> server could send it with content-encoding pack200-gzip (by actually > > >> sending foo.pack.gz). With this patch, we ask the server for foo.pack.gz > > >> directly. The server sends foo.pack.gz with null content encoding. We > > >> must deal with this in the exact same way as foo.jar with content > > >> encoding pack200-gzip. > > >> > > >> Notice these lines in the patch: > > >> - } else if (contentEncoding.equals("pack200-gzip")) { > > >> + } else if ("pack200-gzip".equals(contentEncoding) || > > >> + realLocation.getPath().endsWith(".pack.gz")) { > > >> > > >> If realLocation.getPath().endsWith(".pack.gz") is true, then > > >> contentEncoding is null. Perhaps I should have made it more explicit. > > > > > > You've snipped some of what I was commenting about. I agree the additional > > > conditional needs to be there but there's a lot of change in that area just > > > to flip the equals comparison which hides the actual if extension. The bit > > > above that you snipped is JUST a change in the equals and could be done > > > in a separate patch. > > > > > > > Yes, but it's necessary here. This was the overall code before: > > > > if (contentEncoding != null) { > > if (contentEncoding.equals("gzip")) { > > // handle gzip > > } else if (contentEncoding.equals("pack200-gzip")) { > > // handle pack200-gzip > > } > > } > > > > I want to execute the same code as in the pack200-gzip branch but using > > explicit files. In this case, > > realLocation.getPath().endsWith(".pack.gz") is true but contentEncoding > > is null (since the server does not encode the content). So the code becomes: > > > > if (contentEncoding.equals("gzip")) { > > // handle gzip > > } else if (contentEncoding.equals("pack200-gzip") || > > realLocation.getPath().endsWith(".pack.gz")) { > > // handle pack200-gzip > > } > > > > But since contentEncoding is null, the first if statement will throw a > > NullPointerException. The smallest change I can think of to make this > > work is to flip the equals (since "constant string".equals(null) returns > > false). The following code handles (or should handle, barring any bugs) > > both implicit and explicit pack200 compression correctly. > > > > if ("gzip".equals(contentEncoding)) { > > // handle gzip > > } else if ("pack200-gzip".equals(contentEncoding) || > > realLocation.getPath().endsWith(".pack.gz")) { > > // handle pack200-gzip > > } > > > > Does that make more sense? > > > > Ok. My concern was not with this block but the one prior to it which > you snipped from the e-mail. > Ignore that, seems they are both the same after all. > > As a side note, this patch messes up indentation - I have removed the > > original "if (contentEncoding != null)" but left the indentation there. > > > > Cheers, > > Omair > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dbhole at redhat.com Thu Feb 10 08:12:42 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 10 Feb 2011 11:12:42 -0500 Subject: [icedtea-web] Couple of minor enhancement patches In-Reply-To: <4D5328A6.6060108@redhat.com> References: <20110209232558.GA25546@redhat.com> <4D5328A6.6060108@redhat.com> Message-ID: <20110210161242.GB28419@redhat.com> * Omair Majid [2011-02-09 18:52]: > On 02/09/2011 06:25 PM, Deepak Bhole wrote: > >Hi, > > > >I would like to add these patches to 1.0 and HEAD. Any objections? > > > >The package access one restricts access to net.sourceforge.jnlp.* > >classes as a pre-emptive measure to thwart potential security issues. I > >tested it with various JNLP services and found no issues. > > > >ChangeLog: > > > >* netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): > > Restrict access to net.sourceforge.jnlp.* classes by untrusted > > classes. > > > > This looks fine to me. > > > > >The latter adds an encoding entry to the desktop files. > >ChangeLog: > > > >* itweb-settings.desktop.in: Added UTF-8 encoding for the file. > >* javaws.desktop.in: Same. > > > > Is there a reason for adding this patch? The Encoding key was > deprecated in the Desktop Entry Specification 0.9.4 [1] (which was > released in 2006). > > $ desktop-file-validate javaws.desktop > javaws.desktop: warning: key "Encoding" in group "Desktop Entry" is > deprecated > Weird. I added it because one of the (rpmlint like) tools I used here complained that Encoding was missing. Given that the upstream standard has deprecated it, I agree, we should not add it either. Thanks! Deepak > Thanks, > Omair > > [1] http://cgit.freedesktop.org/xdg/xdg-specs/commit/?id=6855384d021d88557f80674798c584c15b547f36 From dbhole at redhat.com Thu Feb 10 08:14:47 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Thu, 10 Feb 2011 11:14:47 -0500 Subject: [icedtea-web] Couple of minor enhancement patches In-Reply-To: <20110210081913.GP17151@rivendell.middle-earth.co.uk> References: <20110209232558.GA25546@redhat.com> <20110210081913.GP17151@rivendell.middle-earth.co.uk> Message-ID: <20110210161446.GC28419@redhat.com> * Dr Andrew John Hughes [2011-02-10 03:19]: > On 18:25 Wed 09 Feb , Deepak Bhole wrote: > > Hi, > > > > I would like to add these patches to 1.0 and HEAD. Any objections? > > > > The package access one restricts access to net.sourceforge.jnlp.* > > classes as a pre-emptive measure to thwart potential security issues. I > > tested it with various JNLP services and found no issues. > > > > ChangeLog: > > > > * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): > > Restrict access to net.sourceforge.jnlp.* classes by untrusted > > classes. > > > > The setProperty line needs splitting onto two lines. Otherwise, ok. > Will do. > > > > The latter adds an encoding entry to the desktop files. > > ChangeLog: > > > > * itweb-settings.desktop.in: Added UTF-8 encoding for the file. > > * javaws.desktop.in: Same. > > > > I'll wait on your response to Omair's post. > Just responded to it.. I don't think we should add it to IcedTea. I added it because one of the checking tools complained that it was missing. The tool needs updating for the new standards. IcedTea-Web should stick to the latest standard IMO, so this patch should be skipped. Thanks, Deepak > > > > I will commit the patches separately. > > > > Cheers, > > Deepak > > > diff -r 06940cdcfef8 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java > > --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Jan 20 11:06:41 2011 -0500 > > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Feb 02 13:09:29 2011 -0500 > > @@ -222,6 +222,9 @@ > > Authenticator.setDefault(new JNLPAuthenticator()); > > ProxySelector.setDefault(new JNLPProxySelector()); > > > > + // Restrict access to netx classes > > + Security.setProperty("package.access", Security.getProperty("package.access")+",net.sourceforge.jnlp"); > > + > > initialized = true; > > > > } > > > diff -up ./itweb-settings.desktop.in.sav ./itweb-settings.desktop.in > > --- ./itweb-settings.desktop.in.sav 2011-02-04 15:19:48.120684952 +0100 > > +++ ./itweb-settings.desktop.in 2011-02-04 15:20:26.743684949 +0100 > > @@ -6,3 +6,4 @@ Icon=javaws > > Terminal=false > > Type=Application > > Categories=Settings; > > +Encoding=UTF-8 > > diff -up ./javaws.desktop.in.sav ./javaws.desktop.in > > --- ./javaws.desktop.in.sav 2011-02-04 15:19:54.201684943 +0100 > > +++ ./javaws.desktop.in 2011-02-04 15:20:14.118684930 +0100 > > @@ -8,3 +8,4 @@ Type=Application > > NoDisplay=true > > Categories=Network;WebBrowser; > > MimeType=application/x-java-jnlp-file; > > +Encoding=UTF-8 > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dbhole at icedtea.classpath.org Thu Feb 10 08:22:26 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Thu, 10 Feb 2011 16:22:26 +0000 Subject: /hg/release/icedtea-web-1.0: Prepare for 1.0.1 Message-ID: changeset 74f0a9c6e509 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=74f0a9c6e509 author: Deepak Bhole date: Thu Feb 10 11:22:59 2011 -0500 Prepare for 1.0.1 diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r 3ab412a5739b -r 74f0a9c6e509 ChangeLog --- a/ChangeLog Wed Feb 02 12:12:33 2011 -0500 +++ b/ChangeLog Thu Feb 10 11:22:59 2011 -0500 @@ -1,3 +1,8 @@ 2011-02-01 Deepak Bhole + + * NEWS: Add 1.0.1 + * configure.ac: Bump to 1.0.1pre. + 2011-02-01 Deepak Bhole * NEWS: Update for 1.0 release. diff -r 3ab412a5739b -r 74f0a9c6e509 NEWS --- a/NEWS Wed Feb 02 12:12:33 2011 -0500 +++ b/NEWS Thu Feb 10 11:22:59 2011 -0500 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.0.1 (2011-XX-XX): New in release 1.0 (2011-02-02): diff -r 3ab412a5739b -r 74f0a9c6e509 configure.ac --- a/configure.ac Wed Feb 02 12:12:33 2011 -0500 +++ b/configure.ac Thu Feb 10 11:22:59 2011 -0500 @@ -1,4 +1,4 @@ AC_INIT([icedtea-web],[1.0],[distro-pkg- -AC_INIT([icedtea-web],[1.0],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) +AC_INIT([icedtea-web],[1.0.1pre],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From dbhole at icedtea.classpath.org Thu Feb 10 08:23:47 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Thu, 10 Feb 2011 16:23:47 +0000 Subject: /hg/release/icedtea-web-1.0: Restrict access to net.sourceforge.... Message-ID: changeset cc8c67ed615e in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=cc8c67ed615e author: Deepak Bhole date: Thu Feb 10 11:19:53 2011 -0500 Restrict access to net.sourceforge.jnlp.* classes by untrusted classes. diffstat: 2 files changed, 10 insertions(+) ChangeLog | 6 ++++++ netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 4 ++++ diffs (27 lines): diff -r 74f0a9c6e509 -r cc8c67ed615e ChangeLog --- a/ChangeLog Thu Feb 10 11:22:59 2011 -0500 +++ b/ChangeLog Thu Feb 10 11:19:53 2011 -0500 @@ -1,3 +1,9 @@ 2011-02-10 Deepak Bhole + + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): + Restrict access to net.sourceforge.jnlp.* classes by untrusted + classes. + 2011-02-10 Deepak Bhole * NEWS: Add 1.0.1 diff -r 74f0a9c6e509 -r cc8c67ed615e netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Feb 10 11:22:59 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Feb 10 11:19:53 2011 -0500 @@ -218,6 +218,10 @@ public class JNLPRuntime { // plug in a custom authenticator and proxy selector Authenticator.setDefault(new JNLPAuthenticator()); ProxySelector.setDefault(new JNLPProxySelector()); + + // Restrict access to netx classes + Security.setProperty("package.access", + Security.getProperty("package.access")+",net.sourceforge.jnlp"); initialized = true; From dbhole at icedtea.classpath.org Thu Feb 10 08:27:33 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Thu, 10 Feb 2011 16:27:33 +0000 Subject: /hg/icedtea-web: Restrict access to net.sourceforge.jnlp.* class... Message-ID: changeset c4054514c102 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c4054514c102 author: Deepak Bhole date: Thu Feb 10 11:19:53 2011 -0500 Restrict access to net.sourceforge.jnlp.* classes by untrusted classes. diffstat: 2 files changed, 10 insertions(+) ChangeLog | 6 ++++++ netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java | 4 ++++ diffs (27 lines): diff -r a6b173d91ad1 -r c4054514c102 ChangeLog --- a/ChangeLog Wed Feb 09 10:02:46 2011 -0500 +++ b/ChangeLog Thu Feb 10 11:19:53 2011 -0500 @@ -1,3 +1,9 @@ 2011-02-09 Omair Majid + + * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): + Restrict access to net.sourceforge.jnlp.* classes by untrusted + classes. + 2011-02-09 Omair Majid * netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java diff -r a6b173d91ad1 -r c4054514c102 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Feb 09 10:02:46 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Feb 10 11:19:53 2011 -0500 @@ -222,6 +222,10 @@ public class JNLPRuntime { // plug in a custom authenticator and proxy selector Authenticator.setDefault(new JNLPAuthenticator()); ProxySelector.setDefault(new BrowserAwareProxySelector()); + + // Restrict access to netx classes + Security.setProperty("package.access", + Security.getProperty("package.access")+",net.sourceforge.jnlp"); initialized = true; From ahughes at redhat.com Thu Feb 10 10:09:43 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 10 Feb 2011 18:09:43 +0000 Subject: [icedtea-web] Couple of minor enhancement patches In-Reply-To: <20110210161446.GC28419@redhat.com> References: <20110209232558.GA25546@redhat.com> <20110210081913.GP17151@rivendell.middle-earth.co.uk> <20110210161446.GC28419@redhat.com> Message-ID: <20110210180943.GA4980@rivendell.middle-earth.co.uk> On 11:14 Thu 10 Feb , Deepak Bhole wrote: > * Dr Andrew John Hughes [2011-02-10 03:19]: > > On 18:25 Wed 09 Feb , Deepak Bhole wrote: > > > Hi, > > > > > > I would like to add these patches to 1.0 and HEAD. Any objections? > > > > > > The package access one restricts access to net.sourceforge.jnlp.* > > > classes as a pre-emptive measure to thwart potential security issues. I > > > tested it with various JNLP services and found no issues. > > > > > > ChangeLog: > > > > > > * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): > > > Restrict access to net.sourceforge.jnlp.* classes by untrusted > > > classes. > > > > > > > The setProperty line needs splitting onto two lines. Otherwise, ok. > > > > Will do. > > > > > > > The latter adds an encoding entry to the desktop files. > > > ChangeLog: > > > > > > * itweb-settings.desktop.in: Added UTF-8 encoding for the file. > > > * javaws.desktop.in: Same. > > > > > > > I'll wait on your response to Omair's post. > > > > Just responded to it.. I don't think we should add it to IcedTea. I > added it because one of the checking tools complained that it was > missing. The tool needs updating for the new standards. IcedTea-Web > should stick to the latest standard IMO, so this patch should be > skipped. > I agree. Approved with the above mentioned change. > Thanks, > Deepak > > > > > > > I will commit the patches separately. > > > > > > Cheers, > > > Deepak > > > > > diff -r 06940cdcfef8 netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java > > > --- a/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Thu Jan 20 11:06:41 2011 -0500 > > > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java Wed Feb 02 13:09:29 2011 -0500 > > > @@ -222,6 +222,9 @@ > > > Authenticator.setDefault(new JNLPAuthenticator()); > > > ProxySelector.setDefault(new JNLPProxySelector()); > > > > > > + // Restrict access to netx classes > > > + Security.setProperty("package.access", Security.getProperty("package.access")+",net.sourceforge.jnlp"); > > > + > > > initialized = true; > > > > > > } > > > > > diff -up ./itweb-settings.desktop.in.sav ./itweb-settings.desktop.in > > > --- ./itweb-settings.desktop.in.sav 2011-02-04 15:19:48.120684952 +0100 > > > +++ ./itweb-settings.desktop.in 2011-02-04 15:20:26.743684949 +0100 > > > @@ -6,3 +6,4 @@ Icon=javaws > > > Terminal=false > > > Type=Application > > > Categories=Settings; > > > +Encoding=UTF-8 > > > diff -up ./javaws.desktop.in.sav ./javaws.desktop.in > > > --- ./javaws.desktop.in.sav 2011-02-04 15:19:54.201684943 +0100 > > > +++ ./javaws.desktop.in 2011-02-04 15:20:14.118684930 +0100 > > > @@ -8,3 +8,4 @@ Type=Application > > > NoDisplay=true > > > Categories=Network;WebBrowser; > > > MimeType=application/x-java-jnlp-file; > > > +Encoding=UTF-8 > > > > > > -- > > Andrew :) > > > > Free Java Software Engineer > > Red Hat, Inc. (http://www.redhat.com) > > > > Support Free Java! > > Contribute to GNU Classpath and IcedTea > > http://www.gnu.org/software/classpath > > http://icedtea.classpath.org > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dlila at redhat.com Thu Feb 10 13:02:40 2011 From: dlila at redhat.com (Denis Lila) Date: Thu, 10 Feb 2011 16:02:40 -0500 (EST) Subject: Backport S6896068 In-Reply-To: <1435138723.227874.1297370486023.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <1855644884.228202.1297371760241.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. I'd like to backport this changeset: http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/634221297c37 The reason for it is because we need to backport http://hg.openjdk.java.net/jdk7/2d/jdk/rev/47cd69eff641 and some of the code in there depends on 634221297c37. Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: hg.diff Type: text/x-patch Size: 11129 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110210/c3c85503/hg.diff From omajid at icedtea.classpath.org Thu Feb 10 14:29:48 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Thu, 10 Feb 2011 22:29:48 +0000 Subject: /hg/icedtea-web: Fix RH669942: Add support for packEnabled and v... Message-ID: changeset 0768433ea58d in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=0768433ea58d author: Omair Majid date: Thu Feb 10 17:25:18 2011 -0500 Fix RH669942: Add support for packEnabled and versionEnabled This changeset adds support for explicitly using jars with pack200 compression and versioning. This requires no server side support, but expects the client to try and find the right jar and fallback to using uncompressed/unversioned jars if the versioned/compressed ones can not be found. 2011-02-10 Omair Majid Fix RH669942; Add support for packEnabled and versionEnabled. * NEWS: Update with bugfix. * netx/net/sourceforge/jnlp/DownloadOptions.java: New file. * netx/net/sourceforge/jnlp/JNLPFile.java (openURL): Use null for DownloadOptions. (getResourceDescs): New method. (getResourceDescs(Locale,String,String)): New method. * netx/net/sourceforge/jnlp/Launcher.java (launchApplication): Add image to downloader with null DownloadOptions. * netx/net/sourceforge/jnlp/cache/CacheUtil.java (getCachedResource): Add resource with null DownloadOptions. * netx/net/sourceforge/jnlp/cache/Resource.java: Add new field downloadLocation. (Resource): Initialize downloadLocation. (getDownloadLocation): New method. (setDownloadLocation): New method. * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: Add new field downloadOptions. (addResource(URL,Version,UpdatePolicy)): Renamed to... (addResource(URL,Version,DownloadOptions,UpdatePolicy)): New method. (downloadResource): Add support for explicit downloading of packed jars as well as content-encoded packed jars. (initializeResource): Invokde findBestUrl to find the best url. Set that as the download location for the resource. (getVersionedResourceURL): Remove. (findBestUrl): New method. Use ResourceUrlCreator to get a list of all possible urls that can be used to download this resource. Try them one by one until one works and return that. * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: New file. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (initializeResources): Add resource with appropriate download options. (activateJars): Likewise. (loadClass): Likewise. (getDownloadOptionsForJar): New method. diffstat: 10 files changed, 431 insertions(+), 59 deletions(-) ChangeLog | 37 +++ NEWS | 1 netx/net/sourceforge/jnlp/DownloadOptions.java | 64 +++++ netx/net/sourceforge/jnlp/JNLPFile.java | 29 ++ netx/net/sourceforge/jnlp/Launcher.java | 2 netx/net/sourceforge/jnlp/cache/CacheUtil.java | 2 netx/net/sourceforge/jnlp/cache/Resource.java | 22 ++ netx/net/sourceforge/jnlp/cache/ResourceTracker.java | 142 ++++++++----- netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java | 163 +++++++++++++++ netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 28 ++ diffs (truncated from 706 to 500 lines): diff -r c4054514c102 -r 0768433ea58d ChangeLog --- a/ChangeLog Thu Feb 10 11:19:53 2011 -0500 +++ b/ChangeLog Thu Feb 10 17:25:18 2011 -0500 @@ -1,3 +1,40 @@ 2011-02-10 Deepak Bhole + + Fix RH669942; Add support for packEnabled and versionEnabled. + * NEWS: Update with bugfix. + * netx/net/sourceforge/jnlp/DownloadOptions.java: New file. + * netx/net/sourceforge/jnlp/JNLPFile.java + (openURL): Use null for DownloadOptions. + (getResourceDescs): New method. + (getResourceDescs(Locale,String,String)): New method. + * netx/net/sourceforge/jnlp/Launcher.java + (launchApplication): Add image to downloader with null DownloadOptions. + * netx/net/sourceforge/jnlp/cache/CacheUtil.java + (getCachedResource): Add resource with null DownloadOptions. + * netx/net/sourceforge/jnlp/cache/Resource.java: Add new field + downloadLocation. + (Resource): Initialize downloadLocation. + (getDownloadLocation): New method. + (setDownloadLocation): New method. + * netx/net/sourceforge/jnlp/cache/ResourceTracker.java: Add new field + downloadOptions. + (addResource(URL,Version,UpdatePolicy)): Renamed to... + (addResource(URL,Version,DownloadOptions,UpdatePolicy)): New method. + (downloadResource): Add support for explicit downloading of packed jars as + well as content-encoded packed jars. + (initializeResource): Invokde findBestUrl to find the best url. Set that + as the download location for the resource. + (getVersionedResourceURL): Remove. + (findBestUrl): New method. Use ResourceUrlCreator to get a list of all + possible urls that can be used to download this resource. Try them one by + one until one works and return that. + * netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java: New file. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Add resource with appropriate download options. + (activateJars): Likewise. + (loadClass): Likewise. + (getDownloadOptionsForJar): New method. + 2011-02-10 Deepak Bhole * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): diff -r c4054514c102 -r 0768433ea58d NEWS --- a/NEWS Thu Feb 10 11:19:53 2011 -0500 +++ b/NEWS Thu Feb 10 17:25:18 2011 -0500 @@ -11,6 +11,7 @@ New in release 1.1 (2011-XX-XX): New in release 1.1 (2011-XX-XX): * NetX - Use Firefox's proxy settings if possible + - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) New in release 1.0 (2010-XX-XX): diff -r c4054514c102 -r 0768433ea58d netx/net/sourceforge/jnlp/DownloadOptions.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/DownloadOptions.java Thu Feb 10 17:25:18 2011 -0500 @@ -0,0 +1,64 @@ +/* DownloadOptions.java + Copyright (C) 2011 Red Hat, Inc + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package net.sourceforge.jnlp; + +public class DownloadOptions { + + private final boolean usePack200; + private final boolean useVersion; + + public DownloadOptions(boolean usePack, boolean useVersion) { + this.usePack200 = usePack; + this.useVersion = useVersion; + } + + public boolean useExplicitPack() { + return usePack200; + } + + public boolean useExplicitVersion() { + return useVersion; + } + + @Override + public String toString() { + return "DownloadOptions[use pack: " + usePack200 + "; use version: " + + useVersion + "]"; + } + +} diff -r c4054514c102 -r 0768433ea58d netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java Thu Feb 10 11:19:53 2011 -0500 +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Thu Feb 10 17:25:18 2011 -0500 @@ -248,7 +248,7 @@ public class JNLPFile { try { ResourceTracker tracker = new ResourceTracker(false); // no prefetch - tracker.addResource(location, version, policy); + tracker.addResource(location, version, null, policy); return tracker.getInputStream(location); } catch (Exception ex) { @@ -362,7 +362,7 @@ public class JNLPFile { } /** - * Returns the information section of the JNLP file for the + * Returns the resources section of the JNLP file for the * specified locale, os, and arch. */ public ResourcesDesc getResources(final Locale locale, final String os, final String arch) { @@ -389,6 +389,31 @@ public class JNLPFile { sharedResources.addResource(resource); } }; + } + + /** + * Returns the resources section of the JNLP file as viewed + * through the default locale and the os.name and os.arch + * properties. + */ + public ResourcesDesc[] getResourceDescs() { + return getResourceDescs(defaultLocale, defaultOS, defaultArch); + } + + /** + * Returns the resources section of the JNLP file for the + * specified locale, os, and arch. + */ + public ResourcesDesc[] getResourceDescs(final Locale locale, final String os, final String arch) { + List matchingResources = new ArrayList(); + for (ResourcesDesc rescDesc: resources) { + if (localMatches(locale, rescDesc.getLocales()) + && stringMatches(os, rescDesc.getOS()) + && stringMatches(arch, rescDesc.getArch())) { + matchingResources.add(rescDesc); + } + } + return matchingResources.toArray(new ResourcesDesc[0]); } /** diff -r c4054514c102 -r 0768433ea58d netx/net/sourceforge/jnlp/Launcher.java --- a/netx/net/sourceforge/jnlp/Launcher.java Thu Feb 10 11:19:53 2011 -0500 +++ b/netx/net/sourceforge/jnlp/Launcher.java Thu Feb 10 17:25:18 2011 -0500 @@ -417,7 +417,7 @@ public class Launcher { IconDesc.SPLASH, preferredWidth, preferredHeight); if (splashImageURL != null) { ResourceTracker resourceTracker = new ResourceTracker(true); - resourceTracker.addResource(splashImageURL, file.getFileVersion(), updatePolicy); + resourceTracker.addResource(splashImageURL, file.getFileVersion(), null, updatePolicy); splashScreen = new JNLPSplashScreen(resourceTracker, null, null); splashScreen.setSplashImageURL(splashImageURL); if (splashScreen.isSplashScreenValid()) { diff -r c4054514c102 -r 0768433ea58d netx/net/sourceforge/jnlp/cache/CacheUtil.java --- a/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu Feb 10 11:19:53 2011 -0500 +++ b/netx/net/sourceforge/jnlp/cache/CacheUtil.java Thu Feb 10 17:25:18 2011 -0500 @@ -76,7 +76,7 @@ public class CacheUtil { */ public static URL getCachedResource(URL location, Version version, UpdatePolicy policy) { ResourceTracker rt = new ResourceTracker(); - rt.addResource(location, version, policy); + rt.addResource(location, version, null, policy); try { File f = rt.getCacheFile(location); // TODO: Should be toURI().toURL() diff -r c4054514c102 -r 0768433ea58d netx/net/sourceforge/jnlp/cache/Resource.java --- a/netx/net/sourceforge/jnlp/cache/Resource.java Thu Feb 10 11:19:53 2011 -0500 +++ b/netx/net/sourceforge/jnlp/cache/Resource.java Thu Feb 10 17:25:18 2011 -0500 @@ -67,6 +67,9 @@ public class Resource { /** the remote location of the resource */ URL location; + /** the location to use when downloading */ + private URL downloadLocation; + /** the local file downloaded to */ File localFile; @@ -96,6 +99,7 @@ public class Resource { */ private Resource(URL location, Version requestVersion, UpdatePolicy updatePolicy) { this.location = location; + this.downloadLocation = location; this.requestVersion = requestVersion; this.updatePolicy = updatePolicy; } @@ -127,6 +131,24 @@ public class Resource { */ public URL getLocation() { return location; + } + + /** + * Returns the URL to use for downloading the resource. This can be + * different from the original location since it may use a different + * file name to support versioning and compression + * @return the url to use when downloading + */ + public URL getDownloadLocation() { + return downloadLocation; + } + + /** + * Set the url to use for downloading the resource + * @param location + */ + public void setDownloadLocation(URL location) { + downloadLocation = location; } /** diff -r c4054514c102 -r 0768433ea58d netx/net/sourceforge/jnlp/cache/ResourceTracker.java --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Feb 10 11:19:53 2011 -0500 +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Thu Feb 10 17:25:18 2011 -0500 @@ -29,12 +29,15 @@ import java.net.URL; import java.net.URL; import java.net.URLConnection; import java.util.ArrayList; +import java.util.HashMap; import java.util.List; +import java.util.Map; import java.util.jar.JarOutputStream; import java.util.jar.Pack200; import java.util.jar.Pack200.Unpacker; import java.util.zip.GZIPInputStream; +import net.sourceforge.jnlp.DownloadOptions; import net.sourceforge.jnlp.Version; import net.sourceforge.jnlp.event.DownloadEvent; import net.sourceforge.jnlp.event.DownloadListener; @@ -117,6 +120,9 @@ public class ResourceTracker { /** resources requested to be downloaded */ private static ArrayList queue = new ArrayList(); + private static Map downloadOptions = + new HashMap(); + /** resource trackers threads are working for (used for load balancing across multi-tracker downloads) */ private static ArrayList active = new ArrayList(); // @@ -163,7 +169,7 @@ public class ResourceTracker { * @param version the resource version * @param updatePolicy whether to check for updates if already in cache */ - public void addResource(URL location, Version version, UpdatePolicy updatePolicy) { + public void addResource(URL location, Version version, DownloadOptions options, UpdatePolicy updatePolicy) { if (location == null) throw new IllegalArgumentException("location==null"); @@ -176,6 +182,11 @@ public class ResourceTracker { resource.addTracker(this); resources.add(resource); } + + if (options == null) { + options = new DownloadOptions(false, false); + } + downloadOptions.put(resource, options); // checkCache may take a while (loads properties file). this // should really be synchronized on resources, but the worst @@ -621,7 +632,8 @@ public class ResourceTracker { try { // create out second in case in does not exist - URLConnection con = getVersionedResourceURL(resource).openConnection(); + URL realLocation = resource.getDownloadLocation(); + URLConnection con = realLocation.openConnection(); con.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); con.connect(); @@ -636,16 +648,16 @@ public class ResourceTracker { String contentEncoding = con.getContentEncoding(); if (JNLPRuntime.isDebug()) { - System.err.println("Content encoding for " + resource.location + ": " - + contentEncoding); + System.err.println("Downloading" + resource.location + " using " + + realLocation + " (encoding : " + contentEncoding + ")"); + } - if (contentEncoding != null) { - if (contentEncoding.equals("gzip")) { - downloadLocation = new URL(downloadLocation.toString() + ".gz"); - } else if (contentEncoding.equals("pack200-gzip")) { - downloadLocation = new URL(downloadLocation.toString() + ".pack.gz"); - } + if ("gzip".equals(contentEncoding)) { + downloadLocation = new URL(downloadLocation.toString() + ".gz"); + } else if ("pack200-gzip".equals(contentEncoding) || + realLocation.getPath().endsWith(".pack.gz")) { + downloadLocation = new URL(downloadLocation.toString() + ".pack.gz"); } InputStream in = new BufferedInputStream(con.getInputStream()); @@ -668,40 +680,41 @@ public class ResourceTracker { /* * If the file was compressed, uncompress it. */ - if (contentEncoding != null) { - if (contentEncoding.equals("gzip")) { - GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil - .getCacheFile(downloadLocation, resource.downloadVersion))); - InputStream inputStream = new BufferedInputStream(gzInputStream); - BufferedOutputStream outputStream = new BufferedOutputStream( - new FileOutputStream(CacheUtil.getCacheFile(resource.location, - resource.downloadVersion))); + if ("gzip".equals(contentEncoding)) { + GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream(CacheUtil + .getCacheFile(downloadLocation, resource.downloadVersion))); + InputStream inputStream = new BufferedInputStream(gzInputStream); - while (-1 != (rlen = inputStream.read(buf))) { - outputStream.write(buf, 0, rlen); - } + BufferedOutputStream outputStream = new BufferedOutputStream( + new FileOutputStream(CacheUtil.getCacheFile(resource.location, + resource.downloadVersion))); - outputStream.close(); - inputStream.close(); - gzInputStream.close(); + while (-1 != (rlen = inputStream.read(buf))) { + outputStream.write(buf, 0, rlen); + } - } else if (contentEncoding.equals("pack200-gzip")) { - GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( - CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); - InputStream inputStream = new BufferedInputStream(gzInputStream); + outputStream.close(); + inputStream.close(); + gzInputStream.close(); - JarOutputStream outputStream = new JarOutputStream(new FileOutputStream( - CacheUtil.getCacheFile(resource.location, resource.downloadVersion))); + } else if ("pack200-gzip".equals(contentEncoding) || + realLocation.getPath().endsWith(".pack.gz")) { + GZIPInputStream gzInputStream = new GZIPInputStream(new FileInputStream( + CacheUtil.getCacheFile(downloadLocation, resource.downloadVersion))); + InputStream inputStream = new BufferedInputStream(gzInputStream); - Unpacker unpacker = Pack200.newUnpacker(); - unpacker.unpack(inputStream, outputStream); + JarOutputStream outputStream = new JarOutputStream(new FileOutputStream( + CacheUtil.getCacheFile(resource.location, resource.downloadVersion))); - outputStream.close(); - inputStream.close(); - gzInputStream.close(); - } + Unpacker unpacker = Pack200.newUnpacker(); + unpacker.unpack(inputStream, outputStream); + + outputStream.close(); + inputStream.close(); + gzInputStream.close(); } + resource.changeStatus(DOWNLOADING, DOWNLOADED); synchronized (lock) { @@ -731,7 +744,9 @@ public class ResourceTracker { File localFile = CacheUtil.getCacheFile(resource.location, resource.downloadVersion); // connect - URLConnection connection = getVersionedResourceURL(resource).openConnection(); // this won't change so should be okay unsynchronized + URL finalLocation = findBestUrl(resource); + resource.setDownloadLocation(finalLocation); + URLConnection connection = finalLocation.openConnection(); // this won't change so should be okay unsynchronized connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); int size = connection.getContentLength(); @@ -777,27 +792,46 @@ public class ResourceTracker { } /** - * Returns the versioned url for a resource - * @param resource the resource to get the url for + * Returns the best URL to use for downloading the resource + * + * @param resource the resource + * @return a URL or null */ - private URL getVersionedResourceURL(Resource resource) { - String actualLocation = resource.location.getProtocol() + "://" - + resource.location.getHost(); - if (resource.location.getPort() != -1) { - actualLocation += ":" + resource.location.getPort(); + private URL findBestUrl(Resource resource) { + DownloadOptions options = downloadOptions.get(resource); + if (options == null) { + options = new DownloadOptions(false, false); } - actualLocation += resource.location.getPath(); - if (resource.requestVersion != null - && resource.requestVersion.isVersionId()) { - actualLocation += "?version-id=" + resource.requestVersion; + + List urls = new ResourceUrlCreator(resource, options).getUrls(); + if (JNLPRuntime.isDebug()) { + System.err.println("All possible urls for " + + resource.toString() + " : " + urls); } - URL versionedURL; - try { - versionedURL = new URL(actualLocation); - } catch (MalformedURLException e) { - return resource.location; + URL bestUrl = null; + for (int i = 0; i < urls.size(); i++) { + URL url = urls.get(i); + try { + URLConnection connection = url.openConnection(); + connection.addRequestProperty("Accept-Encoding", "pack200-gzip, gzip"); + if (connection instanceof HttpURLConnection) { + HttpURLConnection con = (HttpURLConnection)connection; + int responseCode = con.getResponseCode(); + if (responseCode == -1 || responseCode < 200 || responseCode >= 300) { + continue; + } + } + if (JNLPRuntime.isDebug()) { + System.err.println("best url for " + resource.toString() + " is " + url.toString()); + } + bestUrl = url; + break; + } catch (IOException e) { + // continue + } } - return versionedURL; + + return bestUrl; } /** diff -r c4054514c102 -r 0768433ea58d netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/cache/ResourceUrlCreator.java Thu Feb 10 17:25:18 2011 -0500 @@ -0,0 +1,163 @@ +/* ResourceUrlCreator.java + Copyright (C) 2011 Red Hat, Inc + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and From omajid at redhat.com Thu Feb 10 14:30:53 2011 From: omajid at redhat.com (Omair Majid) Date: Thu, 10 Feb 2011 17:30:53 -0500 Subject: [icedtea-web] RFC: add support for packEnabled and versionEnabled In-Reply-To: <20110210082728.GS17151@rivendell.middle-earth.co.uk> References: <4D40873E.7010502@redhat.com> <20110209164256.GH17151@rivendell.middle-earth.co.uk> <4D52D748.7020701@redhat.com> <20110209223309.GN17151@rivendell.middle-earth.co.uk> <4D531F85.6040905@redhat.com> <20110210082621.GR17151@rivendell.middle-earth.co.uk> <20110210082728.GS17151@rivendell.middle-earth.co.uk> Message-ID: <4D54671D.7010305@redhat.com> On 02/10/2011 03:27 AM, Dr Andrew John Hughes wrote: > On 08:26 Thu 10 Feb , Dr Andrew John Hughes wrote: >> On 18:13 Wed 09 Feb , Omair Majid wrote: >>> On 02/09/2011 05:33 PM, Dr Andrew John Hughes wrote: >>>> On 13:04 Wed 09 Feb , Omair Majid wrote: >>>>> On 02/09/2011 11:42 AM, Dr Andrew John Hughes wrote: >>>>>> On 15:42 Wed 26 Jan , Omair Majid wrote: >>>>>>> Hi, >>>>>>> >>>>>>> The attached patch adds support for packEnabled and versionEnabled >>>>>>> properties in JNLP files. This allows JNLP applications to use pack200 >>>>>>> compression and versioned jars without requiring special server >>>>>>> configuration/software. It also fixes bug RH669942. >>>>>>> >>>>>>> The patch adds a new class DownloadOptions which specify download >>>>>>> options for jars (currently just version and pack200 support). Another >>>>>>> new class ResourceUrlCreator is used to get a list of valid urls for a >>>>>>> resource. ResourceTracker now uses ResourceUrlCreator to get the list of >>>>>>> valid urls for downloading a jar and then tries to find the best one. >>>>>>> initializeResource() and downloadResource() both use this url. >>>>>>> downloadResource() has been modified to look at the file extension as >>>>>>> well as the content-encoding when deciding whether a file is compressed >>>>>>> or not. >>>>>>> >>>>>>> The patch is much bigger than I had expected it to be. It also affects >>>>>>> core functionality - downloading jars. I would appreciate any comments >>>>>>> and suggestions for improvements. >>>>>>> >>>>>>> Thanks, >>>>>>> Omair >>>>>>> >>>>>>> [1] https://bugzilla.redhat.com/show_bug.cgi?id=669942 >>>>>> >>>>>> Comments inline. >>>>>> >>>>> >>>>> Thanks for looking it over. >>>>> >>>>>>> diff -r 64da2a80df88 netx/net/sourceforge/jnlp/cache/ResourceTracker.java >>>>>>> --- a/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Tue Jan 25 10:19:20 2011 -0500 >>>>>>> +++ b/netx/net/sourceforge/jnlp/cache/ResourceTracker.java Wed Jan 26 15:31:51 2011 -0500 >>>>>>> @@ -636,16 +648,16 @@ >>>>>>> String contentEncoding = con.getContentEncoding(); >>>>>>> >>>>>>> if (JNLPRuntime.isDebug()) { >>>>>>> - System.err.println("Content encoding for " + resource.location + ": " >>>>>>> - + contentEncoding); >>>>>>> + System.out.println("Downloading" + resource.location + " using " + >>>>>>> + realLocation + " (encoding : " + contentEncoding + ")"); >>>>>>> + >>>>>> >>>>>> Shouldn't this still be System.err? >>>>>> >>>>> >>>>> I like to send most debug output to System.out, but I dont think it's a >>>>> big deal. I can change it if you like. >>>>> >>>> >>>> I'd prefer System.err but I could live with System.out as long as we're consistent. >>>> >>>> Is there output on System.out that appears regardless of whether debugging is on or off? >>>> If so, the debug dependent stuff should be on System.err so it can be captured separately. >>>> >>> >>> Netx is not supposed to output anything to console - other than >>> exceptions that we want the user to see. If it does (outside of >>> debug/verbose mode) it's a bug. >>> >>> At the moment, it's a fairly mixed bag: some parts use system.out, >>> others use system.err: >>> >>> $ grep -rin 'err.print' netx | wc -l >>> 43 >>> $ grep -rin 'out.print' netx | wc -l >>> 130 >>> >>> I suppose I can make everything use System.err, but that would be >>> separate patch. For this patch, which one should I use? >>> >> >> Ok so use System.out for the exceptions the user should always see, >> and System.err for debug output. Then 2> can capture the debug output >> separate from the other output. >> >> I agree it should be a separate cleanup patch. >> >> I think they are both if (debug) cases in this patch so use System.err. Done and pushed. Thanks for the reviews. Cheers, Omair From omajid at redhat.com Thu Feb 10 16:20:59 2011 From: omajid at redhat.com (Omair Majid) Date: Thu, 10 Feb 2011 19:20:59 -0500 Subject: [icedtea-web] RFC: fix 2 issues in fix for versioned/packed jars Message-ID: <4D5480EB.2000802@redhat.com> Hi, The attached patch fixes 2 issues in my previous patch for adding packed/versioned jar support. The first patch fixes names so that all methods that relate to ResourcesDesc are actually named *ResourcesDesc* instead of *ResourceDesc* (s at end of resources). The second fix implements the new method getResourcesDescs in PluginBridge - the version in JNLPFile causes a NullPointerException for plugins. Ok to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: fix-naming-of-resourcesdesc.patch Type: text/x-patch Size: 1708 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110210/47e998b5/fix-naming-of-resourcesdesc.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: fix-resourcesdesc-in-plugin.patch Type: text/x-patch Size: 638 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110210/47e998b5/fix-resourcesdesc-in-plugin.patch From a.radke at arcor.de Thu Feb 10 22:37:42 2011 From: a.radke at arcor.de (Andreas Radke) Date: Fri, 11 Feb 2011 07:37:42 +0100 Subject: [icedtea-web] man-pages location Message-ID: <20110211073742.68f0a7de@workstation64.home> I've prepared packages for ArchLinux. The man-pages location isn't detected properly. I'm applying a local fix like this: --- Makefile.am 2011-02-02 03:43:25.000000000 +0100 +++ Makefile.am.new 2011-02-03 14:37:55.556053388 +0100 @@ -130,8 +130,8 @@ endif install-data-local: - ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 - ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 + ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 + ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1 ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib if ENABLE_DOCS ${mkinstalldirs} $(DESTDIR)$(htmldir) Maybe you want to this or something similar upstream. Now I'm waiting for icedtea6-1.10 branching... -Andy From ahughes at redhat.com Fri Feb 11 05:47:00 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 11 Feb 2011 13:47:00 +0000 Subject: [icedtea-web] man-pages location In-Reply-To: <20110211073742.68f0a7de@workstation64.home> References: <20110211073742.68f0a7de@workstation64.home> Message-ID: <20110211134700.GD5203@rivendell.middle-earth.co.uk> On 07:37 Fri 11 Feb , Andreas Radke wrote: > I've prepared packages for ArchLinux. The man-pages location isn't > detected properly. I'm applying a local fix like this: > > --- Makefile.am 2011-02-02 03:43:25.000000000 +0100 > +++ Makefile.am.new 2011-02-03 14:37:55.556053388 +0100 > @@ -130,8 +130,8 @@ > endif > > install-data-local: > - ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 > - ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 > + ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 > + ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1 > ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib > if ENABLE_DOCS > ${mkinstalldirs} $(DESTDIR)$(htmldir) > > > > > Maybe you want to this or something similar upstream. > > Now I'm waiting for icedtea6-1.10 branching... > > -Andy Looks good. We'll put this in IcedTea-Web 1.0.1. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Fri Feb 11 05:49:27 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 11 Feb 2011 13:49:27 +0000 Subject: [icedtea-web] RFC: fix 2 issues in fix for versioned/packed jars In-Reply-To: <4D5480EB.2000802@redhat.com> References: <4D5480EB.2000802@redhat.com> Message-ID: <20110211134927.GE5203@rivendell.middle-earth.co.uk> On 19:20 Thu 10 Feb , Omair Majid wrote: > Hi, > > The attached patch fixes 2 issues in my previous patch for adding > packed/versioned jar support. > > The first patch fixes names so that all methods that relate to > ResourcesDesc are actually named *ResourcesDesc* instead of > *ResourceDesc* (s at end of resources). > But why? > The second fix implements the new method getResourcesDescs in > PluginBridge - the version in JNLPFile causes a NullPointerException > for plugins. > Ok. Please commit the two as separate patches. > Ok to commit? > > Cheers, > Omair > diff -r 0768433ea58d netx/net/sourceforge/jnlp/JNLPFile.java > --- a/netx/net/sourceforge/jnlp/JNLPFile.java Thu Feb 10 17:25:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Thu Feb 10 19:11:05 2011 -0500 > @@ -396,15 +396,15 @@ > * through the default locale and the os.name and os.arch > * properties. > */ > - public ResourcesDesc[] getResourceDescs() { > - return getResourceDescs(defaultLocale, defaultOS, defaultArch); > + public ResourcesDesc[] getResourcesDescs() { > + return getResourcesDescs(defaultLocale, defaultOS, defaultArch); > } > > /** > * Returns the resources section of the JNLP file for the > * specified locale, os, and arch. > */ > - public ResourcesDesc[] getResourceDescs(final Locale locale, final String os, final String arch) { > + public ResourcesDesc[] getResourcesDescs(final Locale locale, final String os, final String arch) { > List matchingResources = new ArrayList(); > for (ResourcesDesc rescDesc: resources) { > if (localMatches(locale, rescDesc.getLocales()) > diff -r 0768433ea58d netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Feb 10 17:25:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Feb 10 19:11:05 2011 -0500 > @@ -1255,7 +1255,7 @@ > boolean usePack = false; > boolean useVersion = false; > > - ResourcesDesc[] descs = file.getResourceDescs(); > + ResourcesDesc[] descs = file.getResourcesDescs(); > for (ResourcesDesc desc: descs) { > JARDesc[] jars = desc.getJARs(); > for (JARDesc aJar: jars) { > diff -r 0768433ea58d netx/net/sourceforge/jnlp/PluginBridge.java > --- a/netx/net/sourceforge/jnlp/PluginBridge.java Thu Feb 10 17:25:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/PluginBridge.java Thu Feb 10 19:11:05 2011 -0500 > @@ -244,6 +244,14 @@ > }; > } > > + /** > + * Returns the resources section of the JNLP file for the > + * specified locale, os, and arch. > + */ > + public ResourcesDesc[] getResourcesDescs(final Locale locale, final String os, final String arch) { > + return new ResourcesDesc[] { getResources(locale, os, arch) }; > + } > + > public boolean isApplet() { > return true; > } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Fri Feb 11 07:20:05 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 11 Feb 2011 10:20:05 -0500 Subject: [icedtea-web] RFC: fix 2 issues in fix for versioned/packed jars In-Reply-To: <20110211134927.GE5203@rivendell.middle-earth.co.uk> References: <4D5480EB.2000802@redhat.com> <20110211134927.GE5203@rivendell.middle-earth.co.uk> Message-ID: <4D5553A5.1030800@redhat.com> On 02/11/2011 08:49 AM, Dr Andrew John Hughes wrote: > On 19:20 Thu 10 Feb , Omair Majid wrote: >> Hi, >> >> The attached patch fixes 2 issues in my previous patch for adding >> packed/versioned jar support. >> >> The first patch fixes names so that all methods that relate to >> ResourcesDesc are actually named *ResourcesDesc* instead of >> *ResourceDesc* (s at end of resources). >> > > But why? So the method name (getResourcesDescs) properly reflects the type returned (ResourcesDesc[]). > >> The second fix implements the new method getResourcesDescs in >> PluginBridge - the version in JNLPFile causes a NullPointerException >> for plugins. >> > > Ok. Please commit the two as separate patches. > Will do. Thanks for looking over the patches. Cheers, Omair From omajid at redhat.com Fri Feb 11 15:29:14 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 11 Feb 2011 18:29:14 -0500 Subject: RFC: add support for building with gcc 4.6 + gold Message-ID: <4D55C64A.8070003@redhat.com> Hi, Building hotspot with gcc 4.6 and gold fails. Please see the bug filed at https://bugzilla.redhat.com/show_bug.cgi?id=676659 for details. The attached patch fixes it for me. Any thoughts? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea6-gcc-4.6-gold.patch Type: text/x-patch Size: 1089 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110211/b289defe/icedtea6-gcc-4.6-gold.patch From omajid at redhat.com Fri Feb 11 16:28:25 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 11 Feb 2011 19:28:25 -0500 Subject: [icedtea-web] RFC: do not check INDEX.LIST for being signed Message-ID: <4D55D429.4030300@redhat.com> Hi, The attached patch modifies JarSigner so that we do not verify the jar index. There are some applications that contain jars with all entries except the jar index signed. See https://bugzilla.redhat.com/show_bug.cgi?id=675271 for an example. The jar index contains a list of jars and packages inside them. Our classloader uses it to look up where (in the same domain) it might look for additional jars if some classes can not be found. The jar index does not say anything about those particular jars being signed, nor does it contain any signatures for those classes. The effect of the jar index being modified should be the same as the archive tag in an applet tag being modified (or the jar element in a jnlp file being modified) - and we dont verify jnlp files or web pages as being signed. More information about the jar index can be found at [1]. All in all, I dont think not verifying signatures on jar index will have any security impact. If no one has issues with the patch, I would like to add it to icedtea-web HEAD. Thoughts? Comments? Cheers, Omair [1] http://download.oracle.com/javase/6/docs/technotes/guides/jar/jar.html#JARIndex -------------- next part -------------- A non-text attachment was scrubbed... Name: ignore-unsigned-index-list.patch Type: text/x-patch Size: 1060 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110211/02362a82/ignore-unsigned-index-list.patch From andrew at icedtea.classpath.org Sun Feb 13 10:58:19 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Sun, 13 Feb 2011 18:58:19 +0000 Subject: /hg/icedtea6: RH676659: Pass -export-dynamic option to linker no... Message-ID: changeset fc0df075ea54 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fc0df075ea54 author: Andrew John Hughes date: Sun Feb 13 17:33:58 2011 +0000 RH676659: Pass -export-dynamic option to linker not gcc. 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid RH676659: Pass -export-dynamic option to linker not gcc. * Makefile.am: Add new patch. * patches/rh676659-gcc-export-dynamic.patch: Pass -Wl,-export- dynamic rather than -export-dynamic. diffstat: 4 files changed, 26 insertions(+), 1 deletion(-) ChangeLog | 11 +++++++++++ Makefile.am | 3 ++- NEWS | 1 + patches/rh676659-gcc-export-dynamic.patch | 12 ++++++++++++ diffs (58 lines): diff -r a3ab67013879 -r fc0df075ea54 ChangeLog --- a/ChangeLog Wed Feb 09 10:47:23 2011 +0000 +++ b/ChangeLog Sun Feb 13 17:33:58 2011 +0000 @@ -1,3 +1,14 @@ 2011-02-09 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + RH676659: Pass -export-dynamic option to linker not gcc. + * Makefile.am: Add new patch. + * patches/rh676659-gcc-export-dynamic.patch: + Pass -Wl,-export-dynamic rather than -export-dynamic. + 2011-02-09 Andrew John Hughes * Makefile.am: Add patch. diff -r a3ab67013879 -r fc0df075ea54 Makefile.am --- a/Makefile.am Wed Feb 09 10:47:23 2011 +0000 +++ b/Makefile.am Sun Feb 13 17:33:58 2011 +0000 @@ -291,7 +291,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/4724552-CubicCurve2D.patch \ patches/openjdk/4493128-CubicCurve2D.patch \ patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ - patches/no-static-linking.patch + patches/no-static-linking.patch \ + patches/rh676659-gcc-export-dynamic.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r a3ab67013879 -r fc0df075ea54 NEWS --- a/NEWS Wed Feb 09 10:47:23 2011 +0000 +++ b/NEWS Sun Feb 13 17:33:58 2011 +0000 @@ -419,6 +419,7 @@ New in release 1.10 (2011-XX-XX): * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc + - RH676659: Pass -export-dynamic flag to linker using -Wl as option is broken in gcc 4.6+ New in release 1.9.5 (2011-02-01): diff -r a3ab67013879 -r fc0df075ea54 patches/rh676659-gcc-export-dynamic.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/rh676659-gcc-export-dynamic.patch Sun Feb 13 17:33:58 2011 +0000 @@ -0,0 +1,12 @@ +diff -r 55b9f498dbce make/linux/makefiles/gcc.make +--- openjdk/hotspot/make/linux/makefiles/gcc.make Thu Feb 10 16:24:29 2011 -0800 ++++ openjdk/hotspot/make/linux/makefiles/gcc.make Fri Feb 11 18:09:21 2011 -0500 +@@ -196,7 +196,7 @@ + SHARED_FLAG = -shared + + # Keep symbols even they are not used +-AOUT_FLAGS += -export-dynamic ++AOUT_FLAGS += -Wl,-export-dynamic + + #------------------------------------------------------------------------ + # Debug flags From ahughes at redhat.com Sun Feb 13 12:45:46 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Sun, 13 Feb 2011 20:45:46 +0000 Subject: RFC: add support for building with gcc 4.6 + gold In-Reply-To: <4D55C64A.8070003@redhat.com> References: <4D55C64A.8070003@redhat.com> Message-ID: <20110213204546.GA27397@rivendell.middle-earth.co.uk> On 18:29 Fri 11 Feb , Omair Majid wrote: > Hi, > > Building hotspot with gcc 4.6 and gold fails. Please see the bug filed > at https://bugzilla.redhat.com/show_bug.cgi?id=676659 for details. > > The attached patch fixes it for me. Any thoughts? > > Cheers, > Omair Looks good. Committed to HEAD with an appropriate NEWS entry. > diff -r a3ab67013879 Makefile.am > --- a/Makefile.am Wed Feb 09 10:47:23 2011 +0000 > +++ b/Makefile.am Fri Feb 11 18:21:57 2011 -0500 > @@ -291,7 +291,8 @@ > patches/openjdk/4724552-CubicCurve2D.patch \ > patches/openjdk/4493128-CubicCurve2D.patch \ > patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ > - patches/no-static-linking.patch > + patches/no-static-linking.patch \ > + patches/gcc-4.6-gold.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r a3ab67013879 patches/gcc-4.6-gold.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/gcc-4.6-gold.patch Fri Feb 11 18:21:57 2011 -0500 > @@ -0,0 +1,12 @@ > +diff -r 55b9f498dbce make/linux/makefiles/gcc.make > +--- openjdk/hotspot/make/linux/makefiles/gcc.make Thu Feb 10 16:24:29 2011 -0800 > ++++ openjdk/hotspot/make/linux/makefiles/gcc.make Fri Feb 11 18:09:21 2011 -0500 > +@@ -196,7 +196,7 @@ > + SHARED_FLAG = -shared > + > + # Keep symbols even they are not used > +-AOUT_FLAGS += -export-dynamic > ++AOUT_FLAGS += -Wl,-export-dynamic > + > + #------------------------------------------------------------------------ > + # Debug flags -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Mon Feb 14 03:24:32 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Mon, 14 Feb 2011 11:24:32 +0000 Subject: /hg/icedtea6: G344659: Fix issue when building on SPARC Message-ID: changeset 080e6564d096 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=080e6564d096 author: Andrew John Hughes date: Mon Feb 14 11:24:24 2011 +0000 G344659: Fix issue when building on SPARC 2011-02-13 Andrew John Hughes G344659: Fix issue when building on SPARC * Makefile.am: Add new patch. * NEWS: Updated. * patches/g344659-sparc_fix.patch: Add fix for SPARC builds on Gentoo. diffstat: 4 files changed, 23 insertions(+), 1 deletion(-) ChangeLog | 8 ++++++++ Makefile.am | 3 ++- NEWS | 1 + patches/g344659-sparc_fix.patch | 12 ++++++++++++ diffs (55 lines): diff -r fc0df075ea54 -r 080e6564d096 ChangeLog --- a/ChangeLog Sun Feb 13 17:33:58 2011 +0000 +++ b/ChangeLog Mon Feb 14 11:24:24 2011 +0000 @@ -1,3 +1,11 @@ 2011-02-13 Andrew John Hughes + + G344659: Fix issue when building on SPARC + * Makefile.am: Add new patch. + * NEWS: Updated. + * patches/g344659-sparc_fix.patch: + Add fix for SPARC builds on Gentoo. + 2011-02-13 Andrew John Hughes * NEWS: Updated. diff -r fc0df075ea54 -r 080e6564d096 Makefile.am --- a/Makefile.am Sun Feb 13 17:33:58 2011 +0000 +++ b/Makefile.am Mon Feb 14 11:24:24 2011 +0000 @@ -292,7 +292,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/4493128-CubicCurve2D.patch \ patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ patches/no-static-linking.patch \ - patches/rh676659-gcc-export-dynamic.patch + patches/rh676659-gcc-export-dynamic.patch \ + patches/g344659-sparc_fix.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r fc0df075ea54 -r 080e6564d096 NEWS --- a/NEWS Sun Feb 13 17:33:58 2011 +0000 +++ b/NEWS Mon Feb 14 11:24:24 2011 +0000 @@ -420,6 +420,7 @@ New in release 1.10 (2011-XX-XX): - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc - RH676659: Pass -export-dynamic flag to linker using -Wl as option is broken in gcc 4.6+ + - G344659: Fix issue when building on SPARC New in release 1.9.5 (2011-02-01): diff -r fc0df075ea54 -r 080e6564d096 patches/g344659-sparc_fix.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/g344659-sparc_fix.patch Mon Feb 14 11:24:24 2011 +0000 @@ -0,0 +1,12 @@ +diff -uNr openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp openjdk/hotspot/src/os_cpu/linux_sparc/vm/v_version_linux_sparc.cpp +--- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp 2010-06-21 22:12:15.000000000 +0100 ++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp 2010-11-29 20:15:36.179541001 +0000 +@@ -35,7 +35,7 @@ + } + + while (!feof(fp)) { +- if (fscanf(fp, "cpu\t\t: %100[^\n]", &cpu) == 1) { ++ if (fscanf(fp, "cpu\t\t: %100[^\n]", &cpu[0]) == 1) { + if (strstr(cpu, "Niagara") != NULL) { + rv = true; + } From omajid at redhat.com Mon Feb 14 07:53:15 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 14 Feb 2011 10:53:15 -0500 Subject: RFC: add support for building with gcc 4.6 + gold In-Reply-To: <20110213204546.GA27397@rivendell.middle-earth.co.uk> References: <4D55C64A.8070003@redhat.com> <20110213204546.GA27397@rivendell.middle-earth.co.uk> Message-ID: <4D594FEB.7020403@redhat.com> On 02/13/2011 03:45 PM, Dr Andrew John Hughes wrote: > On 18:29 Fri 11 Feb , Omair Majid wrote: >> Hi, >> >> Building hotspot with gcc 4.6 and gold fails. Please see the bug filed >> at https://bugzilla.redhat.com/show_bug.cgi?id=676659 for details. >> >> The attached patch fixes it for me. Any thoughts? >> >> Cheers, >> Omair > > Looks good. Committed to HEAD with an appropriate NEWS entry. > Thanks! Cheers, Omair From omajid at icedtea.classpath.org Mon Feb 14 07:57:49 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Mon, 14 Feb 2011 15:57:49 +0000 Subject: /hg/icedtea-web: 2 new changesets Message-ID: changeset 6915efabb42c in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=6915efabb42c author: Omair Majid date: Fri Feb 11 20:04:24 2011 -0500 Consistently name methods relating to ResourcesDesc 2011-02-11 Omair Majid * netx/net/sourceforge/jnlp/JNLPFile.java (getResourceDescs): Renamed to... (getResourcesDescs): New method. (getResourceDescs): Renamed to... (getResourcesDescs): New method. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (getDownloadOptionsForJar): Call renamed method. changeset c6f717dfcb97 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c6f717dfcb97 author: Omair Majid date: Fri Feb 11 20:13:11 2011 -0500 Fix NullPointerException in plugin caused by a non-overridden method 2011-02-11 Omair Majid * netx/net/sourceforge/jnlp/PluginBridge.java (getResourcesDescs): New method implemented to override behaviour in JNLPFile class. diffstat: 4 files changed, 28 insertions(+), 4 deletions(-) ChangeLog | 16 ++++++++++++++++ netx/net/sourceforge/jnlp/JNLPFile.java | 6 +++--- netx/net/sourceforge/jnlp/PluginBridge.java | 8 ++++++++ netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 2 +- diffs (75 lines): diff -r 0768433ea58d -r c6f717dfcb97 ChangeLog --- a/ChangeLog Thu Feb 10 17:25:18 2011 -0500 +++ b/ChangeLog Fri Feb 11 20:13:11 2011 -0500 @@ -1,3 +1,19 @@ 2011-02-10 Omair Majid + + * netx/net/sourceforge/jnlp/PluginBridge.java + (getResourcesDescs): New method implemented to override behaviour in + JNLPFile class. + +2011-02-11 Omair Majid + + * netx/net/sourceforge/jnlp/JNLPFile.java + (getResourceDescs): Renamed to... + (getResourcesDescs): New method. + (getResourceDescs): Renamed to... + (getResourcesDescs): New method. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (getDownloadOptionsForJar): Call renamed method. + 2011-02-10 Omair Majid Fix RH669942; Add support for packEnabled and versionEnabled. diff -r 0768433ea58d -r c6f717dfcb97 netx/net/sourceforge/jnlp/JNLPFile.java --- a/netx/net/sourceforge/jnlp/JNLPFile.java Thu Feb 10 17:25:18 2011 -0500 +++ b/netx/net/sourceforge/jnlp/JNLPFile.java Fri Feb 11 20:13:11 2011 -0500 @@ -396,15 +396,15 @@ public class JNLPFile { * through the default locale and the os.name and os.arch * properties. */ - public ResourcesDesc[] getResourceDescs() { - return getResourceDescs(defaultLocale, defaultOS, defaultArch); + public ResourcesDesc[] getResourcesDescs() { + return getResourcesDescs(defaultLocale, defaultOS, defaultArch); } /** * Returns the resources section of the JNLP file for the * specified locale, os, and arch. */ - public ResourcesDesc[] getResourceDescs(final Locale locale, final String os, final String arch) { + public ResourcesDesc[] getResourcesDescs(final Locale locale, final String os, final String arch) { List matchingResources = new ArrayList(); for (ResourcesDesc rescDesc: resources) { if (localMatches(locale, rescDesc.getLocales()) diff -r 0768433ea58d -r c6f717dfcb97 netx/net/sourceforge/jnlp/PluginBridge.java --- a/netx/net/sourceforge/jnlp/PluginBridge.java Thu Feb 10 17:25:18 2011 -0500 +++ b/netx/net/sourceforge/jnlp/PluginBridge.java Fri Feb 11 20:13:11 2011 -0500 @@ -244,6 +244,14 @@ public class PluginBridge extends JNLPFi }; } + /** + * Returns the resources section of the JNLP file for the + * specified locale, os, and arch. + */ + public ResourcesDesc[] getResourcesDescs(final Locale locale, final String os, final String arch) { + return new ResourcesDesc[] { getResources(locale, os, arch) }; + } + public boolean isApplet() { return true; } diff -r 0768433ea58d -r c6f717dfcb97 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Feb 10 17:25:18 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Feb 11 20:13:11 2011 -0500 @@ -1255,7 +1255,7 @@ public class JNLPClassLoader extends URL boolean usePack = false; boolean useVersion = false; - ResourcesDesc[] descs = file.getResourceDescs(); + ResourcesDesc[] descs = file.getResourcesDescs(); for (ResourcesDesc desc: descs) { JARDesc[] jars = desc.getJARs(); for (JARDesc aJar: jars) { From omajid at redhat.com Mon Feb 14 08:19:49 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 14 Feb 2011 11:19:49 -0500 Subject: [icedtea-web] RFC: fix 2 issues in fix for versioned/packed jars In-Reply-To: <20110211134927.GE5203@rivendell.middle-earth.co.uk> References: <4D5480EB.2000802@redhat.com> <20110211134927.GE5203@rivendell.middle-earth.co.uk> Message-ID: <4D595625.4050004@redhat.com> On 02/11/2011 08:49 AM, Dr Andrew John Hughes wrote: > On 19:20 Thu 10 Feb , Omair Majid wrote: >> The attached patch fixes 2 issues in my previous patch for adding >> packed/versioned jar support. > > Ok. Please commit the two as separate patches. > Pushed to HEAD. Thanks, Omair From doko at ubuntu.com Mon Feb 14 11:58:36 2011 From: doko at ubuntu.com (Matthias Klose) Date: Mon, 14 Feb 2011 20:58:36 +0100 Subject: RFC: add support for building with gcc 4.6 + gold In-Reply-To: <4D594FEB.7020403@redhat.com> References: <4D55C64A.8070003@redhat.com> <20110213204546.GA27397@rivendell.middle-earth.co.uk> <4D594FEB.7020403@redhat.com> Message-ID: <4D59896C.9090800@ubuntu.com> On 14.02.2011 16:53, Omair Majid wrote: > On 02/13/2011 03:45 PM, Dr Andrew John Hughes wrote: >> On 18:29 Fri 11 Feb , Omair Majid wrote: >>> Hi, >>> >>> Building hotspot with gcc 4.6 and gold fails. Please see the bug filed >>> at https://bugzilla.redhat.com/show_bug.cgi?id=676659 for details. >>> >>> The attached patch fixes it for me. Any thoughts? >>> >>> Cheers, >>> Omair >> >> Looks good. Committed to HEAD with an appropriate NEWS entry. It would be good to have build fixes like this on the branches too (pre-approved for 1.8). Matthias From omajid at redhat.com Mon Feb 14 13:33:29 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 14 Feb 2011 16:33:29 -0500 Subject: [icedtea-web] RFC: move TimedHashMap to netx Message-ID: <4D599FA9.6010900@redhat.com> Hi, The attached patch moves TimeHashMap from plugin/icedteanp/java/sun/applet/PluginProxySelector.java to netx/net/sourceforge/jnlp/util/TimedHashMap.java, so other ProxySelectors can also use it. My patch for adding proxy auto config support will be using this new class. Other than the movement, there are a few minor changes to it: - It no longer extends HashMap. TimedHashMap did not override all the HashMap methods and it was possible to see inconsistent data. By reducing the interface, this should not be a problem any more (the plugin code still compiles fine). - The use of Date has been replaced by System.nanoTime(). This should give us a more monotonic clock and be less susceptible to clock changes (especially to moving the clock backwards). Any thoughts or concerns? ChangeLog: 2011-02-14 Omair Majid * plugin/icedteanp/java/sun/applet/PluginProxySelector.java: Move TimedHashMap to its own class. * netx/net/sourceforge/jnlp/util/TimedHashMap.java: New class. Moved from sun.applet.PluginProxySelector. Do not subclass HashMap. Use System.nanoTime() instead of Date.getTime(). Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: timedhashmap-01.patch Type: text/x-patch Size: 6487 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110214/e36a1523/timedhashmap-01.patch From ahughes at redhat.com Mon Feb 14 14:42:46 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Mon, 14 Feb 2011 22:42:46 +0000 Subject: [icedtea-web] RFC: move TimedHashMap to netx In-Reply-To: <4D599FA9.6010900@redhat.com> References: <4D599FA9.6010900@redhat.com> Message-ID: <20110214224246.GN27397@rivendell.middle-earth.co.uk> On 16:33 Mon 14 Feb , Omair Majid wrote: > Hi, > > The attached patch moves TimeHashMap from > plugin/icedteanp/java/sun/applet/PluginProxySelector.java to > netx/net/sourceforge/jnlp/util/TimedHashMap.java, so other > ProxySelectors can also use it. My patch for adding proxy auto config > support will be using this new class. > > Other than the movement, there are a few minor changes to it: > - It no longer extends HashMap. TimedHashMap did not override all the > HashMap methods and it was possible to see inconsistent data. By > reducing the interface, this should not be a problem any more (the > plugin code still compiles fine). > - The use of Date has been replaced by System.nanoTime(). This should > give us a more monotonic clock and be less susceptible to clock > changes (especially to moving the clock backwards). > > Any thoughts or concerns? > Could you do the move in a separate patch to the other changes? Otherwise, the changes are unclear as the file appears new. > ChangeLog: > > 2011-02-14 Omair Majid > > * plugin/icedteanp/java/sun/applet/PluginProxySelector.java: > Move TimedHashMap to its own class. > * netx/net/sourceforge/jnlp/util/TimedHashMap.java: New class. > Moved from sun.applet.PluginProxySelector. Do not subclass HashMap. > Use System.nanoTime() instead of Date.getTime(). > > Cheers, > Omair > diff -r c6f717dfcb97 netx/net/sourceforge/jnlp/util/TimedHashMap.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java Mon Feb 14 16:04:28 2011 -0500 > @@ -0,0 +1,100 @@ > +/* TimedHashMap.java > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +IcedTea is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. */ > + > +package net.sourceforge.jnlp.util; > + > +import java.util.HashMap; > + > +import net.sourceforge.jnlp.runtime.JNLPRuntime; > + > +/** > + * Simple utility class that extends HashMap by adding an expiry to the entries. > + * > + * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds > + * > + * @param K The key type > + * @param V The Object type > + */ > +public class TimedHashMap { > + > + HashMap actualMap = new HashMap(); > + HashMap timeStamps = new HashMap(); > + Long expiry = 10000000000L; > + > + /** > + * Store the item in the map and associate a timestamp with it > + * > + * @param key The key > + * @param value The value to store > + */ > + public V put(K key, V value) { > + timeStamps.put(key, System.nanoTime()); > + return actualMap.put(key, value); > + } > + > + /** > + * Return cached item if it has not already expired. > + * > + * Before returning, this method also resets the "last accessed" > + * time for this entry, so it is good for another 10 seconds > + * > + * @param key The key > + */ > + public V get(K key) { > + Long now = System.nanoTime(); > + > + if (actualMap.containsKey(key)) { > + Long age = now - timeStamps.get(key); > + > + // Item exists. If it has not expired, renew its access time and return it > + if (age <= expiry) { > + if (JNLPRuntime.isDebug()) { > + System.err.println("Returning proxy " + actualMap.get(key) + " from cache for " + key); > + } > + timeStamps.put(key, System.nanoTime()); > + return actualMap.get(key); > + } else { > + if (JNLPRuntime.isDebug()) { > + System.err.println("Proxy cache for " + key + " has expired (age=" + (age * 1e-9) + " seconds)"); > + } > + } > + } > + > + return null; > + } > +} > + > diff -r c6f717dfcb97 plugin/icedteanp/java/sun/applet/PluginProxySelector.java > --- a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Fri Feb 11 20:13:11 2011 -0500 > +++ b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Mon Feb 14 16:04:28 2011 -0500 > @@ -40,12 +40,11 @@ > import java.net.InetSocketAddress; > import java.net.Proxy; > import java.net.URI; > -import java.util.Date; > import java.util.ArrayList; > -import java.util.HashMap; > import java.util.List; > > import net.sourceforge.jnlp.runtime.JNLPProxySelector; > +import net.sourceforge.jnlp.util.TimedHashMap; > > /** > * Proxy selector implementation for plugin network functions. > @@ -129,59 +128,6 @@ > return null; > } > > - /** > - * Simple utility class that extends HashMap by adding an expiry to the entries. > - * > - * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds > - * > - * @param The key type > - * @param The Object type > - */ > > - private class TimedHashMap extends HashMap { > - > - HashMap timeStamps = new HashMap(); > - Long expiry = 10000L; > - > - /** > - * Store the item in the map and associate a timestamp with it > - * > - * @param key The key > - * @param value The value to store > - */ > - public V put(K key, V value) { > - timeStamps.put(key, new Date().getTime()); > - return super.put(key, value); > - } > - > - /** > - * Return cached item if it has not already expired. > - * > - * Before returning, this method also resets the "last accessed" > - * time for this entry, so it is good for another 10 seconds > - * > - * @param key The key > - */ > - @SuppressWarnings("unchecked") > - public V get(Object key) { > - > - Long now = new Date().getTime(); > - > - if (super.containsKey(key)) { > - Long age = now - timeStamps.get(key); > - > - // Item exists. If it has not expired, renew its access time and return it > - if (age <= expiry) { > - PluginDebug.debug("Returning proxy " + super.get(key) + " from cache for " + key); > - timeStamps.put((K) key, (new Date()).getTime()); > - return super.get(key); > - } else { > - PluginDebug.debug("Proxy cache for " + key + " has expired (age=" + age / 1000.0 + " seconds)"); > - } > - } > - > - return null; > - } > - } > > } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Mon Feb 14 15:44:00 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 14 Feb 2011 18:44:00 -0500 Subject: [icedtea-web] RFC: move TimedHashMap to netx In-Reply-To: <20110214224246.GN27397@rivendell.middle-earth.co.uk> References: <4D599FA9.6010900@redhat.com> <20110214224246.GN27397@rivendell.middle-earth.co.uk> Message-ID: <4D59BE40.6040502@redhat.com> On 02/14/2011 05:42 PM, Dr Andrew John Hughes wrote: > On 16:33 Mon 14 Feb , Omair Majid wrote: >> Hi, >> >> The attached patch moves TimeHashMap from >> plugin/icedteanp/java/sun/applet/PluginProxySelector.java to >> netx/net/sourceforge/jnlp/util/TimedHashMap.java, so other >> ProxySelectors can also use it. My patch for adding proxy auto config >> support will be using this new class. >> >> Other than the movement, there are a few minor changes to it: >> - It no longer extends HashMap. TimedHashMap did not override all the >> HashMap methods and it was possible to see inconsistent data. By >> reducing the interface, this should not be a problem any more (the >> plugin code still compiles fine). >> - The use of Date has been replaced by System.nanoTime(). This should >> give us a more monotonic clock and be less susceptible to clock >> changes (especially to moving the clock backwards). >> >> Any thoughts or concerns? >> > > Could you do the move in a separate patch to the other changes? > Otherwise, the changes are unclear as the file appears new. > Good point. I have split it into two patches. part1 contains all the changes necessary to move TimedHashMap and make it compile (including the PluginDebug changes). part2 contains the actual changes in TimedHashMap (not extending HashMap and using System.nanoTime()). Any other comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: timedhashmap-02-part2.patch Type: text/x-patch Size: 2699 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110214/8d86107c/timedhashmap-02-part2.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: timedhashmap-02-part1.patch Type: text/x-patch Size: 6556 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110214/8d86107c/timedhashmap-02-part1.patch From ahughes at redhat.com Tue Feb 15 05:20:52 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 15 Feb 2011 13:20:52 +0000 Subject: [icedtea-web] RFC: move TimedHashMap to netx In-Reply-To: <4D59BE40.6040502@redhat.com> References: <4D599FA9.6010900@redhat.com> <20110214224246.GN27397@rivendell.middle-earth.co.uk> <4D59BE40.6040502@redhat.com> Message-ID: <20110215132052.GA6266@rivendell.middle-earth.co.uk> On 18:44 Mon 14 Feb , Omair Majid wrote: > On 02/14/2011 05:42 PM, Dr Andrew John Hughes wrote: > > On 16:33 Mon 14 Feb , Omair Majid wrote: > >> Hi, > >> > >> The attached patch moves TimeHashMap from > >> plugin/icedteanp/java/sun/applet/PluginProxySelector.java to > >> netx/net/sourceforge/jnlp/util/TimedHashMap.java, so other > >> ProxySelectors can also use it. My patch for adding proxy auto config > >> support will be using this new class. > >> > >> Other than the movement, there are a few minor changes to it: > >> - It no longer extends HashMap. TimedHashMap did not override all the > >> HashMap methods and it was possible to see inconsistent data. By > >> reducing the interface, this should not be a problem any more (the > >> plugin code still compiles fine). > >> - The use of Date has been replaced by System.nanoTime(). This should > >> give us a more monotonic clock and be less susceptible to clock > >> changes (especially to moving the clock backwards). > >> > >> Any thoughts or concerns? > >> > > > > Could you do the move in a separate patch to the other changes? > > Otherwise, the changes are unclear as the file appears new. > > > > Good point. I have split it into two patches. part1 contains all the > changes necessary to move TimedHashMap and make it compile (including > the PluginDebug changes). part2 contains the actual changes in > TimedHashMap (not extending HashMap and using System.nanoTime()). > > Any other comments? > > Cheers, > Omair The changes look fine now. I like how wrapping instead of extending HashMap means we can now have a more typesafe get method. > diff -r 1ffa1308adbe netx/net/sourceforge/jnlp/util/TimedHashMap.java > --- a/netx/net/sourceforge/jnlp/util/TimedHashMap.java Mon Feb 14 18:36:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java Mon Feb 14 18:38:06 2011 -0500 > @@ -37,7 +37,6 @@ > > package net.sourceforge.jnlp.util; > > -import java.util.Date; > import java.util.HashMap; > > import net.sourceforge.jnlp.runtime.JNLPRuntime; > @@ -47,14 +46,14 @@ > * > * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds > * > - * @param The key type > - * @param The Object type > + * @param K The key type > + * @param V The Object type > */ > +public class TimedHashMap { > > -public class TimedHashMap extends HashMap { > - > + HashMap actualMap = new HashMap(); > HashMap timeStamps = new HashMap(); > - Long expiry = 10000L; > + Long expiry = 10000000000L; > > /** > * Store the item in the map and associate a timestamp with it > @@ -63,8 +62,8 @@ > * @param value The value to store > */ > public V put(K key, V value) { > - timeStamps.put(key, new Date().getTime()); > - return super.put(key, value); > + timeStamps.put(key, System.nanoTime()); > + return actualMap.put(key, value); > } > > /** > @@ -75,24 +74,22 @@ > * > * @param key The key > */ > - @SuppressWarnings("unchecked") > - public V get(Object key) { > + public V get(K key) { > + Long now = System.nanoTime(); > > - Long now = new Date().getTime(); > - > - if (super.containsKey(key)) { > + if (actualMap.containsKey(key)) { > Long age = now - timeStamps.get(key); > > // Item exists. If it has not expired, renew its access time and return it > if (age <= expiry) { > if (JNLPRuntime.isDebug()) { > - System.err.println("Returning proxy " + super.get(key) + " from cache for " + key); > + System.err.println("Returning proxy " + actualMap.get(key) + " from cache for " + key); > } > - timeStamps.put((K) key, (new Date()).getTime()); > - return super.get(key); > + timeStamps.put(key, System.nanoTime()); > + return actualMap.get(key); > } else { > if (JNLPRuntime.isDebug()) { > - System.err.println("Proxy cache for " + key + " has expired (age=" + age / 1000.0 + " seconds)"); > + System.err.println("Proxy cache for " + key + " has expired (age=" + (age * 1e-9) + " seconds)"); > } > } > } > @@ -100,3 +97,4 @@ > return null; > } > } > + > diff -r c6f717dfcb97 -r 1ffa1308adbe netx/net/sourceforge/jnlp/util/TimedHashMap.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java Mon Feb 14 18:36:18 2011 -0500 > @@ -0,0 +1,102 @@ > +/* TimedHashMap.java > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2, or (at your option) > +any later version. > + > +IcedTea is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to the > +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. */ > + > +package net.sourceforge.jnlp.util; > + > +import java.util.Date; > +import java.util.HashMap; > + > +import net.sourceforge.jnlp.runtime.JNLPRuntime; > + > +/** > + * Simple utility class that extends HashMap by adding an expiry to the entries. > + * > + * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds > + * > + * @param The key type > + * @param The Object type > + */ > + > +public class TimedHashMap extends HashMap { > + > + HashMap timeStamps = new HashMap(); > + Long expiry = 10000L; > + > + /** > + * Store the item in the map and associate a timestamp with it > + * > + * @param key The key > + * @param value The value to store > + */ > + public V put(K key, V value) { > + timeStamps.put(key, new Date().getTime()); > + return super.put(key, value); > + } > + > + /** > + * Return cached item if it has not already expired. > + * > + * Before returning, this method also resets the "last accessed" > + * time for this entry, so it is good for another 10 seconds > + * > + * @param key The key > + */ > + @SuppressWarnings("unchecked") > + public V get(Object key) { > + > + Long now = new Date().getTime(); > + > + if (super.containsKey(key)) { > + Long age = now - timeStamps.get(key); > + > + // Item exists. If it has not expired, renew its access time and return it > + if (age <= expiry) { > + if (JNLPRuntime.isDebug()) { > + System.err.println("Returning proxy " + super.get(key) + " from cache for " + key); > + } > + timeStamps.put((K) key, (new Date()).getTime()); > + return super.get(key); > + } else { > + if (JNLPRuntime.isDebug()) { > + System.err.println("Proxy cache for " + key + " has expired (age=" + age / 1000.0 + " seconds)"); > + } > + } > + } > + > + return null; > + } > +} > diff -r c6f717dfcb97 -r 1ffa1308adbe plugin/icedteanp/java/sun/applet/PluginProxySelector.java > --- a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Fri Feb 11 20:13:11 2011 -0500 > +++ b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Mon Feb 14 18:36:18 2011 -0500 > @@ -40,12 +40,11 @@ > import java.net.InetSocketAddress; > import java.net.Proxy; > import java.net.URI; > -import java.util.Date; > import java.util.ArrayList; > -import java.util.HashMap; > import java.util.List; > > import net.sourceforge.jnlp.runtime.JNLPProxySelector; > +import net.sourceforge.jnlp.util.TimedHashMap; > > /** > * Proxy selector implementation for plugin network functions. > @@ -129,59 +128,4 @@ > return null; > } > > - /** > - * Simple utility class that extends HashMap by adding an expiry to the entries. > - * > - * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds > - * > - * @param The key type > - * @param The Object type > - */ > - > - private class TimedHashMap extends HashMap { > - > - HashMap timeStamps = new HashMap(); > - Long expiry = 10000L; > - > - /** > - * Store the item in the map and associate a timestamp with it > - * > - * @param key The key > - * @param value The value to store > - */ > - public V put(K key, V value) { > - timeStamps.put(key, new Date().getTime()); > - return super.put(key, value); > - } > - > - /** > - * Return cached item if it has not already expired. > - * > - * Before returning, this method also resets the "last accessed" > - * time for this entry, so it is good for another 10 seconds > - * > - * @param key The key > - */ > - @SuppressWarnings("unchecked") > - public V get(Object key) { > - > - Long now = new Date().getTime(); > - > - if (super.containsKey(key)) { > - Long age = now - timeStamps.get(key); > - > - // Item exists. If it has not expired, renew its access time and return it > - if (age <= expiry) { > - PluginDebug.debug("Returning proxy " + super.get(key) + " from cache for " + key); > - timeStamps.put((K) key, (new Date()).getTime()); > - return super.get(key); > - } else { > - PluginDebug.debug("Proxy cache for " + key + " has expired (age=" + age / 1000.0 + " seconds)"); > - } > - } > - > - return null; > - } > - } > - > } > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at icedtea.classpath.org Tue Feb 15 08:01:49 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Tue, 15 Feb 2011 16:01:49 +0000 Subject: /hg/icedtea-web: 2 new changesets Message-ID: changeset bf3431004829 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=bf3431004829 author: Omair Majid date: Tue Feb 15 10:35:49 2011 -0500 Move TimedHashMap to netx 2011-02-15 Omair Majid * plugin/icedteanp/java/sun/applet/PluginProxySelector.java (TimedHashMap): Moved to... * netx/net/sourceforge/jnlp/util/TimedHashMap.java: New file. changeset cd1eda4f0d97 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=cd1eda4f0d97 author: Omair Majid date: Tue Feb 15 11:01:01 2011 -0500 Small fixes to TimedHashMap 2011-02-15 Omair Majid * netx/net/sourceforge/jnlp/util/TimedHashMap.java: Do not extend HashMap to provide a more type-safe and consistent interface. Use System.nanoTime for a more monotonic clock. diffstat: 3 files changed, 113 insertions(+), 57 deletions(-) ChangeLog | 12 + netx/net/sourceforge/jnlp/util/TimedHashMap.java | 100 +++++++++++++ plugin/icedteanp/java/sun/applet/PluginProxySelector.java | 58 ------- diffs (200 lines): diff -r c6f717dfcb97 -r cd1eda4f0d97 ChangeLog --- a/ChangeLog Fri Feb 11 20:13:11 2011 -0500 +++ b/ChangeLog Tue Feb 15 11:01:01 2011 -0500 @@ -1,3 +1,15 @@ 2011-02-11 Omair Majid + + * netx/net/sourceforge/jnlp/util/TimedHashMap.java: Do not extend HashMap + to provide a more type-safe and consistent interface. Use System.nanoTime + for a more monotonic clock. + +2011-02-15 Omair Majid + + * plugin/icedteanp/java/sun/applet/PluginProxySelector.java + (TimedHashMap): Moved to... + * netx/net/sourceforge/jnlp/util/TimedHashMap.java: New file. + 2011-02-11 Omair Majid * netx/net/sourceforge/jnlp/PluginBridge.java diff -r c6f717dfcb97 -r cd1eda4f0d97 netx/net/sourceforge/jnlp/util/TimedHashMap.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/netx/net/sourceforge/jnlp/util/TimedHashMap.java Tue Feb 15 11:01:01 2011 -0500 @@ -0,0 +1,100 @@ +/* TimedHashMap.java + Copyright (C) 2011 Red Hat, Inc. + +This file is part of IcedTea. + +IcedTea is free software; you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation; either version 2, or (at your option) +any later version. + +IcedTea is distributed in the hope that it will be useful, but +WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +General Public License for more details. + +You should have received a copy of the GNU General Public License +along with IcedTea; see the file COPYING. If not, write to the +Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA +02110-1301 USA. + +Linking this library statically or dynamically with other modules is +making a combined work based on this library. Thus, the terms and +conditions of the GNU General Public License cover the whole +combination. + +As a special exception, the copyright holders of this library give you +permission to link this library with independent modules to produce an +executable, regardless of the license terms of these independent +modules, and to copy and distribute the resulting executable under +terms of your choice, provided that you also meet, for each linked +independent module, the terms and conditions of the license of that +module. An independent module is a module which is not derived from +or based on this library. If you modify this library, you may extend +this exception to your version of the library, but you are not +obligated to do so. If you do not wish to do so, delete this +exception statement from your version. */ + +package net.sourceforge.jnlp.util; + +import java.util.HashMap; + +import net.sourceforge.jnlp.runtime.JNLPRuntime; + +/** + * Simple utility class that extends HashMap by adding an expiry to the entries. + * + * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds + * + * @param K The key type + * @param V The Object type + */ +public class TimedHashMap { + + HashMap actualMap = new HashMap(); + HashMap timeStamps = new HashMap(); + Long expiry = 10000000000L; + + /** + * Store the item in the map and associate a timestamp with it + * + * @param key The key + * @param value The value to store + */ + public V put(K key, V value) { + timeStamps.put(key, System.nanoTime()); + return actualMap.put(key, value); + } + + /** + * Return cached item if it has not already expired. + * + * Before returning, this method also resets the "last accessed" + * time for this entry, so it is good for another 10 seconds + * + * @param key The key + */ + public V get(K key) { + Long now = System.nanoTime(); + + if (actualMap.containsKey(key)) { + Long age = now - timeStamps.get(key); + + // Item exists. If it has not expired, renew its access time and return it + if (age <= expiry) { + if (JNLPRuntime.isDebug()) { + System.err.println("Returning proxy " + actualMap.get(key) + " from cache for " + key); + } + timeStamps.put(key, System.nanoTime()); + return actualMap.get(key); + } else { + if (JNLPRuntime.isDebug()) { + System.err.println("Proxy cache for " + key + " has expired (age=" + (age * 1e-9) + " seconds)"); + } + } + } + + return null; + } +} + diff -r c6f717dfcb97 -r cd1eda4f0d97 plugin/icedteanp/java/sun/applet/PluginProxySelector.java --- a/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Fri Feb 11 20:13:11 2011 -0500 +++ b/plugin/icedteanp/java/sun/applet/PluginProxySelector.java Tue Feb 15 11:01:01 2011 -0500 @@ -40,12 +40,11 @@ import java.net.InetSocketAddress; import java.net.InetSocketAddress; import java.net.Proxy; import java.net.URI; -import java.util.Date; import java.util.ArrayList; -import java.util.HashMap; import java.util.List; import net.sourceforge.jnlp.runtime.JNLPProxySelector; +import net.sourceforge.jnlp.util.TimedHashMap; /** * Proxy selector implementation for plugin network functions. @@ -129,59 +128,4 @@ public class PluginProxySelector extends return null; } - /** - * Simple utility class that extends HashMap by adding an expiry to the entries. - * - * This map stores entries, and returns them only if the entries were last accessed within time t=10 seconds - * - * @param The key type - * @param The Object type - */ - - private class TimedHashMap extends HashMap { - - HashMap timeStamps = new HashMap(); - Long expiry = 10000L; - - /** - * Store the item in the map and associate a timestamp with it - * - * @param key The key - * @param value The value to store - */ - public V put(K key, V value) { - timeStamps.put(key, new Date().getTime()); - return super.put(key, value); - } - - /** - * Return cached item if it has not already expired. - * - * Before returning, this method also resets the "last accessed" - * time for this entry, so it is good for another 10 seconds - * - * @param key The key - */ - @SuppressWarnings("unchecked") - public V get(Object key) { - - Long now = new Date().getTime(); - - if (super.containsKey(key)) { - Long age = now - timeStamps.get(key); - - // Item exists. If it has not expired, renew its access time and return it - if (age <= expiry) { - PluginDebug.debug("Returning proxy " + super.get(key) + " from cache for " + key); - timeStamps.put((K) key, (new Date()).getTime()); - return super.get(key); - } else { - PluginDebug.debug("Proxy cache for " + key + " has expired (age=" + age / 1000.0 + " seconds)"); - } - } - - return null; - } - } - } From omajid at redhat.com Tue Feb 15 08:02:57 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 15 Feb 2011 11:02:57 -0500 Subject: [icedtea-web] RFC: move TimedHashMap to netx In-Reply-To: <20110215132052.GA6266@rivendell.middle-earth.co.uk> References: <4D599FA9.6010900@redhat.com> <20110214224246.GN27397@rivendell.middle-earth.co.uk> <4D59BE40.6040502@redhat.com> <20110215132052.GA6266@rivendell.middle-earth.co.uk> Message-ID: <4D5AA3B1.8010005@redhat.com> On 02/15/2011 08:20 AM, Dr Andrew John Hughes wrote: > On 18:44 Mon 14 Feb , Omair Majid wrote: >> On 02/14/2011 05:42 PM, Dr Andrew John Hughes wrote: >>> On 16:33 Mon 14 Feb , Omair Majid wrote: >>>> Hi, >>>> >>>> The attached patch moves TimeHashMap from >>>> plugin/icedteanp/java/sun/applet/PluginProxySelector.java to >>>> netx/net/sourceforge/jnlp/util/TimedHashMap.java, so other >>>> ProxySelectors can also use it. My patch for adding proxy auto config >>>> support will be using this new class. >>>> >>>> Other than the movement, there are a few minor changes to it: >>>> - It no longer extends HashMap. TimedHashMap did not override all the >>>> HashMap methods and it was possible to see inconsistent data. By >>>> reducing the interface, this should not be a problem any more (the >>>> plugin code still compiles fine). >>>> - The use of Date has been replaced by System.nanoTime(). This should >>>> give us a more monotonic clock and be less susceptible to clock >>>> changes (especially to moving the clock backwards). >>>> >>>> Any thoughts or concerns? >>>> >>> >>> Could you do the move in a separate patch to the other changes? >>> Otherwise, the changes are unclear as the file appears new. >>> >> >> Good point. I have split it into two patches. part1 contains all the >> changes necessary to move TimedHashMap and make it compile (including >> the PluginDebug changes). part2 contains the actual changes in >> TimedHashMap (not extending HashMap and using System.nanoTime()). >> >> Any other comments? >> >> Cheers, >> Omair > > The changes look fine now. I like how wrapping instead of extending > HashMap means we can now have a more typesafe get method. Thanks for the review. I have pushed changes. Cheers, Omair From andrew at icedtea.classpath.org Tue Feb 15 13:46:12 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 21:46:12 +0000 Subject: /hg/release/icedtea6-1.7: 9 new changesets Message-ID: changeset d063b76189d8 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=d063b76189d8 author: Andrew John Hughes date: Wed Feb 09 18:54:34 2011 +0000 Security updates from Oracle SSR. S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption S6907662, CVE-2010-4465: Swing timer-based security manager bypass S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries 2011-02-09 Andrew John Hughes * Makefile.am: Add new patches. * NEWS: Updated. * patches/icedtea-nio2.patch: Rejigged. * patches/security/20110215/6878713.patch, * patches/security/20110215/6907662.patch, * patches/security/20110215/6981922.patch, * patches/security/20110215/6983554.patch, * patches/security/20110215/6994263.patch: Security updates from Oracle SSR. changeset 5dad2e76dcf9 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=5dad2e76dcf9 author: Andrew John Hughes date: Thu Feb 10 09:25:31 2011 +0000 Add 6985453 patch which was missing from first Oracle bundle. S6985453, CVE-2010-4471: Java2D font-related system property leak 2011-02-10 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6985453.patch: Add patch for 6985453 missing from first Oracle bundle. changeset 2d84b6988fe1 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=2d84b6988fe1 author: Andrew John Hughes date: Fri Feb 11 15:55:37 2011 +0000 Add patch finally supplied in third Oracle bundle. 2011-02-11 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6927050.patch, Add patch for 6927050 missing from first two Oracle bundles. changeset 9c8044a7a1d3 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=9c8044a7a1d3 author: Andrew John Hughes date: Fri Feb 11 16:24:11 2011 +0000 Bump to 1.7.10. 2011-02-11 Andrew John Hughes * configure.ac: Bump to 1.7.10. changeset 4cb5a70fef4d in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=4cb5a70fef4d author: Andrew John Hughes date: Sun Feb 13 19:18:41 2011 +0000 Vulnerability in permissions assigned to applets with multiple JARs 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (initializeResources()): Only create a SecurityDesc with all permissions when the jar is signed. changeset 9d9eee71b94a in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=9d9eee71b94a author: Andrew John Hughes date: Sun Feb 13 21:32:11 2011 +0000 RH676659: Pass -export-dynamic option to linker not gcc. 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid RH676659: Pass -export-dynamic option to linker not gcc. * Makefile.am: Add new patch. * patches/rh676659-gcc-export-dynamic.patch: Pass -Wl,-export- dynamic rather than -export-dynamic. changeset 28d51992e654 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=28d51992e654 author: Andrew John Hughes date: Mon Feb 14 12:22:36 2011 +0000 Fix latent JAXP bug by adding missing import. 2011-02-14 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/latent_jaxp_bug.patch: Add missing import. changeset 8da8c92b9067 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=8da8c92b9067 author: Andrew John Hughes date: Mon Feb 14 12:24:08 2011 +0000 Add CVE and RH bug ID for NetX security fix. 2011-02-14 Andrew John Hughes * NEWS: Add CVE and bug ID for NetX security fix. changeset a7d6abfd813b in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=a7d6abfd813b author: Andrew John Hughes date: Tue Feb 15 21:42:25 2011 +0000 Added tag icedtea6-1.7.10 for changeset 8da8c92b9067 diffstat: 16 files changed, 1812 insertions(+), 83 deletions(-) .hgtags | 1 ChangeLog | 65 + Makefile.am | 13 NEWS | 15 configure.ac | 2 patches/icedtea-nio2.patch | 155 +-- patches/latent_jaxp_bug.patch | 10 patches/rh676659-gcc-export-dynamic.patch | 12 patches/security/20110215/6878713.patch | 143 +++ patches/security/20110215/6907662.patch | 758 ++++++++++++++++++ patches/security/20110215/6927050.patch | 307 +++++++ patches/security/20110215/6981922.patch | 245 +++++ patches/security/20110215/6983554.patch | 20 patches/security/20110215/6985453.patch | 104 ++ patches/security/20110215/6994263.patch | 33 rt/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 12 diffs (truncated from 2240 to 500 lines): diff -r 24077bd3fcd4 -r a7d6abfd813b .hgtags --- a/.hgtags Wed Feb 09 17:58:33 2011 +0000 +++ b/.hgtags Tue Feb 15 21:42:25 2011 +0000 @@ -31,3 +31,4 @@ 8784e22fa2897df7373ca8869e7dab8d3af8c8c9 8784e22fa2897df7373ca8869e7dab8d3af8c8c9 icedtea6-1.7.7 626c4d1e1fa47b492bb41c8438f66aacd35146ae icedtea6-1.7.8 988c75b2751e89209b8126b7a3d6d1379aa3e56e icedtea6-1.7.9 +8da8c92b90676a741918c675c27bc74fd55bbf0b icedtea6-1.7.10 diff -r 24077bd3fcd4 -r a7d6abfd813b ChangeLog --- a/ChangeLog Wed Feb 09 17:58:33 2011 +0000 +++ b/ChangeLog Tue Feb 15 21:42:25 2011 +0000 @@ -1,3 +1,68 @@ 2011-02-09 Andrew John Hughes + + * NEWS: Add CVE and bug ID for NetX + security fix. + +2011-02-14 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/latent_jaxp_bug.patch: + Add missing import. + +2011-02-13 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + RH676659: Pass -export-dynamic option to linker not gcc. + * Makefile.am: Add new patch. + * patches/rh676659-gcc-export-dynamic.patch: + Pass -Wl,-export-dynamic rather than -export-dynamic. + +2011-02-13 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: + (initializeResources()): Only create a SecurityDesc with + all permissions when the jar is signed. + +2011-02-11 Andrew John Hughes + + * configure.ac: Bump to 1.7.10. + +2011-02-11 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6927050.patch, + Add patch for 6927050 missing from first two + Oracle bundles. + +2011-02-10 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6985453.patch: + Add patch for 6985453 missing from first Oracle + bundle. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add new patches. + * NEWS: Updated. + * patches/icedtea-nio2.patch: Rejigged. + * patches/security/20110215/6878713.patch, + * patches/security/20110215/6907662.patch, + * patches/security/20110215/6981922.patch, + * patches/security/20110215/6983554.patch, + * patches/security/20110215/6994263.patch: + Security updates from Oracle SSR. + 2011-02-09 Andrew John Hughes * NEWS: Add 1.7.10. diff -r 24077bd3fcd4 -r a7d6abfd813b Makefile.am --- a/Makefile.am Wed Feb 09 17:58:33 2011 +0000 +++ b/Makefile.am Tue Feb 15 21:42:25 2011 +0000 @@ -261,7 +261,14 @@ SECURITY_PATCHES = \ patches/security/20101012/6963285.patch \ patches/security/20101012/6981426.patch \ patches/security/20101012/6990437.patch \ - patches/security/20110209/4421494.patch + patches/security/20110209/4421494.patch \ + patches/security/20110215/6878713.patch \ + patches/security/20110215/6907662.patch \ + patches/security/20110215/6981922.patch \ + patches/security/20110215/6983554.patch \ + patches/security/20110215/6994263.patch \ + patches/security/20110215/6985453.patch \ + patches/security/20110215/6927050.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ @@ -384,7 +391,9 @@ ICEDTEA_PATCHES = \ patches/openjdk/6795356-proxylazyvalue-leak.patch \ patches/openjdk/6687968-pngimagereader_mem_leak.patch \ patches/openjdk/6541476-png-iTXt-chunk.patch \ - patches/openjdk/6782079-png_metadata_oom.patch + patches/openjdk/6782079-png_metadata_oom.patch \ + patches/rh676659-gcc-export-dynamic.patch \ + patches/latent_jaxp_bug.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ diff -r 24077bd3fcd4 -r a7d6abfd813b NEWS --- a/NEWS Wed Feb 09 17:58:33 2011 +0000 +++ b/NEWS Tue Feb 15 21:42:25 2011 +0000 @@ -8,7 +8,20 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.7.10 (2011-XX-XX): +New in release 1.7.10 (2011-02-15): + +* Security updates + - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption + - S6907662, CVE-2010-4465: Swing timer-based security manager bypass + - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation + - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - S6985453, CVE-2010-4471: Java2D font-related system property leak + - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation + - RH677332, CVE-2011-0706: Multiple signers privilege escalation +* Bug fixes + - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken + - Fix latent JAXP bug caused by missing import New in release 1.7.9 (2011-02-09): diff -r 24077bd3fcd4 -r a7d6abfd813b configure.ac --- a/configure.ac Wed Feb 09 17:58:33 2011 +0000 +++ b/configure.ac Tue Feb 15 21:42:25 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [1.7.10pre], [distro -AC_INIT([icedtea6], [1.7.10pre], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.7.10], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 24077bd3fcd4 -r a7d6abfd813b patches/icedtea-nio2.patch --- a/patches/icedtea-nio2.patch Wed Feb 09 17:58:33 2011 +0000 +++ b/patches/icedtea-nio2.patch Tue Feb 15 21:42:25 2011 +0000 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/docs/COR diff -Nru openjdk.orig/jdk/make/docs/CORE_PKGS.gmk openjdk/jdk/make/docs/CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2009-01-07 21:17:37.000000000 +0000 -+++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2009-01-09 21:21:59.000000000 +0000 +--- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2009-10-14 18:17:14.000000000 +0100 ++++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2011-02-09 18:08:16.658865718 +0000 @@ -36,6 +36,7 @@ sunw.* \ com.sun.* \ @@ -10,8 +10,8 @@ diff -Nru openjdk.orig/jdk/make/docs/COR org.w3c.dom.css \ org.w3c.dom.html \ diff -Nru openjdk.orig/jdk/make/docs/Makefile openjdk/jdk/make/docs/Makefile ---- openjdk.orig/jdk/make/docs/Makefile 2009-02-03 16:20:38.000000000 +0000 -+++ openjdk/jdk/make/docs/Makefile 2009-02-03 19:40:10.000000000 +0000 +--- openjdk.orig/jdk/make/docs/Makefile 2011-02-09 18:07:27.000000000 +0000 ++++ openjdk/jdk/make/docs/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -404,6 +404,29 @@ # TREEAPI_PKGS is located in NON_CORE_PKGS.gmk @@ -68,8 +68,8 @@ diff -Nru openjdk.orig/jdk/make/docs/Mak # List the values defined in the makefile hierarchy, to make sure everything # is set properly, and to help identify values we can use instead of making new ones. diff -Nru openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk openjdk/jdk/make/docs/NON_CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2009-01-07 21:27:46.000000000 +0000 -+++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2009-02-03 16:28:29.000000000 +0000 +--- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-09 18:07:28.000000000 +0000 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-09 18:08:16.666865802 +0000 @@ -65,6 +65,16 @@ HTTPSERVER_PKGS = com.sun.net.httpserver \ com.sun.net.httpserver.spi @@ -87,18 +87,18 @@ diff -Nru openjdk.orig/jdk/make/docs/NON DOCLETAPI_PKGS = com.sun.javadoc TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java -@@ -89,6 +99,7 @@ - $(MGMT_PKGS) \ +@@ -94,6 +104,7 @@ + $(JAVASCRIPT_PKGS) \ $(JAAS_PKGS) \ $(JGSS_PKGS) \ + $(NIO2_PKGS) \ $(OLD_JSSE_PKGS) \ $(HTTPSERVER_PKGS) \ - $(SMARTCARDIO_PKGS) + $(SMARTCARDIO_PKGS) \ diff -Nru openjdk.orig/jdk/make/java/java/FILES_java.gmk openjdk/jdk/make/java/java/FILES_java.gmk ---- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2009-01-07 21:35:50.000000000 +0000 -+++ openjdk/jdk/make/java/java/FILES_java.gmk 2009-01-12 15:24:01.000000000 +0000 -@@ -516,6 +516,13 @@ +--- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2011-02-09 18:07:21.000000000 +0000 ++++ openjdk/jdk/make/java/java/FILES_java.gmk 2011-02-09 18:08:16.666865802 +0000 +@@ -517,6 +517,13 @@ sun/misc/JavaLangAccess.java \ sun/misc/JavaIOAccess.java \ sun/misc/JavaIODeleteOnExitAccess.java \ @@ -114,8 +114,8 @@ diff -Nru openjdk.orig/jdk/make/java/jav FILES_java = $(JAVA_JAVA_java) diff -Nru openjdk.orig/jdk/make/java/nio/FILES_java.gmk openjdk/jdk/make/java/nio/FILES_java.gmk ---- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2009-01-10 03:21:38.000000000 +0000 -+++ openjdk/jdk/make/java/nio/FILES_java.gmk 2009-01-19 19:13:49.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2011-02-09 18:07:22.000000000 +0000 ++++ openjdk/jdk/make/java/nio/FILES_java.gmk 2011-02-09 18:08:16.666865802 +0000 @@ -75,12 +75,13 @@ sun/nio/ch/DefaultSelectorProvider.java \ sun/nio/ch/DirectBuffer.java \ @@ -315,8 +315,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio FILES_java = $(FILES_src) $(FILES_gen) diff -Nru openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile ---- openjdk.orig/jdk/make/java/nio/Makefile 2009-01-10 03:22:13.000000000 +0000 -+++ openjdk/jdk/make/java/nio/Makefile 2009-01-15 16:35:28.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/Makefile 2011-02-09 18:07:22.000000000 +0000 ++++ openjdk/jdk/make/java/nio/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -40,6 +40,11 @@ SNIO_SRC = $(SHARE_SRC)/classes/sun/nio SNIO_GEN = $(GENSRCDIR)/sun/nio @@ -663,8 +663,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio + .PHONY: sources diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-linux openjdk/jdk/make/java/nio/mapfile-linux ---- openjdk.orig/jdk/make/java/nio/mapfile-linux 2009-01-07 22:08:47.000000000 +0000 -+++ openjdk/jdk/make/java/nio/mapfile-linux 2009-01-29 01:13:17.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/mapfile-linux 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-linux 2011-02-09 18:08:16.666865802 +0000 @@ -20,6 +20,14 @@ Java_sun_nio_ch_EPollArrayWrapper_interrupt; Java_sun_nio_ch_EPollArrayWrapper_offsetofData; @@ -781,8 +781,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-solaris openjdk/jdk/make/java/nio/mapfile-solaris ---- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2009-01-07 22:08:47.000000000 +0000 -+++ openjdk/jdk/make/java/nio/mapfile-solaris 2009-01-07 22:18:51.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-solaris 2011-02-09 18:08:16.666865802 +0000 @@ -73,6 +73,75 @@ Java_sun_nio_ch_ServerSocketChannelImpl_listen; Java_sun_nio_ch_SocketChannelImpl_checkConnect; @@ -860,8 +860,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/mkdemo/Makefile openjdk/jdk/make/mkdemo/Makefile ---- openjdk.orig/jdk/make/mkdemo/Makefile 2009-01-07 22:23:02.000000000 +0000 -+++ openjdk/jdk/make/mkdemo/Makefile 2009-01-07 22:23:48.000000000 +0000 +--- openjdk.orig/jdk/make/mkdemo/Makefile 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/mkdemo/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -31,7 +31,7 @@ PRODUCT = demos include $(BUILDDIR)/common/Defs.gmk @@ -872,8 +872,8 @@ diff -Nru openjdk.orig/jdk/make/mkdemo/M all build:: nbproject $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/make/mksample/nio/Makefile openjdk/jdk/make/mksample/nio/Makefile ---- openjdk.orig/jdk/make/mksample/nio/Makefile 2009-01-07 22:23:19.000000000 +0000 -+++ openjdk/jdk/make/mksample/nio/Makefile 2009-01-07 22:24:06.000000000 +0000 +--- openjdk.orig/jdk/make/mksample/nio/Makefile 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/mksample/nio/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -31,7 +31,7 @@ PRODUCT = java include $(BUILDDIR)/common/Defs.gmk @@ -884,9 +884,9 @@ diff -Nru openjdk.orig/jdk/make/mksample $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/src/share/classes/java/io/File.java openjdk/jdk/src/share/classes/java/io/File.java ---- openjdk.orig/jdk/src/share/classes/java/io/File.java 2009-01-12 13:32:17.000000000 +0000 -+++ openjdk/jdk/src/share/classes/java/io/File.java 2009-01-12 13:35:18.000000000 +0000 -@@ -1957,6 +1957,13 @@ +--- openjdk.orig/jdk/src/share/classes/java/io/File.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/java/io/File.java 2011-02-09 18:08:16.666865802 +0000 +@@ -1958,6 +1958,13 @@ } } ); @@ -901,9 +901,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla diff -Nru openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java ---- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2009-01-16 04:07:15.000000000 +0000 -+++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2009-01-19 19:12:21.000000000 +0000 -@@ -529,4 +529,15 @@ +--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-09 18:08:16.666865802 +0000 +@@ -536,4 +536,15 @@ } private static native void init(); @@ -920,8 +920,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java ---- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2009-01-13 23:54:13.000000000 +0000 -+++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2009-01-15 01:21:36.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2009-10-14 18:17:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2011-02-09 18:08:16.666865802 +0000 @@ -2004,4 +2004,23 @@ } } @@ -947,8 +947,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java openjdk/jdk/src/share/classes/sun/misc/Unsafe.java ---- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2009-01-19 15:44:19.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2009-01-19 15:47:42.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2009-10-14 18:17:41.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2011-02-09 18:08:16.682865972 +0000 @@ -504,9 +504,33 @@ /** * Sets all bytes in a given block of memory to a copy of another @@ -996,9 +996,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla * Report the scale factor for addressing elements in the storage * allocation of a given array class. However, arrays of "narrow" types diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2009-01-16 03:10:17.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2009-01-19 21:04:48.000000000 +0000 -@@ -29,10 +29,28 @@ +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-09 18:09:30.467645679 +0000 +@@ -29,9 +29,29 @@ import java.io.IOException; import java.net.*; import java.nio.ByteBuffer; @@ -1014,7 +1014,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import java.util.Set; + import java.lang.ref.SoftReference; - ++ +import org.classpath.icedtea.java.net.ProtocolFamily; +import org.classpath.icedtea.java.net.StandardProtocolFamily; +import org.classpath.icedtea.java.net.SocketOption; @@ -1026,10 +1026,11 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import org.classpath.icedtea.java.nio.channels.spi.SelectorProvider; + +import org.classpath.icedtea.misc.SharedSecrets; ++ + import sun.net.ResourceManager; - /** - * An implementation of DatagramChannels. -@@ -53,6 +71,9 @@ + +@@ -54,6 +74,9 @@ // even after the value in the file descriptor object has been set to -1 int fdVal; @@ -1039,7 +1040,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla // IDs of native threads doing reads and writes, for signalling private volatile long readerThread = 0; private volatile long writerThread = 0; -@@ -91,6 +112,9 @@ +@@ -92,6 +115,9 @@ // Our socket adaptor, if any private DatagramSocket socket = null; @@ -1049,15 +1050,17 @@ diff -Nru openjdk.orig/jdk/src/share/cla // -- End of fields protected by stateLock -@@ -98,15 +122,40 @@ - throws IOException - { +@@ -101,6 +127,8 @@ super(sp); -+ this.family = Net.isIPv6Available() ? -+ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; - this.fd = Net.socket(false); - this.fdVal = IOUtil.fdVal(fd); - this.state = ST_UNCONNECTED; + ResourceManager.beforeUdpCreate(); + try { ++ this.family = Net.isIPv6Available() ? ++ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; + this.fd = Net.socket(false); + this.fdVal = IOUtil.fdVal(fd); + this.state = ST_UNCONNECTED; +@@ -110,10 +138,33 @@ + } } + public DatagramChannelImpl(SelectorProvider sp, ProtocolFamily family) { @@ -1090,7 +1093,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla this.fd = fd; this.fdVal = IOUtil.fdVal(fd); this.state = ST_UNCONNECTED; -@@ -499,7 +548,7 @@ +@@ -506,7 +557,7 @@ } } @@ -1099,15 +1102,15 @@ diff -Nru openjdk.orig/jdk/src/share/cla synchronized (readLock) { synchronized (writeLock) { synchronized (stateLock) { -@@ -515,6 +564,7 @@ +@@ -522,6 +573,7 @@ } } } -+ return this; ++ return this; } public boolean isConnected() { -@@ -704,4 +754,350 @@ +@@ -712,4 +764,350 @@ initIDs(); } @@ -1159,7 +1162,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla + throw new IllegalArgumentException("Cannot set IP_MULTICAST_IF to 'null'"); + NetworkInterface interf = (NetworkInterface)value; + if (family == StandardProtocolFamily.INET6) { -+ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); ++ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); + if (index == -1) + throw new IOException("Network interface cannot be identified"); + Net.setInterface6(fd, index); @@ -1459,8 +1462,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2009-01-20 13:37:15.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2009-01-27 02:33:08.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2009-10-14 18:17:41.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2011-02-09 18:08:16.682865972 +0000 @@ -32,8 +32,15 @@ import java.io.IOException; import java.nio.ByteBuffer; @@ -1510,8 +1513,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla ensureOpen(); int rv = -1; diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java openjdk/jdk/src/share/classes/sun/nio/ch/Net.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java 2009-01-15 17:37:33.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/Net.java 2009-02-01 00:35:31.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/Net.java 2011-02-09 18:10:11.680081053 +0000 @@ -30,6 +30,15 @@ import java.net.*; import java.nio.channels.*; @@ -1528,13 +1531,13 @@ diff -Nru openjdk.orig/jdk/src/share/cla class Net { // package-private -@@ -108,16 +117,24 @@ +@@ -111,16 +120,24 @@ // -- Socket operations -- + static native boolean isIPv6Available0(); + - static FileDescriptor socket(boolean stream) { + static FileDescriptor socket(boolean stream) throws IOException { - return IOUtil.newFD(socket0(stream, false)); + return socket(UNSPEC, stream); + } @@ -1556,7 +1559,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla static native void bind(FileDescriptor fd, InetAddress addr, int port) throws IOException; -@@ -179,4 +196,314 @@ +@@ -182,4 +199,314 @@ initIDs(); } @@ -1872,8 +1875,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2009-01-16 03:01:03.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2009-01-16 03:56:55.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2009-10-14 18:17:42.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2011-02-09 18:08:16.682865972 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. @@ -1920,8 +1923,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla - } diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/util/SecurityConstants.java openjdk/jdk/src/share/classes/sun/security/util/SecurityConstants.java ---- openjdk.orig/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2009-01-12 17:45:26.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2009-01-12 17:45:39.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2009-10-14 18:17:47.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2011-02-09 18:08:16.682865972 +0000 @@ -52,6 +52,7 @@ public static final String FILE_EXECUTE_ACTION = "execute"; public static final String FILE_READ_ACTION = "read"; @@ -1931,8 +1934,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla public static final String SOCKET_RESOLVE_ACTION = "resolve"; public static final String SOCKET_CONNECT_ACTION = "connect"; diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java openjdk/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java ---- openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java 2009-01-19 22:33:37.000000000 +0000 From andrew at icedtea.classpath.org Tue Feb 15 13:46:48 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 21:46:48 +0000 Subject: /hg/release/icedtea6-1.8: 8 new changesets Message-ID: changeset ad0f435608c3 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=ad0f435608c3 author: Andrew John Hughes date: Thu Feb 10 08:34:04 2011 +0000 Add security updates from Oracle SSR. S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption S6907662, CVE-2010-4465: Swing timer-based security manager bypass S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries S6985453, CVE-2010-4471: Java2D font-related system property leak 2011-02-09 Andrew John Hughes * Makefile.am: Add new patches. * NEWS: Updated. * patches/icedtea-nio2.patch: Rejigged. * patches/security/20110215/6878713.patch, * patches/security/20110215/6907662.patch, * patches/security/20110215/6981922.patch, * patches/security/20110215/6983554.patch, * patches/security/20110215/6994263.patch, * patches/security/20110215/6985453.patch: Security updates from Oracle SSR. changeset 399774bc5f93 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=399774bc5f93 author: Andrew John Hughes date: Sun Feb 13 14:34:19 2011 +0000 Add patch finally supplied in third Oracle bundle. 2011-02-11 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6927050.patch, Add patch for 6927050 missing from first two Oracle bundles. changeset 1677c90e2f8e in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=1677c90e2f8e author: Andrew John Hughes date: Sun Feb 13 14:41:07 2011 +0000 Bump to 1.8.7 and set release date to 2011-02-15. 2011-02-11 Andrew John Hughes * configure.ac: Bump to 1.8.7. * NEWS: Set release date to 2011-02-15. changeset 9d55580ba753 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=9d55580ba753 author: Andrew John Hughes date: Sun Feb 13 19:02:30 2011 +0000 Vulnerability in permissions assigned to applets with multiple JARs. 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (initializeResources()): Only create a SecurityDesc with all permissions when the jar is signed. changeset 83b15d0d30ff in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=83b15d0d30ff author: Andrew John Hughes date: Sun Feb 13 20:26:58 2011 +0000 RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid RH676659: Pass -export-dynamic option to linker not gcc. * Makefile.am: Add new patch. * patches/rh676659-gcc-export-dynamic.patch: Pass -Wl,-export- dynamic rather than -export-dynamic. changeset c1b2edb50af2 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=c1b2edb50af2 author: Andrew John Hughes date: Mon Feb 14 12:54:26 2011 +0000 Add CVE and RH bug ID for NetX security fix. 2011-02-14 Andrew John Hughes * NEWS: Add CVE and bug ID for NetX security fix. changeset 24dfe84f55e3 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=24dfe84f55e3 author: Andrew John Hughes date: Mon Feb 14 15:12:55 2011 +0000 Fix latent JAXP bug by adding missing import. 2011-02-14 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/latent_jaxp_bug.patch: Add missing import. changeset e196ef84ddb0 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=e196ef84ddb0 author: Andrew John Hughes date: Tue Feb 15 21:46:41 2011 +0000 Added tag icedtea6-1.8.7 for changeset 24dfe84f55e3 diffstat: 35 files changed, 2366 insertions(+), 83 deletions(-) "SchemaFactorySourceUnrecognized", | 8 .hgtags | 1 / | 56 + AbstractXMLSchema | 2 ChangeLog | 59 + Makefile.am | 13 NEWS | 15 SAXMessageFormatter.formatMessage(Locale.getDefault(), | 70 + SAXMessageFormatter.formatMessage(null, | 8 String | 4 addRecognizedParamsAndSetDefaults(fSchemaValidator, | 1 configure.ac | 2 fComponents.put(SECURITY_MANAGER, | 34 fConfigUpdated | 3 final | 4 if | 4 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 12 patches/icedtea-nio2.patch | 155 +-- patches/latent_jaxp_bug.patch | 25 patches/rh676659-gcc-export-dynamic.patch | 12 patches/security/20110215/6878713.patch | 143 +++ patches/security/20110215/6907662.patch | 758 ++++++++++++++++ patches/security/20110215/6927050.patch | 33 patches/security/20110215/6981922.patch | 245 +++++ patches/security/20110215/6983554.patch | 20 patches/security/20110215/6985453.patch | 104 ++ patches/security/20110215/6994263.patch | 33 private | 110 ++ public | 100 ++ return | 10 schema | 8 setFeatureDefaults(component, | 16 setProperty(ERROR_HANDLER, | 41 throw | 50 + } | 290 ++++++ diffs (truncated from 2949 to 500 lines): diff -r 2b6e470ee8b5 -r e196ef84ddb0 .hgtags --- a/.hgtags Wed Feb 09 17:56:54 2011 +0000 +++ b/.hgtags Tue Feb 15 21:46:41 2011 +0000 @@ -27,3 +27,4 @@ 975f7989ae6615f5d0cbce3089291a7c8841364f 975f7989ae6615f5d0cbce3089291a7c8841364f icedtea6-1.8.4 e41dfe105a4113a351e90bd1ce22c81f06f3e68c icedtea6-1.8.5 c43e42301ab86152257fc7eb9c249b2be2c1accc icedtea6-1.8.6 +24dfe84f55e3dc68d95c1688f8a678341c86ddf7 icedtea6-1.8.7 diff -r 2b6e470ee8b5 -r e196ef84ddb0 ChangeLog --- a/ChangeLog Wed Feb 09 17:56:54 2011 +0000 +++ b/ChangeLog Tue Feb 15 21:46:41 2011 +0000 @@ -1,3 +1,62 @@ 2011-02-09 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/latent_jaxp_bug.patch: + Add missing import. + +2011-02-14 Andrew John Hughes + + * NEWS: Add CVE and bug ID for NetX + security fix. + +2011-02-13 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + RH676659: Pass -export-dynamic option to linker not gcc. + * Makefile.am: Add new patch. + * patches/rh676659-gcc-export-dynamic.patch: + Pass -Wl,-export-dynamic rather than -export-dynamic. + +2011-02-13 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: + (initializeResources()): Only create a SecurityDesc with + all permissions when the jar is signed. + +2011-02-11 Andrew John Hughes + + * configure.ac: Bump to 1.8.7. + * NEWS: Set release date to 2011-02-15. + +2011-02-11 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6927050.patch, + Add patch for 6927050 missing from first two + Oracle bundles. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add new patches. + * NEWS: Updated. + * patches/icedtea-nio2.patch: Rejigged. + * patches/security/20110215/6878713.patch, + * patches/security/20110215/6907662.patch, + * patches/security/20110215/6981922.patch, + * patches/security/20110215/6983554.patch, + * patches/security/20110215/6994263.patch, + * patches/security/20110215/6985453.patch: + Security updates from Oracle SSR. + 2011-02-09 Andrew John Hughes * NEWS: Add 1.8.7. diff -r 2b6e470ee8b5 -r e196ef84ddb0 Makefile.am --- a/Makefile.am Wed Feb 09 17:56:54 2011 +0000 +++ b/Makefile.am Tue Feb 15 21:46:41 2011 +0000 @@ -252,7 +252,14 @@ SECURITY_PATCHES = \ patches/security/20101012/6963285.patch \ patches/security/20101012/6981426.patch \ patches/security/20101012/6990437.patch \ - patches/security/20110209/4421494.patch + patches/security/20110209/4421494.patch \ + patches/security/20110215/6878713.patch \ + patches/security/20110215/6907662.patch \ + patches/security/20110215/6981922.patch \ + patches/security/20110215/6983554.patch \ + patches/security/20110215/6994263.patch \ + patches/security/20110215/6985453.patch \ + patches/security/20110215/6927050.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ @@ -364,7 +371,9 @@ ICEDTEA_PATCHES = \ patches/openjdk/6795356-proxylazyvalue-leak.patch \ patches/openjdk/6687968-pngimagereader_mem_leak.patch \ patches/openjdk/6541476-png-iTXt-chunk.patch \ - patches/openjdk/6782079-png_metadata_oom.patch + patches/openjdk/6782079-png_metadata_oom.patch \ + patches/rh676659-gcc-export-dynamic.patch \ + patches/latent_jaxp_bug.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ diff -r 2b6e470ee8b5 -r e196ef84ddb0 NEWS --- a/NEWS Wed Feb 09 17:56:54 2011 +0000 +++ b/NEWS Tue Feb 15 21:46:41 2011 +0000 @@ -8,7 +8,20 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.8.7 (2011-XX-XX): +New in release 1.8.7 (2011-02-15): + +* Security updates + - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption + - S6907662, CVE-2010-4465: Swing timer-based security manager bypass + - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation + - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - S6985453, CVE-2010-4471: Java2D font-related system property leak + - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation + - RH677332, CVE-2011-0706: Multiple signers privilege escalation +* Bug fixes + - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken + - Fix latent JAXP bug caused by missing import New in release 1.8.6 (2011-02-09): diff -r 2b6e470ee8b5 -r e196ef84ddb0 configure.ac --- a/configure.ac Wed Feb 09 17:56:54 2011 +0000 +++ b/configure.ac Tue Feb 15 21:46:41 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.8.7pre],[distro-pk -AC_INIT([icedtea6],[1.8.7pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.8.7],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 2b6e470ee8b5 -r e196ef84ddb0 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Feb 09 17:56:54 2011 +0000 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 15 21:46:41 2011 +0000 @@ -439,9 +439,15 @@ public class JNLPClassLoader extends URL codebase = file.getResources().getMainJAR().getLocation(); } - jarSecurity = new SecurityDesc(file, - SecurityDesc.ALL_PERMISSIONS, - codebase.getHost()); + if (signing) { + jarSecurity = new SecurityDesc(file, + SecurityDesc.ALL_PERMISSIONS, + codebase.getHost()); + } else { + jarSecurity = new SecurityDesc(file, + SecurityDesc.SANDBOX_PERMISSIONS, + codebase.getHost()); + } } jarLocationSecurityMap.put(location, jarSecurity); diff -r 2b6e470ee8b5 -r e196ef84ddb0 patches/icedtea-nio2.patch --- a/patches/icedtea-nio2.patch Wed Feb 09 17:56:54 2011 +0000 +++ b/patches/icedtea-nio2.patch Tue Feb 15 21:46:41 2011 +0000 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/docs/COR diff -Nru openjdk.orig/jdk/make/docs/CORE_PKGS.gmk openjdk/jdk/make/docs/CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2009-01-07 21:17:37.000000000 +0000 -+++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2009-01-09 21:21:59.000000000 +0000 +--- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2009-10-14 18:17:14.000000000 +0100 ++++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2011-02-09 18:08:16.658865718 +0000 @@ -36,6 +36,7 @@ sunw.* \ com.sun.* \ @@ -10,8 +10,8 @@ diff -Nru openjdk.orig/jdk/make/docs/COR org.w3c.dom.css \ org.w3c.dom.html \ diff -Nru openjdk.orig/jdk/make/docs/Makefile openjdk/jdk/make/docs/Makefile ---- openjdk.orig/jdk/make/docs/Makefile 2009-02-03 16:20:38.000000000 +0000 -+++ openjdk/jdk/make/docs/Makefile 2009-02-03 19:40:10.000000000 +0000 +--- openjdk.orig/jdk/make/docs/Makefile 2011-02-09 18:07:27.000000000 +0000 ++++ openjdk/jdk/make/docs/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -404,6 +404,29 @@ # TREEAPI_PKGS is located in NON_CORE_PKGS.gmk @@ -68,8 +68,8 @@ diff -Nru openjdk.orig/jdk/make/docs/Mak # List the values defined in the makefile hierarchy, to make sure everything # is set properly, and to help identify values we can use instead of making new ones. diff -Nru openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk openjdk/jdk/make/docs/NON_CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2009-01-07 21:27:46.000000000 +0000 -+++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2009-02-03 16:28:29.000000000 +0000 +--- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-09 18:07:28.000000000 +0000 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-09 18:08:16.666865802 +0000 @@ -65,6 +65,16 @@ HTTPSERVER_PKGS = com.sun.net.httpserver \ com.sun.net.httpserver.spi @@ -87,18 +87,18 @@ diff -Nru openjdk.orig/jdk/make/docs/NON DOCLETAPI_PKGS = com.sun.javadoc TAGLETAPI_FILE = com/sun/tools/doclets/Taglet.java -@@ -89,6 +99,7 @@ - $(MGMT_PKGS) \ +@@ -94,6 +104,7 @@ + $(JAVASCRIPT_PKGS) \ $(JAAS_PKGS) \ $(JGSS_PKGS) \ + $(NIO2_PKGS) \ $(OLD_JSSE_PKGS) \ $(HTTPSERVER_PKGS) \ - $(SMARTCARDIO_PKGS) + $(SMARTCARDIO_PKGS) \ diff -Nru openjdk.orig/jdk/make/java/java/FILES_java.gmk openjdk/jdk/make/java/java/FILES_java.gmk ---- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2009-01-07 21:35:50.000000000 +0000 -+++ openjdk/jdk/make/java/java/FILES_java.gmk 2009-01-12 15:24:01.000000000 +0000 -@@ -516,6 +516,13 @@ +--- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2011-02-09 18:07:21.000000000 +0000 ++++ openjdk/jdk/make/java/java/FILES_java.gmk 2011-02-09 18:08:16.666865802 +0000 +@@ -517,6 +517,13 @@ sun/misc/JavaLangAccess.java \ sun/misc/JavaIOAccess.java \ sun/misc/JavaIODeleteOnExitAccess.java \ @@ -114,8 +114,8 @@ diff -Nru openjdk.orig/jdk/make/java/jav FILES_java = $(JAVA_JAVA_java) diff -Nru openjdk.orig/jdk/make/java/nio/FILES_java.gmk openjdk/jdk/make/java/nio/FILES_java.gmk ---- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2009-01-10 03:21:38.000000000 +0000 -+++ openjdk/jdk/make/java/nio/FILES_java.gmk 2009-01-19 19:13:49.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2011-02-09 18:07:22.000000000 +0000 ++++ openjdk/jdk/make/java/nio/FILES_java.gmk 2011-02-09 18:08:16.666865802 +0000 @@ -75,12 +75,13 @@ sun/nio/ch/DefaultSelectorProvider.java \ sun/nio/ch/DirectBuffer.java \ @@ -315,8 +315,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio FILES_java = $(FILES_src) $(FILES_gen) diff -Nru openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile ---- openjdk.orig/jdk/make/java/nio/Makefile 2009-01-10 03:22:13.000000000 +0000 -+++ openjdk/jdk/make/java/nio/Makefile 2009-01-15 16:35:28.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/Makefile 2011-02-09 18:07:22.000000000 +0000 ++++ openjdk/jdk/make/java/nio/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -40,6 +40,11 @@ SNIO_SRC = $(SHARE_SRC)/classes/sun/nio SNIO_GEN = $(GENSRCDIR)/sun/nio @@ -663,8 +663,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio + .PHONY: sources diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-linux openjdk/jdk/make/java/nio/mapfile-linux ---- openjdk.orig/jdk/make/java/nio/mapfile-linux 2009-01-07 22:08:47.000000000 +0000 -+++ openjdk/jdk/make/java/nio/mapfile-linux 2009-01-29 01:13:17.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/mapfile-linux 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-linux 2011-02-09 18:08:16.666865802 +0000 @@ -20,6 +20,14 @@ Java_sun_nio_ch_EPollArrayWrapper_interrupt; Java_sun_nio_ch_EPollArrayWrapper_offsetofData; @@ -781,8 +781,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-solaris openjdk/jdk/make/java/nio/mapfile-solaris ---- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2009-01-07 22:08:47.000000000 +0000 -+++ openjdk/jdk/make/java/nio/mapfile-solaris 2009-01-07 22:18:51.000000000 +0000 +--- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-solaris 2011-02-09 18:08:16.666865802 +0000 @@ -73,6 +73,75 @@ Java_sun_nio_ch_ServerSocketChannelImpl_listen; Java_sun_nio_ch_SocketChannelImpl_checkConnect; @@ -860,8 +860,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/mkdemo/Makefile openjdk/jdk/make/mkdemo/Makefile ---- openjdk.orig/jdk/make/mkdemo/Makefile 2009-01-07 22:23:02.000000000 +0000 -+++ openjdk/jdk/make/mkdemo/Makefile 2009-01-07 22:23:48.000000000 +0000 +--- openjdk.orig/jdk/make/mkdemo/Makefile 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/mkdemo/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -31,7 +31,7 @@ PRODUCT = demos include $(BUILDDIR)/common/Defs.gmk @@ -872,8 +872,8 @@ diff -Nru openjdk.orig/jdk/make/mkdemo/M all build:: nbproject $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/make/mksample/nio/Makefile openjdk/jdk/make/mksample/nio/Makefile ---- openjdk.orig/jdk/make/mksample/nio/Makefile 2009-01-07 22:23:19.000000000 +0000 -+++ openjdk/jdk/make/mksample/nio/Makefile 2009-01-07 22:24:06.000000000 +0000 +--- openjdk.orig/jdk/make/mksample/nio/Makefile 2009-10-14 18:17:15.000000000 +0100 ++++ openjdk/jdk/make/mksample/nio/Makefile 2011-02-09 18:08:16.666865802 +0000 @@ -31,7 +31,7 @@ PRODUCT = java include $(BUILDDIR)/common/Defs.gmk @@ -884,9 +884,9 @@ diff -Nru openjdk.orig/jdk/make/mksample $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/src/share/classes/java/io/File.java openjdk/jdk/src/share/classes/java/io/File.java ---- openjdk.orig/jdk/src/share/classes/java/io/File.java 2009-01-12 13:32:17.000000000 +0000 -+++ openjdk/jdk/src/share/classes/java/io/File.java 2009-01-12 13:35:18.000000000 +0000 -@@ -1957,6 +1957,13 @@ +--- openjdk.orig/jdk/src/share/classes/java/io/File.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/java/io/File.java 2011-02-09 18:08:16.666865802 +0000 +@@ -1958,6 +1958,13 @@ } } ); @@ -901,9 +901,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla diff -Nru openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java ---- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2009-01-16 04:07:15.000000000 +0000 -+++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2009-01-19 19:12:21.000000000 +0000 -@@ -529,4 +529,15 @@ +--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-09 18:08:16.666865802 +0000 +@@ -536,4 +536,15 @@ } private static native void init(); @@ -920,8 +920,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java ---- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2009-01-13 23:54:13.000000000 +0000 -+++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2009-01-15 01:21:36.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2009-10-14 18:17:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2011-02-09 18:08:16.666865802 +0000 @@ -2004,4 +2004,23 @@ } } @@ -947,8 +947,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java openjdk/jdk/src/share/classes/sun/misc/Unsafe.java ---- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2009-01-19 15:44:19.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2009-01-19 15:47:42.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2009-10-14 18:17:41.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2011-02-09 18:08:16.682865972 +0000 @@ -504,9 +504,33 @@ /** * Sets all bytes in a given block of memory to a copy of another @@ -996,9 +996,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla * Report the scale factor for addressing elements in the storage * allocation of a given array class. However, arrays of "narrow" types diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2009-01-16 03:10:17.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2009-01-19 21:04:48.000000000 +0000 -@@ -29,10 +29,28 @@ +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-09 18:09:30.467645679 +0000 +@@ -29,9 +29,29 @@ import java.io.IOException; import java.net.*; import java.nio.ByteBuffer; @@ -1014,7 +1014,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import java.util.Set; + import java.lang.ref.SoftReference; - ++ +import org.classpath.icedtea.java.net.ProtocolFamily; +import org.classpath.icedtea.java.net.StandardProtocolFamily; +import org.classpath.icedtea.java.net.SocketOption; @@ -1026,10 +1026,11 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import org.classpath.icedtea.java.nio.channels.spi.SelectorProvider; + +import org.classpath.icedtea.misc.SharedSecrets; ++ + import sun.net.ResourceManager; - /** - * An implementation of DatagramChannels. -@@ -53,6 +71,9 @@ + +@@ -54,6 +74,9 @@ // even after the value in the file descriptor object has been set to -1 int fdVal; @@ -1039,7 +1040,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla // IDs of native threads doing reads and writes, for signalling private volatile long readerThread = 0; private volatile long writerThread = 0; -@@ -91,6 +112,9 @@ +@@ -92,6 +115,9 @@ // Our socket adaptor, if any private DatagramSocket socket = null; @@ -1049,15 +1050,17 @@ diff -Nru openjdk.orig/jdk/src/share/cla // -- End of fields protected by stateLock -@@ -98,15 +122,40 @@ - throws IOException - { +@@ -101,6 +127,8 @@ super(sp); -+ this.family = Net.isIPv6Available() ? -+ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; - this.fd = Net.socket(false); - this.fdVal = IOUtil.fdVal(fd); - this.state = ST_UNCONNECTED; + ResourceManager.beforeUdpCreate(); + try { ++ this.family = Net.isIPv6Available() ? ++ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; + this.fd = Net.socket(false); + this.fdVal = IOUtil.fdVal(fd); + this.state = ST_UNCONNECTED; +@@ -110,10 +138,33 @@ + } } + public DatagramChannelImpl(SelectorProvider sp, ProtocolFamily family) { @@ -1090,7 +1093,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla this.fd = fd; this.fdVal = IOUtil.fdVal(fd); this.state = ST_UNCONNECTED; -@@ -499,7 +548,7 @@ +@@ -506,7 +557,7 @@ } } @@ -1099,15 +1102,15 @@ diff -Nru openjdk.orig/jdk/src/share/cla synchronized (readLock) { synchronized (writeLock) { synchronized (stateLock) { -@@ -515,6 +564,7 @@ +@@ -522,6 +573,7 @@ } } } -+ return this; ++ return this; } public boolean isConnected() { -@@ -704,4 +754,350 @@ +@@ -712,4 +764,350 @@ initIDs(); } @@ -1159,7 +1162,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla + throw new IllegalArgumentException("Cannot set IP_MULTICAST_IF to 'null'"); + NetworkInterface interf = (NetworkInterface)value; + if (family == StandardProtocolFamily.INET6) { -+ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); ++ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); + if (index == -1) + throw new IOException("Network interface cannot be identified"); + Net.setInterface6(fd, index); @@ -1459,8 +1462,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2009-01-20 13:37:15.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2009-01-27 02:33:08.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2009-10-14 18:17:41.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2011-02-09 18:08:16.682865972 +0000 @@ -32,8 +32,15 @@ import java.io.IOException; import java.nio.ByteBuffer; @@ -1510,8 +1513,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla ensureOpen(); int rv = -1; diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java openjdk/jdk/src/share/classes/sun/nio/ch/Net.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java 2009-01-15 17:37:33.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/Net.java 2009-02-01 00:35:31.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java 2011-02-09 18:07:20.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/Net.java 2011-02-09 18:10:11.680081053 +0000 @@ -30,6 +30,15 @@ import java.net.*; import java.nio.channels.*; @@ -1528,13 +1531,13 @@ diff -Nru openjdk.orig/jdk/src/share/cla class Net { // package-private -@@ -108,16 +117,24 @@ +@@ -111,16 +120,24 @@ // -- Socket operations -- + static native boolean isIPv6Available0(); + - static FileDescriptor socket(boolean stream) { + static FileDescriptor socket(boolean stream) throws IOException { - return IOUtil.newFD(socket0(stream, false)); + return socket(UNSPEC, stream); + } @@ -1556,7 +1559,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla static native void bind(FileDescriptor fd, InetAddress addr, int port) throws IOException; -@@ -179,4 +196,314 @@ +@@ -182,4 +199,314 @@ initIDs(); } @@ -1872,8 +1875,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2009-01-16 03:01:03.000000000 +0000 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2009-01-16 03:56:55.000000000 +0000 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2009-10-14 18:17:42.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2011-02-09 18:08:16.682865972 +0000 @@ -1,5 +1,5 @@ /* - * Copyright 2000-2001 Sun Microsystems, Inc. All Rights Reserved. From andrew at icedtea.classpath.org Tue Feb 15 13:47:28 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 21:47:28 +0000 Subject: /hg/release/icedtea6-1.9: 10 new changesets Message-ID: changeset e3a80de31410 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=e3a80de31410 author: Andrew John Hughes date: Wed Feb 09 17:54:43 2011 +0000 Security updates from Oracle SSR. S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption S6907662, CVE-2010-4465: Swing timer-based security manager bypass S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries 2011-02-09 Andrew John Hughes * Makefile.am: Add new patches. * NEWS: Updated. * patches/icedtea-nio2.patch: Rejigged. * patches/security/20110215/6878713.patch, * patches/security/20110215/6907662.patch, * patches/security/20110215/6981922.patch, * patches/security/20110215/6983554.patch, * patches/security/20110215/6994263.patch: Security updates from Oracle SSR. changeset 6c912b14089d in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=6c912b14089d author: Andrew John Hughes date: Thu Feb 10 09:25:31 2011 +0000 Add 6985453 patch which was missing from first Oracle bundle. S6985453, CVE-2010-4471: Java2D font-related system property leak 2011-02-10 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6985453.patch: Add patch for 6985453 missing from first Oracle bundle. changeset eaab590dcd87 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=eaab590dcd87 author: Andrew John Hughes date: Sun Feb 13 14:34:19 2011 +0000 Add patch finally supplied in third Oracle bundle. 2011-02-11 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6927050.patch, Add patch for 6927050 missing from first two Oracle bundles. changeset 3439c902908c in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=3439c902908c author: Andrew John Hughes date: Sun Feb 13 19:06:09 2011 +0000 Vulnerability in permissions assigned to applets with multiple JARs 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: (initializeResources()): Only create a SecurityDesc with all permissions when the jar is signed. changeset 82703ea0d4bc in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=82703ea0d4bc author: Andrew John Hughes date: Mon Feb 14 01:00:06 2011 +0000 RH676659: Pass -export-dynamic option to linker not gcc. 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid RH676659: Pass -export-dynamic option to linker not gcc. * Makefile.am: Add new patch. * patches/rh676659-gcc-export-dynamic.patch: Pass -Wl,-export- dynamic rather than -export-dynamic. changeset acbddaabc2e3 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=acbddaabc2e3 author: Andrew John Hughes date: Mon Feb 14 01:00:50 2011 +0000 Bump to 1.9.7. 2011-02-13 Andrew John Hughes * configure.ac: Bump to 1.9.7. changeset 66db0252562c in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=66db0252562c author: Andrew John Hughes date: Mon Feb 14 02:17:45 2011 +0000 G344659: Fix issue when building on SPARC 2011-02-13 Andrew John Hughes G344659: Fix issue when building on SPARC * Makefile.am: Add new patch. * NEWS: Updated. * patches/g344659-sparc_fix.patch: Add fix for SPARC builds on Gentoo. changeset e524c624d58a in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=e524c624d58a author: Andrew John Hughes date: Mon Feb 14 12:54:26 2011 +0000 Add CVE and RH bug ID for NetX security fix. 2011-02-14 Andrew John Hughes * NEWS: Add CVE and bug ID for NetX security fix. changeset 9822da18c162 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=9822da18c162 author: Andrew John Hughes date: Mon Feb 14 16:52:57 2011 +0000 Fix latent JAXP bug caused by missing import. 2011-02-14 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/latent_jaxp_bug.patch: Add missing import. changeset 64b56daa6bc0 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=64b56daa6bc0 author: Andrew John Hughes date: Tue Feb 15 21:47:21 2011 +0000 Added tag icedtea6-1.9.7 for changeset 9822da18c162 diffstat: 36 files changed, 2397 insertions(+), 84 deletions(-) "SchemaFactorySourceUnrecognized", | 8 .hgtags | 1 / | 56 + AbstractXMLSchema | 2 ChangeLog | 73 + Makefile.am | 14 NEWS | 16 SAXMessageFormatter.formatMessage(Locale.getDefault(), | 70 + SAXMessageFormatter.formatMessage(null, | 8 String | 4 addRecognizedParamsAndSetDefaults(fSchemaValidator, | 1 configure.ac | 2 fComponents.put(SECURITY_MANAGER, | 34 fConfigUpdated | 3 final | 4 if | 4 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 12 patches/g344659-sparc_fix.patch | 12 patches/icedtea-nio2.patch | 159 +-- patches/latent_jaxp_bug.patch | 25 patches/rh676659-gcc-export-dynamic.patch | 12 patches/security/20110215/6878713.patch | 143 +++ patches/security/20110215/6907662.patch | 758 ++++++++++++++++ patches/security/20110215/6927050.patch | 33 patches/security/20110215/6981922.patch | 245 +++++ patches/security/20110215/6983554.patch | 20 patches/security/20110215/6985453.patch | 104 ++ patches/security/20110215/6994263.patch | 33 private | 110 ++ public | 100 ++ return | 10 schema | 8 setFeatureDefaults(component, | 16 setProperty(ERROR_HANDLER, | 41 throw | 50 + } | 290 ++++++ diffs (truncated from 2989 to 500 lines): diff -r 358ff8b91c6e -r 64b56daa6bc0 .hgtags --- a/.hgtags Wed Feb 09 16:47:14 2011 +0000 +++ b/.hgtags Tue Feb 15 21:47:21 2011 +0000 @@ -26,3 +26,4 @@ fdefc65b1e3f7ab140ce4da42716c2439796dfda fdefc65b1e3f7ab140ce4da42716c2439796dfda icedtea6-1.9.4 a55e0ec59e4287f9df15f666503dbe500f1a61ea icedtea6-1.9.5 03258f7ff9107c7e3be6931df2093b8395db89e4 icedtea6-1.9.6 +9822da18c162896b9da66d45bdc341a1cd53581b icedtea6-1.9.7 diff -r 358ff8b91c6e -r 64b56daa6bc0 ChangeLog --- a/ChangeLog Wed Feb 09 16:47:14 2011 +0000 +++ b/ChangeLog Tue Feb 15 21:47:21 2011 +0000 @@ -1,3 +1,76 @@ 2011-02-09 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/latent_jaxp_bug.patch: + Add missing import. + +2011-02-14 Andrew John Hughes + + * NEWS: Add CVE and bug ID for NetX + security fix. + +2011-02-13 Andrew John Hughes + + G344659: Fix issue when building on SPARC + * Makefile.am: Add new patch. + * NEWS: Updated. + * patches/g344659-sparc_fix.patch: + Add fix for SPARC builds on Gentoo. + +2011-02-13 Andrew John Hughes + + * configure.ac: Bump to 1.9.7. + +2011-02-13 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + RH676659: Pass -export-dynamic option to linker not gcc. + * Makefile.am: Add new patch. + * patches/rh676659-gcc-export-dynamic.patch: + Pass -Wl,-export-dynamic rather than -export-dynamic. + +2011-02-13 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java: + (initializeResources()): Only create a SecurityDesc with + all permissions when the jar is signed. + +2011-02-10 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6985453.patch: + Add patch for 6985453 missing from first Oracle + bundle. + +2011-02-11 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6927050.patch, + Add patch for 6927050 missing from first two + Oracle bundles. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add new patches. + * NEWS: Updated. + * patches/icedtea-nio2.patch: Rejigged. + * patches/security/20110215/6878713.patch, + * patches/security/20110215/6907662.patch, + * patches/security/20110215/6981922.patch, + * patches/security/20110215/6983554.patch, + * patches/security/20110215/6994263.patch: + Security updates from Oracle SSR. + 2011-02-09 Andrew John Hughes * NEWS: Add 1.9.7. diff -r 358ff8b91c6e -r 64b56daa6bc0 Makefile.am --- a/Makefile.am Wed Feb 09 16:47:14 2011 +0000 +++ b/Makefile.am Tue Feb 15 21:47:21 2011 +0000 @@ -219,7 +219,14 @@ SECURITY_PATCHES = \ patches/security/20101012/6963285.patch \ patches/security/20101012/6981426.patch \ patches/security/20101012/6990437.patch \ - patches/security/20110209/4421494.patch + patches/security/20110209/4421494.patch \ + patches/security/20110215/6878713.patch \ + patches/security/20110215/6907662.patch \ + patches/security/20110215/6981922.patch \ + patches/security/20110215/6983554.patch \ + patches/security/20110215/6994263.patch \ + patches/security/20110215/6985453.patch \ + patches/security/20110215/6927050.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ @@ -327,7 +334,10 @@ ICEDTEA_PATCHES = \ patches/openjdk/6795356-proxylazyvalue-leak.patch \ patches/openjdk/6687968-pngimagereader_mem_leak.patch \ patches/openjdk/6541476-png-iTXt-chunk.patch \ - patches/openjdk/6782079-png_metadata_oom.patch + patches/openjdk/6782079-png_metadata_oom.patch \ + patches/rh676659-gcc-export-dynamic.patch \ + patches/g344659-sparc_fix.patch \ + patches/latent_jaxp_bug.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 358ff8b91c6e -r 64b56daa6bc0 NEWS --- a/NEWS Wed Feb 09 16:47:14 2011 +0000 +++ b/NEWS Tue Feb 15 21:47:21 2011 +0000 @@ -8,7 +8,21 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.9.7 (2011-XX-XX): +New in release 1.9.7 (2011-02-15): + +* Security updates + - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption + - S6907662, CVE-2010-4465: Swing timer-based security manager bypass + - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation + - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - S6985453, CVE-2010-4471: Java2D font-related system property leak + - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation + - RH677332, CVE-2011-0706: Multiple signers privilege escalation +* Bug fixes + - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken + - G344659: Fix issue when building on SPARC + - Fix latent JAXP bug caused by missing import New in release 1.9.6 (2011-02-09): diff -r 358ff8b91c6e -r 64b56daa6bc0 configure.ac --- a/configure.ac Wed Feb 09 16:47:14 2011 +0000 +++ b/configure.ac Tue Feb 15 21:47:21 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.9.7pre],[distro-pk -AC_INIT([icedtea6],[1.9.7pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.9.7],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r 358ff8b91c6e -r 64b56daa6bc0 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Wed Feb 09 16:47:14 2011 +0000 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 15 21:47:21 2011 +0000 @@ -439,9 +439,15 @@ public class JNLPClassLoader extends URL codebase = file.getResources().getMainJAR().getLocation(); } - jarSecurity = new SecurityDesc(file, - SecurityDesc.ALL_PERMISSIONS, - codebase.getHost()); + if (signing) { + jarSecurity = new SecurityDesc(file, + SecurityDesc.ALL_PERMISSIONS, + codebase.getHost()); + } else { + jarSecurity = new SecurityDesc(file, + SecurityDesc.SANDBOX_PERMISSIONS, + codebase.getHost()); + } } jarLocationSecurityMap.put(location, jarSecurity); diff -r 358ff8b91c6e -r 64b56daa6bc0 patches/g344659-sparc_fix.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/g344659-sparc_fix.patch Tue Feb 15 21:47:21 2011 +0000 @@ -0,0 +1,12 @@ +diff -uNr openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp openjdk/hotspot/src/os_cpu/linux_sparc/vm/v_version_linux_sparc.cpp +--- openjdk.orig/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp 2010-06-21 22:12:15.000000000 +0100 ++++ openjdk/hotspot/src/os_cpu/linux_sparc/vm/vm_version_linux_sparc.cpp 2010-11-29 20:15:36.179541001 +0000 +@@ -35,7 +35,7 @@ + } + + while (!feof(fp)) { +- if (fscanf(fp, "cpu\t\t: %100[^\n]", &cpu) == 1) { ++ if (fscanf(fp, "cpu\t\t: %100[^\n]", &cpu[0]) == 1) { + if (strstr(cpu, "Niagara") != NULL) { + rv = true; + } diff -r 358ff8b91c6e -r 64b56daa6bc0 patches/icedtea-nio2.patch --- a/patches/icedtea-nio2.patch Wed Feb 09 16:47:14 2011 +0000 +++ b/patches/icedtea-nio2.patch Tue Feb 15 21:47:21 2011 +0000 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/common/s diff -Nru openjdk.orig/jdk/make/common/shared/Defs-javadoc.gmk openjdk/jdk/make/common/shared/Defs-javadoc.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-javadoc.gmk 2010-06-10 23:04:50.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Defs-javadoc.gmk 2010-06-11 00:44:42.000000000 +0100 +--- openjdk.orig/jdk/make/common/shared/Defs-javadoc.gmk 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Defs-javadoc.gmk 2011-02-08 23:10:59.370265518 +0000 @@ -41,6 +41,7 @@ TREEAPI_FIRST_COPYRIGHT_YEAR = 2005 JNLP_FIRST_COPYRIGHT_YEAR = 1998 @@ -10,8 +10,8 @@ diff -Nru openjdk.orig/jdk/make/common/s # Oracle name COMPANY_NAME = Oracle and/or its affiliates diff -Nru openjdk.orig/jdk/make/docs/CORE_PKGS.gmk openjdk/jdk/make/docs/CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2010-05-26 09:32:35.000000000 +0100 -+++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2011-02-08 23:10:59.374265560 +0000 @@ -36,6 +36,7 @@ sunw.* \ com.sun.* \ @@ -21,8 +21,8 @@ diff -Nru openjdk.orig/jdk/make/docs/COR org.w3c.dom.css \ org.w3c.dom.html \ diff -Nru openjdk.orig/jdk/make/docs/Makefile openjdk/jdk/make/docs/Makefile ---- openjdk.orig/jdk/make/docs/Makefile 2010-06-10 23:04:50.000000000 +0100 -+++ openjdk/jdk/make/docs/Makefile 2010-06-11 00:42:38.000000000 +0100 +--- openjdk.orig/jdk/make/docs/Makefile 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/docs/Makefile 2011-02-08 23:10:59.374265560 +0000 @@ -1076,6 +1076,58 @@ ############################################################# @@ -83,8 +83,8 @@ diff -Nru openjdk.orig/jdk/make/docs/Mak $(DIRECTORY_CACHE): $(ALL_SOURCE_DIRS) diff -Nru openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk openjdk/jdk/make/docs/NON_CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2010-06-11 00:14:21.000000000 +0100 -+++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-08 22:57:19.000000000 +0000 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-08 23:10:59.374265560 +0000 @@ -65,6 +65,16 @@ HTTPSERVER_PKGS = com.sun.net.httpserver \ com.sun.net.httpserver.spi @@ -111,9 +111,9 @@ diff -Nru openjdk.orig/jdk/make/docs/NON $(HTTPSERVER_PKGS) \ $(SMARTCARDIO_PKGS) \ diff -Nru openjdk.orig/jdk/make/java/java/FILES_java.gmk openjdk/jdk/make/java/java/FILES_java.gmk ---- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2010-06-11 00:14:20.000000000 +0100 -+++ openjdk/jdk/make/java/java/FILES_java.gmk 2010-06-11 00:35:39.000000000 +0100 -@@ -517,6 +517,13 @@ +--- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2011-02-08 22:57:17.000000000 +0000 ++++ openjdk/jdk/make/java/java/FILES_java.gmk 2011-02-08 23:10:59.374265560 +0000 +@@ -518,6 +518,13 @@ sun/misc/JavaLangAccess.java \ sun/misc/JavaIOAccess.java \ sun/misc/JavaIODeleteOnExitAccess.java \ @@ -129,8 +129,8 @@ diff -Nru openjdk.orig/jdk/make/java/jav FILES_java = $(JAVA_JAVA_java) diff -Nru openjdk.orig/jdk/make/java/nio/FILES_java.gmk openjdk/jdk/make/java/nio/FILES_java.gmk ---- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2010-06-11 00:14:21.000000000 +0100 -+++ openjdk/jdk/make/java/nio/FILES_java.gmk 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2011-02-08 22:57:17.000000000 +0000 ++++ openjdk/jdk/make/java/nio/FILES_java.gmk 2011-02-08 23:10:59.378265602 +0000 @@ -75,12 +75,13 @@ sun/nio/ch/DefaultSelectorProvider.java \ sun/nio/ch/DirectBuffer.java \ @@ -330,8 +330,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio FILES_java = $(FILES_src) $(FILES_gen) diff -Nru openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile ---- openjdk.orig/jdk/make/java/nio/Makefile 2010-06-11 00:14:21.000000000 +0100 -+++ openjdk/jdk/make/java/nio/Makefile 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/Makefile 2011-02-08 22:57:17.000000000 +0000 ++++ openjdk/jdk/make/java/nio/Makefile 2011-02-08 23:10:59.378265602 +0000 @@ -40,6 +40,11 @@ SNIO_SRC = $(SHARE_SRC)/classes/sun/nio SNIO_GEN = $(GENSRCDIR)/sun/nio @@ -678,8 +678,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio + .PHONY: sources diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-linux openjdk/jdk/make/java/nio/mapfile-linux ---- openjdk.orig/jdk/make/java/nio/mapfile-linux 2010-04-06 17:51:43.000000000 +0100 -+++ openjdk/jdk/make/java/nio/mapfile-linux 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/mapfile-linux 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-linux 2011-02-08 23:10:59.378265602 +0000 @@ -20,6 +20,14 @@ Java_sun_nio_ch_EPollArrayWrapper_interrupt; Java_sun_nio_ch_EPollArrayWrapper_offsetofData; @@ -796,8 +796,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-solaris openjdk/jdk/make/java/nio/mapfile-solaris ---- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2010-04-06 17:51:43.000000000 +0100 -+++ openjdk/jdk/make/java/nio/mapfile-solaris 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-solaris 2011-02-08 23:10:59.378265602 +0000 @@ -73,6 +73,75 @@ Java_sun_nio_ch_ServerSocketChannelImpl_listen; Java_sun_nio_ch_SocketChannelImpl_checkConnect; @@ -875,8 +875,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/mkdemo/Makefile openjdk/jdk/make/mkdemo/Makefile ---- openjdk.orig/jdk/make/mkdemo/Makefile 2010-05-26 09:32:36.000000000 +0100 -+++ openjdk/jdk/make/mkdemo/Makefile 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/mkdemo/Makefile 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/mkdemo/Makefile 2011-02-08 23:10:59.378265602 +0000 @@ -31,7 +31,7 @@ PRODUCT = demos include $(BUILDDIR)/common/Defs.gmk @@ -887,8 +887,8 @@ diff -Nru openjdk.orig/jdk/make/mkdemo/M all build:: nbproject $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/make/mksample/nio/Makefile openjdk/jdk/make/mksample/nio/Makefile ---- openjdk.orig/jdk/make/mksample/nio/Makefile 2010-05-26 09:32:36.000000000 +0100 -+++ openjdk/jdk/make/mksample/nio/Makefile 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/mksample/nio/Makefile 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/mksample/nio/Makefile 2011-02-08 23:10:59.378265602 +0000 @@ -31,7 +31,7 @@ PRODUCT = java include $(BUILDDIR)/common/Defs.gmk @@ -899,8 +899,8 @@ diff -Nru openjdk.orig/jdk/make/mksample $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/src/share/classes/java/io/File.java openjdk/jdk/src/share/classes/java/io/File.java ---- openjdk.orig/jdk/src/share/classes/java/io/File.java 2010-05-26 09:32:38.000000000 +0100 -+++ openjdk/jdk/src/share/classes/java/io/File.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/java/io/File.java 2010-06-21 22:15:18.000000000 +0100 ++++ openjdk/jdk/src/share/classes/java/io/File.java 2011-02-08 23:10:59.378265602 +0000 @@ -1958,6 +1958,13 @@ } } @@ -916,9 +916,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla diff -Nru openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java ---- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2010-05-26 09:32:38.000000000 +0100 -+++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2010-06-11 00:35:39.000000000 +0100 -@@ -533,4 +533,15 @@ +--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-08 22:57:12.000000000 +0000 ++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-08 23:10:59.378265602 +0000 +@@ -536,4 +536,15 @@ } private static native void init(); @@ -935,8 +935,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java ---- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2010-05-26 09:32:39.000000000 +0100 -+++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2010-06-21 22:15:21.000000000 +0100 ++++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2011-02-08 23:10:59.378265602 +0000 @@ -2004,4 +2004,23 @@ } } @@ -962,8 +962,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java openjdk/jdk/src/share/classes/sun/misc/Unsafe.java ---- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2010-06-21 22:15:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2011-02-08 23:10:59.378265602 +0000 @@ -504,9 +504,33 @@ /** * Sets all bytes in a given block of memory to a copy of another @@ -1011,9 +1011,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla * Report the scale factor for addressing elements in the storage * allocation of a given array class. However, arrays of "narrow" types diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2010-06-11 00:35:39.000000000 +0100 -@@ -29,10 +29,28 @@ +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-08 22:57:12.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-08 23:40:00.916516539 +0000 +@@ -29,11 +29,30 @@ import java.io.IOException; import java.net.*; import java.nio.ByteBuffer; @@ -1029,6 +1029,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import java.util.Set; + import java.lang.ref.SoftReference; +-import sun.net.ResourceManager; +import org.classpath.icedtea.java.net.ProtocolFamily; +import org.classpath.icedtea.java.net.StandardProtocolFamily; @@ -1041,10 +1042,12 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import org.classpath.icedtea.java.nio.channels.spi.SelectorProvider; + +import org.classpath.icedtea.misc.SharedSecrets; ++ ++import sun.net.ResourceManager; /** * An implementation of DatagramChannels. -@@ -53,6 +71,9 @@ +@@ -54,6 +73,9 @@ // even after the value in the file descriptor object has been set to -1 int fdVal; @@ -1054,7 +1057,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla // IDs of native threads doing reads and writes, for signalling private volatile long readerThread = 0; private volatile long writerThread = 0; -@@ -91,6 +112,9 @@ +@@ -92,6 +114,9 @@ // Our socket adaptor, if any private DatagramSocket socket = null; @@ -1064,27 +1067,29 @@ diff -Nru openjdk.orig/jdk/src/share/cla // -- End of fields protected by stateLock -@@ -98,15 +122,40 @@ - throws IOException - { +@@ -101,6 +126,8 @@ super(sp); -+ this.family = Net.isIPv6Available() ? -+ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; - this.fd = Net.socket(false); - this.fdVal = IOUtil.fdVal(fd); - this.state = ST_UNCONNECTED; + ResourceManager.beforeUdpCreate(); + try { ++ this.family = Net.isIPv6Available() ? ++ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; + this.fd = Net.socket(false); + this.fdVal = IOUtil.fdVal(fd); + this.state = ST_UNCONNECTED; +@@ -110,10 +137,33 @@ + } } + public DatagramChannelImpl(SelectorProvider sp, ProtocolFamily family) { + super(sp); + if ((family != StandardProtocolFamily.INET) && + (family != StandardProtocolFamily.INET6)) -+ { -+ if (family == null) -+ throw new NullPointerException("'family' is null"); -+ else -+ throw new UnsupportedOperationException("Protocol family not supported"); -+ } ++ { ++ if (family == null) ++ throw new NullPointerException("'family' is null"); ++ else ++ throw new UnsupportedOperationException("Protocol family not supported"); ++ } + if (family == StandardProtocolFamily.INET6) { + if (!Net.isIPv6Available()) { + throw new UnsupportedOperationException("IPv6 not available"); @@ -1105,7 +1110,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla this.fd = fd; this.fdVal = IOUtil.fdVal(fd); this.state = ST_UNCONNECTED; -@@ -499,7 +548,7 @@ +@@ -506,7 +556,7 @@ } } @@ -1114,15 +1119,15 @@ diff -Nru openjdk.orig/jdk/src/share/cla synchronized (readLock) { synchronized (writeLock) { synchronized (stateLock) { -@@ -515,6 +564,7 @@ +@@ -522,6 +572,7 @@ } } } -+ return this; ++ return this; } public boolean isConnected() { -@@ -704,4 +754,350 @@ +@@ -712,4 +763,350 @@ initIDs(); } @@ -1174,7 +1179,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla + throw new IllegalArgumentException("Cannot set IP_MULTICAST_IF to 'null'"); + NetworkInterface interf = (NetworkInterface)value; + if (family == StandardProtocolFamily.INET6) { -+ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); ++ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); + if (index == -1) + throw new IOException("Network interface cannot be identified"); + Net.setInterface6(fd, index); @@ -1474,8 +1479,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2010-06-21 22:15:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2011-02-08 23:10:59.378265602 +0000 @@ -32,8 +32,15 @@ import java.io.IOException; import java.nio.ByteBuffer; @@ -1525,8 +1530,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla ensureOpen(); From ahughes at redhat.com Tue Feb 15 13:59:45 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 15 Feb 2011 21:59:45 +0000 Subject: [SECURITY] IcedTea6 1.7.10, 1.8.7 and 1.9.7 Released! Message-ID: <20110215215945.GC6266@rivendell.middle-earth.co.uk> There is a new set of security releases: IcedTea6 1.7.10, IcedTea6 1.8.7 and IcedTea6 1.9.7. This update contains the following security updates: * S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption * S6907662, CVE-2010-4465: Swing timer-based security manager bypass * S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation * S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets * S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries * S6985453, CVE-2010-4471: Java2D font-related system property leak * S6927050, CVE-2010-4470: JAXP untrusted component state manipulation * RH677332, CVE-2011-0706: Multiple signers privilege escalation The IcedTea project provides a harness to build the source code from OpenJDK6 using Free Software build tools. It also includes the only Free Java plugin and Web Start implementation, and support for additional architectures over and above x86, x86_64 and SPARC via the Zero assembler port. What?s New? ?????? New in release 1.7.10 (2011-02-15): * Security updates - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption - S6907662, CVE-2010-4465: Swing timer-based security manager bypass - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries - S6985453, CVE-2010-4471: Java2D font-related system property leak - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation - RH677332, CVE-2011-0706: Multiple signers privilege escalation * Bug fixes - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken - Fix latent JAXP bug caused by missing import New in release 1.8.7 (2011-02-15): * Security updates - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption - S6907662, CVE-2010-4465: Swing timer-based security manager bypass - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries - S6985453, CVE-2010-4471: Java2D font-related system property leak - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation - RH677332, CVE-2011-0706: Multiple signers privilege escalation * Bug fixes - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken - Fix latent JAXP bug caused by missing import New in release 1.9.7 (2011-02-15): * Security updates - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption - S6907662, CVE-2010-4465: Swing timer-based security manager bypass - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries - S6985453, CVE-2010-4471: Java2D font-related system property leak - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation - RH677332, CVE-2011-0706: Multiple signers privilege escalation * Bug fixes - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken - G344659: Fix issue when building on SPARC - Fix latent JAXP bug caused by missing import The tarballs can be downloaded from: * http://icedtea.classpath.org/download/source/icedtea6-1.7.10.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.8.7.tar.gz * http://icedtea.classpath.org/download/source/icedtea6-1.9.7.tar.gz dbca9d7598352d178651c8cc28ff887c59a27f0125785a58e9f9723611137f78 /mirrored/security/20110215/icedtea6-1.7.10.tar.gz c6b16e89cd3da5ddb9cdc9c8615773c6cef214d1d611030a07bae92a19e8562a /mirrored/security/20110215/icedtea6-1.8.7.tar.gz fe89234ca7f5dbb8696aa0e97a342c51901c10c0254f8fd563c6ccf7bf532fcc /mirrored/security/20110215/icedtea6-1.9.7.tar.gz The following people helped with these releases: Andrew John Hughes, Omair Majid We would also like to thank the bug reporters and testers! To get started: $ tar xzf icedtea6-.tar.gz $ cd icedtea6- Full build requirements and instructions are in INSTALL: $ ./configure [--enable-zero --enable-pulse-java --enable-systemtap ...] $ make Thanks, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Tue Feb 15 14:05:28 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 22:05:28 +0000 Subject: /hg/icedtea6: S6633275: Need to support shaped/translucent windows Message-ID: changeset 105c8fc5c1de in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=105c8fc5c1de author: Andrew John Hughes date: Tue Feb 15 22:05:21 2011 +0000 S6633275: Need to support shaped/translucent windows 2011-02-15 Andrew John Hughes * Makefile.am: Add patch below. * NEWS: Updated. * patches/openjdk/6633275-shaped_translucent_windows.patch: Support shaped/translucent windows diffstat: 4 files changed, 6322 insertions(+) ChangeLog | 7 Makefile.am | 1 NEWS | 1 patches/openjdk/6633275-shaped_translucent_windows.patch | 6313 ++++++++++++++ diffs (truncated from 6353 to 500 lines): diff -r 080e6564d096 -r 105c8fc5c1de ChangeLog --- a/ChangeLog Mon Feb 14 11:24:24 2011 +0000 +++ b/ChangeLog Tue Feb 15 22:05:21 2011 +0000 @@ -1,3 +1,10 @@ 2011-02-13 Andrew John Hughes + + * Makefile.am: Add patch below. + * NEWS: Updated. + * patches/openjdk/6633275-shaped_translucent_windows.patch: + Support shaped/translucent windows + 2011-02-13 Andrew John Hughes G344659: Fix issue when building on SPARC diff -r 080e6564d096 -r 105c8fc5c1de Makefile.am --- a/Makefile.am Mon Feb 14 11:24:24 2011 +0000 +++ b/Makefile.am Tue Feb 15 22:05:21 2011 +0000 @@ -186,6 +186,7 @@ ICEDTEA_PATCHES = \ patches/openjdk/6682046-shape_calculation.patch \ patches/openjdk/6797195-hw_lw_mixing.patch \ patches/openjdk/6725214-direct3d-01.patch \ + patches/openjdk/6633275-shaped_translucent_windows.patch \ patches/openjdk/6791612-opengl-jni-fix.patch \ patches/openjdk/6755274-glgetstring-crash.patch \ patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ diff -r 080e6564d096 -r 105c8fc5c1de NEWS --- a/NEWS Mon Feb 14 11:24:24 2011 +0000 +++ b/NEWS Tue Feb 15 22:05:21 2011 +0000 @@ -416,6 +416,7 @@ New in release 1.10 (2011-XX-XX): - S6682046: Mixing code does not always recalculate shapes correctly when resizing components - S6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7 - S6725214: D3D: forward-port the new pipeline from 6u10 + - S6633275: Need to support shaped/translucent windows * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc diff -r 080e6564d096 -r 105c8fc5c1de patches/openjdk/6633275-shaped_translucent_windows.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6633275-shaped_translucent_windows.patch Tue Feb 15 22:05:21 2011 +0000 @@ -0,0 +1,6313 @@ +diff -r 6cf33f955d7d make/sun/awt/FILES_c_windows.gmk +--- openjdk/jdk/make/sun/awt/FILES_c_windows.gmk Fri Feb 04 16:32:49 2011 +0000 ++++ openjdk/jdk/make/sun/awt/FILES_c_windows.gmk Tue Feb 15 15:12:57 2011 +0000 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -104,7 +104,8 @@ + OGLVertexCache.c \ + WGLGraphicsConfig.c \ + WGLSurfaceData.c \ +- AccelGlyphCache.c ++ AccelGlyphCache.c \ ++ rect.c + + FILES_cpp = \ + CmdIDList.cpp \ +diff -r 6cf33f955d7d make/sun/awt/Makefile +--- openjdk/jdk/make/sun/awt/Makefile Fri Feb 04 16:32:49 2011 +0000 ++++ openjdk/jdk/make/sun/awt/Makefile Tue Feb 15 15:12:57 2011 +0000 +@@ -1,5 +1,5 @@ + # +-# Copyright (c) 1995, 2008, Oracle and/or its affiliates. All rights reserved. ++# Copyright (c) 1995, 2009, Oracle and/or its affiliates. All rights reserved. + # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + # + # This code is free software; you can redistribute it and/or modify it +@@ -224,6 +224,7 @@ + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/shell + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/medialib + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/debug ++vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/utility + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/loops + vpath %.c $(SHARE_SRC)/native/$(PKGDIR)/../java2d/pipe +diff -r 6cf33f955d7d make/sun/awt/make.depend +--- openjdk/jdk/make/sun/awt/make.depend Fri Feb 04 16:32:49 2011 +0000 ++++ openjdk/jdk/make/sun/awt/make.depend Tue Feb 15 15:12:57 2011 +0000 +@@ -16,7 +16,7 @@ + + $(OBJDIR)/awt_AWTEvent.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +-$(OBJDIR)/awt_BitmapUtil.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h ++$(OBJDIR)/awt_BitmapUtil.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h ../../../src/windows/native/sun/awt/utility/rect.h + + $(OBJDIR)/awt_Brush.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +@@ -32,7 +32,7 @@ + + $(OBJDIR)/awt_Color.obj:: $(CLASSHDRDIR)/sun_awt_windows_WColor.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Color.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +-$(OBJDIR)/awt_Component.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h ++$(OBJDIR)/awt_Component.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Color.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_InputEvent.h $(CLASSHDRDIR)/java_awt_event_InputMethodEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_MouseWheelEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_KeyboardFocusManager.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Toolkit.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WInputMethod.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WPanelPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jawt.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_AWTEvent.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Cursor.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dimension.h ../../../src/windows/native/sun/windows/awt_DnDDT.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_InputEvent.h ../../../src/windows/native/sun/windows/awt_InputTextInfor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_KeyboardFocusManager.h ../../../src/windows/native/sun/windows/awt_KeyEvent.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_MouseEvent.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/ComCtl32Util.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h ../../../src/windows/native/sun/awt/utility/rect.h + + $(OBJDIR)/awt_Container.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +@@ -150,9 +150,9 @@ + + $(OBJDIR)/awt_Window.obj:: $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Container.h $(CLASSHDRDIR)/java_awt_Dialog.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_ComponentEvent.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_FileDialog.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_FontMetrics.h $(CLASSHDRDIR)/java_awt_Frame.h $(CLASSHDRDIR)/java_awt_Insets.h $(CLASSHDRDIR)/java_awt_Menu.h $(CLASSHDRDIR)/java_awt_MenuBar.h $(CLASSHDRDIR)/java_awt_MenuComponent.h $(CLASSHDRDIR)/java_awt_MenuItem.h $(CLASSHDRDIR)/java_awt_peer_MenuComponentPeer.h $(CLASSHDRDIR)/java_awt_Window.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WCanvasPeer.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFileDialogPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WFramePeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuBarPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuItemPeer.h $(CLASSHDRDIR)/sun_awt_windows_WMenuPeer.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_awt_windows_WWindowPeer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_BitmapUtil.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Canvas.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Container.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Dialog.h ../../../src/windows/native/sun/windows/awt_dlls.h ../../../src/windows/native/sun/windows/awt_FileDialog.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_Frame.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_IconCursor.h ../../../src/windows/native/sun/windows/awt_Insets.h ../../../src/windows/native/sun/windows/awt_Menu.h ../../../src/windows/native/sun/windows/awt_MenuBar.h ../../../src/windows/native/sun/windows/awt_MenuItem.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Panel.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_PrintDialog.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/awt_Window.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +-$(OBJDIR)/Blit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_Blit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ++$(OBJDIR)/Blit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_Blit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/awt/utility/rect.h ../../../src/windows/native/sun/java2d/j2d_md.h + +-$(OBJDIR)/BlitBg.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_BlitBg.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ++$(OBJDIR)/BlitBg.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_BlitBg.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/awt/utility/rect.h ../../../src/windows/native/sun/java2d/j2d_md.h + + $(OBJDIR)/BufferedMaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedMaskBlit.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedOpCodes.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntBgr.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h + +@@ -246,11 +246,11 @@ + + $(OBJDIR)/GDIRenderer.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIRenderer.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +-$(OBJDIR)/GDIWindowSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h ++$(OBJDIR)/GDIWindowSurfaceData.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_AWTEvent.h $(CLASSHDRDIR)/java_awt_Component.h $(CLASSHDRDIR)/java_awt_Dimension.h $(CLASSHDRDIR)/java_awt_Event.h $(CLASSHDRDIR)/java_awt_event_FocusEvent.h $(CLASSHDRDIR)/java_awt_event_KeyEvent.h $(CLASSHDRDIR)/java_awt_event_MouseEvent.h $(CLASSHDRDIR)/java_awt_event_WindowEvent.h $(CLASSHDRDIR)/java_awt_Font.h $(CLASSHDRDIR)/sun_awt_FontDescriptor.h $(CLASSHDRDIR)/sun_awt_PlatformFont.h $(CLASSHDRDIR)/sun_awt_windows_WComponentPeer.h $(CLASSHDRDIR)/sun_awt_windows_WFontMetrics.h $(CLASSHDRDIR)/sun_awt_windows_WObjectPeer.h $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h $(CLASSHDRDIR)/sun_java2d_windows_GDIWindowSurfaceData.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/awt/image/cvutils/img_globals.h ../../../src/share/native/sun/java2d/Disposer.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/windows/GDIWindowSurfaceData.h ../../../src/windows/native/sun/java2d/windows/WindowsFlags.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Brush.h ../../../src/windows/native/sun/windows/awt_Component.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_Font.h ../../../src/windows/native/sun/windows/awt_GDIObject.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Object.h ../../../src/windows/native/sun/windows/awt_Palette.h ../../../src/windows/native/sun/windows/awt_Pen.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/awt_Unicode.h ../../../src/windows/native/sun/windows/awt_Win32GraphicsDevice.h ../../../src/windows/native/sun/windows/colordata.h ../../../src/windows/native/sun/windows/Devices.h ../../../src/windows/native/sun/windows/GDIHashtable.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/ObjectList.h ../../../src/windows/native/sun/awt/utility/rect.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + + $(OBJDIR)/gifdecoder.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h + +-$(OBJDIR)/GraphicsPrimitiveMgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_GraphicsPrimitiveMgr.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ++$(OBJDIR)/GraphicsPrimitiveMgr.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_GraphicsPrimitiveMgr.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/awt/utility/rect.h ../../../src/windows/native/sun/java2d/j2d_md.h + + $(OBJDIR)/Hashtable.obj:: $(CLASSHDRDIR)/sun_awt_windows_WToolkit.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/awt.h ../../../src/windows/native/sun/windows/awtmsg.h ../../../src/windows/native/sun/windows/awt_Debug.h ../../../src/windows/native/sun/windows/awt_MMStub.h ../../../src/windows/native/sun/windows/awt_Multimon.h ../../../src/windows/native/sun/windows/awt_Toolkit.h ../../../src/windows/native/sun/windows/Hashtable.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +@@ -278,7 +278,7 @@ + + $(OBJDIR)/IntRgbx.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMacros.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/AnyInt.h ../../../src/share/native/sun/java2d/loops/ByteGray.h ../../../src/share/native/sun/java2d/loops/ByteIndexed.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/loops/IntArgb.h ../../../src/share/native/sun/java2d/loops/IntArgbBm.h ../../../src/share/native/sun/java2d/loops/IntArgbPre.h ../../../src/share/native/sun/java2d/loops/IntDcm.h ../../../src/share/native/sun/java2d/loops/IntRgb.h ../../../src/share/native/sun/java2d/loops/IntRgbx.h ../../../src/share/native/sun/java2d/loops/LineUtils.h ../../../src/share/native/sun/java2d/loops/LoopMacros.h ../../../src/share/native/sun/java2d/loops/ThreeByteBgr.h ../../../src/share/native/sun/java2d/loops/UshortGray.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h + +-$(OBJDIR)/MaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ++$(OBJDIR)/MaskBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/awt/utility/rect.h + + $(OBJDIR)/MaskFill.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_MaskFill.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/sun/java2d/j2d_md.h + +@@ -290,7 +290,7 @@ + + $(OBJDIR)/OGLBufImgOps.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/OGLBufImgOps.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h + +-$(OBJDIR)/OGLContext.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ++$(OBJDIR)/OGLContext.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLContext.h $(CLASSHDRDIR)/sun_java2d_opengl_OGLSurfaceData.h $(CLASSHDRDIR)/sun_java2d_pipe_BufferedContext.h $(CLASSHDRDIR)/sun_java2d_pipe_hw_AccelSurface.h $(CLASSHDRDIR)/sun_java2d_SunGraphics2D.h ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/OGLContext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/opengl/OGLRenderQueue.h ../../../src/share/native/sun/java2d/opengl/OGLSurfaceData.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h ../../../src/windows/native/sun/awt/utility/rect.h + + $(OBJDIR)/OGLFuncs.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/gl.h ../../../src/share/native/sun/java2d/opengl/J2D_GL/glext.h ../../../src/share/native/sun/java2d/opengl/OGLFuncMacros.h ../../../src/share/native/sun/java2d/opengl/OGLFuncs.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/opengl/J2D_GL/wglext.h ../../../src/windows/native/sun/java2d/opengl/OGLFuncs_md.h + +@@ -312,11 +312,11 @@ + + $(OBJDIR)/ProcessPath.obj:: $(CLASSHDRDIR)/java_awt_geom_PathIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/ProcessPath.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h + +-$(OBJDIR)/Region.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ++$(OBJDIR)/Region.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/awt/utility/rect.h + + $(OBJDIR)/RenderBuffer.obj:: $(CLASSHDRDIR)/sun_java2d_pipe_RenderBuffer.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h + +-$(OBJDIR)/ScaledBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_ScaledBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ++$(OBJDIR)/ScaledBlit.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/sun_java2d_loops_ScaledBlit.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/awt/utility/rect.h + + $(OBJDIR)/ShapeSpanIterator.obj:: $(CLASSHDRDIR)/java_awt_geom_PathIterator.h $(CLASSHDRDIR)/sun_java2d_pipe_ShapeSpanIterator.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/pipe/PathConsumer2D.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h + +@@ -332,7 +332,7 @@ + + $(OBJDIR)/Trace.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/javavm/export/jvm.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/awt/debug/debug_assert.h ../../../src/share/native/sun/awt/debug/debug_mem.h ../../../src/share/native/sun/awt/debug/debug_trace.h ../../../src/share/native/sun/awt/debug/debug_util.h ../../../src/share/native/sun/java2d/Trace.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/javavm/export/jvm_md.h ../../../src/windows/native/common/jlong_md.h + +-$(OBJDIR)/TransformHelper.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_loops_TransformHelper.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ++$(OBJDIR)/TransformHelper.obj:: $(CLASSHDRDIR)/java_awt_AlphaComposite.h $(CLASSHDRDIR)/java_awt_image_AffineTransformOp.h $(CLASSHDRDIR)/sun_java2d_loops_TransformHelper.h ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/gdefs.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/share/native/sun/java2d/loops/AlphaMath.h ../../../src/share/native/sun/java2d/loops/GlyphImageRef.h ../../../src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h ../../../src/share/native/sun/java2d/pipe/Region.h ../../../src/share/native/sun/java2d/pipe/SpanIterator.h ../../../src/share/native/sun/java2d/SurfaceData.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/gdefs_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/java2d/j2d_md.h ../../../src/windows/native/sun/awt/utility/rect.h + + $(OBJDIR)/UnicowsLoader.obj:: ../../../src/share/javavm/export/jni.h ../../../src/share/native/common/jlong.h ../../../src/share/native/common/jni_util.h ../../../src/windows/javavm/export/jni_md.h ../../../src/windows/native/common/jlong_md.h ../../../src/windows/native/sun/windows/alloc.h ../../../src/windows/native/sun/windows/stdhdrs.h ../../../src/windows/native/sun/windows/UnicowsLoader.h + +diff -r 6cf33f955d7d make/sun/awt/mapfile-mawt-vers +--- openjdk/jdk/make/sun/awt/mapfile-mawt-vers Fri Feb 04 16:32:49 2011 +0000 ++++ openjdk/jdk/make/sun/awt/mapfile-mawt-vers Tue Feb 15 15:12:57 2011 +0000 +@@ -291,6 +291,7 @@ + Java_sun_awt_X11GraphicsConfig_createBackBuffer; + Java_sun_awt_X11GraphicsConfig_destroyBackBuffer; + Java_sun_awt_X11GraphicsConfig_swapBuffers; ++ Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable; + Java_sun_awt_X11GraphicsDevice_isDBESupported; + Java_sun_awt_X11GraphicsDevice_getDisplay; + Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals; +diff -r 6cf33f955d7d make/sun/awt/mapfile-vers-linux +--- openjdk/jdk/make/sun/awt/mapfile-vers-linux Fri Feb 04 16:32:49 2011 +0000 ++++ openjdk/jdk/make/sun/awt/mapfile-vers-linux Tue Feb 15 15:12:57 2011 +0000 +@@ -406,6 +406,7 @@ + Java_sun_awt_X11GraphicsConfig_getNumColors; + Java_sun_awt_X11GraphicsConfig_getXResolution; + Java_sun_awt_X11GraphicsConfig_getYResolution; ++ Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable; + Java_sun_awt_X11GraphicsDevice_isDBESupported; + Java_sun_awt_X11GraphicsDevice_getDisplay; + Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals; +diff -r 6cf33f955d7d make/sun/xawt/mapfile-vers +--- openjdk/jdk/make/sun/xawt/mapfile-vers Fri Feb 04 16:32:49 2011 +0000 ++++ openjdk/jdk/make/sun/xawt/mapfile-vers Tue Feb 15 15:12:57 2011 +0000 +@@ -216,6 +216,7 @@ + Java_sun_awt_X11GraphicsConfig_createBackBuffer; + Java_sun_awt_X11GraphicsConfig_destroyBackBuffer; + Java_sun_awt_X11GraphicsConfig_swapBuffers; ++ Java_sun_awt_X11GraphicsConfig_isTranslucencyCapable; + Java_java_awt_Insets_initIDs; + Java_java_awt_KeyboardFocusManager_initIDs; + Java_java_awt_Font_initIDs; +diff -r 6cf33f955d7d src/share/classes/com/sun/awt/AWTUtilities.java +--- openjdk/jdk/src/share/classes/com/sun/awt/AWTUtilities.java Fri Feb 04 16:32:49 2011 +0000 ++++ openjdk/jdk/src/share/classes/com/sun/awt/AWTUtilities.java Tue Feb 15 15:12:57 2011 +0000 +@@ -26,17 +26,37 @@ + package com.sun.awt; + + import java.awt.*; ++ + import sun.awt.AWTAccessor; +- ++import sun.awt.SunToolkit; + + /** + * A collection of utility methods for AWT. + * + * The functionality provided by the static methods of the class includes: + *
    ++ *
  • Setting shapes on top-level windows ++ *
  • Setting a constant alpha value for each pixel of a top-level window ++ *
  • Making a window non-opaque, after that it paints only explicitly ++ * painted pixels on the screen, with arbitrary alpha values for every pixel. + *
  • Setting a 'mixing-cutout' shape for a component. + *
+ *

++ * A "top-level window" is an instance of the {@code Window} class (or its ++ * descendant, such as {@code JFrame}). ++ *

++ * Some of the mentioned features may not be supported by the native platform. ++ * To determine whether a particular feature is supported, the user must use ++ * the {@code isTranslucencySupported()} method of the class passing a desired ++ * translucency kind (a member of the {@code Translucency} enum) as an ++ * argument. ++ *

++ * The per-pixel alpha feature also requires the user to create her/his ++ * windows using a translucency-capable graphics configuration. ++ * The {@code isTranslucencyCapable()} method must ++ * be used to verify whether any given GraphicsConfiguration supports ++ * the trasnlcency effects. ++ *

+ * WARNING: This class is an implementation detail and only meant + * for limited use outside of the core platform. This API may change + * drastically between update release, and it may even be +@@ -50,6 +70,344 @@ + private AWTUtilities() { + } + ++ /** Kinds of translucency supported by the underlying system. ++ * @see #isTranslucencySupported ++ */ ++ public static enum Translucency { ++ /** ++ * Represents support in the underlying system for windows each pixel ++ * of which is guaranteed to be either completely opaque, with ++ * an alpha value of 1.0, or completely transparent, with an alpha ++ * value of 0.0. ++ */ ++ PERPIXEL_TRANSPARENT, ++ ++ /** ++ * Represents support in the underlying system for windows all of ++ * the pixels of which have the same alpha value between or including ++ * 0.0 and 1.0. ++ */ ++ TRANSLUCENT, ++ ++ /** ++ * Represents support in the underlying system for windows that ++ * contain or might contain pixels with arbitrary alpha values ++ * between and including 0.0 and 1.0. ++ */ ++ PERPIXEL_TRANSLUCENT; ++ } ++ ++ ++ /** ++ * Returns whether the given level of translucency is supported by ++ * the underlying system. ++ * ++ * Note that this method may sometimes return the value ++ * indicating that the particular level is supported, but ++ * the native windowing system may still not support the ++ * given level of translucency (due to the bugs in ++ * the windowing system). ++ * ++ * @param translucencyKind a kind of translucency support ++ * (either PERPIXEL_TRANSPARENT, ++ * TRANSLUCENT, or PERPIXEL_TRANSLUCENT) ++ * @return whether the given translucency kind is supported ++ */ ++ public static boolean isTranslucencySupported(Translucency translucencyKind) { ++ switch (translucencyKind) { ++ case PERPIXEL_TRANSPARENT: ++ return isWindowShapingSupported(); ++ case TRANSLUCENT: ++ return isWindowOpacitySupported(); ++ case PERPIXEL_TRANSLUCENT: ++ return isWindowTranslucencySupported(); ++ } ++ return false; ++ } ++ ++ ++ /** ++ * Returns whether the windowing system supports changing the opacity ++ * value of top-level windows. ++ * Note that this method may sometimes return true, but the native ++ * windowing system may still not support the concept of ++ * translucency (due to the bugs in the windowing system). ++ */ ++ private static boolean isWindowOpacitySupported() { ++ Toolkit curToolkit = Toolkit.getDefaultToolkit(); ++ if (!(curToolkit instanceof SunToolkit)) { ++ return false; ++ } ++ return ((SunToolkit)curToolkit).isWindowOpacitySupported(); ++ } ++ ++ /** ++ * Set the opacity of the window. The opacity is at the range [0..1]. ++ * Note that setting the opacity level of 0 may or may not disable ++ * the mouse event handling on this window. This is ++ * a platform-dependent behavior. ++ * ++ * In order for this method to enable the translucency effect, ++ * the isTranslucencySupported() method should indicate that the ++ * TRANSLUCENT level of translucency is supported. ++ * ++ *

Also note that the window must not be in the full-screen mode ++ * when setting the opacity value < 1.0f. Otherwise ++ * the IllegalArgumentException is thrown. ++ * ++ * @param window the window to set the opacity level to ++ * @param opacity the opacity level to set to the window ++ * @throws NullPointerException if the window argument is null ++ * @throws IllegalArgumentException if the opacity is out of ++ * the range [0..1] ++ * @throws IllegalArgumentException if the window is in full screen mode, ++ * and the opacity is less than 1.0f ++ * @throws UnsupportedOperationException if the TRANSLUCENT translucency ++ * kind is not supported ++ */ ++ public static void setWindowOpacity(Window window, float opacity) { ++ if (window == null) { ++ throw new NullPointerException( ++ "The window argument should not be null."); ++ } ++ ++ AWTAccessor.getWindowAccessor().setOpacity(window, opacity); ++ } ++ ++ /** ++ * Get the opacity of the window. If the opacity has not ++ * yet being set, this method returns 1.0. ++ * ++ * @param window the window to get the opacity level from ++ * @throws NullPointerException if the window argument is null ++ */ ++ public static float getWindowOpacity(Window window) { ++ if (window == null) { ++ throw new NullPointerException( ++ "The window argument should not be null."); ++ } ++ ++ return AWTAccessor.getWindowAccessor().getOpacity(window); ++ } ++ ++ /** ++ * Returns whether the windowing system supports changing the shape ++ * of top-level windows. ++ * Note that this method may sometimes return true, but the native ++ * windowing system may still not support the concept of ++ * shaping (due to the bugs in the windowing system). ++ */ ++ public static boolean isWindowShapingSupported() { ++ Toolkit curToolkit = Toolkit.getDefaultToolkit(); ++ if (!(curToolkit instanceof SunToolkit)) { ++ return false; ++ } ++ return ((SunToolkit)curToolkit).isWindowShapingSupported(); ++ } ++ ++ /** ++ * Returns an object that implements the Shape interface and represents ++ * the shape previously set with the call to the setWindowShape() method. ++ * If no shape has been set yet, or the shape has been reset to null, ++ * this method returns null. ++ * ++ * @param window the window to get the shape from ++ * @return the current shape of the window ++ * @throws NullPointerException if the window argument is null ++ */ ++ public static Shape getWindowShape(Window window) { ++ if (window == null) { ++ throw new NullPointerException( ++ "The window argument should not be null."); ++ } ++ return AWTAccessor.getWindowAccessor().getShape(window); ++ } ++ ++ /** ++ * Sets a shape for the given window. ++ * If the shape argument is null, this methods restores ++ * the default shape making the window rectangular. ++ *

Note that in order to set a shape, the window must be undecorated. ++ * If the window is decorated, this method ignores the {@code shape} ++ * argument and resets the shape to null. ++ *

Also note that the window must not be in the full-screen mode ++ * when setting a non-null shape. Otherwise the IllegalArgumentException ++ * is thrown. ++ *

Depending on the platform, the method may return without ++ * effecting the shape of the window if the window has a non-null warning ++ * string ({@link Window#getWarningString()}). In this case the passed ++ * shape object is ignored. ++ * ++ * @param window the window to set the shape to ++ * @param shape the shape to set to the window ++ * @throws NullPointerException if the window argument is null ++ * @throws IllegalArgumentException if the window is in full screen mode, ++ * and the shape is not null ++ * @throws UnsupportedOperationException if the PERPIXEL_TRANSPARENT ++ * translucency kind is not supported ++ */ ++ public static void setWindowShape(Window window, Shape shape) { ++ if (window == null) { ++ throw new NullPointerException( ++ "The window argument should not be null."); ++ } ++ AWTAccessor.getWindowAccessor().setShape(window, shape); ++ } ++ ++ private static boolean isWindowTranslucencySupported() { ++ /* ++ * Per-pixel alpha is supported if all the conditions are TRUE: ++ * 1. The toolkit is a sort of SunToolkit ++ * 2. The toolkit supports translucency in general ++ * (isWindowTranslucencySupported()) ++ * 3. There's at least one translucency-capable ++ * GraphicsConfiguration ++ */ ++ ++ Toolkit curToolkit = Toolkit.getDefaultToolkit(); ++ if (!(curToolkit instanceof SunToolkit)) { ++ return false; ++ } ++ ++ if (!((SunToolkit)curToolkit).isWindowTranslucencySupported()) { ++ return false; ++ } ++ ++ GraphicsEnvironment env = ++ GraphicsEnvironment.getLocalGraphicsEnvironment(); ++ ++ // If the default GC supports translucency return true. ++ // It is important to optimize the verification this way, ++ // see CR 6661196 for more details. ++ if (isTranslucencyCapable(env.getDefaultScreenDevice() ++ .getDefaultConfiguration())) ++ { ++ return true; ++ } ++ ++ // ... otherwise iterate through all the GCs. ++ GraphicsDevice[] devices = env.getScreenDevices(); ++ ++ for (int i = 0; i < devices.length; i++) { ++ GraphicsConfiguration[] configs = devices[i].getConfigurations(); ++ for (int j = 0; j < configs.length; j++) { ++ if (isTranslucencyCapable(configs[j])) { ++ return true; ++ } ++ } ++ } ++ ++ return false; ++ } ++ ++ /** ++ * Enables the per-pixel alpha support for the given window. ++ * Once the window becomes non-opaque (the isOpaque is set to false), ++ * the drawing sub-system is starting to respect the alpha value of each ++ * separate pixel. If a pixel gets painted with alpha color component ++ * equal to zero, it becomes visually transparent, if the alpha of the ++ * pixel is equal to 255, the pixel is fully opaque. Interim values ++ * of the alpha color component make the pixel semi-transparent (i.e. ++ * translucent). ++ *

Note that in order for the window to support the per-pixel alpha ++ * mode, the window must be created using the GraphicsConfiguration ++ * for which the {@link #isTranslucencyCapable} ++ * method returns true. ++ *

Also note that some native systems enable the per-pixel translucency ++ * mode for any window created using the translucency-compatible ++ * graphics configuration. However, it is highly recommended to always ++ * invoke the setWindowOpaque() method for these windows, at least for ++ * the sake of cross-platform compatibility reasons. ++ *

Also note that the window must not be in the full-screen mode ++ * when making it non-opaque. Otherwise the IllegalArgumentException ++ * is thrown. ++ *

If the window is a {@code Frame} or a {@code Dialog}, the window must ++ * be undecorated prior to enabling the per-pixel translucency effect (see ++ * {@link Frame#setUndecorated()} and/or {@link Dialog#setUndecorated()}). ++ * If the window becomes decorated through a subsequent call to the From dbhole at icedtea.classpath.org Tue Feb 15 14:06:10 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Tue, 15 Feb 2011 22:06:10 +0000 Subject: /hg/icedtea-web: 2 new changesets Message-ID: changeset 5cb73fdbe246 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=5cb73fdbe246 author: Deepak Bhole date: Tue Feb 15 17:02:05 2011 -0500 Fix S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries changeset 2289777074ae in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=2289777074ae author: Deepak Bhole date: Tue Feb 15 17:03:09 2011 -0500 Fixed RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation diffstat: 4 files changed, 26 insertions(+), 2 deletions(-) ChangeLog | 15 +++++++++++++++ NEWS | 3 +++ launcher/java_md.c | 2 +- netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 8 +++++++- diffs (70 lines): diff -r cd1eda4f0d97 -r 2289777074ae ChangeLog --- a/ChangeLog Tue Feb 15 11:01:01 2011 -0500 +++ b/ChangeLog Tue Feb 15 17:03:09 2011 -0500 @@ -9,6 +9,21 @@ 2011-02-15 Omair Majid + + RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation + * NEWS: Updated. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Assign appropriate security descriptor based on + code signing. + +2011-02-11 Deepak Bhole + + Fix S6983554, CVE-2010-4450: Launcher incorrect processing of empty + library path entries + * NEWS: Updated. + * launcher/java_md.c: Ignore empty LD_LIBRARY_PATH. 2011-02-11 Omair Majid diff -r cd1eda4f0d97 -r 2289777074ae NEWS --- a/NEWS Tue Feb 15 11:01:01 2011 -0500 +++ b/NEWS Tue Feb 15 17:03:09 2011 -0500 @@ -9,6 +9,9 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 1.1 (2011-XX-XX): +* Security updates + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation * NetX - Use Firefox's proxy settings if possible - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) diff -r cd1eda4f0d97 -r 2289777074ae launcher/java_md.c --- a/launcher/java_md.c Tue Feb 15 11:01:01 2011 -0500 +++ b/launcher/java_md.c Tue Feb 15 17:03:09 2011 -0500 @@ -484,7 +484,7 @@ CreateExecutionEnvironment(int *_argcp, * LD_LIBRARY_PATH. Note that this prevents any possible infinite * loop of execv() because we test for the prefix, above. */ - if (runpath != 0) { + if (runpath != 0 && (runpath[0] != '\0')) { strcat(new_runpath, ":"); strcat(new_runpath, runpath); } diff -r cd1eda4f0d97 -r 2289777074ae netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 15 11:01:01 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 15 17:03:09 2011 -0500 @@ -481,9 +481,15 @@ public class JNLPClassLoader extends URL codebase = file.getResources().getMainJAR().getLocation(); } - jarSecurity = new SecurityDesc(file, + if (signing) { + jarSecurity = new SecurityDesc(file, SecurityDesc.ALL_PERMISSIONS, codebase.getHost()); + } else { + jarSecurity = new SecurityDesc(file, + SecurityDesc.SANDBOX_PERMISSIONS, + codebase.getHost()); + } } jarLocationSecurityMap.put(location, jarSecurity); From dbhole at icedtea.classpath.org Tue Feb 15 14:06:17 2011 From: dbhole at icedtea.classpath.org (dbhole at icedtea.classpath.org) Date: Tue, 15 Feb 2011 22:06:17 +0000 Subject: /hg/release/icedtea-web-1.0: 5 new changesets Message-ID: changeset af8d359d6daa in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=af8d359d6daa author: Deepak Bhole date: Mon Feb 14 13:59:55 2011 -0500 Fixed S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries changeset 9199a6ec1f0c in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=9199a6ec1f0c author: Deepak Bhole date: Mon Feb 14 14:00:58 2011 -0500 Fixed RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation changeset 6af7ac54a177 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=6af7ac54a177 author: Deepak Bhole date: Mon Feb 14 14:02:06 2011 -0500 2011-02-14 Deepak Bhole * NEWS: Update for 1.0.1 release. * configure.ac: Bump to 1.0.1 changeset 5f2232150387 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=5f2232150387 author: Deepak Bhole date: Tue Feb 15 17:05:03 2011 -0500 Added tag icedtea-web-1.0.1 for changeset 6af7ac54a177 changeset a7550fb352c5 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=a7550fb352c5 author: Deepak Bhole date: Tue Feb 15 17:06:34 2011 -0500 Prepare for 1.0.2 2011-02-11 Deepak Bhole * NEWS: Add 1.0.2 * configure.ac: Bump to 1.0.2pre. diffstat: 6 files changed, 42 insertions(+), 4 deletions(-) .hgtags | 1 ChangeLog | 25 ++++++++++++++++ NEWS | 8 ++++- configure.ac | 2 - launcher/java_md.c | 2 - netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 8 ++++- diffs (98 lines): diff -r cc8c67ed615e -r a7550fb352c5 .hgtags --- a/.hgtags Thu Feb 10 11:19:53 2011 -0500 +++ b/.hgtags Tue Feb 15 17:06:34 2011 -0500 @@ -1,2 +1,3 @@ 692d7e5b31039156aff1600fd7f5034fead2f258 692d7e5b31039156aff1600fd7f5034fead2f258 icedtea-web-1.0-branch 3973cfa679272d5057f2a1527483796964a1de6c icedtea-web-1.0 +6af7ac54a177bf31d335ce4a58f6c7abcbd0333c icedtea-web-1.0.1 diff -r cc8c67ed615e -r a7550fb352c5 ChangeLog --- a/ChangeLog Thu Feb 10 11:19:53 2011 -0500 +++ b/ChangeLog Tue Feb 15 17:06:34 2011 -0500 @@ -1,3 +1,28 @@ 2011-02-10 Deepak Bhole + + * NEWS: Add 1.0.2 + * configure.ac: Bump to 1.0.2pre. + +2011-02-14 Deepak Bhole + + * NEWS: Update for 1.0.1 release. + * configure.ac: Bump to 1.0.1 + +2011-02-11 Omair Majid + + RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation + * NEWS: Updated. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java + (initializeResources): Assign appropriate security descriptor based on + code signing. + +2011-02-11 Deepak Bhole + + Fix S6983554, CVE-2010-4450: Launcher incorrect processing of empty + library path entries + * NEWS: Updated. + * launcher/java_md.c: Ignore empty LD_LIBRARY_PATH. + 2011-02-10 Deepak Bhole * netx/net/sourceforge/jnlp/runtime/JNLPRuntime.java (initialize): diff -r cc8c67ed615e -r a7550fb352c5 NEWS --- a/NEWS Thu Feb 10 11:19:53 2011 -0500 +++ b/NEWS Tue Feb 15 17:06:34 2011 -0500 @@ -8,7 +8,13 @@ GX - http://bugs.gentoo.org/show_bug.cg CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY -New in release 1.0.1 (2011-XX-XX): +New in release 1.0.2 (2011-XX-XX): + +New in release 1.0.1 (2011-02-15): + +* Security updates + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation New in release 1.0 (2011-02-02): diff -r cc8c67ed615e -r a7550fb352c5 configure.ac --- a/configure.ac Thu Feb 10 11:19:53 2011 -0500 +++ b/configure.ac Tue Feb 15 17:06:34 2011 -0500 @@ -1,4 +1,4 @@ AC_INIT([icedtea-web],[1.0.1pre],[distro -AC_INIT([icedtea-web],[1.0.1pre],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) +AC_INIT([icedtea-web],[1.0.2pre],[distro-pkg-dev at openjdk.java.net], [icedtea-web], [http://icedtea.classpath.org/wiki/IcedTea-Web]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) diff -r cc8c67ed615e -r a7550fb352c5 launcher/java_md.c --- a/launcher/java_md.c Thu Feb 10 11:19:53 2011 -0500 +++ b/launcher/java_md.c Tue Feb 15 17:06:34 2011 -0500 @@ -484,7 +484,7 @@ CreateExecutionEnvironment(int *_argcp, * LD_LIBRARY_PATH. Note that this prevents any possible infinite * loop of execv() because we test for the prefix, above. */ - if (runpath != 0) { + if (runpath != 0 && (runpath[0] != '\0')) { strcat(new_runpath, ":"); strcat(new_runpath, runpath); } diff -r cc8c67ed615e -r a7550fb352c5 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Thu Feb 10 11:19:53 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 15 17:06:34 2011 -0500 @@ -479,9 +479,15 @@ public class JNLPClassLoader extends URL codebase = file.getResources().getMainJAR().getLocation(); } - jarSecurity = new SecurityDesc(file, + if (signing) { + jarSecurity = new SecurityDesc(file, SecurityDesc.ALL_PERMISSIONS, codebase.getHost()); + } else { + jarSecurity = new SecurityDesc(file, + SecurityDesc.SANDBOX_PERMISSIONS, + codebase.getHost()); + } } jarLocationSecurityMap.put(location, jarSecurity); From andrew at icedtea.classpath.org Tue Feb 15 14:08:46 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 22:08:46 +0000 Subject: /hg/icedtea6: Mention copyright header backports in NEWS. Message-ID: changeset 817a086a2135 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=817a086a2135 author: Andrew John Hughes date: Tue Feb 15 22:08:40 2011 +0000 Mention copyright header backports in NEWS. 2011-02-15 Andrew John Hughes * NEWS: Mention backports of copyright header fixes for 6616323 and 6633275. diffstat: 2 files changed, 7 insertions(+) ChangeLog | 5 +++++ NEWS | 2 ++ diffs (24 lines): diff -r 105c8fc5c1de -r 817a086a2135 ChangeLog --- a/ChangeLog Tue Feb 15 22:05:21 2011 +0000 +++ b/ChangeLog Tue Feb 15 22:08:40 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-15 Andrew John Hughes + + * NEWS: Mention backports of copyright header + fixes for 6616323 and 6633275. + 2011-02-15 Andrew John Hughes * Makefile.am: Add patch below. diff -r 105c8fc5c1de -r 817a086a2135 NEWS --- a/NEWS Tue Feb 15 22:05:21 2011 +0000 +++ b/NEWS Tue Feb 15 22:08:40 2011 +0000 @@ -417,6 +417,8 @@ New in release 1.10 (2011-XX-XX): - S6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7 - S6725214: D3D: forward-port the new pipeline from 6u10 - S6633275: Need to support shaped/translucent windows + - S7015232: missing copyright header in CheckZOrderChange.java + - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc From andrew at icedtea.classpath.org Tue Feb 15 14:20:35 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 22:20:35 +0000 Subject: /hg/release/icedtea6-1.9: Prepare for 1.9.8. Message-ID: changeset d6deb6050f4a in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=d6deb6050f4a author: Andrew John Hughes date: Tue Feb 15 22:20:29 2011 +0000 Prepare for 1.9.8. 2011-02-15 Andrew John Hughes * NEWS: Add 1.9.8 section. * configure.ac: Bump to 1.9.8pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r 64b56daa6bc0 -r d6deb6050f4a ChangeLog --- a/ChangeLog Tue Feb 15 21:47:21 2011 +0000 +++ b/ChangeLog Tue Feb 15 22:20:29 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-14 Andrew John Hughes + + * NEWS: Add 1.9.8 section. + * configure.ac: Bump to 1.9.8pre. + 2011-02-14 Andrew John Hughes * Makefile.am: Add patch. diff -r 64b56daa6bc0 -r d6deb6050f4a NEWS --- a/NEWS Tue Feb 15 21:47:21 2011 +0000 +++ b/NEWS Tue Feb 15 22:20:29 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.9.8 (20XX-XX-XX): New in release 1.9.7 (2011-02-15): diff -r 64b56daa6bc0 -r d6deb6050f4a configure.ac --- a/configure.ac Tue Feb 15 21:47:21 2011 +0000 +++ b/configure.ac Tue Feb 15 22:20:29 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.9.7],[distro-pkg-d -AC_INIT([icedtea6],[1.9.7],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.9.8pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From dbhole at redhat.com Tue Feb 15 14:21:35 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 15 Feb 2011 17:21:35 -0500 Subject: [SECURITY] IcedTea-Web 1.0.1 Released! Message-ID: <20110215222132.GF29315@redhat.com> IcedTea-Web 1.0.1 has been released, and contains important security fixes. What's new in 1.0.1: - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation cfcb17e94d6cd406e7aceb08de2ae7c03fe3f2a730829cc5ac54ca6a90a9d46e icedtea-web-1.0.1.tar.gz The following people helped with this release: Omair Majid (code), Andrew John Hughes (guidance on how to release) Download link: http://icedtea.classpath.org/download/source/icedtea-web-1.0.1.tar.gz Build instructions are here: http://icedtea.classpath.org/wiki/IcedTea-Web#Building_IcedTea-Web Cheers, Deepak From andrew at icedtea.classpath.org Tue Feb 15 15:02:43 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 23:02:43 +0000 Subject: /hg/release/icedtea6-1.8: Prepare for 1.8.8. Message-ID: changeset 326f7589d7e8 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=326f7589d7e8 author: Andrew John Hughes date: Tue Feb 15 23:02:33 2011 +0000 Prepare for 1.8.8. 2011-02-15 Andrew John Hughes * NEWS: Add 1.8.8 section. * configure.ac: Bump to 1.8.8pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r e196ef84ddb0 -r 326f7589d7e8 ChangeLog --- a/ChangeLog Tue Feb 15 21:46:41 2011 +0000 +++ b/ChangeLog Tue Feb 15 23:02:33 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-14 Andrew John Hughes + + * NEWS: Add 1.8.8 section. + * configure.ac: Bump to 1.8.8pre. + 2011-02-14 Andrew John Hughes * Makefile.am: Add patch. diff -r e196ef84ddb0 -r 326f7589d7e8 NEWS --- a/NEWS Tue Feb 15 21:46:41 2011 +0000 +++ b/NEWS Tue Feb 15 23:02:33 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.8.8 (20XX-XX-XX): New in release 1.8.7 (2011-02-15): diff -r e196ef84ddb0 -r 326f7589d7e8 configure.ac --- a/configure.ac Tue Feb 15 21:46:41 2011 +0000 +++ b/configure.ac Tue Feb 15 23:02:33 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.8.7],[distro-pkg-d -AC_INIT([icedtea6],[1.8.7],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.8.8pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Tue Feb 15 15:04:31 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 15 Feb 2011 23:04:31 +0000 Subject: /hg/release/icedtea6-1.7: Prepare for 1.7.11. Message-ID: changeset 6a127ad66978 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=6a127ad66978 author: Andrew John Hughes date: Tue Feb 15 23:04:22 2011 +0000 Prepare for 1.7.11. 2011-02-15 Andrew John Hughes * NEWS: Add 1.7.11 section. * configure.ac: Bump to 1.7.11pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r a7d6abfd813b -r 6a127ad66978 ChangeLog --- a/ChangeLog Tue Feb 15 21:42:25 2011 +0000 +++ b/ChangeLog Tue Feb 15 23:04:22 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-14 Andrew John Hughes + + * NEWS: Add 1.7.11 section. + * configure.ac: Bump to 1.7.11pre. + 2011-02-14 Andrew John Hughes * NEWS: Add CVE and bug ID for NetX diff -r a7d6abfd813b -r 6a127ad66978 NEWS --- a/NEWS Tue Feb 15 21:42:25 2011 +0000 +++ b/NEWS Tue Feb 15 23:04:22 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.7.11 (20XX-XX-XX): New in release 1.7.10 (2011-02-15): diff -r a7d6abfd813b -r 6a127ad66978 configure.ac --- a/configure.ac Tue Feb 15 21:42:25 2011 +0000 +++ b/configure.ac Tue Feb 15 23:04:22 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6], [1.7.10], [distro-pk -AC_INIT([icedtea6], [1.7.10], [distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6], [1.7.11pre], [distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 03:07:55 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 11:07:55 +0000 Subject: [Bug 631] New: icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 Summary: icedtea6-1.9.7 fails to build on ppc/ppc64 Product: IcedTea Version: unspecified Platform: ppc OS/Version: Linux Status: NEW Severity: major Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: acrux at linuxmail.org icedtea6-1.9.7 fails to build, at the same point, on PowerPC and PowerPC64 albeit previous versions are built without problems (i.e. less than or equal to 1.9.6). Testing systems are running GNU/Linux CRUX PPC 2.7 (32bit and 64bit) - binutils-2.21, gcc-4.5.2 and glibc-2.12.2 [...] IcedTea is served: /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build mkdir -p stamps touch stamps/icedtea.stamp printf -- '-cacao ERROR\n' >> /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build/j2sdk-image/jre/lib/ppc/jvm.cfg touch stamps/add-cacao.stamp printf -- '-zero ERROR\n' >> /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build/j2sdk-image/jre/lib/ppc/jvm.cfg printf -- '-shark ERROR\n' >> /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build/j2sdk-image/jre/lib/ppc/jvm.cfg touch stamps/add-zero.stamp mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaNPPlugin.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaNPPlugin.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaScriptablePluginObject.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaScriptablePluginObject.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaJavaRequestProcessor.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginRequestProcessor.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginUtils.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginUtils.cc cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ IcedTeaNPPlugin.o IcedTeaScriptablePluginObject.o IcedTeaJavaRequestProcessor.o IcedTeaPluginRequestProcessor.o IcedTeaPluginUtils.o \ -lglib-2.0 \ -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng14 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 \ \ -shared -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPlugin.so if test "xnetscape sun/applet" != x; then \ find /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/java -name '*.java' | sort > liveconnect-source-files.txt ; \ fi touch liveconnect-source-files.txt find /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx -name '*.java' | sort > netx-source-files.txt mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx.build /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -J-Xmx1024m -source 6 -target 6 \ -d /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx.build \ -sourcepath /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx:/mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/generated:openjdk-ecj/jdk/src/share/classes:openjdk-ecj/jdk/src/solaris/classes:openjdk-ecj/langtools/src/share/classes:openjdk-ecj/corba/src/share/classes \ -classpath /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/jre/lib/rt.jar -bootclasspath \'\' \ @netx-source-files.txt openjdk-ecj/jdk/src/share/classes/javax/swing/TransferHandler.java:133: getTransferHandler() is already defined in javax.swing.TransferHandler.HasGetTransferHandler public TransferHandler getTransferHandler(); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 eIcedTea is served: /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build mkdir -p stamps touch stamps/icedtea.stamp printf -- '-cacao ERROR\n' >> /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build/j2sdk-image/jre/lib/ppc/jvm.cfg touch stamps/add-cacao.stamp printf -- '-zero ERROR\n' >> /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build/j2sdk-image/jre/lib/ppc/jvm.cfg printf -- '-shark ERROR\n' >> /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/openjdk.build/j2sdk-image/jre/lib/ppc/jvm.cfg touch stamps/add-zero.stamp mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaNPPlugin.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaNPPlugin.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaScriptablePluginObject.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaScriptablePluginObject.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaJavaRequestProcessor.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaJavaRequestProcessor.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginRequestProcessor.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginRequestProcessor.cc mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ -DJDK_UPDATE_VERSION="\"20\"" \ -DPLUGIN_VERSION="\"IcedTea6 1.9.7 (cruxppc-2.7-ppc)\"" \ -DMOZILLA_VERSION_COLLAPSED="1090213" \ -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include \ -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/pixman-1 -I/usr/include/freetype2 -I/usr/include/libpng14 \ -DXP_UNIX -I/usr/include/xulrunner-1.9.2.13 \ -fPIC -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginUtils.o -c /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPluginUtils.cc cd /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp && \ g++ -O2 -mcpu=powerpc -pipe \ IcedTeaNPPlugin.o IcedTeaScriptablePluginObject.o IcedTeaJavaRequestProcessor.o IcedTeaPluginRequestProcessor.o IcedTeaPluginUtils.o \ -lglib-2.0 \ -pthread -lgtk-x11-2.0 -lgdk-x11-2.0 -latk-1.0 -lgio-2.0 -lpangoft2-1.0 -lpangocairo-1.0 -lgdk_pixbuf-2.0 -lm -lcairo -lpng14 -lpango-1.0 -lfreetype -lfontconfig -lgobject-2.0 -lgmodule-2.0 -lgthread-2.0 -lrt -lglib-2.0 \ \ -shared -o /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/IcedTeaPlugin.so if test "xnetscape sun/applet" != x; then \ find /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/plugin/icedteanp/java -name '*.java' | sort > liveconnect-source-files.txt ; \ fi touch liveconnect-source-files.txt find /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx -name '*.java' | sort > netx-source-files.txt mkdir -p /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx.build /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -J-Xmx1024m -source 6 -target 6 \ -d /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx.build \ -sourcepath /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx:/mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/generated:openjdk-ecj/jdk/src/share/classes:openjdk-ecj/jdk/src/solaris/classes:openjdk-ecj/langtools/src/share/classes:openjdk-ecj/corba/src/share/classes \ -classpath /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/jre/lib/rt.jar -bootclasspath \'\' \ @netx-source-files.txt openjdk-ecj/jdk/src/share/classes/javax/swing/TransferHandler.java:133: getTransferHandler() is already defined in javax.swing.TransferHandler.HasGetTransferHandler public TransferHandler getTransferHandler(); ^ Note: Some input files use or override a deprecated API. Note: Recompile with -Xlint:deprecation for details. Note: Some input files use unchecked or unsafe operations. Note: Recompile with -Xlint:unchecked for details. 1 error make: *** [stamps/netx.stamp] Error 1 full build log: http://cruxppc.org/~acrux/icedtea6-1.9.7-ppc-build.log.gz -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 03:56:55 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 11:56:55 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #1 from mark at klomp.org 2011-02-16 11:56 ------- So this is actually in the netx build part. Maybe TransferHandler.java is somehow included twice through this build command? /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/bin/javac -g -encoding utf-8 -J-Xmx1024m -source 6 -target 6 \ -d /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx.build \ -sourcepath /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/netx:/mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/generated:openjdk-ecj/jdk/src/share/classes:openjdk-ecj/jdk/src/solaris/classes:openjdk-ecj/langtools/src/share/classes:openjdk-ecj/corba/src/share/classes \ -classpath /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/jre/lib/rt.jar -bootclasspath \'\' \ @netx-source-files.txt What does /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/bin/javac point to? Is it a script? If so, what does it expand to? What is the contents of netx-source-files.txt? Does it contain TransferHandler.java? Is TransferHandler.java found multiple times in the source tree? If so where? Does /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/jre/lib/rt.jar contain TransferHandler.class and/or TransferHandler$HasGetTransferHandler.class (or some variant of it)? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Wed Feb 16 04:48:20 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 16 Feb 2011 12:48:20 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 4ae21998a5aa in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4ae21998a5aa author: Andrew John Hughes date: Wed Feb 16 03:05:51 2011 +0000 Security updates from Oracle SSR. S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption S6907662, CVE-2010-4465: Swing timer-based security manager bypass S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries 2011-02-09 Andrew John Hughes * Makefile.am: Add new patches. * NEWS: Updated. * patches/icedtea-nio2.patch: Rejigged. * patches/openjdk/6633275-shaped_translucent_windows.patch, * patches/openjdk/6797195-hw_lw_mixing.patch: Fixed to accomodate appearance of AWTAccessor via security patch. * patches/security/20110215/6878713.patch, * patches/security/20110215/6907662.patch, * patches/security/20110215/6981922.patch, * patches/security/20110215/6983554.patch, * patches/security/20110215/6994263.patch: Security updates from Oracle SSR. changeset 6a5e37e3180b in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6a5e37e3180b author: Andrew John Hughes date: Wed Feb 16 12:48:12 2011 +0000 Add 6985453 patch which was missing from first Oracle bundle. S6985453, CVE-2010-4471: Java2D font-related system property leak 2011-02-10 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6985453.patch: Add patch for 6985453 missing from first Oracle bundle. diffstat: 12 files changed, 2469 insertions(+), 1243 deletions(-) ChangeLog | 24 Makefile.am | 9 NEWS | 6 patches/icedtea-nio2.patch | 159 - patches/openjdk/6633275-shaped_translucent_windows.patch | 1904 ++++++-------- patches/openjdk/6797195-hw_lw_mixing.patch | 307 -- patches/security/20110215/6878713.patch | 143 + patches/security/20110215/6907662.patch | 758 +++++ patches/security/20110215/6981922.patch | 245 + patches/security/20110215/6983554.patch | 20 patches/security/20110215/6985453.patch | 104 patches/security/20110215/6994263.patch | 33 diffs (truncated from 4803 to 500 lines): diff -r 817a086a2135 -r 6a5e37e3180b ChangeLog --- a/ChangeLog Tue Feb 15 22:08:40 2011 +0000 +++ b/ChangeLog Wed Feb 16 12:48:12 2011 +0000 @@ -1,3 +1,27 @@ 2011-02-15 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6985453.patch: + Add patch for 6985453 missing from first Oracle + bundle. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add new patches. + * NEWS: Updated. + * patches/icedtea-nio2.patch: Rejigged. + * patches/openjdk/6633275-shaped_translucent_windows.patch, + * patches/openjdk/6797195-hw_lw_mixing.patch: + Fixed to accomodate appearance of AWTAccessor via + security patch. + * patches/security/20110215/6878713.patch, + * patches/security/20110215/6907662.patch, + * patches/security/20110215/6981922.patch, + * patches/security/20110215/6983554.patch, + * patches/security/20110215/6994263.patch: + Security updates from Oracle SSR. + 2011-02-15 Andrew John Hughes * NEWS: Mention backports of copyright header diff -r 817a086a2135 -r 6a5e37e3180b Makefile.am --- a/Makefile.am Tue Feb 15 22:08:40 2011 +0000 +++ b/Makefile.am Wed Feb 16 12:48:12 2011 +0000 @@ -174,7 +174,14 @@ REWRITER_SRCS = $(abs_top_srcdir)/rewrit ICEDTEA_FSG_PATCHES = -SECURITY_PATCHES = patches/security/20110209/4421494.patch +SECURITY_PATCHES = patches/security/20110209/4421494.patch \ + patches/security/20110215/6878713.patch \ + patches/security/20110215/6907662.patch \ + patches/security/20110215/6981922.patch \ + patches/security/20110215/6983554.patch \ + patches/security/20110215/6994263.patch \ + patches/security/20110215/6985453.patch + ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ diff -r 817a086a2135 -r 6a5e37e3180b NEWS --- a/NEWS Tue Feb 15 22:08:40 2011 +0000 +++ b/NEWS Wed Feb 16 12:48:12 2011 +0000 @@ -17,6 +17,12 @@ New in release 1.10 (2011-XX-XX): * Support for building with HotSpot 20 from its stable tree * Security updates - S4421494, CVE-2010-4476: infinite loop while parsing double literal. + - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption + - S6907662, CVE-2010-4465: Swing timer-based security manager bypass + - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation + - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - S6985453, CVE-2010-4471: Java2D font-related system property leak * Import of OpenJDK6 b21 including upgrade to HotSpot 19 - S6961870: More rebranding fixes for templates/gpl-*-header files - S6976186: Shark build system changes diff -r 817a086a2135 -r 6a5e37e3180b patches/icedtea-nio2.patch --- a/patches/icedtea-nio2.patch Tue Feb 15 22:08:40 2011 +0000 +++ b/patches/icedtea-nio2.patch Wed Feb 16 12:48:12 2011 +0000 @@ -1,6 +1,6 @@ diff -Nru openjdk.orig/jdk/make/common/s diff -Nru openjdk.orig/jdk/make/common/shared/Defs-javadoc.gmk openjdk/jdk/make/common/shared/Defs-javadoc.gmk ---- openjdk.orig/jdk/make/common/shared/Defs-javadoc.gmk 2010-06-10 23:04:50.000000000 +0100 -+++ openjdk/jdk/make/common/shared/Defs-javadoc.gmk 2010-06-11 00:44:42.000000000 +0100 +--- openjdk.orig/jdk/make/common/shared/Defs-javadoc.gmk 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/common/shared/Defs-javadoc.gmk 2011-02-08 23:10:59.370265518 +0000 @@ -41,6 +41,7 @@ TREEAPI_FIRST_COPYRIGHT_YEAR = 2005 JNLP_FIRST_COPYRIGHT_YEAR = 1998 @@ -10,8 +10,8 @@ diff -Nru openjdk.orig/jdk/make/common/s # Oracle name COMPANY_NAME = Oracle and/or its affiliates diff -Nru openjdk.orig/jdk/make/docs/CORE_PKGS.gmk openjdk/jdk/make/docs/CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2010-05-26 09:32:35.000000000 +0100 -+++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/docs/CORE_PKGS.gmk 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/docs/CORE_PKGS.gmk 2011-02-08 23:10:59.374265560 +0000 @@ -36,6 +36,7 @@ sunw.* \ com.sun.* \ @@ -21,8 +21,8 @@ diff -Nru openjdk.orig/jdk/make/docs/COR org.w3c.dom.css \ org.w3c.dom.html \ diff -Nru openjdk.orig/jdk/make/docs/Makefile openjdk/jdk/make/docs/Makefile ---- openjdk.orig/jdk/make/docs/Makefile 2010-06-10 23:04:50.000000000 +0100 -+++ openjdk/jdk/make/docs/Makefile 2010-06-11 00:42:38.000000000 +0100 +--- openjdk.orig/jdk/make/docs/Makefile 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/docs/Makefile 2011-02-08 23:10:59.374265560 +0000 @@ -1076,6 +1076,58 @@ ############################################################# @@ -83,8 +83,8 @@ diff -Nru openjdk.orig/jdk/make/docs/Mak $(DIRECTORY_CACHE): $(ALL_SOURCE_DIRS) diff -Nru openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk openjdk/jdk/make/docs/NON_CORE_PKGS.gmk ---- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2010-06-11 00:14:21.000000000 +0100 -+++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-08 22:57:19.000000000 +0000 ++++ openjdk/jdk/make/docs/NON_CORE_PKGS.gmk 2011-02-08 23:10:59.374265560 +0000 @@ -65,6 +65,16 @@ HTTPSERVER_PKGS = com.sun.net.httpserver \ com.sun.net.httpserver.spi @@ -111,9 +111,9 @@ diff -Nru openjdk.orig/jdk/make/docs/NON $(HTTPSERVER_PKGS) \ $(SMARTCARDIO_PKGS) \ diff -Nru openjdk.orig/jdk/make/java/java/FILES_java.gmk openjdk/jdk/make/java/java/FILES_java.gmk ---- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2010-06-11 00:14:20.000000000 +0100 -+++ openjdk/jdk/make/java/java/FILES_java.gmk 2010-06-11 00:35:39.000000000 +0100 -@@ -517,6 +517,13 @@ +--- openjdk.orig/jdk/make/java/java/FILES_java.gmk 2011-02-08 22:57:17.000000000 +0000 ++++ openjdk/jdk/make/java/java/FILES_java.gmk 2011-02-08 23:10:59.374265560 +0000 +@@ -518,6 +518,13 @@ sun/misc/JavaLangAccess.java \ sun/misc/JavaIOAccess.java \ sun/misc/JavaIODeleteOnExitAccess.java \ @@ -129,8 +129,8 @@ diff -Nru openjdk.orig/jdk/make/java/jav FILES_java = $(JAVA_JAVA_java) diff -Nru openjdk.orig/jdk/make/java/nio/FILES_java.gmk openjdk/jdk/make/java/nio/FILES_java.gmk ---- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2010-06-11 00:14:21.000000000 +0100 -+++ openjdk/jdk/make/java/nio/FILES_java.gmk 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/FILES_java.gmk 2011-02-08 22:57:17.000000000 +0000 ++++ openjdk/jdk/make/java/nio/FILES_java.gmk 2011-02-08 23:10:59.378265602 +0000 @@ -75,12 +75,13 @@ sun/nio/ch/DefaultSelectorProvider.java \ sun/nio/ch/DirectBuffer.java \ @@ -330,8 +330,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio FILES_java = $(FILES_src) $(FILES_gen) diff -Nru openjdk.orig/jdk/make/java/nio/Makefile openjdk/jdk/make/java/nio/Makefile ---- openjdk.orig/jdk/make/java/nio/Makefile 2010-06-11 00:14:21.000000000 +0100 -+++ openjdk/jdk/make/java/nio/Makefile 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/Makefile 2011-02-08 22:57:17.000000000 +0000 ++++ openjdk/jdk/make/java/nio/Makefile 2011-02-08 23:10:59.378265602 +0000 @@ -40,6 +40,11 @@ SNIO_SRC = $(SHARE_SRC)/classes/sun/nio SNIO_GEN = $(GENSRCDIR)/sun/nio @@ -678,8 +678,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio + .PHONY: sources diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-linux openjdk/jdk/make/java/nio/mapfile-linux ---- openjdk.orig/jdk/make/java/nio/mapfile-linux 2010-04-06 17:51:43.000000000 +0100 -+++ openjdk/jdk/make/java/nio/mapfile-linux 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/mapfile-linux 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-linux 2011-02-08 23:10:59.378265602 +0000 @@ -20,6 +20,14 @@ Java_sun_nio_ch_EPollArrayWrapper_interrupt; Java_sun_nio_ch_EPollArrayWrapper_offsetofData; @@ -796,8 +796,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/java/nio/mapfile-solaris openjdk/jdk/make/java/nio/mapfile-solaris ---- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2010-04-06 17:51:43.000000000 +0100 -+++ openjdk/jdk/make/java/nio/mapfile-solaris 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/java/nio/mapfile-solaris 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/java/nio/mapfile-solaris 2011-02-08 23:10:59.378265602 +0000 @@ -73,6 +73,75 @@ Java_sun_nio_ch_ServerSocketChannelImpl_listen; Java_sun_nio_ch_SocketChannelImpl_checkConnect; @@ -875,8 +875,8 @@ diff -Nru openjdk.orig/jdk/make/java/nio local: *; diff -Nru openjdk.orig/jdk/make/mkdemo/Makefile openjdk/jdk/make/mkdemo/Makefile ---- openjdk.orig/jdk/make/mkdemo/Makefile 2010-05-26 09:32:36.000000000 +0100 -+++ openjdk/jdk/make/mkdemo/Makefile 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/mkdemo/Makefile 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/mkdemo/Makefile 2011-02-08 23:10:59.378265602 +0000 @@ -31,7 +31,7 @@ PRODUCT = demos include $(BUILDDIR)/common/Defs.gmk @@ -887,8 +887,8 @@ diff -Nru openjdk.orig/jdk/make/mkdemo/M all build:: nbproject $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/make/mksample/nio/Makefile openjdk/jdk/make/mksample/nio/Makefile ---- openjdk.orig/jdk/make/mksample/nio/Makefile 2010-05-26 09:32:36.000000000 +0100 -+++ openjdk/jdk/make/mksample/nio/Makefile 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/make/mksample/nio/Makefile 2010-06-21 22:15:08.000000000 +0100 ++++ openjdk/jdk/make/mksample/nio/Makefile 2011-02-08 23:10:59.378265602 +0000 @@ -31,7 +31,7 @@ PRODUCT = java include $(BUILDDIR)/common/Defs.gmk @@ -899,8 +899,8 @@ diff -Nru openjdk.orig/jdk/make/mksample $(SUBDIRS-loop) diff -Nru openjdk.orig/jdk/src/share/classes/java/io/File.java openjdk/jdk/src/share/classes/java/io/File.java ---- openjdk.orig/jdk/src/share/classes/java/io/File.java 2010-05-26 09:32:38.000000000 +0100 -+++ openjdk/jdk/src/share/classes/java/io/File.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/java/io/File.java 2010-06-21 22:15:18.000000000 +0100 ++++ openjdk/jdk/src/share/classes/java/io/File.java 2011-02-08 23:10:59.378265602 +0000 @@ -1958,6 +1958,13 @@ } } @@ -916,9 +916,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla diff -Nru openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java openjdk/jdk/src/share/classes/java/net/NetworkInterface.java ---- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2010-05-26 09:32:38.000000000 +0100 -+++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2010-06-11 00:35:39.000000000 +0100 -@@ -533,4 +533,15 @@ +--- openjdk.orig/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-08 22:57:12.000000000 +0000 ++++ openjdk/jdk/src/share/classes/java/net/NetworkInterface.java 2011-02-08 23:10:59.378265602 +0000 +@@ -536,4 +536,15 @@ } private static native void init(); @@ -935,8 +935,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java ---- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2010-05-26 09:32:39.000000000 +0100 -+++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2010-06-21 22:15:21.000000000 +0100 ++++ openjdk/jdk/src/share/classes/java/util/concurrent/ThreadPoolExecutor.java 2011-02-08 23:10:59.378265602 +0000 @@ -2004,4 +2004,23 @@ } } @@ -962,8 +962,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java openjdk/jdk/src/share/classes/sun/misc/Unsafe.java ---- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/misc/Unsafe.java 2010-06-21 22:15:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/misc/Unsafe.java 2011-02-08 23:10:59.378265602 +0000 @@ -504,9 +504,33 @@ /** * Sets all bytes in a given block of memory to a copy of another @@ -1011,9 +1011,9 @@ diff -Nru openjdk.orig/jdk/src/share/cla * Report the scale factor for addressing elements in the storage * allocation of a given array class. However, arrays of "narrow" types diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2010-06-11 00:35:39.000000000 +0100 -@@ -29,10 +29,28 @@ +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-08 22:57:12.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/DatagramChannelImpl.java 2011-02-08 23:40:00.916516539 +0000 +@@ -29,11 +29,30 @@ import java.io.IOException; import java.net.*; import java.nio.ByteBuffer; @@ -1029,6 +1029,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import java.util.Set; + import java.lang.ref.SoftReference; +-import sun.net.ResourceManager; +import org.classpath.icedtea.java.net.ProtocolFamily; +import org.classpath.icedtea.java.net.StandardProtocolFamily; @@ -1041,10 +1042,12 @@ diff -Nru openjdk.orig/jdk/src/share/cla +import org.classpath.icedtea.java.nio.channels.spi.SelectorProvider; + +import org.classpath.icedtea.misc.SharedSecrets; ++ ++import sun.net.ResourceManager; /** * An implementation of DatagramChannels. -@@ -53,6 +71,9 @@ +@@ -54,6 +73,9 @@ // even after the value in the file descriptor object has been set to -1 int fdVal; @@ -1054,7 +1057,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla // IDs of native threads doing reads and writes, for signalling private volatile long readerThread = 0; private volatile long writerThread = 0; -@@ -91,6 +112,9 @@ +@@ -92,6 +114,9 @@ // Our socket adaptor, if any private DatagramSocket socket = null; @@ -1064,27 +1067,29 @@ diff -Nru openjdk.orig/jdk/src/share/cla // -- End of fields protected by stateLock -@@ -98,15 +122,40 @@ - throws IOException - { +@@ -101,6 +126,8 @@ super(sp); -+ this.family = Net.isIPv6Available() ? -+ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; - this.fd = Net.socket(false); - this.fdVal = IOUtil.fdVal(fd); - this.state = ST_UNCONNECTED; + ResourceManager.beforeUdpCreate(); + try { ++ this.family = Net.isIPv6Available() ? ++ StandardProtocolFamily.INET6 : StandardProtocolFamily.INET; + this.fd = Net.socket(false); + this.fdVal = IOUtil.fdVal(fd); + this.state = ST_UNCONNECTED; +@@ -110,10 +137,33 @@ + } } + public DatagramChannelImpl(SelectorProvider sp, ProtocolFamily family) { + super(sp); + if ((family != StandardProtocolFamily.INET) && + (family != StandardProtocolFamily.INET6)) -+ { -+ if (family == null) -+ throw new NullPointerException("'family' is null"); -+ else -+ throw new UnsupportedOperationException("Protocol family not supported"); -+ } ++ { ++ if (family == null) ++ throw new NullPointerException("'family' is null"); ++ else ++ throw new UnsupportedOperationException("Protocol family not supported"); ++ } + if (family == StandardProtocolFamily.INET6) { + if (!Net.isIPv6Available()) { + throw new UnsupportedOperationException("IPv6 not available"); @@ -1105,7 +1110,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla this.fd = fd; this.fdVal = IOUtil.fdVal(fd); this.state = ST_UNCONNECTED; -@@ -499,7 +548,7 @@ +@@ -506,7 +556,7 @@ } } @@ -1114,15 +1119,15 @@ diff -Nru openjdk.orig/jdk/src/share/cla synchronized (readLock) { synchronized (writeLock) { synchronized (stateLock) { -@@ -515,6 +564,7 @@ +@@ -522,6 +572,7 @@ } } } -+ return this; ++ return this; } public boolean isConnected() { -@@ -704,4 +754,350 @@ +@@ -712,4 +763,350 @@ initIDs(); } @@ -1174,7 +1179,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla + throw new IllegalArgumentException("Cannot set IP_MULTICAST_IF to 'null'"); + NetworkInterface interf = (NetworkInterface)value; + if (family == StandardProtocolFamily.INET6) { -+ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); ++ int index = SharedSecrets.getJavaNetGetIndexAccess().getIndex(interf); + if (index == -1) + throw new IOException("Network interface cannot be identified"); + Net.setInterface6(fd, index); @@ -1474,8 +1479,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2010-06-21 22:15:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/FileChannelImpl.java 2011-02-08 23:10:59.378265602 +0000 @@ -32,8 +32,15 @@ import java.io.IOException; import java.nio.ByteBuffer; @@ -1525,8 +1530,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla ensureOpen(); int rv = -1; diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java openjdk/jdk/src/share/classes/sun/nio/ch/Net.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/Net.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/Net.java 2011-02-08 22:57:12.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/Net.java 2011-02-08 23:16:14.657580027 +0000 @@ -30,6 +30,15 @@ import java.net.*; import java.nio.channels.*; @@ -1549,7 +1554,7 @@ diff -Nru openjdk.orig/jdk/src/share/cla + static native boolean isIPv6Available0(); + - static FileDescriptor socket(boolean stream) { + static FileDescriptor socket(boolean stream) throws IOException { - return IOUtil.newFD(socket0(stream, false)); + return socket(UNSPEC, stream); + } @@ -1887,8 +1892,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + } diff -Nru openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java ---- openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2010-05-26 09:32:41.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2010-06-21 22:15:30.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/nio/ch/SelectorProviderImpl.java 2011-02-08 23:10:59.378265602 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2000, 2001, Oracle and/or its affiliates. All rights reserved. @@ -1935,8 +1940,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla - } diff -Nru openjdk.orig/jdk/src/share/classes/sun/security/util/SecurityConstants.java openjdk/jdk/src/share/classes/sun/security/util/SecurityConstants.java ---- openjdk.orig/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2010-05-26 09:32:42.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2010-06-21 22:15:35.000000000 +0100 ++++ openjdk/jdk/src/share/classes/sun/security/util/SecurityConstants.java 2011-02-08 23:10:59.378265602 +0000 @@ -52,6 +52,7 @@ public static final String FILE_EXECUTE_ACTION = "execute"; public static final String FILE_READ_ACTION = "read"; @@ -1946,8 +1951,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla public static final String SOCKET_RESOLVE_ACTION = "resolve"; public static final String SOCKET_CONNECT_ACTION = "connect"; diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java ---- openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2010-05-26 09:32:51.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2010-06-21 22:15:44.000000000 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/nio/ch/DefaultSelectorProvider.java 2011-02-08 23:10:59.378265602 +0000 @@ -25,11 +25,12 @@ package sun.nio.ch; @@ -1963,8 +1968,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/c * Creates this platform's default SelectorProvider */ diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java openjdk/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java ---- openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java 2010-05-26 09:32:51.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java 2010-06-21 22:15:44.000000000 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/nio/ch/FileDispatcher.java 2011-02-08 23:10:59.378265602 +0000 @@ -35,6 +35,11 @@ class FileDispatcher extends NativeDispatcher { @@ -2026,8 +2031,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/c + } diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java openjdk/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java ---- openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java 2010-05-26 09:32:51.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java 2010-06-21 22:15:44.000000000 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/nio/ch/InheritedChannel.java 2011-02-08 23:10:59.382265644 +0000 @@ -34,7 +34,8 @@ import java.nio.channels.SocketChannel; import java.nio.channels.ServerSocketChannel; @@ -2039,8 +2044,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/c class InheritedChannel { diff -Nru openjdk.orig/jdk/src/solaris/native/sun/nio/ch/Net.c openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c ---- openjdk.orig/jdk/src/solaris/native/sun/nio/ch/Net.c 2010-05-26 09:32:51.000000000 +0100 -+++ openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/solaris/native/sun/nio/ch/Net.c 2010-06-21 22:15:45.000000000 +0100 ++++ openjdk/jdk/src/solaris/native/sun/nio/ch/Net.c 2011-02-08 23:10:59.382265644 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2007, Oracle and/or its affiliates. All rights reserved. @@ -2723,8 +2728,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/n /* Declared in nio_util.h */ diff -Nru openjdk.orig/jdk/src/solaris/native/sun/nio/ch/nio_util.h openjdk/jdk/src/solaris/native/sun/nio/ch/nio_util.h ---- openjdk.orig/jdk/src/solaris/native/sun/nio/ch/nio_util.h 2010-05-26 09:32:51.000000000 +0100 -+++ openjdk/jdk/src/solaris/native/sun/nio/ch/nio_util.h 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/solaris/native/sun/nio/ch/nio_util.h 2010-06-21 22:15:45.000000000 +0100 ++++ openjdk/jdk/src/solaris/native/sun/nio/ch/nio_util.h 2011-02-08 23:10:59.382265644 +0000 @@ -1,5 +1,5 @@ /* - * Copyright (c) 2001, 2002, Oracle and/or its affiliates. All rights reserved. @@ -2749,8 +2754,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/n /* NIO utility procedures */ diff -Nru openjdk.orig/jdk/src/windows/classes/sun/nio/ch/FileDispatcher.java openjdk/jdk/src/windows/classes/sun/nio/ch/FileDispatcher.java ---- openjdk.orig/jdk/src/windows/classes/sun/nio/ch/FileDispatcher.java 2010-05-26 09:32:51.000000000 +0100 -+++ openjdk/jdk/src/windows/classes/sun/nio/ch/FileDispatcher.java 2010-06-11 00:35:39.000000000 +0100 +--- openjdk.orig/jdk/src/windows/classes/sun/nio/ch/FileDispatcher.java 2010-06-21 22:15:46.000000000 +0100 ++++ openjdk/jdk/src/windows/classes/sun/nio/ch/FileDispatcher.java 2011-02-08 23:10:59.382265644 +0000 @@ -36,6 +36,11 @@ class FileDispatcher extends NativeDispatcher { diff -r 817a086a2135 -r 6a5e37e3180b patches/openjdk/6633275-shaped_translucent_windows.patch --- a/patches/openjdk/6633275-shaped_translucent_windows.patch Tue Feb 15 22:08:40 2011 +0000 +++ b/patches/openjdk/6633275-shaped_translucent_windows.patch Wed Feb 16 12:48:12 2011 +0000 @@ -1,6 +1,6 @@ diff -r 6cf33f955d7d make/sun/awt/FILES_ -diff -r 6cf33f955d7d make/sun/awt/FILES_c_windows.gmk ---- openjdk/jdk/make/sun/awt/FILES_c_windows.gmk Fri Feb 04 16:32:49 2011 +0000 -+++ openjdk/jdk/make/sun/awt/FILES_c_windows.gmk Tue Feb 15 15:12:57 2011 +0000 +diff -Nru openjdk.orig/jdk/make/sun/awt/FILES_c_windows.gmk openjdk/jdk/make/sun/awt/FILES_c_windows.gmk +--- openjdk.orig/jdk/make/sun/awt/FILES_c_windows.gmk 2011-02-16 00:40:21.000000000 +0000 ++++ openjdk/jdk/make/sun/awt/FILES_c_windows.gmk 2011-02-16 01:27:24.988327481 +0000 @@ -1,5 +1,5 @@ # -# Copyright (c) 1997, 2008, Oracle and/or its affiliates. All rights reserved. @@ -18,9 +18,97 @@ diff -r 6cf33f955d7d make/sun/awt/FILES_ FILES_cpp = \ CmdIDList.cpp \ -diff -r 6cf33f955d7d make/sun/awt/Makefile ---- openjdk/jdk/make/sun/awt/Makefile Fri Feb 04 16:32:49 2011 +0000 -+++ openjdk/jdk/make/sun/awt/Makefile Tue Feb 15 15:12:57 2011 +0000 From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 05:20:09 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 13:20:09 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #2 from gnu_andrew at member.fsf.org 2011-02-16 13:20 ------- You don't specify how you configuring the build. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 05:20:25 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 13:20:25 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 05:38:27 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 13:38:27 +0000 Subject: [Bug 632] New: patches/security/20110215/6878713.patch breaks zero build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=632 Summary: patches/security/20110215/6878713.patch breaks zero build Product: IcedTea Version: unspecified Platform: all URL: http://builder.classpath.org/icedtea/buildbot/builders/i cedtea6-squeeze-x86_64- quick/builds/25/steps/compile/logs/stdio OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Zero AssignedTo: unassigned at icedtea.classpath.org ReportedBy: mark at klomp.org patches/security/20110215/6878713.patch introduces #define __STDC_LIMIT_MACROS which the zero build already uses as gcc command line define. Causing the following build failure: make[8]: Leaving directory `/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk.build/hotspot/outputdir/linux_amd64_shark/product' make[8]: Entering directory `/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk.build/hotspot/outputdir/linux_amd64_shark/product' echo Generating precompiled header incls/_precompiled.incl.gch Generating precompiled header incls/_precompiled.incl.gch mkdir -p ./incls g++ -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DAMD64 -DZERO_LIBARCH=\"amd64\" -DPRODUCT -I. -I../generated/adfiles -I../generated/jvmtifiles -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/asm -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/c1 -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/ci -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/classfile -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/code -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/compiler -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/gc_implementation -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/gc_implementation/parNew -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/gc_implementation/concurrentMarkSweep -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/gc_implementation/parallelScavenge -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/gc_implementation/g1 -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/gc_implementation/shared -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/gc_interface -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/interpreter -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/memory -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/oops -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/prims -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/runtime -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/services -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/shark -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/utilities -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/cpu/zero/vm -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/os/linux/vm -I/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/os_cpu/linux_zero/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"19.0-b09\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"buildslave\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DJRE_RELEASE_VERSION="\"1.6.0_21-b21\"" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DDERIVATIVE_ID="\"IcedTea6 1.10pre+r6a5e37e3180b\"" -DDISTRIBUTION_ID="\"Built on Debian GNU/Linux 6.0 (squeeze) (Wed Feb 16 13:30:49 UTC 2011)\"" -DSHARK -I/usr/lib/llvm-2.7/include -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DSHARK_LLVM_VERSION=27 -fpic -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -m64 -pipe -g -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -Werror -Wpointer-arith -Wsign-compare -c -x c++-header -c ../generated/incls/_precompiled.incl -o incls/_precompiled.incl.gch In file included from ../generated/incls/_precompiled.incl:2: /usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp:75:1: error: "__STDC_LIMIT_MACROS" redefined : error: this is the location of the previous definition make[8]: Leaving directory `/usr/local/build/buildslave/icedtea/icedtea6-quick/build/zerovm/openjdk.build/hotspot/outputdir/linux_amd64_shark/product' make[8]: *** [incls/_precompiled.incl.gch] Error 1 Full build logs at http://builder.classpath.org/icedtea/buildbot/builders/icedtea6-squeeze-x86_64-quick/builds/25 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 05:45:48 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 13:45:48 +0000 Subject: [Bug 632] patches/security/20110215/6878713.patch breaks zero build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=632 ------- Comment #1 from mark at klomp.org 2011-02-16 13:45 ------- Easiest solution is probably to embed the redefinition of __STDC_LIMIT_MACROS that the patch introduces in openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp with #ifndef __STDC_LIMIT_MACROS #define __STDC_LIMIT_MACROS #endif -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 06:41:07 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 14:41:07 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #3 from acrux at linuxmail.org 2011-02-16 14:41 ------- (In reply to comment #1) > > What does > /mnt/DEVEL/icedtea6/work/src/icedtea6-1.9.7/bootstrap/jdk1.6.0/bin/javac point > to? Is it a script? If so, what does it expand to? > it's only the path where icedtea6 is built, it alway worked for previus release. For test, i succesfully built just now icedtea6-1.9.6 Anyway i located that something is wrong in JavaWebStart code shipped with 1.9.7 sources because with '--disable-plugin --disable-webstart' it compiles fine. And icedtea-web-1.0.1 compiles fine too. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 06:48:08 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 14:48:08 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #4 from acrux at linuxmail.org 2011-02-16 14:48 ------- (In reply to comment #2) > You don't specify how you configuring the build. > well, sorry. It was readable from the full build log (i attached an url). Here you can fine the full build script i used for: http://cruxppc.org/viewvc/opt/branches/2.7/icedtea6/Pkgfile?revision=2252&view=markup Anyway it seems the today the best practice is to compile icedtea6 with the external icedtea-web and i can say it does compile and work well on both ppc and ppc64. I just now tried icedtea6-1.9.7 (--enable-zero --disable-plugin --disable-webstart) and icedtea-web-1.0.1 . -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Wed Feb 16 06:53:00 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 16 Feb 2011 14:53:00 +0000 Subject: /hg/icedtea6: S6927050, CVE-2010-4470: JAXP untrusted component ... Message-ID: changeset 3f592b76892a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3f592b76892a author: Andrew John Hughes date: Wed Feb 16 14:52:54 2011 +0000 S6927050, CVE-2010-4470: JAXP untrusted component state manipulation Add patch finally supplied in third Oracle bundle. 2011-02-11 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6927050.patch, Add patch for 6927050 missing from first two Oracle bundles. diffstat: 16 files changed, 233 insertions(+), 1 deletion(-) / | 11 ++ AbstractXMLSchema | 2 ChangeLog | 8 + Makefile.am | 3 NEWS | 1 addRecognizedParamsAndSetDefaults(fSchemaValidator, | 1 fComponents.put(SECURITY_MANAGER, | 28 ++++++ fConfigUpdated | 3 final | 4 patches/security/20110215/6927050.patch | 33 +++++++ private | 4 public | 20 ++++ return | 12 ++ schema | 8 + setFeatureDefaults(component, | 15 +++ } | 81 +++++++++++++++++++ diffs (374 lines): diff -r 6a5e37e3180b -r 3f592b76892a ChangeLog --- a/ChangeLog Wed Feb 16 12:48:12 2011 +0000 +++ b/ChangeLog Wed Feb 16 14:52:54 2011 +0000 @@ -1,3 +1,11 @@ 2011-02-10 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6927050.patch, + Add patch for 6927050 missing from first two + Oracle bundles. + 2011-02-10 Andrew John Hughes * Makefile.am: Add additional patch. diff -r 6a5e37e3180b -r 3f592b76892a Makefile.am --- a/Makefile.am Wed Feb 16 12:48:12 2011 +0000 +++ b/Makefile.am Wed Feb 16 14:52:54 2011 +0000 @@ -180,7 +180,8 @@ SECURITY_PATCHES = patches/security/2011 patches/security/20110215/6981922.patch \ patches/security/20110215/6983554.patch \ patches/security/20110215/6994263.patch \ - patches/security/20110215/6985453.patch + patches/security/20110215/6985453.patch \ + patches/security/20110215/6927050.patch ICEDTEA_PATCHES = \ diff -r 6a5e37e3180b -r 3f592b76892a NEWS --- a/NEWS Wed Feb 16 12:48:12 2011 +0000 +++ b/NEWS Wed Feb 16 14:52:54 2011 +0000 @@ -23,6 +23,7 @@ New in release 1.10 (2011-XX-XX): - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries - S6985453, CVE-2010-4471: Java2D font-related system property leak + - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation * Import of OpenJDK6 b21 including upgrade to HotSpot 19 - S6961870: More rebranding fixes for templates/gpl-*-header files - S6976186: Shark build system changes diff -r 6a5e37e3180b -r 3f592b76892a patches/security/20110215/6927050.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/security/20110215/6927050.patch Wed Feb 16 14:52:54 2011 +0000 @@ -0,0 +1,331 @@ +diff -Nru jaxp.orig/build.properties jaxp/build.properties +--- openjdk.orig/jaxp/build.properties 2010-02-17 03:11:24.000000000 +0000 ++++ openjdk/jaxp/build.properties 2011-02-11 16:56:51.000000000 +0000 +@@ -77,6 +77,9 @@ + # Where patches to drop bundle sources live + patches.dir=patches + ++# Patches to apply ++jaxp_src.patch.list=6927050.patch ++ + # Sanity information + sanity.info= Sanity Settings:${line.separator}\ + ant.home=${ant.home}${line.separator}\ +diff -Nru jaxp.orig/patches/jaxp_src/6927050.patch jaxp/patches/jaxp_src/6927050.patch +--- openjdk.orig/jaxp/patches/jaxp_src/6927050.patch 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jaxp/patches/jaxp_src/6927050.patch 2011-02-11 16:54:43.000000000 +0000 +@@ -0,0 +1,314 @@ ++diff -Nruw src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java ++--- src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java 2010-08-26 22:50:55.000000000 +0100 +++++ src/com/sun/org/apache/xerces/internal/jaxp/validation/AbstractXMLSchema.java 2011-02-16 13:26:37.183169937 +0000 ++@@ -20,6 +20,8 @@ ++ ++ package com.sun.org.apache.xerces.internal.jaxp.validation; ++ +++import java.util.HashMap; +++ ++ import javax.xml.validation.Schema; ++ import javax.xml.validation.Validator; ++ import javax.xml.validation.ValidatorHandler; ++@@ -32,6 +34,16 @@ ++ abstract class AbstractXMLSchema extends Schema implements ++ XSGrammarPoolContainer { ++ +++ /** +++ * Map containing the initial values of features for +++ * validators created using this grammar pool container. +++ */ +++ private final HashMap fFeatures; +++ +++ public AbstractXMLSchema() { +++ fFeatures = new HashMap(); +++ } +++ ++ /* ++ * Schema methods ++ */ ++@@ -50,4 +62,26 @@ ++ return new ValidatorHandlerImpl(this); ++ } ++ +++ /* +++ * XSGrammarPoolContainer methods +++ */ +++ +++ /** +++ * Returns the initial value of a feature for validators created +++ * using this grammar pool container or null if the validators +++ * should use the default value. +++ */ +++ public final Boolean getFeature(String featureId) { +++ return fFeatures.get(featureId); +++ } +++ +++ /* +++ * Other methods +++ */ +++ +++ final void setFeature(String featureId, boolean state) { +++ fFeatures.put(featureId, state ? Boolean.TRUE : Boolean.FALSE); +++ } +++ +++ ++ } // AbstractXMLSchema ++diff -Nruw src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java src/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java ++--- src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java 2010-08-26 22:50:55.000000000 +0100 +++++ src/com/sun/org/apache/xerces/internal/jaxp/validation/EmptyXMLSchema.java 2011-02-16 13:26:37.187169628 +0000 ++@@ -32,17 +32,10 @@ ++ */ ++ final class EmptyXMLSchema extends AbstractXMLSchema implements XMLGrammarPool { ++ ++- private static EmptyXMLSchema EMPTY_XML_SCHEMA_INSTANCE = new EmptyXMLSchema(); ++- ++ /** Zero length grammar array. */ ++ private static final Grammar [] ZERO_LENGTH_GRAMMAR_ARRAY = new Grammar [0]; ++ ++- /** Returns the one and only instance of this class. */ ++- public static EmptyXMLSchema getInstance() { ++- return EMPTY_XML_SCHEMA_INSTANCE; ++- } ++- ++- private EmptyXMLSchema() {} +++ public EmptyXMLSchema() {} ++ ++ /* ++ * XMLGrammarPool methods ++diff -Nruw src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java ++--- src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2010-08-27 21:13:40.000000000 +0100 +++++ src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaFactory.java 2011-02-16 13:28:55.108485839 +0000 ++@@ -228,21 +228,26 @@ ++ ++ // Select Schema implementation based on grammar count. ++ final int grammarCount = pool.getGrammarCount(); +++ AbstractXMLSchema schema = null; ++ if (grammarCount > 1) { ++- return new XMLSchema(new ReadOnlyGrammarPool(pool)); +++ schema = new XMLSchema(new ReadOnlyGrammarPool(pool)); ++ } ++ else if (grammarCount == 1) { ++ Grammar[] grammars = pool.retrieveInitialGrammarSet(XMLGrammarDescription.XML_SCHEMA); ++- return new SimpleXMLSchema(grammars[0]); +++ schema = new SimpleXMLSchema(grammars[0]); ++ } ++ else { ++- return EmptyXMLSchema.getInstance(); +++ schema = new EmptyXMLSchema(); ++ } +++ propagateFeatures(schema); +++ return schema; ++ } ++ ++ public Schema newSchema() throws SAXException { ++ // Use a Schema that uses the system id as the equality source. ++- return new WeakReferenceXMLSchema(); +++ AbstractXMLSchema schema = new WeakReferenceXMLSchema(); +++ propagateFeatures(schema); +++ return schema; ++ } ++ ++ public boolean getFeature(String name) ++@@ -372,6 +377,15 @@ ++ } ++ } ++ +++ private void propagateFeatures(AbstractXMLSchema schema) { +++ schema.setFeature(XMLConstants.FEATURE_SECURE_PROCESSING, fSecurityManager != null); +++ String[] features = fXMLSchemaLoader.getRecognizedFeatures(); +++ for (int i = 0; i < features.length; ++i) { +++ boolean state = fXMLSchemaLoader.getFeature(features[i]); +++ schema.setFeature(features[i], state); +++ } +++ } +++ ++ /** ++ * Extension of XMLGrammarPoolImpl which exposes the number of ++ * grammars stored in the grammar pool. ++diff -Nruw src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java ++--- src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2010-08-27 21:13:39.000000000 +0100 +++++ src/com/sun/org/apache/xerces/internal/jaxp/validation/XMLSchemaValidatorComponentManager.java 2011-02-16 13:37:55.778587505 +0000 ++@@ -21,6 +21,8 @@ ++ package com.sun.org.apache.xerces.internal.jaxp.validation; ++ ++ import java.util.HashMap; +++import java.util.Iterator; +++import java.util.Map; ++ import java.util.Locale; ++ ++ import javax.xml.XMLConstants; ++@@ -161,6 +163,19 @@ ++ private ValidationManager fValidationManager; ++ ++ // +++ // Configuration +++ // +++ +++ /** Stores initial feature values for validator reset. */ +++ private final HashMap fInitFeatures = new HashMap(); +++ +++ /** Stores initial property values for validator reset. */ +++ private final HashMap fInitProperties = new HashMap(); +++ +++ /** Stores the initial security manager. */ +++ private final SecurityManager fInitSecurityManager; +++ +++ // ++ // User Objects ++ // ++ ++@@ -211,9 +226,20 @@ ++ fErrorReporter.putMessageFormatter(XSMessageFormatter.SCHEMA_DOMAIN, new XSMessageFormatter()); ++ ++ // add all recognized features and properties and apply their defaults ++- addRecognizedParamsAndSetDefaults(fEntityManager); ++- addRecognizedParamsAndSetDefaults(fErrorReporter); ++- addRecognizedParamsAndSetDefaults(fSchemaValidator); +++ addRecognizedParamsAndSetDefaults(fEntityManager, grammarContainer); +++ addRecognizedParamsAndSetDefaults(fErrorReporter, grammarContainer); +++ addRecognizedParamsAndSetDefaults(fSchemaValidator, grammarContainer); +++ +++ // if the secure processing feature is set to true, add a security manager to the configuration +++ Boolean secureProcessing = grammarContainer.getFeature(XMLConstants.FEATURE_SECURE_PROCESSING); +++ if (Boolean.TRUE.equals(secureProcessing)) { +++ fInitSecurityManager = new SecurityManager(); +++ } +++ else { +++ fInitSecurityManager = null; +++ } +++ fComponents.put(SECURITY_MANAGER, fInitSecurityManager); +++ ++ } ++ ++ /** ++@@ -266,7 +292,6 @@ ++ else if (USE_GRAMMAR_POOL_ONLY.equals(featureId) && value != fUseGrammarPoolOnly) { ++ throw new XMLConfigurationException(XMLConfigurationException.NOT_SUPPORTED, featureId); ++ } ++- fConfigUpdated = true; ++ if (XMLConstants.FEATURE_SECURE_PROCESSING.equals(featureId)) { ++ if (_isSecureMode && !value) { ++ throw new XMLConfigurationException(XMLConfigurationException.NOT_ALLOWED, XMLConstants.FEATURE_SECURE_PROCESSING); ++@@ -274,9 +299,14 @@ ++ setProperty(SECURITY_MANAGER, value ? new SecurityManager() : null); ++ return; ++ } +++ fConfigUpdated = true; ++ fEntityManager.setFeature(featureId, value); ++ fErrorReporter.setFeature(featureId, value); ++ fSchemaValidator.setFeature(featureId, value); +++ if (!fInitFeatures.containsKey(featureId)) { +++ boolean current = super.getFeature(featureId); +++ fInitFeatures.put(featureId, current ? Boolean.TRUE : Boolean.FALSE); +++ } ++ super.setFeature(featureId, value); ++ } ++ ++@@ -336,6 +366,9 @@ ++ fComponents.put(propertyId, value); ++ return; ++ } +++ if (!fInitProperties.containsKey(propertyId)) { +++ fInitProperties.put(propertyId, super.getProperty(propertyId)); +++ } ++ super.setProperty(propertyId, value); ++ } ++ ++@@ -348,7 +381,7 @@ ++ * @param component The component whose recognized features ++ * and properties will be added to the configuration ++ */ ++- public void addRecognizedParamsAndSetDefaults(XMLComponent component) { +++ public void addRecognizedParamsAndSetDefaults(XMLComponent component, XSGrammarPoolContainer grammarContainer) { ++ ++ // register component's recognized features ++ final String[] recognizedFeatures = component.getRecognizedFeatures(); ++@@ -359,7 +392,7 @@ ++ addRecognizedProperties(recognizedProperties); ++ ++ // set default values ++- setFeatureDefaults(component, recognizedFeatures); +++ setFeatureDefaults(component, recognizedFeatures, grammarContainer); ++ setPropertyDefaults(component, recognizedProperties); ++ } ++ ++@@ -406,33 +439,50 @@ ++ void restoreInitialState() { ++ fConfigUpdated = true; ++ ++- // Clear feature and property tables. ++- fFeatures.clear(); ++- fProperties.clear(); ++- ++ // Remove error resolver and error handler ++ fComponents.put(ENTITY_RESOLVER, null); ++ fComponents.put(ERROR_HANDLER, null); ++ +++ // Restore initial security manager +++ fComponents.put(SECURITY_MANAGER, fInitSecurityManager); +++ ++ // Set the Locale back to null. ++ setLocale(null); ++ fComponents.put(LOCALE, null); ++ ++- // Restore component defaults. ++- setFeatureDefaults(fEntityManager, fEntityManager.getRecognizedFeatures()); ++- setPropertyDefaults(fEntityManager, fEntityManager.getRecognizedProperties()); ++- setFeatureDefaults(fErrorReporter, fErrorReporter.getRecognizedFeatures()); ++- setPropertyDefaults(fErrorReporter, fErrorReporter.getRecognizedProperties()); ++- setFeatureDefaults(fSchemaValidator, fSchemaValidator.getRecognizedFeatures()); ++- setPropertyDefaults(fSchemaValidator, fSchemaValidator.getRecognizedProperties()); +++ // Reset feature and property values to their initial values +++ if (!fInitFeatures.isEmpty()) { +++ Iterator> iter = fInitFeatures.entrySet().iterator(); +++ while (iter.hasNext()) { +++ Map.Entry entry = iter.next(); +++ String name = entry.getKey(); +++ boolean value = entry.getValue().booleanValue(); +++ super.setFeature(name, value); +++ } +++ fInitFeatures.clear(); +++ } +++ if (!fInitProperties.isEmpty()) { +++ Iterator> iter = fInitProperties.entrySet().iterator(); +++ while (iter.hasNext()) { +++ Map.Entry entry = iter.next(); +++ String name = entry.getKey(); +++ Object value = entry.getValue(); +++ super.setProperty(name, value); +++ } +++ fInitProperties.clear(); +++ } ++ } ++ ++ /** Sets feature defaults for the given component on this configuration. */ ++- private void setFeatureDefaults(final XMLComponent component, final String [] recognizedFeatures) { +++ private void setFeatureDefaults(final XMLComponent component, +++ final String [] recognizedFeatures, XSGrammarPoolContainer grammarContainer) { ++ if (recognizedFeatures != null) { ++ for (int i = 0; i < recognizedFeatures.length; ++i) { ++ String featureId = recognizedFeatures[i]; ++- Boolean state = component.getFeatureDefault(featureId); +++ Boolean state = grammarContainer.getFeature(featureId); +++ if (state == null) { +++ state = component.getFeatureDefault(featureId); +++ } ++ if (state != null) { ++ // Do not overwrite values already set on the configuration. ++ if (!fFeatures.containsKey(featureId)) { ++diff -Nruw src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java ++--- src.orig/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java 2010-08-26 22:50:55.000000000 +0100 +++++ src/com/sun/org/apache/xerces/internal/jaxp/validation/XSGrammarPoolContainer.java 2011-02-16 13:26:37.187169628 +0000 ++@@ -47,4 +47,11 @@ ++ */ ++ public boolean isFullyComposed(); ++ +++ /** +++ * Returns the initial value of a feature for validators created +++ * using this grammar pool container or null if the validators +++ * should use the default value. +++ */ +++ public Boolean getFeature(String featureId); +++ ++ } From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 06:55:32 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 14:55:32 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 caster at gentoo.org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major ------- Comment #5 from caster at gentoo.org 2011-02-16 14:55 ------- This fails (with the same error message) on gentoo amd64, where /usr/lib64/icedtea6 contains the version 1.9.6: ./configure --prefix=/usr --build=x86_64-pc-linux-gnu --host=x86_64-pc-linux-gnu --mandir=/usr/share/man --infodir=/usr/share/info --datadir=/usr/share --sysconfdir=/etc --localstatedir=/var/lib --libdir=/usr/lib64 --with-openjdk=/usr/lib64/icedtea6 --with-parallel-jobs=8 --disable-zero --with-hotspot-build=hs19 --with-openjdk-src-zip=/var/tmp/portage/dev-java/icedtea-6.1.9.7/distdir/openjdk-6-src-b20-21_jun_2010.tar.gz --with-hotspot-src-zip=/var/tmp/portage/dev-java/icedtea-6.1.9.7/distdir/13edc857b967.tar.gz --with-jaxp-drop-zip=/var/tmp/portage/dev-java/icedtea-6.1.9.7/distdir/jdk6-jaxp-b20.zip --with-jaxws-drop-zip=/var/tmp/portage/dev-java/icedtea-6.1.9.7/distdir/jdk6-jaxws-b20.zip --with-jaf-drop-zip=/var/tmp/portage/dev-java/icedtea-6.1.9.7/distdir/jdk6-jaf-b20.zip --with-cacao-src-zip=/var/tmp/portage/dev-java/icedtea-6.1.9.7/distdir/e321b101a9ee.tar.bz2 --with-java=/usr/lib64/jvm/icedtea6/bin/java --with-javac=/usr/lib64/jvm/icedtea6/bin/javac --with-javah=/usr/lib64/jvm/icedtea6/bin/javah --with-abs-install-dir=/usr/lib64/icedtea6 --enable-optimizations --enable-docs --enable-plugin --without-rhino --disable-cacao --disable-pulse-java --enable-xrender --disable-systemtap --disable-nio2 --disable-nss --enable-webstart It also fails when rebuilding 1.9.7 with 1.9.7. The workaround is either to bootstrap using gcj, or disable webstart+nsplugin. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 07:52:53 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 15:52:53 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #6 from a.radke at arcor.de 2011-02-16 15:52 ------- Build breaks here on ArchLinux x86_64 the same way. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Wed Feb 16 08:51:19 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 16 Feb 2011 16:51:19 +0000 Subject: /hg/icedtea6: Update NEWS with new releases: 1.7.9, 1.7.10, 1.8.... Message-ID: changeset b58a717c532c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=b58a717c532c author: Andrew John Hughes date: Wed Feb 16 16:51:12 2011 +0000 Update NEWS with new releases: 1.7.9, 1.7.10, 1.8.6, 1.8.7, 1.9.6, 1.9.7. 2011-02-16 Andrew John Hughes * NEWS: Include new releases: 1.7.9, 1.7.10, 1.8.6, 1.8.7, 1.9.6, 1.9.7. diffstat: 2 files changed, 65 insertions(+), 10 deletions(-) ChangeLog | 5 ++++ NEWS | 70 ++++++++++++++++++++++++++++++++++++++++++++++++++++--------- diffs (100 lines): diff -r 3f592b76892a -r b58a717c532c ChangeLog --- a/ChangeLog Wed Feb 16 14:52:54 2011 +0000 +++ b/ChangeLog Wed Feb 16 16:51:12 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-11 Andrew John Hughes + + * NEWS: Include new releases: + 1.7.9, 1.7.10, 1.8.6, 1.8.7, 1.9.6, 1.9.7. + 2011-02-11 Andrew John Hughes * Makefile.am: Add additional patch. diff -r 3f592b76892a -r b58a717c532c NEWS --- a/NEWS Wed Feb 16 14:52:54 2011 +0000 +++ b/NEWS Wed Feb 16 16:51:12 2011 +0000 @@ -15,15 +15,6 @@ New in release 1.10 (2011-XX-XX): * Shark provided upstream rather than as part of IcedTea. * The option --with-openjdk becomes --with-jdk-home and --disable-bootstrap * Support for building with HotSpot 20 from its stable tree -* Security updates - - S4421494, CVE-2010-4476: infinite loop while parsing double literal. - - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption - - S6907662, CVE-2010-4465: Swing timer-based security manager bypass - - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation - - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets - - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries - - S6985453, CVE-2010-4471: Java2D font-related system property leak - - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation * Import of OpenJDK6 b21 including upgrade to HotSpot 19 - S6961870: More rebranding fixes for templates/gpl-*-header files - S6976186: Shark build system changes @@ -429,8 +420,67 @@ New in release 1.10 (2011-XX-XX): * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc - - RH676659: Pass -export-dynamic flag to linker using -Wl as option is broken in gcc 4.6+ + +New in release 1.9.7 (2011-02-15): + +* Security updates + - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption + - S6907662, CVE-2010-4465: Swing timer-based security manager bypass + - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation + - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - S6985453, CVE-2010-4471: Java2D font-related system property leak + - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation + - RH677332, CVE-2011-0706: Multiple signers privilege escalation +* Bug fixes + - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken - G344659: Fix issue when building on SPARC + - Fix latent JAXP bug caused by missing import + +New in release 1.8.7 (2011-02-15): + +* Security updates + - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption + - S6907662, CVE-2010-4465: Swing timer-based security manager bypass + - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation + - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - S6985453, CVE-2010-4471: Java2D font-related system property leak + - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation + - RH677332, CVE-2011-0706: Multiple signers privilege escalation +* Bug fixes + - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken + - Fix latent JAXP bug caused by missing import + +New in release 1.7.10 (2011-02-15): + +* Security updates + - S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption + - S6907662, CVE-2010-4465: Swing timer-based security manager bypass + - S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation + - S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets + - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries + - S6985453, CVE-2010-4471: Java2D font-related system property leak + - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation + - RH677332, CVE-2011-0706: Multiple signers privilege escalation +* Bug fixes + - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken + - Fix latent JAXP bug caused by missing import + +New in release 1.9.6 (2011-02-09): + +* Security updates + - S4421494, CVE-2010-4476: infinite loop while parsing double literal. + +New in release 1.8.6 (2011-02-09): + +* Security updates + - S4421494, CVE-2010-4476: infinite loop while parsing double literal. + +New in release 1.7.9 (2011-02-09): + +* Security updates + - S4421494, CVE-2010-4476: infinite loop while parsing double literal. New in release 1.9.5 (2011-02-01): From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 09:10:25 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 17:10:25 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Status|NEW |RESOLVED Resolution| |INVALID ------- Comment #7 from gnu_andrew at member.fsf.org 2011-02-16 17:10 ------- So not a bug; it builds fine with the right options. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 09:12:27 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 17:12:27 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Version|unspecified |6-1.9.7 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 09:52:07 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 17:52:07 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 a.radke at arcor.de changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |major Version|6-1.9.7 |unspecified ------- Comment #8 from a.radke at arcor.de 2011-02-16 17:52 ------- Sorry, from the NEWS file I cannot see what bad configure option now breaks the build that worked until the last release. If you know it why don't you tell us? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 09:56:36 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 17:56:36 +0000 Subject: [Bug 632] patches/security/20110215/6878713.patch breaks zero build Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=632 xerxes at zafena.se changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|xerxes at zafena.se |.org | Status|NEW |ASSIGNED ------- Comment #2 from xerxes at zafena.se 2011-02-16 17:56 ------- Created an attachment (id=459) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=459&action=view) pr632.patch I made a patch out of the proposed fix, thank you mjw! -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 10:13:46 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 18:13:46 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 mark at klomp.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|INVALID | ------- Comment #9 from mark at klomp.org 2011-02-16 18:13 ------- Since this worked in the past, I don't think we can just close it as invalid. We either need to fix the netx build to work around this issue, or provide the correct configure check to detect this doesn't work. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Wed Feb 16 11:21:52 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 16 Feb 2011 14:21:52 -0500 Subject: [icedtea-web] RFC: add proxy auto config support Message-ID: <4D5C23D0.7050809@redhat.com> Hi, The attached patch adds support for reading, parsing and using proxy auto config (PAC) files to icedtea-web. PAC files are written in javascript, so this patch also adds a dependency on rhino for building. A dependency on jrunscript is also added for testing. PAC files will be used by both plugin and netx if deployment.proxy.type is 2 (PAC) and deployment.proxy.auto.config.url points to a valid PAC file. PAC files may also be used by netx if deployment.proxy.type is 3 (browser) and the browser (firefox) is using a proxy auto config file for resolving proxies. The PAC file is evaluated inside a sandbox - which only has permissions to resolve urls. Because we dont want to grant createclassloader permissions, I have had to set (in ProxyAutoConfig.java): cx.setOptimizationLevel(-1); which works without creating classes (and so works without createClassLoader permissions). This option is not available by going through the Java ScriptEngine apis. The patch therefore uses the rhino apis directly. Since parsing a PAC file requires access to a set of additional functions, the patch also implements them. Tests for these are included. make check should run these tests and end by printing a line like: X of Y tests failed Any thoughts or comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: pac-support-06.patch Type: text/x-patch Size: 63594 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110216/d77241a2/pac-support-06.patch From dlila at icedtea.classpath.org Wed Feb 16 11:49:23 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Wed, 16 Feb 2011 19:49:23 +0000 Subject: /hg/icedtea6: added patches/openjdk/6896068-sg2d.patch Message-ID: changeset 22fa1c53c1b8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=22fa1c53c1b8 author: dlila date: Wed Feb 16 12:27:53 2011 -0500 added patches/openjdk/6896068-sg2d.patch diffstat: 4 files changed, 218 insertions(+), 1 deletion(-) ChangeLog | 6 + Makefile.am | 3 NEWS | 1 patches/openjdk/6896068-sg2d.patch | 209 ++++++++++++++++++++++++++++++++++++ diffs (250 lines): diff -r b58a717c532c -r 22fa1c53c1b8 ChangeLog --- a/ChangeLog Wed Feb 16 16:51:12 2011 +0000 +++ b/ChangeLog Wed Feb 16 12:27:53 2011 -0500 @@ -1,3 +1,9 @@ 2011-02-16 Andrew John Hughes + + * NEWS: Update with the backport + * Makefile.am (ICEDTEA_PATCHES): Added the patch + * patches/openjdk/6896068-sg2d.patch: Patch + 2011-02-16 Andrew John Hughes * NEWS: Include new releases: diff -r b58a717c532c -r 22fa1c53c1b8 Makefile.am --- a/Makefile.am Wed Feb 16 16:51:12 2011 +0000 +++ b/Makefile.am Wed Feb 16 12:27:53 2011 -0500 @@ -302,7 +302,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ patches/no-static-linking.patch \ patches/rh676659-gcc-export-dynamic.patch \ - patches/g344659-sparc_fix.patch + patches/g344659-sparc_fix.patch \ + patches/openjdk/6896068-sg2d.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r b58a717c532c -r 22fa1c53c1b8 NEWS --- a/NEWS Wed Feb 16 16:51:12 2011 +0000 +++ b/NEWS Wed Feb 16 12:27:53 2011 -0500 @@ -417,6 +417,7 @@ New in release 1.10 (2011-XX-XX): - S6633275: Need to support shaped/translucent windows - S7015232: missing copyright header in CheckZOrderChange.java - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java + - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc diff -r b58a717c532c -r 22fa1c53c1b8 patches/openjdk/6896068-sg2d.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6896068-sg2d.patch Wed Feb 16 12:27:53 2011 -0500 @@ -0,0 +1,209 @@ +# HG changeset patch +# User neugens +# Date 1256926775 -3600 +# Node ID 634221297c37bc73c0f598e6ce212ef83ba74d14 +# Parent 1f2ef3a7d7c023c7ffcdf4e8fbb204ec66098f80 +6896068: SunGraphics2D exposes a reference to itself while non fully initialised. +Summary: Introduce a new Interface to mark the Loops based pipes and initialise the loops accordingly. +Reviewed-by: flar, rkennke + +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/SunGraphics2D.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/SunGraphics2D.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/SunGraphics2D.java Fri Oct 30 19:19:35 2009 +0100 +@@ -257,7 +257,6 @@ + font = defaultFont; + } + +- loops = sd.getRenderLoops(this); + setDevClip(sd.getBounds()); + invalidatePipe(); + } +@@ -367,6 +366,7 @@ + shapepipe = invalidpipe; + textpipe = invalidpipe; + imagepipe = invalidpipe; ++ loops = null; + } + + public void validatePipe() { +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/SurfaceData.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/SurfaceData.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/SurfaceData.java Fri Oct 30 19:19:35 2009 +0100 +@@ -69,6 +69,7 @@ + import sun.java2d.pipe.DrawImage; + import sun.awt.SunHints; + import sun.awt.image.SurfaceManager; ++import sun.java2d.pipe.LoopBasedPipe; + + /** + * This class provides various pieces of information relevant to a +@@ -506,7 +507,6 @@ + sg2d.textpipe = solidTextRenderer; + } + sg2d.shapepipe = colorPrimitives; +- sg2d.loops = getRenderLoops(sg2d); + // assert(sg2d.surfaceData == this); + } + } else if (sg2d.compositeState == sg2d.COMP_CUSTOM) { +@@ -603,8 +603,17 @@ + + sg2d.textpipe = getTextPipe(sg2d, false /* AA==OFF */); + sg2d.shapepipe = colorPrimitives; ++ // assert(sg2d.surfaceData == this); ++ } ++ ++ // check for loops ++ if (sg2d.textpipe instanceof LoopBasedPipe || ++ sg2d.shapepipe instanceof LoopBasedPipe || ++ sg2d.fillpipe instanceof LoopBasedPipe || ++ sg2d.drawpipe instanceof LoopBasedPipe || ++ sg2d.imagepipe instanceof LoopBasedPipe) ++ { + sg2d.loops = getRenderLoops(sg2d); +- // assert(sg2d.surfaceData == this); + } + } + +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/pipe/AATextRenderer.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/AATextRenderer.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/AATextRenderer.java Fri Oct 30 19:19:35 2009 +0100 +@@ -34,8 +34,9 @@ + * a solid source colour to an opaque destination. + */ + +-public class AATextRenderer extends GlyphListLoopPipe { +- ++public class AATextRenderer extends GlyphListLoopPipe ++ implements LoopBasedPipe ++{ + protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl) { + sg2d.loops.drawGlyphListAALoop.DrawGlyphListAA(sg2d, sg2d.surfaceData, + gl); +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/pipe/GlyphListLoopPipe.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/GlyphListLoopPipe.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/GlyphListLoopPipe.java Fri Oct 30 19:19:35 2009 +0100 +@@ -36,8 +36,9 @@ + * the installed loop may not match the glyphvector. + */ + +-public abstract class GlyphListLoopPipe extends GlyphListPipe { +- ++public abstract class GlyphListLoopPipe extends GlyphListPipe ++ implements LoopBasedPipe ++{ + protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl, + int aaHint) { + switch (aaHint) { +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/pipe/LoopBasedPipe.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/LoopBasedPipe.java Fri Oct 30 19:19:35 2009 +0100 +@@ -0,0 +1,37 @@ ++/* ++ * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. Sun designates this ++ * particular file as subject to the "Classpath" exception as provided ++ * by Sun in the LICENSE file that accompanied this code. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, ++ * CA 95054 USA or visit www.sun.com if you need additional information or ++ * have any questions. ++ */ ++ ++package sun.java2d.pipe; ++ ++/** ++ * This is a marker interface used by Pipes that need RenderLoops. ++ * RenderLoops are validated in SurfaceData when a pipe is recognised to ++ * implement this interface. ++ * ++ * @author Mario Torre ++ */ ++public interface LoopBasedPipe { ++ ++} +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/pipe/LoopPipe.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/LoopPipe.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/LoopPipe.java Fri Oct 30 19:19:35 2009 +0100 +@@ -46,7 +46,8 @@ + public class LoopPipe + implements PixelDrawPipe, + PixelFillPipe, +- ShapeDrawPipe ++ ShapeDrawPipe, ++ LoopBasedPipe + { + final static RenderingEngine RenderEngine = RenderingEngine.getInstance(); + +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/pipe/SolidTextRenderer.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/SolidTextRenderer.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/SolidTextRenderer.java Fri Oct 30 19:19:35 2009 +0100 +@@ -35,8 +35,9 @@ + * a solid source colour to an opaque destination. + */ + +-public class SolidTextRenderer extends GlyphListLoopPipe { +- ++public class SolidTextRenderer extends GlyphListLoopPipe ++ implements LoopBasedPipe ++{ + protected void drawGlyphList(SunGraphics2D sg2d, GlyphList gl) { + sg2d.loops.drawGlyphListLoop.DrawGlyphList(sg2d, sg2d.surfaceData, gl); + } +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/share/classes/sun/java2d/pipe/SpanShapeRenderer.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/SpanShapeRenderer.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/SpanShapeRenderer.java Fri Oct 30 19:19:35 2009 +0100 +@@ -65,7 +65,9 @@ + } + } + +- public static class Simple extends SpanShapeRenderer { ++ public static class Simple extends SpanShapeRenderer ++ implements LoopBasedPipe ++ { + public Object startSequence(SunGraphics2D sg, Shape s, + Rectangle devR, int[] bbox) { + return sg; +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/solaris/classes/sun/java2d/x11/X11SurfaceData.java +--- openjdk.orig/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java Fri Oct 30 19:19:35 2009 +0100 +@@ -388,7 +388,10 @@ + // if a GlyphVector overrides the AA setting. + // We use getRenderLoops() rather than setting solidloops + // directly so that we get the appropriate loops in XOR mode. +- sg2d.loops = getRenderLoops(sg2d); ++ if (sg2d.loops == null) { ++ // assert(some pipe will always be a LoopBasedPipe) ++ sg2d.loops = getRenderLoops(sg2d); ++ } + } else { + super.validatePipe(sg2d); + } +diff -r 1f2ef3a7d7c0 -r 634221297c37 src/windows/classes/sun/java2d/windows/GDIWindowSurfaceData.java +--- openjdk.orig/jdk/src/windows/classes/sun/java2d/windows/GDIWindowSurfaceData.java Fri Oct 23 16:21:50 2009 +0400 ++++ openjdk/jdk/src/windows/classes/sun/java2d/windows/GDIWindowSurfaceData.java Fri Oct 30 19:19:35 2009 +0100 +@@ -210,7 +210,10 @@ + // if a GlyphVector overrides the AA setting. + // We use getRenderLoops() rather than setting solidloops + // directly so that we get the appropriate loops in XOR mode. +- sg2d.loops = getRenderLoops(sg2d); ++ if (sg2d.loops == null) { ++ // assert(some pipe will always be a LoopBasedPipe) ++ sg2d.loops = getRenderLoops(sg2d); ++ } + } else { + super.validatePipe(sg2d); + } From ahughes at redhat.com Wed Feb 16 11:51:30 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 16 Feb 2011 19:51:30 +0000 Subject: [icedtea-web] RFC: add proxy auto config support In-Reply-To: <4D5C23D0.7050809@redhat.com> References: <4D5C23D0.7050809@redhat.com> Message-ID: <20110216195129.GB26007@rivendell.middle-earth.co.uk> On 14:21 Wed 16 Feb , Omair Majid wrote: > Hi, > > The attached patch adds support for reading, parsing and using proxy > auto config (PAC) files to icedtea-web. > > PAC files are written in javascript, so this patch also adds a > dependency on rhino for building. A dependency on jrunscript is also > added for testing. > > PAC files will be used by both plugin and netx if deployment.proxy.type > is 2 (PAC) and deployment.proxy.auto.config.url points to a valid PAC > file. PAC files may also be used by netx if deployment.proxy.type is 3 > (browser) and the browser (firefox) is using a proxy auto config file > for resolving proxies. > > The PAC file is evaluated inside a sandbox - which only has permissions > to resolve urls. Because we dont want to grant createclassloader > permissions, I have had to set (in ProxyAutoConfig.java): > cx.setOptimizationLevel(-1); > which works without creating classes (and so works without > createClassLoader permissions). This option is not available by going > through the Java ScriptEngine apis. The patch therefore uses the rhino > apis directly. > > Since parsing a PAC file requires access to a set of additional > functions, the patch also implements them. Tests for these are included. > > make check should run these tests and end by printing a line like: > X of Y tests failed > > Any thoughts or comments? > I thought libproxy was going to be used to handle these files. Why are we implementing this ourselves? There seems to be a completely broken assumption that rhino.jar is going to be in the JDK??? It should detect it as IcedTea does. What is jrunscript? I've never heard of this before. Further comments inline. > Cheers, > Omair > diff -r cd1eda4f0d97 Makefile.am > --- a/Makefile.am Tue Feb 15 11:01:01 2011 -0500 > +++ b/Makefile.am Wed Feb 16 13:59:02 2011 -0500 > @@ -8,7 +8,7 @@ > # Build directories > > BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0 > -RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar > +RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar:$(BOOT_DIR)/jre/lib/rhino.jar > This is broken; you can't just assume that there is a rhino.jar in jre/lib. > # Flags > IT_CFLAGS=$(CFLAGS) $(ARCHFLAG) > @@ -86,6 +86,8 @@ > all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp $(NETX_DIR)/launcher/javaws \ > javaws.desktop stamps/docs.stamp $(NETX_DIR)/launcher/controlpanel/itweb-settings itweb-settings.desktop > > +check-local: check-pac-functions > + > clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \ > clean-native-ecj clean-desktop-files clean-docs > if [ -e stamps ] ; then \ > @@ -411,6 +413,14 @@ > rm -rf ${abs_top_builddir}/docs/plugin > rm -f stamps/plugin-docs.stamp > > + > +# Tests > +# ========================== > + > +check-pac-functions: stamps/bootstrap-directory.stamp > + $(BOOT_DIR)/bin/jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \ > + $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/resources/pac-funcs.js) > + > # plugin tests > > if ENABLE_PLUGIN > @@ -450,12 +460,18 @@ > ln -sf $(JAR) $(BOOT_DIR)/bin/jar > ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac > ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc > + ln -sf $(JRUNSCRIPT) $(BOOT_DIR)/bin/jrunscript > mkdir -p $(BOOT_DIR)/jre/lib && \ > ln -s $(SYSTEM_JDK_DIR)/jre/lib/rt.jar $(BOOT_DIR)/jre/lib && \ > if [ -e $(SYSTEM_JDK_DIR)/jre/lib/jsse.jar ] ; then \ > ln -s $(SYSTEM_JDK_DIR)/jre/lib/jsse.jar $(BOOT_DIR)/jre/lib ; \ > else \ > ln -s rt.jar $(BOOT_DIR)/jre/lib/jsse.jar ; \ > + fi && \ No reason to link to this fi command. That just breaks error reporting. > + if [ -e $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar ] ; then \ > + ln -s $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar $(BOOT_DIR)/jre/lib ; \ > + else \ > + ln -s rt.jar $(BOOT_DIR)/jre/lib/rhino.jar ; \ This is even more confusing. First you assume that rhino.jar is going to be in the JDK. If it isn't there, you then symlink to rt.jar??? > fi > ln -sf $(SYSTEM_JDK_DIR)/jre/lib/$(JRE_ARCH_DIR) \ > $(BOOT_DIR)/jre/lib/ && \ > diff -r cd1eda4f0d97 acinclude.m4 > --- a/acinclude.m4 Tue Feb 15 11:01:01 2011 -0500 > +++ b/acinclude.m4 Wed Feb 16 13:59:02 2011 -0500 > @@ -250,6 +250,40 @@ > AC_SUBST(ECJ_JAR) > ]) > > +AC_DEFUN([FIND_JRUNSCRIPT], Missing prefix; should be IT_FIND_JRUNSCRIPT. > +[ > + AC_MSG_CHECKING([for jrunscript]) > + AC_ARG_WITH([jrunscript], > + [AS_HELP_STRING(--with-jrunscript,specify location of the jrunscript binary)], > + [ > + if test -f "${withval}"; then > + JRUNSCRIPT="${withval}" > + fi > + ], You don't handle withval being yes or no, which is valid (generated by --with-jrunscript or --without-jrunscript). > + [ > + JRUNSCRIPT=${SYSTEM_JDK_DIR}/bin/jrunscript > + ]) > + if test -z "${JRUNSCRIPT}"; then > + for dir in /usr/lib/jvm/java-openjdk/bin /usr/lib/jvm/icedtea6/bin \ > + /usr/lib/jvm/java-6-openjdk/bin /usr/lib/jvm/openjdk/bin \ > + /usr/lib/jvm/java-icedtea/bin /usr/lib/jvm/java-gcj/bin \ > + /usr/lib/jvm/gcj-jdk/bin ; do > + if test -e $dir/jrunscript; then > + JRUNSCRIPT=$dir/jrunscript > + break > + fi > + done > + if test -z "${JRUNSCRIPT}"; then > + JRUNSCRIPT=no > + fi > + fi > + AC_MSG_RESULT(${JRUNSCRIPT}) > + if test "x${JRUNSCRIPT}" = "xno" ; then > + AC_MSG_WARN([cannot find a jrunscript, use --with-jrunscript]) > + fi > + AC_SUBST(JRUNSCRIPT) > +]) > + > AC_DEFUN_ONCE([IT_CHECK_PLUGIN], > [ > AC_MSG_CHECKING([whether to build the browser plugin]) > diff -r cd1eda4f0d97 configure.ac > --- a/configure.ac Tue Feb 15 11:01:01 2011 -0500 > +++ b/configure.ac Wed Feb 16 13:59:02 2011 -0500 > @@ -34,6 +34,7 @@ > FIND_ECJ_JAR > IT_FIND_JAVADOC > AC_CONFIG_FILES([javac], [chmod +x javac]) > +FIND_JRUNSCRIPT > > IT_SET_VERSION > IT_CHECK_XULRUNNER_VERSION > @@ -64,6 +65,7 @@ > IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager]) > IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie]) > IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler]) > +IT_CHECK_FOR_CLASS(SUN_ORG_MOZILLA_JAVASCRIPT_CONTEXT, [sun.org.mozilla.javascript.Context]) Ugh... we should be making this list shorter not adding to it. Why is this necessary? Why can't you use a standard class from the JDK or Rhino? > IT_CHECK_FOR_CLASS(SUN_SECURITY_PROVIDER_X509FACTORY, [sun.security.provider.X509Factory]) > IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_SECURITYCONSTANTS, [sun.security.util.SecurityConstants]) > IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker]) > diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java > --- a/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Tue Feb 15 11:01:01 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Wed Feb 16 13:59:02 2011 -0500 > @@ -54,6 +54,7 @@ > > import net.sourceforge.jnlp.runtime.JNLPProxySelector; > import net.sourceforge.jnlp.runtime.JNLPRuntime; > +import net.sourceforge.jnlp.runtime.ProxyAutoConfig; > > /** > * A ProxySelector which can read proxy settings from a browser's > @@ -85,6 +86,8 @@ > private String browserSocks4ProxyHost; > private int browserSocks4ProxyPort; > > + private ProxyAutoConfig browserProxyAutoConfig = null; > + > /** > * Create a new instance of this class, reading configuration fropm the browser > */ > @@ -128,6 +131,12 @@ > e.printStackTrace(); > } > > + if (browserProxyType == BROWSER_PROXY_TYPE_PAC) { > + if (browserAutoConfigUrl != null) { > + browserProxyAutoConfig = new ProxyAutoConfig(browserAutoConfigUrl); > + } > + } > + > browserUseSameProxy = Boolean.valueOf(prefs.get("network.proxy.share_proxy_settings")); > > browserHttpProxyHost = prefs.get("network.proxy.http"); > @@ -216,8 +225,21 @@ > * browser. > */ > private List getFromBrowserPAC(URI uri) { > - System.err.println(R("RPRoxyPacNotImplemented")); > - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > + if (browserAutoConfigUrl == null || uri.getScheme().equals("socket")) { > + return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > + } > + > + List proxies = new ArrayList(); > + > + try { > + String proxiesString = browserProxyAutoConfig.getProxies(uri.toURL()); > + proxies.addAll(getProxiesFromPacResult(proxiesString)); > + } catch (MalformedURLException e) { > + e.printStackTrace(); > + proxies.add(Proxy.NO_PROXY); > + } > + > + return proxies; > } > > /** > diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/resources/Messages.properties > --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 15 11:01:01 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Feb 16 13:59:02 2011 -0500 > @@ -141,7 +141,6 @@ > RUnexpected=Unexpected {0} at {1} > RConfigurationError=Fatal error while reading the configuration > RConfigurationFatal=ERROR: a fatal error has occurred while loading configuration. Perhaps a global configuration was required but could not be found > -RPRoxyPacNotImplemented=Using Proxy Auto Config (PAC) files is not supported yet. > RProxyFirefoxNotFound=Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type. > RProxyFirefoxOptionNotImplemented=Browser proxy option "{0}" ({1}) not supported yet. > > diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/resources/pac-funcs.js > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/resources/pac-funcs.js Wed Feb 16 13:59:02 2011 -0500 > @@ -0,0 +1,830 @@ > +/* pac-funcs.js > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + Shouldn't these headers now say IcedTea-Web? > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +/* > + * These helper functions are required to be able to parse Proxy Auto Config > + * (PAC) files. PAC files will use these helper functions to decide the best > + * proxy for connecting to a host. > + * > + * This implementation is based on the description at: > + * http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html > + */ Based on? To what extent? Is any of this code copied? Is it legal? > + > +/** > + * Returns true if the host does not contain a domain (there are no dots) > + */ > +function isPlainHostName(host) { > + if (host.indexOf(".") === -1) { > + return true; > + } else { > + return false; > + } > +} > + > +/** > + * Returns true if the host is part of the domain (the host ends with domain) > + */ > +function dnsDomainIs(host, domain) { > + var loc = host.lastIndexOf(domain); > + if (loc === -1) { > + return false; > + } > + if (loc + domain.length === host.length) { > + // host ends with domain > + return true; > + } > + return false; > +} > + > +/** > + * Returns true if the host is an exact match of hostdom or if host is not a > + * fully qualified name but has the same hostname as hostdom > + */ > +function localHostOrDomainIs(host, hostdom) { > + if (host === hostdom) { > + // exact match > + return true; > + } > + var firstdot = hostdom.indexOf("."); > + if (firstdot === -1) { > + // hostdom has no dots > + return false; > + } > + if (host === hostdom.substring(0, firstdot)) { > + // hostname matches > + return true; > + } > + return false; > +} > + > +/** > + * Returns true if the host name can be resolved. > + */ > +function isResolvable(host) { > + try { > + java.net.InetAddress.getByName(host); > + return true; > + } catch (e) { > + //if (e.javaException instanceof java.net.UnknownHostException) { > + return false; > + //} else { > + // throw e; > + //} > + } > +} > + > +/** > + * Return true if the ip address of the host matches the pattern given the mask. > + */ > +function isInNet(host, pattern, mask) { > + if (!isResolvable(host)) { > + return false; > + } > + > + var hostIp = dnsResolve(host); > + var hostParts = hostIp.split("."); > + var patternParts = pattern.split("."); > + var maskParts = mask.split("."); > + > + if (hostParts.length !== 4 || > + patternParts.length !== hostParts.length || > + maskParts.length !== hostParts.length) { > + return false; > + } > + > + var matched = true; > + for (var i = 0; i < hostParts.length; i++) { > + var partMatches = (hostParts[i] & maskParts[i]) === (patternParts[i] & maskParts[i]); > + matched = matched && partMatches; > + } > + > + return matched; > +} > + > +/** > + * Returns the IP address of the host as a string > + */ > +function dnsResolve(host) { > + return java.net.InetAddress.getByName(host).getHostAddress() + ""; > +} > + > +/** > + * Returns the local IP address > + */ > +function myIpAddress() { > + return java.net.InetAddress.getLocalHost().getHostAddress() + ""; > +} > + > +/** > + * Returns the number of domains in a hostname > + */ > +function dnsDomainLevels(host) { > + var levels = 0; > + for (var i = 0; i < host.length; i++) { > + if (host[i] === '.') { > + levels++; > + } > + } > + return levels; > +} > + > +/** > + * Returns true if the shell expression matches the given input string > + */ > +function shExpMatch(str, shExp) { > + > + // TODO support all special characters > + // right now we support only * and ? > + > + > + try { > + > + // turn shExp into a regular expression > + > + var work = ""; > + > + // escape characters > + for (var i = 0; i < shExp.length; i++) { > + var ch = shExp[i]; > + switch (ch) { > + case "\\": work = work + "\\\\"; break; > + case "^": work = work + "\\^"; break; > + case "$": work = work + "\\$"; break; > + case "+": work = work + "\\+"; break; > + case ".": work = work + "\\."; break; > + case "(": work = work + "\\("; break; > + case ")": work = work + "\\)"; break; > + case "{": work = work + "\\{"; break; > + case "}": work = work + "\\}"; break; > + case "[": work = work + "\\["; break; > + case "]": work = work + "\\]"; break; > + > + case "?": work = work + ".{1}"; break; > + case "*": work = work + ".*"; break; > + > + default: > + work = work + ch; > + } > + > + } > + > + var regExp = "^" + work + "$"; > + > + // match > + //java.lang.System.out.println("") > + //java.lang.System.out.println("Input String : " + str); > + //java.lang.System.out.println("Input Pattern : " + shExp); > + //java.lang.System.out.println("RegExp : " + regExp.toString()); > + var match = str.match(regExp); > + > + if (match === null) { > + return false; > + } else { > + return true; > + } > + > + > + } catch (e) { > + return false; > + } > + > +} > + > + > +/** > + * Returns true if the current weekday matches the desired weekday(s) > + * > + * Possible ways of calling: > + * weekdayRange(wd1); > + * weekdayRange(wd1, "GMT"); > + * weekdayRange(wd1, wd2); > + * weekdayRange(wd1, wd2, "GMT"); > + * > + * Where wd1 and wd2 are one of "SUN", "MON", "TUE", "WED", "THU", "FRI" and > + * "SAT" > + * > + * The argument "GMT", if present, is always the last argument > + */ > +function weekdayRange() { > + var wd1; > + var wd2; > + var gmt = false; > + > + function isWeekDay(day) { > + if (day === "SUN" || day === "MON" || day === "TUE" || day === "WED" || > + day === "THU" || day === "FRI" || day === "SAT") { > + return true; > + } > + return false; > + } > + > + function strToWeekDay(str) { > + switch (str) { > + case "SUN": return 0; > + case "MON": return 1; > + case "TUE": return 2; > + case "WED": return 3; > + case "THU": return 4; > + case "FRI": return 5; > + case "SAT": return 6; > + default: return 0; > + } > + } > + > + if (arguments.length > 1) { > + if (arguments[arguments.length-1] === "GMT") { > + gmt = true; > + arguments.splice(0,arguments.length-1); > + } > + } > + > + if (arguments.length === 0) { return false; } > + > + wd1 = arguments[0]; > + > + if (!isWeekDay(wd1)) { return false; } > + > + var today = new Date().getDay(); > + if (arguments.length >= 2) { > + // return true if current weekday is between wd1 and wd2 (inclusive) > + wd2 = arguments[1]; > + if (!isWeekDay(wd2)) { return false; } > + > + var day1 = strToWeekDay(wd1); > + var day2 = strToWeekDay(wd2); > + > + if (day1 <= day2) { > + if ( day1 <= today && today <= day2) { > + return true; > + } > + return false; > + } else { > + if (day1 <= today || today <= day2) { > + return true; > + } > + return false; > + } > + } else { > + // return true if the current weekday is wd1 > + if (strToWeekDay(wd1) === today) { > + return true; > + } > + return false; > + } > +} > + > +/** > + * Returns true if the current date matches the given date(s) > + * > + * Possible ways of calling: > + * dateRange(day) > + * dateRange(day1, day2) > + * dateRange(month) > + * dateRange(month1, month2) > + * dateRange(year) > + * dateRange(year1, year2) > + * dateRange(day1, month1, day2, month2) > + * dateRange(month1, year1, month2, year2) > + * dateRange(day1, month1, year1, day2, month2, year2) > + * > + * The parameter "GMT" may additionally be passed as the last argument in any > + * of the above ways of calling. > + */ > +function dateRange() { > + > + // note: watch out for wrapping around of dates. date ranges, like > + // month=9 to month=8, wrap around and cover the entire year. this > + // makes everything more interesting > + > + var gmt; > + if (arguments.length > 1) { > + if (arguments[arguments.length-1] === "GMT") { > + gmt = true; > + arguments.splice(0,arguments.length-1); > + } > + } > + > + function isDate(date) { > + if (typeof(date) === 'number' && (date <= 31 && date >= 1)) { > + return true; > + } > + return false; > + } > + > + function strToMonth(month) { > + switch (month) { > + case "JAN": return 0; > + case "FEB": return 1; > + case "MAR": return 2; > + case "APR": return 3; > + case "MAY": return 4; > + case "JUN": return 5; > + case "JUL": return 6; > + case "AUG": return 7; > + case "SEP": return 8; > + case "OCT": return 9; > + case "NOV": return 10; > + case "DEC": return 11; > + default: return 0; > + } > + } > + > + function isMonth(month) { > + if (month === "JAN" || month === "FEB" || month === "MAR" || > + month === "APR" || month === "MAY" || month === "JUN" || > + month === "JUL" || month === "AUG" || month === "SEP" || > + month === "OCT" || month === "NOV" || month === "DEC") { > + return true; > + } > + return false; > + } > + > + function isYear(year) { > + if (typeof(year) === 'number') { > + return true; > + } > + return false; > + } > + > + function inDateRange(today, date1, date2) { > + if (date1 <= date2) { > + if (date1 <= today.getDate() && today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (date1 <= today.getDate() || today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + function inMonthRange(today, month1, month2) { > + if (month1 <= month2) { > + if (month1 <= today.getMonth() && today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (month1 <= today.getMonth() || today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + function inYearRange(today, year1, year2) { > + if (year1 <= today.getYear() && today.getYear() <= year2) { > + return true; > + } else { > + return false; > + } > + } > + > + function inMonthDateRange(today, date1, month1, date2, month2) { > + if (month1 === month2) { > + if (today.getMonth() === month1) { > + if (date1 <= today.getDate() && today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (date1 <= date2) { > + return false; > + } else { > + return true; > + } > + } > + } else if (month1 < month2) { > + if (month1 <= today.getMonth() && today.getMonth() <= month2) { > + if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month2) { > + if (today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + if (month1 <= today.getMonth() || today.getMonth() <= month2) { > + if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month2) { > + if (today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } > + } > + > + function inYearMonthRange(today, month1, year1, month2, year2) { > + if (year1 === year2) { > + if (today.getYear() === year1) { > + if (month1 <= today.getMonth() && today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } else { > + return false; > + } > + } > + if (year1 < year2) { > + if (year1 <= today.getYear() && today.getYear() <= year2) { > + if (today.getYear() === year1) { > + if (today.getMonth() >= month1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getYear() === year2) { > + if (today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + return false; > + } > + > + } > + > + function inYearMonthDateRange(today, date1, month1, year1, date2, month2, year2) { > + if (year1 === year2) { > + if (year1 === today.getYear()) { > + if ((month1 <= today.getMonth()) && (today.getMonth() <= month2)) { > + if (month1 === month2) { > + if (date1 <= today.getDate() && today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month2) { > + if (today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + return false; > + } > + } else if (year1 < year2) { > + if (year1 <= today.getYear() && today.getYear() <= year2) { > + if (today.getYear() === year1) { > + if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() > month1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getYear() === year2) { > + if (today.getMonth() <= month2) { > + > + } else { > + return true; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + return false; > + } > + } > + > + // TODO: change date to gmt, whatever > + var today = new Date(); > + > + var arg1; > + var arg2; > + var arg3; > + var arg4; > + var arg5; > + var arg6; > + > + switch (arguments.length) { > + case 1: > + var arg = arguments[0]; > + if (isDate(arg)) { > + if (today.getDate() === arg) { > + return true; > + } else { > + return false; > + } > + } else if (isMonth(arg)) { > + if (strToMonth(arg) === today.getMonth()) { > + return true; > + } else { > + return false; > + } > + } else { // year > + if (today.getYear() === arg) { > + return true; > + } else { > + return false; > + } > + } > + case 2: > + arg1 = arguments[0]; > + arg2 = arguments[1]; > + if (isDate(arg1) && isDate(arg2)) { > + var date1 = arg1; > + var date2 = arg2; > + > + return inDateRange(today, date1, date2); > + > + } else if (isMonth(arg1) && isMonth(arg2)) { > + var month1 = strToMonth(arg1); > + var month2 = strToMonth(arg2); > + > + return inMonthRange(today, month1, month2); > + > + } else if (isYear(arg1) && isYear(arg2)) { > + var year1 = arg1; > + var year2 = arg2; > + > + return inYearRange(today, year1, year2); > + } else { > + return false; > + } > + case 4: > + arg1 = arguments[0]; > + arg2 = arguments[1]; > + arg3 = arguments[2]; > + arg4 = arguments[3]; > + > + if (isDate(arg1) && isMonth(arg2) && isDate(arg3) && isMonth(arg4)) { > + var date1 = arg1; > + var month1 = strToMonth(arg2); > + var date2 = arg3; > + var month2 = strToMonth(arg4); > + > + return inMonthDateRange(today, date1, month1, date2, month2); > + > + } else if (isMonth(arg1) && isYear(arg2) && isMonth(arg3) && isYear(arg4)) { > + var month1 = strToMonth(arg1); > + var year1 = arg2; > + var month2 = strToMonth(arg3); > + var year2 = arg4; > + > + return inYearMonthRange(today, month1, year1, month2, year2); > + } else { > + return false; > + } > + case 6: > + arg1 = arguments[0]; > + arg2 = arguments[1]; > + arg3 = arguments[2]; > + arg4 = arguments[3]; > + arg5 = arguments[4]; > + arg6 = arguments[5]; > + if (isDate(arg1) && isMonth(arg2) && isYear(arg3) && > + isDate(arg4) && isMonth(arg5) && isYear(arg6)) { > + var day1 = arg1; > + var month1 = strToMonth(arg2); > + var year1 = arg3; > + var day2 = arg4; > + var month2 = strToMonth(arg5); > + var year2 = arg6; > + > + return inYearMonthDateRange(today, day1, month1, year1, day2, month2, year2); > + } else { > + return false; > + } > + default: > + return false; > + } > + > +} > + > +/** > + * Returns true if the current time matches the range given > + * > + * timeRange(hour) > + * timeRange(hour1, hour2) > + * timeRange(hour1, min1, hour2, min2) > + * timeRange(hour1, min1, sec1, hour2, min2, sec2) > + * > + * The string "GMT" can be used as the last additional parameter in addition to > + * the methods listed above. > + */ > +function timeRange() { > + > + // watch out for wrap around of times > + > + var gmt; > + if (arguments.length > 1) { > + if (arguments[arguments.length-1] === "GMT") { > + gmt = true; > + arguments.splice(0,arguments.length-1); > + } > + } > + > + function isHour(hour) { > + if (typeof(hour) === "number" && ( 0 <= hour && hour <= 23)) { > + return true; > + } else { > + return false; > + } > + } > + > + function isMin(minute) { > + if (typeof(minute) === "number" && (0 <= minute && minute <= 59)) { > + return true; > + } else { > + return false; > + } > + } > + > + function inHourRange(now, hour1, hour2) { > + if (hour1 === hour2) { > + if (now.getHours() === hour1) { > + return true; > + } else { > + return false; > + } > + } else if (hour1 < hour2) { > + if (hour1 <= now.getHours() && now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (hour1 <= now.getHours() || now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + function inHourMinuteRange(now, hour1, min1, hour2, min2) { > + if (hour1 == hour2) { > + if (now.getHours() == hour1) { > + if (min1 <= min2) { > + if (min1 <= now.getMinutes() && now.getMinutes() <= min2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (min1 <= now.getMinutes() || now.getMinutes() <= min2) { > + return true; > + } else { > + return false; > + } > + } > + } else { > + if (min1 <= min2) { > + return false; > + } else { > + return true; > + } > + } > + } else if (hour1 < hour2) { > + if (hour1 <= now.getHours() && now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (hour1 <= now.getHours() || now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + var today = new Date(); > + > + switch (arguments.length) { > + case 1: > + var hour = arguments[0]; > + if (today.getHours() === hour) { > + return true; > + } else { > + return false; > + } > + case 2: > + var hour1 = arguments[0]; > + var hour2 = arguments[1]; > + if (isHour(hour1) && isHour(hour2)) { > + return inHourRange(today, hour1, hour2); > + } else { > + return false; > + } > + case 4: > + var hour1 = arguments[0]; > + var min1 = arguments[1]; > + var hour2 = arguments[2]; > + var min2 = arguments[3]; > + > + if (isHour(hour1) && isMin(min1) && isHour(hour2) && isMin(min2)) { > + return inHourMinuteRange(today, hour1, min1, hour2, min2); > + } else { > + return false; > + } > + > + case 6: > + var hour1 = arguments[0]; > + var min1 = arguments[1]; > + var sec1 = arguments[2]; > + var hour2 = arguments[3]; > + var min2 = arguments[4]; > + var sec2 = arguments[5]; > + > + // TODO handle seconds properly > + > + return inHourMinuteRange(today, hour1, min1, hour2, min2); > + default: > + return false; > + } > +} > + > diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Tue Feb 15 11:01:01 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Wed Feb 16 13:59:02 2011 -0500 > @@ -16,7 +16,6 @@ > > package net.sourceforge.jnlp.runtime; > > -import static net.sourceforge.jnlp.runtime.Translator.R; > import java.io.IOException; > import java.net.InetAddress; > import java.net.InetSocketAddress; > @@ -52,6 +51,8 @@ > /** The default port to use as a fallback. Currently squid's default port */ > public static final int FALLBACK_PROXY_PORT = 3128; > > + private ProxyAutoConfig proxyAutoConfig = null; > + > /** The proxy type. See PROXY_TYPE_* constants */ > private int proxyType = PROXY_TYPE_UNKNOWN; > > @@ -96,8 +97,7 @@ > > proxyType = Integer.valueOf(config.getProperty(DeploymentConfiguration.KEY_PROXY_TYPE)); > > - String autoConfigString = config > - .getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); > + String autoConfigString = config.getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); > if (autoConfigString != null) { > try { > autoConfigUrl = new URL(autoConfigString); > @@ -106,6 +106,10 @@ > } > } > > + if (autoConfigUrl != null) { > + proxyAutoConfig = new ProxyAutoConfig(autoConfigUrl); > + } > + > bypassList = new ArrayList(); > String proxyBypass = config.getProperty(DeploymentConfiguration.KEY_PROXY_BYPASS_LIST); > if (proxyBypass != null) { > @@ -333,14 +337,22 @@ > * > * @return a List of valid Proxy objects > */ > - private List getFromPAC(URI uri) { > - if (autoConfigUrl == null) { > + protected List getFromPAC(URI uri) { > + if (autoConfigUrl == null || uri.getScheme().equals("socket")) { > return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > } > - // TODO implement this by reading and using the PAC file > - System.err.println(R("RPRoxyPacNotImplemented")); > > - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > + List proxies = new ArrayList(); > + > + try { > + String proxiesString = proxyAutoConfig.getProxies(uri.toURL()); > + proxies.addAll(getProxiesFromPacResult(proxiesString)); > + } catch (MalformedURLException e) { > + e.printStackTrace(); > + proxies.add(Proxy.NO_PROXY); > + } > + > + return proxies; This appears to be the same as the method in getFromBrowserPAC. Could this code not be shared? > } > > /** > @@ -351,5 +363,56 @@ > */ > protected abstract List getFromBrowser(URI uri); > > + /** > + * Converts a proxy string from a browser into a List of Proxy objects > + * suitable for java. > + * @param pacString a string indicating proxies. For example > + * "PROXY foo.bar:3128; DIRECT" > + * @return a list of Proxy objects represeting the parsed string. > + */ > + public static List getProxiesFromPacResult(String pacString) { > + List proxies = new ArrayList(); > + > + String[] tokens = pacString.split(";"); > + for (String token: tokens) { > + if (token.startsWith("PROXY")) { > + String hostPortPair = token.substring("PROXY".length()).trim(); > + if (!hostPortPair.contains(":")) { > + continue; > + } > + String host = hostPortPair.split(":")[0]; > + int port; > + try { > + port = Integer.valueOf(hostPortPair.split(":")[1]); > + } catch (NumberFormatException nfe) { > + continue; > + } > + SocketAddress sa = new InetSocketAddress(host, port); > + proxies.add(new Proxy(Type.HTTP, sa)); > + } else if (token.startsWith("SOCKS")) { > + String hostPortPair = token.substring("SOCKS".length()).trim(); > + if (!hostPortPair.contains(":")) { > + continue; > + } > + String host = hostPortPair.split(":")[0]; > + int port; > + try { > + port = Integer.valueOf(hostPortPair.split(":")[1]); > + } catch (NumberFormatException nfe) { > + continue; > + } > + SocketAddress sa = new InetSocketAddress(host, port); > + proxies.add(new Proxy(Type.SOCKS, sa)); > + } else if (token.startsWith("DIRECT")) { > + proxies.add(Proxy.NO_PROXY); > + } else { > + if (JNLPRuntime.isDebug()) { > + System.out.println("Unrecognized proxy token: " + token); > + } > + } > + } > + > + return proxies; > + } > > } > diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/runtime/ProxyAutoConfig.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/runtime/ProxyAutoConfig.java Wed Feb 16 13:59:02 2011 -0500 > @@ -0,0 +1,252 @@ > +/* ProxyAutoConfig.java > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +package net.sourceforge.jnlp.runtime; > + > +import java.io.BufferedReader; > +import java.io.IOException; > +import java.io.InputStream; > +import java.io.InputStreamReader; > +import java.net.SocketPermission; > +import java.net.URL; > +import java.security.AccessControlContext; > +import java.security.AccessController; > +import java.security.Permissions; > +import java.security.PrivilegedAction; > +import java.security.ProtectionDomain; > + > +import net.sourceforge.jnlp.util.TimedHashMap; > +import sun.org.mozilla.javascript.Context; > +import sun.org.mozilla.javascript.Function; > +import sun.org.mozilla.javascript.Scriptable; Please don't add more sun.* dependencies. > + > +/** > + * Represents a ProxyAutoConfig file. This object can be used to evaluate the > + * proxy file to find the proxy for a given url. > + * > + * @see http://en.wikipedia.org/wiki/Proxy_auto-config#The_PAC_file > + */ > +public class ProxyAutoConfig { > + > + private final String pacHelperFunctionContents; > + private final String pacContents; > + private final URL pacUrl; > + private final TimedHashMap cache; > + > + /** > + * Initialize a new object by using the PAC file located at the given URL. > + * > + * @param pacUrl the url of the PAC file to use > + */ > + public ProxyAutoConfig(URL pacUrl) { > + pacHelperFunctionContents = getHelperFunctionContents(); > + this.pacUrl = pacUrl; > + pacContents = getPacContents(pacUrl); > + cache = new TimedHashMap(); > + } > + > + /** > + * Get the proxies for accessing a given URL. The result is obtained by > + * evaluating the PAC file with the given url (and the host) as input. > + * > + * This method performs caching of the result. > + * > + * @param url the url for which a proxy is desired > + * @return a list of proxies in a string like > + *

"PROXY foo.example.com:8080; PROXY bar.example.com:8080; DIRECT"
> + * > + * @see #getProxiesWithoutCaching(URL) > + */ > + public String getProxies(URL url) { > + String cachedResult = getFromCache(url); > + if (cachedResult != null) { > + return cachedResult; > + } > + > + String result = getProxiesWithoutCaching(url); > + addToCache(url, cachedResult); > + return result; > + } > + > + /** > + * Get the proxies for accessing a given URL. The result is obtained by > + * evaluating the PAC file with the given url (and the host) as input. > + * > + * @param url the url for which a proxy is desired > + * @return a list of proxies in a string like > + *
"PROXY example.com:3128; DIRECT"
> + * > + * @see #getProxies(URL) > + */ > + public String getProxiesWithoutCaching(URL url) { > + if (pacHelperFunctionContents == null) { > + System.err.println("Error loading pac functions"); > + return "DIRECT"; > + } > + > + EvaluatePacAction evaluatePacAction = new EvaluatePacAction(pacContents, pacUrl.toString(), > + pacHelperFunctionContents, url); > + Permissions p = new Permissions(); > + p.add(new RuntimePermission("accessClassInPackage.sun.org.mozilla.javascript")); > + p.add(new SocketPermission("*", "resolve")); > + ProtectionDomain pd = new ProtectionDomain(null, p); > + AccessControlContext context = new AccessControlContext(new ProtectionDomain[] { pd }); > + > + return AccessController.doPrivileged(evaluatePacAction, context); > + > + } > + > + /** > + * Returns the contents of file at pacUrl as a String. > + */ > + private String getPacContents(URL pacUrl) { > + StringBuilder contents = null; > + try { > + String line = null; > + BufferedReader pacReader = new BufferedReader(new InputStreamReader(pacUrl.openStream())); > + contents = new StringBuilder(); > + while ((line = pacReader.readLine()) != null) { > + // System.out.println(line); > + contents = contents.append(line).append("\n"); > + } > + } catch (IOException e) { > + contents = null; > + } > + > + return (contents != null) ? contents.toString() : null; > + } > + > + /** > + * Returns the pac helper functions as a String. The functions are read > + * from net/sourceforge/jnlp/resources/pac-funcs.js > + */ > + private String getHelperFunctionContents() { > + StringBuilder contents = null; > + try { > + String line; > + ClassLoader cl = this.getClass().getClassLoader(); > + if (cl == null) { > + cl = ClassLoader.getSystemClassLoader(); > + } > + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/resources/pac-funcs.js"); > + BufferedReader pacFuncsReader = new BufferedReader(new InputStreamReader(in)); > + contents = new StringBuilder(); > + while ((line = pacFuncsReader.readLine()) != null) { > + // System.out.println(line); > + contents = contents.append(line).append("\n"); > + } > + } catch (IOException e) { > + e.printStackTrace(); > + contents = null; > + } > + > + return (contents != null) ? contents.toString() : null; > + } > + > + /** > + * Gets an entry from the cache > + */ > + private String getFromCache(URL url) { > + String lookupString = url.getProtocol() + "://" + url.getHost(); > + String result = cache.get(lookupString); > + return result; > + } > + > + /** > + * Adds an entry to the cache > + */ > + private void addToCache(URL url, String proxyResult) { > + String lookupString = url.getAuthority() + "://" + url.getHost(); > + cache.put(lookupString, proxyResult); > + } > + > + /** > + * Helper classs to run remote javascript code (specified by the user as > + * PAC URL) inside a sandbox. > + */ > + private static class EvaluatePacAction implements PrivilegedAction { > + > + private String pacContents; > + private String pacUrl; > + private String pacFuncsContents; > + private URL url; > + > + public EvaluatePacAction(String pacContents, String pacUrl, String pacFuncsContents, URL url) { > + this.pacContents = pacContents; > + this.pacUrl = pacUrl; > + this.pacFuncsContents = pacFuncsContents; > + this.url = url; > + } > + > + public String run() { > + Context cx = Context.enter(); > + try { > + /* > + * TODO defense in depth. > + * > + * This is already running within a sandbox, but we can (and we > + * should) lock it down further. Look into ClassShutter. > + */ > + Scriptable scope = cx.initStandardObjects(); > + // any optimization level greater than -1 will trigger code generation > + // and this block will then need classloader permissions > + cx.setOptimizationLevel(-1); > + Object result = null; > + result = cx.evaluateString(scope, pacFuncsContents, "internal", 1, null); > + result = cx.evaluateString(scope, pacContents, pacUrl, 1, null); > + > + Object functionObj = scope.get("FindProxyForURL", scope); > + if (!(functionObj instanceof Function)) { > + System.err.println("FindProxyForURL not found"); > + return null; > + } else { > + Function findProxyFunction = (Function) functionObj; > + > + Object[] args = { url.toString(), url.getHost() }; > + result = findProxyFunction.call(cx, scope, scope, args); > + return (String) result; > + } > + } catch (Exception e) { > + e.printStackTrace(); > + return "DIRECT"; > + } finally { > + Context.exit(); > + } > + } > + } > + > +} > diff -r cd1eda4f0d97 tests/netx/pac/pac-funcs-test.js > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/netx/pac/pac-funcs-test.js Wed Feb 16 13:59:02 2011 -0500 > @@ -0,0 +1,446 @@ > + > +var ICEDTEA_CLASSPATH_ORG_IP = "208.78.240.231"; > +var CLASSPATH_ORG_IP = "199.232.41.10"; These should be able to be overridden. Same with others below. > + > +var testsFailed = 0; > +var testsPassed = 0; > + > +print("loading needed files\n"); > +file = arguments[0] + ""; > +load(file) > +print("finished loaded needed files\n"); > + > + > +function main() { > + > + testIsPlainHostName(); > + testDnsDomainIs(); > + testLocalHostOrDomainIs(); > + testIsResolvable(); > + testIsInNet(); > + testDnsResolve(); > + testDnsDomainLevels(); > + testShExpMatch(); > + testWeekdayRange(); > + testDateRange(); > + testTimeRange(); > + > + java.lang.System.out.println(testsFailed + " of " + (testsFailed + testsPassed) + " tests failed"); > +} > + > +function runTests(name, tests) { > + java.lang.System.out.println("Testing: " + name.name); > + > + var undefined_var; > + > + for ( var i = 0; i < tests.length; i++) { > + > + java.lang.System.out.print("Test " + (i + 1) + ": "); > + var expectedVal = tests[i][0]; > + var args = tests[i].slice(1); > + var returnVal; > +// try { > + returnVal = name.apply(null, args); > +// } catch (e) { > +// returnVal = undefined_var; > +// } > + if (returnVal === expectedVal) { > + java.lang.System.out.println("Passed."); > + testsPassed++; > + } else { > + java.lang.System.out.println("FAILED."); > + java.lang.System.out.println(name.name + "(" + args.join(", ") + ")"); > + java.lang.System.out.println("Expected '" + expectedVal + "' but got '" + returnVal + "'"); > + testsFailed++; > + } > + } > +} > + > +function testIsPlainHostName() { > + var tests = [ > + [ false, "icedtea.classpath.org" ], > + [ false, "classpath.org" ], > + [ true, "org" ], > + [ true, "icedtea" ], > + [ false, ".icedtea.classpath.org" ], > + [ false, "icedtea." ], > + [ false, "icedtea.classpath." ] > + ]; > + > + runTests(isPlainHostName, tests); > +} > + > +function testDnsDomainIs() { > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > + [ true, "icedtea.classpath.org", ".classpath.org" ], > + [ true, "icedtea.classpath.org", ".org" ], > + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], > + [ false, "icedtea.classpath.org", "icedtea.classpath" ], > + [ false, "icedtea.classpath", "icedtea.classpath.org" ], > + [ false, "icedtea", "icedtea.classpath.org" ] > + ]; > + > + runTests(dnsDomainIs, tests); > +} > + > +function testLocalHostOrDomainIs() { > + > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > + [ true, "icedtea", "icedtea.classpath.org" ], > + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], > + [ false, "icedtea.classpath", "icedtea.classpath.org" ], > + [ false, "foo.classpath.org", "icedtea.classpath.org" ], > + [ false, "foo", "icedtea.classpath.org" ] > + ]; > + > + runTests(localHostOrDomainIs, tests); > +} > + > +function testIsResolvable() { > + > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > + [ true, "classpath.org" ], > + [ false, "icedtea" ], > + [ false, "foobar.classpath.org" ], > + [ false, "icedtea.classpath.com" ] > + ]; > + > + runTests(isResolvable, tests); > +} > + > +function testIsInNet() { > + > + var parts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); > + > + var fakeParts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); > + fakeParts[0] = fakeParts[0] + 1; > + > + function createIp(array) { > + return array[0] + "." + array[1] + "." + array[2] + "." + array[3]; > + } > + > + var tests = [ > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.0.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.0.0.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], > + [ true, "icedtea.classpath.org", createIp(parts), "255.255.255.255" ], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.255"], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.0"], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.0.0"], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.0.0.0"], > + [ true, "icedtea.classpath.org", createIp(fakeParts), "0.0.0.0"] > + ]; > + > + runTests(isInNet, tests); > +} > + > +function testDnsResolve() { > + var tests = [ > + [ ICEDTEA_CLASSPATH_ORG_IP, "icedtea.classpath.org" ], > + //[ CLASSPATH_ORG_IP, "classpath.org" ], > + [ "127.0.0.1", "localhost" ] > + ]; > + > + runTests(dnsResolve, tests); > +} > + > +function testDnsDomainLevels() { > + var tests = [ > + [ 0, "org" ], > + [ 1, "classpath.org" ], > + [ 2, "icedtea.classpath.org" ], > + [ 3, "foo.icedtea.classpath.org" ] > + ]; > + > + runTests(dnsDomainLevels, tests); > + > +} > +function testShExpMatch() { > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org"], > + [ false, "icedtea.classpath.org", ".org"], > + [ false, "icedtea.classpath.org", "icedtea."], > + [ false, "icedtea", "icedtea.classpath.org"], > + > + [ true, "icedtea.classpath.org", "*" ], > + [ true, "icedtea.classpath.org", "*.classpath.org" ], > + [ true, "http://icedtea.classpath.org", "*.classpath.org" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*/foobar/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*foobar*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*foo*" ], > + [ false, "http://icedtea.classpath.org/foobar/", "*/foo/*" ], > + [ false, "http://icedtea.classpath.org/foobar/", "*/foob/*" ], > + [ false, "http://icedtea.classpath.org/foobar/", "*/fooba/*" ], > + [ false, "http://icedtea.classpath.org/foo/", "*foobar*" ], > + > + [ true, "1", "?" ], > + [ true, "12", "??" ], > + [ true, "123", "1?3" ], > + [ true, "123", "?23" ], > + [ true, "123", "12?" ], > + [ true, "1234567890", "??????????" ], > + [ false, "1234567890", "?????????" ], > + [ false, "123", "1?1" ], > + [ false, "123", "??" ], > + > + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], > + [ true, "http://icedtea1.classpath.org/f1/", "*icedtea?.classpath*/f?/*" ], > + [ false, "http://icedtea.classpath.org/f1/", "*/f2/*" ], > + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], > + [ false, "http://icedtea.classpath.org/f1", "f?*"], > + [ false, "http://icedtea.classpath.org/f1", "f?*"], > + [ false, "http://icedtea.classpath.org/f1", "f?*"], > + > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + > + [ true, "http://icedtea.classpath.org/foo.php?id=bah", "*foo.php*" ], > + [ false, "http://icedtea.classpath.org/foo_php?id=bah", "*foo.php*" ] > + ]; > + > + runTests(shExpMatch, tests); > +} > + > +function testWeekdayRange() { > + > + var today = new Date(); > + var day = today.getDay(); > + > + function dayToStr(day) { > + switch (day) { > + case -2: return "FRI"; > + case -1: return "SAT"; > + case 0: return "SUN"; > + case 1: return "MON"; > + case 2: return "TUE"; > + case 3: return "WED"; > + case 4: return "THU"; > + case 5: return "FRI"; > + case 6: return "SAT"; > + case 7: return "SUN"; > + case 8: return "MON"; > + default: return "FRI"; > + } > + > + } > + > + var tests = [ > + [ true, dayToStr(day) ], > + [ false, dayToStr(day+1) ], > + [ false, dayToStr(day-1) ], > + ]; > +} > + > +function testDateRange() { > + > + function incDate(date) { > + return (date + 1 - 1) % 31 +1 ; > + } > + > + function decDate(date) { > + return (date - 1 - 1 + 31) % 31 + 1; > + } > + > + function monthToStr(month) { > + switch (month) { > + case -1: return "DEC"; > + case 0: return "JAN"; > + case 1: return "FEB"; > + case 2: return "MAR"; > + case 3: return "APR"; > + case 4: return "MAY"; > + case 5: return "JUN"; > + case 6: return "JUL"; > + case 7: return "AUG"; > + case 8: return "SEP"; > + case 9: return "OCT"; > + case 10: return "NOV"; > + case 11: return "DEC"; > + case 12: return "JAN"; > + default: throw "Invalid Month"; > + } > + } > + > + var today = new Date(); > + var date = today.getDate(); > + var month = today.getMonth(); > + var year = today.getYear(); > + > + var tests = [ > + [ true, date ], > + [ false, incDate(date) ], > + [ false, decDate(date) ], > + > + [ true, monthToStr(month) ], > + [ false, monthToStr(month+1) ], > + [ false, monthToStr(month-1) ], > + > + [ true, year ], > + [ false, year - 1], > + [ false, year + 1], > + > + [ true, date, date ], > + [ true, date, incDate(date) ], > + [ true, decDate(date), date ], > + [ true, decDate(date), incDate(date) ], > + [ false, incDate(date), decDate(date) ], > + [ false, decDate(decDate(date)), decDate(date) ], > + [ false, incDate(date), incDate(incDate(date)) ], > + > + [ true, monthToStr(month), monthToStr(month) ], > + [ true, monthToStr(month), monthToStr(month+1) ], > + [ true, monthToStr(month-1), monthToStr(month) ], > + [ true, monthToStr(month-1), monthToStr(month+1) ], > + [ true, "JAN", "DEC" ], > + [ true, "DEC", "NOV" ], > + [ true, "JUL", "JUN"], > + [ false, monthToStr(month+1), monthToStr(month+1) ], > + [ false, monthToStr(month-1), monthToStr(month-1) ], > + [ false, monthToStr(month+1), monthToStr(month-1) ], > + > + [ true, year, year ], > + [ true, year, year+1 ], > + [ true, year-1, year ], > + [ true, year-1, year+1 ], > + [ false, year-2, year-1 ], > + [ false, year+1, year+1 ], > + [ false, year+1, year+2 ], > + [ false, year+1, year-1 ], > + > + [ true, date, monthToStr(month) , date, monthToStr(month) ], > + [ true, decDate(date), monthToStr(month) , date, monthToStr(month) ], > + [ false, decDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], > + [ true, date, monthToStr(month) , incDate(date), monthToStr(month) ], > + [ false, incDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], > + [ true, decDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], > + [ false, incDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], > + [ true, date, monthToStr(month-1) , date, monthToStr(month) ], > + [ true, date, monthToStr(month) , date, monthToStr(month+1) ], > + [ true, date, monthToStr(month-1) , date, monthToStr(month+1) ], > + [ true, incDate(date), monthToStr(month-1) , date, monthToStr(month+1) ], > + [ true, date, monthToStr(month-1) , decDate(date), monthToStr(month+1) ], > + [ false, date, monthToStr(month+1) , date, monthToStr(month-1) ], > + [ false, incDate(date), monthToStr(month+1) , incDate(date), monthToStr(month-1) ], > + [ false, decDate(date), monthToStr(month+1) , decDate(date), monthToStr(month-1) ], > + [ true, 1, "JAN", 31, "DEC" ], > + [ true, 2, "JAN", 1, "JAN" ], > + [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ], > + [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ], > + > + [ true, monthToStr(month), year, monthToStr(month), year ], > + [ true, monthToStr(month-1), year, monthToStr(month), year ], > + [ true, monthToStr(month), year, monthToStr(month+1), year ], > + [ true, monthToStr(month-1), year, monthToStr(month+1), year ], > + [ true, monthToStr(0), year, monthToStr(11), year ], > + [ false, monthToStr(month+1), year, monthToStr(month-1), year ], > + [ false, monthToStr(month+1), year, monthToStr(month+1), year ], > + [ false, monthToStr(month-1), year, monthToStr(month-1), year ], > + [ false, monthToStr(month), year-1, monthToStr(month-1), year ], > + [ true, monthToStr(month), year, monthToStr(month), year + 1 ], > + [ true, monthToStr(month), year-1, monthToStr(month), year ], > + [ true, monthToStr(month), year-1, monthToStr(month), year+1 ], > + [ true, monthToStr(0), year, monthToStr(0), year+1 ], > + [ true, monthToStr(0), year-1, monthToStr(0), year+1 ], > + [ false, monthToStr(0), year-1, monthToStr(11), year-1 ], > + [ false, monthToStr(0), year+1, monthToStr(11), year+1 ], > + > + [ true, date, monthToStr(month), year, date, monthToStr(month), year ], > + [ true, decDate(date), monthToStr(month), year, incDate(date), monthToStr(month), year ], > + [ true, decDate(date), monthToStr(month-1), year, incDate(date), monthToStr(month+1), year ], > + [ true, decDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], > + [ true, incDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], > + [ false, incDate(date), monthToStr(month), year, incDate(date), monthToStr(month+1), year+1 ], > + [ false, date, monthToStr(month+1), year, incDate(date), monthToStr(month+1), year+1 ], > + [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ], > + [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ], > + [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ], > + [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ], > + [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ], > + > + ]; > + > + runTests(dateRange, tests); > + > +} > + > +function testTimeRange() { > + var now = new Date(); > + > + var hour = now.getHours(); > + var min = now.getMinutes(); > + var sec = now.getSeconds(); > + > + function toHour(input) { > + if (input < 0) { > + while (input < 0) { > + input = input + 24; > + } > + return (input % 24); > + } else { > + return (input % 24); > + } > + } > + > + function toMin(input) { > + if (input < 0) { > + while (input < 0) { > + input = input + 60; > + } > + return (input % 60); > + } else { > + return (input % 60); > + } > + } > + > + tests = [ > + [ true, hour ], > + [ false, toHour(hour+1)], > + [ false, toHour(hour-1)], > + > + [ true, hour, hour ], > + [ true, toHour(hour-1), hour ], > + [ true, hour, toHour(hour+1)], > + [ true, toHour(hour-1), toHour(hour+1)], > + [ true, toHour(hour+1), hour ], > + [ true, hour, toHour(hour-1) ], > + [ false, toHour(hour-2), toHour(hour-1)], > + [ false, toHour(hour+1), toHour(hour+2)], > + [ false, toHour(hour+1), toHour(hour-1) ], > + [ true, 0, 23 ], > + [ true, 12, 11 ], > + > + [ true, hour, min, hour, min ], > + [ true, hour, min, hour, toMin(min+1) ], > + [ true, hour, toMin(min-1), hour, min ], > + [ true, hour, toMin(min-1), hour, toMin(min+1) ], > + [ true, hour, toMin(min+2), hour, toMin(min+1) ], > + [ false, hour, toMin(min+1), hour, toMin(min+1) ], > + [ false, hour, toMin(min-1), hour, toMin(min-1) ], > + [ false, hour, toMin(min+1), hour, toMin(min-1) ], > + [ true, toHour(hour-1), min, hour, min ], > + [ true, hour, min, toHour(hour+1), min ], > + [ true, toHour(hour-1), min, toHour(hour+1), min ], > + [ true, 0, 0, 23, 59 ], > + [ true, 0, 1, 0, 0 ], > + > + [ true, 0, 1, 0, 0, 0, 0 ], > + [ true, hour, min, sec, hour, min, sec ], > + [ true, hour, min, sec, hour, min + 10, sec ], > + [ true, hour, min, sec - 10, hour, min, sec ], > + [ true, hour, min, sec, hour, min-1 , sec ], > + > + ]; > + > + runTests(timeRange, tests); > +} > + > +main(); Needs work. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Wed Feb 16 12:22:59 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 16 Feb 2011 20:22:59 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 216d2e2208de in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=216d2e2208de author: Andrew John Hughes date: Wed Feb 16 20:21:15 2011 +0000 Remove .orig fragment from nomotif patch. 2011-02-16 Andrew John Hughes * patches/icedtea-nomotif-6706121.patch: Remove .orig file created by previous recreation of patch. changeset 58276c6748af in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=58276c6748af author: Andrew John Hughes date: Wed Feb 16 20:22:31 2011 +0000 Merge diffstat: 5 files changed, 224 insertions(+), 579 deletions(-) ChangeLog | 12 Makefile.am | 3 NEWS | 1 patches/icedtea-nomotif-6706121.patch | 578 --------------------------------- patches/openjdk/6896068-sg2d.patch | 209 +++++++++++ diffs (truncated from 844 to 500 lines): diff -r b58a717c532c -r 58276c6748af ChangeLog --- a/ChangeLog Wed Feb 16 16:51:12 2011 +0000 +++ b/ChangeLog Wed Feb 16 20:22:31 2011 +0000 @@ -1,3 +1,15 @@ 2011-02-16 Andrew John Hughes + + * patches/icedtea-nomotif-6706121.patch: + Remove .orig file created by previous + recreation of patch. + +2011-02-16 Denis Lila + + * NEWS: Update with the backport + * Makefile.am (ICEDTEA_PATCHES): Added the patch + * patches/openjdk/6896068-sg2d.patch: Patch + 2011-02-16 Andrew John Hughes * NEWS: Include new releases: diff -r b58a717c532c -r 58276c6748af Makefile.am --- a/Makefile.am Wed Feb 16 16:51:12 2011 +0000 +++ b/Makefile.am Wed Feb 16 20:22:31 2011 +0000 @@ -302,7 +302,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ patches/no-static-linking.patch \ patches/rh676659-gcc-export-dynamic.patch \ - patches/g344659-sparc_fix.patch + patches/g344659-sparc_fix.patch \ + patches/openjdk/6896068-sg2d.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r b58a717c532c -r 58276c6748af NEWS --- a/NEWS Wed Feb 16 16:51:12 2011 +0000 +++ b/NEWS Wed Feb 16 20:22:31 2011 +0000 @@ -417,6 +417,7 @@ New in release 1.10 (2011-XX-XX): - S6633275: Need to support shaped/translucent windows - S7015232: missing copyright header in CheckZOrderChange.java - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java + - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc diff -r b58a717c532c -r 58276c6748af patches/icedtea-nomotif-6706121.patch --- a/patches/icedtea-nomotif-6706121.patch Wed Feb 16 16:51:12 2011 +0000 +++ b/patches/icedtea-nomotif-6706121.patch Wed Feb 16 20:22:31 2011 +0000 @@ -1239,584 +1239,6 @@ diff -Nru openjdk.orig/jdk/make/sun/awt/ awt_display; awt_lock; awt_Lock; -diff -Nru openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux.orig openjdk/jdk/make/sun/awt/mapfile-vers-linux.orig ---- openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux.orig 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/make/sun/awt/mapfile-vers-linux.orig 2010-05-26 09:32:36.000000000 +0100 -@@ -0,0 +1,574 @@ -+# -+# Copyright (c) 2002, 2007, Oracle and/or its affiliates. All rights reserved. -+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+# -+# This code is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License version 2 only, as -+# published by the Free Software Foundation. Oracle designates this -+# particular file as subject to the "Classpath" exception as provided -+# by Oracle in the LICENSE file that accompanied this code. -+# -+# This code is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+# version 2 for more details (a copy is included in the LICENSE file that -+# accompanied this code). -+# -+# You should have received a copy of the GNU General Public License version -+# 2 along with this work; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+# or visit www.oracle.com if you need additional information or have any -+# questions. -+# -+ -+# Define public interface for libawt.so on Linux. -+# Linux port does not use mawt, all public symbols are in libawt.so -+ -+SUNWprivate_1.1 { -+ global: -+ JNI_OnLoad; -+ -+ Java_java_awt_CheckboxMenuItem_initIDs; -+ Java_java_awt_Color_initIDs; -+ Java_java_awt_FontMetrics_initIDs; -+ Java_java_awt_image_BufferedImage_initIDs; -+ Java_sun_awt_image_DataBufferNative_getElem; -+ Java_sun_awt_image_DataBufferNative_setElem; -+ Java_java_awt_image_ColorModel_initIDs; -+ Java_java_awt_image_ComponentSampleModel_initIDs; -+ Java_java_awt_image_IndexColorModel_initIDs; -+ Java_java_awt_image_Kernel_initIDs; -+ Java_java_awt_image_Raster_initIDs; -+ Java_java_awt_image_SampleModel_initIDs; -+ Java_java_awt_Label_initIDs; -+ Java_java_awt_MenuBar_initIDs; -+ Java_java_awt_ScrollPaneAdjustable_initIDs; -+ Java_java_awt_Toolkit_initIDs; -+ Java_java_awt_TrayIcon_initIDs; -+ Java_sun_awt_DebugSettings_setCTracingOn__Z; -+ Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2; -+ Java_sun_awt_DebugSettings_setCTracingOn__ZLjava_lang_String_2I; -+ Java_sun_awt_image_ByteComponentRaster_initIDs; -+ Java_sun_awt_image_GifImageDecoder_initIDs; -+ Java_sun_awt_image_GifImageDecoder_parseImage; -+ Java_sun_awt_image_Image_initIDs; -+ Java_sun_awt_image_ImageRepresentation_initIDs; -+ Java_sun_awt_image_ImageRepresentation_setDiffICM; -+ Java_sun_awt_image_ImageRepresentation_setICMpixels; -+ Java_sun_awt_image_ImagingLib_convolveBI; -+ Java_sun_awt_image_ImagingLib_convolveRaster; -+ Java_sun_awt_image_ImagingLib_init; -+ Java_sun_awt_image_ImagingLib_transformBI; -+ Java_sun_awt_image_ImagingLib_transformRaster; -+ Java_sun_awt_image_IntegerComponentRaster_initIDs; -+ Java_sun_awt_image_ShortComponentRaster_initIDs; -+ Java_sun_java2d_pipe_SpanClipRenderer_eraseTile; -+ Java_sun_java2d_pipe_SpanClipRenderer_fillTile; -+ Java_sun_java2d_pipe_ShapeSpanIterator_addSegment; -+ Java_sun_java2d_pipe_ShapeSpanIterator_moveTo; -+ Java_sun_java2d_pipe_ShapeSpanIterator_lineTo; -+ Java_sun_java2d_pipe_ShapeSpanIterator_quadTo; -+ Java_sun_java2d_pipe_ShapeSpanIterator_curveTo; -+ Java_sun_java2d_pipe_ShapeSpanIterator_closePath; -+ Java_sun_java2d_pipe_ShapeSpanIterator_pathDone; -+ Java_sun_java2d_pipe_ShapeSpanIterator_getNativeConsumer; -+ Java_sun_java2d_pipe_ShapeSpanIterator_appendPoly; -+ Java_sun_java2d_pipe_ShapeSpanIterator_dispose; -+ Java_sun_java2d_pipe_ShapeSpanIterator_getNativeIterator; -+ Java_sun_java2d_pipe_ShapeSpanIterator_getPathBox; -+ Java_sun_java2d_pipe_ShapeSpanIterator_initIDs; -+ Java_sun_java2d_pipe_ShapeSpanIterator_intersectClipBox; -+ Java_sun_java2d_pipe_ShapeSpanIterator_nextSpan; -+ Java_sun_java2d_pipe_ShapeSpanIterator_setNormalize; -+ Java_sun_java2d_pipe_ShapeSpanIterator_setOutputAreaXYXY; -+ Java_sun_java2d_pipe_ShapeSpanIterator_setRule; -+ Java_sun_java2d_pipe_ShapeSpanIterator_skipDownTo; -+ -+ Java_java_awt_Dimension_initIDs; -+ Java_java_awt_event_MouseEvent_initIDs; -+ Java_java_awt_image_DataBufferInt_initIDs; -+ Java_java_awt_image_SinglePixelPackedSampleModel_initIDs; -+ Java_java_awt_Rectangle_initIDs; -+ Java_sun_awt_image_BufImgSurfaceData_getSurfaceData; -+ Java_sun_awt_image_BufImgSurfaceData_initIDs; -+ Java_sun_awt_image_BufImgSurfaceData_initRaster; -+ Java_sun_awt_image_BufImgSurfaceData_setSurfaceData; -+ Java_sun_awt_image_BufImgSurfaceData_freeNativeICMData; -+ Java_sun_awt_image_BytePackedRaster_initIDs; -+ Java_sun_awt_image_ImagingLib_lookupByteBI; -+ Java_sun_awt_image_ImagingLib_lookupByteRaster; -+ Java_sun_java2d_SurfaceData_initIDs; -+ Java_sun_java2d_SurfaceData_isOpaqueGray; -+ Java_sun_java2d_Disposer_initIDs; -+ Java_sun_java2d_DefaultDisposerRecord_invokeNativeDispose; -+ Java_sun_java2d_loops_BlitBg_BlitBg; -+ Java_sun_java2d_loops_Blit_Blit; -+ Java_sun_java2d_loops_ScaledBlit_Scale; -+ Java_sun_java2d_loops_DrawLine_DrawLine; -+ Java_sun_java2d_loops_DrawPolygons_DrawPolygons; -+ Java_sun_java2d_loops_DrawRect_DrawRect; -+ Java_sun_java2d_loops_FillRect_FillRect; -+ Java_sun_java2d_loops_FillSpans_FillSpans; -+ Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs; -+ Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; -+ Java_sun_java2d_loops_MaskBlit_MaskBlit; -+ Java_sun_java2d_loops_MaskFill_MaskFill; -+ Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans; -+ Java_sun_java2d_pipe_RenderBuffer_copyFromArray; -+ Java_sun_java2d_pipe_SpanClipRenderer_initIDs; -+ sun_awt_image_GifImageDecoder_initIDs; -+ -+ # libmawt entry points -+ SurfaceData_InitOps; -+ SurfaceData_ThrowInvalidPipeException; -+ Region_GetBounds; -+ Region_GetInfo; -+ Region_StartIteration; -+ Region_CountIterationRects; -+ Region_NextIteration; -+ Region_EndIteration; -+ GrPrim_CompGetXorInfo; -+ GrPrim_CompGetAlphaInfo; -+ img_makePalette; -+ initInverseGrayLut; -+ make_dither_arrays; -+ make_uns_ordered_dither_array; -+ -+ # variables exported to libmawt -+ std_img_oda_red; -+ std_img_oda_blue; -+ std_img_oda_green; -+ std_odas_computed; -+ g_CMpDataID; -+ colorValueID; -+ jvm; -+ -+ # CDE private entry point -+ # This is in awt_LoadLibrary.c and falls through to libmawt. -+ # Evidently CDE needs this for backward compatability. -+ Java_sun_awt_motif_XsessionWMcommand; -+ -+ # Java Plugin -+ # This is in awt_LoadLibrary.c and falls through to libmawt. -+ # Evidently plugin needs this for backward compatability. -+ getAwtLockFunctions; -+ getAwtData; -+ getAwtDisplay; -+ -+ # libfontmanager entry points -+ AWTIsHeadless; -+ GrPrim_Sg2dGetCompInfo; -+ GrPrim_Sg2dGetClip; -+ GetNativePrim; -+ SurfaceData_IntersectBounds; -+ SurfaceData_GetOps; -+ Disposer_AddRecord; -+ GrPrim_Sg2dGetEaRGB; -+ GrPrim_Sg2dGetPixel; -+ GrPrim_Sg2dGetLCDTextContrast; -+ -+ Java_sun_awt_motif_MComponentPeer_restoreFocus; -+ Java_sun_awt_DefaultMouseInfoPeer_fillPointWithCoords; -+ Java_sun_awt_DefaultMouseInfoPeer_isWindowUnderMouse; -+ Java_java_awt_AWTEvent_nativeSetSource; -+ Java_java_awt_Checkbox_initIDs; -+ Java_java_awt_Component_initIDs; -+ Java_java_awt_Dialog_initIDs; -+ Java_java_awt_Font_initIDs; -+ Java_sun_awt_KeyboardFocusManagerPeerImpl_clearNativeGlobalFocusOwner; -+ Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusOwner; -+ Java_sun_awt_KeyboardFocusManagerPeerImpl_getNativeFocusedWindow; -+ Java_java_awt_KeyboardFocusManager_initIDs; -+ Java_java_awt_Menu_initIDs; -+ Java_java_awt_MenuComponent_initIDs; -+ Java_java_awt_MenuItem_initIDs; -+ Java_java_awt_Scrollbar_initIDs; -+ Java_java_awt_ScrollPane_initIDs; -+ Java_java_awt_TextArea_initIDs; -+ Java_sun_awt_FontDescriptor_initIDs; -+ Java_sun_awt_motif_MButtonPeer_create; -+ Java_sun_awt_motif_MButtonPeer_setLabel; -+ Java_sun_awt_motif_MCanvasPeer_create; -+ Java_sun_awt_motif_MCanvasPeer_initIDs; -+ Java_sun_awt_motif_MCanvasPeer_resetTargetGC; -+ Java_sun_awt_motif_MCheckboxMenuItemPeer_pSetState; -+ Java_sun_awt_motif_MCheckboxPeer_create; -+ Java_sun_awt_motif_MCheckboxPeer_setCheckboxGroup; -+ Java_sun_awt_motif_MCheckboxPeer_setLabel; -+ Java_sun_awt_motif_MCheckboxPeer_pSetState; -+ Java_sun_awt_motif_MCheckboxPeer_pGetState; -+ Java_sun_awt_motif_MChoicePeer_addItem; -+ Java_sun_awt_motif_MChoicePeer_appendItems; -+ Java_sun_awt_motif_MChoicePeer_create; -+ Java_sun_awt_motif_MChoicePeer_pReshape; -+ Java_sun_awt_motif_MChoicePeer_remove; -+ Java_sun_awt_motif_MChoicePeer_removeAll; -+ Java_sun_awt_motif_MChoicePeer_setBackground; -+ Java_sun_awt_motif_MChoicePeer_pSelect; -+ Java_sun_awt_motif_MChoicePeer_setFont; -+ Java_sun_awt_motif_MChoicePeer_setForeground; -+ Java_sun_awt_motif_MComponentPeer_addNativeDropTarget; -+ Java_sun_awt_motif_MComponentPeer_createBackBuffer; -+ Java_sun_awt_motif_MComponentPeer_destroyBackBuffer; -+ Java_sun_awt_motif_MComponentPeer_getNativeColor; -+ Java_sun_awt_motif_MComponentPeer_getWindow; -+ Java_sun_awt_motif_MComponentPeer_pDisable; -+ Java_sun_awt_motif_MComponentPeer_pDispose; -+ Java_sun_awt_motif_MComponentPeer_pEnable; -+ Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen; -+ Java_sun_awt_motif_MComponentPeer_pGetLocationOnScreen2; -+ Java_sun_awt_motif_MComponentPeer_pHide; -+ Java_sun_awt_motif_MComponentPeer_pInitialize; -+ Java_sun_awt_motif_MComponentPeer_pMakeCursorVisible; -+ Java_sun_awt_motif_MComponentPeer_pReshape; -+ Java_sun_awt_motif_MComponentPeer_pShow; -+ Java_sun_awt_motif_MComponentPeer_removeNativeDropTarget; -+ Java_sun_awt_motif_MComponentPeer_swapBuffers; -+ Java_sun_awt_motif_MComponentPeer_pSetBackground; -+ Java_sun_awt_motif_MComponentPeer_pSetFont; -+ Java_sun_awt_motif_MComponentPeer_processSynchronousLightweightTransfer; -+ Java_sun_awt_motif_MComponentPeer__1requestFocus; -+ Java_sun_awt_motif_MCheckboxMenuItemPeer_getState; -+ Java_sun_awt_motif_MComponentPeer_pSetForeground; -+ Java_sun_awt_motif_MDragSourceContextPeer_startDrag; -+ Java_sun_awt_motif_MDragSourceContextPeer_setNativeCursor; -+ Java_sun_awt_motif_MDropTargetContextPeer_addTransfer; -+ Java_sun_awt_motif_MDropTargetContextPeer_dropDone; -+ Java_sun_awt_motif_MDropTargetContextPeer_startTransfer; -+ Java_sun_awt_motif_X11DragSourceContextPeer_startDrag; -+ Java_sun_awt_motif_X11DragSourceContextPeer_setNativeCursor; -+ Java_sun_awt_motif_X11DropTargetContextPeer_sendResponse; -+ Java_sun_awt_motif_X11DropTargetContextPeer_dropDone; -+ Java_sun_awt_motif_X11DropTargetContextPeer_getData; -+ Java_sun_awt_motif_MEmbeddedFramePeer_NEFcreate; -+ Java_sun_awt_motif_MEmbeddedFramePeer_pShowImpl; -+ Java_sun_awt_motif_MEmbeddedFramePeer_pReshapePrivate; -+ Java_sun_awt_motif_MEmbeddedFramePeer_getBoundsPrivate; -+ Java_sun_awt_motif_MFramePeer_pSetIconImage___3B_3I_3SII; -+ Java_sun_awt_motif_MEmbeddedFramePeer_requestXEmbedFocus; -+ Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedApplicationActive; -+ Java_sun_awt_motif_MEmbeddedFramePeer_isXEmbedActive; -+ Java_sun_awt_motif_MEmbeddedFrame_getWidget; -+ Java_sun_awt_motif_MEmbeddedFrame_mapWidget; -+ Java_sun_awt_motif_MFileDialogPeer_create; -+ Java_sun_awt_motif_MFileDialogPeer_pDispose; -+ Java_sun_awt_motif_MFileDialogPeer_pHide; -+ Java_sun_awt_motif_MFileDialogPeer_pReshape; -+ Java_sun_awt_motif_MFileDialogPeer_pShow; -+ Java_sun_awt_motif_MFileDialogPeer_setFileEntry; -+ Java_sun_awt_motif_MFileDialogPeer_setFont; -+ Java_sun_awt_motif_MFramePeer_pGetIconSize; -+ Java_sun_awt_motif_MGlobalCursorManager_cacheInit; -+ Java_sun_awt_motif_MGlobalCursorManager_findComponentAt; -+ Java_sun_awt_motif_MGlobalCursorManager_findHeavyweightUnderCursor; -+ Java_sun_awt_motif_MGlobalCursorManager_getCursorPos; -+ Java_sun_awt_motif_MGlobalCursorManager_getLocationOnScreen; -+ Java_sun_awt_motif_MLabelPeer_create; -+ Java_sun_awt_motif_MLabelPeer_setAlignment; -+ Java_sun_awt_motif_MLabelPeer_setText; -+ Java_sun_awt_motif_MListPeer_addItem; -+ Java_sun_awt_motif_MListPeer_create; -+ Java_sun_awt_motif_MListPeer_delItems; -+ Java_sun_awt_motif_MListPeer_deselect; -+ Java_sun_awt_motif_MListPeer_isSelected; -+ Java_sun_awt_motif_MListPeer_makeVisible; -+ Java_sun_awt_motif_MListPeer_select; -+ Java_sun_awt_motif_MListPeer_setMultipleSelections; -+ Java_sun_awt_motif_MMenuBarPeer_create; -+ Java_sun_awt_motif_MMenuItemPeer_createMenuItem; -+ Java_sun_awt_motif_MMenuItemPeer_pDisable; -+ Java_sun_awt_motif_MMenuItemPeer_pDispose; -+ Java_sun_awt_motif_MMenuItemPeer_pEnable; -+ Java_sun_awt_motif_MMenuItemPeer_pSetLabel; -+ Java_sun_awt_motif_MMenuPeer_createMenu; -+ Java_sun_awt_motif_MMenuPeer_createSubMenu; -+ Java_sun_awt_motif_MMenuPeer_pDispose; -+ Java_sun_awt_motif_MPopupMenuPeer_createMenu; -+ Java_sun_awt_motif_MPopupMenuPeer_pDispose; -+ Java_sun_awt_motif_MPopupMenuPeer_pShow; -+ Java_sun_awt_motif_MRobotPeer_getRGBPixelsImpl; -+ Java_sun_awt_motif_MRobotPeer_keyPressImpl; -+ Java_sun_awt_motif_MRobotPeer_keyReleaseImpl; -+ Java_sun_awt_motif_MRobotPeer_mouseMoveImpl; -+ Java_sun_awt_motif_MRobotPeer_mousePressImpl; -+ Java_sun_awt_motif_MRobotPeer_mouseReleaseImpl; -+ Java_sun_awt_motif_MRobotPeer_mouseWheelImpl; -+ Java_sun_awt_motif_MRobotPeer_setup; -+ Java_sun_awt_motif_MScrollbarPeer_create; -+ Java_sun_awt_motif_MScrollbarPeer_setLineIncrement; -+ Java_sun_awt_motif_MScrollbarPeer_setPageIncrement; -+ Java_sun_awt_motif_MScrollbarPeer_pSetValues; -+ Java_sun_awt_motif_MScrollPanePeer_create; -+ Java_sun_awt_motif_MScrollPanePeer_pGetBlockIncrement; -+ Java_sun_awt_motif_MScrollPanePeer_pGetScrollbarSpace; -+ Java_sun_awt_motif_MScrollPanePeer_pGetShadow; -+ Java_sun_awt_motif_MScrollPanePeer_pInsets; -+ Java_sun_awt_motif_MScrollPanePeer_pSetIncrement; -+ Java_sun_awt_motif_MScrollPanePeer_pSetScrollChild; -+ Java_sun_awt_motif_MScrollPanePeer_setScrollPosition; -+ Java_sun_awt_motif_MTextAreaPeer_initIDs; -+ Java_sun_awt_motif_MTextAreaPeer_pCreate; -+ Java_sun_awt_motif_MTextAreaPeer_getCaretPosition; -+ Java_sun_awt_motif_MTextAreaPeer_getExtraHeight; -+ Java_sun_awt_motif_MTextAreaPeer_getExtraWidth; -+ Java_sun_awt_motif_MTextAreaPeer_getSelectionEnd; -+ Java_sun_awt_motif_MTextAreaPeer_getSelectionStart; -+ Java_sun_awt_motif_MTextAreaPeer_getText; -+ Java_sun_awt_motif_MTextAreaPeer_insert; -+ Java_sun_awt_motif_MTextAreaPeer_pMakeCursorVisible; -+ Java_sun_awt_motif_MTextAreaPeer_pSetEditable; -+ Java_sun_awt_motif_MTextAreaPeer_pShow2; -+ Java_sun_awt_motif_MTextAreaPeer_replaceRange; -+ Java_sun_awt_motif_MTextAreaPeer_select; -+ Java_sun_awt_motif_MTextAreaPeer_setCaretPosition; -+ Java_sun_awt_motif_MTextAreaPeer_setFont; -+ Java_sun_awt_motif_MTextAreaPeer_setText; -+ Java_sun_awt_motif_MTextAreaPeer_setTextBackground; -+ Java_sun_awt_motif_MTextFieldPeer_initIDs; -+ Java_sun_awt_motif_MTextFieldPeer_pCreate; -+ Java_sun_awt_motif_MTextFieldPeer_getCaretPosition; -+ Java_sun_awt_motif_MTextFieldPeer_getSelectionEnd; -+ Java_sun_awt_motif_MTextFieldPeer_getSelectionStart; -+ Java_sun_awt_motif_MTextFieldPeer_getText; -+ Java_sun_awt_motif_MTextFieldPeer_insertReplaceText; -+ Java_sun_awt_motif_MTextFieldPeer_preDispose; -+ Java_sun_awt_motif_MTextFieldPeer_pSetEditable; -+ Java_sun_awt_motif_MTextFieldPeer_select; -+ Java_sun_awt_motif_MTextFieldPeer_setCaretPosition; -+ Java_sun_awt_motif_MTextFieldPeer_setEchoChar; -+ Java_sun_awt_motif_MTextFieldPeer_setFont; -+ Java_sun_awt_motif_MTextFieldPeer_setText; -+ Java_sun_awt_motif_MToolkit_beep; -+ Java_sun_awt_motif_MToolkit_getLockingKeyStateNative; -+ Java_sun_awt_motif_MToolkit_getMulticlickTime; -+ Java_sun_awt_motif_MToolkit_getNumMouseButtons; -+ Java_sun_awt_motif_MToolkit_getScreenHeight; -+ Java_sun_awt_motif_MToolkit_getScreenResolution; -+ Java_sun_awt_motif_MToolkit_getScreenWidth; -+ Java_sun_awt_motif_MToolkit_init; -+ Java_sun_awt_motif_MToolkit_isDynamicLayoutSupportedNative; -+ Java_sun_awt_motif_MToolkit_isFrameStateSupported; -+ Java_sun_awt_motif_MToolkit_loadSystemColors; -+ Java_sun_awt_motif_MToolkit_makeColorModel; -+ Java_sun_awt_motif_MToolkit_run; -+ Java_sun_awt_motif_MToolkit_sync; -+ Java_sun_awt_motif_MToolkit_isAlwaysOnTopSupported; -+ Java_sun_awt_motif_MWindowAttributes_initIDs; -+ Java_sun_awt_motif_MWindowPeer_pDispose; -+ Java_sun_awt_motif_MWindowPeer_pHide; -+ Java_sun_awt_motif_MWindowPeer_pReshape; -+ Java_sun_awt_motif_MWindowPeer_pSetTitle; -+ Java_sun_awt_motif_MWindowPeer_pShow; -+ Java_sun_awt_motif_MWindowPeer_setResizable; -+ Java_sun_awt_motif_MWindowPeer_toBack; -+ Java_sun_awt_motif_MWindowPeer_addTextComponentNative; -+ Java_sun_awt_motif_MWindowPeer_getState; -+ Java_sun_awt_motif_MWindowPeer_pSetIMMOption; -+ Java_sun_awt_motif_MWindowPeer_pSetMenuBar; -+ Java_sun_awt_motif_MWindowPeer_pShowModal; -+ Java_sun_awt_motif_MWindowPeer_removeTextComponentNative; -+ Java_sun_awt_motif_MWindowPeer_setSaveUnder; -+ Java_sun_awt_motif_MWindowPeer_setState; -+ Java_sun_awt_motif_MWindowPeer_resetTargetGC; -+ Java_sun_awt_motif_MWindowPeer_registerX11DropTarget; -+ Java_sun_awt_motif_MWindowPeer_unregisterX11DropTarget; -+ Java_sun_awt_motif_MWindowPeer_updateAlwaysOnTop; -+ Java_sun_awt_motif_X11CustomCursor_cacheInit; -+ Java_sun_awt_motif_X11CustomCursor_createCursor; -+ Java_sun_awt_motif_X11CustomCursor_queryBestCursor; -+ Java_sun_awt_motif_X11FontMetrics_bytesWidth; -+ Java_sun_awt_motif_X11FontMetrics_getMFCharsWidth; -+ Java_sun_awt_motif_X11FontMetrics_init; -+ Java_sun_awt_X11InputMethod_disposeXIC; -+ Java_sun_awt_X11InputMethod_isCompositionEnabledNative; -+ Java_sun_awt_X11InputMethod_resetXIC; -+ Java_sun_awt_X11InputMethod_setCompositionEnabledNative; -+ Java_sun_awt_X11InputMethod_turnoffStatusWindow; -+ Java_sun_awt_motif_MInputMethod_openXIMNative; -+ Java_sun_awt_motif_MInputMethod_configureStatusAreaNative; -+ Java_sun_awt_motif_MInputMethod_createXICNative; -+ Java_sun_awt_motif_MInputMethod_reconfigureXICNative; -+ Java_sun_awt_motif_MInputMethod_setXICFocusNative; -+ Java_sun_awt_motif_X11Clipboard_getClipboardData; -+ Java_sun_awt_motif_X11Clipboard_getClipboardFormats; -+ Java_sun_awt_motif_X11Clipboard_registerClipboardViewer; -+ Java_sun_awt_motif_X11Clipboard_unregisterClipboardViewer; -+ Java_sun_awt_motif_X11Selection_init; -+ Java_sun_awt_motif_X11Selection_pGetSelectionOwnership; -+ Java_sun_awt_motif_X11Selection_clearNativeContext; -+ Java_sun_awt_SunToolkit_closeSplashScreen; -+ Java_sun_awt_PlatformFont_initIDs; -+ Java_sun_awt_X11GraphicsConfig_init; -+ Java_sun_awt_X11GraphicsConfig_dispose; -+ Java_sun_awt_X11GraphicsConfig_pGetBounds; -+ Java_sun_awt_X11GraphicsConfig_getNumColors; -+ Java_sun_awt_X11GraphicsConfig_getXResolution; -+ Java_sun_awt_X11GraphicsConfig_getYResolution; -+ Java_sun_awt_X11GraphicsDevice_isDBESupported; -+ Java_sun_awt_X11GraphicsDevice_getDisplay; -+ Java_sun_awt_X11GraphicsDevice_getDoubleBufferVisuals; -+ Java_sun_awt_X11GraphicsDevice_getNumConfigs; -+ Java_sun_awt_X11GraphicsDevice_initIDs; -+ Java_sun_awt_X11GraphicsDevice_initXrandrExtension; -+ Java_sun_awt_X11GraphicsDevice_enterFullScreenExclusive; -+ Java_sun_awt_X11GraphicsDevice_exitFullScreenExclusive; -+ Java_sun_awt_X11GraphicsDevice_getCurrentDisplayMode; -+ Java_sun_awt_X11GraphicsDevice_enumDisplayModes; -+ Java_sun_awt_X11GraphicsDevice_configDisplayMode; -+ Java_sun_awt_X11GraphicsDevice_resetNativeData; -+ Java_sun_awt_X11GraphicsEnvironment_checkShmExt; -+ Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum; -+ Java_sun_awt_X11GraphicsEnvironment_getDisplayString; -+ Java_sun_awt_X11GraphicsEnvironment_getNumScreens; -+ Java_sun_awt_X11GraphicsEnvironment_initDisplay; -+ Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama; -+ Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint; -+ -+ -+ -+ Java_java_awt_AWTEvent_initIDs; -+ Java_java_awt_Button_initIDs; -+ Java_java_awt_Container_initIDs; -+ Java_java_awt_Cursor_finalizeImpl; -+ Java_java_awt_Cursor_initIDs; -+ Java_java_awt_Event_initIDs; -+ Java_java_awt_event_InputEvent_initIDs; -+ Java_java_awt_event_KeyEvent_initIDs; -+ Java_java_awt_FileDialog_initIDs; -+ Java_java_awt_Frame_initIDs; -+ Java_java_awt_Insets_initIDs; -+ Java_java_awt_TextField_initIDs; -+ Java_java_awt_Window_initIDs; -+ Java_sun_awt_motif_MCheckboxPeer_getIndicatorSize; -+ Java_sun_awt_motif_MCheckboxPeer_getSpacing; -+ Java_sun_awt_motif_MChoicePeer_freeNativeData; From omajid at redhat.com Wed Feb 16 12:55:50 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 16 Feb 2011 15:55:50 -0500 Subject: [icedtea-web] RFC: add proxy auto config support In-Reply-To: <20110216195129.GB26007@rivendell.middle-earth.co.uk> References: <4D5C23D0.7050809@redhat.com> <20110216195129.GB26007@rivendell.middle-earth.co.uk> Message-ID: <4D5C39D6.2050308@redhat.com> Hi, On 02/16/2011 02:51 PM, Dr Andrew John Hughes wrote: > On 14:21 Wed 16 Feb , Omair Majid wrote: >> The attached patch adds support for reading, parsing and using proxy >> auto config (PAC) files to icedtea-web. >> >> PAC files are written in javascript, so this patch also adds a >> dependency on rhino for building. A dependency on jrunscript is also >> added for testing. >> >> PAC files will be used by both plugin and netx if deployment.proxy.type >> is 2 (PAC) and deployment.proxy.auto.config.url points to a valid PAC >> file. PAC files may also be used by netx if deployment.proxy.type is 3 >> (browser) and the browser (firefox) is using a proxy auto config file >> for resolving proxies. >> >> The PAC file is evaluated inside a sandbox - which only has permissions >> to resolve urls. Because we dont want to grant createclassloader >> permissions, I have had to set (in ProxyAutoConfig.java): >> cx.setOptimizationLevel(-1); >> which works without creating classes (and so works without >> createClassLoader permissions). This option is not available by going >> through the Java ScriptEngine apis. The patch therefore uses the rhino >> apis directly. >> >> Since parsing a PAC file requires access to a set of additional >> functions, the patch also implements them. Tests for these are included. >> >> make check should run these tests and end by printing a line like: >> X of Y tests failed >> >> Any thoughts or comments? >> > > I thought libproxy was going to be used to handle these files. Why are > we implementing this ourselves? > This is one of the possible settings in deployment.properties, and there is no (as far as I can tell) way of implementing this through libproxy. libproxy's api, you see, is essentially limited to: char **px_proxy_factory_get_proxies(pxProxyFactory *self, const char *url); This just provides a list of proxies. We cant actually make libproxy use the settings from deployment.properties :( From the system's point of view, using a single source of proxy settings everywhere is probably the right approach. But then we cant override it using what a user has specified in deployment.properties. > There seems to be a completely broken assumption that rhino.jar is going > to be in the JDK??? It should detect it as IcedTea does. > I think I do. The check for sun.org.mozilla.javascript.Context that you have pointed out later is a check for rhino. And rhino.jar is in the JDK (at least it appears on icedtea6's default builds). > What is jrunscript? I've never heard of this before. > It's a tool under JDK_HOME/bin (in icedtea6 builds). It's a front end to rhino's shell. The patch I posed uses it to run javascript though the shell. > Further comments inline. > Thanks for the comments - they are really appreciated. > >> diff -r cd1eda4f0d97 Makefile.am >> --- a/Makefile.am Tue Feb 15 11:01:01 2011 -0500 >> +++ b/Makefile.am Wed Feb 16 13:59:02 2011 -0500 >> @@ -8,7 +8,7 @@ >> # Build directories >> >> BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0 >> -RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar >> +RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar:$(BOOT_DIR)/jre/lib/rhino.jar >> > > This is broken; you can't just assume that there is a rhino.jar in jre/lib. > Please see my comments below on the symlinks. I am trying to treat rhino.jar identically to jsse.jar. >> # Flags >> IT_CFLAGS=$(CFLAGS) $(ARCHFLAG) >> @@ -86,6 +86,8 @@ >> all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp $(NETX_DIR)/launcher/javaws \ >> javaws.desktop stamps/docs.stamp $(NETX_DIR)/launcher/controlpanel/itweb-settings itweb-settings.desktop >> >> +check-local: check-pac-functions >> + >> clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \ >> clean-native-ecj clean-desktop-files clean-docs >> if [ -e stamps ] ; then \ >> @@ -411,6 +413,14 @@ >> rm -rf ${abs_top_builddir}/docs/plugin >> rm -f stamps/plugin-docs.stamp >> >> + >> +# Tests >> +# ========================== >> + >> +check-pac-functions: stamps/bootstrap-directory.stamp >> + $(BOOT_DIR)/bin/jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \ >> + $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/resources/pac-funcs.js) >> + >> # plugin tests >> >> if ENABLE_PLUGIN >> @@ -450,12 +460,18 @@ >> ln -sf $(JAR) $(BOOT_DIR)/bin/jar >> ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac >> ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc >> + ln -sf $(JRUNSCRIPT) $(BOOT_DIR)/bin/jrunscript >> mkdir -p $(BOOT_DIR)/jre/lib&& \ >> ln -s $(SYSTEM_JDK_DIR)/jre/lib/rt.jar $(BOOT_DIR)/jre/lib&& \ >> if [ -e $(SYSTEM_JDK_DIR)/jre/lib/jsse.jar ] ; then \ >> ln -s $(SYSTEM_JDK_DIR)/jre/lib/jsse.jar $(BOOT_DIR)/jre/lib ; \ >> else \ >> ln -s rt.jar $(BOOT_DIR)/jre/lib/jsse.jar ; \ >> + fi&& \ > > No reason to link to this fi command. That just breaks error reporting. > Will fix. I was essentially trying to copy what the jsse.jar command does above. >> + if [ -e $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar ] ; then \ >> + ln -s $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar $(BOOT_DIR)/jre/lib ; \ >> + else \ >> + ln -s rt.jar $(BOOT_DIR)/jre/lib/rhino.jar ; \ > > This is even more confusing. First you assume that rhino.jar is going to be in > the JDK. If it isn't there, you then symlink to rt.jar??? > I do check for sun.org.mozilla.javascript.Context (that's one of the few rhino classes we care about) in configure. What I wanted to express in the makefile/configure (and clearly failed to) is this: 1. rhino classes are required to build now (that's the configure check). 2. rhino.jar should be included in the classpath if it exists. If rhino.jar does not exist (but we found it's classes), it's probably rt.jar. So symlink rhino.jar to it. 3. Use rhino.jar when trying to compile code. Does that make sense? >> fi >> ln -sf $(SYSTEM_JDK_DIR)/jre/lib/$(JRE_ARCH_DIR) \ >> $(BOOT_DIR)/jre/lib/&& \ >> diff -r cd1eda4f0d97 acinclude.m4 >> --- a/acinclude.m4 Tue Feb 15 11:01:01 2011 -0500 >> +++ b/acinclude.m4 Wed Feb 16 13:59:02 2011 -0500 >> @@ -250,6 +250,40 @@ >> AC_SUBST(ECJ_JAR) >> ]) >> >> +AC_DEFUN([FIND_JRUNSCRIPT], > > Missing prefix; should be IT_FIND_JRUNSCRIPT. > I looked around acinclude.m4 and was slightly confused about the naming. I will fix this and post an update. >> +[ >> + AC_MSG_CHECKING([for jrunscript]) >> + AC_ARG_WITH([jrunscript], >> + [AS_HELP_STRING(--with-jrunscript,specify location of the jrunscript binary)], >> + [ >> + if test -f "${withval}"; then >> + JRUNSCRIPT="${withval}" >> + fi >> + ], > > You don't handle withval being yes or no, which is valid (generated by --with-jrunscript or > --without-jrunscript). > Thanks, I will fix this. >> + [ >> + JRUNSCRIPT=${SYSTEM_JDK_DIR}/bin/jrunscript >> + ]) >> + if test -z "${JRUNSCRIPT}"; then >> + for dir in /usr/lib/jvm/java-openjdk/bin /usr/lib/jvm/icedtea6/bin \ >> + /usr/lib/jvm/java-6-openjdk/bin /usr/lib/jvm/openjdk/bin \ >> + /usr/lib/jvm/java-icedtea/bin /usr/lib/jvm/java-gcj/bin \ >> + /usr/lib/jvm/gcj-jdk/bin ; do >> + if test -e $dir/jrunscript; then >> + JRUNSCRIPT=$dir/jrunscript >> + break >> + fi >> + done >> + if test -z "${JRUNSCRIPT}"; then >> + JRUNSCRIPT=no >> + fi >> + fi >> + AC_MSG_RESULT(${JRUNSCRIPT}) >> + if test "x${JRUNSCRIPT}" = "xno" ; then >> + AC_MSG_WARN([cannot find a jrunscript, use --with-jrunscript]) >> + fi >> + AC_SUBST(JRUNSCRIPT) >> +]) >> + >> AC_DEFUN_ONCE([IT_CHECK_PLUGIN], >> [ >> AC_MSG_CHECKING([whether to build the browser plugin]) >> diff -r cd1eda4f0d97 configure.ac >> --- a/configure.ac Tue Feb 15 11:01:01 2011 -0500 >> +++ b/configure.ac Wed Feb 16 13:59:02 2011 -0500 >> @@ -34,6 +34,7 @@ >> FIND_ECJ_JAR >> IT_FIND_JAVADOC >> AC_CONFIG_FILES([javac], [chmod +x javac]) >> +FIND_JRUNSCRIPT >> >> IT_SET_VERSION >> IT_CHECK_XULRUNNER_VERSION >> @@ -64,6 +65,7 @@ >> IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager]) >> IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie]) >> IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler]) >> +IT_CHECK_FOR_CLASS(SUN_ORG_MOZILLA_JAVASCRIPT_CONTEXT, [sun.org.mozilla.javascript.Context]) > > Ugh... we should be making this list shorter not adding to it. > Why is this necessary? Why can't you use a standard class from the JDK or Rhino? > This is rhino :) Or at least, rhino as icedtea6 ships it. >> IT_CHECK_FOR_CLASS(SUN_SECURITY_PROVIDER_X509FACTORY, [sun.security.provider.X509Factory]) >> IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_SECURITYCONSTANTS, [sun.security.util.SecurityConstants]) >> IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker]) >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java >> --- a/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Tue Feb 15 11:01:01 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Wed Feb 16 13:59:02 2011 -0500 >> @@ -54,6 +54,7 @@ >> >> import net.sourceforge.jnlp.runtime.JNLPProxySelector; >> import net.sourceforge.jnlp.runtime.JNLPRuntime; >> +import net.sourceforge.jnlp.runtime.ProxyAutoConfig; >> >> /** >> * A ProxySelector which can read proxy settings from a browser's >> @@ -85,6 +86,8 @@ >> private String browserSocks4ProxyHost; >> private int browserSocks4ProxyPort; >> >> + private ProxyAutoConfig browserProxyAutoConfig = null; >> + >> /** >> * Create a new instance of this class, reading configuration fropm the browser >> */ >> @@ -128,6 +131,12 @@ >> e.printStackTrace(); >> } >> >> + if (browserProxyType == BROWSER_PROXY_TYPE_PAC) { >> + if (browserAutoConfigUrl != null) { >> + browserProxyAutoConfig = new ProxyAutoConfig(browserAutoConfigUrl); >> + } >> + } >> + >> browserUseSameProxy = Boolean.valueOf(prefs.get("network.proxy.share_proxy_settings")); >> >> browserHttpProxyHost = prefs.get("network.proxy.http"); >> @@ -216,8 +225,21 @@ >> * browser. >> */ >> private List getFromBrowserPAC(URI uri) { >> - System.err.println(R("RPRoxyPacNotImplemented")); >> - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); >> + if (browserAutoConfigUrl == null || uri.getScheme().equals("socket")) { >> + return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); >> + } >> + >> + List proxies = new ArrayList(); >> + >> + try { >> + String proxiesString = browserProxyAutoConfig.getProxies(uri.toURL()); >> + proxies.addAll(getProxiesFromPacResult(proxiesString)); >> + } catch (MalformedURLException e) { >> + e.printStackTrace(); >> + proxies.add(Proxy.NO_PROXY); >> + } >> + >> + return proxies; >> } >> >> /** >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/resources/Messages.properties >> --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 15 11:01:01 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Feb 16 13:59:02 2011 -0500 >> @@ -141,7 +141,6 @@ >> RUnexpected=Unexpected {0} at {1} >> RConfigurationError=Fatal error while reading the configuration >> RConfigurationFatal=ERROR: a fatal error has occurred while loading configuration. Perhaps a global configuration was required but could not be found >> -RPRoxyPacNotImplemented=Using Proxy Auto Config (PAC) files is not supported yet. >> RProxyFirefoxNotFound=Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type. >> RProxyFirefoxOptionNotImplemented=Browser proxy option "{0}" ({1}) not supported yet. >> >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/resources/pac-funcs.js >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/netx/net/sourceforge/jnlp/resources/pac-funcs.js Wed Feb 16 13:59:02 2011 -0500 >> @@ -0,0 +1,830 @@ >> +/* pac-funcs.js >> + Copyright (C) 2011 Red Hat, Inc. >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or >> +modify it under the terms of the GNU General Public License as published by >> +the Free Software Foundation, version 2. >> + > > Shouldn't these headers now say IcedTea-Web? > I am just going with the flow. I can fix this one if you want. Do you want me to fix all others too? /me shudders at the thought of a patch that updates all headers >> +IcedTea is distributed in the hope that it will be useful, >> +but WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give you >> +permission to link this library with independent modules to produce an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. >> +*/ >> + >> +/* >> + * These helper functions are required to be able to parse Proxy Auto Config >> + * (PAC) files. PAC files will use these helper functions to decide the best >> + * proxy for connecting to a host. >> + * >> + * This implementation is based on the description at: >> + * http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html >> + */ > > Based on? To what extent? Is any of this code copied? Is it legal? > There is no code provided at that url (well, there is some code that shows how the functions might be used). Just function descriptions and examples. I made sure not to use any of their examples. The javadocs consist of descriptions of the functions in my own words. Also that url seems dead now :/ This works for me right now: http://web.archive.org/web/20080406080210/http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html >> + >> +/** >> + * Returns true if the host does not contain a domain (there are no dots) >> + */ >> +function isPlainHostName(host) { >> + if (host.indexOf(".") === -1) { >> + return true; >> + } else { >> + return false; >> + } >> +} >> + >> +/** >> + * Returns true if the host is part of the domain (the host ends with domain) >> + */ >> +function dnsDomainIs(host, domain) { >> + var loc = host.lastIndexOf(domain); >> + if (loc === -1) { >> + return false; >> + } >> + if (loc + domain.length === host.length) { >> + // host ends with domain >> + return true; >> + } >> + return false; >> +} >> + >> +/** >> + * Returns true if the host is an exact match of hostdom or if host is not a >> + * fully qualified name but has the same hostname as hostdom >> + */ >> +function localHostOrDomainIs(host, hostdom) { >> + if (host === hostdom) { >> + // exact match >> + return true; >> + } >> + var firstdot = hostdom.indexOf("."); >> + if (firstdot === -1) { >> + // hostdom has no dots >> + return false; >> + } >> + if (host === hostdom.substring(0, firstdot)) { >> + // hostname matches >> + return true; >> + } >> + return false; >> +} >> + >> +/** >> + * Returns true if the host name can be resolved. >> + */ >> +function isResolvable(host) { >> + try { >> + java.net.InetAddress.getByName(host); >> + return true; >> + } catch (e) { >> + //if (e.javaException instanceof java.net.UnknownHostException) { >> + return false; >> + //} else { >> + // throw e; >> + //} >> + } >> +} >> + >> +/** >> + * Return true if the ip address of the host matches the pattern given the mask. >> + */ >> +function isInNet(host, pattern, mask) { >> + if (!isResolvable(host)) { >> + return false; >> + } >> + >> + var hostIp = dnsResolve(host); >> + var hostParts = hostIp.split("."); >> + var patternParts = pattern.split("."); >> + var maskParts = mask.split("."); >> + >> + if (hostParts.length !== 4 || >> + patternParts.length !== hostParts.length || >> + maskParts.length !== hostParts.length) { >> + return false; >> + } >> + >> + var matched = true; >> + for (var i = 0; i< hostParts.length; i++) { >> + var partMatches = (hostParts[i]& maskParts[i]) === (patternParts[i]& maskParts[i]); >> + matched = matched&& partMatches; >> + } >> + >> + return matched; >> +} >> + >> +/** >> + * Returns the IP address of the host as a string >> + */ >> +function dnsResolve(host) { >> + return java.net.InetAddress.getByName(host).getHostAddress() + ""; >> +} >> + >> +/** >> + * Returns the local IP address >> + */ >> +function myIpAddress() { >> + return java.net.InetAddress.getLocalHost().getHostAddress() + ""; >> +} >> + >> +/** >> + * Returns the number of domains in a hostname >> + */ >> +function dnsDomainLevels(host) { >> + var levels = 0; >> + for (var i = 0; i< host.length; i++) { >> + if (host[i] === '.') { >> + levels++; >> + } >> + } >> + return levels; >> +} >> + >> +/** >> + * Returns true if the shell expression matches the given input string >> + */ >> +function shExpMatch(str, shExp) { >> + >> + // TODO support all special characters >> + // right now we support only * and ? >> + >> + >> + try { >> + >> + // turn shExp into a regular expression >> + >> + var work = ""; >> + >> + // escape characters >> + for (var i = 0; i< shExp.length; i++) { >> + var ch = shExp[i]; >> + switch (ch) { >> + case "\\": work = work + "\\\\"; break; >> + case "^": work = work + "\\^"; break; >> + case "$": work = work + "\\$"; break; >> + case "+": work = work + "\\+"; break; >> + case ".": work = work + "\\."; break; >> + case "(": work = work + "\\("; break; >> + case ")": work = work + "\\)"; break; >> + case "{": work = work + "\\{"; break; >> + case "}": work = work + "\\}"; break; >> + case "[": work = work + "\\["; break; >> + case "]": work = work + "\\]"; break; >> + >> + case "?": work = work + ".{1}"; break; >> + case "*": work = work + ".*"; break; >> + >> + default: >> + work = work + ch; >> + } >> + >> + } >> + >> + var regExp = "^" + work + "$"; >> + >> + // match >> + //java.lang.System.out.println("") >> + //java.lang.System.out.println("Input String : " + str); >> + //java.lang.System.out.println("Input Pattern : " + shExp); >> + //java.lang.System.out.println("RegExp : " + regExp.toString()); >> + var match = str.match(regExp); >> + >> + if (match === null) { >> + return false; >> + } else { >> + return true; >> + } >> + >> + >> + } catch (e) { >> + return false; >> + } >> + >> +} >> + >> + >> +/** >> + * Returns true if the current weekday matches the desired weekday(s) >> + * >> + * Possible ways of calling: >> + * weekdayRange(wd1); >> + * weekdayRange(wd1, "GMT"); >> + * weekdayRange(wd1, wd2); >> + * weekdayRange(wd1, wd2, "GMT"); >> + * >> + * Where wd1 and wd2 are one of "SUN", "MON", "TUE", "WED", "THU", "FRI" and >> + * "SAT" >> + * >> + * The argument "GMT", if present, is always the last argument >> + */ >> +function weekdayRange() { >> + var wd1; >> + var wd2; >> + var gmt = false; >> + >> + function isWeekDay(day) { >> + if (day === "SUN" || day === "MON" || day === "TUE" || day === "WED" || >> + day === "THU" || day === "FRI" || day === "SAT") { >> + return true; >> + } >> + return false; >> + } >> + >> + function strToWeekDay(str) { >> + switch (str) { >> + case "SUN": return 0; >> + case "MON": return 1; >> + case "TUE": return 2; >> + case "WED": return 3; >> + case "THU": return 4; >> + case "FRI": return 5; >> + case "SAT": return 6; >> + default: return 0; >> + } >> + } >> + >> + if (arguments.length> 1) { >> + if (arguments[arguments.length-1] === "GMT") { >> + gmt = true; >> + arguments.splice(0,arguments.length-1); >> + } >> + } >> + >> + if (arguments.length === 0) { return false; } >> + >> + wd1 = arguments[0]; >> + >> + if (!isWeekDay(wd1)) { return false; } >> + >> + var today = new Date().getDay(); >> + if (arguments.length>= 2) { >> + // return true if current weekday is between wd1 and wd2 (inclusive) >> + wd2 = arguments[1]; >> + if (!isWeekDay(wd2)) { return false; } >> + >> + var day1 = strToWeekDay(wd1); >> + var day2 = strToWeekDay(wd2); >> + >> + if (day1<= day2) { >> + if ( day1<= today&& today<= day2) { >> + return true; >> + } >> + return false; >> + } else { >> + if (day1<= today || today<= day2) { >> + return true; >> + } >> + return false; >> + } >> + } else { >> + // return true if the current weekday is wd1 >> + if (strToWeekDay(wd1) === today) { >> + return true; >> + } >> + return false; >> + } >> +} >> + >> +/** >> + * Returns true if the current date matches the given date(s) >> + * >> + * Possible ways of calling: >> + * dateRange(day) >> + * dateRange(day1, day2) >> + * dateRange(month) >> + * dateRange(month1, month2) >> + * dateRange(year) >> + * dateRange(year1, year2) >> + * dateRange(day1, month1, day2, month2) >> + * dateRange(month1, year1, month2, year2) >> + * dateRange(day1, month1, year1, day2, month2, year2) >> + * >> + * The parameter "GMT" may additionally be passed as the last argument in any >> + * of the above ways of calling. >> + */ >> +function dateRange() { >> + >> + // note: watch out for wrapping around of dates. date ranges, like >> + // month=9 to month=8, wrap around and cover the entire year. this >> + // makes everything more interesting >> + >> + var gmt; >> + if (arguments.length> 1) { >> + if (arguments[arguments.length-1] === "GMT") { >> + gmt = true; >> + arguments.splice(0,arguments.length-1); >> + } >> + } >> + >> + function isDate(date) { >> + if (typeof(date) === 'number'&& (date<= 31&& date>= 1)) { >> + return true; >> + } >> + return false; >> + } >> + >> + function strToMonth(month) { >> + switch (month) { >> + case "JAN": return 0; >> + case "FEB": return 1; >> + case "MAR": return 2; >> + case "APR": return 3; >> + case "MAY": return 4; >> + case "JUN": return 5; >> + case "JUL": return 6; >> + case "AUG": return 7; >> + case "SEP": return 8; >> + case "OCT": return 9; >> + case "NOV": return 10; >> + case "DEC": return 11; >> + default: return 0; >> + } >> + } >> + >> + function isMonth(month) { >> + if (month === "JAN" || month === "FEB" || month === "MAR" || >> + month === "APR" || month === "MAY" || month === "JUN" || >> + month === "JUL" || month === "AUG" || month === "SEP" || >> + month === "OCT" || month === "NOV" || month === "DEC") { >> + return true; >> + } >> + return false; >> + } >> + >> + function isYear(year) { >> + if (typeof(year) === 'number') { >> + return true; >> + } >> + return false; >> + } >> + >> + function inDateRange(today, date1, date2) { >> + if (date1<= date2) { >> + if (date1<= today.getDate()&& today.getDate()<= date2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + if (date1<= today.getDate() || today.getDate()<= date2) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + } >> + >> + function inMonthRange(today, month1, month2) { >> + if (month1<= month2) { >> + if (month1<= today.getMonth()&& today.getMonth()<= month2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + if (month1<= today.getMonth() || today.getMonth()<= month2) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + } >> + >> + function inYearRange(today, year1, year2) { >> + if (year1<= today.getYear()&& today.getYear()<= year2) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + >> + function inMonthDateRange(today, date1, month1, date2, month2) { >> + if (month1 === month2) { >> + if (today.getMonth() === month1) { >> + if (date1<= today.getDate()&& today.getDate()<= date2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + if (date1<= date2) { >> + return false; >> + } else { >> + return true; >> + } >> + } >> + } else if (month1< month2) { >> + if (month1<= today.getMonth()&& today.getMonth()<= month2) { >> + if (today.getMonth() === month1) { >> + if (today.getDate()>= date1) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (today.getMonth() === month2) { >> + if (today.getDate()<= date2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + return true; >> + } >> + } else { >> + return false; >> + } >> + } else { >> + if (month1<= today.getMonth() || today.getMonth()<= month2) { >> + if (today.getMonth() === month1) { >> + if (today.getDate()>= date1) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (today.getMonth() === month2) { >> + if (today.getDate()<= date2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + return true; >> + } >> + } else { >> + return false; >> + } >> + } >> + } >> + >> + function inYearMonthRange(today, month1, year1, month2, year2) { >> + if (year1 === year2) { >> + if (today.getYear() === year1) { >> + if (month1<= today.getMonth()&& today.getMonth()<= month2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + return false; >> + } >> + } >> + if (year1< year2) { >> + if (year1<= today.getYear()&& today.getYear()<= year2) { >> + if (today.getYear() === year1) { >> + if (today.getMonth()>= month1) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (today.getYear() === year2) { >> + if (today.getMonth()<= month2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + return true; >> + } >> + } else { >> + return false; >> + } >> + } else { >> + return false; >> + } >> + >> + } >> + >> + function inYearMonthDateRange(today, date1, month1, year1, date2, month2, year2) { >> + if (year1 === year2) { >> + if (year1 === today.getYear()) { >> + if ((month1<= today.getMonth())&& (today.getMonth()<= month2)) { >> + if (month1 === month2) { >> + if (date1<= today.getDate()&& today.getDate()<= date2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (today.getMonth() === month1) { >> + if (today.getDate()>= date1) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (today.getMonth() === month2) { >> + if (today.getDate()<= date2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + return true; >> + } >> + } else { >> + return false; >> + } >> + } else { >> + return false; >> + } >> + } else if (year1< year2) { >> + if (year1<= today.getYear()&& today.getYear()<= year2) { >> + if (today.getYear() === year1) { >> + if (today.getMonth() === month1) { >> + if (today.getDate()>= date1) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (today.getMonth()> month1) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (today.getYear() === year2) { >> + if (today.getMonth()<= month2) { >> + >> + } else { >> + return true; >> + } >> + } else { >> + return true; >> + } >> + } else { >> + return false; >> + } >> + } else { >> + return false; >> + } >> + } >> + >> + // TODO: change date to gmt, whatever >> + var today = new Date(); >> + >> + var arg1; >> + var arg2; >> + var arg3; >> + var arg4; >> + var arg5; >> + var arg6; >> + >> + switch (arguments.length) { >> + case 1: >> + var arg = arguments[0]; >> + if (isDate(arg)) { >> + if (today.getDate() === arg) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (isMonth(arg)) { >> + if (strToMonth(arg) === today.getMonth()) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { // year >> + if (today.getYear() === arg) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + case 2: >> + arg1 = arguments[0]; >> + arg2 = arguments[1]; >> + if (isDate(arg1)&& isDate(arg2)) { >> + var date1 = arg1; >> + var date2 = arg2; >> + >> + return inDateRange(today, date1, date2); >> + >> + } else if (isMonth(arg1)&& isMonth(arg2)) { >> + var month1 = strToMonth(arg1); >> + var month2 = strToMonth(arg2); >> + >> + return inMonthRange(today, month1, month2); >> + >> + } else if (isYear(arg1)&& isYear(arg2)) { >> + var year1 = arg1; >> + var year2 = arg2; >> + >> + return inYearRange(today, year1, year2); >> + } else { >> + return false; >> + } >> + case 4: >> + arg1 = arguments[0]; >> + arg2 = arguments[1]; >> + arg3 = arguments[2]; >> + arg4 = arguments[3]; >> + >> + if (isDate(arg1)&& isMonth(arg2)&& isDate(arg3)&& isMonth(arg4)) { >> + var date1 = arg1; >> + var month1 = strToMonth(arg2); >> + var date2 = arg3; >> + var month2 = strToMonth(arg4); >> + >> + return inMonthDateRange(today, date1, month1, date2, month2); >> + >> + } else if (isMonth(arg1)&& isYear(arg2)&& isMonth(arg3)&& isYear(arg4)) { >> + var month1 = strToMonth(arg1); >> + var year1 = arg2; >> + var month2 = strToMonth(arg3); >> + var year2 = arg4; >> + >> + return inYearMonthRange(today, month1, year1, month2, year2); >> + } else { >> + return false; >> + } >> + case 6: >> + arg1 = arguments[0]; >> + arg2 = arguments[1]; >> + arg3 = arguments[2]; >> + arg4 = arguments[3]; >> + arg5 = arguments[4]; >> + arg6 = arguments[5]; >> + if (isDate(arg1)&& isMonth(arg2)&& isYear(arg3)&& >> + isDate(arg4)&& isMonth(arg5)&& isYear(arg6)) { >> + var day1 = arg1; >> + var month1 = strToMonth(arg2); >> + var year1 = arg3; >> + var day2 = arg4; >> + var month2 = strToMonth(arg5); >> + var year2 = arg6; >> + >> + return inYearMonthDateRange(today, day1, month1, year1, day2, month2, year2); >> + } else { >> + return false; >> + } >> + default: >> + return false; >> + } >> + >> +} >> + >> +/** >> + * Returns true if the current time matches the range given >> + * >> + * timeRange(hour) >> + * timeRange(hour1, hour2) >> + * timeRange(hour1, min1, hour2, min2) >> + * timeRange(hour1, min1, sec1, hour2, min2, sec2) >> + * >> + * The string "GMT" can be used as the last additional parameter in addition to >> + * the methods listed above. >> + */ >> +function timeRange() { >> + >> + // watch out for wrap around of times >> + >> + var gmt; >> + if (arguments.length> 1) { >> + if (arguments[arguments.length-1] === "GMT") { >> + gmt = true; >> + arguments.splice(0,arguments.length-1); >> + } >> + } >> + >> + function isHour(hour) { >> + if (typeof(hour) === "number"&& ( 0<= hour&& hour<= 23)) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + >> + function isMin(minute) { >> + if (typeof(minute) === "number"&& (0<= minute&& minute<= 59)) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + >> + function inHourRange(now, hour1, hour2) { >> + if (hour1 === hour2) { >> + if (now.getHours() === hour1) { >> + return true; >> + } else { >> + return false; >> + } >> + } else if (hour1< hour2) { >> + if (hour1<= now.getHours()&& now.getHours()<= hour2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + if (hour1<= now.getHours() || now.getHours()<= hour2) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + } >> + >> + function inHourMinuteRange(now, hour1, min1, hour2, min2) { >> + if (hour1 == hour2) { >> + if (now.getHours() == hour1) { >> + if (min1<= min2) { >> + if (min1<= now.getMinutes()&& now.getMinutes()<= min2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + if (min1<= now.getMinutes() || now.getMinutes()<= min2) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + } else { >> + if (min1<= min2) { >> + return false; >> + } else { >> + return true; >> + } >> + } >> + } else if (hour1< hour2) { >> + if (hour1<= now.getHours()&& now.getHours()<= hour2) { >> + return true; >> + } else { >> + return false; >> + } >> + } else { >> + if (hour1<= now.getHours() || now.getHours()<= hour2) { >> + return true; >> + } else { >> + return false; >> + } >> + } >> + } >> + >> + var today = new Date(); >> + >> + switch (arguments.length) { >> + case 1: >> + var hour = arguments[0]; >> + if (today.getHours() === hour) { >> + return true; >> + } else { >> + return false; >> + } >> + case 2: >> + var hour1 = arguments[0]; >> + var hour2 = arguments[1]; >> + if (isHour(hour1)&& isHour(hour2)) { >> + return inHourRange(today, hour1, hour2); >> + } else { >> + return false; >> + } >> + case 4: >> + var hour1 = arguments[0]; >> + var min1 = arguments[1]; >> + var hour2 = arguments[2]; >> + var min2 = arguments[3]; >> + >> + if (isHour(hour1)&& isMin(min1)&& isHour(hour2)&& isMin(min2)) { >> + return inHourMinuteRange(today, hour1, min1, hour2, min2); >> + } else { >> + return false; >> + } >> + >> + case 6: >> + var hour1 = arguments[0]; >> + var min1 = arguments[1]; >> + var sec1 = arguments[2]; >> + var hour2 = arguments[3]; >> + var min2 = arguments[4]; >> + var sec2 = arguments[5]; >> + >> + // TODO handle seconds properly >> + >> + return inHourMinuteRange(today, hour1, min1, hour2, min2); >> + default: >> + return false; >> + } >> +} >> + >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java >> --- a/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Tue Feb 15 11:01:01 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Wed Feb 16 13:59:02 2011 -0500 >> @@ -16,7 +16,6 @@ >> >> package net.sourceforge.jnlp.runtime; >> >> -import static net.sourceforge.jnlp.runtime.Translator.R; >> import java.io.IOException; >> import java.net.InetAddress; >> import java.net.InetSocketAddress; >> @@ -52,6 +51,8 @@ >> /** The default port to use as a fallback. Currently squid's default port */ >> public static final int FALLBACK_PROXY_PORT = 3128; >> >> + private ProxyAutoConfig proxyAutoConfig = null; >> + >> /** The proxy type. See PROXY_TYPE_* constants */ >> private int proxyType = PROXY_TYPE_UNKNOWN; >> >> @@ -96,8 +97,7 @@ >> >> proxyType = Integer.valueOf(config.getProperty(DeploymentConfiguration.KEY_PROXY_TYPE)); >> >> - String autoConfigString = config >> - .getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); >> + String autoConfigString = config.getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); >> if (autoConfigString != null) { >> try { >> autoConfigUrl = new URL(autoConfigString); >> @@ -106,6 +106,10 @@ >> } >> } >> >> + if (autoConfigUrl != null) { >> + proxyAutoConfig = new ProxyAutoConfig(autoConfigUrl); >> + } >> + >> bypassList = new ArrayList(); >> String proxyBypass = config.getProperty(DeploymentConfiguration.KEY_PROXY_BYPASS_LIST); >> if (proxyBypass != null) { >> @@ -333,14 +337,22 @@ >> * >> * @return a List of valid Proxy objects >> */ >> - private List getFromPAC(URI uri) { >> - if (autoConfigUrl == null) { >> + protected List getFromPAC(URI uri) { >> + if (autoConfigUrl == null || uri.getScheme().equals("socket")) { >> return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); >> } >> - // TODO implement this by reading and using the PAC file >> - System.err.println(R("RPRoxyPacNotImplemented")); >> >> - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); >> + List proxies = new ArrayList(); >> + >> + try { >> + String proxiesString = proxyAutoConfig.getProxies(uri.toURL()); >> + proxies.addAll(getProxiesFromPacResult(proxiesString)); >> + } catch (MalformedURLException e) { >> + e.printStackTrace(); >> + proxies.add(Proxy.NO_PROXY); >> + } >> + >> + return proxies; > > This appears to be the same as the method in getFromBrowserPAC. Could this code not be shared? > It's almost the same method. The only differen is the variable it reads. The proxyAutoConfig in JNLPProxySelector uses the url specifed in deployment.properties file. The brwoserProxyAutoConfig in BrowserAwareProxySelector uses the url specified in Firefox's settings. The two can be quite different. I tried being clever about reusing the proxyAutoConfig object and initializing/reinitializing it, but it made the code uncessarily complex in a few places. This was the cleanest/simplest way I could pull it off. >> } >> >> /** >> @@ -351,5 +363,56 @@ >> */ >> protected abstract List getFromBrowser(URI uri); >> >> + /** >> + * Converts a proxy string from a browser into a List of Proxy objects >> + * suitable for java. >> + * @param pacString a string indicating proxies. For example >> + * "PROXY foo.bar:3128; DIRECT" >> + * @return a list of Proxy objects represeting the parsed string. >> + */ >> + public static List getProxiesFromPacResult(String pacString) { >> + List proxies = new ArrayList(); >> + >> + String[] tokens = pacString.split(";"); >> + for (String token: tokens) { >> + if (token.startsWith("PROXY")) { >> + String hostPortPair = token.substring("PROXY".length()).trim(); >> + if (!hostPortPair.contains(":")) { >> + continue; >> + } >> + String host = hostPortPair.split(":")[0]; >> + int port; >> + try { >> + port = Integer.valueOf(hostPortPair.split(":")[1]); >> + } catch (NumberFormatException nfe) { >> + continue; >> + } >> + SocketAddress sa = new InetSocketAddress(host, port); >> + proxies.add(new Proxy(Type.HTTP, sa)); >> + } else if (token.startsWith("SOCKS")) { >> + String hostPortPair = token.substring("SOCKS".length()).trim(); >> + if (!hostPortPair.contains(":")) { >> + continue; >> + } >> + String host = hostPortPair.split(":")[0]; >> + int port; >> + try { >> + port = Integer.valueOf(hostPortPair.split(":")[1]); >> + } catch (NumberFormatException nfe) { >> + continue; >> + } >> + SocketAddress sa = new InetSocketAddress(host, port); >> + proxies.add(new Proxy(Type.SOCKS, sa)); >> + } else if (token.startsWith("DIRECT")) { >> + proxies.add(Proxy.NO_PROXY); >> + } else { >> + if (JNLPRuntime.isDebug()) { >> + System.out.println("Unrecognized proxy token: " + token); >> + } >> + } >> + } >> + >> + return proxies; >> + } >> >> } >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/runtime/ProxyAutoConfig.java >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/netx/net/sourceforge/jnlp/runtime/ProxyAutoConfig.java Wed Feb 16 13:59:02 2011 -0500 >> @@ -0,0 +1,252 @@ >> +/* ProxyAutoConfig.java >> + Copyright (C) 2011 Red Hat, Inc. >> + >> +This file is part of IcedTea. >> + >> +IcedTea is free software; you can redistribute it and/or >> +modify it under the terms of the GNU General Public License as published by >> +the Free Software Foundation, version 2. >> + >> +IcedTea is distributed in the hope that it will be useful, >> +but WITHOUT ANY WARRANTY; without even the implied warranty of >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU >> +General Public License for more details. >> + >> +You should have received a copy of the GNU General Public License >> +along with IcedTea; see the file COPYING. If not, write to >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA >> +02110-1301 USA. >> + >> +Linking this library statically or dynamically with other modules is >> +making a combined work based on this library. Thus, the terms and >> +conditions of the GNU General Public License cover the whole >> +combination. >> + >> +As a special exception, the copyright holders of this library give you >> +permission to link this library with independent modules to produce an >> +executable, regardless of the license terms of these independent >> +modules, and to copy and distribute the resulting executable under >> +terms of your choice, provided that you also meet, for each linked >> +independent module, the terms and conditions of the license of that >> +module. An independent module is a module which is not derived from >> +or based on this library. If you modify this library, you may extend >> +this exception to your version of the library, but you are not >> +obligated to do so. If you do not wish to do so, delete this >> +exception statement from your version. >> +*/ >> + >> +package net.sourceforge.jnlp.runtime; >> + >> +import java.io.BufferedReader; >> +import java.io.IOException; >> +import java.io.InputStream; >> +import java.io.InputStreamReader; >> +import java.net.SocketPermission; >> +import java.net.URL; >> +import java.security.AccessControlContext; >> +import java.security.AccessController; >> +import java.security.Permissions; >> +import java.security.PrivilegedAction; >> +import java.security.ProtectionDomain; >> + >> +import net.sourceforge.jnlp.util.TimedHashMap; > >> +import sun.org.mozilla.javascript.Context; >> +import sun.org.mozilla.javascript.Function; >> +import sun.org.mozilla.javascript.Scriptable; > > Please don't add more sun.* dependencies. > I only added it because it's rhino. If you are not comfortable having rhino as a required dependency, I can try and make it optional. >> + >> +/** >> + * Represents a ProxyAutoConfig file. This object can be used to evaluate the >> + * proxy file to find the proxy for a given url. >> + * >> + * @see http://en.wikipedia.org/wiki/Proxy_auto-config#The_PAC_file >> + */ >> +public class ProxyAutoConfig { >> + >> + private final String pacHelperFunctionContents; >> + private final String pacContents; >> + private final URL pacUrl; >> + private final TimedHashMap cache; >> + >> + /** >> + * Initialize a new object by using the PAC file located at the given URL. >> + * >> + * @param pacUrl the url of the PAC file to use >> + */ >> + public ProxyAutoConfig(URL pacUrl) { >> + pacHelperFunctionContents = getHelperFunctionContents(); >> + this.pacUrl = pacUrl; >> + pacContents = getPacContents(pacUrl); >> + cache = new TimedHashMap(); >> + } >> + >> + /** >> + * Get the proxies for accessing a given URL. The result is obtained by >> + * evaluating the PAC file with the given url (and the host) as input. >> + * >> + * This method performs caching of the result. >> + * >> + * @param url the url for which a proxy is desired >> + * @return a list of proxies in a string like >> + *
"PROXY foo.example.com:8080; PROXY bar.example.com:8080; DIRECT"
>> + * >> + * @see #getProxiesWithoutCaching(URL) >> + */ >> + public String getProxies(URL url) { >> + String cachedResult = getFromCache(url); >> + if (cachedResult != null) { >> + return cachedResult; >> + } >> + >> + String result = getProxiesWithoutCaching(url); >> + addToCache(url, cachedResult); >> + return result; >> + } >> + >> + /** >> + * Get the proxies for accessing a given URL. The result is obtained by >> + * evaluating the PAC file with the given url (and the host) as input. >> + * >> + * @param url the url for which a proxy is desired >> + * @return a list of proxies in a string like >> + *
"PROXY example.com:3128; DIRECT"
>> + * >> + * @see #getProxies(URL) >> + */ >> + public String getProxiesWithoutCaching(URL url) { >> + if (pacHelperFunctionContents == null) { >> + System.err.println("Error loading pac functions"); >> + return "DIRECT"; >> + } >> + >> + EvaluatePacAction evaluatePacAction = new EvaluatePacAction(pacContents, pacUrl.toString(), >> + pacHelperFunctionContents, url); >> + Permissions p = new Permissions(); >> + p.add(new RuntimePermission("accessClassInPackage.sun.org.mozilla.javascript")); >> + p.add(new SocketPermission("*", "resolve")); >> + ProtectionDomain pd = new ProtectionDomain(null, p); >> + AccessControlContext context = new AccessControlContext(new ProtectionDomain[] { pd }); >> + >> + return AccessController.doPrivileged(evaluatePacAction, context); >> + >> + } >> + >> + /** >> + * Returns the contents of file at pacUrl as a String. >> + */ >> + private String getPacContents(URL pacUrl) { >> + StringBuilder contents = null; >> + try { >> + String line = null; >> + BufferedReader pacReader = new BufferedReader(new InputStreamReader(pacUrl.openStream())); >> + contents = new StringBuilder(); >> + while ((line = pacReader.readLine()) != null) { >> + // System.out.println(line); >> + contents = contents.append(line).append("\n"); >> + } >> + } catch (IOException e) { >> + contents = null; >> + } >> + >> + return (contents != null) ? contents.toString() : null; >> + } >> + >> + /** >> + * Returns the pac helper functions as a String. The functions are read >> + * from net/sourceforge/jnlp/resources/pac-funcs.js >> + */ >> + private String getHelperFunctionContents() { >> + StringBuilder contents = null; >> + try { >> + String line; >> + ClassLoader cl = this.getClass().getClassLoader(); >> + if (cl == null) { >> + cl = ClassLoader.getSystemClassLoader(); >> + } >> + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/resources/pac-funcs.js"); >> + BufferedReader pacFuncsReader = new BufferedReader(new InputStreamReader(in)); >> + contents = new StringBuilder(); >> + while ((line = pacFuncsReader.readLine()) != null) { >> + // System.out.println(line); >> + contents = contents.append(line).append("\n"); >> + } >> + } catch (IOException e) { >> + e.printStackTrace(); >> + contents = null; >> + } >> + >> + return (contents != null) ? contents.toString() : null; >> + } >> + >> + /** >> + * Gets an entry from the cache >> + */ >> + private String getFromCache(URL url) { >> + String lookupString = url.getProtocol() + "://" + url.getHost(); >> + String result = cache.get(lookupString); >> + return result; >> + } >> + >> + /** >> + * Adds an entry to the cache >> + */ >> + private void addToCache(URL url, String proxyResult) { >> + String lookupString = url.getAuthority() + "://" + url.getHost(); >> + cache.put(lookupString, proxyResult); >> + } >> + >> + /** >> + * Helper classs to run remote javascript code (specified by the user as >> + * PAC URL) inside a sandbox. >> + */ >> + private static class EvaluatePacAction implements PrivilegedAction { >> + >> + private String pacContents; >> + private String pacUrl; >> + private String pacFuncsContents; >> + private URL url; >> + >> + public EvaluatePacAction(String pacContents, String pacUrl, String pacFuncsContents, URL url) { >> + this.pacContents = pacContents; >> + this.pacUrl = pacUrl; >> + this.pacFuncsContents = pacFuncsContents; >> + this.url = url; >> + } >> + >> + public String run() { >> + Context cx = Context.enter(); >> + try { >> + /* >> + * TODO defense in depth. >> + * >> + * This is already running within a sandbox, but we can (and we >> + * should) lock it down further. Look into ClassShutter. >> + */ >> + Scriptable scope = cx.initStandardObjects(); >> + // any optimization level greater than -1 will trigger code generation >> + // and this block will then need classloader permissions >> + cx.setOptimizationLevel(-1); >> + Object result = null; >> + result = cx.evaluateString(scope, pacFuncsContents, "internal", 1, null); >> + result = cx.evaluateString(scope, pacContents, pacUrl, 1, null); >> + >> + Object functionObj = scope.get("FindProxyForURL", scope); >> + if (!(functionObj instanceof Function)) { >> + System.err.println("FindProxyForURL not found"); >> + return null; >> + } else { >> + Function findProxyFunction = (Function) functionObj; >> + >> + Object[] args = { url.toString(), url.getHost() }; >> + result = findProxyFunction.call(cx, scope, scope, args); >> + return (String) result; >> + } >> + } catch (Exception e) { >> + e.printStackTrace(); >> + return "DIRECT"; >> + } finally { >> + Context.exit(); >> + } >> + } >> + } >> + >> +} >> diff -r cd1eda4f0d97 tests/netx/pac/pac-funcs-test.js >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/tests/netx/pac/pac-funcs-test.js Wed Feb 16 13:59:02 2011 -0500 >> @@ -0,0 +1,446 @@ >> + >> +var ICEDTEA_CLASSPATH_ORG_IP = "208.78.240.231"; >> +var CLASSPATH_ORG_IP = "199.232.41.10"; > > These should be able to be overridden. Same with others below. > Do you mean make check should be setting the value of these constants? Which others below are you talking about? I only see various 0 and 255 combinations below and they are netmasks. >> + >> +var testsFailed = 0; >> +var testsPassed = 0; >> + >> +print("loading needed files\n"); >> +file = arguments[0] + ""; >> +load(file) >> +print("finished loaded needed files\n"); >> + >> + >> +function main() { >> + >> + testIsPlainHostName(); >> + testDnsDomainIs(); >> + testLocalHostOrDomainIs(); >> + testIsResolvable(); >> + testIsInNet(); >> + testDnsResolve(); >> + testDnsDomainLevels(); >> + testShExpMatch(); >> + testWeekdayRange(); >> + testDateRange(); >> + testTimeRange(); >> + >> + java.lang.System.out.println(testsFailed + " of " + (testsFailed + testsPassed) + " tests failed"); >> +} >> + >> +function runTests(name, tests) { >> + java.lang.System.out.println("Testing: " + name.name); >> + >> + var undefined_var; >> + >> + for ( var i = 0; i< tests.length; i++) { >> + >> + java.lang.System.out.print("Test " + (i + 1) + ": "); >> + var expectedVal = tests[i][0]; >> + var args = tests[i].slice(1); >> + var returnVal; >> +// try { >> + returnVal = name.apply(null, args); >> +// } catch (e) { >> +// returnVal = undefined_var; >> +// } >> + if (returnVal === expectedVal) { >> + java.lang.System.out.println("Passed."); >> + testsPassed++; >> + } else { >> + java.lang.System.out.println("FAILED."); >> + java.lang.System.out.println(name.name + "(" + args.join(", ") + ")"); >> + java.lang.System.out.println("Expected '" + expectedVal + "' but got '" + returnVal + "'"); >> + testsFailed++; >> + } >> + } >> +} >> + >> +function testIsPlainHostName() { >> + var tests = [ >> + [ false, "icedtea.classpath.org" ], >> + [ false, "classpath.org" ], >> + [ true, "org" ], >> + [ true, "icedtea" ], >> + [ false, ".icedtea.classpath.org" ], >> + [ false, "icedtea." ], >> + [ false, "icedtea.classpath." ] >> + ]; >> + >> + runTests(isPlainHostName, tests); >> +} >> + >> +function testDnsDomainIs() { >> + var tests = [ >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], >> + [ true, "icedtea.classpath.org", ".classpath.org" ], >> + [ true, "icedtea.classpath.org", ".org" ], >> + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], >> + [ false, "icedtea.classpath.org", "icedtea.classpath" ], >> + [ false, "icedtea.classpath", "icedtea.classpath.org" ], >> + [ false, "icedtea", "icedtea.classpath.org" ] >> + ]; >> + >> + runTests(dnsDomainIs, tests); >> +} >> + >> +function testLocalHostOrDomainIs() { >> + >> + var tests = [ >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], >> + [ true, "icedtea", "icedtea.classpath.org" ], >> + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], >> + [ false, "icedtea.classpath", "icedtea.classpath.org" ], >> + [ false, "foo.classpath.org", "icedtea.classpath.org" ], >> + [ false, "foo", "icedtea.classpath.org" ] >> + ]; >> + >> + runTests(localHostOrDomainIs, tests); >> +} >> + >> +function testIsResolvable() { >> + >> + var tests = [ >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], >> + [ true, "classpath.org" ], >> + [ false, "icedtea" ], >> + [ false, "foobar.classpath.org" ], >> + [ false, "icedtea.classpath.com" ] >> + ]; >> + >> + runTests(isResolvable, tests); >> +} >> + >> +function testIsInNet() { >> + >> + var parts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); >> + >> + var fakeParts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); >> + fakeParts[0] = fakeParts[0] + 1; >> + >> + function createIp(array) { >> + return array[0] + "." + array[1] + "." + array[2] + "." + array[3]; >> + } >> + >> + var tests = [ >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.0"], >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.0.0"], >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.0.0.0"], >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], >> + [ true, "icedtea.classpath.org", createIp(parts), "255.255.255.255" ], >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.255"], >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.0"], >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.0.0"], >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.0.0.0"], >> + [ true, "icedtea.classpath.org", createIp(fakeParts), "0.0.0.0"] >> + ]; >> + >> + runTests(isInNet, tests); >> +} >> + >> +function testDnsResolve() { >> + var tests = [ >> + [ ICEDTEA_CLASSPATH_ORG_IP, "icedtea.classpath.org" ], >> + //[ CLASSPATH_ORG_IP, "classpath.org" ], >> + [ "127.0.0.1", "localhost" ] >> + ]; >> + >> + runTests(dnsResolve, tests); >> +} >> + >> +function testDnsDomainLevels() { >> + var tests = [ >> + [ 0, "org" ], >> + [ 1, "classpath.org" ], >> + [ 2, "icedtea.classpath.org" ], >> + [ 3, "foo.icedtea.classpath.org" ] >> + ]; >> + >> + runTests(dnsDomainLevels, tests); >> + >> +} >> +function testShExpMatch() { >> + var tests = [ >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org"], >> + [ false, "icedtea.classpath.org", ".org"], >> + [ false, "icedtea.classpath.org", "icedtea."], >> + [ false, "icedtea", "icedtea.classpath.org"], >> + >> + [ true, "icedtea.classpath.org", "*" ], >> + [ true, "icedtea.classpath.org", "*.classpath.org" ], >> + [ true, "http://icedtea.classpath.org", "*.classpath.org" ], >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], >> + [ true, "http://icedtea.classpath.org/foobar/", "*/foobar/*" ], >> + [ true, "http://icedtea.classpath.org/foobar/", "*foobar*" ], >> + [ true, "http://icedtea.classpath.org/foobar/", "*foo*" ], >> + [ false, "http://icedtea.classpath.org/foobar/", "*/foo/*" ], >> + [ false, "http://icedtea.classpath.org/foobar/", "*/foob/*" ], >> + [ false, "http://icedtea.classpath.org/foobar/", "*/fooba/*" ], >> + [ false, "http://icedtea.classpath.org/foo/", "*foobar*" ], >> + >> + [ true, "1", "?" ], >> + [ true, "12", "??" ], >> + [ true, "123", "1?3" ], >> + [ true, "123", "?23" ], >> + [ true, "123", "12?" ], >> + [ true, "1234567890", "??????????" ], >> + [ false, "1234567890", "?????????" ], >> + [ false, "123", "1?1" ], >> + [ false, "123", "??" ], >> + >> + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], >> + [ true, "http://icedtea1.classpath.org/f1/", "*icedtea?.classpath*/f?/*" ], >> + [ false, "http://icedtea.classpath.org/f1/", "*/f2/*" ], >> + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], >> + [ false, "http://icedtea.classpath.org/f1", "f?*"], >> + [ false, "http://icedtea.classpath.org/f1", "f?*"], >> + [ false, "http://icedtea.classpath.org/f1", "f?*"], >> + >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], >> + >> + [ true, "http://icedtea.classpath.org/foo.php?id=bah", "*foo.php*" ], >> + [ false, "http://icedtea.classpath.org/foo_php?id=bah", "*foo.php*" ] >> + ]; >> + >> + runTests(shExpMatch, tests); >> +} >> + >> +function testWeekdayRange() { >> + >> + var today = new Date(); >> + var day = today.getDay(); >> + >> + function dayToStr(day) { >> + switch (day) { >> + case -2: return "FRI"; >> + case -1: return "SAT"; >> + case 0: return "SUN"; >> + case 1: return "MON"; >> + case 2: return "TUE"; >> + case 3: return "WED"; >> + case 4: return "THU"; >> + case 5: return "FRI"; >> + case 6: return "SAT"; >> + case 7: return "SUN"; >> + case 8: return "MON"; >> + default: return "FRI"; >> + } >> + >> + } >> + >> + var tests = [ >> + [ true, dayToStr(day) ], >> + [ false, dayToStr(day+1) ], >> + [ false, dayToStr(day-1) ], >> + ]; >> +} >> + >> +function testDateRange() { >> + >> + function incDate(date) { >> + return (date + 1 - 1) % 31 +1 ; >> + } >> + >> + function decDate(date) { >> + return (date - 1 - 1 + 31) % 31 + 1; >> + } >> + >> + function monthToStr(month) { >> + switch (month) { >> + case -1: return "DEC"; >> + case 0: return "JAN"; >> + case 1: return "FEB"; >> + case 2: return "MAR"; >> + case 3: return "APR"; >> + case 4: return "MAY"; >> + case 5: return "JUN"; >> + case 6: return "JUL"; >> + case 7: return "AUG"; >> + case 8: return "SEP"; >> + case 9: return "OCT"; >> + case 10: return "NOV"; >> + case 11: return "DEC"; >> + case 12: return "JAN"; >> + default: throw "Invalid Month"; >> + } >> + } >> + >> + var today = new Date(); >> + var date = today.getDate(); >> + var month = today.getMonth(); >> + var year = today.getYear(); >> + >> + var tests = [ >> + [ true, date ], >> + [ false, incDate(date) ], >> + [ false, decDate(date) ], >> + >> + [ true, monthToStr(month) ], >> + [ false, monthToStr(month+1) ], >> + [ false, monthToStr(month-1) ], >> + >> + [ true, year ], >> + [ false, year - 1], >> + [ false, year + 1], >> + >> + [ true, date, date ], >> + [ true, date, incDate(date) ], >> + [ true, decDate(date), date ], >> + [ true, decDate(date), incDate(date) ], >> + [ false, incDate(date), decDate(date) ], >> + [ false, decDate(decDate(date)), decDate(date) ], >> + [ false, incDate(date), incDate(incDate(date)) ], >> + >> + [ true, monthToStr(month), monthToStr(month) ], >> + [ true, monthToStr(month), monthToStr(month+1) ], >> + [ true, monthToStr(month-1), monthToStr(month) ], >> + [ true, monthToStr(month-1), monthToStr(month+1) ], >> + [ true, "JAN", "DEC" ], >> + [ true, "DEC", "NOV" ], >> + [ true, "JUL", "JUN"], >> + [ false, monthToStr(month+1), monthToStr(month+1) ], >> + [ false, monthToStr(month-1), monthToStr(month-1) ], >> + [ false, monthToStr(month+1), monthToStr(month-1) ], >> + >> + [ true, year, year ], >> + [ true, year, year+1 ], >> + [ true, year-1, year ], >> + [ true, year-1, year+1 ], >> + [ false, year-2, year-1 ], >> + [ false, year+1, year+1 ], >> + [ false, year+1, year+2 ], >> + [ false, year+1, year-1 ], >> + >> + [ true, date, monthToStr(month) , date, monthToStr(month) ], >> + [ true, decDate(date), monthToStr(month) , date, monthToStr(month) ], >> + [ false, decDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], >> + [ true, date, monthToStr(month) , incDate(date), monthToStr(month) ], >> + [ false, incDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], >> + [ true, decDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], >> + [ false, incDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], >> + [ true, date, monthToStr(month-1) , date, monthToStr(month) ], >> + [ true, date, monthToStr(month) , date, monthToStr(month+1) ], >> + [ true, date, monthToStr(month-1) , date, monthToStr(month+1) ], >> + [ true, incDate(date), monthToStr(month-1) , date, monthToStr(month+1) ], >> + [ true, date, monthToStr(month-1) , decDate(date), monthToStr(month+1) ], >> + [ false, date, monthToStr(month+1) , date, monthToStr(month-1) ], >> + [ false, incDate(date), monthToStr(month+1) , incDate(date), monthToStr(month-1) ], >> + [ false, decDate(date), monthToStr(month+1) , decDate(date), monthToStr(month-1) ], >> + [ true, 1, "JAN", 31, "DEC" ], >> + [ true, 2, "JAN", 1, "JAN" ], >> + [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ], >> + [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ], >> + >> + [ true, monthToStr(month), year, monthToStr(month), year ], >> + [ true, monthToStr(month-1), year, monthToStr(month), year ], >> + [ true, monthToStr(month), year, monthToStr(month+1), year ], >> + [ true, monthToStr(month-1), year, monthToStr(month+1), year ], >> + [ true, monthToStr(0), year, monthToStr(11), year ], >> + [ false, monthToStr(month+1), year, monthToStr(month-1), year ], >> + [ false, monthToStr(month+1), year, monthToStr(month+1), year ], >> + [ false, monthToStr(month-1), year, monthToStr(month-1), year ], >> + [ false, monthToStr(month), year-1, monthToStr(month-1), year ], >> + [ true, monthToStr(month), year, monthToStr(month), year + 1 ], >> + [ true, monthToStr(month), year-1, monthToStr(month), year ], >> + [ true, monthToStr(month), year-1, monthToStr(month), year+1 ], >> + [ true, monthToStr(0), year, monthToStr(0), year+1 ], >> + [ true, monthToStr(0), year-1, monthToStr(0), year+1 ], >> + [ false, monthToStr(0), year-1, monthToStr(11), year-1 ], >> + [ false, monthToStr(0), year+1, monthToStr(11), year+1 ], >> + >> + [ true, date, monthToStr(month), year, date, monthToStr(month), year ], >> + [ true, decDate(date), monthToStr(month), year, incDate(date), monthToStr(month), year ], >> + [ true, decDate(date), monthToStr(month-1), year, incDate(date), monthToStr(month+1), year ], >> + [ true, decDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], >> + [ true, incDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], >> + [ false, incDate(date), monthToStr(month), year, incDate(date), monthToStr(month+1), year+1 ], >> + [ false, date, monthToStr(month+1), year, incDate(date), monthToStr(month+1), year+1 ], >> + [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ], >> + [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ], >> + [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ], >> + [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ], >> + [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ], >> + >> + ]; >> + >> + runTests(dateRange, tests); >> + >> +} >> + >> +function testTimeRange() { >> + var now = new Date(); >> + >> + var hour = now.getHours(); >> + var min = now.getMinutes(); >> + var sec = now.getSeconds(); >> + >> + function toHour(input) { >> + if (input< 0) { >> + while (input< 0) { >> + input = input + 24; >> + } >> + return (input % 24); >> + } else { >> + return (input % 24); >> + } >> + } >> + >> + function toMin(input) { >> + if (input< 0) { >> + while (input< 0) { >> + input = input + 60; >> + } >> + return (input % 60); >> + } else { >> + return (input % 60); >> + } >> + } >> + >> + tests = [ >> + [ true, hour ], >> + [ false, toHour(hour+1)], >> + [ false, toHour(hour-1)], >> + >> + [ true, hour, hour ], >> + [ true, toHour(hour-1), hour ], >> + [ true, hour, toHour(hour+1)], >> + [ true, toHour(hour-1), toHour(hour+1)], >> + [ true, toHour(hour+1), hour ], >> + [ true, hour, toHour(hour-1) ], >> + [ false, toHour(hour-2), toHour(hour-1)], >> + [ false, toHour(hour+1), toHour(hour+2)], >> + [ false, toHour(hour+1), toHour(hour-1) ], >> + [ true, 0, 23 ], >> + [ true, 12, 11 ], >> + >> + [ true, hour, min, hour, min ], >> + [ true, hour, min, hour, toMin(min+1) ], >> + [ true, hour, toMin(min-1), hour, min ], >> + [ true, hour, toMin(min-1), hour, toMin(min+1) ], >> + [ true, hour, toMin(min+2), hour, toMin(min+1) ], >> + [ false, hour, toMin(min+1), hour, toMin(min+1) ], >> + [ false, hour, toMin(min-1), hour, toMin(min-1) ], >> + [ false, hour, toMin(min+1), hour, toMin(min-1) ], >> + [ true, toHour(hour-1), min, hour, min ], >> + [ true, hour, min, toHour(hour+1), min ], >> + [ true, toHour(hour-1), min, toHour(hour+1), min ], >> + [ true, 0, 0, 23, 59 ], >> + [ true, 0, 1, 0, 0 ], >> + >> + [ true, 0, 1, 0, 0, 0, 0 ], >> + [ true, hour, min, sec, hour, min, sec ], >> + [ true, hour, min, sec, hour, min + 10, sec ], >> + [ true, hour, min, sec - 10, hour, min, sec ], >> + [ true, hour, min, sec, hour, min-1 , sec ], >> + >> + ]; >> + >> + runTests(timeRange, tests); >> +} >> + >> +main(); > > Needs work. Nice summary :) I posted this knowing it was (very likely) incomplete. Thanks for your comments. They are always appreciated! Cheers, Omair From mjw at icedtea.classpath.org Wed Feb 16 13:24:16 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Wed, 16 Feb 2011 21:24:16 +0000 Subject: /hg/icedtea6: PR632: 6878713.patch breaks shark zero build Message-ID: changeset 3f247fe29393 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3f247fe29393 author: Mark Wielaard date: Wed Feb 16 22:23:50 2011 +0100 PR632: 6878713.patch breaks shark zero build 2011-02-16 Xerxes Ranby Mark Wielaard PR632: 6878713.patch breaks shark zero build * patches/icedtea-stdc-limit-macros.patch (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): Only define __STDC_LIMIT_MACROS if undefined. * Makefile.am (ICEDTEA_PATCHES): Add new patch. * NEWS: Updated. diffstat: 4 files changed, 24 insertions(+) ChangeLog | 10 ++++++++++ Makefile.am | 1 + NEWS | 1 + patches/icedtea-stdc-limit-macros.patch | 12 ++++++++++++ diffs (55 lines): diff -r 58276c6748af -r 3f247fe29393 ChangeLog --- a/ChangeLog Wed Feb 16 20:22:31 2011 +0000 +++ b/ChangeLog Wed Feb 16 22:23:50 2011 +0100 @@ -1,3 +1,13 @@ 2011-02-16 Andrew John Hughes + Mark Wielaard + + PR632: 6878713.patch breaks shark zero build + * patches/icedtea-stdc-limit-macros.patch + (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): + Only define __STDC_LIMIT_MACROS if undefined. + * Makefile.am (ICEDTEA_PATCHES): Add new patch. + * NEWS: Updated. + 2011-02-16 Andrew John Hughes * patches/icedtea-nomotif-6706121.patch: diff -r 58276c6748af -r 3f247fe29393 Makefile.am --- a/Makefile.am Wed Feb 16 20:22:31 2011 +0000 +++ b/Makefile.am Wed Feb 16 22:23:50 2011 +0100 @@ -186,6 +186,7 @@ SECURITY_PATCHES = patches/security/2011 ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ + patches/icedtea-stdc-limit-macros.patch \ patches/openjdk/4993545-nativeinlightfixer.patch \ patches/openjdk/6637796-set_bounds.patch \ patches/openjdk/6607660-treelock.patch \ diff -r 58276c6748af -r 3f247fe29393 NEWS --- a/NEWS Wed Feb 16 20:22:31 2011 +0000 +++ b/NEWS Wed Feb 16 22:23:50 2011 +0100 @@ -418,6 +418,7 @@ New in release 1.10 (2011-XX-XX): - S7015232: missing copyright header in CheckZOrderChange.java - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. + - PR632: patches/security/20110215/6878713.patch breaks shark zero build * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc diff -r 58276c6748af -r 3f247fe29393 patches/icedtea-stdc-limit-macros.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/icedtea-stdc-limit-macros.patch Wed Feb 16 22:23:50 2011 +0100 @@ -0,0 +1,12 @@ +--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp +@@ -72,7 +72,9 @@ + # endif + + #ifdef LINUX ++#ifndef __STDC_LIMIT_MACROS + #define __STDC_LIMIT_MACROS ++#endif + #include + #include + #include From mark at klomp.org Wed Feb 16 13:28:16 2011 From: mark at klomp.org (Mark Wielaard) Date: Wed, 16 Feb 2011 22:28:16 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build Message-ID: <1297891696.3413.18.camel@springer.wildebeest.org> Hi, As noticed by the autobuilders and as discussed in http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=632 one of the new security patches breaks the shark build since llvm-config might add a -D__STDC_LIMIT_MACROS. The following patch fixes it: 2011-02-16 Xerxes Ranby Mark Wielaard PR632: 6878713.patch breaks shark zero build * patches/icedtea-stdc-limit-macros.patch (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): Only define __STDC_LIMIT_MACROS if undefined. * Makefile.am (ICEDTEA_PATCHES): Add new patch. * NEWS: Updated. Committed and pushed, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: PR632.patch Type: text/x-patch Size: 1545 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110216/c972fd55/PR632.patch From dlila at redhat.com Wed Feb 16 13:47:30 2011 From: dlila at redhat.com (Denis Lila) Date: Wed, 16 Feb 2011 16:47:30 -0500 (EST) Subject: Request for backport In-Reply-To: <173404904.152554.1297892257537.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <334801333.152734.1297892850443.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. I would like to backport these two changesets: http://hg.openjdk.java.net/jdk7/2d/jdk/rev/a56641c1f54e http://hg.openjdk.java.net/jdk7/2d/jdk/rev/3bc4d79d8123 They fix a couple of bugs, add a test and make patches/openjdk/6896068-sg2d.patch apply more cleanly. Ok to push? Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: hg.diff Type: text/x-patch Size: 21307 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110216/d42f7991/hg.diff From ahughes at redhat.com Wed Feb 16 13:47:52 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 16 Feb 2011 21:47:52 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <1297891696.3413.18.camel@springer.wildebeest.org> References: <1297891696.3413.18.camel@springer.wildebeest.org> Message-ID: <20110216214752.GC26007@rivendell.middle-earth.co.uk> On 22:28 Wed 16 Feb , Mark Wielaard wrote: > Hi, > > As noticed by the autobuilders and as discussed in > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=632 one of the new > security patches breaks the shark build since llvm-config might add a > -D__STDC_LIMIT_MACROS. The following patch fixes it: > > 2011-02-16 Xerxes Ranby > Mark Wielaard > > PR632: 6878713.patch breaks shark zero build > * patches/icedtea-stdc-limit-macros.patch > (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): > Only define __STDC_LIMIT_MACROS if undefined. > * Makefile.am (ICEDTEA_PATCHES): Add new patch. > * NEWS: Updated. > > Committed and pushed, > > Mark Did you test this with both versions of HotSpot? > diff -r 58276c6748af -r 3f247fe29393 Makefile.am > --- a/Makefile.am Wed Feb 16 20:22:31 2011 +0000 > +++ b/Makefile.am Wed Feb 16 22:23:50 2011 +0100 > @@ -186,6 +186,7 @@ > > ICEDTEA_PATCHES = \ > $(SECURITY_PATCHES) \ > + patches/icedtea-stdc-limit-macros.patch \ > patches/openjdk/4993545-nativeinlightfixer.patch \ > patches/openjdk/6637796-set_bounds.patch \ > patches/openjdk/6607660-treelock.patch \ > diff -r 58276c6748af -r 3f247fe29393 NEWS > --- a/NEWS Wed Feb 16 20:22:31 2011 +0000 > +++ b/NEWS Wed Feb 16 22:23:50 2011 +0100 > @@ -418,6 +418,7 @@ > - S7015232: missing copyright header in CheckZOrderChange.java > - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java > - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. > + - PR632: patches/security/20110215/6878713.patch breaks shark zero build > * Bug fixes > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > - PR616, PR99: Don't statically link libstdc++ or libgcc > diff -r 58276c6748af -r 3f247fe29393 patches/icedtea-stdc-limit-macros.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/icedtea-stdc-limit-macros.patch Wed Feb 16 22:23:50 2011 +0100 > @@ -0,0 +1,12 @@ > +--- openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp > ++++ openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp > +@@ -72,7 +72,9 @@ > + # endif > + > + #ifdef LINUX > ++#ifndef __STDC_LIMIT_MACROS > + #define __STDC_LIMIT_MACROS > ++#endif > + #include > + #include > + #include -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From mark at klomp.org Wed Feb 16 13:50:05 2011 From: mark at klomp.org (Mark Wielaard) Date: Wed, 16 Feb 2011 22:50:05 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <20110216214752.GC26007@rivendell.middle-earth.co.uk> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> Message-ID: <1297893005.3413.20.camel@springer.wildebeest.org> On Wed, 2011-02-16 at 21:47 +0000, Dr Andrew John Hughes wrote: > On 22:28 Wed 16 Feb , Mark Wielaard wrote: > > 2011-02-16 Xerxes Ranby > > Mark Wielaard > > > > PR632: 6878713.patch breaks shark zero build > > * patches/icedtea-stdc-limit-macros.patch > > (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): > > Only define __STDC_LIMIT_MACROS if undefined. > > * Makefile.am (ICEDTEA_PATCHES): Add new patch. > > * NEWS: Updated. > > > Did you test this with both versions of HotSpot? No, but I don't see how it would fail, the patch is right after the patch that broke it. It is currently going through all the buildbot builders. If you have configurations you want to have regularly tested please setup a buildslave for it. Thanks, Mark From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 13:58:39 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 21:58:39 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|major |normal Status|REOPENED |RESOLVED Resolution| |WORKSFORME Version|unspecified |6-1.9.7 ------- Comment #10 from gnu_andrew at member.fsf.org 2011-02-16 21:58 ------- Why did you alter the version this is reported against? You are specifying --with-openjdk=/usr/lib/jvm/java-1.6.0-openjdk-1.6.0.0.${_arch} . The --with-openjdk option (now --disable-bootstrap in HEAD for clarity) is a shortcut to enable a quick build if you already have a copy of IcedTea installed, but it can happen that there are conflicts between the version of OpenJDK being compiled and the installed OpenJDK. That's what's happening here due to changes introduced by the security patches. As Caster has mentioned already, you can still build using the standard ./configure and make method which uses gcj to do an initial bootstrap and actually tests the built JDK by building itself with it. Alternatively, if you really want a quick build, you can do so without webstart and the plugin. These versions are outdated anyway and will be disabled by default in any future releases of this branch. You should start looking at switching to IcedTea-Web as these versions receive security fixes ONLY. We don't make build changes on release branches because the risk far outweighs the gain. Changing things could cause much worse breakage, while the only problem here is that the hacky quick build is broken with webstart and netx enabled, a problem which can be easily worked around by using different build options. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 14:09:07 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 22:09:07 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #11 from mark at klomp.org 2011-02-16 22:09 ------- (In reply to comment #10) > Why did you alter the version this is reported against? Not deliberately, maybe some weird bugzilla glitch. > it can happen that there are conflicts between the version of > OpenJDK being compiled and the installed OpenJDK. That's what's happening here > due to changes introduced by the security patches. It looks to me that it is actually because of the weird netx build rule that apparently includes the wrong source version. So it was a latent bug that was just exposed by this security fix. > We don't make build changes on release branches because the risk far outweighs > the gain. Changing things could cause much worse breakage, while the only > problem here is that the hacky quick build is broken with webstart and netx > enabled, a problem which can be easily worked around by using different build > options. I don't agree with your priorities (we shouldn't make fixes on release branches that break working configurations). But since you maintain the branch and not I. OK. Lets keep it closed. You are definitely right that there are workarounds available. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 15:38:17 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 16 Feb 2011 23:38:17 +0000 Subject: [Bug 633] New: icedtea installs javaws manpages on x86 even with --disable-webstart Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=633 Summary: icedtea installs javaws manpages on x86 even with -- disable-webstart Product: IcedTea Version: 6-1.9.7 Platform: x86 OS/Version: Linux Status: NEW Severity: trivial Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: caster at gentoo.org Both english and japanese manpage for javaws are installed on x86 with --disable-webstart. On amd64, this does not occur (don't know about other arches). The manpages are Sun-branded, unlike those installed with --enable-webstart. On Gentoo, this is a minor trouble when installing icedtea-web on top, because of file collisions. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 16 19:10:06 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 17 Feb 2011 03:10:06 +0000 Subject: [Bug 633] icedtea installs javaws manpages on x86 even with --disable-webstart Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=633 ------- Comment #1 from acrux at linuxmail.org 2011-02-17 03:10 ------- here on CRUX PPC the same thing. On ppc javaws manpage is installed albeit icedtea6-1.9.7 is built with --disable-plugin --disable-webstart instead this doesn't occour on ppc64. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 17 06:27:24 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 17 Feb 2011 14:27:24 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #12 from caster at gentoo.org 2011-02-17 14:27 ------- For the record, 1.8.7 fails even with webstart disabled, on the same error, but much earlier in the build. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 17 07:02:47 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 17 Feb 2011 15:02:47 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #13 from gnu_andrew at member.fsf.org 2011-02-17 15:02 ------- 'we shouldn't make fixes on release branches that break working configurations' So we shouldn't apply security fixes??? You may be able to fix the issue by twiddling the netx build but you risk breaking one of the other configurations. If you can find a simple fix, then we can consider it but I know making such changes on release branches has caused problems in the past (ask doko). -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Thu Feb 17 07:03:53 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 17 Feb 2011 15:03:53 +0000 Subject: What I like to see Message-ID: <20110217150353.GA8495@rivendell.middle-earth.co.uk> Thought this was worth posting about: http://mail.openjdk.java.net/pipermail/security-dev/2011-February/002828.html It's sadly rare that OpenJDK6 has a fix that the proprietary JDK doesn't :-) -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Thu Feb 17 07:21:09 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 17 Feb 2011 15:21:09 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #14 from mark at klomp.org 2011-02-17 15:21 ------- (In reply to comment #12) > For the record, 1.8.7 fails even with webstart disabled, on the same error, but > much earlier in the build. Could you post some context? Would be interesting to see where (and how) it precisely breaks. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 17 07:21:37 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 17 Feb 2011 15:21:37 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 ------- Comment #15 from mark at klomp.org 2011-02-17 15:21 ------- (In reply to comment #13) > 'we shouldn't make fixes on release branches that break working configurations' > > So we shouldn't apply security fixes??? That is not what I am saying. A "security issue" is just a bug like all others. You have to determine whether breaking things and introducing other bugs is worth it for fixing any bug. I do appreciate you made that decision for this release branch. And since you maintain it, you can indeed make that call. > You may be able to fix the issue by twiddling the netx build but you risk > breaking one of the other configurations. Clearly we need even more buildslaves :) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Thu Feb 17 08:58:40 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 17 Feb 2011 16:58:40 +0000 Subject: Request for backport In-Reply-To: <334801333.152734.1297892850443.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <173404904.152554.1297892257537.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <334801333.152734.1297892850443.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110217165840.GC8495@rivendell.middle-earth.co.uk> On 16:47 Wed 16 Feb , Denis Lila wrote: > Hi. > > I would like to backport these two changesets: > > http://hg.openjdk.java.net/jdk7/2d/jdk/rev/a56641c1f54e > http://hg.openjdk.java.net/jdk7/2d/jdk/rev/3bc4d79d8123 > > They fix a couple of bugs, add a test and make > patches/openjdk/6896068-sg2d.patch apply more cleanly. > > Ok to push? > > Thank you, > Denis. Looks good to me. Thanks for keeping on top of these backports. > diff -r 3f247fe29393 ChangeLog > --- a/ChangeLog Wed Feb 16 22:23:50 2011 +0100 > +++ b/ChangeLog Wed Feb 16 16:49:54 2011 -0500 > @@ -1,3 +1,10 @@ > +2011-02-16 Denis Lila > + > + * NEWS: Update with the backports > + * Makefile.am (ICEDTEA_PATCHES): Added the 2 patches > + * patches/openjdk/6728834-blurred-lcd-aa-text.patch > + * patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch > + > 2011-02-16 Xerxes Ranby > Mark Wielaard > > diff -r 3f247fe29393 Makefile.am > --- a/Makefile.am Wed Feb 16 22:23:50 2011 +0100 > +++ b/Makefile.am Wed Feb 16 16:49:54 2011 -0500 > @@ -304,6 +304,8 @@ > patches/no-static-linking.patch \ > patches/rh676659-gcc-export-dynamic.patch \ > patches/g344659-sparc_fix.patch \ > + patches/openjdk/6728834-blurred-lcd-aa-text.patch \ > + patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ > patches/openjdk/6896068-sg2d.patch > > if !WITH_ALT_HSBUILD > diff -r 3f247fe29393 NEWS > --- a/NEWS Wed Feb 16 22:23:50 2011 +0100 > +++ b/NEWS Wed Feb 16 16:49:54 2011 -0500 > @@ -419,6 +419,8 @@ > - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java > - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. > - PR632: patches/security/20110215/6878713.patch breaks shark zero build > + - S6749060: LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only) > + - S6728834: D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination > * Bug fixes > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > - PR616, PR99: Don't statically link libstdc++ or libgcc > diff -r 3f247fe29393 patches/openjdk/6728834-blurred-lcd-aa-text.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6728834-blurred-lcd-aa-text.patch Wed Feb 16 16:49:54 2011 -0500 > @@ -0,0 +1,226 @@ > +# HG changeset patch > +# User tdv > +# Date 1217874568 25200 > +# Node ID a56641c1f54e4a81a42ca755a952fd772c14a511 > +# Parent e62bc7b05b8a7cd11d7e76f1c29cf07f0c3c7d34 > +6728834: D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination > +Reviewed-by: campbell > + > +diff -r e62bc7b05b8a -r a56641c1f54e src/share/classes/sun/java2d/opengl/OGLSurfaceData.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java Mon Aug 04 18:50:43 2008 +0400 > ++++ openjdk/jdk/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java Mon Aug 04 11:29:28 2008 -0700 > +@@ -401,6 +401,7 @@ > + * - the fragment shader extension is available, and > + * - blending is disabled, and > + * - the source color is opaque > ++ * - and the destination is opaque > + * > + * Eventually, we could enhance the native OGL text rendering code > + * and remove the above restrictions, but that would require significantly > +@@ -410,7 +411,8 @@ > + return > + graphicsConfig.isCapPresent(CAPS_EXT_LCD_SHADER) && > + sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && > +- sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR; > ++ sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR && > ++ sg2d.surfaceData.getTransparency() == Transparency.OPAQUE; > + } > + > + public void validatePipe(SunGraphics2D sg2d) { > +diff -r e62bc7b05b8a -r a56641c1f54e src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java > +--- openjdk.orig/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java Mon Aug 04 18:50:43 2008 +0400 > ++++ openjdk/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java Mon Aug 04 11:29:28 2008 -0700 > +@@ -501,12 +501,14 @@ > + * - the pixel shaders are available, and > + * - blending is disabled, and > + * - the source color is opaque > ++ * - and the destination is opaque > + */ > + public boolean canRenderLCDText(SunGraphics2D sg2d) { > + return > + graphicsDevice.isCapPresent(CAPS_LCD_SHADER) && > + sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && > +- sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR; > ++ sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR && > ++ sg2d.surfaceData.getTransparency() == Transparency.OPAQUE; > + } > + > + public void validatePipe(SunGraphics2D sg2d) { > +diff -r e62bc7b05b8a -r a56641c1f54e test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java Mon Aug 04 11:29:28 2008 -0700 > +@@ -0,0 +1,174 @@ > ++/* > ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > ++ * CA 95054 USA or visit www.sun.com if you need additional information or > ++ * have any questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6728834 > ++ * @summary Tests that LCD AA text rendering works properly with destinations > ++ * being VolatileImage of all transparency types > ++ * @author Dmitri.Trembovetski: area=Graphics > ++ * @run main/manual/othervm NonOpaqueDestLCDAATest > ++ * @run main/manual/othervm -Dsun.java2d.opengl=True NonOpaqueDestLCDAATest > ++ */ > ++ > ++import java.awt.AlphaComposite; > ++import java.awt.Color; > ++import java.awt.Dimension; > ++import java.awt.EventQueue; > ++import java.awt.Graphics; > ++import java.awt.Graphics2D; > ++import java.awt.GraphicsConfiguration; > ++import java.awt.RenderingHints; > ++import java.awt.event.ActionEvent; > ++import java.awt.event.ActionListener; > ++import java.awt.event.ComponentAdapter; > ++import java.awt.event.ComponentEvent; > ++import java.awt.event.WindowAdapter; > ++import java.awt.event.WindowEvent; > ++import java.awt.image.VolatileImage; > ++import java.io.File; > ++import java.util.concurrent.CountDownLatch; > ++import javax.imageio.ImageIO; > ++import javax.swing.JButton; > ++import javax.swing.JFrame; > ++import javax.swing.JPanel; > ++import javax.swing.JTextArea; > ++import static java.awt.Transparency.*; > ++ > ++public class NonOpaqueDestLCDAATest extends JFrame implements ActionListener { > ++ private static volatile boolean passed = true; > ++ private static CountDownLatch complete = new CountDownLatch(1); > ++ > ++ public NonOpaqueDestLCDAATest() { > ++ JTextArea desc = new JTextArea(); > ++ desc.setText( > ++ "\n Instructions: the three text strings below should appear\n" + > ++ " readable, without smudges or misshapen bold glyphs.\n\n" + > ++ " If they look fine the test PASSED otherwise it FAILED.\n"); > ++ desc.setEditable(false); > ++ desc.setBackground(Color.black); > ++ desc.setForeground(Color.green); > ++ add("North", desc); > ++ JPanel renderPanel = new JPanel() { > ++ public void paintComponent(Graphics g) { > ++ render(g, getWidth(), getHeight()); > ++ } > ++ }; > ++ renderPanel.setPreferredSize(new Dimension(350, 150)); > ++ renderPanel.addComponentListener(new ComponentAdapter() { > ++ public void componentResized(ComponentEvent e) { > ++ images = null; > ++ } > ++ }); > ++ add("Center", renderPanel); > ++ > ++ JButton passed = new JButton("Passed"); > ++ JButton failed = new JButton("Failed"); > ++ passed.addActionListener(this); > ++ failed.addActionListener(this); > ++ JPanel p = new JPanel(); > ++ p.add(passed); > ++ p.add(failed); > ++ add("South", p); > ++ addWindowListener(new WindowAdapter() { > ++ public void windowClosing(WindowEvent e) { > ++ complete.countDown(); > ++ } > ++ }); > ++ setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); > ++ } > ++ > ++ public void render(Graphics g, int w, int h) { > ++ initImages(w, h); > ++ > ++ Graphics2D g2d = (Graphics2D) g.create(); > ++ for (VolatileImage vi : images) { > ++ g2d.drawImage(vi, 0, 0, null); > ++ g2d.translate(0, vi.getHeight()); > ++ } > ++ } > ++ > ++ String tr[] = { "OPAQUE", "BITMASK", "TRANSLUCENT" }; > ++ public void actionPerformed(ActionEvent e) { > ++ if (e.getActionCommand().equals("Passed")) { > ++ passed = true; > ++ System.out.println("Test Passed"); > ++ } else if (e.getActionCommand().equals("Failed")) { > ++ System.out.println("Test Failed"); > ++ for (int i = 0; i < images.length; i++) { > ++ String f = "NonOpaqueDestLCDAATest_"+tr[i]+".png"; > ++ try { > ++ ImageIO.write(images[i].getSnapshot(), "png", new File(f)); > ++ System.out.printf("Dumped %s image to %s\n", tr[i], f); > ++ } catch (Throwable t) {} > ++ } > ++ passed = false; > ++ } > ++ dispose(); > ++ complete.countDown(); > ++ } > ++ > ++ static void clear(Graphics2D g, int w, int h) { > ++ Graphics2D gg = (Graphics2D) g.create(); > ++ gg.setColor(new Color(0, 0, 0, 0)); > ++ gg.setComposite(AlphaComposite.Src); > ++ gg.fillRect(0, 0, w, h); > ++ } > ++ > ++ VolatileImage images[]; > ++ private void initImages(int w, int h) { > ++ if (images == null) { > ++ images = new VolatileImage[3]; > ++ GraphicsConfiguration gc = getGraphicsConfiguration(); > ++ for (int i = OPAQUE; i <= TRANSLUCENT; i++) { > ++ VolatileImage vi = > ++ gc.createCompatibleVolatileImage(w,h/3,i); > ++ images[i-1] = vi; > ++ vi.validate(gc); > ++ Graphics2D g2d = (Graphics2D) vi.getGraphics(); > ++ if (i > OPAQUE) { > ++ clear(g2d, vi.getWidth(), vi.getHeight()); > ++ } > ++ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, > ++ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB); > ++ String s = "LCD AA Text rendered to "+tr[i-1]+ " destination"; > ++ g2d.drawString(s, 10, vi.getHeight()/2); > ++ } > ++ } > ++ } > ++ > ++ public static void main(String[] args) throws InterruptedException { > ++ EventQueue.invokeLater(new Runnable() { > ++ public void run() { > ++ NonOpaqueDestLCDAATest t = new NonOpaqueDestLCDAATest(); > ++ t.pack(); > ++ t.setVisible(true); > ++ } > ++ }); > ++ > ++ complete.await(); > ++ if (!passed) { > ++ throw new RuntimeException("Test Failed!"); > ++ } > ++ } > ++} > diff -r 3f247fe29393 patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch Wed Feb 16 16:49:54 2011 -0500 > @@ -0,0 +1,219 @@ > +# HG changeset patch > +# User tdv > +# Date 1223597570 25200 > +# Node ID 3bc4d79d8123bbc0307e0e58f7c64ee663e25af9 > +# Parent 41ff3f84cd9608ef1b4ecd0a823a8ff188712784 > +6749060: LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only) > +Reviewed-by: campbell, prr > + > +diff -r 41ff3f84cd96 -r 3bc4d79d8123 src/share/classes/sun/java2d/SurfaceData.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/SurfaceData.java Wed Sep 24 11:58:21 2008 -0700 > ++++ openjdk/jdk/src/share/classes/sun/java2d/SurfaceData.java Thu Oct 09 17:12:50 2008 -0700 > +@@ -449,7 +449,8 @@ > + // For now the answer can only be true in the following cases: > + if (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && > + sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR && > +- sg2d.clipState <= SunGraphics2D.CLIP_RECTANGULAR) > ++ sg2d.clipState <= SunGraphics2D.CLIP_RECTANGULAR && > ++ sg2d.surfaceData.getTransparency() == Transparency.OPAQUE) > + { > + if (haveLCDLoop == LCDLOOP_UNKNOWN) { > + DrawGlyphListLCD loop = > +diff -r 41ff3f84cd96 -r 3bc4d79d8123 test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java > +--- openjdk.orig/jdk/test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java Wed Sep 24 11:58:21 2008 -0700 > ++++ openjdk/jdk/test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java Thu Oct 09 17:12:50 2008 -0700 > +@@ -23,10 +23,11 @@ > + > + /* > + * @test > +- * @bug 6728834 > ++ * @bug 6728834 6749060 > + * @summary Tests that LCD AA text rendering works properly with destinations > + * being VolatileImage of all transparency types > + * @author Dmitri.Trembovetski: area=Graphics > ++ * @run main/manual/othervm -Dsun.java2d.d3d=false NonOpaqueDestLCDAATest > + * @run main/manual/othervm NonOpaqueDestLCDAATest > + * @run main/manual/othervm -Dsun.java2d.opengl=True NonOpaqueDestLCDAATest > + */ > +@@ -35,9 +36,11 @@ > + import java.awt.Color; > + import java.awt.Dimension; > + import java.awt.EventQueue; > ++import java.awt.Font; > + import java.awt.Graphics; > + import java.awt.Graphics2D; > + import java.awt.GraphicsConfiguration; > ++import java.awt.Image; > + import java.awt.RenderingHints; > + import java.awt.event.ActionEvent; > + import java.awt.event.ActionListener; > +@@ -45,6 +48,7 @@ > + import java.awt.event.ComponentEvent; > + import java.awt.event.WindowAdapter; > + import java.awt.event.WindowEvent; > ++import java.awt.image.BufferedImage; > + import java.awt.image.VolatileImage; > + import java.io.File; > + import java.util.concurrent.CountDownLatch; > +@@ -62,35 +66,43 @@ > + public NonOpaqueDestLCDAATest() { > + JTextArea desc = new JTextArea(); > + desc.setText( > +- "\n Instructions: the three text strings below should appear\n" + > +- " readable, without smudges or misshapen bold glyphs.\n\n" + > +- " If they look fine the test PASSED otherwise it FAILED.\n"); > ++ "\n Instructions: the three text strings below should appear" + > ++ " readable, without smudges or misshapen bold glyphs.\n" + > ++ " You may need a magnifier to notice some bad colorfringing in "+ > ++ " in SW Translucent case, especially in vertical stems.\n\n"+ > ++ " Basically text rendered to TRANSLUCENT destination should look"+ > ++ " similar to one rendered to OPAQUE - it may differ in whether or" + > ++ " not it's LCD, but it should look 'correct'\n\n"+ > ++ "If the text looks fine the test PASSED otherwise it FAILED.\n"); > + desc.setEditable(false); > + desc.setBackground(Color.black); > + desc.setForeground(Color.green); > + add("North", desc); > + JPanel renderPanel = new JPanel() { > ++ @Override > + public void paintComponent(Graphics g) { > + render(g, getWidth(), getHeight()); > + } > + }; > +- renderPanel.setPreferredSize(new Dimension(350, 150)); > ++ renderPanel.setPreferredSize(new Dimension(1024, 650)); > + renderPanel.addComponentListener(new ComponentAdapter() { > ++ @Override > + public void componentResized(ComponentEvent e) { > + images = null; > + } > + }); > + add("Center", renderPanel); > + > +- JButton passed = new JButton("Passed"); > +- JButton failed = new JButton("Failed"); > +- passed.addActionListener(this); > +- failed.addActionListener(this); > ++ JButton passedBtn = new JButton("Passed"); > ++ JButton failedBtn = new JButton("Failed"); > ++ passedBtn.addActionListener(this); > ++ failedBtn.addActionListener(this); > + JPanel p = new JPanel(); > +- p.add(passed); > +- p.add(failed); > ++ p.add(passedBtn); > ++ p.add(failedBtn); > + add("South", p); > + addWindowListener(new WindowAdapter() { > ++ @Override > + public void windowClosing(WindowEvent e) { > + complete.countDown(); > + } > +@@ -101,14 +113,18 @@ > + public void render(Graphics g, int w, int h) { > + initImages(w, h); > + > ++ g.setColor(new Color(0xAD, 0xD8, 0xE6)); > ++ g.fillRect(0, 0, w, h); > ++ > + Graphics2D g2d = (Graphics2D) g.create(); > +- for (VolatileImage vi : images) { > +- g2d.drawImage(vi, 0, 0, null); > +- g2d.translate(0, vi.getHeight()); > ++ for (Image im : images) { > ++ g2d.drawImage(im, 0, 0, null); > ++ g2d.translate(0, im.getHeight(null)); > + } > + } > + > + String tr[] = { "OPAQUE", "BITMASK", "TRANSLUCENT" }; > ++ @Override > + public void actionPerformed(ActionEvent e) { > + if (e.getActionCommand().equals("Passed")) { > + passed = true; > +@@ -116,9 +132,17 @@ > + } else if (e.getActionCommand().equals("Failed")) { > + System.out.println("Test Failed"); > + for (int i = 0; i < images.length; i++) { > +- String f = "NonOpaqueDestLCDAATest_"+tr[i]+".png"; > ++ String f = "NonOpaqueDestLCDAATest_"+tr[i]; > + try { > +- ImageIO.write(images[i].getSnapshot(), "png", new File(f)); > ++ if (images[i] instanceof VolatileImage) { > ++ f += "_vi.png"; > ++ ImageIO.write(((VolatileImage)images[i]). > ++ getSnapshot(), "png", new File(f)); > ++ } else { > ++ f += "_bi.png"; > ++ ImageIO.write((BufferedImage)images[i], > ++ "png", new File(f)); > ++ } > + System.out.printf("Dumped %s image to %s\n", tr[i], f); > + } catch (Throwable t) {} > + } > +@@ -128,37 +152,51 @@ > + complete.countDown(); > + } > + > +- static void clear(Graphics2D g, int w, int h) { > ++ static void clear(Graphics2D g, int type, int w, int h) { > + Graphics2D gg = (Graphics2D) g.create(); > +- gg.setColor(new Color(0, 0, 0, 0)); > +- gg.setComposite(AlphaComposite.Src); > ++ if (type > OPAQUE) { > ++ gg.setColor(new Color(0, 0, 0, 0)); > ++ gg.setComposite(AlphaComposite.Src); > ++ } else { > ++ gg.setColor(new Color(0xAD, 0xD8, 0xE6)); > ++ } > + gg.fillRect(0, 0, w, h); > + } > + > +- VolatileImage images[]; > ++ private void render(Image im, int type, String s) { > ++ Graphics2D g2d = (Graphics2D) im.getGraphics(); > ++ clear(g2d, type, im.getWidth(null), im.getHeight(null)); > ++ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, > ++ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB); > ++ Font f = new Font("Dialog", Font.BOLD, 40);// g2d.getFont().deriveFont(32.0f); > ++ g2d.setColor(Color.white); > ++ g2d.setFont(g2d.getFont().deriveFont(36.0f)); > ++ g2d.drawString(s, 10, im.getHeight(null) / 2); > ++ } > ++ > ++ Image images[]; > + private void initImages(int w, int h) { > + if (images == null) { > +- images = new VolatileImage[3]; > ++ images = new Image[6]; > + GraphicsConfiguration gc = getGraphicsConfiguration(); > + for (int i = OPAQUE; i <= TRANSLUCENT; i++) { > + VolatileImage vi = > +- gc.createCompatibleVolatileImage(w,h/3,i); > ++ gc.createCompatibleVolatileImage(w,h/images.length,i); > + images[i-1] = vi; > + vi.validate(gc); > +- Graphics2D g2d = (Graphics2D) vi.getGraphics(); > +- if (i > OPAQUE) { > +- clear(g2d, vi.getWidth(), vi.getHeight()); > +- } > +- g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, > +- RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB); > +- String s = "LCD AA Text rendered to "+tr[i-1]+ " destination"; > +- g2d.drawString(s, 10, vi.getHeight()/2); > ++ String s = "LCD AA Text rendered to " + tr[i - 1] + " HW destination"; > ++ render(vi, i, s); > ++ > ++ s = "LCD AA Text rendered to " + tr[i - 1] + " SW destination"; > ++ images[i-1+3] = gc.createCompatibleImage(w, h/images.length, i); > ++ render(images[i-1+3], i, s); > + } > + } > + } > + > + public static void main(String[] args) throws InterruptedException { > + EventQueue.invokeLater(new Runnable() { > ++ @Override > + public void run() { > + NonOpaqueDestLCDAATest t = new NonOpaqueDestLCDAATest(); > + t.pack(); -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dlila at icedtea.classpath.org Thu Feb 17 09:06:27 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Thu, 17 Feb 2011 17:06:27 +0000 Subject: /hg/icedtea6: Backports: patches/openjdk/6728834-blurred-lcd-aa-... Message-ID: changeset 34511f89bc1d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=34511f89bc1d author: Denis Lila date: Thu Feb 17 12:09:44 2011 -0500 Backports: patches/openjdk/6728834-blurred-lcd-aa-text.patch, patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch diffstat: 5 files changed, 456 insertions(+) ChangeLog | 7 Makefile.am | 2 NEWS | 2 patches/openjdk/6728834-blurred-lcd-aa-text.patch | 226 ++++++++++++++ patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch | 219 +++++++++++++ diffs (491 lines): diff -r 3f247fe29393 -r 34511f89bc1d ChangeLog --- a/ChangeLog Wed Feb 16 22:23:50 2011 +0100 +++ b/ChangeLog Thu Feb 17 12:09:44 2011 -0500 @@ -1,3 +1,10 @@ 2011-02-16 Xerxes Ranby + + * NEWS: Update with the backports + * Makefile.am (ICEDTEA_PATCHES): Added the 2 patches + * patches/openjdk/6728834-blurred-lcd-aa-text.patch + * patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch + 2011-02-16 Xerxes Ranby Mark Wielaard diff -r 3f247fe29393 -r 34511f89bc1d Makefile.am --- a/Makefile.am Wed Feb 16 22:23:50 2011 +0100 +++ b/Makefile.am Thu Feb 17 12:09:44 2011 -0500 @@ -304,6 +304,8 @@ ICEDTEA_PATCHES = \ patches/no-static-linking.patch \ patches/rh676659-gcc-export-dynamic.patch \ patches/g344659-sparc_fix.patch \ + patches/openjdk/6728834-blurred-lcd-aa-text.patch \ + patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ patches/openjdk/6896068-sg2d.patch if !WITH_ALT_HSBUILD diff -r 3f247fe29393 -r 34511f89bc1d NEWS --- a/NEWS Wed Feb 16 22:23:50 2011 +0100 +++ b/NEWS Thu Feb 17 12:09:44 2011 -0500 @@ -419,6 +419,8 @@ New in release 1.10 (2011-XX-XX): - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. - PR632: patches/security/20110215/6878713.patch breaks shark zero build + - S6749060: LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only) + - S6728834: D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc diff -r 3f247fe29393 -r 34511f89bc1d patches/openjdk/6728834-blurred-lcd-aa-text.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6728834-blurred-lcd-aa-text.patch Thu Feb 17 12:09:44 2011 -0500 @@ -0,0 +1,226 @@ +# HG changeset patch +# User tdv +# Date 1217874568 25200 +# Node ID a56641c1f54e4a81a42ca755a952fd772c14a511 +# Parent e62bc7b05b8a7cd11d7e76f1c29cf07f0c3c7d34 +6728834: D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination +Reviewed-by: campbell + +diff -r e62bc7b05b8a -r a56641c1f54e src/share/classes/sun/java2d/opengl/OGLSurfaceData.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java Mon Aug 04 18:50:43 2008 +0400 ++++ openjdk/jdk/src/share/classes/sun/java2d/opengl/OGLSurfaceData.java Mon Aug 04 11:29:28 2008 -0700 +@@ -401,6 +401,7 @@ + * - the fragment shader extension is available, and + * - blending is disabled, and + * - the source color is opaque ++ * - and the destination is opaque + * + * Eventually, we could enhance the native OGL text rendering code + * and remove the above restrictions, but that would require significantly +@@ -410,7 +411,8 @@ + return + graphicsConfig.isCapPresent(CAPS_EXT_LCD_SHADER) && + sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && +- sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR; ++ sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR && ++ sg2d.surfaceData.getTransparency() == Transparency.OPAQUE; + } + + public void validatePipe(SunGraphics2D sg2d) { +diff -r e62bc7b05b8a -r a56641c1f54e src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java +--- openjdk.orig/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java Mon Aug 04 18:50:43 2008 +0400 ++++ openjdk/jdk/src/windows/classes/sun/java2d/d3d/D3DSurfaceData.java Mon Aug 04 11:29:28 2008 -0700 +@@ -501,12 +501,14 @@ + * - the pixel shaders are available, and + * - blending is disabled, and + * - the source color is opaque ++ * - and the destination is opaque + */ + public boolean canRenderLCDText(SunGraphics2D sg2d) { + return + graphicsDevice.isCapPresent(CAPS_LCD_SHADER) && + sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && +- sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR; ++ sg2d.paintState <= SunGraphics2D.PAINT_OPAQUECOLOR && ++ sg2d.surfaceData.getTransparency() == Transparency.OPAQUE; + } + + public void validatePipe(SunGraphics2D sg2d) { +diff -r e62bc7b05b8a -r a56641c1f54e test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java Mon Aug 04 11:29:28 2008 -0700 +@@ -0,0 +1,174 @@ ++/* ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, ++ * CA 95054 USA or visit www.sun.com if you need additional information or ++ * have any questions. ++ */ ++ ++/* ++ * @test ++ * @bug 6728834 ++ * @summary Tests that LCD AA text rendering works properly with destinations ++ * being VolatileImage of all transparency types ++ * @author Dmitri.Trembovetski: area=Graphics ++ * @run main/manual/othervm NonOpaqueDestLCDAATest ++ * @run main/manual/othervm -Dsun.java2d.opengl=True NonOpaqueDestLCDAATest ++ */ ++ ++import java.awt.AlphaComposite; ++import java.awt.Color; ++import java.awt.Dimension; ++import java.awt.EventQueue; ++import java.awt.Graphics; ++import java.awt.Graphics2D; ++import java.awt.GraphicsConfiguration; ++import java.awt.RenderingHints; ++import java.awt.event.ActionEvent; ++import java.awt.event.ActionListener; ++import java.awt.event.ComponentAdapter; ++import java.awt.event.ComponentEvent; ++import java.awt.event.WindowAdapter; ++import java.awt.event.WindowEvent; ++import java.awt.image.VolatileImage; ++import java.io.File; ++import java.util.concurrent.CountDownLatch; ++import javax.imageio.ImageIO; ++import javax.swing.JButton; ++import javax.swing.JFrame; ++import javax.swing.JPanel; ++import javax.swing.JTextArea; ++import static java.awt.Transparency.*; ++ ++public class NonOpaqueDestLCDAATest extends JFrame implements ActionListener { ++ private static volatile boolean passed = true; ++ private static CountDownLatch complete = new CountDownLatch(1); ++ ++ public NonOpaqueDestLCDAATest() { ++ JTextArea desc = new JTextArea(); ++ desc.setText( ++ "\n Instructions: the three text strings below should appear\n" + ++ " readable, without smudges or misshapen bold glyphs.\n\n" + ++ " If they look fine the test PASSED otherwise it FAILED.\n"); ++ desc.setEditable(false); ++ desc.setBackground(Color.black); ++ desc.setForeground(Color.green); ++ add("North", desc); ++ JPanel renderPanel = new JPanel() { ++ public void paintComponent(Graphics g) { ++ render(g, getWidth(), getHeight()); ++ } ++ }; ++ renderPanel.setPreferredSize(new Dimension(350, 150)); ++ renderPanel.addComponentListener(new ComponentAdapter() { ++ public void componentResized(ComponentEvent e) { ++ images = null; ++ } ++ }); ++ add("Center", renderPanel); ++ ++ JButton passed = new JButton("Passed"); ++ JButton failed = new JButton("Failed"); ++ passed.addActionListener(this); ++ failed.addActionListener(this); ++ JPanel p = new JPanel(); ++ p.add(passed); ++ p.add(failed); ++ add("South", p); ++ addWindowListener(new WindowAdapter() { ++ public void windowClosing(WindowEvent e) { ++ complete.countDown(); ++ } ++ }); ++ setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE); ++ } ++ ++ public void render(Graphics g, int w, int h) { ++ initImages(w, h); ++ ++ Graphics2D g2d = (Graphics2D) g.create(); ++ for (VolatileImage vi : images) { ++ g2d.drawImage(vi, 0, 0, null); ++ g2d.translate(0, vi.getHeight()); ++ } ++ } ++ ++ String tr[] = { "OPAQUE", "BITMASK", "TRANSLUCENT" }; ++ public void actionPerformed(ActionEvent e) { ++ if (e.getActionCommand().equals("Passed")) { ++ passed = true; ++ System.out.println("Test Passed"); ++ } else if (e.getActionCommand().equals("Failed")) { ++ System.out.println("Test Failed"); ++ for (int i = 0; i < images.length; i++) { ++ String f = "NonOpaqueDestLCDAATest_"+tr[i]+".png"; ++ try { ++ ImageIO.write(images[i].getSnapshot(), "png", new File(f)); ++ System.out.printf("Dumped %s image to %s\n", tr[i], f); ++ } catch (Throwable t) {} ++ } ++ passed = false; ++ } ++ dispose(); ++ complete.countDown(); ++ } ++ ++ static void clear(Graphics2D g, int w, int h) { ++ Graphics2D gg = (Graphics2D) g.create(); ++ gg.setColor(new Color(0, 0, 0, 0)); ++ gg.setComposite(AlphaComposite.Src); ++ gg.fillRect(0, 0, w, h); ++ } ++ ++ VolatileImage images[]; ++ private void initImages(int w, int h) { ++ if (images == null) { ++ images = new VolatileImage[3]; ++ GraphicsConfiguration gc = getGraphicsConfiguration(); ++ for (int i = OPAQUE; i <= TRANSLUCENT; i++) { ++ VolatileImage vi = ++ gc.createCompatibleVolatileImage(w,h/3,i); ++ images[i-1] = vi; ++ vi.validate(gc); ++ Graphics2D g2d = (Graphics2D) vi.getGraphics(); ++ if (i > OPAQUE) { ++ clear(g2d, vi.getWidth(), vi.getHeight()); ++ } ++ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, ++ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB); ++ String s = "LCD AA Text rendered to "+tr[i-1]+ " destination"; ++ g2d.drawString(s, 10, vi.getHeight()/2); ++ } ++ } ++ } ++ ++ public static void main(String[] args) throws InterruptedException { ++ EventQueue.invokeLater(new Runnable() { ++ public void run() { ++ NonOpaqueDestLCDAATest t = new NonOpaqueDestLCDAATest(); ++ t.pack(); ++ t.setVisible(true); ++ } ++ }); ++ ++ complete.await(); ++ if (!passed) { ++ throw new RuntimeException("Test Failed!"); ++ } ++ } ++} diff -r 3f247fe29393 -r 34511f89bc1d patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch Thu Feb 17 12:09:44 2011 -0500 @@ -0,0 +1,219 @@ +# HG changeset patch +# User tdv +# Date 1223597570 25200 +# Node ID 3bc4d79d8123bbc0307e0e58f7c64ee663e25af9 +# Parent 41ff3f84cd9608ef1b4ecd0a823a8ff188712784 +6749060: LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only) +Reviewed-by: campbell, prr + +diff -r 41ff3f84cd96 -r 3bc4d79d8123 src/share/classes/sun/java2d/SurfaceData.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/SurfaceData.java Wed Sep 24 11:58:21 2008 -0700 ++++ openjdk/jdk/src/share/classes/sun/java2d/SurfaceData.java Thu Oct 09 17:12:50 2008 -0700 +@@ -449,7 +449,8 @@ + // For now the answer can only be true in the following cases: + if (sg2d.compositeState <= SunGraphics2D.COMP_ISCOPY && + sg2d.paintState <= SunGraphics2D.PAINT_ALPHACOLOR && +- sg2d.clipState <= SunGraphics2D.CLIP_RECTANGULAR) ++ sg2d.clipState <= SunGraphics2D.CLIP_RECTANGULAR && ++ sg2d.surfaceData.getTransparency() == Transparency.OPAQUE) + { + if (haveLCDLoop == LCDLOOP_UNKNOWN) { + DrawGlyphListLCD loop = +diff -r 41ff3f84cd96 -r 3bc4d79d8123 test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java +--- openjdk.orig/jdk/test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java Wed Sep 24 11:58:21 2008 -0700 ++++ openjdk/jdk/test/sun/java2d/DirectX/NonOpaqueDestLCDAATest/NonOpaqueDestLCDAATest.java Thu Oct 09 17:12:50 2008 -0700 +@@ -23,10 +23,11 @@ + + /* + * @test +- * @bug 6728834 ++ * @bug 6728834 6749060 + * @summary Tests that LCD AA text rendering works properly with destinations + * being VolatileImage of all transparency types + * @author Dmitri.Trembovetski: area=Graphics ++ * @run main/manual/othervm -Dsun.java2d.d3d=false NonOpaqueDestLCDAATest + * @run main/manual/othervm NonOpaqueDestLCDAATest + * @run main/manual/othervm -Dsun.java2d.opengl=True NonOpaqueDestLCDAATest + */ +@@ -35,9 +36,11 @@ + import java.awt.Color; + import java.awt.Dimension; + import java.awt.EventQueue; ++import java.awt.Font; + import java.awt.Graphics; + import java.awt.Graphics2D; + import java.awt.GraphicsConfiguration; ++import java.awt.Image; + import java.awt.RenderingHints; + import java.awt.event.ActionEvent; + import java.awt.event.ActionListener; +@@ -45,6 +48,7 @@ + import java.awt.event.ComponentEvent; + import java.awt.event.WindowAdapter; + import java.awt.event.WindowEvent; ++import java.awt.image.BufferedImage; + import java.awt.image.VolatileImage; + import java.io.File; + import java.util.concurrent.CountDownLatch; +@@ -62,35 +66,43 @@ + public NonOpaqueDestLCDAATest() { + JTextArea desc = new JTextArea(); + desc.setText( +- "\n Instructions: the three text strings below should appear\n" + +- " readable, without smudges or misshapen bold glyphs.\n\n" + +- " If they look fine the test PASSED otherwise it FAILED.\n"); ++ "\n Instructions: the three text strings below should appear" + ++ " readable, without smudges or misshapen bold glyphs.\n" + ++ " You may need a magnifier to notice some bad colorfringing in "+ ++ " in SW Translucent case, especially in vertical stems.\n\n"+ ++ " Basically text rendered to TRANSLUCENT destination should look"+ ++ " similar to one rendered to OPAQUE - it may differ in whether or" + ++ " not it's LCD, but it should look 'correct'\n\n"+ ++ "If the text looks fine the test PASSED otherwise it FAILED.\n"); + desc.setEditable(false); + desc.setBackground(Color.black); + desc.setForeground(Color.green); + add("North", desc); + JPanel renderPanel = new JPanel() { ++ @Override + public void paintComponent(Graphics g) { + render(g, getWidth(), getHeight()); + } + }; +- renderPanel.setPreferredSize(new Dimension(350, 150)); ++ renderPanel.setPreferredSize(new Dimension(1024, 650)); + renderPanel.addComponentListener(new ComponentAdapter() { ++ @Override + public void componentResized(ComponentEvent e) { + images = null; + } + }); + add("Center", renderPanel); + +- JButton passed = new JButton("Passed"); +- JButton failed = new JButton("Failed"); +- passed.addActionListener(this); +- failed.addActionListener(this); ++ JButton passedBtn = new JButton("Passed"); ++ JButton failedBtn = new JButton("Failed"); ++ passedBtn.addActionListener(this); ++ failedBtn.addActionListener(this); + JPanel p = new JPanel(); +- p.add(passed); +- p.add(failed); ++ p.add(passedBtn); ++ p.add(failedBtn); + add("South", p); + addWindowListener(new WindowAdapter() { ++ @Override + public void windowClosing(WindowEvent e) { + complete.countDown(); + } +@@ -101,14 +113,18 @@ + public void render(Graphics g, int w, int h) { + initImages(w, h); + ++ g.setColor(new Color(0xAD, 0xD8, 0xE6)); ++ g.fillRect(0, 0, w, h); ++ + Graphics2D g2d = (Graphics2D) g.create(); +- for (VolatileImage vi : images) { +- g2d.drawImage(vi, 0, 0, null); +- g2d.translate(0, vi.getHeight()); ++ for (Image im : images) { ++ g2d.drawImage(im, 0, 0, null); ++ g2d.translate(0, im.getHeight(null)); + } + } + + String tr[] = { "OPAQUE", "BITMASK", "TRANSLUCENT" }; ++ @Override + public void actionPerformed(ActionEvent e) { + if (e.getActionCommand().equals("Passed")) { + passed = true; +@@ -116,9 +132,17 @@ + } else if (e.getActionCommand().equals("Failed")) { + System.out.println("Test Failed"); + for (int i = 0; i < images.length; i++) { +- String f = "NonOpaqueDestLCDAATest_"+tr[i]+".png"; ++ String f = "NonOpaqueDestLCDAATest_"+tr[i]; + try { +- ImageIO.write(images[i].getSnapshot(), "png", new File(f)); ++ if (images[i] instanceof VolatileImage) { ++ f += "_vi.png"; ++ ImageIO.write(((VolatileImage)images[i]). ++ getSnapshot(), "png", new File(f)); ++ } else { ++ f += "_bi.png"; ++ ImageIO.write((BufferedImage)images[i], ++ "png", new File(f)); ++ } + System.out.printf("Dumped %s image to %s\n", tr[i], f); + } catch (Throwable t) {} + } +@@ -128,37 +152,51 @@ + complete.countDown(); + } + +- static void clear(Graphics2D g, int w, int h) { ++ static void clear(Graphics2D g, int type, int w, int h) { + Graphics2D gg = (Graphics2D) g.create(); +- gg.setColor(new Color(0, 0, 0, 0)); +- gg.setComposite(AlphaComposite.Src); ++ if (type > OPAQUE) { ++ gg.setColor(new Color(0, 0, 0, 0)); ++ gg.setComposite(AlphaComposite.Src); ++ } else { ++ gg.setColor(new Color(0xAD, 0xD8, 0xE6)); ++ } + gg.fillRect(0, 0, w, h); + } + +- VolatileImage images[]; ++ private void render(Image im, int type, String s) { ++ Graphics2D g2d = (Graphics2D) im.getGraphics(); ++ clear(g2d, type, im.getWidth(null), im.getHeight(null)); ++ g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, ++ RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB); ++ Font f = new Font("Dialog", Font.BOLD, 40);// g2d.getFont().deriveFont(32.0f); ++ g2d.setColor(Color.white); ++ g2d.setFont(g2d.getFont().deriveFont(36.0f)); ++ g2d.drawString(s, 10, im.getHeight(null) / 2); ++ } ++ ++ Image images[]; + private void initImages(int w, int h) { + if (images == null) { +- images = new VolatileImage[3]; ++ images = new Image[6]; + GraphicsConfiguration gc = getGraphicsConfiguration(); + for (int i = OPAQUE; i <= TRANSLUCENT; i++) { + VolatileImage vi = +- gc.createCompatibleVolatileImage(w,h/3,i); ++ gc.createCompatibleVolatileImage(w,h/images.length,i); + images[i-1] = vi; + vi.validate(gc); +- Graphics2D g2d = (Graphics2D) vi.getGraphics(); +- if (i > OPAQUE) { +- clear(g2d, vi.getWidth(), vi.getHeight()); +- } +- g2d.setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, +- RenderingHints.VALUE_TEXT_ANTIALIAS_LCD_HRGB); +- String s = "LCD AA Text rendered to "+tr[i-1]+ " destination"; +- g2d.drawString(s, 10, vi.getHeight()/2); ++ String s = "LCD AA Text rendered to " + tr[i - 1] + " HW destination"; ++ render(vi, i, s); ++ ++ s = "LCD AA Text rendered to " + tr[i - 1] + " SW destination"; ++ images[i-1+3] = gc.createCompatibleImage(w, h/images.length, i); ++ render(images[i-1+3], i, s); + } + } + } + + public static void main(String[] args) throws InterruptedException { + EventQueue.invokeLater(new Runnable() { ++ @Override + public void run() { + NonOpaqueDestLCDAATest t = new NonOpaqueDestLCDAATest(); + t.pack(); From ahughes at redhat.com Thu Feb 17 09:09:25 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 17 Feb 2011 17:09:25 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <1297893005.3413.20.camel@springer.wildebeest.org> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> Message-ID: <20110217170925.GD8495@rivendell.middle-earth.co.uk> On 22:50 Wed 16 Feb , Mark Wielaard wrote: > On Wed, 2011-02-16 at 21:47 +0000, Dr Andrew John Hughes wrote: > > On 22:28 Wed 16 Feb , Mark Wielaard wrote: > > > 2011-02-16 Xerxes Ranby > > > Mark Wielaard > > > > > > PR632: 6878713.patch breaks shark zero build > > > * patches/icedtea-stdc-limit-macros.patch > > > (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): > > > Only define __STDC_LIMIT_MACROS if undefined. > > > * Makefile.am (ICEDTEA_PATCHES): Add new patch. > > > * NEWS: Updated. > > > > > Did you test this with both versions of HotSpot? > > No, but I don't see how it would fail, the patch is right after the > patch that broke it. It is currently going through all the buildbot > builders. If you have configurations you want to have regularly tested > please setup a buildslave for it. > > Thanks, > > Mark > Please test HotSpot patches with both available HotSpot builds to avoid breakage. Also, if you had posted this patch for review instead of just committing it, I would have pointed out that: * It might be better to only apply it for Shark/Zero builds to reduce breakage. Other configurations are not broken. * We no longer use the 'icedtea-' prefix. I'd prefer not to have yet more work on my plate because people don't do full testing of patches and commit them without any review. Thanks, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From mark at klomp.org Thu Feb 17 10:36:18 2011 From: mark at klomp.org (Mark Wielaard) Date: Thu, 17 Feb 2011 19:36:18 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <20110217170925.GD8495@rivendell.middle-earth.co.uk> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> Message-ID: <1297967778.3323.88.camel@springer.wildebeest.org> Hi Andrew, On Thu, 2011-02-17 at 17:09 +0000, Dr Andrew John Hughes wrote: > On 22:50 Wed 16 Feb , Mark Wielaard wrote: > > On Wed, 2011-02-16 at 21:47 +0000, Dr Andrew John Hughes wrote: > > > On 22:28 Wed 16 Feb , Mark Wielaard wrote: > > > > 2011-02-16 Xerxes Ranby > > > > Mark Wielaard > > > > > > > > PR632: 6878713.patch breaks shark zero build > > > > * patches/icedtea-stdc-limit-macros.patch > > > > (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): > > > > Only define __STDC_LIMIT_MACROS if undefined. > > > > * Makefile.am (ICEDTEA_PATCHES): Add new patch. > > > > * NEWS: Updated. > > > > > > > Did you test this with both versions of HotSpot? > > > > No, but I don't see how it would fail, the patch is right after the > > patch that broke it. It is currently going through all the buildbot > > builders. If you have configurations you want to have regularly tested > > please setup a buildslave for it. > > > > Please test HotSpot patches with both available HotSpot builds to avoid > breakage. No. I am happy to also test the default configuration, which I did, if I am fixing issues on a non-default configuration that I care about. But I am not going to test all random variants that might happen. If you care about non-default configurations please either make sure that it is in the default build/test setup. Or provide a buildslave for it, so that it is regularly tested on all commits. That is what Xerxes and I did for the non-default configurations that we care about (for x86_64 zero/shark isn't enabled by default, and not everybody has an arm setup). > I'd prefer not to have yet more work on my plate because people don't do full > testing of patches and commit them without any review. It is hard to get a good feeling for tone in an email, so apologies for misinterpreting. But I really don't appreciate this nitpicking. You committed a patch, that you didn't discuss on the list, which broke the zero/shark configuration that Xerxes and I care about. And that broke the autobuilders that we rely on to catch issues (they did send you email about the breakage). We quickly filed a bug report, analyzed the root cause, discussed some patch variants and fixed it in a way that minimized the impact and was as localized to the change that broke things as possible. Instead of a Thank You for making sure things were fixed ASAP, we get a lecture on all things we should have done, but that you failed to do in the first place with your original commit that broke things. Cheers, Mark From ahughes at redhat.com Thu Feb 17 13:02:11 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 17 Feb 2011 21:02:11 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <1297967778.3323.88.camel@springer.wildebeest.org> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> Message-ID: <20110217210211.GG8495@rivendell.middle-earth.co.uk> On 19:36 Thu 17 Feb , Mark Wielaard wrote: > Hi Andrew, > > On Thu, 2011-02-17 at 17:09 +0000, Dr Andrew John Hughes wrote: > > On 22:50 Wed 16 Feb , Mark Wielaard wrote: > > > On Wed, 2011-02-16 at 21:47 +0000, Dr Andrew John Hughes wrote: > > > > On 22:28 Wed 16 Feb , Mark Wielaard wrote: > > > > > 2011-02-16 Xerxes Ranby > > > > > Mark Wielaard > > > > > > > > > > PR632: 6878713.patch breaks shark zero build > > > > > * patches/icedtea-stdc-limit-macros.patch > > > > > (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): > > > > > Only define __STDC_LIMIT_MACROS if undefined. > > > > > * Makefile.am (ICEDTEA_PATCHES): Add new patch. > > > > > * NEWS: Updated. > > > > > > > > > Did you test this with both versions of HotSpot? > > > > > > No, but I don't see how it would fail, the patch is right after the > > > patch that broke it. It is currently going through all the buildbot > > > builders. If you have configurations you want to have regularly tested > > > please setup a buildslave for it. > > > > > > > Please test HotSpot patches with both available HotSpot builds to avoid > > breakage. > > No. I am happy to also test the default configuration, which I did, if I > am fixing issues on a non-default configuration that I care about. But > I am not going to test all random variants that might happen. > I'm not asking for 'all random variants'. That would be kind of crazy and almost unachievable :-) I do ask that, when there is an alternate HotSpot build available, then patches are checked against both. While hs20 may not be the default now, it will become so at some point in the future (probably after the imminent 1.10 branch). It will make things easier if it's not broken when we switch over. The HotSpot build option is fully documented in INSTALL. > If you care about non-default configurations please either make sure > that it is in the default build/test setup. Or provide a buildslave for > it, so that it is regularly tested on all commits. That is what Xerxes > and I did for the non-default configurations that we care about (for > x86_64 zero/shark isn't enabled by default, and not everybody has an arm > setup). I don't know how to do any of this. I didn't see any discussion or list of what was being added to these build bots. If I missed it, I'm sorry. I would have suggested that both the alternate HotSpot build (currently hs20) be checked and also icedtea6-hg if possible. The alternate HotSpot build and icedtea6-hg cover what's "coming soon" to IcedTea6 (the HotSpot build from the new stable HotSpot tree, icedtea6-hg from the upstream OpenJDK6 tree) and allows us to find things out early rather than getting hit by it all in one big lump when a new tarball is released. > > > I'd prefer not to have yet more work on my plate because people don't do full > > testing of patches and commit them without any review. > > It is hard to get a good feeling for tone in an email, so apologies for > misinterpreting. But I really don't appreciate this nitpicking. It wasn't meant to nitpick. It was more a plea for help. It's great that you want to spend time looking into this and providing a fix, but the help is negated if it means I have to spend time doing builds to check for breakage or start changing things. Effectively, it's forcing me to look into the issue immediately, so if I sound a little negative, that's why. > You > committed a patch, that you didn't discuss on the list, which broke the > zero/shark configuration that Xerxes and I care about. In fairness, I can't really discuss embargoed security issues :-D No, I'll admit I didn't test Shark with the patches. Having to do the default and alternate HotSpot builds on three release branches and HEAD three times over (due to us getting the security fixes in bits) didn't leave much time for checking more estoric options. With Shark, in particular, I can't remember ever having had a successful build more than a couple of times, so it's not high on my priorities. I understand it is with others, but then that's why I'm (hopefully) not the only person working on IcedTea6 (though it does feel like that sometimes). > And that broke > the autobuilders that we rely on to catch issues (they did send you > email about the breakage). We quickly filed a bug report, analyzed the > root cause, discussed some patch variants and fixed it in a way that > minimized the impact and was as localized to the change that broke > things as possible. > > Instead of a Thank You for making sure things were fixed ASAP, we get a > lecture on all things we should have done, but that you failed to do in > the first place with your original commit that broke things. > Well, thanks for doing this (if a little belated). It is appreciated. I did see the issue on IRC but I've not had time to look at it. To be honest, the thanks would have been immediately forthcoming if you'd just given me or someone else chance to scan over the patch first before committing it. That's not really for any technical reason so much as it turns a "oh heck what's this coming down the line" (assuming the worst, as here) into "Oh, great you fixed that. Thanks". I'll admit I'm not too good at doing that myself, but that's more born from the experience that if I do, sadly no-one looks at it until I go and find someone and prod them... > Cheers, > > Mark > I hope that clears the air a bit. Cheers, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Thu Feb 17 13:22:17 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 17 Feb 2011 21:22:17 +0000 Subject: [Bug 634] New: jdk tests write to /etc/shadow Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634 Summary: jdk tests write to /etc/shadow Product: IcedTea Version: 6-1.9.6 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net I found two tests that operate potentially dangerously: ./openjdk-ecj/jdk/test/java/io/IOException/LastErrorString.java ./openjdk/jdk/test/java/io/IOException/LastErrorString.java They both try to call java.io.FileOutputStream on /etc/shadow, which will create a mess for someone trying to run the tests as root. Worst is that he probably does not notice/expect it until it is too late and login is impossible. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Thu Feb 17 13:39:17 2011 From: omajid at redhat.com (Omair Majid) Date: Thu, 17 Feb 2011 16:39:17 -0500 Subject: [icedtea-web] RFC: do not install netx.jar and plugin.jar into jdk dir Message-ID: <4D5D9585.1030405@redhat.com> Hi, The attached patch isolates icedtea-web into its own directories. With this patch applied, icedtea-web does not need to be installed into a jdk-style dir. I have removed the pluginappletviewer binary. I had originally posted it a separate patch, but since using pluginappletviewer would make this patch more complex, I have removed it here. Currently, the jdk it uses to run is determined at build-time. In the future, this will probably be changed so that icedtea-web will be able to use any installed jdk. Any thoughts or comments on the patch? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: do-not-install-into-jdk.patch Type: text/x-patch Size: 13234 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110217/ae46a0e8/do-not-install-into-jdk.patch From andrew at icedtea.classpath.org Thu Feb 17 13:44:38 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 17 Feb 2011 21:44:38 +0000 Subject: /hg/icedtea6: 6693253: Security warning backport. Message-ID: changeset 2d689773ef17 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=2d689773ef17 author: Andrew John Hughes date: Thu Feb 17 21:44:24 2011 +0000 6693253: Security warning backport. 2011-02-17 Andrew John Hughes 6693253: Security Warning appearance requires enhancements 6779717: A Window does not show applet security warning icon on X platforms 6785058: Parent don't get the focus after dialog is closed if security warning is applied * Makefile.am: Add new patch. * patches/openjdk/6307603-xrender-01.patch: Rejigged. * patches/openjdk/6693253-security_warning.patch: Security warning backport. * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw16.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw24.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw32.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw48.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim16.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim24.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim32.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim48.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow16.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow24.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow32.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow48.png, * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning .ico, * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning _bw.ico, * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning _int.ico: Images for new backport. * NEWS: Updated. diffstat: 5 files changed, 5534 insertions(+), 100 deletions(-) ChangeLog | 27 Makefile.am | 1 NEWS | 3 patches/openjdk/6307603-xrender-01.patch | 200 patches/openjdk/6693253-security_warning.patch | 5403 ++++++++++++++++++++++++ diffs (truncated from 6192 to 500 lines): diff -r 34511f89bc1d -r 2d689773ef17 ChangeLog --- a/ChangeLog Thu Feb 17 12:09:44 2011 -0500 +++ b/ChangeLog Thu Feb 17 21:44:24 2011 +0000 @@ -1,3 +1,30 @@ 2011-02-16 Denis Lila + + 6693253: Security Warning appearance requires enhancements + 6779717: A Window does not show applet security warning icon on X platforms + 6785058: Parent don't get the focus after dialog is closed if security warning is applied + * Makefile.am: Add new patch. + * patches/openjdk/6307603-xrender-01.patch: Rejigged. + * patches/openjdk/6693253-security_warning.patch: + Security warning backport. + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw16.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw24.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw32.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw48.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim16.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim24.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim32.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim48.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow16.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow24.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow32.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow48.png, + * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning.ico, + * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_bw.ico, + * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_int.ico: + Images for new backport. + * NEWS: Updated. + 2011-02-16 Denis Lila * NEWS: Update with the backports diff -r 34511f89bc1d -r 2d689773ef17 Makefile.am --- a/Makefile.am Thu Feb 17 12:09:44 2011 -0500 +++ b/Makefile.am Thu Feb 17 21:44:24 2011 +0000 @@ -199,6 +199,7 @@ ICEDTEA_PATCHES = \ patches/openjdk/6791612-opengl-jni-fix.patch \ patches/openjdk/6755274-glgetstring-crash.patch \ patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ + patches/openjdk/6693253-security_warning.patch \ patches/icedtea-notice-safepoints.patch \ patches/icedtea-parisc-opt.patch \ patches/icedtea-lucene-crash.patch \ diff -r 34511f89bc1d -r 2d689773ef17 NEWS --- a/NEWS Thu Feb 17 12:09:44 2011 -0500 +++ b/NEWS Thu Feb 17 21:44:24 2011 +0000 @@ -421,6 +421,9 @@ New in release 1.10 (2011-XX-XX): - PR632: patches/security/20110215/6878713.patch breaks shark zero build - S6749060: LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only) - S6728834: D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination + - S6693253: Security Warning appearance requires enhancements + - S6779717: A Window does not show applet security warning icon on X platforms + - S6785058: Parent don't get the focus after dialog is closed if security warning is applied * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw16.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw16.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw24.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw24.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw32.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw32.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw48.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw48.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim16.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim16.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim24.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim24.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim32.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim32.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim48.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim48.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow16.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow16.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow24.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow24.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow32.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow32.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow48.png Binary file overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow48.png has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning.ico Binary file overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning.ico has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_bw.ico Binary file overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_bw.ico has changed diff -r 34511f89bc1d -r 2d689773ef17 overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_int.ico Binary file overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_int.ico has changed diff -r 34511f89bc1d -r 2d689773ef17 patches/openjdk/6307603-xrender-01.patch --- a/patches/openjdk/6307603-xrender-01.patch Thu Feb 17 12:09:44 2011 -0500 +++ b/patches/openjdk/6307603-xrender-01.patch Thu Feb 17 21:44:24 2011 +0000 @@ -1,7 +1,7 @@ diff -Nru openjdk.orig/jdk/make/sun/awt/ diff -Nru openjdk.orig/jdk/make/sun/awt/mapfile-mawt-vers openjdk/jdk/make/sun/awt/mapfile-mawt-vers ---- openjdk.orig/jdk/make/sun/awt/mapfile-mawt-vers 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/make/sun/awt/mapfile-mawt-vers 2010-08-03 23:17:50.464917097 +0100 -@@ -311,6 +311,7 @@ +--- openjdk.orig/jdk/make/sun/awt/mapfile-mawt-vers 2011-02-17 16:00:41.000000000 +0000 ++++ openjdk/jdk/make/sun/awt/mapfile-mawt-vers 2011-02-17 16:52:48.186147394 +0000 +@@ -312,6 +312,7 @@ Java_sun_awt_X11GraphicsEnvironment_initGLX; Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama; Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint; @@ -9,7 +9,7 @@ diff -Nru openjdk.orig/jdk/make/sun/awt/ #Java_sun_awt_motif_MEmbedCanvasPeer_initXEmbedServer; #Java_sun_awt_motif_MEmbedCanvasPeer_destroyXEmbedServer; #Java_sun_awt_motif_MEmbedCanvasPeer_isXEmbedActive; -@@ -405,17 +406,52 @@ +@@ -406,17 +407,52 @@ Java_sun_java2d_x11_X11SurfaceData_initIDs; Java_sun_java2d_x11_X11SurfaceData_initOps; Java_sun_java2d_x11_X11SurfaceData_initSurface; @@ -70,9 +70,9 @@ diff -Nru openjdk.orig/jdk/make/sun/awt/ Java_sun_java2d_opengl_OGLContext_getOGLIdString; Java_sun_java2d_opengl_OGLMaskFill_maskFill; diff -Nru openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux openjdk/jdk/make/sun/awt/mapfile-vers-linux ---- openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/make/sun/awt/mapfile-vers-linux 2010-08-03 23:17:50.464917097 +0100 -@@ -425,6 +425,7 @@ +--- openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux 2011-02-17 16:00:41.000000000 +0000 ++++ openjdk/jdk/make/sun/awt/mapfile-vers-linux 2011-02-17 16:52:48.186147394 +0000 +@@ -426,6 +426,7 @@ Java_sun_awt_X11GraphicsEnvironment_initDisplay; Java_sun_awt_X11GraphicsEnvironment_pRunningXinerama; Java_sun_awt_X11GraphicsEnvironment_getXineramaCenterPoint; @@ -81,8 +81,8 @@ diff -Nru openjdk.orig/jdk/make/sun/awt/ diff -Nru openjdk.orig/jdk/make/sun/headless/mapfile-vers openjdk/jdk/make/sun/headless/mapfile-vers ---- openjdk.orig/jdk/make/sun/headless/mapfile-vers 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/make/sun/headless/mapfile-vers 2010-08-03 23:17:50.476916584 +0100 +--- openjdk.orig/jdk/make/sun/headless/mapfile-vers 2011-02-17 16:00:33.000000000 +0000 ++++ openjdk/jdk/make/sun/headless/mapfile-vers 2011-02-17 16:52:48.186147394 +0000 @@ -46,17 +46,20 @@ Java_sun_java2d_x11_X11Renderer_XFillRoundRect; Java_sun_java2d_x11_X11Renderer_devCopyArea; @@ -111,8 +111,8 @@ diff -Nru openjdk.orig/jdk/make/sun/head Java_java_awt_Font_initIDs; Java_sun_font_FontManager_getFontConfig; diff -Nru openjdk.orig/jdk/make/sun/jawt/Makefile openjdk/jdk/make/sun/jawt/Makefile ---- openjdk.orig/jdk/make/sun/jawt/Makefile 2010-08-03 23:14:58.000000000 +0100 -+++ openjdk/jdk/make/sun/jawt/Makefile 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/make/sun/jawt/Makefile 2011-02-17 16:00:41.000000000 +0000 ++++ openjdk/jdk/make/sun/jawt/Makefile 2011-02-17 16:52:48.198146458 +0000 @@ -118,7 +118,7 @@ # Libraries to link in. # @@ -123,20 +123,20 @@ diff -Nru openjdk.orig/jdk/make/sun/jawt ifeq ($(PLATFORM), linux) diff -Nru openjdk.orig/jdk/make/sun/xawt/FILES_c_unix.gmk openjdk/jdk/make/sun/xawt/FILES_c_unix.gmk ---- openjdk.orig/jdk/make/sun/xawt/FILES_c_unix.gmk 2010-06-21 22:15:09.000000000 +0100 -+++ openjdk/jdk/make/sun/xawt/FILES_c_unix.gmk 2010-08-03 23:17:50.480916320 +0100 -@@ -78,4 +78,7 @@ - awt_Plugin.c \ +--- openjdk.orig/jdk/make/sun/xawt/FILES_c_unix.gmk 2011-02-17 16:00:41.000000000 +0000 ++++ openjdk/jdk/make/sun/xawt/FILES_c_unix.gmk 2011-02-17 16:53:14.908062495 +0000 +@@ -79,4 +79,7 @@ gtk2_interface.c \ swing_GTKEngine.c \ -- swing_GTKStyle.c -+ swing_GTKStyle.c \ + swing_GTKStyle.c \ +- rect.c ++ rect.c \ + XRSurfaceData.c \ + XRBackendNative.c + diff -Nru openjdk.orig/jdk/make/sun/xawt/Makefile openjdk/jdk/make/sun/xawt/Makefile ---- openjdk.orig/jdk/make/sun/xawt/Makefile 2010-06-21 22:15:09.000000000 +0100 -+++ openjdk/jdk/make/sun/xawt/Makefile 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/make/sun/xawt/Makefile 2011-02-17 16:00:41.000000000 +0000 ++++ openjdk/jdk/make/sun/xawt/Makefile 2011-02-17 16:52:48.198146458 +0000 @@ -48,6 +48,11 @@ LDFLAGS += -L$(OPENWIN_LIB) @@ -149,7 +149,7 @@ diff -Nru openjdk.orig/jdk/make/sun/xawt ifeq ($(PLATFORM), linux) LDFLAGS += -lpthread dummy := $(shell $(MKDIR) -p $(LIB_LOCATION)) -@@ -86,7 +91,7 @@ +@@ -87,7 +92,7 @@ vpath %.c $(PLATFORM_SRC)/native/sun/java2d/opengl vpath %.c $(PLATFORM_SRC)/native/sun/java2d/x11 @@ -158,7 +158,7 @@ diff -Nru openjdk.orig/jdk/make/sun/xawt $(LDFLAGS_COMMON) $(AWT_RUNPATH) $(OTHER_LDFLAGS) -lXtst -lXi ifeq ($(PLATFORM), solaris) -@@ -120,7 +125,7 @@ +@@ -121,7 +126,7 @@ -I$(PLATFORM_SRC)/native/sun/awt/medialib \ -I$(PLATFORM_SRC)/native/sun/font \ -I$(SHARE_SRC)/native/sun/awt \ @@ -168,9 +168,9 @@ diff -Nru openjdk.orig/jdk/make/sun/xawt ifeq ($(PLATFORM), linux) # Allows for builds on Debian GNU Linux, X11 is in a different place diff -Nru openjdk.orig/jdk/make/sun/xawt/mapfile-vers openjdk/jdk/make/sun/xawt/mapfile-vers ---- openjdk.orig/jdk/make/sun/xawt/mapfile-vers 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/make/sun/xawt/mapfile-vers 2010-08-03 23:17:50.480916320 +0100 -@@ -184,6 +184,7 @@ +--- openjdk.orig/jdk/make/sun/xawt/mapfile-vers 2011-02-17 16:00:41.000000000 +0000 ++++ openjdk/jdk/make/sun/xawt/mapfile-vers 2011-02-17 16:52:48.198146458 +0000 +@@ -186,6 +186,7 @@ Java_sun_font_FontManager_populateFontFileNameMap; Java_sun_awt_X11GraphicsEnvironment_initDisplay; Java_sun_awt_X11GraphicsEnvironment_initGLX; @@ -178,7 +178,7 @@ diff -Nru openjdk.orig/jdk/make/sun/xawt Java_sun_awt_X11GraphicsEnvironment_checkShmExt; Java_sun_awt_X11GraphicsEnvironment_getNumScreens; Java_sun_awt_X11GraphicsEnvironment_getDefaultScreenNum; -@@ -332,20 +333,51 @@ +@@ -337,20 +338,51 @@ Java_sun_java2d_x11_X11Renderer_XFillRect; Java_sun_java2d_x11_X11Renderer_XFillRoundRect; Java_sun_java2d_x11_X11Renderer_devCopyArea; @@ -240,7 +240,7 @@ diff -Nru openjdk.orig/jdk/make/sun/xawt Java_com_sun_java_swing_plaf_gtk_GTKEngine_native_1paint_1box; diff -Nru openjdk.orig/jdk/src/share/classes/sun/font/GlyphDisposedListener.java openjdk/jdk/src/share/classes/sun/font/GlyphDisposedListener.java --- openjdk.orig/jdk/src/share/classes/sun/font/GlyphDisposedListener.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/font/GlyphDisposedListener.java 2010-08-03 23:17:50.480916320 +0100 ++++ openjdk/jdk/src/share/classes/sun/font/GlyphDisposedListener.java 2011-02-17 16:52:48.198146458 +0000 @@ -0,0 +1,32 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -275,8 +275,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla + public void glyphDisposed(ArrayList glyphs); +} diff -Nru openjdk.orig/jdk/src/share/classes/sun/font/StrikeCache.java openjdk/jdk/src/share/classes/sun/font/StrikeCache.java ---- openjdk.orig/jdk/src/share/classes/sun/font/StrikeCache.java 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/font/StrikeCache.java 2010-08-03 23:25:03.054323484 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/font/StrikeCache.java 2011-02-17 16:00:33.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/font/StrikeCache.java 2011-02-17 16:52:48.198146458 +0000 @@ -31,6 +31,7 @@ import java.lang.ref.ReferenceQueue; import java.lang.ref.SoftReference; @@ -438,8 +438,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla public static Reference getStrikeRef(FontStrike strike) { return getStrikeRef(strike, cacheRefTypeWeak); diff -Nru openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/BufferedPaints.java openjdk/jdk/src/share/classes/sun/java2d/pipe/BufferedPaints.java ---- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/BufferedPaints.java 2010-06-21 22:15:29.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/java2d/pipe/BufferedPaints.java 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/BufferedPaints.java 2011-01-20 23:54:26.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/BufferedPaints.java 2011-02-17 16:52:48.198146458 +0000 @@ -307,7 +307,7 @@ * linear RGB space. Copied directly from the * MultipleGradientPaintContext class. @@ -450,8 +450,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla input = color / 255.0f; diff -Nru openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/RenderBuffer.java openjdk/jdk/src/share/classes/sun/java2d/pipe/RenderBuffer.java ---- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/RenderBuffer.java 2010-06-21 22:15:29.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/java2d/pipe/RenderBuffer.java 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/RenderBuffer.java 2011-01-20 23:54:26.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/RenderBuffer.java 2011-02-17 16:52:48.198146458 +0000 @@ -131,6 +131,11 @@ curAddress = baseAddress; } @@ -465,8 +465,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla * putByte() methods... */ diff -Nru openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine openjdk/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine ---- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine 2010-06-21 22:15:29.000000000 +0100 -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine 2011-01-20 23:54:26.000000000 +0000 ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/META-INF/services/sun.java2d.pipe.RenderingEngine 2011-02-17 16:52:48.198146458 +0000 @@ -1,2 +1,5 @@ +# Jules Rendering Engine module +sun.java2d.jules.JulesRenderingEngine @@ -476,8 +476,8 @@ diff -Nru openjdk.orig/jdk/src/share/cla +sun.java2d.pisces.PiscesRenderingEngine \ No newline at end of file diff -Nru openjdk.orig/jdk/src/share/native/sun/font/AccelGlyphCache.c openjdk/jdk/src/share/native/sun/font/AccelGlyphCache.c ---- openjdk.orig/jdk/src/share/native/sun/font/AccelGlyphCache.c 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/font/AccelGlyphCache.c 2010-08-03 23:18:20.208668761 +0100 +--- openjdk.orig/jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-02-17 16:00:33.000000000 +0000 ++++ openjdk/jdk/src/share/native/sun/font/AccelGlyphCache.c 2011-02-17 16:52:48.198146458 +0000 @@ -325,6 +325,7 @@ cellInfo->glyphInfo = glyph; cellInfo->nextGCI = glyph->cellInfo; @@ -487,8 +487,8 @@ diff -Nru openjdk.orig/jdk/src/share/nat /** diff -Nru openjdk.orig/jdk/src/share/native/sun/font/fontscalerdefs.h openjdk/jdk/src/share/native/sun/font/fontscalerdefs.h ---- openjdk.orig/jdk/src/share/native/sun/font/fontscalerdefs.h 2010-06-21 22:15:41.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/font/fontscalerdefs.h 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/share/native/sun/font/fontscalerdefs.h 2011-01-20 23:54:38.000000000 +0000 ++++ openjdk/jdk/src/share/native/sun/font/fontscalerdefs.h 2011-02-17 16:52:48.198146458 +0000 @@ -84,15 +84,26 @@ #define t2kScalarAverage(a, b) (((a) + (b)) / (t2kScalar)(2)) @@ -518,8 +518,8 @@ diff -Nru openjdk.orig/jdk/src/share/nat } GlyphInfo; diff -Nru openjdk.orig/jdk/src/share/native/sun/font/freetypeScaler.c openjdk/jdk/src/share/native/sun/font/freetypeScaler.c ---- openjdk.orig/jdk/src/share/native/sun/font/freetypeScaler.c 2010-08-03 23:14:58.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/font/freetypeScaler.c 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/share/native/sun/font/freetypeScaler.c 2011-02-17 16:00:43.000000000 +0000 ++++ openjdk/jdk/src/share/native/sun/font/freetypeScaler.c 2011-02-17 16:52:48.198146458 +0000 @@ -783,6 +783,7 @@ return ptr_to_jlong(glyphInfo); } @@ -538,8 +538,8 @@ diff -Nru openjdk.orig/jdk/src/share/nat point; and a second-order control point if unset. */ current_type = SEG_CUBICTO; diff -Nru openjdk.orig/jdk/src/share/native/sun/font/sunFont.c openjdk/jdk/src/share/native/sun/font/sunFont.c ---- openjdk.orig/jdk/src/share/native/sun/font/sunFont.c 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/font/sunFont.c 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/share/native/sun/font/sunFont.c 2011-02-17 16:00:33.000000000 +0000 ++++ openjdk/jdk/src/share/native/sun/font/sunFont.c 2011-02-17 16:52:48.198146458 +0000 @@ -294,7 +294,8 @@ for (i=0; i< len; i++) { if (ptrs[i] != 0) { @@ -570,8 +570,8 @@ diff -Nru openjdk.orig/jdk/src/share/nat } diff -Nru openjdk.orig/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c openjdk/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c ---- openjdk.orig/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2010-06-21 22:15:42.000000000 +0100 -+++ openjdk/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-01-20 23:54:39.000000000 +0000 ++++ openjdk/jdk/src/share/native/sun/java2d/opengl/OGLTextRenderer.c 2011-02-17 16:52:48.198146458 +0000 @@ -244,6 +244,7 @@ OGLTR_AddToGlyphCache(GlyphInfo *glyph, jboolean rgbOrder) { @@ -614,8 +614,8 @@ diff -Nru openjdk.orig/jdk/src/share/nat // location of the glyph in the destination's coordinate space diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2010-08-03 23:14:59.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2011-02-17 16:00:33.000000000 +0000 ++++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsDevice.java 2011-02-17 16:52:48.198146458 +0000 @@ -37,6 +37,7 @@ import java.util.HashMap; @@ -677,8 +677,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/c } } diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java ---- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2010-06-21 22:15:43.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2010-08-03 23:17:50.480916320 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-01-20 23:54:40.000000000 +0000 ++++ openjdk/jdk/src/solaris/classes/sun/awt/X11GraphicsEnvironment.java 2011-02-17 16:52:48.198146458 +0000 @@ -26,6 +26,7 @@ package sun.awt; @@ -763,7 +763,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c * Returns: diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java openjdk/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java --- openjdk.orig/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java 2010-08-03 23:17:50.480916320 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/font/XRGlyphCacheEntry.java 2011-02-17 16:52:48.198146458 +0000 @@ -0,0 +1,206 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -973,7 +973,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/font/XRGlyphCache.java openjdk/jdk/src/solaris/classes/sun/font/XRGlyphCache.java --- openjdk.orig/jdk/src/solaris/classes/sun/font/XRGlyphCache.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/font/XRGlyphCache.java 2010-08-03 23:17:50.480916320 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/font/XRGlyphCache.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,301 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -1278,7 +1278,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/font/XRTextRenderer.java openjdk/jdk/src/solaris/classes/sun/font/XRTextRenderer.java --- openjdk.orig/jdk/src/solaris/classes/sun/font/XRTextRenderer.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/font/XRTextRenderer.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/font/XRTextRenderer.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,152 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -1434,7 +1434,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/IdleTileCache.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/IdleTileCache.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/IdleTileCache.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/IdleTileCache.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/IdleTileCache.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,109 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -1547,7 +1547,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesAATileGenerator.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesAATileGenerator.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesAATileGenerator.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesAATileGenerator.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesAATileGenerator.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,349 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -1900,7 +1900,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesPathBuf.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesPathBuf.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesPathBuf.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesPathBuf.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesPathBuf.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,271 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -2175,7 +2175,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesRenderingEngine.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesRenderingEngine.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesRenderingEngine.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesRenderingEngine.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesRenderingEngine.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,54 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -2233,7 +2233,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesShapePipe.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesShapePipe.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesShapePipe.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesShapePipe.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesShapePipe.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,102 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -2339,7 +2339,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesTile.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesTile.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/JulesTile.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesTile.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/JulesTile.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,67 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -2410,7 +2410,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/TileWorker.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/TileWorker.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/TileWorker.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/TileWorker.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/TileWorker.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,146 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -2560,7 +2560,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/TrapezoidList.java openjdk/jdk/src/solaris/classes/sun/java2d/jules/TrapezoidList.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/jules/TrapezoidList.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/TrapezoidList.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/jules/TrapezoidList.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,110 @@ +/* + * Copyright 2010 Sun Microsystems, Inc. All Rights Reserved. @@ -2673,8 +2673,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/c + } +} diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/SurfaceManagerFactory.java openjdk/jdk/src/solaris/classes/sun/java2d/SurfaceManagerFactory.java ---- openjdk.orig/jdk/src/solaris/classes/sun/java2d/SurfaceManagerFactory.java 2010-06-21 22:15:44.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/SurfaceManagerFactory.java 2010-08-03 23:17:50.484916824 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/java2d/SurfaceManagerFactory.java 2011-01-20 23:54:41.000000000 +0000 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/SurfaceManagerFactory.java 2011-02-17 16:52:48.202146146 +0000 @@ -34,6 +34,8 @@ import sun.java2d.opengl.GLXGraphicsConfig; import sun.java2d.opengl.GLXVolatileSurfaceManager; @@ -2703,8 +2703,8 @@ diff -Nru openjdk.orig/jdk/src/solaris/c return new X11VolatileSurfaceManager(vImg, context); } diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java openjdk/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java ---- openjdk.orig/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java 2010-06-21 22:15:44.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java 2010-08-03 23:17:50.484916824 +0100 +--- openjdk.orig/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java 2011-02-17 16:00:43.000000000 +0000 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/x11/X11SurfaceData.java 2011-02-17 16:52:48.202146146 +0000 @@ -46,6 +46,7 @@ import sun.awt.SunToolkit; import sun.awt.X11ComponentPeer; @@ -2750,7 +2750,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c } /** -@@ -402,11 +402,11 @@ +@@ -405,11 +405,11 @@ cm, drawable, transparency); } @@ -2767,7 +2767,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c protected X11SurfaceData(X11ComponentPeer peer, X11GraphicsConfig gc, -@@ -565,8 +565,6 @@ +@@ -568,8 +568,6 @@ return sType; } @@ -2776,7 +2776,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c public void invalidate() { if (isValid()) { setInvalid(); -@@ -580,16 +578,9 @@ +@@ -583,16 +581,9 @@ * X11SurfaceData object. */ @@ -2795,7 +2795,7 @@ diff -Nru openjdk.orig/jdk/src/solaris/c private Region validatedClip; diff -Nru openjdk.orig/jdk/src/solaris/classes/sun/java2d/x11/XSurfaceData.java openjdk/jdk/src/solaris/classes/sun/java2d/x11/XSurfaceData.java --- openjdk.orig/jdk/src/solaris/classes/sun/java2d/x11/XSurfaceData.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/src/solaris/classes/sun/java2d/x11/XSurfaceData.java 2010-08-03 23:17:50.484916824 +0100 ++++ openjdk/jdk/src/solaris/classes/sun/java2d/x11/XSurfaceData.java 2011-02-17 16:52:48.202146146 +0000 @@ -0,0 +1,40 @@ From ahughes at redhat.com Thu Feb 17 14:00:36 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 17 Feb 2011 22:00:36 +0000 Subject: [icedtea-web] RFC: do not install netx.jar and plugin.jar into jdk dir In-Reply-To: <4D5D9585.1030405@redhat.com> References: <4D5D9585.1030405@redhat.com> Message-ID: <20110217220036.GA27039@rivendell.middle-earth.co.uk> On 16:39 Thu 17 Feb , Omair Majid wrote: > Hi, > > The attached patch isolates icedtea-web into its own directories. With > this patch applied, icedtea-web does not need to be installed into a > jdk-style dir. > Finally! > I have removed the pluginappletviewer binary. I had originally posted it > a separate patch, but since using pluginappletviewer would make this > patch more complex, I have removed it here. > Please do this in a separate patch prior to this. The two issues shouldn't be confused. > Currently, the jdk it uses to run is determined at build-time. In the > future, this will probably be changed so that icedtea-web will be able > to use any installed jdk. > Yeah I pondered this when reading the patch. What is wrong with just calling 'java'? I seem to remember there were some issues with libjava not being found if 1.0 was installed in the wrong location and this was due to a relative LD_LIBRARY_PATH extension. I don't see this fixed. Do the new binaries work with just this patch? > Any thoughts or comments on the patch? > More inline. > Cheers, > Omair > diff -r 2289777074ae Makefile.am > --- a/Makefile.am Tue Feb 15 17:03:09 2011 -0500 > +++ b/Makefile.am Thu Feb 17 16:33:53 2011 -0500 > @@ -17,6 +17,10 @@ > IT_CLASS_TARGET_VERSION=6 > IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) > > +JRE='"$(SYSTEM_JDK_DIR)jre"' > +LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" > +PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' > + > # Fake update version to shut up the plugin detector hosted by Oracle. > # If Oracle ever release a JDK update greater than 50, this needs to be increased. > JDK_UPDATE_VERSION=50 > @@ -39,8 +43,7 @@ > PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp > PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp > LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java > -ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp \ > - $(PLUGIN_DIR)/launcher/pluginappletviewer > +ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp > PLUGIN_PKGS = sun.applet netscape.security netscape.javascript > endif > > @@ -66,7 +69,6 @@ > > LAUNCHER_SRCDIR = $(abs_top_srcdir)/launcher > LAUNCHER_OBJECTS = java.o java_md.o splashscreen_stubs.o jli_util.o parse_manifest.o version_comp.o wildcard.o > -PLUGIN_LAUNCHER_OBJECTS = $(addprefix $(PLUGIN_DIR)/launcher/,$(LAUNCHER_OBJECTS)) > NETX_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/,$(LAUNCHER_OBJECTS)) > CONTROLPANEL_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/controlpanel/,$(LAUNCHER_OBJECTS)) > LAUNCHER_FLAGS = -O2 -fno-strict-aliasing -fPIC -pthread -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer \ > @@ -96,37 +98,20 @@ > clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs > > install-exec-local: > - ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR) > + ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir) > if ENABLE_PLUGIN > - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/ > - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) > - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar > + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir) > + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar > endif > - ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar > + ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar > ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir) > - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ > - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ > - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ > - fi ; \ > - if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ > - ln -s $(DESTDIR)$(bindir)/javaws $(DESTDIR)$(prefix)/jre/bin ; \ > - fi ; \ > - fi > - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)/jre/lib > + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar > ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(bindir) > - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ > - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ > - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ > - fi ; \ > - if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ > - ln -s $(DESTDIR)$(bindir)/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ > - fi ; \ > - fi > > install-data-local: > ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 > ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 > - ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)/jre/lib > + ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME) > if ENABLE_DOCS > ${mkinstalldirs} $(DESTDIR)$(htmldir) > (cd ${abs_top_builddir}/docs/netx; \ > @@ -144,22 +129,14 @@ > endif > > uninstall-local: > - rm -f $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/IcedTeaPlugin.so > - rm -f $(DESTDIR)$(prefix)/jre/lib/plugin.jar > - rm -f $(DESTDIR)$(prefix)/jre/lib/netx.jar > - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jnlp > - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jar > + rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so > + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar > + rm -f $(DESTDIR)$(datadir)/$(PAKCAGE_NAME)/netx.jar > + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp > + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar > rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1 > - rm -f $(DESTDIR)$(bindir)/pluginappletviewer > rm -f $(DESTDIR)$(bindir)/javaws > - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ > - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ > - fi > - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws > rm -f $(DESTDIR)$(bindir)/itweb-settings > - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ > - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ > - fi > rm -rf $(DESTDIR)$(htmldir) > > # Plugin > @@ -187,6 +164,8 @@ > -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \ > -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \ > -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \ > + -DICEDTEA_WEB_JRE=$(JRE) \ > + -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \ > $(GLIB_CFLAGS) \ > $(GTK_CFLAGS) \ > $(MOZILLA_CFLAGS) \ > @@ -201,16 +180,8 @@ > $(MOZILLA_LIBS)\ > -shared -o $@ > > -$(PLUGIN_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c > - mkdir -p $(PLUGIN_DIR)/launcher && \ > - $(CC) $(LAUNCHER_FLAGS) -DJAVA_ARGS='{ "sun.applet.PluginMain" }' -DPROGNAME='"pluginappletviewer"' -c -o $@ $< > - > -$(PLUGIN_DIR)/launcher/pluginappletviewer: $(PLUGIN_LAUNCHER_OBJECTS) > - $(CC) $(PLUGIN_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) > - > clean-IcedTeaPlugin: > rm -f $(PLUGIN_DIR)/launcher/*.o > - rm -f $(PLUGIN_DIR)/launcher/pluginappletviewer > if [ -e $(PLUGIN_DIR)/launcher ]; then \ > rmdir $(PLUGIN_DIR)/launcher ; \ > fi > @@ -344,14 +315,14 @@ > $(NETX_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c > mkdir -p $(NETX_DIR)/launcher && \ > $(CC) $(LAUNCHER_FLAGS) \ > - -DJAVA_ARGS='{ "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ > - -DPROGNAME='"javaws"' -c -o $@ $< > + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ > + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"javaws"' -c -o $@ $< > > $(NETX_DIR)/launcher/controlpanel/%.o: $(LAUNCHER_SRCDIR)/%.c > mkdir -p $(NETX_DIR)/launcher/controlpanel && \ > $(CC) $(LAUNCHER_FLAGS) \ > - -DJAVA_ARGS='{ "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ > - -DPROGNAME='"itweb-settings"' -c -o $@ $< > + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ > + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"itweb-settings"' -c -o $@ $< > > $(NETX_DIR)/launcher/javaws: $(NETX_LAUNCHER_OBJECTS) > $(CC) $(NETX_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) > diff -r 2289777074ae launcher/java_md.c > --- a/launcher/java_md.c Tue Feb 15 17:03:09 2011 -0500 > +++ b/launcher/java_md.c Thu Feb 17 16:33:53 2011 -0500 > @@ -158,6 +158,7 @@ > static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, > char *jvmpath, jint jvmpathsize, char * arch); > static jboolean GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative); > +static jboolean GetIcedTeaWebJREPath(char *path, jint pathsize, char * arch, jboolean speculative); > > const char * > GetArch() > @@ -280,7 +281,9 @@ > jvmpath does not exist */ > if (wanted == running) { > /* Find out where the JRE is that we will be using. */ > - if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { > + > + //if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { > + if (!GetIcedTeaWebJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { Please just remove the line. > fprintf(stderr, "Error: could not find Java 2 Runtime Environment.\n"); > exit(2); > } > @@ -606,6 +609,33 @@ > } > > /* > + * Find path to the JRE based on the the compile flag ICEDTEA_WEB_JRE > + */ > +static jboolean > +GetIcedTeaWebJREPath(char* path, jint pathsize, char* arch, jboolean speculative) > +{ > + char libjava[MAXPATHLEN]; > + snprintf(libjava, MAXPATHLEN, ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL, arch); > + > + if (_launcher_debug) { > + printf(ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL "\n", arch); > + printf("libjava is %s\n", libjava); > + } > + Why is libjava being checked? Is this needed? I'm not sure it's standard and may be specified to Oracle JDKs. > + if (access(libjava, F_OK) == 0) { > + strncpy(path, ICEDTEA_WEB_JRE, pathsize); > + goto found; > + } > + > + return JNI_FALSE; > + > + found: > + if (_launcher_debug) > + printf("JRE path is %s\n", path); > + return JNI_TRUE; > +} > + > +/* > * Find path to JRE based on .exe's location or registry settings. > */ > static jboolean > diff -r 2289777074ae plugin/icedteanp/IcedTeaNPPlugin.cc > --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Feb 15 17:03:09 2011 -0500 > +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Feb 17 16:33:53 2011 -0500 > @@ -1547,23 +1547,25 @@ > > if (plugin_debug) > { > - command_line = (gchar**) malloc(sizeof(gchar*)*8); > + command_line = (gchar**) malloc(sizeof(gchar*)*9); > command_line[0] = g_strdup(appletviewer_executable); > - command_line[1] = g_strdup("-Xdebug"); > - command_line[2] = g_strdup("-Xnoagent"); > - command_line[3] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); > - command_line[4] = g_strdup("sun.applet.PluginMain"); > - command_line[5] = g_strdup(out_pipe_name); > - command_line[6] = g_strdup(in_pipe_name); > - command_line[7] = NULL; > + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); > + command_line[2] = g_strdup("-Xdebug"); > + command_line[3] = g_strdup("-Xnoagent"); > + command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); > + command_line[5] = g_strdup("sun.applet.PluginMain"); > + command_line[6] = g_strdup(out_pipe_name); > + command_line[7] = g_strdup(in_pipe_name); > + command_line[8] = NULL; > } else > { > - command_line = (gchar**) malloc(sizeof(gchar*)*5); > + command_line = (gchar**) malloc(sizeof(gchar*)*6); > command_line[0] = g_strdup(appletviewer_executable); > - command_line[1] = g_strdup("sun.applet.PluginMain"); > - command_line[2] = g_strdup(out_pipe_name); > - command_line[3] = g_strdup(in_pipe_name); > - command_line[4] = NULL; > + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); > + command_line[2] = g_strdup("sun.applet.PluginMain"); > + command_line[3] = g_strdup(out_pipe_name); > + command_line[4] = g_strdup(in_pipe_name); > + command_line[5] = NULL; > } > > environment = plugin_filter_environment(); > @@ -1590,17 +1592,21 @@ > command_line[0] = NULL; > g_free (command_line[1]); > command_line[1] = NULL; > + g_free (command_line[2]); > + command_line[2] = NULL; > + g_free (command_line[3]); > + command_line[3] = NULL; > + g_free (command_line[4]); > + command_line[4] = NULL; > > if (plugin_debug) > { > - g_free (command_line[2]); > - command_line[2] = NULL; > - g_free (command_line[3]); > - command_line[3] = NULL; > - g_free (command_line[4]); > - command_line[4] = NULL; > g_free (command_line[5]); > command_line[5] = NULL; > + g_free (command_line[6]); > + command_line[6] = NULL; > + g_free (command_line[7]); > + command_line[7] = NULL; > } > > g_free(command_line); > @@ -2173,38 +2179,10 @@ > } > > // Set appletviewer_executable. > - Dl_info info; > - int filename_size; > - if (dladdr ((const void*) ITNP_New, &info) == 0) > - { > - PLUGIN_ERROR_TWO ("Failed to determine plugin shared object filename", > - dlerror ()); > - np_error = NPERR_GENERIC_ERROR; > - goto cleanup_data_directory; > - } > - filename = (gchar*) malloc(sizeof(gchar)*1024); > - filename_size = readlink(info.dli_fname, filename, 1023); > - if (filename_size >= 0) > - { > - filename[filename_size] = '\0'; > - } > - > - if (!filename) > - { > - PLUGIN_ERROR ("Failed to create plugin shared object filename."); > - np_error = NPERR_OUT_OF_MEMORY_ERROR; > - goto cleanup_data_directory; > - } > - > - if (filename_size <= 0) > - { > - free(filename); > - filename = g_strdup(info.dli_fname); > - } > - > - appletviewer_executable = g_strdup_printf ("%s/../../bin/java", > - dirname (filename)); > - PLUGIN_DEBUG(".so is located at: %s and the link points to: %s. Executing java from dir %s to run %s\n", info.dli_fname, filename, dirname (filename), appletviewer_executable); > + filename = g_strdup(ICEDTEA_WEB_JRE); > + appletviewer_executable = g_strdup_printf ("%s/bin/java", > + filename); > + PLUGIN_DEBUG("Executing java at %s\n", appletviewer_executable); > if (!appletviewer_executable) > { > PLUGIN_ERROR ("Failed to create appletviewer executable name."); -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 17 14:16:17 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 17 Feb 2011 22:16:17 +0000 Subject: [icedtea-web] RFC: add proxy auto config support In-Reply-To: <4D5C39D6.2050308@redhat.com> References: <4D5C23D0.7050809@redhat.com> <20110216195129.GB26007@rivendell.middle-earth.co.uk> <4D5C39D6.2050308@redhat.com> Message-ID: <20110217221617.GC27039@rivendell.middle-earth.co.uk> On 15:55 Wed 16 Feb , Omair Majid wrote: > Hi, > > On 02/16/2011 02:51 PM, Dr Andrew John Hughes wrote: > > On 14:21 Wed 16 Feb , Omair Majid wrote: > >> The attached patch adds support for reading, parsing and using proxy > >> auto config (PAC) files to icedtea-web. > >> > >> PAC files are written in javascript, so this patch also adds a > >> dependency on rhino for building. A dependency on jrunscript is also > >> added for testing. > >> > >> PAC files will be used by both plugin and netx if deployment.proxy.type > >> is 2 (PAC) and deployment.proxy.auto.config.url points to a valid PAC > >> file. PAC files may also be used by netx if deployment.proxy.type is 3 > >> (browser) and the browser (firefox) is using a proxy auto config file > >> for resolving proxies. > >> > >> The PAC file is evaluated inside a sandbox - which only has permissions > >> to resolve urls. Because we dont want to grant createclassloader > >> permissions, I have had to set (in ProxyAutoConfig.java): > >> cx.setOptimizationLevel(-1); > >> which works without creating classes (and so works without > >> createClassLoader permissions). This option is not available by going > >> through the Java ScriptEngine apis. The patch therefore uses the rhino > >> apis directly. > >> > >> Since parsing a PAC file requires access to a set of additional > >> functions, the patch also implements them. Tests for these are included. > >> > >> make check should run these tests and end by printing a line like: > >> X of Y tests failed > >> > >> Any thoughts or comments? > >> > > > > I thought libproxy was going to be used to handle these files. Why are > > we implementing this ourselves? > > > > This is one of the possible settings in deployment.properties, and there > is no (as far as I can tell) way of implementing this through libproxy. > libproxy's api, you see, is essentially limited to: > char **px_proxy_factory_get_proxies(pxProxyFactory *self, const char *url); > This just provides a list of proxies. We cant actually make libproxy use > the settings from deployment.properties :( > > From the system's point of view, using a single source of proxy > settings everywhere is probably the right approach. But then we cant > override it using what a user has specified in deployment.properties. > Ok. Thanks for clarifying. > > There seems to be a completely broken assumption that rhino.jar is going > > to be in the JDK??? It should detect it as IcedTea does. > > > > I think I do. The check for sun.org.mozilla.javascript.Context that you > have pointed out later is a check for rhino. And rhino.jar is in the JDK > (at least it appears on icedtea6's default builds). It might be in IcedTea. It is not in any arbitrary JDK. We are trying to break ties to IcedTea, not introduce more. We should be using the system Rhino which has org.mozilla.javascript.Context. > > > What is jrunscript? I've never heard of this before. > > > > It's a tool under JDK_HOME/bin (in icedtea6 builds). It's a front end to > rhino's shell. The patch I posed uses it to run javascript though the shell. > Right, ok. Not heard of this before. Does Rhino not provide it itself? Or is it only in the JDK? > > Further comments inline. > > > > Thanks for the comments - they are really appreciated. > > > > >> diff -r cd1eda4f0d97 Makefile.am > >> --- a/Makefile.am Tue Feb 15 11:01:01 2011 -0500 > >> +++ b/Makefile.am Wed Feb 16 13:59:02 2011 -0500 > >> @@ -8,7 +8,7 @@ > >> # Build directories > >> > >> BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0 > >> -RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar > >> +RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar:$(BOOT_DIR)/jre/lib/rhino.jar > >> > > > > This is broken; you can't just assume that there is a rhino.jar in jre/lib. > > > > Please see my comments below on the symlinks. I am trying to treat > rhino.jar identically to jsse.jar. > > >> # Flags > >> IT_CFLAGS=$(CFLAGS) $(ARCHFLAG) > >> @@ -86,6 +86,8 @@ > >> all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp $(NETX_DIR)/launcher/javaws \ > >> javaws.desktop stamps/docs.stamp $(NETX_DIR)/launcher/controlpanel/itweb-settings itweb-settings.desktop > >> > >> +check-local: check-pac-functions > >> + > >> clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \ > >> clean-native-ecj clean-desktop-files clean-docs > >> if [ -e stamps ] ; then \ > >> @@ -411,6 +413,14 @@ > >> rm -rf ${abs_top_builddir}/docs/plugin > >> rm -f stamps/plugin-docs.stamp > >> > >> + > >> +# Tests > >> +# ========================== > >> + > >> +check-pac-functions: stamps/bootstrap-directory.stamp > >> + $(BOOT_DIR)/bin/jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \ > >> + $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/resources/pac-funcs.js) > >> + > >> # plugin tests > >> > >> if ENABLE_PLUGIN > >> @@ -450,12 +460,18 @@ > >> ln -sf $(JAR) $(BOOT_DIR)/bin/jar > >> ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac > >> ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc > >> + ln -sf $(JRUNSCRIPT) $(BOOT_DIR)/bin/jrunscript > >> mkdir -p $(BOOT_DIR)/jre/lib&& \ > >> ln -s $(SYSTEM_JDK_DIR)/jre/lib/rt.jar $(BOOT_DIR)/jre/lib&& \ > >> if [ -e $(SYSTEM_JDK_DIR)/jre/lib/jsse.jar ] ; then \ > >> ln -s $(SYSTEM_JDK_DIR)/jre/lib/jsse.jar $(BOOT_DIR)/jre/lib ; \ > >> else \ > >> ln -s rt.jar $(BOOT_DIR)/jre/lib/jsse.jar ; \ > >> + fi&& \ > > > > No reason to link to this fi command. That just breaks error reporting. > > > > Will fix. I was essentially trying to copy what the jsse.jar command > does above. > You just need to make it 'fi' not 'fi && \' > >> + if [ -e $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar ] ; then \ > >> + ln -s $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar $(BOOT_DIR)/jre/lib ; \ > >> + else \ > >> + ln -s rt.jar $(BOOT_DIR)/jre/lib/rhino.jar ; \ > > > > This is even more confusing. First you assume that rhino.jar is going to be in > > the JDK. If it isn't there, you then symlink to rt.jar??? > > > > I do check for sun.org.mozilla.javascript.Context (that's one of the few > rhino classes we care about) in configure. > You want org.mozilla.javascript.Context. The sun prefixed version is some Oracle JDK specific thing. > What I wanted to express in the makefile/configure (and clearly failed > to) is this: > 1. rhino classes are required to build now (that's the configure check). Fine. > 2. rhino.jar should be included in the classpath if it exists. If > rhino.jar does not exist (but we found it's classes), it's probably > rt.jar. So symlink rhino.jar to it. No it's not probably rt.jar. Please just use the Rhino check from IcedTea. > 3. Use rhino.jar when trying to compile code. The problem with this is the hardcoded path, you need to know where the system rhino is and use that. > > Does that make sense? > It does, it's just going about it the wrong way. > >> fi > >> ln -sf $(SYSTEM_JDK_DIR)/jre/lib/$(JRE_ARCH_DIR) \ > >> $(BOOT_DIR)/jre/lib/&& \ > >> diff -r cd1eda4f0d97 acinclude.m4 > >> --- a/acinclude.m4 Tue Feb 15 11:01:01 2011 -0500 > >> +++ b/acinclude.m4 Wed Feb 16 13:59:02 2011 -0500 > >> @@ -250,6 +250,40 @@ > >> AC_SUBST(ECJ_JAR) > >> ]) > >> > >> +AC_DEFUN([FIND_JRUNSCRIPT], > > > > Missing prefix; should be IT_FIND_JRUNSCRIPT. > > > > I looked around acinclude.m4 and was slightly confused about the naming. > I will fix this and post an update. > The IT_ prefix is used to denote IcedTea macros. On second thoughts, this should really use ITW_ if it's IcedTea-Web-specific. The IT_ ones are imported from IcedTea6. > >> +[ > >> + AC_MSG_CHECKING([for jrunscript]) > >> + AC_ARG_WITH([jrunscript], > >> + [AS_HELP_STRING(--with-jrunscript,specify location of the jrunscript binary)], > >> + [ > >> + if test -f "${withval}"; then > >> + JRUNSCRIPT="${withval}" > >> + fi > >> + ], > > > > You don't handle withval being yes or no, which is valid (generated by --with-jrunscript or > > --without-jrunscript). > > > > Thanks, I will fix this. > > >> + [ > >> + JRUNSCRIPT=${SYSTEM_JDK_DIR}/bin/jrunscript > >> + ]) > >> + if test -z "${JRUNSCRIPT}"; then > >> + for dir in /usr/lib/jvm/java-openjdk/bin /usr/lib/jvm/icedtea6/bin \ > >> + /usr/lib/jvm/java-6-openjdk/bin /usr/lib/jvm/openjdk/bin \ > >> + /usr/lib/jvm/java-icedtea/bin /usr/lib/jvm/java-gcj/bin \ > >> + /usr/lib/jvm/gcj-jdk/bin ; do > >> + if test -e $dir/jrunscript; then > >> + JRUNSCRIPT=$dir/jrunscript > >> + break > >> + fi > >> + done > >> + if test -z "${JRUNSCRIPT}"; then > >> + JRUNSCRIPT=no > >> + fi > >> + fi > >> + AC_MSG_RESULT(${JRUNSCRIPT}) > >> + if test "x${JRUNSCRIPT}" = "xno" ; then > >> + AC_MSG_WARN([cannot find a jrunscript, use --with-jrunscript]) > >> + fi > >> + AC_SUBST(JRUNSCRIPT) > >> +]) > >> + > >> AC_DEFUN_ONCE([IT_CHECK_PLUGIN], > >> [ > >> AC_MSG_CHECKING([whether to build the browser plugin]) > >> diff -r cd1eda4f0d97 configure.ac > >> --- a/configure.ac Tue Feb 15 11:01:01 2011 -0500 > >> +++ b/configure.ac Wed Feb 16 13:59:02 2011 -0500 > >> @@ -34,6 +34,7 @@ > >> FIND_ECJ_JAR > >> IT_FIND_JAVADOC > >> AC_CONFIG_FILES([javac], [chmod +x javac]) > >> +FIND_JRUNSCRIPT > >> > >> IT_SET_VERSION > >> IT_CHECK_XULRUNNER_VERSION > >> @@ -64,6 +65,7 @@ > >> IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager]) > >> IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie]) > >> IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler]) > >> +IT_CHECK_FOR_CLASS(SUN_ORG_MOZILLA_JAVASCRIPT_CONTEXT, [sun.org.mozilla.javascript.Context]) > > > > Ugh... we should be making this list shorter not adding to it. > > Why is this necessary? Why can't you use a standard class from the JDK or Rhino? > > > > This is rhino :) Or at least, rhino as icedtea6 ships it. Hacked up Rhino from the rewriter. Don't use. > > >> IT_CHECK_FOR_CLASS(SUN_SECURITY_PROVIDER_X509FACTORY, [sun.security.provider.X509Factory]) > >> IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_SECURITYCONSTANTS, [sun.security.util.SecurityConstants]) > >> IT_CHECK_FOR_CLASS(SUN_SECURITY_UTIL_HOSTNAMECHECKER, [sun.security.util.HostnameChecker]) > >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java > >> --- a/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Tue Feb 15 11:01:01 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Wed Feb 16 13:59:02 2011 -0500 > >> @@ -54,6 +54,7 @@ > >> > >> import net.sourceforge.jnlp.runtime.JNLPProxySelector; > >> import net.sourceforge.jnlp.runtime.JNLPRuntime; > >> +import net.sourceforge.jnlp.runtime.ProxyAutoConfig; > >> > >> /** > >> * A ProxySelector which can read proxy settings from a browser's > >> @@ -85,6 +86,8 @@ > >> private String browserSocks4ProxyHost; > >> private int browserSocks4ProxyPort; > >> > >> + private ProxyAutoConfig browserProxyAutoConfig = null; > >> + > >> /** > >> * Create a new instance of this class, reading configuration fropm the browser > >> */ > >> @@ -128,6 +131,12 @@ > >> e.printStackTrace(); > >> } > >> > >> + if (browserProxyType == BROWSER_PROXY_TYPE_PAC) { > >> + if (browserAutoConfigUrl != null) { > >> + browserProxyAutoConfig = new ProxyAutoConfig(browserAutoConfigUrl); > >> + } > >> + } > >> + > >> browserUseSameProxy = Boolean.valueOf(prefs.get("network.proxy.share_proxy_settings")); > >> > >> browserHttpProxyHost = prefs.get("network.proxy.http"); > >> @@ -216,8 +225,21 @@ > >> * browser. > >> */ > >> private List getFromBrowserPAC(URI uri) { > >> - System.err.println(R("RPRoxyPacNotImplemented")); > >> - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > >> + if (browserAutoConfigUrl == null || uri.getScheme().equals("socket")) { > >> + return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > >> + } > >> + > >> + List proxies = new ArrayList(); > >> + > >> + try { > >> + String proxiesString = browserProxyAutoConfig.getProxies(uri.toURL()); > >> + proxies.addAll(getProxiesFromPacResult(proxiesString)); > >> + } catch (MalformedURLException e) { > >> + e.printStackTrace(); > >> + proxies.add(Proxy.NO_PROXY); > >> + } > >> + > >> + return proxies; > >> } > >> > >> /** > >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/resources/Messages.properties > >> --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 15 11:01:01 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Feb 16 13:59:02 2011 -0500 > >> @@ -141,7 +141,6 @@ > >> RUnexpected=Unexpected {0} at {1} > >> RConfigurationError=Fatal error while reading the configuration > >> RConfigurationFatal=ERROR: a fatal error has occurred while loading configuration. Perhaps a global configuration was required but could not be found > >> -RPRoxyPacNotImplemented=Using Proxy Auto Config (PAC) files is not supported yet. > >> RProxyFirefoxNotFound=Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type. > >> RProxyFirefoxOptionNotImplemented=Browser proxy option "{0}" ({1}) not supported yet. > >> > >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/resources/pac-funcs.js > >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > >> +++ b/netx/net/sourceforge/jnlp/resources/pac-funcs.js Wed Feb 16 13:59:02 2011 -0500 > >> @@ -0,0 +1,830 @@ > >> +/* pac-funcs.js > >> + Copyright (C) 2011 Red Hat, Inc. > >> + > >> +This file is part of IcedTea. > >> + > >> +IcedTea is free software; you can redistribute it and/or > >> +modify it under the terms of the GNU General Public License as published by > >> +the Free Software Foundation, version 2. > >> + > > > > Shouldn't these headers now say IcedTea-Web? > > > > I am just going with the flow. I can fix this one if you want. Do you > want me to fix all others too? /me shudders at the thought of a patch > that updates all headers Oracle love such header changes :-) It means all the backports break in really stupid ways... No, I don't think it's worth the hassle. It's still in the IcedTea superproject. > > >> +IcedTea is distributed in the hope that it will be useful, > >> +but WITHOUT ANY WARRANTY; without even the implied warranty of > >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > >> +General Public License for more details. > >> + > >> +You should have received a copy of the GNU General Public License > >> +along with IcedTea; see the file COPYING. If not, write to > >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > >> +02110-1301 USA. > >> + > >> +Linking this library statically or dynamically with other modules is > >> +making a combined work based on this library. Thus, the terms and > >> +conditions of the GNU General Public License cover the whole > >> +combination. > >> + > >> +As a special exception, the copyright holders of this library give you > >> +permission to link this library with independent modules to produce an > >> +executable, regardless of the license terms of these independent > >> +modules, and to copy and distribute the resulting executable under > >> +terms of your choice, provided that you also meet, for each linked > >> +independent module, the terms and conditions of the license of that > >> +module. An independent module is a module which is not derived from > >> +or based on this library. If you modify this library, you may extend > >> +this exception to your version of the library, but you are not > >> +obligated to do so. If you do not wish to do so, delete this > >> +exception statement from your version. > >> +*/ > >> + > >> +/* > >> + * These helper functions are required to be able to parse Proxy Auto Config > >> + * (PAC) files. PAC files will use these helper functions to decide the best > >> + * proxy for connecting to a host. > >> + * > >> + * This implementation is based on the description at: > >> + * http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html > >> + */ > > > > Based on? To what extent? Is any of this code copied? Is it legal? > > > > There is no code provided at that url (well, there is some code that > shows how the functions might be used). Just function descriptions and > examples. I made sure not to use any of their examples. The javadocs > consist of descriptions of the functions in my own words. > > Also that url seems dead now :/ This works for me right now: > http://web.archive.org/web/20080406080210/http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html > Ugh... Is there a more stable URL? > >> + > >> +/** > >> + * Returns true if the host does not contain a domain (there are no dots) > >> + */ > >> +function isPlainHostName(host) { > >> + if (host.indexOf(".") === -1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> +} > >> + > >> +/** > >> + * Returns true if the host is part of the domain (the host ends with domain) > >> + */ > >> +function dnsDomainIs(host, domain) { > >> + var loc = host.lastIndexOf(domain); > >> + if (loc === -1) { > >> + return false; > >> + } > >> + if (loc + domain.length === host.length) { > >> + // host ends with domain > >> + return true; > >> + } > >> + return false; > >> +} > >> + > >> +/** > >> + * Returns true if the host is an exact match of hostdom or if host is not a > >> + * fully qualified name but has the same hostname as hostdom > >> + */ > >> +function localHostOrDomainIs(host, hostdom) { > >> + if (host === hostdom) { > >> + // exact match > >> + return true; > >> + } > >> + var firstdot = hostdom.indexOf("."); > >> + if (firstdot === -1) { > >> + // hostdom has no dots > >> + return false; > >> + } > >> + if (host === hostdom.substring(0, firstdot)) { > >> + // hostname matches > >> + return true; > >> + } > >> + return false; > >> +} > >> + > >> +/** > >> + * Returns true if the host name can be resolved. > >> + */ > >> +function isResolvable(host) { > >> + try { > >> + java.net.InetAddress.getByName(host); > >> + return true; > >> + } catch (e) { > >> + //if (e.javaException instanceof java.net.UnknownHostException) { > >> + return false; > >> + //} else { > >> + // throw e; > >> + //} > >> + } > >> +} > >> + > >> +/** > >> + * Return true if the ip address of the host matches the pattern given the mask. > >> + */ > >> +function isInNet(host, pattern, mask) { > >> + if (!isResolvable(host)) { > >> + return false; > >> + } > >> + > >> + var hostIp = dnsResolve(host); > >> + var hostParts = hostIp.split("."); > >> + var patternParts = pattern.split("."); > >> + var maskParts = mask.split("."); > >> + > >> + if (hostParts.length !== 4 || > >> + patternParts.length !== hostParts.length || > >> + maskParts.length !== hostParts.length) { > >> + return false; > >> + } > >> + > >> + var matched = true; > >> + for (var i = 0; i< hostParts.length; i++) { > >> + var partMatches = (hostParts[i]& maskParts[i]) === (patternParts[i]& maskParts[i]); > >> + matched = matched&& partMatches; > >> + } > >> + > >> + return matched; > >> +} > >> + > >> +/** > >> + * Returns the IP address of the host as a string > >> + */ > >> +function dnsResolve(host) { > >> + return java.net.InetAddress.getByName(host).getHostAddress() + ""; > >> +} > >> + > >> +/** > >> + * Returns the local IP address > >> + */ > >> +function myIpAddress() { > >> + return java.net.InetAddress.getLocalHost().getHostAddress() + ""; > >> +} > >> + > >> +/** > >> + * Returns the number of domains in a hostname > >> + */ > >> +function dnsDomainLevels(host) { > >> + var levels = 0; > >> + for (var i = 0; i< host.length; i++) { > >> + if (host[i] === '.') { > >> + levels++; > >> + } > >> + } > >> + return levels; > >> +} > >> + > >> +/** > >> + * Returns true if the shell expression matches the given input string > >> + */ > >> +function shExpMatch(str, shExp) { > >> + > >> + // TODO support all special characters > >> + // right now we support only * and ? > >> + > >> + > >> + try { > >> + > >> + // turn shExp into a regular expression > >> + > >> + var work = ""; > >> + > >> + // escape characters > >> + for (var i = 0; i< shExp.length; i++) { > >> + var ch = shExp[i]; > >> + switch (ch) { > >> + case "\\": work = work + "\\\\"; break; > >> + case "^": work = work + "\\^"; break; > >> + case "$": work = work + "\\$"; break; > >> + case "+": work = work + "\\+"; break; > >> + case ".": work = work + "\\."; break; > >> + case "(": work = work + "\\("; break; > >> + case ")": work = work + "\\)"; break; > >> + case "{": work = work + "\\{"; break; > >> + case "}": work = work + "\\}"; break; > >> + case "[": work = work + "\\["; break; > >> + case "]": work = work + "\\]"; break; > >> + > >> + case "?": work = work + ".{1}"; break; > >> + case "*": work = work + ".*"; break; > >> + > >> + default: > >> + work = work + ch; > >> + } > >> + > >> + } > >> + > >> + var regExp = "^" + work + "$"; > >> + > >> + // match > >> + //java.lang.System.out.println("") > >> + //java.lang.System.out.println("Input String : " + str); > >> + //java.lang.System.out.println("Input Pattern : " + shExp); > >> + //java.lang.System.out.println("RegExp : " + regExp.toString()); > >> + var match = str.match(regExp); > >> + > >> + if (match === null) { > >> + return false; > >> + } else { > >> + return true; > >> + } > >> + > >> + > >> + } catch (e) { > >> + return false; > >> + } > >> + > >> +} > >> + > >> + > >> +/** > >> + * Returns true if the current weekday matches the desired weekday(s) > >> + * > >> + * Possible ways of calling: > >> + * weekdayRange(wd1); > >> + * weekdayRange(wd1, "GMT"); > >> + * weekdayRange(wd1, wd2); > >> + * weekdayRange(wd1, wd2, "GMT"); > >> + * > >> + * Where wd1 and wd2 are one of "SUN", "MON", "TUE", "WED", "THU", "FRI" and > >> + * "SAT" > >> + * > >> + * The argument "GMT", if present, is always the last argument > >> + */ > >> +function weekdayRange() { > >> + var wd1; > >> + var wd2; > >> + var gmt = false; > >> + > >> + function isWeekDay(day) { > >> + if (day === "SUN" || day === "MON" || day === "TUE" || day === "WED" || > >> + day === "THU" || day === "FRI" || day === "SAT") { > >> + return true; > >> + } > >> + return false; > >> + } > >> + > >> + function strToWeekDay(str) { > >> + switch (str) { > >> + case "SUN": return 0; > >> + case "MON": return 1; > >> + case "TUE": return 2; > >> + case "WED": return 3; > >> + case "THU": return 4; > >> + case "FRI": return 5; > >> + case "SAT": return 6; > >> + default: return 0; > >> + } > >> + } > >> + > >> + if (arguments.length> 1) { > >> + if (arguments[arguments.length-1] === "GMT") { > >> + gmt = true; > >> + arguments.splice(0,arguments.length-1); > >> + } > >> + } > >> + > >> + if (arguments.length === 0) { return false; } > >> + > >> + wd1 = arguments[0]; > >> + > >> + if (!isWeekDay(wd1)) { return false; } > >> + > >> + var today = new Date().getDay(); > >> + if (arguments.length>= 2) { > >> + // return true if current weekday is between wd1 and wd2 (inclusive) > >> + wd2 = arguments[1]; > >> + if (!isWeekDay(wd2)) { return false; } > >> + > >> + var day1 = strToWeekDay(wd1); > >> + var day2 = strToWeekDay(wd2); > >> + > >> + if (day1<= day2) { > >> + if ( day1<= today&& today<= day2) { > >> + return true; > >> + } > >> + return false; > >> + } else { > >> + if (day1<= today || today<= day2) { > >> + return true; > >> + } > >> + return false; > >> + } > >> + } else { > >> + // return true if the current weekday is wd1 > >> + if (strToWeekDay(wd1) === today) { > >> + return true; > >> + } > >> + return false; > >> + } > >> +} > >> + > >> +/** > >> + * Returns true if the current date matches the given date(s) > >> + * > >> + * Possible ways of calling: > >> + * dateRange(day) > >> + * dateRange(day1, day2) > >> + * dateRange(month) > >> + * dateRange(month1, month2) > >> + * dateRange(year) > >> + * dateRange(year1, year2) > >> + * dateRange(day1, month1, day2, month2) > >> + * dateRange(month1, year1, month2, year2) > >> + * dateRange(day1, month1, year1, day2, month2, year2) > >> + * > >> + * The parameter "GMT" may additionally be passed as the last argument in any > >> + * of the above ways of calling. > >> + */ > >> +function dateRange() { > >> + > >> + // note: watch out for wrapping around of dates. date ranges, like > >> + // month=9 to month=8, wrap around and cover the entire year. this > >> + // makes everything more interesting > >> + > >> + var gmt; > >> + if (arguments.length> 1) { > >> + if (arguments[arguments.length-1] === "GMT") { > >> + gmt = true; > >> + arguments.splice(0,arguments.length-1); > >> + } > >> + } > >> + > >> + function isDate(date) { > >> + if (typeof(date) === 'number'&& (date<= 31&& date>= 1)) { > >> + return true; > >> + } > >> + return false; > >> + } > >> + > >> + function strToMonth(month) { > >> + switch (month) { > >> + case "JAN": return 0; > >> + case "FEB": return 1; > >> + case "MAR": return 2; > >> + case "APR": return 3; > >> + case "MAY": return 4; > >> + case "JUN": return 5; > >> + case "JUL": return 6; > >> + case "AUG": return 7; > >> + case "SEP": return 8; > >> + case "OCT": return 9; > >> + case "NOV": return 10; > >> + case "DEC": return 11; > >> + default: return 0; > >> + } > >> + } > >> + > >> + function isMonth(month) { > >> + if (month === "JAN" || month === "FEB" || month === "MAR" || > >> + month === "APR" || month === "MAY" || month === "JUN" || > >> + month === "JUL" || month === "AUG" || month === "SEP" || > >> + month === "OCT" || month === "NOV" || month === "DEC") { > >> + return true; > >> + } > >> + return false; > >> + } > >> + > >> + function isYear(year) { > >> + if (typeof(year) === 'number') { > >> + return true; > >> + } > >> + return false; > >> + } > >> + > >> + function inDateRange(today, date1, date2) { > >> + if (date1<= date2) { > >> + if (date1<= today.getDate()&& today.getDate()<= date2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + if (date1<= today.getDate() || today.getDate()<= date2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + } > >> + > >> + function inMonthRange(today, month1, month2) { > >> + if (month1<= month2) { > >> + if (month1<= today.getMonth()&& today.getMonth()<= month2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + if (month1<= today.getMonth() || today.getMonth()<= month2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + } > >> + > >> + function inYearRange(today, year1, year2) { > >> + if (year1<= today.getYear()&& today.getYear()<= year2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + > >> + function inMonthDateRange(today, date1, month1, date2, month2) { > >> + if (month1 === month2) { > >> + if (today.getMonth() === month1) { > >> + if (date1<= today.getDate()&& today.getDate()<= date2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + if (date1<= date2) { > >> + return false; > >> + } else { > >> + return true; > >> + } > >> + } > >> + } else if (month1< month2) { > >> + if (month1<= today.getMonth()&& today.getMonth()<= month2) { > >> + if (today.getMonth() === month1) { > >> + if (today.getDate()>= date1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (today.getMonth() === month2) { > >> + if (today.getDate()<= date2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return true; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + if (month1<= today.getMonth() || today.getMonth()<= month2) { > >> + if (today.getMonth() === month1) { > >> + if (today.getDate()>= date1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (today.getMonth() === month2) { > >> + if (today.getDate()<= date2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return true; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } > >> + } > >> + > >> + function inYearMonthRange(today, month1, year1, month2, year2) { > >> + if (year1 === year2) { > >> + if (today.getYear() === year1) { > >> + if (month1<= today.getMonth()&& today.getMonth()<= month2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } > >> + if (year1< year2) { > >> + if (year1<= today.getYear()&& today.getYear()<= year2) { > >> + if (today.getYear() === year1) { > >> + if (today.getMonth()>= month1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (today.getYear() === year2) { > >> + if (today.getMonth()<= month2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return true; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return false; > >> + } > >> + > >> + } > >> + > >> + function inYearMonthDateRange(today, date1, month1, year1, date2, month2, year2) { > >> + if (year1 === year2) { > >> + if (year1 === today.getYear()) { > >> + if ((month1<= today.getMonth())&& (today.getMonth()<= month2)) { > >> + if (month1 === month2) { > >> + if (date1<= today.getDate()&& today.getDate()<= date2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (today.getMonth() === month1) { > >> + if (today.getDate()>= date1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (today.getMonth() === month2) { > >> + if (today.getDate()<= date2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return true; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } else if (year1< year2) { > >> + if (year1<= today.getYear()&& today.getYear()<= year2) { > >> + if (today.getYear() === year1) { > >> + if (today.getMonth() === month1) { > >> + if (today.getDate()>= date1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (today.getMonth()> month1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (today.getYear() === year2) { > >> + if (today.getMonth()<= month2) { > >> + > >> + } else { > >> + return true; > >> + } > >> + } else { > >> + return true; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + return false; > >> + } > >> + } > >> + > >> + // TODO: change date to gmt, whatever > >> + var today = new Date(); > >> + > >> + var arg1; > >> + var arg2; > >> + var arg3; > >> + var arg4; > >> + var arg5; > >> + var arg6; > >> + > >> + switch (arguments.length) { > >> + case 1: > >> + var arg = arguments[0]; > >> + if (isDate(arg)) { > >> + if (today.getDate() === arg) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (isMonth(arg)) { > >> + if (strToMonth(arg) === today.getMonth()) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { // year > >> + if (today.getYear() === arg) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + case 2: > >> + arg1 = arguments[0]; > >> + arg2 = arguments[1]; > >> + if (isDate(arg1)&& isDate(arg2)) { > >> + var date1 = arg1; > >> + var date2 = arg2; > >> + > >> + return inDateRange(today, date1, date2); > >> + > >> + } else if (isMonth(arg1)&& isMonth(arg2)) { > >> + var month1 = strToMonth(arg1); > >> + var month2 = strToMonth(arg2); > >> + > >> + return inMonthRange(today, month1, month2); > >> + > >> + } else if (isYear(arg1)&& isYear(arg2)) { > >> + var year1 = arg1; > >> + var year2 = arg2; > >> + > >> + return inYearRange(today, year1, year2); > >> + } else { > >> + return false; > >> + } > >> + case 4: > >> + arg1 = arguments[0]; > >> + arg2 = arguments[1]; > >> + arg3 = arguments[2]; > >> + arg4 = arguments[3]; > >> + > >> + if (isDate(arg1)&& isMonth(arg2)&& isDate(arg3)&& isMonth(arg4)) { > >> + var date1 = arg1; > >> + var month1 = strToMonth(arg2); > >> + var date2 = arg3; > >> + var month2 = strToMonth(arg4); > >> + > >> + return inMonthDateRange(today, date1, month1, date2, month2); > >> + > >> + } else if (isMonth(arg1)&& isYear(arg2)&& isMonth(arg3)&& isYear(arg4)) { > >> + var month1 = strToMonth(arg1); > >> + var year1 = arg2; > >> + var month2 = strToMonth(arg3); > >> + var year2 = arg4; > >> + > >> + return inYearMonthRange(today, month1, year1, month2, year2); > >> + } else { > >> + return false; > >> + } > >> + case 6: > >> + arg1 = arguments[0]; > >> + arg2 = arguments[1]; > >> + arg3 = arguments[2]; > >> + arg4 = arguments[3]; > >> + arg5 = arguments[4]; > >> + arg6 = arguments[5]; > >> + if (isDate(arg1)&& isMonth(arg2)&& isYear(arg3)&& > >> + isDate(arg4)&& isMonth(arg5)&& isYear(arg6)) { > >> + var day1 = arg1; > >> + var month1 = strToMonth(arg2); > >> + var year1 = arg3; > >> + var day2 = arg4; > >> + var month2 = strToMonth(arg5); > >> + var year2 = arg6; > >> + > >> + return inYearMonthDateRange(today, day1, month1, year1, day2, month2, year2); > >> + } else { > >> + return false; > >> + } > >> + default: > >> + return false; > >> + } > >> + > >> +} > >> + > >> +/** > >> + * Returns true if the current time matches the range given > >> + * > >> + * timeRange(hour) > >> + * timeRange(hour1, hour2) > >> + * timeRange(hour1, min1, hour2, min2) > >> + * timeRange(hour1, min1, sec1, hour2, min2, sec2) > >> + * > >> + * The string "GMT" can be used as the last additional parameter in addition to > >> + * the methods listed above. > >> + */ > >> +function timeRange() { > >> + > >> + // watch out for wrap around of times > >> + > >> + var gmt; > >> + if (arguments.length> 1) { > >> + if (arguments[arguments.length-1] === "GMT") { > >> + gmt = true; > >> + arguments.splice(0,arguments.length-1); > >> + } > >> + } > >> + > >> + function isHour(hour) { > >> + if (typeof(hour) === "number"&& ( 0<= hour&& hour<= 23)) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + > >> + function isMin(minute) { > >> + if (typeof(minute) === "number"&& (0<= minute&& minute<= 59)) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + > >> + function inHourRange(now, hour1, hour2) { > >> + if (hour1 === hour2) { > >> + if (now.getHours() === hour1) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else if (hour1< hour2) { > >> + if (hour1<= now.getHours()&& now.getHours()<= hour2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + if (hour1<= now.getHours() || now.getHours()<= hour2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + } > >> + > >> + function inHourMinuteRange(now, hour1, min1, hour2, min2) { > >> + if (hour1 == hour2) { > >> + if (now.getHours() == hour1) { > >> + if (min1<= min2) { > >> + if (min1<= now.getMinutes()&& now.getMinutes()<= min2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + if (min1<= now.getMinutes() || now.getMinutes()<= min2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + } else { > >> + if (min1<= min2) { > >> + return false; > >> + } else { > >> + return true; > >> + } > >> + } > >> + } else if (hour1< hour2) { > >> + if (hour1<= now.getHours()&& now.getHours()<= hour2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } else { > >> + if (hour1<= now.getHours() || now.getHours()<= hour2) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + } > >> + } > >> + > >> + var today = new Date(); > >> + > >> + switch (arguments.length) { > >> + case 1: > >> + var hour = arguments[0]; > >> + if (today.getHours() === hour) { > >> + return true; > >> + } else { > >> + return false; > >> + } > >> + case 2: > >> + var hour1 = arguments[0]; > >> + var hour2 = arguments[1]; > >> + if (isHour(hour1)&& isHour(hour2)) { > >> + return inHourRange(today, hour1, hour2); > >> + } else { > >> + return false; > >> + } > >> + case 4: > >> + var hour1 = arguments[0]; > >> + var min1 = arguments[1]; > >> + var hour2 = arguments[2]; > >> + var min2 = arguments[3]; > >> + > >> + if (isHour(hour1)&& isMin(min1)&& isHour(hour2)&& isMin(min2)) { > >> + return inHourMinuteRange(today, hour1, min1, hour2, min2); > >> + } else { > >> + return false; > >> + } > >> + > >> + case 6: > >> + var hour1 = arguments[0]; > >> + var min1 = arguments[1]; > >> + var sec1 = arguments[2]; > >> + var hour2 = arguments[3]; > >> + var min2 = arguments[4]; > >> + var sec2 = arguments[5]; > >> + > >> + // TODO handle seconds properly > >> + > >> + return inHourMinuteRange(today, hour1, min1, hour2, min2); > >> + default: > >> + return false; > >> + } > >> +} > >> + > >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java > >> --- a/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Tue Feb 15 11:01:01 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Wed Feb 16 13:59:02 2011 -0500 > >> @@ -16,7 +16,6 @@ > >> > >> package net.sourceforge.jnlp.runtime; > >> > >> -import static net.sourceforge.jnlp.runtime.Translator.R; > >> import java.io.IOException; > >> import java.net.InetAddress; > >> import java.net.InetSocketAddress; > >> @@ -52,6 +51,8 @@ > >> /** The default port to use as a fallback. Currently squid's default port */ > >> public static final int FALLBACK_PROXY_PORT = 3128; > >> > >> + private ProxyAutoConfig proxyAutoConfig = null; > >> + > >> /** The proxy type. See PROXY_TYPE_* constants */ > >> private int proxyType = PROXY_TYPE_UNKNOWN; > >> > >> @@ -96,8 +97,7 @@ > >> > >> proxyType = Integer.valueOf(config.getProperty(DeploymentConfiguration.KEY_PROXY_TYPE)); > >> > >> - String autoConfigString = config > >> - .getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); > >> + String autoConfigString = config.getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); > >> if (autoConfigString != null) { > >> try { > >> autoConfigUrl = new URL(autoConfigString); > >> @@ -106,6 +106,10 @@ > >> } > >> } > >> > >> + if (autoConfigUrl != null) { > >> + proxyAutoConfig = new ProxyAutoConfig(autoConfigUrl); > >> + } > >> + > >> bypassList = new ArrayList(); > >> String proxyBypass = config.getProperty(DeploymentConfiguration.KEY_PROXY_BYPASS_LIST); > >> if (proxyBypass != null) { > >> @@ -333,14 +337,22 @@ > >> * > >> * @return a List of valid Proxy objects > >> */ > >> - private List getFromPAC(URI uri) { > >> - if (autoConfigUrl == null) { > >> + protected List getFromPAC(URI uri) { > >> + if (autoConfigUrl == null || uri.getScheme().equals("socket")) { > >> return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > >> } > >> - // TODO implement this by reading and using the PAC file > >> - System.err.println(R("RPRoxyPacNotImplemented")); > >> > >> - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > >> + List proxies = new ArrayList(); > >> + > >> + try { > >> + String proxiesString = proxyAutoConfig.getProxies(uri.toURL()); > >> + proxies.addAll(getProxiesFromPacResult(proxiesString)); > >> + } catch (MalformedURLException e) { > >> + e.printStackTrace(); > >> + proxies.add(Proxy.NO_PROXY); > >> + } > >> + > >> + return proxies; > > > > This appears to be the same as the method in getFromBrowserPAC. Could this code not be shared? > > > > It's almost the same method. The only differen is the variable it reads. > The proxyAutoConfig in JNLPProxySelector uses the url specifed in > deployment.properties file. The brwoserProxyAutoConfig in > BrowserAwareProxySelector uses the url specified in Firefox's settings. > The two can be quite different. I tried being clever about reusing the > proxyAutoConfig object and initializing/reinitializing it, but it made > the code uncessarily complex in a few places. This was the > cleanest/simplest way I could pull it off. > > >> } > >> > >> /** > >> @@ -351,5 +363,56 @@ > >> */ > >> protected abstract List getFromBrowser(URI uri); > >> > >> + /** > >> + * Converts a proxy string from a browser into a List of Proxy objects > >> + * suitable for java. > >> + * @param pacString a string indicating proxies. For example > >> + * "PROXY foo.bar:3128; DIRECT" > >> + * @return a list of Proxy objects represeting the parsed string. > >> + */ > >> + public static List getProxiesFromPacResult(String pacString) { > >> + List proxies = new ArrayList(); > >> + > >> + String[] tokens = pacString.split(";"); > >> + for (String token: tokens) { > >> + if (token.startsWith("PROXY")) { > >> + String hostPortPair = token.substring("PROXY".length()).trim(); > >> + if (!hostPortPair.contains(":")) { > >> + continue; > >> + } > >> + String host = hostPortPair.split(":")[0]; > >> + int port; > >> + try { > >> + port = Integer.valueOf(hostPortPair.split(":")[1]); > >> + } catch (NumberFormatException nfe) { > >> + continue; > >> + } > >> + SocketAddress sa = new InetSocketAddress(host, port); > >> + proxies.add(new Proxy(Type.HTTP, sa)); > >> + } else if (token.startsWith("SOCKS")) { > >> + String hostPortPair = token.substring("SOCKS".length()).trim(); > >> + if (!hostPortPair.contains(":")) { > >> + continue; > >> + } > >> + String host = hostPortPair.split(":")[0]; > >> + int port; > >> + try { > >> + port = Integer.valueOf(hostPortPair.split(":")[1]); > >> + } catch (NumberFormatException nfe) { > >> + continue; > >> + } > >> + SocketAddress sa = new InetSocketAddress(host, port); > >> + proxies.add(new Proxy(Type.SOCKS, sa)); > >> + } else if (token.startsWith("DIRECT")) { > >> + proxies.add(Proxy.NO_PROXY); > >> + } else { > >> + if (JNLPRuntime.isDebug()) { > >> + System.out.println("Unrecognized proxy token: " + token); > >> + } > >> + } > >> + } > >> + > >> + return proxies; > >> + } > >> > >> } > >> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/runtime/ProxyAutoConfig.java > >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > >> +++ b/netx/net/sourceforge/jnlp/runtime/ProxyAutoConfig.java Wed Feb 16 13:59:02 2011 -0500 > >> @@ -0,0 +1,252 @@ > >> +/* ProxyAutoConfig.java > >> + Copyright (C) 2011 Red Hat, Inc. > >> + > >> +This file is part of IcedTea. > >> + > >> +IcedTea is free software; you can redistribute it and/or > >> +modify it under the terms of the GNU General Public License as published by > >> +the Free Software Foundation, version 2. > >> + > >> +IcedTea is distributed in the hope that it will be useful, > >> +but WITHOUT ANY WARRANTY; without even the implied warranty of > >> +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > >> +General Public License for more details. > >> + > >> +You should have received a copy of the GNU General Public License > >> +along with IcedTea; see the file COPYING. If not, write to > >> +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > >> +02110-1301 USA. > >> + > >> +Linking this library statically or dynamically with other modules is > >> +making a combined work based on this library. Thus, the terms and > >> +conditions of the GNU General Public License cover the whole > >> +combination. > >> + > >> +As a special exception, the copyright holders of this library give you > >> +permission to link this library with independent modules to produce an > >> +executable, regardless of the license terms of these independent > >> +modules, and to copy and distribute the resulting executable under > >> +terms of your choice, provided that you also meet, for each linked > >> +independent module, the terms and conditions of the license of that > >> +module. An independent module is a module which is not derived from > >> +or based on this library. If you modify this library, you may extend > >> +this exception to your version of the library, but you are not > >> +obligated to do so. If you do not wish to do so, delete this > >> +exception statement from your version. > >> +*/ > >> + > >> +package net.sourceforge.jnlp.runtime; > >> + > >> +import java.io.BufferedReader; > >> +import java.io.IOException; > >> +import java.io.InputStream; > >> +import java.io.InputStreamReader; > >> +import java.net.SocketPermission; > >> +import java.net.URL; > >> +import java.security.AccessControlContext; > >> +import java.security.AccessController; > >> +import java.security.Permissions; > >> +import java.security.PrivilegedAction; > >> +import java.security.ProtectionDomain; > >> + > >> +import net.sourceforge.jnlp.util.TimedHashMap; > > > >> +import sun.org.mozilla.javascript.Context; > >> +import sun.org.mozilla.javascript.Function; > >> +import sun.org.mozilla.javascript.Scriptable; > > > > Please don't add more sun.* dependencies. > > > > I only added it because it's rhino. If you are not comfortable having > rhino as a required dependency, I can try and make it optional. > The problem is, as mentioned above, you need to use proper Rhino not the hacked up version in IcedTea6. > >> + > >> +/** > >> + * Represents a ProxyAutoConfig file. This object can be used to evaluate the > >> + * proxy file to find the proxy for a given url. > >> + * > >> + * @see http://en.wikipedia.org/wiki/Proxy_auto-config#The_PAC_file > >> + */ > >> +public class ProxyAutoConfig { > >> + > >> + private final String pacHelperFunctionContents; > >> + private final String pacContents; > >> + private final URL pacUrl; > >> + private final TimedHashMap cache; > >> + > >> + /** > >> + * Initialize a new object by using the PAC file located at the given URL. > >> + * > >> + * @param pacUrl the url of the PAC file to use > >> + */ > >> + public ProxyAutoConfig(URL pacUrl) { > >> + pacHelperFunctionContents = getHelperFunctionContents(); > >> + this.pacUrl = pacUrl; > >> + pacContents = getPacContents(pacUrl); > >> + cache = new TimedHashMap(); > >> + } > >> + > >> + /** > >> + * Get the proxies for accessing a given URL. The result is obtained by > >> + * evaluating the PAC file with the given url (and the host) as input. > >> + * > >> + * This method performs caching of the result. > >> + * > >> + * @param url the url for which a proxy is desired > >> + * @return a list of proxies in a string like > >> + *
"PROXY foo.example.com:8080; PROXY bar.example.com:8080; DIRECT"
> >> + * > >> + * @see #getProxiesWithoutCaching(URL) > >> + */ > >> + public String getProxies(URL url) { > >> + String cachedResult = getFromCache(url); > >> + if (cachedResult != null) { > >> + return cachedResult; > >> + } > >> + > >> + String result = getProxiesWithoutCaching(url); > >> + addToCache(url, cachedResult); > >> + return result; > >> + } > >> + > >> + /** > >> + * Get the proxies for accessing a given URL. The result is obtained by > >> + * evaluating the PAC file with the given url (and the host) as input. > >> + * > >> + * @param url the url for which a proxy is desired > >> + * @return a list of proxies in a string like > >> + *
"PROXY example.com:3128; DIRECT"
> >> + * > >> + * @see #getProxies(URL) > >> + */ > >> + public String getProxiesWithoutCaching(URL url) { > >> + if (pacHelperFunctionContents == null) { > >> + System.err.println("Error loading pac functions"); > >> + return "DIRECT"; > >> + } > >> + > >> + EvaluatePacAction evaluatePacAction = new EvaluatePacAction(pacContents, pacUrl.toString(), > >> + pacHelperFunctionContents, url); > >> + Permissions p = new Permissions(); > >> + p.add(new RuntimePermission("accessClassInPackage.sun.org.mozilla.javascript")); > >> + p.add(new SocketPermission("*", "resolve")); > >> + ProtectionDomain pd = new ProtectionDomain(null, p); > >> + AccessControlContext context = new AccessControlContext(new ProtectionDomain[] { pd }); > >> + > >> + return AccessController.doPrivileged(evaluatePacAction, context); > >> + > >> + } > >> + > >> + /** > >> + * Returns the contents of file at pacUrl as a String. > >> + */ > >> + private String getPacContents(URL pacUrl) { > >> + StringBuilder contents = null; > >> + try { > >> + String line = null; > >> + BufferedReader pacReader = new BufferedReader(new InputStreamReader(pacUrl.openStream())); > >> + contents = new StringBuilder(); > >> + while ((line = pacReader.readLine()) != null) { > >> + // System.out.println(line); > >> + contents = contents.append(line).append("\n"); > >> + } > >> + } catch (IOException e) { > >> + contents = null; > >> + } > >> + > >> + return (contents != null) ? contents.toString() : null; > >> + } > >> + > >> + /** > >> + * Returns the pac helper functions as a String. The functions are read > >> + * from net/sourceforge/jnlp/resources/pac-funcs.js > >> + */ > >> + private String getHelperFunctionContents() { > >> + StringBuilder contents = null; > >> + try { > >> + String line; > >> + ClassLoader cl = this.getClass().getClassLoader(); > >> + if (cl == null) { > >> + cl = ClassLoader.getSystemClassLoader(); > >> + } > >> + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/resources/pac-funcs.js"); > >> + BufferedReader pacFuncsReader = new BufferedReader(new InputStreamReader(in)); > >> + contents = new StringBuilder(); > >> + while ((line = pacFuncsReader.readLine()) != null) { > >> + // System.out.println(line); > >> + contents = contents.append(line).append("\n"); > >> + } > >> + } catch (IOException e) { > >> + e.printStackTrace(); > >> + contents = null; > >> + } > >> + > >> + return (contents != null) ? contents.toString() : null; > >> + } > >> + > >> + /** > >> + * Gets an entry from the cache > >> + */ > >> + private String getFromCache(URL url) { > >> + String lookupString = url.getProtocol() + "://" + url.getHost(); > >> + String result = cache.get(lookupString); > >> + return result; > >> + } > >> + > >> + /** > >> + * Adds an entry to the cache > >> + */ > >> + private void addToCache(URL url, String proxyResult) { > >> + String lookupString = url.getAuthority() + "://" + url.getHost(); > >> + cache.put(lookupString, proxyResult); > >> + } > >> + > >> + /** > >> + * Helper classs to run remote javascript code (specified by the user as > >> + * PAC URL) inside a sandbox. > >> + */ > >> + private static class EvaluatePacAction implements PrivilegedAction { > >> + > >> + private String pacContents; > >> + private String pacUrl; > >> + private String pacFuncsContents; > >> + private URL url; > >> + > >> + public EvaluatePacAction(String pacContents, String pacUrl, String pacFuncsContents, URL url) { > >> + this.pacContents = pacContents; > >> + this.pacUrl = pacUrl; > >> + this.pacFuncsContents = pacFuncsContents; > >> + this.url = url; > >> + } > >> + > >> + public String run() { > >> + Context cx = Context.enter(); > >> + try { > >> + /* > >> + * TODO defense in depth. > >> + * > >> + * This is already running within a sandbox, but we can (and we > >> + * should) lock it down further. Look into ClassShutter. > >> + */ > >> + Scriptable scope = cx.initStandardObjects(); > >> + // any optimization level greater than -1 will trigger code generation > >> + // and this block will then need classloader permissions > >> + cx.setOptimizationLevel(-1); > >> + Object result = null; > >> + result = cx.evaluateString(scope, pacFuncsContents, "internal", 1, null); > >> + result = cx.evaluateString(scope, pacContents, pacUrl, 1, null); > >> + > >> + Object functionObj = scope.get("FindProxyForURL", scope); > >> + if (!(functionObj instanceof Function)) { > >> + System.err.println("FindProxyForURL not found"); > >> + return null; > >> + } else { > >> + Function findProxyFunction = (Function) functionObj; > >> + > >> + Object[] args = { url.toString(), url.getHost() }; > >> + result = findProxyFunction.call(cx, scope, scope, args); > >> + return (String) result; > >> + } > >> + } catch (Exception e) { > >> + e.printStackTrace(); > >> + return "DIRECT"; > >> + } finally { > >> + Context.exit(); > >> + } > >> + } > >> + } > >> + > >> +} > >> diff -r cd1eda4f0d97 tests/netx/pac/pac-funcs-test.js > >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > >> +++ b/tests/netx/pac/pac-funcs-test.js Wed Feb 16 13:59:02 2011 -0500 > >> @@ -0,0 +1,446 @@ > >> + > >> +var ICEDTEA_CLASSPATH_ORG_IP = "208.78.240.231"; > >> +var CLASSPATH_ORG_IP = "199.232.41.10"; > > > > These should be able to be overridden. Same with others below. > > > > Do you mean make check should be setting the value of these constants? > Which others below are you talking about? I only see various 0 and 255 > combinations below and they are netmasks. > Sorry I meant the use of 'icedtea.classpath.org'. It would be nice to pass these as arguments but it can wait until another patch. > >> + > >> +var testsFailed = 0; > >> +var testsPassed = 0; > >> + > >> +print("loading needed files\n"); > >> +file = arguments[0] + ""; > >> +load(file) > >> +print("finished loaded needed files\n"); > >> + > >> + > >> +function main() { > >> + > >> + testIsPlainHostName(); > >> + testDnsDomainIs(); > >> + testLocalHostOrDomainIs(); > >> + testIsResolvable(); > >> + testIsInNet(); > >> + testDnsResolve(); > >> + testDnsDomainLevels(); > >> + testShExpMatch(); > >> + testWeekdayRange(); > >> + testDateRange(); > >> + testTimeRange(); > >> + > >> + java.lang.System.out.println(testsFailed + " of " + (testsFailed + testsPassed) + " tests failed"); > >> +} > >> + > >> +function runTests(name, tests) { > >> + java.lang.System.out.println("Testing: " + name.name); > >> + > >> + var undefined_var; > >> + > >> + for ( var i = 0; i< tests.length; i++) { > >> + > >> + java.lang.System.out.print("Test " + (i + 1) + ": "); > >> + var expectedVal = tests[i][0]; > >> + var args = tests[i].slice(1); > >> + var returnVal; > >> +// try { > >> + returnVal = name.apply(null, args); > >> +// } catch (e) { > >> +// returnVal = undefined_var; > >> +// } > >> + if (returnVal === expectedVal) { > >> + java.lang.System.out.println("Passed."); > >> + testsPassed++; > >> + } else { > >> + java.lang.System.out.println("FAILED."); > >> + java.lang.System.out.println(name.name + "(" + args.join(", ") + ")"); > >> + java.lang.System.out.println("Expected '" + expectedVal + "' but got '" + returnVal + "'"); > >> + testsFailed++; > >> + } > >> + } > >> +} > >> + > >> +function testIsPlainHostName() { > >> + var tests = [ > >> + [ false, "icedtea.classpath.org" ], > >> + [ false, "classpath.org" ], > >> + [ true, "org" ], > >> + [ true, "icedtea" ], > >> + [ false, ".icedtea.classpath.org" ], > >> + [ false, "icedtea." ], > >> + [ false, "icedtea.classpath." ] > >> + ]; > >> + > >> + runTests(isPlainHostName, tests); > >> +} > >> + > >> +function testDnsDomainIs() { > >> + var tests = [ > >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > >> + [ true, "icedtea.classpath.org", ".classpath.org" ], > >> + [ true, "icedtea.classpath.org", ".org" ], > >> + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], > >> + [ false, "icedtea.classpath.org", "icedtea.classpath" ], > >> + [ false, "icedtea.classpath", "icedtea.classpath.org" ], > >> + [ false, "icedtea", "icedtea.classpath.org" ] > >> + ]; > >> + > >> + runTests(dnsDomainIs, tests); > >> +} > >> + > >> +function testLocalHostOrDomainIs() { > >> + > >> + var tests = [ > >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > >> + [ true, "icedtea", "icedtea.classpath.org" ], > >> + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], > >> + [ false, "icedtea.classpath", "icedtea.classpath.org" ], > >> + [ false, "foo.classpath.org", "icedtea.classpath.org" ], > >> + [ false, "foo", "icedtea.classpath.org" ] > >> + ]; > >> + > >> + runTests(localHostOrDomainIs, tests); > >> +} > >> + > >> +function testIsResolvable() { > >> + > >> + var tests = [ > >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > >> + [ true, "classpath.org" ], > >> + [ false, "icedtea" ], > >> + [ false, "foobar.classpath.org" ], > >> + [ false, "icedtea.classpath.com" ] > >> + ]; > >> + > >> + runTests(isResolvable, tests); > >> +} > >> + > >> +function testIsInNet() { > >> + > >> + var parts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); > >> + > >> + var fakeParts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); > >> + fakeParts[0] = fakeParts[0] + 1; > >> + > >> + function createIp(array) { > >> + return array[0] + "." + array[1] + "." + array[2] + "." + array[3]; > >> + } > >> + > >> + var tests = [ > >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], > >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.0"], > >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.0.0"], > >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.0.0.0"], > >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], > >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], > >> + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], > >> + [ true, "icedtea.classpath.org", createIp(parts), "255.255.255.255" ], > >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.255"], > >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.0"], > >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.0.0"], > >> + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.0.0.0"], > >> + [ true, "icedtea.classpath.org", createIp(fakeParts), "0.0.0.0"] > >> + ]; > >> + > >> + runTests(isInNet, tests); > >> +} > >> + > >> +function testDnsResolve() { > >> + var tests = [ > >> + [ ICEDTEA_CLASSPATH_ORG_IP, "icedtea.classpath.org" ], > >> + //[ CLASSPATH_ORG_IP, "classpath.org" ], > >> + [ "127.0.0.1", "localhost" ] > >> + ]; > >> + > >> + runTests(dnsResolve, tests); > >> +} > >> + > >> +function testDnsDomainLevels() { > >> + var tests = [ > >> + [ 0, "org" ], > >> + [ 1, "classpath.org" ], > >> + [ 2, "icedtea.classpath.org" ], > >> + [ 3, "foo.icedtea.classpath.org" ] > >> + ]; > >> + > >> + runTests(dnsDomainLevels, tests); > >> + > >> +} > >> +function testShExpMatch() { > >> + var tests = [ > >> + [ true, "icedtea.classpath.org", "icedtea.classpath.org"], > >> + [ false, "icedtea.classpath.org", ".org"], > >> + [ false, "icedtea.classpath.org", "icedtea."], > >> + [ false, "icedtea", "icedtea.classpath.org"], > >> + > >> + [ true, "icedtea.classpath.org", "*" ], > >> + [ true, "icedtea.classpath.org", "*.classpath.org" ], > >> + [ true, "http://icedtea.classpath.org", "*.classpath.org" ], > >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > >> + [ true, "http://icedtea.classpath.org/foobar/", "*/foobar/*" ], > >> + [ true, "http://icedtea.classpath.org/foobar/", "*foobar*" ], > >> + [ true, "http://icedtea.classpath.org/foobar/", "*foo*" ], > >> + [ false, "http://icedtea.classpath.org/foobar/", "*/foo/*" ], > >> + [ false, "http://icedtea.classpath.org/foobar/", "*/foob/*" ], > >> + [ false, "http://icedtea.classpath.org/foobar/", "*/fooba/*" ], > >> + [ false, "http://icedtea.classpath.org/foo/", "*foobar*" ], > >> + > >> + [ true, "1", "?" ], > >> + [ true, "12", "??" ], > >> + [ true, "123", "1?3" ], > >> + [ true, "123", "?23" ], > >> + [ true, "123", "12?" ], > >> + [ true, "1234567890", "??????????" ], > >> + [ false, "1234567890", "?????????" ], > >> + [ false, "123", "1?1" ], > >> + [ false, "123", "??" ], > >> + > >> + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], > >> + [ true, "http://icedtea1.classpath.org/f1/", "*icedtea?.classpath*/f?/*" ], > >> + [ false, "http://icedtea.classpath.org/f1/", "*/f2/*" ], > >> + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], > >> + [ false, "http://icedtea.classpath.org/f1", "f?*"], > >> + [ false, "http://icedtea.classpath.org/f1", "f?*"], > >> + [ false, "http://icedtea.classpath.org/f1", "f?*"], > >> + > >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > >> + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > >> + > >> + [ true, "http://icedtea.classpath.org/foo.php?id=bah", "*foo.php*" ], > >> + [ false, "http://icedtea.classpath.org/foo_php?id=bah", "*foo.php*" ] > >> + ]; > >> + > >> + runTests(shExpMatch, tests); > >> +} > >> + > >> +function testWeekdayRange() { > >> + > >> + var today = new Date(); > >> + var day = today.getDay(); > >> + > >> + function dayToStr(day) { > >> + switch (day) { > >> + case -2: return "FRI"; > >> + case -1: return "SAT"; > >> + case 0: return "SUN"; > >> + case 1: return "MON"; > >> + case 2: return "TUE"; > >> + case 3: return "WED"; > >> + case 4: return "THU"; > >> + case 5: return "FRI"; > >> + case 6: return "SAT"; > >> + case 7: return "SUN"; > >> + case 8: return "MON"; > >> + default: return "FRI"; > >> + } > >> + > >> + } > >> + > >> + var tests = [ > >> + [ true, dayToStr(day) ], > >> + [ false, dayToStr(day+1) ], > >> + [ false, dayToStr(day-1) ], > >> + ]; > >> +} > >> + > >> +function testDateRange() { > >> + > >> + function incDate(date) { > >> + return (date + 1 - 1) % 31 +1 ; > >> + } > >> + > >> + function decDate(date) { > >> + return (date - 1 - 1 + 31) % 31 + 1; > >> + } > >> + > >> + function monthToStr(month) { > >> + switch (month) { > >> + case -1: return "DEC"; > >> + case 0: return "JAN"; > >> + case 1: return "FEB"; > >> + case 2: return "MAR"; > >> + case 3: return "APR"; > >> + case 4: return "MAY"; > >> + case 5: return "JUN"; > >> + case 6: return "JUL"; > >> + case 7: return "AUG"; > >> + case 8: return "SEP"; > >> + case 9: return "OCT"; > >> + case 10: return "NOV"; > >> + case 11: return "DEC"; > >> + case 12: return "JAN"; > >> + default: throw "Invalid Month"; > >> + } > >> + } > >> + > >> + var today = new Date(); > >> + var date = today.getDate(); > >> + var month = today.getMonth(); > >> + var year = today.getYear(); > >> + > >> + var tests = [ > >> + [ true, date ], > >> + [ false, incDate(date) ], > >> + [ false, decDate(date) ], > >> + > >> + [ true, monthToStr(month) ], > >> + [ false, monthToStr(month+1) ], > >> + [ false, monthToStr(month-1) ], > >> + > >> + [ true, year ], > >> + [ false, year - 1], > >> + [ false, year + 1], > >> + > >> + [ true, date, date ], > >> + [ true, date, incDate(date) ], > >> + [ true, decDate(date), date ], > >> + [ true, decDate(date), incDate(date) ], > >> + [ false, incDate(date), decDate(date) ], > >> + [ false, decDate(decDate(date)), decDate(date) ], > >> + [ false, incDate(date), incDate(incDate(date)) ], > >> + > >> + [ true, monthToStr(month), monthToStr(month) ], > >> + [ true, monthToStr(month), monthToStr(month+1) ], > >> + [ true, monthToStr(month-1), monthToStr(month) ], > >> + [ true, monthToStr(month-1), monthToStr(month+1) ], > >> + [ true, "JAN", "DEC" ], > >> + [ true, "DEC", "NOV" ], > >> + [ true, "JUL", "JUN"], > >> + [ false, monthToStr(month+1), monthToStr(month+1) ], > >> + [ false, monthToStr(month-1), monthToStr(month-1) ], > >> + [ false, monthToStr(month+1), monthToStr(month-1) ], > >> + > >> + [ true, year, year ], > >> + [ true, year, year+1 ], > >> + [ true, year-1, year ], > >> + [ true, year-1, year+1 ], > >> + [ false, year-2, year-1 ], > >> + [ false, year+1, year+1 ], > >> + [ false, year+1, year+2 ], > >> + [ false, year+1, year-1 ], > >> + > >> + [ true, date, monthToStr(month) , date, monthToStr(month) ], > >> + [ true, decDate(date), monthToStr(month) , date, monthToStr(month) ], > >> + [ false, decDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], > >> + [ true, date, monthToStr(month) , incDate(date), monthToStr(month) ], > >> + [ false, incDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], > >> + [ true, decDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], > >> + [ false, incDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], > >> + [ true, date, monthToStr(month-1) , date, monthToStr(month) ], > >> + [ true, date, monthToStr(month) , date, monthToStr(month+1) ], > >> + [ true, date, monthToStr(month-1) , date, monthToStr(month+1) ], > >> + [ true, incDate(date), monthToStr(month-1) , date, monthToStr(month+1) ], > >> + [ true, date, monthToStr(month-1) , decDate(date), monthToStr(month+1) ], > >> + [ false, date, monthToStr(month+1) , date, monthToStr(month-1) ], > >> + [ false, incDate(date), monthToStr(month+1) , incDate(date), monthToStr(month-1) ], > >> + [ false, decDate(date), monthToStr(month+1) , decDate(date), monthToStr(month-1) ], > >> + [ true, 1, "JAN", 31, "DEC" ], > >> + [ true, 2, "JAN", 1, "JAN" ], > >> + [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ], > >> + [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ], > >> + > >> + [ true, monthToStr(month), year, monthToStr(month), year ], > >> + [ true, monthToStr(month-1), year, monthToStr(month), year ], > >> + [ true, monthToStr(month), year, monthToStr(month+1), year ], > >> + [ true, monthToStr(month-1), year, monthToStr(month+1), year ], > >> + [ true, monthToStr(0), year, monthToStr(11), year ], > >> + [ false, monthToStr(month+1), year, monthToStr(month-1), year ], > >> + [ false, monthToStr(month+1), year, monthToStr(month+1), year ], > >> + [ false, monthToStr(month-1), year, monthToStr(month-1), year ], > >> + [ false, monthToStr(month), year-1, monthToStr(month-1), year ], > >> + [ true, monthToStr(month), year, monthToStr(month), year + 1 ], > >> + [ true, monthToStr(month), year-1, monthToStr(month), year ], > >> + [ true, monthToStr(month), year-1, monthToStr(month), year+1 ], > >> + [ true, monthToStr(0), year, monthToStr(0), year+1 ], > >> + [ true, monthToStr(0), year-1, monthToStr(0), year+1 ], > >> + [ false, monthToStr(0), year-1, monthToStr(11), year-1 ], > >> + [ false, monthToStr(0), year+1, monthToStr(11), year+1 ], > >> + > >> + [ true, date, monthToStr(month), year, date, monthToStr(month), year ], > >> + [ true, decDate(date), monthToStr(month), year, incDate(date), monthToStr(month), year ], > >> + [ true, decDate(date), monthToStr(month-1), year, incDate(date), monthToStr(month+1), year ], > >> + [ true, decDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], > >> + [ true, incDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], > >> + [ false, incDate(date), monthToStr(month), year, incDate(date), monthToStr(month+1), year+1 ], > >> + [ false, date, monthToStr(month+1), year, incDate(date), monthToStr(month+1), year+1 ], > >> + [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ], > >> + [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ], > >> + [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ], > >> + [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ], > >> + [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ], > >> + > >> + ]; > >> + > >> + runTests(dateRange, tests); > >> + > >> +} > >> + > >> +function testTimeRange() { > >> + var now = new Date(); > >> + > >> + var hour = now.getHours(); > >> + var min = now.getMinutes(); > >> + var sec = now.getSeconds(); > >> + > >> + function toHour(input) { > >> + if (input< 0) { > >> + while (input< 0) { > >> + input = input + 24; > >> + } > >> + return (input % 24); > >> + } else { > >> + return (input % 24); > >> + } > >> + } > >> + > >> + function toMin(input) { > >> + if (input< 0) { > >> + while (input< 0) { > >> + input = input + 60; > >> + } > >> + return (input % 60); > >> + } else { > >> + return (input % 60); > >> + } > >> + } > >> + > >> + tests = [ > >> + [ true, hour ], > >> + [ false, toHour(hour+1)], > >> + [ false, toHour(hour-1)], > >> + > >> + [ true, hour, hour ], > >> + [ true, toHour(hour-1), hour ], > >> + [ true, hour, toHour(hour+1)], > >> + [ true, toHour(hour-1), toHour(hour+1)], > >> + [ true, toHour(hour+1), hour ], > >> + [ true, hour, toHour(hour-1) ], > >> + [ false, toHour(hour-2), toHour(hour-1)], > >> + [ false, toHour(hour+1), toHour(hour+2)], > >> + [ false, toHour(hour+1), toHour(hour-1) ], > >> + [ true, 0, 23 ], > >> + [ true, 12, 11 ], > >> + > >> + [ true, hour, min, hour, min ], > >> + [ true, hour, min, hour, toMin(min+1) ], > >> + [ true, hour, toMin(min-1), hour, min ], > >> + [ true, hour, toMin(min-1), hour, toMin(min+1) ], > >> + [ true, hour, toMin(min+2), hour, toMin(min+1) ], > >> + [ false, hour, toMin(min+1), hour, toMin(min+1) ], > >> + [ false, hour, toMin(min-1), hour, toMin(min-1) ], > >> + [ false, hour, toMin(min+1), hour, toMin(min-1) ], > >> + [ true, toHour(hour-1), min, hour, min ], > >> + [ true, hour, min, toHour(hour+1), min ], > >> + [ true, toHour(hour-1), min, toHour(hour+1), min ], > >> + [ true, 0, 0, 23, 59 ], > >> + [ true, 0, 1, 0, 0 ], > >> + > >> + [ true, 0, 1, 0, 0, 0, 0 ], > >> + [ true, hour, min, sec, hour, min, sec ], > >> + [ true, hour, min, sec, hour, min + 10, sec ], > >> + [ true, hour, min, sec - 10, hour, min, sec ], > >> + [ true, hour, min, sec, hour, min-1 , sec ], > >> + > >> + ]; > >> + > >> + runTests(timeRange, tests); > >> +} > >> + > >> +main(); > > > > Needs work. > > Nice summary :) I posted this knowing it was (very likely) incomplete. > Thanks for your comments. They are always appreciated! > No worries, hope you don't mind my savaging of your code! ;-) > Cheers, > Omair -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Thu Feb 17 15:03:05 2011 From: omajid at redhat.com (Omair Majid) Date: Thu, 17 Feb 2011 18:03:05 -0500 Subject: [icedtea-web] RFC: do not install netx.jar and plugin.jar into jdk dir In-Reply-To: <20110217220036.GA27039@rivendell.middle-earth.co.uk> References: <4D5D9585.1030405@redhat.com> <20110217220036.GA27039@rivendell.middle-earth.co.uk> Message-ID: <4D5DA929.4020604@redhat.com> On 02/17/2011 05:00 PM, Dr Andrew John Hughes wrote: > On 16:39 Thu 17 Feb , Omair Majid wrote: >> Hi, >> >> The attached patch isolates icedtea-web into its own directories. With >> this patch applied, icedtea-web does not need to be installed into a >> jdk-style dir. >> > > Finally! > :) >> I have removed the pluginappletviewer binary. I had originally posted it >> a separate patch, but since using pluginappletviewer would make this >> patch more complex, I have removed it here. >> > > Please do this in a separate patch prior to this. The two issues shouldn't > be confused. > I posted the patch already: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012010.html. If you can approve it, I will remove pluginappletviewer before applying this patch. >> Currently, the jdk it uses to run is determined at build-time. In the >> future, this will probably be changed so that icedtea-web will be able >> to use any installed jdk. >> > > Yeah I pondered this when reading the patch. What is wrong with just calling > 'java'? > Well, we do rely on certain API's that may not be present on all JDKs. The configure checks are build time; so for now, the JRE to use is also determined at build time. It's also in the interest of minimizing changes in this one patch. I am quite sure most of the launcher code can be replaced by simple shell scripts (or a simple call to java even). But that's for another patch. > I seem to remember there were some issues with libjava not being found if 1.0 > was installed in the wrong location and this was due to a relative LD_LIBRARY_PATH > extension. I don't see this fixed. Do the new binaries work with just this > patch? > Hm.. no clue about the LD_LIBRARY_PATH issues. The binaries/plugin produced after building icedtea-web with this patch applied (I used ./configure --prefix=/home/omajid/code/icedtea-web-build/ --with-jdk-home=/home/omajid/code/icedtea6/openjdk.build/j2sdk-image/ --disable-docs) work perfectly fine for me. I did encounter an issue with libjava.so not being found. The method GetIcedTeaWebJREPath fixes that. It uses the predefined path at build time to locate the JRE rather than weird things like looking in the directory above. >> Any thoughts or comments on the patch? >> > > More inline. > > >> diff -r 2289777074ae Makefile.am >> --- a/Makefile.am Tue Feb 15 17:03:09 2011 -0500 >> +++ b/Makefile.am Thu Feb 17 16:33:53 2011 -0500 >> @@ -17,6 +17,10 @@ >> IT_CLASS_TARGET_VERSION=6 >> IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) >> >> +JRE='"$(SYSTEM_JDK_DIR)jre"' >> +LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" >> +PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' >> + >> # Fake update version to shut up the plugin detector hosted by Oracle. >> # If Oracle ever release a JDK update greater than 50, this needs to be increased. >> JDK_UPDATE_VERSION=50 >> @@ -39,8 +43,7 @@ >> PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp >> PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp >> LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java >> -ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp \ >> - $(PLUGIN_DIR)/launcher/pluginappletviewer >> +ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp >> PLUGIN_PKGS = sun.applet netscape.security netscape.javascript >> endif >> >> @@ -66,7 +69,6 @@ >> >> LAUNCHER_SRCDIR = $(abs_top_srcdir)/launcher >> LAUNCHER_OBJECTS = java.o java_md.o splashscreen_stubs.o jli_util.o parse_manifest.o version_comp.o wildcard.o >> -PLUGIN_LAUNCHER_OBJECTS = $(addprefix $(PLUGIN_DIR)/launcher/,$(LAUNCHER_OBJECTS)) >> NETX_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/,$(LAUNCHER_OBJECTS)) >> CONTROLPANEL_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/controlpanel/,$(LAUNCHER_OBJECTS)) >> LAUNCHER_FLAGS = -O2 -fno-strict-aliasing -fPIC -pthread -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer \ >> @@ -96,37 +98,20 @@ >> clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs >> >> install-exec-local: >> - ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR) >> + ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir) >> if ENABLE_PLUGIN >> - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/ >> - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) >> - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar >> + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir) >> + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar >> endif >> - ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar >> + ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar >> ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir) >> - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ >> - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ >> - fi ; \ >> - if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ >> - ln -s $(DESTDIR)$(bindir)/javaws $(DESTDIR)$(prefix)/jre/bin ; \ >> - fi ; \ >> - fi >> - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)/jre/lib >> + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar >> ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(bindir) >> - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ >> - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ >> - fi ; \ >> - if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ >> - ln -s $(DESTDIR)$(bindir)/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ >> - fi ; \ >> - fi >> >> install-data-local: >> ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 >> ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 >> - ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)/jre/lib >> + ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME) >> if ENABLE_DOCS >> ${mkinstalldirs} $(DESTDIR)$(htmldir) >> (cd ${abs_top_builddir}/docs/netx; \ >> @@ -144,22 +129,14 @@ >> endif >> >> uninstall-local: >> - rm -f $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/IcedTeaPlugin.so >> - rm -f $(DESTDIR)$(prefix)/jre/lib/plugin.jar >> - rm -f $(DESTDIR)$(prefix)/jre/lib/netx.jar >> - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jnlp >> - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jar >> + rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so >> + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar >> + rm -f $(DESTDIR)$(datadir)/$(PAKCAGE_NAME)/netx.jar >> + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp >> + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar >> rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1 >> - rm -f $(DESTDIR)$(bindir)/pluginappletviewer >> rm -f $(DESTDIR)$(bindir)/javaws >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ >> - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ >> - fi >> - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws >> rm -f $(DESTDIR)$(bindir)/itweb-settings >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ >> - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ >> - fi >> rm -rf $(DESTDIR)$(htmldir) >> >> # Plugin >> @@ -187,6 +164,8 @@ >> -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \ >> -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \ >> -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \ >> + -DICEDTEA_WEB_JRE=$(JRE) \ >> + -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \ >> $(GLIB_CFLAGS) \ >> $(GTK_CFLAGS) \ >> $(MOZILLA_CFLAGS) \ >> @@ -201,16 +180,8 @@ >> $(MOZILLA_LIBS)\ >> -shared -o $@ >> >> -$(PLUGIN_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c >> - mkdir -p $(PLUGIN_DIR)/launcher&& \ >> - $(CC) $(LAUNCHER_FLAGS) -DJAVA_ARGS='{ "sun.applet.PluginMain" }' -DPROGNAME='"pluginappletviewer"' -c -o $@ $< >> - >> -$(PLUGIN_DIR)/launcher/pluginappletviewer: $(PLUGIN_LAUNCHER_OBJECTS) >> - $(CC) $(PLUGIN_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) >> - >> clean-IcedTeaPlugin: >> rm -f $(PLUGIN_DIR)/launcher/*.o >> - rm -f $(PLUGIN_DIR)/launcher/pluginappletviewer >> if [ -e $(PLUGIN_DIR)/launcher ]; then \ >> rmdir $(PLUGIN_DIR)/launcher ; \ >> fi >> @@ -344,14 +315,14 @@ >> $(NETX_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c >> mkdir -p $(NETX_DIR)/launcher&& \ >> $(CC) $(LAUNCHER_FLAGS) \ >> - -DJAVA_ARGS='{ "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ >> - -DPROGNAME='"javaws"' -c -o $@ $< >> + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ >> + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"javaws"' -c -o $@ $< >> >> $(NETX_DIR)/launcher/controlpanel/%.o: $(LAUNCHER_SRCDIR)/%.c >> mkdir -p $(NETX_DIR)/launcher/controlpanel&& \ >> $(CC) $(LAUNCHER_FLAGS) \ >> - -DJAVA_ARGS='{ "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ >> - -DPROGNAME='"itweb-settings"' -c -o $@ $< >> + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ >> + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"itweb-settings"' -c -o $@ $< >> >> $(NETX_DIR)/launcher/javaws: $(NETX_LAUNCHER_OBJECTS) >> $(CC) $(NETX_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) >> diff -r 2289777074ae launcher/java_md.c >> --- a/launcher/java_md.c Tue Feb 15 17:03:09 2011 -0500 >> +++ b/launcher/java_md.c Thu Feb 17 16:33:53 2011 -0500 >> @@ -158,6 +158,7 @@ >> static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, >> char *jvmpath, jint jvmpathsize, char * arch); >> static jboolean GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative); >> +static jboolean GetIcedTeaWebJREPath(char *path, jint pathsize, char * arch, jboolean speculative); >> >> const char * >> GetArch() >> @@ -280,7 +281,9 @@ >> jvmpath does not exist */ >> if (wanted == running) { >> /* Find out where the JRE is that we will be using. */ >> - if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { >> + >> + //if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { >> + if (!GetIcedTeaWebJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { > > Please just remove the line. > Will do. >> fprintf(stderr, "Error: could not find Java 2 Runtime Environment.\n"); >> exit(2); >> } >> @@ -606,6 +609,33 @@ >> } >> >> /* >> + * Find path to the JRE based on the the compile flag ICEDTEA_WEB_JRE >> + */ >> +static jboolean >> +GetIcedTeaWebJREPath(char* path, jint pathsize, char* arch, jboolean speculative) >> +{ >> + char libjava[MAXPATHLEN]; >> + snprintf(libjava, MAXPATHLEN, ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL, arch); >> + >> + if (_launcher_debug) { >> + printf(ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL "\n", arch); >> + printf("libjava is %s\n", libjava); >> + } >> + > > Why is libjava being checked? Is this needed? I'm not sure it's standard and may > be specified to Oracle JDKs. > I wouldnt be surprised. The launcher code is fairly specific to OpenJDK. Most of the code in this method is based on GetJREPath (which is the method just below this one). The only significant change is where to look for libjava - this method looks for it based on a compile time constant; GetJREPath looks for it in the same directory as the binary. >> + if (access(libjava, F_OK) == 0) { >> + strncpy(path, ICEDTEA_WEB_JRE, pathsize); >> + goto found; >> + } >> + >> + return JNI_FALSE; >> + >> + found: >> + if (_launcher_debug) >> + printf("JRE path is %s\n", path); >> + return JNI_TRUE; >> +} >> + >> +/* >> * Find path to JRE based on .exe's location or registry settings. >> */ >> static jboolean >> diff -r 2289777074ae plugin/icedteanp/IcedTeaNPPlugin.cc >> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Feb 15 17:03:09 2011 -0500 >> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Feb 17 16:33:53 2011 -0500 >> @@ -1547,23 +1547,25 @@ >> >> if (plugin_debug) >> { >> - command_line = (gchar**) malloc(sizeof(gchar*)*8); >> + command_line = (gchar**) malloc(sizeof(gchar*)*9); >> command_line[0] = g_strdup(appletviewer_executable); >> - command_line[1] = g_strdup("-Xdebug"); >> - command_line[2] = g_strdup("-Xnoagent"); >> - command_line[3] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); >> - command_line[4] = g_strdup("sun.applet.PluginMain"); >> - command_line[5] = g_strdup(out_pipe_name); >> - command_line[6] = g_strdup(in_pipe_name); >> - command_line[7] = NULL; >> + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); >> + command_line[2] = g_strdup("-Xdebug"); >> + command_line[3] = g_strdup("-Xnoagent"); >> + command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); >> + command_line[5] = g_strdup("sun.applet.PluginMain"); >> + command_line[6] = g_strdup(out_pipe_name); >> + command_line[7] = g_strdup(in_pipe_name); >> + command_line[8] = NULL; >> } else >> { >> - command_line = (gchar**) malloc(sizeof(gchar*)*5); >> + command_line = (gchar**) malloc(sizeof(gchar*)*6); >> command_line[0] = g_strdup(appletviewer_executable); >> - command_line[1] = g_strdup("sun.applet.PluginMain"); >> - command_line[2] = g_strdup(out_pipe_name); >> - command_line[3] = g_strdup(in_pipe_name); >> - command_line[4] = NULL; >> + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); >> + command_line[2] = g_strdup("sun.applet.PluginMain"); >> + command_line[3] = g_strdup(out_pipe_name); >> + command_line[4] = g_strdup(in_pipe_name); >> + command_line[5] = NULL; >> } >> >> environment = plugin_filter_environment(); >> @@ -1590,17 +1592,21 @@ >> command_line[0] = NULL; >> g_free (command_line[1]); >> command_line[1] = NULL; >> + g_free (command_line[2]); >> + command_line[2] = NULL; >> + g_free (command_line[3]); >> + command_line[3] = NULL; >> + g_free (command_line[4]); >> + command_line[4] = NULL; >> >> if (plugin_debug) >> { >> - g_free (command_line[2]); >> - command_line[2] = NULL; >> - g_free (command_line[3]); >> - command_line[3] = NULL; >> - g_free (command_line[4]); >> - command_line[4] = NULL; >> g_free (command_line[5]); >> command_line[5] = NULL; >> + g_free (command_line[6]); >> + command_line[6] = NULL; >> + g_free (command_line[7]); >> + command_line[7] = NULL; >> } >> >> g_free(command_line); >> @@ -2173,38 +2179,10 @@ >> } >> >> // Set appletviewer_executable. >> - Dl_info info; >> - int filename_size; >> - if (dladdr ((const void*) ITNP_New,&info) == 0) >> - { >> - PLUGIN_ERROR_TWO ("Failed to determine plugin shared object filename", >> - dlerror ()); >> - np_error = NPERR_GENERIC_ERROR; >> - goto cleanup_data_directory; >> - } >> - filename = (gchar*) malloc(sizeof(gchar)*1024); >> - filename_size = readlink(info.dli_fname, filename, 1023); >> - if (filename_size>= 0) >> - { >> - filename[filename_size] = '\0'; >> - } >> - >> - if (!filename) >> - { >> - PLUGIN_ERROR ("Failed to create plugin shared object filename."); >> - np_error = NPERR_OUT_OF_MEMORY_ERROR; >> - goto cleanup_data_directory; >> - } >> - >> - if (filename_size<= 0) >> - { >> - free(filename); >> - filename = g_strdup(info.dli_fname); >> - } >> - >> - appletviewer_executable = g_strdup_printf ("%s/../../bin/java", >> - dirname (filename)); >> - PLUGIN_DEBUG(".so is located at: %s and the link points to: %s. Executing java from dir %s to run %s\n", info.dli_fname, filename, dirname (filename), appletviewer_executable); >> + filename = g_strdup(ICEDTEA_WEB_JRE); >> + appletviewer_executable = g_strdup_printf ("%s/bin/java", >> + filename); >> + PLUGIN_DEBUG("Executing java at %s\n", appletviewer_executable); >> if (!appletviewer_executable) >> { >> PLUGIN_ERROR ("Failed to create appletviewer executable name."); > > Thanks for looking over the patch! Cheers, Omair From ahughes at redhat.com Thu Feb 17 15:51:32 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 17 Feb 2011 23:51:32 +0000 Subject: [icedtea-web] RFC: remove pluginappletviewer binary In-Reply-To: <4D52AE82.20605@redhat.com> References: <4D52AE82.20605@redhat.com> Message-ID: <20110217235132.GE27039@rivendell.middle-earth.co.uk> On 10:10 Wed 09 Feb , Omair Majid wrote: > Hi, > > The attached patch removes the pluginappletviewer binary from > icedtea-web. Okay to commit? > > Cheers, > Omair > diff -r a6b173d91ad1 Makefile.am > --- a/Makefile.am Wed Feb 09 10:02:46 2011 -0500 > +++ b/Makefile.am Wed Feb 09 10:10:17 2011 -0500 > @@ -39,8 +39,7 @@ > PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp > PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp > LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java > -ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp \ > - $(PLUGIN_DIR)/launcher/pluginappletviewer > +ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp > PLUGIN_PKGS = sun.applet netscape.security netscape.javascript > endif > > @@ -66,7 +65,6 @@ > > LAUNCHER_SRCDIR = $(abs_top_srcdir)/launcher > LAUNCHER_OBJECTS = java.o java_md.o splashscreen_stubs.o jli_util.o parse_manifest.o version_comp.o wildcard.o > -PLUGIN_LAUNCHER_OBJECTS = $(addprefix $(PLUGIN_DIR)/launcher/,$(LAUNCHER_OBJECTS)) > NETX_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/,$(LAUNCHER_OBJECTS)) > CONTROLPANEL_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/controlpanel/,$(LAUNCHER_OBJECTS)) > LAUNCHER_FLAGS = -O2 -fno-strict-aliasing -fPIC -pthread -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer \ > @@ -99,7 +97,6 @@ > ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR) > if ENABLE_PLUGIN > ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/ > - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) > ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar > endif > ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar > @@ -150,7 +147,6 @@ > rm -f $(DESTDIR)$(prefix)/jre/lib/about.jnlp > rm -f $(DESTDIR)$(prefix)/jre/lib/about.jar > rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1 > - rm -f $(DESTDIR)$(bindir)/pluginappletviewer > rm -f $(DESTDIR)$(bindir)/javaws > if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ > rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ > @@ -201,19 +197,7 @@ > $(MOZILLA_LIBS)\ > -shared -o $@ > > -$(PLUGIN_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c > - mkdir -p $(PLUGIN_DIR)/launcher && \ > - $(CC) $(LAUNCHER_FLAGS) -DJAVA_ARGS='{ "sun.applet.PluginMain" }' -DPROGNAME='"pluginappletviewer"' -c -o $@ $< > - > -$(PLUGIN_DIR)/launcher/pluginappletviewer: $(PLUGIN_LAUNCHER_OBJECTS) > - $(CC) $(PLUGIN_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) > - > clean-IcedTeaPlugin: > - rm -f $(PLUGIN_DIR)/launcher/*.o > - rm -f $(PLUGIN_DIR)/launcher/pluginappletviewer > - if [ -e $(PLUGIN_DIR)/launcher ]; then \ > - rmdir $(PLUGIN_DIR)/launcher ; \ > - fi > rm -f $(PLUGIN_DIR)/*.o > rm -f $(PLUGIN_DIR)/IcedTeaPlugin.so > if [ $(abs_top_srcdir) != $(abs_top_builddir) ]; then \ Approved! -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Thu Feb 17 16:20:39 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 18 Feb 2011 00:20:39 +0000 Subject: /hg/icedtea6-hg: 31 new changesets Message-ID: changeset d850506bcaac in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=d850506bcaac author: Mark Wielaard date: Sat Jan 22 20:39:36 2011 +0100 * Makefile.am (ICEDTEA_PATCHES): Add missing backslash. changeset 6633b7a3a5db in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=6633b7a3a5db author: Mark Wielaard date: Sat Jan 22 21:47:34 2011 +0100 Use xvfb-run if available and DISPLAY not set for check-jdk. * configure.ac: Add xvfb-run AC_CHECK_PROG. * Makefile.am (check-jdk): Use xvfb-run if available and DISPLAY not set. changeset 6818a5e1f330 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=6818a5e1f330 author: Andrew John Hughes date: Mon Jan 24 20:55:14 2011 +0000 Update NEWS with b21 updates. 2011-01-22 Andrew John Hughes * NEWS: Update 1.10 with b21 changes. Remove changes in b21 from list of backports. changeset 75cceb14e80b in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=75cceb14e80b author: Andrew John Hughes date: Mon Jan 24 20:59:22 2011 +0000 Update NEWS with release announcements for 1.9.3, 1.7.7, 1.8.4 and 1.9.4. 2011-01-24 Andrew John Hughes * NEWS: Add 1.9.3, 1.9.4, 1.7.7 and 1.8.4 NEWS entries. changeset f4e6e86ca869 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=f4e6e86ca869 author: Andrew John Hughes date: Mon Jan 24 21:02:28 2011 +0000 Fix NEWS positioning and naming of RH661505 JPEG fix. 2011-01-24 Andrew John Hughes * patches/661505-jpeg.patch: Move to... * Makefile.am: Add rh prefix to jpeg fix. * NEWS: Move jpeg fix to Bug Fixes as not a backport. * patches/rh661505-jpeg.patch: ... here. changeset 7f4514093373 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=7f4514093373 author: Andrew John Hughes date: Mon Jan 24 21:09:58 2011 +0000 Add unlisted backports. 2011-01-24 Andrew John Hughes * NEWS: Add unlisted backports. changeset c78edcdba40f in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=c78edcdba40f author: Omair Majid date: Mon Jan 24 16:30:51 2011 -0500 Backport S6736649, S6797139 and S6883341 to fix text being truncated in some swing controls 2011-01-24 Omair Majid NEWS: Update with the 3 backports * Makefile.am (ICEDTEA_PATCHES): Add the patches * patches/openjdk/6736649-text_bearings.patch: New file. * patches/openjdk/6797139-jbutton_truncation.patch: Likewise. * patches/openjdk/6883341-text_bearing_exception.patch: Likewise. changeset cd6310f10fab in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=cd6310f10fab author: Andrew John Hughes date: Sun Jan 30 00:45:18 2011 +0000 Provide support for building with HotSpot 20. 2011-01-29 Andrew John Hughes * patches/gcc-suffix.patch, * patches/ia64-fix.patch: Split into original and hs20 versions. * patches/icedtea-no-precompiled.patch: Apply to original only. * patches/icedtea-sparc-buildfixes.patch, * patches/icedtea-text-relocations.patch, * patches/icedtea-too-many-args.patch, * patches/params-cast-size_t.patch: Split into original and hs20 versions. * INSTALL: Document new status (original as default, hs20 as alternative). * Makefile.am: (ICEDTEA_PATCHES): Updated with changes listed. (replace-hotspot): Use ${HSBUILD} instead of hardcoded hs19. * NEWS: List availability of hs20. * acinclude.m4: (AC_CHECK_WITH_HOTSPOT_BUILD): Provide hs20 as alternate build. * hotspot.map: Add hs20. * patches/arm.patch: Split bytecodes_zero.hpp changes into original and hs20 versions. * patches/hotspot/hs20/arm.patch, hs20 version of bytecodes_zero.hpp changes. * patches/hotspot/hs20/gcc-suffix.patch, * patches/hotspot/hs20/ia64-fix.patch, * patches/hotspot/hs20/params-cast-size_t.patch, * patches/hotspot/hs20/sparc-buildfixes.patch: hs20 version of patches. * patches/hotspot/hs20/systemtap.patch: hs20 version of dtrace.hpp changes. * patches/hotspot/hs20/text-relocations.patch: hs20 versions of patch. * patches/hotspot/original/arm.patch: original version of bytecodes_zero.hpp changes. * patches/hotspot/original/gcc-suffix.patch, * patches/hotspot/original/ia64-fix.patch: original versions of patches moved from patches directory. * patches/hotspot/original/no-precompiled-headers.patch: Only for original; USE_PRECOMPILED_HEADER=0 provides the same in hs20. * patches/hotspot/original/params-cast-size_t.patch, * patches/hotspot/original/sparc-buildfixes.patch: original versions of patches moved from patches directory. * patches/hotspot/original/systemtap.patch: original version of dtrace.hpp changes. * patches/hotspot/original/text-relocations.patch, * patches/hotspot/original/too-many-args.patch: original versions of patches moved from patches directory. * patches/systemtap.patch: Split dtrace.hpp changes into original and hs20 versions. changeset 0c86bdc188d3 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=0c86bdc188d3 author: ptisnovs date: Tue Feb 01 09:20:39 2011 +0100 Added two new regression tests which check correct behaviour of PNG reader. changeset 82d83ff8b150 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=82d83ff8b150 author: Andrew John Hughes date: Tue Feb 01 18:22:19 2011 +0000 Add NEWS annoucements for 1.7.8, 1.8.5 and 1.9.5. 2011-02-01 Andrew John Hughes * NEWS: Add announcements for 1.7.8, 1.8.5 and 1.9.5. changeset eee57a146340 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=eee57a146340 author: dlila date: Tue Feb 01 14:21:02 2011 -0500 CubicCurve2D backports: S4493128, S4645692, S4724552. changeset d4bc091312e0 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=d4bc091312e0 author: Andrew John Hughes date: Thu Feb 03 23:55:59 2011 +0100 PR99, PR616: Don't statically link libstdc++ or libgcc. 2011-02-03 Andrew John Hughes PR616, PR99: * Makefile.am: Add new patch. * patches/jtreg-6929067-fix.patch: Link against pthread explicitly now libstdc++ is no longer static. * patches/no-static-linking.patch: Don't statically link libstdc++ or libgcc. * NEWS: Updated. changeset cbf4a48aae30 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=cbf4a48aae30 author: Andrew John Hughes date: Sun Feb 06 13:02:20 2011 +0000 S4993545: NativeInLightFixer adds asynchronousity S6637796: setBounds doesn't enlarge Component S6607660: java.awt.Container.getMouseEventTargetImpl should be invoked while holding the TreeLock S6607170: Focus not set by requestFocus S6616323: consider benefits of replacing a component array with other collection from the awt.Container class S6682046: Mixing code does not always recalculate shapes correctly when resizing components S6797195: Forward-port enhancements for hw/lw mixing from 6u12 to 7 S6725214: D3D: forward-port the new pipeline from 6u10 2011-02-06 Andrew John Hughes * Makefile.am: Add patches below. * patches/openjdk/4993545-nativeinlightfixer.patch, * patches/openjdk/6607170-request_focus.patch, * patches/openjdk/6607660-treelock.patch, * patches/openjdk/6616323-component_array.patch, * patches/openjdk/6637796-set_bounds.patch, * patches/openjdk/6682046-shape_calculation.patch, New AWT backports from OpenJDK7. * patches/openjdk/6725214-direct3d-01.patch: Rejigged against new patches with Oracle copyrights added. * patches/openjdk/6797195-hw_lw_mixing.patch: New AWT backport from OpenJDK7. * NEWS: Updated. changeset fb1fdfc2f882 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=fb1fdfc2f882 author: Andrew John Hughes date: Sun Feb 06 13:08:35 2011 +0000 Merge changeset a3ab67013879 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=a3ab67013879 author: Andrew John Hughes date: Wed Feb 09 10:47:23 2011 +0000 S4421494, CVE-2010-4476: infinite loop while parsing double literal. 2011-02-09 Andrew John Hughes * Makefile.am: Add patch. * NEWS: Updated. * patches/security/20110209/4421494.patch: Add floating point bug fix. changeset fc0df075ea54 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=fc0df075ea54 author: Andrew John Hughes date: Sun Feb 13 17:33:58 2011 +0000 RH676659: Pass -export-dynamic option to linker not gcc. 2011-02-13 Andrew John Hughes * NEWS: Updated. 2011-02-11 Omair Majid RH676659: Pass -export-dynamic option to linker not gcc. * Makefile.am: Add new patch. * patches/rh676659-gcc-export-dynamic.patch: Pass -Wl,-export- dynamic rather than -export-dynamic. changeset 080e6564d096 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=080e6564d096 author: Andrew John Hughes date: Mon Feb 14 11:24:24 2011 +0000 G344659: Fix issue when building on SPARC 2011-02-13 Andrew John Hughes G344659: Fix issue when building on SPARC * Makefile.am: Add new patch. * NEWS: Updated. * patches/g344659-sparc_fix.patch: Add fix for SPARC builds on Gentoo. changeset 105c8fc5c1de in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=105c8fc5c1de author: Andrew John Hughes date: Tue Feb 15 22:05:21 2011 +0000 S6633275: Need to support shaped/translucent windows 2011-02-15 Andrew John Hughes * Makefile.am: Add patch below. * NEWS: Updated. * patches/openjdk/6633275-shaped_translucent_windows.patch: Support shaped/translucent windows changeset 817a086a2135 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=817a086a2135 author: Andrew John Hughes date: Tue Feb 15 22:08:40 2011 +0000 Mention copyright header backports in NEWS. 2011-02-15 Andrew John Hughes * NEWS: Mention backports of copyright header fixes for 6616323 and 6633275. changeset 4ae21998a5aa in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=4ae21998a5aa author: Andrew John Hughes date: Wed Feb 16 03:05:51 2011 +0000 Security updates from Oracle SSR. S6878713, CVE-2010-4469: Hotspot backward jsr heap corruption S6907662, CVE-2010-4465: Swing timer-based security manager bypass S6994263, CVE-2010-4472: Untrusted code allowed to replace DSIG/C14N implementation S6981922, CVE-2010-4448: DNS cache poisoning by untrusted applets S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries 2011-02-09 Andrew John Hughes * Makefile.am: Add new patches. * NEWS: Updated. * patches/icedtea-nio2.patch: Rejigged. * patches/openjdk/6633275-shaped_translucent_windows.patch, * patches/openjdk/6797195-hw_lw_mixing.patch: Fixed to accomodate appearance of AWTAccessor via security patch. * patches/security/20110215/6878713.patch, * patches/security/20110215/6907662.patch, * patches/security/20110215/6981922.patch, * patches/security/20110215/6983554.patch, * patches/security/20110215/6994263.patch: Security updates from Oracle SSR. changeset 6a5e37e3180b in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=6a5e37e3180b author: Andrew John Hughes date: Wed Feb 16 12:48:12 2011 +0000 Add 6985453 patch which was missing from first Oracle bundle. S6985453, CVE-2010-4471: Java2D font-related system property leak 2011-02-10 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6985453.patch: Add patch for 6985453 missing from first Oracle bundle. changeset 3f592b76892a in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=3f592b76892a author: Andrew John Hughes date: Wed Feb 16 14:52:54 2011 +0000 S6927050, CVE-2010-4470: JAXP untrusted component state manipulation Add patch finally supplied in third Oracle bundle. 2011-02-11 Andrew John Hughes * Makefile.am: Add additional patch. * NEWS: Updated. * patches/security/20110215/6927050.patch, Add patch for 6927050 missing from first two Oracle bundles. changeset b58a717c532c in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=b58a717c532c author: Andrew John Hughes date: Wed Feb 16 16:51:12 2011 +0000 Update NEWS with new releases: 1.7.9, 1.7.10, 1.8.6, 1.8.7, 1.9.6, 1.9.7. 2011-02-16 Andrew John Hughes * NEWS: Include new releases: 1.7.9, 1.7.10, 1.8.6, 1.8.7, 1.9.6, 1.9.7. changeset 22fa1c53c1b8 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=22fa1c53c1b8 author: dlila date: Wed Feb 16 12:27:53 2011 -0500 added patches/openjdk/6896068-sg2d.patch changeset 216d2e2208de in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=216d2e2208de author: Andrew John Hughes date: Wed Feb 16 20:21:15 2011 +0000 Remove .orig fragment from nomotif patch. 2011-02-16 Andrew John Hughes * patches/icedtea-nomotif-6706121.patch: Remove .orig file created by previous recreation of patch. changeset 58276c6748af in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=58276c6748af author: Andrew John Hughes date: Wed Feb 16 20:22:31 2011 +0000 Merge changeset 3f247fe29393 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=3f247fe29393 author: Mark Wielaard date: Wed Feb 16 22:23:50 2011 +0100 PR632: 6878713.patch breaks shark zero build 2011-02-16 Xerxes Ranby Mark Wielaard PR632: 6878713.patch breaks shark zero build * patches/icedtea-stdc-limit-macros.patch (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): Only define __STDC_LIMIT_MACROS if undefined. * Makefile.am (ICEDTEA_PATCHES): Add new patch. * NEWS: Updated. changeset 34511f89bc1d in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=34511f89bc1d author: Denis Lila date: Thu Feb 17 12:09:44 2011 -0500 Backports: patches/openjdk/6728834-blurred-lcd-aa-text.patch, patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch changeset 2d689773ef17 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=2d689773ef17 author: Andrew John Hughes date: Thu Feb 17 21:44:24 2011 +0000 6693253: Security warning backport. 2011-02-17 Andrew John Hughes 6693253: Security Warning appearance requires enhancements 6779717: A Window does not show applet security warning icon on X platforms 6785058: Parent don't get the focus after dialog is closed if security warning is applied * Makefile.am: Add new patch. * patches/openjdk/6307603-xrender-01.patch: Rejigged. * patches/openjdk/6693253-security_warning.patch: Security warning backport. * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw16.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw24.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw32.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- bw48.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim16.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim24.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim32.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- interim48.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow16.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow24.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow32.png, * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon- yellow48.png, * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning .ico, * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning _bw.ico, * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning _int.ico: Images for new backport. * NEWS: Updated. changeset 66583bad263a in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=66583bad263a author: Andrew John Hughes date: Thu Feb 17 23:36:09 2011 +0000 Merge changeset 596b7c83ba98 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=596b7c83ba98 author: Andrew John Hughes date: Fri Feb 18 00:20:19 2011 +0000 Remove upstreamed security patches. 2011-02-17 Andrew John Hughes * patches/security/20110209/4421494.patch, * patches/security/20110215/6878713.patch, * patches/security/20110215/6907662.patch, * patches/security/20110215/6981922.patch, * patches/security/20110215/6983554.patch, * patches/security/20110215/6985453.patch, * patches/security/20110215/6994263.patch: Drop security patches available upstream. * Makefile.am: Remove above. diffstat: 76 files changed, 49148 insertions(+), 13510 deletions(-) / | 11 AbstractXMLSchema | 2 ChangeLog | 290 INSTALL | 16 Makefile.am | 70 NEWS | 601 acinclude.m4 | 2 addRecognizedParamsAndSetDefaults(fSchemaValidator, | 1 configure.ac | 4 fComponents.put(SECURITY_MANAGER, | 28 fConfigUpdated | 3 final | 4 hotspot.map | 1 overlays/openjdk/jdk/test/javax/imageio/plugins/png/PngReader/broken_images/xlfn0g04.png | 13 patches/661505-jpeg.patch | 16 patches/arm.patch | 55 patches/g344659-sparc_fix.patch | 12 patches/gcc-suffix.patch | 31 patches/hotspot/hs20/arm.patch | 57 patches/hotspot/hs20/gcc-suffix.patch | 31 patches/hotspot/hs20/ia64-fix.patch | 15 patches/hotspot/hs20/params-cast-size_t.patch | 270 patches/hotspot/hs20/sparc-buildfixes.patch | 26 patches/hotspot/hs20/systemtap.patch | 100 patches/hotspot/hs20/text-relocations.patch | 63 patches/hotspot/original/arm.patch | 55 patches/hotspot/original/gcc-suffix.patch | 31 patches/hotspot/original/ia64-fix.patch | 30 patches/hotspot/original/no-precompiled-headers.patch | 35 patches/hotspot/original/params-cast-size_t.patch | 295 patches/hotspot/original/sparc-buildfixes.patch | 35 patches/hotspot/original/systemtap.patch | 98 patches/hotspot/original/text-relocations.patch | 61 patches/hotspot/original/too-many-args.patch | 46 patches/ia64-fix.patch | 30 patches/icedtea-nio2.patch | 159 patches/icedtea-no-precompiled.patch | 35 patches/icedtea-nomotif-6706121.patch | 578 patches/icedtea-sparc-buildfixes.patch | 35 patches/icedtea-stdc-limit-macros.patch | 12 patches/icedtea-text-relocations.patch | 61 patches/icedtea-too-many-args.patch | 46 patches/jtreg-6929067-fix.patch | 2 patches/jtreg-png-reader.patch | 976 patches/no-static-linking.patch | 44 patches/openjdk/4493128-CubicCurve2D.patch | 213 patches/openjdk/4645692-CubicCurve2D.solveCubic.patch | 717 patches/openjdk/4724552-CubicCurve2D.patch | 48 patches/openjdk/4993545-nativeinlightfixer.patch | 408 patches/openjdk/6307603-xrender-01.patch | 200 patches/openjdk/6607170-request_focus.patch | 709 patches/openjdk/6607660-treelock.patch | 112 patches/openjdk/6616323-component_array.patch | 1083 patches/openjdk/6633275-shaped_translucent_windows.patch | 6255 + patches/openjdk/6637796-set_bounds.patch | 465 patches/openjdk/6682046-shape_calculation.patch | 506 patches/openjdk/6693253-security_warning.patch | 5403 + patches/openjdk/6725214-direct3d-01.patch |36815 ++++++---- patches/openjdk/6728834-blurred-lcd-aa-text.patch | 226 patches/openjdk/6736649-text_bearings.patch | 112 patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch | 219 patches/openjdk/6797139-jbutton_truncation.patch | 610 patches/openjdk/6797195-hw_lw_mixing.patch | 3276 patches/openjdk/6883341-text_bearing_exception.patch | 92 patches/openjdk/6896068-sg2d.patch | 209 patches/params-cast-size_t.patch | 295 patches/rh661505-jpeg.patch | 16 patches/rh676659-gcc-export-dynamic.patch | 12 patches/security/20110215/6927050.patch | 33 patches/systemtap.patch | 98 private | 4 public | 20 return | 12 schema | 8 setFeatureDefaults(component, | 15 } | 81 diffs (truncated from 68069 to 500 lines): diff -r 743a3ac9f201 -r 596b7c83ba98 ChangeLog --- a/ChangeLog Sat Jan 22 02:32:01 2011 +0000 +++ b/ChangeLog Fri Feb 18 00:20:19 2011 +0000 @@ -1,3 +1,293 @@ 2011-01-22 Andrew John Hughes + + * patches/security/20110209/4421494.patch, + * patches/security/20110215/6878713.patch, + * patches/security/20110215/6907662.patch, + * patches/security/20110215/6981922.patch, + * patches/security/20110215/6983554.patch, + * patches/security/20110215/6985453.patch, + * patches/security/20110215/6994263.patch: + Drop security patches available upstream. + * Makefile.am: Remove above. + +2011-02-17 Andrew John Hughes + + 6693253: Security Warning appearance requires enhancements + 6779717: A Window does not show applet security warning icon on X platforms + 6785058: Parent don't get the focus after dialog is closed if security warning is applied + * Makefile.am: Add new patch. + * patches/openjdk/6307603-xrender-01.patch: Rejigged. + * patches/openjdk/6693253-security_warning.patch: + Security warning backport. + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw16.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw24.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw32.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-bw48.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim16.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim24.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim32.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-interim48.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow16.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow24.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow32.png, + * overlays/openjdk/jdk/src/solaris/classes/sun/awt/X11/security-icon-yellow48.png, + * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning.ico, + * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_bw.ico, + * overlays/openjdk/jdk/src/windows/native/sun/windows/security_warning_int.ico: + Images for new backport. + * NEWS: Updated. + +2011-02-16 Denis Lila + + * NEWS: Update with the backports + * Makefile.am (ICEDTEA_PATCHES): Added the 2 patches + * patches/openjdk/6728834-blurred-lcd-aa-text.patch + * patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch + +2011-02-16 Xerxes Ranby + Mark Wielaard + + PR632: 6878713.patch breaks shark zero build + * patches/icedtea-stdc-limit-macros.patch + (openjdk/hotspot/src/share/vm/utilities/globalDefinitions_gcc.hpp): + Only define __STDC_LIMIT_MACROS if undefined. + * Makefile.am (ICEDTEA_PATCHES): Add new patch. + * NEWS: Updated. + +2011-02-16 Andrew John Hughes + + * patches/icedtea-nomotif-6706121.patch: + Remove .orig file created by previous + recreation of patch. + +2011-02-16 Denis Lila + + * NEWS: Update with the backport + * Makefile.am (ICEDTEA_PATCHES): Added the patch + * patches/openjdk/6896068-sg2d.patch: Patch + +2011-02-16 Andrew John Hughes + + * NEWS: Include new releases: + 1.7.9, 1.7.10, 1.8.6, 1.8.7, 1.9.6, 1.9.7. + +2011-02-11 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6927050.patch, + Add patch for 6927050 missing from first two + Oracle bundles. + +2011-02-10 Andrew John Hughes + + * Makefile.am: Add additional patch. + * NEWS: Updated. + * patches/security/20110215/6985453.patch: + Add patch for 6985453 missing from first Oracle + bundle. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add new patches. + * NEWS: Updated. + * patches/icedtea-nio2.patch: Rejigged. + * patches/openjdk/6633275-shaped_translucent_windows.patch, + * patches/openjdk/6797195-hw_lw_mixing.patch: + Fixed to accomodate appearance of AWTAccessor via + security patch. + * patches/security/20110215/6878713.patch, + * patches/security/20110215/6907662.patch, + * patches/security/20110215/6981922.patch, + * patches/security/20110215/6983554.patch, + * patches/security/20110215/6994263.patch: + Security updates from Oracle SSR. + +2011-02-15 Andrew John Hughes + + * NEWS: Mention backports of copyright header + fixes for 6616323 and 6633275. + +2011-02-15 Andrew John Hughes + + * Makefile.am: Add patch below. + * NEWS: Updated. + * patches/openjdk/6633275-shaped_translucent_windows.patch: + Support shaped/translucent windows + +2011-02-13 Andrew John Hughes + + G344659: Fix issue when building on SPARC + * Makefile.am: Add new patch. + * NEWS: Updated. + * patches/g344659-sparc_fix.patch: + Add fix for SPARC builds on Gentoo. + +2011-02-13 Andrew John Hughes + + * NEWS: Updated. + +2011-02-11 Omair Majid + + RH676659: Pass -export-dynamic option to linker not gcc. + * Makefile.am: Add new patch. + * patches/rh676659-gcc-export-dynamic.patch: + Pass -Wl,-export-dynamic rather than -export-dynamic. + +2011-02-09 Andrew John Hughes + + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/security/20110209/4421494.patch: + Add floating point bug fix. + +2011-02-06 Andrew John Hughes + + * Makefile.am: Add patches below. + * patches/openjdk/4993545-nativeinlightfixer.patch, + * patches/openjdk/6607170-request_focus.patch, + * patches/openjdk/6607660-treelock.patch, + * patches/openjdk/6616323-component_array.patch, + * patches/openjdk/6637796-set_bounds.patch, + * patches/openjdk/6682046-shape_calculation.patch, + New AWT backports from OpenJDK7. + * patches/openjdk/6725214-direct3d-01.patch: + Rejigged against new patches with Oracle copyrights added. + * patches/openjdk/6797195-hw_lw_mixing.patch: + New AWT backport from OpenJDK7. + +2011-02-03 Andrew John Hughes + + PR616, PR99: + * Makefile.am: Add new patch. + * patches/jtreg-6929067-fix.patch: + Link against pthread explicitly now + libstdc++ is no longer static. + * patches/no-static-linking.patch: + Don't statically link libstdc++ or + libgcc. + * NEWS: Updated. + +2011-02-01 Denis Lila + + * NEWS: Update with the 3 backports + * Makefile.am (ICEDTEA_PATCHES): Add the patches + * patches/openjdk/4493128-CubicCurve2D.patch: New file. + * patches/openjdk/4645692-CubicCurve2D.solveCubic.patch: Likewise. + * patches/openjdk/4724552-CubicCurve2D.patch: Likewise. + +2011-02-01 Andrew John Hughes + + * NEWS: Add announcements for 1.7.8, + 1.8.5 and 1.9.5. + +2011-02-01 Pavel Tisnovsky + + * patches/jtreg-png-reader.patch: + Added two new regression tests which check correct behaviour of PNG + reader. + +2011-01-29 Andrew John Hughes + + * patches/gcc-suffix.patch, + * patches/ia64-fix.patch: + Split into original and hs20 versions. + * patches/icedtea-no-precompiled.patch: + Apply to original only. + * patches/icedtea-sparc-buildfixes.patch, + * patches/icedtea-text-relocations.patch, + * patches/icedtea-too-many-args.patch, + * patches/params-cast-size_t.patch: + Split into original and hs20 versions. + * INSTALL: + Document new status (original as default, + hs20 as alternative). + * Makefile.am: + (ICEDTEA_PATCHES): Updated with changes listed. + (replace-hotspot): Use ${HSBUILD} instead of hardcoded hs19. + * NEWS: List availability of hs20. + * acinclude.m4: + (AC_CHECK_WITH_HOTSPOT_BUILD): Provide hs20 as alternate build. + * hotspot.map: Add hs20. + * patches/arm.patch: Split bytecodes_zero.hpp changes into original + and hs20 versions. + * patches/hotspot/hs20/arm.patch, + hs20 version of bytecodes_zero.hpp changes. + * patches/hotspot/hs20/gcc-suffix.patch, + * patches/hotspot/hs20/ia64-fix.patch, + * patches/hotspot/hs20/params-cast-size_t.patch, + * patches/hotspot/hs20/sparc-buildfixes.patch: + hs20 version of patches. + * patches/hotspot/hs20/systemtap.patch: + hs20 version of dtrace.hpp changes. + * patches/hotspot/hs20/text-relocations.patch: + hs20 versions of patch. + * patches/hotspot/original/arm.patch: + original version of bytecodes_zero.hpp changes. + * patches/hotspot/original/gcc-suffix.patch, + * patches/hotspot/original/ia64-fix.patch: + original versions of patches moved from patches directory. + * patches/hotspot/original/no-precompiled-headers.patch: + Only for original; USE_PRECOMPILED_HEADER=0 provides the + same in hs20. + * patches/hotspot/original/params-cast-size_t.patch, + * patches/hotspot/original/sparc-buildfixes.patch: + original versions of patches moved from patches directory. + * patches/hotspot/original/systemtap.patch: + original version of dtrace.hpp changes. + * patches/hotspot/original/text-relocations.patch, + * patches/hotspot/original/too-many-args.patch: + original versions of patches moved from patches directory. + * patches/systemtap.patch: + Split dtrace.hpp changes into original and hs20 versions. + +2011-01-24 Omair Majid + + * NEWS: Update with the 3 backports + * Makefile.am (ICEDTEA_PATCHES): Add the patches + * patches/openjdk/6736649-text_bearings.patch: New file. + * patches/openjdk/6797139-jbutton_truncation.patch: Likewise. + * patches/openjdk/6883341-text_bearing_exception.patch: Likewise. + +2011-01-24 Andrew John Hughes + + * NEWS: Add unlisted backports. + +2011-01-24 Andrew John Hughes + + * patches/661505-jpeg.patch: + Move to... + * Makefile.am: Add rh prefix to jpeg fix. + * NEWS: Move jpeg fix to Bug Fixes as not + a backport. + * patches/rh661505-jpeg.patch: + ... here. + +2011-01-24 Andrew John Hughes + + * NEWS: Add 1.9.3, 1.9.4, 1.7.7 and 1.8.4 + NEWS entries. + +2011-01-24 Andrew John Hughes + + * NEWS: Update 1.10 with b21 changes. + Remove changes in b21 from list of backports. + +2010-01-22 Mark Wielaard + + * configure.ac: Add xvfb-run AC_CHECK_PROG. + * Makefile.am (check-jdk): Use xvfb-run if available and DISPLAY + not set. + +2010-01-22 Mark Wielaard + + * Makefile.am (ICEDTEA_PATCHES): Add missing backslash. + +2011-01-22 Andrew John Hughes + + * Makefile.am: + Bump to b22. + 2011-01-22 Andrew John Hughes * Makefile.am: diff -r 743a3ac9f201 -r 596b7c83ba98 INSTALL --- a/INSTALL Sat Jan 22 02:32:01 2011 +0000 +++ b/INSTALL Fri Feb 18 00:20:19 2011 +0000 @@ -165,7 +165,7 @@ These are documented fully in the releva * --enable-cacao: Replace HotSpot with the CACAO VM. * --enable-shark: Build the Shark LLVM-based JIT. * --enable-zero: Build the zero assembler port on x86/x86_64/sparc platforms. -* --with-hotspot-build: The HotSpot to use, defaulting to 'hs19'. +* --with-hotspot-build: The HotSpot to use, defaulting to 'original'. * --with-rhino: Include Javascript support using Rhino. * --with-additional-vms=vm-list: Additional VMs to build using the system described below. @@ -301,16 +301,16 @@ download stage and just verifies that th download stage and just verifies that the zip's MD5 sum matches that of the requested build. -At present, IcedTea6 supports the 'original' HotSpot 17 provided as -part of the upstream tarball and HotSpot 19 ('hs19') from the stable -hs19 tree at http://hg.openjdk.java.net/hsx/hsx19/master. The default -is 'hs19'; passing --with-hotspot-build=original to configure will -revert to the version of hs17 provided in b20. Note that the norm. is +At present, IcedTea6 supports the 'original' HotSpot 19 provided as +part of the upstream tarball and HotSpot 20 ('hs20') from the stable +hs20 tree at http://hg.openjdk.java.net/hsx/hsx20/baseline. The default +is 'original'; passing --with-hotspot-build=hs20 to configure will +use the version of hs20 specified in hotspot.map. Note that the norm. is for up to one alternate (non-default) build to be supported and just passing --with-hotspot-build (equivalent to --with-hotspot-build=yes) -will always provide the alternate build (currently hs19). Conversely, +will always provide the alternate build (currently hs20). Conversely, passing --with-hotspot-build=no provides the original build (currently -hs17). +hs19). Javascript Support ================== diff -r 743a3ac9f201 -r 596b7c83ba98 Makefile.am --- a/Makefile.am Sat Jan 22 02:32:01 2011 +0000 +++ b/Makefile.am Fri Feb 18 00:20:19 2011 +0000 @@ -2,7 +2,7 @@ OPENJDK_DATE = 20_jan_2011 OPENJDK_MD5SUM = 595125cd17441122074a4fe0f78c0252 -OPENJDK_VERSION = b21 +OPENJDK_VERSION = b22 OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/ CACAO_VERSION = 6a5eda011e49 @@ -174,16 +174,30 @@ REWRITER_SRCS = $(abs_top_srcdir)/rewrit ICEDTEA_FSG_PATCHES = -SECURITY_PATCHES = +SECURITY_PATCHES = patches/security/20110215/6927050.patch ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ + patches/icedtea-stdc-limit-macros.patch \ + patches/openjdk/4993545-nativeinlightfixer.patch \ + patches/openjdk/6637796-set_bounds.patch \ + patches/openjdk/6607660-treelock.patch \ + patches/openjdk/6607170-request_focus.patch \ + patches/openjdk/6616323-component_array.patch \ + patches/openjdk/6682046-shape_calculation.patch \ + patches/openjdk/6797195-hw_lw_mixing.patch \ + patches/openjdk/6725214-direct3d-01.patch \ + patches/openjdk/6633275-shaped_translucent_windows.patch \ + patches/openjdk/6791612-opengl-jni-fix.patch \ + patches/openjdk/6755274-glgetstring-crash.patch \ + patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ + patches/openjdk/6693253-security_warning.patch \ patches/icedtea-notice-safepoints.patch \ patches/icedtea-parisc-opt.patch \ patches/icedtea-lucene-crash.patch \ patches/icedtea-version.patch \ patches/icedtea-version-hotspot.patch \ - patches/icedtea-text-relocations.patch \ + patches/hotspot/$(HSBUILD)/text-relocations.patch \ patches/icedtea-ssl.patch \ patches/icedtea-rmi_amd64.patch \ patches/icedtea-tools.patch \ @@ -191,7 +205,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-headers.patch \ patches/icedtea-headers-hotspot.patch \ patches/icedtea-gcc-suffix.patch \ - patches/gcc-suffix.patch \ + patches/hotspot/$(HSBUILD)/gcc-suffix.patch \ patches/icedtea-bytebuffer-compact.patch \ patches/memory-limits.patch \ patches/icedtea-sunsrc.patch \ @@ -210,7 +224,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-alt-jar.patch \ patches/icedtea-jdk-use-ssize_t.patch \ patches/icedtea-use-idx_t.patch \ - patches/params-cast-size_t.patch \ + patches/hotspot/$(HSBUILD)/params-cast-size_t.patch \ patches/icedtea-clean-crypto.patch \ patches/icedtea-arch.patch \ patches/icedtea-lc_ctype.patch \ @@ -221,7 +235,7 @@ ICEDTEA_PATCHES = \ patches/icedtea-testenv.patch \ patches/icedtea-samejvm-safe.patch \ patches/icedtea-pr261.patch \ - patches/icedtea-sparc-buildfixes.patch \ + patches/hotspot/$(HSBUILD)/sparc-buildfixes.patch \ patches/icedtea-sparc64-linux.patch \ patches/icedtea-sparc-ptracefix.patch \ patches/icedtea-sparc-trapsfix.patch \ @@ -237,7 +251,6 @@ ICEDTEA_PATCHES = \ patches/icedtea-disable-cc-incompatible-sanity-checks.patch \ patches/icedtea-explicit-target-arch.patch \ patches/icedtea-gcc-stack-markings.patch \ - patches/icedtea-no-precompiled.patch \ patches/icedtea-parisc.patch \ patches/icedtea-sh4-support.patch \ patches/icedtea-policy-evaluation.patch \ @@ -246,6 +259,7 @@ ICEDTEA_PATCHES = \ patches/applet_hole.patch \ patches/icedtea-jtreg-httpTest.patch \ patches/arm.patch \ + patches/hotspot/$(HSBUILD)/arm.patch \ patches/debug-dir.patch \ patches/no-sync.patch \ patches/icedtea-override-redirect-metacity.patch \ @@ -253,7 +267,6 @@ ICEDTEA_PATCHES = \ patches/fonts-rhel.patch \ patches/fonts-gentoo.patch \ patches/ipv4-mapped-ipv6-addresses.patch \ - patches/icedtea-too-many-args.patch \ patches/icedtea-jtreg-OpenGLContextInit.patch \ patches/openjdk/6510892-httpserver_test.patch \ patches/openjdk/6638712-wildcard_types.patch \ @@ -261,7 +274,6 @@ ICEDTEA_PATCHES = \ patches/numa_on_early_glibc.patch \ patches/icedtea-jtreg-international-fonts.patch \ patches/openjdk/6967436-6976265-6967434-pisces.patch \ - patches/openjdk/6997495-test_correction_6857159.patch \ patches/f14-fonts.patch \ patches/jtreg-WindowWithWarningTest.patch \ patches/jtreg-T6638712-fix.patch \ @@ -270,11 +282,31 @@ ICEDTEA_PATCHES = \ patches/jtreg-6929067-fix.patch \ patches/rendering-engine-tests.patch \ patches/openjdk/6800846-printing-quality.patch \ - patches/661505-jpeg.patch \ + patches/rh661505-jpeg.patch \ patches/6703377-freetypescaler.patch \ - patches/ia64-fix.patch + patches/hotspot/$(HSBUILD)/ia64-fix.patch \ patches/openjdk/6642612-filechooser_button_sizes.patch \ - patches/jtreg-international-fonts-styles.patch + patches/jtreg-international-fonts-styles.patch \ + patches/openjdk/6736649-text_bearings.patch \ + patches/openjdk/6797139-jbutton_truncation.patch \ + patches/openjdk/6883341-text_bearing_exception.patch \ + patches/jtreg-png-reader.patch \ + patches/openjdk/4724552-CubicCurve2D.patch \ + patches/openjdk/4493128-CubicCurve2D.patch \ + patches/openjdk/4645692-CubicCurve2D.solveCubic.patch \ + patches/no-static-linking.patch \ + patches/rh676659-gcc-export-dynamic.patch \ + patches/g344659-sparc_fix.patch \ + patches/openjdk/6728834-blurred-lcd-aa-text.patch \ + patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ + patches/openjdk/6896068-sg2d.patch + +if !WITH_ALT_HSBUILD +ICEDTEA_PATCHES += \ + patches/hotspot/$(HSBUILD)/no-precompiled-headers.patch \ + patches/hotspot/$(HSBUILD)/too-many-args.patch \ + patches/openjdk/6997495-test_correction_6857159.patch +endif if WITH_RHINO ICEDTEA_PATCHES += \ @@ -301,12 +333,8 @@ endif endif if ENABLE_XRENDER -ICEDTEA_PATCHES += patches/openjdk/6725214-direct3d-01.patch \ - patches/openjdk/6307603-xrender-01.patch \ +ICEDTEA_PATCHES += patches/openjdk/6307603-xrender-01.patch \ patches/openjdk/6961633-xrender-02.patch \ - patches/openjdk/6791612-opengl-jni-fix.patch \ - patches/openjdk/6755274-glgetstring-crash.patch \ - patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ patches/xrender-gc-cleanup.patch endif @@ -316,6 +344,7 @@ endif if ENABLE_SYSTEMTAP ICEDTEA_PATCHES += patches/systemtap.patch \ + patches/hotspot/$(HSBUILD)/systemtap.patch \ patches/systemtap-gcc-4.5.patch \ patches/systemtap-alloc-size-workaround.patch endif @@ -842,7 +871,7 @@ if WITH_ALT_HSBUILD then \ $(TAR) xf $(HOTSPOT_SRC_ZIP) ; \ dir=$$($(AWK) 'version==$$1 {print gensub(/.*\/([^/]*)$$/,"\\1","g",$$2)}' \ - version=hs19 $(abs_top_srcdir)/hotspot.map) ; \ + version=$(HSBUILD) $(abs_top_srcdir)/hotspot.map) ; \ From ahughes at redhat.com Thu Feb 17 16:23:33 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 18 Feb 2011 00:23:33 +0000 Subject: [icedtea-web] RFC: do not install netx.jar and plugin.jar into jdk dir In-Reply-To: <4D5DA929.4020604@redhat.com> References: <4D5D9585.1030405@redhat.com> <20110217220036.GA27039@rivendell.middle-earth.co.uk> <4D5DA929.4020604@redhat.com> Message-ID: <20110218002333.GF27039@rivendell.middle-earth.co.uk> On 18:03 Thu 17 Feb , Omair Majid wrote: > On 02/17/2011 05:00 PM, Dr Andrew John Hughes wrote: > > On 16:39 Thu 17 Feb , Omair Majid wrote: > >> Hi, > >> > >> The attached patch isolates icedtea-web into its own directories. With > >> this patch applied, icedtea-web does not need to be installed into a > >> jdk-style dir. > >> > > > > Finally! > > > > :) > > >> I have removed the pluginappletviewer binary. I had originally posted it > >> a separate patch, but since using pluginappletviewer would make this > >> patch more complex, I have removed it here. > >> > > > > Please do this in a separate patch prior to this. The two issues shouldn't > > be confused. > > > > I posted the patch already: > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012010.html. > If you can approve it, I will remove pluginappletviewer before applying > this patch. > > >> Currently, the jdk it uses to run is determined at build-time. In the > >> future, this will probably be changed so that icedtea-web will be able > >> to use any installed jdk. > >> > > > > Yeah I pondered this when reading the patch. What is wrong with just calling > > 'java'? > > > > Well, we do rely on certain API's that may not be present on all JDKs. > The configure checks are build time; so for now, the JRE to use is also > determined at build time. > > It's also in the interest of minimizing changes in this one patch. I am > quite sure most of the launcher code can be replaced by simple shell > scripts (or a simple call to java even). But that's for another patch. > Yes, I agree. > > I seem to remember there were some issues with libjava not being found if 1.0 > > was installed in the wrong location and this was due to a relative LD_LIBRARY_PATH > > extension. I don't see this fixed. Do the new binaries work with just this > > patch? > > > > Hm.. no clue about the LD_LIBRARY_PATH issues. The binaries/plugin > produced after building icedtea-web with this patch applied (I used > ./configure --prefix=/home/omajid/code/icedtea-web-build/ > --with-jdk-home=/home/omajid/code/icedtea6/openjdk.build/j2sdk-image/ > --disable-docs) work perfectly fine for me. > > I did encounter an issue with libjava.so not being found. The method > GetIcedTeaWebJREPath fixes that. It uses the predefined path at build > time to locate the JRE rather than weird things like looking in the > directory above. Ok, that's the issue I was thinking of. > > >> Any thoughts or comments on the patch? > >> > > > > More inline. > > > > > >> diff -r 2289777074ae Makefile.am > >> --- a/Makefile.am Tue Feb 15 17:03:09 2011 -0500 > >> +++ b/Makefile.am Thu Feb 17 16:33:53 2011 -0500 > >> @@ -17,6 +17,10 @@ > >> IT_CLASS_TARGET_VERSION=6 > >> IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) > >> > >> +JRE='"$(SYSTEM_JDK_DIR)jre"' > >> +LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" > >> +PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' > >> + > >> # Fake update version to shut up the plugin detector hosted by Oracle. > >> # If Oracle ever release a JDK update greater than 50, this needs to be increased. > >> JDK_UPDATE_VERSION=50 > >> @@ -39,8 +43,7 @@ > >> PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp > >> PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp > >> LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java > >> -ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp \ > >> - $(PLUGIN_DIR)/launcher/pluginappletviewer > >> +ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp > >> PLUGIN_PKGS = sun.applet netscape.security netscape.javascript > >> endif > >> > >> @@ -66,7 +69,6 @@ > >> > >> LAUNCHER_SRCDIR = $(abs_top_srcdir)/launcher > >> LAUNCHER_OBJECTS = java.o java_md.o splashscreen_stubs.o jli_util.o parse_manifest.o version_comp.o wildcard.o > >> -PLUGIN_LAUNCHER_OBJECTS = $(addprefix $(PLUGIN_DIR)/launcher/,$(LAUNCHER_OBJECTS)) > >> NETX_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/,$(LAUNCHER_OBJECTS)) > >> CONTROLPANEL_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/controlpanel/,$(LAUNCHER_OBJECTS)) > >> LAUNCHER_FLAGS = -O2 -fno-strict-aliasing -fPIC -pthread -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer \ > >> @@ -96,37 +98,20 @@ > >> clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs > >> > >> install-exec-local: > >> - ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR) > >> + ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir) > >> if ENABLE_PLUGIN > >> - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/ > >> - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) > >> - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar > >> + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir) > >> + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar > >> endif > >> - ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar > >> + ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar > >> ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir) > >> - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ > >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ > >> - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ > >> - fi ; \ > >> - if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ > >> - ln -s $(DESTDIR)$(bindir)/javaws $(DESTDIR)$(prefix)/jre/bin ; \ > >> - fi ; \ > >> - fi > >> - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)/jre/lib > >> + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar > >> ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(bindir) > >> - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ > >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ > >> - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ > >> - fi ; \ > >> - if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ > >> - ln -s $(DESTDIR)$(bindir)/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ > >> - fi ; \ > >> - fi > >> > >> install-data-local: > >> ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 > >> ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 > >> - ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)/jre/lib > >> + ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME) > >> if ENABLE_DOCS > >> ${mkinstalldirs} $(DESTDIR)$(htmldir) > >> (cd ${abs_top_builddir}/docs/netx; \ > >> @@ -144,22 +129,14 @@ > >> endif > >> > >> uninstall-local: > >> - rm -f $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/IcedTeaPlugin.so > >> - rm -f $(DESTDIR)$(prefix)/jre/lib/plugin.jar > >> - rm -f $(DESTDIR)$(prefix)/jre/lib/netx.jar > >> - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jnlp > >> - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jar > >> + rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so > >> + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar > >> + rm -f $(DESTDIR)$(datadir)/$(PAKCAGE_NAME)/netx.jar > >> + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp > >> + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar > >> rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1 > >> - rm -f $(DESTDIR)$(bindir)/pluginappletviewer > >> rm -f $(DESTDIR)$(bindir)/javaws > >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ > >> - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ > >> - fi > >> - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws > >> rm -f $(DESTDIR)$(bindir)/itweb-settings > >> - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ > >> - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ > >> - fi > >> rm -rf $(DESTDIR)$(htmldir) > >> > >> # Plugin > >> @@ -187,6 +164,8 @@ > >> -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \ > >> -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \ > >> -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \ > >> + -DICEDTEA_WEB_JRE=$(JRE) \ > >> + -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \ > >> $(GLIB_CFLAGS) \ > >> $(GTK_CFLAGS) \ > >> $(MOZILLA_CFLAGS) \ > >> @@ -201,16 +180,8 @@ > >> $(MOZILLA_LIBS)\ > >> -shared -o $@ > >> > >> -$(PLUGIN_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c > >> - mkdir -p $(PLUGIN_DIR)/launcher&& \ > >> - $(CC) $(LAUNCHER_FLAGS) -DJAVA_ARGS='{ "sun.applet.PluginMain" }' -DPROGNAME='"pluginappletviewer"' -c -o $@ $< > >> - > >> -$(PLUGIN_DIR)/launcher/pluginappletviewer: $(PLUGIN_LAUNCHER_OBJECTS) > >> - $(CC) $(PLUGIN_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) > >> - > >> clean-IcedTeaPlugin: > >> rm -f $(PLUGIN_DIR)/launcher/*.o > >> - rm -f $(PLUGIN_DIR)/launcher/pluginappletviewer > >> if [ -e $(PLUGIN_DIR)/launcher ]; then \ > >> rmdir $(PLUGIN_DIR)/launcher ; \ > >> fi > >> @@ -344,14 +315,14 @@ > >> $(NETX_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c > >> mkdir -p $(NETX_DIR)/launcher&& \ > >> $(CC) $(LAUNCHER_FLAGS) \ > >> - -DJAVA_ARGS='{ "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ > >> - -DPROGNAME='"javaws"' -c -o $@ $< > >> + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ > >> + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"javaws"' -c -o $@ $< > >> > >> $(NETX_DIR)/launcher/controlpanel/%.o: $(LAUNCHER_SRCDIR)/%.c > >> mkdir -p $(NETX_DIR)/launcher/controlpanel&& \ > >> $(CC) $(LAUNCHER_FLAGS) \ > >> - -DJAVA_ARGS='{ "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ > >> - -DPROGNAME='"itweb-settings"' -c -o $@ $< > >> + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ > >> + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"itweb-settings"' -c -o $@ $< > >> > >> $(NETX_DIR)/launcher/javaws: $(NETX_LAUNCHER_OBJECTS) > >> $(CC) $(NETX_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) > >> diff -r 2289777074ae launcher/java_md.c > >> --- a/launcher/java_md.c Tue Feb 15 17:03:09 2011 -0500 > >> +++ b/launcher/java_md.c Thu Feb 17 16:33:53 2011 -0500 > >> @@ -158,6 +158,7 @@ > >> static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, > >> char *jvmpath, jint jvmpathsize, char * arch); > >> static jboolean GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative); > >> +static jboolean GetIcedTeaWebJREPath(char *path, jint pathsize, char * arch, jboolean speculative); > >> > >> const char * > >> GetArch() > >> @@ -280,7 +281,9 @@ > >> jvmpath does not exist */ > >> if (wanted == running) { > >> /* Find out where the JRE is that we will be using. */ > >> - if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { > >> + > >> + //if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { > >> + if (!GetIcedTeaWebJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { > > > > Please just remove the line. > > > > Will do. > > >> fprintf(stderr, "Error: could not find Java 2 Runtime Environment.\n"); > >> exit(2); > >> } > >> @@ -606,6 +609,33 @@ > >> } > >> > >> /* > >> + * Find path to the JRE based on the the compile flag ICEDTEA_WEB_JRE > >> + */ > >> +static jboolean > >> +GetIcedTeaWebJREPath(char* path, jint pathsize, char* arch, jboolean speculative) > >> +{ > >> + char libjava[MAXPATHLEN]; > >> + snprintf(libjava, MAXPATHLEN, ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL, arch); > >> + > >> + if (_launcher_debug) { > >> + printf(ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL "\n", arch); > >> + printf("libjava is %s\n", libjava); > >> + } > >> + > > > > Why is libjava being checked? Is this needed? I'm not sure it's standard and may > > be specified to Oracle JDKs. > > > > I wouldnt be surprised. The launcher code is fairly specific to OpenJDK. > Most of the code in this method is based on GetJREPath (which is the > method just below this one). The only significant change is where to > look for libjava - this method looks for it based on a compile time > constant; GetJREPath looks for it in the same directory as the binary. > I presume we could instead look for something more 'standard' like rt.jar? > >> + if (access(libjava, F_OK) == 0) { > >> + strncpy(path, ICEDTEA_WEB_JRE, pathsize); > >> + goto found; > >> + } > >> + > >> + return JNI_FALSE; > >> + > >> + found: > >> + if (_launcher_debug) > >> + printf("JRE path is %s\n", path); > >> + return JNI_TRUE; > >> +} > >> + > >> +/* > >> * Find path to JRE based on .exe's location or registry settings. > >> */ > >> static jboolean > >> diff -r 2289777074ae plugin/icedteanp/IcedTeaNPPlugin.cc > >> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Feb 15 17:03:09 2011 -0500 > >> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Feb 17 16:33:53 2011 -0500 > >> @@ -1547,23 +1547,25 @@ > >> > >> if (plugin_debug) > >> { > >> - command_line = (gchar**) malloc(sizeof(gchar*)*8); > >> + command_line = (gchar**) malloc(sizeof(gchar*)*9); > >> command_line[0] = g_strdup(appletviewer_executable); > >> - command_line[1] = g_strdup("-Xdebug"); > >> - command_line[2] = g_strdup("-Xnoagent"); > >> - command_line[3] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); > >> - command_line[4] = g_strdup("sun.applet.PluginMain"); > >> - command_line[5] = g_strdup(out_pipe_name); > >> - command_line[6] = g_strdup(in_pipe_name); > >> - command_line[7] = NULL; > >> + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); > >> + command_line[2] = g_strdup("-Xdebug"); > >> + command_line[3] = g_strdup("-Xnoagent"); > >> + command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); > >> + command_line[5] = g_strdup("sun.applet.PluginMain"); > >> + command_line[6] = g_strdup(out_pipe_name); > >> + command_line[7] = g_strdup(in_pipe_name); > >> + command_line[8] = NULL; > >> } else > >> { > >> - command_line = (gchar**) malloc(sizeof(gchar*)*5); > >> + command_line = (gchar**) malloc(sizeof(gchar*)*6); > >> command_line[0] = g_strdup(appletviewer_executable); > >> - command_line[1] = g_strdup("sun.applet.PluginMain"); > >> - command_line[2] = g_strdup(out_pipe_name); > >> - command_line[3] = g_strdup(in_pipe_name); > >> - command_line[4] = NULL; > >> + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); > >> + command_line[2] = g_strdup("sun.applet.PluginMain"); > >> + command_line[3] = g_strdup(out_pipe_name); > >> + command_line[4] = g_strdup(in_pipe_name); > >> + command_line[5] = NULL; > >> } > >> > >> environment = plugin_filter_environment(); > >> @@ -1590,17 +1592,21 @@ > >> command_line[0] = NULL; > >> g_free (command_line[1]); > >> command_line[1] = NULL; > >> + g_free (command_line[2]); > >> + command_line[2] = NULL; > >> + g_free (command_line[3]); > >> + command_line[3] = NULL; > >> + g_free (command_line[4]); > >> + command_line[4] = NULL; > >> > >> if (plugin_debug) > >> { > >> - g_free (command_line[2]); > >> - command_line[2] = NULL; > >> - g_free (command_line[3]); > >> - command_line[3] = NULL; > >> - g_free (command_line[4]); > >> - command_line[4] = NULL; > >> g_free (command_line[5]); > >> command_line[5] = NULL; > >> + g_free (command_line[6]); > >> + command_line[6] = NULL; > >> + g_free (command_line[7]); > >> + command_line[7] = NULL; > >> } > >> > >> g_free(command_line); > >> @@ -2173,38 +2179,10 @@ > >> } > >> > >> // Set appletviewer_executable. > >> - Dl_info info; > >> - int filename_size; > >> - if (dladdr ((const void*) ITNP_New,&info) == 0) > >> - { > >> - PLUGIN_ERROR_TWO ("Failed to determine plugin shared object filename", > >> - dlerror ()); > >> - np_error = NPERR_GENERIC_ERROR; > >> - goto cleanup_data_directory; > >> - } > >> - filename = (gchar*) malloc(sizeof(gchar)*1024); > >> - filename_size = readlink(info.dli_fname, filename, 1023); > >> - if (filename_size>= 0) > >> - { > >> - filename[filename_size] = '\0'; > >> - } > >> - > >> - if (!filename) > >> - { > >> - PLUGIN_ERROR ("Failed to create plugin shared object filename."); > >> - np_error = NPERR_OUT_OF_MEMORY_ERROR; > >> - goto cleanup_data_directory; > >> - } > >> - > >> - if (filename_size<= 0) > >> - { > >> - free(filename); > >> - filename = g_strdup(info.dli_fname); > >> - } > >> - > >> - appletviewer_executable = g_strdup_printf ("%s/../../bin/java", > >> - dirname (filename)); > >> - PLUGIN_DEBUG(".so is located at: %s and the link points to: %s. Executing java from dir %s to run %s\n", info.dli_fname, filename, dirname (filename), appletviewer_executable); > >> + filename = g_strdup(ICEDTEA_WEB_JRE); > >> + appletviewer_executable = g_strdup_printf ("%s/bin/java", > >> + filename); > >> + PLUGIN_DEBUG("Executing java at %s\n", appletviewer_executable); > >> if (!appletviewer_executable) > >> { > >> PLUGIN_ERROR ("Failed to create appletviewer executable name."); > > > > > > Thanks for looking over the patch! > > Cheers, > Omair Cheers, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Thu Feb 17 16:35:10 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 18 Feb 2011 00:35:10 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 9882da94debb in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=9882da94debb author: Andrew John Hughes date: Thu Feb 17 22:34:54 2011 +0000 Fix placement of PR632 NEWS item. 2011-02-17 Andrew John Hughes * NEWS: Fix placement of PR632. changeset 728aac195993 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=728aac195993 author: Andrew John Hughes date: Fri Feb 18 00:34:56 2011 +0000 S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails 2011-02-18 Andrew John Hughes S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails * Makefile.am: Add patch. * NEWS: Updated. * patches/openjdk/6444769-windowwithwarningtest.patch: Remove obsolete WindowWithWarningTest. diffstat: 4 files changed, 367 insertions(+), 1 deletion(-) ChangeLog | 12 Makefile.am | 1 NEWS | 3 patches/openjdk/6444769-windowwithwarningtest.patch | 352 +++++++++++++++++++ diffs (407 lines): diff -r 2d689773ef17 -r 728aac195993 ChangeLog --- a/ChangeLog Thu Feb 17 21:44:24 2011 +0000 +++ b/ChangeLog Fri Feb 18 00:34:56 2011 +0000 @@ -1,3 +1,15 @@ 2011-02-17 Andrew John Hughes + + S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/openjdk/6444769-windowwithwarningtest.patch: + Remove obsolete WindowWithWarningTest. + +2011-02-17 Andrew John Hughes + + * NEWS: Fix placement of PR632. + 2011-02-17 Andrew John Hughes 6693253: Security Warning appearance requires enhancements diff -r 2d689773ef17 -r 728aac195993 Makefile.am --- a/Makefile.am Thu Feb 17 21:44:24 2011 +0000 +++ b/Makefile.am Fri Feb 18 00:34:56 2011 +0000 @@ -200,6 +200,7 @@ ICEDTEA_PATCHES = \ patches/openjdk/6755274-glgetstring-crash.patch \ patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ patches/openjdk/6693253-security_warning.patch \ + patches/openjdk/6444769-windowwithwarningtest.patch \ patches/icedtea-notice-safepoints.patch \ patches/icedtea-parisc-opt.patch \ patches/icedtea-lucene-crash.patch \ diff -r 2d689773ef17 -r 728aac195993 NEWS --- a/NEWS Thu Feb 17 21:44:24 2011 +0000 +++ b/NEWS Fri Feb 18 00:34:56 2011 +0000 @@ -418,15 +418,16 @@ New in release 1.10 (2011-XX-XX): - S7015232: missing copyright header in CheckZOrderChange.java - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. - - PR632: patches/security/20110215/6878713.patch breaks shark zero build - S6749060: LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only) - S6728834: D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination - S6693253: Security Warning appearance requires enhancements - S6779717: A Window does not show applet security warning icon on X platforms - S6785058: Parent don't get the focus after dialog is closed if security warning is applied + - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc + - PR632: patches/security/20110215/6878713.patch breaks shark zero build New in release 1.9.7 (2011-02-15): diff -r 2d689773ef17 -r 728aac195993 patches/openjdk/6444769-windowwithwarningtest.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6444769-windowwithwarningtest.patch Fri Feb 18 00:34:56 2011 +0000 @@ -0,0 +1,352 @@ +# HG changeset patch +# User andrew +# Date 1292334667 0 +# Node ID ff5b73fcc2ac8d72c0df5d31b6210ecb73eb4391 +# Parent 3d243dc7441260f121db54cca6fbc99fec1e929a +6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails +Summary: Remove unneeded test +Reviewed-by: anthony + +diff -r 3d243dc74412 -r ff5b73fcc2ac test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html +--- openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html Thu Feb 17 20:36:45 2011 +0000 ++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +@@ -1,20 +0,0 @@ +- +- +- +- +- WindowWithWarningTest +- +-
+-  This test will run automatically.
+-  
+- +- +- +- +- +diff -r 3d243dc74412 -r ff5b73fcc2ac test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java +--- openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java Thu Feb 17 20:36:45 2011 +0000 ++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +@@ -1,315 +0,0 @@ +-/* +- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * This code is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. +- * +- * This code is distributed in the hope that it will be useful, but WITHOUT +- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +- * version 2 for more details (a copy is included in the LICENSE file that +- * accompanied this code). +- * +- * You should have received a copy of the GNU General Public License version +- * 2 along with this work; if not, write to the Free Software Foundation, +- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +- * +- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +- * or visit www.oracle.com if you need additional information or have any +- * questions. +- */ +- +- +-/* +- test +- @bug 6391770 +- @summary Content of the Window should be laid out in the area left after WarningWindow was added. +- @author yuri nesterenko: area= +- @run applet WindowWithWarningTest.html +-*/ +- +-// Note there is no @ in front of test above. This is so that the +-// harness will not mistake this file as a test file. It should +-// only see the html file as a test file. (the harness runs all +-// valid test files, so it would run this test twice if this file +-// were valid as well as the html file.) +-// Also, note the area= after Your Name in the author tag. Here, you +-// should put which functional area the test falls in. See the +-// AWT-core home page -> test areas and/or -> AWT team for a list of +-// areas. +-// Note also the 'AutomaticAppletTest.html' in the run tag. This should +-// be changed to the name of the test. +- +- +-/** +- * WindowWithWarningTest.java +- * +- * summary: +- */ +- +-import java.applet.Applet; +-import java.awt.*; +-import java.awt.event.*; +-import javax.swing.*; +- +-//Automated tests should run as applet tests if possible because they +-// get their environments cleaned up, including AWT threads, any +-// test created threads, and any system resources used by the test +-// such as file descriptors. (This is normally not a problem as +-// main tests usually run in a separate VM, however on some platforms +-// such as the Mac, separate VMs are not possible and non-applet +-// tests will cause problems). Also, you don't have to worry about +-// synchronisation stuff in Applet tests they way you do in main +-// tests... +- +- +-public class WindowWithWarningTest extends Applet +-{ +- //Declare things used in the test, like buttons and labels here +- boolean buttonClicked = false; +- public static final int MAX_COUNT = 100; +- +- public void init() +- { +- //Create instructions for the user here, as well as set up +- // the environment -- set the layout manager, add buttons, +- // etc. +- +- this.setLayout (new BorderLayout ()); +- +- String[] instructions = +- { +- "This is an AUTOMATIC test", +- "simply wait until it is done" +- }; +- //Sysout.createDialog( ); +- //Sysout.printInstructions( instructions ); +- +- }//End init() +- public void start () +- { +- //Get things going. Request focus, set size, et cetera +- System.setSecurityManager( new SecurityManager() { +- // deny AWTPermission("showWindowWithoutWarningBanner") +- public boolean checkTopLevelWindow(Object window) { +- return false; +- } +- }); +- JFrame frame = new JFrame("Window Test"); +- frame.setBounds(50, 50, 200, 200); +- frame.show(); +- +- JWindow window = new JWindow( frame ); +- JButton jbutton1 = new JButton( "First" ); +- jbutton1.addMouseListener( new MouseAdapter() { +- public void mousePressed( MouseEvent me ) { +- buttonClicked = true; +- } +- }); +- JButton jbutton2 = new JButton( "Second" ); +- window.setLocation( 300, 300 ); +- +- window.add("North", jbutton1); +- window.add("South", jbutton2); +- +- window.pack(); +- window.show(); +- //wait for frame to show: +- getLocation( frame ); +- window.toFront(); +- +- Dimension size0 = window.getSize(); +- Dimension size1 = null; +- try { +- Robot robot = new Robot(); +- +- robot.delay(500); +- window.pack(); +- robot.delay(500); +- window.pack(); +- // size1 must be the same as size0 +- size1 = window.getSize(); +- robot.delay(500); +- Point pt = jbutton1.getLocationOnScreen(); +- robot.mouseMove((int) jbutton1.getLocationOnScreen().x + jbutton1.getWidth() / 2, +- (int) jbutton1.getLocationOnScreen().y + jbutton1.getHeight() / 2); +- robot.delay(500); +- robot.mousePress(MouseEvent.BUTTON1_MASK); +- robot.delay(100); +- robot.mouseRelease(MouseEvent.BUTTON1_MASK); +- robot.delay(2000); +- }catch(Exception e) { +- throw new RuntimeException( "Exception "+e ); +- } +- if( !size0.equals(size1) ) { +- throw new RuntimeException( "Wrong Window size after multiple pack()s"); +- } +- if( !buttonClicked ) { +- throw new RuntimeException( "Button was not clicked"); +- } +- window.dispose(); +- frame.dispose(); +- +- System.out.println("Test Passed."); +- }// start() +- public static Point getLocation( Component co ) throws RuntimeException { +- Point pt = null; +- boolean bFound = false; +- int count = 0; +- while( !bFound ) { +- try { +- pt = co.getLocationOnScreen(); +- bFound = true; +- }catch( Exception ex ) { +- bFound = false; +- count++; +- } +- if( !bFound && count > MAX_COUNT ) { +- throw new RuntimeException("don't see a component to get location"); +- } +- } +- return pt; +- } +- +- +-}// class AutomaticAppletTest +- +- +-/**************************************************** +- Standard Test Machinery +- DO NOT modify anything below -- it's a standard +- chunk of code whose purpose is to make user +- interaction uniform, and thereby make it simpler +- to read and understand someone else's test. +- ****************************************************/ +- +-/** +- This is part of the standard test machinery. +- It creates a dialog (with the instructions), and is the interface +- for sending text messages to the user. +- To print the instructions, send an array of strings to Sysout.createDialog +- WithInstructions method. Put one line of instructions per array entry. +- To display a message for the tester to see, simply call Sysout.println +- with the string to be displayed. +- This mimics System.out.println but works within the test harness as well +- as standalone. +- */ +- +-class Sysout +-{ +- private static TestDialog dialog; +- +- public static void createDialogWithInstructions( String[] instructions ) +- { +- dialog = new TestDialog( new Frame(), "Instructions" ); +- dialog.printInstructions( instructions ); +- dialog.setVisible(true); +- println( "Any messages for the tester will display here." ); +- } +- +- public static void createDialog( ) +- { +- dialog = new TestDialog( new Frame(), "Instructions" ); +- String[] defInstr = { "Instructions will appear here. ", "" } ; +- dialog.printInstructions( defInstr ); +- dialog.setVisible(true); +- println( "Any messages for the tester will display here." ); +- } +- +- +- public static void printInstructions( String[] instructions ) +- { +- dialog.printInstructions( instructions ); +- } +- +- +- public static void println( String messageIn ) +- { +- dialog.displayMessage( messageIn ); +- } +- +-}// Sysout class +- +-/** +- This is part of the standard test machinery. It provides a place for the +- test instructions to be displayed, and a place for interactive messages +- to the user to be displayed. +- To have the test instructions displayed, see Sysout. +- To have a message to the user be displayed, see Sysout. +- Do not call anything in this dialog directly. +- */ +-class TestDialog extends Dialog +-{ +- +- TextArea instructionsText; +- TextArea messageText; +- int maxStringLength = 80; +- +- //DO NOT call this directly, go through Sysout +- public TestDialog( Frame frame, String name ) +- { +- super( frame, name ); +- int scrollBoth = TextArea.SCROLLBARS_BOTH; +- instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth ); +- add( "North", instructionsText ); +- +- messageText = new TextArea( "", 5, maxStringLength, scrollBoth ); +- add("Center", messageText); +- +- pack(); +- +- show(); +- }// TestDialog() +- +- //DO NOT call this directly, go through Sysout +- public void printInstructions( String[] instructions ) +- { +- //Clear out any current instructions +- instructionsText.setText( "" ); +- +- //Go down array of instruction strings +- +- String printStr, remainingStr; +- for( int i=0; i < instructions.length; i++ ) +- { +- //chop up each into pieces maxSringLength long +- remainingStr = instructions[ i ]; +- while( remainingStr.length() > 0 ) +- { +- //if longer than max then chop off first max chars to print +- if( remainingStr.length() >= maxStringLength ) +- { +- //Try to chop on a word boundary +- int posOfSpace = remainingStr. +- lastIndexOf( ' ', maxStringLength - 1 ); +- +- if( posOfSpace <= 0 ) posOfSpace = maxStringLength - 1; +- +- printStr = remainingStr.substring( 0, posOfSpace + 1 ); +- remainingStr = remainingStr.substring( posOfSpace + 1 ); +- } +- //else just print +- else +- { +- printStr = remainingStr; +- remainingStr = ""; +- } +- +- instructionsText.append( printStr + "\n" ); +- +- }// while +- +- }// for +- +- }//printInstructions() +- +- //DO NOT call this directly, go through Sysout +- public void displayMessage( String messageIn ) +- { +- messageText.append( messageIn + "\n" ); +- System.out.println(messageIn); +- } +- +-}// TestDialog class From dj at lucasit.com Thu Feb 17 16:37:39 2011 From: dj at lucasit.com (DJ Lucas) Date: Thu, 17 Feb 2011 18:37:39 -0600 Subject: IcedTea-Web add --mandir switch not honored Message-ID: <4D5DBF53.40507@lucasit.com> Trivial fix: --- icedtea-web-1.0.1-orig/Makefile.in 2011-02-14 13:04:17.000000000 -0600 +++ icedtea-web-1.0.1/Makefile.in 2011-02-17 18:32:46.000000000 -0600 @@ -626,8 +626,8 @@ install-exec-local: @ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar install-data-local: - ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 - ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 + ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 + ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1 ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib @ENABLE_DOCS_TRUE@ ${mkinstalldirs} $(DESTDIR)$(htmldir) @ENABLE_DOCS_TRUE@ (cd ${abs_top_builddir}/docs/netx; \ Thanks. -- DJ -- This message has been scanned for viruses and dangerous content, and is believed to be clean. From dj at lucasit.com Thu Feb 17 16:52:47 2011 From: dj at lucasit.com (DJ Lucas) Date: Thu, 17 Feb 2011 18:52:47 -0600 Subject: IcedTea-Web add --mandir switch not honored In-Reply-To: <4D5DBF53.40507@lucasit.com> References: <4D5DBF53.40507@lucasit.com> Message-ID: <4D5DC2DF.3070507@lucasit.com> On 02/17/2011 06:37 PM, DJ Lucas wrote: > Trivial fix: > > Oh...wait, just realized that the above (while generally considered a correct default) would make mandir=$DATAROOTDIR/man ($prefix/share/man) by default so if the omission of /share in the path is intentional (like default in-tree build of IcedTea6), you should redefine the default to $PREFIX/man. -- DJ Lucas -- This message has been scanned for viruses and dangerous content, and is believed to be clean. From bugzilla-daemon at icedtea.classpath.org Thu Feb 17 23:41:57 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 18 Feb 2011 07:41:57 +0000 Subject: [Bug 600] HS19 upgrade broke CACAO build on ARM Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 ------- Comment #1 from stefan at complang.tuwien.ac.at 2011-02-18 07:41 ------- Created an attachment (id=461) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=461&action=view) Minimal build fix This ugly hack fixes the build. I don't know the exact ramifications of defining the macro, but from glancing over the results of grepping for ZERO_BUILD, I didn't notice anything too worrying. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ptisnovs at redhat.com Fri Feb 18 01:41:38 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Fri, 18 Feb 2011 10:41:38 +0100 Subject: Reviewer needed: Remove patch for obsolete test. Message-ID: <4D5E3ED2.5060205@redhat.com> Hi all, can anybody please review simple change in IcedTea6-HEAD? I removed patch for now-obsolete test WindowWithWarningTest which was removed by Andrew's previous patch so it now does not make sense to apply patch to nonexistent file. Cheers Pavel -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hg_export Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110218/8a0f72c7/hg_export.ksh From ptisnovs at redhat.com Fri Feb 18 02:13:52 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Fri, 18 Feb 2011 11:13:52 +0100 Subject: Reviewer needed: Remove patch for obsolete test. In-Reply-To: <4D5E3ED2.5060205@redhat.com> References: <4D5E3ED2.5060205@redhat.com> Message-ID: <4D5E4660.9040300@redhat.com> Sorry, I forgot to add this change to the hg export in my previous mail: --- a/Makefile.am Fri Feb 18 09:43:45 2011 +0100 +++ b/Makefile.am Fri Feb 18 10:18:00 2011 +0100 @@ -284,7 +284,6 @@ patches/icedtea-jtreg-international-fonts.patch \ patches/openjdk/6967436-6976265-6967434-pisces.patch \ patches/f14-fonts.patch \ - patches/jtreg-WindowWithWarningTest.patch \ patches/jtreg-T6638712-fix.patch \ patches/jtreg-T6650759m-fix.patch \ patches/openjdk/7003777-bad-html-entity-parse.patch \ Pavel Tisnovsky wrote: > Hi all, > > can anybody please review simple change in IcedTea6-HEAD? > > I removed patch for now-obsolete test WindowWithWarningTest which was > removed by Andrew's previous patch so it now does not make sense to > apply patch to nonexistent file. > > Cheers > Pavel > From mark at klomp.org Fri Feb 18 02:31:37 2011 From: mark at klomp.org (Mark Wielaard) Date: Fri, 18 Feb 2011 11:31:37 +0100 (CET) Subject: Reviewer needed: Remove patch for obsolete test. In-Reply-To: <4D5E4660.9040300@redhat.com> References: <4D5E3ED2.5060205@redhat.com> <4D5E4660.9040300@redhat.com> Message-ID: <44825.80.101.103.228.1298025097.squirrel@gnu.wildebeest.org> On Fri, February 18, 2011 11:13, Pavel Tisnovsky wrote: > Sorry, I forgot to add this change to the hg export in my previous mail: > > --- a/Makefile.am Fri Feb 18 09:43:45 2011 +0100 > +++ b/Makefile.am Fri Feb 18 10:18:00 2011 +0100 > @@ -284,7 +284,6 @@ > patches/icedtea-jtreg-international-fonts.patch \ > patches/openjdk/6967436-6976265-6967434-pisces.patch \ > patches/f14-fonts.patch \ > - patches/jtreg-WindowWithWarningTest.patch \ > patches/jtreg-T6638712-fix.patch \ > patches/jtreg-T6650759m-fix.patch \ > patches/openjdk/7003777-bad-html-entity-parse.patch \ > >> can anybody please review simple change in IcedTea6-HEAD? >> >> I removed patch for now-obsolete test WindowWithWarningTest which was >> removed by Andrew's previous patch so it now does not make sense to >> apply patch to nonexistent file. Yes please! Thanks, Mark From ptisnovs at icedtea.classpath.org Fri Feb 18 02:40:48 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Fri, 18 Feb 2011 10:40:48 +0000 Subject: /hg/icedtea6: Removed patch for obsolete test. Message-ID: changeset 70ea35e42b14 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=70ea35e42b14 author: ptisnovs date: Fri Feb 18 11:38:42 2011 +0100 Removed patch for obsolete test. diffstat: 3 files changed, 6 insertions(+), 51 deletions(-) ChangeLog | 6 +++ Makefile.am | 1 patches/jtreg-WindowWithWarningTest.patch | 50 ----------------------------- diffs (78 lines): diff -r 728aac195993 -r 70ea35e42b14 ChangeLog --- a/ChangeLog Fri Feb 18 00:34:56 2011 +0000 +++ b/ChangeLog Fri Feb 18 11:38:42 2011 +0100 @@ -1,3 +1,9 @@ 2011-02-18 Andrew John Hughes + + * Makefile.am: Updated. + * patches/jtreg-WindowWithWarningTest: + Removed patch for obsolete test. + 2011-02-18 Andrew John Hughes S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails diff -r 728aac195993 -r 70ea35e42b14 Makefile.am --- a/Makefile.am Fri Feb 18 00:34:56 2011 +0000 +++ b/Makefile.am Fri Feb 18 11:38:42 2011 +0100 @@ -284,7 +284,6 @@ ICEDTEA_PATCHES = \ patches/icedtea-jtreg-international-fonts.patch \ patches/openjdk/6967436-6976265-6967434-pisces.patch \ patches/f14-fonts.patch \ - patches/jtreg-WindowWithWarningTest.patch \ patches/jtreg-T6638712-fix.patch \ patches/jtreg-T6650759m-fix.patch \ patches/openjdk/7003777-bad-html-entity-parse.patch \ diff -r 728aac195993 -r 70ea35e42b14 patches/jtreg-WindowWithWarningTest.patch --- a/patches/jtreg-WindowWithWarningTest.patch Fri Feb 18 00:34:56 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ ---- /dev/null 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/applet.policy 2010-11-26 18:01:32.000000000 +0100 -@@ -0,0 +1,13 @@ -+ -+// Standard extensions get all permissions by default -+ -+grant codeBase "file:${{java.ext.dirs}}/*" { -+ permission java.security.AllPermission; -+}; -+ -+// default permissions granted to all domains -+ -+grant { -+ permission java.awt.AWTPermission "createRobot", "enabled"; -+}; -+ ---- openjdk-old/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html 2010-06-21 23:15:49.000000000 +0200 -+++ openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html 2010-11-26 18:29:25.622555000 +0100 -@@ -4,7 +4,7 @@ - @bug 6391770 - @summary Content of the Window should be laid out in the area left after WarningWindow was added. - @author Yuri Nesterenko -- @run applet WindowWithWarningTest.html -+ @run applet/othervm/policy=applet.policy WindowWithWarningTest.html - --> - - ---- openjdk-old/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java 2010-06-21 23:15:49.000000000 +0200 -+++ openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java 2010-11-26 18:10:15.000000000 +0100 -@@ -53,6 +53,7 @@ - import java.awt.*; - import java.awt.event.*; - import javax.swing.*; -+import java.security.*; - - //Automated tests should run as applet tests if possible because they - // get their environments cleaned up, including AWT threads, any -@@ -91,12 +92,6 @@ - public void start () - { - //Get things going. Request focus, set size, et cetera -- System.setSecurityManager( new SecurityManager() { -- // deny AWTPermission("showWindowWithoutWarningBanner") -- public boolean checkTopLevelWindow(Object window) { -- return false; -- } -- }); - JFrame frame = new JFrame("Window Test"); - frame.setBounds(50, 50, 200, 200); - frame.show(); From ptisnovs at redhat.com Fri Feb 18 02:51:16 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Fri, 18 Feb 2011 11:51:16 +0100 Subject: Reviewer needed: Remove patch for obsolete test. In-Reply-To: <44825.80.101.103.228.1298025097.squirrel@gnu.wildebeest.org> References: <4D5E3ED2.5060205@redhat.com> <4D5E4660.9040300@redhat.com> <44825.80.101.103.228.1298025097.squirrel@gnu.wildebeest.org> Message-ID: <4D5E4F24.4060701@redhat.com> Mark Wielaard wrote: > On Fri, February 18, 2011 11:13, Pavel Tisnovsky wrote: >> Sorry, I forgot to add this change to the hg export in my previous mail: >> >> --- a/Makefile.am Fri Feb 18 09:43:45 2011 +0100 >> +++ b/Makefile.am Fri Feb 18 10:18:00 2011 +0100 >> @@ -284,7 +284,6 @@ >> patches/icedtea-jtreg-international-fonts.patch \ >> patches/openjdk/6967436-6976265-6967434-pisces.patch \ >> patches/f14-fonts.patch \ >> - patches/jtreg-WindowWithWarningTest.patch \ >> patches/jtreg-T6638712-fix.patch \ >> patches/jtreg-T6650759m-fix.patch \ >> patches/openjdk/7003777-bad-html-entity-parse.patch \ >> >>> can anybody please review simple change in IcedTea6-HEAD? >>> >>> I removed patch for now-obsolete test WindowWithWarningTest which was >>> removed by Andrew's previous patch so it now does not make sense to >>> apply patch to nonexistent file. > > Yes please! > > Thanks, > > Mark > Done, I hope your autobuilders will be happy ;-) Pavel From xerxes at zafena.se Fri Feb 18 03:20:19 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Fri, 18 Feb 2011 12:20:19 +0100 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM Message-ID: <4D5E55F3.4090801@zafena.se> When building icedtea6 with --enable-cacao on ARM then the build break with the error message: make[7]: *** No rule to make target `../../../../src/solaris/bin/arm/jvm.cfg', needed by `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-cacao/build/openjdk.build/lib/arm/jvm.cfg'. Stop. The CACAO maintainer Stefan Ring have found out that it are possible to build CACAO on ARM if ICEDTEA_ZERO_BUILD gets sets to true. http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 The attached patch unbreaks CACAO on ARM builds. Ok to push? Cheers Xerxes # HG changeset patch # User Stefan Ring # Node ID 2b0dfc2c88db1bea882b467ed5b5d274a8759c87 # Parent 34511f89bc1da242067b23962cff081d2e94c74a PR600: Repair CACAO/ARM build. 2011-02-17 Stefan Ring * Makefile.am: Set ZERO_BUILD for CACAO as well. diff --git a/Makefile.am b/Makefile.am --- a/Makefile.am +++ b/Makefile.am @@ -401,8 +401,12 @@ if ZERO_BUILD ICEDTEA_ZERO_BUILD = true else +if WITH_CACAO + ICEDTEA_ZERO_BUILD = true +else ICEDTEA_ZERO_BUILD = endif +endif if SHARK_BUILD ICEDTEA_SHARK_BUILD = true else From andrew at icedtea.classpath.org Fri Feb 18 05:18:47 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 18 Feb 2011 13:18:47 +0000 Subject: /hg/icedtea6-hg: 6 new changesets Message-ID: changeset 9882da94debb in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=9882da94debb author: Andrew John Hughes date: Thu Feb 17 22:34:54 2011 +0000 Fix placement of PR632 NEWS item. 2011-02-17 Andrew John Hughes * NEWS: Fix placement of PR632. changeset 728aac195993 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=728aac195993 author: Andrew John Hughes date: Fri Feb 18 00:34:56 2011 +0000 S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails 2011-02-18 Andrew John Hughes S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails * Makefile.am: Add patch. * NEWS: Updated. * patches/openjdk/6444769-windowwithwarningtest.patch: Remove obsolete WindowWithWarningTest. changeset 1402c8ddaa03 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=1402c8ddaa03 author: Andrew John Hughes date: Fri Feb 18 12:11:08 2011 +0000 Move to security-fixed JAXP tarball and drop local patch. 2011-02-17 Andrew John Hughes * Makefile.am: (JAXP_DROP_ZIP): Use zip with security fix. (JAXP_DROP_SHA256SUM): Likewise. (SECURITY_PATCHES): Drop local JAXP security fix. changeset 70ea35e42b14 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=70ea35e42b14 author: ptisnovs date: Fri Feb 18 11:38:42 2011 +0100 Removed patch for obsolete test. changeset b2d846905f82 in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=b2d846905f82 author: Andrew John Hughes date: Fri Feb 18 13:17:32 2011 +0000 Merge changeset 4b7c7f2492bc in /hg/icedtea6-hg details: http://icedtea.classpath.org/hg/icedtea6-hg?cmd=changeset;node=4b7c7f2492bc author: Andrew John Hughes date: Fri Feb 18 13:18:26 2011 +0000 Merge diffstat: 12 files changed, 401 insertions(+), 1473 deletions(-) ChangeLog | 42 + Makefile.am | 18 NEWS | 3 patches/jtreg-WindowWithWarningTest.patch | 50 - patches/openjdk/6444769-windowwithwarningtest.patch | 352 ++++++++ patches/security/20110209/4421494.patch | 106 -- patches/security/20110215/6878713.patch | 143 --- patches/security/20110215/6907662.patch | 758 ------------------- patches/security/20110215/6981922.patch | 245 ------ patches/security/20110215/6983554.patch | 20 patches/security/20110215/6985453.patch | 104 -- patches/security/20110215/6994263.patch | 33 diffs (truncated from 1980 to 500 lines): diff -r 2d689773ef17 -r 4b7c7f2492bc ChangeLog --- a/ChangeLog Thu Feb 17 21:44:24 2011 +0000 +++ b/ChangeLog Fri Feb 18 13:18:26 2011 +0000 @@ -1,3 +1,40 @@ 2011-02-17 Andrew John Hughes + + * Makefile.am: Updated. + * patches/jtreg-WindowWithWarningTest: + Removed patch for obsolete test. + +2011-02-18 Andrew John Hughes + + * Makefile.am: + (JAXP_DROP_ZIP): Use zip with security fix. + (JAXP_DROP_SHA256SUM): Likewise. + (SECURITY_PATCHES): Drop local JAXP security fix. + +2011-02-17 Andrew John Hughes + + S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails + * Makefile.am: Add patch. + * NEWS: Updated. + * patches/openjdk/6444769-windowwithwarningtest.patch: + Remove obsolete WindowWithWarningTest. + +2011-02-17 Andrew John Hughes + + * patches/security/20110209/4421494.patch, + * patches/security/20110215/6878713.patch, + * patches/security/20110215/6907662.patch, + * patches/security/20110215/6981922.patch, + * patches/security/20110215/6983554.patch, + * patches/security/20110215/6985453.patch, + * patches/security/20110215/6994263.patch: + Drop security patches available upstream. + * Makefile.am: Remove above. + +2011-02-17 Andrew John Hughes + + * NEWS: Fix placement of PR632. + 2011-02-17 Andrew John Hughes 6693253: Security Warning appearance requires enhancements @@ -270,6 +307,11 @@ 2010-01-22 Mark Wielaard * Makefile.am (ICEDTEA_PATCHES): Add missing backslash. + +2011-01-22 Andrew John Hughes + + * Makefile.am: + Bump to b22. 2011-01-22 Andrew John Hughes diff -r 2d689773ef17 -r 4b7c7f2492bc Makefile.am --- a/Makefile.am Thu Feb 17 21:44:24 2011 +0000 +++ b/Makefile.am Fri Feb 18 13:18:26 2011 +0000 @@ -2,7 +2,7 @@ OPENJDK_DATE = 20_jan_2011 OPENJDK_MD5SUM = 595125cd17441122074a4fe0f78c0252 -OPENJDK_VERSION = b21 +OPENJDK_VERSION = b22 OPENJDK_URL = http://download.java.net/openjdk/jdk6/promoted/$(OPENJDK_VERSION)/ CACAO_VERSION = 6a5eda011e49 @@ -18,8 +18,8 @@ JAF_DROP_ZIP = jdk6-jaf-b20.zip JAF_DROP_ZIP = jdk6-jaf-b20.zip JAF_DROP_SHA256SUM = 78c7b5c9d6271e88ee46abadd018a61f1e9645f8936cc8df1617e5f4f5074012 JAXP_DROP_URL = http://icedtea.classpath.org/download/drops -JAXP_DROP_ZIP = jaxp-1_4_4.zip -JAXP_DROP_SHA256SUM = 10b203bec5b7d3dd8f515a9e098f80abc316faf977bcc220b56efe3dc6e9e5e9 +JAXP_DROP_ZIP = jaxp144_01.zip +JAXP_DROP_SHA256SUM = d72c2e27a479e7e78e0141cfcf3a9c5dbc5677495bd21b2d52dce85d21322186 OPENJDK_HG_URL = http://hg.openjdk.java.net/jdk6/jdk6 @@ -174,15 +174,7 @@ REWRITER_SRCS = $(abs_top_srcdir)/rewrit ICEDTEA_FSG_PATCHES = -SECURITY_PATCHES = patches/security/20110209/4421494.patch \ - patches/security/20110215/6878713.patch \ - patches/security/20110215/6907662.patch \ - patches/security/20110215/6981922.patch \ - patches/security/20110215/6983554.patch \ - patches/security/20110215/6994263.patch \ - patches/security/20110215/6985453.patch \ - patches/security/20110215/6927050.patch - +SECURITY_PATCHES = ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ @@ -200,6 +192,7 @@ ICEDTEA_PATCHES = \ patches/openjdk/6755274-glgetstring-crash.patch \ patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ patches/openjdk/6693253-security_warning.patch \ + patches/openjdk/6444769-windowwithwarningtest.patch \ patches/icedtea-notice-safepoints.patch \ patches/icedtea-parisc-opt.patch \ patches/icedtea-lucene-crash.patch \ @@ -283,7 +276,6 @@ ICEDTEA_PATCHES = \ patches/icedtea-jtreg-international-fonts.patch \ patches/openjdk/6967436-6976265-6967434-pisces.patch \ patches/f14-fonts.patch \ - patches/jtreg-WindowWithWarningTest.patch \ patches/jtreg-T6638712-fix.patch \ patches/jtreg-T6650759m-fix.patch \ patches/openjdk/7003777-bad-html-entity-parse.patch \ diff -r 2d689773ef17 -r 4b7c7f2492bc NEWS --- a/NEWS Thu Feb 17 21:44:24 2011 +0000 +++ b/NEWS Fri Feb 18 13:18:26 2011 +0000 @@ -418,15 +418,16 @@ New in release 1.10 (2011-XX-XX): - S7015232: missing copyright header in CheckZOrderChange.java - S7017581: missing copyright header in test/sun/java2d/pipe/RegionOps.java - S6896068: SunGraphics2D exposes a reference to itself while non fully initialised. - - PR632: patches/security/20110215/6878713.patch breaks shark zero build - S6749060: LCD AA text rendered incorrectly when destination is non opaque (sw pipeline only) - S6728834: D3D/OGL: LCD AA text becomes bold and blurred when rendering to a non-opaque destination - S6693253: Security Warning appearance requires enhancements - S6779717: A Window does not show applet security warning icon on X platforms - S6785058: Parent don't get the focus after dialog is closed if security warning is applied + - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR616, PR99: Don't statically link libstdc++ or libgcc + - PR632: patches/security/20110215/6878713.patch breaks shark zero build New in release 1.9.7 (2011-02-15): diff -r 2d689773ef17 -r 4b7c7f2492bc patches/jtreg-WindowWithWarningTest.patch --- a/patches/jtreg-WindowWithWarningTest.patch Thu Feb 17 21:44:24 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,50 +0,0 @@ ---- /dev/null 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/applet.policy 2010-11-26 18:01:32.000000000 +0100 -@@ -0,0 +1,13 @@ -+ -+// Standard extensions get all permissions by default -+ -+grant codeBase "file:${{java.ext.dirs}}/*" { -+ permission java.security.AllPermission; -+}; -+ -+// default permissions granted to all domains -+ -+grant { -+ permission java.awt.AWTPermission "createRobot", "enabled"; -+}; -+ ---- openjdk-old/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html 2010-06-21 23:15:49.000000000 +0200 -+++ openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html 2010-11-26 18:29:25.622555000 +0100 -@@ -4,7 +4,7 @@ - @bug 6391770 - @summary Content of the Window should be laid out in the area left after WarningWindow was added. - @author Yuri Nesterenko -- @run applet WindowWithWarningTest.html -+ @run applet/othervm/policy=applet.policy WindowWithWarningTest.html - --> - - ---- openjdk-old/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java 2010-06-21 23:15:49.000000000 +0200 -+++ openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java 2010-11-26 18:10:15.000000000 +0100 -@@ -53,6 +53,7 @@ - import java.awt.*; - import java.awt.event.*; - import javax.swing.*; -+import java.security.*; - - //Automated tests should run as applet tests if possible because they - // get their environments cleaned up, including AWT threads, any -@@ -91,12 +92,6 @@ - public void start () - { - //Get things going. Request focus, set size, et cetera -- System.setSecurityManager( new SecurityManager() { -- // deny AWTPermission("showWindowWithoutWarningBanner") -- public boolean checkTopLevelWindow(Object window) { -- return false; -- } -- }); - JFrame frame = new JFrame("Window Test"); - frame.setBounds(50, 50, 200, 200); - frame.show(); diff -r 2d689773ef17 -r 4b7c7f2492bc patches/openjdk/6444769-windowwithwarningtest.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6444769-windowwithwarningtest.patch Fri Feb 18 13:18:26 2011 +0000 @@ -0,0 +1,352 @@ +# HG changeset patch +# User andrew +# Date 1292334667 0 +# Node ID ff5b73fcc2ac8d72c0df5d31b6210ecb73eb4391 +# Parent 3d243dc7441260f121db54cca6fbc99fec1e929a +6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails +Summary: Remove unneeded test +Reviewed-by: anthony + +diff -r 3d243dc74412 -r ff5b73fcc2ac test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html +--- openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html Thu Feb 17 20:36:45 2011 +0000 ++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +@@ -1,20 +0,0 @@ +- +- +- +- +- WindowWithWarningTest +- +-
+-  This test will run automatically.
+-  
+- +- +- +- +- +diff -r 3d243dc74412 -r ff5b73fcc2ac test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java +--- openjdk/jdk/test/java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.java Thu Feb 17 20:36:45 2011 +0000 ++++ /dev/null Thu Jan 01 00:00:00 1970 +0000 +@@ -1,315 +0,0 @@ +-/* +- * Copyright (c) 2006, 2008, Oracle and/or its affiliates. All rights reserved. +- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. +- * +- * This code is free software; you can redistribute it and/or modify it +- * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. +- * +- * This code is distributed in the hope that it will be useful, but WITHOUT +- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +- * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License +- * version 2 for more details (a copy is included in the LICENSE file that +- * accompanied this code). +- * +- * You should have received a copy of the GNU General Public License version +- * 2 along with this work; if not, write to the Free Software Foundation, +- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. +- * +- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA +- * or visit www.oracle.com if you need additional information or have any +- * questions. +- */ +- +- +-/* +- test +- @bug 6391770 +- @summary Content of the Window should be laid out in the area left after WarningWindow was added. +- @author yuri nesterenko: area= +- @run applet WindowWithWarningTest.html +-*/ +- +-// Note there is no @ in front of test above. This is so that the +-// harness will not mistake this file as a test file. It should +-// only see the html file as a test file. (the harness runs all +-// valid test files, so it would run this test twice if this file +-// were valid as well as the html file.) +-// Also, note the area= after Your Name in the author tag. Here, you +-// should put which functional area the test falls in. See the +-// AWT-core home page -> test areas and/or -> AWT team for a list of +-// areas. +-// Note also the 'AutomaticAppletTest.html' in the run tag. This should +-// be changed to the name of the test. +- +- +-/** +- * WindowWithWarningTest.java +- * +- * summary: +- */ +- +-import java.applet.Applet; +-import java.awt.*; +-import java.awt.event.*; +-import javax.swing.*; +- +-//Automated tests should run as applet tests if possible because they +-// get their environments cleaned up, including AWT threads, any +-// test created threads, and any system resources used by the test +-// such as file descriptors. (This is normally not a problem as +-// main tests usually run in a separate VM, however on some platforms +-// such as the Mac, separate VMs are not possible and non-applet +-// tests will cause problems). Also, you don't have to worry about +-// synchronisation stuff in Applet tests they way you do in main +-// tests... +- +- +-public class WindowWithWarningTest extends Applet +-{ +- //Declare things used in the test, like buttons and labels here +- boolean buttonClicked = false; +- public static final int MAX_COUNT = 100; +- +- public void init() +- { +- //Create instructions for the user here, as well as set up +- // the environment -- set the layout manager, add buttons, +- // etc. +- +- this.setLayout (new BorderLayout ()); +- +- String[] instructions = +- { +- "This is an AUTOMATIC test", +- "simply wait until it is done" +- }; +- //Sysout.createDialog( ); +- //Sysout.printInstructions( instructions ); +- +- }//End init() +- public void start () +- { +- //Get things going. Request focus, set size, et cetera +- System.setSecurityManager( new SecurityManager() { +- // deny AWTPermission("showWindowWithoutWarningBanner") +- public boolean checkTopLevelWindow(Object window) { +- return false; +- } +- }); +- JFrame frame = new JFrame("Window Test"); +- frame.setBounds(50, 50, 200, 200); +- frame.show(); +- +- JWindow window = new JWindow( frame ); +- JButton jbutton1 = new JButton( "First" ); +- jbutton1.addMouseListener( new MouseAdapter() { +- public void mousePressed( MouseEvent me ) { +- buttonClicked = true; +- } +- }); +- JButton jbutton2 = new JButton( "Second" ); +- window.setLocation( 300, 300 ); +- +- window.add("North", jbutton1); +- window.add("South", jbutton2); +- +- window.pack(); +- window.show(); +- //wait for frame to show: +- getLocation( frame ); +- window.toFront(); +- +- Dimension size0 = window.getSize(); +- Dimension size1 = null; +- try { +- Robot robot = new Robot(); +- +- robot.delay(500); +- window.pack(); +- robot.delay(500); +- window.pack(); +- // size1 must be the same as size0 +- size1 = window.getSize(); +- robot.delay(500); +- Point pt = jbutton1.getLocationOnScreen(); +- robot.mouseMove((int) jbutton1.getLocationOnScreen().x + jbutton1.getWidth() / 2, +- (int) jbutton1.getLocationOnScreen().y + jbutton1.getHeight() / 2); +- robot.delay(500); +- robot.mousePress(MouseEvent.BUTTON1_MASK); +- robot.delay(100); +- robot.mouseRelease(MouseEvent.BUTTON1_MASK); +- robot.delay(2000); +- }catch(Exception e) { +- throw new RuntimeException( "Exception "+e ); +- } +- if( !size0.equals(size1) ) { +- throw new RuntimeException( "Wrong Window size after multiple pack()s"); +- } +- if( !buttonClicked ) { +- throw new RuntimeException( "Button was not clicked"); +- } +- window.dispose(); +- frame.dispose(); +- +- System.out.println("Test Passed."); +- }// start() +- public static Point getLocation( Component co ) throws RuntimeException { +- Point pt = null; +- boolean bFound = false; +- int count = 0; +- while( !bFound ) { +- try { +- pt = co.getLocationOnScreen(); +- bFound = true; +- }catch( Exception ex ) { +- bFound = false; +- count++; +- } +- if( !bFound && count > MAX_COUNT ) { +- throw new RuntimeException("don't see a component to get location"); +- } +- } +- return pt; +- } +- +- +-}// class AutomaticAppletTest +- +- +-/**************************************************** +- Standard Test Machinery +- DO NOT modify anything below -- it's a standard +- chunk of code whose purpose is to make user +- interaction uniform, and thereby make it simpler +- to read and understand someone else's test. +- ****************************************************/ +- +-/** +- This is part of the standard test machinery. +- It creates a dialog (with the instructions), and is the interface +- for sending text messages to the user. +- To print the instructions, send an array of strings to Sysout.createDialog +- WithInstructions method. Put one line of instructions per array entry. +- To display a message for the tester to see, simply call Sysout.println +- with the string to be displayed. +- This mimics System.out.println but works within the test harness as well +- as standalone. +- */ +- +-class Sysout +-{ +- private static TestDialog dialog; +- +- public static void createDialogWithInstructions( String[] instructions ) +- { +- dialog = new TestDialog( new Frame(), "Instructions" ); +- dialog.printInstructions( instructions ); +- dialog.setVisible(true); +- println( "Any messages for the tester will display here." ); +- } +- +- public static void createDialog( ) +- { +- dialog = new TestDialog( new Frame(), "Instructions" ); +- String[] defInstr = { "Instructions will appear here. ", "" } ; +- dialog.printInstructions( defInstr ); +- dialog.setVisible(true); +- println( "Any messages for the tester will display here." ); +- } +- +- +- public static void printInstructions( String[] instructions ) +- { +- dialog.printInstructions( instructions ); +- } +- +- +- public static void println( String messageIn ) +- { +- dialog.displayMessage( messageIn ); +- } +- +-}// Sysout class +- +-/** +- This is part of the standard test machinery. It provides a place for the +- test instructions to be displayed, and a place for interactive messages +- to the user to be displayed. +- To have the test instructions displayed, see Sysout. +- To have a message to the user be displayed, see Sysout. +- Do not call anything in this dialog directly. +- */ +-class TestDialog extends Dialog +-{ +- +- TextArea instructionsText; +- TextArea messageText; +- int maxStringLength = 80; +- +- //DO NOT call this directly, go through Sysout +- public TestDialog( Frame frame, String name ) +- { +- super( frame, name ); +- int scrollBoth = TextArea.SCROLLBARS_BOTH; +- instructionsText = new TextArea( "", 15, maxStringLength, scrollBoth ); +- add( "North", instructionsText ); +- +- messageText = new TextArea( "", 5, maxStringLength, scrollBoth ); +- add("Center", messageText); +- +- pack(); +- +- show(); +- }// TestDialog() +- +- //DO NOT call this directly, go through Sysout +- public void printInstructions( String[] instructions ) +- { +- //Clear out any current instructions +- instructionsText.setText( "" ); +- +- //Go down array of instruction strings From ahughes at redhat.com Fri Feb 18 05:22:44 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 18 Feb 2011 13:22:44 +0000 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <4D5E55F3.4090801@zafena.se> References: <4D5E55F3.4090801@zafena.se> Message-ID: <20110218132244.GA30037@rivendell.middle-earth.co.uk> On 12:20 Fri 18 Feb , Xerxes R?nby wrote: > When building icedtea6 with --enable-cacao on ARM then the build break with the error message: > > make[7]: *** No rule to make target `../../../../src/solaris/bin/arm/jvm.cfg', needed by `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-cacao/build/openjdk.build/lib/arm/jvm.cfg'. Stop. > > The CACAO maintainer Stefan Ring have found out that it are possible to build CACAO on ARM if > ICEDTEA_ZERO_BUILD gets sets to true. > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 > > The attached patch unbreaks CACAO on ARM builds. > Ok to push? > No. I think it should be fixed correctly, not just by enabling the zero build. Do you know if this is because something we do in IcedTea for zero? Or something in OpenJDK? > Cheers > Xerxes > > # HG changeset patch > # User Stefan Ring > # Node ID 2b0dfc2c88db1bea882b467ed5b5d274a8759c87 > # Parent 34511f89bc1da242067b23962cff081d2e94c74a > PR600: Repair CACAO/ARM build. > > 2011-02-17 Stefan Ring > > * Makefile.am: Set ZERO_BUILD for CACAO as well. > > diff --git a/Makefile.am b/Makefile.am > --- a/Makefile.am > +++ b/Makefile.am > @@ -401,8 +401,12 @@ > if ZERO_BUILD > ICEDTEA_ZERO_BUILD = true > else > +if WITH_CACAO > + ICEDTEA_ZERO_BUILD = true > +else > ICEDTEA_ZERO_BUILD = > endif > +endif > if SHARK_BUILD > ICEDTEA_SHARK_BUILD = true > else > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Fri Feb 18 05:24:27 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 18 Feb 2011 13:24:27 +0000 Subject: IcedTea-Web add --mandir switch not honored In-Reply-To: <4D5DBF53.40507@lucasit.com> References: <4D5DBF53.40507@lucasit.com> Message-ID: <20110218132427.GB30037@rivendell.middle-earth.co.uk> On 18:37 Thu 17 Feb , DJ Lucas wrote: > Trivial fix: > > --- icedtea-web-1.0.1-orig/Makefile.in 2011-02-14 13:04:17.000000000 > -0600 > +++ icedtea-web-1.0.1/Makefile.in 2011-02-17 18:32:46.000000000 -0600 > @@ -626,8 +626,8 @@ install-exec-local: > @ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} > $(abs_top_builddir)/liveconnect/lib/classes.jar > $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar > > install-data-local: > - ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 > - ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 > + ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 > + ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1 > ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp > $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib > @ENABLE_DOCS_TRUE@ ${mkinstalldirs} $(DESTDIR)$(htmldir) > @ENABLE_DOCS_TRUE@ (cd ${abs_top_builddir}/docs/netx; \ > > Thanks. > > -- DJ > > > > -- > This message has been scanned for viruses and > dangerous content, and is believed to be clean. > Ok for HEAD. For 1.0, it was agreed to retain the JDK directory structure as that version requires it. Hence the deliberate ignorance of $(mandir). -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Fri Feb 18 05:32:17 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 18 Feb 2011 13:32:17 +0000 Subject: [Bug 634] jdk tests write to /etc/shadow Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634 ptisnovs at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Feb 18 05:33:13 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 18 Feb 2011 13:33:13 +0000 Subject: [Bug 634] jdk tests write to /etc/shadow Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634 ptisnovs at redhat.com changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|ptisnovs at redhat.com |.org | Status|ASSIGNED |NEW -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From gbenson at redhat.com Fri Feb 18 06:25:57 2011 From: gbenson at redhat.com (Gary Benson) Date: Fri, 18 Feb 2011 14:25:57 +0000 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <20110218132244.GA30037@rivendell.middle-earth.co.uk> References: <4D5E55F3.4090801@zafena.se> <20110218132244.GA30037@rivendell.middle-earth.co.uk> Message-ID: <20110218142556.GB4652@redhat.com> Dr Andrew John Hughes wrote: > On 12:20 Fri 18 Feb , Xerxes R?nby wrote: > > When building icedtea6 with --enable-cacao on ARM then the build break with the error message: > > > > make[7]: *** No rule to make target `../../../../src/solaris/bin/arm/jvm.cfg', needed by `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-cacao/build/openjdk.build/lib/arm/jvm.cfg'. Stop. > > > > The CACAO maintainer Stefan Ring have found out that it are > > possible to build CACAO on ARM if ICEDTEA_ZERO_BUILD gets sets > > to true. > > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 > > > > The attached patch unbreaks CACAO on ARM builds. > > Ok to push? > > No. I think it should be fixed correctly, not just by enabling > the zero build. Do you know if this is because something we do > in IcedTea for zero? Or something in OpenJDK? You need to create the file jdk/src/solaris/bin/arm/jvm.cfg before building. The other platforms (zero included) have their own files there. Setting ZERO_BUILD=true enables some logic that causes the file to be copied from jdk/src/solaris/bin/zero/jvm.cfg rather than jdk/src/solaris/bin/$(ARCH)/jvm.cfg. Cheers, Gary -- http://gbenson.net/ From jvanek at redhat.com Fri Feb 18 06:38:11 2011 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 18 Feb 2011 15:38:11 +0100 Subject: Strange behaviour during javaws -about Message-ID: <4D5E8453.9050806@redhat.com> Can you anybody check it? https://bugzilla.redhat.com/show_bug.cgi?id=677334 regards J From xerxes at zafena.se Fri Feb 18 07:11:45 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Fri, 18 Feb 2011 16:11:45 +0100 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <20110218142556.GB4652@redhat.com> References: <4D5E55F3.4090801@zafena.se> <20110218132244.GA30037@rivendell.middle-earth.co.uk> <20110218142556.GB4652@redhat.com> Message-ID: <4D5E8C31.2080705@zafena.se> On 2011-02-18 15:25, Gary Benson wrote: > Dr Andrew John Hughes wrote: >> On 12:20 Fri 18 Feb , Xerxes R?nby wrote: >>> When building icedtea6 with --enable-cacao on ARM then the build break with the error message: >>> >>> make[7]: *** No rule to make target `../../../../src/solaris/bin/arm/jvm.cfg', needed by `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-cacao/build/openjdk.build/lib/arm/jvm.cfg'. Stop. >>> >>> The CACAO maintainer Stefan Ring have found out that it are >>> possible to build CACAO on ARM if ICEDTEA_ZERO_BUILD gets sets >>> to true. >>> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 >>> >>> The attached patch unbreaks CACAO on ARM builds. >>> Ok to push? >> No. I think it should be fixed correctly, not just by enabling >> the zero build. Do you know if this is because something we do >> in IcedTea for zero? Or something in OpenJDK? > You need to create the file jdk/src/solaris/bin/arm/jvm.cfg before > building. The other platforms (zero included) have their own files > there. Setting ZERO_BUILD=true enables some logic that causes the > file to be copied from jdk/src/solaris/bin/zero/jvm.cfg rather than > jdk/src/solaris/bin/$(ARCH)/jvm.cfg. > > Cheers, > Gary > Thanks a lot Gary for pointing this missing file out and also thank you Andrew for the review! I have attached a new patch that simply creates the missing openjdk/jdk/src/solaris/bin/arm/jvm.cfg if BUILD_CACAO are defined. Ok to push? Cheers, Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: pr600.patch Type: text/x-patch Size: 3904 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110218/6ba50ded/pr600.patch From omajid at redhat.com Fri Feb 18 07:11:59 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 18 Feb 2011 10:11:59 -0500 Subject: Strange behaviour during javaws -about In-Reply-To: <4D5E8453.9050806@redhat.com> References: <4D5E8453.9050806@redhat.com> Message-ID: <4D5E8C3F.8030903@redhat.com> On 02/18/2011 09:38 AM, Jiri Vanek wrote: > Can you anybody check it? > https://bugzilla.redhat.com/show_bug.cgi?id=677334 > > regards J I wanted to thank you for bringing up issues that first-time users are likely to run into. First impressions are important and all your points are valid. Andrew Hughes may know more about this than I do, but I dont think we want to backport these changes to IcedTea6's netx - IcedTea6's netx is mostly receiving security fixes at this point. Most of the actual work is being done in icedtea-web. As such, I believe we should fix things in icedtea-web (only). Also, please be careful when making changes to files hosted on icedtea.classpath.org - the changes may break javaws. Please discuss things on this mailing list first. As for updating the things that javaws -about shows, that sounds like a great idea. Personally, I dont think running an online application for showing the about dialog is a great idea. A user using a particular version of icedtea-web would want to see information about that particular version (and not the version that just happens to be on icedtea.classpath.org). If anything, I think javaws -about should launch the local version about about. (This also takes care of the problem that we ship an about.jar that's completely unused!) As for security permissions, I agree that we should remove all-permissions it if it's not absolutely necessary. That said, I do think the permissions are required by the about application as it currently stands. extra/net/sourceforge/jnlp/about/Main.java contains these two lines: import net.sourceforge.jnlp.Launcher; import net.sourceforge.jnlp.runtime.JNLPRuntime; while JNLPRuntime executes these two lines before about.jnlp gets a chance to run: Security.setProperty("package.access", Security.getProperty("package.access")+",net.sourceforge.jnlp"); So I believe the about application will throw security exceptions on start if it does not have full permissions. Thanks again for raising these issues; even more for volunteering to fix them :) Cheers, Omair From jvanek at redhat.com Fri Feb 18 08:00:08 2011 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 18 Feb 2011 17:00:08 +0100 Subject: Strange behaviour during javaws -about In-Reply-To: <4D5E8C3F.8030903@redhat.com> References: <4D5E8453.9050806@redhat.com> <4D5E8C3F.8030903@redhat.com> Message-ID: <4D5E9788.4070408@redhat.com> On 02/18/2011 04:11 PM, Omair Majid wrote: > On 02/18/2011 09:38 AM, Jiri Vanek wrote: >> Can you anybody check it? >> https://bugzilla.redhat.com/show_bug.cgi?id=677334 >> >> regards J > > I wanted to thank you for bringing up issues that first-time users are > likely to run into. First impressions are important and all your points > are valid. > > Andrew Hughes may know more about this than I do, but I dont think we > want to backport these changes to IcedTea6's netx - IcedTea6's netx is > mostly receiving security fixes at this point. Most of the actual work > is being done in icedtea-web. As such, I believe we should fix things in > icedtea-web (only). true > > Also, please be careful when making changes to files hosted on > icedtea.classpath.org - the changes may break javaws. Please discuss > things on this mailing list first. > True. I wanted to check if my conclusions are usefull also in direct source and revert. But you were faster;) > As for updating the things that javaws -about shows, that sounds like a > great idea. > > Personally, I dont think running an online application for showing the > about dialog is a great idea. A user using a particular version of Exactly. This will be a little bit more work, but will bring just benefites. > icedtea-web would want to see information about that particular version > (and not the version that just happens to be on icedtea.classpath.org). > If anything, I think javaws -about should launch the local version about > about. (This also takes care of the problem that we ship an about.jar > that's completely unused!) Exactly! > > As for security permissions, I agree that we should remove > all-permissions it if it's not absolutely necessary. Will not be necessary in case of local jar. > That said, I do think the permissions are required by the about > application as it currently stands. > extra/net/sourceforge/jnlp/about/Main.java contains these two lines: > import net.sourceforge.jnlp.Launcher; > import net.sourceforge.jnlp.runtime.JNLPRuntime; > while JNLPRuntime executes these two lines before about.jnlp gets a > chance to run: Security.setProperty("package.access", > Security.getProperty("package.access")+",net.sourceforge.jnlp"); > So I believe the about application will throw security exceptions on > start if it does not have full permissions. I can not confirm it, but this is wired. I have really run the application without those rights and was running properly %-( > Thanks again for raising these issues; even more for volunteering to fix > them :) Looking forward to enjoy java progrmaming after some delay again;) > > Cheers, > Omair From omajid at icedtea.classpath.org Fri Feb 18 08:55:43 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Fri, 18 Feb 2011 16:55:43 +0000 Subject: /hg/icedtea-web: Remove pluginappletviewer binary Message-ID: changeset bee43070e71d in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=bee43070e71d author: Omair Majid date: Fri Feb 18 11:55:23 2011 -0500 Remove pluginappletviewer binary This changeset removes the unused pluginappletviewer binary from icedtea-web. IcedTeaPlugin.so invokes java directly. 2011-02-18 Omair Majid Remove pluginappletviewer binary * Makefile.am (ICEDTEAPLUGIN_TARGET): Remove dependency on pluginappletviewer. (PLUGIN_LAUNCHER_OBJECTS): Remove. (install-exec-local): Do not install pluginappletviewer. (uninstall-local): Do not remove pluginappletviewer. ($(PLUGIN_DIR)/launcher/%.o): Remove. ($(PLUGIN_DIR)/launcher/pluginappletviewer): Remove. (clean- IcedTeaPlugin): Dont clean plugin launcher files. diffstat: 2 files changed, 13 insertions(+), 17 deletions(-) ChangeLog | 12 ++++++++++++ Makefile.am | 18 +----------------- diffs (76 lines): diff -r 2289777074ae -r bee43070e71d ChangeLog --- a/ChangeLog Tue Feb 15 17:03:09 2011 -0500 +++ b/ChangeLog Fri Feb 18 11:55:23 2011 -0500 @@ -1,3 +1,15 @@ 2011-02-15 Omair Majid + + Remove pluginappletviewer binary + * Makefile.am + (ICEDTEAPLUGIN_TARGET): Remove dependency on pluginappletviewer. + (PLUGIN_LAUNCHER_OBJECTS): Remove. + (install-exec-local): Do not install pluginappletviewer. + (uninstall-local): Do not remove pluginappletviewer. + ($(PLUGIN_DIR)/launcher/%.o): Remove. + ($(PLUGIN_DIR)/launcher/pluginappletviewer): Remove. + (clean-IcedTeaPlugin): Dont clean plugin launcher files. + 2011-02-15 Omair Majid * netx/net/sourceforge/jnlp/util/TimedHashMap.java: Do not extend HashMap diff -r 2289777074ae -r bee43070e71d Makefile.am --- a/Makefile.am Tue Feb 15 17:03:09 2011 -0500 +++ b/Makefile.am Fri Feb 18 11:55:23 2011 -0500 @@ -39,8 +39,7 @@ PLUGIN_DIR=$(abs_top_builddir)/plugin/ic PLUGIN_DIR=$(abs_top_builddir)/plugin/icedteanp PLUGIN_SRCDIR=$(abs_top_srcdir)/plugin/icedteanp LIVECONNECT_SRCS = $(PLUGIN_SRCDIR)/java -ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp \ - $(PLUGIN_DIR)/launcher/pluginappletviewer +ICEDTEAPLUGIN_TARGET = $(PLUGIN_DIR)/IcedTeaPlugin.so stamps/liveconnect-dist.stamp PLUGIN_PKGS = sun.applet netscape.security netscape.javascript endif @@ -66,7 +65,6 @@ endif LAUNCHER_SRCDIR = $(abs_top_srcdir)/launcher LAUNCHER_OBJECTS = java.o java_md.o splashscreen_stubs.o jli_util.o parse_manifest.o version_comp.o wildcard.o -PLUGIN_LAUNCHER_OBJECTS = $(addprefix $(PLUGIN_DIR)/launcher/,$(LAUNCHER_OBJECTS)) NETX_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/,$(LAUNCHER_OBJECTS)) CONTROLPANEL_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/controlpanel/,$(LAUNCHER_OBJECTS)) LAUNCHER_FLAGS = -O2 -fno-strict-aliasing -fPIC -pthread -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer \ @@ -99,7 +97,6 @@ install-exec-local: ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR) if ENABLE_PLUGIN ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/ - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/launcher/pluginappletviewer $(DESTDIR)$(bindir) ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar endif ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar @@ -150,7 +147,6 @@ uninstall-local: rm -f $(DESTDIR)$(prefix)/jre/lib/about.jnlp rm -f $(DESTDIR)$(prefix)/jre/lib/about.jar rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1 - rm -f $(DESTDIR)$(bindir)/pluginappletviewer rm -f $(DESTDIR)$(bindir)/javaws if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ @@ -201,19 +197,7 @@ PLUGIN_OBJECTS=IcedTeaNPPlugin.o IcedTea $(MOZILLA_LIBS)\ -shared -o $@ -$(PLUGIN_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c - mkdir -p $(PLUGIN_DIR)/launcher && \ - $(CC) $(LAUNCHER_FLAGS) -DJAVA_ARGS='{ "sun.applet.PluginMain" }' -DPROGNAME='"pluginappletviewer"' -c -o $@ $< - -$(PLUGIN_DIR)/launcher/pluginappletviewer: $(PLUGIN_LAUNCHER_OBJECTS) - $(CC) $(PLUGIN_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) - clean-IcedTeaPlugin: - rm -f $(PLUGIN_DIR)/launcher/*.o - rm -f $(PLUGIN_DIR)/launcher/pluginappletviewer - if [ -e $(PLUGIN_DIR)/launcher ]; then \ - rmdir $(PLUGIN_DIR)/launcher ; \ - fi rm -f $(PLUGIN_DIR)/*.o rm -f $(PLUGIN_DIR)/IcedTeaPlugin.so if [ $(abs_top_srcdir) != $(abs_top_builddir) ]; then \ From omajid at redhat.com Fri Feb 18 08:56:24 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 18 Feb 2011 11:56:24 -0500 Subject: [icedtea-web] RFC: remove pluginappletviewer binary In-Reply-To: <20110217235132.GE27039@rivendell.middle-earth.co.uk> References: <4D52AE82.20605@redhat.com> <20110217235132.GE27039@rivendell.middle-earth.co.uk> Message-ID: <4D5EA4B8.7050106@redhat.com> On 02/17/2011 06:51 PM, Dr Andrew John Hughes wrote: > On 10:10 Wed 09 Feb , Omair Majid wrote: >> The attached patch removes the pluginappletviewer binary from >> icedtea-web. Okay to commit? >> > > Approved! Thanks for reviewing the patch. Cheers, Omair From bugzilla-daemon at icedtea.classpath.org Fri Feb 18 09:04:45 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 18 Feb 2011 17:04:45 +0000 Subject: [Bug 635] New: zero fails to build on icedtea6 trunk 20110217 with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=635 Summary: zero fails to build on icedtea6 trunk 20110217 with hs20 Product: IcedTea Version: 6-hg Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Zero AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com when configured to build with hs20: Compiling /scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/cpu/zero/vm/assembler_zero.cpp rm -f assembler_zero.o g++-4.5 -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DIA32 -DZERO_LIBARCH=\"i386\" -DPRODUCT -I. -I/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/share/vm -I/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/share/vm/prims -I/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/cpu/zero/vm -I/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/os/linux/vm -I/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/os_cpu/linux_zero/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"20.0-b07\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"doko\"" -DHOTSPOT_LIB_ARCH=\"i386\" -DJRE_RELEASE_VERSION="\"1.6.0_21-b21\"" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DDERIVATIVE_ID="\"IcedTea6 1.10pre\"" -DDISTRIBUTION_ID="\"Ubuntu natty (development branch), package 6b21~pre2-0ubuntu1\"" -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_zero -DTARGET_ARCH_MODEL_zero -DTARGET_OS_ARCH_linux_zero -DTARGET_OS_ARCH_MODEL_linux_zero -DTARGET_COMPILER_gcc -DSHARK -I/usr/lib/llvm-2.7/include -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DSHARK_LLVM_VERSION=27 -fpic -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -m32 -pipe -g -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -Werror -Wpointer-arith -Wsign-compare -c -MMD -MP -MF ../generated/dependencies/assembler_zero.o.d -o assembler_zero.o /scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/cpu/zero/vm/assembler_zero.cpp /scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/src/cpu/zero/vm/asm_helper.cpp:25:47: fatal error: incls/_bytecodeInterpreter.cpp.incl: No such file or directory compilation terminated. make[9]: *** [asm_helper.o] Error 1 make[9]: *** Waiting for unfinished jobs.... make[9]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk.build/hotspot/outputdir/linux_i486_shark/product' make[8]: *** [the_vm] Error 2 make[8]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk.build/hotspot/outputdir/linux_i486_shark/product' make[7]: *** [productshark] Error 2 make[7]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk.build/hotspot/outputdir' make[6]: *** [generic_buildshark] Error 2 make[6]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/make' make[5]: *** [productshark] Error 2 make[5]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk/hotspot/make' make[4]: *** [hotspot-build] Error 2 make[4]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk' make[3]: *** [build_product_image] Error 2 make[3]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm/openjdk' make[2]: *** [stamps/icedtea.stamp] Error 2 make[2]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build/zerovm' make[1]: *** [stamps/add-zero.stamp] Error 2 make[1]: Leaving directory `/scratch/packages/openjdk/b21/openjdk-6-6b21~pre2/build' make: *** [stamps/build] Error 1 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Feb 18 09:05:29 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 18 Feb 2011 17:05:29 +0000 Subject: [Bug 635] zero fails to build on icedtea6 trunk 20110217 with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=635 ------- Comment #1 from doko at ubuntu.com 2011-02-18 17:05 ------- no, not specific to --with-additional-vms -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Feb 18 09:26:14 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 18 Feb 2011 17:26:14 +0000 Subject: [Bug 600] HS19 upgrade broke CACAO build on ARM Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 ------- Comment #2 from xerxes at zafena.se 2011-02-18 17:26 ------- Hi I have posted a patch to this bug for review at: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012132.html Cheers Xerxes -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From omajid at redhat.com Fri Feb 18 11:36:25 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 18 Feb 2011 14:36:25 -0500 Subject: [icedtea-web] RFC: do not install netx.jar and plugin.jar into jdk dir In-Reply-To: <20110218002333.GF27039@rivendell.middle-earth.co.uk> References: <4D5D9585.1030405@redhat.com> <20110217220036.GA27039@rivendell.middle-earth.co.uk> <4D5DA929.4020604@redhat.com> <20110218002333.GF27039@rivendell.middle-earth.co.uk> Message-ID: <4D5ECA39.70509@redhat.com> On 02/17/2011 07:23 PM, Dr Andrew John Hughes wrote: > On 18:03 Thu 17 Feb , Omair Majid wrote: >> On 02/17/2011 05:00 PM, Dr Andrew John Hughes wrote: >>> On 16:39 Thu 17 Feb , Omair Majid wrote: >>>> I have removed the pluginappletviewer binary. I had originally posted it >>>> a separate patch, but since using pluginappletviewer would make this >>>> patch more complex, I have removed it here. >>>> >>> >>> Please do this in a separate patch prior to this. The two issues shouldn't >>> be confused. >>> >> >> I posted the patch already: >> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012010.html. >> If you can approve it, I will remove pluginappletviewer before applying >> this patch. >> Thanks for approving the pluginappletviewer patch. The updated patch now assumes pluginappletviewer does not exist. >>>> Currently, the jdk it uses to run is determined at build-time. In the >>>> future, this will probably be changed so that icedtea-web will be able >>>> to use any installed jdk. >>>> >>> >>> Yeah I pondered this when reading the patch. What is wrong with just calling >>> 'java'? >>> >> >> Well, we do rely on certain API's that may not be present on all JDKs. >> The configure checks are build time; so for now, the JRE to use is also >> determined at build time. >> >> It's also in the interest of minimizing changes in this one patch. I am >> quite sure most of the launcher code can be replaced by simple shell >> scripts (or a simple call to java even). But that's for another patch. >> > > Yes, I agree. > Great. I will avoid making large changes to the way the launcher works for now then. >>> I seem to remember there were some issues with libjava not being found if 1.0 >>> was installed in the wrong location and this was due to a relative LD_LIBRARY_PATH >>> extension. I don't see this fixed. Do the new binaries work with just this >>> patch? >>> >> >> Hm.. no clue about the LD_LIBRARY_PATH issues. The binaries/plugin >> produced after building icedtea-web with this patch applied (I used >> ./configure --prefix=/home/omajid/code/icedtea-web-build/ >> --with-jdk-home=/home/omajid/code/icedtea6/openjdk.build/j2sdk-image/ >> --disable-docs) work perfectly fine for me. >> >> I did encounter an issue with libjava.so not being found. The method >> GetIcedTeaWebJREPath fixes that. It uses the predefined path at build >> time to locate the JRE rather than weird things like looking in the >> directory above. > > Ok, that's the issue I was thinking of. > Ah, I see what you mean now. The launcher extends LD_LIBRAY_PATH using the result of GetJREPath (now GetIcedTeaWebJREPath). >> >>>> Any thoughts or comments on the patch? >>>> >>> >>> More inline. >>> >>> >>>> diff -r 2289777074ae launcher/java_md.c >>>> --- a/launcher/java_md.c Tue Feb 15 17:03:09 2011 -0500 >>>> +++ b/launcher/java_md.c Thu Feb 17 16:33:53 2011 -0500 >>>> @@ -158,6 +158,7 @@ >>>> static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, >>>> char *jvmpath, jint jvmpathsize, char * arch); >>>> static jboolean GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative); >>>> +static jboolean GetIcedTeaWebJREPath(char *path, jint pathsize, char * arch, jboolean speculative); >>>> >>>> const char * >>>> GetArch() >>>> @@ -280,7 +281,9 @@ >>>> jvmpath does not exist */ >>>> if (wanted == running) { >>>> /* Find out where the JRE is that we will be using. */ >>>> - if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { >>>> + >>>> + //if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { >>>> + if (!GetIcedTeaWebJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { >>> >>> Please just remove the line. >>> >> >> Will do. >> Done. >>>> fprintf(stderr, "Error: could not find Java 2 Runtime Environment.\n"); >>>> exit(2); >>>> } >>>> @@ -606,6 +609,33 @@ >>>> } >>>> >>>> /* >>>> + * Find path to the JRE based on the the compile flag ICEDTEA_WEB_JRE >>>> + */ >>>> +static jboolean >>>> +GetIcedTeaWebJREPath(char* path, jint pathsize, char* arch, jboolean speculative) >>>> +{ >>>> + char libjava[MAXPATHLEN]; >>>> + snprintf(libjava, MAXPATHLEN, ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL, arch); >>>> + >>>> + if (_launcher_debug) { >>>> + printf(ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL "\n", arch); >>>> + printf("libjava is %s\n", libjava); >>>> + } >>>> + >>> >>> Why is libjava being checked? Is this needed? I'm not sure it's standard and may >>> be specified to Oracle JDKs. >>> >> >> I wouldnt be surprised. The launcher code is fairly specific to OpenJDK. >> Most of the code in this method is based on GetJREPath (which is the >> method just below this one). The only significant change is where to >> look for libjava - this method looks for it based on a compile time >> constant; GetJREPath looks for it in the same directory as the binary. >> > > I presume we could instead look for something more 'standard' like rt.jar? > Yes, but again, I would like to avoid modifying the launcher as much as possible. The launcher needs to find libjava as it handles selection of the appropriate JVM - it understands options like -d32/-d64 (and so needs to check that the libjava.so file exists for the right environment). As mentioned above, I would like to remove this but that would be another patch. >>>> + if (access(libjava, F_OK) == 0) { >>>> + strncpy(path, ICEDTEA_WEB_JRE, pathsize); >>>> + goto found; >>>> + } >>>> + >>>> + return JNI_FALSE; >>>> + >>>> + found: >>>> + if (_launcher_debug) >>>> + printf("JRE path is %s\n", path); >>>> + return JNI_TRUE; >>>> +} >>>> + >>>> +/* >>>> * Find path to JRE based on .exe's location or registry settings. >>>> */ >>>> static jboolean >>>> diff -r 2289777074ae plugin/icedteanp/IcedTeaNPPlugin.cc >>>> --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Feb 15 17:03:09 2011 -0500 >>>> +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Thu Feb 17 16:33:53 2011 -0500 >>>> @@ -1547,23 +1547,25 @@ >>>> >>>> if (plugin_debug) >>>> { >>>> - command_line = (gchar**) malloc(sizeof(gchar*)*8); >>>> + command_line = (gchar**) malloc(sizeof(gchar*)*9); >>>> command_line[0] = g_strdup(appletviewer_executable); >>>> - command_line[1] = g_strdup("-Xdebug"); >>>> - command_line[2] = g_strdup("-Xnoagent"); >>>> - command_line[3] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); >>>> - command_line[4] = g_strdup("sun.applet.PluginMain"); >>>> - command_line[5] = g_strdup(out_pipe_name); >>>> - command_line[6] = g_strdup(in_pipe_name); >>>> - command_line[7] = NULL; >>>> + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); >>>> + command_line[2] = g_strdup("-Xdebug"); >>>> + command_line[3] = g_strdup("-Xnoagent"); >>>> + command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); >>>> + command_line[5] = g_strdup("sun.applet.PluginMain"); >>>> + command_line[6] = g_strdup(out_pipe_name); >>>> + command_line[7] = g_strdup(in_pipe_name); >>>> + command_line[8] = NULL; >>>> } else >>>> { >>>> - command_line = (gchar**) malloc(sizeof(gchar*)*5); >>>> + command_line = (gchar**) malloc(sizeof(gchar*)*6); >>>> command_line[0] = g_strdup(appletviewer_executable); >>>> - command_line[1] = g_strdup("sun.applet.PluginMain"); >>>> - command_line[2] = g_strdup(out_pipe_name); >>>> - command_line[3] = g_strdup(in_pipe_name); >>>> - command_line[4] = NULL; >>>> + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); >>>> + command_line[2] = g_strdup("sun.applet.PluginMain"); >>>> + command_line[3] = g_strdup(out_pipe_name); >>>> + command_line[4] = g_strdup(in_pipe_name); >>>> + command_line[5] = NULL; >>>> } >>>> >>>> environment = plugin_filter_environment(); >>>> @@ -1590,17 +1592,21 @@ >>>> command_line[0] = NULL; >>>> g_free (command_line[1]); >>>> command_line[1] = NULL; >>>> + g_free (command_line[2]); >>>> + command_line[2] = NULL; >>>> + g_free (command_line[3]); >>>> + command_line[3] = NULL; >>>> + g_free (command_line[4]); >>>> + command_line[4] = NULL; >>>> >>>> if (plugin_debug) >>>> { >>>> - g_free (command_line[2]); >>>> - command_line[2] = NULL; >>>> - g_free (command_line[3]); >>>> - command_line[3] = NULL; >>>> - g_free (command_line[4]); >>>> - command_line[4] = NULL; >>>> g_free (command_line[5]); >>>> command_line[5] = NULL; >>>> + g_free (command_line[6]); >>>> + command_line[6] = NULL; >>>> + g_free (command_line[7]); >>>> + command_line[7] = NULL; >>>> } >>>> >>>> g_free(command_line); >>>> @@ -2173,38 +2179,10 @@ >>>> } >>>> >>>> // Set appletviewer_executable. >>>> - Dl_info info; >>>> - int filename_size; >>>> - if (dladdr ((const void*) ITNP_New,&info) == 0) >>>> - { >>>> - PLUGIN_ERROR_TWO ("Failed to determine plugin shared object filename", >>>> - dlerror ()); >>>> - np_error = NPERR_GENERIC_ERROR; >>>> - goto cleanup_data_directory; >>>> - } >>>> - filename = (gchar*) malloc(sizeof(gchar)*1024); >>>> - filename_size = readlink(info.dli_fname, filename, 1023); >>>> - if (filename_size>= 0) >>>> - { >>>> - filename[filename_size] = '\0'; >>>> - } >>>> - >>>> - if (!filename) >>>> - { >>>> - PLUGIN_ERROR ("Failed to create plugin shared object filename."); >>>> - np_error = NPERR_OUT_OF_MEMORY_ERROR; >>>> - goto cleanup_data_directory; >>>> - } >>>> - >>>> - if (filename_size<= 0) >>>> - { >>>> - free(filename); >>>> - filename = g_strdup(info.dli_fname); >>>> - } >>>> - >>>> - appletviewer_executable = g_strdup_printf ("%s/../../bin/java", >>>> - dirname (filename)); >>>> - PLUGIN_DEBUG(".so is located at: %s and the link points to: %s. Executing java from dir %s to run %s\n", info.dli_fname, filename, dirname (filename), appletviewer_executable); >>>> + filename = g_strdup(ICEDTEA_WEB_JRE); >>>> + appletviewer_executable = g_strdup_printf ("%s/bin/java", >>>> + filename); >>>> + PLUGIN_DEBUG("Executing java at %s\n", appletviewer_executable); >>>> if (!appletviewer_executable) >>>> { >>>> PLUGIN_ERROR ("Failed to create appletviewer executable name."); >>> >>> >> >> Thanks for looking over the patch! >> Ok to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: do-not-install-into-jdk-02.patch Type: text/x-patch Size: 11428 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110218/73fa3e28/do-not-install-into-jdk-02.patch From omajid at redhat.com Fri Feb 18 11:58:08 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 18 Feb 2011 14:58:08 -0500 Subject: [Review][IcedTea-Web]: Add tracing to itw In-Reply-To: <1124998606.64615.1295629017350.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <1124998606.64615.1295629017350.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <4D5ECF50.6090508@redhat.com> Hi, I talked to Andrew Su offline about this (a while ago actually), so this is mostly for the list. On 01/21/2011 11:56 AM, Andrew Su wrote: > Here is a patch to add some tracing to indicate which part of the > plugin is being executed at the moment. There are still some more > places to add the traces to, so it's only a preview to see if there > are any objections to how it's being done. > I don't think this is the right approach at all. As far as I know, the only place where tracing is (supposed to be?) visible to a user (using the proprietary plugin) is through the Java Console. This patch makes it so that tracing and our Java Console don't mix. A much simpler solution, IMHO is to simply fix the existing debug statements and add new ones where appropriate. The Java Console shows the debug statements just fine; they will simply double as trace statements too. Thanks, Omair From ahughes at redhat.com Fri Feb 18 15:56:20 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 18 Feb 2011 23:56:20 +0000 Subject: [icedtea-web] RFC: do not install netx.jar and plugin.jar into jdk dir In-Reply-To: <4D5ECA39.70509@redhat.com> References: <4D5D9585.1030405@redhat.com> <20110217220036.GA27039@rivendell.middle-earth.co.uk> <4D5DA929.4020604@redhat.com> <20110218002333.GF27039@rivendell.middle-earth.co.uk> <4D5ECA39.70509@redhat.com> Message-ID: <20110218235620.GA13108@rivendell.middle-earth.co.uk> On 14:36 Fri 18 Feb , Omair Majid wrote: > Ok to commit? > Go for it! Looks a good start. > Cheers, > Omair -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Fri Feb 18 16:01:46 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Sat, 19 Feb 2011 00:01:46 +0000 Subject: Strange behaviour during javaws -about In-Reply-To: <4D5E8C3F.8030903@redhat.com> References: <4D5E8453.9050806@redhat.com> <4D5E8C3F.8030903@redhat.com> Message-ID: <20110219000146.GB13108@rivendell.middle-earth.co.uk> On 10:11 Fri 18 Feb , Omair Majid wrote: > On 02/18/2011 09:38 AM, Jiri Vanek wrote: > > Can you anybody check it? > > https://bugzilla.redhat.com/show_bug.cgi?id=677334 > > > > regards J > > I wanted to thank you for bringing up issues that first-time users are > likely to run into. First impressions are important and all your points > are valid. > > Andrew Hughes may know more about this than I do, but I dont think we > want to backport these changes to IcedTea6's netx - IcedTea6's netx is > mostly receiving security fixes at this point. Most of the actual work > is being done in icedtea-web. As such, I believe we should fix things in > icedtea-web (only). > That sounds sensible to me. We want to try and push people (politely) towards IcedTea-Web :-D 1.10 will ship soon without any NetX & plugin stuff and we plan to disable them by default in the existing release branches. > Also, please be careful when making changes to files hosted on > icedtea.classpath.org - the changes may break javaws. Please discuss > things on this mailing list first. > > As for updating the things that javaws -about shows, that sounds like a > great idea. > > Personally, I dont think running an online application for showing the > about dialog is a great idea. A user using a particular version of > icedtea-web would want to see information about that particular version > (and not the version that just happens to be on icedtea.classpath.org). > If anything, I think javaws -about should launch the local version about > about. (This also takes care of the problem that we ship an about.jar > that's completely unused!) > Yes, the current situation seemed very odd to me when you told me about it. Apart from the things you already mention, it presumably means javaws -about fails when there is no Internet connectivity! > As for security permissions, I agree that we should remove > all-permissions it if it's not absolutely necessary. > > That said, I do think the permissions are required by the about > application as it currently stands. > extra/net/sourceforge/jnlp/about/Main.java contains these two lines: > import net.sourceforge.jnlp.Launcher; > import net.sourceforge.jnlp.runtime.JNLPRuntime; > while JNLPRuntime executes these two lines before about.jnlp gets a > chance to run: Security.setProperty("package.access", > > Security.getProperty("package.access")+",net.sourceforge.jnlp"); > So I believe the about application will throw security exceptions on > start if it does not have full permissions. > What is the point of these statements? What do they do as part of the about box? I would have thought, naively, it was just displaying text in a dialog box. > Thanks again for raising these issues; even more for volunteering to fix > them :) > Yes, thanks. Having fresh eyes on something always helps! > Cheers, > Omair Cheers, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Fri Feb 18 16:05:26 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sat, 19 Feb 2011 00:05:26 +0000 Subject: [Bug 635] zero fails to build on icedtea6 trunk 20110217 with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=635 ------- Comment #2 from gnu_andrew at member.fsf.org 2011-02-19 00:05 ------- I think the IncludeDB changes are in hs20 if that helps. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Fri Feb 18 16:08:23 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Sat, 19 Feb 2011 00:08:23 +0000 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <4D5E8C31.2080705@zafena.se> References: <4D5E55F3.4090801@zafena.se> <20110218132244.GA30037@rivendell.middle-earth.co.uk> <20110218142556.GB4652@redhat.com> <4D5E8C31.2080705@zafena.se> Message-ID: <20110219000823.GC13108@rivendell.middle-earth.co.uk> On 16:11 Fri 18 Feb , Xerxes R?nby wrote: > On 2011-02-18 15:25, Gary Benson wrote: > > Dr Andrew John Hughes wrote: > >> On 12:20 Fri 18 Feb , Xerxes R?nby wrote: > >>> When building icedtea6 with --enable-cacao on ARM then the build break with the error message: > >>> > >>> make[7]: *** No rule to make target `../../../../src/solaris/bin/arm/jvm.cfg', needed by `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-cacao/build/openjdk.build/lib/arm/jvm.cfg'. Stop. > >>> > >>> The CACAO maintainer Stefan Ring have found out that it are > >>> possible to build CACAO on ARM if ICEDTEA_ZERO_BUILD gets sets > >>> to true. > >>> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 > >>> > >>> The attached patch unbreaks CACAO on ARM builds. > >>> Ok to push? > >> No. I think it should be fixed correctly, not just by enabling > >> the zero build. Do you know if this is because something we do > >> in IcedTea for zero? Or something in OpenJDK? > > You need to create the file jdk/src/solaris/bin/arm/jvm.cfg before > > building. The other platforms (zero included) have their own files > > there. Setting ZERO_BUILD=true enables some logic that causes the > > file to be copied from jdk/src/solaris/bin/zero/jvm.cfg rather than > > jdk/src/solaris/bin/$(ARCH)/jvm.cfg. > > > > Cheers, > > Gary > > > Thanks a lot Gary for pointing this missing file out and also thank you Andrew for the review! > I have attached a new patch that simply creates the missing openjdk/jdk/src/solaris/bin/arm/jvm.cfg if BUILD_CACAO are defined. > > Ok to push? > Ok by me. Out of interest, do you know if hs20 now also works? > Cheers, > Xerxes > Index: icedtea6/ChangeLog > =================================================================== > --- icedtea6.orig/ChangeLog 2011-02-18 15:26:52.000000000 +0100 > +++ icedtea6/ChangeLog 2011-02-18 15:38:09.000000000 +0100 > @@ -1,3 +1,11 @@ > +2011-02-18 Xerxes Ranby > + > + PR600: HS19 upgrade broke CACAO build on ARM > + * Makefile.am (ICEDTEA_PATCHES): > + Add patch if BUILD_CACAO are defined. > + * NEWS: Updated. > + * patches/cacao/arm-jvm.cfg-pr600.patch > + > 2011-02-18 Pavel Tisnovsky > > * Makefile.am: Updated. > Index: icedtea6/Makefile.am > =================================================================== > --- icedtea6.orig/Makefile.am 2011-02-18 15:34:45.000000000 +0100 > +++ icedtea6/Makefile.am 2011-02-18 15:36:33.000000000 +0100 > @@ -326,7 +326,8 @@ > patches/cacao/launcher.patch \ > patches/cacao/arm-arch-defines.patch \ > patches/cacao/jsig.patch \ > - patches/cacao/memory.patch > + patches/cacao/memory.patch \ > + patches/cacao/arm-jvm.cfg-pr600.patch > endif > > if WITH_CACAO > Index: icedtea6/NEWS > =================================================================== > --- icedtea6.orig/NEWS 2011-02-18 15:31:30.000000000 +0100 > +++ icedtea6/NEWS 2011-02-18 15:33:14.000000000 +0100 > @@ -426,6 +426,7 @@ > - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails > * Bug fixes > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > + - PR600: HS19 upgrade broke CACAO build on ARM > - PR616, PR99: Don't statically link libstdc++ or libgcc > - PR632: patches/security/20110215/6878713.patch breaks shark zero build > > Index: icedtea6/patches/cacao/arm-jvm.cfg-pr600.patch > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ icedtea6/patches/cacao/arm-jvm.cfg-pr600.patch 2011-02-18 15:39:29.000000000 +0100 > @@ -0,0 +1,44 @@ > +Index: openjdk/jdk/src/solaris/bin/arm/jvm.cfg > +=================================================================== > +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 > ++++ openjdk/jdk/src/solaris/bin/arm/jvm.cfg 2011-02-18 15:40:24.083043645 +0100 > +@@ -0,0 +1,39 @@ > ++# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. > ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++# > ++# This code is free software; you can redistribute it and/or modify it > ++# under the terms of the GNU General Public License version 2 only, as > ++# published by the Free Software Foundation. Oracle designates this > ++# particular file as subject to the "Classpath" exception as provided > ++# by Oracle in the LICENSE file that accompanied this code. > ++# > ++# This code is distributed in the hope that it will be useful, but WITHOUT > ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++# version 2 for more details (a copy is included in the LICENSE file that > ++# accompanied this code). > ++# > ++# You should have received a copy of the GNU General Public License version > ++# 2 along with this work; if not, write to the Free Software Foundation, > ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++# > ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++# or visit www.oracle.com if you need additional information or have any > ++# questions. > ++# > ++# > ++# List of JVMs that can be used as an option to java, javac, etc. > ++# Order is important -- first in this list is the default JVM. > ++# NOTE that this both this file and its format are UNSUPPORTED and > ++# WILL GO AWAY in a future release. > ++# > ++# You may also select a JVM in an arbitrary location with the > ++# "-XXaltjvm=" option, but that too is unsupported > ++# and may not be available in a future release. > ++# > ++-server KNOWN > ++-client IGNORE > ++-hotspot ERROR > ++-classic WARN > ++-native ERROR > ++-green ERROR -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From doko at ubuntu.com Fri Feb 18 18:52:37 2011 From: doko at ubuntu.com (Matthias Klose) Date: Sat, 19 Feb 2011 03:52:37 +0100 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <20110219000823.GC13108@rivendell.middle-earth.co.uk> References: <4D5E55F3.4090801@zafena.se> <20110218132244.GA30037@rivendell.middle-earth.co.uk> <20110218142556.GB4652@redhat.com> <4D5E8C31.2080705@zafena.se> <20110219000823.GC13108@rivendell.middle-earth.co.uk> Message-ID: <4D5F3075.5000704@ubuntu.com> On 19.02.2011 01:08, Dr Andrew John Hughes wrote: > Ok by me. Out of interest, do you know if hs20 now also works? hs20 zero seems to fail to build on any arch. see #635. From xerxes at zafena.se Sat Feb 19 12:20:40 2011 From: xerxes at zafena.se (Xerxes Ranby) Date: Sat, 19 Feb 2011 21:20:40 +0100 Subject: RFC: JamVM - Taste the New Flavour! Message-ID: <4D602618.9000401@zafena.se> Greetings! "JamVM's got a shiny new Git repository, which contains the port to the OpenJDK class-library." http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! I have tested the patch using the following three configurations on x86_64: # Built JamVM as the default vm implicit using HS19 makefiles. ./configure --enable-jamvm --disable-bootstrap --disable-docs make ./openjdk.build/j2sdk-image/bin/java -version java version "1.6.0_21" OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu build 1.6.0_21-b21) JamVM (build 1.6.0-devel, inline-threaded interpreter) # Built JamVM as the default vm explicit using HS20 makefiles. ./configure --enable-jamvm --disable-bootstrap --disable-docs --with-hotspot-build=hs20 make ./openjdk.build/j2sdk-image/bin/java -version java version "1.6.0_21" OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu build 1.6.0_21-b21) JamVM (build 1.6.0-devel, inline-threaded interpreter) # Built JamVM as an additional vm. ./configure --with-additional-vms=jamvm --disable-bootstrap --disable-docs make ./openjdk.build/j2sdk-image/bin/java -jamvm -version java version "1.6.0_21" OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu build 1.6.0_21-b21) JamVM (build 1.6.0-devel, inline-threaded interpreter) Ok to push? Cheers, and have a great day! Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: jamvm.19feb.patch Type: text/x-patch Size: 14057 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110219/b0830962/jamvm.19feb.patch From xerxes at zafena.se Sat Feb 19 14:22:36 2011 From: xerxes at zafena.se (Xerxes Ranby) Date: Sat, 19 Feb 2011 23:22:36 +0100 Subject: RFC: JamVM - Taste the New Flavour! - Implementation comments In-Reply-To: <4D602618.9000401@zafena.se> References: <4D602618.9000401@zafena.se> Message-ID: <4D6042AC.3050904@zafena.se> On 2011-02-19 21:20, Xerxes Ranby wrote: > Greetings! > > "JamVM's got a shiny new Git repository, which contains the port to > the OpenJDK class-library." > http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html > > The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! > Some comments to various parts of the patch while i have it fresh in my mind: The patch mimics how CACAO got integrated into IcedTea6. When creating the patch I decided to only implement two ways of configuring IcedTea6 to use jamvm namely --enable-jamvm and --with-additional-vms=jamvm ########## Implementation notes of the --enable-jamvm option --enable-jamvm This configure option makes the IcedTea6 build use the OpenJDK ALT_HOTSPOT_IMPORT_PATH variable to install JamVM as the default VM of the build. The only problem by using the ALT_HOTSPOT_IMPORT_PATH functionality to import JamVM are that the OpenJDK makefiles assumes that some hotspot specific files and one architecture-name-dependent folder exist in the import path: jre/lib/amd64/libjsig.so jre/lib/amd64/server/libjvm.so jre/lib/amd64/server/Xusage.txt jre/lib/amd64/client JamVM itself only needs and builds the libjvm.so file. The way I solved this was to transform the JamVM install path into what looked like a hotspot import path by adding empty files for libjsig.so and Xusage.txt and create the needed directory structure, like this: +stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp +if BUILD_JAMVM + cd jamvm/jamvm&& \ + ./autogen.sh --with-java-runtime-library=openjdk \ + --prefix=$(abs_top_builddir)/jamvm/install ; \ + $(MAKE) ; \ + $(MAKE) install + mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server + cp $(abs_top_builddir)/jamvm/install/lib/libjvm.so $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server + ln -s server $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/client + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so +endif ########## Implementation notes of the --with-additional-vms=jamvm option --with-additional-vms=jamvm This configure option makes the IcedTea6 build inserts JamVM as one additional vm of hotspot. JamVM gets installed in its own folder jamvm next to the regular Hotspot server and client folders. jvm.cfg files gets updated so that jamvm can get started by running java -jamvm implemented like this: +stamps/add-jamvm.stamp: stamps/icedtea.stamp stamps/jamvm.stamp +if ADD_JAMVM_BUILD + mkdir -p $(BUILD_JRE_ARCH_DIR)/jamvm + install -m 644 jamvm/install/lib/libjvm.so \ + $(BUILD_JRE_ARCH_DIR)/jamvm/ + printf -- '-jamvm KNOWN\n'>> $(BUILD_JRE_ARCH_DIR)/jvm.cfg +else This way are in my opinion the cleanest way to install JamVM into OpenJDK. ########## Comments to the rest of the patch ? I have to write a proper ChangeLog that mention all added macros and defines. Not much to say mostly autoconf related... The rest of the patch makes sure that the new configure options are available, sees that JamVM gets downloaded and extracted and also it makes sure that the jvm.cfg gets updated correctly dependent on which configure option are used. A special note, In Makefile.am .PHONY target: @@ -582,8 +604,10 @@ clean-icedtea icedtea-against-icedtea clean-icedtea-ecj \ clean-tools-jar clean-copy clean-rt hotspot \ hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \ - clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug - clean-icedtea-against-ecj clean-cacao clean-add-cacao clean-add-cacao-debug \ + clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug \ + clean-icedtea-against-ecj \ + clean-jamvm clean-add-jamvm clean-add-jamvm-debug \ + clean-cacao clean-add-cacao clean-add-cacao-debug \ clean-ports clean-overlay clean-extract-ecj clean-extract clean-extract-openjdk \ clean-replace-hotspot clean-generated clean-download clean-hgforest clean-download-openjdk \ clean-rewriter clean-rewrite-rhino clean-add-systemtap clean-add-systemtap-debug \ While adding all clean*jamvm targets to this part i noticed a missing \ after clean-icedtea-debug so i added it. I hope this change makes the make clean target better. Cheers Xerxes -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110219/22c4513a/attachment.html From xerxes at zafena.se Sun Feb 20 11:06:45 2011 From: xerxes at zafena.se (Xerxes Ranby) Date: Sun, 20 Feb 2011 20:06:45 +0100 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <20110219000823.GC13108@rivendell.middle-earth.co.uk> References: <4D5E55F3.4090801@zafena.se> <20110218132244.GA30037@rivendell.middle-earth.co.uk> <20110218142556.GB4652@redhat.com> <4D5E8C31.2080705@zafena.se> <20110219000823.GC13108@rivendell.middle-earth.co.uk> Message-ID: <4D616645.5060900@zafena.se> On 2011-02-19 01:08, Dr Andrew John Hughes wrote: > On 16:11 Fri 18 Feb , Xerxes R?nby wrote: > >> On 2011-02-18 15:25, Gary Benson wrote: >> >>> Dr Andrew John Hughes wrote: >>> >>>> On 12:20 Fri 18 Feb , Xerxes R?nby wrote: >>>> >>>>> When building icedtea6 with --enable-cacao on ARM then the build break with the error message: >>>>> >>>>> make[7]: *** No rule to make target `../../../../src/solaris/bin/arm/jvm.cfg', needed by `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-cacao/build/openjdk.build/lib/arm/jvm.cfg'. Stop. >>>>> >>>>> The CACAO maintainer Stefan Ring have found out that it are >>>>> possible to build CACAO on ARM if ICEDTEA_ZERO_BUILD gets sets >>>>> to true. >>>>> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 >>>>> >>>>> The attached patch unbreaks CACAO on ARM builds. >>>>> Ok to push? >>>>> >>>> No. I think it should be fixed correctly, not just by enabling >>>> the zero build. Do you know if this is because something we do >>>> in IcedTea for zero? Or something in OpenJDK? >>>> >>> You need to create the file jdk/src/solaris/bin/arm/jvm.cfg before >>> building. The other platforms (zero included) have their own files >>> there. Setting ZERO_BUILD=true enables some logic that causes the >>> file to be copied from jdk/src/solaris/bin/zero/jvm.cfg rather than >>> jdk/src/solaris/bin/$(ARCH)/jvm.cfg. >>> >>> Cheers, >>> Gary >>> >>> >> Thanks a lot Gary for pointing this missing file out and also thank you Andrew for the review! >> I have attached a new patch that simply creates the missing openjdk/jdk/src/solaris/bin/arm/jvm.cfg if BUILD_CACAO are defined. >> >> Ok to push? >> >> > Ok by me. Out of interest, do you know if hs20 now also works? > > Yes ARM + CACAO + hs20 with the pr600.patch also works! I have verified it on my armv7l squeeze babbage system. hg clone -r icedtea6http://icedtea.classpath.org/hg/icedtea6 mkdir icedtea6-cacao cd icedtea6 quilt import pr600.patch quilt push ./autogen.sh cd ../icedtea6-cacao ../icedtea6/configure --enable-cacao --disable-bootstrap --disable-docs --with-hotspot-build=hs20 make ... 180 minutes later xranby at babbage:/wd/icedtea6-cacao$ ./openjdk.build/j2sdk-image/bin/java -version java version "1.6.0_21" IcedTea Runtime Environment (1.10pre+r70ea35e42b14) (Debian build 1.6.0_21-b21) CACAO (build 1.1.0pre2, compiled mode) Cheers Xerxes -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110220/443a6b5c/attachment.html From mjw at icedtea.classpath.org Sun Feb 20 14:54:41 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Sun, 20 Feb 2011 22:54:41 +0000 Subject: /hg/buildbot: Initial checkin of icedtea buildbot config for bui... Message-ID: changeset 2b632652ec94 in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=2b632652ec94 author: Mark Wielaard date: Sun Feb 20 23:52:34 2011 +0100 Initial checkin of icedtea buildbot config for builder.classpath.org. Bit of a copy/paste configuration setup. Needs some refactoring/cleanup. But it is a start. diffstat: 1 file changed, 677 insertions(+) icedtea/master.cfg | 677 ++++++++++++++++++++++++++++++++++++++++++++++++++++ diffs (truncated from 681 to 500 lines): diff -r 000000000000 -r 2b632652ec94 icedtea/master.cfg --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icedtea/master.cfg Sun Feb 20 23:52:34 2011 +0100 @@ -0,0 +1,677 @@ +# -*- python -*- +# ex: set syntax=python: + +# Python master.cfg program for IcedTea buildbot. +# Copyright (C) 2010, Mark J. Wielaard + +# This file is part of the IcedTea buildbot, and is free software. +# You can redistribute it and/or modify it under the terms of the GNU +# General Public License (GPL); either version 2, or (at your option) +# any later version. + +# Passwords are stored in the buildbot-icedtea.config as simple raw +# properties file. +import os +from ConfigParser import RawConfigParser +passwords = RawConfigParser() +passwords.read([os.path.expanduser('~/buildbot-icedtea.config')]) + +def getpw(name): + return passwords.get("passwords", name) + +c = BuildmasterConfig = {} + +####### BUILDSLAVES + +from buildbot.buildslave import BuildSlave + +c['slaves'] = [BuildSlave("squeeze-x86_64", + getpw("squeeze-x86_64"), + max_builds=3), + BuildSlave("squeeze-armv7l", + getpw("squeeze-armv7l"), + max_builds=1), + BuildSlave("natty-armv7l", + getpw("natty-armv7l"), + max_builds=2), + BuildSlave("jaunty-ia32", + getpw("jaunty-ia32"), + max_builds=3), + BuildSlave("squeeze-armv5tel", + getpw("squeeze-armv5tel"), + max_builds=1)] + +c['slavePortnum'] = 9989 + +####### CHANGESOURCES + +# The mercurial repository will send changes to PBChangeSource port +# (same as slavePortnum). Must authenticate with user and password. +from buildbot.changes.pb import PBChangeSource +c['change_source'] = PBChangeSource(user="itbbcs", passwd=getpw("itbbcs")) + +####### SCHEDULERS + +from buildbot.scheduler import Scheduler +c['schedulers'] = [] + +# "Quick" schedulers for icedtea6 and 7 (branch called "icedtea") +# Schedules a quick build (no jdk-check, no documentation) +# after waiting 5 minutes for any more changes. Should finish in less +# than an hour. +c['schedulers'].append(Scheduler(name="icedtea6-quick", branch="icedtea6", + treeStableTimer=5*60, + builderNames=["icedtea6-squeeze-x86_64-quick", + "icedtea6-squeeze-armv7l-quick", + "icedtea6-natty-armv7l-quick", + "icedtea6-natty-armv7l-quick-cacao", + "icedtea6-natty-armv7l-quick-shark", + "icedtea6-jaunty-ia32-quick-zero", + "icedtea6-jaunty-ia32-quick-cacao", + "icedtea6-jaunty-ia32-quick-shark", + "icedtea6-squeeze-armv5tel-quick", + "icedtea6-squeeze-armv5tel-quick-cacao", + "icedtea6-squeeze-armv5tel-quick-shark"] + )) + +c['schedulers'].append(Scheduler(name="icedtea7-quick", branch="icedtea", + treeStableTimer=5*60, + builderNames=["icedtea7-squeeze-x86_64-quick", + "icedtea7-squeeze-armv7l-quick", + "icedtea7-natty-armv7l-quick"] + )) + +# "Normal" schedulers for icedtea-web and testrepo. +# Schedules a full build of either branch after waiting 60 seconds +# for any more changes. +c['schedulers'].append(Scheduler(name="icedtea-web", branch="icedtea-web", + treeStableTimer=60, + builderNames=["icedtea-web-squeeze-x86_64", + "icedtea-web-squeeze-armv7l", + "icedtea-web-natty-armv7l"])) + +c['schedulers'].append(Scheduler(name="testrepo", branch="testrepo", + treeStableTimer=60, + builderNames=["testrepo-squeeze-x86_64", + "testrepo-squeeze-armv7l", + "testrepo-natty-armv7l", + "testrepo-jaunty-ia32", + "testrepo-squeeze-armv5tel"])) + +# Full scheduler for icedtea6 or icedtea (icedtea7) branches. +# Triggers every 8 hours if there were changes. Schedules a full build +# that includes documentation and jdk-check. Takes multiple hours. +# The trigger times are shifted 4 hours to minimize overlap. +from buildbot.schedulers.timed import Nightly +c['schedulers'].append(Nightly(name="icedtea6-full", branch="icedtea6", + onlyIfChanged=True, + hour=range(0, 24, 8), + minute=38, + builderNames=["icedtea6-squeeze-x86_64-full"])) +c['schedulers'].append(Nightly(name="icedtea7-full", branch="icedtea", + onlyIfChanged=True, + hour=range(4, 24, 8), + minute=8, + builderNames=["icedtea7-squeeze-x86_64-full"])) + +####### BUILDERS + +# Note this is the backup mercurial repo server. +# Currently the backup server is the one pinging the PBChangeSource, +# so let the build slaves also pull from it, to make sure they are +# in sync. +hgrepo = "http://icedtea.wildebeest.org/hg/" + +from buildbot.process import factory +from buildbot.steps.source import Mercurial +from buildbot.steps.shell import ShellCommand +from buildbot.steps.shell import Configure +from buildbot.steps.shell import Compile +from buildbot.steps.shell import Test + +from buildbot.process.buildstep import LogLineObserver +from buildbot.status.builder import SUCCESS, WARNINGS, FAILURE, EXCEPTION + +class PassFailErrorCounter(LogLineObserver): + def __init__(self, **kwargs): + LogLineObserver.__init__(self, **kwargs) # always upcall! + self.numPassed = 0 + self.numFailed = 0 + self.numError = 0 + def outLineReceived(self, line): + if line.startswith("Passed: "): + self.numPassed += 1 + self.step.setProgress('pass', self.numPassed) + elif line.startswith("FAILED: "): + self.numFailed += 1 + self.step.setProgress('fail', self.numFailed) + elif line.startswith("Error: "): + self.numError += 1 + self.step.setProgress('error', self.numError) + +class JTRegCheck(Test): + name = "jtregcheck" + command = [name] + + def __init__(self, **kwargs): + Test.__init__(self, **kwargs) # always upcall! + self.counter = PassFailErrorCounter() + self.addLogObserver('stdio', self.counter) + self.progressMetrics += ('tests', 'pass', 'fail', 'error',) + + def getText(self, cmd, results): + text = Test.getText(self, cmd, results) + if self.counter.numPassed > 0: + text.append("pass: " + str(self.counter.numPassed)) + if self.counter.numFailed > 0: + text.append("fail: " + str(self.counter.numFailed)) + if self.counter.numError > 0: + text.append("error: " + str(self.counter.numError)) + return text + + def getText2(self, cmd, results): + return getText(self, cmd, results) + + def evaluateCommand(self, cmd): + if self.counter.numFailed > 0 or self.counter.numError > 0: + return WARNINGS + else: + return SUCCESS + +# icedtea-web +f1 = factory.BuildFactory() +f1.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f1.addStep(ShellCommand(command=["./autogen.sh"], workdir="src", description="autogen")) +f1.addStep(ShellCommand(command=["rm", "-rf", "build"], workdir=".", description="clean build dir")) +#f1.addStep(ShellCommand(command=["mkdir", "build"], description="create build dir")) +f1.addStep(Configure(command=["../src/configure"], workdir="build")) +f1.addStep(Compile(command=["make", "-j4"], workdir="build")) +f1.addStep(Test(command=["make", "check"], workdir="build")) +icedtea_web_builder_x86_64 = { 'name': "icedtea-web-squeeze-x86_64", + 'slavenames': ["squeeze-x86_64"], + 'builddir': "icedtea-web", + 'factory': f1 } + +f1arm = factory.BuildFactory() +f1arm.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f1arm.addStep(ShellCommand(command=["./autogen.sh"], workdir="src", description="autogen")) +f1arm.addStep(ShellCommand(command=["rm", "-rf", "build"], workdir=".", description="clean build dir")) +f1arm.addStep(Configure(command=["../src/configure", "--disable-docs"], + workdir="build")) +f1arm.addStep(Compile(command=["make", "-j2"], workdir="build")) +f1arm.addStep(Test(command=["make", "check"], workdir="build")) + +icedtea_web_builder_squeeze_armv7l = { 'name': "icedtea-web-squeeze-armv7l", + 'slavenames': ["squeeze-armv7l"], + 'builddir': "icedtea-web-squeeze-armv7l", + 'factory': f1arm } +icedtea_web_builder_natty_armv7l = { 'name': "icedtea-web-natty-armv7l", + 'slavenames': ["natty-armv7l"], + 'builddir': "icedtea-web-natty-armv7l", + 'factory': f1arm } + +f2 = factory.BuildFactory() +f2.addStep(Mercurial(baseURL=hgrepo, mode="clobber")) +f2.addStep(Compile()) +f2.addStep(Test(command=["make", "check"])) +testrepo_builder_x86_64 = { 'name': "testrepo-squeeze-x86_64", + 'slavenames': ["squeeze-x86_64"], + 'builddir': "testrepo", + 'factory': f2 } +testrepo_builder_squeeze_armv7l = { 'name': "testrepo-squeeze-armv7l", + 'slavenames': ["squeeze-armv7l"], + 'builddir': "testrepo_squeeze_armv7l", + 'factory': f2 } +testrepo_builder_natty_armv7l = { 'name': "testrepo-natty-armv7l", + 'slavenames': ["natty-armv7l"], + 'builddir': "testrepo_natty_armv7l", + 'factory': f2 } +testrepo_builder_jaunty_ia32 = { 'name': "testrepo-jaunty-ia32", + 'slavenames': ["jaunty-ia32"], + 'builddir': "testrepo_jaunty_ia32", + 'factory': f2 } +testrepo_builder_squeeze_armv5tel = { 'name': "testrepo-squeeze-armv5tel", + 'slavenames': ["squeeze-armv5tel"], + 'builddir': "testrepo_squeeze_armv5tel", + 'factory': f2 } + +f3 = factory.BuildFactory() +f3.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--disable-optimizations", + "--disable-docs", + "--with-additional-vms=cacao,shark", + "--with-parallel-jobs=4", + "--with-llvm-config=llvm-config-2.7"], + workdir="build")) +f3.addStep(Compile(workdir="build")) +f3.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build")) + +f3as = factory.BuildFactory() +f3as.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3as.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3as.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3as.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--disable-docs"], + workdir="build")) +f3as.addStep(Compile(workdir="build")) +f3as.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3as.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + +f3an = factory.BuildFactory() +f3an.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3an.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3an.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3an.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=2", + "--disable-docs"], + workdir="build")) +f3an.addStep(Compile(workdir="build")) +f3an.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3an.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + +f3anc = factory.BuildFactory() +f3anc.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3anc.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3anc.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3anc.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=2", + "--disable-docs", + "--enable-cacao"], + workdir="build")) +f3anc.addStep(Compile(workdir="build")) +f3anc.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3anc.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + +f3ans = factory.BuildFactory() +f3ans.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3ans.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3ans.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3ans.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=2", + "--disable-docs", + "--enable-shark"], + workdir="build")) +f3ans.addStep(Compile(workdir="build")) +f3ans.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3ans.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + +f3jz = factory.BuildFactory() +f3jz.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3jz.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3jz.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3jz.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=5", + "--disable-docs", + "--enable-zero"], + workdir="build")) +f3jz.addStep(Compile(workdir="build")) +f3jz.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3jz.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + +f3js = factory.BuildFactory() +f3js.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3js.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3js.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3js.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=5", + "--disable-docs", + "--enable-shark"], + workdir="build")) +f3js.addStep(Compile(workdir="build")) +f3js.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3js.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + +f3jc = factory.BuildFactory() +f3jc.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3jc.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3jc.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3jc.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=5", + "--disable-docs", + "--enable-cacao"], + workdir="build")) +f3jc.addStep(Compile(workdir="build")) +f3jc.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3jc.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + +f3a5 = factory.BuildFactory() +f3a5.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3a5.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3a5.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3a5.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=1", + "--disable-docs"], + workdir="build")) +f3a5.addStep(Compile(workdir="build")) +f3a5.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3a5.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build")) + +f3a5c = factory.BuildFactory() +f3a5c.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3a5c.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3a5c.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3a5c.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=1", + "--disable-docs", + "--enable-cacao"], + workdir="build")) +f3a5c.addStep(Compile(workdir="build")) +f3a5c.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3a5c.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build")) + +f3a5s = factory.BuildFactory() +f3a5s.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3a5s.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3a5s.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3a5s.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--with-parallel-jobs=1", + "--disable-docs", + "--enable-shark"], + workdir="build")) +f3a5s.addStep(Compile(workdir="build")) +f3a5s.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3a5s.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build")) + +icedtea6_builder_quick = { 'name': "icedtea6-squeeze-x86_64-quick", + 'slavenames': ["squeeze-x86_64"], + 'builddir': "icedtea6-quick", + 'factory': f3 } +icedtea6_builder_quick_arm_squeeze = { 'name': "icedtea6-squeeze-armv7l-quick", + 'slavenames': ["squeeze-armv7l"], + 'builddir': "icedtea6-squeeze-armv7l-quick", + 'factory': f3as } +icedtea6_builder_quick_arm_natty = { 'name': "icedtea6-natty-armv7l-quick", + 'slavenames': ["natty-armv7l"], + 'builddir': "icedtea6-natty-armv7l-quick", + 'factory': f3an } +icedtea6_builder_quick_arm_natty_cacao = { + 'name': "icedtea6-natty-armv7l-quick-cacao", + 'slavenames': ["natty-armv7l"], + 'builddir': "icedtea6-natty-armv7l-quick-cacao", + 'factory': f3anc } +icedtea6_builder_quick_arm_natty_shark = { + 'name': "icedtea6-natty-armv7l-quick-shark", From bugzilla-daemon at icedtea.classpath.org Mon Feb 21 00:56:57 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 21 Feb 2011 08:56:57 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 doko at ubuntu.com changed: What |Removed |Added ---------------------------------------------------------------------------- Severity|normal |critical Status|RESOLVED |REOPENED Resolution|WORKSFORME | ------- Comment #16 from doko at ubuntu.com 2011-02-21 08:56 ------- so at least zero is broken in the 6-1.8 branch. is zero buildable on any other branch besides icedtea6 trunk? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From mark at klomp.org Mon Feb 21 01:02:11 2011 From: mark at klomp.org (Mark Wielaard) Date: Mon, 21 Feb 2011 10:02:11 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <20110217210211.GG8495@rivendell.middle-earth.co.uk> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> Message-ID: <1298278932.3387.28.camel@springer.wildebeest.org> Hi Andrew, Thanks for the constructive email. We were both a bit too over eager to get "our" builds to be fixed first/best. Thanks also for talking a little off list to make sure we were keeping constructive going forward. On Thu, 2011-02-17 at 21:02 +0000, Dr Andrew John Hughes wrote: > On 19:36 Thu 17 Feb , Mark Wielaard wrote: > > No. I am happy to also test the default configuration, which I did, if I > > am fixing issues on a non-default configuration that I care about. But > > I am not going to test all random variants that might happen. > > > I'm not asking for 'all random variants'. That would be kind of crazy and > almost unachievable :-) > > I do ask that, when there is an alternate HotSpot build available, then > patches are checked against both. While hs20 may not be the default now, > it will become so at some point in the future (probably after the imminent > 1.10 branch). It will make things easier if it's not broken when we switch > over. The HotSpot build option is fully documented in INSTALL. That does take a lot of extra time though. I really do think we shouldn't force people to do multiple full builds, except for the default one and the variant that they are hacking/testing. It would be nice if we could somehow integrate this like we do with other alternative VMs with --enable-additional-vms. So you can easily build them during the main build, without having to rebuild everything else. And people might find it nice to try them both in their builds. Also, could we have an alias for "hotspot=next" or something? Assuming that we only support "current" and "next" hotspot, then you don't have to remember which particular version it represents (also easier for making sure a buildslave tracks them). Xerxes offered to change one of his buildslaves to track hs20, so hopefully that will also help making sure that setup doesn't accidentally break. > > If you care about non-default configurations please either make sure > > that it is in the default build/test setup. Or provide a buildslave for > > it, so that it is regularly tested on all commits. That is what Xerxes > > and I did for the non-default configurations that we care about (for > > x86_64 zero/shark isn't enabled by default, and not everybody has an arm > > setup). > > I don't know how to do any of this. I didn't see any discussion or list of > what was being added to these build bots. If I missed it, I'm sorry. I would > have suggested that both the alternate HotSpot build (currently hs20) be checked > and also icedtea6-hg if possible. > > The alternate HotSpot build and icedtea6-hg cover what's "coming soon" > to IcedTea6 (the HotSpot build from the new stable HotSpot tree, > icedtea6-hg from the upstream OpenJDK6 tree) and allows us to find > things out early rather than getting hit by it all in one big lump > when a new tarball is released. Agreed. And sorry for not formally announcing the existence of the buildbot. Xerxes and I were still experimenting with various setups. And I admit I was a little ashamed of my hacky master.cfg setup. But I checked them all in and will send a more formal announcement with some instructions how anybody can add a buildslave or suggest changes in the current setup. > > > I'd prefer not to have yet more work on my plate because people don't do full > > > testing of patches and commit them without any review. > > > > It is hard to get a good feeling for tone in an email, so apologies for > > misinterpreting. But I really don't appreciate this nitpicking. > > It wasn't meant to nitpick. It was more a plea for help. It's great > that you want to spend time looking into this and providing a fix, but > the help is negated if it means I have to spend time doing builds to > check for breakage or start changing things. Effectively, it's > forcing me to look into the issue immediately, so if I sound a little > negative, that's why. And also my apologies. I wasn't exactly nice in formulating my own attempts at "helping" and asking for help. We are all a little short on time. > > You > > committed a patch, that you didn't discuss on the list, which broke the > > zero/shark configuration that Xerxes and I care about. > > In fairness, I can't really discuss embargoed security issues :-D We probably should discuss that a bit more. It was unfair of me to treat these as if the were "normal" patches. You take these security issues on, and really do make sure they get applied as soon as possible, when the underlying issues are announced to the world at large. But we might need a bit more formal "security team" approach to make sure you don't get overwhelmed by them. Should we start a new thread on how to get more help with this process? I admit to not exactly know how you get into possession of these embargoed security fixes ahead of time, who embargoes them, what the process is if the happen to become public before the embargo date, or who else is involved, etc. > No, I'll admit I didn't test Shark with the patches. Having to do the > default and alternate HotSpot builds on three release branches and > HEAD three times over (due to us getting the security fixes in bits) > didn't leave much time for checking more estoric options. With Shark, > in particular, I can't remember ever having had a successful build > more than a couple of times, so it's not high on my priorities. I > understand it is with others, but then that's why I'm (hopefully) > not the only person working on IcedTea6 (though it does feel like > that sometimes). You do take on a lot of the grunt work on making sure IcedTea keeps up to date and working nicely. Thanks. I admit that I was feeling like the only person caring about making sure the "alternative" runtimes kept working. Lets see if we can make this a bit smoother for all involved, whatever runtime/setup they care about. That is really why Xerxes and I started to work on the buildbot setup. See upcoming email. > Well, thanks for doing this (if a little belated). It is appreciated. > I did see the issue on IRC but I've not had time to look at it. To be > honest, the thanks would have been immediately forthcoming if you'd > just given me or someone else chance to scan over the patch first > before committing it. That's not really for any technical reason so > much as it turns a "oh heck what's this coming down the line" > (assuming the worst, as here) into "Oh, great you fixed that. > Thanks". Yes, felt it was discussed at length through the bug report and that it was "urgent" to fix asap, seeing that the autobuilders were all broken (because the only ones having been setup do always include all alternative runtimes). I'll add a more basic/plain build config to one of the buildslaves soon. And will try to have a bit more patience. > I'll admit I'm not too good at doing that myself, but that's more born > from the experience that if I do, sadly no-one looks at it until I go > and find someone and prod them... Grin. Well, to be honest, that was how I was feeling. Lets agree to be more aggressive/speedy in reviewing other people patches. > I hope that clears the air a bit. Yes, it did. Appreciated. Hope my reply do the same. Thanks, Mark From mjw at icedtea.classpath.org Mon Feb 21 01:09:42 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Mon, 21 Feb 2011 09:09:42 +0000 Subject: /hg/buildbot: Add old build.sh shell script for reference. Message-ID: changeset c3adcbdf8b9d in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=c3adcbdf8b9d author: Mark Wielaard date: Mon Feb 21 10:09:31 2011 +0100 Add old build.sh shell script for reference. This old shell script is also still running on builder.classpath.org. But please try to improve the buildbot master.cfg setup instead of adding more hacks to this script. diffstat: 1 file changed, 205 insertions(+) icedtea/build.sh | 205 ++++++++++++++++++++++++++++++++++++++++++++++++++++++ diffs (209 lines): diff -r 2b632652ec94 -r c3adcbdf8b9d icedtea/build.sh --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/icedtea/build.sh Mon Feb 21 10:09:31 2011 +0100 @@ -0,0 +1,205 @@ +#!/bin/bash + +# Copyright (C) 2009, 2010, Mark J. Wielaard +# This IcedTea build script is free software: you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# http://www.gnu.org/copyleft/gpl.html + +# OLD builder script. Being slowly replaced with buildbot setup. +# Please improve the master.cfg buildbot configuration instead of +# trying to improve this hacky shell script. +# +# Currently being run on builder.classpath.org with: +# while true; do time ./build.sh 6; date; sleep 600; \ +# time ./build.sh 7; date; sleep 600; done 2>&1 | tee build.log + +# Where to send error reports, add committers later. +EMAIL="testresults at icedtea.classpath.org" + +# Can we check somehow whether there is a build busy? +# http://www.davidpashley.com/articles/writing-robust-shell-scripts.html + +if [ $# -ne 1 ]; then + echo "build.sh takes one argument 6 or 7" + exit -1; +elif [ "$1" != "6" -a "$1" != "7" ]; then + echo "build.sh argument must be 6 or 7" + exit -1; +fi + +BASE_BUILD_DIR=/usr/local/build +ICEDTEA_DIR=$BASE_BUILD_DIR/icedtea$1 +ICEDTEA_BUILD_DIR=$BASE_BUILD_DIR/icedtea$1-build + +# Build artifacts, sources and test results will be stored here. +RESULTS_DIR=/usr/local/build/results/icedtea$1 + +echo "Building $ICEDTEA_DIR" +echo " in $ICEDTEA_BUILD_DIR" +echo " results into $RESULTS_DIR" + +cd $ICEDTEA_DIR +HG_LAST_ID=$(hg id -i -r tip) +HG_LAST_REV=$(hg id -n -r tip) +echo "Last hg id: $HG_LAST_ID (local rev: $HG_LAST_REV)" + +hg pull && hg update +HG_CURRENT_ID=$(hg id -i -r tip) +HG_CURRENT_REV=$(hg id -n -r tip) + +if [ "$HG_LAST_ID" == "$HG_CURRENT_ID" ]; then + echo "Nothing to do last id: $HG_LAST_ID, equals current id: $HG_CURRENT_ID" + exit 1 +fi + +echo "Rebuilding: last id: $HG_LAST_ID, current id: $HG_CURRENT_ID" + +# The range of changes (one past the last local rev) +HG_REV_RANGE="$(expr $HG_LAST_REV + 1):$HG_CURRENT_REV" + +# Which people made changes between then and now? +# Qualify those users without a full email address as @icedtea.classpath.org. +AT_USERS=$(hg log -r$HG_REV_RANGE --template '{author|email}\n' \ + | sort -u | grep @) +NO_AT_USERS=$(hg log -r$HG_REV_RANGE --template '{author|email}\n' \ + | sort -u | grep -v @ | sed s/\$/\@icedtea.classpath.org/) +USERS="$AT_USERS $NO_AT_USERS" + +CHANGES=$(hg log -r$HG_REV_RANGE --template \ + 'rev: {node|short}\nuser: {author}\ndate: {date|date}\n\n{desc|strip}\n\n') + +# echo "Changes made by: $USERS" +# echo "Changes: $CHANGES" + +# Warn everybody that made changes in case something went wrong. +EMAIL="$EMAIL $USERS" + +# Announce the test build coming up. +#(echo -n "Doing a test build for IcedTea$1"; echo; echo "$CHANGES") \ +# | mail -s "IcedTea$1 build testing for $HG_CURRENT_ID" $EMAIL + +# Remove both 6 and 7, there is only disk space for one build +#echo "Removing old builds $BASE_BUILD_DIR/icedtea6-build $BASE_BUILD_DIR/icedtea7-build..." +#rm -rf $BASE_BUILD_DIR/icedtea6-build $BASE_BUILD_DIR/icedtea7-build +echo removing old build in $ICEDTEA_BUILD_DIR +rm -rf $ICEDTEA_BUILD_DIR + +mkdir $ICEDTEA_BUILD_DIR + +# Might contain old tar.gz/bz2 sources so we don't need to redownload. +# Some are in the top level dir, others are in the drops subdir. +# Don't worry if cp fails, we will download fresh ones. +SOURCES_DIR=$RESULTS_DIR/src +cp -r $SOURCES_DIR/*.tar.* $SOURCES_DIR/drops $ICEDTEA_BUILD_DIR/ + +BUILD_LOG_FILE=$BASE_BUILD_DIR/build-icedtea$1.log +echo "Putting build log in $BUILD_LOG_FILE" + +# Make sure a failure in any command in a pipe, fails the whole pipe command. +set -o pipefail + +# Build in separate dir. +# Figure out a way to use local openjdk tar.gz files +# maybe just copy to to an archive dir before cleanup and then copy back. +# Keep logs of build, and check if it was successfull +(cd $ICEDTEA_DIR && ./autogen.sh \ + && cd $ICEDTEA_BUILD_DIR \ + && $ICEDTEA_DIR/configure \ + --enable-nss \ + --with-additional-vms=cacao,shark \ + && make VERBOSE=true) 2>&1 | tee $BUILD_LOG_FILE +BUILD_RESULT=$? + +echo "Build result: $BUILD_RESULT" + +# store the full build log and config.log file +cp $ICEDTEA_BUILD_DIR/config.log $BUILD_LOG_FILE $RESULTS_DIR/ + +RESULTS_URL="http://builder.wildebeest.org/icedtea/icedtea$1/" + +if [ $BUILD_RESULT -ne 0 ]; then + (echo "The current IcedTea$i build fails."; \ + echo; \ + echo "More info at $RESULTS_URL"; \ + echo; \ + echo "Possibly, but not necessarily, because of one of these changes:"; \ + echo; \ + echo "$CHANGES"; \ + echo; echo; \ + echo "Last part of build log: "; echo; \ + tail -160 $BUILD_LOG_FILE) \ + | mail -s "IcedTea$1 build failed for $HG_CURRENT_ID" $EMAIL + exit -1 +fi + +# Run tests under fake x-server so gui tests work "normally" +cd $ICEDTEA_BUILD_DIR && xvfb-run -e xvfb-errors -a -s -ac make check -k + +# Old results are here, new results will be stored there. +TESTS_DIR=$RESULTS_DIR/test + +cmp $ICEDTEA_BUILD_DIR/test/jtreg-summary.log $TESTS_DIR/jtreg-summary.log +TEST_RESULT=$? + +echo "Test results compare: $TEST_RESULT" + +if [ $TEST_RESULT -ne 0 ]; then + (echo "The current IcedTea$i build test results changed."; \ + echo; \ + echo "Changed test results: "; echo; \ + diff -u $TESTS_DIR/jtreg-summary.log \ + $ICEDTEA_BUILD_DIR/test/jtreg-summary.log; \ + echo; \ + echo "More info at $RESULTS_URL"; \ + echo; \ + echo "Possibly, but not necessarily, because of one of these changes:"; \ + echo; \ + echo "$CHANGES") \ + | mail -s "IcedTea$1 test results changed for $HG_CURRENT_ID" $EMAIL; +else + (echo "The current IcedTea$i build succeeded, no changes in test results."; \ + echo; \ + echo "More info at $RESULTS_URL"; \ + echo; \ + echo "New changes since last time:"; \ + echo; \ + echo "$CHANGES") \ + | mail -s "IcedTea$1 build succeeded for $HG_CURRENT_ID" $EMAIL; +fi + +# Need to fixup jtreg report html files. +# Escape paths for sed. +# From path is absolute build path on (chrooted) file system. +# To path is absolute (prefix) path on webserver. +FROM_PATH="\/usr\/local\/build\/icedtea$1-build\/test\/" +TO_PATH="\/icedtea\/icedtea$1\/test\/" +for i in `find $ICEDTEA_BUILD_DIR/test/*/JTreport -name \*.html`; do \ + sed -i "s/$FROM_PATH/$TO_PATH/" $i; \ +done + +rm -rf $TESTS_DIR +mkdir $TESTS_DIR +cd $ICEDTEA_BUILD_DIR +cp -r test/*log test/jdk test/hotspot test/langtools $TESTS_DIR/ + +# Not enough room to keep the debuginfo, remove it for now. +#find $ICEDTEA_BUILD_DIR/openjdk/build/linux-i586/j2sdk-image/jre/lib \ +# -name \*.so \ +# | xargs strip --strip-debug --preserve-dates + +# Package up the resulting j2sdk-image dir. +cd $ICEDTEA_BUILD_DIR/openjdk.build +tar zcf j2sdk-image.tar.gz j2sdk-image + +mv j2sdk-image.tar.gz $RESULTS_DIR/ + +# Store old tar.gz/bz2 source bundles and drops, might be useful next time. +rm -rf $SOURCES_DIR +mkdir $SOURCES_DIR +cp -r $ICEDTEA_BUILD_DIR/*.tar.* $ICEDTEA_BUILD_DIR/drops $SOURCES_DIR/ + +# And the actual icedtea sources used. +rm -f $SOURCES_DIR/icedtea$1.tar.gz +cd $ICEDTEA_DIR && hg archive --type tgz $SOURCES_DIR/icedtea$1.tar.gz From xranby at icedtea.classpath.org Mon Feb 21 01:12:46 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Mon, 21 Feb 2011 09:12:46 +0000 Subject: /hg/icedtea6: PR600: HS19 upgrade broke CACAO build on ARM Message-ID: changeset 933b64dcaf4d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=933b64dcaf4d author: Xerxes R?nby date: Mon Feb 21 09:55:43 2011 +0100 PR600: HS19 upgrade broke CACAO build on ARM 2011-02-21 Xerxes Ranby PR600: HS19 upgrade broke CACAO build on ARM * Makefile.am (ICEDTEA_PATCHES): Add patch if BUILD_CACAO are defined. * NEWS: Updated. * patches/cacao/arm-jvm.cfg-pr600.patch diffstat: 3 files changed, 11 insertions(+), 1 deletion(-) ChangeLog | 8 ++++++++ Makefile.am | 3 ++- NEWS | 1 + diffs (39 lines): diff -r 70ea35e42b14 -r 933b64dcaf4d ChangeLog --- a/ChangeLog Fri Feb 18 11:38:42 2011 +0100 +++ b/ChangeLog Mon Feb 21 09:55:43 2011 +0100 @@ -1,3 +1,11 @@ 2011-02-18 Pavel Tisnovsky + + PR600: HS19 upgrade broke CACAO build on ARM + * Makefile.am (ICEDTEA_PATCHES): + Add patch if BUILD_CACAO are defined. + * NEWS: Updated. + * patches/cacao/arm-jvm.cfg-pr600.patch + 2011-02-18 Pavel Tisnovsky * Makefile.am: Updated. diff -r 70ea35e42b14 -r 933b64dcaf4d Makefile.am --- a/Makefile.am Fri Feb 18 11:38:42 2011 +0100 +++ b/Makefile.am Mon Feb 21 09:55:43 2011 +0100 @@ -326,7 +326,8 @@ ICEDTEA_PATCHES += \ patches/cacao/launcher.patch \ patches/cacao/arm-arch-defines.patch \ patches/cacao/jsig.patch \ - patches/cacao/memory.patch + patches/cacao/memory.patch \ + patches/cacao/arm-jvm.cfg-pr600.patch endif if WITH_CACAO diff -r 70ea35e42b14 -r 933b64dcaf4d NEWS --- a/NEWS Fri Feb 18 11:38:42 2011 +0100 +++ b/NEWS Mon Feb 21 09:55:43 2011 +0100 @@ -426,6 +426,7 @@ New in release 1.10 (2011-XX-XX): - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors + - PR600: HS19 upgrade broke CACAO build on ARM - PR616, PR99: Don't statically link libstdc++ or libgcc - PR632: patches/security/20110215/6878713.patch breaks shark zero build From bugzilla-daemon at icedtea.classpath.org Mon Feb 21 01:15:01 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 21 Feb 2011 09:15:01 +0000 Subject: [Bug 600] HS19 upgrade broke CACAO build on ARM Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 xerxes at zafena.se changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from xerxes at zafena.se 2011-02-21 09:15 ------- Fix commited to icedtea6: http://icedtea.classpath.org/hg/icedtea6/rev/933b64dcaf4d -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From xranby at icedtea.classpath.org Mon Feb 21 01:26:56 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Mon, 21 Feb 2011 09:26:56 +0000 Subject: /hg/icedtea6: added patches/cacao/arm-jvm.cfg-pr600.patch Message-ID: changeset 55566ffe7026 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=55566ffe7026 author: Xerxes R?nby date: Mon Feb 21 10:10:16 2011 +0100 added patches/cacao/arm-jvm.cfg-pr600.patch 2011-02-21 Xerxes Ranby * Added patches/cacao/arm-jvm.cfg-pr600.patch that belongs to previous commit. diffstat: 1 file changed, 44 insertions(+) patches/cacao/arm-jvm.cfg-pr600.patch | 44 +++++++++++++++++++++++++++++++++ diffs (48 lines): diff -r 933b64dcaf4d -r 55566ffe7026 patches/cacao/arm-jvm.cfg-pr600.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/cacao/arm-jvm.cfg-pr600.patch Mon Feb 21 10:10:16 2011 +0100 @@ -0,0 +1,44 @@ +Index: openjdk/jdk/src/solaris/bin/arm/jvm.cfg +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ openjdk/jdk/src/solaris/bin/arm/jvm.cfg 2011-02-18 15:40:24.083043645 +0100 +@@ -0,0 +1,39 @@ ++# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This code is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License version 2 only, as ++# published by the Free Software Foundation. Oracle designates this ++# particular file as subject to the "Classpath" exception as provided ++# by Oracle in the LICENSE file that accompanied this code. ++# ++# This code is distributed in the hope that it will be useful, but WITHOUT ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# version 2 for more details (a copy is included in the LICENSE file that ++# accompanied this code). ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++# ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++# or visit www.oracle.com if you need additional information or have any ++# questions. ++# ++# ++# List of JVMs that can be used as an option to java, javac, etc. ++# Order is important -- first in this list is the default JVM. ++# NOTE that this both this file and its format are UNSUPPORTED and ++# WILL GO AWAY in a future release. ++# ++# You may also select a JVM in an arbitrary location with the ++# "-XXaltjvm=" option, but that too is unsupported ++# and may not be available in a future release. ++# ++-server KNOWN ++-client IGNORE ++-hotspot ERROR ++-classic WARN ++-native ERROR ++-green ERROR From mark at klomp.org Mon Feb 21 01:31:06 2011 From: mark at klomp.org (Mark Wielaard) Date: Mon, 21 Feb 2011 10:31:06 +0100 Subject: Announcing the IcedTea buildbot Message-ID: <1298280666.3387.47.camel@springer.wildebeest.org> Hi hackers, Over the last few weeks Xerxes and I have been experimenting with a buildbot setup which you can see at: http://builder.classpath.org/icedtea/buildbot/waterfall The idea is that everybody who cares can add a buildslave setup to do a build and check for the configuration and architecture they care about. Currently all buildslaves are based on Debian derivatives and cover ia32, x86_64 and some arm architectures are. It does build various alternative runtime setups (cacao, shark, zero). And the slaves build various variants of icedtea6, icedtea7, icedtea-web (and the testrepo). If you have a spare machine with a dedicated internet connection that could do builds of some configuration you care about please let us know and we will try to add it as slave. If you have an alternative configuration you want to see done by one of the existing build slaves please also let us know and we can see if there are enough cycles to add it. The current buildbot master.cfg setup is checked in at http://icedtea.classpath.org/hg/buildbot I admit the master.cfg is a bit hacky. It needs to be cleaned up so that we have nice functions/factories for generating the build steps based on whether the slave wants to do a quick/full, special config flags, parallel, with/without some checks, etc. build instead of the current copy/paste hell that is there. But although I am a little ashamed of how bad my python skills are, it seemed better to just admit it needs cleanup and ask for help from those more proficient in python :) Also checked in is the old hacky bash shell script that is still running on builder.classpath.org and that sends emails as soon as the build of icedtea6 or icedtea7 trunk fails and/or the test results change. It would be nice to transfer any missing functionality to the new buildbot setup (like the test results comparison), so that any build slave that wishes can do the same. Since this script also still produces binaries everybody can use and full jtreg test result files, see under http://builder.classpath.org/icedtea/. I decided to keep this also still running. But would really, really like to get rid of in the future. Feedback on how we can make this buildbot setup more productive for anybody hacking on icedtea really appreciated. Thanks, Mark From xerxes at zafena.se Mon Feb 21 01:32:20 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 21 Feb 2011 10:32:20 +0100 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <4D616645.5060900@zafena.se> References: <4D5E55F3.4090801@zafena.se> <20110218132244.GA30037@rivendell.middle-earth.co.uk> <20110218142556.GB4652@redhat.com> <4D5E8C31.2080705@zafena.se> <20110219000823.GC13108@rivendell.middle-earth.co.uk> <4D616645.5060900@zafena.se> Message-ID: <4D623124.5070105@zafena.se> Fixed, patches pushed to: http://icedtea.classpath.org/hg/icedtea6/rev/933b64dcaf4d and http://icedtea.classpath.org/hg/icedtea6/rev/55566ffe7026 I Forgot to "hg add" the new openjdk cacao patch in the first commit, sorry. Cheers Xerxes On 2011-02-20 20:06, Xerxes Ranby wrote: > On 2011-02-19 01:08, Dr Andrew John Hughes wrote: >> On 16:11 Fri 18 Feb , Xerxes R?nby wrote: >>> Thanks a lot Gary for pointing this missing file out and also thank you Andrew for the review! >>> I have attached a new patch that simply creates the missing openjdk/jdk/src/solaris/bin/arm/jvm.cfg if BUILD_CACAO are defined. >>> >>> Ok to push? >>> >>> >> Ok by me. Out of interest, do you know if hs20 now also works? >> >> > Yes ARM + CACAO + hs20 with the pr600.patch also works! > -------------- next part -------------- An HTML attachment was scrubbed... URL: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110221/a3e30ff5/attachment.html From aph at redhat.com Mon Feb 21 01:42:40 2011 From: aph at redhat.com (Andrew Haley) Date: Mon, 21 Feb 2011 09:42:40 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <1298278932.3387.28.camel@springer.wildebeest.org> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> Message-ID: <4D623390.4050407@redhat.com> On 02/21/2011 09:02 AM, Mark Wielaard wrote: > > On Thu, 2011-02-17 at 21:02 +0000, Dr Andrew John Hughes wrote: >> On 19:36 Thu 17 Feb , Mark Wielaard wrote: >>> You committed a patch, that you didn't discuss on the list, which >>> broke the zero/shark configuration that Xerxes and I care about. >> >> In fairness, I can't really discuss embargoed security issues :-D > > We probably should discuss that a bit more. It was unfair of me to > treat these as if the were "normal" patches. You take these security > issues on, and really do make sure they get applied as soon as > possible, when the underlying issues are announced to the world at > large. But we might need a bit more formal "security team" approach > to make sure you don't get overwhelmed by them. Should we start a > new thread on how to get more help with this process? I admit to not > exactly know how you get into possession of these embargoed security > fixes ahead of time, who embargoes them, what the process is if the > happen to become public before the embargo date, or who else is > involved, etc. The group of people who are involved is limited to a few named individuals. This process comes from CERT, http://www.cert.org, which came into being after the Internet Worm. Oracle handle the reports via the CVE database at http://cve.mitre.org/. Andrew. From xranby at icedtea.classpath.org Mon Feb 21 02:25:28 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Mon, 21 Feb 2011 10:25:28 +0000 Subject: /hg/buildbot: Initial checkin of buildslave wget cache wrapper. Message-ID: changeset 15bb449380ba in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=15bb449380ba author: Xerxes R?nby date: Mon Feb 21 11:08:43 2011 +0100 Initial checkin of buildslave wget cache wrapper. This is a wrapper for wget that caches files fetched using wget foo -O file This wget cache wrapper are currently being run on the buildslaves jaunty-ia32, natty-armv7l and squeeze-armv7l connected to the http://builder.classpath.org/icedtea/buildbot/ buildmaster To prevent the buildslaves to re-download all openjdk drops for each build diffstat: 1 file changed, 65 insertions(+) buildslave/tools/wget.cache.wrapper | 65 +++++++++++++++++++++++++++++++++++ diffs (69 lines): diff -r c3adcbdf8b9d -r 15bb449380ba buildslave/tools/wget.cache.wrapper --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/buildslave/tools/wget.cache.wrapper Mon Feb 21 11:08:43 2011 +0100 @@ -0,0 +1,65 @@ +#!/bin/bash + +# Copyright (C) 2011, Xerxes Ranby +# This wget cache wrapper is free software; you can redistribute it +# and/or modify it under the terms of the GNU General Public License as +# published by the Free Software Foundation, either version 3 of the +# License, or (at your option) any later version. +# http://www.gnu.org/copyleft/gpl.html + +# This is a wrapper for wget that caches files fetched using +# wget foo -O files + +# This wget cache wrapper are currently being run on the buildslaves +# jaunty-ia32, natty-armv7l and squeeze-armv7l connected to the +# http://builder.classpath.org/icedtea/buildbot/ buildmaster +# to prevent the buildslaves to re-download all openjdk drops for each build + +##### Please configure me to match your setup. + +WGET=/usr/bin/wget.real +CACHEDIR=/home/wgetcache/ + +##### Please do not change anything below this line + +TARGETDIR=$(pwd) + +#remeber all arguments to wget +ALLARG=$* + +#find out if the last argument are -O file +FILEINDEX=$# +shift $((${FILEINDEX}-2)) +ARG=$1 +FILE=$2 + +if [ ${ARG} == "-O" ] ; then + if [ ! -e ${CACHEDIR}${FILE} ]; then + # file do not exist in cache + # download the file to the cache using wget! + cd ${CACHEDIR} + + # make sure subdirs in the cache exist + CACHEDIRSUBPATH=$(dirname ${FILE}) + mkdir -p ${CACHEDIRSUBPATH} + + ${WGET} ${ALLARG} + fi + + if [ -e ${CACHEDIR}${FILE} ] ; then + # ok good, file exist now in cache + # copy the file from cache to destination + cd ${TARGETDIR} + cp ${CACHEDIR}${FILE} ${FILE} + exit 0 + else + #something got wrong + exit 1 + fi +else + # Last argument are something else than -O file + # We do not know how to cache this.... sorry. + # instead we simply run wget with all passed arguments + # and pretend we dont exist + ${WGET} ${ALLARG} +fi From doko at ubuntu.com Mon Feb 21 02:28:16 2011 From: doko at ubuntu.com (Matthias Klose) Date: Mon, 21 Feb 2011 11:28:16 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <4D623390.4050407@redhat.com> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> <4D623390.4050407@redhat.com> Message-ID: <4D623E40.8070504@ubuntu.com> On 21.02.2011 10:42, Andrew Haley wrote: > On 02/21/2011 09:02 AM, Mark Wielaard wrote: >> >> On Thu, 2011-02-17 at 21:02 +0000, Dr Andrew John Hughes wrote: >>> On 19:36 Thu 17 Feb , Mark Wielaard wrote: > >>>> You committed a patch, that you didn't discuss on the list, which >>>> broke the zero/shark configuration that Xerxes and I care about. >>> >>> In fairness, I can't really discuss embargoed security issues :-D >> >> We probably should discuss that a bit more. It was unfair of me to >> treat these as if the were "normal" patches. You take these security >> issues on, and really do make sure they get applied as soon as >> possible, when the underlying issues are announced to the world at >> large. But we might need a bit more formal "security team" approach >> to make sure you don't get overwhelmed by them. Should we start a >> new thread on how to get more help with this process? I admit to not >> exactly know how you get into possession of these embargoed security >> fixes ahead of time, who embargoes them, what the process is if the >> happen to become public before the embargo date, or who else is >> involved, etc. > > The group of people who are involved is limited to a few named > individuals. yes, and this really sucks. Sun didn't and Oracle doesn't reach out beyond these individuals. And these individuals only get information about issues in the proprietary sun-java version, which have to be adjusted for OpenJDK, and even then this information was more than once incomplete. Andrew Hughes tries to compensate and coordinate for IcedTea, but this is really something which could be done on the OpenJDK side. CC'ing Dalibor on input, he still seems to be the OpenJDK community contact within Oracle. > This process comes from CERT, http://www.cert.org, which came into > being after the Internet Worm. Oracle handle the reports via the > CVE database at http://cve.mitre.org/. Is this so? In the past I did see CVE's submitted by RedHat, not by Oracle (even for OpenJDK issues not related to IcedTea). Matthias From aph at redhat.com Mon Feb 21 02:49:17 2011 From: aph at redhat.com (Andrew Haley) Date: Mon, 21 Feb 2011 10:49:17 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <4D623E40.8070504@ubuntu.com> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> <4D623390.4050407@redhat.com> <4D623E40.8070504@ubuntu.com> Message-ID: <4D62432D.8030504@redhat.com> On 02/21/2011 10:28 AM, Matthias Klose wrote: > On 21.02.2011 10:42, Andrew Haley wrote: >> On 02/21/2011 09:02 AM, Mark Wielaard wrote: >>> >>> On Thu, 2011-02-17 at 21:02 +0000, Dr Andrew John Hughes wrote: >>>> On 19:36 Thu 17 Feb , Mark Wielaard wrote: >> >>>>> You committed a patch, that you didn't discuss on the list, which >>>>> broke the zero/shark configuration that Xerxes and I care about. >>>> >>>> In fairness, I can't really discuss embargoed security issues :-D >>> >>> We probably should discuss that a bit more. It was unfair of me to >>> treat these as if the were "normal" patches. You take these security >>> issues on, and really do make sure they get applied as soon as >>> possible, when the underlying issues are announced to the world at >>> large. But we might need a bit more formal "security team" approach >>> to make sure you don't get overwhelmed by them. Should we start a >>> new thread on how to get more help with this process? I admit to not >>> exactly know how you get into possession of these embargoed security >>> fixes ahead of time, who embargoes them, what the process is if the >>> happen to become public before the embargo date, or who else is >>> involved, etc. >> >> The group of people who are involved is limited to a few named >> individuals. > > yes, and this really sucks. Sun didn't and Oracle doesn't reach out > beyond these individuals. And these individuals only get information > about issues in the proprietary sun-java version, That's rather unfair IMO. > which have to be adjusted for OpenJDK, and even then this > information was more than once incomplete. Andrew Hughes tries to > compensate and coordinate for IcedTea, but this is really something > which could be done on the OpenJDK side. I think that it has to be individuals, for all the good security-related reasons. You can't pass security bulletins to an entire community. You have to bear in mind that Andrew Hughes is the public face of a team that's working on these security-related updates. >> This process comes from CERT, http://www.cert.org, which came into >> being after the Internet Worm. Oracle handle the reports via the >> CVE database at http://cve.mitre.org/. > > Is this so? Generally, yes. Andrew. From bugzilla-daemon at icedtea.classpath.org Mon Feb 21 04:18:24 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 21 Feb 2011 12:18:24 +0000 Subject: [Bug 637] New: "make check" succeeds even if tests failed Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=637 Summary: "make check" succeeds even if tests failed Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net Running "make check" exits with success code, even if tests failed. To fix this I see two options: 1) Exit immediately when an error occurs 2) Continue to run all tests, but touch .errors-occured when a test fails and end the "check-local" Makefile rule with "test ! -e .errors-occured" I prefer 2, because it is close to the current behaviour in that all tests are run unconditionally, and still simple to implement because it only adds a (few, haven't looked at the code) touch and one test line. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From xerxes at zafena.se Mon Feb 21 07:03:52 2011 From: xerxes at zafena.se (=?UTF-8?B?WGVyeGVzIFLDpW5ieQ==?=) Date: Mon, 21 Feb 2011 16:03:52 +0100 Subject: Announcing the IcedTea buildbot - buildslave configuration tutorial In-Reply-To: <1298280666.3387.47.camel@springer.wildebeest.org> References: <1298280666.3387.47.camel@springer.wildebeest.org> Message-ID: <4D627ED8.6090600@zafena.se> On 2011-02-21 10:31, Mark Wielaard wrote: > Hi hackers, > > Over the last few weeks Xerxes and I have been experimenting with a > buildbot setup which you can see at: > http://builder.classpath.org/icedtea/buildbot/waterfall > > The idea is that everybody who cares can add a buildslave setup to do a > build and check for the configuration and architecture they care about. > > Currently all buildslaves are based on Debian derivatives and cover > ia32, x86_64 and some arm architectures are. It does build various > alternative runtime setups (cacao, shark, zero). And the slaves build > various variants of icedtea6, icedtea7, icedtea-web (and the testrepo). > > If you have a spare machine with a dedicated internet connection that > could do builds of some configuration you care about please let us know > and we will try to add it as slave. Thank you Mark for the nice announcement. I would like to contribute with a small tutorial on how to setup a new buildslave. # First of all you need all dependencies needed to build OpenJDK installed, on Debian derivatives you can install them all by running: sudo apt-get build-dep openjdk-6 # Then we need to fetch mercurial since the buildbot will fetch all new sources to build using hg. sudo apt-get install mercurial # And finally we need to install all dependencies needed to run buildbot sudo apt-get install buildbot # I highly recommend you to sync the builders system clock with UTC # A quick way to do it are to sync the system clock using ntpdate. sudo apt-get install ntpdate sudo ntpdate-debian # On my builders I have decided to run the upstream version of buildbot-slave. # The following commands will download and install the upstream version. wget http://buildbot.googlecode.com/files/buildbot-slave-0.8.3.tar.gz tar zxvf buildbot-slave-0.8.3.tar.gz cd buildbot-slave-0.8.3 ./setup.py build sudo ./setup.py install # Test the installed buildslave # python-mock are a unittest framework for python and can be used to test if the built buildslave works as expected # When running the tests you should only see a lot of green [OK] displayed and the test should end with something like: # Ran 100 tests in 4.937s # PASSED (successes=100) sudo apt-get install python-mock PYTHONPATH=. trial buildslave.test # Setup the buildslave wget cache wrapper # This optional *hack* makes the builders wget cache all downloaded OpenJDK drops between builds. sudo mkdir /home/wgetcache sudo chmod a+w /home/wgetcache sudo chmod a+r /home/wgetcache wget http://icedtea.classpath.org/hg/buildbot/raw-file/15bb449380ba/buildslave/tools/wget.cache.wrapper sudo mv /usr/bin/wget /usr/bin/wget.real chmod +x wget.cache.wrapper sudo mv wget.cache.wrapper /usr/bin/wget #### OK all dependencies to run the buildslave and build OpenJDK are met, # now we simply need to decide a place for the buildslaves workdirectory to live. # and which user to run the slave. # Install the bot by running buildslave create-slave # The buildslave-name and password are given by the owner of the buildmaster. buildslave create-slave /var/lib/buildbot/icedtea builder.classpath.org:9989 buildslave-name password # Create a buildslave launcher script echo "cd /var/lib/buildbot/icedtea export LANG= buildslave stop /var/lib/buildbot/icedtea buildslave start /var/lib/buildbot/icedtea" > startbot.sh chmod +x startbot.sh # Edit bot information # This information will be visible on the buildmaster webpage. # example: http://builder.classpath.org/icedtea/buildbot/buildslaves/squeeze-armv5tel buildbot at openrd-client:~$ vi icedtea/info/host buildbot at openrd-client:~$ vi icedtea/info/admin # Start the bot! buildbot at openrd-client:~$ ./startbot.sh buildslave not running. Following twistd.log until startup finished.. 2011-02-21 15:12:07+0100 [-] Log opened. 2011-02-21 15:12:07+0100 [-] twistd 10.1.0 (/usr/bin/python 2.6.6) starting up. 2011-02-21 15:12:07+0100 [-] reactor class: twisted.internet.selectreactor.SelectReactor. 2011-02-21 15:12:07+0100 [-] Starting factory 2011-02-21 15:12:07+0100 [-] Connecting to builder.classpath.org:9989 2011-02-21 15:12:07+0100 [Broker,client] message from master: attached The buildslave appears to have (re)started correctly. # Have fun! # Keep a eye on the buildmasters overview page to spot problems with the bot. # http://builder.classpath.org/icedtea/buildbot/waterfall # # I have attached a logfile that display all dependencied that got installed by the commands above # for people that do not run Debian derivatives. Cheers Xerxes -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: buildslave.setup.log.txt Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110221/4303713a/buildslave.setup.log.txt From ptisnovs at redhat.com Mon Feb 21 08:40:41 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Mon, 21 Feb 2011 17:40:41 +0100 Subject: Reviewer needed - fix for regression test: test/java/io/IOException/LastErrorString.java Message-ID: <4D629589.9020201@redhat.com> Hi all, I'd like to add new patch into IcedTea6 HEAD and probably backport it into IcedTea6-1.9 too. This patch fixes issue found in regression test test/java/io/IOException/LastErrorString.java: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634 Besides the problem described above original version of this test also does not distinguish between the unreadable and unwriteable files, which I've also fixed. hg diff created against recent version of IcedTea6 HEAD and the patch itself are stored in attachments. Can anybody please review this patch? Thank you in advance Pavel PS: if this fix will be approved for IcedTea6, I'd like to push this change to OpenJDK6 and OpenJDK7 too. -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hg_diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110221/7a0365e9/hg_diff.ksh -------------- next part -------------- A non-text attachment was scrubbed... Name: jtreg-LastErrorString.patch Type: text/x-patch Size: 5747 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110221/7a0365e9/jtreg-LastErrorString.patch From ahughes at redhat.com Mon Feb 21 12:52:24 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Mon, 21 Feb 2011 20:52:24 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <1298278932.3387.28.camel@springer.wildebeest.org> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> Message-ID: <20110221205224.GA12717@rivendell.middle-earth.co.uk> On 10:02 Mon 21 Feb , Mark Wielaard wrote: > Hi Andrew, > > Thanks for the constructive email. We were both a bit too over eager to > get "our" builds to be fixed first/best. Thanks also for talking a > little off list to make sure we were keeping constructive going forward. > Any time. > On Thu, 2011-02-17 at 21:02 +0000, Dr Andrew John Hughes wrote: > > On 19:36 Thu 17 Feb , Mark Wielaard wrote: > > > No. I am happy to also test the default configuration, which I did, if I > > > am fixing issues on a non-default configuration that I care about. But > > > I am not going to test all random variants that might happen. > > > > > I'm not asking for 'all random variants'. That would be kind of crazy and > > almost unachievable :-) > > > > I do ask that, when there is an alternate HotSpot build available, then > > patches are checked against both. While hs20 may not be the default now, > > it will become so at some point in the future (probably after the imminent > > 1.10 branch). It will make things easier if it's not broken when we switch > > over. The HotSpot build option is fully documented in INSTALL. > > That does take a lot of extra time though. I really do think we > shouldn't force people to do multiple full builds, except for the > default one and the variant that they are hacking/testing. Please bear in mind that I'm not asking this for all builds; just those that change HotSpot. JDK changes, for example, only need a default build. > It would be > nice if we could somehow integrate this like we do with other > alternative VMs with --enable-additional-vms. So you can easily build > them during the main build, without having to rebuild everything else. > And people might find it nice to try them both in their builds. > As I think I've mentioned before, I'm very wary of the additional VMs option. >From my perspective, there is already a way of building these VMs (--enable-shark, --enable-cacao, --enable-zero) that ensures that the resulting VM is fully tested by rebuilding OpenJDK using it. It seems perfectly possible, with addvm, to produce VMs that are untested and may not actually even run 'java -version'. I can see how it would be advantageous from a speed perspective, but for me, if I'm going to bother building one of the alternative VMs, I want to know it actually works. Now I guess you can run 'check-hotspot' with each of the alternative VMs but I don't see why that saves anything over just doing the full build, which tests the VM heavily with lots of javac invocations. This isn't merely me wondering about its usage. I recall times when Shark would build for an addvm run but wasn't capable of completing the full bootstrap. > Also, could we have an alias for "hotspot=next" or something? Assuming > that we only support "current" and "next" hotspot, then you don't have > to remember which particular version it represents (also easier for > making sure a buildslave tracks them). > I think what you want is already catered for; as documented in README, a simple --with-hotspot-build will get you the alternative HotSpot. ORIGINAL_BUILD="original" ALTERNATE_BUILD="hs20" ... if test "x${HSBUILD}" = xyes; then HSBUILD="${ALTERNATE_BUILD}" elif test "x${HSBUILD}" = xno; then HSBUILD="${ORIGINAL_BUILD}" fi so the two alternatives are always available via --with-hotspot-build and --without-hotspot-build, the former being the one from the HotSpot tarball, the latter from the original OpenJDK tarball. > Xerxes offered to change one of his buildslaves to track hs20, so > hopefully that will also help making sure that setup doesn't > accidentally break. > Awesome. > > > If you care about non-default configurations please either make sure > > > that it is in the default build/test setup. Or provide a buildslave for > > > it, so that it is regularly tested on all commits. That is what Xerxes > > > and I did for the non-default configurations that we care about (for > > > x86_64 zero/shark isn't enabled by default, and not everybody has an arm > > > setup). > > > > I don't know how to do any of this. I didn't see any discussion or list of > > what was being added to these build bots. If I missed it, I'm sorry. I would > > have suggested that both the alternate HotSpot build (currently hs20) be checked > > and also icedtea6-hg if possible. > > > > The alternate HotSpot build and icedtea6-hg cover what's "coming soon" > > to IcedTea6 (the HotSpot build from the new stable HotSpot tree, > > icedtea6-hg from the upstream OpenJDK6 tree) and allows us to find > > things out early rather than getting hit by it all in one big lump > > when a new tarball is released. > > Agreed. And sorry for not formally announcing the existence of the > buildbot. Xerxes and I were still experimenting with various setups. And > I admit I was a little ashamed of my hacky master.cfg setup. But I > checked them all in and will send a more formal announcement with some > instructions how anybody can add a buildslave or suggest changes in the > current setup. > Great. That would be good. Now I just need to find time to look at it ;-) > > > > I'd prefer not to have yet more work on my plate because people don't do full > > > > testing of patches and commit them without any review. > > > > > > It is hard to get a good feeling for tone in an email, so apologies for > > > misinterpreting. But I really don't appreciate this nitpicking. > > > > It wasn't meant to nitpick. It was more a plea for help. It's great > > that you want to spend time looking into this and providing a fix, but > > the help is negated if it means I have to spend time doing builds to > > check for breakage or start changing things. Effectively, it's > > forcing me to look into the issue immediately, so if I sound a little > > negative, that's why. > > And also my apologies. I wasn't exactly nice in formulating my own > attempts at "helping" and asking for help. We are all a little short on > time. > Thanks. > > > You > > > committed a patch, that you didn't discuss on the list, which broke the > > > zero/shark configuration that Xerxes and I care about. > > > > In fairness, I can't really discuss embargoed security issues :-D > > We probably should discuss that a bit more. It was unfair of me to treat > these as if the were "normal" patches. You take these security issues > on, and really do make sure they get applied as soon as possible, when > the underlying issues are announced to the world at large. But we might > need a bit more formal "security team" approach to make sure you don't > get overwhelmed by them. Should we start a new thread on how to get more > help with this process? I admit to not exactly know how you get into > possession of these embargoed security fixes ahead of time, who > embargoes them, what the process is if the happen to become public > before the embargo date, or who else is involved, etc. > You're right; we haven't documented this very well, at least publicly. There are two sources of security patches; us and Oracle. As a result, there are two different ways in which they are dealt with. With our own security patches (for NetX and the plugin), we have much more choice in how to handle things. We set an exact date and time that the issue will be unembargoed, and prepare tarballs. The work is fairly distributed, as it's usually Omair and Deepak who discover such issues and provide patches for the various versions of IcedTea. I then do the actual application of the patches, and create and build the release tarballs. We currently supply Fedora, Debian & Ubuntu (via doko) and SuSE (via their security team) with encrypted tarballs ahead of time. If any other distros want to be in this loop, they should contact me privately with an encryption key. With patches from Oracle, our heads are more tied. We (as Red Hat) receive the patches. I'm not sure what the arrangement was for this, as it was established prior to me joining the company. I believe doko also receives them from Oracle. I then proceed to do the best I can to apply these patches to the various IcedTea releases. Backporting to older releases is generally not the problem (actually having 1.7 with in-tree JAXP was an advantage this time round), getting all the patches applying, building and not reproducing the issue is the main issue. The main issue, both this time and the last, was in getting a decent tarball from Oracle. It took three attempts on this occasion with the complete set only becoming available on Friday morning. That's why time was so limited. With Oracle patches, we are merely given a date and no time, so we have to continually watch for the public announcement from them, which generally occurs in the late evening or early hours of the following day here in Europe. It would be much easier if they supplied an exact time the patches could be released. I doubt more people would be much help. It's pretty difficult to split up the work of applying the patches (we've tried in the past). As I say, the main issue this time was patch availability, and thus out of our hands. Also, generally, the fewer people know, the better in these cases. Regarding issues that are already public, I guess we fix and release ASAP. With the floating point issue, again, Oracle's handling left a lot to be desired. I believe we could have had a release out with the fix before FOSDEM, but we stalled in order to allow Oracle to handle it. And then they made a release of the fix with no prior warning, and we had to play catch up. > > No, I'll admit I didn't test Shark with the patches. Having to do the > > default and alternate HotSpot builds on three release branches and > > HEAD three times over (due to us getting the security fixes in bits) > > didn't leave much time for checking more estoric options. With Shark, > > in particular, I can't remember ever having had a successful build > > more than a couple of times, so it's not high on my priorities. I > > understand it is with others, but then that's why I'm (hopefully) > > not the only person working on IcedTea6 (though it does feel like > > that sometimes). > > You do take on a lot of the grunt work on making sure IcedTea keeps up > to date and working nicely. Thanks. I admit that I was feeling like the > only person caring about making sure the "alternative" runtimes kept > working. Lets see if we can make this a bit smoother for all involved, > whatever runtime/setup they care about. That is really why Xerxes and I > started to work on the buildbot setup. See upcoming email. > Well, it is my job I guess, but I would like to do less of it and work on more interesting stuff as well if possible. I look forward to the buildbot helping out, as (contrary to the impression this thread may give) I'm strongly in favour of getting patches in the tree and available for public testing, rather than doing all of that locally. > > Well, thanks for doing this (if a little belated). It is appreciated. > > I did see the issue on IRC but I've not had time to look at it. To be > > honest, the thanks would have been immediately forthcoming if you'd > > just given me or someone else chance to scan over the patch first > > before committing it. That's not really for any technical reason so > > much as it turns a "oh heck what's this coming down the line" > > (assuming the worst, as here) into "Oh, great you fixed that. > > Thanks". > > Yes, felt it was discussed at length through the bug report and that it > was "urgent" to fix asap, seeing that the autobuilders were all broken > (because the only ones having been setup do always include all > alternative runtimes). I'll add a more basic/plain build config to one > of the buildslaves soon. And will try to have a bit more patience. > > > I'll admit I'm not too good at doing that myself, but that's more born > > from the experience that if I do, sadly no-one looks at it until I go > > and find someone and prod them... > > Grin. Well, to be honest, that was how I was feeling. Lets agree to be > more aggressive/speedy in reviewing other people patches. > Sometimes it's all I find myself doing :-) > > I hope that clears the air a bit. > > Yes, it did. Appreciated. Hope my reply do the same. > Yes, it did. Thanks. > Thanks, > > Mark > Thanks, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Mon Feb 21 13:22:51 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Mon, 21 Feb 2011 21:22:51 +0000 Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: <4D602618.9000401@zafena.se> References: <4D602618.9000401@zafena.se> Message-ID: <20110221212251.GC12717@rivendell.middle-earth.co.uk> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: > Greetings! > > "JamVM's got a shiny new Git repository, which contains the port to the > OpenJDK class-library." > http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html > > The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! > > I have tested the patch using the following three configurations on x86_64: > > # Built JamVM as the default vm implicit using HS19 makefiles. > ./configure --enable-jamvm --disable-bootstrap --disable-docs > make > ./openjdk.build/j2sdk-image/bin/java -version > java version "1.6.0_21" > OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu > build 1.6.0_21-b21) > JamVM (build 1.6.0-devel, inline-threaded interpreter) > > # Built JamVM as the default vm explicit using HS20 makefiles. > ./configure --enable-jamvm --disable-bootstrap --disable-docs > --with-hotspot-build=hs20 > make > ./openjdk.build/j2sdk-image/bin/java -version > java version "1.6.0_21" > OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu > build 1.6.0_21-b21) > JamVM (build 1.6.0-devel, inline-threaded interpreter) > > # Built JamVM as an additional vm. > ./configure --with-additional-vms=jamvm --disable-bootstrap --disable-docs > make > ./openjdk.build/j2sdk-image/bin/java -jamvm -version > java version "1.6.0_21" > OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu > build 1.6.0_21-b21) > JamVM (build 1.6.0-devel, inline-threaded interpreter) > > Ok to push? > See comments below on the --enable-jamvm option. I'll leave comments on addvm to doko. I think this should be ok to go in before the 1.10 branch as the changes to the build are mainly ancillary and don't affect the main options. > Cheers, and have a great day! > Xerxes > > Index: icedtea6/Makefile.am > =================================================================== > --- icedtea6.orig/Makefile.am 2011-02-19 02:26:05.000000000 +0100 > +++ icedtea6/Makefile.am 2011-02-19 20:58:34.000000000 +0100 > @@ -11,6 +11,18 @@ > CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz > CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz > > +# The jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz got fetched from > +# http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/snapshot/jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz > +# Unfortunally the generated .tar.gz by the berlios cgit snapshot function > +# keeps changing sha256sum. I have hosted a snapshot on labb.zafena.se > +# while we wait for the final JamVM 1.6.0 release. > +JAMVM_VERSION = e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3 > +JAMVM_SHA256SUM = 24cf67795970d7e63d297a13b370ae8c3b141c35a22c3fd96137b5e62815a607 > +JAMVM_BASE_URL = http://labb.zafena.se/jamvm > +JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz > +JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz > +JAMVM_IMPORT_PATH = \$(abs_top_builddir)/jamvm/install/hotspot > + I'd prefer JAMVM_IMPORT_PATH was with the other paths in the Makefile.am rather than here. Is there a reason for the leading backslash? > JAXWS_DROP_URL = http://icedtea.classpath.org/download/drops > JAXWS_DROP_ZIP = jdk6-jaxws-b20.zip > JAXWS_DROP_SHA256SUM = 0c460583898b968a58bf88eb53f90a0e34369e2562d65fb3a143512dfcaeb3eb > @@ -126,8 +138,13 @@ > ICEDTEA_BUILD_TARGET=jdk_only > ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only > else > +if WITH_JAMVM > + ICEDTEA_BUILD_TARGET=jdk_only > + ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only > +else > ICEDTEA_DEBUG_BUILD_TARGET = debug_build > endif > +endif > > if BOOTSTRAPPING > BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp > @@ -469,6 +486,11 @@ > ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" > endif > > +if WITH_JAMVM > +ICEDTEA_ENV += \ > + ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" > +endif > + > if DISABLE_OPTIMIZATIONS > ICEDTEA_ENV += \ > NO_OPTIMIZATIONS="true" \ > @@ -582,8 +604,10 @@ > clean-icedtea icedtea-against-icedtea clean-icedtea-ecj \ > clean-tools-jar clean-copy clean-rt hotspot \ > hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \ > - clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug > - clean-icedtea-against-ecj clean-cacao clean-add-cacao clean-add-cacao-debug \ > + clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug \ > + clean-icedtea-against-ecj \ > + clean-jamvm clean-add-jamvm clean-add-jamvm-debug \ > + clean-cacao clean-add-cacao clean-add-cacao-debug \ Good catch on the missing \. > clean-ports clean-overlay clean-extract-ecj clean-extract clean-extract-openjdk \ > clean-replace-hotspot clean-generated clean-download clean-hgforest clean-download-openjdk \ > clean-rewriter clean-rewrite-rhino clean-add-systemtap clean-add-systemtap-debug \ > @@ -740,6 +764,29 @@ > rm -f $(CACAO_SRC_ZIP) > rm -f stamps/download-cacao.stamp > > +stamps/download-jamvm.stamp: > +if BUILD_JAMVM > + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > + | $(SHA256SUM) --check ; \ > + then \ > + if [ $(JAMVM_SRC_ZIP) ] ; \ > + then \ > + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ > + fi ; \ > + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ > + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > + | $(SHA256SUM) --check ; \ > + then echo "ERROR: Bad download of JamVM zip"; false; \ > + fi; \ > + fi > +endif > + mkdir -p stamps > + touch $@ We need an option equivalent to --with-cacao-src-zip. I'd suggest adding this in a follow up patch. As with the drop tarballs, we should verify the checksum for pre-provided tarballs as well as download ones. It should be just a matter of symlinking the tarball here if an alternate one is specified. > + > +clean-download-jamvm: > + rm -f $(JAMVM_SRC_ZIP) > + rm -f stamps/download-jamvm.stamp > + > clean-drops: clean-download-jaxp-drop clean-download-jaf-drop \ > clean-download-jaxws-drop > if [ -e drops ] ; then \ > @@ -802,18 +849,19 @@ > rm -f stamps/download-openjdk.stamp > > stamps/download.stamp: stamps/download-drops.stamp stamps/download-cacao.stamp \ > - stamps/download-openjdk.stamp > + stamps/download-jamvm.stamp stamps/download-openjdk.stamp > touch stamps/download.stamp > > -clean-download: clean-drops clean-download-cacao clean-download-openjdk > +clean-download: clean-drops clean-download-cacao clean-download-jamvm \ > + clean-download-openjdk > rm -f stamps/download.stamp > > stamps/extract.stamp: stamps/extract-openjdk.stamp \ > - stamps/extract-cacao.stamp > + stamps/extract-cacao.stamp stamps/extract-jamvm.stamp > mkdir -p stamps > touch $@ > > -clean-extract: clean-extract-openjdk clean-cacao > +clean-extract: clean-extract-openjdk clean-cacao clean-jamvm > rm -f stamps/extract.stamp > > stamps/extract-openjdk.stamp: stamps/download.stamp > @@ -871,6 +919,20 @@ > mkdir -p stamps > touch stamps/extract-cacao.stamp > > +stamps/extract-jamvm.stamp: > +if BUILD_JAMVM > + set -e ; \ > + if ! test -d jamvm ; \ > + then \ > + mkdir jamvm ; \ > + $(TAR) xf $(JAMVM_SRC_ZIP) -C jamvm ; \ > + dir=$$(basename jamvm/jamvm-*) ; \ > + ln -s $$dir jamvm/jamvm ; \ > + fi > +endif > + mkdir -p stamps > + touch stamps/extract-jamvm.stamp > + > stamps/replace-hotspot.stamp: stamps/extract.stamp > if WITH_ALT_HSBUILD > if test "x${HSBUILD}" != "xoriginal"; then \ > @@ -1018,6 +1080,7 @@ > fi > > icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ > + if ! test "x$(WITH_JAMVM)" = "xno"; then \ I don't think this will work, but it's hard to tell in patch form. It looks like WITH_CACAO is getting nested inside WITH_JAMVM which means WITH_CACAO will only be checked if WITH_JAMVM is set. Can you include the whole rule in a reply? > if ! test "x$(WITH_CACAO)" = "xno"; then \ > echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ > >>openjdk/jdk/make/common/shared/Defs.gmk ; \ > @@ -1026,6 +1089,10 @@ > else \ > echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \ > >>openjdk/jdk/make/common/shared/Defs.gmk ; \ > + fi ; \ > + else \ > + echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \ > + >>openjdk/jdk/make/common/shared/Defs.gmk ; \ > fi ; > > if HAS_JDK_REVISION > @@ -1244,7 +1311,8 @@ > # If you change anything here in the icedtea target, please make sure > # you change it in the icedtea-debug target as well. > stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \ > - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp > + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ > + stamps/jamvm.stamp > $(ARCH_PREFIX) $(MAKE) \ > $(ICEDTEA_ENV) \ > -C openjdk \ > @@ -1262,6 +1330,9 @@ > if WITH_CACAO > printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg > endif > +if WITH_JAMVM > + printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg > +endif > @echo "IcedTea is served:" $(BUILD_OUTPUT_DIR) > mkdir -p stamps > touch stamps/icedtea.stamp > @@ -1271,7 +1342,8 @@ > rm -f stamps/icedtea.stamp > > stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \ > - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp > + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ > + jamvm.stamp > $(ARCH_PREFIX) $(MAKE) \ > $(ICEDTEA_ENV) \ > -C openjdk \ > @@ -1289,6 +1361,9 @@ > if WITH_CACAO > printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg > endif > +if WITH_JAMVM > + printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg > +endif > @echo "IcedTea (debug build) is served:" \ > $(DEBUG_BUILD_OUTPUT_DIR) > mkdir -p stamps > @@ -1298,22 +1373,24 @@ > rm -rf $(DEBUG_BUILD_OUTPUT_DIR) > rm -f stamps/icedtea-debug.stamp > > -stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \ > +stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp \ > + stamps/add-jamvm.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \ > stamps/add-systemtap.stamp stamps/add-pulseaudio.stamp stamps/add-nss.stamp stamps/add-tzdata-support.stamp > mkdir -p stamps > touch stamps/icedtea-against-icedtea.stamp > > -clean-icedtea-against-icedtea: clean-add-zero clean-add-cacao clean-add-systemtap clean-add-pulseaudio \ > +clean-icedtea-against-icedtea: clean-add-jamvm clean-add-zero clean-add-cacao clean-add-systemtap clean-add-pulseaudio \ > clean-add-nss clean-add-tzdata-support > rm -f stamps/icedtea-against-icedtea.stamp > > -stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp stamps/add-cacao-debug.stamp \ > +stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp \ > + stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp \ > stamps/add-zero-debug.stamp stamps/add-systemtap-debug.stamp stamps/add-pulseaudio-debug.stamp \ > stamps/add-nss-debug.stamp stamps/add/tzdata-support-debug.stamp > mkdir -p stamps > touch stamps/icedtea-debug-against-icedtea.stamp > > -clean-icedtea-debug-against-icedtea: clean-add-zero-debug clean-add-cacao-debug clean-add-systemtap-debug \ > +clean-icedtea-debug-against-icedtea: clean-add-jamvm-debug clean-add-zero-debug clean-add-cacao-debug clean-add-systemtap-debug \ > clean-add-pulseaudio-debug clean-add-nss-debug clean-add-tzdata-support-debug > rm -f stamps/icedtea-debug-against-icedtea.stamp > > @@ -1694,6 +1771,61 @@ > fi > rm -f stamps/rewrite-rhino.stamp > > +# JAMVM > + > +stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp > +if BUILD_JAMVM > + cd jamvm/jamvm && \ > + ./autogen.sh --with-java-runtime-library=openjdk \ > + --prefix=$(abs_top_builddir)/jamvm/install ; \ > + $(MAKE) ; \ > + $(MAKE) install > + mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server > + cp $(abs_top_builddir)/jamvm/install/lib/libjvm.so $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server > + ln -s server $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/client > + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt > + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so > +endif > + > +clean-jamvm: > + rm -rf jamvm > + rm -f stamps/jamvm.stamp > + rm -f stamps/extract-jamvm.stamp > + > +# Targets for additional VMs > + > +stamps/add-jamvm.stamp: stamps/icedtea.stamp stamps/jamvm.stamp > +if ADD_JAMVM_BUILD > + mkdir -p $(BUILD_JRE_ARCH_DIR)/jamvm > + install -m 644 jamvm/install/lib/libjvm.so \ > + $(BUILD_JRE_ARCH_DIR)/jamvm/ > + printf -- '-jamvm KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg > +else > + printf -- '-jamvm ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg > +endif > + touch $@ > + > +clean-add-jamvm: > + rm -rf $(BUILD_JRE_ARCH_DIR)/jamvm > + sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg > + rm -f stamps/add-jamvm.stamp > + > +stamps/add-jamvm-debug.stamp: stamps/icedtea-debug.stamp stamps/jamvm.stamp > +if ADD_JAMVM_BUILD > + mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm > + install -m 644 jamvm/install/lib/libjvm.so \ > + $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm/ > + printf -- '-jamvm KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg > +else > + printf -- '-jamvm ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg > +endif > + touch $@ > + > +clean-add-jamvm-debug: > + rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm > + sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg > + rm -f stamps/add-jamvm-debug.stamp > + > # CACAO > > stamps/cacao.stamp: $(OPENJDK_TREE) stamps/rt.stamp > @@ -2058,6 +2190,8 @@ > > download-drops: stamps/download-drops.stamp > > +download-jamvm: stamps/download-jamvm.stamp > + > download-jaf-drop: stamps/download-jaf-drop.stamp > > download-jaxp-drop: stamps/download-jaxp-drop.stamp > @@ -2082,6 +2216,8 @@ > > icedtea-ecj: stamps/icedtea-ecj.stamp > > +jamvm: stamps/jamvm.stamp > + > jtreg: stamps/jtreg.stamp > > liveconnect: stamps/liveconnect.stamp > Index: icedtea6/configure.ac > =================================================================== > --- icedtea6.orig/configure.ac 2011-02-19 02:26:05.000000000 +0100 > +++ icedtea6/configure.ac 2011-02-19 02:26:38.000000000 +0100 > @@ -175,6 +175,9 @@ > AC_CHECK_WITH_CACAO_HOME > AC_CHECK_WITH_CACAO_SRC_ZIP > AC_CHECK_WITH_CACAO_SRC_DIR > + > +AC_CHECK_ENABLE_JAMVM > + Please use IT as the prefix rather than AC. We are not the autoconf project :-) > DISABLE_OPTIMIZATIONS > SET_SHARK_BUILD > ENABLE_ZERO_BUILD > Index: icedtea6/acinclude.m4 > =================================================================== > --- icedtea6.orig/acinclude.m4 2011-02-19 02:26:05.000000000 +0100 > +++ icedtea6/acinclude.m4 2011-02-19 03:23:52.000000000 +0100 > @@ -746,11 +746,15 @@ > sparc*-*-*) ;; > x86_64-*-*) ;; > *) > - if test "x${WITH_CACAO}" != xno; then > + if test "x${WITH_JAMVM}" != xno; then > use_zero=no > else > - use_zero=yes > - fi > + if test "x${WITH_CACAO}" != xno; then > + use_zero=no > + else > + use_zero=yes > + fi > + fi This would be clearer if you just added JAMVM as a new option rather than changing the CACAO one. > ;; > esac > fi > @@ -820,6 +824,23 @@ > AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) > ]) > > +AC_DEFUN([AC_CHECK_ENABLE_JAMVM], > +[ > + AC_MSG_CHECKING(whether to use JamVM as VM) > + AC_ARG_ENABLE([jamvm], > + [AS_HELP_STRING(--enable-jamvm,use JamVM as VM [[default=no]])], > + [ > + WITH_JAMVM="${enableval}" > + ], > + [ > + WITH_JAMVM=no > + ]) > + > + AC_MSG_RESULT(${WITH_JAMVM}) > + AM_CONDITIONAL(WITH_JAMVM, test x"${WITH_JAMVM}" = "xyes") > + AC_SUBST(WITH_JAMVM) > +]) > + Again, should be IT_CHECK_ENABLE_JAMVM. Why are we using 'WITH_JAMVM' rather than 'ENABLE_JAMVM'? 'with' implies it's possible to take some option but we aren't using AC_ARG_WITH but AC_ARG_ENABLE. Also if it is only yes/no a lot of the above would be simpler if we just tested for 'yes'. It seems to assume some other value is possible. > AC_DEFUN([AC_CHECK_ENABLE_CACAO], > [ > AC_MSG_CHECKING(whether to use CACAO as VM) > @@ -1144,13 +1165,14 @@ > AC_MSG_CHECKING([for additional virtual machines to build]) > AC_ARG_WITH(additional-vms, > AC_HELP_STRING([--with-additional-vms=vm-list], > - [build additional virtual machines. Valid value is a comma separated string with the backend names `cacao', `zero' and `shark'.]), > + [build additional virtual machines. Valid value is a comma separated string with the backend names `jamvm', `cacao', `zero' and `shark'.]), > [ > if test "x${withval}" != x > then > with_additional_vms=${withval} > for vm in `echo $with_additional_vms | sed 's/,/ /g'`; do > case "x$vm" in > + xjamvm) add_vm_jamvm=yes;; > xcacao) add_vm_cacao=yes;; > xzero) add_vm_zero=yes;; > xshark) add_vm_shark=yes;; > @@ -1163,11 +1185,16 @@ > fi > AC_MSG_RESULT($with_additional_vms) > > +AM_CONDITIONAL(ADD_JAMVM_BUILD, test x$add_vm_jamvm != x) > AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x) > AM_CONDITIONAL(ADD_ZERO_BUILD, test x$add_vm_zero != x || test x$add_vm_shark != x) > AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x) > +AM_CONDITIONAL(BUILD_JAMVM, test x$add_vm_jamvm != x || test "x${WITH_JAMVM}" = xyes) > AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes) > > +if test "x${WITH_JAMVM}" = xyes && test "x${ADD_JAMVM_BUILD_TRUE}" = x; then > + AC_MSG_ERROR([additional vm is the default vm]) > +fi > if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then > AC_MSG_ERROR([additional vm is the default vm]) > fi -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Mon Feb 21 13:37:09 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 21 Feb 2011 21:37:09 +0000 Subject: [Bug 631] icedtea6-1.9.7 fails to build on ppc/ppc64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=631 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |WORKSFORME ------- Comment #17 from gnu_andrew at member.fsf.org 2011-02-21 21:37 ------- This bug is not related to zero. Please see http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=632 or open another bug. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Mon Feb 21 13:44:35 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Mon, 21 Feb 2011 21:44:35 +0000 Subject: Announcing the IcedTea buildbot In-Reply-To: <1298280666.3387.47.camel@springer.wildebeest.org> References: <1298280666.3387.47.camel@springer.wildebeest.org> Message-ID: <20110221214435.GF12717@rivendell.middle-earth.co.uk> On 10:31 Mon 21 Feb , Mark Wielaard wrote: > Hi hackers, > > Over the last few weeks Xerxes and I have been experimenting with a > buildbot setup which you can see at: > http://builder.classpath.org/icedtea/buildbot/waterfall > > The idea is that everybody who cares can add a buildslave setup to do a > build and check for the configuration and architecture they care about. > > Currently all buildslaves are based on Debian derivatives and cover > ia32, x86_64 and some arm architectures are. It does build various > alternative runtime setups (cacao, shark, zero). And the slaves build > various variants of icedtea6, icedtea7, icedtea-web (and the testrepo). > > If you have a spare machine with a dedicated internet connection that > could do builds of some configuration you care about please let us know > and we will try to add it as slave. If you have an alternative > configuration you want to see done by one of the existing build slaves > please also let us know and we can see if there are enough cycles to add > it. > > The current buildbot master.cfg setup is checked in at > http://icedtea.classpath.org/hg/buildbot > I admit the master.cfg is a bit hacky. It needs to be cleaned up so that > we have nice functions/factories for generating the build steps based on > whether the slave wants to do a quick/full, special config flags, > parallel, with/without some checks, etc. build instead of the current > copy/paste hell that is there. But although I am a little ashamed of how > bad my python skills are, it seemed better to just admit it needs > cleanup and ask for help from those more proficient in python :) > > Also checked in is the old hacky bash shell script that is still running > on builder.classpath.org and that sends emails as soon as the build of > icedtea6 or icedtea7 trunk fails and/or the test results change. It > would be nice to transfer any missing functionality to the new buildbot > setup (like the test results comparison), so that any build slave that > wishes can do the same. Since this script also still produces binaries > everybody can use and full jtreg test result files, see under > http://builder.classpath.org/icedtea/. I decided to keep this also still > running. But would really, really like to get rid of in the future. > > Feedback on how we can make this buildbot setup more productive for > anybody hacking on icedtea really appreciated. > > Thanks, > > Mark > My immediate suggestion would be to provide testing of icedtea6-hg (which builds against OpenJDK6 hg) and also the icedtea6-1.10 branch which should appear later today. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From rob.lougher at gmail.com Mon Feb 21 13:40:00 2011 From: rob.lougher at gmail.com (Robert Lougher) Date: Mon, 21 Feb 2011 21:40:00 +0000 Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: <20110221212251.GC12717@rivendell.middle-earth.co.uk> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> Message-ID: Hi, On 21 February 2011 21:22, Dr Andrew John Hughes wrote: > On 21:20 Sat 19 Feb ? ? , Xerxes Ranby wrote: >> Greetings! >> >> "JamVM's got a shiny new Git repository, which contains the port to the >> OpenJDK class-library." >> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >> >> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >> >> I have tested the patch using the following three configurations on x86_64: >> >> # Built JamVM as the default vm implicit using HS19 makefiles. >> ./configure --enable-jamvm --disable-bootstrap --disable-docs >> make >> ./openjdk.build/j2sdk-image/bin/java -version >> java version "1.6.0_21" >> OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu >> build 1.6.0_21-b21) >> JamVM (build 1.6.0-devel, inline-threaded interpreter) >> >> # Built JamVM as the default vm explicit using HS20 makefiles. >> ./configure --enable-jamvm --disable-bootstrap --disable-docs >> --with-hotspot-build=hs20 >> make >> ./openjdk.build/j2sdk-image/bin/java -version >> java version "1.6.0_21" >> OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu >> build 1.6.0_21-b21) >> JamVM (build 1.6.0-devel, inline-threaded interpreter) >> >> # Built JamVM as an additional vm. >> ./configure --with-additional-vms=jamvm --disable-bootstrap --disable-docs >> make >> ./openjdk.build/j2sdk-image/bin/java -jamvm -version >> java version "1.6.0_21" >> OpenJDK Runtime Environment (IcedTea6 1.10pre+r70ea35e42b14) (Ubuntu >> build 1.6.0_21-b21) >> JamVM (build 1.6.0-devel, inline-threaded interpreter) >> >> Ok to push? >> > > See comments below on the --enable-jamvm option. > I'll leave comments on addvm to doko. > > I think this should be ok to go in before the 1.10 branch as the changes > to the build are mainly ancillary and don't affect the main options. > Xerxes, can you take a new snapshot from the berlios git tree? A couple of people have already tested the port. One of them (Ludovic Orban) reported a crash with an application which stressed the GC (failure after compaction). I tracked this down over the weekend, and the port is now running stably. Rob. P.S. Thanks for doing the integration! >> Cheers, and have a great day! >> Xerxes >> > >> Index: icedtea6/Makefile.am >> =================================================================== >> --- icedtea6.orig/Makefile.am 2011-02-19 02:26:05.000000000 +0100 >> +++ icedtea6/Makefile.am ? ? ?2011-02-19 20:58:34.000000000 +0100 >> @@ -11,6 +11,18 @@ >> ?CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz >> ?CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz >> >> +# The jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz got fetched from >> +# http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/snapshot/jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz >> +# Unfortunally the generated .tar.gz by the berlios cgit snapshot function >> +# keeps changing sha256sum. I have hosted a snapshot on labb.zafena.se >> +# while we wait for the final JamVM 1.6.0 release. >> +JAMVM_VERSION = e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3 >> +JAMVM_SHA256SUM = 24cf67795970d7e63d297a13b370ae8c3b141c35a22c3fd96137b5e62815a607 >> +JAMVM_BASE_URL = http://labb.zafena.se/jamvm >> +JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz >> +JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz >> +JAMVM_IMPORT_PATH = \$(abs_top_builddir)/jamvm/install/hotspot >> + > > I'd prefer JAMVM_IMPORT_PATH was with the other paths in the Makefile.am rather than here. > Is there a reason for the leading backslash? > >> ?JAXWS_DROP_URL = http://icedtea.classpath.org/download/drops >> ?JAXWS_DROP_ZIP = jdk6-jaxws-b20.zip >> ?JAXWS_DROP_SHA256SUM = 0c460583898b968a58bf88eb53f90a0e34369e2562d65fb3a143512dfcaeb3eb >> @@ -126,8 +138,13 @@ >> ? ?ICEDTEA_BUILD_TARGET=jdk_only >> ? ?ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only >> ?else >> +if WITH_JAMVM >> + ?ICEDTEA_BUILD_TARGET=jdk_only >> + ?ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only >> +else >> ? ?ICEDTEA_DEBUG_BUILD_TARGET = debug_build >> ?endif >> +endif >> >> ?if BOOTSTRAPPING >> ? ?BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp >> @@ -469,6 +486,11 @@ >> ? ? ? ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" >> ?endif >> >> +if WITH_JAMVM >> +ICEDTEA_ENV += \ >> + ? ? ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" >> +endif >> + >> ?if DISABLE_OPTIMIZATIONS >> ?ICEDTEA_ENV += \ >> ? ? ? NO_OPTIMIZATIONS="true" \ >> @@ -582,8 +604,10 @@ >> ? ? ? clean-icedtea icedtea-against-icedtea clean-icedtea-ecj \ >> ? ? ? clean-tools-jar clean-copy clean-rt hotspot \ >> ? ? ? hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \ >> - ? ? clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug >> - ? ? clean-icedtea-against-ecj clean-cacao clean-add-cacao clean-add-cacao-debug \ >> + ? ? clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug \ >> + ? ? clean-icedtea-against-ecj \ >> + ? ? clean-jamvm clean-add-jamvm clean-add-jamvm-debug \ >> + ? ? clean-cacao clean-add-cacao clean-add-cacao-debug \ > > Good catch on the missing \. > >> ? ? ? clean-ports clean-overlay clean-extract-ecj clean-extract clean-extract-openjdk \ >> ? ? ? clean-replace-hotspot clean-generated clean-download clean-hgforest clean-download-openjdk \ >> ? ? ? clean-rewriter clean-rewrite-rhino clean-add-systemtap clean-add-systemtap-debug \ >> @@ -740,6 +764,29 @@ >> ? ? ? rm -f $(CACAO_SRC_ZIP) >> ? ? ? rm -f stamps/download-cacao.stamp >> >> +stamps/download-jamvm.stamp: >> +if BUILD_JAMVM >> + ? ? if ! echo "$(JAMVM_SHA256SUM) ?$(JAMVM_SRC_ZIP)" \ >> + ? ? ?| $(SHA256SUM) --check ; \ >> + ? ? then \ >> + ? ? ?if [ $(JAMVM_SRC_ZIP) ] ; \ >> + ? ? ?then \ >> + ? ? ? ?mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ >> + ? ? ?fi ; \ >> + ? ? ?$(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ >> + ? ? ?if ! echo "$(JAMVM_SHA256SUM) ?$(JAMVM_SRC_ZIP)" \ >> + ? ? ? | $(SHA256SUM) --check ; \ >> + ? ? ?then echo "ERROR: Bad download of JamVM zip"; false; \ >> + ? ? ?fi; \ >> + ? ? fi >> +endif >> + ? ? mkdir -p stamps >> + ? ? touch $@ > > We need an option equivalent to --with-cacao-src-zip. ?I'd suggest > adding this in a follow up patch. ?As with the drop tarballs, we > should verify the checksum for pre-provided tarballs as well as > download ones. ?It should be just a matter of symlinking the tarball > here if an alternate one is specified. > >> + >> +clean-download-jamvm: >> + ? ? rm -f $(JAMVM_SRC_ZIP) >> + ? ? rm -f stamps/download-jamvm.stamp >> + >> ?clean-drops: clean-download-jaxp-drop clean-download-jaf-drop \ >> ? clean-download-jaxws-drop >> ? ? ? if [ -e drops ] ; then \ >> @@ -802,18 +849,19 @@ >> ? ? ? rm -f stamps/download-openjdk.stamp >> >> ?stamps/download.stamp: stamps/download-drops.stamp stamps/download-cacao.stamp \ >> - stamps/download-openjdk.stamp >> + stamps/download-jamvm.stamp stamps/download-openjdk.stamp >> ? ? ? touch stamps/download.stamp >> >> -clean-download: clean-drops clean-download-cacao clean-download-openjdk >> +clean-download: clean-drops clean-download-cacao clean-download-jamvm \ >> + clean-download-openjdk >> ? ? ? rm -f stamps/download.stamp >> >> ?stamps/extract.stamp: stamps/extract-openjdk.stamp \ >> - stamps/extract-cacao.stamp >> + stamps/extract-cacao.stamp stamps/extract-jamvm.stamp >> ? ? ? mkdir -p stamps >> ? ? ? touch $@ >> >> -clean-extract: clean-extract-openjdk clean-cacao >> +clean-extract: clean-extract-openjdk clean-cacao clean-jamvm >> ? ? ? rm -f stamps/extract.stamp >> >> ?stamps/extract-openjdk.stamp: stamps/download.stamp >> @@ -871,6 +919,20 @@ >> ? ? ? mkdir -p stamps >> ? ? ? touch stamps/extract-cacao.stamp >> >> +stamps/extract-jamvm.stamp: >> +if BUILD_JAMVM >> + ? ? set -e ; \ >> + ? ? if ! test -d jamvm ; \ >> + ? ? then \ >> + ? ? ? mkdir jamvm ; \ >> + ? ? ? $(TAR) xf $(JAMVM_SRC_ZIP) -C jamvm ; \ >> + ? ? ? dir=$$(basename jamvm/jamvm-*) ; \ >> + ? ? ? ln -s $$dir jamvm/jamvm ; \ >> + ? ? fi >> +endif >> + ? ? mkdir -p stamps >> + ? ? touch stamps/extract-jamvm.stamp >> + >> ?stamps/replace-hotspot.stamp: stamps/extract.stamp >> ?if WITH_ALT_HSBUILD >> ? ? ? if test "x${HSBUILD}" != "xoriginal"; then \ >> @@ -1018,6 +1080,7 @@ >> ? ? ? fi >> >> ? ? ? icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ >> + ? ? ? ?if ! test "x$(WITH_JAMVM)" = "xno"; then \ > > I don't think this will work, but it's hard to tell in patch form. > It looks like WITH_CACAO is getting nested inside WITH_JAMVM which > means WITH_CACAO will only be checked if WITH_JAMVM is set. > > Can you include the whole rule in a reply? > >> ? ? ? if ! test "x$(WITH_CACAO)" = "xno"; then \ >> ? ? ? ? echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ >> ? ? ? ? ? >>openjdk/jdk/make/common/shared/Defs.gmk ; \ >> @@ -1026,6 +1089,10 @@ >> ? ? ? else \ >> ? ? ? ? echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \ >> ? ? ? ? ? >>openjdk/jdk/make/common/shared/Defs.gmk ; \ >> + ? ? fi ; \ >> + ? ? else \ >> + ? ? ? echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \ >> + ? ? ? ?>>openjdk/jdk/make/common/shared/Defs.gmk ; \ >> ? ? ? fi ; >> >> ?if HAS_JDK_REVISION >> @@ -1244,7 +1311,8 @@ >> ?# If you change anything here in the icedtea target, please make sure >> ?# you change it in the icedtea-debug target as well. >> ?stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \ >> - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp >> + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ >> + stamps/jamvm.stamp >> ? ? ? $(ARCH_PREFIX) $(MAKE) \ >> ? ? ? ? $(ICEDTEA_ENV) \ >> ? ? ? ? -C openjdk \ >> @@ -1262,6 +1330,9 @@ >> ?if WITH_CACAO >> ? ? ? printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg >> ?endif >> +if WITH_JAMVM >> + ? ? printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg >> +endif >> ? ? ? @echo "IcedTea is served:" $(BUILD_OUTPUT_DIR) >> ? ? ? mkdir -p stamps >> ? ? ? touch stamps/icedtea.stamp >> @@ -1271,7 +1342,8 @@ >> ? ? ? rm -f stamps/icedtea.stamp >> >> ?stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \ >> - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp >> + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ >> + jamvm.stamp >> ? ? ? $(ARCH_PREFIX) $(MAKE) \ >> ? ? ? ? $(ICEDTEA_ENV) \ >> ? ? ? ? -C openjdk \ >> @@ -1289,6 +1361,9 @@ >> ?if WITH_CACAO >> ? ? ? printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg >> ?endif >> +if WITH_JAMVM >> + ? ? printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg >> +endif >> ? ? ? @echo "IcedTea (debug build) is served:" \ >> ? ? ? ? $(DEBUG_BUILD_OUTPUT_DIR) >> ? ? ? mkdir -p stamps >> @@ -1298,22 +1373,24 @@ >> ? ? ? rm -rf $(DEBUG_BUILD_OUTPUT_DIR) >> ? ? ? rm -f stamps/icedtea-debug.stamp >> >> -stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \ >> +stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp \ >> + stamps/add-jamvm.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \ >> ? stamps/add-systemtap.stamp stamps/add-pulseaudio.stamp stamps/add-nss.stamp stamps/add-tzdata-support.stamp >> ? ? ? mkdir -p stamps >> ? ? ? touch stamps/icedtea-against-icedtea.stamp >> >> -clean-icedtea-against-icedtea: clean-add-zero clean-add-cacao clean-add-systemtap clean-add-pulseaudio \ >> +clean-icedtea-against-icedtea: clean-add-jamvm clean-add-zero clean-add-cacao clean-add-systemtap clean-add-pulseaudio \ >> ? clean-add-nss clean-add-tzdata-support >> ? ? ? rm -f stamps/icedtea-against-icedtea.stamp >> >> -stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp stamps/add-cacao-debug.stamp \ >> +stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp \ >> + stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp \ >> ? stamps/add-zero-debug.stamp stamps/add-systemtap-debug.stamp stamps/add-pulseaudio-debug.stamp \ >> ? stamps/add-nss-debug.stamp stamps/add/tzdata-support-debug.stamp >> ? ? ? mkdir -p stamps >> ? ? ? touch stamps/icedtea-debug-against-icedtea.stamp >> >> -clean-icedtea-debug-against-icedtea: clean-add-zero-debug clean-add-cacao-debug clean-add-systemtap-debug \ >> +clean-icedtea-debug-against-icedtea: clean-add-jamvm-debug clean-add-zero-debug clean-add-cacao-debug clean-add-systemtap-debug \ >> ? clean-add-pulseaudio-debug clean-add-nss-debug clean-add-tzdata-support-debug >> ? ? ? rm -f stamps/icedtea-debug-against-icedtea.stamp >> >> @@ -1694,6 +1771,61 @@ >> ? ? ? fi >> ? ? ? rm -f stamps/rewrite-rhino.stamp >> >> +# JAMVM >> + >> +stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp >> +if BUILD_JAMVM >> + ? ? cd jamvm/jamvm && \ >> + ? ? ./autogen.sh --with-java-runtime-library=openjdk \ >> + ? ? ? --prefix=$(abs_top_builddir)/jamvm/install ; \ >> + ? ? $(MAKE) ; \ >> + ? ? $(MAKE) install >> + ? ? mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server >> + ? ? cp $(abs_top_builddir)/jamvm/install/lib/libjvm.so $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server >> + ? ? ln -s server $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/client >> + ? ? touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt >> + ? ? touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so >> +endif >> + >> +clean-jamvm: >> + ? ? rm -rf jamvm >> + ? ? rm -f stamps/jamvm.stamp >> + ? ? rm -f stamps/extract-jamvm.stamp >> + >> +# Targets for additional VMs >> + >> +stamps/add-jamvm.stamp: stamps/icedtea.stamp stamps/jamvm.stamp >> +if ADD_JAMVM_BUILD >> + ? ? mkdir -p $(BUILD_JRE_ARCH_DIR)/jamvm >> + ? ? install -m 644 jamvm/install/lib/libjvm.so \ >> + ? ? ? ? ? ? $(BUILD_JRE_ARCH_DIR)/jamvm/ >> + ? ? printf -- '-jamvm KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg >> +else >> + ? ? printf -- '-jamvm ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg >> +endif >> + ? ? touch $@ >> + >> +clean-add-jamvm: >> + ? ? rm -rf $(BUILD_JRE_ARCH_DIR)/jamvm >> + ? ? sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg >> + ? ? rm -f stamps/add-jamvm.stamp >> + >> +stamps/add-jamvm-debug.stamp: stamps/icedtea-debug.stamp stamps/jamvm.stamp >> +if ADD_JAMVM_BUILD >> + ? ? mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm >> + ? ? install -m 644 jamvm/install/lib/libjvm.so \ >> + ? ? ? ? ? ? $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm/ >> + ? ? printf -- '-jamvm KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg >> +else >> + ? ? printf -- '-jamvm ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg >> +endif >> + ? ? touch $@ >> + >> +clean-add-jamvm-debug: >> + ? ? rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm >> + ? ? sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg >> + ? ? rm -f stamps/add-jamvm-debug.stamp >> + >> ?# CACAO >> >> ?stamps/cacao.stamp: $(OPENJDK_TREE) stamps/rt.stamp >> @@ -2058,6 +2190,8 @@ >> >> ?download-drops: stamps/download-drops.stamp >> >> +download-jamvm: stamps/download-jamvm.stamp >> + >> ?download-jaf-drop: stamps/download-jaf-drop.stamp >> >> ?download-jaxp-drop: stamps/download-jaxp-drop.stamp >> @@ -2082,6 +2216,8 @@ >> >> ?icedtea-ecj: stamps/icedtea-ecj.stamp >> >> +jamvm: stamps/jamvm.stamp >> + >> ?jtreg: stamps/jtreg.stamp >> >> ?liveconnect: stamps/liveconnect.stamp >> Index: icedtea6/configure.ac >> =================================================================== >> --- icedtea6.orig/configure.ac ? ? ? ?2011-02-19 02:26:05.000000000 +0100 >> +++ icedtea6/configure.ac ? ? 2011-02-19 02:26:38.000000000 +0100 >> @@ -175,6 +175,9 @@ >> ?AC_CHECK_WITH_CACAO_HOME >> ?AC_CHECK_WITH_CACAO_SRC_ZIP >> ?AC_CHECK_WITH_CACAO_SRC_DIR >> + >> +AC_CHECK_ENABLE_JAMVM >> + > > Please use IT as the prefix rather than AC. ?We are not the autoconf project :-) > >> ?DISABLE_OPTIMIZATIONS >> ?SET_SHARK_BUILD >> ?ENABLE_ZERO_BUILD >> Index: icedtea6/acinclude.m4 >> =================================================================== >> --- icedtea6.orig/acinclude.m4 ? ? ? ?2011-02-19 02:26:05.000000000 +0100 >> +++ icedtea6/acinclude.m4 ? ? 2011-02-19 03:23:52.000000000 +0100 >> @@ -746,11 +746,15 @@ >> ? ? ? ? ?sparc*-*-*) ;; >> ? ? ? ? ?x86_64-*-*) ;; >> ? ? ? ? ?*) >> - ? ? ? ? ?if test "x${WITH_CACAO}" != xno; then >> + ? ? ? ? ?if test "x${WITH_JAMVM}" != xno; then >> ? ? ? ? ? ? ?use_zero=no >> ? ? ? ? ? ?else >> - ? ? ? ? ? ?use_zero=yes >> - ? ? ? ? ?fi >> + ? ? ? ? ? ?if test "x${WITH_CACAO}" != xno; then >> + ? ? ? ? ? ? ?use_zero=no >> + ? ? ? ? ? ?else >> + ? ? ? ? ? ? ?use_zero=yes >> + ? ? ? ? ? ?fi >> + ? ? ? fi > > This would be clearer if you just added JAMVM as a new option > rather than changing the CACAO one. > >> ? ? ? ? ? ?;; >> ? ? ? ?esac >> ? ? ?fi >> @@ -820,6 +824,23 @@ >> ? ?AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) >> ?]) >> >> +AC_DEFUN([AC_CHECK_ENABLE_JAMVM], >> +[ >> + ?AC_MSG_CHECKING(whether to use JamVM as VM) >> + ?AC_ARG_ENABLE([jamvm], >> + ? ? ? ? ? [AS_HELP_STRING(--enable-jamvm,use JamVM as VM [[default=no]])], >> + ?[ >> + ? ?WITH_JAMVM="${enableval}" >> + ?], >> + ?[ >> + ? ?WITH_JAMVM=no >> + ?]) >> + >> + ?AC_MSG_RESULT(${WITH_JAMVM}) >> + ?AM_CONDITIONAL(WITH_JAMVM, test x"${WITH_JAMVM}" = "xyes") >> + ?AC_SUBST(WITH_JAMVM) >> +]) >> + > > Again, should be IT_CHECK_ENABLE_JAMVM. > Why are we using 'WITH_JAMVM' rather than 'ENABLE_JAMVM'? ?'with' implies it's possible to > take some option but we aren't using AC_ARG_WITH but AC_ARG_ENABLE. > Also if it is only yes/no a lot of the above would be simpler if we just tested for 'yes'. > It seems to assume some other value is possible. > >> ?AC_DEFUN([AC_CHECK_ENABLE_CACAO], >> ?[ >> ? ?AC_MSG_CHECKING(whether to use CACAO as VM) >> @@ -1144,13 +1165,14 @@ >> ?AC_MSG_CHECKING([for additional virtual machines to build]) >> ?AC_ARG_WITH(additional-vms, >> ? ? ? ? ? ? ?AC_HELP_STRING([--with-additional-vms=vm-list], >> - ? ? ? ? [build additional virtual machines. Valid value is a comma separated string with the backend names `cacao', `zero' and `shark'.]), >> + ? ? ? ? [build additional virtual machines. Valid value is a comma separated string with the backend names `jamvm', `cacao', `zero' and `shark'.]), >> ?[ >> ?if test "x${withval}" != x >> ?then >> ? ?with_additional_vms=${withval} >> ? ?for vm in `echo $with_additional_vms | sed 's/,/ /g'`; do >> ? ? ?case "x$vm" in >> + ? ? ?xjamvm) add_vm_jamvm=yes;; >> ? ? ? ?xcacao) add_vm_cacao=yes;; >> ? ? ? ?xzero) ?add_vm_zero=yes;; >> ? ? ? ?xshark) add_vm_shark=yes;; >> @@ -1163,11 +1185,16 @@ >> ?fi >> ?AC_MSG_RESULT($with_additional_vms) >> >> +AM_CONDITIONAL(ADD_JAMVM_BUILD, test x$add_vm_jamvm != x) >> ?AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x) >> ?AM_CONDITIONAL(ADD_ZERO_BUILD, ?test x$add_vm_zero ?!= x || test x$add_vm_shark != x) >> ?AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x) >> +AM_CONDITIONAL(BUILD_JAMVM, test x$add_vm_jamvm != x || test "x${WITH_JAMVM}" = xyes) >> ?AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes) >> >> +if test "x${WITH_JAMVM}" = xyes && test "x${ADD_JAMVM_BUILD_TRUE}" = x; then >> + ?AC_MSG_ERROR([additional vm is the default vm]) >> +fi >> ?if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then >> ? ?AC_MSG_ERROR([additional vm is the default vm]) >> ?fi > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D ?0698 0713 C3ED F586 2A37 > From ahughes at redhat.com Mon Feb 21 13:48:39 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Mon, 21 Feb 2011 21:48:39 +0000 Subject: Reviewer needed - fix for regression test: test/java/io/IOException/LastErrorString.java In-Reply-To: <4D629589.9020201@redhat.com> References: <4D629589.9020201@redhat.com> Message-ID: <20110221214839.GG12717@rivendell.middle-earth.co.uk> On 17:40 Mon 21 Feb , Pavel Tisnovsky wrote: > Hi all, > > I'd like to add new patch into IcedTea6 HEAD and probably backport it > into IcedTea6-1.9 too. This patch fixes issue found in regression test > test/java/io/IOException/LastErrorString.java: > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634 > > Besides the problem described above original version of this test also > does not distinguish between the unreadable and unwriteable files, which > I've also fixed. > Can you elaborate on what changes you made? It's not very obvious from the patch. Does the test now avoid /etc/shadow? > hg diff created against recent version of IcedTea6 HEAD and the patch > itself are stored in attachments. > > Can anybody please review this patch? > > Thank you in advance > Pavel > > > PS: if this fix will be approved for IcedTea6, I'd like to push this > change to OpenJDK6 and OpenJDK7 too. I can't give approval for that. > diff -r 55566ffe7026 ChangeLog > --- a/ChangeLog Mon Feb 21 10:10:16 2011 +0100 > +++ b/ChangeLog Mon Feb 21 17:37:35 2011 +0100 > @@ -1,3 +1,10 @@ > +2011-02-21 Pavel Tisnovsky > + > + * Makefile.am: Add patch. > + * patches/jtreg-LastErrorString.patch: > + Testcase correction - the test LastErrorString must not rewrite system > + files. > + > 2011-02-21 Xerxes Ranby > > PR600: HS19 upgrade broke CACAO build on ARM > diff -r 55566ffe7026 Makefile.am > --- a/Makefile.am Mon Feb 21 10:10:16 2011 +0100 > +++ b/Makefile.am Mon Feb 21 17:37:35 2011 +0100 > @@ -307,7 +307,8 @@ > patches/g344659-sparc_fix.patch \ > patches/openjdk/6728834-blurred-lcd-aa-text.patch \ > patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ > - patches/openjdk/6896068-sg2d.patch > + patches/openjdk/6896068-sg2d.patch \ > + patches/jtreg-LastErrorString.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r 55566ffe7026 patches/jtreg-LastErrorString.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/jtreg-LastErrorString.patch Mon Feb 21 17:37:35 2011 +0100 > @@ -0,0 +1,201 @@ > +diff -Nru IOException/LastErrorString.java /home/brq/ptisnovs/IOException/LastErrorString.java > +--- openjdk-old/jdk/test/java/io/IOException/LastErrorString.java 2011-01-21 00:54:47.000000000 +0100 > ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2011-02-21 15:34:58.972481000 +0100 > +@@ -21,9 +21,13 @@ > + * questions. > + */ > + > +-/* @test > +- @bug 4167937 > +- @summary Test code paths that use the JVM_LastErrorString procedure > ++/* > ++ * @test > ++ * @bug 4167937 > ++ * @summary Test code paths that use the JVM_LastErrorString procedure > ++ * > ++ * @compile LastErrorString.java > ++ * @run shell LastErrorString.sh > + */ > + > + import java.io.IOException; > +@@ -37,33 +41,11 @@ > + > + static String UNWRITEABLE_DIR; > + static String UNREADABLE_FILE; > ++ static String UNWRITEABLE_FILE; > + static String READABLE_FILE; > + static String WRITEABLE_FILE; > + static String INVALID_PATH; > + > +- static { > +- if (File.separatorChar == '/') { > +- UNWRITEABLE_DIR = "/etc/dfs"; > +- UNREADABLE_FILE = "/etc/shadow"; > +- } else if (File.separatorChar == '\\') { > +- UNREADABLE_FILE = "c:/pagefile.sys"; > +- UNWRITEABLE_DIR = "z:/fooBAR/baz/GORP"; > +- } else { > +- throw new RuntimeException("What kind of system is this?"); > +- } > +- File d = new File(System.getProperty("test.src", ".")); > +- READABLE_FILE = new File(d, "LastErrorString.java").getPath(); > +- WRITEABLE_FILE = "x.LastErrorString"; > +- String s = "foo/"; > +- for (;;) { > +- s = s + s; > +- if (s.length() > 8192) break; > +- } > +- s += "bar"; > +- INVALID_PATH = s; > +- } > +- > +- > + static abstract class Test { > + > + String name; > +@@ -197,7 +179,7 @@ > + > + new Test("FileOutputStream") { > + public void run() throws IOException { > +- new FileOutputStream(UNREADABLE_FILE); > ++ new FileOutputStream(UNWRITEABLE_FILE); > + }}.go(); > + > + new ClosedFOSTest("write()") { > +@@ -257,8 +239,29 @@ > + > + } > + > ++ public static void preparePaths(String workDir) { > ++ System.out.println("Work directory: " + workDir); > ++ > ++ // directory prepared by shell script > ++ UNWRITEABLE_DIR = workDir + "unwriteable_dir"; > ++ > ++ // files prepared by shell script > ++ READABLE_FILE = workDir + "readable_file"; > ++ WRITEABLE_FILE = workDir + "writeable_file"; > ++ UNREADABLE_FILE = workDir + "unreadable_file"; > ++ UNWRITEABLE_FILE = workDir + "unwriteable_file"; > ++ > ++ String s = "foo/"; > ++ for (;;) { > ++ s = s + s; > ++ if (s.length() > 8192) break; > ++ } > ++ s += "bar"; > ++ INVALID_PATH = s; > ++ } > + > + public static void main(String[] args) throws Exception { > ++ preparePaths(args[0]); > + go(); > + } > + > +diff -Nru IOException/LastErrorString.sh /home/brq/ptisnovs/IOException/LastErrorString.sh > +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 > ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2011-02-21 15:34:58.972481000 +0100 > +@@ -0,0 +1,103 @@ > ++#!/bin/sh > ++ > ++# Copyright (c) 2011, Red Hat Inc. > ++# > ++# This code is free software; you can redistribute it and/or modify > ++# it under the terms of the GNU General Public License as published by > ++# the Free Software Foundation; either version 2, or (at your option) > ++# any later version. > ++# > ++# This code is distributed in the hope that it will be useful, but > ++# WITHOUT ANY WARRANTY; without even the implied warranty of > ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > ++# General Public License for more details. > ++# > ++# You should have received a copy of the GNU General Public License version > ++# 2 along with this work; if not, write to the Free Software Foundation, > ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ > ++# @test > ++# @bug 4167937 > ++# @summary Test code paths that use the JVM_LastErrorString procedure > ++# > ++# @compile LastErrorString.java > ++# @run shell LastErrorString.sh > ++ > ++if [ "${TESTSRC}" = "" ] > ++then > ++ TESTSRC=. > ++fi > ++ > ++# if TESTJAVA isn't set then we assume an interactive run. So that it's > ++# clear which version of 'java' is running we do a 'which java' and > ++# a 'java -version'. > ++if [ "${TESTJAVA}" = "" ] > ++then > ++ PARENT=`dirname \`which java\`` > ++ TESTJAVA=`dirname ${PARENT}` > ++ echo "TESTJAVA not set, selecting ${TESTJAVA}" > ++ echo "If this is incorrect, try selecting the variable manually." > ++fi > ++ > ++echo "TESTJAVA is set to ${TESTJAVA}" > ++ > ++if [ "${TESTCLASSES}" = "" ] > ++then > ++ echo "TESTCLASSES not set. Test cannot execute. Failed." > ++ exit 1 > ++fi > ++ > ++echo "TESTCLASSES is set to ${TESTCLASSES}" > ++ > ++CLASSPATH=${TESTCLASSES} > ++export CLASSPATH > ++ > ++WORK_DIR=`pwd` > ++echo "WORK_DIR is set to ${WORK_DIR}" > ++ > ++# set platform-dependent variables and create work files > ++OS=`uname -s` > ++case "$OS" in > ++ Linux | SunOS ) > ++ echo "UNIX-like system found - that's great!" > ++ FS="/" > ++ ;; > ++ Windows_* ) > ++ echo "Windows system found, can live with that." > ++ FS="\\" > ++ ;; > ++ * ) > ++ echo "Unrecognized system $OS!" > ++ exit 1 > ++ ;; > ++esac > ++ > ++# erase files created by previous test run > ++rm -f readable_file > ++rm -f writeable_file > ++rm -f unreadable_file > ++rm -f unwriteable_file > ++ > ++# create directory + files > ++mkdir unwriteable_dir > ++touch readable_file > ++touch writeable_file > ++touch unreadable_file > ++touch unwriteable_file > ++ > ++# set proper ACL > ++chmod u+r readable_file > ++chmod u+w writeable_file > ++chmod a-r unreadable_file > ++chmod a-w unwriteable_file > ++chmod a-w unwriteable_dir > ++ > ++echo "Work directory content:" > ++ls -l . > ++ > ++# first parameter to test: work directory + separator > ++${TESTJAVA}${FS}bin${FS}java LastErrorString ${WORK_DIR}${FS} > ++STATUS=$? > ++ > ++exit $STATUS > ++ > diff -Nru IOException/LastErrorString.java /home/brq/ptisnovs/IOException/LastErrorString.java > --- openjdk-old/jdk/test/java/io/IOException/LastErrorString.java 2011-01-21 00:54:47.000000000 +0100 > +++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2011-02-21 15:34:58.972481000 +0100 > @@ -21,9 +21,13 @@ > * questions. > */ > > -/* @test > - @bug 4167937 > - @summary Test code paths that use the JVM_LastErrorString procedure > +/* > + * @test > + * @bug 4167937 > + * @summary Test code paths that use the JVM_LastErrorString procedure > + * > + * @compile LastErrorString.java > + * @run shell LastErrorString.sh > */ > > import java.io.IOException; > @@ -37,33 +41,11 @@ > > static String UNWRITEABLE_DIR; > static String UNREADABLE_FILE; > + static String UNWRITEABLE_FILE; > static String READABLE_FILE; > static String WRITEABLE_FILE; > static String INVALID_PATH; > > - static { > - if (File.separatorChar == '/') { > - UNWRITEABLE_DIR = "/etc/dfs"; > - UNREADABLE_FILE = "/etc/shadow"; > - } else if (File.separatorChar == '\\') { > - UNREADABLE_FILE = "c:/pagefile.sys"; > - UNWRITEABLE_DIR = "z:/fooBAR/baz/GORP"; > - } else { > - throw new RuntimeException("What kind of system is this?"); > - } > - File d = new File(System.getProperty("test.src", ".")); > - READABLE_FILE = new File(d, "LastErrorString.java").getPath(); > - WRITEABLE_FILE = "x.LastErrorString"; > - String s = "foo/"; > - for (;;) { > - s = s + s; > - if (s.length() > 8192) break; > - } > - s += "bar"; > - INVALID_PATH = s; > - } > - > - > static abstract class Test { > > String name; > @@ -197,7 +179,7 @@ > > new Test("FileOutputStream") { > public void run() throws IOException { > - new FileOutputStream(UNREADABLE_FILE); > + new FileOutputStream(UNWRITEABLE_FILE); > }}.go(); > > new ClosedFOSTest("write()") { > @@ -257,8 +239,29 @@ > > } > > + public static void preparePaths(String workDir) { > + System.out.println("Work directory: " + workDir); > + > + // directory prepared by shell script > + UNWRITEABLE_DIR = workDir + "unwriteable_dir"; > + > + // files prepared by shell script > + READABLE_FILE = workDir + "readable_file"; > + WRITEABLE_FILE = workDir + "writeable_file"; > + UNREADABLE_FILE = workDir + "unreadable_file"; > + UNWRITEABLE_FILE = workDir + "unwriteable_file"; > + > + String s = "foo/"; > + for (;;) { > + s = s + s; > + if (s.length() > 8192) break; > + } > + s += "bar"; > + INVALID_PATH = s; > + } > > public static void main(String[] args) throws Exception { > + preparePaths(args[0]); > go(); > } > > diff -Nru IOException/LastErrorString.sh /home/brq/ptisnovs/IOException/LastErrorString.sh > --- /dev/null 1970-01-01 01:00:00.000000000 +0100 > +++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2011-02-21 15:34:58.972481000 +0100 > @@ -0,0 +1,103 @@ > +#!/bin/sh > + > +# Copyright (c) 2011, Red Hat Inc. > +# > +# This code is free software; you can redistribute it and/or modify > +# it under the terms of the GNU General Public License as published by > +# the Free Software Foundation; either version 2, or (at your option) > +# any later version. > +# > +# This code is distributed in the hope that it will be useful, but > +# WITHOUT ANY WARRANTY; without even the implied warranty of > +# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +# General Public License for more details. > +# > +# You should have received a copy of the GNU General Public License version > +# 2 along with this work; if not, write to the Free Software Foundation, > +# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > + > +# @test > +# @bug 4167937 > +# @summary Test code paths that use the JVM_LastErrorString procedure > +# > +# @compile LastErrorString.java > +# @run shell LastErrorString.sh > + > +if [ "${TESTSRC}" = "" ] > +then > + TESTSRC=. > +fi > + > +# if TESTJAVA isn't set then we assume an interactive run. So that it's > +# clear which version of 'java' is running we do a 'which java' and > +# a 'java -version'. > +if [ "${TESTJAVA}" = "" ] > +then > + PARENT=`dirname \`which java\`` > + TESTJAVA=`dirname ${PARENT}` > + echo "TESTJAVA not set, selecting ${TESTJAVA}" > + echo "If this is incorrect, try selecting the variable manually." > +fi > + > +echo "TESTJAVA is set to ${TESTJAVA}" > + > +if [ "${TESTCLASSES}" = "" ] > +then > + echo "TESTCLASSES not set. Test cannot execute. Failed." > + exit 1 > +fi > + > +echo "TESTCLASSES is set to ${TESTCLASSES}" > + > +CLASSPATH=${TESTCLASSES} > +export CLASSPATH > + > +WORK_DIR=`pwd` > +echo "WORK_DIR is set to ${WORK_DIR}" > + > +# set platform-dependent variables and create work files > +OS=`uname -s` > +case "$OS" in > + Linux | SunOS ) > + echo "UNIX-like system found - that's great!" > + FS="/" > + ;; > + Windows_* ) > + echo "Windows system found, can live with that." > + FS="\\" > + ;; > + * ) > + echo "Unrecognized system $OS!" > + exit 1 > + ;; > +esac > + > +# erase files created by previous test run > +rm -f readable_file > +rm -f writeable_file > +rm -f unreadable_file > +rm -f unwriteable_file > + > +# create directory + files > +mkdir unwriteable_dir > +touch readable_file > +touch writeable_file > +touch unreadable_file > +touch unwriteable_file > + > +# set proper ACL > +chmod u+r readable_file > +chmod u+w writeable_file > +chmod a-r unreadable_file > +chmod a-w unwriteable_file > +chmod a-w unwriteable_dir > + > +echo "Work directory content:" > +ls -l . > + > +# first parameter to test: work directory + separator > +${TESTJAVA}${FS}bin${FS}java LastErrorString ${WORK_DIR}${FS} > +STATUS=$? > + > +exit $STATUS > + -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dalibor.topic at oracle.com Mon Feb 21 14:19:50 2011 From: dalibor.topic at oracle.com (Dalibor Topic) Date: Mon, 21 Feb 2011 23:19:50 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <4D623E40.8070504@ubuntu.com> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> <4D623390.4050407@redhat.com> <4D623E40.8070504@ubuntu.com> Message-ID: <4D62E506.8020308@oracle.com> On 2/21/11 11:28 AM, Matthias Klose wrote: > CC'ing Dalibor on input, he still seems to be the OpenJDK community contact within Oracle. Just FYI, I'm on parental leave/vacation for a few more weeks. I'd be happy to read up on this thread when I'm back - until then I'd suggest providing your feedback to the team that provides you with the patches directly and politely, as usual. Thanks. cheers, dalibor topic -- Oracle Dalibor Topic | Java F/OSS Ambassador Phone: +494023646738 | | | Mobile: +491772664192 Oracle Java Platform Group ORACLE Deutschland B.V. & Co. KG | Nagelsweg 55 | 20097 Hamburg ORACLE Deutschland B.V. & Co. KG Hauptverwaltung: Riesstr. 25, D-80992 M?nchen Registergericht: Amtsgericht M?nchen, HRA 95603 Komplement?rin: ORACLE Deutschland Verwaltung B.V. Rijnzathe 6, 3454PV De Meern, Niederlande Handelsregister der Handelskammer Midden-Niederlande, Nr. 30143697 Gesch?ftsf?hrer: J?rgen Kunz, Marcel van de Molen, Alexander van der Ven Green Oracle Oracle is committed to developing practices and products that help protect the environment From bugzilla-daemon at icedtea.classpath.org Mon Feb 21 14:59:21 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 21 Feb 2011 22:59:21 +0000 Subject: [Bug 635] zero fails to build on icedtea6 trunk 20110217 with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=635 ------- Comment #3 from gnu_andrew at member.fsf.org 2011-02-21 22:59 ------- Ok did a bit more digging. This is part of the ARM port in the arm_port directory of IcedTea6 so not upstream. It needs adapting to deal with the includeDB changes in hs20, specifically: changeset: 1869:f95d63e2154a user: stefank date: Tue Nov 23 13:22:55 2010 -0800 summary: 6989984: Use standard include model for Hospot http://hg.openjdk.java.net/hsx/hsx20/baseline/rev/f95d63e2154a Does the ARM port work at present? If not, maybe we should just disable it. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Mon Feb 21 15:32:00 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Mon, 21 Feb 2011 23:32:00 +0000 Subject: RFC: PR600 HS19 upgrade broke CACAO build on ARM In-Reply-To: <4D5F3075.5000704@ubuntu.com> References: <4D5E55F3.4090801@zafena.se> <20110218132244.GA30037@rivendell.middle-earth.co.uk> <20110218142556.GB4652@redhat.com> <4D5E8C31.2080705@zafena.se> <20110219000823.GC13108@rivendell.middle-earth.co.uk> <4D5F3075.5000704@ubuntu.com> Message-ID: <20110221233200.GI12717@rivendell.middle-earth.co.uk> On 03:52 Sat 19 Feb , Matthias Klose wrote: > On 19.02.2011 01:08, Dr Andrew John Hughes wrote: > > Ok by me. Out of interest, do you know if hs20 now also works? > > hs20 zero seems to fail to build on any arch. see #635. The reason is the ARM port code is outdated and doesn't handle the includeDB changes in hs20. It's trying to import an include file that used to be generated by includeDB but includeDB is now dead. Does the ARM port actually work? Is someone maintaining it? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Mon Feb 21 16:01:23 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 22 Feb 2011 00:01:23 +0000 Subject: [Bug 586] classes missing from src.zip Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=586 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|gnu_andrew at member.fsf.org |.org | -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Mon Feb 21 16:35:38 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 22 Feb 2011 00:35:38 +0000 Subject: /hg/icedtea6: 3 new changesets Message-ID: changeset 41fca4a6cb61 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=41fca4a6cb61 author: Andrew John Hughes date: Mon Feb 21 23:14:44 2011 +0000 Remove redundant IcedTea prefix from all patches. Drop unused Shark patches. 2011-02-18 Andrew John Hughes * patches/ecj/icedtea-ant.patch, * patches/ecj/icedtea-hotspot.patch, * patches/ecj/icedtea-jaxp-dependency.patch, * patches/ecj/icedtea-jaxws-getdtdtype.patch, * patches/ecj/icedtea-jopt.patch, * patches/ecj/icedtea-spp.patch, * patches/icedtea-alt-jar.patch, * patches/icedtea-arch.patch, * patches/icedtea-bytebuffer-compact.patch, * patches/icedtea-clean-crypto.patch, * patches/icedtea-demo-swingapplet.patch, * patches/icedtea-disable-cc-incompatible-sanity-checks.patch, * patches/icedtea-dnd-filelists.patch, * patches/icedtea-explicit-target-arch.patch, * patches/icedtea-freetypeversion.patch, * patches/icedtea-gcc-stack-markings.patch, * patches/icedtea-gcc-suffix.patch, * patches/icedtea-headers-hotspot.patch, * patches/icedtea-headers.patch, * patches/icedtea-java2d-stroker-internal-close-joint.patch, * patches/icedtea-java2d-stroker-internal-joint.patch, * patches/icedtea-javafiles.patch, * patches/icedtea-jdk-use-ssize_t.patch, * patches/icedtea-jpegclasses.patch, * patches/icedtea-jtreg-6592792.patch, * patches/icedtea-jtreg-OpenGLContextInit.patch, * patches/icedtea-jtreg-dnd.patch, * patches/icedtea-jtreg-httpTest.patch, * patches/icedtea-jtreg-international-fonts.patch, * patches/icedtea-jtreg-jrunscript.patch, * patches/icedtea-jvmtiEnv.patch, * patches/icedtea-lc_ctype.patch, * patches/icedtea-lcms.patch, * patches/icedtea-libraries.patch, * patches/icedtea-linker-libs-order.patch, * patches/icedtea-linux-separate-debuginfo.patch, * patches/icedtea-lucene-crash.patch, * patches/icedtea-network-unreachable.patch, * patches/icedtea-nio2.patch, * patches/icedtea-nomotif-6706121.patch, * patches/icedtea-nomotif-mtoolkit.patch, * patches/icedtea-nomotif.patch, * patches/icedtea-notice-safepoints.patch, * patches/icedtea-nss-config.patch, * patches/icedtea-nss-not-enabled-config.patch, * patches/icedtea-override-redirect-metacity.patch, * patches/icedtea-parisc-opt.patch, * patches/icedtea-parisc.patch, * patches/icedtea-policy-evaluation.patch, * patches/icedtea-pr261.patch, * patches/icedtea-pulse-soundproperties.patch, * patches/icedtea-renderer-crossing.patch, * patches/icedtea-rhino.patch, * patches/icedtea-rmi_amd64.patch, * patches/icedtea-s390-noinline.patch, * patches/icedtea-samejvm-safe.patch, * patches/icedtea-sh4-support.patch, * patches/icedtea-shark-build-hotspot.patch: Drop icedtea- prefix. * patches/icedtea-shark.patch: Drop unused patch. * patches/icedtea-sparc-ptracefix.patch, * patches/icedtea-sparc-trapsfix.patch, * patches/icedtea-sparc.patch, * patches/icedtea-sparc64-linux.patch, * patches/icedtea-ssl.patch, * patches/icedtea-stdc-limit-macros.patch, * patches/icedtea-stroker-finish.patch, * patches/icedtea-sunsrc.patch, * patches/icedtea-testenv.patch, * patches/icedtea-tools.patch, * patches/icedtea-uname.patch, * patches/icedtea-use-idx_t.patch, * patches/icedtea-use-system-tzdata.patch, * patches/icedtea-version-hotspot.patch, * patches/icedtea-version.patch, * patches/icedtea-xjc.patch: Drop icedtea-prefix. * patches/shark.patch: Drop unused patch. * Makefile.am: Update for icedtea- changes. * patches/alt-jar.patch, * patches/arch.patch, * patches/bytebuffer-compact.patch, * patches/clean-crypto.patch, * patches/demo-swingapplet.patch, * patches/disable-cc-incompatible-sanity-checks.patch, * patches/dnd-filelists.patch, * patches/ecj/ant.patch, * patches/ecj/hotspot.patch, * patches/ecj/jaxp-dependency.patch, * patches/ecj/jaxws-getdtdtype.patch, * patches/ecj/jopt.patch, * patches/ecj/spp.patch, * patches/explicit-target-arch.patch, * patches/freetypeversion.patch, * patches/gcc-stack-markings.patch, * patches/gcc-suffix.patch, * patches/headers-hotspot.patch, * patches/headers.patch, * patches/java2d-stroker-internal-close-joint.patch, * patches/java2d-stroker-internal-joint.patch, * patches/javafiles.patch, * patches/jdk-use-ssize_t.patch, * patches/jpegclasses.patch, * patches/jtreg-6592792.patch, * patches/jtreg-OpenGLContextInit.patch, * patches/jtreg-dnd.patch, * patches/jtreg-httpTest.patch, * patches/jtreg-international-fonts.patch, * patches/jtreg-jrunscript.patch, * patches/jvmtiEnv.patch, * patches/lc_ctype.patch, * patches/lcms.patch, * patches/libraries.patch, * patches/linker-libs-order.patch, * patches/linux-separate-debuginfo.patch, * patches/lucene-crash.patch, * patches/network-unreachable.patch, * patches/nio2.patch, * patches/nomotif-6706121.patch, * patches/nomotif-mtoolkit.patch, * patches/nomotif.patch, * patches/notice-safepoints.patch, * patches/nss-config.patch, * patches/nss-not-enabled-config.patch, * patches/override-redirect-metacity.patch, * patches/parisc-opt.patch, * patches/parisc.patch, * patches/policy-evaluation.patch, * patches/pr261.patch, * patches/pulse-soundproperties.patch, * patches/renderer-crossing.patch, * patches/rhino.patch, * patches/rmi_amd64.patch, * patches/s390-noinline.patch, * patches/samejvm-safe.patch, * patches/sh4-support.patch, * patches/shark-build-hotspot.patch, * patches/sparc-ptracefix.patch, * patches/sparc-trapsfix.patch, * patches/sparc.patch, * patches/sparc64-linux.patch, * patches/ssl.patch, * patches/stdc-limit-macros.patch, * patches/stroker-finish.patch, * patches/sunsrc.patch, * patches/testenv.patch, * patches/tools.patch, * patches/uname.patch, * patches/use-idx_t.patch, * patches/use-system-tzdata.patch, * patches/version-hotspot.patch, * patches/version.patch, * patches/xjc.patch: Above patches with 'icedtea-' removed. changeset ea0eae72e923 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ea0eae72e923 author: Andrew John Hughes date: Tue Feb 22 00:33:26 2011 +0000 Ensure all macros have an IT_ prefix. 2011-02-21 Andrew John Hughes Ensure all our macros have an IT_ prefix. * acinclude.m4: (IT_SET_OS_DIRS): Renamed from SET_OS_DIRS. (IT_FIND_JAVAC): Renamed from FIND_JAVAC. (IT_FIND_JAVA): Renamed from FIND_JAVA. (IT_WITH_OPENJDK_SRC_DIR): Renamed from WITH_OPENJDK_SRC_DIR. (IT_FIND_ECJ_JAR): Renamed from FIND_ECJ_JAR. (IT_CHECK_GCC_VERSION): Renamed from AC_CHECK_GCC_VERSION. (IT_FIND_JAVAH): Renamed from FIND_JAVAH. (IT_FIND_JAR): Renamed from FIND_JAR. (IT_FIND_RMIC): Renamed from FIND_RMIC. (IT_FIND_ENDORSED_JARS): Renamed from FIND_ENDORSED_JARS. (IT_WITH_OPENJDK_SRC_ZIP): Renamed from WITH_OPENJDK_SRC_ZIP. (IT_WITH_ALT_JAR_BINARY): Renamed from WITH_ALT_JAR_BINARY. (IT_FIND_XALAN2_JAR): Renamed from FIND_XALAN2_JAR. (IT_FIND_XALAN2_SERIALIZER_JAR): Renamed from FIND_XALAN2_SERIALIZER_JAR. (IT_FIND_XERCES2_JAR): Renamed from FIND_XERCES2_JAR. (IT_FIND_RHINO_JAR): Renamed from FIND_RHINO_JAR. (IT_DISABLE_OPTIMIZATIONS): Renamed from DISABLE_OPTIMIZATIONS. (IT_FIND_TOOL): Renamed from FIND_TOOL. (IT_ENABLE_ZERO_BUILD): Renamed from ENABLE_ZERO_BUILD. (IT_SET_SHARK_BUILD): Renamed from SET_SHARK_BUILD. (IT_CHECK_ENABLE_CACAO): Renamed from AC_CHECK_ENABLE_CACAO. (IT_CHECK_WITH_CACAO_HOME): Renamed from AC_CHECK_WITH_CACAO_HOME. (IT_CHECK_WITH_CACAO_SRC_ZIP): Renamed from AC_CHECK_WITH_CACAO_SRC_ZIP. (IT_CHECK_WITH_GCJ): Renamed from AC_CHECK_WITH_GCJ. (IT_CHECK_WITH_HOTSPOT_BUILD): Renamed from AC_CHECK_WITH_HOTSPOT_BUILD. (IT_WITH_HOTSPOT_SRC_ZIP): Renamed from WITH_HOTSPOT_SRC_ZIP. (IT_WITH_JAXP_DROP_ZIP): Renamed from WITH_JAXP_DROP_ZIP. (IT_WITH_JAF_DROP_ZIP): Renamed from WITH_JAF_DROP_ZIP. (IT_WITH_JAXWS_DROP_ZIP): Renamed from WITH_JAXWS_DROP_ZIP. (IT_ENABLE_HG): Renamed from ENABLE_HG. (IT_CHECK_WITH_HG_REVISION): Renamed from AC_CHECK_WITH_HG_REVISION. (IT_CHECK_WITH_TZDATA_DIR): Renamed from AC_CHECK_WITH_TZDATA_DIR. (IT_FIND_NUMBER_OF_PROCESSORS): Fix use of FIND_TOOL. (IT_OBTAIN_HG_REVISIONS): Fix dependence on WITH_OPENJDK_SRC_DIR. * configure.ac: Use renamed macros throughout. changeset 74f752bcf15d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=74f752bcf15d author: Andrew John Hughes date: Tue Feb 22 00:35:15 2011 +0000 Mention cleanups in NEWS. 2011-02-21 Andrew John Hughes * NEWS: Mention cleanups. diffstat: 158 files changed, 80665 insertions(+), 80860 deletions(-) ChangeLog | 202 Makefile.am | 140 NEWS | 3 String | 11 acinclude.m4 | 70 configure.ac | 95 patches/alt-jar.patch | 15 patches/arch.patch | 299 patches/bytebuffer-compact.patch | 62 patches/clean-crypto.patch | 1099 patches/demo-swingapplet.patch | 11 patches/disable-cc-incompatible-sanity-checks.patch | 105 patches/dnd-filelists.patch | 19 patches/ecj/ant.patch | 20 patches/ecj/hotspot.patch | 14 patches/ecj/icedtea-ant.patch | 20 patches/ecj/icedtea-hotspot.patch | 14 patches/ecj/icedtea-jaxp-dependency.patch | 25 patches/ecj/icedtea-jaxws-getdtdtype.patch | 43 patches/ecj/icedtea-jopt.patch | 26 patches/ecj/icedtea-spp.patch | 65 patches/ecj/jaxp-dependency.patch | 25 patches/ecj/jaxws-getdtdtype.patch | 23 patches/ecj/jopt.patch | 26 patches/ecj/spp.patch | 65 patches/explicit-target-arch.patch | 62 patches/freetypeversion.patch | 11 patches/gcc-stack-markings.patch | 14 patches/gcc-suffix.patch | 48 patches/headers-hotspot.patch | 13 patches/headers.patch | 39 patches/icedtea-alt-jar.patch | 15 patches/icedtea-arch.patch | 299 patches/icedtea-bytebuffer-compact.patch | 62 patches/icedtea-clean-crypto.patch | 1099 patches/icedtea-demo-swingapplet.patch | 11 patches/icedtea-disable-cc-incompatible-sanity-checks.patch | 105 patches/icedtea-dnd-filelists.patch | 19 patches/icedtea-explicit-target-arch.patch | 62 patches/icedtea-freetypeversion.patch | 11 patches/icedtea-gcc-stack-markings.patch | 14 patches/icedtea-gcc-suffix.patch | 48 patches/icedtea-headers-hotspot.patch | 13 patches/icedtea-headers.patch | 39 patches/icedtea-java2d-stroker-internal-close-joint.patch | 96 patches/icedtea-java2d-stroker-internal-joint.patch | 98 patches/icedtea-javafiles.patch | 157 patches/icedtea-jdk-use-ssize_t.patch | 33 patches/icedtea-jpegclasses.patch | 651 patches/icedtea-jtreg-6592792.patch | 13 patches/icedtea-jtreg-OpenGLContextInit.patch | 46 patches/icedtea-jtreg-dnd.patch | 28 patches/icedtea-jtreg-httpTest.patch | 37 patches/icedtea-jtreg-international-fonts.patch | 214 patches/icedtea-jtreg-jrunscript.patch | 353 patches/icedtea-jvmtiEnv.patch | 12 patches/icedtea-lc_ctype.patch | 23 patches/icedtea-lcms.patch | 40 patches/icedtea-libraries.patch |25566 ------ patches/icedtea-linker-libs-order.patch | 66 patches/icedtea-linux-separate-debuginfo.patch | 379 patches/icedtea-lucene-crash.patch | 44 patches/icedtea-network-unreachable.patch | 31 patches/icedtea-nio2.patch | 2817 patches/icedtea-nomotif-6706121.patch |44011 ----------- patches/icedtea-nomotif-mtoolkit.patch | 168 patches/icedtea-nomotif.patch | 54 patches/icedtea-notice-safepoints.patch | 16 patches/icedtea-nss-config.patch | 10 patches/icedtea-nss-not-enabled-config.patch | 13 patches/icedtea-override-redirect-metacity.patch | 11 patches/icedtea-parisc-opt.patch | 28 patches/icedtea-parisc.patch | 14 patches/icedtea-policy-evaluation.patch | 35 patches/icedtea-pr261.patch | 40 patches/icedtea-pulse-soundproperties.patch | 16 patches/icedtea-renderer-crossing.patch | 15 patches/icedtea-rhino.patch | 139 patches/icedtea-rmi_amd64.patch | 15 patches/icedtea-s390-noinline.patch | 22 patches/icedtea-samejvm-safe.patch | 12 patches/icedtea-sh4-support.patch | 166 patches/icedtea-shark-build-hotspot.patch | 266 patches/icedtea-shark.patch | 379 patches/icedtea-sparc-ptracefix.patch | 34 patches/icedtea-sparc-trapsfix.patch | 12 patches/icedtea-sparc.patch | 1808 patches/icedtea-sparc64-linux.patch | 24 patches/icedtea-ssl.patch | 43 patches/icedtea-stdc-limit-macros.patch | 12 patches/icedtea-stroker-finish.patch | 20 patches/icedtea-sunsrc.patch | 67 patches/icedtea-testenv.patch | 66 patches/icedtea-tools.patch | 83 patches/icedtea-uname.patch | 24 patches/icedtea-use-idx_t.patch | 101 patches/icedtea-use-system-tzdata.patch | 99 patches/icedtea-version-hotspot.patch | 56 patches/icedtea-version.patch | 91 patches/icedtea-xjc.patch | 34 patches/java2d-stroker-internal-close-joint.patch | 96 patches/java2d-stroker-internal-joint.patch | 98 patches/javafiles.patch | 157 patches/jdk-use-ssize_t.patch | 33 patches/jpegclasses.patch | 651 patches/jtreg-6592792.patch | 13 patches/jtreg-OpenGLContextInit.patch | 46 patches/jtreg-dnd.patch | 28 patches/jtreg-httpTest.patch | 37 patches/jtreg-international-fonts.patch | 214 patches/jtreg-jrunscript.patch | 353 patches/jvmtiEnv.patch | 12 patches/lc_ctype.patch | 23 patches/lcms.patch | 40 patches/libraries.patch |25566 ++++++ patches/linker-libs-order.patch | 66 patches/linux-separate-debuginfo.patch | 379 patches/lucene-crash.patch | 44 patches/network-unreachable.patch | 31 patches/nio2.patch | 2817 patches/nomotif-6706121.patch |44011 +++++++++++ patches/nomotif-mtoolkit.patch | 168 patches/nomotif.patch | 54 patches/notice-safepoints.patch | 16 patches/nss-config.patch | 10 patches/nss-not-enabled-config.patch | 13 patches/override-redirect-metacity.patch | 11 patches/parisc-opt.patch | 28 patches/parisc.patch | 14 patches/policy-evaluation.patch | 35 patches/pr261.patch | 40 patches/pulse-soundproperties.patch | 16 patches/renderer-crossing.patch | 15 patches/rhino.patch | 139 patches/rmi_amd64.patch | 15 patches/s390-noinline.patch | 22 patches/samejvm-safe.patch | 12 patches/sh4-support.patch | 166 patches/shark-build-hotspot.patch | 266 patches/shark.patch | 9 patches/sparc-ptracefix.patch | 34 patches/sparc-trapsfix.patch | 12 patches/sparc.patch | 1808 patches/sparc64-linux.patch | 24 patches/ssl.patch | 43 patches/stdc-limit-macros.patch | 12 patches/stroker-finish.patch | 20 patches/sunsrc.patch | 67 patches/testenv.patch | 66 patches/tools.patch | 83 patches/uname.patch | 24 patches/use-idx_t.patch | 101 patches/use-system-tzdata.patch | 99 patches/version-hotspot.patch | 56 patches/version.patch | 91 patches/xjc.patch | 23 return | 6 } | 3 diffs (truncated from 162540 to 500 lines): diff -r 55566ffe7026 -r 74f752bcf15d ChangeLog --- a/ChangeLog Mon Feb 21 10:10:16 2011 +0100 +++ b/ChangeLog Tue Feb 22 00:35:15 2011 +0000 @@ -1,3 +1,205 @@ 2011-02-21 Xerxes Ranby + + * NEWS: Mention cleanups. + +2011-02-21 Andrew John Hughes + + Ensure all our macros have an IT_ prefix. + * acinclude.m4: + (IT_SET_OS_DIRS): Renamed from SET_OS_DIRS. + (IT_FIND_JAVAC): Renamed from FIND_JAVAC. + (IT_FIND_JAVA): Renamed from FIND_JAVA. + (IT_WITH_OPENJDK_SRC_DIR): Renamed from WITH_OPENJDK_SRC_DIR. + (IT_FIND_ECJ_JAR): Renamed from FIND_ECJ_JAR. + (IT_CHECK_GCC_VERSION): Renamed from AC_CHECK_GCC_VERSION. + (IT_FIND_JAVAH): Renamed from FIND_JAVAH. + (IT_FIND_JAR): Renamed from FIND_JAR. + (IT_FIND_RMIC): Renamed from FIND_RMIC. + (IT_FIND_ENDORSED_JARS): Renamed from FIND_ENDORSED_JARS. + (IT_WITH_OPENJDK_SRC_ZIP): Renamed from WITH_OPENJDK_SRC_ZIP. + (IT_WITH_ALT_JAR_BINARY): Renamed from WITH_ALT_JAR_BINARY. + (IT_FIND_XALAN2_JAR): Renamed from FIND_XALAN2_JAR. + (IT_FIND_XALAN2_SERIALIZER_JAR): Renamed from FIND_XALAN2_SERIALIZER_JAR. + (IT_FIND_XERCES2_JAR): Renamed from FIND_XERCES2_JAR. + (IT_FIND_RHINO_JAR): Renamed from FIND_RHINO_JAR. + (IT_DISABLE_OPTIMIZATIONS): Renamed from DISABLE_OPTIMIZATIONS. + (IT_FIND_TOOL): Renamed from FIND_TOOL. + (IT_ENABLE_ZERO_BUILD): Renamed from ENABLE_ZERO_BUILD. + (IT_SET_SHARK_BUILD): Renamed from SET_SHARK_BUILD. + (IT_CHECK_ENABLE_CACAO): Renamed from AC_CHECK_ENABLE_CACAO. + (IT_CHECK_WITH_CACAO_HOME): Renamed from AC_CHECK_WITH_CACAO_HOME. + (IT_CHECK_WITH_CACAO_SRC_ZIP): Renamed from AC_CHECK_WITH_CACAO_SRC_ZIP. + (IT_CHECK_WITH_GCJ): Renamed from AC_CHECK_WITH_GCJ. + (IT_CHECK_WITH_HOTSPOT_BUILD): Renamed from AC_CHECK_WITH_HOTSPOT_BUILD. + (IT_WITH_HOTSPOT_SRC_ZIP): Renamed from WITH_HOTSPOT_SRC_ZIP. + (IT_WITH_JAXP_DROP_ZIP): Renamed from WITH_JAXP_DROP_ZIP. + (IT_WITH_JAF_DROP_ZIP): Renamed from WITH_JAF_DROP_ZIP. + (IT_WITH_JAXWS_DROP_ZIP): Renamed from WITH_JAXWS_DROP_ZIP. + (IT_ENABLE_HG): Renamed from ENABLE_HG. + (IT_CHECK_WITH_HG_REVISION): Renamed from AC_CHECK_WITH_HG_REVISION. + (IT_CHECK_WITH_TZDATA_DIR): Renamed from AC_CHECK_WITH_TZDATA_DIR. + (IT_FIND_NUMBER_OF_PROCESSORS): Fix use of FIND_TOOL. + (IT_OBTAIN_HG_REVISIONS): Fix dependence on WITH_OPENJDK_SRC_DIR. + * configure.ac: Use renamed macros throughout. + +2011-02-21 Andrew John Hughes + + * patches/ecj/icedtea-ant.patch, + * patches/ecj/icedtea-hotspot.patch, + * patches/ecj/icedtea-jaxp-dependency.patch, + * patches/ecj/icedtea-jaxws-getdtdtype.patch, + * patches/ecj/icedtea-jopt.patch, + * patches/ecj/icedtea-spp.patch, + * patches/icedtea-alt-jar.patch, + * patches/icedtea-arch.patch, + * patches/icedtea-bytebuffer-compact.patch, + * patches/icedtea-clean-crypto.patch, + * patches/icedtea-demo-swingapplet.patch, + * patches/icedtea-disable-cc-incompatible-sanity-checks.patch, + * patches/icedtea-dnd-filelists.patch, + * patches/icedtea-explicit-target-arch.patch, + * patches/icedtea-freetypeversion.patch, + * patches/icedtea-gcc-stack-markings.patch, + * patches/icedtea-gcc-suffix.patch, + * patches/icedtea-headers-hotspot.patch, + * patches/icedtea-headers.patch, + * patches/icedtea-java2d-stroker-internal-close-joint.patch, + * patches/icedtea-java2d-stroker-internal-joint.patch, + * patches/icedtea-javafiles.patch, + * patches/icedtea-jdk-use-ssize_t.patch, + * patches/icedtea-jpegclasses.patch, + * patches/icedtea-jtreg-6592792.patch, + * patches/icedtea-jtreg-OpenGLContextInit.patch, + * patches/icedtea-jtreg-dnd.patch, + * patches/icedtea-jtreg-httpTest.patch, + * patches/icedtea-jtreg-international-fonts.patch, + * patches/icedtea-jtreg-jrunscript.patch, + * patches/icedtea-jvmtiEnv.patch, + * patches/icedtea-lc_ctype.patch, + * patches/icedtea-lcms.patch, + * patches/icedtea-libraries.patch, + * patches/icedtea-linker-libs-order.patch, + * patches/icedtea-linux-separate-debuginfo.patch, + * patches/icedtea-lucene-crash.patch, + * patches/icedtea-network-unreachable.patch, + * patches/icedtea-nio2.patch, + * patches/icedtea-nomotif-6706121.patch, + * patches/icedtea-nomotif-mtoolkit.patch, + * patches/icedtea-nomotif.patch, + * patches/icedtea-notice-safepoints.patch, + * patches/icedtea-nss-config.patch, + * patches/icedtea-nss-not-enabled-config.patch, + * patches/icedtea-override-redirect-metacity.patch, + * patches/icedtea-parisc-opt.patch, + * patches/icedtea-parisc.patch, + * patches/icedtea-policy-evaluation.patch, + * patches/icedtea-pr261.patch, + * patches/icedtea-pulse-soundproperties.patch, + * patches/icedtea-renderer-crossing.patch, + * patches/icedtea-rhino.patch, + * patches/icedtea-rmi_amd64.patch, + * patches/icedtea-s390-noinline.patch, + * patches/icedtea-samejvm-safe.patch, + * patches/icedtea-sh4-support.patch, + * patches/icedtea-shark-build-hotspot.patch: + Drop icedtea- prefix. + * patches/icedtea-shark.patch: + Drop unused patch. + * patches/icedtea-sparc-ptracefix.patch, + * patches/icedtea-sparc-trapsfix.patch, + * patches/icedtea-sparc.patch, + * patches/icedtea-sparc64-linux.patch, + * patches/icedtea-ssl.patch, + * patches/icedtea-stdc-limit-macros.patch, + * patches/icedtea-stroker-finish.patch, + * patches/icedtea-sunsrc.patch, + * patches/icedtea-testenv.patch, + * patches/icedtea-tools.patch, + * patches/icedtea-uname.patch, + * patches/icedtea-use-idx_t.patch, + * patches/icedtea-use-system-tzdata.patch, + * patches/icedtea-version-hotspot.patch, + * patches/icedtea-version.patch, + * patches/icedtea-xjc.patch: + Drop icedtea-prefix. + * patches/shark.patch: Drop unused patch. + * Makefile.am: Update for icedtea- changes. + * patches/alt-jar.patch, + * patches/arch.patch, + * patches/bytebuffer-compact.patch, + * patches/clean-crypto.patch, + * patches/demo-swingapplet.patch, + * patches/disable-cc-incompatible-sanity-checks.patch, + * patches/dnd-filelists.patch, + * patches/ecj/ant.patch, + * patches/ecj/hotspot.patch, + * patches/ecj/jaxp-dependency.patch, + * patches/ecj/jaxws-getdtdtype.patch, + * patches/ecj/jopt.patch, + * patches/ecj/spp.patch, + * patches/explicit-target-arch.patch, + * patches/freetypeversion.patch, + * patches/gcc-stack-markings.patch, + * patches/gcc-suffix.patch, + * patches/headers-hotspot.patch, + * patches/headers.patch, + * patches/java2d-stroker-internal-close-joint.patch, + * patches/java2d-stroker-internal-joint.patch, + * patches/javafiles.patch, + * patches/jdk-use-ssize_t.patch, + * patches/jpegclasses.patch, + * patches/jtreg-6592792.patch, + * patches/jtreg-OpenGLContextInit.patch, + * patches/jtreg-dnd.patch, + * patches/jtreg-httpTest.patch, + * patches/jtreg-international-fonts.patch, + * patches/jtreg-jrunscript.patch, + * patches/jvmtiEnv.patch, + * patches/lc_ctype.patch, + * patches/lcms.patch, + * patches/libraries.patch, + * patches/linker-libs-order.patch, + * patches/linux-separate-debuginfo.patch, + * patches/lucene-crash.patch, + * patches/network-unreachable.patch, + * patches/nio2.patch, + * patches/nomotif-6706121.patch, + * patches/nomotif-mtoolkit.patch, + * patches/nomotif.patch, + * patches/notice-safepoints.patch, + * patches/nss-config.patch, + * patches/nss-not-enabled-config.patch, + * patches/override-redirect-metacity.patch, + * patches/parisc-opt.patch, + * patches/parisc.patch, + * patches/policy-evaluation.patch, + * patches/pr261.patch, + * patches/pulse-soundproperties.patch, + * patches/renderer-crossing.patch, + * patches/rhino.patch, + * patches/rmi_amd64.patch, + * patches/s390-noinline.patch, + * patches/samejvm-safe.patch, + * patches/sh4-support.patch, + * patches/shark-build-hotspot.patch, + * patches/sparc-ptracefix.patch, + * patches/sparc-trapsfix.patch, + * patches/sparc.patch, + * patches/sparc64-linux.patch, + * patches/ssl.patch, + * patches/stdc-limit-macros.patch, + * patches/stroker-finish.patch, + * patches/sunsrc.patch, + * patches/testenv.patch, + * patches/tools.patch, + * patches/uname.patch, + * patches/use-idx_t.patch, + * patches/use-system-tzdata.patch, + * patches/version-hotspot.patch, + * patches/version.patch, + * patches/xjc.patch: + Above patches with 'icedtea-' removed. + 2011-02-21 Xerxes Ranby PR600: HS19 upgrade broke CACAO build on ARM diff -r 55566ffe7026 -r 74f752bcf15d Makefile.am --- a/Makefile.am Mon Feb 21 10:10:16 2011 +0100 +++ b/Makefile.am Tue Feb 22 00:35:15 2011 +0000 @@ -186,7 +186,7 @@ SECURITY_PATCHES = patches/security/2011 ICEDTEA_PATCHES = \ $(SECURITY_PATCHES) \ - patches/icedtea-stdc-limit-macros.patch \ + patches/stdc-limit-macros.patch \ patches/openjdk/4993545-nativeinlightfixer.patch \ patches/openjdk/6637796-set_bounds.patch \ patches/openjdk/6607660-treelock.patch \ @@ -201,87 +201,87 @@ ICEDTEA_PATCHES = \ patches/openjdk/6984543-onscreen_rendering_resize_test.patch \ patches/openjdk/6693253-security_warning.patch \ patches/openjdk/6444769-windowwithwarningtest.patch \ - patches/icedtea-notice-safepoints.patch \ - patches/icedtea-parisc-opt.patch \ - patches/icedtea-lucene-crash.patch \ - patches/icedtea-version.patch \ - patches/icedtea-version-hotspot.patch \ + patches/notice-safepoints.patch \ + patches/parisc-opt.patch \ + patches/lucene-crash.patch \ + patches/version.patch \ + patches/version-hotspot.patch \ patches/hotspot/$(HSBUILD)/text-relocations.patch \ - patches/icedtea-ssl.patch \ - patches/icedtea-rmi_amd64.patch \ - patches/icedtea-tools.patch \ - patches/icedtea-use-system-tzdata.patch \ - patches/icedtea-headers.patch \ - patches/icedtea-headers-hotspot.patch \ - patches/icedtea-gcc-suffix.patch \ + patches/ssl.patch \ + patches/rmi_amd64.patch \ + patches/tools.patch \ + patches/use-system-tzdata.patch \ + patches/headers.patch \ + patches/headers-hotspot.patch \ + patches/gcc-suffix.patch \ patches/hotspot/$(HSBUILD)/gcc-suffix.patch \ - patches/icedtea-bytebuffer-compact.patch \ + patches/bytebuffer-compact.patch \ patches/memory-limits.patch \ - patches/icedtea-sunsrc.patch \ - patches/icedtea-libraries.patch \ - patches/icedtea-javafiles.patch \ - patches/icedtea-jvmtiEnv.patch \ - patches/icedtea-lcms.patch \ + patches/sunsrc.patch \ + patches/libraries.patch \ + patches/javafiles.patch \ + patches/jvmtiEnv.patch \ + patches/lcms.patch \ patches/print_lsb_release.patch \ - patches/icedtea-jpegclasses.patch \ - patches/icedtea-uname.patch \ - patches/icedtea-freetypeversion.patch \ - patches/icedtea-nomotif-6706121.patch \ - patches/icedtea-nomotif.patch \ - patches/icedtea-nomotif-mtoolkit.patch \ + patches/jpegclasses.patch \ + patches/uname.patch \ + patches/freetypeversion.patch \ + patches/nomotif-6706121.patch \ + patches/nomotif.patch \ + patches/nomotif-mtoolkit.patch \ patches/alpha-fixes.patch \ - patches/icedtea-alt-jar.patch \ - patches/icedtea-jdk-use-ssize_t.patch \ - patches/icedtea-use-idx_t.patch \ + patches/alt-jar.patch \ + patches/jdk-use-ssize_t.patch \ + patches/use-idx_t.patch \ patches/hotspot/$(HSBUILD)/params-cast-size_t.patch \ - patches/icedtea-clean-crypto.patch \ - patches/icedtea-arch.patch \ - patches/icedtea-lc_ctype.patch \ - patches/icedtea-xjc.patch \ - patches/icedtea-renderer-crossing.patch \ - patches/icedtea-stroker-finish.patch \ - patches/icedtea-linker-libs-order.patch \ - patches/icedtea-testenv.patch \ - patches/icedtea-samejvm-safe.patch \ - patches/icedtea-pr261.patch \ + patches/clean-crypto.patch \ + patches/arch.patch \ + patches/lc_ctype.patch \ + patches/xjc.patch \ + patches/renderer-crossing.patch \ + patches/stroker-finish.patch \ + patches/linker-libs-order.patch \ + patches/testenv.patch \ + patches/samejvm-safe.patch \ + patches/pr261.patch \ patches/hotspot/$(HSBUILD)/sparc-buildfixes.patch \ - patches/icedtea-sparc64-linux.patch \ - patches/icedtea-sparc-ptracefix.patch \ - patches/icedtea-sparc-trapsfix.patch \ - patches/icedtea-demo-swingapplet.patch \ - patches/icedtea-jtreg-6592792.patch \ - patches/icedtea-s390-noinline.patch \ - patches/icedtea-jtreg-dnd.patch \ - patches/icedtea-jtreg-jrunscript.patch \ - patches/icedtea-network-unreachable.patch \ - patches/icedtea-dnd-filelists.patch \ - patches/icedtea-java2d-stroker-internal-joint.patch \ - patches/icedtea-java2d-stroker-internal-close-joint.patch \ - patches/icedtea-disable-cc-incompatible-sanity-checks.patch \ - patches/icedtea-explicit-target-arch.patch \ - patches/icedtea-gcc-stack-markings.patch \ - patches/icedtea-parisc.patch \ - patches/icedtea-sh4-support.patch \ - patches/icedtea-policy-evaluation.patch \ + patches/sparc64-linux.patch \ + patches/sparc-ptracefix.patch \ + patches/sparc-trapsfix.patch \ + patches/demo-swingapplet.patch \ + patches/jtreg-6592792.patch \ + patches/s390-noinline.patch \ + patches/jtreg-dnd.patch \ + patches/jtreg-jrunscript.patch \ + patches/network-unreachable.patch \ + patches/dnd-filelists.patch \ + patches/java2d-stroker-internal-joint.patch \ + patches/java2d-stroker-internal-close-joint.patch \ + patches/disable-cc-incompatible-sanity-checks.patch \ + patches/explicit-target-arch.patch \ + patches/gcc-stack-markings.patch \ + patches/parisc.patch \ + patches/sh4-support.patch \ + patches/policy-evaluation.patch \ patches/update-bootclasspath.patch \ patches/libpng.patch \ patches/applet_hole.patch \ - patches/icedtea-jtreg-httpTest.patch \ + patches/jtreg-httpTest.patch \ patches/arm.patch \ patches/hotspot/$(HSBUILD)/arm.patch \ patches/debug-dir.patch \ patches/no-sync.patch \ - patches/icedtea-override-redirect-metacity.patch \ + patches/override-redirect-metacity.patch \ patches/openjdk/6967533-pre_epoch.patch \ patches/fonts-rhel.patch \ patches/fonts-gentoo.patch \ patches/ipv4-mapped-ipv6-addresses.patch \ - patches/icedtea-jtreg-OpenGLContextInit.patch \ + patches/jtreg-OpenGLContextInit.patch \ patches/openjdk/6510892-httpserver_test.patch \ patches/openjdk/6638712-wildcard_types.patch \ patches/openjdk/6650759-missing_inference.patch \ patches/numa_on_early_glibc.patch \ - patches/icedtea-jtreg-international-fonts.patch \ + patches/jtreg-international-fonts.patch \ patches/openjdk/6967436-6976265-6967434-pisces.patch \ patches/f14-fonts.patch \ patches/jtreg-T6638712-fix.patch \ @@ -318,7 +318,7 @@ endif if WITH_RHINO ICEDTEA_PATCHES += \ - patches/icedtea-rhino.patch + patches/rhino.patch endif if BUILD_CACAO @@ -338,7 +338,7 @@ endif if ENABLE_PULSE_JAVA ICEDTEA_PATCHES += \ - patches/icedtea-pulse-soundproperties.patch + patches/pulse-soundproperties.patch endif if ENABLE_XRENDER @@ -348,7 +348,7 @@ endif endif if ENABLE_NIO2 -ICEDTEA_PATCHES += patches/icedtea-nio2.patch +ICEDTEA_PATCHES += patches/nio2.patch endif if ENABLE_SYSTEMTAP @@ -359,9 +359,9 @@ endif endif if ENABLE_NSS -ICEDTEA_PATCHES += patches/icedtea-nss-config.patch +ICEDTEA_PATCHES += patches/nss-config.patch else -ICEDTEA_PATCHES += patches/icedtea-nss-not-enabled-config.patch +ICEDTEA_PATCHES += patches/nss-not-enabled-config.patch endif if HAS_PAX @@ -373,17 +373,17 @@ ICEDTEA_PATCHES += $(DISTRIBUTION_PATCHE # Bootstrapping patches ICEDTEA_ECJ_PATCHES = patches/ecj/icedtea.patch \ - patches/ecj/icedtea-hotspot.patch \ - patches/ecj/icedtea-spp.patch \ - patches/ecj/icedtea-jopt.patch \ - patches/ecj/icedtea-jaxp-dependency.patch \ + patches/ecj/hotspot.patch \ + patches/ecj/spp.patch \ + patches/ecj/jopt.patch \ + patches/ecj/jaxp-dependency.patch \ patches/ecj/bootver.patch \ patches/ecj/getannotation-cast.patch \ patches/ecj/override.patch if DTDTYPE_QNAME ICEDTEA_ECJ_PATCHES += \ - patches/ecj/icedtea-jaxws-getdtdtype.patch + patches/ecj/jaxws-getdtdtype.patch endif if ENABLE_XRENDER diff -r 55566ffe7026 -r 74f752bcf15d NEWS --- a/NEWS Mon Feb 21 10:10:16 2011 +0100 +++ b/NEWS Tue Feb 22 00:35:15 2011 +0000 @@ -429,6 +429,9 @@ New in release 1.10 (2011-XX-XX): - PR600: HS19 upgrade broke CACAO build on ARM - PR616, PR99: Don't statically link libstdc++ or libgcc - PR632: patches/security/20110215/6878713.patch breaks shark zero build +* Cleanup + - Patches are no longer prefixed with 'icedtea-'. + - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. New in release 1.9.7 (2011-02-15): diff -r 55566ffe7026 -r 74f752bcf15d acinclude.m4 --- a/acinclude.m4 Mon Feb 21 10:10:16 2011 +0100 +++ b/acinclude.m4 Tue Feb 22 00:35:15 2011 +0000 @@ -106,7 +106,7 @@ AC_DEFUN([IT_SET_ARCH_SETTINGS], AC_SUBST(ARCHFLAG) ]) -AC_DEFUN([SET_OS_DIRS], +AC_DEFUN([IT_SET_OS_DIRS], [ case "${host_os}" in *linux*) @@ -129,7 +129,7 @@ AC_DEFUN([SET_OS_DIRS], AC_SUBST(OS_PATH) ]) -AC_DEFUN([FIND_JAVAC], +AC_DEFUN([IT_FIND_JAVAC], [ JAVAC=${SYSTEM_JDK_DIR}/bin/javac IT_FIND_JAVAC @@ -218,7 +218,7 @@ AC_DEFUN([IT_CHECK_JAVAC], fi ]) -AC_DEFUN([FIND_JAVA], +AC_DEFUN([IT_FIND_JAVA], [ AC_MSG_CHECKING(for java) AC_ARG_WITH([java], @@ -259,7 +259,7 @@ AC_DEFUN_ONCE([IT_CP_SUPPORTS_REFLINK], AM_CONDITIONAL([CP_SUPPORTS_REFLINK], test x"${it_cv_reflink}" = "xyes") ]) -AC_DEFUN_ONCE([WITH_OPENJDK_SRC_DIR], +AC_DEFUN_ONCE([IT_WITH_OPENJDK_SRC_DIR], [ DEFAULT_SRC_DIR=${abs_top_builddir}/openjdk AC_MSG_CHECKING([for an OpenJDK source directory]) @@ -313,7 +313,7 @@ AC_DEFUN_ONCE([IT_CAN_HARDLINK_TO_SOURCE AM_CONDITIONAL([SRC_DIR_HARDLINKABLE], test x"${it_cv_hardlink_src}" = "xyes") ]) -AC_DEFUN([FIND_ECJ_JAR], +AC_DEFUN([IT_FIND_ECJ_JAR], [ AC_MSG_CHECKING([for an ecj JAR file]) AC_ARG_WITH([ecj-jar], @@ -348,7 +348,7 @@ AC_DEFUN([FIND_ECJ_JAR], AC_SUBST(ECJ_JAR) ]) -AC_DEFUN([AC_CHECK_GCC_VERSION], +AC_DEFUN([IT_CHECK_GCC_VERSION], [ AC_MSG_CHECKING([version of GCC]) gcc_ver=`${CC} -dumpversion` From xerxes at zafena.se Mon Feb 21 17:48:38 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 22 Feb 2011 02:48:38 +0100 Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> Message-ID: <4D6315F6.2050709@zafena.se> On 2011-02-21 22:40, Robert Lougher wrote: > Hi, > > On 21 February 2011 21:22, Dr Andrew John Hughes wrote: >> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: >>> Greetings! >>> >>> "JamVM's got a shiny new Git repository, which contains the port to the >>> OpenJDK class-library." >>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >>> >>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >>> >> See comments below on the --enable-jamvm option. >> I'll leave comments on addvm to doko. I will split this patch in two commits, one for each option, to ease review, In this mail i have added the patch for the --enable-jamvm option. I will add --with-additional-vms=jamvm in a follow up patch. >> >> I think this should be ok to go in before the 1.10 branch as the changes >> to the build are mainly ancillary and don't affect the main options. >> > > Xerxes, can you take a new snapshot from the berlios git tree? A > couple of people have already tested the port. One of them (Ludovic > Orban) reported a crash with an application which stressed the GC > (failure after compaction). I tracked this down over the weekend, and > the port is now running stably. > > Rob. > > P.S. Thanks for doing the integration! > Superb! I have grabbed the updated stable snapshot. Thank you for the fix! >>> Index: icedtea6/Makefile.am >>> =================================================================== >>> --- icedtea6.orig/Makefile.am 2011-02-19 02:26:05.000000000 +0100 >>> +++ icedtea6/Makefile.am 2011-02-19 20:58:34.000000000 +0100 >>> @@ -11,6 +11,18 @@ >>> CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz >>> CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz >>> >>> +# The jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz got fetched from >>> +# http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/snapshot/jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz >>> +# Unfortunally the generated .tar.gz by the berlios cgit snapshot function >>> +# keeps changing sha256sum. I have hosted a snapshot on labb.zafena.se >>> +# while we wait for the final JamVM 1.6.0 release. >>> +JAMVM_VERSION = e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3 >>> +JAMVM_SHA256SUM = 24cf67795970d7e63d297a13b370ae8c3b141c35a22c3fd96137b5e62815a607 >>> +JAMVM_BASE_URL = http://labb.zafena.se/jamvm >>> +JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz >>> +JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz >>> +JAMVM_IMPORT_PATH = \$(abs_top_builddir)/jamvm/install/hotspot >>> + >> >> I'd prefer JAMVM_IMPORT_PATH was with the other paths in the Makefile.am rather than here. JAMVM_IMPORT_PATH Moved down to the other paths. >> Is there a reason for the leading backslash? No reason... removed. >>> >>> +stamps/download-jamvm.stamp: >>> +if BUILD_JAMVM >>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ >>> + | $(SHA256SUM) --check ; \ >>> + then \ >>> + if [ $(JAMVM_SRC_ZIP) ] ; \ >>> + then \ >>> + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ >>> + fi ; \ >>> + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ >>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ >>> + | $(SHA256SUM) --check ; \ >>> + then echo "ERROR: Bad download of JamVM zip"; false; \ >>> + fi; \ >>> + fi >>> +endif >>> + mkdir -p stamps >>> + touch $@ >> >> We need an option equivalent to --with-cacao-src-zip. I'd suggest >> adding this in a follow up patch. As with the drop tarballs, we >> should verify the checksum for pre-provided tarballs as well as >> download ones. It should be just a matter of symlinking the tarball >> here if an alternate one is specified. >> Noted, I will add --with-cacao-src-zip in another follow up patch. >> @@ -1018,6 +1080,7 @@ >> fi >> >> icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ >> + if ! test "x$(WITH_JAMVM)" = "xno"; then \ > > I don't think this will work, but it's hard to tell in patch form. > It looks like WITH_CACAO is getting nested inside WITH_JAMVM which > means WITH_CACAO will only be checked if WITH_JAMVM is set. Thank you for spotting this. Yes this part was clearly wrong as can be verified from the -version output of my first patch. The goal of this part are to make sure that when using CACAO or JamVM as the main VM then the Runtime environment should be named IcedTea6 Runtime Environment instead of OpenJDK Runtime Environment. > > Can you include the whole rule in a reply? > New whole new rule now looks like this: if test "x$(WITH_CACAO)" = "xyes" || \ test "x$(ENABLE_JAMVM)" = "xyes"; then \ echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ echo "PRODUCT_NAME=$(ICEDTEA_NAME)" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ else \ echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ fi ; And now java -version work as expected when using --enable-jamvm xranby at hp:~/icedtea6-jamvm-build$ ./openjdk.build/j2sdk-image/bin/java -version java version "1.6.0_21" IcedTea6 Runtime Environment (1.10pre+r55566ffe7026) (Ubuntu build 1.6.0_21-b21) JamVM (build 1.6.0-devel, inline-threaded interpreter) >>> @@ -1694,6 +1771,61 @@ >>> fi >>> rm -f stamps/rewrite-rhino.stamp >>> >>> +# JAMVM Renamed to JamVM >>> + >>> +stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp >>> +if BUILD_JAMVM >>> + cd jamvm/jamvm&& \ >>> + ./autogen.sh --with-java-runtime-library=openjdk \ >>> + --prefix=$(abs_top_builddir)/jamvm/install ; \ >>> + $(MAKE) ; \ >>> + $(MAKE) install >>> + mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server >>> + cp $(abs_top_builddir)/jamvm/install/lib/libjvm.so $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server >>> + ln -s server $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/client >>> + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt >>> + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so >>> +endif Added missing mkdir -p stamps touch $@ >>> Index: icedtea6/configure.ac >>> =================================================================== >>> --- icedtea6.orig/configure.ac 2011-02-19 02:26:05.000000000 +0100 >>> +++ icedtea6/configure.ac 2011-02-19 02:26:38.000000000 +0100 >>> @@ -175,6 +175,9 @@ >>> AC_CHECK_WITH_CACAO_HOME >>> AC_CHECK_WITH_CACAO_SRC_ZIP >>> AC_CHECK_WITH_CACAO_SRC_DIR >>> + >>> +AC_CHECK_ENABLE_JAMVM >>> + >> >> Please use IT as the prefix rather than AC. We are not the autoconf project :-) Fixed, now we are the IcedTea project :-)! Thank you Andrew for renaming the rest whole lot! >> >>> DISABLE_OPTIMIZATIONS >>> SET_SHARK_BUILD >>> ENABLE_ZERO_BUILD >>> Index: icedtea6/acinclude.m4 >>> =================================================================== >>> --- icedtea6.orig/acinclude.m4 2011-02-19 02:26:05.000000000 +0100 >>> +++ icedtea6/acinclude.m4 2011-02-19 03:23:52.000000000 +0100 >>> @@ -746,11 +746,15 @@ >>> sparc*-*-*) ;; >>> x86_64-*-*) ;; >>> *) >>> - if test "x${WITH_CACAO}" != xno; then >>> + if test "x${WITH_JAMVM}" != xno; then >>> use_zero=no >>> else >>> - use_zero=yes >>> - fi >>> + if test "x${WITH_CACAO}" != xno; then >>> + use_zero=no >>> + else >>> + use_zero=yes >>> + fi >>> + fi >> >> This would be clearer if you just added JAMVM as a new option >> rather than changing the CACAO one. I have now changed this part to @@ -746,7 +746,8 @@ sparc*-*-*) ;; x86_64-*-*) ;; *) - if test "x${WITH_CACAO}" != xno; then + if test "x${WITH_CACAO}" != xno || \ + test "x${ENABLE_JAMVM}" = xyes; then use_zero=no else use_zero=yes hope it makes things clearer. >> >>> ;; >>> esac >>> fi >>> @@ -820,6 +824,23 @@ >>> AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) >>> ]) >>> >>> +AC_DEFUN([AC_CHECK_ENABLE_JAMVM], >>> +[ >>> + AC_MSG_CHECKING(whether to use JamVM as VM) >>> + AC_ARG_ENABLE([jamvm], >>> + [AS_HELP_STRING(--enable-jamvm,use JamVM as VM [[default=no]])], >>> + [ >>> + WITH_JAMVM="${enableval}" >>> + ], >>> + [ >>> + WITH_JAMVM=no >>> + ]) >>> + >>> + AC_MSG_RESULT(${WITH_JAMVM}) >>> + AM_CONDITIONAL(WITH_JAMVM, test x"${WITH_JAMVM}" = "xyes") >>> + AC_SUBST(WITH_JAMVM) >>> +]) >>> + >> >> Again, should be IT_CHECK_ENABLE_JAMVM. >> Why are we using 'WITH_JAMVM' rather than 'ENABLE_JAMVM'? When CACAO got integrated in icedtea 1.3 then the configure option got named --with-cacao this is why the code are littered with WITH_CACAO... I simply copied the naming to make the code look familiar with its CACAO heritage. Noted, I will consider changing the WITH_CACAO to ENABLE_CACAO in a future CACAO naming cleanup patch. 'with' implies it's possible to >> take some option but we aren't using AC_ARG_WITH but AC_ARG_ENABLE. I have switched name to ENABLE_JAMVM in the new patch. >> Also if it is only yes/no a lot of the above would be simpler if we just tested for 'yes'. >> It seems to assume some other value is possible. Updated to only check for yes. >> >> -- >> Andrew :) >> >> Free Java Software Engineer >> Red Hat, Inc. (http://www.redhat.com) >> >> Support Free Java! >> Contribute to GNU Classpath and IcedTea >> http://www.gnu.org/software/classpath >> http://icedtea.classpath.org >> PGP Key: F5862A37 (https://keys.indymedia.org/) >> Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 >> Thank you Rob and Andrew for the first review round. New patch attached that implements the --enable-jamvm option Ok to push? Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: enable-jamvm.22feb.patch Type: text/x-patch Size: 12526 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/d637ded0/enable-jamvm.22feb.patch From ahughes at redhat.com Mon Feb 21 18:33:30 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 22 Feb 2011 02:33:30 +0000 Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: <4D6315F6.2050709@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> Message-ID: <20110222023330.GK12717@rivendell.middle-earth.co.uk> On 02:48 Tue 22 Feb , Xerxes R?nby wrote: > On 2011-02-21 22:40, Robert Lougher wrote: > > Hi, > > > > On 21 February 2011 21:22, Dr Andrew John Hughes wrote: > >> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: > >>> Greetings! > >>> > >>> "JamVM's got a shiny new Git repository, which contains the port to the > >>> OpenJDK class-library." > >>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html > >>> > >>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! > >>> > >> See comments below on the --enable-jamvm option. > >> I'll leave comments on addvm to doko. > > I will split this patch in two commits, one for each option, to ease > review, In this mail i have added the patch for the --enable-jamvm option. > > I will add --with-additional-vms=jamvm in a follow up patch. > This looks fine now and can go in for me. It looks like a simple rename issue for WITH_CACAO. Either you or I can do it, but lets get this patch in first so those changes don't break this. Once this is in, I plan to branch for 1.10. > >> > >> I think this should be ok to go in before the 1.10 branch as the changes > >> to the build are mainly ancillary and don't affect the main options. > >> > > > > Xerxes, can you take a new snapshot from the berlios git tree? A > > couple of people have already tested the port. One of them (Ludovic > > Orban) reported a crash with an application which stressed the GC > > (failure after compaction). I tracked this down over the weekend, and > > the port is now running stably. > > > > Rob. > > > > P.S. Thanks for doing the integration! > > > > Superb! > I have grabbed the updated stable snapshot. Thank you for the fix! > > >>> Index: icedtea6/Makefile.am > >>> =================================================================== > >>> --- icedtea6.orig/Makefile.am 2011-02-19 02:26:05.000000000 +0100 > >>> +++ icedtea6/Makefile.am 2011-02-19 20:58:34.000000000 +0100 > >>> @@ -11,6 +11,18 @@ > >>> CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz > >>> CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz > >>> > >>> +# The jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz got fetched from > >>> +# http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/snapshot/jamvm-e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3.tar.gz > >>> +# Unfortunally the generated .tar.gz by the berlios cgit snapshot function > >>> +# keeps changing sha256sum. I have hosted a snapshot on labb.zafena.se > >>> +# while we wait for the final JamVM 1.6.0 release. > >>> +JAMVM_VERSION = e9b0f82b9c9cfe5e5550f5e77de53ec2fba603a3 > >>> +JAMVM_SHA256SUM = 24cf67795970d7e63d297a13b370ae8c3b141c35a22c3fd96137b5e62815a607 > >>> +JAMVM_BASE_URL = http://labb.zafena.se/jamvm > >>> +JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz > >>> +JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz > >>> +JAMVM_IMPORT_PATH = \$(abs_top_builddir)/jamvm/install/hotspot > >>> + > >> > >> I'd prefer JAMVM_IMPORT_PATH was with the other paths in the Makefile.am rather than here. > > JAMVM_IMPORT_PATH Moved down to the other paths. > > >> Is there a reason for the leading backslash? > > No reason... removed. > > >>> > >>> +stamps/download-jamvm.stamp: > >>> +if BUILD_JAMVM > >>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > >>> + | $(SHA256SUM) --check ; \ > >>> + then \ > >>> + if [ $(JAMVM_SRC_ZIP) ] ; \ > >>> + then \ > >>> + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ > >>> + fi ; \ > >>> + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ > >>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > >>> + | $(SHA256SUM) --check ; \ > >>> + then echo "ERROR: Bad download of JamVM zip"; false; \ > >>> + fi; \ > >>> + fi > >>> +endif > >>> + mkdir -p stamps > >>> + touch $@ > >> > >> We need an option equivalent to --with-cacao-src-zip. I'd suggest > >> adding this in a follow up patch. As with the drop tarballs, we > >> should verify the checksum for pre-provided tarballs as well as > >> download ones. It should be just a matter of symlinking the tarball > >> here if an alternate one is specified. > >> > > Noted, I will add --with-cacao-src-zip in another follow up patch. > > >> @@ -1018,6 +1080,7 @@ > >> fi > >> > >> icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ > >> + if ! test "x$(WITH_JAMVM)" = "xno"; then \ > > > > I don't think this will work, but it's hard to tell in patch form. > > It looks like WITH_CACAO is getting nested inside WITH_JAMVM which > > means WITH_CACAO will only be checked if WITH_JAMVM is set. > > Thank you for spotting this. Yes this part was clearly wrong as can be > verified from the -version output of my first patch. > > The goal of this part are to make sure that when using CACAO or JamVM > as the main VM then the Runtime environment should be named IcedTea6 > Runtime Environment instead of OpenJDK Runtime Environment. > > > > > Can you include the whole rule in a reply? > > > > New whole new rule now looks like this: > > if test "x$(WITH_CACAO)" = "xyes" || \ > test "x$(ENABLE_JAMVM)" = "xyes"; then \ > echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ > >>openjdk/jdk/make/common/shared/Defs.gmk ; \ > echo "PRODUCT_NAME=$(ICEDTEA_NAME)" \ > >>openjdk/jdk/make/common/shared/Defs.gmk ; \ > else \ > echo "JDK_DERIVATIVE_NAME=$(ICEDTEA_NAME) $${icedtea_version}" \ > >>openjdk/jdk/make/common/shared/Defs.gmk ; \ > fi ; > > > And now java -version work as expected when using --enable-jamvm > xranby at hp:~/icedtea6-jamvm-build$ ./openjdk.build/j2sdk-image/bin/java > -version > java version "1.6.0_21" > IcedTea6 Runtime Environment (1.10pre+r55566ffe7026) (Ubuntu build > 1.6.0_21-b21) > JamVM (build 1.6.0-devel, inline-threaded interpreter) > > >>> @@ -1694,6 +1771,61 @@ > >>> fi > >>> rm -f stamps/rewrite-rhino.stamp > >>> > >>> +# JAMVM > > Renamed to JamVM > > >>> + > >>> +stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp > >>> +if BUILD_JAMVM > >>> + cd jamvm/jamvm&& \ > >>> + ./autogen.sh --with-java-runtime-library=openjdk \ > >>> + --prefix=$(abs_top_builddir)/jamvm/install ; \ > >>> + $(MAKE) ; \ > >>> + $(MAKE) install > >>> + mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server > >>> + cp $(abs_top_builddir)/jamvm/install/lib/libjvm.so $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server > >>> + ln -s server $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/client > >>> + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt > >>> + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so > >>> +endif > > Added missing > mkdir -p stamps > touch $@ > > >>> Index: icedtea6/configure.ac > >>> =================================================================== > >>> --- icedtea6.orig/configure.ac 2011-02-19 02:26:05.000000000 +0100 > >>> +++ icedtea6/configure.ac 2011-02-19 02:26:38.000000000 +0100 > >>> @@ -175,6 +175,9 @@ > >>> AC_CHECK_WITH_CACAO_HOME > >>> AC_CHECK_WITH_CACAO_SRC_ZIP > >>> AC_CHECK_WITH_CACAO_SRC_DIR > >>> + > >>> +AC_CHECK_ENABLE_JAMVM > >>> + > >> > >> Please use IT as the prefix rather than AC. We are not the autoconf project :-) > > Fixed, now we are the IcedTea project :-)! > Thank you Andrew for renaming the rest whole lot! > > >> > >>> DISABLE_OPTIMIZATIONS > >>> SET_SHARK_BUILD > >>> ENABLE_ZERO_BUILD > >>> Index: icedtea6/acinclude.m4 > >>> =================================================================== > >>> --- icedtea6.orig/acinclude.m4 2011-02-19 02:26:05.000000000 +0100 > >>> +++ icedtea6/acinclude.m4 2011-02-19 03:23:52.000000000 +0100 > >>> @@ -746,11 +746,15 @@ > >>> sparc*-*-*) ;; > >>> x86_64-*-*) ;; > >>> *) > >>> - if test "x${WITH_CACAO}" != xno; then > >>> + if test "x${WITH_JAMVM}" != xno; then > >>> use_zero=no > >>> else > >>> - use_zero=yes > >>> - fi > >>> + if test "x${WITH_CACAO}" != xno; then > >>> + use_zero=no > >>> + else > >>> + use_zero=yes > >>> + fi > >>> + fi > >> > >> This would be clearer if you just added JAMVM as a new option > >> rather than changing the CACAO one. > > I have now changed this part to > > @@ -746,7 +746,8 @@ > sparc*-*-*) ;; > x86_64-*-*) ;; > *) > - if test "x${WITH_CACAO}" != xno; then > + if test "x${WITH_CACAO}" != xno || \ > + test "x${ENABLE_JAMVM}" = xyes; then > use_zero=no > else > use_zero=yes > > > hope it makes things clearer. > > >> > >>> ;; > >>> esac > >>> fi > >>> @@ -820,6 +824,23 @@ > >>> AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) > >>> ]) > >>> > >>> +AC_DEFUN([AC_CHECK_ENABLE_JAMVM], > >>> +[ > >>> + AC_MSG_CHECKING(whether to use JamVM as VM) > >>> + AC_ARG_ENABLE([jamvm], > >>> + [AS_HELP_STRING(--enable-jamvm,use JamVM as VM [[default=no]])], > >>> + [ > >>> + WITH_JAMVM="${enableval}" > >>> + ], > >>> + [ > >>> + WITH_JAMVM=no > >>> + ]) > >>> + > >>> + AC_MSG_RESULT(${WITH_JAMVM}) > >>> + AM_CONDITIONAL(WITH_JAMVM, test x"${WITH_JAMVM}" = "xyes") > >>> + AC_SUBST(WITH_JAMVM) > >>> +]) > >>> + > >> > >> Again, should be IT_CHECK_ENABLE_JAMVM. > >> Why are we using 'WITH_JAMVM' rather than 'ENABLE_JAMVM'? > When CACAO got integrated in icedtea 1.3 then the configure option got > named --with-cacao this is why the code are littered with WITH_CACAO... > I simply copied the naming to make the code look familiar with its CACAO > heritage. > > Noted, I will consider changing the WITH_CACAO to ENABLE_CACAO in a > future CACAO naming cleanup patch. > > 'with' implies it's possible to > >> take some option but we aren't using AC_ARG_WITH but AC_ARG_ENABLE. > > I have switched name to ENABLE_JAMVM in the new patch. > > >> Also if it is only yes/no a lot of the above would be simpler if we just tested for 'yes'. > >> It seems to assume some other value is possible. > > Updated to only check for yes. > > > >> > >> -- > >> Andrew :) > >> > >> Free Java Software Engineer > >> Red Hat, Inc. (http://www.redhat.com) > >> > >> Support Free Java! > >> Contribute to GNU Classpath and IcedTea > >> http://www.gnu.org/software/classpath > >> http://icedtea.classpath.org > >> PGP Key: F5862A37 (https://keys.indymedia.org/) > >> Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 > >> > > Thank you Rob and Andrew for the first review round. > > New patch attached that implements the --enable-jamvm option > > Ok to push? > > Cheers > Xerxes > Index: icedtea6/Makefile.am > =================================================================== > --- icedtea6.orig/Makefile.am 2011-02-22 00:46:38.000000000 +0100 > +++ icedtea6/Makefile.am 2011-02-22 00:46:58.000000000 +0100 > @@ -11,6 +11,17 @@ > CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz > CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz > > +# The jamvm-3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27.tar.gz got fetched from > +# http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/snapshot/jamvm-3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27.tar.gz > +# Unfortunally the generated .tar.gz by the berlios cgit snapshot function > +# keeps changing sha256sum. I have hosted a snapshot on labb.zafena.se > +# while we wait for the final JamVM 1.6.0 release. > +JAMVM_VERSION = 3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27 > +JAMVM_SHA256SUM = 396daf08896a71cfcddfabfbaf2d8b3f07557d8143eaaa93be25e2d80f30e165 > +JAMVM_BASE_URL = http://labb.zafena.se/jamvm > +JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz > +JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz > + > JAXWS_DROP_URL = http://icedtea.classpath.org/download/drops > JAXWS_DROP_ZIP = jdk6-jaxws-b20.zip > JAXWS_DROP_SHA256SUM = 0c460583898b968a58bf88eb53f90a0e34369e2562d65fb3a143512dfcaeb3eb > @@ -37,6 +48,7 @@ > ENDORSED_DIR = $(BOOT_DIR)/lib/endorsed > ECJ_BOOT_DIR = $(abs_top_builddir)/bootstrap/ecj > ICEDTEA_BOOT_DIR = $(abs_top_builddir)/bootstrap/icedtea > +JAMVM_IMPORT_PATH = $(abs_top_builddir)/jamvm/install/hotspot > SERVER_DIR = hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server > BUILD_JRE_ARCH_DIR = $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) > BUILD_DEBUG_JRE_ARCH_DIR = $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) > @@ -126,8 +138,13 @@ > ICEDTEA_BUILD_TARGET=jdk_only > ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only > else > +if ENABLE_JAMVM > + ICEDTEA_BUILD_TARGET=jdk_only > + ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only > +else > ICEDTEA_DEBUG_BUILD_TARGET = debug_build > endif > +endif > > if BOOTSTRAPPING > BOOTSTRAP_DIRECTORY_STAMP = stamps/bootstrap-directory.stamp > @@ -470,6 +487,11 @@ > ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" > endif > > +if ENABLE_JAMVM > +ICEDTEA_ENV += \ > + ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" > +endif > + > if DISABLE_OPTIMIZATIONS > ICEDTEA_ENV += \ > NO_OPTIMIZATIONS="true" \ > @@ -583,8 +605,10 @@ > clean-icedtea icedtea-against-icedtea clean-icedtea-ecj \ > clean-tools-jar clean-copy clean-rt hotspot \ > hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \ > - clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug > - clean-icedtea-against-ecj clean-cacao clean-add-cacao clean-add-cacao-debug \ > + clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug \ > + clean-icedtea-against-ecj \ > + clean-jamvm \ > + clean-cacao clean-add-cacao clean-add-cacao-debug \ > clean-ports clean-overlay clean-extract-ecj clean-extract clean-extract-openjdk \ > clean-replace-hotspot clean-generated clean-download clean-hgforest clean-download-openjdk \ > clean-rewriter clean-rewrite-rhino clean-add-systemtap clean-add-systemtap-debug \ > @@ -741,6 +765,29 @@ > rm -f $(CACAO_SRC_ZIP) > rm -f stamps/download-cacao.stamp > > +stamps/download-jamvm.stamp: > +if BUILD_JAMVM > + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > + | $(SHA256SUM) --check ; \ > + then \ > + if [ $(JAMVM_SRC_ZIP) ] ; \ > + then \ > + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ > + fi ; \ > + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ > + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > + | $(SHA256SUM) --check ; \ > + then echo "ERROR: Bad download of JamVM zip"; false; \ > + fi; \ > + fi > +endif > + mkdir -p stamps > + touch $@ > + > +clean-download-jamvm: > + rm -f $(JAMVM_SRC_ZIP) > + rm -f stamps/download-jamvm.stamp > + > clean-drops: clean-download-jaxp-drop clean-download-jaf-drop \ > clean-download-jaxws-drop > if [ -e drops ] ; then \ > @@ -803,18 +850,19 @@ > rm -f stamps/download-openjdk.stamp > > stamps/download.stamp: stamps/download-drops.stamp stamps/download-cacao.stamp \ > - stamps/download-openjdk.stamp > + stamps/download-jamvm.stamp stamps/download-openjdk.stamp > touch stamps/download.stamp > > -clean-download: clean-drops clean-download-cacao clean-download-openjdk > +clean-download: clean-drops clean-download-cacao clean-download-jamvm \ > + clean-download-openjdk > rm -f stamps/download.stamp > > stamps/extract.stamp: stamps/extract-openjdk.stamp \ > - stamps/extract-cacao.stamp > + stamps/extract-cacao.stamp stamps/extract-jamvm.stamp > mkdir -p stamps > touch $@ > > -clean-extract: clean-extract-openjdk clean-cacao > +clean-extract: clean-extract-openjdk clean-cacao clean-jamvm > rm -f stamps/extract.stamp > > stamps/extract-openjdk.stamp: stamps/download.stamp > @@ -872,6 +920,20 @@ > mkdir -p stamps > touch stamps/extract-cacao.stamp > > +stamps/extract-jamvm.stamp: > +if BUILD_JAMVM > + set -e ; \ > + if ! test -d jamvm ; \ > + then \ > + mkdir jamvm ; \ > + $(TAR) xf $(JAMVM_SRC_ZIP) -C jamvm ; \ > + dir=$$(basename jamvm/jamvm-*) ; \ > + ln -s $$dir jamvm/jamvm ; \ > + fi > +endif > + mkdir -p stamps > + touch stamps/extract-jamvm.stamp > + > stamps/replace-hotspot.stamp: stamps/extract.stamp > if WITH_ALT_HSBUILD > if test "x${HSBUILD}" != "xoriginal"; then \ > @@ -1019,7 +1081,8 @@ > fi > > icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ > - if ! test "x$(WITH_CACAO)" = "xno"; then \ > + if test "x$(WITH_CACAO)" = "xyes" || \ > + test "x$(ENABLE_JAMVM)" = "xyes"; then \ > echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ > >>openjdk/jdk/make/common/shared/Defs.gmk ; \ > echo "PRODUCT_NAME=$(ICEDTEA_NAME)" \ > @@ -1245,7 +1308,8 @@ > # If you change anything here in the icedtea target, please make sure > # you change it in the icedtea-debug target as well. > stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \ > - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp > + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ > + stamps/jamvm.stamp > $(ARCH_PREFIX) $(MAKE) \ > $(ICEDTEA_ENV) \ > -C openjdk \ > @@ -1263,6 +1327,9 @@ > if WITH_CACAO > printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg > endif > +if ENABLE_JAMVM > + printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg > +endif > @echo "IcedTea is served:" $(BUILD_OUTPUT_DIR) > mkdir -p stamps > touch stamps/icedtea.stamp > @@ -1272,7 +1339,8 @@ > rm -f stamps/icedtea.stamp > > stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \ > - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp > + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ > + stamps/jamvm.stamp > $(ARCH_PREFIX) $(MAKE) \ > $(ICEDTEA_ENV) \ > -C openjdk \ > @@ -1290,6 +1358,9 @@ > if WITH_CACAO > printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg > endif > +if ENABLE_JAMVM > + printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg > +endif > @echo "IcedTea (debug build) is served:" \ > $(DEBUG_BUILD_OUTPUT_DIR) > mkdir -p stamps > @@ -1695,6 +1766,29 @@ > fi > rm -f stamps/rewrite-rhino.stamp > > +# JamVM > + > +stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp > +if BUILD_JAMVM > + cd jamvm/jamvm && \ > + ./autogen.sh --with-java-runtime-library=openjdk \ > + --prefix=$(abs_top_builddir)/jamvm/install ; \ > + $(MAKE) ; \ > + $(MAKE) install > + mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server > + cp $(abs_top_builddir)/jamvm/install/lib/libjvm.so $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server > + ln -s server $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/client > + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt > + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so > +endif > + mkdir -p stamps > + touch $@ > + > +clean-jamvm: > + rm -rf jamvm > + rm -f stamps/jamvm.stamp > + rm -f stamps/extract-jamvm.stamp > + > # CACAO > > stamps/cacao.stamp: $(OPENJDK_TREE) stamps/rt.stamp > @@ -2059,6 +2153,8 @@ > > download-drops: stamps/download-drops.stamp > > +download-jamvm: stamps/download-jamvm.stamp > + > download-jaf-drop: stamps/download-jaf-drop.stamp > > download-jaxp-drop: stamps/download-jaxp-drop.stamp > @@ -2083,6 +2179,8 @@ > > icedtea-ecj: stamps/icedtea-ecj.stamp > > +jamvm: stamps/jamvm.stamp > + > jtreg: stamps/jtreg.stamp > > liveconnect: stamps/liveconnect.stamp > Index: icedtea6/configure.ac > =================================================================== > --- icedtea6.orig/configure.ac 2011-02-22 00:46:20.000000000 +0100 > +++ icedtea6/configure.ac 2011-02-22 00:46:58.000000000 +0100 > @@ -175,6 +175,9 @@ > AC_CHECK_WITH_CACAO_HOME > AC_CHECK_WITH_CACAO_SRC_ZIP > AC_CHECK_WITH_CACAO_SRC_DIR > + > +IT_CHECK_ENABLE_JAMVM > + > DISABLE_OPTIMIZATIONS > SET_SHARK_BUILD > ENABLE_ZERO_BUILD > Index: icedtea6/acinclude.m4 > =================================================================== > --- icedtea6.orig/acinclude.m4 2011-02-22 00:46:20.000000000 +0100 > +++ icedtea6/acinclude.m4 2011-02-22 01:55:54.000000000 +0100 > @@ -746,7 +746,8 @@ > sparc*-*-*) ;; > x86_64-*-*) ;; > *) > - if test "x${WITH_CACAO}" != xno; then > + if test "x${WITH_CACAO}" != xno || \ > + test "x${ENABLE_JAMVM}" = xyes; then > use_zero=no > else > use_zero=yes > @@ -820,6 +821,20 @@ > AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) > ]) > > +AC_DEFUN([IT_CHECK_ENABLE_JAMVM], > +[ > + AC_MSG_CHECKING(whether to use JamVM as VM) > + AC_ARG_ENABLE([jamvm], > + [AS_HELP_STRING(--enable-jamvm,use JamVM as VM [[default=no]])], > + [ > + ENABLE_JAMVM="${enableval}" > + ]) > + > + AC_MSG_RESULT(${ENABLE_JAMVM}) > + AM_CONDITIONAL(ENABLE_JAMVM, test x"${ENABLE_JAMVM}" = "xyes") > + AC_SUBST(ENABLE_JAMVM) > +]) > + > AC_DEFUN([AC_CHECK_ENABLE_CACAO], > [ > AC_MSG_CHECKING(whether to use CACAO as VM) > @@ -1166,6 +1181,7 @@ > AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x) > AM_CONDITIONAL(ADD_ZERO_BUILD, test x$add_vm_zero != x || test x$add_vm_shark != x) > AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x) > +AM_CONDITIONAL(BUILD_JAMVM, test "x${ENABLE_JAMVM}" = xyes) > AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes) > > if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then > Index: icedtea6/NEWS > =================================================================== > --- icedtea6.orig/NEWS 2011-02-22 00:46:38.000000000 +0100 > +++ icedtea6/NEWS 2011-02-22 00:46:58.000000000 +0100 > @@ -10,6 +10,7 @@ > > New in release 1.10 (2011-XX-XX): > > +* Added out-of-the-box JamVM support using --enable-jamvm > * NetX and the plugin moved to the IcedTea-Web project with a separate > release cycle. > * Shark provided upstream rather than as part of IcedTea. > Index: icedtea6/ChangeLog > =================================================================== > --- icedtea6.orig/ChangeLog 2011-02-22 01:58:56.000000000 +0100 > +++ icedtea6/ChangeLog 2011-02-22 02:44:50.000000000 +0100 > @@ -1,3 +1,42 @@ > +2011-02-22 Xerxes Ranby > + > + JamVM: Taste the New --enable-jamvm Flavour! > + * NEWS: Updated. > + * Makefile.am (JAMVM_VERSION): New variable. > + (JAMVM_SHA256SUM): Likewise. > + (JAMVM_BASE_URL): Likewise. > + (JAMVM_URL): Likewise. > + (JAMVM_SRC_ZIP): Likewise. > + (JAMVM_IMPORT_PATH): Likewise. > + (ICEDTEA_BUILD_TARGET): > + Build only jdk if jamvm are enabled. > + (ICEDTEA_DEBUG_BUILD_TARGET): Likewise. > + (ICEDTEA_ENV): Set ALT_HOTSPOT_IMPORT_PATH to JAMVM_IMPORT_PATH > + if jamvm are enabled. > + (PRODUCT_NAME): Make -version report IcedTea6 Runtime Environment > + if jamvm are enabled. > + (JDK_DERIVATIVE_NAME): Only show IcedTea version > + if jamvm are enabled. > + (stamps/download-jamvm.stamp): New make target. > + (clean-download-jamvm): Likewise. > + (stamps/extract-jamvm.stamp): Likewise. > + (stamps/jamvm.stamp): Likewise. > + (clean-jamvm): Likewise. > + (.PHONY): Add clean-jamvm. > + (stamps/download.stamp): Add stamps/download-jamvm.stamp. > + (clean-download): Add clean-download-jamvm. > + (stamps/extract.stamp): Add stamps/extract-jamvm.stamp. > + (clean-extract): Add clean-jamvm. > + (stamps/icedtea.stamp): Add stamps/jamvm.stamp. > + (download-jamvm): Alias to stamps/download-jamvm.stamp. > + (jamvm): Alias to stamps/jamvm.stamp. > + * configure.ac (IT_CHECK_ENABLE_JAMVM): Use new macro. > + * acinclude.m4: > + (ENABLE_ZERO_BUILD): Do not use zero if JamVM are enabled. > + (IT_CHECK_ENABLE_JAMVM): New macro. > + (BUILD_JAMVM): New conditional. > + (ENABLE_JAMVM): New conditional. > + > 2011-02-21 Xerxes Ranby > > PR600: HS19 upgrade broke CACAO build on ARM -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From doko at ubuntu.com Mon Feb 21 19:15:57 2011 From: doko at ubuntu.com (Matthias Klose) Date: Tue, 22 Feb 2011 04:15:57 +0100 Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: <20110222023330.GK12717@rivendell.middle-earth.co.uk> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> Message-ID: <4D632A6D.6070305@ubuntu.com> On 22.02.2011 03:33, Dr Andrew John Hughes wrote: > Once this is in, I plan to branch for 1.10. the branch should only be done after --with-additional-vms works with jamvm. I don't see any reason why to keep this out from the branch. Matthias From ahughes at redhat.com Mon Feb 21 19:48:35 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 22 Feb 2011 03:48:35 +0000 Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: <4D632A6D.6070305@ubuntu.com> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D632A6D.6070305@ubuntu.com> Message-ID: <20110222034835.GM12717@rivendell.middle-earth.co.uk> On 04:15 Tue 22 Feb , Matthias Klose wrote: > On 22.02.2011 03:33, Dr Andrew John Hughes wrote: > > Once this is in, I plan to branch for 1.10. > > the branch should only be done after --with-additional-vms works with jamvm. I > don't see any reason why to keep this out from the branch. > > Matthias I didn't say we were going to. Please review the patch and it can go in 1.10. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Tue Feb 22 00:34:28 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 22 Feb 2011 08:34:28 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 513fd50d8c95 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=513fd50d8c95 author: Andrew John Hughes date: Tue Feb 22 02:16:21 2011 +0000 Fix duplication of absolute path when creating $(ECJ_BOOT_DIR)/lib. 2011-02-22 Andrew John Hughes * Makefile.am: (bootstrap-directory-ecj): Fix double absolute path specification in creation of $(ECJ_BOOT_DIR)/lib. changeset 4ffc2aade98c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=4ffc2aade98c author: Andrew John Hughes date: Tue Feb 22 08:34:09 2011 +0000 PR103: Usage of native2ascii during bootstrap. 2011-02-22 Andrew John Hughes PR103: Usage of native2ascii during bootstrap. * Makefile.am: (bootstrap-directory-ecj): Symlink native2ascii. * NEWS: Updated. * acinclude.m4: (IT_FIND_NATIVE2ASCII): Added. * configure.ac: Call IT_FIND_NATIVE2ASCII. diffstat: 5 files changed, 58 insertions(+), 1 deletion(-) ChangeLog | 17 +++++++++++++++++ Makefile.am | 3 ++- NEWS | 1 + acinclude.m4 | 37 +++++++++++++++++++++++++++++++++++++ configure.ac | 1 + diffs (113 lines): diff -r 74f752bcf15d -r 4ffc2aade98c ChangeLog --- a/ChangeLog Tue Feb 22 00:35:15 2011 +0000 +++ b/ChangeLog Tue Feb 22 08:34:09 2011 +0000 @@ -1,3 +1,20 @@ 2011-02-21 Andrew John Hughes + + PR103: Usage of native2ascii during bootstrap. + * Makefile.am: + (bootstrap-directory-ecj): Symlink native2ascii. + * NEWS: Updated. + * acinclude.m4: + (IT_FIND_NATIVE2ASCII): Added. + * configure.ac: Call IT_FIND_NATIVE2ASCII. + +2011-02-22 Andrew John Hughes + + * Makefile.am: + (bootstrap-directory-ecj): Fix double + absolute path specification in creation + of $(ECJ_BOOT_DIR)/lib. + 2011-02-21 Andrew John Hughes * NEWS: Mention cleanups. diff -r 74f752bcf15d -r 4ffc2aade98c Makefile.am --- a/Makefile.am Tue Feb 22 00:35:15 2011 +0000 +++ b/Makefile.am Tue Feb 22 08:34:09 2011 +0000 @@ -1161,6 +1161,7 @@ stamps/bootstrap-directory-ecj.stamp: st ln -sf $(JAVAH) $(ECJ_BOOT_DIR)/bin/javah ln -sf $(RMIC) $(ECJ_BOOT_DIR)/bin/rmic ln -sf $(JAR) $(ECJ_BOOT_DIR)/bin/jar + ln -sf $(NATIVE2ASCII) $(ECJ_BOOT_DIR)/bin/native2ascii ln -sf $(abs_top_builddir)/javac $(ECJ_BOOT_DIR)/bin/javac ln -sf $(abs_top_builddir)/javap $(ECJ_BOOT_DIR)/bin/javap mkdir -p $(ECJ_BOOT_DIR)/lib/endorsed && \ @@ -1185,7 +1186,7 @@ stamps/bootstrap-directory-ecj.stamp: st ln -s $(SYSTEM_JDK_DIR)/include/$$i $(ECJ_BOOT_DIR)/include/$$i; \ done # For HotSpot - mkdir -p $(abs_top_builddir)/$(ECJ_BOOT_DIR)/lib && \ + mkdir -p $(ECJ_BOOT_DIR)/lib && \ ln -sf $(ECJ_BOOT_DIR)/jre/lib/rt.jar $(ECJ_BOOT_DIR)/lib/tools.jar mkdir -p stamps touch stamps/bootstrap-directory-ecj.stamp diff -r 74f752bcf15d -r 4ffc2aade98c NEWS --- a/NEWS Tue Feb 22 00:35:15 2011 +0000 +++ b/NEWS Tue Feb 22 08:34:09 2011 +0000 @@ -429,6 +429,7 @@ New in release 1.10 (2011-XX-XX): - PR600: HS19 upgrade broke CACAO build on ARM - PR616, PR99: Don't statically link libstdc++ or libgcc - PR632: patches/security/20110215/6878713.patch breaks shark zero build + - PR103: Usage of native2ascii during bootstrap * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. diff -r 74f752bcf15d -r 4ffc2aade98c acinclude.m4 --- a/acinclude.m4 Tue Feb 22 00:35:15 2011 +0000 +++ b/acinclude.m4 Tue Feb 22 08:34:09 2011 +0000 @@ -470,6 +470,43 @@ AC_DEFUN([IT_FIND_RMIC], fi AC_MSG_RESULT(${RMIC}) AC_SUBST(RMIC) +]) + +AC_DEFUN([IT_FIND_NATIVE2ASCII], +[ + NATIVE2ASCII_DEFAULT=${SYSTEM_JDK_DIR}/bin/native2ascii + AC_MSG_CHECKING([if a native2ascii binary was specified]) + AC_ARG_WITH([native2ascii], + [AS_HELP_STRING(--with-native2ascii,specify location of the native2ascii converter)], + [ + if test "x${withval}" = "xyes"; then + NATIVE2ASCII=no + else + NATIVE2ASCII="${withval}" + fi + ], + [ + NATIVE2ASCII=no + ]) + AC_MSG_RESULT(${NATIVE2ASCII}) + if test "x${NATIVE2ASCII}" = "xno"; then + NATIVE2ASCII=${NATIVE2ASCII_DEFAULT} + fi + AC_MSG_CHECKING([if $NATIVE2ASCII is a valid executable]) + if ! test -x "${NATIVE2ASCII}"; then + AC_MSG_RESULT([no]) + NATIVE2ASCII="" + AC_PATH_PROG(NATIVE2ASCII, "native2ascii") + if test -z "${NATIVE2ASCII}"; then + AC_PATH_PROG(NATIVE2ASCII, "gnative2ascii") + fi + if test -z "${NATIVE2ASCII}"; then + AC_MSG_ERROR("A native2ascii converter was not found.") + fi + else + AC_MSG_RESULT([yes]) + fi + AC_SUBST([NATIVE2ASCII]) ]) AC_DEFUN([IT_FIND_ENDORSED_JARS], diff -r 74f752bcf15d -r 4ffc2aade98c configure.ac --- a/configure.ac Tue Feb 22 00:35:15 2011 +0000 +++ b/configure.ac Tue Feb 22 08:34:09 2011 +0000 @@ -153,6 +153,7 @@ IT_FIND_JAVAH IT_FIND_JAVAH IT_FIND_JAR IT_FIND_RMIC +IT_FIND_NATIVE2ASCII if test "x$enable_bootstrap" = "xyes"; then IT_FIND_ECJ_JAR IT_FIND_XALAN2_JAR From mark at klomp.org Tue Feb 22 00:58:18 2011 From: mark at klomp.org (Mark Wielaard) Date: Tue, 22 Feb 2011 09:58:18 +0100 Subject: Announcing the IcedTea buildbot - buildslave configuration tutorial In-Reply-To: <4D627ED8.6090600@zafena.se> References: <1298280666.3387.47.camel@springer.wildebeest.org> <4D627ED8.6090600@zafena.se> Message-ID: <1298365098.3254.11.camel@springer.wildebeest.org> On Mon, 2011-02-21 at 16:03 +0100, Xerxes R?nby wrote: > I would like to contribute with a small tutorial on how to setup a new buildslave. Nice! Thanks for writing this up. Maybe add it as icedtea/README to the buildbot hg repo? (note there are directories under the buildbot hg repo in case we want to put other masters on builder.classpath.org, for now there is just the icedtea one though) > # Test the installed buildslave > # python-mock are a unittest framework for python and can be used to test if the built buildslave works as expected > # When running the tests you should only see a lot of green [OK] displayed and the test should end with something like: > # Ran 100 tests in 4.937s > # PASSED (successes=100) > sudo apt-get install python-mock > PYTHONPATH=. trial buildslave.test One note on Fedora here. Sadly it has a package called mock that clashes with the global python namespace which makes running the tests almost impossible. It should still al work though. There is a Fedora bug about this: https://bugzilla.redhat.com/show_bug.cgi?id=601725 > # Setup the buildslave wget cache wrapper > # This optional *hack* makes the builders wget cache all downloaded OpenJDK drops between builds. > sudo mkdir /home/wgetcache > sudo chmod a+w /home/wgetcache > sudo chmod a+r /home/wgetcache > wget http://icedtea.classpath.org/hg/buildbot/raw-file/15bb449380ba/buildslave/tools/wget.cache.wrapper > sudo mv /usr/bin/wget /usr/bin/wget.real > chmod +x wget.cache.wrapper > sudo mv wget.cache.wrapper /usr/bin/wget Whoa, install system wide? Maybe just add it as alias or in the home bin PATH of the buildslave? > #### OK all dependencies to run the buildslave and build OpenJDK are met, > # now we simply need to decide a place for the buildslaves workdirectory to live. > # and which user to run the slave. > > # Install the bot by running buildslave create-slave > # The buildslave-name and password are given by the owner of the buildmaster. > buildslave create-slave /var/lib/buildbot/icedtea builder.classpath.org:9989 buildslave-name password People should really just checkout the master.cfg file and hack their slave in. You can set a name, add it to the schedulers you are interested in, and setup the build steps to get the right configure arguments and make check steps that are appropriate for your build. Then just post the patch to the list. If it looks fine, it will be committed to the master.cfg, installed on the master and you will get your "secret password" by private email. > # Create a buildslave launcher script > echo "cd /var/lib/buildbot/icedtea > export LANG= > buildslave stop /var/lib/buildbot/icedtea > buildslave start /var/lib/buildbot/icedtea" > startbot.sh > chmod +x startbot.sh For my slaves I have also this: $ sudo -u buildslave crontab -l @reboot /usr/local/bin/buildslave start /usr/local/build/buildslave/icedtea > # Have fun! > # Keep a eye on the buildmasters overview page to spot problems with the bot. > # http://builder.classpath.org/icedtea/buildbot/waterfall There is also the irc bot in channel #openjdk. And hopefully we will have the mail target to send emails soon. See the master.cfg, it is disabled atm. Cheers, Mark From mark at klomp.org Tue Feb 22 01:39:09 2011 From: mark at klomp.org (Mark Wielaard) Date: Tue, 22 Feb 2011 10:39:09 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <20110221205224.GA12717@rivendell.middle-earth.co.uk> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> <20110221205224.GA12717@rivendell.middle-earth.co.uk> Message-ID: <1298367549.3254.20.camel@springer.wildebeest.org> On Mon, 2011-02-21 at 20:52 +0000, Dr Andrew John Hughes wrote: > I can see how it would be advantageous from a speed perspective, but for me, > if I'm going to bother building one of the alternative VMs, I want to know it > actually works. Now I guess you can run 'check-hotspot' with each of the alternative > VMs but I don't see why that saves anything over just doing the full build, > which tests the VM heavily with lots of javac invocations. So we need targets for at least check-hotspot and check-langtools to be run with alternative runtimes build in. This might even be a nice idea for pure hotspot client/server/tiered testing. Ideally also make-check-jdk, but that on itself takes ages. > > Also, could we have an alias for "hotspot=next" or something? Assuming > > that we only support "current" and "next" hotspot, then you don't have > > to remember which particular version it represents (also easier for > > making sure a buildslave tracks them). > > > > I think what you want is already catered for; as documented in README, > a simple --with-hotspot-build will get you the alternative HotSpot. > > ORIGINAL_BUILD="original" > ALTERNATE_BUILD="hs20" > ... > if test "x${HSBUILD}" = xyes; then > HSBUILD="${ALTERNATE_BUILD}" > elif test "x${HSBUILD}" = xno; then > HSBUILD="${ORIGINAL_BUILD}" > fi > > so the two alternatives are always available via --with-hotspot-build > and --without-hotspot-build, the former being the one from the HotSpot > tarball, the latter from the original OpenJDK tarball. O wow. That is nice. Completely missed that. I added a new "quick" squeeze-x86_64 builder icedtea6-squeeze-x86_64-quick-hotspot for that (patch attached - note the horrible copy/paste, sorry about that). I would almost suggest you make this so that it is possible to use this with --enable-additional-vms for easy testing by users... Cheers, Mark -------------- next part -------------- A non-text attachment was scrubbed... Name: icedtea6-squeeze-x86_64-quick-hotspot.patch Type: text/x-patch Size: 3076 bytes Desc: Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/391e1b35/icedtea6-squeeze-x86_64-quick-hotspot.patch From mark at klomp.org Tue Feb 22 01:51:05 2011 From: mark at klomp.org (Mark Wielaard) Date: Tue, 22 Feb 2011 10:51:05 +0100 Subject: Announcing the IcedTea buildbot In-Reply-To: <20110221214435.GF12717@rivendell.middle-earth.co.uk> References: <1298280666.3387.47.camel@springer.wildebeest.org> <20110221214435.GF12717@rivendell.middle-earth.co.uk> Message-ID: <1298368265.3254.25.camel@springer.wildebeest.org> On Mon, 2011-02-21 at 21:44 +0000, Dr Andrew John Hughes wrote: > > Feedback on how we can make this buildbot setup more productive for > > anybody hacking on icedtea really appreciated. > > My immediate suggestion would be to provide testing of icedtea6-hg > (which builds against OpenJDK6 hg) and also the icedtea6-1.10 branch > which should appear later today. The challenge with depending on openjdk trees is that I haven't figured out what the best way is to integrate openjdk forest updates. I assume we should just treat them as independent trees. Which brings us to the second challenge of filtering out update events for different trees. Currently we treat each repository directory name as separate branch and then filter on that. If we monitor/pull from different servers it might get a bit more tricky. It can be done for the various icedtea6 release branches, since they build against a fixed openjdk drop, but it would be nice to have fresh new slaves for them to not over commit the current build slaves. Do you have a spare machine to run release branch checks on? Thanks, Mark From xerxes at zafena.se Tue Feb 22 01:54:32 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 22 Feb 2011 10:54:32 +0100 Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: <20110222023330.GK12717@rivendell.middle-earth.co.uk> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> Message-ID: <4D6387D8.2080206@zafena.se> On 2011-02-22 03:33, Dr Andrew John Hughes wrote: > On 02:48 Tue 22 Feb , Xerxes R?nby wrote: >> On 2011-02-21 22:40, Robert Lougher wrote: >>> Hi, >>> >>> On 21 February 2011 21:22, Dr Andrew John Hughes wrote: >>>> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: >>>>> Greetings! >>>>> >>>>> "JamVM's got a shiny new Git repository, which contains the port to the >>>>> OpenJDK class-library." >>>>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >>>>> >>>>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >>>>> >>>> See comments below on the --enable-jamvm option. >>>> I'll leave comments on addvm to doko. >> >> I will split this patch in two commits, one for each option, to ease >> review, In this mail i have added the patch for the --enable-jamvm option. >> >> I will add --with-additional-vms=jamvm in a follow up patch. >> > > This looks fine now and can go in for me. > It looks like a simple rename issue for WITH_CACAO. Either you or I can > do it, but lets get this patch in first so those changes don't break this. > > Once this is in, I plan to branch for 1.10. > Hi I have regenerated the --enable-jamvm patch to apply on top of the current IcedTea6 trunk after last nights AC_ to IT_ macro renaming. enable-jamvm.22feb-v2.patch I have also attached the second part of this patch for review, the --with-additional-vms=jamvm option. with-additional-vms-jamvm.22feb.patch Cheers, and have a great day! Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: enable-jamvm.22feb-v2.patch Type: text/x-patch Size: 12667 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/627086d2/enable-jamvm.22feb-v2.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: with-additional-vms-jamvm.22feb.patch Type: text/x-patch Size: 7265 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/627086d2/with-additional-vms-jamvm.22feb.patch From ptisnovs at redhat.com Tue Feb 22 02:26:40 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Tue, 22 Feb 2011 11:26:40 +0100 Subject: Reviewer needed - fix for regression test: test/java/io/IOException/LastErrorString.java In-Reply-To: <20110221214839.GG12717@rivendell.middle-earth.co.uk> References: <4D629589.9020201@redhat.com> <20110221214839.GG12717@rivendell.middle-earth.co.uk> Message-ID: <4D638F60.2090103@redhat.com> Dr Andrew John Hughes wrote: > On 17:40 Mon 21 Feb , Pavel Tisnovsky wrote: >> Hi all, >> >> I'd like to add new patch into IcedTea6 HEAD and probably backport it >> into IcedTea6-1.9 too. This patch fixes issue found in regression test >> test/java/io/IOException/LastErrorString.java: >> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634 >> >> Besides the problem described above original version of this test also >> does not distinguish between the unreadable and unwriteable files, which >> I've also fixed. >> > > Can you elaborate on what changes you made? > It's not very obvious from the patch. Sure. The test is now started from (new) shell script which detects the proper working directory (such directory is created for each test by JTreg harness) and then this script creates four empty files and one subdirectory there: - one readable file (u+r) - one writeable file (u+w) - one unreadable file (a-r) - one unwriteable file (a-w) - unwriteable directory Then the Java part of this test is started with one parameter - path to working directory. This part of test tries to open files/directories for reading/writing and check if proper exception is thrown when such files/directories could not be opened for various reasons (it's not possible to open read-only file for writing etc.). > > Does the test now avoid /etc/shadow? yes, perfectly :-) >> >> PS: if this fix will be approved for IcedTea6, I'd like to push this >> change to OpenJDK6 and OpenJDK7 too. > > I can't give approval for that. > Yeah, I just wanted to inform you that this change should be included in O6 and O7 too in the future. From andrew at icedtea.classpath.org Tue Feb 22 02:58:43 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 22 Feb 2011 10:58:43 +0000 Subject: /hg/icedtea6: PR633: Don't install the redundant proprietary jav... Message-ID: changeset 3dc52504cbdd in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3dc52504cbdd author: Andrew John Hughes date: Tue Feb 22 10:58:37 2011 +0000 PR633: Don't install the redundant proprietary javaws man page 2011-02-22 Andrew John Hughes PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart * Makefile.am: Add new page. * NEWS: Updated. * fsg.sh: Remove useless javaws man pages. * patches/pr633-no_javaws_man_page.patch: Don't try and install javaws.1 on 32-bit platforms. diffstat: 5 files changed, 33 insertions(+), 1 deletion(-) ChangeLog | 10 ++++++++++ Makefile.am | 3 ++- NEWS | 1 + fsg.sh | 5 +++++ patches/pr633-no_javaws_man_page.patch | 15 +++++++++++++++ diffs (72 lines): diff -r 4ffc2aade98c -r 3dc52504cbdd ChangeLog --- a/ChangeLog Tue Feb 22 08:34:09 2011 +0000 +++ b/ChangeLog Tue Feb 22 10:58:37 2011 +0000 @@ -1,3 +1,13 @@ 2011-02-22 Andrew John Hughes + + PR633: IcedTea installs javaws manpages on x86 + even with --disable-webstart + * Makefile.am: Add new page. + * NEWS: Updated. + * fsg.sh: Remove useless javaws man pages. + * patches/pr633-no_javaws_man_page.patch: + Don't try and install javaws.1 on 32-bit platforms. + 2011-02-22 Andrew John Hughes PR103: Usage of native2ascii during bootstrap. diff -r 4ffc2aade98c -r 3dc52504cbdd Makefile.am --- a/Makefile.am Tue Feb 22 08:34:09 2011 +0000 +++ b/Makefile.am Tue Feb 22 10:58:37 2011 +0000 @@ -307,7 +307,8 @@ ICEDTEA_PATCHES = \ patches/g344659-sparc_fix.patch \ patches/openjdk/6728834-blurred-lcd-aa-text.patch \ patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ - patches/openjdk/6896068-sg2d.patch + patches/openjdk/6896068-sg2d.patch \ + patches/pr633-no_javaws_man_page.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 4ffc2aade98c -r 3dc52504cbdd NEWS --- a/NEWS Tue Feb 22 08:34:09 2011 +0000 +++ b/NEWS Tue Feb 22 10:58:37 2011 +0000 @@ -430,6 +430,7 @@ New in release 1.10 (2011-XX-XX): - PR616, PR99: Don't statically link libstdc++ or libgcc - PR632: patches/security/20110215/6878713.patch breaks shark zero build - PR103: Usage of native2ascii during bootstrap + - PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. diff -r 4ffc2aade98c -r 3dc52504cbdd fsg.sh --- a/fsg.sh Tue Feb 22 08:34:09 2011 +0000 +++ b/fsg.sh Tue Feb 22 10:58:37 2011 +0000 @@ -84,3 +84,8 @@ rm -f \ # END Debian/Ubuntu additions +# Remove man page for proprietary javaws +rm -f openjdk/jdk/src/linux/doc/man/javaws.1 \ + openjdk/jdk/src/linux/doc/man/ja/javaws.1 \ + openjdk/jdk/src/solaris/doc/sun/man/man1/javaws.1 \ + openjdk/jdk/src/solaris/doc/sun/man/man1/ja/javaws.1 diff -r 4ffc2aade98c -r 3dc52504cbdd patches/pr633-no_javaws_man_page.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/pr633-no_javaws_man_page.patch Tue Feb 22 10:58:37 2011 +0000 @@ -0,0 +1,15 @@ +diff -Nru openjdk.orig/jdk/make/common/Release.gmk openjdk/jdk/make/common/Release.gmk +--- openjdk.orig/jdk/make/common/Release.gmk 2011-02-22 08:36:53.832333120 +0000 ++++ openjdk/jdk/make/common/Release.gmk 2011-02-22 08:37:11.462960201 +0000 +@@ -145,9 +145,11 @@ + tnameserv.1 \ + unpack200.1 + ++ifndef OPENJDK + ifeq ($(ARCH_DATA_MODEL),32) + JRE_MAN_PAGES += javaws.1 + endif ++endif + + JDK_MAN_PAGES = \ + $(JRE_MAN_PAGES) \ From xranby at icedtea.classpath.org Tue Feb 22 03:38:24 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Tue, 22 Feb 2011 11:38:24 +0000 Subject: /hg/icedtea6: JamVM: Taste the New --enable-jamvm Flavour! Message-ID: changeset 7d23f65c73a8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7d23f65c73a8 author: Xerxes R?nby date: Tue Feb 22 12:21:34 2011 +0100 JamVM: Taste the New --enable-jamvm Flavour! 2011-02-22 Xerxes Ranby JamVM: Taste the New --enable-jamvm Flavour! * NEWS: Updated. * Makefile.am (JAMVM_VERSION): New variable. (JAMVM_SHA256SUM): Likewise. (JAMVM_BASE_URL): Likewise. (JAMVM_URL): Likewise. (JAMVM_SRC_ZIP): Likewise. (JAMVM_IMPORT_PATH): Likewise. (ICEDTEA_BUILD_TARGET): Build only jdk if jamvm are enabled. (ICEDTEA_DEBUG_BUILD_TARGET): Likewise. (ICEDTEA_ENV): Set ALT_HOTSPOT_IMPORT_PATH to JAMVM_IMPORT_PATH if jamvm are enabled. (PRODUCT_NAME): Make -version report IcedTea6 Runtime Environment if jamvm are enabled. (JDK_DERIVATIVE_NAME): Only show IcedTea version if jamvm are enabled. (stamps/download-jamvm.stamp): New make target. (clean-download-jamvm): Likewise. (stamps/extract- jamvm.stamp): Likewise. (stamps/jamvm.stamp): Likewise. (clean-jamvm): Likewise. (.PHONY): Add clean-jamvm. (stamps/download.stamp): Add stamps/download-jamvm.stamp. (clean-download): Add clean-download-jamvm. (stamps/extract.stamp): Add stamps/extract-jamvm.stamp. (clean-extract): Add clean-jamvm. (stamps/icedtea.stamp): Add stamps/jamvm.stamp. (download-jamvm): Alias to stamps /download-jamvm.stamp. (jamvm): Alias to stamps/jamvm.stamp. * configure.ac (IT_CHECK_ENABLE_JAMVM): Use new macro. * acinclude.m4: (ENABLE_ZERO_BUILD): Do not use zero if jamvm are enabled. (IT_CHECK_ENABLE_JAMVM): New macro. (BUILD_JAMVM): New conditional. (ENABLE_JAMVM): New conditional. diffstat: 5 files changed, 170 insertions(+), 10 deletions(-) ChangeLog | 39 +++++++++++++++++++ Makefile.am | 116 +++++++++++++++++++++++++++++++++++++++++++++++++++++----- NEWS | 1 acinclude.m4 | 21 ++++++++++ configure.ac | 3 + diffs (355 lines): diff -r 3dc52504cbdd -r 7d23f65c73a8 ChangeLog --- a/ChangeLog Tue Feb 22 10:58:37 2011 +0000 +++ b/ChangeLog Tue Feb 22 12:21:34 2011 +0100 @@ -1,3 +1,42 @@ 2011-02-22 Andrew John Hughes + + JamVM: Taste the New --enable-jamvm Flavour! + * NEWS: Updated. + * Makefile.am (JAMVM_VERSION): New variable. + (JAMVM_SHA256SUM): Likewise. + (JAMVM_BASE_URL): Likewise. + (JAMVM_URL): Likewise. + (JAMVM_SRC_ZIP): Likewise. + (JAMVM_IMPORT_PATH): Likewise. + (ICEDTEA_BUILD_TARGET): + Build only jdk if jamvm are enabled. + (ICEDTEA_DEBUG_BUILD_TARGET): Likewise. + (ICEDTEA_ENV): Set ALT_HOTSPOT_IMPORT_PATH to JAMVM_IMPORT_PATH + if jamvm are enabled. + (PRODUCT_NAME): Make -version report IcedTea6 Runtime Environment + if jamvm are enabled. + (JDK_DERIVATIVE_NAME): Only show IcedTea version + if jamvm are enabled. + (stamps/download-jamvm.stamp): New make target. + (clean-download-jamvm): Likewise. + (stamps/extract-jamvm.stamp): Likewise. + (stamps/jamvm.stamp): Likewise. + (clean-jamvm): Likewise. + (.PHONY): Add clean-jamvm. + (stamps/download.stamp): Add stamps/download-jamvm.stamp. + (clean-download): Add clean-download-jamvm. + (stamps/extract.stamp): Add stamps/extract-jamvm.stamp. + (clean-extract): Add clean-jamvm. + (stamps/icedtea.stamp): Add stamps/jamvm.stamp. + (download-jamvm): Alias to stamps/download-jamvm.stamp. + (jamvm): Alias to stamps/jamvm.stamp. + * configure.ac (IT_CHECK_ENABLE_JAMVM): Use new macro. + * acinclude.m4: + (ENABLE_ZERO_BUILD): Do not use zero if jamvm are enabled. + (IT_CHECK_ENABLE_JAMVM): New macro. + (BUILD_JAMVM): New conditional. + (ENABLE_JAMVM): New conditional. + 2011-02-22 Andrew John Hughes PR633: IcedTea installs javaws manpages on x86 diff -r 3dc52504cbdd -r 7d23f65c73a8 Makefile.am --- a/Makefile.am Tue Feb 22 10:58:37 2011 +0000 +++ b/Makefile.am Tue Feb 22 12:21:34 2011 +0100 @@ -10,6 +10,17 @@ CACAO_BASE_URL = http://icedtea.classpat CACAO_BASE_URL = http://icedtea.classpath.org/download/drops/cacao CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz + +# The jamvm-3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27.tar.gz got fetched from +# http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/snapshot/jamvm-3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27.tar.gz +# Unfortunally the generated .tar.gz by the berlios cgit snapshot function +# keeps changing sha256sum. I have hosted a snapshot on labb.zafena.se +# while we wait for the final JamVM 1.6.0 release. +JAMVM_VERSION = 3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27 +JAMVM_SHA256SUM = 396daf08896a71cfcddfabfbaf2d8b3f07557d8143eaaa93be25e2d80f30e165 +JAMVM_BASE_URL = http://labb.zafena.se/jamvm +JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz +JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz JAXWS_DROP_URL = http://icedtea.classpath.org/download/drops JAXWS_DROP_ZIP = jdk6-jaxws-b20.zip @@ -37,6 +48,7 @@ ENDORSED_DIR = $(BOOT_DIR)/lib/endorsed ENDORSED_DIR = $(BOOT_DIR)/lib/endorsed ECJ_BOOT_DIR = $(abs_top_builddir)/bootstrap/ecj ICEDTEA_BOOT_DIR = $(abs_top_builddir)/bootstrap/icedtea +JAMVM_IMPORT_PATH = $(abs_top_builddir)/jamvm/install/hotspot SERVER_DIR = hotspot/import/jre/lib/$(INSTALL_ARCH_DIR)/server BUILD_JRE_ARCH_DIR = $(BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) BUILD_DEBUG_JRE_ARCH_DIR = $(DEBUG_BUILD_OUTPUT_DIR)/j2sdk-image/jre/lib/$(INSTALL_ARCH_DIR) @@ -126,7 +138,12 @@ if WITH_CACAO ICEDTEA_BUILD_TARGET=jdk_only ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only else +if ENABLE_JAMVM + ICEDTEA_BUILD_TARGET=jdk_only + ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only +else ICEDTEA_DEBUG_BUILD_TARGET = debug_build +endif endif if BOOTSTRAPPING @@ -471,6 +488,11 @@ ICEDTEA_ENV += \ ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" endif +if ENABLE_JAMVM +ICEDTEA_ENV += \ + ALT_HOTSPOT_IMPORT_PATH="$(JAMVM_IMPORT_PATH)" +endif + if DISABLE_OPTIMIZATIONS ICEDTEA_ENV += \ NO_OPTIMIZATIONS="true" \ @@ -584,8 +606,10 @@ install: clean-icedtea icedtea-against-icedtea clean-icedtea-ecj \ clean-tools-jar clean-copy clean-rt hotspot \ hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \ - clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug - clean-icedtea-against-ecj clean-cacao clean-add-cacao clean-add-cacao-debug \ + clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug \ + clean-icedtea-against-ecj \ + clean-jamvm \ + clean-cacao clean-add-cacao clean-add-cacao-debug \ clean-ports clean-overlay clean-extract-ecj clean-extract clean-extract-openjdk \ clean-replace-hotspot clean-generated clean-download clean-hgforest clean-download-openjdk \ clean-rewriter clean-rewrite-rhino clean-add-systemtap clean-add-systemtap-debug \ @@ -742,6 +766,29 @@ clean-download-cacao: rm -f $(CACAO_SRC_ZIP) rm -f stamps/download-cacao.stamp +stamps/download-jamvm.stamp: +if BUILD_JAMVM + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ + | $(SHA256SUM) --check ; \ + then \ + if [ $(JAMVM_SRC_ZIP) ] ; \ + then \ + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ + fi ; \ + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ + | $(SHA256SUM) --check ; \ + then echo "ERROR: Bad download of JamVM zip"; false; \ + fi; \ + fi +endif + mkdir -p stamps + touch $@ + +clean-download-jamvm: + rm -f $(JAMVM_SRC_ZIP) + rm -f stamps/download-jamvm.stamp + clean-drops: clean-download-jaxp-drop clean-download-jaf-drop \ clean-download-jaxws-drop if [ -e drops ] ; then \ @@ -804,18 +851,19 @@ clean-download-openjdk: rm -f stamps/download-openjdk.stamp stamps/download.stamp: stamps/download-drops.stamp stamps/download-cacao.stamp \ - stamps/download-openjdk.stamp + stamps/download-jamvm.stamp stamps/download-openjdk.stamp touch stamps/download.stamp -clean-download: clean-drops clean-download-cacao clean-download-openjdk +clean-download: clean-drops clean-download-cacao clean-download-jamvm \ + clean-download-openjdk rm -f stamps/download.stamp stamps/extract.stamp: stamps/extract-openjdk.stamp \ - stamps/extract-cacao.stamp + stamps/extract-cacao.stamp stamps/extract-jamvm.stamp mkdir -p stamps touch $@ -clean-extract: clean-extract-openjdk clean-cacao +clean-extract: clean-extract-openjdk clean-cacao clean-jamvm rm -f stamps/extract.stamp stamps/extract-openjdk.stamp: stamps/download.stamp @@ -872,6 +920,20 @@ endif endif mkdir -p stamps touch stamps/extract-cacao.stamp + +stamps/extract-jamvm.stamp: +if BUILD_JAMVM + set -e ; \ + if ! test -d jamvm ; \ + then \ + mkdir jamvm ; \ + $(TAR) xf $(JAMVM_SRC_ZIP) -C jamvm ; \ + dir=$$(basename jamvm/jamvm-*) ; \ + ln -s $$dir jamvm/jamvm ; \ + fi +endif + mkdir -p stamps + touch stamps/extract-jamvm.stamp stamps/replace-hotspot.stamp: stamps/extract.stamp if WITH_ALT_HSBUILD @@ -1020,7 +1082,8 @@ stamps/patch.stamp: stamps/patch-fsg.sta fi icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ - if ! test "x$(WITH_CACAO)" = "xno"; then \ + if test "x$(WITH_CACAO)" = "xyes" || \ + test "x$(ENABLE_JAMVM)" = "xyes"; then \ echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ echo "PRODUCT_NAME=$(ICEDTEA_NAME)" \ @@ -1247,7 +1310,8 @@ clean-bootstrap-directory-symlink: # If you change anything here in the icedtea target, please make sure # you change it in the icedtea-debug target as well. stamps/icedtea.stamp: stamps/bootstrap-directory-symlink.stamp \ - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ + stamps/jamvm.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV) \ -C openjdk \ @@ -1265,6 +1329,9 @@ if WITH_CACAO if WITH_CACAO printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg endif +if ENABLE_JAMVM + printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg +endif @echo "IcedTea is served:" $(BUILD_OUTPUT_DIR) mkdir -p stamps touch stamps/icedtea.stamp @@ -1274,7 +1341,8 @@ clean-icedtea: rm -f stamps/icedtea.stamp stamps/icedtea-debug.stamp: stamps/bootstrap-directory-symlink.stamp \ - $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp + $(OPENJDK_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp \ + stamps/jamvm.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV) \ -C openjdk \ @@ -1291,6 +1359,9 @@ endif endif if WITH_CACAO printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg +endif +if ENABLE_JAMVM + printf -- '-jamvm ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg endif @echo "IcedTea (debug build) is served:" \ $(DEBUG_BUILD_OUTPUT_DIR) @@ -1697,6 +1768,29 @@ clean-rewrite-rhino: fi rm -f stamps/rewrite-rhino.stamp +# JamVM + +stamps/jamvm.stamp: $(OPENJDK_TREE) stamps/rt.stamp +if BUILD_JAMVM + cd jamvm/jamvm && \ + ./autogen.sh --with-java-runtime-library=openjdk \ + --prefix=$(abs_top_builddir)/jamvm/install ; \ + $(MAKE) ; \ + $(MAKE) install + mkdir -p $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server + cp $(abs_top_builddir)/jamvm/install/lib/libjvm.so $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server + ln -s server $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/client + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/server/Xusage.txt + touch $(abs_top_builddir)/jamvm/install/hotspot/jre/lib/$(INSTALL_ARCH_DIR)/libjsig.so +endif + mkdir -p stamps + touch $@ + +clean-jamvm: + rm -rf jamvm + rm -f stamps/jamvm.stamp + rm -f stamps/extract-jamvm.stamp + # CACAO stamps/cacao.stamp: $(OPENJDK_TREE) stamps/rt.stamp @@ -2061,6 +2155,8 @@ download-cacao: stamps/download-cacao.st download-drops: stamps/download-drops.stamp +download-jamvm: stamps/download-jamvm.stamp + download-jaf-drop: stamps/download-jaf-drop.stamp download-jaxp-drop: stamps/download-jaxp-drop.stamp @@ -2084,6 +2180,8 @@ icedtea-debug-against-icedtea: stamps/ic icedtea-debug-against-icedtea: stamps/icedtea-debug-against-icedtea.stamp icedtea-ecj: stamps/icedtea-ecj.stamp + +jamvm: stamps/jamvm.stamp jtreg: stamps/jtreg.stamp diff -r 3dc52504cbdd -r 7d23f65c73a8 NEWS --- a/NEWS Tue Feb 22 10:58:37 2011 +0000 +++ b/NEWS Tue Feb 22 12:21:34 2011 +0100 @@ -10,6 +10,7 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/ New in release 1.10 (2011-XX-XX): +* Added out-of-the-box JamVM support using --enable-jamvm * NetX and the plugin moved to the IcedTea-Web project with a separate release cycle. * Shark provided upstream rather than as part of IcedTea. diff -r 3dc52504cbdd -r 7d23f65c73a8 acinclude.m4 --- a/acinclude.m4 Tue Feb 22 10:58:37 2011 +0000 +++ b/acinclude.m4 Tue Feb 22 12:21:34 2011 +0100 @@ -783,7 +783,8 @@ AC_DEFUN([IT_ENABLE_ZERO_BUILD], sparc*-*-*) ;; x86_64-*-*) ;; *) - if test "x${WITH_CACAO}" != xno; then + if test "x${WITH_CACAO}" != xno || \ + test "x${ENABLE_JAMVM}" = xyes; then use_zero=no else use_zero=yes @@ -855,6 +856,23 @@ AC_DEFUN([IT_SET_SHARK_BUILD], AC_MSG_RESULT($use_shark) AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) +]) + +AC_DEFUN([IT_CHECK_ENABLE_JAMVM], +[ + AC_MSG_CHECKING(whether to use JamVM as VM) + AC_ARG_ENABLE([jamvm], + [AS_HELP_STRING(--enable-jamvm,use JamVM as VM [[default=no]])], + [ + ENABLE_JAMVM="${enableval}" + ], + [ + ENABLE_JAMVM=no + ]) + + AC_MSG_RESULT(${ENABLE_JAMVM}) + AM_CONDITIONAL(ENABLE_JAMVM, test x"${ENABLE_JAMVM}" = "xyes") + AC_SUBST(ENABLE_JAMVM) ]) AC_DEFUN([IT_CHECK_ENABLE_CACAO], @@ -1203,6 +1221,7 @@ AM_CONDITIONAL(ADD_CACAO_BUILD, test x$a AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x) AM_CONDITIONAL(ADD_ZERO_BUILD, test x$add_vm_zero != x || test x$add_vm_shark != x) AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x) +AM_CONDITIONAL(BUILD_JAMVM, test "x${ENABLE_JAMVM}" = xyes) AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes) if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then diff -r 3dc52504cbdd -r 7d23f65c73a8 configure.ac --- a/configure.ac Tue Feb 22 10:58:37 2011 +0000 +++ b/configure.ac Tue Feb 22 12:21:34 2011 +0100 @@ -175,6 +175,9 @@ IT_CHECK_WITH_CACAO_HOME IT_CHECK_WITH_CACAO_HOME IT_CHECK_WITH_CACAO_SRC_ZIP IT_CHECK_WITH_CACAO_SRC_DIR + +IT_CHECK_ENABLE_JAMVM + IT_DISABLE_OPTIMIZATIONS IT_SET_SHARK_BUILD IT_ENABLE_ZERO_BUILD From ahughes at redhat.com Tue Feb 22 04:05:00 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 22 Feb 2011 12:05:00 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <1298367549.3254.20.camel@springer.wildebeest.org> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> <20110221205224.GA12717@rivendell.middle-earth.co.uk> <1298367549.3254.20.camel@springer.wildebeest.org> Message-ID: <20110222120500.GA24648@rivendell.middle-earth.co.uk> On 10:39 Tue 22 Feb , Mark Wielaard wrote: > On Mon, 2011-02-21 at 20:52 +0000, Dr Andrew John Hughes wrote: > > I can see how it would be advantageous from a speed perspective, but for me, > > if I'm going to bother building one of the alternative VMs, I want to know it > > actually works. Now I guess you can run 'check-hotspot' with each of the alternative > > VMs but I don't see why that saves anything over just doing the full build, > > which tests the VM heavily with lots of javac invocations. > > So we need targets for at least check-hotspot and check-langtools to be > run with alternative runtimes build in. This might even be a nice idea > for pure hotspot client/server/tiered testing. Ideally also > make-check-jdk, but that on itself takes ages. > Or just use the --enable options which already work with make check. > > > Also, could we have an alias for "hotspot=next" or something? Assuming > > > that we only support "current" and "next" hotspot, then you don't have > > > to remember which particular version it represents (also easier for > > > making sure a buildslave tracks them). > > > > > > > I think what you want is already catered for; as documented in README, > > a simple --with-hotspot-build will get you the alternative HotSpot. > > > > ORIGINAL_BUILD="original" > > ALTERNATE_BUILD="hs20" > > ... > > if test "x${HSBUILD}" = xyes; then > > HSBUILD="${ALTERNATE_BUILD}" > > elif test "x${HSBUILD}" = xno; then > > HSBUILD="${ORIGINAL_BUILD}" > > fi > > > > so the two alternatives are always available via --with-hotspot-build > > and --without-hotspot-build, the former being the one from the HotSpot > > tarball, the latter from the original OpenJDK tarball. > > O wow. That is nice. Completely missed that. I added a new "quick" > squeeze-x86_64 builder icedtea6-squeeze-x86_64-quick-hotspot for that > (patch attached - note the horrible copy/paste, sorry about that). > > I would almost suggest you make this so that it is possible to use this > with --enable-additional-vms for easy testing by users... > Feel free to propose a patch. I don't know addvm, but changing things so you could build both HotSpots sounds complicated to me for little benefit. > Cheers, > > Mark > diff -r 15bb449380ba icedtea/master.cfg > --- a/icedtea/master.cfg Mon Feb 21 11:08:43 2011 +0100 > +++ b/icedtea/master.cfg Tue Feb 22 10:38:04 2011 +0100 > @@ -62,6 +62,7 @@ > c['schedulers'].append(Scheduler(name="icedtea6-quick", branch="icedtea6", > treeStableTimer=5*60, > builderNames=["icedtea6-squeeze-x86_64-quick", > + "icedtea6-squeeze-x86_64-quick-hotspot", > "icedtea6-squeeze-armv7l-quick", > "icedtea6-natty-armv7l-quick", > "icedtea6-natty-armv7l-quick-cacao", > @@ -259,6 +260,29 @@ > description="check-langtools", > workdir="build")) > > +f3h = factory.BuildFactory() > +f3h.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) > +f3h.addStep(ShellCommand(command=["./autogen.sh"], > + workdir="src", > + description="autogen")) > +f3h.addStep(ShellCommand(command=["rm", "-rf", "build"], > + workdir=".", > + description="clean build dir")) > +f3h.addStep(Configure(command=["../src/configure", > + "--disable-bootstrap", > + "--disable-optimizations", > + "--disable-docs", > + "--with-hotspot-build", > + "--with-parallel-jobs=4"], > + workdir="build")) > +f3h.addStep(Compile(workdir="build")) > +f3h.addStep(JTRegCheck(command=["make", "check-hotspot"], > + description="check-hotspot", > + workdir="build")) > +f3h.addStep(JTRegCheck(command=["make", "check-langtools"], > + description="check-langtools", > + workdir="build")) > + > f3as = factory.BuildFactory() > f3as.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) > f3as.addStep(ShellCommand(command=["./autogen.sh"], > @@ -479,6 +503,11 @@ > 'slavenames': ["squeeze-x86_64"], > 'builddir': "icedtea6-quick", > 'factory': f3 } > +icedtea6_builder_quick_hotspot = { > + 'name': "icedtea6-squeeze-x86_64-quick-hotspot", > + 'slavenames': ["squeeze-x86_64"], > + 'builddir': "icedtea6-quick-hotspot", > + 'factory': f3h } > icedtea6_builder_quick_arm_squeeze = { 'name': "icedtea6-squeeze-armv7l-quick", > 'slavenames': ["squeeze-armv7l"], > 'builddir': "icedtea6-squeeze-armv7l-quick", > @@ -579,6 +608,7 @@ > 'factory': f4 } > > c['builders'] = [icedtea6_builder_quick, > + icedtea6_builder_quick_hotspot, > icedtea6_builder_quick_arm_squeeze, > icedtea6_builder_quick_arm_natty, > icedtea6_builder_quick_arm_natty_cacao, -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From mark at klomp.org Tue Feb 22 04:14:42 2011 From: mark at klomp.org (Mark Wielaard) Date: Tue, 22 Feb 2011 13:14:42 +0100 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <20110222120500.GA24648@rivendell.middle-earth.co.uk> References: <1297891696.3413.18.camel@springer.wildebeest.org> <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> <20110221205224.GA12717@rivendell.middle-earth.co.uk> <1298367549.3254.20.camel@springer.wildebeest.org> <20110222120500.GA24648@rivendell.middle-earth.co.uk> Message-ID: <1298376882.3254.29.camel@springer.wildebeest.org> On Tue, 2011-02-22 at 12:05 +0000, Dr Andrew John Hughes wrote: > On 10:39 Tue 22 Feb , Mark Wielaard wrote: > > On Mon, 2011-02-21 at 20:52 +0000, Dr Andrew John Hughes wrote: > > > I can see how it would be advantageous from a speed perspective, but for me, > > > if I'm going to bother building one of the alternative VMs, I want to know it > > > actually works. Now I guess you can run 'check-hotspot' with each of the alternative > > > VMs but I don't see why that saves anything over just doing the full build, > > > which tests the VM heavily with lots of javac invocations. > > > > So we need targets for at least check-hotspot and check-langtools to be > > run with alternative runtimes build in. This might even be a nice idea > > for pure hotspot client/server/tiered testing. Ideally also > > make-check-jdk, but that on itself takes ages. > > > > Or just use the --enable options which already work with make check. I think you misunderstand why --enable-additional-vms is very useful. If you use the --enable options you have to rebuild everything completely for each alternative runtime. Which by now is cacao, shark/zero, alternate hotspot (although that doesn't have an additional-vms variant yet) and jamvm. Having to rebuild everything five times is just not very efficient and takes way too much time. The idea is that we extend the tests so they can be run with each alternative runtime installed/compiled in instead. Cheers, Mark From ahughes at redhat.com Tue Feb 22 04:32:11 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 22 Feb 2011 12:32:11 +0000 Subject: Announcing the IcedTea buildbot In-Reply-To: <1298368265.3254.25.camel@springer.wildebeest.org> References: <1298280666.3387.47.camel@springer.wildebeest.org> <20110221214435.GF12717@rivendell.middle-earth.co.uk> <1298368265.3254.25.camel@springer.wildebeest.org> Message-ID: <20110222123211.GD24648@rivendell.middle-earth.co.uk> On 10:51 Tue 22 Feb , Mark Wielaard wrote: > On Mon, 2011-02-21 at 21:44 +0000, Dr Andrew John Hughes wrote: > > > Feedback on how we can make this buildbot setup more productive for > > > anybody hacking on icedtea really appreciated. > > > > My immediate suggestion would be to provide testing of icedtea6-hg > > (which builds against OpenJDK6 hg) and also the icedtea6-1.10 branch > > which should appear later today. > > The challenge with depending on openjdk trees is that I haven't figured > out what the best way is to integrate openjdk forest updates. I assume > we should just treat them as independent trees. Which brings us to the > second challenge of filtering out update events for different trees. > Currently we treat each repository directory name as separate branch and > then filter on that. If we monitor/pull from different servers it might > get a bit more tricky. > The standard way is to treat them as individual trees now. See the script Kelly added to the jdk7 root (get_source.sh). I'm not yet used to these automated build invocations via commits. Our hg builds just run nightly. I think you'd want to monitor all the trees (icedtea6-hg plus all OpenJDK6 ones) and rebuild if any change. > It can be done for the various icedtea6 release branches, since they > build against a fixed openjdk drop, but it would be nice to have fresh > new slaves for them to not over commit the current build slaves. Do you > have a spare machine to run release branch checks on? > Not right now, and I don't have a dedicated net connection here either, just a dynamic IPv4 from my ISP :-( > Thanks, > > Mark > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Tue Feb 22 04:43:11 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 22 Feb 2011 12:43:11 +0000 Subject: FYI: Fix PR632: patches/security/20110215/6878713.patch breaks shark zero build In-Reply-To: <1298376882.3254.29.camel@springer.wildebeest.org> References: <20110216214752.GC26007@rivendell.middle-earth.co.uk> <1297893005.3413.20.camel@springer.wildebeest.org> <20110217170925.GD8495@rivendell.middle-earth.co.uk> <1297967778.3323.88.camel@springer.wildebeest.org> <20110217210211.GG8495@rivendell.middle-earth.co.uk> <1298278932.3387.28.camel@springer.wildebeest.org> <20110221205224.GA12717@rivendell.middle-earth.co.uk> <1298367549.3254.20.camel@springer.wildebeest.org> <20110222120500.GA24648@rivendell.middle-earth.co.uk> <1298376882.3254.29.camel@springer.wildebeest.org> Message-ID: <20110222124311.GG24648@rivendell.middle-earth.co.uk> On 13:14 Tue 22 Feb , Mark Wielaard wrote: > On Tue, 2011-02-22 at 12:05 +0000, Dr Andrew John Hughes wrote: > > On 10:39 Tue 22 Feb , Mark Wielaard wrote: > > > On Mon, 2011-02-21 at 20:52 +0000, Dr Andrew John Hughes wrote: > > > > I can see how it would be advantageous from a speed perspective, but for me, > > > > if I'm going to bother building one of the alternative VMs, I want to know it > > > > actually works. Now I guess you can run 'check-hotspot' with each of the alternative > > > > VMs but I don't see why that saves anything over just doing the full build, > > > > which tests the VM heavily with lots of javac invocations. > > > > > > So we need targets for at least check-hotspot and check-langtools to be > > > run with alternative runtimes build in. This might even be a nice idea > > > for pure hotspot client/server/tiered testing. Ideally also > > > make-check-jdk, but that on itself takes ages. > > > > > > > Or just use the --enable options which already work with make check. > > I think you misunderstand why --enable-additional-vms is very useful. > If you use the --enable options you have to rebuild everything > completely for each alternative runtime. Which by now is cacao, > shark/zero, alternate hotspot (although that doesn't have an > additional-vms variant yet) and jamvm. Having to rebuild everything five > times is just not very efficient and takes way too much time. The idea > is that we extend the tests so they can be run with each alternative > runtime installed/compiled in instead. > No, I understand that perfectly. As I said previously, building IcedTea with the new VM is a pretty good reliable test which happens with the --enable options but not with addvm. IMO, it's more of a 'real world' test than a bunch of regression tests which only cover specific issues. > Cheers, > > Mark > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Tue Feb 22 04:44:53 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 22 Feb 2011 12:44:53 +0000 Subject: [Bug 633] icedtea installs javaws manpages on x86 even with --disable-webstart Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=633 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |ASSIGNED ------- Comment #2 from gnu_andrew at member.fsf.org 2011-02-22 12:44 ------- Fixed: http://icedtea.classpath.org/hg/icedtea6/rev/3dc52504cbdd -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Feb 22 04:45:12 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 22 Feb 2011 12:45:12 +0000 Subject: [Bug 633] icedtea installs javaws manpages on x86 even with --disable-webstart Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=633 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|x86 |32-bit Target Milestone|--- |6-1.10 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Tue Feb 22 04:45:27 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 22 Feb 2011 12:45:27 +0000 Subject: [Bug 633] icedtea installs javaws manpages on x86 even with --disable-webstart Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=633 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- AssignedTo|unassigned at icedtea.classpath|gnu_andrew at member.fsf.org |.org | Status|ASSIGNED |NEW -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Tue Feb 22 04:52:47 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 22 Feb 2011 12:52:47 +0000 Subject: /hg/icedtea6: PR497: Mercurial revision detection not very reliable Message-ID: changeset 3ebdb1a50ba8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3ebdb1a50ba8 author: Andrew John Hughes date: Tue Feb 22 12:52:39 2011 +0000 PR497: Mercurial revision detection not very reliable 2011-02-22 Andrew John Hughes PR497: Mercurial revision detection not very reliable * acinclude.m4: (IT_OBTAIN_HG_REVISIONS): Use hg id rather than hg tip. diffstat: 2 files changed, 10 insertions(+), 3 deletions(-) ChangeLog | 7 +++++++ acinclude.m4 | 6 +++--- diffs (40 lines): diff -r 7d23f65c73a8 -r 3ebdb1a50ba8 ChangeLog --- a/ChangeLog Tue Feb 22 12:21:34 2011 +0100 +++ b/ChangeLog Tue Feb 22 12:52:39 2011 +0000 @@ -1,3 +1,10 @@ 2011-02-22 Xerxes Ranby + + PR497: Mercurial revision detection not very reliable + * acinclude.m4: + (IT_OBTAIN_HG_REVISIONS): Use hg id rather + than hg tip. + 2011-02-22 Xerxes Ranby JamVM: Taste the New --enable-jamvm Flavour! diff -r 7d23f65c73a8 -r 3ebdb1a50ba8 acinclude.m4 --- a/acinclude.m4 Tue Feb 22 12:21:34 2011 +0100 +++ b/acinclude.m4 Tue Feb 22 12:52:39 2011 +0000 @@ -1451,19 +1451,19 @@ AC_DEFUN_ONCE([IT_OBTAIN_HG_REVISIONS], if which ${HG} >&AS_MESSAGE_LOG_FD 2>&1; then AC_MSG_CHECKING([for IcedTea Mercurial revision ID]) if test -e ${abs_top_srcdir}/.hg ; then - ICEDTEA_REVISION="r`(cd ${abs_top_srcdir}; ${HG} tip --template '{node|short}')`" ; + ICEDTEA_REVISION="r`(cd ${abs_top_srcdir}; ${HG} id -i)`" ; fi ; AC_MSG_RESULT([${ICEDTEA_REVISION}]) AC_SUBST([ICEDTEA_REVISION]) AC_MSG_CHECKING([for JDK Mercurial revision ID]) if test -e ${OPENJDK_SRC_DIR}/jdk/.hg ; then - JDK_REVISION="r`(cd ${OPENJDK_SRC_DIR}/jdk; ${HG} tip --template '{node|short}')`" ; + JDK_REVISION="r`(cd ${OPENJDK_SRC_DIR}/jdk; ${HG} id -i)`" ; fi ; AC_MSG_RESULT([${JDK_REVISION}]) AC_SUBST([JDK_REVISION]) AC_MSG_CHECKING([for HotSpot Mercurial revision ID]) if test -e ${OPENJDK_SRC_DIR}/hotspot/.hg ; then \ - HOTSPOT_REVISION="r`(cd ${OPENJDK_SRC_DIR}/hotspot; ${HG} tip --template '{node|short}')`" ; + HOTSPOT_REVISION="r`(cd ${OPENJDK_SRC_DIR}/hotspot; ${HG} id -i)`" ; fi ; AC_MSG_RESULT([${HOTSPOT_REVISION}]) AC_SUBST([HOTSPOT_REVISION]) From xranby at icedtea.classpath.org Tue Feb 22 05:13:28 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Tue, 22 Feb 2011 13:13:28 +0000 Subject: /hg/buildbot: 2011-02-22 Xerxes Ranby Message-ID: changeset c9d0b3347e4d in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=c9d0b3347e4d author: Xerxes R?nby date: Tue Feb 22 13:56:45 2011 +0100 2011-02-22 Xerxes Ranby make jaunty-ia32 builders track the "alternative" hotspot --with- hotspot-build decomission icedtea6-squeeze-armv7l slave. remove icedtea6-squeeze- armv7l-quick icedtea7-squeeze-armv7l-quick icedtea-web- squeeze-armv7l and testrepo-squeeze-armv7l builders. update squeeze-armv5tel slave to build icedtea7-squeeze-armv5tel- quick and icedtea-web-squeeze- armv5tel diffstat: 1 file changed, 15 insertions(+), 46 deletions(-) icedtea/master.cfg | 61 ++++++++++++---------------------------------------- diffs (174 lines): diff -r 15bb449380ba -r c9d0b3347e4d icedtea/master.cfg --- a/icedtea/master.cfg Mon Feb 21 11:08:43 2011 +0100 +++ b/icedtea/master.cfg Tue Feb 22 13:56:45 2011 +0100 @@ -28,9 +28,6 @@ c['slaves'] = [BuildSlave("squeeze-x86_6 c['slaves'] = [BuildSlave("squeeze-x86_64", getpw("squeeze-x86_64"), max_builds=3), - BuildSlave("squeeze-armv7l", - getpw("squeeze-armv7l"), - max_builds=1), BuildSlave("natty-armv7l", getpw("natty-armv7l"), max_builds=2), @@ -62,7 +59,6 @@ c['schedulers'].append(Scheduler(name="i c['schedulers'].append(Scheduler(name="icedtea6-quick", branch="icedtea6", treeStableTimer=5*60, builderNames=["icedtea6-squeeze-x86_64-quick", - "icedtea6-squeeze-armv7l-quick", "icedtea6-natty-armv7l-quick", "icedtea6-natty-armv7l-quick-cacao", "icedtea6-natty-armv7l-quick-shark", @@ -77,7 +73,7 @@ c['schedulers'].append(Scheduler(name="i c['schedulers'].append(Scheduler(name="icedtea7-quick", branch="icedtea", treeStableTimer=5*60, builderNames=["icedtea7-squeeze-x86_64-quick", - "icedtea7-squeeze-armv7l-quick", + "icedtea7-squeeze-armv5tel-quick", "icedtea7-natty-armv7l-quick"] )) @@ -87,13 +83,12 @@ c['schedulers'].append(Scheduler(name="i c['schedulers'].append(Scheduler(name="icedtea-web", branch="icedtea-web", treeStableTimer=60, builderNames=["icedtea-web-squeeze-x86_64", - "icedtea-web-squeeze-armv7l", + "icedtea-web-squeeze-armv5tel", "icedtea-web-natty-armv7l"])) c['schedulers'].append(Scheduler(name="testrepo", branch="testrepo", treeStableTimer=60, builderNames=["testrepo-squeeze-x86_64", - "testrepo-squeeze-armv7l", "testrepo-natty-armv7l", "testrepo-jaunty-ia32", "testrepo-squeeze-armv5tel"])) @@ -201,10 +196,11 @@ f1arm.addStep(Compile(command=["make", " f1arm.addStep(Compile(command=["make", "-j2"], workdir="build")) f1arm.addStep(Test(command=["make", "check"], workdir="build")) -icedtea_web_builder_squeeze_armv7l = { 'name': "icedtea-web-squeeze-armv7l", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "icedtea-web-squeeze-armv7l", +icedtea_web_builder_squeeze_armv5tel = { 'name': "icedtea-web-squeeze-armv5tel", + 'slavenames': ["squeeze-armv5tel"], + 'builddir': "icedtea-web-squeeze-armv5tel", 'factory': f1arm } + icedtea_web_builder_natty_armv7l = { 'name': "icedtea-web-natty-armv7l", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea-web-natty-armv7l", @@ -217,10 +213,6 @@ testrepo_builder_x86_64 = { 'name': "tes testrepo_builder_x86_64 = { 'name': "testrepo-squeeze-x86_64", 'slavenames': ["squeeze-x86_64"], 'builddir': "testrepo", - 'factory': f2 } -testrepo_builder_squeeze_armv7l = { 'name': "testrepo-squeeze-armv7l", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "testrepo_squeeze_armv7l", 'factory': f2 } testrepo_builder_natty_armv7l = { 'name': "testrepo-natty-armv7l", 'slavenames': ["natty-armv7l"], @@ -258,26 +250,6 @@ f3.addStep(JTRegCheck(command=["make", " f3.addStep(JTRegCheck(command=["make", "check-langtools"], description="check-langtools", workdir="build")) - -f3as = factory.BuildFactory() -f3as.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) -f3as.addStep(ShellCommand(command=["./autogen.sh"], - workdir="src", - description="autogen")) -f3as.addStep(ShellCommand(command=["rm", "-rf", "build"], - workdir=".", - description="clean build dir")) -f3as.addStep(Configure(command=["../src/configure", - "--disable-bootstrap", - "--disable-docs"], - workdir="build")) -f3as.addStep(Compile(workdir="build")) -f3as.addStep(JTRegCheck(command=["make", "check-hotspot"], - description="check-hotspot", - workdir="build")) -f3as.addStep(JTRegCheck(command=["make", "check-langtools"], - description="check-langtools", - workdir="build", timeout=2400)) f3an = factory.BuildFactory() f3an.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) @@ -356,6 +328,7 @@ f3jz.addStep(Configure(command=["../src/ "--disable-bootstrap", "--with-parallel-jobs=5", "--disable-docs", + "--with-hotspot-build", "--enable-zero"], workdir="build")) f3jz.addStep(Compile(workdir="build")) @@ -378,6 +351,7 @@ f3js.addStep(Configure(command=["../src/ "--disable-bootstrap", "--with-parallel-jobs=5", "--disable-docs", + "--with-hotspot-build", "--enable-shark"], workdir="build")) f3js.addStep(Compile(workdir="build")) @@ -400,6 +374,7 @@ f3jc.addStep(Configure(command=["../src/ "--disable-bootstrap", "--with-parallel-jobs=5", "--disable-docs", + "--with-hotspot-build", "--enable-cacao"], workdir="build")) f3jc.addStep(Compile(workdir="build")) @@ -479,10 +454,6 @@ icedtea6_builder_quick = { 'name': "iced 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea6-quick", 'factory': f3 } -icedtea6_builder_quick_arm_squeeze = { 'name': "icedtea6-squeeze-armv7l-quick", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "icedtea6-squeeze-armv7l-quick", - 'factory': f3as } icedtea6_builder_quick_arm_natty = { 'name': "icedtea6-natty-armv7l-quick", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea6-natty-armv7l-quick", @@ -532,10 +503,10 @@ icedtea7_builder_quick = { 'name': "iced 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea7-quick", 'factory': f3 } -icedtea7_builder_quick_arm_squeeze = { 'name': "icedtea7-squeeze-armv7l-quick", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "icedtea7-squeeze-armv7l-quick", - 'factory': f3as } +icedtea7_builder_quick_arm_squeeze = { 'name': "icedtea7-squeeze-armv5tel-quick", + 'slavenames': ["squeeze-armv5tel"], + 'builddir': "icedtea7-squeeze-armv5tel-quick", + 'factory': f3a5 } icedtea7_builder_quick_arm_natty = { 'name': "icedtea7-natty-armv7l-quick", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea7-natty-armv7l-quick", @@ -579,7 +550,6 @@ icedtea7_builder_full = { 'name': "icedt 'factory': f4 } c['builders'] = [icedtea6_builder_quick, - icedtea6_builder_quick_arm_squeeze, icedtea6_builder_quick_arm_natty, icedtea6_builder_quick_arm_natty_cacao, icedtea6_builder_quick_arm_natty_shark, @@ -590,15 +560,14 @@ c['builders'] = [icedtea6_builder_quick, icedtea6_builder_quick_armv5tel_squeeze_cacao, icedtea6_builder_quick_armv5tel_squeeze_shark, icedtea7_builder_quick, - icedtea7_builder_quick_arm_squeeze, + icedtea7_builder_quick_armv5tel_squeeze, icedtea7_builder_quick_arm_natty, icedtea6_builder_full, icedtea7_builder_full, icedtea_web_builder_x86_64, - icedtea_web_builder_squeeze_armv7l, + icedtea_web_builder_squeeze_armv5tel, icedtea_web_builder_natty_armv7l, testrepo_builder_x86_64, - testrepo_builder_squeeze_armv7l, testrepo_builder_natty_armv7l, testrepo_builder_jaunty_ia32, testrepo_builder_squeeze_armv5tel ] From ahughes at redhat.com Tue Feb 22 05:15:52 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Tue, 22 Feb 2011 13:15:52 +0000 Subject: Reviewer needed - fix for regression test: test/java/io/IOException/LastErrorString.java In-Reply-To: <4D638F60.2090103@redhat.com> References: <4D629589.9020201@redhat.com> <20110221214839.GG12717@rivendell.middle-earth.co.uk> <4D638F60.2090103@redhat.com> Message-ID: <20110222131552.GH24648@rivendell.middle-earth.co.uk> On 11:26 Tue 22 Feb , Pavel Tisnovsky wrote: > Dr Andrew John Hughes wrote: > > On 17:40 Mon 21 Feb , Pavel Tisnovsky wrote: > >> Hi all, > >> > >> I'd like to add new patch into IcedTea6 HEAD and probably backport it > >> into IcedTea6-1.9 too. This patch fixes issue found in regression test > >> test/java/io/IOException/LastErrorString.java: > >> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634 > >> > >> Besides the problem described above original version of this test also > >> does not distinguish between the unreadable and unwriteable files, which > >> I've also fixed. > >> > > > > Can you elaborate on what changes you made? > > It's not very obvious from the patch. > > Sure. The test is now started from (new) shell script which detects the > proper working directory (such directory is created for each test by > JTreg harness) and then this script creates four empty files and one > subdirectory there: > > - one readable file (u+r) > - one writeable file (u+w) > - one unreadable file (a-r) > - one unwriteable file (a-w) > - unwriteable directory > > Then the Java part of this test is started with one parameter - path to > working directory. This part of test tries to open files/directories for > reading/writing and check if proper exception is thrown when such > files/directories could not be opened for various reasons (it's not > possible to open read-only file for writing etc.). > > > > > Does the test now avoid /etc/shadow? > yes, perfectly :-) > Ok sounds great. Approved. > >> > >> PS: if this fix will be approved for IcedTea6, I'd like to push this > >> change to OpenJDK6 and OpenJDK7 too. > > > > I can't give approval for that. > > > Yeah, I just wanted to inform you that this change should be included in > O6 and O7 too in the future. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From mjw at icedtea.classpath.org Tue Feb 22 05:26:00 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Tue, 22 Feb 2011 13:26:00 +0000 Subject: /hg/buildbot: 2 new changesets Message-ID: changeset 976dc5a103fd in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=976dc5a103fd author: Mark Wielaard date: Tue Feb 22 10:38:29 2011 +0100 Add icedtea6-squeeze-x86_64-quick-hotspot builder. changeset ca45780cdf8f in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=ca45780cdf8f author: Mark Wielaard date: Tue Feb 22 14:25:19 2011 +0100 Merge diffstat: 1 file changed, 35 insertions(+), 36 deletions(-) icedtea/master.cfg | 71 +++++++++++++++++++++++++--------------------------- diffs (193 lines): diff -r 15bb449380ba -r ca45780cdf8f icedtea/master.cfg --- a/icedtea/master.cfg Mon Feb 21 11:08:43 2011 +0100 +++ b/icedtea/master.cfg Tue Feb 22 14:25:19 2011 +0100 @@ -28,9 +28,6 @@ c['slaves'] = [BuildSlave("squeeze-x86_6 c['slaves'] = [BuildSlave("squeeze-x86_64", getpw("squeeze-x86_64"), max_builds=3), - BuildSlave("squeeze-armv7l", - getpw("squeeze-armv7l"), - max_builds=1), BuildSlave("natty-armv7l", getpw("natty-armv7l"), max_builds=2), @@ -62,7 +59,7 @@ c['schedulers'].append(Scheduler(name="i c['schedulers'].append(Scheduler(name="icedtea6-quick", branch="icedtea6", treeStableTimer=5*60, builderNames=["icedtea6-squeeze-x86_64-quick", - "icedtea6-squeeze-armv7l-quick", + "icedtea6-squeeze-x86_64-quick-hotspot", "icedtea6-natty-armv7l-quick", "icedtea6-natty-armv7l-quick-cacao", "icedtea6-natty-armv7l-quick-shark", @@ -77,7 +74,7 @@ c['schedulers'].append(Scheduler(name="i c['schedulers'].append(Scheduler(name="icedtea7-quick", branch="icedtea", treeStableTimer=5*60, builderNames=["icedtea7-squeeze-x86_64-quick", - "icedtea7-squeeze-armv7l-quick", + "icedtea7-squeeze-armv5tel-quick", "icedtea7-natty-armv7l-quick"] )) @@ -87,13 +84,12 @@ c['schedulers'].append(Scheduler(name="i c['schedulers'].append(Scheduler(name="icedtea-web", branch="icedtea-web", treeStableTimer=60, builderNames=["icedtea-web-squeeze-x86_64", - "icedtea-web-squeeze-armv7l", + "icedtea-web-squeeze-armv5tel", "icedtea-web-natty-armv7l"])) c['schedulers'].append(Scheduler(name="testrepo", branch="testrepo", treeStableTimer=60, builderNames=["testrepo-squeeze-x86_64", - "testrepo-squeeze-armv7l", "testrepo-natty-armv7l", "testrepo-jaunty-ia32", "testrepo-squeeze-armv5tel"])) @@ -201,10 +197,11 @@ f1arm.addStep(Compile(command=["make", " f1arm.addStep(Compile(command=["make", "-j2"], workdir="build")) f1arm.addStep(Test(command=["make", "check"], workdir="build")) -icedtea_web_builder_squeeze_armv7l = { 'name': "icedtea-web-squeeze-armv7l", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "icedtea-web-squeeze-armv7l", +icedtea_web_builder_squeeze_armv5tel = { 'name': "icedtea-web-squeeze-armv5tel", + 'slavenames': ["squeeze-armv5tel"], + 'builddir': "icedtea-web-squeeze-armv5tel", 'factory': f1arm } + icedtea_web_builder_natty_armv7l = { 'name': "icedtea-web-natty-armv7l", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea-web-natty-armv7l", @@ -217,10 +214,6 @@ testrepo_builder_x86_64 = { 'name': "tes testrepo_builder_x86_64 = { 'name': "testrepo-squeeze-x86_64", 'slavenames': ["squeeze-x86_64"], 'builddir': "testrepo", - 'factory': f2 } -testrepo_builder_squeeze_armv7l = { 'name': "testrepo-squeeze-armv7l", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "testrepo_squeeze_armv7l", 'factory': f2 } testrepo_builder_natty_armv7l = { 'name': "testrepo-natty-armv7l", 'slavenames': ["natty-armv7l"], @@ -259,25 +252,28 @@ f3.addStep(JTRegCheck(command=["make", " description="check-langtools", workdir="build")) -f3as = factory.BuildFactory() -f3as.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) -f3as.addStep(ShellCommand(command=["./autogen.sh"], +f3h = factory.BuildFactory() +f3h.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3h.addStep(ShellCommand(command=["./autogen.sh"], workdir="src", description="autogen")) -f3as.addStep(ShellCommand(command=["rm", "-rf", "build"], +f3h.addStep(ShellCommand(command=["rm", "-rf", "build"], workdir=".", description="clean build dir")) -f3as.addStep(Configure(command=["../src/configure", +f3h.addStep(Configure(command=["../src/configure", "--disable-bootstrap", - "--disable-docs"], + "--disable-optimizations", + "--disable-docs", + "--with-hotspot-build", + "--with-parallel-jobs=4"], workdir="build")) -f3as.addStep(Compile(workdir="build")) -f3as.addStep(JTRegCheck(command=["make", "check-hotspot"], +f3h.addStep(Compile(workdir="build")) +f3h.addStep(JTRegCheck(command=["make", "check-hotspot"], description="check-hotspot", workdir="build")) -f3as.addStep(JTRegCheck(command=["make", "check-langtools"], +f3h.addStep(JTRegCheck(command=["make", "check-langtools"], description="check-langtools", - workdir="build", timeout=2400)) + workdir="build")) f3an = factory.BuildFactory() f3an.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) @@ -356,6 +352,7 @@ f3jz.addStep(Configure(command=["../src/ "--disable-bootstrap", "--with-parallel-jobs=5", "--disable-docs", + "--with-hotspot-build", "--enable-zero"], workdir="build")) f3jz.addStep(Compile(workdir="build")) @@ -378,6 +375,7 @@ f3js.addStep(Configure(command=["../src/ "--disable-bootstrap", "--with-parallel-jobs=5", "--disable-docs", + "--with-hotspot-build", "--enable-shark"], workdir="build")) f3js.addStep(Compile(workdir="build")) @@ -400,6 +398,7 @@ f3jc.addStep(Configure(command=["../src/ "--disable-bootstrap", "--with-parallel-jobs=5", "--disable-docs", + "--with-hotspot-build", "--enable-cacao"], workdir="build")) f3jc.addStep(Compile(workdir="build")) @@ -479,10 +478,11 @@ icedtea6_builder_quick = { 'name': "iced 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea6-quick", 'factory': f3 } -icedtea6_builder_quick_arm_squeeze = { 'name': "icedtea6-squeeze-armv7l-quick", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "icedtea6-squeeze-armv7l-quick", - 'factory': f3as } +icedtea6_builder_quick_hotspot = { + 'name': "icedtea6-squeeze-x86_64-quick-hotspot", + 'slavenames': ["squeeze-x86_64"], + 'builddir': "icedtea6-quick-hotspot", + 'factory': f3h } icedtea6_builder_quick_arm_natty = { 'name': "icedtea6-natty-armv7l-quick", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea6-natty-armv7l-quick", @@ -532,10 +532,10 @@ icedtea7_builder_quick = { 'name': "iced 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea7-quick", 'factory': f3 } -icedtea7_builder_quick_arm_squeeze = { 'name': "icedtea7-squeeze-armv7l-quick", - 'slavenames': ["squeeze-armv7l"], - 'builddir': "icedtea7-squeeze-armv7l-quick", - 'factory': f3as } +icedtea7_builder_quick_arm_squeeze = { 'name': "icedtea7-squeeze-armv5tel-quick", + 'slavenames': ["squeeze-armv5tel"], + 'builddir': "icedtea7-squeeze-armv5tel-quick", + 'factory': f3a5 } icedtea7_builder_quick_arm_natty = { 'name': "icedtea7-natty-armv7l-quick", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea7-natty-armv7l-quick", @@ -579,7 +579,7 @@ icedtea7_builder_full = { 'name': "icedt 'factory': f4 } c['builders'] = [icedtea6_builder_quick, - icedtea6_builder_quick_arm_squeeze, + icedtea6_builder_quick_hotspot, icedtea6_builder_quick_arm_natty, icedtea6_builder_quick_arm_natty_cacao, icedtea6_builder_quick_arm_natty_shark, @@ -590,15 +590,14 @@ c['builders'] = [icedtea6_builder_quick, icedtea6_builder_quick_armv5tel_squeeze_cacao, icedtea6_builder_quick_armv5tel_squeeze_shark, icedtea7_builder_quick, - icedtea7_builder_quick_arm_squeeze, + icedtea7_builder_quick_armv5tel_squeeze, icedtea7_builder_quick_arm_natty, icedtea6_builder_full, icedtea7_builder_full, icedtea_web_builder_x86_64, - icedtea_web_builder_squeeze_armv7l, + icedtea_web_builder_squeeze_armv5tel, icedtea_web_builder_natty_armv7l, testrepo_builder_x86_64, - testrepo_builder_squeeze_armv7l, testrepo_builder_natty_armv7l, testrepo_builder_jaunty_ia32, testrepo_builder_squeeze_armv5tel ] From mjw at icedtea.classpath.org Tue Feb 22 05:35:07 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Tue, 22 Feb 2011 13:35:07 +0000 Subject: /hg/buildbot: Fix typo add v5tel postfix to icedtea7_builder_qui... Message-ID: changeset 4683c27d2d1d in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=4683c27d2d1d author: Mark Wielaard date: Tue Feb 22 14:35:00 2011 +0100 Fix typo add v5tel postfix to icedtea7_builder_quick_arm_squeeze builder name. diffstat: 1 file changed, 2 insertions(+), 1 deletion(-) icedtea/master.cfg | 3 ++- diffs (13 lines): diff -r ca45780cdf8f -r 4683c27d2d1d icedtea/master.cfg --- a/icedtea/master.cfg Tue Feb 22 14:25:19 2011 +0100 +++ b/icedtea/master.cfg Tue Feb 22 14:35:00 2011 +0100 @@ -532,7 +532,8 @@ icedtea7_builder_quick = { 'name': "iced 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea7-quick", 'factory': f3 } -icedtea7_builder_quick_arm_squeeze = { 'name': "icedtea7-squeeze-armv5tel-quick", +icedtea7_builder_quick_armv5tel_squeeze = { + 'name': "icedtea7-squeeze-armv5tel-quick", 'slavenames': ["squeeze-armv5tel"], 'builddir': "icedtea7-squeeze-armv5tel-quick", 'factory': f3a5 } From bugzilla-daemon at icedtea.classpath.org Tue Feb 22 05:35:59 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 22 Feb 2011 13:35:59 +0000 Subject: [Bug 639] New: Shark fails with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 Summary: Shark fails with hs20 Product: IcedTea Version: 6-hg Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Shark AssignedTo: unassigned at icedtea.classpath.org ReportedBy: gnu_andrew at member.fsf.org Compiling /mnt/builder/shark6/openjdk-ecj/hotspot/src/share/vm/ci/ciTypeFlow.cpp rm -f ciTypeFlow.o g++ -DLINUX -D_GNU_SOURCE -DCC_INTERP -DZERO -DAMD64 -DZERO_LIBARCH=\"amd64\" -DPRODUCT -I. -I/mnt/builder/shark6/openjdk-ecj/hotspot/src/share/vm -I/mnt/builder/shark6/openjdk-ecj/hotspot/src/share/vm/prims -I/mnt/builder/shark6/openjdk-ecj/hotspot/src/cpu/zero/vm -I/mnt/builder/shark6/openjdk-ecj/hotspot/src/os/linux/vm -I/mnt/builder/shark6/openjdk-ecj/hotspot/src/os_cpu/linux_zero/vm -I../generated -DHOTSPOT_RELEASE_VERSION="\"20.0-b07\"" -DHOTSPOT_BUILD_TARGET="\"product\"" -DHOTSPOT_BUILD_USER="\"andrew\"" -DHOTSPOT_LIB_ARCH=\"amd64\" -DJRE_RELEASE_VERSION="\"1.6.0_21-b21\"" -DHOTSPOT_VM_DISTRO="\"OpenJDK\"" -DDERIVATIVE_ID="\"IcedTea6 1.10pre+r3ebdb1a50ba8+\"" -DDISTRIBUTION_ID="\"Built on Gentoo Base System release 2.0.1-r1 (Tue Feb 22 13:33:50 GMT 2011)\"" -DTARGET_OS_FAMILY_linux -DTARGET_ARCH_zero -DTARGET_ARCH_MODEL_zero -DTARGET_OS_ARCH_linux_zero -DTARGET_OS_ARCH_MODEL_linux_zero -DTARGET_COMPILER_gcc -DSHARK -I/usr/lib64/libffi-3.0.10rc5/include -I/usr/include -DNDEBUG -D_GNU_SOURCE -D__STDC_LIMIT_MACROS -D__STDC_CONSTANT_MACROS -DSHARK_LLVM_VERSION=28 -fpic -fno-rtti -fno-exceptions -D_REENTRANT -fcheck-new -m64 -pipe -g -O3 -fno-strict-aliasing -DVM_LITTLE_ENDIAN -D_LP64=1 -Werror -Wpointer-arith -Wsign-compare -DDTRACE_ENABLED -c -MMD -MP -MF ../generated/dependencies/ciTypeFlow.o.d -o ciTypeFlow.o /mnt/builder/shark6/openjdk-ecj/hotspot/src/share/vm/ci/ciTypeFlow.cpp /mnt/builder/shark6/openjdk-ecj/hotspot/src/share/vm/ci/ciTypeFlow.cpp: In member function 'void ciTypeFlow::df_flow_types(ciTypeFlow::Block*, bool, ciTypeFlow::StateVector*, ciTypeFlow::JsrSet*)': /mnt/builder/shark6/openjdk-ecj/hotspot/src/share/vm/ci/ciTypeFlow.cpp:2632:30: error: 'MaxNodeLimit' was not declared in this scope -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From xranby at icedtea.classpath.org Tue Feb 22 05:46:07 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Tue, 22 Feb 2011 13:46:07 +0000 Subject: /hg/icedtea6: Fix icedtea-ecj build with --enable-jamvm Message-ID: changeset 18260ff5be1d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=18260ff5be1d author: Xerxes R?nby date: Tue Feb 22 14:29:21 2011 +0100 Fix icedtea-ecj build with --enable-jamvm 2011-02-22 Xerxes Ranby Fix icedtea-ecj build with --enable-jamvm (stamps /icedtea-ecj.stamp): Add stamps/jamvm.stamp diffstat: 2 files changed, 7 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 3 ++- diffs (25 lines): diff -r 3ebdb1a50ba8 -r 18260ff5be1d ChangeLog --- a/ChangeLog Tue Feb 22 12:52:39 2011 +0000 +++ b/ChangeLog Tue Feb 22 14:29:21 2011 +0100 @@ -1,3 +1,8 @@ 2011-02-22 Andrew John Hughes + + Fix icedtea-ecj build with --enable-jamvm + (stamps/icedtea-ecj.stamp): Add stamps/jamvm.stamp + 2011-02-22 Andrew John Hughes PR497: Mercurial revision detection not very reliable diff -r 3ebdb1a50ba8 -r 18260ff5be1d Makefile.am --- a/Makefile.am Tue Feb 22 12:52:39 2011 +0000 +++ b/Makefile.am Tue Feb 22 14:29:21 2011 +0100 @@ -1533,7 +1533,8 @@ clean-add-tzdata-support-debug: # =================== stamps/icedtea-ecj.stamp: stamps/bootstrap-directory-symlink-ecj.stamp \ - $(OPENJDK_ECJ_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp + $(OPENJDK_ECJ_TREE) stamps/jamvm.stamp stamps/cacao.stamp \ + stamps/rewrite-rhino.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV_ECJ) \ -C openjdk-ecj/ \ From andrew at icedtea.classpath.org Tue Feb 22 06:05:26 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 22 Feb 2011 14:05:26 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 18fbca177289 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=18fbca177289 author: Andrew John Hughes date: Tue Feb 22 14:04:21 2011 +0000 PR635: Disable ARM port on hs20 to allow Zero to build. 2011-02-22 Andrew John Hughes PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 * Makefile.am: (ports): Disable ARM port on hs20. * NEWS: Updated. changeset 39b3029b88d9 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=39b3029b88d9 author: Andrew John Hughes date: Tue Feb 22 14:05:19 2011 +0000 Merge diffstat: 3 files changed, 17 insertions(+), 1 deletion(-) ChangeLog | 12 ++++++++++++ Makefile.am | 5 ++++- NEWS | 1 + diffs (57 lines): diff -r 3ebdb1a50ba8 -r 39b3029b88d9 ChangeLog --- a/ChangeLog Tue Feb 22 12:52:39 2011 +0000 +++ b/ChangeLog Tue Feb 22 14:05:19 2011 +0000 @@ -1,3 +1,15 @@ 2011-02-22 Andrew John Hughes + + PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 + * Makefile.am: + (ports): Disable ARM port on hs20. + * NEWS: Updated. + +2011-02-22 Xerxes Ranby + + Fix icedtea-ecj build with --enable-jamvm + (stamps/icedtea-ecj.stamp): Add stamps/jamvm.stamp + 2011-02-22 Andrew John Hughes PR497: Mercurial revision detection not very reliable diff -r 3ebdb1a50ba8 -r 39b3029b88d9 Makefile.am --- a/Makefile.am Tue Feb 22 12:52:39 2011 +0000 +++ b/Makefile.am Tue Feb 22 14:05:19 2011 +0000 @@ -958,11 +958,13 @@ clean-replace-hotspot: # Copy ports sources into tree stamps/ports.stamp: stamps/replace-hotspot.stamp +if !WITH_ALT_HSBUILD for target in $(abs_top_srcdir)/arm_port/hotspot/tools \ $(abs_top_srcdir)/arm_port/hotspot/src/*cpu/* ; do \ link=$$(dirname $$target | sed 's/^.*arm_port/openjdk/'); \ cp -rv $$target $$link; \ done +endif mkdir -p stamps touch stamps/ports.stamp @@ -1533,7 +1535,8 @@ clean-add-tzdata-support-debug: # =================== stamps/icedtea-ecj.stamp: stamps/bootstrap-directory-symlink-ecj.stamp \ - $(OPENJDK_ECJ_TREE) stamps/cacao.stamp stamps/rewrite-rhino.stamp + $(OPENJDK_ECJ_TREE) stamps/jamvm.stamp stamps/cacao.stamp \ + stamps/rewrite-rhino.stamp $(ARCH_PREFIX) $(MAKE) \ $(ICEDTEA_ENV_ECJ) \ -C openjdk-ecj/ \ diff -r 3ebdb1a50ba8 -r 39b3029b88d9 NEWS --- a/NEWS Tue Feb 22 12:52:39 2011 +0000 +++ b/NEWS Tue Feb 22 14:05:19 2011 +0000 @@ -432,6 +432,7 @@ New in release 1.10 (2011-XX-XX): - PR632: patches/security/20110215/6878713.patch breaks shark zero build - PR103: Usage of native2ascii during bootstrap - PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart + - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. From xerxes at zafena.se Tue Feb 22 07:04:47 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 22 Feb 2011 16:04:47 +0100 Subject: RFC: JamVM - Taste the New Flavour! --enable-jamvm commited. In-Reply-To: <4D6387D8.2080206@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D6387D8.2080206@zafena.se> Message-ID: <4D63D08F.4090405@zafena.se> On 2011-02-22 10:54, Xerxes R?nby wrote: > On 2011-02-22 03:33, Dr Andrew John Hughes wrote: >> On 02:48 Tue 22 Feb , Xerxes R?nby wrote: >>> On 2011-02-21 22:40, Robert Lougher wrote: >>>> Hi, >>>> >>>> On 21 February 2011 21:22, Dr Andrew John Hughes wrote: >>>>> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: >>>>>> Greetings! >>>>>> >>>>>> "JamVM's got a shiny new Git repository, which contains the port to the >>>>>> OpenJDK class-library." >>>>>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >>>>>> >>>>>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >>>>>> >>>>> See comments below on the --enable-jamvm option. >>>>> I'll leave comments on addvm to doko. >>> >>> I will split this patch in two commits, one for each option, to ease >>> review, In this mail i have added the patch for the --enable-jamvm option. >>> >>> I will add --with-additional-vms=jamvm in a follow up patch. >>> >> >> This looks fine now and can go in for me. >> It looks like a simple rename issue for WITH_CACAO. Either you or I can >> do it, but lets get this patch in first so those changes don't break this. >> >> Once this is in, I plan to branch for 1.10. >> > > Hi > > I have regenerated the --enable-jamvm patch to apply on top of the current IcedTea6 trunk after last nights AC_ to IT_ macro renaming. > > enable-jamvm.22feb-v2.patch > Greetings I have commited this first --enable-jamvm patch into IcedTea6! http://icedtea.classpath.org/hg/icedtea6/rev/7d23f65c73a8 configuring a IcedTea6 build with ./autogen.sh ./configure --enable-jamvm --disable-bootstrap make now work out of the box! When the build finish then you can run make check to run all the OpenJDK jtreg checks on JamVM! I have started looking into if it is possible to bootstrap OpenJDK using JamVM itself. http://icedtea.classpath.org/hg/icedtea6/rev/18260ff5be1d ./autogen.sh ./configure --enable-jamvm make When testing to perform a full bootstrap build then I am hitting a internal JamVM error when running ANT: JAVA_HOME=/home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0 ANT_OPTS=-Djava.io.tmpdir='/home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-tmp' /usr/bin/ant -diagnostics > /home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-diagnostics.log ; \ JAVA_HOME=/home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0 ANT_OPTS=-Djava.io.tmpdir='/home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-tmp' /usr/bin/ant -version >> /home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-diagnostics.log bootclasspath is empty! bootclasspath is empty! I assume that JamVM itself needs to be patched to work with the large flora of bootclasspaths used by the OpenJDK build. xerxes at xerxes-J464X:~/icedtea6-jamvm$ /home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0/bin/java -version java version "1.6.0_21" IcedTea6 Runtime Environment (1.10pre+r18260ff5be1d) (Ubuntu build 1.6.0_21-b21) JamVM (build 1.6.0-devel, inline-threaded interpreter with stack-caching) Cheers Xerxes From xranby at icedtea.classpath.org Tue Feb 22 07:26:22 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Tue, 22 Feb 2011 15:26:22 +0000 Subject: /hg/buildbot: ARM CACAO softfloat builders need CACAO_CONFIGURE_... Message-ID: changeset f9d539fde486 in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=f9d539fde486 author: Xerxes R?nby date: Tue Feb 22 16:09:39 2011 +0100 ARM CACAO softfloat builders need CACAO_CONFIGURE_ARGS="--enable- softfloat" 2011-02-22 Xerxes Ranby ARM CACAO softfloat builders f3anc and f3a5c updated to run make CACAO_CONFIGURE_ARGS="--enable-softfloat" diffstat: 1 file changed, 6 insertions(+), 2 deletions(-) icedtea/master.cfg | 8 ++++++-- diffs (25 lines): diff -r 4683c27d2d1d -r f9d539fde486 icedtea/master.cfg --- a/icedtea/master.cfg Tue Feb 22 14:35:00 2011 +0100 +++ b/icedtea/master.cfg Tue Feb 22 16:09:39 2011 +0100 @@ -310,7 +310,9 @@ f3anc.addStep(Configure(command=["../src "--disable-docs", "--enable-cacao"], workdir="build")) -f3anc.addStep(Compile(workdir="build")) +f3anc.addStep(Compile(command=["make", + CACAO_CONFIGURE_ARGS=\"--enable-softfloat\""], + workdir="build")) f3anc.addStep(JTRegCheck(command=["make", "check-hotspot"], description="check-hotspot", workdir="build")) @@ -444,7 +446,9 @@ f3a5c.addStep(Configure(command=["../src "--disable-docs", "--enable-cacao"], workdir="build")) -f3a5c.addStep(Compile(workdir="build")) +f3a5c.addStep(Compile(command=["make", + CACAO_CONFIGURE_ARGS=\"--enable-softfloat\""], + workdir="build")) f3a5c.addStep(JTRegCheck(command=["make", "check-hotspot"], description="check-hotspot", workdir="build")) From mjw at icedtea.classpath.org Tue Feb 22 07:32:22 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Tue, 22 Feb 2011 15:32:22 +0000 Subject: /hg/buildbot: Fix CACAO_CONFIGURE_ARGS quoting typo. Message-ID: changeset 72c548dad3a6 in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=72c548dad3a6 author: Mark Wielaard date: Tue Feb 22 16:32:17 2011 +0100 Fix CACAO_CONFIGURE_ARGS quoting typo. diffstat: 1 file changed, 2 insertions(+), 2 deletions(-) icedtea/master.cfg | 4 ++-- diffs (21 lines): diff -r f9d539fde486 -r 72c548dad3a6 icedtea/master.cfg --- a/icedtea/master.cfg Tue Feb 22 16:09:39 2011 +0100 +++ b/icedtea/master.cfg Tue Feb 22 16:32:17 2011 +0100 @@ -311,7 +311,7 @@ f3anc.addStep(Configure(command=["../src "--enable-cacao"], workdir="build")) f3anc.addStep(Compile(command=["make", - CACAO_CONFIGURE_ARGS=\"--enable-softfloat\""], + "CACAO_CONFIGURE_ARGS=\"--enable-softfloat\""], workdir="build")) f3anc.addStep(JTRegCheck(command=["make", "check-hotspot"], description="check-hotspot", @@ -447,7 +447,7 @@ f3a5c.addStep(Configure(command=["../src "--enable-cacao"], workdir="build")) f3a5c.addStep(Compile(command=["make", - CACAO_CONFIGURE_ARGS=\"--enable-softfloat\""], + "CACAO_CONFIGURE_ARGS=\"--enable-softfloat\""], workdir="build")) f3a5c.addStep(JTRegCheck(command=["make", "check-hotspot"], description="check-hotspot", From rob.lougher at gmail.com Tue Feb 22 07:40:23 2011 From: rob.lougher at gmail.com (Robert Lougher) Date: Tue, 22 Feb 2011 15:40:23 +0000 Subject: RFC: JamVM - Taste the New Flavour! --enable-jamvm commited. In-Reply-To: <4D63D08F.4090405@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D6387D8.2080206@zafena.se> <4D63D08F.4090405@zafena.se> Message-ID: On 22 February 2011 15:04, Xerxes R?nby wrote: > On 2011-02-22 10:54, Xerxes R?nby wrote: >> On 2011-02-22 03:33, Dr Andrew John Hughes wrote: >>> On 02:48 Tue 22 Feb ? ? , Xerxes R?nby wrote: >>>> On 2011-02-21 22:40, Robert Lougher wrote: >>>>> Hi, >>>>> >>>>> On 21 February 2011 21:22, Dr Andrew John Hughes ? wrote: >>>>>> On 21:20 Sat 19 Feb ? ? , Xerxes Ranby wrote: >>>>>>> Greetings! >>>>>>> >>>>>>> "JamVM's got a shiny new Git repository, which contains the port to the >>>>>>> OpenJDK class-library." >>>>>>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >>>>>>> >>>>>>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >>>>>>> >>>>>> See comments below on the --enable-jamvm option. >>>>>> I'll leave comments on addvm to doko. >>>> >>>> I will split this patch in two commits, one for each option, to ease >>>> review, In this mail i have added the patch for the --enable-jamvm option. >>>> >>>> I will add --with-additional-vms=jamvm in a follow up patch. >>>> >>> >>> This looks fine now and can go in for me. >>> It looks like a simple rename issue for WITH_CACAO. ?Either you or I can >>> do it, but lets get this patch in first so those changes don't break this. >>> >>> Once this is in, I plan to branch for 1.10. >>> >> >> Hi >> >> I have regenerated the --enable-jamvm patch to apply on top of the current IcedTea6 trunk after last nights AC_ to IT_ macro renaming. >> >> enable-jamvm.22feb-v2.patch >> > > Greetings > > I have commited this first --enable-jamvm patch into IcedTea6! > http://icedtea.classpath.org/hg/icedtea6/rev/7d23f65c73a8 > > configuring a IcedTea6 build with > ./autogen.sh > ./configure --enable-jamvm --disable-bootstrap > make > now work out of the box! > > When the build finish then you can run > make check > to run all the OpenJDK jtreg checks on JamVM! > > > > > I have started looking into if it is possible to bootstrap OpenJDK using JamVM itself. > http://icedtea.classpath.org/hg/icedtea6/rev/18260ff5be1d > > ./autogen.sh > ./configure --enable-jamvm > make > > When testing to perform a full bootstrap build then I am hitting a internal JamVM error when running ANT: > > JAVA_HOME=/home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0 ANT_OPTS=-Djava.io.tmpdir='/home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-tmp' /usr/bin/ant -diagnostics > /home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-diagnostics.log ; \ > ? ? ?JAVA_HOME=/home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0 ANT_OPTS=-Djava.io.tmpdir='/home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-tmp' /usr/bin/ant -version >> /home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-diagnostics.log > bootclasspath is empty! > bootclasspath is empty! > > I assume that JamVM itself needs to be patched to work with the large flora of bootclasspaths used by the OpenJDK build. > Hi Xerxes, I know why this happens. JAVA_HOME overrides the value of java.home, and is a hangover from GNU Classpath (somebody requested it, I can't remember who, when or why!). On the JDK, java.home points to the jre dir, and is not the same as JAVA_HOME. To test, you can comment out the lines in properties.c as follows: 52 void setJavaHome() { 53 java_home = getCommandLineProperty("java.home"); 54 55 // if(java_home == NULL) 56 // java_home = getenv("JAVA_HOME"); 57 58 if(java_home == NULL) 59 java_home = classlibDefaultJavaHome(); 60 } I'll check the fix in tonight. Rob. > xerxes at xerxes-J464X:~/icedtea6-jamvm$ /home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0/bin/java -version > java version "1.6.0_21" > IcedTea6 Runtime Environment (1.10pre+r18260ff5be1d) (Ubuntu build 1.6.0_21-b21) > JamVM (build 1.6.0-devel, inline-threaded interpreter with stack-caching) > > Cheers > Xerxes > From andrew at icedtea.classpath.org Tue Feb 22 07:57:49 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 22 Feb 2011 15:57:49 +0000 Subject: /hg/icedtea6: PR586: Add missing sources to src.zip. Message-ID: changeset 9ea6e67710b1 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=9ea6e67710b1 author: Andrew John Hughes date: Tue Feb 22 15:57:42 2011 +0000 PR586: Add missing sources to src.zip. 2011-02-22 Andrew John Hughes PR586: Classes missing from src.zip * Makefile.am: Add new patch. * patches/pr586-include_all_srcs.patch: Don't filter sources to include. * NEWS: Updated. diffstat: 4 files changed, 49 insertions(+), 2 deletions(-) ChangeLog | 8 +++++++ Makefile.am | 3 +- NEWS | 3 +- patches/pr586-include_all_srcs.patch | 37 ++++++++++++++++++++++++++++++++++ diffs (94 lines): diff -r 39b3029b88d9 -r 9ea6e67710b1 ChangeLog --- a/ChangeLog Tue Feb 22 14:05:19 2011 +0000 +++ b/ChangeLog Tue Feb 22 15:57:42 2011 +0000 @@ -1,3 +1,11 @@ 2011-02-22 Andrew John Hughes + + PR586: Classes missing from src.zip + * Makefile.am: Add new patch. + * patches/pr586-include_all_srcs.patch: + Don't filter sources to include. + * NEWS: Updated. + 2011-02-22 Andrew John Hughes PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 diff -r 39b3029b88d9 -r 9ea6e67710b1 Makefile.am --- a/Makefile.am Tue Feb 22 14:05:19 2011 +0000 +++ b/Makefile.am Tue Feb 22 15:57:42 2011 +0000 @@ -325,7 +325,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/6728834-blurred-lcd-aa-text.patch \ patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ patches/openjdk/6896068-sg2d.patch \ - patches/pr633-no_javaws_man_page.patch + patches/pr633-no_javaws_man_page.patch \ + patches/pr586-include_all_srcs.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 39b3029b88d9 -r 9ea6e67710b1 NEWS --- a/NEWS Tue Feb 22 14:05:19 2011 +0000 +++ b/NEWS Tue Feb 22 15:57:42 2011 +0000 @@ -10,12 +10,12 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/ New in release 1.10 (2011-XX-XX): -* Added out-of-the-box JamVM support using --enable-jamvm * NetX and the plugin moved to the IcedTea-Web project with a separate release cycle. * Shark provided upstream rather than as part of IcedTea. * The option --with-openjdk becomes --with-jdk-home and --disable-bootstrap * Support for building with HotSpot 20 from its stable tree +* Added out-of-the-box JamVM support using --enable-jamvm * Import of OpenJDK6 b21 including upgrade to HotSpot 19 - S6961870: More rebranding fixes for templates/gpl-*-header files - S6976186: Shark build system changes @@ -433,6 +433,7 @@ New in release 1.10 (2011-XX-XX): - PR103: Usage of native2ascii during bootstrap - PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 + - PR586: Sources missing from src.zip * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. diff -r 39b3029b88d9 -r 9ea6e67710b1 patches/pr586-include_all_srcs.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/pr586-include_all_srcs.patch Tue Feb 22 15:57:42 2011 +0000 @@ -0,0 +1,37 @@ +diff -Nru openjdk.orig/jdk/make/common/Release.gmk openjdk/jdk/make/common/Release.gmk +--- openjdk.orig/jdk/make/common/Release.gmk 2011-02-22 14:08:16.200485180 +0000 ++++ openjdk/jdk/make/common/Release.gmk 2011-02-22 14:11:03.695409585 +0000 +@@ -975,13 +975,9 @@ + for d in $(SOURCE_DIRS); do \ + $(RM) $(ABS_TEMPDIR)/src-files.list; \ + ($(CD) $$d && \ +- for sd in $(SOURCES) ; do \ +- if [ -d $$sd ] ; then \ +- $(FIND) $$sd $(SOURCE_FILES_filter) \ +- -name '*.java' -print \ +- >> $(ABS_TEMPDIR)/src-files.list ; \ +- fi; \ +- done ; \ ++ $(FIND) . $(SOURCE_FILES_filter) \ ++ -name '*.java' -print \ ++ >> $(ABS_TEMPDIR)/src-files.list ; \ + ) ; \ + if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ + ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \ +@@ -994,13 +990,9 @@ + for d in $(SOURCE_DIRS); do \ + $(RM) $(ABS_TEMPDIR)/src-files.list; \ + ($(CD) $$d && \ +- for sd in $(SOURCES) ; do \ +- if [ -d $$sd ] ; then \ +- $(FIND) $$sd $(SOURCE_FILES_filter) \ +- -name '*.java' -print \ +- >> $(ABS_TEMPDIR)/src-files.list ; \ +- fi; \ +- done ; \ ++ $(FIND) . $(SOURCE_FILES_filter) \ ++ -name '*.java' -print \ ++ >> $(ABS_TEMPDIR)/src-files.list ; \ + ) ; \ + if [ -f $(ABS_TEMPDIR)/src-files.list ] ; then \ + ($(CD) $$d && $(TAR) cf - `$(CAT) $(ABS_TEMPDIR)/src-files.list`) \ From xerxes at zafena.se Tue Feb 22 08:01:29 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Tue, 22 Feb 2011 17:01:29 +0100 Subject: JamVM - Bootstrapping OpenJDK using JamVM. In-Reply-To: References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D6387D8.2080206@zafena.se> <4D63D08F.4090405@zafena.se> Message-ID: <4D63DDD9.10709@zafena.se> On 2011-02-22 16:40, Robert Lougher wrote: >> I have started looking into if it is possible to bootstrap OpenJDK using JamVM itself. >> http://icedtea.classpath.org/hg/icedtea6/rev/18260ff5be1d >> >> ./autogen.sh >> ./configure --enable-jamvm >> make >> >> When testing to perform a full bootstrap build then I am hitting a internal JamVM error when running ANT: >> >> JAVA_HOME=/home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0 ANT_OPTS=-Djava.io.tmpdir='/home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-tmp' /usr/bin/ant -diagnostics > /home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-diagnostics.log ; \ >> JAVA_HOME=/home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0 ANT_OPTS=-Djava.io.tmpdir='/home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-tmp' /usr/bin/ant -version >> /home/xerxes/icedtea6-jamvm/openjdk.build/langtools/build/ant-diagnostics.log >> bootclasspath is empty! >> bootclasspath is empty! >> >> I assume that JamVM itself needs to be patched to work with the large flora of bootclasspaths used by the OpenJDK build. >> > Hi Xerxes, > > I know why this happens. JAVA_HOME overrides the value of java.home, > and is a hangover from GNU Classpath (somebody requested it, I can't > remember who, when or why!). On the JDK, java.home points to the jre > dir, and is not the same as JAVA_HOME. > > To test, you can comment out the lines in properties.c as follows: > > 52 void setJavaHome() { > 53 java_home = getCommandLineProperty("java.home"); > 54 > 55 // if(java_home == NULL) > 56 // java_home = getenv("JAVA_HOME"); > 57 > 58 if(java_home == NULL) > 59 java_home = classlibDefaultJavaHome(); > 60 } > > I'll check the fix in tonight. > > Rob. > This fix made ANT happy! The bootstrap build now continue untill JamVM encounter two unsupported -XX: jvm options: -J-XX:PermSize=32m and -J-XX:MaxPermSize=160m >>>Recursively making crypto all @ Tue Feb 22 16:54:30 CET 2011 ... make[6]: Entering directory `/home/xerxes/icedtea6-jamvm/openjdk-ecj/jdk/make/javax/crypto' rm -f -r /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/classes/javax/crypto /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/classes/sun/security/internal/interfaces /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/classes/sun/security/internal/spec /bin/mkdir -p /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned rm -f /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned/jce.jar /home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0/bin/jar cmf /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/manifest.mf /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned/jce.jar -C /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/classes javax/crypto -C /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/classes sun/security/internal/interfaces -C /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/classes sun/security/internal/spec \ -J-client -J-Xmx896m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m Could not create the Java virtual machine. make[6]: *** [/home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned/jce.jar] Error 1 >> xerxes at xerxes-J464X:~/icedtea6-jamvm$ /home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0/bin/java -version >> java version "1.6.0_21" >> IcedTea6 Runtime Environment (1.10pre+r18260ff5be1d) (Ubuntu build 1.6.0_21-b21) >> JamVM (build 1.6.0-devel, inline-threaded interpreter with stack-caching) >> >> Cheers >> Xerxes >> From rob.lougher at gmail.com Tue Feb 22 08:09:37 2011 From: rob.lougher at gmail.com (Robert Lougher) Date: Tue, 22 Feb 2011 16:09:37 +0000 Subject: JamVM - Bootstrapping OpenJDK using JamVM. In-Reply-To: <4D63DDD9.10709@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D6387D8.2080206@zafena.se> <4D63D08F.4090405@zafena.se> <4D63DDD9.10709@zafena.se> Message-ID: On 22 February 2011 16:01, Xerxes R?nby wrote: > > The bootstrap build now continue untill JamVM encounter two unsupported -XX: jvm options: -J-XX:PermSize=32m and -J-XX:MaxPermSize=160m > >>>>Recursively making crypto all @ Tue Feb 22 16:54:30 CET 2011 ... > make[6]: Entering directory `/home/xerxes/icedtea6-jamvm/openjdk-ecj/jdk/make/javax/crypto' > rm -f -r ?/home/xerxes/icedtea6-jamvm/openjdk.build-ecj/classes/javax/crypto ?/home/xerxes/icedtea6-jamvm/openjdk.build-ecj/classes/sun/security/internal/interfaces ?/home/xerxes/icedtea6-jamvm/openjdk.build-ecj/classes/sun/security/internal/spec > /bin/mkdir -p /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned > rm -f /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned/jce.jar > /home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0/bin/jar cmf /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/manifest.mf /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned/jce.jar ?-C /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/classes javax/crypto ?-C /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/classes sun/security/internal/interfaces ?-C /home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/classes sun/security/internal/spec \ > ? ? ? ?-J-client -J-Xmx896m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m > Could not create the Java virtual machine. > make[6]: *** [/home/xerxes/icedtea6-jamvm/openjdk.build-ecj/tmp/sun/javax.crypto/unsigned/jce.jar] Error 1 > OK, I'll fix this tonight as well (extra compatibility options that are ignored). Rob. >>> xerxes at xerxes-J464X:~/icedtea6-jamvm$ /home/xerxes/icedtea6-jamvm/bootstrap/jdk1.6.0/bin/java -version >>> java version "1.6.0_21" >>> IcedTea6 Runtime Environment (1.10pre+r18260ff5be1d) (Ubuntu build 1.6.0_21-b21) >>> JamVM (build 1.6.0-devel, inline-threaded interpreter with stack-caching) >>> >>> Cheers >>> Xerxes >>> > > From omajid at icedtea.classpath.org Tue Feb 22 08:48:17 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Tue, 22 Feb 2011 16:48:17 +0000 Subject: /hg/icedtea-web: Install icedtea-web into a FHS-compliant location Message-ID: changeset cb3f89164966 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=cb3f89164966 author: Omair Majid date: Tue Feb 22 11:47:44 2011 -0500 Install icedtea-web into a FHS-compliant location 2011-02-22 Omair Majid * Makefile.am: Add new vars JRE, LAUNCHER_BOOTCLASSPATH and PLUGIN_BOOTCLASSPATH. (install-exec-local): Install files to FHS-compliant location; do not create links. (install-data- local): Likewise. (uninstall-local): Update file paths to delete. ($(PLUGIN_DIR)/%.o): Pass PLUGIN_BOOTCLASSPATH and ICEDTEA_WEB_JRE. ($(NETX_DIR)/launcher/%.o): Pass LAUNCHER_BOOTCLASSPATH and ICEDTEA_WEB_JRE. ($(NETX_DIR)/launcher/controlpanel/%.o): Likewise. * launcher/java_md.c (GetIcedTeaWebJREPath): New method. (CreateExecutionEnvironment): Call GetIcedTeaWebJREPath. * plugin/icedteanp/IcedTeaNPPlugin.cc (plugin_start_appletviewer): Add PLUGIN_BOOTCLASSPATH to the command. (NP_Initialize): Use ICEDTEA_WEB_JRE to initialize filename. diffstat: 5 files changed, 101 insertions(+), 90 deletions(-) ChangeLog | 20 ++++++++ Makefile.am | 59 +++++++++---------------- NEWS | 2 launcher/java_md.c | 30 ++++++++++++- plugin/icedteanp/IcedTeaNPPlugin.cc | 80 ++++++++++++----------------------- diffs (318 lines): diff -r bee43070e71d -r cb3f89164966 ChangeLog --- a/ChangeLog Fri Feb 18 11:55:23 2011 -0500 +++ b/ChangeLog Tue Feb 22 11:47:44 2011 -0500 @@ -1,3 +1,23 @@ 2011-02-18 Omair Majid + + Install icedtea-web into a FHS-compliant location + * Makefile.am: Add new vars JRE, LAUNCHER_BOOTCLASSPATH and + PLUGIN_BOOTCLASSPATH. + (install-exec-local): Install files to FHS-compliant location; do not + create links. + (install-data-local): Likewise. + (uninstall-local): Update file paths to delete. + ($(PLUGIN_DIR)/%.o): Pass PLUGIN_BOOTCLASSPATH and ICEDTEA_WEB_JRE. + ($(NETX_DIR)/launcher/%.o): Pass LAUNCHER_BOOTCLASSPATH and + ICEDTEA_WEB_JRE. + ($(NETX_DIR)/launcher/controlpanel/%.o): Likewise. + * launcher/java_md.c + (GetIcedTeaWebJREPath): New method. + (CreateExecutionEnvironment): Call GetIcedTeaWebJREPath. + * plugin/icedteanp/IcedTeaNPPlugin.cc + (plugin_start_appletviewer): Add PLUGIN_BOOTCLASSPATH to the command. + (NP_Initialize): Use ICEDTEA_WEB_JRE to initialize filename. + 2011-02-18 Omair Majid Remove pluginappletviewer binary diff -r bee43070e71d -r cb3f89164966 Makefile.am --- a/Makefile.am Fri Feb 18 11:55:23 2011 -0500 +++ b/Makefile.am Tue Feb 22 11:47:44 2011 -0500 @@ -16,6 +16,10 @@ IT_LANGUAGE_SOURCE_VERSION=6 IT_LANGUAGE_SOURCE_VERSION=6 IT_CLASS_TARGET_VERSION=6 IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) + +JRE='"$(SYSTEM_JDK_DIR)jre"' +LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" +PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' # Fake update version to shut up the plugin detector hosted by Oracle. # If Oracle ever release a JDK update greater than 50, this needs to be increased. @@ -94,36 +98,20 @@ clean-local: clean-netx clean-plugin cle clean-bootstrap-directory clean-native-ecj clean-desktop-files clean-netx-docs clean-docs clean-plugin-docs install-exec-local: - ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR) + ${mkinstalldirs} $(DESTDIR)$(bindir) $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/ $(DESTDIR)$(libdir) if ENABLE_PLUGIN - ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/ - ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/plugin.jar + ${INSTALL_PROGRAM} $(PLUGIN_DIR)/IcedTeaPlugin.so $(DESTDIR)$(libdir) + ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar endif - ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(prefix)/jre/lib/netx.jar + ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir) - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ - fi ; \ - if [ ! -e $(prefix)/jre/bin/javaws ] ; then \ - ln -s $(DESTDIR)$(bindir)/javaws $(DESTDIR)$(prefix)/jre/bin ; \ - fi ; \ - fi - ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(prefix)/jre/lib + ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(bindir) - if [ -d $(DESTDIR)$(prefix)/jre/bin ] ; then \ - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ - fi ; \ - if [ ! -e $(prefix)/jre/bin/itweb-settings ] ; then \ - ln -s $(DESTDIR)$(bindir)/itweb-settings $(DESTDIR)$(prefix)/jre/bin ; \ - fi ; \ - fi install-data-local: ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 - ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(prefix)/jre/lib + ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME) if ENABLE_DOCS ${mkinstalldirs} $(DESTDIR)$(htmldir) (cd ${abs_top_builddir}/docs/netx; \ @@ -141,21 +129,14 @@ endif endif uninstall-local: - rm -f $(DESTDIR)$(prefix)/jre/lib/$(INSTALL_ARCH_DIR)/IcedTeaPlugin.so - rm -f $(DESTDIR)$(prefix)/jre/lib/plugin.jar - rm -f $(DESTDIR)$(prefix)/jre/lib/netx.jar - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jnlp - rm -f $(DESTDIR)$(prefix)/jre/lib/about.jar + rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar + rm -f $(DESTDIR)$(datadir)/$(PAKCAGE_NAME)/netx.jar + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1 rm -f $(DESTDIR)$(bindir)/javaws - if [ -L $(DESTDIR)$(prefix)/jre/bin/javaws ] ; then \ - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws ; \ - fi - rm -f $(DESTDIR)$(prefix)/jre/bin/javaws rm -f $(DESTDIR)$(bindir)/itweb-settings - if [ -L $(DESTDIR)$(prefix)/jre/bin/itweb-settings ] ; then \ - rm -f $(DESTDIR)$(prefix)/jre/bin/itweb-settings ; \ - fi rm -rf $(DESTDIR)$(htmldir) # Plugin @@ -183,6 +164,8 @@ PLUGIN_OBJECTS=IcedTeaNPPlugin.o IcedTea -DPLUGIN_VERSION="\"$(PLUGIN_VERSION)\"" \ -DPACKAGE_URL="\"$(PACKAGE_URL)\"" \ -DMOZILLA_VERSION_COLLAPSED="$(MOZILLA_VERSION_COLLAPSED)" \ + -DICEDTEA_WEB_JRE=$(JRE) \ + -DPLUGIN_BOOTCLASSPATH=$(PLUGIN_BOOTCLASSPATH) \ $(GLIB_CFLAGS) \ $(GTK_CFLAGS) \ $(MOZILLA_CFLAGS) \ @@ -328,14 +311,14 @@ extra-lib/about.jar: stamps/extra-class- $(NETX_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c mkdir -p $(NETX_DIR)/launcher && \ $(CC) $(LAUNCHER_FLAGS) \ - -DJAVA_ARGS='{ "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ - -DPROGNAME='"javaws"' -c -o $@ $< + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"javaws"' -c -o $@ $< $(NETX_DIR)/launcher/controlpanel/%.o: $(LAUNCHER_SRCDIR)/%.c mkdir -p $(NETX_DIR)/launcher/controlpanel && \ $(CC) $(LAUNCHER_FLAGS) \ - -DJAVA_ARGS='{ "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ - -DPROGNAME='"itweb-settings"' -c -o $@ $< + -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ + -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"itweb-settings"' -c -o $@ $< $(NETX_DIR)/launcher/javaws: $(NETX_LAUNCHER_OBJECTS) $(CC) $(NETX_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) diff -r bee43070e71d -r cb3f89164966 NEWS --- a/NEWS Fri Feb 18 11:55:23 2011 -0500 +++ b/NEWS Tue Feb 22 11:47:44 2011 -0500 @@ -12,6 +12,8 @@ New in release 1.1 (2011-XX-XX): * Security updates - S6983554, CVE-2010-4450: Launcher incorrect processing of empty library path entries - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation +* New Features + - IcedTea-Web now installs to a FHS-compliant location * NetX - Use Firefox's proxy settings if possible - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) diff -r bee43070e71d -r cb3f89164966 launcher/java_md.c --- a/launcher/java_md.c Fri Feb 18 11:55:23 2011 -0500 +++ b/launcher/java_md.c Tue Feb 22 11:47:44 2011 -0500 @@ -158,6 +158,7 @@ static jboolean GetJVMPath(const char *j static jboolean GetJVMPath(const char *jrepath, const char *jvmtype, char *jvmpath, jint jvmpathsize, char * arch); static jboolean GetJREPath(char *path, jint pathsize, char * arch, jboolean speculative); +static jboolean GetIcedTeaWebJREPath(char *path, jint pathsize, char * arch, jboolean speculative); const char * GetArch() @@ -280,7 +281,7 @@ CreateExecutionEnvironment(int *_argcp, jvmpath does not exist */ if (wanted == running) { /* Find out where the JRE is that we will be using. */ - if (!GetJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { + if (!GetIcedTeaWebJREPath(jrepath, so_jrepath, arch, JNI_FALSE) ) { fprintf(stderr, "Error: could not find Java 2 Runtime Environment.\n"); exit(2); } @@ -603,6 +604,33 @@ GetJVMPath(const char *jrepath, const ch printf("no.\n"); return JNI_FALSE; } +} + +/* + * Find path to the JRE based on the the compile flag ICEDTEA_WEB_JRE + */ +static jboolean +GetIcedTeaWebJREPath(char* path, jint pathsize, char* arch, jboolean speculative) +{ + char libjava[MAXPATHLEN]; + snprintf(libjava, MAXPATHLEN, ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL, arch); + + if (_launcher_debug) { + printf(ICEDTEA_WEB_JRE "/lib/%s/" JAVA_DLL "\n", arch); + printf("libjava is %s\n", libjava); + } + + if (access(libjava, F_OK) == 0) { + strncpy(path, ICEDTEA_WEB_JRE, pathsize); + goto found; + } + + return JNI_FALSE; + + found: + if (_launcher_debug) + printf("JRE path is %s\n", path); + return JNI_TRUE; } /* diff -r bee43070e71d -r cb3f89164966 plugin/icedteanp/IcedTeaNPPlugin.cc --- a/plugin/icedteanp/IcedTeaNPPlugin.cc Fri Feb 18 11:55:23 2011 -0500 +++ b/plugin/icedteanp/IcedTeaNPPlugin.cc Tue Feb 22 11:47:44 2011 -0500 @@ -1547,23 +1547,25 @@ plugin_start_appletviewer (ITNPPluginDat if (plugin_debug) { - command_line = (gchar**) malloc(sizeof(gchar*)*8); + command_line = (gchar**) malloc(sizeof(gchar*)*9); command_line[0] = g_strdup(appletviewer_executable); - command_line[1] = g_strdup("-Xdebug"); - command_line[2] = g_strdup("-Xnoagent"); - command_line[3] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); - command_line[4] = g_strdup("sun.applet.PluginMain"); - command_line[5] = g_strdup(out_pipe_name); - command_line[6] = g_strdup(in_pipe_name); - command_line[7] = NULL; + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); + command_line[2] = g_strdup("-Xdebug"); + command_line[3] = g_strdup("-Xnoagent"); + command_line[4] = g_strdup("-Xrunjdwp:transport=dt_socket,address=8787,server=y,suspend=n"); + command_line[5] = g_strdup("sun.applet.PluginMain"); + command_line[6] = g_strdup(out_pipe_name); + command_line[7] = g_strdup(in_pipe_name); + command_line[8] = NULL; } else { - command_line = (gchar**) malloc(sizeof(gchar*)*5); + command_line = (gchar**) malloc(sizeof(gchar*)*6); command_line[0] = g_strdup(appletviewer_executable); - command_line[1] = g_strdup("sun.applet.PluginMain"); - command_line[2] = g_strdup(out_pipe_name); - command_line[3] = g_strdup(in_pipe_name); - command_line[4] = NULL; + command_line[1] = g_strdup(PLUGIN_BOOTCLASSPATH); + command_line[2] = g_strdup("sun.applet.PluginMain"); + command_line[3] = g_strdup(out_pipe_name); + command_line[4] = g_strdup(in_pipe_name); + command_line[5] = NULL; } environment = plugin_filter_environment(); @@ -1590,17 +1592,21 @@ plugin_start_appletviewer (ITNPPluginDat command_line[0] = NULL; g_free (command_line[1]); command_line[1] = NULL; + g_free (command_line[2]); + command_line[2] = NULL; + g_free (command_line[3]); + command_line[3] = NULL; + g_free (command_line[4]); + command_line[4] = NULL; if (plugin_debug) { - g_free (command_line[2]); - command_line[2] = NULL; - g_free (command_line[3]); - command_line[3] = NULL; - g_free (command_line[4]); - command_line[4] = NULL; g_free (command_line[5]); command_line[5] = NULL; + g_free (command_line[6]); + command_line[6] = NULL; + g_free (command_line[7]); + command_line[7] = NULL; } g_free(command_line); @@ -2173,38 +2179,10 @@ NP_Initialize (NPNetscapeFuncs* browserT } // Set appletviewer_executable. - Dl_info info; - int filename_size; - if (dladdr ((const void*) ITNP_New, &info) == 0) - { - PLUGIN_ERROR_TWO ("Failed to determine plugin shared object filename", - dlerror ()); - np_error = NPERR_GENERIC_ERROR; - goto cleanup_data_directory; - } - filename = (gchar*) malloc(sizeof(gchar)*1024); - filename_size = readlink(info.dli_fname, filename, 1023); - if (filename_size >= 0) - { - filename[filename_size] = '\0'; - } - - if (!filename) - { - PLUGIN_ERROR ("Failed to create plugin shared object filename."); - np_error = NPERR_OUT_OF_MEMORY_ERROR; - goto cleanup_data_directory; - } - - if (filename_size <= 0) - { - free(filename); - filename = g_strdup(info.dli_fname); - } - - appletviewer_executable = g_strdup_printf ("%s/../../bin/java", - dirname (filename)); - PLUGIN_DEBUG(".so is located at: %s and the link points to: %s. Executing java from dir %s to run %s\n", info.dli_fname, filename, dirname (filename), appletviewer_executable); + filename = g_strdup(ICEDTEA_WEB_JRE); + appletviewer_executable = g_strdup_printf ("%s/bin/java", + filename); + PLUGIN_DEBUG("Executing java at %s\n", appletviewer_executable); if (!appletviewer_executable) { PLUGIN_ERROR ("Failed to create appletviewer executable name."); From omajid at redhat.com Tue Feb 22 08:48:50 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 11:48:50 -0500 Subject: [icedtea-web] RFC: do not install netx.jar and plugin.jar into jdk dir In-Reply-To: <20110218235620.GA13108@rivendell.middle-earth.co.uk> References: <4D5D9585.1030405@redhat.com> <20110217220036.GA27039@rivendell.middle-earth.co.uk> <4D5DA929.4020604@redhat.com> <20110218002333.GF27039@rivendell.middle-earth.co.uk> <4D5ECA39.70509@redhat.com> <20110218235620.GA13108@rivendell.middle-earth.co.uk> Message-ID: <4D63E8F2.3080304@redhat.com> On 02/18/2011 06:56 PM, Dr Andrew John Hughes wrote: > On 14:36 Fri 18 Feb , Omair Majid wrote: >> Ok to commit? >> > > Go for it! Looks a good start. > Thanks. I have pushed the changeset. Cheers, Omair From ptisnovs at redhat.com Tue Feb 22 08:56:31 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Tue, 22 Feb 2011 17:56:31 +0100 Subject: Reviewer needed - allow the package com.sun.awt to be used by Java compiler (but with warning) Message-ID: <4D63EABF.9070808@redhat.com> Hi all, can anybody please review simple patch I'd like to add to IcedTea6 HEAD? This patch allows programmers to properly compile applications which use com.sun.awt.AWTUtilities (one new regression test com/sun/awt/Translucency/WindowOpacity.java uses this package btw). Because this package is not part of standard API, warning should be printed by Java compiler in following way: javac Test.java Test.java:1: warning: com.sun.awt.AWTUtilities is Sun proprietary API and may be removed in a future release import com.sun.awt.AWTUtilities; ^ 1 warning (Proprietary Oracle JDK 6 prints the same message btw) PS: This change is already included in OpenJDK 7. Thank you in advance, Pavel -------------- next part -------------- A non-text attachment was scrubbed... Name: com-sun-awt.patch Type: text/x-patch Size: 488 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/cebdc585/com-sun-awt.patch -------------- next part -------------- An embedded and charset-unspecified text was scrubbed... Name: hg_diff Url: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/cebdc585/hg_diff.ksh From omajid at redhat.com Tue Feb 22 09:07:44 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 12:07:44 -0500 Subject: IcedTea-Web and $(prefix) Message-ID: <4D63ED60.1070204@redhat.com> Hi, I have just pushed a patch [1] to HEAD that allows the installation of icedtea-web into FHS-compliant (that is, a non-JDK/JRE) dir. With this patch, using a standard $(prefix) to build and run IcedTea-Web is now possible. Anyone building IcedTea-Web HEAD should use a more standard location for the prefix. If you run into any issues, please let me know. Cheers, Omair [1] http://icedtea.classpath.org/hg/icedtea-web/rev/cb3f89164966 From omajid at redhat.com Tue Feb 22 09:15:49 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 12:15:49 -0500 Subject: Strange behaviour during javaws -about In-Reply-To: <20110219000146.GB13108@rivendell.middle-earth.co.uk> References: <4D5E8453.9050806@redhat.com> <4D5E8C3F.8030903@redhat.com> <20110219000146.GB13108@rivendell.middle-earth.co.uk> Message-ID: <4D63EF45.6020205@redhat.com> On 02/18/2011 07:01 PM, Dr Andrew John Hughes wrote: > On 10:11 Fri 18 Feb , Omair Majid wrote: >> Personally, I dont think running an online application for showing the >> about dialog is a great idea. A user using a particular version of >> icedtea-web would want to see information about that particular version >> (and not the version that just happens to be on icedtea.classpath.org). >> If anything, I think javaws -about should launch the local version about >> about. (This also takes care of the problem that we ship an about.jar >> that's completely unused!) >> > > Yes, the current situation seemed very odd to me when you told me > about it. Apart from the things you already mention, it presumably > means javaws -about fails when there is no Internet connectivity! > While I agree that this is a problem, I think this can happen only on the first run. About.jnlp is then cached (per user) and successive uses of javaws -about should work when offline too. >> As for security permissions, I agree that we should remove >> all-permissions it if it's not absolutely necessary. >> >> That said, I do think the permissions are required by the about >> application as it currently stands. >> extra/net/sourceforge/jnlp/about/Main.java contains these two lines: >> import net.sourceforge.jnlp.Launcher; >> import net.sourceforge.jnlp.runtime.JNLPRuntime; >> while JNLPRuntime executes these two lines before about.jnlp gets a >> chance to run: Security.setProperty("package.access", >> >> Security.getProperty("package.access")+",net.sourceforge.jnlp"); >> So I believe the about application will throw security exceptions on >> start if it does not have full permissions. >> > > What is the point of these statements? What do they do as part of the > about box? I would have thought, naively, it was just displaying text > in a dialog box. > I havent looked into this in too much detail, but basically the dialog contains links to some sample/test JNLPs. Rather than invoking javaws (which could launch another implementation of javaws), it tries to use an internal API to get Netx to launch the JNLPs. Cheers, Omair From omajid at icedtea.classpath.org Tue Feb 22 09:59:28 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Tue, 22 Feb 2011 17:59:28 +0000 Subject: /hg/icedtea-web: Fix --mandir switch Message-ID: changeset 87d12ebb7047 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=87d12ebb7047 author: Omair Majid date: Tue Feb 22 12:59:18 2011 -0500 Fix --mandir switch 2011-02-22 Omair Majid DJ Lucas * Makefile.am (install-data-local): Use $(mandir) for man page dir. (uninstall-local): Use $(mandir) for man page dir. * AUTHORS: Update. diffstat: 3 files changed, 12 insertions(+), 3 deletions(-) AUTHORS | 1 + ChangeLog | 8 ++++++++ Makefile.am | 6 +++--- diffs (49 lines): diff -r cb3f89164966 -r 87d12ebb7047 AUTHORS --- a/AUTHORS Tue Feb 22 11:47:44 2011 -0500 +++ b/AUTHORS Tue Feb 22 12:59:18 2011 -0500 @@ -7,6 +7,7 @@ Andrew John Hughes Matthias Klose Francis Kung +DJ Lucas Omair Majid Jon A. Maxwell Andrew Su diff -r cb3f89164966 -r 87d12ebb7047 ChangeLog --- a/ChangeLog Tue Feb 22 11:47:44 2011 -0500 +++ b/ChangeLog Tue Feb 22 12:59:18 2011 -0500 @@ -1,3 +1,11 @@ 2011-02-22 Omair Majid + DJ Lucas + + * Makefile.am + (install-data-local): Use $(mandir) for man page dir. + (uninstall-local): Use $(mandir) for man page dir. + * AUTHORS: Update. + 2011-02-22 Omair Majid Install icedtea-web into a FHS-compliant location diff -r cb3f89164966 -r 87d12ebb7047 Makefile.am --- a/Makefile.am Tue Feb 22 11:47:44 2011 -0500 +++ b/Makefile.am Tue Feb 22 12:59:18 2011 -0500 @@ -109,8 +109,8 @@ endif ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(bindir) install-data-local: - ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 - ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 + ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 + ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1 ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp $(DESTDIR)$(datarootdir)/$(PACKAGE_NAME) if ENABLE_DOCS ${mkinstalldirs} $(DESTDIR)$(htmldir) @@ -134,7 +134,7 @@ uninstall-local: rm -f $(DESTDIR)$(datadir)/$(PAKCAGE_NAME)/netx.jar rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar - rm -f $(DESTDIR)$(prefix)/man/man1/javaws.1 + rm -f $(DESTDIR)$(mandir)/man1/javaws.1 rm -f $(DESTDIR)$(bindir)/javaws rm -f $(DESTDIR)$(bindir)/itweb-settings rm -rf $(DESTDIR)$(htmldir) From omajid at redhat.com Tue Feb 22 10:01:28 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 13:01:28 -0500 Subject: IcedTea-Web add --mandir switch not honored In-Reply-To: <20110218132427.GB30037@rivendell.middle-earth.co.uk> References: <4D5DBF53.40507@lucasit.com> <20110218132427.GB30037@rivendell.middle-earth.co.uk> Message-ID: <4D63F9F8.7070500@redhat.com> On 02/18/2011 08:24 AM, Dr Andrew John Hughes wrote: > On 18:37 Thu 17 Feb , DJ Lucas wrote: >> Trivial fix: >> >> --- icedtea-web-1.0.1-orig/Makefile.in 2011-02-14 13:04:17.000000000 >> -0600 >> +++ icedtea-web-1.0.1/Makefile.in 2011-02-17 18:32:46.000000000 -0600 >> @@ -626,8 +626,8 @@ install-exec-local: >> @ENABLE_PLUGIN_TRUE@ ${INSTALL_DATA} >> $(abs_top_builddir)/liveconnect/lib/classes.jar >> $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib/plugin.jar >> >> install-data-local: >> - ${mkinstalldirs} -d $(DESTDIR)$(prefix)/man/man1 >> - ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(prefix)/man/man1 >> + ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 >> + ${INSTALL_DATA} $(NETX_SRCDIR)/javaws.1 $(DESTDIR)$(mandir)/man1 >> ${INSTALL_DATA} $(NETX_RESOURCE_DIR)/about.jnlp >> $(DESTDIR)$(prefix)$(JRE_DIR_PREFIX)/lib >> @ENABLE_DOCS_TRUE@ ${mkinstalldirs} $(DESTDIR)$(htmldir) >> @ENABLE_DOCS_TRUE@ (cd ${abs_top_builddir}/docs/netx; \ >> Thanks for the patch! > > Ok for HEAD. For 1.0, it was agreed to retain the JDK directory structure as > that version requires it. Hence the deliberate ignorance of $(mandir). I have pushed a slightly modified version of this patch to IcedTea-Web HEAD [1]. Thanks, Omair [1] http://icedtea.classpath.org/hg/icedtea-web/rev/87d12ebb7047 From omajid at redhat.com Tue Feb 22 11:13:42 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 14:13:42 -0500 Subject: [icedtea-web] RFC: fix lookup of about.jnlp Message-ID: <4D640AE6.3090905@redhat.com> Hi, The fix to isolate icedtea-web in a non-JDK directory has resulted in javaws -about being broken. This is because javaws still looks for about.jnlp in the JDK directory. The attached patch fixes it by making netx use the about.jnlp that's included in netx.jar. I am not sure if this is the best fix; IcedTea-Web installs a separate about.jnlp in $(datadir)/icedtea-web/ which should be used instead. Ok to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: broken-about-jnlp.patch Type: text/x-patch Size: 2393 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/b789793e/broken-about-jnlp.patch From dbhole at redhat.com Tue Feb 22 11:18:16 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 22 Feb 2011 14:18:16 -0500 Subject: [icedtea-web] RFC: fix lookup of about.jnlp In-Reply-To: <4D640AE6.3090905@redhat.com> References: <4D640AE6.3090905@redhat.com> Message-ID: <20110222191815.GC9321@redhat.com> * Omair Majid [2011-02-22 14:15]: > Hi, > > The fix to isolate icedtea-web in a non-JDK directory has resulted > in javaws -about being broken. This is because javaws still looks > for about.jnlp in the JDK directory. The attached patch fixes it by > making netx use the about.jnlp that's included in netx.jar. > > I am not sure if this is the best fix; IcedTea-Web installs a > separate about.jnlp in $(datadir)/icedtea-web/ which should be used > instead. > > Ok to commit? > Since we are using an in-jar jnlp, how does this affect lookup of about.jar? Deepak > Cheers, > Omair > diff -r 87d12ebb7047 netx/net/sourceforge/jnlp/resources/Messages.properties > --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 22 12:59:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 22 14:04:28 2011 -0500 > @@ -121,6 +121,7 @@ > # Runtime > BLaunchAbout=Launching about window... > BNeedsFile=Must specify a .jnlp file > +RNoAboutJnlp=Unable to find about.jnlp > BFileLoc=JNLP file location > BArgNA=Arguments not used for this type of JNLP file (ignored). > BParamNA=Parameters not used for this type of JNLP file (ignored). > diff -r 87d12ebb7047 netx/net/sourceforge/jnlp/runtime/Boot.java > --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Tue Feb 22 12:59:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Tue Feb 22 14:04:28 2011 -0500 > @@ -109,10 +109,6 @@ > + " -Xclearcache " + R("BXclearcache") + "\n" > + " -help " + R("BOHelp") + "\n"; > > - /** the JNLP file to open to display the network-based about window */ > - private static final String NETX_ABOUT_FILE = System.getProperty("java.home") + File.separator + "lib" > - + File.separator + "about.jnlp"; > - > private static final String doubleArgs = "-basedir -jnlp -arg -param -property -update"; > > private static String args[]; // avoid the hot potato > @@ -213,15 +209,19 @@ > } > > /** > - * Returns the about.jnlp file in {java.home}/lib or null if this file > + * Returns the location of the about.jnlp file or null if this file > * does not exist. > */ > private static String getAboutFile() { > - > - if (new File(NETX_ABOUT_FILE).exists()) > - return NETX_ABOUT_FILE; > - else > + ClassLoader cl = Boot.class.getClassLoader(); > + if (cl == null) { > + cl = ClassLoader.getSystemClassLoader(); > + } > + try { > + return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > + } catch (Exception e) { > return null; > + } > } > > /** > @@ -236,7 +236,7 @@ > if (getOption("-about") != null) { > location = getAboutFile(); > if (location == null) > - fatalError("Unable to find about.jnlp in {java.home}/lib/"); > + fatalError(R("RNoAboutJnlp")); > } else { > location = getJNLPFile(); > } From omajid at redhat.com Tue Feb 22 11:27:45 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 14:27:45 -0500 Subject: [icedtea-web] RFC: fix lookup of about.jnlp In-Reply-To: <20110222191815.GC9321@redhat.com> References: <4D640AE6.3090905@redhat.com> <20110222191815.GC9321@redhat.com> Message-ID: <4D640E31.5000003@redhat.com> On 02/22/2011 02:18 PM, Deepak Bhole wrote: > * Omair Majid [2011-02-22 14:15]: >> Hi, >> >> The fix to isolate icedtea-web in a non-JDK directory has resulted >> in javaws -about being broken. This is because javaws still looks >> for about.jnlp in the JDK directory. The attached patch fixes it by >> making netx use the about.jnlp that's included in netx.jar. >> >> I am not sure if this is the best fix; IcedTea-Web installs a >> separate about.jnlp in $(datadir)/icedtea-web/ which should be used >> instead. >> >> Ok to commit? >> > > Since we are using an in-jar jnlp, how does this affect lookup of > about.jar? > The version of about.jnlp in the jar should be identical to the copy installed at $(datadir)/icedtea-web/. You might also want to refer to a recent thread [1] where various issues in javaws -about are pointed out, including the fact that about.jar is completely unused right now. The about.jnlp file indicates that the canonical copies of about.jnlp and about.jar are stored on the icedtea servers [2]; javaws uses _those_ files rather than the on-disk copies. Jiri has indicated interest in fixing these issues. This patch is more of a quick hack just to keep the existing system (even though it's far from perfect) working. Cheers, Omair [1] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012131.html [2] http://icedtea.classpath.org/netx/ From dbhole at redhat.com Tue Feb 22 11:36:38 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 22 Feb 2011 14:36:38 -0500 Subject: [icedtea-web] RFC: fix lookup of about.jnlp In-Reply-To: <4D640E31.5000003@redhat.com> References: <4D640AE6.3090905@redhat.com> <20110222191815.GC9321@redhat.com> <4D640E31.5000003@redhat.com> Message-ID: <20110222193638.GD9321@redhat.com> * Omair Majid [2011-02-22 14:27]: > On 02/22/2011 02:18 PM, Deepak Bhole wrote: > >* Omair Majid [2011-02-22 14:15]: > >>Hi, > >> > >>The fix to isolate icedtea-web in a non-JDK directory has resulted > >>in javaws -about being broken. This is because javaws still looks > >>for about.jnlp in the JDK directory. The attached patch fixes it by > >>making netx use the about.jnlp that's included in netx.jar. > >> > >>I am not sure if this is the best fix; IcedTea-Web installs a > >>separate about.jnlp in $(datadir)/icedtea-web/ which should be used > >>instead. > >> > >>Ok to commit? > >> > > > >Since we are using an in-jar jnlp, how does this affect lookup of > >about.jar? > > > > The version of about.jnlp in the jar should be identical to the copy > installed at $(datadir)/icedtea-web/. > > You might also want to refer to a recent thread [1] where various > issues in javaws -about are pointed out, including the fact that > about.jar is completely unused right now. The about.jnlp file > indicates that the canonical copies of about.jnlp and about.jar are > stored on the icedtea servers [2]; javaws uses _those_ files rather > than the on-disk copies. > > Jiri has indicated interest in fixing these issues. This patch is > more of a quick hack just to keep the existing system (even though > it's far from perfect) working. > Ah okay. Fair enough. Patch looks fine to me. Assuming you have tested this, OK for head and 1.0. Cheers, Deepak > Cheers, > Omair > > [1] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012131.html > [2] http://icedtea.classpath.org/netx/ From omajid at icedtea.classpath.org Tue Feb 22 11:52:20 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Tue, 22 Feb 2011 19:52:20 +0000 Subject: /hg/icedtea-web: Fix lookup of about.jnlp Message-ID: changeset 9dfc0ff64b70 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=9dfc0ff64b70 author: Omair Majid date: Tue Feb 22 14:51:52 2011 -0500 Fix lookup of about.jnlp javaws -about was previously looking for about.jnlp in JAVA_HOME. Since javaws is not meant to be installed in JAVA_HOME, this makes no sense. This patch makes javaws use the about.jnlp inside netx.jar (by loading it using the classloader). 2011-02-22 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add RNoAboutJnlp. * netx/net/sourceforge/jnlp/runtime/Boot.java: Remove NETX_ABOUT_FILE. (getAboutFile): Look for about.jnlp using the classloader. (getFile): Use localized error message string. diffstat: 3 files changed, 19 insertions(+), 10 deletions(-) ChangeLog | 8 ++++++ netx/net/sourceforge/jnlp/resources/Messages.properties | 1 netx/net/sourceforge/jnlp/runtime/Boot.java | 20 +++++++-------- diffs (74 lines): diff -r 87d12ebb7047 -r 9dfc0ff64b70 ChangeLog --- a/ChangeLog Tue Feb 22 12:59:18 2011 -0500 +++ b/ChangeLog Tue Feb 22 14:51:52 2011 -0500 @@ -1,3 +1,11 @@ 2011-02-22 Omair Majid + + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add + RNoAboutJnlp. + * netx/net/sourceforge/jnlp/runtime/Boot.java: Remove NETX_ABOUT_FILE. + (getAboutFile): Look for about.jnlp using the classloader. + (getFile): Use localized error message string. + 2011-02-22 Omair Majid DJ Lucas diff -r 87d12ebb7047 -r 9dfc0ff64b70 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 22 12:59:18 2011 -0500 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 22 14:51:52 2011 -0500 @@ -121,6 +121,7 @@ PBadHeapSize=Invalid value for heap size # Runtime BLaunchAbout=Launching about window... BNeedsFile=Must specify a .jnlp file +RNoAboutJnlp=Unable to find about.jnlp BFileLoc=JNLP file location BArgNA=Arguments not used for this type of JNLP file (ignored). BParamNA=Parameters not used for this type of JNLP file (ignored). diff -r 87d12ebb7047 -r 9dfc0ff64b70 netx/net/sourceforge/jnlp/runtime/Boot.java --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Tue Feb 22 12:59:18 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Tue Feb 22 14:51:52 2011 -0500 @@ -109,10 +109,6 @@ public final class Boot implements Privi + " -Xclearcache " + R("BXclearcache") + "\n" + " -help " + R("BOHelp") + "\n"; - /** the JNLP file to open to display the network-based about window */ - private static final String NETX_ABOUT_FILE = System.getProperty("java.home") + File.separator + "lib" - + File.separator + "about.jnlp"; - private static final String doubleArgs = "-basedir -jnlp -arg -param -property -update"; private static String args[]; // avoid the hot potato @@ -213,15 +209,19 @@ public final class Boot implements Privi } /** - * Returns the about.jnlp file in {java.home}/lib or null if this file + * Returns the location of the about.jnlp file or null if this file * does not exist. */ private static String getAboutFile() { - - if (new File(NETX_ABOUT_FILE).exists()) - return NETX_ABOUT_FILE; - else + ClassLoader cl = Boot.class.getClassLoader(); + if (cl == null) { + cl = ClassLoader.getSystemClassLoader(); + } + try { + return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); + } catch (Exception e) { return null; + } } /** @@ -236,7 +236,7 @@ public final class Boot implements Privi if (getOption("-about") != null) { location = getAboutFile(); if (location == null) - fatalError("Unable to find about.jnlp in {java.home}/lib/"); + fatalError(R("RNoAboutJnlp")); } else { location = getJNLPFile(); } From omajid at redhat.com Tue Feb 22 11:58:12 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 14:58:12 -0500 Subject: [icedtea-web] RFC: fix lookup of about.jnlp In-Reply-To: <20110222193638.GD9321@redhat.com> References: <4D640AE6.3090905@redhat.com> <20110222191815.GC9321@redhat.com> <4D640E31.5000003@redhat.com> <20110222193638.GD9321@redhat.com> Message-ID: <4D641554.9010109@redhat.com> On 02/22/2011 02:36 PM, Deepak Bhole wrote: > * Omair Majid [2011-02-22 14:27]: >> On 02/22/2011 02:18 PM, Deepak Bhole wrote: >>> * Omair Majid [2011-02-22 14:15]: >>>> Hi, >>>> >>>> The fix to isolate icedtea-web in a non-JDK directory has resulted >>>> in javaws -about being broken. This is because javaws still looks >>>> for about.jnlp in the JDK directory. The attached patch fixes it by >>>> making netx use the about.jnlp that's included in netx.jar. >>>> >>>> I am not sure if this is the best fix; IcedTea-Web installs a >>>> separate about.jnlp in $(datadir)/icedtea-web/ which should be used >>>> instead. >>>> >>>> Ok to commit? >>>> >>> >>> Since we are using an in-jar jnlp, how does this affect lookup of >>> about.jar? >>> >> >> The version of about.jnlp in the jar should be identical to the copy >> installed at $(datadir)/icedtea-web/. >> >> You might also want to refer to a recent thread [1] where various >> issues in javaws -about are pointed out, including the fact that >> about.jar is completely unused right now. The about.jnlp file >> indicates that the canonical copies of about.jnlp and about.jar are >> stored on the icedtea servers [2]; javaws uses _those_ files rather >> than the on-disk copies. >> >> Jiri has indicated interest in fixing these issues. This patch is >> more of a quick hack just to keep the existing system (even though >> it's far from perfect) working. >> > > Ah okay. Fair enough. Patch looks fine to me. Assuming you have tested > this, OK for head and 1.0. > Thanks for the review! This patch is only necessary for HEAD. javaws -about works in 1.0. Since icedtea-web-1.0 is installed into a JRE, looking for about.jnlp in that JRE seems fine to me. I have pushed this to HEAD. Cheers, Omair From omajid at redhat.com Tue Feb 22 12:06:36 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 15:06:36 -0500 Subject: [icedtea-web] RFC: typo in uninstall-local Message-ID: <4D64174C.1090906@redhat.com> Hi, The attached patch fixes a typo in uninstall-local in Makefile.am. Okay to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: fix-typo.patch Type: text/x-patch Size: 531 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/fd06e144/fix-typo.patch From dbhole at redhat.com Tue Feb 22 12:08:32 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 22 Feb 2011 15:08:32 -0500 Subject: [icedtea-web] RFC: typo in uninstall-local In-Reply-To: <4D64174C.1090906@redhat.com> References: <4D64174C.1090906@redhat.com> Message-ID: <20110222200832.GE9321@redhat.com> * Omair Majid [2011-02-22 15:07]: > Hi, > > The attached patch fixes a typo in uninstall-local in Makefile.am. > > Okay to commit? > Looks fine to me. Okay to commit. Cheers, Deepak > Cheers, > Omair > diff -r 9dfc0ff64b70 Makefile.am > --- a/Makefile.am Tue Feb 22 14:51:52 2011 -0500 > +++ b/Makefile.am Tue Feb 22 15:05:16 2011 -0500 > @@ -131,7 +131,7 @@ > uninstall-local: > rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so > rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar > - rm -f $(DESTDIR)$(datadir)/$(PAKCAGE_NAME)/netx.jar > + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar > rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp > rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar > rm -f $(DESTDIR)$(mandir)/man1/javaws.1 From mark at klomp.org Tue Feb 22 12:10:57 2011 From: mark at klomp.org (Mark Wielaard) Date: Tue, 22 Feb 2011 21:10:57 +0100 (CET) Subject: RFC: JamVM - Taste the New Flavour! In-Reply-To: <4D6387D8.2080206@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D6387D8.2080206@zafena.se> Message-ID: <56036.80.101.103.228.1298405457.squirrel@gnu.wildebeest.org> On Tue, February 22, 2011 10:54, Xerxes R?nby wrote: > On 2011-02-22 03:33, Dr Andrew John Hughes wrote: >>> I will add --with-additional-vms=jamvm in a follow up patch. >>> >> Once this is in, I plan to branch for 1.10. > > I have also attached the second part of this patch for review, > the --with-additional-vms=jamvm option. > > with-additional-vms-jamvm.22feb.patch Looks fine to me. Thanks for adding this. But do change the ChangeLog/commit message punchline: + JamVM: Try --with-additional-jvm=jamvm topping! It is --with-additional-vms :) Also please do feel free to add the drops (and change the download location) to the icedtea server if you like. If copy them to /var/lib/public-download/drops/jamvm/ they will show up at http://icedtea.classpath.org/download/drops/jamvm/ If you do, please make sure to check Roberts latest fixes are in. Thanks, Mark From omajid at icedtea.classpath.org Tue Feb 22 12:11:47 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Tue, 22 Feb 2011 20:11:47 +0000 Subject: /hg/icedtea-web: Fix typo in uninstall-local Message-ID: changeset d245772c7043 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d245772c7043 author: Omair Majid date: Tue Feb 22 15:11:31 2011 -0500 Fix typo in uninstall-local 2011-02-22 Omair Majid * Makefile.am (uninstall-local): Fix typo in PACKAGE_NAME. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 2 +- diffs (23 lines): diff -r 9dfc0ff64b70 -r d245772c7043 ChangeLog --- a/ChangeLog Tue Feb 22 14:51:52 2011 -0500 +++ b/ChangeLog Tue Feb 22 15:11:31 2011 -0500 @@ -1,3 +1,7 @@ 2011-02-22 Omair Majid + + * Makefile.am (uninstall-local): Fix typo in PACKAGE_NAME. + 2011-02-22 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add diff -r 9dfc0ff64b70 -r d245772c7043 Makefile.am --- a/Makefile.am Tue Feb 22 14:51:52 2011 -0500 +++ b/Makefile.am Tue Feb 22 15:11:31 2011 -0500 @@ -131,7 +131,7 @@ uninstall-local: uninstall-local: rm -f $(DESTDIR)$(libdir)/IcedTeaPlugin.so rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar - rm -f $(DESTDIR)$(datadir)/$(PAKCAGE_NAME)/netx.jar + rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jnlp rm -f $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar rm -f $(DESTDIR)$(mandir)/man1/javaws.1 From omajid at redhat.com Tue Feb 22 12:12:04 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 15:12:04 -0500 Subject: [icedtea-web] RFC: typo in uninstall-local In-Reply-To: <20110222200832.GE9321@redhat.com> References: <4D64174C.1090906@redhat.com> <20110222200832.GE9321@redhat.com> Message-ID: <4D641894.4080700@redhat.com> On 02/22/2011 03:08 PM, Deepak Bhole wrote: > * Omair Majid [2011-02-22 15:07]: >> Hi, >> >> The attached patch fixes a typo in uninstall-local in Makefile.am. >> >> Okay to commit? >> > > Looks fine to me. Okay to commit. > Done. Thanks, Omair From mark at klomp.org Tue Feb 22 12:16:53 2011 From: mark at klomp.org (Mark Wielaard) Date: Tue, 22 Feb 2011 21:16:53 +0100 (CET) Subject: Reviewer needed - allow the package com.sun.awt to be used by Java compiler (but with warning) In-Reply-To: <4D63EABF.9070808@redhat.com> References: <4D63EABF.9070808@redhat.com> Message-ID: <40390.80.101.103.228.1298405813.squirrel@gnu.wildebeest.org> On Tue, February 22, 2011 17:56, Pavel Tisnovsky wrote: > can anybody please review simple patch I'd like to add to IcedTea6 HEAD? > > This patch allows programmers to properly compile applications which use > com.sun.awt.AWTUtilities (one new regression test > com/sun/awt/Translucency/WindowOpacity.java uses this package btw). Looks fine to me. I was wondering why this test failed :) Thanks, Mark From andrew at icedtea.classpath.org Tue Feb 22 15:08:12 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Tue, 22 Feb 2011 23:08:12 +0000 Subject: /hg/icedtea6: Remove obsolete sunsrc patch. Message-ID: changeset e1a5ab4cf428 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e1a5ab4cf428 author: Andrew John Hughes date: Tue Feb 22 23:07:58 2011 +0000 Remove obsolete sunsrc patch. 2011-02-22 Andrew John Hughes * patches/sunsrc.patch: Removed. * Makefile.am: Drop patch, obsoleted by pr586-include_all_srcs.patch. diffstat: 3 files changed, 6 insertions(+), 68 deletions(-) ChangeLog | 6 ++++ Makefile.am | 1 patches/sunsrc.patch | 67 -------------------------------------------------- diffs (95 lines): diff -r 9ea6e67710b1 -r e1a5ab4cf428 ChangeLog --- a/ChangeLog Tue Feb 22 15:57:42 2011 +0000 +++ b/ChangeLog Tue Feb 22 23:07:58 2011 +0000 @@ -1,3 +1,9 @@ 2011-02-22 Andrew John Hughes + + * patches/sunsrc.patch: Removed. + * Makefile.am: Drop patch, obsoleted + by pr586-include_all_srcs.patch. + 2011-02-22 Andrew John Hughes PR586: Classes missing from src.zip diff -r 9ea6e67710b1 -r e1a5ab4cf428 Makefile.am --- a/Makefile.am Tue Feb 22 15:57:42 2011 +0000 +++ b/Makefile.am Tue Feb 22 23:07:58 2011 +0000 @@ -234,7 +234,6 @@ ICEDTEA_PATCHES = \ patches/hotspot/$(HSBUILD)/gcc-suffix.patch \ patches/bytebuffer-compact.patch \ patches/memory-limits.patch \ - patches/sunsrc.patch \ patches/libraries.patch \ patches/javafiles.patch \ patches/jvmtiEnv.patch \ diff -r 9ea6e67710b1 -r e1a5ab4cf428 patches/sunsrc.patch --- a/patches/sunsrc.patch Tue Feb 22 15:57:42 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,67 +0,0 @@ ---- openjdk.orig/jdk/make/common/Release.gmk 2008-02-28 04:39:40.000000000 -0500 -+++ openjdk/jdk/make/common/Release.gmk 2008-02-29 14:34:26.000000000 -0500 -@@ -338,8 +338,6 @@ - # Bug 5008685 - exclude jconsole from sun/tools - # - TOOLS = \ -- META-INF/services/com.sun.jdi.connect.Connector \ -- META-INF/services/com.sun.jdi.connect.spi.TransportService \ - sun/tools/asm \ - sun/tools/jar \ - sun/tools/java \ -@@ -381,8 +379,6 @@ - com/sun/tools/corba \ - com/sun/tools/internal/xjc \ - com/sun/tools/internal/ws \ -- META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory \ -- META-INF/services/com.sun.tools.internal.xjc.Plugin \ - com/sun/istack/internal/tools \ - com/sun/istack/internal/ws \ - com/sun/codemodel \ -@@ -393,7 +389,6 @@ - com/sun/xml/internal/dtdparser \ - com/sun/tools/jdi \ - com/sun/tools/script/shell \ -- META-INF/services/com.sun.tools.attach.spi.AttachProvider \ - com/sun/tools/attach \ - sun/tools/attach \ - sun/tools/jstack \ -@@ -557,10 +552,6 @@ - $(ECHO) "com/sun/source/" >> $@ - $(ECHO) "com/sun/istack/internal/tools/" >> $@ - $(ECHO) "com/sun/istack/internal/ws/" >> $@ -- $(ECHO) "META-INF/services/com.sun.jdi.connect.Connector" >> $@ -- $(ECHO) "META-INF/services/com.sun.jdi.connect.spi.TransportService" >> $@ -- $(ECHO) "META-INF/services/com.sun.mirror.apt.AnnotationProcessorFactory" >> $@ -- $(ECHO) "META-INF/services/com.sun.tools.internal.xjc.Plugin" >> $@ - $(ECHO) "com/sun/tools/" >> $@ - $(ECHO) "sun/jvmstat/" >> $@ - $(ECHO) "sun/rmi/rmic/" >> $@ -@@ -592,7 +583,6 @@ - $(ECHO) "javax/crypto/" >> $@ - $(ECHO) "sun/security/internal/" >> $@ - $(ECHO) "com/sun/crypto/provider/" >> $@ -- $(ECHO) "META-INF/services/com.sun.tools.attach.spi.AttachProvider" >> $@ - $(ECHO) "com/sun/tools/attach/" >> $@ - $(ECHO) "org/relaxng/datatype/" >> $@ - $(ECHO) "com/sun/codemodel/" >> $@ -@@ -626,6 +616,10 @@ - $(BOOT_JAVA_CMD) -jar $(JARREORDER_JARFILE) \ - -o $@.temp $(ABS_LIBDIR)/classlist $(NOT_RT_JAR_LIST) . ) - $(MV) $@.temp $@ -+ $(CAT) $@ | $(GREP) "^sun" | $(GREP) "class" | $(GREP) -v '\$$' \ -+ > $(ABS_TEMPDIR)/sun_classes_list -+ sed 's/\.class/\.java/' < $(ABS_TEMPDIR)/sun_classes_list \ -+ > $(ABS_TEMPDIR)/sun_sources_list - @($(CD) $(CLASSBINDIR) && $(java-vm-cleanup)) - - # Create the rt.jar file list & non-class files list -@@ -1006,6 +1000,8 @@ - ($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/src-files.list ) \ - | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -); \ - fi; \ -+ (($(CD) $$d && $(TAR) cf - -T $(ABS_TEMPDIR)/sun_sources_list ) \ -+ | ($(CD) $(JDK_IMAGE_DIR)/src && $(TAR) xf -)) > /dev/null 2>&1 ; \ - done - else - for d in $(SOURCE_DIRS); do \ From dlila at redhat.com Tue Feb 22 15:36:11 2011 From: dlila at redhat.com (Denis Lila) Date: Tue, 22 Feb 2011 18:36:11 -0500 (EST) Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <271822205.494689.1298417746377.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <1084481687.494697.1298417771161.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. I would like to backport these changesets: http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/dd66920b2d51 http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/40414219305f to 1.7, 1.8, 1.9. Ok to push? Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: hg1.7.diff Type: text/x-patch Size: 11332 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/69960adc/hg1.7.diff -------------- next part -------------- A non-text attachment was scrubbed... Name: hg1.8.diff Type: text/x-patch Size: 11541 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/69960adc/hg1.8.diff -------------- next part -------------- A non-text attachment was scrubbed... Name: hg1.9.diff Type: text/x-patch Size: 11518 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/69960adc/hg1.9.diff From omajid at redhat.com Tue Feb 22 15:58:28 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 18:58:28 -0500 Subject: [icedtea-web] RFC: PR638 Message-ID: <4D644DA4.4080803@redhat.com> Hi, The attached patch fixes PR638. loadClass now throws a ClassNotFoundException instead of returning a null Class. Okay to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: pr638.patch Type: text/x-patch Size: 1925 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/b02a1b85/pr638.patch From dlila at redhat.com Tue Feb 22 16:08:50 2011 From: dlila at redhat.com (Denis Lila) Date: Tue, 22 Feb 2011 19:08:50 -0500 (EST) Subject: java2d backports In-Reply-To: <854171889.494945.1298419371722.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <1421091141.494979.1298419730219.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. I would like to backport these changesets to head: http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4d6f9aaa2600 http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4d6f9aaa2600 They will give us huge performance improvements to the drawing of simple shapes (and I'll finally be able to decisively close RH540575 ;-) I've had to make some manual modifications to the output of hg export (like removing CRLF line endings and removing hunks that change generated files) but they apply mostly cleanly and everything builds and works properly. Ok to push? Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: hg.diff Type: text/x-patch Size: 218560 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110222/782e431e/hg.diff From dbhole at redhat.com Tue Feb 22 16:10:59 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Tue, 22 Feb 2011 19:10:59 -0500 Subject: [icedtea-web] RFC: PR638 In-Reply-To: <4D644DA4.4080803@redhat.com> References: <4D644DA4.4080803@redhat.com> Message-ID: <20110223001058.GK13529@redhat.com> * Omair Majid [2011-02-22 19:00]: > Hi, > > The attached patch fixes PR638. loadClass now throws a > ClassNotFoundException instead of returning a null Class. > > Okay to commit? > Yep, it should have been doing that to begin with. Please apply this to 1.0 as well, as this is really expected behaviour.. OK for HEAD and 1.0 Cheers, Deepak > Cheers, > Omair > diff -r d245772c7043 AUTHORS > --- a/AUTHORS Tue Feb 22 15:11:31 2011 -0500 > +++ b/AUTHORS Tue Feb 22 18:57:06 2011 -0500 > @@ -4,6 +4,7 @@ > Lillian Angel > Deepak Bhole > Thomas Fitzsimmons > +Mark Greenwood > Andrew John Hughes > Matthias Klose > Francis Kung > diff -r d245772c7043 ChangeLog > --- a/ChangeLog Tue Feb 22 15:11:31 2011 -0500 > +++ b/ChangeLog Tue Feb 22 18:57:06 2011 -0500 > @@ -1,3 +1,10 @@ > +2011-02-22 Omair Majid > + Mark Greenwood > + > + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (loadClass): Throw > + ClassNotFoundException instead of returning null. > + * AUTHORS: Update. > + > 2011-02-22 Omair Majid > > * Makefile.am (uninstall-local): Fix typo in PACKAGE_NAME. > diff -r d245772c7043 NEWS > --- a/NEWS Tue Feb 22 15:11:31 2011 -0500 > +++ b/NEWS Tue Feb 22 18:57:06 2011 -0500 > @@ -14,6 +14,8 @@ > - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation > * New Features > - IcedTea-Web now installs to a FHS-compliant location > +* Common Fixes and Improvements > + - PR638: JNLPClassLoader.loadClass(String name) can return null > * NetX > - Use Firefox's proxy settings if possible > - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) > diff -r d245772c7043 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 22 15:11:31 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 22 18:57:06 2011 -0500 > @@ -1045,6 +1045,10 @@ > } > } > > + if (result == null) { > + throw new ClassNotFoundException(name); > + } > + > return result; > } > From omajid at icedtea.classpath.org Tue Feb 22 16:15:15 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 23 Feb 2011 00:15:15 +0000 Subject: /hg/icedtea-web: Fix PR638: JNLPClassLoader.loadClass(String nam... Message-ID: changeset f14bd72dbb29 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=f14bd72dbb29 author: Omair Majid date: Tue Feb 22 19:15:05 2011 -0500 Fix PR638: JNLPClassLoader.loadClass(String name) can return null 2011-02-22 Omair Majid Mark Greenwood Fix PR638 * NEWS: Update with fix. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (loadClass): Throw ClassNotFoundException instead of returning null. * AUTHORS: Update. diffstat: 4 files changed, 16 insertions(+) AUTHORS | 1 + ChangeLog | 9 +++++++++ NEWS | 2 ++ netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 4 ++++ diffs (53 lines): diff -r d245772c7043 -r f14bd72dbb29 AUTHORS --- a/AUTHORS Tue Feb 22 15:11:31 2011 -0500 +++ b/AUTHORS Tue Feb 22 19:15:05 2011 -0500 @@ -4,6 +4,7 @@ Lillian Angel Lillian Angel Deepak Bhole Thomas Fitzsimmons +Mark Greenwood Andrew John Hughes Matthias Klose Francis Kung diff -r d245772c7043 -r f14bd72dbb29 ChangeLog --- a/ChangeLog Tue Feb 22 15:11:31 2011 -0500 +++ b/ChangeLog Tue Feb 22 19:15:05 2011 -0500 @@ -1,3 +1,12 @@ 2011-02-22 Omair Majid + Mark Greenwood + + Fix PR638 + * NEWS: Update with fix. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (loadClass): Throw + ClassNotFoundException instead of returning null. + * AUTHORS: Update. + 2011-02-22 Omair Majid * Makefile.am (uninstall-local): Fix typo in PACKAGE_NAME. diff -r d245772c7043 -r f14bd72dbb29 NEWS --- a/NEWS Tue Feb 22 15:11:31 2011 -0500 +++ b/NEWS Tue Feb 22 19:15:05 2011 -0500 @@ -14,6 +14,8 @@ New in release 1.1 (2011-XX-XX): - RH677332, CVE-2011-0706: IcedTea multiple signers privilege escalation * New Features - IcedTea-Web now installs to a FHS-compliant location +* Common Fixes and Improvements + - PR638: JNLPClassLoader.loadClass(String name) can return null * NetX - Use Firefox's proxy settings if possible - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) diff -r d245772c7043 -r f14bd72dbb29 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 22 15:11:31 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 22 19:15:05 2011 -0500 @@ -1045,6 +1045,10 @@ public class JNLPClassLoader extends URL } } + if (result == null) { + throw new ClassNotFoundException(name); + } + return result; } From omajid at icedtea.classpath.org Tue Feb 22 16:20:01 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 23 Feb 2011 00:20:01 +0000 Subject: /hg/release/icedtea-web-1.0: Fix PR638: JNLPClassLoader.loadClas... Message-ID: changeset ce4eb836f592 in /hg/release/icedtea-web-1.0 details: http://icedtea.classpath.org/hg/release/icedtea-web-1.0?cmd=changeset;node=ce4eb836f592 author: Omair Majid date: Tue Feb 22 19:19:31 2011 -0500 Fix PR638: JNLPClassLoader.loadClass(String name) can return null 2011-02-22 Omair Majid Mark Greenwood Fix PR638 * NEWS: Update with fix. * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (loadClass): Throw ClassNotFoundException instead of returning null. * AUTHORS: Update. diffstat: 4 files changed, 16 insertions(+) AUTHORS | 1 + ChangeLog | 9 +++++++++ NEWS | 2 ++ netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 4 ++++ diffs (53 lines): diff -r a7550fb352c5 -r ce4eb836f592 AUTHORS --- a/AUTHORS Tue Feb 15 17:06:34 2011 -0500 +++ b/AUTHORS Tue Feb 22 19:19:31 2011 -0500 @@ -4,6 +4,7 @@ Lillian Angel Lillian Angel Deepak Bhole Thomas Fitzsimmons +Mark Greenwood Andrew John Hughes Matthias Klose Francis Kung diff -r a7550fb352c5 -r ce4eb836f592 ChangeLog --- a/ChangeLog Tue Feb 15 17:06:34 2011 -0500 +++ b/ChangeLog Tue Feb 22 19:19:31 2011 -0500 @@ -1,3 +1,12 @@ 2011-02-11 Deepak Bhole + Mark Greenwood + + Fix PR638 + * NEWS: Update with fix. + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java (loadClass): Throw + ClassNotFoundException instead of returning null. + * AUTHORS: Update. + 2011-02-11 Deepak Bhole * NEWS: Add 1.0.2 diff -r a7550fb352c5 -r ce4eb836f592 NEWS --- a/NEWS Tue Feb 15 17:06:34 2011 -0500 +++ b/NEWS Tue Feb 22 19:19:31 2011 -0500 @@ -9,6 +9,8 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 1.0.2 (2011-XX-XX): +* Common Fixes and Improvements + - PR638: JNLPClassLoader.loadClass(String name) can return null New in release 1.0.1 (2011-02-15): diff -r a7550fb352c5 -r ce4eb836f592 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 15 17:06:34 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Tue Feb 22 19:19:31 2011 -0500 @@ -1042,6 +1042,10 @@ public class JNLPClassLoader extends URL } } + if (result == null) { + throw new ClassNotFoundException(name); + } + return result; } From omajid at redhat.com Tue Feb 22 16:22:02 2011 From: omajid at redhat.com (Omair Majid) Date: Tue, 22 Feb 2011 19:22:02 -0500 Subject: [icedtea-web] RFC: PR638 In-Reply-To: <20110223001058.GK13529@redhat.com> References: <4D644DA4.4080803@redhat.com> <20110223001058.GK13529@redhat.com> Message-ID: <4D64532A.2010903@redhat.com> On 02/22/2011 07:10 PM, Deepak Bhole wrote: > * Omair Majid [2011-02-22 19:00]: >> Hi, >> >> The attached patch fixes PR638. loadClass now throws a >> ClassNotFoundException instead of returning a null Class. >> >> Okay to commit? >> > > Yep, it should have been doing that to begin with. Please apply this to > 1.0 as well, as this is really expected behaviour.. > Agreed, I am sure a large number of applications depend on this working properly. > OK for HEAD and 1.0 > Thanks for looking over the patches. I have pushed the fix to 1.0 and HEAD. Cheers, Omair From ptisnovs at icedtea.classpath.org Wed Feb 23 00:43:24 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 23 Feb 2011 08:43:24 +0000 Subject: /hg/icedtea6: Testcase correction - the regression test LastErro... Message-ID: changeset 0cd82f25d67d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=0cd82f25d67d author: ptisnovs date: Wed Feb 23 08:50:30 2011 +0100 Testcase correction - the regression test LastErrorString must not rewrite system files diffstat: 3 files changed, 210 insertions(+), 1 deletion(-) ChangeLog | 7 + Makefile.am | 3 patches/jtreg-LastErrorString.patch | 201 +++++++++++++++++++++++++++++++++++ diffs (232 lines): diff -r e1a5ab4cf428 -r 0cd82f25d67d ChangeLog --- a/ChangeLog Tue Feb 22 23:07:58 2011 +0000 +++ b/ChangeLog Wed Feb 23 08:50:30 2011 +0100 @@ -1,3 +1,10 @@ 2011-02-22 Andrew John Hughes + + * Makefile.am: Add patch. + * patches/jtreg-LastErrorString.patch: + Testcase correction - the test LastErrorString must not rewrite system + files. + 2011-02-22 Andrew John Hughes * patches/sunsrc.patch: Removed. diff -r e1a5ab4cf428 -r 0cd82f25d67d Makefile.am --- a/Makefile.am Tue Feb 22 23:07:58 2011 +0000 +++ b/Makefile.am Wed Feb 23 08:50:30 2011 +0100 @@ -325,7 +325,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ patches/openjdk/6896068-sg2d.patch \ patches/pr633-no_javaws_man_page.patch \ - patches/pr586-include_all_srcs.patch + patches/pr586-include_all_srcs.patch \ + patches/jtreg-LastErrorString.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r e1a5ab4cf428 -r 0cd82f25d67d patches/jtreg-LastErrorString.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jtreg-LastErrorString.patch Wed Feb 23 08:50:30 2011 +0100 @@ -0,0 +1,201 @@ +diff -Nru IOException/LastErrorString.java /home/brq/ptisnovs/IOException/LastErrorString.java +--- openjdk-old/jdk/test/java/io/IOException/LastErrorString.java 2011-01-21 00:54:47.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2011-02-21 15:34:58.972481000 +0100 +@@ -21,9 +21,13 @@ + * questions. + */ + +-/* @test +- @bug 4167937 +- @summary Test code paths that use the JVM_LastErrorString procedure ++/* ++ * @test ++ * @bug 4167937 ++ * @summary Test code paths that use the JVM_LastErrorString procedure ++ * ++ * @compile LastErrorString.java ++ * @run shell LastErrorString.sh + */ + + import java.io.IOException; +@@ -37,33 +41,11 @@ + + static String UNWRITEABLE_DIR; + static String UNREADABLE_FILE; ++ static String UNWRITEABLE_FILE; + static String READABLE_FILE; + static String WRITEABLE_FILE; + static String INVALID_PATH; + +- static { +- if (File.separatorChar == '/') { +- UNWRITEABLE_DIR = "/etc/dfs"; +- UNREADABLE_FILE = "/etc/shadow"; +- } else if (File.separatorChar == '\\') { +- UNREADABLE_FILE = "c:/pagefile.sys"; +- UNWRITEABLE_DIR = "z:/fooBAR/baz/GORP"; +- } else { +- throw new RuntimeException("What kind of system is this?"); +- } +- File d = new File(System.getProperty("test.src", ".")); +- READABLE_FILE = new File(d, "LastErrorString.java").getPath(); +- WRITEABLE_FILE = "x.LastErrorString"; +- String s = "foo/"; +- for (;;) { +- s = s + s; +- if (s.length() > 8192) break; +- } +- s += "bar"; +- INVALID_PATH = s; +- } +- +- + static abstract class Test { + + String name; +@@ -197,7 +179,7 @@ + + new Test("FileOutputStream") { + public void run() throws IOException { +- new FileOutputStream(UNREADABLE_FILE); ++ new FileOutputStream(UNWRITEABLE_FILE); + }}.go(); + + new ClosedFOSTest("write()") { +@@ -257,8 +239,29 @@ + + } + ++ public static void preparePaths(String workDir) { ++ System.out.println("Work directory: " + workDir); ++ ++ // directory prepared by shell script ++ UNWRITEABLE_DIR = workDir + "unwriteable_dir"; ++ ++ // files prepared by shell script ++ READABLE_FILE = workDir + "readable_file"; ++ WRITEABLE_FILE = workDir + "writeable_file"; ++ UNREADABLE_FILE = workDir + "unreadable_file"; ++ UNWRITEABLE_FILE = workDir + "unwriteable_file"; ++ ++ String s = "foo/"; ++ for (;;) { ++ s = s + s; ++ if (s.length() > 8192) break; ++ } ++ s += "bar"; ++ INVALID_PATH = s; ++ } + + public static void main(String[] args) throws Exception { ++ preparePaths(args[0]); + go(); + } + +diff -Nru IOException/LastErrorString.sh /home/brq/ptisnovs/IOException/LastErrorString.sh +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2011-02-21 15:34:58.972481000 +0100 +@@ -0,0 +1,103 @@ ++#!/bin/sh ++ ++# Copyright (c) 2011, Red Hat Inc. ++# ++# This code is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++# ++# This code is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++# @test ++# @bug 4167937 ++# @summary Test code paths that use the JVM_LastErrorString procedure ++# ++# @compile LastErrorString.java ++# @run shell LastErrorString.sh ++ ++if [ "${TESTSRC}" = "" ] ++then ++ TESTSRC=. ++fi ++ ++# if TESTJAVA isn't set then we assume an interactive run. So that it's ++# clear which version of 'java' is running we do a 'which java' and ++# a 'java -version'. ++if [ "${TESTJAVA}" = "" ] ++then ++ PARENT=`dirname \`which java\`` ++ TESTJAVA=`dirname ${PARENT}` ++ echo "TESTJAVA not set, selecting ${TESTJAVA}" ++ echo "If this is incorrect, try selecting the variable manually." ++fi ++ ++echo "TESTJAVA is set to ${TESTJAVA}" ++ ++if [ "${TESTCLASSES}" = "" ] ++then ++ echo "TESTCLASSES not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++echo "TESTCLASSES is set to ${TESTCLASSES}" ++ ++CLASSPATH=${TESTCLASSES} ++export CLASSPATH ++ ++WORK_DIR=`pwd` ++echo "WORK_DIR is set to ${WORK_DIR}" ++ ++# set platform-dependent variables and create work files ++OS=`uname -s` ++case "$OS" in ++ Linux | SunOS ) ++ echo "UNIX-like system found - that's great!" ++ FS="/" ++ ;; ++ Windows_* ) ++ echo "Windows system found, can live with that." ++ FS="\\" ++ ;; ++ * ) ++ echo "Unrecognized system $OS!" ++ exit 1 ++ ;; ++esac ++ ++# erase files created by previous test run ++rm -f readable_file ++rm -f writeable_file ++rm -f unreadable_file ++rm -f unwriteable_file ++ ++# create directory + files ++mkdir unwriteable_dir ++touch readable_file ++touch writeable_file ++touch unreadable_file ++touch unwriteable_file ++ ++# set proper ACL ++chmod u+r readable_file ++chmod u+w writeable_file ++chmod a-r unreadable_file ++chmod a-w unwriteable_file ++chmod a-w unwriteable_dir ++ ++echo "Work directory content:" ++ls -l . ++ ++# first parameter to test: work directory + separator ++${TESTJAVA}${FS}bin${FS}java LastErrorString ${WORK_DIR}${FS} ++STATUS=$? ++ ++exit $STATUS ++ From ptisnovs at redhat.com Wed Feb 23 01:00:15 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Wed, 23 Feb 2011 10:00:15 +0100 Subject: Reviewer needed - fix for regression test: test/java/io/IOException/LastErrorString.java In-Reply-To: <20110222131552.GH24648@rivendell.middle-earth.co.uk> References: <4D629589.9020201@redhat.com> <20110221214839.GG12717@rivendell.middle-earth.co.uk> <4D638F60.2090103@redhat.com> <20110222131552.GH24648@rivendell.middle-earth.co.uk> Message-ID: <4D64CC9F.8090204@redhat.com> > > Ok sounds great. Approved. > Thanks Andrew. It's been pushed to IcedTea6 HEAD - is it possible to backport it to IcedTea6-1.9 too please? (to close bug http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634) Cheers Pavel From ptisnovs at icedtea.classpath.org Wed Feb 23 01:05:46 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 23 Feb 2011 09:05:46 +0000 Subject: /hg/icedtea6: Added new patch com-sun-awt.patch which is used fo... Message-ID: changeset 11715c17ead8 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=11715c17ead8 author: ptisnovs date: Wed Feb 23 09:11:57 2011 +0100 Added new patch com-sun-awt.patch which is used for updating file legacy.properties containing packages with non-standardized API. diffstat: 3 files changed, 19 insertions(+), 1 deletion(-) ChangeLog | 7 +++++++ Makefile.am | 3 ++- patches/com-sun-awt.patch | 10 ++++++++++ diffs (41 lines): diff -r 0cd82f25d67d -r 11715c17ead8 ChangeLog --- a/ChangeLog Wed Feb 23 08:50:30 2011 +0100 +++ b/ChangeLog Wed Feb 23 09:11:57 2011 +0100 @@ -1,3 +1,10 @@ 2011-02-23 Pavel Tisnovsky + + * Makefile.am: Add new patch. + * patches/com-sun-awt.patch: + This patch is used for updating file legacy.properties + containing packages with non-standardized API + 2011-02-23 Pavel Tisnovsky * Makefile.am: Add patch. diff -r 0cd82f25d67d -r 11715c17ead8 Makefile.am --- a/Makefile.am Wed Feb 23 08:50:30 2011 +0100 +++ b/Makefile.am Wed Feb 23 09:11:57 2011 +0100 @@ -326,7 +326,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/6896068-sg2d.patch \ patches/pr633-no_javaws_man_page.patch \ patches/pr586-include_all_srcs.patch \ - patches/jtreg-LastErrorString.patch + patches/jtreg-LastErrorString.patch \ + patches/com-sun-awt.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 0cd82f25d67d -r 11715c17ead8 patches/com-sun-awt.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/com-sun-awt.patch Wed Feb 23 09:11:57 2011 +0100 @@ -0,0 +1,10 @@ +--- openjdk-old/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-01-21 00:55:18.000000000 +0100 ++++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-02-22 15:28:53.010912000 +0100 +@@ -24,6 +24,7 @@ + # + + com.sun.accessibility.internal.resources = tiger legacy ++com.sun.awt = tiger legacy + com.sun.beans = tiger legacy + com.sun.corba.se.impl.activation = tiger legacy + com.sun.corba.se.impl.copyobject = tiger legacy From xerxes at zafena.se Wed Feb 23 01:27:57 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 23 Feb 2011 10:27:57 +0100 Subject: RFC: JamVM - Taste the New Flavour! --with-jamvm-src-zip option In-Reply-To: <4D6315F6.2050709@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> Message-ID: <4D64D31D.8080309@zafena.se> On 2011-02-22 02:48, Xerxes R?nby wrote: > On 2011-02-21 22:40, Robert Lougher wrote: >> Hi, >> >> On 21 February 2011 21:22, Dr Andrew John Hughes >> wrote: >>> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: >>>> Greetings! >>>> >>>> "JamVM's got a shiny new Git repository, which contains the port to the >>>> OpenJDK class-library." >>>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >>>> >>>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >>>> +stamps/download-jamvm.stamp: >>>> +if BUILD_JAMVM >>>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ >>>> + | $(SHA256SUM) --check ; \ >>>> + then \ >>>> + if [ $(JAMVM_SRC_ZIP) ] ; \ >>>> + then \ >>>> + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ >>>> + fi ; \ >>>> + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ >>>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ >>>> + | $(SHA256SUM) --check ; \ >>>> + then echo "ERROR: Bad download of JamVM zip"; false; \ >>>> + fi; \ >>>> + fi >>>> +endif >>>> + mkdir -p stamps >>>> + touch $@ >>> >>> We need an option equivalent to --with-cacao-src-zip. I'd suggest >>> adding this in a follow up patch. As with the drop tarballs, we >>> should verify the checksum for pre-provided tarballs as well as >>> download ones. It should be just a matter of symlinking the tarball >>> here if an alternate one is specified. >>> > > Noted, I will add --with-cacao-src-zip in another follow up patch. > Hi again! I have attached the follow up patch to implement the new --with-jamvm-src-zip option. with-jamvm-src-zip.23feb.patch Ok to push? Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: with-jamvm-src-zip.23feb.patch Type: text/x-patch Size: 3157 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/888b9b7d/with-jamvm-src-zip.23feb.patch From jvanek at redhat.com Wed Feb 23 01:40:35 2011 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 23 Feb 2011 10:40:35 +0100 Subject: Strange behaviour during javaws -about In-Reply-To: <4D63EF45.6020205@redhat.com> References: <4D5E8453.9050806@redhat.com> <4D5E8C3F.8030903@redhat.com> <20110219000146.GB13108@rivendell.middle-earth.co.uk> <4D63EF45.6020205@redhat.com> Message-ID: <4D64D613.10708@redhat.com> On 02/22/2011 06:15 PM, Omair Majid wrote: > On 02/18/2011 07:01 PM, Dr Andrew John Hughes wrote: >> On 10:11 Fri 18 Feb , Omair Majid wrote: >>> Personally, I dont think running an online application for showing the >>> about dialog is a great idea. A user using a particular version of >>> icedtea-web would want to see information about that particular version >>> (and not the version that just happens to be on icedtea.classpath.org). >>> If anything, I think javaws -about should launch the local version about >>> about. (This also takes care of the problem that we ship an about.jar >>> that's completely unused!) >>> >> >> Yes, the current situation seemed very odd to me when you told me >> about it. Apart from the things you already mention, it presumably >> means javaws -about fails when there is no Internet connectivity! >> > > While I agree that this is a problem, I think this can happen only on > the first run. About.jnlp is then cached (per user) and successive uses > of javaws -about should work when offline too. But Still the problem Andrew pointed out persists. I initially "discovered" the problem when I started to analyse state for create testsuit for IBMs', Suns' and Openjdks' installations/alternatives framework. And in that case this can be fatality;) >>> As for security permissions, I agree that we should remove >>> all-permissions it if it's not absolutely necessary. >>> >>> That said, I do think the permissions are required by the about >>> application as it currently stands. >>> extra/net/sourceforge/jnlp/about/Main.java contains these two lines: >>> import net.sourceforge.jnlp.Launcher; >>> import net.sourceforge.jnlp.runtime.JNLPRuntime; >>> while JNLPRuntime executes these two lines before about.jnlp gets a >>> chance to run: Security.setProperty("package.access", >>> >>> Security.getProperty("package.access")+",net.sourceforge.jnlp"); >>> So I believe the about application will throw security exceptions on >>> start if it does not have full permissions. >>> >> >> What is the point of these statements? What do they do as part of the >> about box? I would have thought, naively, it was just displaying text >> in a dialog box. >> > > I havent looked into this in too much detail, but basically the dialog > contains links to some sample/test JNLPs. Rather than invoking javaws > (which could launch another implementation of javaws), it tries to use > an internal API to get Netx to launch the JNLPs. > When all permissions are disabled, then links in panes are not working. We can live without it. From my point of view, we should remove second tab (demos, games ....) and replace it by our own tab which will have content generated from NEWS and AUTHORS (as mentioned in 677334 , and will contain true version user have (also somehow generated during build). This information should also appear in terminal output. > Cheers, > Omair If we want to keep current way of -about then the patch is simple (see attachment). This will lunch already shipped about.jar with no permissions and offline. And also release the window properly (still mystery but works). The tab replacing is another discussion. Regards J. -------------- next part -------------- A non-text attachment was scrubbed... Name: about.patch Type: text/x-patch Size: 715 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/acd87399/about.patch From xerxes at zafena.se Wed Feb 23 02:17:57 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 23 Feb 2011 11:17:57 +0100 Subject: RFC: WITH_CACAO reame to ENABLE_CACAO patch. In-Reply-To: <20110222023330.GK12717@rivendell.middle-earth.co.uk> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> Message-ID: <4D64DED5.4080109@zafena.se> On 2011-02-22 03:33, Dr Andrew John Hughes wrote: > On 02:48 Tue 22 Feb , Xerxes R?nby wrote: >> On 2011-02-21 22:40, Robert Lougher wrote: >>> Hi, >>> >>> On 21 February 2011 21:22, Dr Andrew John Hughes wrote: >>>> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: >>>>> Greetings! >>>>> >>>>> "JamVM's got a shiny new Git repository, which contains the port to the >>>>> OpenJDK class-library." >>>>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >>>>> >>>>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >>>>> >>>> See comments below on the --enable-jamvm option. >>>> I'll leave comments on addvm to doko. >> >> I will split this patch in two commits, one for each option, to ease >> review, > > This looks fine now and can go in for me. > It looks like a simple rename issue for WITH_CACAO. Either you or I can > do it, but lets get this patch in first so those changes don't break this. > > Once this is in, I plan to branch for 1.10. > Hi I have attached the simple rename WITH_CACAO to ENABLE_CACAO cleanup patch. Should I mention this small cleanup in the NEWS file? Ok to push? Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: rename-with_cacao-to-enable_cacao.23feb.patch Type: text/x-patch Size: 4118 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/9eae1bf2/rename-with_cacao-to-enable_cacao.23feb.patch From xranby at icedtea.classpath.org Wed Feb 23 03:47:42 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Wed, 23 Feb 2011 11:47:42 +0000 Subject: /hg/icedtea6: JamVM: Try --with-additional-vms=jamvm topping! Message-ID: changeset a82e71679b03 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a82e71679b03 author: Xerxes R?nby date: Wed Feb 23 12:30:22 2011 +0100 JamVM: Try --with-additional-vms=jamvm topping! 2011-02-23 Xerxes Ranby JamVM: Try --with-additional-vms=jamvm topping! * NEWS: Updated. * Makefile.am (stamps/add-jamvm.stamp): New make target. (clean-add-jamvm): Likewise. (stamps/add-jamvm-debug.stamp): Likewise. (clean-add-jamvm-debug): Likewise. (.PHONY): Add clean-add-jamvm and clean-add-jamvm-debug. (stamps/icedtea-against-icedtea.stamp): Add stamps/add-jamvm.stamp. (clean-icedtea-against-icedtea): Add clean-add-jamvm. (stamps/icedtea-debug-against-icedtea.stamp): Add stamps /add-jamvm-debug.stamp. (clean-icedtea-debug-against- icedtea): Add clean-add-jamvm-debug. * acinclude.m4 (IT_CHECK_ADDITIONAL_VMS): Set add_vm_jamvm if jamvm are found. (BUILD_JAMVM): Add check for add_vm_jamvm. (ADD_JAMVM_BUILD): New conditional dependent on add_vm_jamvm. diffstat: 4 files changed, 71 insertions(+), 7 deletions(-) ChangeLog | 19 +++++++++++++++++++ Makefile.am | 48 +++++++++++++++++++++++++++++++++++++++++++----- NEWS | 2 ++ acinclude.m4 | 9 +++++++-- diffs (159 lines): diff -r 11715c17ead8 -r a82e71679b03 ChangeLog --- a/ChangeLog Wed Feb 23 09:11:57 2011 +0100 +++ b/ChangeLog Wed Feb 23 12:30:22 2011 +0100 @@ -1,3 +1,22 @@ 2011-02-23 Pavel Tisnovsky + + JamVM: Try --with-additional-vms=jamvm topping! + * NEWS: Updated. + * Makefile.am (stamps/add-jamvm.stamp): New make target. + (clean-add-jamvm): Likewise. + (stamps/add-jamvm-debug.stamp): Likewise. + (clean-add-jamvm-debug): Likewise. + (.PHONY): Add clean-add-jamvm and clean-add-jamvm-debug. + (stamps/icedtea-against-icedtea.stamp): Add stamps/add-jamvm.stamp. + (clean-icedtea-against-icedtea): Add clean-add-jamvm. + (stamps/icedtea-debug-against-icedtea.stamp): + Add stamps/add-jamvm-debug.stamp. + (clean-icedtea-debug-against-icedtea): Add clean-add-jamvm-debug. + * acinclude.m4 (IT_CHECK_ADDITIONAL_VMS): + Set add_vm_jamvm if jamvm are found. + (BUILD_JAMVM): Add check for add_vm_jamvm. + (ADD_JAMVM_BUILD): New conditional dependent on add_vm_jamvm. + 2011-02-23 Pavel Tisnovsky * Makefile.am: Add new patch. diff -r 11715c17ead8 -r a82e71679b03 Makefile.am --- a/Makefile.am Wed Feb 23 09:11:57 2011 +0100 +++ b/Makefile.am Wed Feb 23 12:30:22 2011 +0100 @@ -610,7 +610,7 @@ install: hotspot-helper clean-extra clean-jtreg clean-jtreg-reports \ clean-add-zero clean-add-zero-debug clean-icedtea clean-icedtea-debug \ clean-icedtea-against-ecj \ - clean-jamvm \ + clean-jamvm clean-add-jamvm clean-add-jamvm-debug \ clean-cacao clean-add-cacao clean-add-cacao-debug \ clean-ports clean-overlay clean-extract-ecj clean-extract clean-extract-openjdk \ clean-replace-hotspot clean-generated clean-download clean-hgforest clean-download-openjdk \ @@ -1376,22 +1376,26 @@ clean-icedtea-debug: rm -rf $(DEBUG_BUILD_OUTPUT_DIR) rm -f stamps/icedtea-debug.stamp -stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \ +stamps/icedtea-against-icedtea.stamp: stamps/icedtea.stamp \ + stamps/add-jamvm.stamp stamps/add-cacao.stamp stamps/add-zero.stamp \ stamps/add-systemtap.stamp stamps/add-pulseaudio.stamp stamps/add-nss.stamp stamps/add-tzdata-support.stamp mkdir -p stamps touch stamps/icedtea-against-icedtea.stamp -clean-icedtea-against-icedtea: clean-add-zero clean-add-cacao clean-add-systemtap clean-add-pulseaudio \ +clean-icedtea-against-icedtea: clean-add-jamvm clean-add-zero clean-add-cacao \ + clean-add-systemtap clean-add-pulseaudio \ clean-add-nss clean-add-tzdata-support rm -f stamps/icedtea-against-icedtea.stamp -stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp stamps/add-cacao-debug.stamp \ +stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp \ + stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp \ stamps/add-zero-debug.stamp stamps/add-systemtap-debug.stamp stamps/add-pulseaudio-debug.stamp \ stamps/add-nss-debug.stamp stamps/add/tzdata-support-debug.stamp mkdir -p stamps touch stamps/icedtea-debug-against-icedtea.stamp -clean-icedtea-debug-against-icedtea: clean-add-zero-debug clean-add-cacao-debug clean-add-systemtap-debug \ +clean-icedtea-debug-against-icedtea: clean-add-zero-debug \ + clean-add-jamvm-debug clean-add-cacao-debug clean-add-systemtap-debug \ clean-add-pulseaudio-debug clean-add-nss-debug clean-add-tzdata-support-debug rm -f stamps/icedtea-debug-against-icedtea.stamp @@ -1796,6 +1800,40 @@ clean-jamvm: rm -f stamps/jamvm.stamp rm -f stamps/extract-jamvm.stamp +# Targets for additional VMs + +stamps/add-jamvm.stamp: stamps/icedtea.stamp stamps/jamvm.stamp +if ADD_JAMVM_BUILD + mkdir -p $(BUILD_JRE_ARCH_DIR)/jamvm + install -m 644 jamvm/install/lib/libjvm.so \ + $(BUILD_JRE_ARCH_DIR)/jamvm/ + printf -- '-jamvm KNOWN\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg +else + printf -- '-jamvm ERROR\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg +endif + touch $@ + +clean-add-jamvm: + rm -rf $(BUILD_JRE_ARCH_DIR)/jamvm + sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg + rm -f stamps/add-jamvm.stamp + +stamps/add-jamvm-debug.stamp: stamps/icedtea-debug.stamp stamps/jamvm.stamp +if ADD_JAMVM_BUILD + mkdir -p $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm + install -m 644 jamvm/install/lib/libjvm.so \ + $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm/ + printf -- '-jamvm KNOWN\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg +else + printf -- '-jamvm ERROR\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg +endif + touch $@ + +clean-add-jamvm-debug: + rm -rf $(BUILD_DEBUG_JRE_ARCH_DIR)/jamvm + sed -i 's#-jamvm KNOWN#-jamvm ERROR#' jvm.cfg + rm -f stamps/add-jamvm-debug.stamp + # CACAO stamps/cacao.stamp: $(OPENJDK_TREE) stamps/rt.stamp diff -r 11715c17ead8 -r a82e71679b03 NEWS --- a/NEWS Wed Feb 23 09:11:57 2011 +0100 +++ b/NEWS Wed Feb 23 12:30:22 2011 +0100 @@ -16,6 +16,8 @@ New in release 1.10 (2011-XX-XX): * The option --with-openjdk becomes --with-jdk-home and --disable-bootstrap * Support for building with HotSpot 20 from its stable tree * Added out-of-the-box JamVM support using --enable-jamvm +* Allow building of JamVM beside the default VM by using + --with-additional-vms=jamvm * Import of OpenJDK6 b21 including upgrade to HotSpot 19 - S6961870: More rebranding fixes for templates/gpl-*-header files - S6976186: Shark build system changes diff -r 11715c17ead8 -r a82e71679b03 acinclude.m4 --- a/acinclude.m4 Wed Feb 23 09:11:57 2011 +0100 +++ b/acinclude.m4 Wed Feb 23 12:30:22 2011 +0100 @@ -1199,13 +1199,14 @@ AC_MSG_CHECKING([for additional virtual AC_MSG_CHECKING([for additional virtual machines to build]) AC_ARG_WITH(additional-vms, AC_HELP_STRING([--with-additional-vms=vm-list], - [build additional virtual machines. Valid value is a comma separated string with the backend names `cacao', `zero' and `shark'.]), + [build additional virtual machines. Valid value is a comma separated string with the backend names `jamvm', `cacao', `zero' and `shark'.]), [ if test "x${withval}" != x then with_additional_vms=${withval} for vm in `echo $with_additional_vms | sed 's/,/ /g'`; do case "x$vm" in + xjamvm) add_vm_jamvm=yes;; xcacao) add_vm_cacao=yes;; xzero) add_vm_zero=yes;; xshark) add_vm_shark=yes;; @@ -1218,12 +1219,16 @@ fi fi AC_MSG_RESULT($with_additional_vms) +AM_CONDITIONAL(ADD_JAMVM_BUILD, test x$add_vm_jamvm != x) AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x) AM_CONDITIONAL(ADD_ZERO_BUILD, test x$add_vm_zero != x || test x$add_vm_shark != x) AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x) -AM_CONDITIONAL(BUILD_JAMVM, test "x${ENABLE_JAMVM}" = xyes) +AM_CONDITIONAL(BUILD_JAMVM, test x$add_vm_jamvm != x || test "x${ENABLE_JAMVM}" = xyes) AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes) +if test "x${ENABLE_JAMVM}" = xyes && test "x${ADD_JAMVM_BUILD_TRUE}" = x; then + AC_MSG_ERROR([additional vm is the default vm]) +fi if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then AC_MSG_ERROR([additional vm is the default vm]) fi From xerxes at zafena.se Wed Feb 23 04:04:46 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 23 Feb 2011 13:04:46 +0100 Subject: RFC: JamVM - Taste the New Flavour! --with-additional-vms commited. In-Reply-To: <56036.80.101.103.228.1298405457.squirrel@gnu.wildebeest.org> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D6387D8.2080206@zafena.se> <56036.80.101.103.228.1298405457.squirrel@gnu.wildebeest.org> Message-ID: <4D64F7DE.40806@zafena.se> On 2011-02-22 21:10, Mark Wielaard wrote: > On Tue, February 22, 2011 10:54, Xerxes R?nby wrote: >> On 2011-02-22 03:33, Dr Andrew John Hughes wrote: >>>> I will add --with-additional-vms=jamvm in a follow up patch. >>>> >>> Once this is in, I plan to branch for 1.10. >> I have also attached the second part of this patch for review, >> the --with-additional-vms=jamvm option. >> >> with-additional-vms-jamvm.22feb.patch > Looks fine to me. Thanks for adding this. > But do change the ChangeLog/commit message punchline: > + JamVM: Try --with-additional-jvm=jamvm topping! > > It is --with-additional-vms :) Thank you Mark for spotting this! :) Commited to: http://icedtea.classpath.org/hg/icedtea6/rev/a82e71679b03 It is now possible to perform ./autogen.sh ./configure --with-additional-vms=jamvm make > Also please do feel free to add the drops (and change the download > location) to the icedtea server if you like. If copy them to > /var/lib/public-download/drops/jamvm/ they will show up at > http://icedtea.classpath.org/download/drops/jamvm/ > > If you do, please make sure to check Roberts latest fixes > are in. > > Thanks, > > Mark I will post a follow up patch that moves the updated drops to the icedtea.classpath.org server. Cheers, and have a great day! Xerxes From mjw at icedtea.classpath.org Wed Feb 23 04:36:08 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Wed, 23 Feb 2011 12:36:08 +0000 Subject: /hg/buildbot: Add jamvm to with-additonal-vms for icedtea6-squee... Message-ID: changeset ea34c3f2a5b8 in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=ea34c3f2a5b8 author: Mark Wielaard date: Wed Feb 23 13:36:05 2011 +0100 Add jamvm to with-additonal-vms for icedtea6-squeeze-x86_64-quick f3. diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) icedtea/master.cfg | 2 +- diffs (12 lines): diff -r 72c548dad3a6 -r ea34c3f2a5b8 icedtea/master.cfg --- a/icedtea/master.cfg Tue Feb 22 16:32:17 2011 +0100 +++ b/icedtea/master.cfg Wed Feb 23 13:36:05 2011 +0100 @@ -240,7 +240,7 @@ f3.addStep(Configure(command=["../src/co "--disable-bootstrap", "--disable-optimizations", "--disable-docs", - "--with-additional-vms=cacao,shark", + "--with-additional-vms=jamvm,cacao,shark", "--with-parallel-jobs=4", "--with-llvm-config=llvm-config-2.7"], workdir="build")) From ahughes at redhat.com Wed Feb 23 05:43:29 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 13:43:29 +0000 Subject: Reviewer needed - allow the package com.sun.awt to be used by Java compiler (but with warning) In-Reply-To: <4D63EABF.9070808@redhat.com> References: <4D63EABF.9070808@redhat.com> Message-ID: <20110223134329.GM24648@rivendell.middle-earth.co.uk> On 17:56 Tue 22 Feb , Pavel Tisnovsky wrote: > Hi all, > > can anybody please review simple patch I'd like to add to IcedTea6 HEAD? > > This patch allows programmers to properly compile applications which use > com.sun.awt.AWTUtilities (one new regression test > com/sun/awt/Translucency/WindowOpacity.java uses this package btw). > > Because this package is not part of standard API, warning should be > printed by Java compiler in following way: > > javac Test.java > Test.java:1: warning: com.sun.awt.AWTUtilities is Sun proprietary API > and may be removed in a future release > import com.sun.awt.AWTUtilities; > ^ > 1 warning > > (Proprietary Oracle JDK 6 prints the same message btw) > > PS: This change is already included in OpenJDK 7. > Is this a backport of an OpenJDK7 changeset? If so, which one? And why does the patch not include a bug ID? > Thank you in advance, > Pavel > --- openjdk-old/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-01-21 00:55:18.000000000 +0100 > +++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-02-22 15:28:53.010912000 +0100 > @@ -24,6 +24,7 @@ > # > > com.sun.accessibility.internal.resources = tiger legacy > +com.sun.awt = tiger legacy > com.sun.beans = tiger legacy > com.sun.corba.se.impl.activation = tiger legacy > com.sun.corba.se.impl.copyobject = tiger legacy > diff -r 9ea6e67710b1 ChangeLog > --- a/ChangeLog Tue Feb 22 15:57:42 2011 +0000 > +++ b/ChangeLog Tue Feb 22 17:15:12 2011 +0100 > @@ -1,3 +1,11 @@ > +2011-02-22 Pavel Tisnovsky > + > + * Makefile.am: > + Added new patch. > + * patches/com-sun-awt.patch > + Patched used for updating file legacy.properties > + containing packages with non-standardized API > + > 2011-02-22 Andrew John Hughes > > PR586: Classes missing from src.zip > diff -r 9ea6e67710b1 Makefile.am > --- a/Makefile.am Tue Feb 22 15:57:42 2011 +0000 > +++ b/Makefile.am Tue Feb 22 17:15:12 2011 +0100 > @@ -326,7 +326,8 @@ > patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ > patches/openjdk/6896068-sg2d.patch \ > patches/pr633-no_javaws_man_page.patch \ > - patches/pr586-include_all_srcs.patch > + patches/pr586-include_all_srcs.patch \ > + patches/com-sun-awt.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r 9ea6e67710b1 patches/com-sun-awt.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/com-sun-awt.patch Tue Feb 22 17:15:12 2011 +0100 > @@ -0,0 +1,10 @@ > +--- openjdk-old/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-01-21 00:55:18.000000000 +0100 > ++++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-02-22 15:28:53.010912000 +0100 > +@@ -24,6 +24,7 @@ > + # > + > + com.sun.accessibility.internal.resources = tiger legacy > ++com.sun.awt = tiger legacy > + com.sun.beans = tiger legacy > + com.sun.corba.se.impl.activation = tiger legacy > + com.sun.corba.se.impl.copyobject = tiger legacy -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From xranby at icedtea.classpath.org Wed Feb 23 05:45:02 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Wed, 23 Feb 2011 13:45:02 +0000 Subject: /hg/buildbot: JamVM: Added quick-jamvm builders Message-ID: changeset f9e38dc5abc3 in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=f9e38dc5abc3 author: Xerxes R?nby date: Wed Feb 23 14:28:09 2011 +0100 JamVM: Added quick-jamvm builders + icedtea6_builder_quick_arm_natty_jamvm + icedtea6_builder_quick_ia32_jaunty_jamvm + icedtea6_builder_quick_armv5tel_squeeze_jamvm diffstat: 1 file changed, 87 insertions(+), 1 deletion(-) icedtea/master.cfg | 88 +++++++++++++++++++++++++++++++++++++++++++++++++++- diffs (159 lines): diff -r ea34c3f2a5b8 -r f9e38dc5abc3 icedtea/master.cfg --- a/icedtea/master.cfg Wed Feb 23 13:36:05 2011 +0100 +++ b/icedtea/master.cfg Wed Feb 23 14:28:09 2011 +0100 @@ -62,12 +62,15 @@ c['schedulers'].append(Scheduler(name="i "icedtea6-squeeze-x86_64-quick-hotspot", "icedtea6-natty-armv7l-quick", "icedtea6-natty-armv7l-quick-cacao", + "icedtea6-natty-armv7l-quick-jamvm", "icedtea6-natty-armv7l-quick-shark", "icedtea6-jaunty-ia32-quick-zero", "icedtea6-jaunty-ia32-quick-cacao", + "icedtea6-jaunty-ia32-quick-jamvm", "icedtea6-jaunty-ia32-quick-shark", "icedtea6-squeeze-armv5tel-quick", "icedtea6-squeeze-armv5tel-quick-cacao", + "icedtea6-squeeze-armv5tel-quick-jamvm", "icedtea6-squeeze-armv5tel-quick-shark"] )) @@ -320,6 +323,28 @@ f3anc.addStep(JTRegCheck(command=["make" description="check-langtools", workdir="build", timeout=2400)) +f3anj = factory.BuildFactory() +f3anj.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3anj.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3anj.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3anj.addStep(Configure(command=["../src/configure", + "--enable-jamvm", + "--disable-bootstrap", + "--with-parallel-jobs=2", + "--disable-docs"], + workdir="build")) +f3anj.addStep(Compile(workdir="build")) +f3anj.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3anj.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + f3ans = factory.BuildFactory() f3ans.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) f3ans.addStep(ShellCommand(command=["./autogen.sh"], @@ -411,6 +436,28 @@ f3jc.addStep(JTRegCheck(command=["make", description="check-langtools", workdir="build", timeout=2400)) +f3jj = factory.BuildFactory() +f3jj.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3jj.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3jj.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3jj.addStep(Configure(command=["../src/configure", + "--enable-jamvm", + "--disable-bootstrap", + "--with-parallel-jobs=2", + "--disable-docs"], + workdir="build")) +f3jj.addStep(Compile(workdir="build")) +f3jj.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3jj.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + f3a5 = factory.BuildFactory() f3a5.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) f3a5.addStep(ShellCommand(command=["./autogen.sh"], @@ -456,6 +503,28 @@ f3a5c.addStep(JTRegCheck(command=["make" description="check-langtools", workdir="build")) +f3a5j = factory.BuildFactory() +f3a5j.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3a5j.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3a5j.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3a5j.addStep(Configure(command=["../src/configure", + "--enable-jamvm", + "--disable-bootstrap", + "--with-parallel-jobs=1", + "--disable-docs"], + workdir="build")) +f3a5j.addStep(Compile(workdir="build")) +f3a5j.addStep(JTRegCheck(command=["make", "check-hotspot"], + description="check-hotspot", + workdir="build")) +f3a5j.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build", timeout=2400)) + f3a5s = factory.BuildFactory() f3a5s.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) f3a5s.addStep(ShellCommand(command=["./autogen.sh"], @@ -496,6 +565,11 @@ icedtea6_builder_quick_arm_natty_cacao = 'slavenames': ["natty-armv7l"], 'builddir': "icedtea6-natty-armv7l-quick-cacao", 'factory': f3anc } +icedtea6_builder_quick_arm_natty_jamvm = { + 'name': "icedtea6-natty-armv7l-quick-jamvm", + 'slavenames': ["natty-armv7l"], + 'builddir': "icedtea6-natty-armv7l-quick-jamvm", + 'factory': f3anj } icedtea6_builder_quick_arm_natty_shark = { 'name': "icedtea6-natty-armv7l-quick-shark", 'slavenames': ["natty-armv7l"], @@ -511,6 +585,11 @@ icedtea6_builder_quick_ia32_jaunty_cacao 'slavenames': ["jaunty-ia32"], 'builddir': "icedtea6-jaunty-ia32-quick-cacao", 'factory': f3jc } +icedtea6_builder_quick_ia32_jaunty_jamvm = { + 'name': "icedtea6-jaunty-ia32-quick-jamvm", + 'slavenames': ["jaunty-ia32"], + 'builddir': "icedtea6-jaunty-ia32-quick-jamvm", + 'factory': f3jj } icedtea6_builder_quick_ia32_jaunty_zero = { 'name': "icedtea6-jaunty-ia32-quick-zero", 'slavenames': ["jaunty-ia32"], @@ -531,7 +610,11 @@ icedtea6_builder_quick_armv5tel_squeeze_ 'slavenames': ["squeeze-armv5tel"], 'builddir': "icedtea6-squeeze-armv5tel-quick-cacao", 'factory': f3a5c } - +icedtea6_builder_quick_armv5tel_squeeze_jamvm = { + 'name': "icedtea6-squeeze-armv5tel-quick-jamvm", + 'slavenames': ["squeeze-armv5tel"], + 'builddir': "icedtea6-squeeze-armv5tel-quick-jamvm", + 'factory': f3a5j } icedtea7_builder_quick = { 'name': "icedtea7-squeeze-x86_64-quick", 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea7-quick", @@ -587,12 +670,15 @@ c['builders'] = [icedtea6_builder_quick, icedtea6_builder_quick_hotspot, icedtea6_builder_quick_arm_natty, icedtea6_builder_quick_arm_natty_cacao, + icedtea6_builder_quick_arm_natty_jamvm, icedtea6_builder_quick_arm_natty_shark, icedtea6_builder_quick_ia32_jaunty_shark, icedtea6_builder_quick_ia32_jaunty_cacao, + icedtea6_builder_quick_ia32_jaunty_jamvm, icedtea6_builder_quick_ia32_jaunty_zero, icedtea6_builder_quick_armv5tel_squeeze, icedtea6_builder_quick_armv5tel_squeeze_cacao, + icedtea6_builder_quick_armv5tel_squeeze_jamvm, icedtea6_builder_quick_armv5tel_squeeze_shark, icedtea7_builder_quick, icedtea7_builder_quick_armv5tel_squeeze, From ahughes at redhat.com Wed Feb 23 05:49:28 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 13:49:28 +0000 Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <1084481687.494697.1298417771161.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <271822205.494689.1298417746377.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <1084481687.494697.1298417771161.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110223134928.GO24648@rivendell.middle-earth.co.uk> On 18:36 Tue 22 Feb , Denis Lila wrote: > Hi. > > I would like to backport these changesets: > http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/dd66920b2d51 > http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/40414219305f > > to 1.7, 1.8, 1.9. > > Ok to push? > > Thank you, > Denis. Approved. > diff -r 6a127ad66978 ChangeLog > --- a/ChangeLog Tue Feb 15 23:04:22 2011 +0000 > +++ b/ChangeLog Tue Feb 22 18:31:28 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-22 Denis Lila > + > + * Makefile.am: Added patches. > + * NEWS: Updated. > + * patches/openjdk/6675802-securityExceptions-applets.patch: > + Get permissions before setting always on top. > + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: > + Remove the fix above. Do nothing if SecurityException is thrown. > + > 2011-02-15 Andrew John Hughes > > * NEWS: Add 1.7.11 section. > diff -r 6a127ad66978 Makefile.am > --- a/Makefile.am Tue Feb 15 23:04:22 2011 +0000 > +++ b/Makefile.am Tue Feb 22 18:31:28 2011 -0500 > @@ -393,7 +393,9 @@ > patches/openjdk/6541476-png-iTXt-chunk.patch \ > patches/openjdk/6782079-png_metadata_oom.patch \ > patches/rh676659-gcc-export-dynamic.patch \ > - patches/latent_jaxp_bug.patch > + patches/latent_jaxp_bug.patch \ > + patches/openjdk/6675802-securityExceptions-applets.patch \ > + patches/openjdk/6691503-malicious-applet-always-on-top.patch > > if WITH_ALT_HSBUILD > ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ > diff -r 6a127ad66978 NEWS > --- a/NEWS Tue Feb 15 23:04:22 2011 +0000 > +++ b/NEWS Tue Feb 22 18:31:28 2011 -0500 > @@ -10,6 +10,10 @@ > > New in release 1.7.11 (20XX-XX-XX): > > +* Backports > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > + > New in release 1.7.10 (2011-02-15): > > * Security updates > diff -r 6a127ad66978 patches/openjdk/6675802-securityExceptions-applets.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Tue Feb 22 18:31:28 2011 -0500 > @@ -0,0 +1,75 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208528462 -14400 > +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +# Parent 147803acf437b81e72e50236030f2bc9ac37caee > +6675802: Regression: heavyweight popups cause SecurityExceptions in applets > +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() > +Reviewed-by: alexp > + > +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -229,7 +229,14 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- setAlwaysOnTop(true); > ++ java.security.AccessController.doPrivileged( > ++ new java.security.PrivilegedAction() { > ++ public Object run() { > ++ setAlwaysOnTop(true); > ++ return null; > ++ } > ++ } > ++ ); > + } > + > + public void update(Graphics g) { > +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -0,0 +1,43 @@ > ++/* > ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > ++ * CA 95054 USA or visit www.sun.com if you need additional information or > ++ * have any questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6675802 > ++ * @summary Checks that there is no AccessControlException when > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6675802 > ++ */ > ++ > ++import javax.swing.*; > ++ > ++public class bug6675802 { > ++ public static void main(String[] args) { > ++ System.setSecurityManager(new SecurityManager()); > ++ final JPopupMenu popupMenu = new JPopupMenu(); > ++ popupMenu.add(new JMenuItem("Click")); > ++ popupMenu.show(null, 0, 0); > ++ System.out.println("Test passed"); > ++ } > ++} > diff -r 6a127ad66978 patches/openjdk/6691503-malicious-applet-always-on-top.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Tue Feb 22 18:31:28 2011 -0500 > @@ -0,0 +1,153 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208959594 -14400 > +# Node ID 40414219305f6b38ac156fdedd5528923ba9aada > +# Parent dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +6691503: Malicious applet can show always-on-top popup menu which has whole screen size > +Summary: The fix for 6675802 is replaced by a try-catch clause that catches SequrityExceptions for applets. > +Reviewed-by: alexp > + > +diff -r dd66920b2d51 -r 40414219305f src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Apr 23 18:06:34 2008 +0400 > +@@ -229,14 +229,15 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- java.security.AccessController.doPrivileged( > +- new java.security.PrivilegedAction() { > +- public Object run() { > +- setAlwaysOnTop(true); > +- return null; > +- } > +- } > +- ); > ++ // Try to set "always-on-top" for the popup window. > ++ // Applets usually don't have sufficient permissions to do it. > ++ // In this case simply ignore the exception. > ++ try { > ++ setAlwaysOnTop(true); > ++ } catch (SecurityException se) { > ++ // setAlwaysOnTop is restricted, > ++ // the exception is ignored > ++ } > + } > + > + public void update(Graphics g) { > +diff -r dd66920b2d51 -r 40414219305f test/javax/swing/JPopupMenu/6691503/bug6691503.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Apr 23 18:06:34 2008 +0400 > +@@ -0,0 +1,113 @@ > ++/* > ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > ++ * CA 95054 USA or visit www.sun.com if you need additional information or > ++ * have any questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6691503 > ++ * @summary Checks that there is no opportunity for a malicious applet > ++ * to show a popup menu which has whole screen size. > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6691503 > ++ */ > ++ > ++import sun.awt.SunToolkit; > ++ > ++import javax.swing.*; > ++import java.awt.*; > ++ > ++public class bug6691503 { > ++ private JPopupMenu popupMenu; > ++ private JFrame frame; > ++ private boolean isAlwaysOnTop1 = false; > ++ private boolean isAlwaysOnTop2 = true; > ++ > ++ public static void main(String[] args) { > ++ bug6691503 test = new bug6691503(); > ++ test.setupUI(); > ++ test.testApplication(); > ++ test.testApplet(); > ++ test.checkResult(); > ++ test.stopEDT(); > ++ } > ++ > ++ private void setupUI() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame = new JFrame(); > ++ frame.setVisible(true); > ++ popupMenu = new JPopupMenu(); > ++ JMenuItem click = new JMenuItem("Click"); > ++ popupMenu.add(click); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplication() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplet() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ System.setSecurityManager(new SecurityManager()); > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void checkResult() { > ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); > ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { > ++ throw new RuntimeException("Malicious applet can show always-on-top " + > ++ "popup menu which has whole screen size"); > ++ } > ++ System.out.println("Test passed"); > ++ } > ++ > ++ private void stopEDT() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame.dispose(); > ++ } > ++ }); > ++ } > ++} > ++ > ++ > diff -r 7fbd2259a4c1 ChangeLog > --- a/ChangeLog Thu Dec 16 19:37:17 2010 +0000 > +++ b/ChangeLog Tue Feb 22 18:32:26 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-22 Denis Lila > + > + * Makefile.am: Added patches. > + * NEWS: Updated. > + * patches/openjdk/6675802-securityExceptions-applets.patch: > + Get permissions before setting always on top. > + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: > + Remove the fix above. Do nothing if SecurityException is thrown. > + > 2010-12-16 Andrew John Hughes > > * NEWS: Fix issue placement. > diff -r 7fbd2259a4c1 Makefile.am > --- a/Makefile.am Thu Dec 16 19:37:17 2010 +0000 > +++ b/Makefile.am Tue Feb 22 18:32:26 2011 -0500 > @@ -360,7 +360,9 @@ > patches/openjdk/6438179-systray_check.patch \ > patches/openjdk/4356282-opentype.patch \ > patches/openjdk/6954424-opentype_javadoc.patch \ > - patches/openjdk/6795356-proxylazyvalue-leak.patch > + patches/openjdk/6795356-proxylazyvalue-leak.patch \ > + patches/openjdk/6675802-securityExceptions-applets.patch \ > + patches/openjdk/6691503-malicious-applet-always-on-top.patch > > if WITH_ALT_HSBUILD > ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ > diff -r 7fbd2259a4c1 NEWS > --- a/NEWS Thu Dec 16 19:37:17 2010 +0000 > +++ b/NEWS Tue Feb 22 18:32:26 2011 -0500 > @@ -18,6 +18,8 @@ > - S6967433: dashed lines broken when using scaling transforms. > - S6976265: No STROKE_CONTROL > - S6967434, PR450, RH530642: Round joins/caps of scaled up lines have poor quality. > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > * Fixes: > - S7003777, RH647674: JTextPane produces incorrect content after parsing the html text > > diff -r 7fbd2259a4c1 patches/openjdk/6675802-securityExceptions-applets.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Tue Feb 22 18:32:26 2011 -0500 > @@ -0,0 +1,75 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208528462 -14400 > +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +# Parent 147803acf437b81e72e50236030f2bc9ac37caee > +6675802: Regression: heavyweight popups cause SecurityExceptions in applets > +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() > +Reviewed-by: alexp > + > +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -229,7 +229,14 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- setAlwaysOnTop(true); > ++ java.security.AccessController.doPrivileged( > ++ new java.security.PrivilegedAction() { > ++ public Object run() { > ++ setAlwaysOnTop(true); > ++ return null; > ++ } > ++ } > ++ ); > + } > + > + public void update(Graphics g) { > +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -0,0 +1,43 @@ > ++/* > ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > ++ * CA 95054 USA or visit www.sun.com if you need additional information or > ++ * have any questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6675802 > ++ * @summary Checks that there is no AccessControlException when > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6675802 > ++ */ > ++ > ++import javax.swing.*; > ++ > ++public class bug6675802 { > ++ public static void main(String[] args) { > ++ System.setSecurityManager(new SecurityManager()); > ++ final JPopupMenu popupMenu = new JPopupMenu(); > ++ popupMenu.add(new JMenuItem("Click")); > ++ popupMenu.show(null, 0, 0); > ++ System.out.println("Test passed"); > ++ } > ++} > diff -r 7fbd2259a4c1 patches/openjdk/6691503-malicious-applet-always-on-top.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Tue Feb 22 18:32:26 2011 -0500 > @@ -0,0 +1,153 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208959594 -14400 > +# Node ID 40414219305f6b38ac156fdedd5528923ba9aada > +# Parent dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +6691503: Malicious applet can show always-on-top popup menu which has whole screen size > +Summary: The fix for 6675802 is replaced by a try-catch clause that catches SequrityExceptions for applets. > +Reviewed-by: alexp > + > +diff -r dd66920b2d51 -r 40414219305f src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Apr 23 18:06:34 2008 +0400 > +@@ -229,14 +229,15 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- java.security.AccessController.doPrivileged( > +- new java.security.PrivilegedAction() { > +- public Object run() { > +- setAlwaysOnTop(true); > +- return null; > +- } > +- } > +- ); > ++ // Try to set "always-on-top" for the popup window. > ++ // Applets usually don't have sufficient permissions to do it. > ++ // In this case simply ignore the exception. > ++ try { > ++ setAlwaysOnTop(true); > ++ } catch (SecurityException se) { > ++ // setAlwaysOnTop is restricted, > ++ // the exception is ignored > ++ } > + } > + > + public void update(Graphics g) { > +diff -r dd66920b2d51 -r 40414219305f test/javax/swing/JPopupMenu/6691503/bug6691503.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Apr 23 18:06:34 2008 +0400 > +@@ -0,0 +1,113 @@ > ++/* > ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > ++ * CA 95054 USA or visit www.sun.com if you need additional information or > ++ * have any questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6691503 > ++ * @summary Checks that there is no opportunity for a malicious applet > ++ * to show a popup menu which has whole screen size. > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6691503 > ++ */ > ++ > ++import sun.awt.SunToolkit; > ++ > ++import javax.swing.*; > ++import java.awt.*; > ++ > ++public class bug6691503 { > ++ private JPopupMenu popupMenu; > ++ private JFrame frame; > ++ private boolean isAlwaysOnTop1 = false; > ++ private boolean isAlwaysOnTop2 = true; > ++ > ++ public static void main(String[] args) { > ++ bug6691503 test = new bug6691503(); > ++ test.setupUI(); > ++ test.testApplication(); > ++ test.testApplet(); > ++ test.checkResult(); > ++ test.stopEDT(); > ++ } > ++ > ++ private void setupUI() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame = new JFrame(); > ++ frame.setVisible(true); > ++ popupMenu = new JPopupMenu(); > ++ JMenuItem click = new JMenuItem("Click"); > ++ popupMenu.add(click); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplication() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplet() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ System.setSecurityManager(new SecurityManager()); > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void checkResult() { > ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); > ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { > ++ throw new RuntimeException("Malicious applet can show always-on-top " + > ++ "popup menu which has whole screen size"); > ++ } > ++ System.out.println("Test passed"); > ++ } > ++ > ++ private void stopEDT() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame.dispose(); > ++ } > ++ }); > ++ } > ++} > ++ > ++ > diff -r 5af2053661b9 ChangeLog > --- a/ChangeLog Thu Dec 16 19:31:39 2010 +0000 > +++ b/ChangeLog Tue Feb 22 18:36:50 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-22 Denis Lila > + > + * Makefile.am: Added patches. > + * NEWS: Updated. > + * patches/openjdk/6675802-securityExceptions-applets.patch: > + Get permissions before setting always on top. > + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: > + Remove the fix above. Do nothing if SecurityException is thrown. > + > 2010-12-16 Andrew John Hughes > > * NEWS: Place RH647674 under correct section. > diff -r 5af2053661b9 Makefile.am > --- a/Makefile.am Thu Dec 16 19:31:39 2010 +0000 > +++ b/Makefile.am Tue Feb 22 18:36:50 2011 -0500 > @@ -323,7 +323,9 @@ > patches/openjdk/6438179-systray_check.patch \ > patches/openjdk/4356282-opentype.patch \ > patches/openjdk/6954424-opentype_javadoc.patch \ > - patches/openjdk/6795356-proxylazyvalue-leak.patch > + patches/openjdk/6795356-proxylazyvalue-leak.patch \ > + patches/openjdk/6675802-securityExceptions-applets.patch \ > + patches/openjdk/6691503-malicious-applet-always-on-top.patch > > if WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r 5af2053661b9 NEWS > --- a/NEWS Thu Dec 16 19:31:39 2010 +0000 > +++ b/NEWS Tue Feb 22 18:36:50 2011 -0500 > @@ -19,6 +19,8 @@ > - S6976265: No STROKE_CONTROL > - S6967434, PR450, RH530642: Round joins/caps of scaled up lines have poor quality. > - S6438179, RH569121: XToolkit.isTraySupported() result has nothing to do with the system tray > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > * Fixes > - S7003777, RH647674: JTextPane produces incorrect content after parsing the html text > > diff -r 5af2053661b9 patches/openjdk/6675802-securityExceptions-applets.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Tue Feb 22 18:36:50 2011 -0500 > @@ -0,0 +1,75 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208528462 -14400 > +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +# Parent 147803acf437b81e72e50236030f2bc9ac37caee > +6675802: Regression: heavyweight popups cause SecurityExceptions in applets > +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() > +Reviewed-by: alexp > + > +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -229,7 +229,14 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- setAlwaysOnTop(true); > ++ java.security.AccessController.doPrivileged( > ++ new java.security.PrivilegedAction() { > ++ public Object run() { > ++ setAlwaysOnTop(true); > ++ return null; > ++ } > ++ } > ++ ); > + } > + > + public void update(Graphics g) { > +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -0,0 +1,43 @@ > ++/* > ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > ++ * CA 95054 USA or visit www.sun.com if you need additional information or > ++ * have any questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6675802 > ++ * @summary Checks that there is no AccessControlException when > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6675802 > ++ */ > ++ > ++import javax.swing.*; > ++ > ++public class bug6675802 { > ++ public static void main(String[] args) { > ++ System.setSecurityManager(new SecurityManager()); > ++ final JPopupMenu popupMenu = new JPopupMenu(); > ++ popupMenu.add(new JMenuItem("Click")); > ++ popupMenu.show(null, 0, 0); > ++ System.out.println("Test passed"); > ++ } > ++} > diff -r 5af2053661b9 patches/openjdk/6691503-malicious-applet-always-on-top.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Tue Feb 22 18:36:50 2011 -0500 > @@ -0,0 +1,153 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208959594 -14400 > +# Node ID 40414219305f6b38ac156fdedd5528923ba9aada > +# Parent dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +6691503: Malicious applet can show always-on-top popup menu which has whole screen size > +Summary: The fix for 6675802 is replaced by a try-catch clause that catches SequrityExceptions for applets. > +Reviewed-by: alexp > + > +diff -r dd66920b2d51 -r 40414219305f src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Apr 23 18:06:34 2008 +0400 > +@@ -229,14 +229,15 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- java.security.AccessController.doPrivileged( > +- new java.security.PrivilegedAction() { > +- public Object run() { > +- setAlwaysOnTop(true); > +- return null; > +- } > +- } > +- ); > ++ // Try to set "always-on-top" for the popup window. > ++ // Applets usually don't have sufficient permissions to do it. > ++ // In this case simply ignore the exception. > ++ try { > ++ setAlwaysOnTop(true); > ++ } catch (SecurityException se) { > ++ // setAlwaysOnTop is restricted, > ++ // the exception is ignored > ++ } > + } > + > + public void update(Graphics g) { > +diff -r dd66920b2d51 -r 40414219305f test/javax/swing/JPopupMenu/6691503/bug6691503.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Apr 23 18:06:34 2008 +0400 > +@@ -0,0 +1,113 @@ > ++/* > ++ * Copyright 2008 Sun Microsystems, Inc. All Rights Reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > ++ * CA 95054 USA or visit www.sun.com if you need additional information or > ++ * have any questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6691503 > ++ * @summary Checks that there is no opportunity for a malicious applet > ++ * to show a popup menu which has whole screen size. > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6691503 > ++ */ > ++ > ++import sun.awt.SunToolkit; > ++ > ++import javax.swing.*; > ++import java.awt.*; > ++ > ++public class bug6691503 { > ++ private JPopupMenu popupMenu; > ++ private JFrame frame; > ++ private boolean isAlwaysOnTop1 = false; > ++ private boolean isAlwaysOnTop2 = true; > ++ > ++ public static void main(String[] args) { > ++ bug6691503 test = new bug6691503(); > ++ test.setupUI(); > ++ test.testApplication(); > ++ test.testApplet(); > ++ test.checkResult(); > ++ test.stopEDT(); > ++ } > ++ > ++ private void setupUI() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame = new JFrame(); > ++ frame.setVisible(true); > ++ popupMenu = new JPopupMenu(); > ++ JMenuItem click = new JMenuItem("Click"); > ++ popupMenu.add(click); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplication() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplet() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ System.setSecurityManager(new SecurityManager()); > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void checkResult() { > ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); > ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { > ++ throw new RuntimeException("Malicious applet can show always-on-top " + > ++ "popup menu which has whole screen size"); > ++ } > ++ System.out.println("Test passed"); > ++ } > ++ > ++ private void stopEDT() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame.dispose(); > ++ } > ++ }); > ++ } > ++} > ++ > ++ -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Wed Feb 23 05:53:39 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 13:53:39 +0000 Subject: java2d backports In-Reply-To: <1421091141.494979.1298419730219.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <854171889.494945.1298419371722.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <1421091141.494979.1298419730219.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110223135339.GP24648@rivendell.middle-earth.co.uk> On 19:08 Tue 22 Feb , Denis Lila wrote: > Hi. > > I would like to backport these changesets to head: > http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4d6f9aaa2600 > http://hg.openjdk.java.net/jdk7/2d-gate/jdk/rev/4d6f9aaa2600 > I think you need another URL there ;-) > They will give us huge performance improvements to the drawing > of simple shapes (and I'll finally be able to decisively close > RH540575 ;-) > > I've had to make some manual modifications to the output of > hg export (like removing CRLF line endings and removing hunks > that change generated files) but they apply mostly cleanly > and everything builds and works properly. > > Ok to push? > > Thank you, > Denis. Fine by me. We spoke about these a while back IIRC. > diff -r e1a5ab4cf428 ChangeLog > --- a/ChangeLog Tue Feb 22 23:07:58 2011 +0000 > +++ b/ChangeLog Tue Feb 22 19:04:38 2011 -0500 > @@ -1,3 +1,10 @@ > +2011-02-22 Denis Lila > + > + * Makefile.am: Added 2 patches. > + * NEWS: Updated. > + * patches/openjdk/6775317-non-AA-simple-shape-performance.patch > + * patches/openjdk/6766342-AA-simple-shape-performance.patch > + > 2011-02-22 Andrew John Hughes > > * patches/sunsrc.patch: Removed. > diff -r e1a5ab4cf428 Makefile.am > --- a/Makefile.am Tue Feb 22 23:07:58 2011 +0000 > +++ b/Makefile.am Tue Feb 22 19:04:38 2011 -0500 > @@ -325,7 +325,9 @@ > patches/openjdk/6749060-bad-lcd-aa-non-opaque-dest.patch \ > patches/openjdk/6896068-sg2d.patch \ > patches/pr633-no_javaws_man_page.patch \ > - patches/pr586-include_all_srcs.patch > + patches/pr586-include_all_srcs.patch \ > + patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ > + patches/openjdk/6766342-AA-simple-shape-performance.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r e1a5ab4cf428 NEWS > --- a/NEWS Tue Feb 22 23:07:58 2011 +0000 > +++ b/NEWS Tue Feb 22 19:04:38 2011 -0500 > @@ -425,6 +425,8 @@ > - S6779717: A Window does not show applet security warning icon on X platforms > - S6785058: Parent don't get the focus after dialog is closed if security warning is applied > - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails > + - S6775317: Improve performance of non-AA transformed rectangles and single wide lines in software pipelines > + - S6766342: Improve performance of Ductus rasterizer > * Bug fixes > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > - PR600: HS19 upgrade broke CACAO build on ARM > diff -r e1a5ab4cf428 patches/openjdk/6766342-AA-simple-shape-performance.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6766342-AA-simple-shape-performance.patch Tue Feb 22 19:04:38 2011 -0500 > @@ -0,0 +1,3819 @@ > +# HG changeset patch > +# User flar > +# Date 1292361929 28800 > +# Node ID 4d6f9aaa2600eec36725ab7cd47cb4b652755723 > +# Parent 0eeac8ca33e329aab7a9ad0fcfb3a321cd1abd06 > +6766342: Improve performance of Ductus rasterizer > +Reviewed-by: jgodinez, prr > + > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 make/sun/awt/mapfile-vers > +--- openjdk.orig/jdk/make/sun/awt/mapfile-vers Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/mapfile-vers Tue Dec 14 13:25:29 2010 -0800 > +@@ -118,6 +118,8 @@ > + Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; > + Java_sun_java2d_loops_MaskBlit_MaskBlit; > + Java_sun_java2d_loops_MaskFill_MaskFill; > ++ Java_sun_java2d_loops_MaskFill_FillAAPgram; > ++ Java_sun_java2d_loops_MaskFill_DrawAAPgram; > + Java_sun_java2d_loops_TransformHelper_Transform; > + Java_sun_java2d_pipe_Region_initIDs; > + Java_sun_java2d_pipe_SpanClipRenderer_initIDs; > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 make/sun/awt/mapfile-vers-linux > +--- openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/mapfile-vers-linux Tue Dec 14 13:25:29 2010 -0800 > +@@ -115,6 +115,8 @@ > + Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; > + Java_sun_java2d_loops_MaskBlit_MaskBlit; > + Java_sun_java2d_loops_MaskFill_MaskFill; > ++ Java_sun_java2d_loops_MaskFill_FillAAPgram; > ++ Java_sun_java2d_loops_MaskFill_DrawAAPgram; > + Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans; > + Java_sun_java2d_pipe_SpanClipRenderer_initIDs; > + sun_awt_image_GifImageDecoder_initIDs; > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/dc/DuctusRenderingEngine.java > +--- openjdk.orig/jdk/src/share/classes/sun/dc/DuctusRenderingEngine.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/dc/DuctusRenderingEngine.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -635,6 +635,88 @@ > + return r; > + } > + > ++ /** > ++ * {@inheritDoc} > ++ */ > ++ @Override > ++ public AATileGenerator getAATileGenerator(double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2, > ++ Region clip, > ++ int bbox[]) > ++ { > ++ // REMIND: Deal with large coordinates! > ++ double ldx1, ldy1, ldx2, ldy2; > ++ boolean innerpgram = (lw1 > 0 && lw2 > 0); > ++ > ++ if (innerpgram) { > ++ ldx1 = dx1 * lw1; > ++ ldy1 = dy1 * lw1; > ++ ldx2 = dx2 * lw2; > ++ ldy2 = dy2 * lw2; > ++ x -= (ldx1 + ldx2) / 2.0; > ++ y -= (ldy1 + ldy2) / 2.0; > ++ dx1 += ldx1; > ++ dy1 += ldy1; > ++ dx2 += ldx2; > ++ dy2 += ldy2; > ++ if (lw1 > 1 && lw2 > 1) { > ++ // Inner parallelogram was entirely consumed by stroke... > ++ innerpgram = false; > ++ } > ++ } else { > ++ ldx1 = ldy1 = ldx2 = ldy2 = 0; > ++ } > ++ > ++ Rasterizer r = getRasterizer(); > ++ > ++ r.setUsage(Rasterizer.EOFILL); > ++ > ++ r.beginPath(); > ++ r.beginSubpath((float) x, (float) y); > ++ r.appendLine((float) (x+dx1), (float) (y+dy1)); > ++ r.appendLine((float) (x+dx1+dx2), (float) (y+dy1+dy2)); > ++ r.appendLine((float) (x+dx2), (float) (y+dy2)); > ++ r.closedSubpath(); > ++ if (innerpgram) { > ++ x += ldx1 + ldx2; > ++ y += ldy1 + ldy2; > ++ dx1 -= 2.0 * ldx1; > ++ dy1 -= 2.0 * ldy1; > ++ dx2 -= 2.0 * ldx2; > ++ dy2 -= 2.0 * ldy2; > ++ r.beginSubpath((float) x, (float) y); > ++ r.appendLine((float) (x+dx1), (float) (y+dy1)); > ++ r.appendLine((float) (x+dx1+dx2), (float) (y+dy1+dy2)); > ++ r.appendLine((float) (x+dx2), (float) (y+dy2)); > ++ r.closedSubpath(); > ++ } > ++ > ++ try { > ++ r.endPath(); > ++ r.getAlphaBox(bbox); > ++ clip.clipBoxToBounds(bbox); > ++ if (bbox[0] >= bbox[2] || bbox[1] >= bbox[3]) { > ++ dropRasterizer(r); > ++ return null; > ++ } > ++ r.setOutputArea(bbox[0], bbox[1], > ++ bbox[2] - bbox[0], > ++ bbox[3] - bbox[1]); > ++ } catch (PRException e) { > ++ /* > ++ * This exeption is thrown from the native part of the Ductus > ++ * (only in case of a debug build) to indicate that some > ++ * segments of the path have very large coordinates. > ++ * See 4485298 for more info. > ++ */ > ++ System.err.println("DuctusRenderingEngine.getAATileGenerator: "+e); > ++ } > ++ > ++ return r; > ++ } > ++ > + private void feedConsumer(PathConsumer consumer, PathIterator pi) { > + try { > + consumer.beginPath(); > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/SurfaceData.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/SurfaceData.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/SurfaceData.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -367,16 +367,17 @@ > + public static final TextPipe aaTextRenderer; > + public static final TextPipe lcdTextRenderer; > + > +- protected static final CompositePipe colorPipe; > ++ protected static final AlphaColorPipe colorPipe; > + protected static final PixelToShapeConverter colorViaShape; > + protected static final PixelToParallelogramConverter colorViaPgram; > + protected static final TextPipe colorText; > + protected static final CompositePipe clipColorPipe; > + protected static final TextPipe clipColorText; > + protected static final AAShapePipe AAColorShape; > +- protected static final PixelToShapeConverter AAColorViaShape; > ++ protected static final PixelToParallelogramConverter AAColorViaShape; > ++ protected static final PixelToParallelogramConverter AAColorViaPgram; > + protected static final AAShapePipe AAClipColorShape; > +- protected static final PixelToShapeConverter AAClipColorViaShape; > ++ protected static final PixelToParallelogramConverter AAClipColorViaShape; > + > + protected static final CompositePipe paintPipe; > + protected static final SpanShapeRenderer paintShape; > +@@ -385,9 +386,9 @@ > + protected static final CompositePipe clipPaintPipe; > + protected static final TextPipe clipPaintText; > + protected static final AAShapePipe AAPaintShape; > +- protected static final PixelToShapeConverter AAPaintViaShape; > ++ protected static final PixelToParallelogramConverter AAPaintViaShape; > + protected static final AAShapePipe AAClipPaintShape; > +- protected static final PixelToShapeConverter AAClipPaintViaShape; > ++ protected static final PixelToParallelogramConverter AAClipPaintViaShape; > + > + protected static final CompositePipe compPipe; > + protected static final SpanShapeRenderer compShape; > +@@ -396,9 +397,9 @@ > + protected static final CompositePipe clipCompPipe; > + protected static final TextPipe clipCompText; > + protected static final AAShapePipe AACompShape; > +- protected static final PixelToShapeConverter AACompViaShape; > ++ protected static final PixelToParallelogramConverter AACompViaShape; > + protected static final AAShapePipe AAClipCompShape; > +- protected static final PixelToShapeConverter AAClipCompViaShape; > ++ protected static final PixelToParallelogramConverter AAClipCompViaShape; > + > + protected static final DrawImagePipe imagepipe; > + > +@@ -427,6 +428,22 @@ > + } > + } > + > ++ private static PixelToParallelogramConverter > ++ makeConverter(AAShapePipe renderer, > ++ ParallelogramPipe pgrampipe) > ++ { > ++ return new PixelToParallelogramConverter(renderer, > ++ pgrampipe, > ++ 1.0/8.0, 0.499, > ++ false); > ++ } > ++ > ++ private static PixelToParallelogramConverter > ++ makeConverter(AAShapePipe renderer) > ++ { > ++ return makeConverter(renderer, renderer); > ++ } > ++ > + static { > + colorPrimitives = new LoopPipe(); > + > +@@ -445,9 +462,10 @@ > + clipColorPipe = new SpanClipRenderer(colorPipe); > + clipColorText = new TextRenderer(clipColorPipe); > + AAColorShape = new AAShapePipe(colorPipe); > +- AAColorViaShape = new PixelToShapeConverter(AAColorShape); > ++ AAColorViaShape = makeConverter(AAColorShape); > ++ AAColorViaPgram = makeConverter(AAColorShape, colorPipe); > + AAClipColorShape = new AAShapePipe(clipColorPipe); > +- AAClipColorViaShape = new PixelToShapeConverter(AAClipColorShape); > ++ AAClipColorViaShape = makeConverter(AAClipColorShape); > + > + paintPipe = new AlphaPaintPipe(); > + paintShape = new SpanShapeRenderer.Composite(paintPipe); > +@@ -456,9 +474,9 @@ > + clipPaintPipe = new SpanClipRenderer(paintPipe); > + clipPaintText = new TextRenderer(clipPaintPipe); > + AAPaintShape = new AAShapePipe(paintPipe); > +- AAPaintViaShape = new PixelToShapeConverter(AAPaintShape); > ++ AAPaintViaShape = makeConverter(AAPaintShape); > + AAClipPaintShape = new AAShapePipe(clipPaintPipe); > +- AAClipPaintViaShape = new PixelToShapeConverter(AAClipPaintShape); > ++ AAClipPaintViaShape = makeConverter(AAClipPaintShape); > + > + compPipe = new GeneralCompositePipe(); > + compShape = new SpanShapeRenderer.Composite(compPipe); > +@@ -467,9 +485,9 @@ > + clipCompPipe = new SpanClipRenderer(compPipe); > + clipCompText = new TextRenderer(clipCompPipe); > + AACompShape = new AAShapePipe(compPipe); > +- AACompViaShape = new PixelToShapeConverter(AACompShape); > ++ AACompViaShape = makeConverter(AACompShape); > + AAClipCompShape = new AAShapePipe(clipCompPipe); > +- AAClipCompViaShape = new PixelToShapeConverter(AAClipCompShape); > ++ AAClipCompViaShape = makeConverter(AAClipCompShape); > + > + imagepipe = new DrawImage(); > + } > +@@ -591,12 +609,12 @@ > + if (sg2d.clipState == sg2d.CLIP_SHAPE) { > + sg2d.drawpipe = AAClipCompViaShape; > + sg2d.fillpipe = AAClipCompViaShape; > +- sg2d.shapepipe = AAClipCompShape; > ++ sg2d.shapepipe = AAClipCompViaShape; > + sg2d.textpipe = clipCompText; > + } else { > + sg2d.drawpipe = AACompViaShape; > + sg2d.fillpipe = AACompViaShape; > +- sg2d.shapepipe = AACompShape; > ++ sg2d.shapepipe = AACompViaShape; > + sg2d.textpipe = compText; > + } > + } else { > +@@ -616,12 +634,16 @@ > + if (sg2d.clipState == sg2d.CLIP_SHAPE) { > + sg2d.drawpipe = AAClipColorViaShape; > + sg2d.fillpipe = AAClipColorViaShape; > +- sg2d.shapepipe = AAClipColorShape; > ++ sg2d.shapepipe = AAClipColorViaShape; > + sg2d.textpipe = clipColorText; > + } else { > +- sg2d.drawpipe = AAColorViaShape; > +- sg2d.fillpipe = AAColorViaShape; > +- sg2d.shapepipe = AAColorShape; > ++ PixelToParallelogramConverter converter = > ++ (sg2d.alphafill.canDoParallelograms() > ++ ? AAColorViaPgram > ++ : AAColorViaShape); > ++ sg2d.drawpipe = converter; > ++ sg2d.fillpipe = converter; > ++ sg2d.shapepipe = converter; > + if (sg2d.paintState > sg2d.PAINT_OPAQUECOLOR || > + sg2d.compositeState > sg2d.COMP_ISCOPY) > + { > +@@ -634,12 +656,12 @@ > + if (sg2d.clipState == sg2d.CLIP_SHAPE) { > + sg2d.drawpipe = AAClipPaintViaShape; > + sg2d.fillpipe = AAClipPaintViaShape; > +- sg2d.shapepipe = AAClipPaintShape; > ++ sg2d.shapepipe = AAClipPaintViaShape; > + sg2d.textpipe = clipPaintText; > + } else { > + sg2d.drawpipe = AAPaintViaShape; > + sg2d.fillpipe = AAPaintViaShape; > +- sg2d.shapepipe = AAPaintShape; > ++ sg2d.shapepipe = AAPaintViaShape; > + sg2d.textpipe = paintText; > + } > + } > +@@ -793,6 +815,18 @@ > + } > + } > + > ++ private static CompositeType getFillCompositeType(SunGraphics2D sg2d) { > ++ CompositeType compType = sg2d.imageComp; > ++ if (sg2d.compositeState == sg2d.COMP_ISCOPY) { > ++ if (compType == CompositeType.SrcOverNoEa) { > ++ compType = CompositeType.OpaqueSrcOverNoEa; > ++ } else { > ++ compType = CompositeType.SrcNoEa; > ++ } > ++ } > ++ return compType; > ++ } > ++ > + /** > + * Returns a MaskFill object that can be used on this destination > + * with the source (paint) and composite types determined by the given > +@@ -802,9 +836,10 @@ > + * surface) before returning a specific MaskFill object. > + */ > + protected MaskFill getMaskFill(SunGraphics2D sg2d) { > +- return MaskFill.getFromCache(getPaintSurfaceType(sg2d), > +- sg2d.imageComp, > +- getSurfaceType()); > ++ SurfaceType src = getPaintSurfaceType(sg2d); > ++ CompositeType comp = getFillCompositeType(sg2d); > ++ SurfaceType dst = getSurfaceType(); > ++ return MaskFill.getFromCache(src, comp, dst); > + } > + > + private static RenderCache loopcache = new RenderCache(30); > +@@ -816,9 +851,7 @@ > + */ > + public RenderLoops getRenderLoops(SunGraphics2D sg2d) { > + SurfaceType src = getPaintSurfaceType(sg2d); > +- CompositeType comp = (sg2d.compositeState == sg2d.COMP_ISCOPY > +- ? CompositeType.SrcNoEa > +- : sg2d.imageComp); > ++ CompositeType comp = getFillCompositeType(sg2d); > + SurfaceType dst = sg2d.getSurfaceData().getSurfaceType(); > + > + Object o = loopcache.get(src, comp, dst); > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/loops/CompositeType.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/loops/CompositeType.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/loops/CompositeType.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -27,6 +27,7 @@ > + > + import java.awt.image.BufferedImage; > + import java.awt.AlphaComposite; > ++import java.util.HashMap; > + > + /** > + * A CompositeType object provides a chained description of a type of > +@@ -51,6 +52,11 @@ > + * the indicated algorithm if all of the more specific searches fail. > + */ > + public final class CompositeType { > ++ > ++ private static int unusedUID = 1; > ++ private static final HashMap compositeUIDMap = > ++ new HashMap(100); > ++ > + /* > + * CONSTANTS USED BY ALL PRIMITIVES TO DESCRIBE THE COMPOSITING > + * ALGORITHMS THEY CAN PERFORM > +@@ -153,6 +159,22 @@ > + SrcOverNoEa = SrcOver.deriveSubType(DESC_SRC_OVER_NO_EA); > + > + /* > ++ * A special CompositeType for the case where we are filling in > ++ * SrcOverNoEa mode with an opaque color. In that case then the > ++ * best loop for us to use would be a SrcNoEa loop, but what if > ++ * there is no such loop? In that case then we would end up > ++ * backing off to a Src loop (which should still be fine) or an > ++ * AnyAlpha loop which would be slower than a SrcOver loop in > ++ * most cases. > ++ * The fix is to use the following chain which looks for loops > ++ * in the following order: > ++ * SrcNoEa, Src, SrcOverNoEa, SrcOver, AnyAlpha > ++ */ > ++ public static final CompositeType > ++ OpaqueSrcOverNoEa = SrcOverNoEa.deriveSubType(DESC_SRC) > ++ .deriveSubType(DESC_SRC_NO_EA); > ++ > ++ /* > + * END OF CompositeType OBJECTS FOR THE VARIOUS CONSTANTS > + */ > + > +@@ -210,7 +232,6 @@ > + } > + } > + > +- private static int unusedUID = 1; > + private int uniqueID; > + private String desc; > + private CompositeType next; > +@@ -218,14 +239,20 @@ > + private CompositeType(CompositeType parent, String desc) { > + next = parent; > + this.desc = desc; > +- this.uniqueID = makeUniqueID(); > ++ this.uniqueID = makeUniqueID(desc); > + } > + > +- private synchronized static final int makeUniqueID() { > +- if (unusedUID > 255) { > +- throw new InternalError("composite type id overflow"); > ++ public synchronized static final int makeUniqueID(String desc) { > ++ Integer i = compositeUIDMap.get(desc); > ++ > ++ if (i == null) { > ++ if (unusedUID > 255) { > ++ throw new InternalError("composite type id overflow"); > ++ } > ++ i = unusedUID++; > ++ compositeUIDMap.put(desc, i); > + } > +- return unusedUID++; > ++ return i; > + } > + > + public int getUniqueID() { > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/loops/MaskFill.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/loops/MaskFill.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/loops/MaskFill.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -50,6 +50,10 @@ > + public class MaskFill extends GraphicsPrimitive > + { > + public static final String methodSignature = "MaskFill(...)".toString(); > ++ public static final String fillPgramSignature = > ++ "FillAAPgram(...)".toString(); > ++ public static final String drawPgramSignature = > ++ "DrawAAPgram(...)".toString(); > + > + public static final int primTypeID = makePrimTypeID(); > + > +@@ -92,6 +96,14 @@ > + return fill; > + } > + > ++ protected MaskFill(String alternateSignature, > ++ SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ super(alternateSignature, primTypeID, srctype, comptype, dsttype); > ++ } > ++ > + protected MaskFill(SurfaceType srctype, > + CompositeType comptype, > + SurfaceType dsttype) > +@@ -115,6 +127,23 @@ > + int x, int y, int w, int h, > + byte[] mask, int maskoff, int maskscan); > + > ++ public native void FillAAPgram(SunGraphics2D sg2d, SurfaceData sData, > ++ Composite comp, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2); > ++ > ++ public native void DrawAAPgram(SunGraphics2D sg2d, SurfaceData sData, > ++ Composite comp, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2); > ++ > ++ public boolean canDoParallelograms() { > ++ return (getNativePrim() != 0); > ++ } > ++ > + static { > + GraphicsPrimitiveMgr.registerGeneral(new MaskFill(null, null, null)); > + } > +@@ -182,12 +211,22 @@ > + > + private static class TraceMaskFill extends MaskFill { > + MaskFill target; > ++ MaskFill fillPgramTarget; > ++ MaskFill drawPgramTarget; > + > + public TraceMaskFill(MaskFill target) { > + super(target.getSourceType(), > + target.getCompositeType(), > + target.getDestType()); > + this.target = target; > ++ this.fillPgramTarget = new MaskFill(fillPgramSignature, > ++ target.getSourceType(), > ++ target.getCompositeType(), > ++ target.getDestType()); > ++ this.drawPgramTarget = new MaskFill(drawPgramSignature, > ++ target.getSourceType(), > ++ target.getCompositeType(), > ++ target.getDestType()); > + } > + > + public GraphicsPrimitive traceWrap() { > +@@ -203,5 +242,32 @@ > + target.MaskFill(sg2d, sData, comp, x, y, w, h, > + mask, maskoff, maskscan); > + } > ++ > ++ public void FillAAPgram(SunGraphics2D sg2d, SurfaceData sData, > ++ Composite comp, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2) > ++ { > ++ tracePrimitive(fillPgramTarget); > ++ target.FillAAPgram(sg2d, sData, comp, > ++ x, y, dx1, dy1, dx2, dy2); > ++ } > ++ > ++ public void DrawAAPgram(SunGraphics2D sg2d, SurfaceData sData, > ++ Composite comp, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2) > ++ { > ++ tracePrimitive(drawPgramTarget); > ++ target.DrawAAPgram(sg2d, sData, comp, > ++ x, y, dx1, dy1, dx2, dy2, lw1, lw2); > ++ } > ++ > ++ public boolean canDoParallelograms() { > ++ return target.canDoParallelograms(); > ++ } > + } > + } > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/pipe/AAShapePipe.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/AAShapePipe.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/AAShapePipe.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -28,6 +28,7 @@ > + import java.awt.BasicStroke; > + import java.awt.Rectangle; > + import java.awt.Shape; > ++import java.awt.geom.Rectangle2D; > + import java.awt.geom.PathIterator; > + import sun.awt.SunHints; > + import sun.java2d.SunGraphics2D; > +@@ -39,7 +40,9 @@ > + * This class sets up the Generator and computes the alpha tiles > + * and then passes them on to a CompositePipe object for painting. > + */ > +-public class AAShapePipe implements ShapeDrawPipe { > ++public class AAShapePipe > ++ implements ShapeDrawPipe, ParallelogramPipe > ++{ > + static RenderingEngine renderengine = RenderingEngine.getInstance(); > + > + CompositePipe outpipe; > +@@ -65,6 +68,59 @@ > + renderPath(sg, s, null); > + } > + > ++ private static Rectangle2D computeBBox(double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2) > ++ { > ++ double lox, loy, hix, hiy; > ++ lox = hix = x; > ++ loy = hiy = y; > ++ if (dx1 < 0) { lox += dx1; } else { hix += dx1; } > ++ if (dy1 < 0) { loy += dy1; } else { hiy += dy1; } > ++ if (dx2 < 0) { lox += dx2; } else { hix += dx2; } > ++ if (dy2 < 0) { loy += dy2; } else { hiy += dy2; } > ++ return new Rectangle2D.Double(lox, loy, hix-lox, hiy-loy); > ++ } > ++ > ++ public void fillParallelogram(SunGraphics2D sg, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2) > ++ { > ++ Region clip = sg.getCompClip(); > ++ int abox[] = new int[4]; > ++ AATileGenerator aatg = > ++ renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0, > ++ clip, abox); > ++ if (aatg == null) { > ++ // Nothing to render > ++ return; > ++ } > ++ > ++ renderTiles(sg, computeBBox(x, y, dx1, dy1, dx2, dy2), aatg, abox); > ++ } > ++ > ++ public void drawParallelogram(SunGraphics2D sg, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2) > ++ { > ++ Region clip = sg.getCompClip(); > ++ int abox[] = new int[4]; > ++ AATileGenerator aatg = > ++ renderengine.getAATileGenerator(x, y, dx1, dy1, dx2, dy2, 0, 0, > ++ clip, abox); > ++ if (aatg == null) { > ++ // Nothing to render > ++ return; > ++ } > ++ > ++ // Note that bbox is of the original shape, not the wide path. > ++ // This is appropriate for handing to Paint methods... > ++ renderTiles(sg, computeBBox(x, y, dx1, dy1, dx2, dy2), aatg, abox); > ++ } > ++ > + private static byte[] theTile; > + > + public synchronized static byte[] getAlphaTile(int len) { > +@@ -85,8 +141,6 @@ > + boolean adjust = (bs != null && > + sg.strokeHint != SunHints.INTVAL_STROKE_PURE); > + boolean thin = (sg.strokeState <= sg.STROKE_THINDASHED); > +- Object context = null; > +- byte alpha[] = null; > + > + Region clip = sg.getCompClip(); > + int abox[] = new int[4]; > +@@ -98,6 +152,14 @@ > + return; > + } > + > ++ renderTiles(sg, s, aatg, abox); > ++ } > ++ > ++ public void renderTiles(SunGraphics2D sg, Shape s, > ++ AATileGenerator aatg, int abox[]) > ++ { > ++ Object context = null; > ++ byte alpha[] = null; > + try { > + context = outpipe.startSequence(sg, s, > + new Rectangle(abox[0], abox[1], > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/pipe/AlphaColorPipe.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/AlphaColorPipe.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/AlphaColorPipe.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -34,7 +34,7 @@ > + * into a destination that supports direct alpha compositing of a solid > + * color, according to one of the rules in the AlphaComposite class. > + */ > +-public class AlphaColorPipe implements CompositePipe { > ++public class AlphaColorPipe implements CompositePipe, ParallelogramPipe { > + public AlphaColorPipe() { > + } > + > +@@ -64,4 +64,23 @@ > + public void endSequence(Object context) { > + return; > + } > ++ > ++ public void fillParallelogram(SunGraphics2D sg, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2) > ++ { > ++ sg.alphafill.FillAAPgram(sg, sg.getSurfaceData(), sg.composite, > ++ x, y, dx1, dy1, dx2, dy2); > ++ } > ++ > ++ public void drawParallelogram(SunGraphics2D sg, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2) > ++ { > ++ sg.alphafill.DrawAAPgram(sg, sg.getSurfaceData(), sg.composite, > ++ x, y, dx1, dy1, dx2, dy2, lw1, lw2); > ++ } > + } > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/pipe/RenderingEngine.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/RenderingEngine.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/RenderingEngine.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -281,6 +281,72 @@ > + int bbox[]); > + > + /** > ++ * Construct an antialiased tile generator for the given parallelogram > ++ * store the bounds of the tile iteration in the bbox parameter. > ++ * The parallelogram is specified as a starting point and 2 delta > ++ * vectors that indicate the slopes of the 2 pairs of sides of the > ++ * parallelogram. > ++ * The 4 corners of the parallelogram are defined by the 4 points: > ++ *
    > ++ *
  • {@code x}, {@code y} > ++ *
  • {@code x+dx1}, {@code y+dy1} > ++ *
  • {@code x+dx1+dx2}, {@code y+dy1+dy2} > ++ *
  • {@code x+dx2}, {@code y+dy2} > ++ *
> ++ * The {@code lw1} and {@code lw2} parameters provide a specification > ++ * for an optionally stroked parallelogram if they are positive numbers. > ++ * The {@code lw1} parameter is the ratio of the length of the {@code dx1}, > ++ * {@code dx2} delta vector to half of the line width in that same > ++ * direction. > ++ * The {@code lw2} parameter provides the same ratio for the other delta > ++ * vector. > ++ * If {@code lw1} and {@code lw2} are both greater than zero, then > ++ * the parallelogram figure is doubled by both expanding and contracting > ++ * each delta vector by its corresponding {@code lw} value. > ++ * If either (@code lw1) or {@code lw2} are also greater than 1, then > ++ * the inner (contracted) parallelogram disappears and the figure is > ++ * simply a single expanded parallelogram. > ++ * The {@code clip} parameter specifies the current clip in effect > ++ * in device coordinates and can be used to prune the data for the > ++ * operation, but the renderer is not required to perform any > ++ * clipping. > ++ *

> ++ * Upon returning, this method will fill the {@code bbox} parameter > ++ * with 4 values indicating the bounds of the iteration of the > ++ * tile generator. > ++ * The iteration order of the tiles will be as specified by the > ++ * pseudo-code: > ++ *

> ++     *     for (y = bbox[1]; y < bbox[3]; y += tileheight) {
> ++     *         for (x = bbox[0]; x < bbox[2]; x += tilewidth) {
> ++     *         }
> ++     *     }
> ++     * 
> ++ * If there is no output to be rendered, this method may return > ++ * null. > ++ * > ++ * @param x the X coordinate of the first corner of the parallelogram > ++ * @param y the Y coordinate of the first corner of the parallelogram > ++ * @param dx1 the X coordinate delta of the first leg of the parallelogram > ++ * @param dy1 the Y coordinate delta of the first leg of the parallelogram > ++ * @param dx2 the X coordinate delta of the second leg of the parallelogram > ++ * @param dy2 the Y coordinate delta of the second leg of the parallelogram > ++ * @param lw1 the line width ratio for the first leg of the parallelogram > ++ * @param lw2 the line width ratio for the second leg of the parallelogram > ++ * @param clip the current clip in effect in device coordinates > ++ * @param bbox returns the bounds of the iteration > ++ * @return the {@code AATileGenerator} instance to be consulted > ++ * for tile coverages, or null if there is no output to render > ++ * @since 1.7 > ++ */ > ++ public abstract AATileGenerator getAATileGenerator(double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2, > ++ Region clip, > ++ int bbox[]); > ++ > ++ /** > + * Returns the minimum pen width that the antialiasing rasterizer > + * can represent without dropouts occuring. > + * @since 1.7 > +@@ -393,5 +459,24 @@ > + bs, thin, normalize, > + bbox); > + } > ++ public AATileGenerator getAATileGenerator(double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2, > ++ Region clip, > ++ int bbox[]) > ++ { > ++ System.out.println(name+".getAATileGenerator("+ > ++ x+", "+y+", "+ > ++ dx1+", "+dy1+", "+ > ++ dx2+", "+dy2+", "+ > ++ lw1+", "+lw2+", "+ > ++ clip+")"); > ++ return target.getAATileGenerator(x, y, > ++ dx1, dy1, > ++ dx2, dy2, > ++ lw1, lw2, > ++ clip, bbox); > ++ } > + } > + } > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -557,6 +557,69 @@ > + return ptg; > + } > + > ++ public AATileGenerator getAATileGenerator(double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2, > ++ Region clip, > ++ int bbox[]) > ++ { > ++ // REMIND: Deal with large coordinates! > ++ double ldx1, ldy1, ldx2, ldy2; > ++ boolean innerpgram = (lw1 > 0 && lw2 > 0); > ++ > ++ if (innerpgram) { > ++ ldx1 = dx1 * lw1; > ++ ldy1 = dy1 * lw1; > ++ ldx2 = dx2 * lw2; > ++ ldy2 = dy2 * lw2; > ++ x -= (ldx1 + ldx2) / 2.0; > ++ y -= (ldy1 + ldy2) / 2.0; > ++ dx1 += ldx1; > ++ dy1 += ldy1; > ++ dx2 += ldx2; > ++ dy2 += ldy2; > ++ if (lw1 > 1 && lw2 > 1) { > ++ // Inner parallelogram was entirely consumed by stroke... > ++ innerpgram = false; > ++ } > ++ } else { > ++ ldx1 = ldy1 = ldx2 = ldy2 = 0; > ++ } > ++ > ++ Renderer r = new Renderer(3, 3, > ++ clip.getLoX(), clip.getLoY(), > ++ clip.getWidth(), clip.getHeight(), > ++ PathIterator.WIND_EVEN_ODD); > ++ > ++ r.moveTo((float) x, (float) y); > ++ r.lineTo((float) (x+dx1), (float) (y+dy1)); > ++ r.lineTo((float) (x+dx1+dx2), (float) (y+dy1+dy2)); > ++ r.lineTo((float) (x+dx2), (float) (y+dy2)); > ++ r.closePath(); > ++ > ++ if (innerpgram) { > ++ x += ldx1 + ldx2; > ++ y += ldy1 + ldy2; > ++ dx1 -= 2.0 * ldx1; > ++ dy1 -= 2.0 * ldy1; > ++ dx2 -= 2.0 * ldx2; > ++ dy2 -= 2.0 * ldy2; > ++ r.moveTo((float) x, (float) y); > ++ r.lineTo((float) (x+dx1), (float) (y+dy1)); > ++ r.lineTo((float) (x+dx1+dx2), (float) (y+dy1+dy2)); > ++ r.lineTo((float) (x+dx2), (float) (y+dy2)); > ++ r.closePath(); > ++ } > ++ > ++ r.pathDone(); > ++ > ++ r.endRendering(); > ++ PiscesTileGenerator ptg = new PiscesTileGenerator(r, r.MAX_AA_ALPHA); > ++ ptg.getBbox(bbox); > ++ return ptg; > ++ } > ++ > + /** > + * Returns the minimum pen width that the antialiasing rasterizer > + * can represent without dropouts occuring. > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/native/sun/java2d/loops/DrawParallelogram.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/DrawParallelogram.c Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/DrawParallelogram.c Tue Dec 14 13:25:29 2010 -0800 > +@@ -26,14 +26,11 @@ > + #include "math.h" > + #include "GraphicsPrimitiveMgr.h" > + #include "LineUtils.h" > +-#include "LoopMacros.h" > + #include "Trace.h" > ++#include "ParallelogramUtils.h" > + > +-#include "sun_java2d_loops_FillParallelogram.h" > + #include "sun_java2d_loops_DrawParallelogram.h" > + > +-DECLARE_SOLID_DRAWLINE(AnyInt); > +- > + #define HANDLE_PGRAM_EDGE(X1, Y1, X2, Y2, \ > + pRasInfo, pixel, pPrim, pFunc, pCompInfo) \ > + do { \ > +@@ -46,28 +43,6 @@ > + ix1, iy1, ix2, iy2, JNI_TRUE); \ > + } while (0) > + > +-#define PGRAM_MIN_MAX(bmin, bmax, v0, dv1, dv2) \ > +- do { \ > +- double vmin, vmax; \ > +- if (dv1 < 0) { \ > +- vmin = v0+dv1; \ > +- vmax = v0; \ > +- } else { \ > +- vmin = v0; \ > +- vmax = v0+dv1; \ > +- } \ > +- if (dv2 < 0) { \ > +- vmin -= dv2; \ > +- } else { \ > +- vmax += dv2; \ > +- } \ > +- bmin = (jint) floor(vmin + 0.5); \ > +- bmax = (jint) floor(vmax + 0.5); \ > +- } while(0) > +- > +-#define PGRAM_INIT_X(starty, x, y, slope) \ > +- (DblToLong((x) + (slope) * ((starty)+0.5 - (y))) + LongOneHalf - 1) > +- > + typedef struct { > + jdouble x0; > + jdouble y0; > +@@ -136,20 +111,8 @@ > + * Sort parallelogram by y values, ensure that each delta vector > + * has a non-negative y delta. > + */ > +- if (dy1 < 0) { > +- x0 += dx1; y0 += dy1; > +- dx1 = -dx1; dy1 = -dy1; > +- } > +- if (dy2 < 0) { > +- x0 += dx2; y0 += dy2; > +- dx2 = -dx2; dy2 = -dy2; > +- } > +- /* Sort delta vectors so dxy1 is left of dxy2. */ > +- if (dx1 * dy2 > dx2 * dy1) { > +- double v = dx1; dx1 = dx2; dx2 = v; > +- v = dy1; dy1 = dy2; dy2 = v; > +- v = lw1; lw1 = lw2; lw2 = v; > +- } > ++ SORT_PGRAM(x0, y0, dx1, dy1, dx2, dy2, > ++ v = lw1; lw1 = lw2; lw2 = v;); > + > + // dx,dy for line width in the "1" and "2" directions. > + ldx1 = dx1 * lw1; > +@@ -161,7 +124,7 @@ > + ox0 = x0 - (ldx1 + ldx2) / 2.0; > + oy0 = y0 - (ldy1 + ldy2) / 2.0; > + > +- PGRAM_MIN_MAX(ix1, ix2, ox0, dx1+ldx1, dx2+ldx2); > ++ PGRAM_MIN_MAX(ix1, ix2, ox0, dx1+ldx1, dx2+ldx2, JNI_FALSE); > + iy1 = (jint) floor(oy0 + 0.5); > + iy2 = (jint) floor(oy0 + dy1 + ldy1 + dy2 + ldy2 + 0.5); > + > +@@ -212,7 +175,7 @@ > + // Only need to generate 4 quads if the interior still > + // has a hole in it (i.e. if the line width ratios were > + // both less than 1.0) > +- if (lw1 < 1.0f && lw2 < 1.0f) { > ++ if (lw1 < 1.0 && lw2 < 1.0) { > + // If the line widths are both less than a pixel wide > + // then we can use a drawline function instead for even > + // more performance. > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/native/sun/java2d/loops/FillParallelogram.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/FillParallelogram.c Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/FillParallelogram.c Tue Dec 14 13:25:29 2010 -0800 > +@@ -25,31 +25,10 @@ > + > + #include "math.h" > + #include "GraphicsPrimitiveMgr.h" > ++#include "ParallelogramUtils.h" > + > + #include "sun_java2d_loops_FillParallelogram.h" > + > +-#define PGRAM_MIN_MAX(bmin, bmax, v0, dv1, dv2) \ > +- do { \ > +- double vmin, vmax; \ > +- if (dv1 < 0) { \ > +- vmin = v0+dv1; \ > +- vmax = v0; \ > +- } else { \ > +- vmin = v0; \ > +- vmax = v0+dv1; \ > +- } \ > +- if (dv2 < 0) { \ > +- vmin -= dv2; \ > +- } else { \ > +- vmax += dv2; \ > +- } \ > +- bmin = (jint) floor(vmin + 0.5); \ > +- bmax = (jint) floor(vmax + 0.5); \ > +- } while(0) > +- > +-#define PGRAM_INIT_X(starty, x, y, slope) \ > +- (DblToLong((x) + (slope) * ((starty)+0.5 - (y))) + LongOneHalf - 1) > +- > + /* > + * Class: sun_java2d_loops_FillParallelogram > + * Method: FillParallelogram > +@@ -76,22 +55,11 @@ > + > + /* > + * Sort parallelogram by y values, ensure that each delta vector > +- * has a non-negative y delta, and eliminate degenerate parallelograms. > ++ * has a non-negative y delta. > + */ > +- if (dy1 < 0) { > +- x0 += dx1; y0 += dy1; > +- dx1 = -dx1; dy1 = -dy1; > +- } > +- if (dy2 < 0) { > +- x0 += dx2; y0 += dy2; > +- dx2 = -dx2; dy2 = -dy2; > +- } > +- /* Sort delta vectors so dxy1 is left of dxy2. */ > +- if (dx1 * dy2 > dx2 * dy1) { > +- double v = dx1; dx1 = dx2; dx2 = v; > +- v = dy1; dy1 = dy2; dy2 = v; > +- } > +- PGRAM_MIN_MAX(ix1, ix2, x0, dx1, dx2); > ++ SORT_PGRAM(x0, y0, dx1, dy1, dx2, dy2, ); > ++ > ++ PGRAM_MIN_MAX(ix1, ix2, x0, dx1, dx2, JNI_FALSE); > + iy1 = (jint) floor(y0 + 0.5); > + iy2 = (jint) floor(y0 + dy1 + dy2 + 0.5); > + > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/native/sun/java2d/loops/MaskFill.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/MaskFill.c Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/MaskFill.c Tue Dec 14 13:25:29 2010 -0800 > +@@ -23,7 +23,11 @@ > + * questions. > + */ > + > ++#include > ++#include > ++#include > + #include "GraphicsPrimitiveMgr.h" > ++#include "ParallelogramUtils.h" > + > + #include "sun_java2d_loops_MaskFill.h" > + > +@@ -93,6 +97,967 @@ > + } > + } > + SurfaceData_InvokeRelease(env, sdOps, &rasInfo); > ++ } > ++ SurfaceData_InvokeUnlock(env, sdOps, &rasInfo); > ++} > ++ > ++#define MASK_BUF_LEN 1024 > ++ > ++#define DblToMask(v) ((unsigned char) ((v)*255.9999)) > ++ > ++/* Fills an aligned rectangle with potentially translucent edges. */ > ++static void > ++fillAARect(NativePrimitive *pPrim, SurfaceDataRasInfo *pRasInfo, > ++ CompositeInfo *pCompInfo, jint color, unsigned char *pMask, > ++ void *pDst, > ++ jdouble x1, jdouble y1, jdouble x2, jdouble y2) > ++{ > ++ jint cx1 = pRasInfo->bounds.x1; > ++ jint cy1 = pRasInfo->bounds.y1; > ++ jint cx2 = pRasInfo->bounds.x2; > ++ jint cy2 = pRasInfo->bounds.y2; > ++ jint rx1 = (jint) ceil(x1); > ++ jint ry1 = (jint) ceil(y1); > ++ jint rx2 = (jint) floor(x2); > ++ jint ry2 = (jint) floor(y2); > ++ jint width = cx2 - cx1; > ++ jint scan = pRasInfo->scanStride; > ++ /* Convert xy12 into the edge coverage fractions for those edges. */ > ++ x1 = rx1-x1; > ++ y1 = ry1-y1; > ++ x2 = x2-rx2; > ++ y2 = y2-ry2; > ++ if (ry2 < ry1) { > ++ /* Accumulate bottom coverage into top coverage. */ > ++ y1 = y1 + y2 - 1.0; > ++ /* prevent processing of "bottom fractional row" */ > ++ ry2 = cy2; > ++ } > ++ if (rx2 < rx1) { > ++ /* Accumulate right coverage into left coverage. */ > ++ x1 = x1 + x2 - 1.0; > ++ /* prevent processing of "right fractional column" */ > ++ rx2 = cx2; > ++ } > ++ /* Check for a visible "top fractional row" and process it */ > ++ if (cy1 < ry1) { > ++ unsigned char midcov = DblToMask(y1); > ++ jint x; > ++ for (x = 0; x < width; x++) { > ++ pMask[x] = midcov; > ++ } > ++ if (cx1 < rx1) { > ++ pMask[0] = DblToMask(y1 * x1); > ++ } > ++ if (cx2 > rx2) { > ++ pMask[width-1] = DblToMask(y1 * x2); > ++ } > ++ (*pPrim->funcs.maskfill)(pDst, > ++ pMask, 0, 0, > ++ width, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ pDst = PtrAddBytes(pDst, scan); > ++ cy1++; > ++ } > ++ /* Check for a visible "left fract, solid middle, right fract" section. */ > ++ if (cy1 < ry2 && cy1 < cy2) { > ++ jint midh = ((ry2 < cy2) ? ry2 : cy2) - cy1; > ++ jint midx = cx1; > ++ void *pMid = pDst; > ++ /* First process the left "fractional column" if it is visible. */ > ++ if (midx < rx1) { > ++ pMask[0] = DblToMask(x1); > ++ /* Note: maskscan == 0 means we reuse this value for every row. */ > ++ (*pPrim->funcs.maskfill)(pMid, > ++ pMask, 0, 0, > ++ 1, midh, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ pMid = PtrAddBytes(pMid, pRasInfo->pixelStride); > ++ midx++; > ++ } > ++ /* Process the central solid section if it is visible. */ > ++ if (midx < rx2 && midx < cx2) { > ++ jint midw = ((rx2 < cx2) ? rx2 : cx2) - midx; > ++ /* A NULL mask buffer means "all coverages are 0xff" */ > ++ (*pPrim->funcs.maskfill)(pMid, > ++ NULL, 0, 0, > ++ midw, midh, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ pMid = PtrCoord(pMid, midw, pRasInfo->pixelStride, 0, 0); > ++ midx += midw; > ++ } > ++ /* Finally process the right "fractional column" if it is visible. */ > ++ if (midx < cx2) { > ++ pMask[0] = DblToMask(x2); > ++ /* Note: maskscan == 0 means we reuse this value for every row. */ > ++ (*pPrim->funcs.maskfill)(pMid, > ++ pMask, 0, 0, > ++ 1, midh, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ } > ++ cy1 += midh; > ++ pDst = PtrCoord(pDst, 0, 0, midh, scan); > ++ } > ++ /* Check for a visible "bottom fractional row" and process it */ > ++ if (cy1 < cy2) { > ++ unsigned char midcov = DblToMask(y2); > ++ jint x; > ++ for (x = 0; x < width; x++) { > ++ pMask[x] = midcov; > ++ } > ++ if (cx1 < rx1) { > ++ pMask[0] = DblToMask(y2 * x1); > ++ } > ++ if (cx2 > rx2) { > ++ pMask[width-1] = DblToMask(y2 * x2); > ++ } > ++ (*pPrim->funcs.maskfill)(pDst, > ++ pMask, 0, 0, > ++ width, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ } > ++} > ++ > ++/* > ++ * Support code for arbitrary tracing and MaskFill filling of > ++ * non-rectilinear (diagonal) parallelograms. > ++ * > ++ * This code is based upon the following model of AA coverage. > ++ * > ++ * Each edge of a parallelogram (for fillPgram) or a double > ++ * parallelogram (inner and outer parallelograms for drawPgram) > ++ * can be rasterized independently because the geometry is well > ++ * defined in such a way that none of the sides will ever cross > ++ * each other and they have a fixed ordering that is fairly > ++ * well predetermined. > ++ * > ++ * So, for each edge we will look at the diagonal line that > ++ * the edge makes as it passes through a row of pixels. Some > ++ * such diagonal lines may pass entirely through the row of > ++ * pixels in a single pixel column. Some may cut across the > ++ * row and pass through several pixel columns before they pass > ++ * on to the next row. > ++ * > ++ * As the edge passes through the row of pixels it will affect > ++ * the coverage of the pixels it passes through as well as all > ++ * of the pixels to the right of the edge. The coverage will > ++ * either be increased (by a left edge of a parallelogram) or > ++ * decreased (by a right edge) for all pixels to the right, until > ++ * another edge passing the opposite direction is encountered. > ++ * > ++ * The coverage added or subtracted by an edge as it crosses a > ++ * given pixel is calculated using a trapezoid formula in the > ++ * following manner: > ++ * > ++ * / > ++ * +-----+---/-+-----+ > ++ * | | / | | > ++ * | | / | | > ++ * +-----+/----+-----+ > ++ * / > ++ * > ++ * The area to the right of that edge for the pixel where it > ++ * crosses is given as: > ++ * > ++ * trapheight * (topedge + bottomedge)/2 > ++ * > ++ * Another thing to note is that the above formula gives the > ++ * contribution of that edge to the given pixel where it crossed, > ++ * but in so crossing the pixel row, it also created 100% coverage > ++ * for all of the pixels to the right. > ++ * > ++ * This example was simplified in that the edge depicted crossed > ++ * the complete pixel row and it did so entirely within the bounds > ++ * of a single pixel column. In practice, many edges may start or > ++ * end in a given row and thus provide only partial row coverage > ++ * (i.e. the total "trapheight" in the formula never reaches 1.0). > ++ * And in other cases, edges may travel sideways through several > ++ * pixel columns on a given pixel row from where they enter it to > ++ * where the leave it (which also mans that the trapheight for a > ++ * given pixel will be less than 1.0, but by the time the edge > ++ * completes its journey through the pixel row the "coverage shadow" > ++ * that it casts on all pixels to the right eventually reaches 100%). > ++ * > ++ * In order to simplify the calculations so that we don't have to > ++ * keep propagating coverages we calculate for one edge "until we > ++ * reach another edge" we will process one edge at a time and > ++ * simply record in a buffer the amount that an edge added to > ++ * or subtracted from the coverage for a given pixel and its > ++ * following right-side neighbors. Thus, the true total coverage > ++ * of a given pixel is only determined by summing the deltas for > ++ * that pixel and all of the pixels to its left. Since we already > ++ * have to scan the buffer to change floating point coverages into > ++ * mask values for a MaskFill loop, it is simple enough to sum the > ++ * values as we perform that scan from left to right. > ++ * > ++ * In the above example, note that 2 deltas need to be recorded even > ++ * though the edge only intersected a single pixel. The delta recorded > ++ * for the pixel where the edge crossed will be approximately 55% > ++ * (guesstimating by examining the poor ascii art) which is fine for > ++ * determining how to render that pixel, but the rest of the pixels > ++ * to its right should have their coverage modified by a full 100% > ++ * and the 55% delta value we recorded for the pixel that the edge > ++ * crossed will not get them there. We adjust for this by adding > ++ * the "remainder" of the coverage implied by the shadow to the > ++ * pixel immediately to the right of where we record a trapezoidal > ++ * contribution. In this case a delta of 45% will be recorded in > ++ * the pixel immediately to the right to raise the total to 100%. > ++ * > ++ * As we sum these delta values as we process the line from left > ++ * to right, these delta values will typically drive the sum from > ++ * 0% up to 100% and back down to 0% over the course of a single > ++ * pixel row. In the case of a drawn (double) parallelogram the > ++ * sum will go to 100% and back to 0% twice on most scanlines. > ++ * > ++ * The fillAAPgram and drawAAPgram functions drive the main flow > ++ * of the algorithm with help from the following structures, > ++ * macros, and functions. It is probably best to start with > ++ * those 2 functions to gain an understanding of the algorithm. > ++ */ > ++typedef struct { > ++ jdouble x; > ++ jdouble y; > ++ jdouble xbot; > ++ jdouble ybot; > ++ jdouble xnexty; > ++ jdouble ynextx; > ++ jdouble xnextx; > ++ jdouble linedx; > ++ jdouble celldx; > ++ jdouble celldy; > ++ jboolean isTrailing; > ++} EdgeInfo; > ++ > ++#define MIN_DELTA (1.0/256.0) > ++ > ++/* > ++ * Calculates slopes and deltas for an edge and stores results in an EdgeInfo. > ++ * Returns true if the edge was valid (i.e. not ignored for some reason). > ++ */ > ++static jboolean > ++storeEdge(EdgeInfo *pEdge, > ++ jdouble x, jdouble y, jdouble dx, jdouble dy, > ++ jint cx1, jint cy1, jint cx2, jint cy2, > ++ jboolean isTrailing) > ++{ > ++ jdouble xbot = x + dx; > ++ jdouble ybot = y + dy; > ++ jboolean ret; > ++ > ++ pEdge->x = x; > ++ pEdge->y = y; > ++ pEdge->xbot = xbot; > ++ pEdge->ybot = ybot; > ++ > ++ /* Note that parallelograms are sorted so dy is always non-negative */ > ++ if (dy > MIN_DELTA && /* NaN and horizontal protection */ > ++ ybot > cy1 && /* NaN and "OUT_ABOVE" protection */ > ++ y < cy2 && /* NaN and "OUT_BELOW" protection */ > ++ xbot == xbot && /* NaN protection */ > ++ (x < cx2 || xbot < cx2)) /* "OUT_RIGHT" protection */ > ++ /* Note: "OUT_LEFT" segments may still contribute coverage... */ > ++ { > ++ /* no NaNs, dy is not horizontal, and segment contributes to clip */ > ++ if (dx < -MIN_DELTA || dx > MIN_DELTA) { > ++ /* dx is not vertical */ > ++ jdouble linedx; > ++ jdouble celldy; > ++ jdouble nextx; > ++ > ++ linedx = dx / dy; > ++ celldy = dy / dx; > ++ if (y < cy1) { > ++ pEdge->x = x = x + (cy1 - y) * linedx; > ++ pEdge->y = y = cy1; > ++ } > ++ pEdge->linedx = linedx; > ++ if (dx < 0) { > ++ pEdge->celldx = -1.0; > ++ pEdge->celldy = -celldy; > ++ pEdge->xnextx = nextx = ceil(x) - 1.0; > ++ } else { > ++ pEdge->celldx = +1.0; > ++ pEdge->celldy = celldy; > ++ pEdge->xnextx = nextx = floor(x) + 1.0; > ++ } > ++ pEdge->ynextx = y + (nextx - x) * celldy; > ++ pEdge->xnexty = x + ((floor(y) + 1) - y) * linedx; > ++ } else { > ++ /* dx is essentially vertical */ > ++ if (y < cy1) { > ++ pEdge->y = y = cy1; > ++ } > ++ pEdge->xbot = x; > ++ pEdge->linedx = 0.0; > ++ pEdge->celldx = 0.0; > ++ pEdge->celldy = 1.0; > ++ pEdge->xnextx = x; > ++ pEdge->xnexty = x; > ++ pEdge->ynextx = ybot; > ++ } > ++ ret = JNI_TRUE; > ++ } else { > ++ /* There is some reason to ignore this segment, "celldy=0" omits it */ > ++ pEdge->ybot = y; > ++ pEdge->linedx = dx; > ++ pEdge->celldx = dx; > ++ pEdge->celldy = 0.0; > ++ pEdge->xnextx = xbot; > ++ pEdge->xnexty = xbot; > ++ pEdge->ynextx = y; > ++ ret = JNI_FALSE; > ++ } > ++ pEdge->isTrailing = isTrailing; > ++ return ret; > ++} > ++ > ++/* > ++ * Calculates and stores slopes and deltas for all edges of a parallelogram. > ++ * Returns true if at least 1 edge was valid (i.e. not ignored for some reason). > ++ * > ++ * The inverted flag is true for an outer parallelogram (left and right > ++ * edges are leading and trailing) and false for an inner parallelogram > ++ * (where the left edge is trailing and the right edge is leading). > ++ */ > ++static jboolean > ++storePgram(EdgeInfo *pLeftEdge, EdgeInfo *pRightEdge, > ++ jdouble x, jdouble y, > ++ jdouble dx1, jdouble dy1, > ++ jdouble dx2, jdouble dy2, > ++ jint cx1, jint cy1, jint cx2, jint cy2, > ++ jboolean inverted) > ++{ > ++ jboolean ret = JNI_FALSE; > ++ ret = (storeEdge(pLeftEdge + 0, > ++ x , y , dx1, dy1, > ++ cx1, cy1, cx2, cy2, inverted) || ret); > ++ ret = (storeEdge(pLeftEdge + 1, > ++ x+dx1, y+dy1, dx2, dy2, > ++ cx1, cy1, cx2, cy2, inverted) || ret); > ++ ret = (storeEdge(pRightEdge + 0, > ++ x , y , dx2, dy2, > ++ cx1, cy1, cx2, cy2, !inverted) || ret); > ++ ret = (storeEdge(pRightEdge + 1, > ++ x+dx2, y+dy2, dx1, dy1, > ++ cx1, cy1, cx2, cy2, !inverted) || ret); > ++ return ret; > ++} > ++ > ++/* > ++ * The X0,Y0,X1,Y1 values represent a trapezoidal fragment whose > ++ * coverage must be accounted for in the accum buffer. > ++ * > ++ * All four values are assumed to fall within (or on the edge of) > ++ * a single pixel. > ++ * > ++ * The trapezoid area is accumulated into the proper element of > ++ * the accum buffer and the remainder of the "slice height" is > ++ * accumulated into the element to its right. > ++ */ > ++#define INSERT_ACCUM(pACCUM, IMIN, IMAX, X0, Y0, X1, Y1, CX1, CX2, MULT) \ > ++ do { \ > ++ jdouble xmid = ((X0) + (X1)) * 0.5; \ > ++ if (xmid <= (CX2)) { \ > ++ jdouble sliceh = ((Y1) - (Y0)); \ > ++ jdouble slicearea; \ > ++ jint i; \ > ++ if (xmid < (CX1)) { \ > ++ /* Accumulate the entire slice height into accum[0]. */ \ > ++ i = 0; \ > ++ slicearea = sliceh; \ > ++ } else { \ > ++ jdouble xpos = floor(xmid); \ > ++ i = ((jint) xpos) - (CX1); \ > ++ slicearea = (xpos+1-xmid) * sliceh; \ > ++ } \ > ++ if (IMIN > i) { \ > ++ IMIN = i; \ > ++ } \ > ++ (pACCUM)[i++] += (jfloat) ((MULT) * slicearea); \ > ++ (pACCUM)[i++] += (jfloat) ((MULT) * (sliceh - slicearea)); \ > ++ if (IMAX < i) { \ > ++ IMAX = i; \ > ++ } \ > ++ } \ > ++ } while (0) > ++ > ++/* > ++ * Accumulate the contributions for a given edge crossing a given > ++ * scan line into the corresponding entries of the accum buffer. > ++ * CY1 is the Y coordinate of the top edge of the scanline and CY2 > ++ * is equal to (CY1 + 1) and is the Y coordinate of the bottom edge > ++ * of the scanline. CX1 and CX2 are the left and right edges of the > ++ * clip (or area of interest) being rendered. > ++ * > ++ * The edge is processed from the top edge to the bottom edge and > ++ * a single pixel column at a time. > ++ */ > ++#define ACCUM_EDGE(pEDGE, pACCUM, IMIN, IMAX, CX1, CY1, CX2, CY2) \ > ++ do { \ > ++ jdouble x, y, xnext, ynext, xlast, ylast, dx, dy, mult; \ > ++ y = (pEDGE)->y; \ > ++ dy = (pEDGE)->celldy; \ > ++ ylast = (pEDGE)->ybot; \ > ++ if (ylast <= (CY1) || y >= (CY2) || dy == 0.0) { \ > ++ break; \ > ++ } \ > ++ x = (pEDGE)->x; \ > ++ dx = (pEDGE)->celldx; \ > ++ if (ylast > (CY2)) { \ > ++ ylast = (CY2); \ > ++ xlast = (pEDGE)->xnexty; \ > ++ } else { \ > ++ xlast = (pEDGE)->xbot; \ > ++ } \ > ++ xnext = (pEDGE)->xnextx; \ > ++ ynext = (pEDGE)->ynextx; \ > ++ mult = ((pEDGE)->isTrailing) ? -1.0 : 1.0; \ > ++ while (ynext <= ylast) { \ > ++ INSERT_ACCUM(pACCUM, IMIN, IMAX, \ > ++ x, y, xnext, ynext, \ > ++ CX1, CX2, mult); \ > ++ x = xnext; \ > ++ y = ynext; \ > ++ xnext += dx; \ > ++ ynext += dy; \ > ++ } \ > ++ (pEDGE)->ynextx = ynext; \ > ++ (pEDGE)->xnextx = xnext; \ > ++ INSERT_ACCUM(pACCUM, IMIN, IMAX, \ > ++ x, y, xlast, ylast, \ > ++ CX1, CX2, mult); \ > ++ (pEDGE)->x = xlast; \ > ++ (pEDGE)->y = ylast; \ > ++ (pEDGE)->xnexty = xlast + (pEDGE)->linedx; \ > ++ } while(0) > ++ > ++/* Main function to fill a single Parallelogram */ > ++static void > ++fillAAPgram(NativePrimitive *pPrim, SurfaceDataRasInfo *pRasInfo, > ++ CompositeInfo *pCompInfo, jint color, unsigned char *pMask, > ++ void *pDst, > ++ jdouble x1, jdouble y1, > ++ jdouble dx1, jdouble dy1, > ++ jdouble dx2, jdouble dy2) > ++{ > ++ jint cx1 = pRasInfo->bounds.x1; > ++ jint cy1 = pRasInfo->bounds.y1; > ++ jint cx2 = pRasInfo->bounds.x2; > ++ jint cy2 = pRasInfo->bounds.y2; > ++ jint width = cx2 - cx1; > ++ EdgeInfo edges[4]; > ++ jfloat localaccum[MASK_BUF_LEN + 1]; > ++ jfloat *pAccum; > ++ > ++ if (!storePgram(edges + 0, edges + 2, > ++ x1, y1, dx1, dy1, dx2, dy2, > ++ cx1, cy1, cx2, cy2, > ++ JNI_FALSE)) > ++ { > ++ return; > ++ } > ++ > ++ pAccum = ((width > MASK_BUF_LEN) > ++ ? malloc((width + 1) * sizeof(jfloat)) > ++ : localaccum); > ++ if (pAccum == NULL) { > ++ return; > ++ } > ++ memset(pAccum, 0, (width+1) * sizeof(jfloat)); > ++ > ++ while (cy1 < cy2) { > ++ jint lmin, lmax, rmin, rmax; > ++ jint moff, x; > ++ jdouble accum; > ++ unsigned char lastcov; > ++ > ++ lmin = rmin = width + 2; > ++ lmax = rmax = 0; > ++ ACCUM_EDGE(&edges[0], pAccum, lmin, lmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[1], pAccum, lmin, lmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[2], pAccum, rmin, rmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[3], pAccum, rmin, rmax, > ++ cx1, cy1, cx2, cy1+1); > ++ if (lmax > width) { > ++ lmax = width; /* Extra col has data we do not need. */ > ++ } > ++ if (rmax > width) { > ++ rmax = width; /* Extra col has data we do not need. */ > ++ } > ++ /* If ranges overlap, handle both in the first pass. */ > ++ if (rmin <= lmax) { > ++ lmax = rmax; > ++ } > ++ > ++ x = lmin; > ++ accum = 0.0; > ++ moff = 0; > ++ lastcov = 0; > ++ while (x < lmax) { > ++ accum += pAccum[x]; > ++ pAccum[x] = 0.0f; > ++ pMask[moff++] = lastcov = DblToMask(accum); > ++ x++; > ++ } > ++ /* Check for a solid center section. */ > ++ if (lastcov == 0xFF) { > ++ jint endx; > ++ void *pRow; > ++ > ++ /* First process the existing partial coverage data. */ > ++ if (moff > 0) { > ++ pRow = PtrCoord(pDst, x-moff, pRasInfo->pixelStride, 0, 0); > ++ (*pPrim->funcs.maskfill)(pRow, > ++ pMask, 0, 0, > ++ moff, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ moff = 0; > ++ } > ++ > ++ /* Where does the center section end? */ > ++ /* If there is no right AA edge in the accum buffer, then */ > ++ /* the right edge was beyond the clip, so fill out to width */ > ++ endx = (rmin < rmax) ? rmin : width; > ++ if (x < endx) { > ++ pRow = PtrCoord(pDst, x, pRasInfo->pixelStride, 0, 0); > ++ (*pPrim->funcs.maskfill)(pRow, > ++ NULL, 0, 0, > ++ endx - x, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ x = endx; > ++ } > ++ } else if (lastcov > 0 && rmin >= rmax) { > ++ /* We are not at 0 coverage, but there is no right edge, */ > ++ /* force a right edge so we process pixels out to width. */ > ++ rmax = width; > ++ } > ++ /* The following loop will process the right AA edge and/or any */ > ++ /* partial coverage center section not processed above. */ > ++ while (x < rmax) { > ++ accum += pAccum[x]; > ++ pAccum[x] = 0.0f; > ++ pMask[moff++] = DblToMask(accum); > ++ x++; > ++ } > ++ if (moff > 0) { > ++ void *pRow = PtrCoord(pDst, x-moff, pRasInfo->pixelStride, 0, 0); > ++ (*pPrim->funcs.maskfill)(pRow, > ++ pMask, 0, 0, > ++ moff, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ } > ++ pDst = PtrAddBytes(pDst, pRasInfo->scanStride); > ++ cy1++; > ++ } > ++ if (pAccum != localaccum) { > ++ free(pAccum); > ++ } > ++} > ++ > ++/* > ++ * Class: sun_java2d_loops_MaskFill > ++ * Method: FillAAPgram > ++ * Signature: (Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;Ljava/awt/Composite;DDDDDD)V > ++ */ > ++JNIEXPORT void JNICALL > ++Java_sun_java2d_loops_MaskFill_FillAAPgram > ++ (JNIEnv *env, jobject self, > ++ jobject sg2d, jobject sData, jobject comp, > ++ jdouble x0, jdouble y0, > ++ jdouble dx1, jdouble dy1, > ++ jdouble dx2, jdouble dy2) > ++{ > ++ SurfaceDataOps *sdOps; > ++ SurfaceDataRasInfo rasInfo; > ++ NativePrimitive *pPrim; > ++ CompositeInfo compInfo; > ++ jint ix1, iy1, ix2, iy2; > ++ > ++ if ((dy1 == 0 && dx1 == 0) || (dy2 == 0 && dx2 == 0)) { > ++ return; > ++ } > ++ > ++ /* > ++ * Sort parallelogram by y values, ensure that each delta vector > ++ * has a non-negative y delta. > ++ */ > ++ SORT_PGRAM(x0, y0, dx1, dy1, dx2, dy2, ); > ++ > ++ PGRAM_MIN_MAX(ix1, ix2, x0, dx1, dx2, JNI_TRUE); > ++ iy1 = (jint) floor(y0); > ++ iy2 = (jint) ceil(y0 + dy1 + dy2); > ++ > ++ pPrim = GetNativePrim(env, self); > ++ if (pPrim == NULL) { > ++ return; > ++ } > ++ if (pPrim->pCompType->getCompInfo != NULL) { > ++ (*pPrim->pCompType->getCompInfo)(env, &compInfo, comp); > ++ } > ++ > ++ sdOps = SurfaceData_GetOps(env, sData); > ++ if (sdOps == 0) { > ++ return; > ++ } > ++ > ++ GrPrim_Sg2dGetClip(env, sg2d, &rasInfo.bounds); > ++ SurfaceData_IntersectBoundsXYXY(&rasInfo.bounds, ix1, iy1, ix2, iy2); > ++ if (rasInfo.bounds.y2 <= rasInfo.bounds.y1 || > ++ rasInfo.bounds.x2 <= rasInfo.bounds.x1) > ++ { > ++ return; > ++ } > ++ > ++ if (sdOps->Lock(env, sdOps, &rasInfo, pPrim->dstflags) != SD_SUCCESS) { > ++ return; > ++ } > ++ > ++ ix1 = rasInfo.bounds.x1; > ++ iy1 = rasInfo.bounds.y1; > ++ ix2 = rasInfo.bounds.x2; > ++ iy2 = rasInfo.bounds.y2; > ++ if (ix2 > ix1 && iy2 > iy1) { > ++ jint width = ix2 - ix1; > ++ jint color = GrPrim_Sg2dGetEaRGB(env, sg2d); > ++ unsigned char localmask[MASK_BUF_LEN]; > ++ unsigned char *pMask = ((width > MASK_BUF_LEN) > ++ ? malloc(width) > ++ : localmask); > ++ > ++ sdOps->GetRasInfo(env, sdOps, &rasInfo); > ++ if (rasInfo.rasBase != NULL && pMask != NULL) { > ++ void *pDst = PtrCoord(rasInfo.rasBase, > ++ ix1, rasInfo.pixelStride, > ++ iy1, rasInfo.scanStride); > ++ if (dy1 == 0 && dx2 == 0) { > ++ if (dx1 < 0) { > ++ // We sorted by Y above, but not by X > ++ x0 += dx1; > ++ dx1 = -dx1; > ++ } > ++ fillAARect(pPrim, &rasInfo, &compInfo, > ++ color, pMask, pDst, > ++ x0, y0, x0+dx1, y0+dy2); > ++ } else if (dx1 == 0 && dy2 == 0) { > ++ if (dx2 < 0) { > ++ // We sorted by Y above, but not by X > ++ x0 += dx2; > ++ dx2 = -dx2; > ++ } > ++ fillAARect(pPrim, &rasInfo, &compInfo, > ++ color, pMask, pDst, > ++ x0, y0, x0+dx2, y0+dy1); > ++ } else { > ++ fillAAPgram(pPrim, &rasInfo, &compInfo, > ++ color, pMask, pDst, > ++ x0, y0, dx1, dy1, dx2, dy2); > ++ } > ++ } > ++ SurfaceData_InvokeRelease(env, sdOps, &rasInfo); > ++ if (pMask != NULL && pMask != localmask) { > ++ free(pMask); > ++ } > + } > + SurfaceData_InvokeUnlock(env, sdOps, &rasInfo); > + } > ++ > ++/* Main function to fill a double pair of (inner and outer) parallelograms */ > ++static void > ++drawAAPgram(NativePrimitive *pPrim, SurfaceDataRasInfo *pRasInfo, > ++ CompositeInfo *pCompInfo, jint color, unsigned char *pMask, > ++ void *pDst, > ++ jdouble ox0, jdouble oy0, > ++ jdouble dx1, jdouble dy1, > ++ jdouble dx2, jdouble dy2, > ++ jdouble ldx1, jdouble ldy1, > ++ jdouble ldx2, jdouble ldy2) > ++{ > ++ jint cx1 = pRasInfo->bounds.x1; > ++ jint cy1 = pRasInfo->bounds.y1; > ++ jint cx2 = pRasInfo->bounds.x2; > ++ jint cy2 = pRasInfo->bounds.y2; > ++ jint width = cx2 - cx1; > ++ EdgeInfo edges[8]; > ++ jfloat localaccum[MASK_BUF_LEN + 1]; > ++ jfloat *pAccum; > ++ > ++ if (!storePgram(edges + 0, edges + 6, > ++ ox0, oy0, > ++ dx1 + ldx1, dy1 + ldy1, > ++ dx2 + ldx2, dy2 + ldy2, > ++ cx1, cy1, cx2, cy2, > ++ JNI_FALSE)) > ++ { > ++ /* If outer pgram does not contribute, then inner cannot either. */ > ++ return; > ++ } > ++ storePgram(edges + 2, edges + 4, > ++ ox0 + ldx1 + ldx2, oy0 + ldy1 + ldy2, > ++ dx1 - ldx1, dy1 - ldy1, > ++ dx2 - ldx2, dy2 - ldy2, > ++ cx1, cy1, cx2, cy2, > ++ JNI_TRUE); > ++ > ++ pAccum = ((width > MASK_BUF_LEN) > ++ ? malloc((width + 1) * sizeof(jfloat)) > ++ : localaccum); > ++ if (pAccum == NULL) { > ++ return; > ++ } > ++ memset(pAccum, 0, (width+1) * sizeof(jfloat)); > ++ > ++ while (cy1 < cy2) { > ++ jint lmin, lmax, rmin, rmax; > ++ jint moff, x; > ++ jdouble accum; > ++ unsigned char lastcov; > ++ > ++ lmin = rmin = width + 2; > ++ lmax = rmax = 0; > ++ ACCUM_EDGE(&edges[0], pAccum, lmin, lmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[1], pAccum, lmin, lmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[2], pAccum, lmin, lmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[3], pAccum, lmin, lmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[4], pAccum, rmin, rmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[5], pAccum, rmin, rmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[6], pAccum, rmin, rmax, > ++ cx1, cy1, cx2, cy1+1); > ++ ACCUM_EDGE(&edges[7], pAccum, rmin, rmax, > ++ cx1, cy1, cx2, cy1+1); > ++ if (lmax > width) { > ++ lmax = width; /* Extra col has data we do not need. */ > ++ } > ++ if (rmax > width) { > ++ rmax = width; /* Extra col has data we do not need. */ > ++ } > ++ /* If ranges overlap, handle both in the first pass. */ > ++ if (rmin <= lmax) { > ++ lmax = rmax; > ++ } > ++ > ++ x = lmin; > ++ accum = 0.0; > ++ moff = 0; > ++ lastcov = 0; > ++ while (x < lmax) { > ++ accum += pAccum[x]; > ++ pAccum[x] = 0.0f; > ++ pMask[moff++] = lastcov = DblToMask(accum); > ++ x++; > ++ } > ++ /* Check for an empty or solidcenter section. */ > ++ if (lastcov == 0 || lastcov == 0xFF) { > ++ jint endx; > ++ void *pRow; > ++ > ++ /* First process the existing partial coverage data. */ > ++ if (moff > 0) { > ++ pRow = PtrCoord(pDst, x-moff, pRasInfo->pixelStride, 0, 0); > ++ (*pPrim->funcs.maskfill)(pRow, > ++ pMask, 0, 0, > ++ moff, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ moff = 0; > ++ } > ++ > ++ /* Where does the center section end? */ > ++ /* If there is no right AA edge in the accum buffer, then */ > ++ /* the right edge was beyond the clip, so fill out to width */ > ++ endx = (rmin < rmax) ? rmin : width; > ++ if (x < endx) { > ++ if (lastcov == 0xFF) { > ++ pRow = PtrCoord(pDst, x, pRasInfo->pixelStride, 0, 0); > ++ (*pPrim->funcs.maskfill)(pRow, > ++ NULL, 0, 0, > ++ endx - x, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ } > ++ x = endx; > ++ } > ++ } else if (rmin >= rmax) { > ++ /* We are not at 0 coverage, but there is no right edge, */ > ++ /* force a right edge so we process pixels out to width. */ > ++ rmax = width; > ++ } > ++ /* The following loop will process the right AA edge and/or any */ > ++ /* partial coverage center section not processed above. */ > ++ while (x < rmax) { > ++ accum += pAccum[x]; > ++ pAccum[x] = 0.0f; > ++ pMask[moff++] = lastcov = DblToMask(accum); > ++ x++; > ++ } > ++ if (moff > 0) { > ++ void *pRow = PtrCoord(pDst, x-moff, pRasInfo->pixelStride, 0, 0); > ++ (*pPrim->funcs.maskfill)(pRow, > ++ pMask, 0, 0, > ++ moff, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ } > ++ if (lastcov == 0xFF && x < width) { > ++ void *pRow = PtrCoord(pDst, x, pRasInfo->pixelStride, 0, 0); > ++ (*pPrim->funcs.maskfill)(pRow, > ++ NULL, 0, 0, > ++ width - x, 1, > ++ color, pRasInfo, > ++ pPrim, pCompInfo); > ++ } > ++ pDst = PtrAddBytes(pDst, pRasInfo->scanStride); > ++ cy1++; > ++ } > ++ if (pAccum != localaccum) { > ++ free(pAccum); > ++ } > ++} > ++ > ++/* > ++ * Class: sun_java2d_loops_MaskFill > ++ * Method: DrawAAPgram > ++ * Signature: (Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;Ljava/awt/Composite;DDDDDDDD)V > ++ */ > ++JNIEXPORT void JNICALL > ++Java_sun_java2d_loops_MaskFill_DrawAAPgram > ++ (JNIEnv *env, jobject self, > ++ jobject sg2d, jobject sData, jobject comp, > ++ jdouble x0, jdouble y0, > ++ jdouble dx1, jdouble dy1, > ++ jdouble dx2, jdouble dy2, > ++ jdouble lw1, jdouble lw2) > ++{ > ++ SurfaceDataOps *sdOps; > ++ SurfaceDataRasInfo rasInfo; > ++ NativePrimitive *pPrim; > ++ CompositeInfo compInfo; > ++ jint ix1, iy1, ix2, iy2; > ++ jdouble ldx1, ldy1, ldx2, ldy2; > ++ jdouble ox0, oy0; > ++ > ++ if ((dy1 == 0 && dx1 == 0) || (dy2 == 0 && dx2 == 0)) { > ++ return; > ++ } > ++ > ++ /* > ++ * Sort parallelogram by y values, ensure that each delta vector > ++ * has a non-negative y delta. > ++ */ > ++ SORT_PGRAM(x0, y0, dx1, dy1, dx2, dy2, > ++ v = lw1; lw1 = lw2; lw2 = v;); > ++ > ++ // dx,dy for line width in the "1" and "2" directions. > ++ ldx1 = dx1 * lw1; > ++ ldy1 = dy1 * lw1; > ++ ldx2 = dx2 * lw2; > ++ ldy2 = dy2 * lw2; > ++ > ++ // calculate origin of the outer parallelogram > ++ ox0 = x0 - (ldx1 + ldx2) / 2.0; > ++ oy0 = y0 - (ldy1 + ldy2) / 2.0; > ++ > ++ if (lw1 >= 1.0 || lw2 >= 1.0) { > ++ /* Only need to fill an outer pgram if the interior no longer > ++ * has a hole in it (i.e. if either of the line width ratios > ++ * were greater than or equal to 1.0). > ++ */ > ++ Java_sun_java2d_loops_MaskFill_FillAAPgram(env, self, > ++ sg2d, sData, comp, > ++ ox0, oy0, > ++ dx1 + ldx1, dy1 + ldy1, > ++ dx2 + ldx2, dy2 + ldy2); > ++ return; > ++ } > ++ > ++ PGRAM_MIN_MAX(ix1, ix2, ox0, dx1+ldx1, dx2+ldx2, JNI_TRUE); > ++ iy1 = (jint) floor(oy0); > ++ iy2 = (jint) ceil(oy0 + dy1 + ldy1 + dy2 + ldy2); > ++ > ++ pPrim = GetNativePrim(env, self); > ++ if (pPrim == NULL) { > ++ return; > ++ } > ++ if (pPrim->pCompType->getCompInfo != NULL) { > ++ (*pPrim->pCompType->getCompInfo)(env, &compInfo, comp); > ++ } > ++ > ++ sdOps = SurfaceData_GetOps(env, sData); > ++ if (sdOps == 0) { > ++ return; > ++ } > ++ > ++ GrPrim_Sg2dGetClip(env, sg2d, &rasInfo.bounds); > ++ SurfaceData_IntersectBoundsXYXY(&rasInfo.bounds, ix1, iy1, ix2, iy2); > ++ if (rasInfo.bounds.y2 <= rasInfo.bounds.y1 || > ++ rasInfo.bounds.x2 <= rasInfo.bounds.x1) > ++ { > ++ return; > ++ } > ++ > ++ if (sdOps->Lock(env, sdOps, &rasInfo, pPrim->dstflags) != SD_SUCCESS) { > ++ return; > ++ } > ++ > ++ ix1 = rasInfo.bounds.x1; > ++ iy1 = rasInfo.bounds.y1; > ++ ix2 = rasInfo.bounds.x2; > ++ iy2 = rasInfo.bounds.y2; > ++ if (ix2 > ix1 && iy2 > iy1) { > ++ jint width = ix2 - ix1; > ++ jint color = GrPrim_Sg2dGetEaRGB(env, sg2d); > ++ unsigned char localmask[MASK_BUF_LEN]; > ++ unsigned char *pMask = ((width > MASK_BUF_LEN) > ++ ? malloc(width) > ++ : localmask); > ++ > ++ sdOps->GetRasInfo(env, sdOps, &rasInfo); > ++ if (rasInfo.rasBase != NULL && pMask != NULL) { > ++ void *pDst = PtrCoord(rasInfo.rasBase, > ++ ix1, rasInfo.pixelStride, > ++ iy1, rasInfo.scanStride); > ++ /* > ++ * NOTE: aligned rects could probably be drawn > ++ * even faster with a little work here. > ++ * if (dy1 == 0 && dx2 == 0) { > ++ * drawAARect(pPrim, &rasInfo, &compInfo, > ++ * color, pMask, pDst, > ++ * ox0, oy0, ox0+dx1+ldx1, oy0+dy2+ldy2, ldx1, ldy2); > ++ * } else if (dx1 == 0 && dy2 == 0) { > ++ * drawAARect(pPrim, &rasInfo, &compInfo, > ++ * color, pMask, pDst, > ++ * ox0, oy0, ox0+dx2+ldx2, oy0+dy1+ldy1, ldx2, ldy1); > ++ * } else { > ++ */ > ++ drawAAPgram(pPrim, &rasInfo, &compInfo, > ++ color, pMask, pDst, > ++ ox0, oy0, > ++ dx1, dy1, dx2, dy2, > ++ ldx1, ldy1, ldx2, ldy2); > ++ /* > ++ * } > ++ */ > ++ } > ++ SurfaceData_InvokeRelease(env, sdOps, &rasInfo); > ++ if (pMask != NULL && pMask != localmask) { > ++ free(pMask); > ++ } > ++ } > ++ SurfaceData_InvokeUnlock(env, sdOps, &rasInfo); > ++} > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/native/sun/java2d/loops/ParallelogramUtils.h > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/ParallelogramUtils.h Tue Dec 14 13:25:29 2010 -0800 > +@@ -0,0 +1,83 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. Oracle designates this > ++ * particular file as subject to the "Classpath" exception as provided > ++ * by Oracle in the LICENSE file that accompanied this code. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++#ifndef ParallelogramUtils_h_Included > ++#define ParallelogramUtils_h_Included > ++ > ++#ifdef __cplusplus > ++extern "C" { > ++#endif > ++ > ++#define PGRAM_MIN_MAX(bmin, bmax, v0, dv1, dv2, AA) \ > ++ do { \ > ++ double vmin, vmax; \ > ++ if (dv1 < 0) { \ > ++ vmin = v0+dv1; \ > ++ vmax = v0; \ > ++ } else { \ > ++ vmin = v0; \ > ++ vmax = v0+dv1; \ > ++ } \ > ++ if (dv2 < 0) { \ > ++ vmin += dv2; \ > ++ } else { \ > ++ vmax += dv2; \ > ++ } \ > ++ if (AA) { \ > ++ bmin = (jint) floor(vmin); \ > ++ bmax = (jint) ceil(vmax); \ > ++ } else { \ > ++ bmin = (jint) floor(vmin + 0.5); \ > ++ bmax = (jint) floor(vmax + 0.5); \ > ++ } \ > ++ } while(0) > ++ > ++#define PGRAM_INIT_X(starty, x, y, slope) \ > ++ (DblToLong((x) + (slope) * ((starty)+0.5 - (y))) + LongOneHalf - 1) > ++ > ++/* > ++ * Sort parallelogram by y values, ensure that each delta vector > ++ * has a non-negative y delta. > ++ */ > ++#define SORT_PGRAM(x0, y0, dx1, dy1, dx2, dy2, OTHER_SWAP_CODE) \ > ++ do { \ > ++ if (dy1 < 0) { \ > ++ x0 += dx1; y0 += dy1; \ > ++ dx1 = -dx1; dy1 = -dy1; \ > ++ } \ > ++ if (dy2 < 0) { \ > ++ x0 += dx2; y0 += dy2; \ > ++ dx2 = -dx2; dy2 = -dy2; \ > ++ } \ > ++ /* Sort delta vectors so dxy1 is left of dxy2. */ \ > ++ if (dx1 * dy2 > dx2 * dy1) { \ > ++ double v; \ > ++ v = dx1; dx1 = dx2; dx2 = v; \ > ++ v = dy1; dy1 = dy2; dy2 = v; \ > ++ OTHER_SWAP_CODE \ > ++ } \ > ++ } while(0) > ++ > ++#endif /* ParallelogramUtils_h_Included */ > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/solaris/native/sun/java2d/loops/vis_IntArgbPre_Mask.c > +--- openjdk.orig/jdk/src/solaris/native/sun/java2d/loops/vis_IntArgbPre_Mask.c Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_IntArgbPre_Mask.c Tue Dec 14 13:25:29 2010 -0800 > +@@ -517,13 +517,15 @@ > + ADD_SUFF(AnyIntSetRect)(pRasInfo, 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > + #else > ++ void *pBase = pRasInfo->rasBase; > ++ pRasInfo->rasBase = rasBase; > + if (cnstA != 0xff) { > + fgColor = (cnstA << 24) | (cnstR << 16) | (cnstG << 8) | cnstB; > + } > + ADD_SUFF(AnyIntSetRect)(pRasInfo, > +- pRasInfo->bounds.x1, pRasInfo->bounds.y1, > +- pRasInfo->bounds.x2, pRasInfo->bounds.y2, > ++ 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > ++ pRasInfo->rasBase = pBase; > + #endif > + return; > + } > +@@ -582,11 +584,13 @@ > + } > + > + if (pMask == NULL) { > ++ void *pBase = pRasInfo->rasBase; > ++ pRasInfo->rasBase = rasBase; > + fgColor = (cnstR << 24) | (cnstG << 16) | (cnstB << 8) | cnstA; > + ADD_SUFF(Any4ByteSetRect)(pRasInfo, > +- pRasInfo->bounds.x1, pRasInfo->bounds.y1, > +- pRasInfo->bounds.x2, pRasInfo->bounds.y2, > ++ 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > ++ pRasInfo->rasBase = pBase; > + return; > + } > + > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/solaris/native/sun/java2d/loops/vis_SrcMaskFill.c > +--- openjdk.orig/jdk/src/solaris/native/sun/java2d/loops/vis_SrcMaskFill.c Fri Dec 10 16:14:04 2010 -0800 > ++++ openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_SrcMaskFill.c Tue Dec 14 13:25:29 2010 -0800 > +@@ -150,10 +150,12 @@ > + } > + > + if (pMask == NULL) { > ++ void *pBase = pRasInfo->rasBase; > ++ pRasInfo->rasBase = rasBase; > + ADD_SUFF(AnyIntSetRect)(pRasInfo, > +- pRasInfo->bounds.x1, pRasInfo->bounds.y1, > +- pRasInfo->bounds.x2, pRasInfo->bounds.y2, > ++ 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > ++ pRasInfo->rasBase = pBase; > + return; > + } > + > +@@ -214,15 +216,17 @@ > + cnstB = (fgColor ) & 0xff; > + > + if (pMask == NULL) { > ++ void *pBase = pRasInfo->rasBase; > ++ pRasInfo->rasBase = rasBase; > + if (cnstA == 0) { > + fgColor = 0; > + } else { > + fgColor = (fgColor << 8) | cnstA; > + } > + ADD_SUFF(Any4ByteSetRect)(pRasInfo, > +- pRasInfo->bounds.x1, pRasInfo->bounds.y1, > +- pRasInfo->bounds.x2, pRasInfo->bounds.y2, > ++ 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > ++ pRasInfo->rasBase = pBase; > + return; > + } > + > +@@ -390,10 +394,12 @@ > + if (cnstA == 0) fgColor = 0; > + > + if (pMask == NULL) { > ++ void *pBase = pRasInfo->rasBase; > ++ pRasInfo->rasBase = rasBase; > + ADD_SUFF(AnyIntSetRect)(pRasInfo, > +- pRasInfo->bounds.x1, pRasInfo->bounds.y1, > +- pRasInfo->bounds.x2, pRasInfo->bounds.y2, > ++ 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > ++ pRasInfo->rasBase = pBase; > + return; > + } > + > +@@ -458,10 +464,12 @@ > + } > + > + if (pMask == NULL) { > ++ void *pBase = pRasInfo->rasBase; > ++ pRasInfo->rasBase = rasBase; > + ADD_SUFF(AnyIntSetRect)(pRasInfo, > +- pRasInfo->bounds.x1, pRasInfo->bounds.y1, > +- pRasInfo->bounds.x2, pRasInfo->bounds.y2, > ++ 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > ++ pRasInfo->rasBase = pBase; > + return; > + } > + > +@@ -526,10 +534,12 @@ > + } > + > + if (pMask == NULL) { > ++ void *pBase = pRasInfo->rasBase; > ++ pRasInfo->rasBase = rasBase; > + ADD_SUFF(Any3ByteSetRect)(pRasInfo, > +- pRasInfo->bounds.x1, pRasInfo->bounds.y1, > +- pRasInfo->bounds.x2, pRasInfo->bounds.y2, > ++ 0, 0, width, height, > + fgColor, pPrim, pCompInfo); > ++ pRasInfo->rasBase = pBase; > + return; > + } > + > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 test/java/awt/Graphics2D/RenderClipTest/6766342.tests > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/java/awt/Graphics2D/RenderClipTest/6766342.tests Tue Dec 14 13:25:29 2010 -0800 > +@@ -0,0 +1,3 @@ > ++Filled AA Pure Rect(5, 29.4, 10, 10) > ++Stroked AA Pure Rect(5, 4.4, 10, 10) > ++Stroked AA Line(20, 20, -10, 20) > +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 test/java/awt/Graphics2D/RenderClipTest/RenderClipTest.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/java/awt/Graphics2D/RenderClipTest/RenderClipTest.java Tue Dec 14 13:25:29 2010 -0800 > +@@ -0,0 +1,1634 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6766342 > ++ * @summary Tests clipping invariance for AA rectangle and line primitives > ++ * @run main RenderClipTest -strict -readfile 6766342.tests > ++ * @run main RenderClipTest -rectsuite -count 10 > ++ */ > ++ > ++import java.awt.*; > ++import java.awt.geom.*; > ++import java.awt.image.*; > ++import java.awt.event.*; > ++import java.util.Vector; > ++import java.io.*; > ++ > ++public class RenderClipTest { > ++ public static double randDblCoord() { > ++ return Math.random()*60 - 10; > ++ } > ++ > ++ public static float randFltCoord() { > ++ return (float) randDblCoord(); > ++ } > ++ > ++ public static int randIntCoord() { > ++ return (int) Math.round(randDblCoord()); > ++ } > ++ > ++ public static int randInt(int n) { > ++ return ((int) (Math.random() * (n*4))) >> 2; > ++ } > ++ > ++ static int numtests; > ++ static int numerrors; > ++ static int numfillfailures; > ++ static int numstrokefailures; > ++ static int maxerr; > ++ > ++ static boolean useAA; > ++ static boolean strokePure; > ++ static boolean testFill; > ++ static boolean testDraw; > ++ static boolean silent; > ++ static boolean verbose; > ++ static boolean strict; > ++ static boolean showErrors; > ++ static float lw; > ++ static double rot; > ++ > ++ static BufferedImage imgref; > ++ static BufferedImage imgtst; > ++ > ++ static Graphics2D grefclear; > ++ static Graphics2D gtstclear; > ++ static Graphics2D grefrender; > ++ static Graphics2D gtstrender; > ++ > ++ public static abstract class AnnotatedRenderOp { > ++ public static AnnotatedRenderOp parse(String str) { > ++ AnnotatedRenderOp ar; > ++ if (((ar = Cubic.tryparse(str)) != null) || > ++ ((ar = Quad.tryparse(str)) != null) || > ++ ((ar = Poly.tryparse(str)) != null) || > ++ ((ar = Path.tryparse(str)) != null) || > ++ ((ar = Rect.tryparse(str)) != null) || > ++ ((ar = Line.tryparse(str)) != null) || > ++ ((ar = RectMethod.tryparse(str)) != null) || > ++ ((ar = LineMethod.tryparse(str)) != null)) > ++ { > ++ return ar; > ++ } > ++ System.err.println("Unable to parse shape: "+str); > ++ return null; > ++ } > ++ > ++ public abstract void randomize(); > ++ > ++ public abstract void fill(Graphics2D g2d); > ++ > ++ public abstract void draw(Graphics2D g2d); > ++ } > ++ > ++ public static abstract class AnnotatedShapeOp extends AnnotatedRenderOp { > ++ public abstract Shape getShape(); > ++ > ++ public void fill(Graphics2D g2d) { > ++ g2d.fill(getShape()); > ++ } > ++ > ++ public void draw(Graphics2D g2d) { > ++ g2d.draw(getShape()); > ++ } > ++ } > ++ > ++ public static void usage(String err) { > ++ if (err != null) { > ++ System.err.println(err); > ++ } > ++ System.err.println("usage: java RenderClipTest "+ > ++ "[-read[file F]] [-rectsuite] [-fill] [-draw]"); > ++ System.err.println(" "+ > ++ "[-aa] [-pure] [-lw N] [-rot N]"); > ++ System.err.println(" "+ > ++ "[-rectmethod] [-linemethod] [-rect] [-line]"); > ++ System.err.println(" "+ > ++ "[-cubic] [-quad] [-poly] [-path]"); > ++ System.err.println(" "+ > ++ "[-silent] [-verbose] [-showerr] [-count N]"); > ++ System.err.println(" "+ > ++ "[-strict] [-usage]"); > ++ System.err.println(" -read Read test data from stdin"); > ++ System.err.println(" -readfile F Read test data from file F"); > ++ System.err.println(" -rectsuite Run a suite of rect/line tests"); > ++ System.err.println(" -fill Test g.fill*(...)"); > ++ System.err.println(" -draw Test g.draw*(...)"); > ++ System.err.println(" -aa Use antialiased rendering"); > ++ System.err.println(" -pure Use STROKE_PURE hint"); > ++ System.err.println(" -lw N Test line widths of N "+ > ++ "(default 1.0)"); > ++ System.err.println(" -rot N Test rotation by N degrees "+ > ++ "(default 0.0)"); > ++ System.err.println(" -rectmethod Test fillRect/drawRect methods"); > ++ System.err.println(" -linemethod Test drawLine method"); > ++ System.err.println(" -rect Test Rectangle2D shapes"); > ++ System.err.println(" -line Test Line2D shapes"); > ++ System.err.println(" -cubic Test CubicCurve2D shapes"); > ++ System.err.println(" -quad Test QuadCurve2D shapes"); > ++ System.err.println(" -poly Test Polygon shapes"); > ++ System.err.println(" -path Test GeneralPath shapes"); > ++ System.err.println(" -silent Do not print out error curves"); > ++ System.err.println(" -verbose Print out progress info"); > ++ System.err.println(" -showerr Display errors on screen"); > ++ System.err.println(" -count N N tests per shape, then exit "+ > ++ "(default 1000)"); > ++ System.err.println(" -strict All failures are important"); > ++ System.err.println(" -usage Print this help, then exit"); > ++ System.exit((err != null) ? -1 : 0); > ++ } > ++ > ++ public static void main(String argv[]) { > ++ boolean readTests = false; > ++ String readFile = null; > ++ boolean rectsuite = false; > ++ int count = 1000; > ++ lw = 1.0f; > ++ rot = 0.0; > ++ Vector testOps = new Vector(); > ++ for (int i = 0; i < argv.length; i++) { > ++ String arg = argv[i].toLowerCase(); > ++ if (arg.equals("-aa")) { > ++ useAA = true; > ++ } else if (arg.equals("-pure")) { > ++ strokePure = true; > ++ } else if (arg.equals("-fill")) { > ++ testFill = true; > ++ } else if (arg.equals("-draw")) { > ++ testDraw = true; > ++ } else if (arg.equals("-lw")) { > ++ if (i+1 >= argv.length) { > ++ usage("Missing argument: "+argv[i]); > ++ } > ++ lw = Float.parseFloat(argv[++i]); > ++ } else if (arg.equals("-rot")) { > ++ if (i+1 >= argv.length) { > ++ usage("Missing argument: "+argv[i]); > ++ } > ++ rot = Double.parseDouble(argv[++i]); > ++ } else if (arg.equals("-cubic")) { > ++ testOps.add(new Cubic()); > ++ } else if (arg.equals("-quad")) { > ++ testOps.add(new Quad()); > ++ } else if (arg.equals("-poly")) { > ++ testOps.add(new Poly()); > ++ } else if (arg.equals("-path")) { > ++ testOps.add(new Path()); > ++ } else if (arg.equals("-rect")) { > ++ testOps.add(new Rect()); > ++ } else if (arg.equals("-line")) { > ++ testOps.add(new Line()); > ++ } else if (arg.equals("-rectmethod")) { > ++ testOps.add(new RectMethod()); > ++ } else if (arg.equals("-linemethod")) { > ++ testOps.add(new LineMethod()); > ++ } else if (arg.equals("-verbose")) { > ++ verbose = true; > ++ } else if (arg.equals("-strict")) { > ++ strict = true; > ++ } else if (arg.equals("-silent")) { > ++ silent = true; > ++ } else if (arg.equals("-showerr")) { > ++ showErrors = true; > ++ } else if (arg.equals("-readfile")) { > ++ if (i+1 >= argv.length) { > ++ usage("Missing argument: "+argv[i]); > ++ } > ++ readTests = true; > ++ readFile = argv[++i]; > ++ } else if (arg.equals("-read")) { > ++ readTests = true; > ++ readFile = null; > ++ } else if (arg.equals("-rectsuite")) { > ++ rectsuite = true; > ++ } else if (arg.equals("-count")) { > ++ if (i+1 >= argv.length) { > ++ usage("Missing argument: "+argv[i]); > ++ } > ++ count = Integer.parseInt(argv[++i]); > ++ } else if (arg.equals("-usage")) { > ++ usage(null); > ++ } else { > ++ usage("Unknown argument: "+argv[i]); > ++ } > ++ } > ++ if (readTests) { > ++ if (rectsuite || testDraw || testFill || > ++ useAA || strokePure || > ++ lw != 1.0f || rot != 0.0 || > ++ testOps.size() > 0) > ++ { > ++ usage("Should not specify test types with -read options"); > ++ } > ++ } else if (rectsuite) { > ++ if (testDraw || testFill || > ++ useAA || strokePure || > ++ lw != 1.0f || rot != 0.0 || > ++ testOps.size() > 0) > ++ { > ++ usage("Should not specify test types with -rectsuite option"); > ++ } > ++ } else { > ++ if (!testDraw && !testFill) { > ++ usage("No work: Must specify one or both of "+ > ++ "-fill or -draw"); > ++ } > ++ if (testOps.size() == 0) { > ++ usage("No work: Must specify one or more of "+ > ++ "-rect[method], -line[method], "+ > ++ "-cubic, -quad, -poly, or -path"); > ++ } > ++ } > ++ initImages(); > ++ if (readTests) { > ++ try { > ++ InputStream is; > ++ if (readFile == null) { > ++ is = System.in; > ++ } else { > ++ File f = > ++ new File(System.getProperty("test.src", "."), > ++ readFile); > ++ is = new FileInputStream(f); > ++ } > ++ parseAndRun(is); > ++ } catch (IOException e) { > ++ throw new RuntimeException(e); > ++ } > ++ } else if (rectsuite) { > ++ runRectSuite(count); > ++ } else { > ++ initGCs(); > ++ for (int k = 0; k < testOps.size(); k++) { > ++ AnnotatedRenderOp ar = testOps.get(k); > ++ runRandomTests(ar, count); > ++ } > ++ disposeGCs(); > ++ } > ++ grefclear.dispose(); > ++ gtstclear.dispose(); > ++ grefclear = gtstclear = null; > ++ reportStatistics(); > ++ } > ++ > ++ public static int reportStatistics() { > ++ String connector = ""; > ++ if (numfillfailures > 0) { > ++ System.out.print(numfillfailures+" fills "); > ++ connector = "and "; > ++ } > ++ if (numstrokefailures > 0) { > ++ System.out.print(connector+numstrokefailures+" strokes "); > ++ } > ++ int totalfailures = numfillfailures + numstrokefailures; > ++ if (totalfailures == 0) { > ++ System.out.print("0 "); > ++ } > ++ System.out.println("out of "+numtests+" tests failed..."); > ++ int critical = numerrors; > ++ if (strict) { > ++ critical += totalfailures; > ++ } > ++ if (critical > 0) { > ++ throw new RuntimeException(critical+" tests had critical errors"); > ++ } > ++ System.out.println("No tests had critical errors"); > ++ return (numerrors+totalfailures); > ++ } > ++ > ++ public static void runRectSuite(int count) { > ++ AnnotatedRenderOp ops[] = { > ++ new Rect(), > ++ new RectMethod(), > ++ new Line(), > ++ new LineMethod(), > ++ }; > ++ // Sometimes different fill algorithms are chosen for > ++ // thin and wide line modes, make sure we test both... > ++ float filllinewidths[] = { 0.0f, 2.0f }; > ++ float drawlinewidths[] = { 0.0f, 0.5f, 1.0f, > ++ 2.0f, 2.5f, > ++ 5.0f, 5.3f }; > ++ double rotations[] = { 0.0, 15.0, 90.0, > ++ 135.0, 180.0, > ++ 200.0, 270.0, > ++ 300.0}; > ++ for (AnnotatedRenderOp ar: ops) { > ++ for (double r: rotations) { > ++ rot = r; > ++ for (int i = 0; i < 8; i++) { > ++ float linewidths[]; > ++ if ((i & 1) == 0) { > ++ if ((ar instanceof Line) || > ++ (ar instanceof LineMethod)) > ++ { > ++ continue; > ++ } > ++ testFill = true; > ++ testDraw = false; > ++ linewidths = filllinewidths; > ++ } else { > ++ testFill = false; > ++ testDraw = true; > ++ linewidths = drawlinewidths; > ++ } > ++ useAA = ((i & 2) != 0); > ++ strokePure = ((i & 4) != 0); > ++ for (float w : linewidths) { > ++ lw = w; > ++ runSuiteTests(ar, count); > ++ } > ++ } > ++ } > ++ } > ++ } > ++ > ++ public static void runSuiteTests(AnnotatedRenderOp ar, int count) { > ++ if (verbose) { > ++ System.out.print("Running "); > ++ System.out.print(testFill ? "Fill " : "Draw "); > ++ System.out.print(BaseName(ar)); > ++ if (useAA) { > ++ System.out.print(" AA"); > ++ } > ++ if (strokePure) { > ++ System.out.print(" Pure"); > ++ } > ++ if (lw != 1.0f) { > ++ System.out.print(" lw="+lw); > ++ } > ++ if (rot != 0.0f) { > ++ System.out.print(" rot="+rot); > ++ } > ++ System.out.println(); > ++ } > ++ initGCs(); > ++ runRandomTests(ar, count); > ++ disposeGCs(); > ++ } > ++ > ++ public static String BaseName(AnnotatedRenderOp ar) { > ++ String s = ar.toString(); > ++ int leftparen = s.indexOf('('); > ++ if (leftparen >= 0) { > ++ s = s.substring(0, leftparen); > ++ } > ++ return s; > ++ } > ++ > ++ public static void runRandomTests(AnnotatedRenderOp ar, int count) { > ++ for (int i = 0; i < count; i++) { > ++ ar.randomize(); > ++ if (testDraw) { > ++ test(ar, false); > ++ } > ++ if (testFill) { > ++ test(ar, true); > ++ } > ++ } > ++ } > ++ > ++ public static void initImages() { > ++ imgref = new BufferedImage(40, 40, BufferedImage.TYPE_INT_RGB); > ++ imgtst = new BufferedImage(40, 40, BufferedImage.TYPE_INT_RGB); > ++ grefclear = imgref.createGraphics(); > ++ gtstclear = imgtst.createGraphics(); > ++ grefclear.setColor(Color.white); > ++ gtstclear.setColor(Color.white); > ++ } > ++ > ++ public static void initGCs() { > ++ grefrender = imgref.createGraphics(); > ++ gtstrender = imgtst.createGraphics(); > ++ gtstrender.clipRect(10, 10, 20, 20); > ++ grefrender.setColor(Color.blue); > ++ gtstrender.setColor(Color.blue); > ++ if (lw != 1.0f) { > ++ BasicStroke bs = new BasicStroke(lw); > ++ grefrender.setStroke(bs); > ++ gtstrender.setStroke(bs); > ++ } > ++ if (rot != 0.0) { > ++ double rotrad = Math.toRadians(rot); > ++ grefrender.rotate(rotrad, 20, 20); > ++ gtstrender.rotate(rotrad, 20, 20); > ++ } > ++ if (strokePure) { > ++ grefrender.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, > ++ RenderingHints.VALUE_STROKE_PURE); > ++ gtstrender.setRenderingHint(RenderingHints.KEY_STROKE_CONTROL, > ++ RenderingHints.VALUE_STROKE_PURE); > ++ } > ++ if (useAA) { > ++ grefrender.setRenderingHint(RenderingHints.KEY_ANTIALIASING, > ++ RenderingHints.VALUE_ANTIALIAS_ON); > ++ gtstrender.setRenderingHint(RenderingHints.KEY_ANTIALIASING, > ++ RenderingHints.VALUE_ANTIALIAS_ON); > ++ maxerr = 1; > ++ } > ++ } > ++ > ++ public static void disposeGCs() { > ++ grefrender.dispose(); > ++ gtstrender.dispose(); > ++ grefrender = gtstrender = null; > ++ } > ++ > ++ public static void parseAndRun(InputStream in) throws IOException { > ++ BufferedReader br = new BufferedReader(new InputStreamReader(in)); > ++ String str; > ++ while ((str = br.readLine()) != null) { > ++ if (str.startsWith("Stroked ") || str.startsWith("Filled ")) { > ++ parseTest(str); > ++ continue; > ++ } > ++ if (str.startsWith("Running ")) { > ++ continue; > ++ } > ++ if (str.startsWith("Failed: ")) { > ++ continue; > ++ } > ++ if (str.indexOf(" out of ") > 0 && > ++ str.indexOf(" tests failed...") > 0) > ++ { > ++ continue; > ++ } > ++ if (str.indexOf(" tests had critical errors") > 0) { > ++ continue; > ++ } > ++ System.err.println("Unparseable line: "+str); > ++ } > ++ } > ++ > ++ public static void parseTest(String origstr) { > ++ String str = origstr; > ++ boolean isfill = false; > ++ useAA = strokePure = false; > ++ lw = 1.0f; > ++ rot = 0.0; > ++ if (str.startsWith("Stroked ")) { > ++ str = str.substring(8); > ++ isfill = false; > ++ } else if (str.startsWith("Filled ")) { > ++ str = str.substring(7); > ++ isfill = true; > ++ } else { > ++ System.err.println("Unparseable test line: "+origstr); > ++ } > ++ if (str.startsWith("AA ")) { > ++ str = str.substring(3); > ++ useAA = true; > ++ } > ++ if (str.startsWith("Pure ")) { > ++ str = str.substring(5); > ++ strokePure = true; > ++ } > ++ if (str.startsWith("Lw=")) { > ++ int index = str.indexOf(' ', 3); > ++ if (index > 0) { > ++ lw = Float.parseFloat(str.substring(3, index)); > ++ str = str.substring(index+1); > ++ } > ++ } > ++ if (str.startsWith("Rot=")) { > ++ int index = str.indexOf(' ', 4); > ++ if (index > 0) { > ++ rot = Double.parseDouble(str.substring(4, index)); > ++ str = str.substring(index+1); > ++ } > ++ } > ++ AnnotatedRenderOp ar = AnnotatedRenderOp.parse(str); > ++ if (ar != null) { > ++ initGCs(); > ++ test(ar, isfill); > ++ disposeGCs(); > ++ } else { > ++ System.err.println("Unparseable test line: "+origstr); > ++ } > ++ } > ++ > ++ public static void test(AnnotatedRenderOp ar, boolean isfill) { > ++ grefclear.fillRect(0, 0, 40, 40); > ++ gtstclear.fillRect(0, 0, 40, 40); > ++ if (isfill) { > ++ ar.fill(grefrender); > ++ ar.fill(gtstrender); > ++ } else { > ++ ar.draw(grefrender); > ++ ar.draw(gtstrender); > ++ } > ++ check(imgref, imgtst, ar, isfill); > ++ } > ++ > ++ public static int[] getData(BufferedImage img) { > ++ Raster r = img.getRaster(); > ++ DataBufferInt dbi = (DataBufferInt) r.getDataBuffer(); > ++ return dbi.getData(); > ++ } > ++ > ++ public static int getScan(BufferedImage img) { > ++ Raster r = img.getRaster(); > ++ SinglePixelPackedSampleModel sppsm = > ++ (SinglePixelPackedSampleModel) r.getSampleModel(); > ++ return sppsm.getScanlineStride(); > ++ } > ++ > ++ public static int getOffset(BufferedImage img) { > ++ Raster r = img.getRaster(); > ++ SinglePixelPackedSampleModel sppsm = > ++ (SinglePixelPackedSampleModel) r.getSampleModel(); > ++ return sppsm.getOffset(-r.getSampleModelTranslateX(), > ++ -r.getSampleModelTranslateY()); > ++ } > ++ > ++ final static int opaque = 0xff000000; > ++ final static int whitergb = Color.white.getRGB(); > ++ > ++ public static final int maxdiff(int rgb1, int rgb2) { > ++ int maxd = 0; > ++ for (int i = 0; i < 32; i += 8) { > ++ int c1 = (rgb1 >> i) & 0xff; > ++ int c2 = (rgb2 >> i) & 0xff; > ++ int d = Math.abs(c1-c2); > ++ if (maxd < d) { > ++ maxd = d; > ++ } > ++ } > ++ return maxd; > ++ } > ++ > ++ public static void check(BufferedImage imgref, BufferedImage imgtst, > ++ AnnotatedRenderOp ar, boolean wasfill) > ++ { > ++ numtests++; > ++ int dataref[] = getData(imgref); > ++ int datatst[] = getData(imgtst); > ++ int scanref = getScan(imgref); > ++ int scantst = getScan(imgtst); > ++ int offref = getOffset(imgref); > ++ int offtst = getOffset(imgtst); > ++ > ++ // We want to check for errors outside the clip at a higher > ++ // priority than errors involving different pixels touched > ++ // inside the clip. > ++ > ++ // Check above clip > ++ if (check(ar, wasfill, > ++ null, 0, 0, > ++ datatst, scantst, offtst, > ++ 0, 0, 40, 10)) > ++ { > ++ return; > ++ } > ++ // Check below clip > ++ if (check(ar, wasfill, > ++ null, 0, 0, > ++ datatst, scantst, offtst, > ++ 0, 30, 40, 40)) > ++ { > ++ return; > ++ } > ++ // Check left of clip > ++ if (check(ar, wasfill, > ++ null, 0, 0, > ++ datatst, scantst, offtst, > ++ 0, 10, 10, 30)) > ++ { > ++ return; > ++ } > ++ // Check right of clip > ++ if (check(ar, wasfill, > ++ null, 0, 0, > ++ datatst, scantst, offtst, > ++ 30, 10, 40, 30)) > ++ { > ++ return; > ++ } > ++ // Check inside clip > ++ check(ar, wasfill, > ++ dataref, scanref, offref, > ++ datatst, scantst, offtst, > ++ 10, 10, 30, 30); > ++ } > ++ > ++ public static boolean check(AnnotatedRenderOp ar, boolean wasfill, > ++ int dataref[], int scanref, int offref, > ++ int datatst[], int scantst, int offtst, > ++ int x0, int y0, int x1, int y1) > ++ { > ++ offref += scanref * y0; > ++ offtst += scantst * y0; > ++ for (int y = y0; y < y1; y++) { > ++ for (int x = x0; x < x1; x++) { > ++ boolean failed; > ++ String reason; > ++ int rgbref; > ++ int rgbtst; > ++ > ++ rgbtst = datatst[offtst+x] | opaque; > ++ if (dataref == null) { > ++ /* Outside of clip, must be white, no error tolerance */ > ++ rgbref = whitergb; > ++ failed = (rgbtst != rgbref); > ++ reason = "stray pixel rendered outside of clip"; > ++ } else { > ++ /* Inside of clip, check for maxerr delta in components */ > ++ rgbref = dataref[offref+x] | opaque; > ++ failed = (rgbref != rgbtst && > ++ maxdiff(rgbref, rgbtst) > maxerr); > ++ reason = "different pixel rendered inside clip"; > ++ } > ++ if (failed) { > ++ if (dataref == null) { > ++ numerrors++; > ++ } > ++ if (wasfill) { > ++ numfillfailures++; > ++ } else { > ++ numstrokefailures++; > ++ } > ++ if (!silent) { > ++ System.out.println("Failed: "+reason+" at "+x+", "+y+ > ++ " ["+Integer.toHexString(rgbref)+ > ++ " != "+Integer.toHexString(rgbtst)+ > ++ "]"); > ++ System.out.print(wasfill ? "Filled " : "Stroked "); > ++ if (useAA) System.out.print("AA "); > ++ if (strokePure) System.out.print("Pure "); > ++ if (lw != 1) System.out.print("Lw="+lw+" "); > ++ if (rot != 0) System.out.print("Rot="+rot+" "); > ++ System.out.println(ar); > ++ } > ++ if (showErrors) { > ++ show(imgref, imgtst); > ++ } > ++ return true; > ++ } > ++ } > ++ offref += scanref; > ++ offtst += scantst; > ++ } > ++ return false; > ++ } > ++ > ++ static ErrorWindow errw; > ++ > ++ public static void show(BufferedImage imgref, BufferedImage imgtst) { > ++ ErrorWindow errw = new ErrorWindow(); > ++ errw.setImages(imgref, imgtst); > ++ errw.setVisible(true); > ++ errw.waitForHide(); > ++ errw.dispose(); > ++ } > ++ > ++ public static class Cubic extends AnnotatedShapeOp { > ++ public static Cubic tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("Cubic(")) { > ++ return null; > ++ } > ++ str = str.substring(6); > ++ double coords[] = new double[8]; > ++ boolean foundparen = false; > ++ for (int i = 0; i < coords.length; i++) { > ++ int index = str.indexOf(","); > ++ if (index < 0) { > ++ if (i < coords.length-1) { > ++ return null; > ++ } > ++ index = str.indexOf(")"); > ++ if (index < 0) { > ++ return null; > ++ } > ++ foundparen = true; > ++ } > ++ String num = str.substring(0, index); > ++ try { > ++ coords[i] = Double.parseDouble(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ } > ++ if (!foundparen || str.length() > 0) { > ++ return null; > ++ } > ++ Cubic c = new Cubic(); > ++ c.cubic.setCurve(coords[0], coords[1], > ++ coords[2], coords[3], > ++ coords[4], coords[5], > ++ coords[6], coords[7]); > ++ return c; > ++ } > ++ > ++ private CubicCurve2D cubic = new CubicCurve2D.Double(); > ++ > ++ public void randomize() { > ++ cubic.setCurve(randDblCoord(), randDblCoord(), > ++ randDblCoord(), randDblCoord(), > ++ randDblCoord(), randDblCoord(), > ++ randDblCoord(), randDblCoord()); > ++ } > ++ > ++ public Shape getShape() { > ++ return cubic; > ++ } > ++ > ++ public String toString() { > ++ return ("Cubic("+ > ++ cubic.getX1()+", "+ > ++ cubic.getY1()+", "+ > ++ cubic.getCtrlX1()+", "+ > ++ cubic.getCtrlY1()+", "+ > ++ cubic.getCtrlX2()+", "+ > ++ cubic.getCtrlY2()+", "+ > ++ cubic.getX2()+", "+ > ++ cubic.getY2() > ++ +")"); > ++ } > ++ } > ++ > ++ public static class Quad extends AnnotatedShapeOp { > ++ public static Quad tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("Quad(")) { > ++ return null; > ++ } > ++ str = str.substring(5); > ++ double coords[] = new double[6]; > ++ boolean foundparen = false; > ++ for (int i = 0; i < coords.length; i++) { > ++ int index = str.indexOf(","); > ++ if (index < 0) { > ++ if (i < coords.length-1) { > ++ return null; > ++ } > ++ index = str.indexOf(")"); > ++ if (index < 0) { > ++ return null; > ++ } > ++ foundparen = true; > ++ } > ++ String num = str.substring(0, index); > ++ try { > ++ coords[i] = Double.parseDouble(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ } > ++ if (!foundparen || str.length() > 0) { > ++ return null; > ++ } > ++ Quad c = new Quad(); > ++ c.quad.setCurve(coords[0], coords[1], > ++ coords[2], coords[3], > ++ coords[4], coords[5]); > ++ return c; > ++ } > ++ > ++ private QuadCurve2D quad = new QuadCurve2D.Double(); > ++ > ++ public void randomize() { > ++ quad.setCurve(randDblCoord(), randDblCoord(), > ++ randDblCoord(), randDblCoord(), > ++ randDblCoord(), randDblCoord()); > ++ } > ++ > ++ public Shape getShape() { > ++ return quad; > ++ } > ++ > ++ public String toString() { > ++ return ("Quad("+ > ++ quad.getX1()+", "+ > ++ quad.getY1()+", "+ > ++ quad.getCtrlX()+", "+ > ++ quad.getCtrlY()+", "+ > ++ quad.getX2()+", "+ > ++ quad.getY2() > ++ +")"); > ++ } > ++ } > ++ > ++ public static class Poly extends AnnotatedShapeOp { > ++ public static Poly tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("Poly(")) { > ++ return null; > ++ } > ++ str = str.substring(5); > ++ Polygon p = new Polygon(); > ++ while (true) { > ++ int x, y; > ++ str = str.trim(); > ++ if (str.startsWith(")")) { > ++ str = str.substring(1); > ++ break; > ++ } > ++ if (p.npoints > 0) { > ++ if (str.startsWith(",")) { > ++ str = str.substring(2).trim(); > ++ } else { > ++ return null; > ++ } > ++ } > ++ if (str.startsWith("[")) { > ++ str = str.substring(1); > ++ } else { > ++ return null; > ++ } > ++ int index = str.indexOf(","); > ++ if (index < 0) { > ++ return null; > ++ } > ++ String num = str.substring(0, index); > ++ try { > ++ x = Integer.parseInt(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ index = str.indexOf("]"); > ++ if (index < 0) { > ++ return null; > ++ } > ++ num = str.substring(0, index).trim(); > ++ try { > ++ y = Integer.parseInt(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ p.addPoint(x, y); > ++ } > ++ if (str.length() > 0) { > ++ return null; > ++ } > ++ if (p.npoints < 3) { > ++ return null; > ++ } > ++ return new Poly(p); > ++ } > ++ > ++ private Polygon poly; > ++ > ++ public Poly() { > ++ this.poly = new Polygon(); > ++ } > ++ > ++ private Poly(Polygon p) { > ++ this.poly = p; > ++ } > ++ > ++ public void randomize() { > ++ poly.reset(); > ++ poly.addPoint(randIntCoord(), randIntCoord()); > ++ poly.addPoint(randIntCoord(), randIntCoord()); > ++ poly.addPoint(randIntCoord(), randIntCoord()); > ++ poly.addPoint(randIntCoord(), randIntCoord()); > ++ poly.addPoint(randIntCoord(), randIntCoord()); > ++ } > ++ > ++ public Shape getShape() { > ++ return poly; > ++ } > ++ > ++ public String toString() { > ++ StringBuffer sb = new StringBuffer(100); > ++ sb.append("Poly("); > ++ for (int i = 0; i < poly.npoints; i++) { > ++ if (i != 0) { > ++ sb.append(", "); > ++ } > ++ sb.append("["); > ++ sb.append(poly.xpoints[i]); > ++ sb.append(", "); > ++ sb.append(poly.ypoints[i]); > ++ sb.append("]"); > ++ } > ++ sb.append(")"); > ++ return sb.toString(); > ++ } > ++ } > ++ > ++ public static class Path extends AnnotatedShapeOp { > ++ public static Path tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("Path(")) { > ++ return null; > ++ } > ++ str = str.substring(5); > ++ GeneralPath gp = new GeneralPath(); > ++ float coords[] = new float[6]; > ++ int numsegs = 0; > ++ while (true) { > ++ int type; > ++ int n; > ++ str = str.trim(); > ++ if (str.startsWith(")")) { > ++ str = str.substring(1); > ++ break; > ++ } > ++ if (str.startsWith("M[")) { > ++ type = PathIterator.SEG_MOVETO; > ++ n = 2; > ++ } else if (str.startsWith("L[")) { > ++ type = PathIterator.SEG_LINETO; > ++ n = 2; > ++ } else if (str.startsWith("Q[")) { > ++ type = PathIterator.SEG_QUADTO; > ++ n = 4; > ++ } else if (str.startsWith("C[")) { > ++ type = PathIterator.SEG_CUBICTO; > ++ n = 6; > ++ } else if (str.startsWith("E[")) { > ++ type = PathIterator.SEG_CLOSE; > ++ n = 0; > ++ } else { > ++ return null; > ++ } > ++ str = str.substring(2); > ++ if (n == 0) { > ++ if (str.startsWith("]")) { > ++ str = str.substring(1); > ++ } else { > ++ return null; > ++ } > ++ } > ++ for (int i = 0; i < n; i++) { > ++ int index; > ++ if (i < n-1) { > ++ index = str.indexOf(","); > ++ } else { > ++ index = str.indexOf("]"); > ++ } > ++ if (index < 0) { > ++ return null; > ++ } > ++ String num = str.substring(0, index); > ++ try { > ++ coords[i] = Float.parseFloat(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1).trim(); > ++ } > ++ switch (type) { > ++ case PathIterator.SEG_MOVETO: > ++ gp.moveTo(coords[0], coords[1]); > ++ break; > ++ case PathIterator.SEG_LINETO: > ++ gp.lineTo(coords[0], coords[1]); > ++ break; > ++ case PathIterator.SEG_QUADTO: > ++ gp.quadTo(coords[0], coords[1], > ++ coords[2], coords[3]); > ++ break; > ++ case PathIterator.SEG_CUBICTO: > ++ gp.curveTo(coords[0], coords[1], > ++ coords[2], coords[3], > ++ coords[4], coords[5]); > ++ break; > ++ case PathIterator.SEG_CLOSE: > ++ gp.closePath(); > ++ break; > ++ } > ++ numsegs++; > ++ } > ++ if (str.length() > 0) { > ++ return null; > ++ } > ++ if (numsegs < 2) { > ++ return null; > ++ } > ++ return new Path(gp); > ++ } > ++ > ++ private GeneralPath path; > ++ > ++ public Path() { > ++ this.path = new GeneralPath(); > ++ } > ++ > ++ private Path(GeneralPath gp) { > ++ this.path = gp; > ++ } > ++ > ++ public void randomize() { > ++ path.reset(); > ++ path.moveTo(randFltCoord(), randFltCoord()); > ++ for (int i = randInt(5)+3; i > 0; --i) { > ++ switch(randInt(5)) { > ++ case 0: > ++ path.moveTo(randFltCoord(), randFltCoord()); > ++ break; > ++ case 1: > ++ path.lineTo(randFltCoord(), randFltCoord()); > ++ break; > ++ case 2: > ++ path.quadTo(randFltCoord(), randFltCoord(), > ++ randFltCoord(), randFltCoord()); > ++ break; > ++ case 3: > ++ path.curveTo(randFltCoord(), randFltCoord(), > ++ randFltCoord(), randFltCoord(), > ++ randFltCoord(), randFltCoord()); > ++ break; > ++ case 4: > ++ path.closePath(); > ++ break; > ++ } > ++ } > ++ } > ++ > ++ public Shape getShape() { > ++ return path; > ++ } > ++ > ++ public String toString() { > ++ StringBuffer sb = new StringBuffer(100); > ++ sb.append("Path("); > ++ PathIterator pi = path.getPathIterator(null); > ++ float coords[] = new float[6]; > ++ boolean first = true; > ++ while (!pi.isDone()) { > ++ int n; > ++ char c; > ++ switch(pi.currentSegment(coords)) { > ++ case PathIterator.SEG_MOVETO: > ++ c = 'M'; > ++ n = 2; > ++ break; > ++ case PathIterator.SEG_LINETO: > ++ c = 'L'; > ++ n = 2; > ++ break; > ++ case PathIterator.SEG_QUADTO: > ++ c = 'Q'; > ++ n = 4; > ++ break; > ++ case PathIterator.SEG_CUBICTO: > ++ c = 'C'; > ++ n = 6; > ++ break; > ++ case PathIterator.SEG_CLOSE: > ++ c = 'E'; > ++ n = 0; > ++ break; > ++ default: > ++ throw new InternalError("Unknown segment!"); > ++ } > ++ sb.append(c); > ++ sb.append("["); > ++ for (int i = 0; i < n; i++) { > ++ if (i != 0) { > ++ sb.append(","); > ++ } > ++ sb.append(coords[i]); > ++ } > ++ sb.append("]"); > ++ pi.next(); > ++ } > ++ sb.append(")"); > ++ return sb.toString(); > ++ } > ++ } > ++ > ++ public static class Rect extends AnnotatedShapeOp { > ++ public static Rect tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("Rect(")) { > ++ return null; > ++ } > ++ str = str.substring(5); > ++ double coords[] = new double[4]; > ++ boolean foundparen = false; > ++ for (int i = 0; i < coords.length; i++) { > ++ int index = str.indexOf(","); > ++ if (index < 0) { > ++ if (i < coords.length-1) { > ++ return null; > ++ } > ++ index = str.indexOf(")"); > ++ if (index < 0) { > ++ return null; > ++ } > ++ foundparen = true; > ++ } > ++ String num = str.substring(0, index); > ++ try { > ++ coords[i] = Double.parseDouble(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ } > ++ if (!foundparen || str.length() > 0) { > ++ return null; > ++ } > ++ Rect r = new Rect(); > ++ r.rect.setRect(coords[0], coords[1], > ++ coords[2], coords[3]); > ++ return r; > ++ } > ++ > ++ private Rectangle2D rect = new Rectangle2D.Double(); > ++ > ++ public void randomize() { > ++ rect.setRect(randDblCoord(), randDblCoord(), > ++ randDblCoord(), randDblCoord()); > ++ } > ++ > ++ public Shape getShape() { > ++ return rect; > ++ } > ++ > ++ public String toString() { > ++ return ("Rect("+ > ++ rect.getX()+", "+ > ++ rect.getY()+", "+ > ++ rect.getWidth()+", "+ > ++ rect.getHeight() > ++ +")"); > ++ } > ++ } > ++ > ++ public static class Line extends AnnotatedShapeOp { > ++ public static Line tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("Line(")) { > ++ return null; > ++ } > ++ str = str.substring(5); > ++ double coords[] = new double[4]; > ++ boolean foundparen = false; > ++ for (int i = 0; i < coords.length; i++) { > ++ int index = str.indexOf(","); > ++ if (index < 0) { > ++ if (i < coords.length-1) { > ++ return null; > ++ } > ++ index = str.indexOf(")"); > ++ if (index < 0) { > ++ return null; > ++ } > ++ foundparen = true; > ++ } > ++ String num = str.substring(0, index); > ++ try { > ++ coords[i] = Double.parseDouble(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ } > ++ if (!foundparen || str.length() > 0) { > ++ return null; > ++ } > ++ Line l = new Line(); > ++ l.line.setLine(coords[0], coords[1], > ++ coords[2], coords[3]); > ++ return l; > ++ } > ++ > ++ private Line2D line = new Line2D.Double(); > ++ > ++ public void randomize() { > ++ line.setLine(randDblCoord(), randDblCoord(), > ++ randDblCoord(), randDblCoord()); > ++ } > ++ > ++ public Shape getShape() { > ++ return line; > ++ } > ++ > ++ public String toString() { > ++ return ("Line("+ > ++ line.getX1()+", "+ > ++ line.getY1()+", "+ > ++ line.getX2()+", "+ > ++ line.getY2() > ++ +")"); > ++ } > ++ } > ++ > ++ public static class RectMethod extends AnnotatedRenderOp { > ++ public static RectMethod tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("RectMethod(")) { > ++ return null; > ++ } > ++ str = str.substring(11); > ++ int coords[] = new int[4]; > ++ boolean foundparen = false; > ++ for (int i = 0; i < coords.length; i++) { > ++ int index = str.indexOf(","); > ++ if (index < 0) { > ++ if (i < coords.length-1) { > ++ return null; > ++ } > ++ index = str.indexOf(")"); > ++ if (index < 0) { > ++ return null; > ++ } > ++ foundparen = true; > ++ } > ++ String num = str.substring(0, index).trim(); > ++ try { > ++ coords[i] = Integer.parseInt(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ } > ++ if (!foundparen || str.length() > 0) { > ++ return null; > ++ } > ++ RectMethod rm = new RectMethod(); > ++ rm.rect.setBounds(coords[0], coords[1], > ++ coords[2], coords[3]); > ++ return rm; > ++ } > ++ > ++ private Rectangle rect = new Rectangle(); > ++ > ++ public void randomize() { > ++ rect.setBounds(randIntCoord(), randIntCoord(), > ++ randIntCoord(), randIntCoord()); > ++ } > ++ > ++ public void fill(Graphics2D g2d) { > ++ g2d.fillRect(rect.x, rect.y, rect.width, rect.height); > ++ } > ++ > ++ public void draw(Graphics2D g2d) { > ++ g2d.drawRect(rect.x, rect.y, rect.width, rect.height); > ++ } > ++ > ++ public String toString() { > ++ return ("RectMethod("+ > ++ rect.x+", "+ > ++ rect.y+", "+ > ++ rect.width+", "+ > ++ rect.height > ++ +")"); > ++ } > ++ } > ++ > ++ public static class LineMethod extends AnnotatedRenderOp { > ++ public static LineMethod tryparse(String str) { > ++ str = str.trim(); > ++ if (!str.startsWith("LineMethod(")) { > ++ return null; > ++ } > ++ str = str.substring(11); > ++ int coords[] = new int[4]; > ++ boolean foundparen = false; > ++ for (int i = 0; i < coords.length; i++) { > ++ int index = str.indexOf(","); > ++ if (index < 0) { > ++ if (i < coords.length-1) { > ++ return null; > ++ } > ++ index = str.indexOf(")"); > ++ if (index < 0) { > ++ return null; > ++ } > ++ foundparen = true; > ++ } > ++ String num = str.substring(0, index).trim(); > ++ try { > ++ coords[i] = Integer.parseInt(num); > ++ } catch (NumberFormatException nfe) { > ++ return null; > ++ } > ++ str = str.substring(index+1); > ++ } > ++ if (!foundparen || str.length() > 0) { > ++ return null; > ++ } > ++ LineMethod lm = new LineMethod(); > ++ lm.line = coords; > ++ return lm; > ++ } > ++ > ++ private int line[] = new int[4]; > ++ > ++ public void randomize() { > ++ line[0] = randIntCoord(); > ++ line[1] = randIntCoord(); > ++ line[2] = randIntCoord(); > ++ line[3] = randIntCoord(); > ++ } > ++ > ++ public void fill(Graphics2D g2d) { > ++ } > ++ > ++ public void draw(Graphics2D g2d) { > ++ g2d.drawLine(line[0], line[1], line[2], line[3]); > ++ } > ++ > ++ public String toString() { > ++ return ("LineMethod("+ > ++ line[0]+", "+ > ++ line[1]+", "+ > ++ line[2]+", "+ > ++ line[3] > ++ +")"); > ++ } > ++ } > ++ > ++ public static class ErrorWindow extends Frame { > ++ ImageCanvas unclipped; > ++ ImageCanvas reference; > ++ ImageCanvas actual; > ++ ImageCanvas diff; > ++ > ++ public ErrorWindow() { > ++ super("Error Comparison Window"); > ++ > ++ unclipped = new ImageCanvas(); > ++ reference = new ImageCanvas(); > ++ actual = new ImageCanvas(); > ++ diff = new ImageCanvas(); > ++ > ++ setLayout(new SmartGridLayout(0, 2, 5, 5)); > ++ addImagePanel(unclipped, "Unclipped rendering"); > ++ addImagePanel(reference, "Clipped reference"); > ++ addImagePanel(actual, "Actual clipped"); > ++ addImagePanel(diff, "Difference"); > ++ > ++ addWindowListener(new WindowAdapter() { > ++ public void windowClosing(WindowEvent e) { > ++ setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ public void addImagePanel(ImageCanvas ic, String label) { > ++ add(ic); > ++ add(new Label(label)); > ++ } > ++ > ++ public void setImages(BufferedImage imgref, BufferedImage imgtst) { > ++ unclipped.setImage(imgref); > ++ reference.setReference(imgref); > ++ actual.setImage(imgtst); > ++ diff.setDiff(reference.getImage(), imgtst); > ++ invalidate(); > ++ pack(); > ++ repaint(); > ++ } > ++ > ++ public void setVisible(boolean vis) { > ++ super.setVisible(vis); > ++ synchronized (this) { > ++ notifyAll(); > ++ } > ++ } > ++ > ++ public synchronized void waitForHide() { > ++ while (isShowing()) { > ++ try { > ++ wait(); > ++ } catch (InterruptedException e) { > ++ System.exit(2); > ++ } > ++ } > ++ } > ++ } > ++ > ++ public static class SmartGridLayout implements LayoutManager { > ++ int rows; > ++ int cols; > ++ int hgap; > ++ int vgap; > ++ > ++ public SmartGridLayout(int r, int c, int h, int v) { > ++ this.rows = r; > ++ this.cols = c; > ++ this.hgap = h; > ++ this.vgap = v; > ++ } > ++ > ++ public void addLayoutComponent(String name, Component comp) { > ++ } > ++ > ++ public void removeLayoutComponent(Component comp) { > ++ } > ++ > ++ public int[][] getGridSizes(Container parent, boolean min) { > ++ int ncomponents = parent.getComponentCount(); > ++ int nrows = rows; > ++ int ncols = cols; > ++ > ++ if (nrows > 0) { > ++ ncols = (ncomponents + nrows - 1) / nrows; > ++ } else { > ++ nrows = (ncomponents + ncols - 1) / ncols; > ++ } > ++ int widths[] = new int[ncols+1]; > ++ int heights[] = new int[nrows+1]; > ++ int x = 0; > ++ int y = 0; > ++ for (int i = 0 ; i < ncomponents ; i++) { > ++ Component comp = parent.getComponent(i); > ++ Dimension d = (min > ++ ? comp.getMinimumSize() > ++ : comp.getPreferredSize()); > ++ if (widths[x] < d.width) { > ++ widths[x] = d.width; > ++ } > ++ if (heights[y] < d.height) { > ++ heights[y] = d.height; > ++ } > ++ x++; > ++ if (x >= ncols) { > ++ x = 0; > ++ y++; > ++ } > ++ } > ++ for (int i = 0; i < ncols; i++) { > ++ widths[ncols] += widths[i]; > ++ } > ++ for (int i = 0; i < nrows; i++) { > ++ heights[nrows] += heights[i]; > ++ } > ++ return new int[][] { widths, heights }; > ++ } > ++ > ++ public Dimension getSize(Container parent, boolean min) { > ++ int sizes[][] = getGridSizes(parent, min); > ++ int widths[] = sizes[0]; > ++ int heights[] = sizes[1]; > ++ int nrows = heights.length-1; > ++ int ncols = widths.length-1; > ++ int w = widths[ncols]; > ++ int h = heights[nrows]; > ++ Insets insets = parent.getInsets(); > ++ return new Dimension(insets.left+insets.right + w+(ncols+1)*hgap, > ++ insets.top+insets.bottom + h+(nrows+1)*vgap); > ++ } > ++ > ++ public Dimension preferredLayoutSize(Container parent) { > ++ return getSize(parent, false); > ++ } > ++ > ++ public Dimension minimumLayoutSize(Container parent) { > ++ return getSize(parent, true); > ++ } > ++ > ++ public void layoutContainer(Container parent) { > ++ int pref[][] = getGridSizes(parent, false); > ++ int min[][] = getGridSizes(parent, true); > ++ int minwidths[] = min[0]; > ++ int minheights[] = min[1]; > ++ int prefwidths[] = pref[0]; > ++ int prefheights[] = pref[1]; > ++ int nrows = minheights.length - 1; > ++ int ncols = minwidths.length - 1; > ++ Insets insets = parent.getInsets(); > ++ int w = parent.getWidth() - insets.left - insets.right; > ++ int h = parent.getHeight() - insets.top - insets.bottom; > ++ w = w - (ncols+1)*hgap; > ++ h = h - (nrows+1)*vgap; > ++ int widths[] = calculateSizes(w, ncols, minwidths, prefwidths); > ++ int heights[] = calculateSizes(h, nrows, minheights, prefheights); > ++ int ncomponents = parent.getComponentCount(); > ++ int x = insets.left + hgap; > ++ int y = insets.top + vgap; > ++ int r = 0; > ++ int c = 0; > ++ for (int i = 0; i < ncomponents; i++) { > ++ parent.getComponent(i).setBounds(x, y, widths[c], heights[r]); > ++ x += widths[c++] + hgap; > ++ if (c >= ncols) { > ++ c = 0; > ++ x = insets.left + hgap; > ++ y += heights[r++] + vgap; > ++ if (r >= nrows) { > ++ // just in case > ++ break; > ++ } > ++ } > ++ } > ++ } > ++ > ++ public static int[] calculateSizes(int total, int num, > ++ int minsizes[], int prefsizes[]) > ++ { > ++ if (total <= minsizes[num]) { > ++ return minsizes; > ++ } > ++ if (total >= prefsizes[num]) { > ++ return prefsizes; > ++ } > ++ int sizes[] = new int[total]; > ++ int prevhappy = 0; > ++ int nhappy = 0; > ++ int happysize = 0; > ++ do { > ++ int addsize = (total - happysize) / (num - nhappy); > ++ happysize = 0; > ++ for (int i = 0; i < num; i++) { > ++ if (sizes[i] >= prefsizes[i] || > ++ minsizes[i] + addsize > prefsizes[i]) > ++ { > ++ happysize += (sizes[i] = prefsizes[i]); > ++ nhappy++; > ++ } else { > ++ sizes[i] = minsizes[i] + addsize; > ++ } > ++ } > ++ } while (nhappy < num && nhappy > prevhappy); > ++ return sizes; > ++ } > ++ } > ++ > ++ public static class ImageCanvas extends Canvas { > ++ BufferedImage image; > ++ > ++ public void setImage(BufferedImage img) { > ++ this.image = img; > ++ } > ++ > ++ public BufferedImage getImage() { > ++ return image; > ++ } > ++ > ++ public void checkImage(int w, int h) { > ++ if (image == null || > ++ image.getWidth() < w || > ++ image.getHeight() < h) > ++ { > ++ image = new BufferedImage(w, h, BufferedImage.TYPE_INT_RGB); > ++ } > ++ } > ++ > ++ public void setReference(BufferedImage img) { > ++ checkImage(img.getWidth(), img.getHeight()); > ++ Graphics g = image.createGraphics(); > ++ g.drawImage(img, 0, 0, null); > ++ g.setColor(Color.white); > ++ g.fillRect(0, 0, 30, 10); > ++ g.fillRect(30, 0, 10, 30); > ++ g.fillRect(10, 30, 30, 10); > ++ g.fillRect(0, 10, 10, 30); > ++ g.dispose(); > ++ } > ++ > ++ public void setDiff(BufferedImage imgref, BufferedImage imgtst) { > ++ int w = Math.max(imgref.getWidth(), imgtst.getWidth()); > ++ int h = Math.max(imgref.getHeight(), imgtst.getHeight()); > ++ checkImage(w, h); > ++ Graphics g = image.createGraphics(); > ++ g.drawImage(imgref, 0, 0, null); > ++ g.setXORMode(Color.white); > ++ g.drawImage(imgtst, 0, 0, null); > ++ g.setPaintMode(); > ++ g.setColor(new Color(1f, 1f, 0f, 0.25f)); > ++ g.fillRect(10, 10, 20, 20); > ++ g.setColor(new Color(1f, 0f, 0f, 0.25f)); > ++ g.fillRect(0, 0, 30, 10); > ++ g.fillRect(30, 0, 10, 30); > ++ g.fillRect(10, 30, 30, 10); > ++ g.fillRect(0, 10, 10, 30); > ++ g.dispose(); > ++ } > ++ > ++ public Dimension getPreferredSize() { > ++ if (image == null) { > ++ return new Dimension(); > ++ } else { > ++ return new Dimension(image.getWidth(), image.getHeight()); > ++ } > ++ } > ++ > ++ public void paint(Graphics g) { > ++ g.drawImage(image, 0, 0, null); > ++ } > ++ } > ++} > diff -r e1a5ab4cf428 patches/openjdk/6775317-non-AA-simple-shape-performance.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6775317-non-AA-simple-shape-performance.patch Tue Feb 22 19:04:38 2011 -0500 > @@ -0,0 +1,1697 @@ > +# HG changeset patch > +# User flar > +# Date 1291700748 28800 > +# Node ID 47cd69eff64122a14e1e1557bc0f6e00f66e9980 > +# Parent 1d4340015b85857a7f001fff4776307f576dc274 > +6775317: Improve performance of non-AA transformed rectangles and single wide lines in software pipelines > +Reviewed-by: jgodinez, prr > + > +diff -r 1d4340015b85 -r 47cd69eff641 make/sun/awt/Depend.mak > +--- openjdk.orig/jdk/make/sun/awt/Depend.mak Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/Depend.mak Mon Dec 06 21:45:48 2010 -0800 > +@@ -18,11 +18,15 @@ > + J2D_SRC = $(SUN_SRC)/java2d > + J2D_FONT_SRC = $(SUN_SRC)/font > + J2D_WINDOWS_SRC = $(WINDOWS_SRC)/native/sun/java2d > ++AWT_WINDOWS_SRC = $(WINDOWS_SRC)/native/sun/awt > + LOOP_SRC = $(SUN_SRC)/java2d/loops > + PIPE_SRC = $(SUN_SRC)/java2d/pipe > + WINDOWS_SRC = $(TOPDIR)/src/windows > + SRC = $(WINDOWS_SRC)/native/sun/windows > + > ++# ensure consistent sort order > ++LC_ALL:= C > ++ > + SRCDIRS = \ > + $(COMP_SRC) \ > + $(DEBUG_SRC) \ > +@@ -61,6 +65,7 @@ > + -I$(J2D_WINDOWS_SRC)/windows \ > + -I$(J2D_WINDOWS_SRC)/d3d \ > + -I$(J2D_WINDOWS_SRC)/opengl \ > ++ -I$(AWT_WINDOWS_SRC) \ > + -I$(LOOP_SRC) \ > + -I$(PIPE_SRC) \ > + -I$(SRC) > +@@ -68,22 +73,29 @@ > + STUBFILES = \ > + $(STUBDIR)/ddraw.h \ > + $(STUBDIR)/d3d.h \ > ++ $(STUBDIR)/d3d9.h \ > + $(STUBDIR)/Ole2.h \ > + $(STUBDIR)/Zmouse.h \ > + $(STUBDIR)/cderr.h \ > ++ $(STUBDIR)/comdef.h \ > + $(STUBDIR)/commctrl.h \ > + $(STUBDIR)/commdlg.h \ > ++ $(STUBDIR)/comutil.h \ > + $(STUBDIR)/direct.h \ > + $(STUBDIR)/d3dcom.h \ > + $(STUBDIR)/imm.h \ > + $(STUBDIR)/ime.h \ > + $(STUBDIR)/io.h \ > ++ $(STUBDIR)/map \ > + $(STUBDIR)/mmsystem.h \ > + $(STUBDIR)/new.h \ > ++ $(STUBDIR)/new \ > + $(STUBDIR)/ole2.h \ > ++ $(STUBDIR)/process.h \ > + $(STUBDIR)/richole.h \ > + $(STUBDIR)/richedit.h \ > + $(STUBDIR)/shellapi.h \ > ++ $(STUBDIR)/shlwapi.h \ > + $(STUBDIR)/shlobj.h \ > + $(STUBDIR)/tchar.h \ > + $(STUBDIR)/winbase.h \ > +@@ -135,6 +147,9 @@ > + include FILES_export_windows.gmk > + > + EXTRAFILES_java = \ > ++ sun/java2d/opengl/OGLContext/OGLContextCaps.java \ > ++ sun/java2d/d3d/D3DPaints/MultiGradient.java \ > ++ sun/java2d/d3d/D3DContext/D3DContextCaps.java \ > + java/lang/Integer.java > + > + FILES_java = $(FILES_export) $(FILES_export2) $(FILES_export3) \ > +diff -r 1d4340015b85 -r 47cd69eff641 make/sun/awt/FILES_c_unix.gmk > +--- openjdk.orig/jdk/make/sun/awt/FILES_c_unix.gmk Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/FILES_c_unix.gmk Mon Dec 06 21:45:48 2010 -0800 > +@@ -85,6 +85,8 @@ > + ScaledBlit.c \ > + FillRect.c \ > + FillSpans.c \ > ++ FillParallelogram.c \ > ++ DrawParallelogram.c \ > + DrawLine.c \ > + DrawRect.c \ > + DrawPolygons.c \ > +diff -r 1d4340015b85 -r 47cd69eff641 make/sun/awt/FILES_c_windows.gmk > +--- openjdk.orig/jdk/make/sun/awt/FILES_c_windows.gmk Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/FILES_c_windows.gmk Mon Dec 06 21:45:48 2010 -0800 > +@@ -30,6 +30,8 @@ > + ScaledBlit.c \ > + FillRect.c \ > + FillSpans.c \ > ++ FillParallelogram.c \ > ++ DrawParallelogram.c \ > + DrawLine.c \ > + DrawRect.c \ > + DrawPolygons.c \ > +diff -r 1d4340015b85 -r 47cd69eff641 make/sun/awt/FILES_export_unix.gmk > +--- openjdk.orig/jdk/make/sun/awt/FILES_export_unix.gmk Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/FILES_export_unix.gmk Mon Dec 06 21:45:48 2010 -0800 > +@@ -36,6 +36,8 @@ > + sun/java2d/loops/TransformBlit.java \ > + sun/java2d/loops/FillRect.java \ > + sun/java2d/loops/FillSpans.java \ > ++ sun/java2d/loops/FillParallelogram.java \ > ++ sun/java2d/loops/DrawParallelogram.java \ > + sun/java2d/loops/DrawGlyphList.java \ > + sun/java2d/loops/DrawGlyphListAA.java \ > + sun/java2d/loops/DrawGlyphListLCD.java \ > +diff -r 1d4340015b85 -r 47cd69eff641 make/sun/awt/FILES_export_windows.gmk > +--- openjdk.orig/jdk/make/sun/awt/FILES_export_windows.gmk Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/FILES_export_windows.gmk Mon Dec 06 21:45:48 2010 -0800 > +@@ -135,6 +135,8 @@ > + sun/java2d/loops/ScaledBlit.java \ > + sun/java2d/loops/FillRect.java \ > + sun/java2d/loops/FillSpans.java \ > ++ sun/java2d/loops/FillParallelogram.java \ > ++ sun/java2d/loops/DrawParallelogram.java \ > + sun/java2d/loops/DrawGlyphList.java \ > + sun/java2d/loops/DrawGlyphListAA.java \ > + sun/java2d/loops/DrawGlyphListLCD.java \ > +diff -r 1d4340015b85 -r 47cd69eff641 make/sun/awt/mapfile-vers > +--- openjdk.orig/jdk/make/sun/awt/mapfile-vers Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/make/sun/awt/mapfile-vers Mon Dec 06 21:45:48 2010 -0800 > +@@ -112,6 +112,8 @@ > + Java_sun_java2d_loops_DrawRect_DrawRect; > + Java_sun_java2d_loops_FillRect_FillRect; > + Java_sun_java2d_loops_FillSpans_FillSpans; > ++ Java_sun_java2d_loops_FillParallelogram_FillParallelogram; > ++ Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram; > + Java_sun_java2d_loops_GraphicsPrimitiveMgr_initIDs; > + Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; > + Java_sun_java2d_loops_MaskBlit_MaskBlit; > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/classes/sun/java2d/SurfaceData.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/SurfaceData.java Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/SurfaceData.java Mon Dec 06 21:45:48 2010 -0800 > +@@ -46,11 +46,15 @@ > + import sun.java2d.loops.DrawPath; > + import sun.java2d.loops.FillPath; > + import sun.java2d.loops.FillSpans; > ++import sun.java2d.loops.FillParallelogram; > ++import sun.java2d.loops.DrawParallelogram; > + import sun.java2d.loops.FontInfo; > + import sun.java2d.loops.DrawGlyphList; > + import sun.java2d.loops.DrawGlyphListAA; > + import sun.java2d.loops.DrawGlyphListLCD; > + import sun.java2d.pipe.LoopPipe; > ++import sun.java2d.pipe.ShapeDrawPipe; > ++import sun.java2d.pipe.ParallelogramPipe; > + import sun.java2d.pipe.CompositePipe; > + import sun.java2d.pipe.GeneralCompositePipe; > + import sun.java2d.pipe.SpanClipRenderer; > +@@ -59,6 +63,7 @@ > + import sun.java2d.pipe.AlphaPaintPipe; > + import sun.java2d.pipe.AlphaColorPipe; > + import sun.java2d.pipe.PixelToShapeConverter; > ++import sun.java2d.pipe.PixelToParallelogramConverter; > + import sun.java2d.pipe.TextPipe; > + import sun.java2d.pipe.TextRenderer; > + import sun.java2d.pipe.AATextRenderer; > +@@ -364,6 +369,7 @@ > + > + protected static final CompositePipe colorPipe; > + protected static final PixelToShapeConverter colorViaShape; > ++ protected static final PixelToParallelogramConverter colorViaPgram; > + protected static final TextPipe colorText; > + protected static final CompositePipe clipColorPipe; > + protected static final TextPipe clipColorText; > +@@ -396,6 +402,31 @@ > + > + protected static final DrawImagePipe imagepipe; > + > ++ // Utility subclass to add the LoopBasedPipe tagging interface > ++ static class PixelToShapeLoopConverter > ++ extends PixelToShapeConverter > ++ implements LoopBasedPipe > ++ { > ++ public PixelToShapeLoopConverter(ShapeDrawPipe pipe) { > ++ super(pipe); > ++ } > ++ } > ++ > ++ // Utility subclass to add the LoopBasedPipe tagging interface > ++ static class PixelToPgramLoopConverter > ++ extends PixelToParallelogramConverter > ++ implements LoopBasedPipe > ++ { > ++ public PixelToPgramLoopConverter(ShapeDrawPipe shapepipe, > ++ ParallelogramPipe pgrampipe, > ++ double minPenSize, > ++ double normPosition, > ++ boolean adjustfill) > ++ { > ++ super(shapepipe, pgrampipe, minPenSize, normPosition, adjustfill); > ++ } > ++ } > ++ > + static { > + colorPrimitives = new LoopPipe(); > + > +@@ -406,7 +437,10 @@ > + > + colorPipe = new AlphaColorPipe(); > + // colorShape = colorPrimitives; > +- colorViaShape = new PixelToShapeConverter(colorPrimitives); > ++ colorViaShape = new PixelToShapeLoopConverter(colorPrimitives); > ++ colorViaPgram = new PixelToPgramLoopConverter(colorPrimitives, > ++ colorPrimitives, > ++ 1.0, 0.25, true); > + colorText = new TextRenderer(colorPipe); > + clipColorPipe = new SpanClipRenderer(colorPipe); > + clipColorText = new TextRenderer(clipColorPipe); > +@@ -441,10 +475,12 @@ > + } > + > + /* Not all surfaces and rendering mode combinations support LCD text. */ > +- static final int LCDLOOP_UNKNOWN = 0; > +- static final int LCDLOOP_FOUND = 1; > +- static final int LCDLOOP_NOTFOUND = 2; > ++ static final int LOOP_UNKNOWN = 0; > ++ static final int LOOP_FOUND = 1; > ++ static final int LOOP_NOTFOUND = 2; > + int haveLCDLoop; > ++ int havePgramXORLoop; > ++ int havePgramSolidLoop; > + > + public boolean canRenderLCDText(SunGraphics2D sg2d) { > + // For now the answer can only be true in the following cases: > +@@ -453,18 +489,48 @@ > + sg2d.clipState <= SunGraphics2D.CLIP_RECTANGULAR && > + sg2d.surfaceData.getTransparency() == Transparency.OPAQUE) > + { > +- if (haveLCDLoop == LCDLOOP_UNKNOWN) { > ++ if (haveLCDLoop == LOOP_UNKNOWN) { > + DrawGlyphListLCD loop = > + DrawGlyphListLCD.locate(SurfaceType.AnyColor, > + CompositeType.SrcNoEa, > + getSurfaceType()); > +- haveLCDLoop = (loop!= null) ? LCDLOOP_FOUND : LCDLOOP_NOTFOUND; > ++ haveLCDLoop = (loop != null) ? LOOP_FOUND : LOOP_NOTFOUND; > + } > +- return haveLCDLoop == LCDLOOP_FOUND; > ++ return haveLCDLoop == LOOP_FOUND; > + } > + return false; /* for now - in the future we may want to search */ > + } > + > ++ public boolean canRenderParallelograms(SunGraphics2D sg2d) { > ++ if (sg2d.paintState <= sg2d.PAINT_ALPHACOLOR) { > ++ if (sg2d.compositeState == sg2d.COMP_XOR) { > ++ if (havePgramXORLoop == LOOP_UNKNOWN) { > ++ FillParallelogram loop = > ++ FillParallelogram.locate(SurfaceType.AnyColor, > ++ CompositeType.Xor, > ++ getSurfaceType()); > ++ havePgramXORLoop = > ++ (loop != null) ? LOOP_FOUND : LOOP_NOTFOUND; > ++ } > ++ return havePgramXORLoop == LOOP_FOUND; > ++ } else if (sg2d.compositeState <= sg2d.COMP_ISCOPY && > ++ sg2d.antialiasHint != SunHints.INTVAL_ANTIALIAS_ON && > ++ sg2d.clipState != sg2d.CLIP_SHAPE) > ++ { > ++ if (havePgramSolidLoop == LOOP_UNKNOWN) { > ++ FillParallelogram loop = > ++ FillParallelogram.locate(SurfaceType.AnyColor, > ++ CompositeType.SrcNoEa, > ++ getSurfaceType()); > ++ havePgramSolidLoop = > ++ (loop != null) ? LOOP_FOUND : LOOP_NOTFOUND; > ++ } > ++ return havePgramSolidLoop == LOOP_FOUND; > ++ } > ++ } > ++ return false; > ++ } > ++ > + public void validatePipe(SunGraphics2D sg2d) { > + sg2d.imagepipe = imagepipe; > + if (sg2d.compositeState == sg2d.COMP_XOR) { > +@@ -480,9 +546,21 @@ > + // text drawn in XOR mode with a Paint object. > + sg2d.textpipe = outlineTextRenderer; > + } else { > ++ PixelToShapeConverter converter; > ++ if (canRenderParallelograms(sg2d)) { > ++ converter = colorViaPgram; > ++ // Note that we use the transforming pipe here because it > ++ // will examine the shape and possibly perform an optimized > ++ // operation if it can be simplified. The simplifications > ++ // will be valid for all STROKE and TRANSFORM types. > ++ sg2d.shapepipe = colorViaPgram; > ++ } else { > ++ converter = colorViaShape; > ++ sg2d.shapepipe = colorPrimitives; > ++ } > + if (sg2d.clipState == sg2d.CLIP_SHAPE) { > +- sg2d.drawpipe = colorViaShape; > +- sg2d.fillpipe = colorViaShape; > ++ sg2d.drawpipe = converter; > ++ sg2d.fillpipe = converter; > + // REMIND: We should not be changing text strategies > + // between outline and glyph rendering based upon the > + // presence of a complex clip as that could cause a > +@@ -494,11 +572,11 @@ > + sg2d.textpipe = outlineTextRenderer; > + } else { > + if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { > +- sg2d.drawpipe = colorViaShape; > +- sg2d.fillpipe = colorViaShape; > ++ sg2d.drawpipe = converter; > ++ sg2d.fillpipe = converter; > + } else { > + if (sg2d.strokeState != sg2d.STROKE_THIN) { > +- sg2d.drawpipe = colorViaShape; > ++ sg2d.drawpipe = converter; > + } else { > + sg2d.drawpipe = colorPrimitives; > + } > +@@ -506,7 +584,6 @@ > + } > + sg2d.textpipe = solidTextRenderer; > + } > +- sg2d.shapepipe = colorPrimitives; > + // assert(sg2d.surfaceData == this); > + } > + } else if (sg2d.compositeState == sg2d.COMP_CUSTOM) { > +@@ -589,12 +666,24 @@ > + } > + } > + } else { > ++ PixelToShapeConverter converter; > ++ if (canRenderParallelograms(sg2d)) { > ++ converter = colorViaPgram; > ++ // Note that we use the transforming pipe here because it > ++ // will examine the shape and possibly perform an optimized > ++ // operation if it can be simplified. The simplifications > ++ // will be valid for all STROKE and TRANSFORM types. > ++ sg2d.shapepipe = colorViaPgram; > ++ } else { > ++ converter = colorViaShape; > ++ sg2d.shapepipe = colorPrimitives; > ++ } > + if (sg2d.transformState >= sg2d.TRANSFORM_TRANSLATESCALE) { > +- sg2d.drawpipe = colorViaShape; > +- sg2d.fillpipe = colorViaShape; > ++ sg2d.drawpipe = converter; > ++ sg2d.fillpipe = converter; > + } else { > + if (sg2d.strokeState != sg2d.STROKE_THIN) { > +- sg2d.drawpipe = colorViaShape; > ++ sg2d.drawpipe = converter; > + } else { > + sg2d.drawpipe = colorPrimitives; > + } > +@@ -602,7 +691,6 @@ > + } > + > + sg2d.textpipe = getTextPipe(sg2d, false /* AA==OFF */); > +- sg2d.shapepipe = colorPrimitives; > + // assert(sg2d.surfaceData == this); > + } > + > +@@ -761,6 +849,8 @@ > + loops.drawPathLoop = DrawPath.locate(src, comp, dst); > + loops.fillPathLoop = FillPath.locate(src, comp, dst); > + loops.fillSpansLoop = FillSpans.locate(src, comp, dst); > ++ loops.fillParallelogramLoop = FillParallelogram.locate(src, comp, dst); > ++ loops.drawParallelogramLoop = DrawParallelogram.locate(src, comp, dst); > + loops.drawGlyphListLoop = DrawGlyphList.locate(src, comp, dst); > + loops.drawGlyphListAALoop = DrawGlyphListAA.locate(src, comp, dst); > + loops.drawGlyphListLCDLoop = DrawGlyphListLCD.locate(src, comp, dst); > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/classes/sun/java2d/loops/DrawParallelogram.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/src/share/classes/sun/java2d/loops/DrawParallelogram.java Mon Dec 06 21:45:48 2010 -0800 > +@@ -0,0 +1,123 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. Oracle designates this > ++ * particular file as subject to the "Classpath" exception as provided > ++ * by Oracle in the LICENSE file that accompanied this code. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @author Jim Graham > ++ */ > ++ > ++package sun.java2d.loops; > ++ > ++import sun.java2d.loops.GraphicsPrimitive; > ++import sun.java2d.SunGraphics2D; > ++import sun.java2d.SurfaceData; > ++ > ++/** > ++ * DrawParallelogram > ++ * 1) fill the area between the 4 edges of an outer parallelogram > ++ * (as specified by an origin and 2 delta vectors) > ++ * but also outside the 4 edges of an inner parallelogram > ++ * (as specified by proportional amounts of the outer delta vectors) > ++ */ > ++public class DrawParallelogram extends GraphicsPrimitive > ++{ > ++ public final static String methodSignature = > ++ "DrawParallelogram(...)".toString(); > ++ > ++ public final static int primTypeID = makePrimTypeID(); > ++ > ++ public static DrawParallelogram locate(SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ return (DrawParallelogram) > ++ GraphicsPrimitiveMgr.locate(primTypeID, > ++ srctype, comptype, dsttype); > ++ } > ++ > ++ protected DrawParallelogram(SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ super(methodSignature, primTypeID, > ++ srctype, comptype, dsttype); > ++ } > ++ > ++ public DrawParallelogram(long pNativePrim, > ++ SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ super(pNativePrim, methodSignature, primTypeID, > ++ srctype, comptype, dsttype); > ++ } > ++ > ++ /** > ++ * All DrawParallelogram implementors must have this invoker method > ++ */ > ++ public native void DrawParallelogram(SunGraphics2D sg, SurfaceData dest, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2); > ++ > ++ public GraphicsPrimitive makePrimitive(SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ // REMIND: iterate with a FillRect primitive? > ++ throw new InternalError("DrawParallelogram not implemented for "+ > ++ srctype+" with "+comptype); > ++ } > ++ > ++ public GraphicsPrimitive traceWrap() { > ++ return new TraceDrawParallelogram(this); > ++ } > ++ > ++ private static class TraceDrawParallelogram extends DrawParallelogram { > ++ DrawParallelogram target; > ++ > ++ public TraceDrawParallelogram(DrawParallelogram target) { > ++ super(target.getSourceType(), > ++ target.getCompositeType(), > ++ target.getDestType()); > ++ this.target = target; > ++ } > ++ > ++ public GraphicsPrimitive traceWrap() { > ++ return this; > ++ } > ++ > ++ public void DrawParallelogram(SunGraphics2D sg2d, SurfaceData dest, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2) > ++ { > ++ tracePrimitive(target); > ++ target.DrawParallelogram(sg2d, dest, > ++ x, y, dx1, dy1, dx2, dy2, lw1, lw2); > ++ } > ++ } > ++} > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/classes/sun/java2d/loops/FillParallelogram.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/src/share/classes/sun/java2d/loops/FillParallelogram.java Mon Dec 06 21:45:48 2010 -0800 > +@@ -0,0 +1,118 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. Oracle designates this > ++ * particular file as subject to the "Classpath" exception as provided > ++ * by Oracle in the LICENSE file that accompanied this code. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @author Jim Graham > ++ */ > ++ > ++package sun.java2d.loops; > ++ > ++import sun.java2d.loops.GraphicsPrimitive; > ++import sun.java2d.SunGraphics2D; > ++import sun.java2d.SurfaceData; > ++ > ++/** > ++ * FillParallelogram > ++ * 1) fill the area between the 4 edges of a parallelogram > ++ * (as specified by an origin and 2 delta vectors) > ++ */ > ++public class FillParallelogram extends GraphicsPrimitive > ++{ > ++ public final static String methodSignature = > ++ "FillParallelogram(...)".toString(); > ++ > ++ public final static int primTypeID = makePrimTypeID(); > ++ > ++ public static FillParallelogram locate(SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ return (FillParallelogram) > ++ GraphicsPrimitiveMgr.locate(primTypeID, > ++ srctype, comptype, dsttype); > ++ } > ++ > ++ protected FillParallelogram(SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ super(methodSignature, primTypeID, > ++ srctype, comptype, dsttype); > ++ } > ++ > ++ public FillParallelogram(long pNativePrim, > ++ SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ super(pNativePrim, methodSignature, primTypeID, > ++ srctype, comptype, dsttype); > ++ } > ++ > ++ /** > ++ * All FillParallelogram implementors must have this invoker method > ++ */ > ++ public native void FillParallelogram(SunGraphics2D sg2d, SurfaceData dest, > ++ double x0, double y0, > ++ double dx1, double dy1, > ++ double dx2, double dy2); > ++ > ++ public GraphicsPrimitive makePrimitive(SurfaceType srctype, > ++ CompositeType comptype, > ++ SurfaceType dsttype) > ++ { > ++ // REMIND: iterate with a FillRect primitive? > ++ throw new InternalError("FillParallelogram not implemented for "+ > ++ srctype+" with "+comptype); > ++ } > ++ > ++ public GraphicsPrimitive traceWrap() { > ++ return new TraceFillParallelogram(this); > ++ } > ++ > ++ private static class TraceFillParallelogram extends FillParallelogram { > ++ FillParallelogram target; > ++ > ++ public TraceFillParallelogram(FillParallelogram target) { > ++ super(target.getSourceType(), > ++ target.getCompositeType(), > ++ target.getDestType()); > ++ this.target = target; > ++ } > ++ > ++ public GraphicsPrimitive traceWrap() { > ++ return this; > ++ } > ++ > ++ public void FillParallelogram(SunGraphics2D sg2d, SurfaceData dest, > ++ double x0, double y0, > ++ double dx1, double dy1, > ++ double dx2, double dy2) > ++ { > ++ tracePrimitive(target); > ++ target.FillParallelogram(sg2d, dest, x0, y0, dx1, dy1, dx2, dy2); > ++ } > ++ } > ++} > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/classes/sun/java2d/loops/RenderLoops.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/loops/RenderLoops.java Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/loops/RenderLoops.java Mon Dec 06 21:45:48 2010 -0800 > +@@ -47,6 +47,8 @@ > + public DrawPath drawPathLoop; > + public FillPath fillPathLoop; > + public FillSpans fillSpansLoop; > ++ public FillParallelogram fillParallelogramLoop; > ++ public DrawParallelogram drawParallelogramLoop; > + public DrawGlyphList drawGlyphListLoop; > + public DrawGlyphListAA drawGlyphListAALoop; > + public DrawGlyphListLCD drawGlyphListLCDLoop; > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/classes/sun/java2d/pipe/LoopPipe.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pipe/LoopPipe.java Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pipe/LoopPipe.java Mon Dec 06 21:45:48 2010 -0800 > +@@ -41,11 +41,14 @@ > + import sun.java2d.SurfaceData; > + import sun.java2d.loops.FontInfo; > + import sun.java2d.loops.DrawPolygons; > ++import sun.java2d.loops.FillParallelogram; > ++import sun.java2d.loops.DrawParallelogram; > + import sun.awt.SunHints; > + > + public class LoopPipe > + implements PixelDrawPipe, > + PixelFillPipe, > ++ ParallelogramPipe, > + ShapeDrawPipe, > + LoopBasedPipe > + { > +@@ -347,4 +350,25 @@ > + sg2d.loops.fillRectLoop.FillRect(sg2d, sd, x, y, w, h); > + } > + } > ++ > ++ public void fillParallelogram(SunGraphics2D sg2d, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2) > ++ { > ++ FillParallelogram fp = sg2d.loops.fillParallelogramLoop; > ++ fp.FillParallelogram(sg2d, sg2d.getSurfaceData(), > ++ x, y, dx1, dy1, dx2, dy2); > ++ } > ++ > ++ public void drawParallelogram(SunGraphics2D sg2d, > ++ double x, double y, > ++ double dx1, double dy1, > ++ double dx2, double dy2, > ++ double lw1, double lw2) > ++ { > ++ DrawParallelogram dp = sg2d.loops.drawParallelogramLoop; > ++ dp.DrawParallelogram(sg2d, sg2d.getSurfaceData(), > ++ x, y, dx1, dy1, dx2, dy2, lw1, lw2); > ++ } > + } > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/Any3Byte.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/Any3Byte.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/Any3Byte.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -38,6 +38,7 @@ > + > + DECLARE_SOLID_FILLRECT(Any3Byte); > + DECLARE_SOLID_FILLSPANS(Any3Byte); > ++DECLARE_SOLID_PARALLELOGRAM(Any3Byte); > + DECLARE_SOLID_DRAWLINE(Any3Byte); > + DECLARE_XOR_FILLRECT(Any3Byte); > + DECLARE_XOR_FILLSPANS(Any3Byte); > +@@ -48,6 +49,7 @@ > + NativePrimitive Any3BytePrimitives[] = { > + REGISTER_SOLID_FILLRECT(Any3Byte), > + REGISTER_SOLID_FILLSPANS(Any3Byte), > ++ REGISTER_SOLID_PARALLELOGRAM(Any3Byte), > + REGISTER_SOLID_LINE_PRIMITIVES(Any3Byte), > + REGISTER_XOR_FILLRECT(Any3Byte), > + REGISTER_XOR_FILLSPANS(Any3Byte), > +@@ -72,6 +74,8 @@ > + > + DEFINE_SOLID_FILLSPANS(Any3Byte) > + > ++DEFINE_SOLID_PARALLELOGRAM(Any3Byte) > ++ > + DEFINE_SOLID_DRAWLINE(Any3Byte) > + > + DEFINE_XOR_FILLRECT(Any3Byte) > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/Any4Byte.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/Any4Byte.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/Any4Byte.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -41,6 +41,7 @@ > + > + DECLARE_SOLID_FILLRECT(Any4Byte); > + DECLARE_SOLID_FILLSPANS(Any4Byte); > ++DECLARE_SOLID_PARALLELOGRAM(Any4Byte); > + DECLARE_SOLID_DRAWLINE(Any4Byte); > + DECLARE_XOR_FILLRECT(Any4Byte); > + DECLARE_XOR_FILLSPANS(Any4Byte); > +@@ -51,6 +52,7 @@ > + NativePrimitive Any4BytePrimitives[] = { > + REGISTER_SOLID_FILLRECT(Any4Byte), > + REGISTER_SOLID_FILLSPANS(Any4Byte), > ++ REGISTER_SOLID_PARALLELOGRAM(Any4Byte), > + REGISTER_SOLID_LINE_PRIMITIVES(Any4Byte), > + REGISTER_XOR_FILLRECT(Any4Byte), > + REGISTER_XOR_FILLSPANS(Any4Byte), > +@@ -75,6 +77,8 @@ > + > + DEFINE_SOLID_FILLSPANS(Any4Byte) > + > ++DEFINE_SOLID_PARALLELOGRAM(Any4Byte) > ++ > + DEFINE_SOLID_DRAWLINE(Any4Byte) > + > + DEFINE_XOR_FILLRECT(Any4Byte) > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/AnyByte.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/AnyByte.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/AnyByte.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -38,6 +38,7 @@ > + > + DECLARE_SOLID_FILLRECT(AnyByte); > + DECLARE_SOLID_FILLSPANS(AnyByte); > ++DECLARE_SOLID_PARALLELOGRAM(AnyByte); > + DECLARE_SOLID_DRAWLINE(AnyByte); > + DECLARE_XOR_FILLRECT(AnyByte); > + DECLARE_XOR_FILLSPANS(AnyByte); > +@@ -48,6 +49,7 @@ > + NativePrimitive AnyBytePrimitives[] = { > + REGISTER_SOLID_FILLRECT(AnyByte), > + REGISTER_SOLID_FILLSPANS(AnyByte), > ++ REGISTER_SOLID_PARALLELOGRAM(AnyByte), > + REGISTER_SOLID_LINE_PRIMITIVES(AnyByte), > + REGISTER_XOR_FILLRECT(AnyByte), > + REGISTER_XOR_FILLSPANS(AnyByte), > +@@ -72,6 +74,8 @@ > + > + DEFINE_SOLID_FILLSPANS(AnyByte) > + > ++DEFINE_SOLID_PARALLELOGRAM(AnyByte) > ++ > + DEFINE_SOLID_DRAWLINE(AnyByte) > + > + DEFINE_XOR_FILLRECT(AnyByte) > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/AnyInt.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/AnyInt.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/AnyInt.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -38,6 +38,7 @@ > + > + DECLARE_SOLID_FILLRECT(AnyInt); > + DECLARE_SOLID_FILLSPANS(AnyInt); > ++DECLARE_SOLID_PARALLELOGRAM(AnyInt); > + DECLARE_SOLID_DRAWLINE(AnyInt); > + DECLARE_XOR_FILLRECT(AnyInt); > + DECLARE_XOR_FILLSPANS(AnyInt); > +@@ -48,6 +49,7 @@ > + NativePrimitive AnyIntPrimitives[] = { > + REGISTER_SOLID_FILLRECT(AnyInt), > + REGISTER_SOLID_FILLSPANS(AnyInt), > ++ REGISTER_SOLID_PARALLELOGRAM(AnyInt), > + REGISTER_SOLID_LINE_PRIMITIVES(AnyInt), > + REGISTER_XOR_FILLRECT(AnyInt), > + REGISTER_XOR_FILLSPANS(AnyInt), > +@@ -72,6 +74,8 @@ > + > + DEFINE_SOLID_FILLSPANS(AnyInt) > + > ++DEFINE_SOLID_PARALLELOGRAM(AnyInt) > ++ > + DEFINE_SOLID_DRAWLINE(AnyInt) > + > + DEFINE_XOR_FILLRECT(AnyInt) > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/AnyShort.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/AnyShort.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/AnyShort.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -38,6 +38,7 @@ > + > + DECLARE_SOLID_FILLRECT(AnyShort); > + DECLARE_SOLID_FILLSPANS(AnyShort); > ++DECLARE_SOLID_PARALLELOGRAM(AnyShort); > + DECLARE_SOLID_DRAWLINE(AnyShort); > + DECLARE_XOR_FILLRECT(AnyShort); > + DECLARE_XOR_FILLSPANS(AnyShort); > +@@ -48,6 +49,7 @@ > + NativePrimitive AnyShortPrimitives[] = { > + REGISTER_SOLID_FILLRECT(AnyShort), > + REGISTER_SOLID_FILLSPANS(AnyShort), > ++ REGISTER_SOLID_PARALLELOGRAM(AnyShort), > + REGISTER_SOLID_LINE_PRIMITIVES(AnyShort), > + REGISTER_XOR_FILLRECT(AnyShort), > + REGISTER_XOR_FILLSPANS(AnyShort), > +@@ -72,6 +74,8 @@ > + > + DEFINE_SOLID_FILLSPANS(AnyShort) > + > ++DEFINE_SOLID_PARALLELOGRAM(AnyShort) > ++ > + DEFINE_SOLID_DRAWLINE(AnyShort) > + > + DEFINE_XOR_FILLRECT(AnyShort) > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/DrawParallelogram.c > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/DrawParallelogram.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -0,0 +1,341 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. Oracle designates this > ++ * particular file as subject to the "Classpath" exception as provided > ++ * by Oracle in the LICENSE file that accompanied this code. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++#include "math.h" > ++#include "GraphicsPrimitiveMgr.h" > ++#include "LineUtils.h" > ++#include "LoopMacros.h" > ++#include "Trace.h" > ++ > ++#include "sun_java2d_loops_FillParallelogram.h" > ++#include "sun_java2d_loops_DrawParallelogram.h" > ++ > ++DECLARE_SOLID_DRAWLINE(AnyInt); > ++ > ++#define HANDLE_PGRAM_EDGE(X1, Y1, X2, Y2, \ > ++ pRasInfo, pixel, pPrim, pFunc, pCompInfo) \ > ++ do { \ > ++ jint ix1 = (jint) floor(X1); \ > ++ jint ix2 = (jint) floor(X2); \ > ++ jint iy1 = (jint) floor(Y1); \ > ++ jint iy2 = (jint) floor(Y2); \ > ++ LineUtils_ProcessLine(pRasInfo, pixel, \ > ++ pFunc, pPrim, pCompInfo, \ > ++ ix1, iy1, ix2, iy2, JNI_TRUE); \ > ++ } while (0) > ++ > ++#define PGRAM_MIN_MAX(bmin, bmax, v0, dv1, dv2) \ > ++ do { \ > ++ double vmin, vmax; \ > ++ if (dv1 < 0) { \ > ++ vmin = v0+dv1; \ > ++ vmax = v0; \ > ++ } else { \ > ++ vmin = v0; \ > ++ vmax = v0+dv1; \ > ++ } \ > ++ if (dv2 < 0) { \ > ++ vmin -= dv2; \ > ++ } else { \ > ++ vmax += dv2; \ > ++ } \ > ++ bmin = (jint) floor(vmin + 0.5); \ > ++ bmax = (jint) floor(vmax + 0.5); \ > ++ } while(0) > ++ > ++#define PGRAM_INIT_X(starty, x, y, slope) \ > ++ (DblToLong((x) + (slope) * ((starty)+0.5 - (y))) + LongOneHalf - 1) > ++ > ++typedef struct { > ++ jdouble x0; > ++ jdouble y0; > ++ jdouble y1; > ++ jdouble slope; > ++ jlong dx; > ++ jint ystart; > ++ jint yend; > ++} EdgeInfo; > ++ > ++#define STORE_EDGE(pEDGE, X0, Y0, Y1, SLOPE, DELTAX) \ > ++ do { \ > ++ (pEDGE)->x0 = (X0); \ > ++ (pEDGE)->y0 = (Y0); \ > ++ (pEDGE)->y1 = (Y1); \ > ++ (pEDGE)->slope = (SLOPE); \ > ++ (pEDGE)->dx = (DELTAX); \ > ++ (pEDGE)->ystart = (jint) floor((Y0) + 0.5); \ > ++ (pEDGE)->yend = (jint) floor((Y1) + 0.5); \ > ++ } while (0) > ++ > ++#define STORE_PGRAM(pLTEDGE, pRTEDGE, \ > ++ X0, Y0, dX1, dY1, dX2, dY2, \ > ++ SLOPE1, SLOPE2, DELTAX1, DELTAX2) \ > ++ do { \ > ++ STORE_EDGE((pLTEDGE)+0, \ > ++ (X0), (Y0), (Y0) + (dY1), \ > ++ (SLOPE1), (DELTAX1)); \ > ++ STORE_EDGE((pRTEDGE)+0, \ > ++ (X0), (Y0), (Y0) + (dY2), \ > ++ (SLOPE2), (DELTAX2)); \ > ++ STORE_EDGE((pLTEDGE)+1, \ > ++ (X0) + (dX1), (Y0) + (dY1), (Y0) + (dY1) + (dY2), \ > ++ (SLOPE2), (DELTAX2)); \ > ++ STORE_EDGE((pRTEDGE)+1, \ > ++ (X0) + (dX2), (Y0) + (dY2), (Y0) + (dY1) + (dY2), \ > ++ (SLOPE1), (DELTAX1)); \ > ++ } while (0) > ++ > ++/* > ++ * Class: sun_java2d_loops_DrawParallelogram > ++ * Method: DrawParallelogram > ++ * Signature: (Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;DDDDDDDD)V > ++ */ > ++JNIEXPORT void JNICALL > ++Java_sun_java2d_loops_DrawParallelogram_DrawParallelogram > ++ (JNIEnv *env, jobject self, > ++ jobject sg2d, jobject sData, > ++ jdouble x0, jdouble y0, > ++ jdouble dx1, jdouble dy1, > ++ jdouble dx2, jdouble dy2, > ++ jdouble lw1, jdouble lw2) > ++{ > ++ SurfaceDataOps *sdOps; > ++ SurfaceDataRasInfo rasInfo; > ++ NativePrimitive *pPrim; > ++ CompositeInfo compInfo; > ++ jint pixel; > ++ EdgeInfo edges[8]; > ++ EdgeInfo *active[4]; > ++ jint ix1, iy1, ix2, iy2; > ++ jdouble ldx1, ldy1, ldx2, ldy2; > ++ jdouble ox0, oy0; > ++ > ++ /* > ++ * Sort parallelogram by y values, ensure that each delta vector > ++ * has a non-negative y delta. > ++ */ > ++ if (dy1 < 0) { > ++ x0 += dx1; y0 += dy1; > ++ dx1 = -dx1; dy1 = -dy1; > ++ } > ++ if (dy2 < 0) { > ++ x0 += dx2; y0 += dy2; > ++ dx2 = -dx2; dy2 = -dy2; > ++ } > ++ /* Sort delta vectors so dxy1 is left of dxy2. */ > ++ if (dx1 * dy2 > dx2 * dy1) { > ++ double v = dx1; dx1 = dx2; dx2 = v; > ++ v = dy1; dy1 = dy2; dy2 = v; > ++ v = lw1; lw1 = lw2; lw2 = v; > ++ } > ++ > ++ // dx,dy for line width in the "1" and "2" directions. > ++ ldx1 = dx1 * lw1; > ++ ldy1 = dy1 * lw1; > ++ ldx2 = dx2 * lw2; > ++ ldy2 = dy2 * lw2; > ++ > ++ // calculate origin of the outer parallelogram > ++ ox0 = x0 - (ldx1 + ldx2) / 2.0; > ++ oy0 = y0 - (ldy1 + ldy2) / 2.0; > ++ > ++ PGRAM_MIN_MAX(ix1, ix2, ox0, dx1+ldx1, dx2+ldx2); > ++ iy1 = (jint) floor(oy0 + 0.5); > ++ iy2 = (jint) floor(oy0 + dy1 + ldy1 + dy2 + ldy2 + 0.5); > ++ > ++ pPrim = GetNativePrim(env, self); > ++ if (pPrim == NULL) { > ++ return; > ++ } > ++ pixel = GrPrim_Sg2dGetPixel(env, sg2d); > ++ if (pPrim->pCompType->getCompInfo != NULL) { > ++ GrPrim_Sg2dGetCompInfo(env, sg2d, pPrim, &compInfo); > ++ } > ++ > ++ sdOps = SurfaceData_GetOps(env, sData); > ++ if (sdOps == NULL) { > ++ return; > ++ } > ++ > ++ GrPrim_Sg2dGetClip(env, sg2d, &rasInfo.bounds); > ++ SurfaceData_IntersectBoundsXYXY(&rasInfo.bounds, ix1, iy1, ix2, iy2); > ++ if (rasInfo.bounds.y2 <= rasInfo.bounds.y1 || > ++ rasInfo.bounds.x2 <= rasInfo.bounds.x1) > ++ { > ++ return; > ++ } > ++ > ++ if (sdOps->Lock(env, sdOps, &rasInfo, pPrim->dstflags) != SD_SUCCESS) { > ++ return; > ++ } > ++ > ++ ix1 = rasInfo.bounds.x1; > ++ iy1 = rasInfo.bounds.y1; > ++ ix2 = rasInfo.bounds.x2; > ++ iy2 = rasInfo.bounds.y2; > ++ if (ix2 > ix1 && iy2 > iy1) { > ++ sdOps->GetRasInfo(env, sdOps, &rasInfo); > ++ if (rasInfo.rasBase) { > ++ jdouble lslope, rslope; > ++ jlong ldx, rdx; > ++ jint loy, hiy, numedges; > ++ FillParallelogramFunc *pFill = > ++ pPrim->funcs.drawparallelogram->fillpgram; > ++ > ++ lslope = (dy1 == 0) ? 0 : dx1 / dy1; > ++ rslope = (dy2 == 0) ? 0 : dx2 / dy2; > ++ ldx = DblToLong(lslope); > ++ rdx = DblToLong(rslope); > ++ > ++ // Only need to generate 4 quads if the interior still > ++ // has a hole in it (i.e. if the line width ratios were > ++ // both less than 1.0) > ++ if (lw1 < 1.0f && lw2 < 1.0f) { > ++ // If the line widths are both less than a pixel wide > ++ // then we can use a drawline function instead for even > ++ // more performance. > ++ lw1 = sqrt(ldx1*ldx1 + ldy1*ldy1); > ++ lw2 = sqrt(ldx2*ldx2 + ldy2*ldy2); > ++ if (lw1 <= 1.0001 && lw2 <= 1.0001) { > ++ jdouble x3, y3; > ++ DrawLineFunc *pLine = > ++ pPrim->funcs.drawparallelogram->drawline; > ++ > ++ x3 = (dx1 += x0); > ++ y3 = (dy1 += y0); > ++ x3 += dx2; > ++ y3 += dy2; > ++ dx2 += x0; > ++ dy2 += y0; > ++ > ++ HANDLE_PGRAM_EDGE( x0, y0, dx1, dy1, > ++ &rasInfo, pixel, pPrim, pLine, &compInfo); > ++ HANDLE_PGRAM_EDGE(dx1, dy1, x3, y3, > ++ &rasInfo, pixel, pPrim, pLine, &compInfo); > ++ HANDLE_PGRAM_EDGE( x3, y3, dx2, dy2, > ++ &rasInfo, pixel, pPrim, pLine, &compInfo); > ++ HANDLE_PGRAM_EDGE(dx2, dy2, x0, y0, > ++ &rasInfo, pixel, pPrim, pLine, &compInfo); > ++ SurfaceData_InvokeRelease(env, sdOps, &rasInfo); > ++ SurfaceData_InvokeUnlock(env, sdOps, &rasInfo); > ++ return; > ++ } > ++ > ++ // To simplify the edge management below we presort the > ++ // inner and outer edges so that they are globally sorted > ++ // from left to right. If you scan across the array of > ++ // edges for a given Y range then the edges you encounter > ++ // will be sorted in X as well. > ++ // If AB are left top and bottom edges of outer parallelogram, > ++ // and CD are the right pair of edges, and abcd are the > ++ // corresponding inner parallelogram edges then we want them > ++ // sorted as ABabcdCD to ensure this horizontal ordering. > ++ // Conceptually it is like 2 pairs of nested parentheses. > ++ STORE_PGRAM(edges + 2, edges + 4, > ++ ox0 + ldx1 + ldx2, oy0 + ldy1 + ldy2, > ++ dx1 - ldx1, dy1 - ldy1, > ++ dx2 - ldx2, dy2 - ldy2, > ++ lslope, rslope, ldx, rdx); > ++ numedges = 8; > ++ } else { > ++ // The line width ratios were large enough to consume > ++ // the entire hole in the middle of the parallelogram > ++ // so we can just issue one large quad for the outer > ++ // parallelogram. > ++ numedges = 4; > ++ } > ++ > ++ // The outer parallelogram always goes in the first two > ++ // and last two entries in the array so we either have > ++ // ABabcdCD ordering for 8 edges or ABCD ordering for 4 > ++ // edges. See comment above where we store the inner > ++ // parallelogram for a more complete description. > ++ STORE_PGRAM(edges + 0, edges + numedges-2, > ++ ox0, oy0, > ++ dx1 + ldx1, dy1 + ldy1, > ++ dx2 + ldx2, dy2 + ldy2, > ++ lslope, rslope, ldx, rdx); > ++ > ++ loy = edges[0].ystart; > ++ if (loy < iy1) loy = iy1; > ++ while (loy < iy2) { > ++ jint numactive = 0; > ++ jint cur; > ++ > ++ hiy = iy2; > ++ // Maintaining a sorted edge list is probably overkill for > ++ // 4 or 8 edges. The indices chosen above for storing the > ++ // inner and outer left and right edges already guarantee > ++ // left to right ordering so we just need to scan for edges > ++ // that overlap the current Y range (and also determine the > ++ // maximum Y value for which the range is valid). > ++ for (cur = 0; cur < numedges; cur++) { > ++ EdgeInfo *pEdge = &edges[cur]; > ++ jint yend = pEdge->yend; > ++ if (loy < yend) { > ++ // This edge is still in play, have we reached it yet? > ++ jint ystart = pEdge->ystart; > ++ if (loy < ystart) { > ++ // This edge is not active (yet) > ++ // Stop before we get to the top of it > ++ if (hiy > ystart) hiy = ystart; > ++ } else { > ++ // This edge is active, store it > ++ active[numactive++] = pEdge; > ++ // And stop when we get to the bottom of it > ++ if (hiy > yend) hiy = yend; > ++ } > ++ } > ++ } > ++#ifdef DEBUG > ++ if ((numactive & 1) != 0) { > ++ J2dTraceLn1(J2D_TRACE_ERROR, > ++ "DrawParallelogram: " > ++ "ODD NUMBER OF PGRAM EDGES (%d)!!", > ++ numactive); > ++ } > ++#endif > ++ for (cur = 0; cur < numactive; cur += 2) { > ++ EdgeInfo *pLeft = active[cur+0]; > ++ EdgeInfo *pRight = active[cur+1]; > ++ jlong lx = PGRAM_INIT_X(loy, > ++ pLeft->x0, pLeft->y0, > ++ pLeft->slope); > ++ jlong rx = PGRAM_INIT_X(loy, > ++ pRight->x0, pRight->y0, > ++ pRight->slope); > ++ (*pFill)(&rasInfo, > ++ ix1, loy, ix2, hiy, > ++ lx, pLeft->dx, > ++ rx, pRight->dx, > ++ pixel, pPrim, &compInfo); > ++ } > ++ loy = hiy; > ++ } > ++ } > ++ SurfaceData_InvokeRelease(env, sdOps, &rasInfo); > ++ } > ++ SurfaceData_InvokeUnlock(env, sdOps, &rasInfo); > ++} > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/FillParallelogram.c > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/FillParallelogram.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -0,0 +1,209 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. Oracle designates this > ++ * particular file as subject to the "Classpath" exception as provided > ++ * by Oracle in the LICENSE file that accompanied this code. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++#include "math.h" > ++#include "GraphicsPrimitiveMgr.h" > ++ > ++#include "sun_java2d_loops_FillParallelogram.h" > ++ > ++#define PGRAM_MIN_MAX(bmin, bmax, v0, dv1, dv2) \ > ++ do { \ > ++ double vmin, vmax; \ > ++ if (dv1 < 0) { \ > ++ vmin = v0+dv1; \ > ++ vmax = v0; \ > ++ } else { \ > ++ vmin = v0; \ > ++ vmax = v0+dv1; \ > ++ } \ > ++ if (dv2 < 0) { \ > ++ vmin -= dv2; \ > ++ } else { \ > ++ vmax += dv2; \ > ++ } \ > ++ bmin = (jint) floor(vmin + 0.5); \ > ++ bmax = (jint) floor(vmax + 0.5); \ > ++ } while(0) > ++ > ++#define PGRAM_INIT_X(starty, x, y, slope) \ > ++ (DblToLong((x) + (slope) * ((starty)+0.5 - (y))) + LongOneHalf - 1) > ++ > ++/* > ++ * Class: sun_java2d_loops_FillParallelogram > ++ * Method: FillParallelogram > ++ * Signature: (Lsun/java2d/SunGraphics2D;Lsun/java2d/SurfaceData;DDDDDD)V > ++ */ > ++JNIEXPORT void JNICALL > ++Java_sun_java2d_loops_FillParallelogram_FillParallelogram > ++ (JNIEnv *env, jobject self, > ++ jobject sg2d, jobject sData, > ++ jdouble x0, jdouble y0, > ++ jdouble dx1, jdouble dy1, > ++ jdouble dx2, jdouble dy2) > ++{ > ++ SurfaceDataOps *sdOps; > ++ SurfaceDataRasInfo rasInfo; > ++ NativePrimitive *pPrim; > ++ CompositeInfo compInfo; > ++ jint pixel; > ++ jint ix1, iy1, ix2, iy2; > ++ > ++ if ((dy1 == 0 && dx1 == 0) || (dy2 == 0 && dx2 == 0)) { > ++ return; > ++ } > ++ > ++ /* > ++ * Sort parallelogram by y values, ensure that each delta vector > ++ * has a non-negative y delta, and eliminate degenerate parallelograms. > ++ */ > ++ if (dy1 < 0) { > ++ x0 += dx1; y0 += dy1; > ++ dx1 = -dx1; dy1 = -dy1; > ++ } > ++ if (dy2 < 0) { > ++ x0 += dx2; y0 += dy2; > ++ dx2 = -dx2; dy2 = -dy2; > ++ } > ++ /* Sort delta vectors so dxy1 is left of dxy2. */ > ++ if (dx1 * dy2 > dx2 * dy1) { > ++ double v = dx1; dx1 = dx2; dx2 = v; > ++ v = dy1; dy1 = dy2; dy2 = v; > ++ } > ++ PGRAM_MIN_MAX(ix1, ix2, x0, dx1, dx2); > ++ iy1 = (jint) floor(y0 + 0.5); > ++ iy2 = (jint) floor(y0 + dy1 + dy2 + 0.5); > ++ > ++ pPrim = GetNativePrim(env, self); > ++ if (pPrim == NULL) { > ++ return; > ++ } > ++ pixel = GrPrim_Sg2dGetPixel(env, sg2d); > ++ if (pPrim->pCompType->getCompInfo != NULL) { > ++ GrPrim_Sg2dGetCompInfo(env, sg2d, pPrim, &compInfo); > ++ } > ++ > ++ sdOps = SurfaceData_GetOps(env, sData); > ++ if (sdOps == NULL) { > ++ return; > ++ } > ++ > ++ GrPrim_Sg2dGetClip(env, sg2d, &rasInfo.bounds); > ++ SurfaceData_IntersectBoundsXYXY(&rasInfo.bounds, ix1, iy1, ix2, iy2); > ++ if (rasInfo.bounds.y2 <= rasInfo.bounds.y1 || > ++ rasInfo.bounds.x2 <= rasInfo.bounds.x1) > ++ { > ++ return; > ++ } > ++ > ++ if (sdOps->Lock(env, sdOps, &rasInfo, pPrim->dstflags) != SD_SUCCESS) { > ++ return; > ++ } > ++ > ++ ix1 = rasInfo.bounds.x1; > ++ iy1 = rasInfo.bounds.y1; > ++ ix2 = rasInfo.bounds.x2; > ++ iy2 = rasInfo.bounds.y2; > ++ if (ix2 > ix1 && iy2 > iy1) { > ++ sdOps->GetRasInfo(env, sdOps, &rasInfo); > ++ if (rasInfo.rasBase) { > ++ jdouble lslope = (dy1 == 0) ? 0 : dx1 / dy1; > ++ jdouble rslope = (dy2 == 0) ? 0 : dx2 / dy2; > ++ jlong ldx = DblToLong(lslope); > ++ jlong rdx = DblToLong(rslope); > ++ jint cy1, cy2, loy, hiy; > ++ dx1 += x0; > ++ dy1 += y0; > ++ dx2 += x0; > ++ dy2 += y0; > ++ cy1 = (jint) floor(dy1 + 0.5); > ++ cy2 = (jint) floor(dy2 + 0.5); > ++ > ++ /* Top triangular portion. */ > ++ loy = iy1; > ++ hiy = (cy1 < cy2) ? cy1 : cy2; > ++ if (hiy > iy2) hiy = iy2; > ++ if (loy < hiy) { > ++ jlong lx = PGRAM_INIT_X(loy, x0, y0, lslope); > ++ jlong rx = PGRAM_INIT_X(loy, x0, y0, rslope); > ++ (*pPrim->funcs.fillparallelogram)(&rasInfo, > ++ ix1, loy, ix2, hiy, > ++ lx, ldx, rx, rdx, > ++ pixel, pPrim, &compInfo); > ++ } > ++ > ++ /* Middle parallelogram portion, which way does it slant? */ > ++ if (cy1 < cy2) { > ++ /* Middle parallelogram portion, slanted to right. */ > ++ /* left leg turned a corner at y0+dy1 */ > ++ /* right leg continuing on its initial trajectory from y0 */ > ++ loy = cy1; > ++ hiy = cy2; > ++ if (loy < iy1) loy = iy1; > ++ if (hiy > iy2) hiy = iy2; > ++ if (loy < hiy) { > ++ jlong lx = PGRAM_INIT_X(loy, dx1, dy1, rslope); > ++ jlong rx = PGRAM_INIT_X(loy, x0, y0, rslope); > ++ (*pPrim->funcs.fillparallelogram)(&rasInfo, > ++ ix1, loy, ix2, hiy, > ++ lx, rdx, rx, rdx, > ++ pixel, pPrim, &compInfo); > ++ } > ++ } else if (cy2 < cy1) { > ++ /* Middle parallelogram portion, slanted to left. */ > ++ /* left leg continuing on its initial trajectory from y0 */ > ++ /* right leg turned a corner at y0+dy2 */ > ++ loy = cy2; > ++ hiy = cy1; > ++ if (loy < iy1) loy = iy1; > ++ if (hiy > iy2) hiy = iy2; > ++ if (loy < hiy) { > ++ jlong lx = PGRAM_INIT_X(loy, x0, y0, lslope); > ++ jlong rx = PGRAM_INIT_X(loy, dx2, dy2, lslope); > ++ (*pPrim->funcs.fillparallelogram)(&rasInfo, > ++ ix1, loy, ix2, hiy, > ++ lx, ldx, rx, ldx, > ++ pixel, pPrim, &compInfo); > ++ } > ++ } > ++ > ++ /* Bottom triangular portion. */ > ++ loy = (cy1 > cy2) ? cy1 : cy2; > ++ if (loy < iy1) loy = iy1; > ++ hiy = iy2; > ++ if (loy < hiy) { > ++ /* left leg turned its corner at y0+dy1, now moving right */ > ++ /* right leg turned its corner at y0+dy2, now moving left */ > ++ jlong lx = PGRAM_INIT_X(loy, dx1, dy1, rslope); > ++ jlong rx = PGRAM_INIT_X(loy, dx2, dy2, lslope); > ++ (*pPrim->funcs.fillparallelogram)(&rasInfo, > ++ ix1, loy, ix2, hiy, > ++ lx, rdx, rx, ldx, > ++ pixel, pPrim, &compInfo); > ++ } > ++ } > ++ SurfaceData_InvokeRelease(env, sdOps, &rasInfo); > ++ } > ++ SurfaceData_InvokeUnlock(env, sdOps, &rasInfo); > ++} > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -574,6 +574,8 @@ > + { "sun/java2d/loops/ScaledBlit", SD_LOCK_READ, SD_LOCK_WRITE, NULL, NULL}, > + { "sun/java2d/loops/FillRect", 0, SD_LOCK_WRITE, NULL, NULL}, > + { "sun/java2d/loops/FillSpans", 0, SD_LOCK_PARTIAL_WRITE, NULL, NULL}, > ++ { "sun/java2d/loops/FillParallelogram", 0, SD_LOCK_PARTIAL_WRITE, NULL, NULL}, > ++ { "sun/java2d/loops/DrawParallelogram", 0, SD_LOCK_PARTIAL_WRITE, NULL, NULL}, > + { "sun/java2d/loops/DrawLine", 0, SD_LOCK_PARTIAL_WRITE, NULL, NULL}, > + { "sun/java2d/loops/DrawRect", 0, SD_LOCK_PARTIAL_WRITE, NULL, NULL}, > + { "sun/java2d/loops/DrawPolygons", 0, SD_LOCK_PARTIAL_WRITE, NULL, NULL}, > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/GraphicsPrimitiveMgr.h Mon Dec 06 21:45:48 2010 -0800 > +@@ -334,6 +334,26 @@ > + jint yfract, jint dyfract); > + > + /* > ++ * The signature of the inner loop function for a "FillParallelogram" > ++ * Note that this same inner loop is used for native DrawParallelogram > ++ * primitives. > ++ * Note that these functions are paired with equivalent DrawLine > ++ * inner loop functions to facilitate nicer looking and faster thin > ++ * transformed drawrect calls. > ++ */ > ++typedef void (FillParallelogramFunc)(SurfaceDataRasInfo *pRasInfo, > ++ jint lox, jint loy, jint hix, jint hiy, > ++ jlong leftx, jlong dleftx, > ++ jlong rightx, jlong drightx, > ++ jint pixel, struct _NativePrimitive *pPrim, > ++ CompositeInfo *pCompInfo); > ++ > ++typedef struct { > ++ FillParallelogramFunc *fillpgram; > ++ DrawLineFunc *drawline; > ++} DrawParallelogramFuncs; > ++ > ++/* > + * This structure contains all information for defining a single > + * native GraphicsPrimitive, including: > + * - The information about the type of the GraphicsPrimitive subclass. > +@@ -363,6 +383,8 @@ > + ScaleBlitFunc *scaledblit; > + FillRectFunc *fillrect; > + FillSpansFunc *fillspans; > ++ FillParallelogramFunc *fillparallelogram; > ++ DrawParallelogramFuncs *drawparallelogram; > + DrawLineFunc *drawline; > + MaskFillFunc *maskfill; > + MaskBlitFunc *maskblit; > +@@ -393,6 +415,8 @@ > + PrimitiveType ScaledBlit; > + PrimitiveType FillRect; > + PrimitiveType FillSpans; > ++ PrimitiveType FillParallelogram; > ++ PrimitiveType DrawParallelogram; > + PrimitiveType DrawLine; > + PrimitiveType DrawRect; > + PrimitiveType DrawPolygons; > +@@ -536,6 +560,7 @@ > + #define LongOneHalf (((jlong) 1) << 31) > + #define IntToLong(i) (((jlong) (i)) << 32) > + #define DblToLong(d) ((jlong) ((d) * IntToLong(1))) > ++#define LongToDbl(l) (((jdouble) l) / IntToLong(1)) > + #define WholeOfLong(l) ((jint) ((l) >> 32)) > + #define FractOfLong(l) ((jint) (l)) > + #define URShift(i, n) (((juint) (i)) >> (n)) > +@@ -595,6 +620,10 @@ > + #define REGISTER_FILLSPANS(SRC, COMP, DST, FUNC) \ > + REGISTER_PRIMITIVE(FillSpans, SRC, COMP, DST, FUNC) > + > ++#define REGISTER_FILLPGRAM(SRC, COMP, DST, FUNC) \ > ++ REGISTER_PRIMITIVE(FillParallelogram, SRC, COMP, DST, FUNC), \ > ++ REGISTER_PRIMITIVE(DrawParallelogram, SRC, COMP, DST, FUNC) > ++ > + #define REGISTER_LINE_PRIMITIVES(SRC, COMP, DST, FUNC) \ > + REGISTER_PRIMITIVE(DrawLine, SRC, COMP, DST, FUNC), \ > + REGISTER_PRIMITIVE(DrawRect, SRC, COMP, DST, FUNC), \ > +diff -r 1d4340015b85 -r 47cd69eff641 src/share/native/sun/java2d/loops/LoopMacros.h > +--- openjdk.orig/jdk/src/share/native/sun/java2d/loops/LoopMacros.h Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/share/native/sun/java2d/loops/LoopMacros.h Mon Dec 06 21:45:48 2010 -0800 > +@@ -607,6 +607,12 @@ > + > + #define NAME_TRANSFORMHELPER_FUNCS(TYPE) TYPE ## TransformHelperFuncs > + > ++#define NAME_SOLID_FILLPGRAM(TYPE) TYPE ## SetParallelogram > ++#define NAME_SOLID_PGRAM_FUNCS(TYPE) TYPE ## SetParallelogramFuncs > ++ > ++#define NAME_XOR_FILLPGRAM(TYPE) TYPE ## XorParallelogram > ++#define NAME_XOR_PGRAM_FUNCS(TYPE) TYPE ## XorParallelogramFuncs > ++ > + /* > + * These macros conveniently name and declare the indicated native > + * primitive loop function for forward referencing. > +@@ -689,6 +695,16 @@ > + TransformHelperFunc NAME_TRANSFORMHELPER_BC(TYPE); \ > + TransformHelperFuncs NAME_TRANSFORMHELPER_FUNCS(TYPE) > + > ++#define DECLARE_SOLID_PARALLELOGRAM(TYPE) \ > ++ FillParallelogramFunc NAME_SOLID_FILLPGRAM(TYPE); \ > ++ DECLARE_SOLID_DRAWLINE(TYPE); \ > ++ DrawParallelogramFuncs NAME_SOLID_PGRAM_FUNCS(TYPE) > ++ > ++#define DECLARE_XOR_PARALLELOGRAM(TYPE) \ > ++ FillParallelogramFunc NAME_XOR_FILLPGRAM(TYPE); \ > ++ DECLARE_XOR_DRAWLINE(TYPE); \ > ++ DrawParallelogramFuncs NAME_XOR_PGRAM_FUNCS(TYPE) > ++ > + /* > + * These macros construct the necessary NativePrimitive structure > + * for the indicated native primitive loop function which will be > +@@ -800,6 +816,18 @@ > + REGISTER_PRIMITIVE(TransformHelper, TYPE, SrcNoEa, IntArgbPre, \ > + (AnyFunc *) &NAME_TRANSFORMHELPER_FUNCS(TYPE)) > + > ++#define REGISTER_SOLID_PARALLELOGRAM(TYPE) \ > ++ REGISTER_PRIMITIVE(FillParallelogram, AnyColor, SrcNoEa, TYPE, \ > ++ NAME_SOLID_FILLPGRAM(TYPE)), \ > ++ REGISTER_PRIMITIVE(DrawParallelogram, AnyColor, SrcNoEa, TYPE, \ > ++ (AnyFunc *) &NAME_SOLID_PGRAM_FUNCS(TYPE)) > ++ > ++#define REGISTER_XOR_PARALLELOGRAM(TYPE) \ > ++ REGISTER_PRIMITIVE(FillParallelogram, AnyColor, Xor, TYPE, \ > ++ NAME_XOR_FILLPGRAM(TYPE)), \ > ++ REGISTER_PRIMITIVE(DrawParallelogram, AnyColor, Xor, TYPE, \ > ++ (AnyFunc *) &NAME_XOR_PGRAM_FUNCS(TYPE)) > ++ > + /* > + * This macro defines an entire function to implement a Blit inner loop > + * for copying pixels of a common type from one buffer to another. > +@@ -1265,6 +1293,51 @@ > + } > + > + /* > ++ * This macro defines an entire function to implement a FillParallelogram > ++ * inner loop for tracing 2 diagonal edges (left and right) and setting > ++ * those regions of pixels between them to a specific pixel value. > ++ * No blending of the fill color is done with the pixels. > ++ */ > ++#define DEFINE_SOLID_FILLPGRAM(DST) \ > ++void NAME_SOLID_FILLPGRAM(DST)(SurfaceDataRasInfo *pRasInfo, \ > ++ jint lox, jint loy, jint hix, jint hiy, \ > ++ jlong leftx, jlong dleftx, \ > ++ jlong rightx, jlong drightx, \ > ++ jint pixel, struct _NativePrimitive *pPrim, \ > ++ CompositeInfo *pCompInfo) \ > ++{ \ > ++ Declare ## DST ## PixelData(pix) \ > ++ jint scan = pRasInfo->scanStride; \ > ++ DST ## DataType *pPix = PtrCoord(pRasInfo->rasBase, 0, 0, loy, scan); \ > ++ \ > ++ Extract ## DST ## PixelData(pixel, pix); \ > ++ while (loy < hiy) { \ > ++ jint lx = WholeOfLong(leftx); \ > ++ jint rx = WholeOfLong(rightx); \ > ++ if (lx < lox) lx = lox; \ > ++ if (rx > hix) rx = hix; \ > ++ while (lx < rx) { \ > ++ Store ## DST ## PixelData(pPix, lx, pixel, pix); \ > ++ lx++; \ > ++ } \ > ++ pPix = PtrAddBytes(pPix, scan); \ > ++ leftx += dleftx; \ > ++ rightx += drightx; \ > ++ loy++; \ > ++ } \ > ++} > ++ > ++#define DEFINE_SOLID_DRAWPARALLELOGRAM_FUNCS(DST) \ > ++ DrawParallelogramFuncs NAME_SOLID_PGRAM_FUNCS(DST) = { \ > ++ NAME_SOLID_FILLPGRAM(DST), \ > ++ NAME_SOLID_DRAWLINE(DST), \ > ++ }; > ++ > ++#define DEFINE_SOLID_PARALLELOGRAM(DST) \ > ++ DEFINE_SOLID_FILLPGRAM(DST) \ > ++ DEFINE_SOLID_DRAWPARALLELOGRAM_FUNCS(DST) > ++ > ++/* > + * This macro declares the bumpmajor and bumpminor variables used for the > + * DrawLine functions. > + */ > +diff -r 1d4340015b85 -r 47cd69eff641 src/solaris/native/sun/java2d/loops/java2d_Mlib.c > +--- openjdk.orig/jdk/src/solaris/native/sun/java2d/loops/java2d_Mlib.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/solaris/native/sun/java2d/loops/java2d_Mlib.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -282,6 +282,50 @@ > + > + /***************************************************************/ > + > ++#define DEFINE_SET_PGRAM(FUNC, ANYTYPE, NCHAN) \ > ++void ADD_SUFF(ANYTYPE##FUNC)(SurfaceDataRasInfo *pRasInfo, \ > ++ jint lox, jint loy, \ > ++ jint hix, jint hiy, \ > ++ jlong leftx, jlong dleftx, \ > ++ jlong rightx, jlong drightx, \ > ++ jint pixel, NativePrimitive * pPrim, \ > ++ CompositeInfo * pCompInfo) \ > ++{ \ > ++ mlib_image dst[1]; \ > ++ mlib_s32 dstScan = pRasInfo->scanStride; \ > ++ mlib_u8 *dstBase = (mlib_u8*)(pRasInfo->rasBase), *pdst; \ > ++ mlib_s32 c_arr[4]; \ > ++ \ > ++ STORE_CONST_##NCHAN(c_arr, pixel); \ > ++ pdst = dstBase + loy*dstScan; \ > ++ \ > ++ while (loy < hiy) { \ > ++ jint lx = WholeOfLong(leftx); \ > ++ jint rx = WholeOfLong(rightx); \ > ++ if (lx < lox) lx = lox; \ > ++ if (rx > hix) rx = hix; \ > ++ \ > ++ MLIB_IMAGE_SET(dst, MLIB_##ANYTYPE, NCHAN_##ANYTYPE, \ > ++ rx-lx, 1, dstScan, \ > ++ pdst + lx*ANYTYPE##PixelStride); \ > ++ \ > ++ mlib_ImageClear(dst, c_arr); \ > ++ \ > ++ pdst = PtrAddBytes(pdst, dstScan); \ > ++ leftx += dleftx; \ > ++ rightx += drightx; \ > ++ loy++; \ > ++ } \ > ++} > ++ > ++DEFINE_SET_PGRAM(SetParallelogram, Any3Byte, 3) > ++DEFINE_SET_PGRAM(SetParallelogram, Any4Byte, 4) > ++DEFINE_SET_PGRAM(SetParallelogram, AnyByte, 1) > ++DEFINE_SET_PGRAM(SetParallelogram, AnyInt, 1) > ++DEFINE_SET_PGRAM(SetParallelogram, AnyShort, 1) > ++ > ++/***************************************************************/ > ++ > + #define SCALE_COPY(index, chan) \ > + pDst[chan] = pSrc[index] > + > +diff -r 1d4340015b85 -r 47cd69eff641 src/solaris/native/sun/java2d/loops/vis_FuncArray.c > +--- openjdk.orig/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c Mon Dec 06 16:10:01 2010 -0800 > ++++ openjdk/jdk/src/solaris/native/sun/java2d/loops/vis_FuncArray.c Mon Dec 06 21:45:48 2010 -0800 > +@@ -51,6 +51,7 @@ > + DEF_FUNC(AnyByteSetLine) > + DEF_FUNC(AnyByteSetRect) > + DEF_FUNC(AnyByteSetSpans) > ++DEF_FUNC(AnyByteSetParallelogram) > + DEF_FUNC(AnyByteXorLine) > + DEF_FUNC(AnyByteXorRect) > + DEF_FUNC(AnyByteXorSpans) > +@@ -62,6 +63,7 @@ > + DEF_FUNC(AnyShortSetLine) > + DEF_FUNC(AnyShortSetRect) > + DEF_FUNC(AnyShortSetSpans) > ++DEF_FUNC(AnyShortSetParallelogram) > + DEF_FUNC(AnyShortXorLine) > + DEF_FUNC(AnyShortXorRect) > + DEF_FUNC(AnyShortXorSpans) > +@@ -73,6 +75,7 @@ > + DEF_FUNC(Any3ByteSetLine) > + DEF_FUNC(Any3ByteSetRect) > + DEF_FUNC(Any3ByteSetSpans) > ++DEF_FUNC(Any3ByteSetParallelogram) > + DEF_FUNC(Any3ByteXorLine) > + DEF_FUNC(Any3ByteXorRect) > + DEF_FUNC(Any3ByteXorSpans) > +@@ -84,6 +87,7 @@ > + DEF_FUNC(Any4ByteSetLine) > + DEF_FUNC(Any4ByteSetRect) > + DEF_FUNC(Any4ByteSetSpans) > ++DEF_FUNC(Any4ByteSetParallelogram) > + DEF_FUNC(Any4ByteXorLine) > + DEF_FUNC(Any4ByteXorRect) > + DEF_FUNC(Any4ByteXorSpans) > +@@ -95,6 +99,7 @@ > + DEF_FUNC(AnyIntSetLine) > + DEF_FUNC(AnyIntSetRect) > + DEF_FUNC(AnyIntSetSpans) > ++DEF_FUNC(AnyIntSetParallelogram) > + DEF_FUNC(AnyIntXorLine) > + DEF_FUNC(AnyIntXorRect) > + DEF_FUNC(AnyIntXorSpans) > +@@ -513,6 +518,7 @@ > + ADD_FUNC(AnyByteSetLine), > + ADD_FUNC(AnyByteSetRect), > + ADD_FUNC(AnyByteSetSpans), > ++ ADD_FUNC(AnyByteSetParallelogram), > + ADD_FUNC(AnyByteXorLine), > + ADD_FUNC(AnyByteXorRect), > + ADD_FUNC(AnyByteXorSpans), > +@@ -524,6 +530,7 @@ > + ADD_FUNC(AnyShortSetLine), > + ADD_FUNC(AnyShortSetRect), > + ADD_FUNC(AnyShortSetSpans), > ++ ADD_FUNC(AnyShortSetParallelogram), > + ADD_FUNC(AnyShortXorLine), > + ADD_FUNC(AnyShortXorRect), > + ADD_FUNC(AnyShortXorSpans), > +@@ -533,6 +540,7 @@ > + ADD_FUNC(Any3ByteSetLine), > + ADD_FUNC(Any3ByteSetRect), > + ADD_FUNC(Any3ByteSetSpans), > ++ ADD_FUNC(Any3ByteSetParallelogram), > + ADD_FUNC(Any3ByteXorLine), > + ADD_FUNC(Any3ByteXorRect), > + ADD_FUNC(Any3ByteXorSpans), > +@@ -544,6 +552,7 @@ > + ADD_FUNC(Any4ByteSetLine), > + ADD_FUNC(Any4ByteSetRect), > + ADD_FUNC(Any4ByteSetSpans), > ++ ADD_FUNC(Any4ByteSetParallelogram), > + ADD_FUNC(Any4ByteXorLine), > + ADD_FUNC(Any4ByteXorRect), > + ADD_FUNC(Any4ByteXorSpans), > +@@ -555,6 +564,7 @@ > + ADD_FUNC(AnyIntSetLine), > + ADD_FUNC(AnyIntSetRect), > + ADD_FUNC(AnyIntSetSpans), > ++ ADD_FUNC(AnyIntSetParallelogram), > + ADD_FUNC(AnyIntXorLine), > + ADD_FUNC(AnyIntXorRect), > + ADD_FUNC(AnyIntXorSpans), -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From xranby at icedtea.classpath.org Wed Feb 23 05:54:30 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Wed, 23 Feb 2011 13:54:30 +0000 Subject: /hg/buildbot: Make cpitbb less chatty. Message-ID: changeset f644988c61fd in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=f644988c61fd author: Xerxes R?nby date: Wed Feb 23 14:37:20 2011 +0100 Make cpitbb less chatty. 2011-02-23 Xerxes Ranby Make cpitbb less chatty. cpitbb only checks if the word exist in the wordlist. Removed all word-key pairs that triggered unexpected operation. diffstat: 1 file changed, 1 insertion(+), 8 deletions(-) icedtea/master.cfg | 9 +-------- diffs (22 lines): diff -r f9e38dc5abc3 -r f644988c61fd icedtea/master.cfg --- a/icedtea/master.cfg Wed Feb 23 14:28:09 2011 +0100 +++ b/icedtea/master.cfg Wed Feb 23 14:37:20 2011 +0100 @@ -742,17 +742,10 @@ c['status'].append(words.IRC(host="irc.o channels=["#openjdk"], allowForce=False, notify_events={ - 'started': 0, - 'finished': 0, - 'success': 0, - 'failure': 0, - 'exception': 0, 'successToFailure': 1, 'successToException': 1, 'failureToSuccess': 1, - 'failureToException': 0, - 'exceptionToSuccess': 1, - 'exceptionToFailure': 0 + 'exceptionToSuccess': 1 })) # Allows command line and gui listening. From andrew at icedtea.classpath.org Wed Feb 23 05:55:48 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 13:55:48 +0000 Subject: /hg/icedtea6: Replace WITH_CACAO with more accurate ENABLE_CACAO. Message-ID: changeset 69e952bd19fd in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=69e952bd19fd author: Andrew John Hughes date: Wed Feb 23 13:55:40 2011 +0000 Replace WITH_CACAO with more accurate ENABLE_CACAO. 2011-02-22 Andrew John Hughes Use more accurate ENABLE_CACAO rather than WITH_CACAO. * Makefile.am: Replace WITH_CACAO throughout. * acinclude.m4: Likewise. diffstat: 3 files changed, 22 insertions(+), 14 deletions(-) ChangeLog | 8 ++++++++ Makefile.am | 12 ++++++------ acinclude.m4 | 16 ++++++++-------- diffs (121 lines): diff -r a82e71679b03 -r 69e952bd19fd ChangeLog --- a/ChangeLog Wed Feb 23 12:30:22 2011 +0100 +++ b/ChangeLog Wed Feb 23 13:55:40 2011 +0000 @@ -1,3 +1,11 @@ 2011-02-23 Xerxes Ranby + + Use more accurate ENABLE_CACAO rather + than WITH_CACAO. + * Makefile.am: + Replace WITH_CACAO throughout. + * acinclude.m4: Likewise. + 2011-02-23 Xerxes Ranby JamVM: Try --with-additional-vms=jamvm topping! diff -r a82e71679b03 -r 69e952bd19fd Makefile.am --- a/Makefile.am Wed Feb 23 12:30:22 2011 +0100 +++ b/Makefile.am Wed Feb 23 13:55:40 2011 +0000 @@ -134,7 +134,7 @@ else MEMORY_LIMIT = -J-Xmx1024m endif -if WITH_CACAO +if ENABLE_CACAO ICEDTEA_BUILD_TARGET=jdk_only ICEDTEA_DEBUG_BUILD_TARGET = jdk_fastdebug_only else @@ -350,7 +350,7 @@ ICEDTEA_PATCHES += \ patches/cacao/arm-jvm.cfg-pr600.patch endif -if WITH_CACAO +if ENABLE_CACAO ICEDTEA_PATCHES += \ patches/cacao/ignore-jdi-tests.patch \ patches/cacao/ignore-tests.patch @@ -485,7 +485,7 @@ ICEDTEA_ENV = \ VERBOSE="$(VERBOSE)" \ ALT_OUTPUTDIR="$(BUILD_OUTPUT_DIR)" -if WITH_CACAO +if ENABLE_CACAO ICEDTEA_ENV += \ ALT_HOTSPOT_IMPORT_PATH="$(CACAO_IMPORT_PATH)" endif @@ -1086,7 +1086,7 @@ stamps/patch.stamp: stamps/patch-fsg.sta fi icedtea_version="$(PACKAGE_VERSION)$(ICEDTEA_REV)" ; \ - if test "x$(WITH_CACAO)" = "xyes" || \ + if test "x$(ENABLE_CACAO)" = "xyes" || \ test "x$(ENABLE_JAMVM)" = "xyes"; then \ echo "JDK_DERIVATIVE_NAME=$${icedtea_version}" \ >>openjdk/jdk/make/common/shared/Defs.gmk ; \ @@ -1330,7 +1330,7 @@ if SHARK_BUILD if SHARK_BUILD printf -- '-shark ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg endif -if WITH_CACAO +if ENABLE_CACAO printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_JRE_ARCH_DIR)/jvm.cfg endif if ENABLE_JAMVM @@ -1361,7 +1361,7 @@ if SHARK_BUILD if SHARK_BUILD printf -- '-shark ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg endif -if WITH_CACAO +if ENABLE_CACAO printf -- '-cacao ALIASED_TO -server\n' >> $(BUILD_DEBUG_JRE_ARCH_DIR)/jvm.cfg endif if ENABLE_JAMVM diff -r a82e71679b03 -r 69e952bd19fd acinclude.m4 --- a/acinclude.m4 Wed Feb 23 12:30:22 2011 +0100 +++ b/acinclude.m4 Wed Feb 23 13:55:40 2011 +0000 @@ -783,7 +783,7 @@ AC_DEFUN([IT_ENABLE_ZERO_BUILD], sparc*-*-*) ;; x86_64-*-*) ;; *) - if test "x${WITH_CACAO}" != xno || \ + if test "x${ENABLE_CACAO}" != xno || \ test "x${ENABLE_JAMVM}" = xyes; then use_zero=no else @@ -881,15 +881,15 @@ AC_DEFUN([IT_CHECK_ENABLE_CACAO], AC_ARG_ENABLE([cacao], [AS_HELP_STRING(--enable-cacao,use CACAO as VM [[default=no]])], [ - WITH_CACAO="${enableval}" + ENABLE_CACAO="${enableval}" ], [ - WITH_CACAO=no + ENABLE_CACAO=no ]) - AC_MSG_RESULT(${WITH_CACAO}) - AM_CONDITIONAL(WITH_CACAO, test x"${WITH_CACAO}" = "xyes") - AC_SUBST(WITH_CACAO) + AC_MSG_RESULT(${ENABLE_CACAO}) + AM_CONDITIONAL(ENABLE_CACAO, test x"${ENABLE_CACAO}" = "xyes") + AC_SUBST(ENABLE_CACAO) ]) AC_DEFUN([IT_CHECK_WITH_CACAO_HOME], @@ -1223,13 +1223,13 @@ AM_CONDITIONAL(ADD_CACAO_BUILD, test x$a AM_CONDITIONAL(ADD_CACAO_BUILD, test x$add_vm_cacao != x) AM_CONDITIONAL(ADD_ZERO_BUILD, test x$add_vm_zero != x || test x$add_vm_shark != x) AM_CONDITIONAL(ADD_SHARK_BUILD, test x$add_vm_shark != x) +AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${ENABLE_CACAO}" = xyes) AM_CONDITIONAL(BUILD_JAMVM, test x$add_vm_jamvm != x || test "x${ENABLE_JAMVM}" = xyes) -AM_CONDITIONAL(BUILD_CACAO, test x$add_vm_cacao != x || test "x${WITH_CACAO}" = xyes) if test "x${ENABLE_JAMVM}" = xyes && test "x${ADD_JAMVM_BUILD_TRUE}" = x; then AC_MSG_ERROR([additional vm is the default vm]) fi -if test "x${WITH_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then +if test "x${ENABLE_CACAO}" = xyes && test "x${ADD_CACAO_BUILD_TRUE}" = x; then AC_MSG_ERROR([additional vm is the default vm]) fi if test "x${ZERO_BUILD_TRUE}" = x && test "x${ADD_ZERO_BUILD_TRUE}" = x && test "x${ADD_SHARK_BUILD_TRUE}" != x; then From ahughes at redhat.com Wed Feb 23 05:48:34 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 13:48:34 +0000 Subject: [icedtea-web] RFC: fix lookup of about.jnlp In-Reply-To: <4D640AE6.3090905@redhat.com> References: <4D640AE6.3090905@redhat.com> Message-ID: <20110223134834.GN24648@rivendell.middle-earth.co.uk> On 14:13 Tue 22 Feb , Omair Majid wrote: > Hi, > > The fix to isolate icedtea-web in a non-JDK directory has resulted in > javaws -about being broken. This is because javaws still looks for > about.jnlp in the JDK directory. The attached patch fixes it by making > netx use the about.jnlp that's included in netx.jar. > > I am not sure if this is the best fix; IcedTea-Web installs a separate > about.jnlp in $(datadir)/icedtea-web/ which should be used instead. > > Ok to commit? > > Cheers, > Omair I don't think this is the right thing to do. The installed about.jnlp in $(datadir) should be used. > diff -r 87d12ebb7047 netx/net/sourceforge/jnlp/resources/Messages.properties > --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 22 12:59:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Tue Feb 22 14:04:28 2011 -0500 > @@ -121,6 +121,7 @@ > # Runtime > BLaunchAbout=Launching about window... > BNeedsFile=Must specify a .jnlp file > +RNoAboutJnlp=Unable to find about.jnlp > BFileLoc=JNLP file location > BArgNA=Arguments not used for this type of JNLP file (ignored). > BParamNA=Parameters not used for this type of JNLP file (ignored). > diff -r 87d12ebb7047 netx/net/sourceforge/jnlp/runtime/Boot.java > --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Tue Feb 22 12:59:18 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Tue Feb 22 14:04:28 2011 -0500 > @@ -109,10 +109,6 @@ > + " -Xclearcache " + R("BXclearcache") + "\n" > + " -help " + R("BOHelp") + "\n"; > > - /** the JNLP file to open to display the network-based about window */ > - private static final String NETX_ABOUT_FILE = System.getProperty("java.home") + File.separator + "lib" > - + File.separator + "about.jnlp"; > - > private static final String doubleArgs = "-basedir -jnlp -arg -param -property -update"; > > private static String args[]; // avoid the hot potato > @@ -213,15 +209,19 @@ > } > > /** > - * Returns the about.jnlp file in {java.home}/lib or null if this file > + * Returns the location of the about.jnlp file or null if this file > * does not exist. > */ > private static String getAboutFile() { > - > - if (new File(NETX_ABOUT_FILE).exists()) > - return NETX_ABOUT_FILE; > - else > + ClassLoader cl = Boot.class.getClassLoader(); > + if (cl == null) { > + cl = ClassLoader.getSystemClassLoader(); > + } > + try { > + return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > + } catch (Exception e) { > return null; > + } > } > > /** > @@ -236,7 +236,7 @@ > if (getOption("-about") != null) { > location = getAboutFile(); > if (location == null) > - fatalError("Unable to find about.jnlp in {java.home}/lib/"); > + fatalError(R("RNoAboutJnlp")); > } else { > location = getJNLPFile(); > } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ptisnovs at redhat.com Wed Feb 23 06:04:07 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Wed, 23 Feb 2011 15:04:07 +0100 Subject: Reviewer needed - allow the package com.sun.awt to be used by Java compiler (but with warning) In-Reply-To: <20110223134329.GM24648@rivendell.middle-earth.co.uk> References: <4D63EABF.9070808@redhat.com> <20110223134329.GM24648@rivendell.middle-earth.co.uk> Message-ID: <4D6513D7.6070601@redhat.com> Dr Andrew John Hughes wrote: >> > > Is this a backport of an OpenJDK7 changeset? If so, which one? And why > does the patch not include a bug ID? > Well I created this patch myself and then I realized that similar change already exists in OpenJDK7: It's changeset #259: 6663040: Using com.sun.awt.AWTUtilities do not give warning while compilation Reviewed-by: yan, anthony From omajid at redhat.com Wed Feb 23 07:11:50 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 10:11:50 -0500 Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <20110223134928.GO24648@rivendell.middle-earth.co.uk> References: <271822205.494689.1298417746377.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <1084481687.494697.1298417771161.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <20110223134928.GO24648@rivendell.middle-earth.co.uk> Message-ID: <4D6523B6.3050206@redhat.com> On 02/23/2011 08:49 AM, Dr Andrew John Hughes wrote: > On 18:36 Tue 22 Feb , Denis Lila wrote: >> Hi. >> >> I would like to backport these changesets: >> http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/dd66920b2d51 >> http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/40414219305f >> >> to 1.7, 1.8, 1.9. >> >> Ok to push? >> >> Thank you, >> Denis. > > Approved. > It might be a good idea to update the copyright (Sun -> Oracle). Cheers, Omair From andrew at icedtea.classpath.org Wed Feb 23 07:20:00 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 15:20:00 +0000 Subject: /hg/icedtea6: 2 new changesets Message-ID: changeset 81f8c5c03b3c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=81f8c5c03b3c author: Andrew John Hughes date: Wed Feb 23 15:15:38 2011 +0000 Bump to latest hs20 (b10). Close checksum loophole for HotSpot tarball. 2011-02-23 Andrew John Hughes * Makefile.am: (download-openjdk): Verify HotSpot tarball, regardless of source. * hotspot.map: Bump to latest hs20 (b10). changeset e7cf01c42190 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e7cf01c42190 author: Andrew John Hughes date: Wed Feb 23 15:19:53 2011 +0000 Update INSTALL documentation for latest changes. 2011-02-23 Andrew John Hughes * INSTALL: Update with native2ascii option and JamVM. Mention --without-hotspot-build in HotSpot documentation. diffstat: 4 files changed, 31 insertions(+), 6 deletions(-) ChangeLog | 14 ++++++++++++++ INSTALL | 18 +++++++++++++++--- Makefile.am | 3 +-- hotspot.map | 2 +- diffs (102 lines): diff -r 69e952bd19fd -r e7cf01c42190 ChangeLog --- a/ChangeLog Wed Feb 23 13:55:40 2011 +0000 +++ b/ChangeLog Wed Feb 23 15:19:53 2011 +0000 @@ -1,3 +1,17 @@ 2011-02-22 Andrew John Hughes + + * INSTALL: + Update with native2ascii option and JamVM. + Mention --without-hotspot-build in HotSpot + documentation. + +2011-02-23 Andrew John Hughes + + * Makefile.am: + (download-openjdk): Verify HotSpot tarball, + regardless of source. + * hotspot.map: Bump to latest hs20 (b10). + 2011-02-22 Andrew John Hughes Use more accurate ENABLE_CACAO rather diff -r 69e952bd19fd -r e7cf01c42190 INSTALL --- a/INSTALL Wed Feb 23 13:55:40 2011 +0000 +++ b/INSTALL Wed Feb 23 15:19:53 2011 +0000 @@ -118,6 +118,9 @@ to configure: * --with-rmic: Specify the location of a 'rmic' binary. By default, ${SYSTEM_JDK_DIR}/bin/rmic is used. If this is absent, then the path is checked for grmic and rmic. +* --with-native2ascii: Specify the location of a 'native2ascii' binary. By default, + ${SYSTEM_JDK_DIR}/bin/native2ascii is used. If this is absent, then the path + is checked for native2ascii and gnative2ascii. * --with-ecj-jar: Specify the location of an ecj JAR file. By default, the following paths are checked: - /usr/share/java/eclipse-ecj.jar @@ -163,6 +166,7 @@ These are documented fully in the releva * --enable-systemtap: Include support for tracing using systemtap. * --enable-nss: Enable the NSS security provider. * --enable-cacao: Replace HotSpot with the CACAO VM. +* --enable-jamvm: Replace HotSpot with JamVM. * --enable-shark: Build the Shark LLVM-based JIT. * --enable-zero: Build the zero assembler port on x86/x86_64/sparc platforms. * --with-hotspot-build: The HotSpot to use, defaulting to 'original'. @@ -252,6 +256,14 @@ instead, and --with-cacao-src-zip/dir op instead, and --with-cacao-src-zip/dir options exist to allow the use of a pre-downloaded zip or source tree respectively. +JamVM +===== + +IcedTea6 can use JamVM as the virtual machine, as opposed to HotSpot. +When --enable-jamvm is specified, JamVM will be downloaded and built, +followed by the JDK portion of OpenJDK resulting in a JamVM+OpenJDK +image in openjdk/build/-/j2sdk-image. + Zero & Shark ============ @@ -303,14 +315,14 @@ of the requested build. At present, IcedTea6 supports the 'original' HotSpot 19 provided as part of the upstream tarball and HotSpot 20 ('hs20') from the stable -hs20 tree at http://hg.openjdk.java.net/hsx/hsx20/baseline. The default +hs20 tree at http://hg.openjdk.java.net/hsx/hsx20/master. The default is 'original'; passing --with-hotspot-build=hs20 to configure will use the version of hs20 specified in hotspot.map. Note that the norm. is for up to one alternate (non-default) build to be supported and just passing --with-hotspot-build (equivalent to --with-hotspot-build=yes) will always provide the alternate build (currently hs20). Conversely, -passing --with-hotspot-build=no provides the original build (currently -hs19). +passing --without-hotspot-build (equivalent to --with-hotspot-build=no) +provides the original build (currently hs19). Javascript Support ================== diff -r 69e952bd19fd -r e7cf01c42190 Makefile.am --- a/Makefile.am Wed Feb 23 13:55:40 2011 +0000 +++ b/Makefile.am Wed Feb 23 15:19:53 2011 +0000 @@ -826,7 +826,7 @@ if WITH_ALT_HSBUILD if WITH_ALT_HSBUILD if USE_ALT_HOTSPOT_SRC_ZIP ln -sf $(ALT_HOTSPOT_SRC_ZIP) $(HOTSPOT_SRC_ZIP) -else +endif hotspot_md5sum="`$(AWK) 'version==$$1 {print $$4}' version=$(HSBUILD) \ $(abs_top_srcdir)/hotspot.map`" ; \ if ! echo "$${hotspot_md5sum} $(HOTSPOT_SRC_ZIP)" \ @@ -840,7 +840,6 @@ else version=$(HSBUILD) $(abs_top_srcdir)/hotspot.map`"; \ $(WGET) $${hotspot_url} -O $(HOTSPOT_SRC_ZIP) ; \ fi -endif endif endif mkdir -p stamps diff -r 69e952bd19fd -r e7cf01c42190 hotspot.map --- a/hotspot.map Wed Feb 23 13:55:40 2011 +0000 +++ b/hotspot.map Wed Feb 23 15:19:53 2011 +0000 @@ -1,2 +1,2 @@ # version url changeset md5sum -hs20 http://hg.openjdk.java.net/hsx/hsx20/baseline 6aa467001334 236fa9a7fdb01339184378bb35e42e34 +hs20 http://hg.openjdk.java.net/hsx/hsx20/master f46354849fb3 2791c8009eefee305538c81328a8dfd2 From dlila at icedtea.classpath.org Wed Feb 23 07:53:21 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Wed, 23 Feb 2011 15:53:21 +0000 Subject: /hg/icedtea6: java2d performance backports. Message-ID: changeset 514ec565d646 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=514ec565d646 author: Denis Lila date: Wed Feb 23 10:47:03 2011 -0500 java2d performance backports. diffstat: 5 files changed, 5528 insertions(+), 1 deletion(-) ChangeLog | 7 Makefile.am | 4 NEWS | 2 patches/openjdk/6766342-AA-simple-shape-performance.patch | 3819 ++++++++++ patches/openjdk/6775317-non-AA-simple-shape-performance.patch | 1697 ++++ diffs (truncated from 5564 to 500 lines): diff -r e7cf01c42190 -r 514ec565d646 ChangeLog --- a/ChangeLog Wed Feb 23 15:19:53 2011 +0000 +++ b/ChangeLog Wed Feb 23 10:47:03 2011 -0500 @@ -1,3 +1,10 @@ 2011-02-23 Andrew John Hughes + + * Makefile.am: Added 2 patches. + * NEWS: Updated. + * patches/openjdk/6775317-non-AA-simple-shape-performance.patch + * patches/openjdk/6766342-AA-simple-shape-performance.patch + 2011-02-23 Andrew John Hughes * INSTALL: diff -r e7cf01c42190 -r 514ec565d646 Makefile.am --- a/Makefile.am Wed Feb 23 15:19:53 2011 +0000 +++ b/Makefile.am Wed Feb 23 10:47:03 2011 -0500 @@ -327,7 +327,9 @@ ICEDTEA_PATCHES = \ patches/pr633-no_javaws_man_page.patch \ patches/pr586-include_all_srcs.patch \ patches/jtreg-LastErrorString.patch \ - patches/com-sun-awt.patch + patches/com-sun-awt.patch \ + patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ + patches/openjdk/6766342-AA-simple-shape-performance.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r e7cf01c42190 -r 514ec565d646 NEWS --- a/NEWS Wed Feb 23 15:19:53 2011 +0000 +++ b/NEWS Wed Feb 23 10:47:03 2011 -0500 @@ -427,6 +427,8 @@ New in release 1.10 (2011-XX-XX): - S6779717: A Window does not show applet security warning icon on X platforms - S6785058: Parent don't get the focus after dialog is closed if security warning is applied - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails + - S6775317: Improve performance of non-AA transformed rectangles and single wide lines in software pipelines + - S6766342: Improve performance of Ductus rasterizer * Bug fixes - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors - PR600: HS19 upgrade broke CACAO build on ARM diff -r e7cf01c42190 -r 514ec565d646 patches/openjdk/6766342-AA-simple-shape-performance.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6766342-AA-simple-shape-performance.patch Wed Feb 23 10:47:03 2011 -0500 @@ -0,0 +1,3819 @@ +# HG changeset patch +# User flar +# Date 1292361929 28800 +# Node ID 4d6f9aaa2600eec36725ab7cd47cb4b652755723 +# Parent 0eeac8ca33e329aab7a9ad0fcfb3a321cd1abd06 +6766342: Improve performance of Ductus rasterizer +Reviewed-by: jgodinez, prr + +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 make/sun/awt/mapfile-vers +--- openjdk.orig/jdk/make/sun/awt/mapfile-vers Fri Dec 10 16:14:04 2010 -0800 ++++ openjdk/jdk/make/sun/awt/mapfile-vers Tue Dec 14 13:25:29 2010 -0800 +@@ -118,6 +118,8 @@ + Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; + Java_sun_java2d_loops_MaskBlit_MaskBlit; + Java_sun_java2d_loops_MaskFill_MaskFill; ++ Java_sun_java2d_loops_MaskFill_FillAAPgram; ++ Java_sun_java2d_loops_MaskFill_DrawAAPgram; + Java_sun_java2d_loops_TransformHelper_Transform; + Java_sun_java2d_pipe_Region_initIDs; + Java_sun_java2d_pipe_SpanClipRenderer_initIDs; +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 make/sun/awt/mapfile-vers-linux +--- openjdk.orig/jdk/make/sun/awt/mapfile-vers-linux Fri Dec 10 16:14:04 2010 -0800 ++++ openjdk/jdk/make/sun/awt/mapfile-vers-linux Tue Dec 14 13:25:29 2010 -0800 +@@ -115,6 +115,8 @@ + Java_sun_java2d_loops_GraphicsPrimitiveMgr_registerNativeLoops; + Java_sun_java2d_loops_MaskBlit_MaskBlit; + Java_sun_java2d_loops_MaskFill_MaskFill; ++ Java_sun_java2d_loops_MaskFill_FillAAPgram; ++ Java_sun_java2d_loops_MaskFill_DrawAAPgram; + Java_sun_java2d_pipe_BufferedRenderPipe_fillSpans; + Java_sun_java2d_pipe_SpanClipRenderer_initIDs; + sun_awt_image_GifImageDecoder_initIDs; +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/dc/DuctusRenderingEngine.java +--- openjdk.orig/jdk/src/share/classes/sun/dc/DuctusRenderingEngine.java Fri Dec 10 16:14:04 2010 -0800 ++++ openjdk/jdk/src/share/classes/sun/dc/DuctusRenderingEngine.java Tue Dec 14 13:25:29 2010 -0800 +@@ -635,6 +635,88 @@ + return r; + } + ++ /** ++ * {@inheritDoc} ++ */ ++ @Override ++ public AATileGenerator getAATileGenerator(double x, double y, ++ double dx1, double dy1, ++ double dx2, double dy2, ++ double lw1, double lw2, ++ Region clip, ++ int bbox[]) ++ { ++ // REMIND: Deal with large coordinates! ++ double ldx1, ldy1, ldx2, ldy2; ++ boolean innerpgram = (lw1 > 0 && lw2 > 0); ++ ++ if (innerpgram) { ++ ldx1 = dx1 * lw1; ++ ldy1 = dy1 * lw1; ++ ldx2 = dx2 * lw2; ++ ldy2 = dy2 * lw2; ++ x -= (ldx1 + ldx2) / 2.0; ++ y -= (ldy1 + ldy2) / 2.0; ++ dx1 += ldx1; ++ dy1 += ldy1; ++ dx2 += ldx2; ++ dy2 += ldy2; ++ if (lw1 > 1 && lw2 > 1) { ++ // Inner parallelogram was entirely consumed by stroke... ++ innerpgram = false; ++ } ++ } else { ++ ldx1 = ldy1 = ldx2 = ldy2 = 0; ++ } ++ ++ Rasterizer r = getRasterizer(); ++ ++ r.setUsage(Rasterizer.EOFILL); ++ ++ r.beginPath(); ++ r.beginSubpath((float) x, (float) y); ++ r.appendLine((float) (x+dx1), (float) (y+dy1)); ++ r.appendLine((float) (x+dx1+dx2), (float) (y+dy1+dy2)); ++ r.appendLine((float) (x+dx2), (float) (y+dy2)); ++ r.closedSubpath(); ++ if (innerpgram) { ++ x += ldx1 + ldx2; ++ y += ldy1 + ldy2; ++ dx1 -= 2.0 * ldx1; ++ dy1 -= 2.0 * ldy1; ++ dx2 -= 2.0 * ldx2; ++ dy2 -= 2.0 * ldy2; ++ r.beginSubpath((float) x, (float) y); ++ r.appendLine((float) (x+dx1), (float) (y+dy1)); ++ r.appendLine((float) (x+dx1+dx2), (float) (y+dy1+dy2)); ++ r.appendLine((float) (x+dx2), (float) (y+dy2)); ++ r.closedSubpath(); ++ } ++ ++ try { ++ r.endPath(); ++ r.getAlphaBox(bbox); ++ clip.clipBoxToBounds(bbox); ++ if (bbox[0] >= bbox[2] || bbox[1] >= bbox[3]) { ++ dropRasterizer(r); ++ return null; ++ } ++ r.setOutputArea(bbox[0], bbox[1], ++ bbox[2] - bbox[0], ++ bbox[3] - bbox[1]); ++ } catch (PRException e) { ++ /* ++ * This exeption is thrown from the native part of the Ductus ++ * (only in case of a debug build) to indicate that some ++ * segments of the path have very large coordinates. ++ * See 4485298 for more info. ++ */ ++ System.err.println("DuctusRenderingEngine.getAATileGenerator: "+e); ++ } ++ ++ return r; ++ } ++ + private void feedConsumer(PathConsumer consumer, PathIterator pi) { + try { + consumer.beginPath(); +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/SurfaceData.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/SurfaceData.java Fri Dec 10 16:14:04 2010 -0800 ++++ openjdk/jdk/src/share/classes/sun/java2d/SurfaceData.java Tue Dec 14 13:25:29 2010 -0800 +@@ -367,16 +367,17 @@ + public static final TextPipe aaTextRenderer; + public static final TextPipe lcdTextRenderer; + +- protected static final CompositePipe colorPipe; ++ protected static final AlphaColorPipe colorPipe; + protected static final PixelToShapeConverter colorViaShape; + protected static final PixelToParallelogramConverter colorViaPgram; + protected static final TextPipe colorText; + protected static final CompositePipe clipColorPipe; + protected static final TextPipe clipColorText; + protected static final AAShapePipe AAColorShape; +- protected static final PixelToShapeConverter AAColorViaShape; ++ protected static final PixelToParallelogramConverter AAColorViaShape; ++ protected static final PixelToParallelogramConverter AAColorViaPgram; + protected static final AAShapePipe AAClipColorShape; +- protected static final PixelToShapeConverter AAClipColorViaShape; ++ protected static final PixelToParallelogramConverter AAClipColorViaShape; + + protected static final CompositePipe paintPipe; + protected static final SpanShapeRenderer paintShape; +@@ -385,9 +386,9 @@ + protected static final CompositePipe clipPaintPipe; + protected static final TextPipe clipPaintText; + protected static final AAShapePipe AAPaintShape; +- protected static final PixelToShapeConverter AAPaintViaShape; ++ protected static final PixelToParallelogramConverter AAPaintViaShape; + protected static final AAShapePipe AAClipPaintShape; +- protected static final PixelToShapeConverter AAClipPaintViaShape; ++ protected static final PixelToParallelogramConverter AAClipPaintViaShape; + + protected static final CompositePipe compPipe; + protected static final SpanShapeRenderer compShape; +@@ -396,9 +397,9 @@ + protected static final CompositePipe clipCompPipe; + protected static final TextPipe clipCompText; + protected static final AAShapePipe AACompShape; +- protected static final PixelToShapeConverter AACompViaShape; ++ protected static final PixelToParallelogramConverter AACompViaShape; + protected static final AAShapePipe AAClipCompShape; +- protected static final PixelToShapeConverter AAClipCompViaShape; ++ protected static final PixelToParallelogramConverter AAClipCompViaShape; + + protected static final DrawImagePipe imagepipe; + +@@ -427,6 +428,22 @@ + } + } + ++ private static PixelToParallelogramConverter ++ makeConverter(AAShapePipe renderer, ++ ParallelogramPipe pgrampipe) ++ { ++ return new PixelToParallelogramConverter(renderer, ++ pgrampipe, ++ 1.0/8.0, 0.499, ++ false); ++ } ++ ++ private static PixelToParallelogramConverter ++ makeConverter(AAShapePipe renderer) ++ { ++ return makeConverter(renderer, renderer); ++ } ++ + static { + colorPrimitives = new LoopPipe(); + +@@ -445,9 +462,10 @@ + clipColorPipe = new SpanClipRenderer(colorPipe); + clipColorText = new TextRenderer(clipColorPipe); + AAColorShape = new AAShapePipe(colorPipe); +- AAColorViaShape = new PixelToShapeConverter(AAColorShape); ++ AAColorViaShape = makeConverter(AAColorShape); ++ AAColorViaPgram = makeConverter(AAColorShape, colorPipe); + AAClipColorShape = new AAShapePipe(clipColorPipe); +- AAClipColorViaShape = new PixelToShapeConverter(AAClipColorShape); ++ AAClipColorViaShape = makeConverter(AAClipColorShape); + + paintPipe = new AlphaPaintPipe(); + paintShape = new SpanShapeRenderer.Composite(paintPipe); +@@ -456,9 +474,9 @@ + clipPaintPipe = new SpanClipRenderer(paintPipe); + clipPaintText = new TextRenderer(clipPaintPipe); + AAPaintShape = new AAShapePipe(paintPipe); +- AAPaintViaShape = new PixelToShapeConverter(AAPaintShape); ++ AAPaintViaShape = makeConverter(AAPaintShape); + AAClipPaintShape = new AAShapePipe(clipPaintPipe); +- AAClipPaintViaShape = new PixelToShapeConverter(AAClipPaintShape); ++ AAClipPaintViaShape = makeConverter(AAClipPaintShape); + + compPipe = new GeneralCompositePipe(); + compShape = new SpanShapeRenderer.Composite(compPipe); +@@ -467,9 +485,9 @@ + clipCompPipe = new SpanClipRenderer(compPipe); + clipCompText = new TextRenderer(clipCompPipe); + AACompShape = new AAShapePipe(compPipe); +- AACompViaShape = new PixelToShapeConverter(AACompShape); ++ AACompViaShape = makeConverter(AACompShape); + AAClipCompShape = new AAShapePipe(clipCompPipe); +- AAClipCompViaShape = new PixelToShapeConverter(AAClipCompShape); ++ AAClipCompViaShape = makeConverter(AAClipCompShape); + + imagepipe = new DrawImage(); + } +@@ -591,12 +609,12 @@ + if (sg2d.clipState == sg2d.CLIP_SHAPE) { + sg2d.drawpipe = AAClipCompViaShape; + sg2d.fillpipe = AAClipCompViaShape; +- sg2d.shapepipe = AAClipCompShape; ++ sg2d.shapepipe = AAClipCompViaShape; + sg2d.textpipe = clipCompText; + } else { + sg2d.drawpipe = AACompViaShape; + sg2d.fillpipe = AACompViaShape; +- sg2d.shapepipe = AACompShape; ++ sg2d.shapepipe = AACompViaShape; + sg2d.textpipe = compText; + } + } else { +@@ -616,12 +634,16 @@ + if (sg2d.clipState == sg2d.CLIP_SHAPE) { + sg2d.drawpipe = AAClipColorViaShape; + sg2d.fillpipe = AAClipColorViaShape; +- sg2d.shapepipe = AAClipColorShape; ++ sg2d.shapepipe = AAClipColorViaShape; + sg2d.textpipe = clipColorText; + } else { +- sg2d.drawpipe = AAColorViaShape; +- sg2d.fillpipe = AAColorViaShape; +- sg2d.shapepipe = AAColorShape; ++ PixelToParallelogramConverter converter = ++ (sg2d.alphafill.canDoParallelograms() ++ ? AAColorViaPgram ++ : AAColorViaShape); ++ sg2d.drawpipe = converter; ++ sg2d.fillpipe = converter; ++ sg2d.shapepipe = converter; + if (sg2d.paintState > sg2d.PAINT_OPAQUECOLOR || + sg2d.compositeState > sg2d.COMP_ISCOPY) + { +@@ -634,12 +656,12 @@ + if (sg2d.clipState == sg2d.CLIP_SHAPE) { + sg2d.drawpipe = AAClipPaintViaShape; + sg2d.fillpipe = AAClipPaintViaShape; +- sg2d.shapepipe = AAClipPaintShape; ++ sg2d.shapepipe = AAClipPaintViaShape; + sg2d.textpipe = clipPaintText; + } else { + sg2d.drawpipe = AAPaintViaShape; + sg2d.fillpipe = AAPaintViaShape; +- sg2d.shapepipe = AAPaintShape; ++ sg2d.shapepipe = AAPaintViaShape; + sg2d.textpipe = paintText; + } + } +@@ -793,6 +815,18 @@ + } + } + ++ private static CompositeType getFillCompositeType(SunGraphics2D sg2d) { ++ CompositeType compType = sg2d.imageComp; ++ if (sg2d.compositeState == sg2d.COMP_ISCOPY) { ++ if (compType == CompositeType.SrcOverNoEa) { ++ compType = CompositeType.OpaqueSrcOverNoEa; ++ } else { ++ compType = CompositeType.SrcNoEa; ++ } ++ } ++ return compType; ++ } ++ + /** + * Returns a MaskFill object that can be used on this destination + * with the source (paint) and composite types determined by the given +@@ -802,9 +836,10 @@ + * surface) before returning a specific MaskFill object. + */ + protected MaskFill getMaskFill(SunGraphics2D sg2d) { +- return MaskFill.getFromCache(getPaintSurfaceType(sg2d), +- sg2d.imageComp, +- getSurfaceType()); ++ SurfaceType src = getPaintSurfaceType(sg2d); ++ CompositeType comp = getFillCompositeType(sg2d); ++ SurfaceType dst = getSurfaceType(); ++ return MaskFill.getFromCache(src, comp, dst); + } + + private static RenderCache loopcache = new RenderCache(30); +@@ -816,9 +851,7 @@ + */ + public RenderLoops getRenderLoops(SunGraphics2D sg2d) { + SurfaceType src = getPaintSurfaceType(sg2d); +- CompositeType comp = (sg2d.compositeState == sg2d.COMP_ISCOPY +- ? CompositeType.SrcNoEa +- : sg2d.imageComp); ++ CompositeType comp = getFillCompositeType(sg2d); + SurfaceType dst = sg2d.getSurfaceData().getSurfaceType(); + + Object o = loopcache.get(src, comp, dst); +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/loops/CompositeType.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/loops/CompositeType.java Fri Dec 10 16:14:04 2010 -0800 ++++ openjdk/jdk/src/share/classes/sun/java2d/loops/CompositeType.java Tue Dec 14 13:25:29 2010 -0800 +@@ -27,6 +27,7 @@ + + import java.awt.image.BufferedImage; + import java.awt.AlphaComposite; ++import java.util.HashMap; + + /** + * A CompositeType object provides a chained description of a type of +@@ -51,6 +52,11 @@ + * the indicated algorithm if all of the more specific searches fail. + */ + public final class CompositeType { ++ ++ private static int unusedUID = 1; ++ private static final HashMap compositeUIDMap = ++ new HashMap(100); ++ + /* + * CONSTANTS USED BY ALL PRIMITIVES TO DESCRIBE THE COMPOSITING + * ALGORITHMS THEY CAN PERFORM +@@ -153,6 +159,22 @@ + SrcOverNoEa = SrcOver.deriveSubType(DESC_SRC_OVER_NO_EA); + + /* ++ * A special CompositeType for the case where we are filling in ++ * SrcOverNoEa mode with an opaque color. In that case then the ++ * best loop for us to use would be a SrcNoEa loop, but what if ++ * there is no such loop? In that case then we would end up ++ * backing off to a Src loop (which should still be fine) or an ++ * AnyAlpha loop which would be slower than a SrcOver loop in ++ * most cases. ++ * The fix is to use the following chain which looks for loops ++ * in the following order: ++ * SrcNoEa, Src, SrcOverNoEa, SrcOver, AnyAlpha ++ */ ++ public static final CompositeType ++ OpaqueSrcOverNoEa = SrcOverNoEa.deriveSubType(DESC_SRC) ++ .deriveSubType(DESC_SRC_NO_EA); ++ ++ /* + * END OF CompositeType OBJECTS FOR THE VARIOUS CONSTANTS + */ + +@@ -210,7 +232,6 @@ + } + } + +- private static int unusedUID = 1; + private int uniqueID; + private String desc; + private CompositeType next; +@@ -218,14 +239,20 @@ + private CompositeType(CompositeType parent, String desc) { + next = parent; + this.desc = desc; +- this.uniqueID = makeUniqueID(); ++ this.uniqueID = makeUniqueID(desc); + } + +- private synchronized static final int makeUniqueID() { +- if (unusedUID > 255) { +- throw new InternalError("composite type id overflow"); ++ public synchronized static final int makeUniqueID(String desc) { ++ Integer i = compositeUIDMap.get(desc); ++ ++ if (i == null) { ++ if (unusedUID > 255) { ++ throw new InternalError("composite type id overflow"); ++ } ++ i = unusedUID++; ++ compositeUIDMap.put(desc, i); + } +- return unusedUID++; ++ return i; + } + + public int getUniqueID() { +diff -r 0eeac8ca33e3 -r 4d6f9aaa2600 src/share/classes/sun/java2d/loops/MaskFill.java +--- openjdk.orig/jdk/src/share/classes/sun/java2d/loops/MaskFill.java Fri Dec 10 16:14:04 2010 -0800 ++++ openjdk/jdk/src/share/classes/sun/java2d/loops/MaskFill.java Tue Dec 14 13:25:29 2010 -0800 +@@ -50,6 +50,10 @@ + public class MaskFill extends GraphicsPrimitive + { + public static final String methodSignature = "MaskFill(...)".toString(); ++ public static final String fillPgramSignature = ++ "FillAAPgram(...)".toString(); ++ public static final String drawPgramSignature = ++ "DrawAAPgram(...)".toString(); + + public static final int primTypeID = makePrimTypeID(); + +@@ -92,6 +96,14 @@ + return fill; + } + ++ protected MaskFill(String alternateSignature, ++ SurfaceType srctype, ++ CompositeType comptype, ++ SurfaceType dsttype) ++ { ++ super(alternateSignature, primTypeID, srctype, comptype, dsttype); ++ } ++ + protected MaskFill(SurfaceType srctype, + CompositeType comptype, + SurfaceType dsttype) +@@ -115,6 +127,23 @@ + int x, int y, int w, int h, + byte[] mask, int maskoff, int maskscan); + ++ public native void FillAAPgram(SunGraphics2D sg2d, SurfaceData sData, ++ Composite comp, ++ double x, double y, ++ double dx1, double dy1, ++ double dx2, double dy2); ++ ++ public native void DrawAAPgram(SunGraphics2D sg2d, SurfaceData sData, ++ Composite comp, ++ double x, double y, ++ double dx1, double dy1, ++ double dx2, double dy2, ++ double lw1, double lw2); ++ ++ public boolean canDoParallelograms() { ++ return (getNativePrim() != 0); ++ } From xranby at icedtea.classpath.org Wed Feb 23 08:11:06 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Wed, 23 Feb 2011 16:11:06 +0000 Subject: /hg/icedtea6: Switch to using IcedTea server for JamVM drops too. Message-ID: changeset ae87b2a6ee6b in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ae87b2a6ee6b author: Xerxes R?nby date: Wed Feb 23 16:54:17 2011 +0100 Switch to using IcedTea server for JamVM drops too. 2011-02-23 Xerxes Ranby * Makefile.am: (JAMVM_BASE_URL): Switch to using IcedTea server for JamVM drops too. (JAMVM_VERSION): Updated to latest JamVM revision. (JAMVM_SHA256SUM): Updated. diffstat: 2 files changed, 10 insertions(+), 8 deletions(-) ChangeLog | 7 +++++++ Makefile.am | 11 +++-------- diffs (35 lines): diff -r 514ec565d646 -r ae87b2a6ee6b ChangeLog --- a/ChangeLog Wed Feb 23 10:47:03 2011 -0500 +++ b/ChangeLog Wed Feb 23 16:54:17 2011 +0100 @@ -1,3 +1,10 @@ 2011-02-23 Denis Lila + + * Makefile.am: (JAMVM_BASE_URL): Switch to using IcedTea + server for JamVM drops too. + (JAMVM_VERSION): Updated to latest JamVM revision. + (JAMVM_SHA256SUM): Updated. + 2011-02-23 Denis Lila * Makefile.am: Added 2 patches. diff -r 514ec565d646 -r ae87b2a6ee6b Makefile.am --- a/Makefile.am Wed Feb 23 10:47:03 2011 -0500 +++ b/Makefile.am Wed Feb 23 16:54:17 2011 +0100 @@ -11,14 +11,9 @@ CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VE CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz -# The jamvm-3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27.tar.gz got fetched from -# http://git.berlios.de/cgi-bin/cgit.cgi/jamvm/snapshot/jamvm-3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27.tar.gz -# Unfortunally the generated .tar.gz by the berlios cgit snapshot function -# keeps changing sha256sum. I have hosted a snapshot on labb.zafena.se -# while we wait for the final JamVM 1.6.0 release. -JAMVM_VERSION = 3f02679901ac46985c9c3ac3f1b99e8eaf6a7e27 -JAMVM_SHA256SUM = 396daf08896a71cfcddfabfbaf2d8b3f07557d8143eaaa93be25e2d80f30e165 -JAMVM_BASE_URL = http://labb.zafena.se/jamvm +JAMVM_VERSION = 10329d9f3205698af125bba131b4f47339e81d90 +JAMVM_SHA256SUM = 0e87f22bc6a35c327ab343e7ca0e89512e3797aff93ee8a5539f0babfbd40f9b +JAMVM_BASE_URL = http://icedtea.classpath.org/download/drops/jamvm JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz From xerxes at zafena.se Wed Feb 23 08:13:27 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 23 Feb 2011 17:13:27 +0100 Subject: FYI: JamVM drops moved to IcedTea server - commited. In-Reply-To: <4D64F7DE.40806@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <20110222023330.GK12717@rivendell.middle-earth.co.uk> <4D6387D8.2080206@zafena.se> <56036.80.101.103.228.1298405457.squirrel@gnu.wildebeest.org> <4D64F7DE.40806@zafena.se> Message-ID: <4D653227.4040305@zafena.se> >> Also please do feel free to add the drops (and change the download >> location) to the icedtea server if you like. If copy them to >> /var/lib/public-download/drops/jamvm/ they will show up at >> http://icedtea.classpath.org/download/drops/jamvm/ >> >> If you do, please make sure to check Roberts latest fixes >> are in. >> >> Thanks, >> >> Mark > Commited! http://icedtea.classpath.org/hg/icedtea6/rev/ae87b2a6ee6b The drops are now located on the IcedTea server. Cheers Xerxes From doko at ubuntu.com Wed Feb 23 08:25:52 2011 From: doko at ubuntu.com (Matthias Klose) Date: Wed, 23 Feb 2011 17:25:52 +0100 Subject: RFC: JamVM - Taste the New Flavour! --with-jamvm-src-zip option In-Reply-To: <4D64D31D.8080309@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <4D64D31D.8080309@zafena.se> Message-ID: <4D653510.6010604@ubuntu.com> On 23.02.2011 10:27, Xerxes R?nby wrote: > I have attached the follow up patch to implement the new > --with-jamvm-src-zip option. > > with-jamvm-src-zip.23feb.patch > > Ok to push? looks fine. I built a package offline. Matthias From omajid at redhat.com Wed Feb 23 08:35:34 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 11:35:34 -0500 Subject: [icedtea-web] RFC: fix RH677772 - NoSuchAlgorithmException using SSL/TLS in javaws Message-ID: <4D653756.7070205@redhat.com> Hi, I have attached a patch to fix RH677772 [1]. Please note that I am particularly concerned as it is reverting a patch [2] that was added to fix another (quite similar) bug, RH524387 [3]. As this new bug shows, there are issues with the current system. To fix these, we will have to whitelist all possible classes/method that are allowed at this place. And I am not sure at all how to determine these classes/methods. I especially dont think this is maintainable (all the more so if you consider third party code which we have no idea about). The real problem, I think, is that we are not granting full permissions to code originating from jre/lib/ext (which the default java.policy file does). If we do that, then all code that's installed there (3rd party JCE providers, proprietary jars, or really anything) will run with proper permissions, and we wont even need to deal with the current system of whitelisting. This is what the proposed patch does. I hope that explains why we should just grant appropriate permissions to code loaded from jre/lib/ext and let java's normal security mechanism handle everything from then on. Any thoughts or comments on the patch? Thanks, Omair [1] https://bugzilla.redhat.com/show_bug.cgi?id=677772 [2] http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6d1e2fae468a [3] https://bugzilla.redhat.com/show_bug.cgi?id=524387 -------------- next part -------------- A non-text attachment was scrubbed... Name: nosuchalgorithmexception-03.patch Type: text/x-patch Size: 4964 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/309ab6d0/nosuchalgorithmexception-03.patch From ahughes at redhat.com Wed Feb 23 08:35:08 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 16:35:08 +0000 Subject: RFC: JamVM - Taste the New Flavour! --with-jamvm-src-zip option In-Reply-To: <4D64D31D.8080309@zafena.se> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <4D64D31D.8080309@zafena.se> Message-ID: <20110223163507.GR24648@rivendell.middle-earth.co.uk> On 10:27 Wed 23 Feb , Xerxes R?nby wrote: > On 2011-02-22 02:48, Xerxes R?nby wrote: > > On 2011-02-21 22:40, Robert Lougher wrote: > >> Hi, > >> > >> On 21 February 2011 21:22, Dr Andrew John Hughes > >> wrote: > >>> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: > >>>> Greetings! > >>>> > >>>> "JamVM's got a shiny new Git repository, which contains the port to the > >>>> OpenJDK class-library." > >>>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html > >>>> > >>>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! > > >>>> +stamps/download-jamvm.stamp: > >>>> +if BUILD_JAMVM > >>>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > >>>> + | $(SHA256SUM) --check ; \ > >>>> + then \ > >>>> + if [ $(JAMVM_SRC_ZIP) ] ; \ > >>>> + then \ > >>>> + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ > >>>> + fi ; \ > >>>> + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ > >>>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > >>>> + | $(SHA256SUM) --check ; \ > >>>> + then echo "ERROR: Bad download of JamVM zip"; false; \ > >>>> + fi; \ > >>>> + fi > >>>> +endif > >>>> + mkdir -p stamps > >>>> + touch $@ > >>> > >>> We need an option equivalent to --with-cacao-src-zip. I'd suggest > >>> adding this in a follow up patch. As with the drop tarballs, we > >>> should verify the checksum for pre-provided tarballs as well as > >>> download ones. It should be just a matter of symlinking the tarball > >>> here if an alternate one is specified. > >>> > > > > Noted, I will add --with-cacao-src-zip in another follow up patch. > > > > Hi again! > > I have attached the follow up patch to implement the new > --with-jamvm-src-zip option. > > with-jamvm-src-zip.23feb.patch > > Ok to push? Comments inline. > Cheers > Xerxes > Index: icedtea6/Makefile.am > =================================================================== > --- icedtea6.orig/Makefile.am 2011-02-23 09:20:37.000000000 +0100 > +++ icedtea6/Makefile.am 2011-02-23 09:34:26.000000000 +0100 > @@ -768,6 +768,9 @@ > > stamps/download-jamvm.stamp: > if BUILD_JAMVM > +if USE_ALT_JAMVM_SRC_ZIP > + ln -sf $(ALT_JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP) > +endif > if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > | $(SHA256SUM) --check ; \ > then \ > Index: icedtea6/acinclude.m4 > =================================================================== > --- icedtea6.orig/acinclude.m4 2011-02-23 09:23:56.000000000 +0100 > +++ icedtea6/acinclude.m4 2011-02-23 09:30:05.000000000 +0100 > @@ -875,6 +875,23 @@ > AC_SUBST(ENABLE_JAMVM) > ]) > > +AC_DEFUN([IT_CHECK_WITH_JAMVM_SRC_ZIP], > +[ > + AC_MSG_CHECKING([for a JamVM source zip]) > + AC_ARG_WITH([jamvm-src-zip], > + [AS_HELP_STRING(--with-jamvm-src-zip,specify the location of the JamVM source zip)], > + [ > + ALT_JAMVM_SRC_ZIP=${withval} > + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x = x) > + ], > + [ > + ALT_JAMVM_SRC_ZIP="not specified" > + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x != x) > + ]) > + AC_MSG_RESULT(${ALT_JAMVM_SRC_ZIP}) > + AC_SUBST(ALT_JAMVM_SRC_ZIP) > +]) > + It might be cleaner to have one AM_CONDITIONAL: AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x${ALT_JAMVM_SRC_ZIP} != "xnot specified") I think the likelihood of the zip being called 'not specified' is suitably low... Also it would be good to check it's actually a valid file, which should also handle the yes/no produced by --with-jamvm-src-zip and --without-jamvm-src-zip. Something like: if [ ! -f ${ALT_JAMVM_SRC_ZIP ] ; then AC_MSG_ERROR([Invalid JamVM source zip specified: ${ALT_JAMVM_SRC_ZIP}]) fi in the first block. I realise I'm probably holding this to higher standards than some of the other macros. That's because those other macros probably weren't reviewed... ;-) > AC_DEFUN([IT_CHECK_ENABLE_CACAO], > [ > AC_MSG_CHECKING(whether to use CACAO as VM) > Index: icedtea6/configure.ac > =================================================================== > --- icedtea6.orig/configure.ac 2011-02-23 09:30:52.000000000 +0100 > +++ icedtea6/configure.ac 2011-02-23 09:31:34.000000000 +0100 > @@ -177,6 +177,7 @@ > IT_CHECK_WITH_CACAO_SRC_DIR > > IT_CHECK_ENABLE_JAMVM > +IT_CHECK_WITH_JAMVM_SRC_ZIP > > IT_DISABLE_OPTIMIZATIONS > IT_SET_SHARK_BUILD > Index: icedtea6/ChangeLog > =================================================================== > --- icedtea6.orig/ChangeLog 2011-02-23 09:43:06.000000000 +0100 > +++ icedtea6/ChangeLog 2011-02-23 10:19:30.000000000 +0100 > @@ -1,5 +1,16 @@ > 2011-02-23 Xerxes Ranby > > + JamVM: configure --with-jamvm-src-zip > + * NEWS: Updated. > + * Makefile.am (stamps/download-jamvm.stamp): > + Link in jamvm source zip dependent on USE_ALT_JAMVM_SRC_ZIP > + * acinclude.m4 (IT_CHECK_WITH_JAMVM_SRC_ZIP): New macro. > + (USE_ALT_JAMVM_SRC_ZIP): New conditional. > + (ALT_JAMVM_SRC_ZIP): New variable. > + * configure.ac: Call IT_CHECK_WITH_JAMVM_SRC_ZIP. > + > +2011-02-23 Xerxes Ranby > + > JamVM: Try --with-additional-vms=jamvm topping! > * NEWS: Updated. > * Makefile.am (stamps/add-jamvm.stamp): New make target. > Index: icedtea6/NEWS > =================================================================== > --- icedtea6.orig/NEWS 2011-02-23 09:35:17.000000000 +0100 > +++ icedtea6/NEWS 2011-02-23 09:39:53.000000000 +0100 > @@ -18,6 +18,8 @@ > * Added out-of-the-box JamVM support using --enable-jamvm > * Allow building of JamVM beside the default VM by using > --with-additional-vms=jamvm > +* Distributions can specify the location of the JamVM source zip by using > + --with-jamvm-src-zip > * Import of OpenJDK6 b21 including upgrade to HotSpot 19 > - S6961870: More rebranding fixes for templates/gpl-*-header files > - S6976186: Shark build system changes There's nothing distro-specific about using --with-jamvm-src-zip. I use it on a daily basis (and haven't yet tried the JamVM build as it's missing). I would just say: 'Allow the location of the JamVM source zip to be specified using --with-jamvm-src-zip'. You should also document it in INSTALL. I just added a JamVM section for you ;-) -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From xranby at icedtea.classpath.org Wed Feb 23 08:43:06 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Wed, 23 Feb 2011 16:43:06 +0000 Subject: /hg/icedtea6: 2011-02-23 Xerxes Ranby Message-ID: changeset a4352c2385ef in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a4352c2385ef author: Xerxes R?nby date: Wed Feb 23 17:26:18 2011 +0100 2011-02-23 Xerxes Ranby JamVM: configure --with-jamvm-src-zip * NEWS: Updated. * Makefile.am (stamps/download-jamvm.stamp): Link in jamvm source zip dependent on USE_ALT_JAMVM_SRC_ZIP * acinclude.m4 (IT_CHECK_WITH_JAMVM_SRC_ZIP): New macro. (USE_ALT_JAMVM_SRC_ZIP): New conditional. (ALT_JAMVM_SRC_ZIP): New variable. * configure.ac: Call IT_CHECK_WITH_JAMVM_SRC_ZIP. diffstat: 5 files changed, 34 insertions(+) ChangeLog | 11 +++++++++++ Makefile.am | 3 +++ NEWS | 2 ++ acinclude.m4 | 17 +++++++++++++++++ configure.ac | 1 + diffs (81 lines): diff -r ae87b2a6ee6b -r a4352c2385ef ChangeLog --- a/ChangeLog Wed Feb 23 16:54:17 2011 +0100 +++ b/ChangeLog Wed Feb 23 17:26:18 2011 +0100 @@ -1,3 +1,14 @@ 2011-02-23 Xerxes Ranby + + JamVM: configure --with-jamvm-src-zip + * NEWS: Updated. + * Makefile.am (stamps/download-jamvm.stamp): + Link in jamvm source zip dependent on USE_ALT_JAMVM_SRC_ZIP + * acinclude.m4 (IT_CHECK_WITH_JAMVM_SRC_ZIP): New macro. + (USE_ALT_JAMVM_SRC_ZIP): New conditional. + (ALT_JAMVM_SRC_ZIP): New variable. + * configure.ac: Call IT_CHECK_WITH_JAMVM_SRC_ZIP. + 2011-02-23 Xerxes Ranby * Makefile.am: (JAMVM_BASE_URL): Switch to using IcedTea diff -r ae87b2a6ee6b -r a4352c2385ef Makefile.am --- a/Makefile.am Wed Feb 23 16:54:17 2011 +0100 +++ b/Makefile.am Wed Feb 23 17:26:18 2011 +0100 @@ -767,6 +767,9 @@ clean-download-cacao: stamps/download-jamvm.stamp: if BUILD_JAMVM +if USE_ALT_JAMVM_SRC_ZIP + ln -sf $(ALT_JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP) +endif if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ | $(SHA256SUM) --check ; \ then \ diff -r ae87b2a6ee6b -r a4352c2385ef NEWS --- a/NEWS Wed Feb 23 16:54:17 2011 +0100 +++ b/NEWS Wed Feb 23 17:26:18 2011 +0100 @@ -18,6 +18,8 @@ New in release 1.10 (2011-XX-XX): * Added out-of-the-box JamVM support using --enable-jamvm * Allow building of JamVM beside the default VM by using --with-additional-vms=jamvm +* Allow the location of the JamVM source zip to be specified using + --with-jamvm-src-zip * Import of OpenJDK6 b21 including upgrade to HotSpot 19 - S6961870: More rebranding fixes for templates/gpl-*-header files - S6976186: Shark build system changes diff -r ae87b2a6ee6b -r a4352c2385ef acinclude.m4 --- a/acinclude.m4 Wed Feb 23 16:54:17 2011 +0100 +++ b/acinclude.m4 Wed Feb 23 17:26:18 2011 +0100 @@ -875,6 +875,23 @@ AC_DEFUN([IT_CHECK_ENABLE_JAMVM], AC_SUBST(ENABLE_JAMVM) ]) +AC_DEFUN([IT_CHECK_WITH_JAMVM_SRC_ZIP], +[ + AC_MSG_CHECKING([for a JamVM source zip]) + AC_ARG_WITH([jamvm-src-zip], + [AS_HELP_STRING(--with-jamvm-src-zip,specify the location of the JamVM source zip)], + [ + ALT_JAMVM_SRC_ZIP=${withval} + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x = x) + ], + [ + ALT_JAMVM_SRC_ZIP="not specified" + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x != x) + ]) + AC_MSG_RESULT(${ALT_JAMVM_SRC_ZIP}) + AC_SUBST(ALT_JAMVM_SRC_ZIP) +]) + AC_DEFUN([IT_CHECK_ENABLE_CACAO], [ AC_MSG_CHECKING(whether to use CACAO as VM) diff -r ae87b2a6ee6b -r a4352c2385ef configure.ac --- a/configure.ac Wed Feb 23 16:54:17 2011 +0100 +++ b/configure.ac Wed Feb 23 17:26:18 2011 +0100 @@ -177,6 +177,7 @@ IT_CHECK_WITH_CACAO_SRC_DIR IT_CHECK_WITH_CACAO_SRC_DIR IT_CHECK_ENABLE_JAMVM +IT_CHECK_WITH_JAMVM_SRC_ZIP IT_DISABLE_OPTIMIZATIONS IT_SET_SHARK_BUILD From xerxes at zafena.se Wed Feb 23 08:47:02 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 23 Feb 2011 17:47:02 +0100 Subject: RFC: JamVM - Taste the New Flavour! --with-jamvm-src-zip option - committed. In-Reply-To: <20110223163507.GR24648@rivendell.middle-earth.co.uk> References: <4D602618.9000401@zafena.se> <20110221212251.GC12717@rivendell.middle-earth.co.uk> <4D6315F6.2050709@zafena.se> <4D64D31D.8080309@zafena.se> <20110223163507.GR24648@rivendell.middle-earth.co.uk> Message-ID: <4D653A06.7040904@zafena.se> On 2011-02-23 17:35, Dr Andrew John Hughes wrote: > On 10:27 Wed 23 Feb , Xerxes R?nby wrote: >> On 2011-02-22 02:48, Xerxes R?nby wrote: >>> On 2011-02-21 22:40, Robert Lougher wrote: >>>> Hi, >>>> >>>> On 21 February 2011 21:22, Dr Andrew John Hughes >>>> wrote: >>>>> On 21:20 Sat 19 Feb , Xerxes Ranby wrote: >>>>>> Greetings! >>>>>> >>>>>> "JamVM's got a shiny new Git repository, which contains the port to the >>>>>> OpenJDK class-library." >>>>>> http://draenog.blogspot.com/2011/02/openjdkjamvm-git-repository.html >>>>>> >>>>>> The attached patch adds Robert Lougher's new JamVM flavour to Icedtea6! >>>>>> +stamps/download-jamvm.stamp: >>>>>> +if BUILD_JAMVM >>>>>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ >>>>>> + | $(SHA256SUM) --check ; \ >>>>>> + then \ >>>>>> + if [ $(JAMVM_SRC_ZIP) ] ; \ >>>>>> + then \ >>>>>> + mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ >>>>>> + fi ; \ >>>>>> + $(WGET) $(JAMVM_URL) -O $(JAMVM_SRC_ZIP); \ >>>>>> + if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ >>>>>> + | $(SHA256SUM) --check ; \ >>>>>> + then echo "ERROR: Bad download of JamVM zip"; false; \ >>>>>> + fi; \ >>>>>> + fi >>>>>> +endif >>>>>> + mkdir -p stamps >>>>>> + touch $@ >>>>> We need an option equivalent to --with-cacao-src-zip. I'd suggest >>>>> adding this in a follow up patch. As with the drop tarballs, we >>>>> should verify the checksum for pre-provided tarballs as well as >>>>> download ones. It should be just a matter of symlinking the tarball >>>>> here if an alternate one is specified. >>>>> >>> Noted, I will add --with-cacao-src-zip in another follow up patch. >>> >> Hi again! >> >> I have attached the follow up patch to implement the new >> --with-jamvm-src-zip option. >> >> with-jamvm-src-zip.23feb.patch >> >> Ok to push? > Comments inline. > >> Cheers >> Xerxes >> Index: icedtea6/Makefile.am >> =================================================================== >> --- icedtea6.orig/Makefile.am 2011-02-23 09:20:37.000000000 +0100 >> +++ icedtea6/Makefile.am 2011-02-23 09:34:26.000000000 +0100 >> @@ -768,6 +768,9 @@ >> >> stamps/download-jamvm.stamp: >> if BUILD_JAMVM >> +if USE_ALT_JAMVM_SRC_ZIP >> + ln -sf $(ALT_JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP) >> +endif >> if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ >> | $(SHA256SUM) --check ; \ >> then \ >> Index: icedtea6/acinclude.m4 >> =================================================================== >> --- icedtea6.orig/acinclude.m4 2011-02-23 09:23:56.000000000 +0100 >> +++ icedtea6/acinclude.m4 2011-02-23 09:30:05.000000000 +0100 >> @@ -875,6 +875,23 @@ >> AC_SUBST(ENABLE_JAMVM) >> ]) >> >> +AC_DEFUN([IT_CHECK_WITH_JAMVM_SRC_ZIP], >> +[ >> + AC_MSG_CHECKING([for a JamVM source zip]) >> + AC_ARG_WITH([jamvm-src-zip], >> + [AS_HELP_STRING(--with-jamvm-src-zip,specify the location of the JamVM source zip)], >> + [ >> + ALT_JAMVM_SRC_ZIP=${withval} >> + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x = x) >> + ], >> + [ >> + ALT_JAMVM_SRC_ZIP="not specified" >> + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x != x) >> + ]) >> + AC_MSG_RESULT(${ALT_JAMVM_SRC_ZIP}) >> + AC_SUBST(ALT_JAMVM_SRC_ZIP) >> +]) >> + > It might be cleaner to have one AM_CONDITIONAL: > > AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x${ALT_JAMVM_SRC_ZIP} != "xnot specified") > > I think the likelihood of the zip being called 'not specified' is suitably low... > > Also it would be good to check it's actually a valid file, which should also handle the yes/no > produced by --with-jamvm-src-zip and --without-jamvm-src-zip. > Something like: > > if [ ! -f ${ALT_JAMVM_SRC_ZIP ] ; then > AC_MSG_ERROR([Invalid JamVM source zip specified: ${ALT_JAMVM_SRC_ZIP}]) > fi > > in the first block. > > I realise I'm probably holding this to higher standards than some of the other macros. > That's because those other macros probably weren't reviewed... ;-) > >> AC_DEFUN([IT_CHECK_ENABLE_CACAO], >> [ >> AC_MSG_CHECKING(whether to use CACAO as VM) >> Index: icedtea6/configure.ac >> =================================================================== >> --- icedtea6.orig/configure.ac 2011-02-23 09:30:52.000000000 +0100 >> +++ icedtea6/configure.ac 2011-02-23 09:31:34.000000000 +0100 >> @@ -177,6 +177,7 @@ >> IT_CHECK_WITH_CACAO_SRC_DIR >> >> IT_CHECK_ENABLE_JAMVM >> +IT_CHECK_WITH_JAMVM_SRC_ZIP >> >> IT_DISABLE_OPTIMIZATIONS >> IT_SET_SHARK_BUILD >> Index: icedtea6/ChangeLog >> =================================================================== >> --- icedtea6.orig/ChangeLog 2011-02-23 09:43:06.000000000 +0100 >> +++ icedtea6/ChangeLog 2011-02-23 10:19:30.000000000 +0100 >> @@ -1,5 +1,16 @@ >> 2011-02-23 Xerxes Ranby >> >> + JamVM: configure --with-jamvm-src-zip >> + * NEWS: Updated. >> + * Makefile.am (stamps/download-jamvm.stamp): >> + Link in jamvm source zip dependent on USE_ALT_JAMVM_SRC_ZIP >> + * acinclude.m4 (IT_CHECK_WITH_JAMVM_SRC_ZIP): New macro. >> + (USE_ALT_JAMVM_SRC_ZIP): New conditional. >> + (ALT_JAMVM_SRC_ZIP): New variable. >> + * configure.ac: Call IT_CHECK_WITH_JAMVM_SRC_ZIP. >> + >> +2011-02-23 Xerxes Ranby >> + >> JamVM: Try --with-additional-vms=jamvm topping! >> * NEWS: Updated. >> * Makefile.am (stamps/add-jamvm.stamp): New make target. >> Index: icedtea6/NEWS >> =================================================================== >> --- icedtea6.orig/NEWS 2011-02-23 09:35:17.000000000 +0100 >> +++ icedtea6/NEWS 2011-02-23 09:39:53.000000000 +0100 >> @@ -18,6 +18,8 @@ >> * Added out-of-the-box JamVM support using --enable-jamvm >> * Allow building of JamVM beside the default VM by using >> --with-additional-vms=jamvm >> +* Distributions can specify the location of the JamVM source zip by using >> + --with-jamvm-src-zip >> * Import of OpenJDK6 b21 including upgrade to HotSpot 19 >> - S6961870: More rebranding fixes for templates/gpl-*-header files >> - S6976186: Shark build system changes > There's nothing distro-specific about using --with-jamvm-src-zip. I use it > on a daily basis (and haven't yet tried the JamVM build as it's missing). > I would just say: > > 'Allow the location of the JamVM source zip to be specified using --with-jamvm-src-zip'. NEWS entry fixed, I have committed initial version to: http://icedtea.classpath.org/hg/icedtea6/rev/a4352c2385ef > You should also document it in INSTALL. I just added a JamVM section for you ;-) Thank you for writing the JamVM INSTALL section! Cheers Xerxes From dbhole at redhat.com Wed Feb 23 08:50:06 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 23 Feb 2011 11:50:06 -0500 Subject: [icedtea-web] RFC: fix RH677772 - NoSuchAlgorithmException using SSL/TLS in javaws In-Reply-To: <4D653756.7070205@redhat.com> References: <4D653756.7070205@redhat.com> Message-ID: <20110223165006.GB12889@redhat.com> * Omair Majid [2011-02-23 11:37]: > Hi, > > I have attached a patch to fix RH677772 [1]. Please note that I am > particularly concerned as it is reverting a patch [2] that was added > to fix another (quite similar) bug, RH524387 [3]. > > As this new bug shows, there are issues with the current system. To > fix these, we will have to whitelist all possible classes/method > that are allowed at this place. And I am not sure at all how to > determine these classes/methods. I especially dont think this is > maintainable (all the more so if you consider third party code which > we have no idea about). > > The real problem, I think, is that we are not granting full > permissions to code originating from jre/lib/ext (which the default > java.policy file does). If we do that, then all code that's > installed there (3rd party JCE providers, proprietary jars, or > really anything) will run with proper permissions, and we wont even > need to deal with the current system of whitelisting. This is what > the proposed patch does. > > I hope that explains why we should just grant appropriate > permissions to code loaded from jre/lib/ext and let java's normal > security mechanism handle everything from then on. > > Any thoughts or comments on the patch? > > Thanks, > Omair > > [1] https://bugzilla.redhat.com/show_bug.cgi?id=677772 > [2] http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6d1e2fae468a > [3] https://bugzilla.redhat.com/show_bug.cgi?id=524387 > diff -r f14bd72dbb29 netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Tue Feb 22 19:15:05 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Wed Feb 23 11:30:44 2011 -0500 > @@ -16,6 +16,7 @@ > > package net.sourceforge.jnlp.runtime; > > +import java.io.File; > import java.net.URI; > import java.net.URISyntaxException; > import java.security.*; > @@ -44,6 +45,8 @@ > /** the previous policy */ > private static Policy systemPolicy; > > + private final String jreExtDir; > + > /** the system level policy for jnlps */ > private Policy systemJnlpPolicy = null; > > @@ -57,6 +60,11 @@ > > systemJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_SYSTEM_SECURITY_POLICY); > userJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_USER_SECURITY_POLICY); > + > + String jre = System.getProperty("java.home"); > + File libDir = new File(jre, "lib"); > + File extDir = new File(libDir, "ext"); > + jreExtDir = extDir.toString(); > } > Neither jre, libDir and extDir are used anywhere else.. IMO they should be removed. Other than that, patch looks fine to me. Cheers, Deepak > /** > @@ -67,6 +75,10 @@ > if (source.equals(systemSource) || source.equals(shellSource)) > return getAllPermissions(); > > + if (isSystemJar(source)) { > + return getAllPermissions(); > + } > + > // if we check the SecurityDesc here then keep in mind that > // code can add properties at runtime to the ResourcesDesc! > if (JNLPRuntime.getApplication() != null) { > @@ -123,6 +135,22 @@ > } > > /** > + * Returns true if the CodeSource corresponds to a system jar. That is, > + * it's part of the JRE. > + */ > + private boolean isSystemJar(CodeSource source) { > + // anything in JRE/lib/ext is a system jar and has full permissions > + String sourceProtocol = source.getLocation().getProtocol(); > + String sourcePath = source.getLocation().getPath(); > + if (sourceProtocol.toUpperCase().equals("FILE") && > + sourcePath.startsWith(jreExtDir)) { > + return true; > + } > + > + return false; > + } > + > + /** > * Constructs a delegate policy based on a config setting > * @param key a KEY_* in DeploymentConfiguration > * @return a policy based on the configuration set by the user > diff -r f14bd72dbb29 netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Tue Feb 22 19:15:05 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Wed Feb 23 11:30:44 2011 -0500 > @@ -306,27 +306,6 @@ > } > } > } > - > - } else if (perm instanceof SecurityPermission) { > - tmpPerm = perm; > - > - // JCE's initialization requires putProviderProperty permission > - if (perm.equals(new SecurityPermission("putProviderProperty.SunJCE"))) { > - if (inTrustedCallChain("com.sun.crypto.provider.SunJCE", "run")) { > - return; > - } > - } > - > - } else if (perm instanceof RuntimePermission) { > - tmpPerm = perm; > - > - // KeyGenerator's init method requires internal spec access > - if (perm.equals(new SecurityPermission("accessClassInPackage.sun.security.internal.spec"))) { > - if (inTrustedCallChain("javax.crypto.KeyGenerator", "init")) { > - return; > - } > - } > - > } else { > tmpPerm = perm; > } > @@ -351,34 +330,6 @@ > } > > /** > - * Returns weather the given class and method are in the current stack, > - * and whether or not everything upto then is trusted > - * > - * @param className The name of the class to look for in the stack > - * @param methodName The name of the method for the given class to look for in the stack > - * @return Weather or not class::method() are in the chain, and everything upto there is trusted > - */ > - private boolean inTrustedCallChain(String className, String methodName) { > - > - StackTraceElement[] stack = Thread.currentThread().getStackTrace(); > - > - for (int i = 0; i < stack.length; i++) { > - > - // Everything up to the desired class/method must be trusted > - if (!stack[i].getClass().getProtectionDomain().implies(new AllPermission())) { > - return false; > - } > - > - if (stack[i].getClassName().equals(className) && > - stack[i].getMethodName().equals(methodName)) { > - return true; > - } > - } > - > - return false; > - } > - > - /** > * Asks the user whether or not to grant permission. > * @param perm the permission to be granted > * @return true if the permission was granted, false otherwise. From omajid at redhat.com Wed Feb 23 09:05:08 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 12:05:08 -0500 Subject: [icedtea-web] RFC: fix RH677772 - NoSuchAlgorithmException using SSL/TLS in javaws In-Reply-To: <20110223165006.GB12889@redhat.com> References: <4D653756.7070205@redhat.com> <20110223165006.GB12889@redhat.com> Message-ID: <4D653E44.1080705@redhat.com> On 02/23/2011 11:50 AM, Deepak Bhole wrote: > * Omair Majid [2011-02-23 11:37]: >> Hi, >> >> I have attached a patch to fix RH677772 [1]. Please note that I am >> particularly concerned as it is reverting a patch [2] that was added >> to fix another (quite similar) bug, RH524387 [3]. >> >> As this new bug shows, there are issues with the current system. To >> fix these, we will have to whitelist all possible classes/method >> that are allowed at this place. And I am not sure at all how to >> determine these classes/methods. I especially dont think this is >> maintainable (all the more so if you consider third party code which >> we have no idea about). >> >> The real problem, I think, is that we are not granting full >> permissions to code originating from jre/lib/ext (which the default >> java.policy file does). If we do that, then all code that's >> installed there (3rd party JCE providers, proprietary jars, or >> really anything) will run with proper permissions, and we wont even >> need to deal with the current system of whitelisting. This is what >> the proposed patch does. >> >> I hope that explains why we should just grant appropriate >> permissions to code loaded from jre/lib/ext and let java's normal >> security mechanism handle everything from then on. >> >> Any thoughts or comments on the patch? >> >> Thanks, >> Omair >> >> [1] https://bugzilla.redhat.com/show_bug.cgi?id=677772 >> [2] http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6d1e2fae468a >> [3] https://bugzilla.redhat.com/show_bug.cgi?id=524387 > >> diff -r f14bd72dbb29 netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java >> --- a/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Tue Feb 22 19:15:05 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Wed Feb 23 11:30:44 2011 -0500 >> @@ -16,6 +16,7 @@ >> >> package net.sourceforge.jnlp.runtime; >> >> +import java.io.File; >> import java.net.URI; >> import java.net.URISyntaxException; >> import java.security.*; >> @@ -44,6 +45,8 @@ >> /** the previous policy */ >> private static Policy systemPolicy; >> >> + private final String jreExtDir; >> + >> /** the system level policy for jnlps */ >> private Policy systemJnlpPolicy = null; >> >> @@ -57,6 +60,11 @@ >> >> systemJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_SYSTEM_SECURITY_POLICY); >> userJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_USER_SECURITY_POLICY); >> + >> + String jre = System.getProperty("java.home"); >> + File libDir = new File(jre, "lib"); >> + File extDir = new File(libDir, "ext"); >> + jreExtDir = extDir.toString(); >> } >> > > Neither jre, libDir and extDir are used anywhere else.. IMO they should be > removed. > Err... jre, libDir and extDir are all local variables used to compute jreExtDir (which is used in other places). I dont see any benefit of removing them. Do you think it would make more sense to replace it with something like this? jreExtDir = new File(new File(System.getProperty("java.home"), "lib"), "ext").toString(); > Other than that, patch looks fine to me. > Thanks for looking over the patch! Thanks, Omair From andrew at icedtea.classpath.org Wed Feb 23 09:05:22 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 17:05:22 +0000 Subject: /hg/icedtea6: Cleanup the IT_CHECK_WITH_JAMVM_SRC_ZIP macro and ... Message-ID: changeset d066d5778104 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d066d5778104 author: Andrew John Hughes date: Wed Feb 23 17:05:16 2011 +0000 Cleanup the IT_CHECK_WITH_JAMVM_SRC_ZIP macro and document it in INSTALL. 2011-02-23 Andrew John Hughes * INSTALL: Mention --with-alt-jamvm-src-zip. * acinclude.m4: (IT_CHECK_WITH_JAMVM_SRC_ZIP): Use a single AM_CONDITIONAL. Check that the specified value is a valid file using test. diffstat: 3 files changed, 15 insertions(+), 3 deletions(-) ChangeLog | 8 ++++++++ INSTALL | 4 +++- acinclude.m4 | 6 ++++-- diffs (56 lines): diff -r a4352c2385ef -r d066d5778104 ChangeLog --- a/ChangeLog Wed Feb 23 17:26:18 2011 +0100 +++ b/ChangeLog Wed Feb 23 17:05:16 2011 +0000 @@ -1,3 +1,11 @@ 2011-02-23 Xerxes Ranby + + * INSTALL: Mention --with-alt-jamvm-src-zip. + * acinclude.m4: + (IT_CHECK_WITH_JAMVM_SRC_ZIP): Use a single + AM_CONDITIONAL. Check that the specified value + is a valid file using test. + 2011-02-23 Xerxes Ranby JamVM: configure --with-jamvm-src-zip diff -r a4352c2385ef -r d066d5778104 INSTALL --- a/INSTALL Wed Feb 23 17:26:18 2011 +0100 +++ b/INSTALL Wed Feb 23 17:05:16 2011 +0000 @@ -152,6 +152,7 @@ to configure: and building one. * --with-cacao-src-zip: Specify the location of a CACAO tarball to avoid downloading. * --with-cacao-src-dir: Specify the location of a CACAO source tree to avoid downloading. +* --with-jamvm-src-zip: Specify the location of a JamVM tarball to avoid downloading. * --with-hg-revision: Specify a hg revision to use (as opposed to tip) with the --enable-hg option. * --with-tzdata-dir: Specify the location of Java timezone data, defaulting to /usr/share/javazi. * --with-abs-install-dir: The final install location of the j2sdk-image, for use in the SystemTap tapset. @@ -262,7 +263,8 @@ IcedTea6 can use JamVM as the virtual ma IcedTea6 can use JamVM as the virtual machine, as opposed to HotSpot. When --enable-jamvm is specified, JamVM will be downloaded and built, followed by the JDK portion of OpenJDK resulting in a JamVM+OpenJDK -image in openjdk/build/-/j2sdk-image. +image in openjdk/build/-/j2sdk-image. The +--with-jamvm-src-zip option exists to allow the use of a pre-downloaded zip. Zero & Shark ============ diff -r a4352c2385ef -r d066d5778104 acinclude.m4 --- a/acinclude.m4 Wed Feb 23 17:26:18 2011 +0100 +++ b/acinclude.m4 Wed Feb 23 17:05:16 2011 +0000 @@ -882,12 +882,14 @@ AC_DEFUN([IT_CHECK_WITH_JAMVM_SRC_ZIP], [AS_HELP_STRING(--with-jamvm-src-zip,specify the location of the JamVM source zip)], [ ALT_JAMVM_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x = x) + if ! test -f ${ALT_JAMVM_SRC_ZIP} ; then + AC_MSG_ERROR([Invalid JamVM source zip specified: ${ALT_JAMVM_SRC_ZIP}]) + fi ], [ ALT_JAMVM_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test x != x) ]) + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test "x{ALT_JAMVM_SRC_ZIP}" = "xnot specified") AC_MSG_RESULT(${ALT_JAMVM_SRC_ZIP}) AC_SUBST(ALT_JAMVM_SRC_ZIP) ]) From ahughes at redhat.com Wed Feb 23 09:06:28 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 17:06:28 +0000 Subject: Reviewer needed - fix for regression test: test/java/io/IOException/LastErrorString.java In-Reply-To: <4D64CC9F.8090204@redhat.com> References: <4D629589.9020201@redhat.com> <20110221214839.GG12717@rivendell.middle-earth.co.uk> <4D638F60.2090103@redhat.com> <20110222131552.GH24648@rivendell.middle-earth.co.uk> <4D64CC9F.8090204@redhat.com> Message-ID: <20110223170628.GT24648@rivendell.middle-earth.co.uk> On 10:00 Wed 23 Feb , Pavel Tisnovsky wrote: > > > > Ok sounds great. Approved. > > > Thanks Andrew. It's been pushed to IcedTea6 HEAD - is it possible to > backport it to IcedTea6-1.9 too please? (to close bug > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=634) > > Cheers > Pavel Yes, that sounds sensible. Please backport to all three branches: 1.7, 1.8 and 1.9. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Wed Feb 23 09:14:39 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 12:14:39 -0500 Subject: [icedtea-web] RFC: fix typo in JRE path Message-ID: <4D65407F.6080307@redhat.com> Hi, The attached patch fixes a typo in the jre path. Okay to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: fix-jre.patch Type: text/x-patch Size: 580 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/2aaa6b0e/fix-jre.patch From ptisnovs at icedtea.classpath.org Wed Feb 23 09:19:24 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Wed, 23 Feb 2011 17:19:24 +0000 Subject: /hg/icedtea6: Renamed and moved patch to proper location. Message-ID: changeset 22d33e039c2f in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=22d33e039c2f author: ptisnovs date: Wed Feb 23 18:22:42 2011 +0100 Renamed and moved patch to proper location. diffstat: 4 files changed, 18 insertions(+), 11 deletions(-) ChangeLog | 7 +++++++ Makefile.am | 2 +- patches/com-sun-awt.patch | 10 ---------- patches/openjdk/6663040-com.sun.awt.patch | 10 ++++++++++ diffs (54 lines): diff -r d066d5778104 -r 22d33e039c2f ChangeLog --- a/ChangeLog Wed Feb 23 17:05:16 2011 +0000 +++ b/ChangeLog Wed Feb 23 18:22:42 2011 +0100 @@ -1,3 +1,10 @@ 2011-02-23 Andrew John Hughes + + * Makefile.am: Renamed and moved patch. + * patches/com-sun-awt.patch: removed + * patches/openjdk/6663040-com.sun.awt.patch: added + Renamed and moved patch to proper location. + 2011-02-23 Andrew John Hughes * INSTALL: Mention --with-alt-jamvm-src-zip. diff -r d066d5778104 -r 22d33e039c2f Makefile.am --- a/Makefile.am Wed Feb 23 17:05:16 2011 +0000 +++ b/Makefile.am Wed Feb 23 18:22:42 2011 +0100 @@ -322,7 +322,7 @@ ICEDTEA_PATCHES = \ patches/pr633-no_javaws_man_page.patch \ patches/pr586-include_all_srcs.patch \ patches/jtreg-LastErrorString.patch \ - patches/com-sun-awt.patch \ + patches/openjdk/6663040-com.sun.awt.patch \ patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ patches/openjdk/6766342-AA-simple-shape-performance.patch diff -r d066d5778104 -r 22d33e039c2f patches/com-sun-awt.patch --- a/patches/com-sun-awt.patch Wed Feb 23 17:05:16 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,10 +0,0 @@ ---- openjdk-old/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-01-21 00:55:18.000000000 +0100 -+++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-02-22 15:28:53.010912000 +0100 -@@ -24,6 +24,7 @@ - # - - com.sun.accessibility.internal.resources = tiger legacy -+com.sun.awt = tiger legacy - com.sun.beans = tiger legacy - com.sun.corba.se.impl.activation = tiger legacy - com.sun.corba.se.impl.copyobject = tiger legacy diff -r d066d5778104 -r 22d33e039c2f patches/openjdk/6663040-com.sun.awt.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6663040-com.sun.awt.patch Wed Feb 23 18:22:42 2011 +0100 @@ -0,0 +1,10 @@ +--- openjdk-old/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-01-21 00:55:18.000000000 +0100 ++++ openjdk/langtools/src/share/classes/com/sun/tools/javac/resources/legacy.properties 2011-02-22 15:28:53.010912000 +0100 +@@ -24,6 +24,7 @@ + # + + com.sun.accessibility.internal.resources = tiger legacy ++com.sun.awt = tiger legacy + com.sun.beans = tiger legacy + com.sun.corba.se.impl.activation = tiger legacy + com.sun.corba.se.impl.copyobject = tiger legacy From jvanek at redhat.com Wed Feb 23 09:17:33 2011 From: jvanek at redhat.com (Jiri Vanek) Date: Wed, 23 Feb 2011 18:17:33 +0100 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about Message-ID: <4D65412D.4030905@redhat.com> # HG changeset patch # User Jiri Vanek # Date 1298481249 -3600 # Node ID 3068613e852576e9820a3498d9ef305cbecde002 # Parent f14bd72dbb29dd48c0bcf388f5e7fad88b044b76 javaws -about is no longer loaded remotely, have no permissions, and do not cause hanging of jvm after closing about window. diff -r f14bd72dbb29 -r 3068613e8525 ChangeLog --- a/ChangeLog Tue Feb 22 19:15:05 2011 -0500 +++ b/ChangeLog Wed Feb 23 18:14:09 2011 +0100 @@ -1,3 +1,9 @@ +2011-02-23 Jiri Vanek + + * Makefile.am : fixed '/' typo in JRE variable + * about.jnlp : about.jar is loaded from localhost and without security permissions, fixed #rhbz677334 + + 2011-02-22 Omair Majid Mark Greenwood diff -r f14bd72dbb29 -r 3068613e8525 Makefile.am --- a/Makefile.am Tue Feb 22 19:15:05 2011 -0500 +++ b/Makefile.am Wed Feb 23 18:14:09 2011 +0100 @@ -17,7 +17,7 @@ IT_CLASS_TARGET_VERSION=6 IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) -JRE='"$(SYSTEM_JDK_DIR)jre"' +JRE='"$(SYSTEM_JDK_DIR)/jre"' LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' diff -r f14bd72dbb29 -r 3068613e8525 netx/net/sourceforge/jnlp/resources/about.jnlp --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Tue Feb 22 19:15:05 2011 -0500 +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 18:14:09 2011 +0100 @@ -1,5 +1,5 @@ - + About window for NetX NetX @@ -12,7 +12,7 @@ - + From dbhole at redhat.com Wed Feb 23 09:26:07 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 23 Feb 2011 12:26:07 -0500 Subject: [icedtea-web] RFC: fix RH677772 - NoSuchAlgorithmException using SSL/TLS in javaws In-Reply-To: <4D653E44.1080705@redhat.com> References: <4D653756.7070205@redhat.com> <20110223165006.GB12889@redhat.com> <4D653E44.1080705@redhat.com> Message-ID: <20110223172607.GC12889@redhat.com> * Omair Majid [2011-02-23 12:05]: > On 02/23/2011 11:50 AM, Deepak Bhole wrote: > >* Omair Majid [2011-02-23 11:37]: > >>Hi, > >> > >>I have attached a patch to fix RH677772 [1]. Please note that I am > >>particularly concerned as it is reverting a patch [2] that was added > >>to fix another (quite similar) bug, RH524387 [3]. > >> > >>As this new bug shows, there are issues with the current system. To > >>fix these, we will have to whitelist all possible classes/method > >>that are allowed at this place. And I am not sure at all how to > >>determine these classes/methods. I especially dont think this is > >>maintainable (all the more so if you consider third party code which > >>we have no idea about). > >> > >>The real problem, I think, is that we are not granting full > >>permissions to code originating from jre/lib/ext (which the default > >>java.policy file does). If we do that, then all code that's > >>installed there (3rd party JCE providers, proprietary jars, or > >>really anything) will run with proper permissions, and we wont even > >>need to deal with the current system of whitelisting. This is what > >>the proposed patch does. > >> > >>I hope that explains why we should just grant appropriate > >>permissions to code loaded from jre/lib/ext and let java's normal > >>security mechanism handle everything from then on. > >> > >>Any thoughts or comments on the patch? > >> > >>Thanks, > >>Omair > >> > >>[1] https://bugzilla.redhat.com/show_bug.cgi?id=677772 > >>[2] http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6d1e2fae468a > >>[3] https://bugzilla.redhat.com/show_bug.cgi?id=524387 > > > >>diff -r f14bd72dbb29 netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java > >>--- a/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Tue Feb 22 19:15:05 2011 -0500 > >>+++ b/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Wed Feb 23 11:30:44 2011 -0500 > >>@@ -16,6 +16,7 @@ > >> > >> package net.sourceforge.jnlp.runtime; > >> > >>+import java.io.File; > >> import java.net.URI; > >> import java.net.URISyntaxException; > >> import java.security.*; > >>@@ -44,6 +45,8 @@ > >> /** the previous policy */ > >> private static Policy systemPolicy; > >> > >>+ private final String jreExtDir; > >>+ > >> /** the system level policy for jnlps */ > >> private Policy systemJnlpPolicy = null; > >> > >>@@ -57,6 +60,11 @@ > >> > >> systemJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_SYSTEM_SECURITY_POLICY); > >> userJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_USER_SECURITY_POLICY); > >>+ > >>+ String jre = System.getProperty("java.home"); > >>+ File libDir = new File(jre, "lib"); > >>+ File extDir = new File(libDir, "ext"); > >>+ jreExtDir = extDir.toString(); > >> } > >> > > > >Neither jre, libDir and extDir are used anywhere else.. IMO they should be > >removed. > > > > Err... jre, libDir and extDir are all local variables used to > compute jreExtDir (which is used in other places). I dont see any > benefit of removing them. Do you think it would make more sense to > replace it with something like this? > jreExtDir = new File(new File(System.getProperty("java.home"), > "lib"), "ext").toString(); > Yes. Or even: String jre = System.getProperty("java.home"); jreExtDir = jre + File.separator + "lib" + File.separator + "ext"; My only concern is that we are initializing File variables that are never used in that context (only the strings are used). Cheers, Deepak > >Other than that, patch looks fine to me. > > > > Thanks for looking over the patch! > > Thanks, > Omair From dbhole at redhat.com Wed Feb 23 09:26:44 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Wed, 23 Feb 2011 12:26:44 -0500 Subject: [icedtea-web] RFC: fix typo in JRE path In-Reply-To: <4D65407F.6080307@redhat.com> References: <4D65407F.6080307@redhat.com> Message-ID: <20110223172644.GD12889@redhat.com> * Omair Majid [2011-02-23 12:15]: > Hi, > > The attached patch fixes a typo in the jre path. > > Okay to commit? > Yep, looks fine to me. Cheers, Deepak > Cheers, > Omair > diff -r f14bd72dbb29 Makefile.am > --- a/Makefile.am Tue Feb 22 19:15:05 2011 -0500 > +++ b/Makefile.am Wed Feb 23 12:08:56 2011 -0500 > @@ -17,7 +17,7 @@ > IT_CLASS_TARGET_VERSION=6 > IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) > > -JRE='"$(SYSTEM_JDK_DIR)jre"' > +JRE='"$(SYSTEM_JDK_DIR)/jre"' > LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" > PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' > From ahughes at redhat.com Wed Feb 23 09:51:12 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 17:51:12 +0000 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D65412D.4030905@redhat.com> References: <4D65412D.4030905@redhat.com> Message-ID: <20110223175112.GW24648@rivendell.middle-earth.co.uk> What is the motivation for this change? Assuming it still runs without all-permissions, the change looks fine. Please do the Makefile.am change in a separate patch; it's easier to debug and revert things when issues are separate. On 18:17 Wed 23 Feb , Jiri Vanek wrote: > # HG changeset patch > # User Jiri Vanek > # Date 1298481249 -3600 > # Node ID 3068613e852576e9820a3498d9ef305cbecde002 > # Parent f14bd72dbb29dd48c0bcf388f5e7fad88b044b76 > javaws -about is no longer loaded remotely, have no permissions, and do > not cause hanging of jvm after closing about window. > > diff -r f14bd72dbb29 -r 3068613e8525 ChangeLog > --- a/ChangeLog Tue Feb 22 19:15:05 2011 -0500 > +++ b/ChangeLog Wed Feb 23 18:14:09 2011 +0100 > @@ -1,3 +1,9 @@ > +2011-02-23 Jiri Vanek > + > + * Makefile.am : fixed '/' typo in JRE variable I think this should be a separate patch. Completely different issue. > + * about.jnlp : about.jar is loaded from localhost and without > security permissions, fixed #rhbz677334 > + > + > 2011-02-22 Omair Majid > Mark Greenwood > > diff -r f14bd72dbb29 -r 3068613e8525 Makefile.am > --- a/Makefile.am Tue Feb 22 19:15:05 2011 -0500 > +++ b/Makefile.am Wed Feb 23 18:14:09 2011 +0100 > @@ -17,7 +17,7 @@ > IT_CLASS_TARGET_VERSION=6 > IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source > $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) > > -JRE='"$(SYSTEM_JDK_DIR)jre"' > +JRE='"$(SYSTEM_JDK_DIR)/jre"' > > LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" > > PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' > > diff -r f14bd72dbb29 -r 3068613e8525 > netx/net/sourceforge/jnlp/resources/about.jnlp > --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Tue Feb 22 19:15:05 > 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 18:14:09 > 2011 +0100 > @@ -1,5 +1,5 @@ > > - codebase="http://icedtea.classpath.org/netx/"> > + > > About window for NetX > NetX > @@ -12,7 +12,7 @@ > > > > - > + > > > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at icedtea.classpath.org Wed Feb 23 10:06:36 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 23 Feb 2011 18:06:36 +0000 Subject: /hg/icedtea-web: RH677772: NoSuchAlgorithmException using SSL/TL... Message-ID: changeset 11a9a305dd44 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=11a9a305dd44 author: Omair Majid date: Wed Feb 23 13:04:02 2011 -0500 RH677772: NoSuchAlgorithmException using SSL/TLS in javaws Grant AllPermission to CodeSource originating from jre/lib/ext, and let Java's security model work. The cryptography code already does a doPrivilegedAction when initialzing cryptography providers which takes care of everything. 2011-02-23 Omair Majid RH677772: NoSuchAlgorithmException using SSL/TLS in javaws * NEWS: Update with bugfix. * netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java: Add new field jreExtDir. (JNLPPolicy): Initialize jreExtDir. (getPermissions): Grant AllPermissions if the CodeSourse is a system jar. (isSystemJar): New method. * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java (checkPermission): Remove special casing of SecurityPermission("putProviderProperty.SunJCE") and SecurityPer mission("accessClassInPackage.sun.security.internal.spec"). (inTrustedCallChain): Remove. diffstat: 4 files changed, 42 insertions(+), 49 deletions(-) ChangeLog | 15 +++ NEWS | 1 netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java | 26 ++++++ netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java | 49 ------------ diffs (163 lines): diff -r f14bd72dbb29 -r 11a9a305dd44 ChangeLog --- a/ChangeLog Tue Feb 22 19:15:05 2011 -0500 +++ b/ChangeLog Wed Feb 23 13:04:02 2011 -0500 @@ -1,3 +1,18 @@ 2011-02-22 Omair Majid + + RH677772: NoSuchAlgorithmException using SSL/TLS in javaws + * NEWS: Update with bugfix. + * netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java: Add new field + jreExtDir. + (JNLPPolicy): Initialize jreExtDir. + (getPermissions): Grant AllPermissions if the CodeSourse is a system jar. + (isSystemJar): New method. + * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java + (checkPermission): Remove special casing of + SecurityPermission("putProviderProperty.SunJCE") and + SecurityPermission("accessClassInPackage.sun.security.internal.spec"). + (inTrustedCallChain): Remove. + 2011-02-22 Omair Majid Mark Greenwood diff -r f14bd72dbb29 -r 11a9a305dd44 NEWS --- a/NEWS Tue Feb 22 19:15:05 2011 -0500 +++ b/NEWS Wed Feb 23 13:04:02 2011 -0500 @@ -16,6 +16,7 @@ New in release 1.1 (2011-XX-XX): - IcedTea-Web now installs to a FHS-compliant location * Common Fixes and Improvements - PR638: JNLPClassLoader.loadClass(String name) can return null + - RH677772: NoSuchAlgorithmException using SSL/TLS in javaws * NetX - Use Firefox's proxy settings if possible - RH669942: javaws fails to download version/packed files (missing support for jnlp.packEnabled and jnlp.versionEnabled) diff -r f14bd72dbb29 -r 11a9a305dd44 netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Tue Feb 22 19:15:05 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Wed Feb 23 13:04:02 2011 -0500 @@ -16,6 +16,7 @@ package net.sourceforge.jnlp.runtime; +import java.io.File; import java.net.URI; import java.net.URISyntaxException; import java.security.*; @@ -44,6 +45,8 @@ public class JNLPPolicy extends Policy { /** the previous policy */ private static Policy systemPolicy; + private final String jreExtDir; + /** the system level policy for jnlps */ private Policy systemJnlpPolicy = null; @@ -57,6 +60,9 @@ public class JNLPPolicy extends Policy { systemJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_SYSTEM_SECURITY_POLICY); userJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_USER_SECURITY_POLICY); + + String jre = System.getProperty("java.home"); + jreExtDir = jre + File.separator + "lib" + File.separator + "ext"; } /** @@ -66,6 +72,10 @@ public class JNLPPolicy extends Policy { public PermissionCollection getPermissions(CodeSource source) { if (source.equals(systemSource) || source.equals(shellSource)) return getAllPermissions(); + + if (isSystemJar(source)) { + return getAllPermissions(); + } // if we check the SecurityDesc here then keep in mind that // code can add properties at runtime to the ResourcesDesc! @@ -123,6 +133,22 @@ public class JNLPPolicy extends Policy { } /** + * Returns true if the CodeSource corresponds to a system jar. That is, + * it's part of the JRE. + */ + private boolean isSystemJar(CodeSource source) { + // anything in JRE/lib/ext is a system jar and has full permissions + String sourceProtocol = source.getLocation().getProtocol(); + String sourcePath = source.getLocation().getPath(); + if (sourceProtocol.toUpperCase().equals("FILE") && + sourcePath.startsWith(jreExtDir)) { + return true; + } + + return false; + } + + /** * Constructs a delegate policy based on a config setting * @param key a KEY_* in DeploymentConfiguration * @return a policy based on the configuration set by the user diff -r f14bd72dbb29 -r 11a9a305dd44 netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Tue Feb 22 19:15:05 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Wed Feb 23 13:04:02 2011 -0500 @@ -306,27 +306,6 @@ class JNLPSecurityManager extends AWTSec } } } - - } else if (perm instanceof SecurityPermission) { - tmpPerm = perm; - - // JCE's initialization requires putProviderProperty permission - if (perm.equals(new SecurityPermission("putProviderProperty.SunJCE"))) { - if (inTrustedCallChain("com.sun.crypto.provider.SunJCE", "run")) { - return; - } - } - - } else if (perm instanceof RuntimePermission) { - tmpPerm = perm; - - // KeyGenerator's init method requires internal spec access - if (perm.equals(new SecurityPermission("accessClassInPackage.sun.security.internal.spec"))) { - if (inTrustedCallChain("javax.crypto.KeyGenerator", "init")) { - return; - } - } - } else { tmpPerm = perm; } @@ -348,34 +327,6 @@ class JNLPSecurityManager extends AWTSec } throw ex; } - } - - /** - * Returns weather the given class and method are in the current stack, - * and whether or not everything upto then is trusted - * - * @param className The name of the class to look for in the stack - * @param methodName The name of the method for the given class to look for in the stack - * @return Weather or not class::method() are in the chain, and everything upto there is trusted - */ - private boolean inTrustedCallChain(String className, String methodName) { - - StackTraceElement[] stack = Thread.currentThread().getStackTrace(); - - for (int i = 0; i < stack.length; i++) { - - // Everything up to the desired class/method must be trusted - if (!stack[i].getClass().getProtectionDomain().implies(new AllPermission())) { - return false; - } - - if (stack[i].getClassName().equals(className) && - stack[i].getMethodName().equals(methodName)) { - return true; - } - } - - return false; } /** From omajid at redhat.com Wed Feb 23 10:12:41 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 13:12:41 -0500 Subject: [icedtea-web] RFC: fix RH677772 - NoSuchAlgorithmException using SSL/TLS in javaws In-Reply-To: <20110223172607.GC12889@redhat.com> References: <4D653756.7070205@redhat.com> <20110223165006.GB12889@redhat.com> <4D653E44.1080705@redhat.com> <20110223172607.GC12889@redhat.com> Message-ID: <4D654E19.5090001@redhat.com> On 02/23/2011 12:26 PM, Deepak Bhole wrote: > * Omair Majid [2011-02-23 12:05]: >> On 02/23/2011 11:50 AM, Deepak Bhole wrote: >>> * Omair Majid [2011-02-23 11:37]: >>>> Hi, >>>> >>>> I have attached a patch to fix RH677772 [1]. Please note that I am >>>> particularly concerned as it is reverting a patch [2] that was added >>>> to fix another (quite similar) bug, RH524387 [3]. >>>> >>>> As this new bug shows, there are issues with the current system. To >>>> fix these, we will have to whitelist all possible classes/method >>>> that are allowed at this place. And I am not sure at all how to >>>> determine these classes/methods. I especially dont think this is >>>> maintainable (all the more so if you consider third party code which >>>> we have no idea about). >>>> >>>> The real problem, I think, is that we are not granting full >>>> permissions to code originating from jre/lib/ext (which the default >>>> java.policy file does). If we do that, then all code that's >>>> installed there (3rd party JCE providers, proprietary jars, or >>>> really anything) will run with proper permissions, and we wont even >>>> need to deal with the current system of whitelisting. This is what >>>> the proposed patch does. >>>> >>>> I hope that explains why we should just grant appropriate >>>> permissions to code loaded from jre/lib/ext and let java's normal >>>> security mechanism handle everything from then on. >>>> >>>> Any thoughts or comments on the patch? >>>> >>>> Thanks, >>>> Omair >>>> >>>> [1] https://bugzilla.redhat.com/show_bug.cgi?id=677772 >>>> [2] http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6d1e2fae468a >>>> [3] https://bugzilla.redhat.com/show_bug.cgi?id=524387 >>> >>>> diff -r f14bd72dbb29 netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java >>>> --- a/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Tue Feb 22 19:15:05 2011 -0500 >>>> +++ b/netx/net/sourceforge/jnlp/runtime/JNLPPolicy.java Wed Feb 23 11:30:44 2011 -0500 >>>> @@ -57,6 +60,11 @@ >>>> >>>> systemJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_SYSTEM_SECURITY_POLICY); >>>> userJnlpPolicy = getPolicyFromConfig(DeploymentConfiguration.KEY_USER_SECURITY_POLICY); >>>> + >>>> + String jre = System.getProperty("java.home"); >>>> + File libDir = new File(jre, "lib"); >>>> + File extDir = new File(libDir, "ext"); >>>> + jreExtDir = extDir.toString(); >>>> } >>>> >>> >>> Neither jre, libDir and extDir are used anywhere else.. IMO they should be >>> removed. >>> >> >> Err... jre, libDir and extDir are all local variables used to >> compute jreExtDir (which is used in other places). I dont see any >> benefit of removing them. Do you think it would make more sense to >> replace it with something like this? >> jreExtDir = new File(new File(System.getProperty("java.home"), >> "lib"), "ext").toString(); >> > > Yes. Or even: > String jre = System.getProperty("java.home"); > jreExtDir = jre + File.separator + "lib" + File.separator + "ext"; > Ah, I see what you mean now. > My only concern is that we are initializing File variables that are > never used in that context (only the strings are used). > I dont think this is a problem. A File object does not have to represent an existing file. The overhead should not be high either (since we only create 2 File objects per process). Anyway, I have applied your suggested change and pushed the fix. Thanks for looking over the patch. Cheers, Omair From ahughes at redhat.com Wed Feb 23 10:28:53 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 18:28:53 +0000 Subject: Call to Arms: OpenJDK7 Message-ID: <20110223182853.GA24648@rivendell.middle-earth.co.uk> >From Mark Reinhold on the jdk7 list: 'We've reached Milestone 12, also known as the "Developer Preview" release. We'll strongly encourage developers, deployers, and end users to download and test this build and submit bug reports promptly, ideally by the end of March. For reference, the proprietary Oracle builds can be found here: http://jdk7.java.net/preview/. Pointers to other builds are welcome!' http://mail.openjdk.java.net/pipermail/jdk7-dev/2011-February/001910.html We need to get our Free builds up-to-date ASAP to provide an alternative to the proprietary Oracle offering. IcedTea7 is currently horribly behind. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at icedtea.classpath.org Wed Feb 23 10:37:27 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Wed, 23 Feb 2011 18:37:27 +0000 Subject: /hg/icedtea-web: Fix missing slash in JRE Message-ID: changeset d7fee305bd4f in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=d7fee305bd4f author: Omair Majid date: Wed Feb 23 13:37:10 2011 -0500 Fix missing slash in JRE 2011-02-23 Omair Majid * Makefile.am: Add missing slash to JRE. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 4 ++++ Makefile.am | 2 +- diffs (23 lines): diff -r 11a9a305dd44 -r d7fee305bd4f ChangeLog --- a/ChangeLog Wed Feb 23 13:04:02 2011 -0500 +++ b/ChangeLog Wed Feb 23 13:37:10 2011 -0500 @@ -1,3 +1,7 @@ 2011-02-23 Omair Majid + + * Makefile.am: Add missing slash to JRE. + 2011-02-23 Omair Majid RH677772: NoSuchAlgorithmException using SSL/TLS in javaws diff -r 11a9a305dd44 -r d7fee305bd4f Makefile.am --- a/Makefile.am Wed Feb 23 13:04:02 2011 -0500 +++ b/Makefile.am Wed Feb 23 13:37:10 2011 -0500 @@ -17,7 +17,7 @@ IT_CLASS_TARGET_VERSION=6 IT_CLASS_TARGET_VERSION=6 IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) -JRE='"$(SYSTEM_JDK_DIR)jre"' +JRE='"$(SYSTEM_JDK_DIR)/jre"' LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' From andrew at icedtea.classpath.org Wed Feb 23 10:39:02 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 18:39:02 +0000 Subject: /hg/icedtea6: Make JDK binary macros more idiot-proof. Message-ID: changeset a597500577ef in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a597500577ef author: Andrew John Hughes date: Wed Feb 23 18:38:54 2011 +0000 Make JDK binary macros more idiot-proof. 2011-02-23 Andrew John Hughes * acinclude.m4: Make java, javah, rmic and jar macros more idiot-proof like the new native2ascii macro. (IT_FIND_JAVA): Improve output, check file exists and is executable and look for alternatives on the path if not. (IT_FIND_JAVAH): Likewise. (IT_FIND_JAR): Likewise. (IT_FIND_RMIC): Likewise. (IT_FIND_NATIVE2ASCII): Invert executable test for clarify. diffstat: 2 files changed, 116 insertions(+), 59 deletions(-) ChangeLog | 14 +++++ acinclude.m4 | 161 ++++++++++++++++++++++++++++++++++++---------------------- diffs (257 lines): diff -r 22d33e039c2f -r a597500577ef ChangeLog --- a/ChangeLog Wed Feb 23 18:22:42 2011 +0100 +++ b/ChangeLog Wed Feb 23 18:38:54 2011 +0000 @@ -1,3 +1,17 @@ 2011-02-23 Pavel Tisnovsky + + * acinclude.m4: + Make java, javah, rmic and jar macros more + idiot-proof like the new native2ascii macro. + (IT_FIND_JAVA): Improve output, check file + exists and is executable and look for alternatives + on the path if not. + (IT_FIND_JAVAH): Likewise. + (IT_FIND_JAR): Likewise. + (IT_FIND_RMIC): Likewise. + (IT_FIND_NATIVE2ASCII): Invert executable test + for clarify. + 2011-02-23 Pavel Tisnovsky * Makefile.am: Renamed and moved patch. diff -r 22d33e039c2f -r a597500577ef acinclude.m4 --- a/acinclude.m4 Wed Feb 23 18:22:42 2011 +0100 +++ b/acinclude.m4 Wed Feb 23 18:38:54 2011 +0000 @@ -220,28 +220,41 @@ AC_DEFUN([IT_CHECK_JAVAC], AC_DEFUN([IT_FIND_JAVA], [ - AC_MSG_CHECKING(for java) + JAVA_DEFAULT=${SYSTEM_JDK_DIR}/bin/java + AC_MSG_CHECKING([if a java binary was specified]) AC_ARG_WITH([java], [AS_HELP_STRING(--with-java,specify location of the 1.5 java vm)], [ - JAVA="${withval}" + if test "x${withval}" = "xyes"; then + JAVA=no + else + JAVA="${withval}" + fi ], [ - JAVA=${SYSTEM_JDK_DIR}/bin/java + JAVA=no ]) - if ! test -f "${JAVA}"; then - AC_PATH_PROG(JAVA, "${JAVA}") + AC_MSG_RESULT(${JAVA}) + if test "x${JAVA}" = "xno"; then + JAVA=${JAVA_DEFAULT} fi - if test -z "${JAVA}"; then - AC_PATH_PROG(JAVA, "gij") + AC_MSG_CHECKING([if $JAVA is a valid executable]) + if test -x "${JAVA}"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + JAVA="" + AC_PATH_PROG(JAVA, "java") + if test -z "${JAVA}"; then + AC_PATH_PROG(JAVA, "gij") + fi + if test -z "${JAVA}"; then + AC_PATH_PROG(JAVA, "cacao") + fi + if test -z "${JAVA}"; then + AC_MSG_ERROR("A 1.5-compatible Java VM is required.") + fi fi - if test -z "${JAVA}"; then - AC_PATH_PROG(JAVA, "java") - fi - if test -z "${JAVA}"; then - AC_MSG_ERROR("A 1.5-compatible Java VM is required.") - fi - AC_MSG_RESULT(${JAVA}) AC_SUBST(JAVA) ]) @@ -360,55 +373,75 @@ AC_DEFUN([IT_CHECK_GCC_VERSION], AC_DEFUN([IT_FIND_JAVAH], [ - AC_MSG_CHECKING([for javah]) + JAVAH_DEFAULT=${SYSTEM_JDK_DIR}/bin/javah + AC_MSG_CHECKING([if a javah binary was specified]) AC_ARG_WITH([javah], [AS_HELP_STRING(--with-javah,specify location of the Java header generator)], [ - JAVAH="${withval}" + if test "x${withval}" = "xyes"; then + JAVAH=no + else + JAVAH="${withval}" + fi ], [ - JAVAH=${SYSTEM_JDK_DIR}/bin/javah + JAVAH=no ]) - if ! test -f "${JAVAH}"; then - AC_PATH_PROG(JAVAH, "${JAVAH}") + AC_MSG_RESULT(${JAVAH}) + if test "x${JAVAH}" = "xno"; then + JAVAH=${JAVAH_DEFAULT} fi - if test -z "${JAVAH}"; then - AC_PATH_PROG(JAVAH, "gjavah") + AC_MSG_CHECKING([if $JAVAH is a valid executable]) + if test -x "${JAVAH}"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + JAVAH="" + AC_PATH_PROG(JAVAH, "javah") + if test -z "${JAVAH}"; then + AC_PATH_PROG(JAVAH, "gjavah") + fi + if test -z "${JAVAH}"; then + AC_MSG_ERROR("A Java header generator was not found.") + fi fi - if test -z "${JAVAH}"; then - AC_PATH_PROG(JAVAH, "javah") - fi - if test -z "${JAVAH}"; then - AC_MSG_ERROR("A Java header generator was not found.") - fi - AC_MSG_RESULT(${JAVAH}) AC_SUBST(JAVAH) ]) AC_DEFUN([IT_FIND_JAR], [ - AC_MSG_CHECKING([for jar]) + JAR_DEFAULT=${SYSTEM_JDK_DIR}/bin/jar + AC_MSG_CHECKING([if a jar binary was specified]) AC_ARG_WITH([jar], [AS_HELP_STRING(--with-jar,specify location of Java archive tool (jar))], [ - JAR="${withval}" + if test "x${withval}" = "xyes"; then + JAR=no + else + JAR="${withval}" + fi ], [ - JAR=${SYSTEM_JDK_DIR}/bin/jar + JAR=no ]) - if ! test -f "${JAR}"; then - AC_PATH_PROG(JAR, "${JAR}") + AC_MSG_RESULT(${JAR}) + if test "x${JAR}" = "xno"; then + JAR=${JAR_DEFAULT} fi - if test -z "${JAR}"; then - AC_PATH_PROG(JAR, "gjar") + AC_MSG_CHECKING([if $JAR is a valid executable]) + if test -x "${JAR}"; then + AC_MSG_RESULT([yes]) + else + AC_MSG_RESULT([no]) + JAR="" + AC_PATH_PROG(JAR, "jar") + if test -z "${JAR}"; then + AC_PATH_PROG(JAR, "gjar") + fi + if test -z "${JAR}"; then + AC_MSG_ERROR("No Java archive tool was found.") + fi fi - if test -z "${JAR}"; then - AC_PATH_PROG(JAR, "jar") - fi - if test -z "${JAR}"; then - AC_MSG_ERROR("No Java archive tool was found.") - fi - AC_MSG_RESULT(${JAR}) AC_MSG_CHECKING([whether jar supports @ argument]) touch _config.txt cat >_config.list < References: Message-ID: <20110223191736.GD24648@rivendell.middle-earth.co.uk> Just a heads up for people, this is quite a nice little change. It essentially makes configure a bit intelligent: $ /home/andrew/projects/openjdk/icedtea6/configure \ --with-jar=/boom --with-rmic=/bang --with-java=/bang \ --with-javah=/boom --with-native2ascii=/whoop ... checking if a java binary was specified... /bang checking if /bang is a valid executable... no checking for java... /usr/bin/java checking for javac... /home/andrew/.gentoo/java-config-2/current-user-vm/bin/javac checking if a javah binary was specified... /boom checking if /boom is a valid executable... no checking for javah... /usr/bin/javah checking if a jar binary was specified... /boom checking if /boom is a valid executable... no checking for jar... /usr/bin/jar checking whether jar supports @ argument... yes checking whether jar supports stdin file arguments... no checking whether jar supports -J options at the end... yes checking if a rmic binary was specified... /bang checking if /bang is a valid executable... no checking for rmic... /usr/bin/rmic checking if a native2ascii binary was specified... /whoop checking if /whoop is a valid executable... no checking for native2ascii... /usr/bin/native2ascii Assuming you don't have binaries call boom, bang and whoop in /, then configure will correct you and find the appropriate binaries on the path. I'm in two minds as to whether correcting the user rather than just bailing is the right thing to do, though that's not a change from what we had before. I spotted the awfulness of the previous versions when creating the one for native2ascii. I had no native2ascii in my gcj jdk directory, but it still went ahead and created a broken symlink. Note that if you don't specify any of the options, it now finds everything in the JDK being used. This is from just ./configure: checking for a JDK home directory... /usr/lib/jvm/gcj-jdk checking if a java binary was specified... no checking if /usr/lib/jvm/gcj-jdk/bin/java is a valid executable... yes checking for javac... /home/andrew/.gentoo/java-config-2/current-user-vm/bin/javac checking if a javah binary was specified... no checking if /usr/lib/jvm/gcj-jdk/bin/javah is a valid executable... yes checking if a jar binary was specified... no checking if /usr/lib/jvm/gcj-jdk/bin/jar is a valid executable... yes checking whether jar supports @ argument... yes checking whether jar supports stdin file arguments... yes checking whether jar supports -J options at the end... yes checking if a rmic binary was specified... no checking if /usr/lib/jvm/gcj-jdk/bin/rmic is a valid executable... yes checking if a native2ascii binary was specified... no checking if /usr/lib/jvm/gcj-jdk/bin/native2ascii is a valid executable... yes So you only need to override the values if you want something else. I still need to look at the javac mess, but I'll leave that until 1.11. On 18:39 Wed 23 Feb , andrew at icedtea.classpath.org wrote: > changeset a597500577ef in /hg/icedtea6 > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a597500577ef > author: Andrew John Hughes > date: Wed Feb 23 18:38:54 2011 +0000 > > Make JDK binary macros more idiot-proof. > > 2011-02-23 Andrew John Hughes > > * acinclude.m4: Make java, javah, rmic and jar > macros more idiot-proof like the new native2ascii macro. > (IT_FIND_JAVA): Improve output, check file exists and is > executable and look for alternatives on the path if not. > (IT_FIND_JAVAH): Likewise. (IT_FIND_JAR): Likewise. > (IT_FIND_RMIC): Likewise. (IT_FIND_NATIVE2ASCII): Invert > executable test for clarify. > > > diffstat: > > 2 files changed, 116 insertions(+), 59 deletions(-) > ChangeLog | 14 +++++ > acinclude.m4 | 161 ++++++++++++++++++++++++++++++++++++---------------------- > > diffs (257 lines): > > diff -r 22d33e039c2f -r a597500577ef ChangeLog > --- a/ChangeLog Wed Feb 23 18:22:42 2011 +0100 > +++ b/ChangeLog Wed Feb 23 18:38:54 2011 +0000 > @@ -1,3 +1,17 @@ 2011-02-23 Pavel Tisnovsky +2011-02-23 Andrew John Hughes > + > + * acinclude.m4: > + Make java, javah, rmic and jar macros more > + idiot-proof like the new native2ascii macro. > + (IT_FIND_JAVA): Improve output, check file > + exists and is executable and look for alternatives > + on the path if not. > + (IT_FIND_JAVAH): Likewise. > + (IT_FIND_JAR): Likewise. > + (IT_FIND_RMIC): Likewise. > + (IT_FIND_NATIVE2ASCII): Invert executable test > + for clarify. > + > 2011-02-23 Pavel Tisnovsky > > * Makefile.am: Renamed and moved patch. > diff -r 22d33e039c2f -r a597500577ef acinclude.m4 > --- a/acinclude.m4 Wed Feb 23 18:22:42 2011 +0100 > +++ b/acinclude.m4 Wed Feb 23 18:38:54 2011 +0000 > @@ -220,28 +220,41 @@ AC_DEFUN([IT_CHECK_JAVAC], > > AC_DEFUN([IT_FIND_JAVA], > [ > - AC_MSG_CHECKING(for java) > + JAVA_DEFAULT=${SYSTEM_JDK_DIR}/bin/java > + AC_MSG_CHECKING([if a java binary was specified]) > AC_ARG_WITH([java], > [AS_HELP_STRING(--with-java,specify location of the 1.5 java vm)], > [ > - JAVA="${withval}" > + if test "x${withval}" = "xyes"; then > + JAVA=no > + else > + JAVA="${withval}" > + fi > ], > [ > - JAVA=${SYSTEM_JDK_DIR}/bin/java > + JAVA=no > ]) > - if ! test -f "${JAVA}"; then > - AC_PATH_PROG(JAVA, "${JAVA}") > + AC_MSG_RESULT(${JAVA}) > + if test "x${JAVA}" = "xno"; then > + JAVA=${JAVA_DEFAULT} > fi > - if test -z "${JAVA}"; then > - AC_PATH_PROG(JAVA, "gij") > + AC_MSG_CHECKING([if $JAVA is a valid executable]) > + if test -x "${JAVA}"; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + JAVA="" > + AC_PATH_PROG(JAVA, "java") > + if test -z "${JAVA}"; then > + AC_PATH_PROG(JAVA, "gij") > + fi > + if test -z "${JAVA}"; then > + AC_PATH_PROG(JAVA, "cacao") > + fi > + if test -z "${JAVA}"; then > + AC_MSG_ERROR("A 1.5-compatible Java VM is required.") > + fi > fi > - if test -z "${JAVA}"; then > - AC_PATH_PROG(JAVA, "java") > - fi > - if test -z "${JAVA}"; then > - AC_MSG_ERROR("A 1.5-compatible Java VM is required.") > - fi > - AC_MSG_RESULT(${JAVA}) > AC_SUBST(JAVA) > ]) > > @@ -360,55 +373,75 @@ AC_DEFUN([IT_CHECK_GCC_VERSION], > > AC_DEFUN([IT_FIND_JAVAH], > [ > - AC_MSG_CHECKING([for javah]) > + JAVAH_DEFAULT=${SYSTEM_JDK_DIR}/bin/javah > + AC_MSG_CHECKING([if a javah binary was specified]) > AC_ARG_WITH([javah], > [AS_HELP_STRING(--with-javah,specify location of the Java header generator)], > [ > - JAVAH="${withval}" > + if test "x${withval}" = "xyes"; then > + JAVAH=no > + else > + JAVAH="${withval}" > + fi > ], > [ > - JAVAH=${SYSTEM_JDK_DIR}/bin/javah > + JAVAH=no > ]) > - if ! test -f "${JAVAH}"; then > - AC_PATH_PROG(JAVAH, "${JAVAH}") > + AC_MSG_RESULT(${JAVAH}) > + if test "x${JAVAH}" = "xno"; then > + JAVAH=${JAVAH_DEFAULT} > fi > - if test -z "${JAVAH}"; then > - AC_PATH_PROG(JAVAH, "gjavah") > + AC_MSG_CHECKING([if $JAVAH is a valid executable]) > + if test -x "${JAVAH}"; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + JAVAH="" > + AC_PATH_PROG(JAVAH, "javah") > + if test -z "${JAVAH}"; then > + AC_PATH_PROG(JAVAH, "gjavah") > + fi > + if test -z "${JAVAH}"; then > + AC_MSG_ERROR("A Java header generator was not found.") > + fi > fi > - if test -z "${JAVAH}"; then > - AC_PATH_PROG(JAVAH, "javah") > - fi > - if test -z "${JAVAH}"; then > - AC_MSG_ERROR("A Java header generator was not found.") > - fi > - AC_MSG_RESULT(${JAVAH}) > AC_SUBST(JAVAH) > ]) > > AC_DEFUN([IT_FIND_JAR], > [ > - AC_MSG_CHECKING([for jar]) > + JAR_DEFAULT=${SYSTEM_JDK_DIR}/bin/jar > + AC_MSG_CHECKING([if a jar binary was specified]) > AC_ARG_WITH([jar], > [AS_HELP_STRING(--with-jar,specify location of Java archive tool (jar))], > [ > - JAR="${withval}" > + if test "x${withval}" = "xyes"; then > + JAR=no > + else > + JAR="${withval}" > + fi > ], > [ > - JAR=${SYSTEM_JDK_DIR}/bin/jar > + JAR=no > ]) > - if ! test -f "${JAR}"; then > - AC_PATH_PROG(JAR, "${JAR}") > + AC_MSG_RESULT(${JAR}) > + if test "x${JAR}" = "xno"; then > + JAR=${JAR_DEFAULT} > fi > - if test -z "${JAR}"; then > - AC_PATH_PROG(JAR, "gjar") > + AC_MSG_CHECKING([if $JAR is a valid executable]) > + if test -x "${JAR}"; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + JAR="" > + AC_PATH_PROG(JAR, "jar") > + if test -z "${JAR}"; then > + AC_PATH_PROG(JAR, "gjar") > + fi > + if test -z "${JAR}"; then > + AC_MSG_ERROR("No Java archive tool was found.") > + fi > fi > - if test -z "${JAR}"; then > - AC_PATH_PROG(JAR, "jar") > - fi > - if test -z "${JAR}"; then > - AC_MSG_ERROR("No Java archive tool was found.") > - fi > - AC_MSG_RESULT(${JAR}) > AC_MSG_CHECKING([whether jar supports @ argument]) > touch _config.txt > cat >_config.list < @@ -447,28 +480,38 @@ EOF > > AC_DEFUN([IT_FIND_RMIC], > [ > - AC_MSG_CHECKING(for rmic) > + RMIC_DEFAULT=${SYSTEM_JDK_DIR}/bin/rmic > + AC_MSG_CHECKING([if a rmic binary was specified]) > AC_ARG_WITH([rmic], > [AS_HELP_STRING(--with-rmic,specify location of the RMI compiler)], > [ > - RMIC="${withval}" > + if test "x${withval}" = "xyes"; then > + RMIC=no > + else > + RMIC="${withval}" > + fi > ], > [ > - RMIC=${SYSTEM_JDK_DIR}/bin/rmic > + RMIC=no > ]) > - if ! test -f "${RMIC}"; then > - AC_PATH_PROG(RMIC, "${RMIC}") > + AC_MSG_RESULT(${RMIC}) > + if test "x${RMIC}" = "xno"; then > + RMIC=${RMIC_DEFAULT} > fi > - if test -z "${RMIC}"; then > - AC_PATH_PROG(RMIC, "grmic") > + AC_MSG_CHECKING([if $RMIC is a valid executable]) > + if test -x "${RMIC}"; then > + AC_MSG_RESULT([yes]) > + else > + AC_MSG_RESULT([no]) > + RMIC="" > + AC_PATH_PROG(RMIC, "rmic") > + if test -z "${RMIC}"; then > + AC_PATH_PROG(RMIC, "grmic") > + fi > + if test -z "${RMIC}"; then > + AC_MSG_ERROR("An RMI compiler was not found.") > + fi > fi > - if test -z "${RMIC}"; then > - AC_PATH_PROG(RMIC, "rmic") > - fi > - if test -z "${RMIC}"; then > - AC_MSG_ERROR("An RMI compiler was not found.") > - fi > - AC_MSG_RESULT(${RMIC}) > AC_SUBST(RMIC) > ]) > > @@ -493,7 +536,9 @@ AC_DEFUN([IT_FIND_NATIVE2ASCII], > NATIVE2ASCII=${NATIVE2ASCII_DEFAULT} > fi > AC_MSG_CHECKING([if $NATIVE2ASCII is a valid executable]) > - if ! test -x "${NATIVE2ASCII}"; then > + if test -x "${NATIVE2ASCII}"; then > + AC_MSG_RESULT([yes]) > + else > AC_MSG_RESULT([no]) > NATIVE2ASCII="" > AC_PATH_PROG(NATIVE2ASCII, "native2ascii") > @@ -503,8 +548,6 @@ AC_DEFUN([IT_FIND_NATIVE2ASCII], > if test -z "${NATIVE2ASCII}"; then > AC_MSG_ERROR("A native2ascii converter was not found.") > fi > - else > - AC_MSG_RESULT([yes]) > fi > AC_SUBST([NATIVE2ASCII]) > ]) -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 11:29:57 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 23 Feb 2011 19:29:57 +0000 Subject: [Bug 600] HS19 upgrade broke CACAO build on ARM Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 xerxes at zafena.se changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | ------- Comment #4 from xerxes at zafena.se 2011-02-23 19:29 ------- >>>Recursively making java all @ Wed Feb 23 20:21:33 CET 2011 ... make[7]: Entering directory `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-jamvm/build/openjdk/jdk/make/java/main/java' make[7]: *** No rule to make target `../../../../src/solaris/bin/arm/jvm.cfg', needed by `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-jamvm/build/openjdk.build/lib/arm/jvm.cfg'. Stop. make[7]: Leaving directory `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-jamvm/build/openjdk/jdk/make/java/main/java' make[6]: *** [all] Error 1 make[5]: *** [all] Error 1make[6]: Leaving directory `/var/lib/buildbot/icedtea/icedtea6-natty-armv7l-quick-jamvm/build/openjdk/jdk/make/java/main' This bug hits --enable-jamvm JamVM builds on ARM as well. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ahughes at redhat.com Wed Feb 23 11:41:17 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 19:41:17 +0000 Subject: RFC: Always apply PR600 patch Message-ID: <20110223194117.GE24648@rivendell.middle-earth.co.uk> As discussed on IRC: gnu_andrew: is there a easy way to apply the patches/cacao/arm-jvm.cfg-pr600.patch for both CACAO and JAMVM builds? is it possible to write in Makefile.am if CACAO_BUILD || JAMVM_BUILD \ ICEDTEA_PATCHES += \ atches/cacao/arm-jvm.cfg-pr600.patch ? the easiest way are to unconditionally apply the patch for all builds xranby-home, yeah I was just thinking that xranby-home, but will it hurt zero builds? or shark? no zero and shark jave its jvm.cfg in the zero dir have so i think they will be fine xranby-home, then I see no problem just applying it always xranby-home, and gets more testing then anyway gnu_andrew: im not in a possition to commit any patches since i am 30kilometers from my commit keys ;) but i can review a patch if you make one xranby-home, haha ok hang on Moving the PR600 patch to the main set of IcedTea patches allows the patch to cover both JamVM and CACAO, and also means it's application is tested by everyone's builds. ChangeLog: 2011-02-23 Andrew John Hughes * Makefile.am: Move PR600 patch to main patch set (so it is always applied) to cover both JamVM and CACAO. Ok Xerces? -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -------------- next part -------------- diff -r a597500577ef Makefile.am --- a/Makefile.am Wed Feb 23 18:38:54 2011 +0000 +++ b/Makefile.am Wed Feb 23 19:38:50 2011 +0000 @@ -324,7 +324,8 @@ patches/jtreg-LastErrorString.patch \ patches/openjdk/6663040-com.sun.awt.patch \ patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ - patches/openjdk/6766342-AA-simple-shape-performance.patch + patches/openjdk/6766342-AA-simple-shape-performance.patch \ + patches/cacao/arm-jvm.cfg-pr600.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ @@ -343,8 +344,7 @@ patches/cacao/launcher.patch \ patches/cacao/arm-arch-defines.patch \ patches/cacao/jsig.patch \ - patches/cacao/memory.patch \ - patches/cacao/arm-jvm.cfg-pr600.patch + patches/cacao/memory.patch endif if ENABLE_CACAO From xerxes at zafena.se Wed Feb 23 12:04:03 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Wed, 23 Feb 2011 21:04:03 +0100 Subject: RFC: Always apply PR600 patch In-Reply-To: <20110223194117.GE24648@rivendell.middle-earth.co.uk> References: <20110223194117.GE24648@rivendell.middle-earth.co.uk> Message-ID: <4D656833.5070200@zafena.se> On 2011-02-23 20:41, Dr Andrew John Hughes wrote: > As discussed on IRC: > > gnu_andrew: is there a easy way to apply the patches/cacao/arm-jvm.cfg-pr600.patch for both CACAO and JAMVM builds? > is it possible to write in Makefile.am if CACAO_BUILD || JAMVM_BUILD \ ICEDTEA_PATCHES += \ atches/cacao/arm-jvm.cfg-pr600.patch > ? > the easiest way are to unconditionally apply the patch for all builds > xranby-home, yeah I was just thinking that > xranby-home, but will it hurt zero builds? > or shark? > no zero and shark jave its jvm.cfg in the zero dir > have > so i think they will be fine > xranby-home, then I see no problem just applying it always > xranby-home, and gets more testing then anyway > gnu_andrew: im not in a possition to commit any patches since i am 30kilometers from my commit keys ;) > but i can review a patch if you make one > xranby-home, haha ok hang on > > Moving the PR600 patch to the main set of IcedTea patches allows the patch to cover both JamVM and CACAO, > and also means it's application is tested by everyone's builds. > > ChangeLog: > > 2011-02-23 Andrew John Hughes > > * Makefile.am: > Move PR600 patch to main patch set (so it > is always applied) to cover both JamVM and > CACAO. > > Ok Xerces? It would be nice to move the arm-jvm.cfg-pr600.patch itself from the patch/cacao to the patch directory. Apart from that, the patch looks fine to me. Thanks for changing this! +1 In the future we will hit this bug again for mips and s390 when using --enable-cacao or --enable-jamvm . The architectures that currently are immune to this bug are amd64 i586 sparc zero ia64 sparcv9 since they got a jvm.cfg preinstalled in the openjdk/jdk/src/solaris/bin directory. Cheers Xerxes From andrew at icedtea.classpath.org Wed Feb 23 12:07:41 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 20:07:41 +0000 Subject: /hg/icedtea6: PR600: Always apply the PR600 ARM jvm.cfg patch to... Message-ID: changeset 5357369e2385 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=5357369e2385 author: Andrew John Hughes date: Wed Feb 23 20:07:35 2011 +0000 PR600: Always apply the PR600 ARM jvm.cfg patch to cover JamVM + CACAO. 2011-02-23 Andrew John Hughes * patches/cacao/arm-jvm.cfg-pr600.patch: Moved... * Makefile.am: Move PR600 patch to main patch set (so it is always applied) to cover both JamVM and CACAO. * patches/pr600-arm-jvm.cfg.patch: to here. diffstat: 4 files changed, 57 insertions(+), 47 deletions(-) ChangeLog | 10 +++++++ Makefile.am | 6 ++-- patches/cacao/arm-jvm.cfg-pr600.patch | 44 --------------------------------- patches/pr600-arm-jvm.cfg.patch | 44 +++++++++++++++++++++++++++++++++ diffs (136 lines): diff -r a597500577ef -r 5357369e2385 ChangeLog --- a/ChangeLog Wed Feb 23 18:38:54 2011 +0000 +++ b/ChangeLog Wed Feb 23 20:07:35 2011 +0000 @@ -1,3 +1,13 @@ 2011-02-23 Andrew John Hughes + + * patches/cacao/arm-jvm.cfg-pr600.patch: + Moved... + * Makefile.am: + Move PR600 patch to main patch set (so it + is always applied) to cover both JamVM and + CACAO. + * patches/pr600-arm-jvm.cfg.patch: to here. + 2011-02-23 Andrew John Hughes * acinclude.m4: diff -r a597500577ef -r 5357369e2385 Makefile.am --- a/Makefile.am Wed Feb 23 18:38:54 2011 +0000 +++ b/Makefile.am Wed Feb 23 20:07:35 2011 +0000 @@ -324,7 +324,8 @@ ICEDTEA_PATCHES = \ patches/jtreg-LastErrorString.patch \ patches/openjdk/6663040-com.sun.awt.patch \ patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ - patches/openjdk/6766342-AA-simple-shape-performance.patch + patches/openjdk/6766342-AA-simple-shape-performance.patch \ + patches/pr600-arm-jvm.cfg.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ @@ -343,8 +344,7 @@ ICEDTEA_PATCHES += \ patches/cacao/launcher.patch \ patches/cacao/arm-arch-defines.patch \ patches/cacao/jsig.patch \ - patches/cacao/memory.patch \ - patches/cacao/arm-jvm.cfg-pr600.patch + patches/cacao/memory.patch endif if ENABLE_CACAO diff -r a597500577ef -r 5357369e2385 patches/cacao/arm-jvm.cfg-pr600.patch --- a/patches/cacao/arm-jvm.cfg-pr600.patch Wed Feb 23 18:38:54 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,44 +0,0 @@ -Index: openjdk/jdk/src/solaris/bin/arm/jvm.cfg -=================================================================== ---- /dev/null 1970-01-01 00:00:00.000000000 +0000 -+++ openjdk/jdk/src/solaris/bin/arm/jvm.cfg 2011-02-18 15:40:24.083043645 +0100 -@@ -0,0 +1,39 @@ -+# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. -+# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. -+# -+# This code is free software; you can redistribute it and/or modify it -+# under the terms of the GNU General Public License version 2 only, as -+# published by the Free Software Foundation. Oracle designates this -+# particular file as subject to the "Classpath" exception as provided -+# by Oracle in the LICENSE file that accompanied this code. -+# -+# This code is distributed in the hope that it will be useful, but WITHOUT -+# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or -+# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License -+# version 2 for more details (a copy is included in the LICENSE file that -+# accompanied this code). -+# -+# You should have received a copy of the GNU General Public License version -+# 2 along with this work; if not, write to the Free Software Foundation, -+# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. -+# -+# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA -+# or visit www.oracle.com if you need additional information or have any -+# questions. -+# -+# -+# List of JVMs that can be used as an option to java, javac, etc. -+# Order is important -- first in this list is the default JVM. -+# NOTE that this both this file and its format are UNSUPPORTED and -+# WILL GO AWAY in a future release. -+# -+# You may also select a JVM in an arbitrary location with the -+# "-XXaltjvm=" option, but that too is unsupported -+# and may not be available in a future release. -+# -+-server KNOWN -+-client IGNORE -+-hotspot ERROR -+-classic WARN -+-native ERROR -+-green ERROR diff -r a597500577ef -r 5357369e2385 patches/pr600-arm-jvm.cfg.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/pr600-arm-jvm.cfg.patch Wed Feb 23 20:07:35 2011 +0000 @@ -0,0 +1,44 @@ +Index: openjdk/jdk/src/solaris/bin/arm/jvm.cfg +=================================================================== +--- /dev/null 1970-01-01 00:00:00.000000000 +0000 ++++ openjdk/jdk/src/solaris/bin/arm/jvm.cfg 2011-02-18 15:40:24.083043645 +0100 +@@ -0,0 +1,39 @@ ++# Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. ++# DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++# ++# This code is free software; you can redistribute it and/or modify it ++# under the terms of the GNU General Public License version 2 only, as ++# published by the Free Software Foundation. Oracle designates this ++# particular file as subject to the "Classpath" exception as provided ++# by Oracle in the LICENSE file that accompanied this code. ++# ++# This code is distributed in the hope that it will be useful, but WITHOUT ++# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++# FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++# version 2 for more details (a copy is included in the LICENSE file that ++# accompanied this code). ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++# ++# Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++# or visit www.oracle.com if you need additional information or have any ++# questions. ++# ++# ++# List of JVMs that can be used as an option to java, javac, etc. ++# Order is important -- first in this list is the default JVM. ++# NOTE that this both this file and its format are UNSUPPORTED and ++# WILL GO AWAY in a future release. ++# ++# You may also select a JVM in an arbitrary location with the ++# "-XXaltjvm=" option, but that too is unsupported ++# and may not be available in a future release. ++# ++-server KNOWN ++-client IGNORE ++-hotspot ERROR ++-classic WARN ++-native ERROR ++-green ERROR From dlila at redhat.com Wed Feb 23 12:14:07 2011 From: dlila at redhat.com (Denis Lila) Date: Wed, 23 Feb 2011 15:14:07 -0500 (EST) Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <4D6523B6.3050206@redhat.com> Message-ID: <529548900.551107.1298492047767.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > It might be a good idea to update the copyright (Sun -> Oracle). Done. Also, I noticed that the old patches I posted were bad because they were against some very old clones of the release branches. I fixed that. Ok to push now? Thanks, Denis. ----- Original Message ----- > On 02/23/2011 08:49 AM, Dr Andrew John Hughes wrote: > > On 18:36 Tue 22 Feb , Denis Lila wrote: > >> Hi. > >> > >> I would like to backport these changesets: > >> http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/dd66920b2d51 > >> http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/40414219305f > >> > >> to 1.7, 1.8, 1.9. > >> > >> Ok to push? > >> > >> Thank you, > >> Denis. > > > > Approved. > > > > > Cheers, > Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: hgexport1.7.patch Type: text/x-patch Size: 12699 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/e69af289/hgexport1.7.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: hgexport1.8.patch Type: text/x-patch Size: 13259 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/e69af289/hgexport1.8.patch -------------- next part -------------- A non-text attachment was scrubbed... Name: hgexport1.9.patch Type: text/x-patch Size: 11172 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/e69af289/hgexport1.9.patch From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 12:33:59 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Wed, 23 Feb 2011 20:33:59 +0000 Subject: [Bug 600] HS19 upgrade broke CACAO + JamVM build on ARM Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=600 xerxes at zafena.se changed: What |Removed |Added ---------------------------------------------------------------------------- Status|REOPENED |RESOLVED Resolution| |FIXED Summary|HS19 upgrade broke CACAO |HS19 upgrade broke CACAO + |build on ARM |JamVM build on ARM Target Milestone|--- |6-1.10 ------- Comment #5 from xerxes at zafena.se 2011-02-23 20:33 ------- Fixed for both --enable-cacao CACAO and --enable-jamvm JamVM builds on ARM in http://icedtea.classpath.org/hg/icedtea6/rev/5357369e2385 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Wed Feb 23 12:40:51 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 20:40:51 +0000 Subject: /hg/icedtea6: 3 new changesets Message-ID: changeset ef85acf6d959 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ef85acf6d959 author: Andrew John Hughes date: Wed Feb 23 20:25:24 2011 +0000 Check existence of source zips during configure. 2011-02-23 Andrew John Hughes * acinclude.m4: (IT_CHECK_WITH_CACAO_SRC_ZIP): Check zip exists and is a regular file. Use a single AM_CONDITIONAL. (IT_WITH_OPENJDK_SRC_ZIP): Likewise. (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. (IT_WITH_JAXP_DROP_ZIP): Likewise. (IT_WITH_JAF_DROP_ZIP): Likewise. (IT_WITH_JAXWS_DROP_ZIP): Likewise. changeset 3ab8ffa7e1c0 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=3ab8ffa7e1c0 author: Andrew John Hughes date: Wed Feb 23 20:32:30 2011 +0000 Treat --without-x-src-zip as equivalent to not specifying the option. 2011-02-23 Andrew John Hughes * acinclude.m4: (IT_CHECK_WITH_CACAO_SRC_ZIP): Treat --without option as equivalent to unspecified. (IT_CHECK_WITH_JAMVM_SRC_ZIP): Likewise. (IT_WITH_OPENJDK_SRC_ZIP): Likewise. (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. (IT_WITH_JAXP_DROP_ZIP): Likewise. (IT_WITH_JAF_DROP_ZIP): Likewise. (IT_WITH_JAXWS_DROP_ZIP): Likewise. changeset fcde34790552 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=fcde34790552 author: Andrew John Hughes date: Wed Feb 23 20:39:53 2011 +0000 Remove superfluous use of CHECK in macro naming. 2011-02-23 Andrew John Hughes * acinclude.m4: (IT_ENABLE_JAMVM): Renamed from IT_CHECK_ENABLE_JAMVM. (IT_WITH_JAMVM_SRC_ZIP): Renamed form IT_CHECK_WITH_JAMVM_SRC_ZIP. (IT_ENABLE_CACAO): Renamed from IT_CHECK_ENABLE_CACAO. (IT_WITH_CACAO_HOME): Renamed form IT_CHECK_WITH_CACAO_HOME. (IT_WITH_CACAO_SRC_ZIP): Renamed form IT_CHECK_WITH_CACAO_SRC_ZIP. (IT_WITH_CACAO_SRC_DIR): Renamed form IT_CHECK_WITH_CACAO_SRC_DIR. (IT_WITH_GCJ): Renamed from IT_CHECK_WITH_GCJ. (IT_WITH_HOTSPOT_BUILD): Renamed from IT_CHECK_WITH_HOTSPOT_BUILD. (IT_WITH_HG_REVISION): Renamed from IT_CHECK_WITH_HG_REVISION. (IT_WITH_TZDATA_DIR): Renamed from IT_CHECK_WITH_TZDATA_DIR. diffstat: 3 files changed, 100 insertions(+), 37 deletions(-) ChangeLog | 37 ++++++++++++++++++++++++++ acinclude.m4 | 80 ++++++++++++++++++++++++++++++++++++++-------------------- configure.ac | 20 +++++++------- diffs (322 lines): diff -r 5357369e2385 -r fcde34790552 ChangeLog --- a/ChangeLog Wed Feb 23 20:07:35 2011 +0000 +++ b/ChangeLog Wed Feb 23 20:39:53 2011 +0000 @@ -1,3 +1,40 @@ 2011-02-23 Andrew John Hughes + + * acinclude.m4: + (IT_ENABLE_JAMVM): Renamed from IT_CHECK_ENABLE_JAMVM. + (IT_WITH_JAMVM_SRC_ZIP): Renamed form IT_CHECK_WITH_JAMVM_SRC_ZIP. + (IT_ENABLE_CACAO): Renamed from IT_CHECK_ENABLE_CACAO. + (IT_WITH_CACAO_HOME): Renamed form IT_CHECK_WITH_CACAO_HOME. + (IT_WITH_CACAO_SRC_ZIP): Renamed form IT_CHECK_WITH_CACAO_SRC_ZIP. + (IT_WITH_CACAO_SRC_DIR): Renamed form IT_CHECK_WITH_CACAO_SRC_DIR. + (IT_WITH_GCJ): Renamed from IT_CHECK_WITH_GCJ. + (IT_WITH_HOTSPOT_BUILD): Renamed from IT_CHECK_WITH_HOTSPOT_BUILD. + (IT_WITH_HG_REVISION): Renamed from IT_CHECK_WITH_HG_REVISION. + (IT_WITH_TZDATA_DIR): Renamed from IT_CHECK_WITH_TZDATA_DIR. + +2011-02-23 Andrew John Hughes + + * acinclude.m4: + (IT_CHECK_WITH_CACAO_SRC_ZIP): Treat + --without option as equivalent to unspecified. + (IT_CHECK_WITH_JAMVM_SRC_ZIP): Likewise. + (IT_WITH_OPENJDK_SRC_ZIP): Likewise. + (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. + (IT_WITH_JAXP_DROP_ZIP): Likewise. + (IT_WITH_JAF_DROP_ZIP): Likewise. + (IT_WITH_JAXWS_DROP_ZIP): Likewise. + +2011-02-23 Andrew John Hughes + + * acinclude.m4: + (IT_CHECK_WITH_CACAO_SRC_ZIP): Check zip exists + and is a regular file. Use a single AM_CONDITIONAL. + (IT_WITH_OPENJDK_SRC_ZIP): Likewise. + (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. + (IT_WITH_JAXP_DROP_ZIP): Likewise. + (IT_WITH_JAF_DROP_ZIP): Likewise. + (IT_WITH_JAXWS_DROP_ZIP): Likewise. + 2011-02-23 Andrew John Hughes * patches/cacao/arm-jvm.cfg-pr600.patch: diff -r 5357369e2385 -r fcde34790552 acinclude.m4 --- a/acinclude.m4 Wed Feb 23 20:07:35 2011 +0000 +++ b/acinclude.m4 Wed Feb 23 20:39:53 2011 +0000 @@ -599,12 +599,16 @@ AC_DEFUN([IT_WITH_OPENJDK_SRC_ZIP], [AS_HELP_STRING(--with-openjdk-src-zip,specify the location of the openjdk source zip)], [ ALT_OPENJDK_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test x = x) + if test "x${ALT_OPENJDK_SRC_ZIP}" = "xno"; then + ALT_OPENJDK_SRC_ZIP="not specified" + elif ! test -f ${ALT_OPENJDK_SRC_ZIP} ; then + AC_MSG_ERROR([Invalid OpenJDK source zip specified: ${ALT_OPENJDK_SRC_ZIP}]) + fi ], [ ALT_OPENJDK_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test x != x) ]) + AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test "x{ALT_OPENJDK_SRC_ZIP}" = "xnot specified") AC_MSG_RESULT(${ALT_OPENJDK_SRC_ZIP}) AC_SUBST(ALT_OPENJDK_SRC_ZIP) ]) @@ -901,7 +905,7 @@ AC_DEFUN([IT_SET_SHARK_BUILD], AM_CONDITIONAL(SHARK_BUILD, test "x${use_shark}" = xyes) ]) -AC_DEFUN([IT_CHECK_ENABLE_JAMVM], +AC_DEFUN([IT_ENABLE_JAMVM], [ AC_MSG_CHECKING(whether to use JamVM as VM) AC_ARG_ENABLE([jamvm], @@ -918,14 +922,16 @@ AC_DEFUN([IT_CHECK_ENABLE_JAMVM], AC_SUBST(ENABLE_JAMVM) ]) -AC_DEFUN([IT_CHECK_WITH_JAMVM_SRC_ZIP], +AC_DEFUN([IT_WITH_JAMVM_SRC_ZIP], [ AC_MSG_CHECKING([for a JamVM source zip]) AC_ARG_WITH([jamvm-src-zip], [AS_HELP_STRING(--with-jamvm-src-zip,specify the location of the JamVM source zip)], [ ALT_JAMVM_SRC_ZIP=${withval} - if ! test -f ${ALT_JAMVM_SRC_ZIP} ; then + if test "x${ALT_JAMVM_SRC_ZIP}" = "xno"; then + ALT_JAMVM_SRC_ZIP="not specified" + elif ! test -f ${ALT_JAMVM_SRC_ZIP} ; then AC_MSG_ERROR([Invalid JamVM source zip specified: ${ALT_JAMVM_SRC_ZIP}]) fi ], @@ -937,7 +943,7 @@ AC_DEFUN([IT_CHECK_WITH_JAMVM_SRC_ZIP], AC_SUBST(ALT_JAMVM_SRC_ZIP) ]) -AC_DEFUN([IT_CHECK_ENABLE_CACAO], +AC_DEFUN([IT_ENABLE_CACAO], [ AC_MSG_CHECKING(whether to use CACAO as VM) AC_ARG_ENABLE([cacao], @@ -954,7 +960,7 @@ AC_DEFUN([IT_CHECK_ENABLE_CACAO], AC_SUBST(ENABLE_CACAO) ]) -AC_DEFUN([IT_CHECK_WITH_CACAO_HOME], +AC_DEFUN([IT_WITH_CACAO_HOME], [ AC_MSG_CHECKING([for a CACAO home directory]) AC_ARG_WITH([cacao-home], @@ -979,24 +985,28 @@ AC_DEFUN([IT_CHECK_WITH_CACAO_HOME], AC_SUBST(CACAO_IMPORT_PATH) ]) -AC_DEFUN([IT_CHECK_WITH_CACAO_SRC_ZIP], +AC_DEFUN([IT_WITH_CACAO_SRC_ZIP], [ AC_MSG_CHECKING([for a CACAO source zip]) AC_ARG_WITH([cacao-src-zip], [AS_HELP_STRING(--with-cacao-src-zip,specify the location of the CACAO source zip)], [ ALT_CACAO_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test x = x) + if test "x${ALT_CACAO_SRC_ZIP}" = "xno"; then + ALT_CACAO_SRC_ZIP="not specified" + elif ! test -f ${ALT_CACAO_SRC_ZIP} ; then + AC_MSG_ERROR([Invalid CACAO source zip specified: ${ALT_CACAO_SRC_ZIP}]) + fi ], [ ALT_CACAO_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test x != x) ]) + AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x{ALT_CACAO_SRC_ZIP}" = "xnot specified") AC_MSG_RESULT(${ALT_CACAO_SRC_ZIP}) AC_SUBST(ALT_CACAO_SRC_ZIP) ]) -AC_DEFUN([IT_CHECK_WITH_CACAO_SRC_DIR], +AC_DEFUN([IT_WITH_CACAO_SRC_DIR], [ AC_MSG_CHECKING([for a CACAO source directory]) AC_ARG_WITH([cacao-src-dir], @@ -1013,7 +1023,7 @@ AC_DEFUN([IT_CHECK_WITH_CACAO_SRC_DIR], AC_SUBST(ALT_CACAO_SRC_DIR) ]) -AC_DEFUN([IT_CHECK_WITH_GCJ], +AC_DEFUN([IT_WITH_GCJ], [ AC_MSG_CHECKING([whether to compile ecj natively]) AC_ARG_WITH([gcj], @@ -1031,7 +1041,7 @@ AC_DEFUN([IT_CHECK_WITH_GCJ], AC_SUBST([GCJ]) ]) -AC_DEFUN([IT_CHECK_WITH_HOTSPOT_BUILD], +AC_DEFUN([IT_WITH_HOTSPOT_BUILD], [ ORIGINAL_BUILD="original" ALTERNATE_BUILD="hs20" @@ -1057,68 +1067,84 @@ AC_DEFUN([IT_CHECK_WITH_HOTSPOT_BUILD], AC_DEFUN([IT_WITH_HOTSPOT_SRC_ZIP], [ - AC_MSG_CHECKING(for a HotSpot source zip) + AC_MSG_CHECKING([for a HotSpot source zip]) AC_ARG_WITH([hotspot-src-zip], [AS_HELP_STRING(--with-hotspot-src-zip,specify the location of the hotspot source zip)], [ ALT_HOTSPOT_SRC_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test x = x) + if test "x${ALT_HOTSPOT_SRC_ZIP}" = "xno"; then + ALT_HOTSPOT_SRC_ZIP="not specified" + elif ! test -f ${ALT_HOTSPOT_SRC_ZIP} ; then + AC_MSG_ERROR([Invalid HotSpot source zip specified: ${ALT_HOTSPOT_SRC_ZIP}]) + fi ], [ ALT_HOTSPOT_SRC_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test x != x) ]) + AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test "x{ALT_HOTSPOT_SRC_ZIP}" = "xnot specified") AC_MSG_RESULT(${ALT_HOTSPOT_SRC_ZIP}) AC_SUBST(ALT_HOTSPOT_SRC_ZIP) ]) AC_DEFUN([IT_WITH_JAXP_DROP_ZIP], [ - AC_MSG_CHECKING(for a JAXP drop zip) + AC_MSG_CHECKING([for a JAXP drop zip]) AC_ARG_WITH([jaxp-drop-zip], [AS_HELP_STRING(--with-jaxp-drop-zip,specify the location of the JAXP drop zip)], [ ALT_JAXP_DROP_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_JAXP_DROP_ZIP, test x = x) + if test "x${ALT_JAXP_DROP_ZIP}" = "xno"; then + ALT_JAXP_DROP_ZIP="not specified" + elif ! test -f ${ALT_JAXP_DROP_ZIP} ; then + AC_MSG_ERROR([Invalid JAXP drop zip specified: ${ALT_JAXP_DROP_ZIP}]) + fi ], [ ALT_JAXP_DROP_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_JAXP_DROP_ZIP, test x != x) ]) + AM_CONDITIONAL(USE_ALT_JAXP_DROP_ZIP, test "x{ALT_JAXP_DROP_ZIP}" = "xnot specified") AC_MSG_RESULT(${ALT_JAXP_DROP_ZIP}) AC_SUBST(ALT_JAXP_DROP_ZIP) ]) AC_DEFUN([IT_WITH_JAF_DROP_ZIP], [ - AC_MSG_CHECKING(for a JAF drop zip) + AC_MSG_CHECKING([for a JAF drop zip]) AC_ARG_WITH([jaf-drop-zip], [AS_HELP_STRING(--with-jaf-drop-zip,specify the location of the JAF drop zip)], [ ALT_JAF_DROP_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_JAF_DROP_ZIP, test x = x) + if test "x${ALT_JAF_DROP_ZIP}" = "xno"; then + ALT_JAF_DROP_ZIP="not specified" + elif ! test -f ${ALT_JAF_DROP_ZIP} ; then + AC_MSG_ERROR([Invalid JAF drop zip specified: ${ALT_JAF_DROP_ZIP}]) + fi ], [ ALT_JAF_DROP_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_JAF_DROP_ZIP, test x != x) ]) + AM_CONDITIONAL(USE_ALT_JAF_DROP_ZIP, test "x{ALT_JAF_DROP_ZIP}" = "xnot specified") AC_MSG_RESULT(${ALT_JAF_DROP_ZIP}) AC_SUBST(ALT_JAF_DROP_ZIP) ]) AC_DEFUN([IT_WITH_JAXWS_DROP_ZIP], [ - AC_MSG_CHECKING(for a JAXWS drop zip) + AC_MSG_CHECKING([for a JAXWS drop zip]) AC_ARG_WITH([jaxws-drop-zip], [AS_HELP_STRING(--with-jaxws-drop-zip,specify the location of the JAXWS drop zip)], [ ALT_JAXWS_DROP_ZIP=${withval} - AM_CONDITIONAL(USE_ALT_JAXWS_DROP_ZIP, test x = x) + if test "x${ALT_JAXWS_DROP_ZIP}" = "xno"; then + ALT_JAXWS_DROP_ZIP="not specified" + elif ! test -f ${ALT_JAXWS_DROP_ZIP} ; then + AC_MSG_ERROR([Invalid JAXWS drop zip specified: ${ALT_JAXWS_DROP_ZIP}]) + fi ], [ ALT_JAXWS_DROP_ZIP="not specified" - AM_CONDITIONAL(USE_ALT_JAXWS_DROP_ZIP, test x != x) ]) + AM_CONDITIONAL(USE_ALT_JAXWS_DROP_ZIP, test "x{ALT_JAXWS_DROP_ZIP}" = "xnot specified") AC_MSG_RESULT(${ALT_JAXWS_DROP_ZIP}) AC_SUBST(ALT_JAXWS_DROP_ZIP) ]) @@ -1145,7 +1171,7 @@ AC_DEFUN([IT_ENABLE_HG], AM_CONDITIONAL([USE_HG], test x"${enable_hg}" = "xyes") ]) -AC_DEFUN([IT_CHECK_WITH_HG_REVISION], +AC_DEFUN([IT_WITH_HG_REVISION], [ AC_MSG_CHECKING([which Mercurial revision to use]) AC_ARG_WITH([hg-revision], @@ -1225,7 +1251,7 @@ AC_DEFUN([IT_CHECK_FOR_JDK], AC_SUBST(SYSTEM_JDK_DIR) ]) -AC_DEFUN([IT_CHECK_WITH_TZDATA_DIR], +AC_DEFUN([IT_WITH_TZDATA_DIR], [ DEFAULT="/usr/share/javazi" AC_MSG_CHECKING([which Java timezone data directory to use]) diff -r 5357369e2385 -r fcde34790552 configure.ac --- a/configure.ac Wed Feb 23 20:07:35 2011 +0000 +++ b/configure.ac Wed Feb 23 20:39:53 2011 +0000 @@ -44,8 +44,8 @@ IT_CHECK_FOR_MERCURIAL IT_CHECK_FOR_MERCURIAL IT_OBTAIN_HG_REVISIONS AC_PATH_TOOL([LSB_RELEASE],[lsb_release]) -IT_CHECK_WITH_GCJ -IT_CHECK_WITH_HOTSPOT_BUILD +IT_WITH_GCJ +IT_WITH_HOTSPOT_BUILD AC_PATH_TOOL([LINUX32],[linux32]) IT_CHECK_GCC_VERSION IT_CHECK_NUMBER_OF_PARALLEL_JOBS @@ -171,21 +171,21 @@ IT_WITH_JAF_DROP_ZIP IT_WITH_JAF_DROP_ZIP IT_WITH_JAXWS_DROP_ZIP -IT_CHECK_ENABLE_CACAO -IT_CHECK_WITH_CACAO_HOME -IT_CHECK_WITH_CACAO_SRC_ZIP -IT_CHECK_WITH_CACAO_SRC_DIR +IT_ENABLE_CACAO +IT_WITH_CACAO_HOME +IT_WITH_CACAO_SRC_ZIP +IT_WITH_CACAO_SRC_DIR -IT_CHECK_ENABLE_JAMVM -IT_CHECK_WITH_JAMVM_SRC_ZIP +IT_ENABLE_JAMVM +IT_WITH_JAMVM_SRC_ZIP IT_DISABLE_OPTIMIZATIONS IT_SET_SHARK_BUILD IT_ENABLE_ZERO_BUILD IT_CHECK_ADDITIONAL_VMS IT_ENABLE_HG -IT_CHECK_WITH_HG_REVISION -IT_CHECK_WITH_TZDATA_DIR +IT_WITH_HG_REVISION +IT_WITH_TZDATA_DIR IT_GETDTDTYPE_CHECK IT_JAVAH From ahughes at redhat.com Wed Feb 23 12:44:04 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 20:44:04 +0000 Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <529548900.551107.1298492047767.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <4D6523B6.3050206@redhat.com> <529548900.551107.1298492047767.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110223204404.GF24648@rivendell.middle-earth.co.uk> On 15:14 Wed 23 Feb , Denis Lila wrote: > > It might be a good idea to update the copyright (Sun -> Oracle). > > Done. Ugh, I hate that stuff. But Omair's right. Thanks for doing it. > Also, I noticed that the old patches I posted were bad because > they were against some very old clones of the release branches. > I fixed that. > > Ok to push now? > Assuming all three build with the patch, yes. > Thanks, > Denis. > > ----- Original Message ----- > > On 02/23/2011 08:49 AM, Dr Andrew John Hughes wrote: > > > On 18:36 Tue 22 Feb , Denis Lila wrote: > > >> Hi. > > >> > > >> I would like to backport these changesets: > > >> http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/dd66920b2d51 > > >> http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/40414219305f > > >> > > >> to 1.7, 1.8, 1.9. > > >> > > >> Ok to push? > > >> > > >> Thank you, > > >> Denis. > > > > > > Approved. > > > > > > > > > > Cheers, > > Omair > exporting patch: > # HG changeset patch > # User Denis Lila > # Date 1298487624 18000 > # Node ID d780d2efc83003834055684ed4ac9c9811c76098 > # Parent 6a127ad66978e81129092004d4c6c6a125c1e1ee > Fix for security exceptions when JPopupMenu sets always on top. > > diff -r 6a127ad66978 -r d780d2efc830 ChangeLog > --- a/ChangeLog Tue Feb 15 23:04:22 2011 +0000 > +++ b/ChangeLog Wed Feb 23 14:00:24 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-23 Denis Lila > + > + * Makefile.am: Added patches. > + * NEWS: Updated. > + * patches/openjdk/6675802-securityExceptions-applets.patch: > + Get permissions before setting always on top. > + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: > + Remove the fix above. Do nothing if SecurityException is thrown. > + > 2011-02-15 Andrew John Hughes > > * NEWS: Add 1.7.11 section. > diff -r 6a127ad66978 -r d780d2efc830 Makefile.am > --- a/Makefile.am Tue Feb 15 23:04:22 2011 +0000 > +++ b/Makefile.am Wed Feb 23 14:00:24 2011 -0500 > @@ -393,7 +393,9 @@ > patches/openjdk/6541476-png-iTXt-chunk.patch \ > patches/openjdk/6782079-png_metadata_oom.patch \ > patches/rh676659-gcc-export-dynamic.patch \ > - patches/latent_jaxp_bug.patch > + patches/latent_jaxp_bug.patch \ > + patches/openjdk/6675802-securityExceptions-applets.patch \ > + patches/openjdk/6691503-malicious-applet-always-on-top.patch > > if WITH_ALT_HSBUILD > ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ > diff -r 6a127ad66978 -r d780d2efc830 NEWS > --- a/NEWS Tue Feb 15 23:04:22 2011 +0000 > +++ b/NEWS Wed Feb 23 14:00:24 2011 -0500 > @@ -10,6 +10,10 @@ > > New in release 1.7.11 (20XX-XX-XX): > > +* Backports > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > + > New in release 1.7.10 (2011-02-15): > > * Security updates > diff -r 6a127ad66978 -r d780d2efc830 patches/openjdk/6675802-securityExceptions-applets.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Wed Feb 23 14:00:24 2011 -0500 > @@ -0,0 +1,75 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208528462 -14400 > +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +# Parent 147803acf437b81e72e50236030f2bc9ac37caee > +6675802: Regression: heavyweight popups cause SecurityExceptions in applets > +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() > +Reviewed-by: alexp > + > +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -229,7 +229,14 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- setAlwaysOnTop(true); > ++ java.security.AccessController.doPrivileged( > ++ new java.security.PrivilegedAction() { > ++ public Object run() { > ++ setAlwaysOnTop(true); > ++ return null; > ++ } > ++ } > ++ ); > + } > + > + public void update(Graphics g) { > +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -0,0 +1,43 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6675802 > ++ * @summary Checks that there is no AccessControlException when > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6675802 > ++ */ > ++ > ++import javax.swing.*; > ++ > ++public class bug6675802 { > ++ public static void main(String[] args) { > ++ System.setSecurityManager(new SecurityManager()); > ++ final JPopupMenu popupMenu = new JPopupMenu(); > ++ popupMenu.add(new JMenuItem("Click")); > ++ popupMenu.show(null, 0, 0); > ++ System.out.println("Test passed"); > ++ } > ++} > diff -r 6a127ad66978 -r d780d2efc830 patches/openjdk/6691503-malicious-applet-always-on-top.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:00:24 2011 -0500 > @@ -0,0 +1,173 @@ > +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 > +@@ -1,12 +1,12 @@ > + /* > +- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. > ++ * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > + * under the terms of the GNU General Public License version 2 only, as > +- * published by the Free Software Foundation. Sun designates this > ++ * published by the Free Software Foundation. Oracle designates this > + * particular file as subject to the "Classpath" exception as provided > +- * by Sun in the LICENSE file that accompanied this code. > ++ * by Oracle in the LICENSE file that accompanied this code. > + * > + * This code is distributed in the hope that it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > +@@ -18,9 +18,9 @@ > + * 2 along with this work; if not, write to the Free Software Foundation, > + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > + * > +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > +- * CA 95054 USA or visit www.sun.com if you need additional information or > +- * have any questions. > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > + */ > + > + package javax.swing; > +@@ -229,14 +229,15 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- java.security.AccessController.doPrivileged( > +- new java.security.PrivilegedAction() { > +- public Object run() { > +- setAlwaysOnTop(true); > +- return null; > +- } > +- } > +- ); > ++ // Try to set "always-on-top" for the popup window. > ++ // Applets usually don't have sufficient permissions to do it. > ++ // In this case simply ignore the exception. > ++ try { > ++ setAlwaysOnTop(true); > ++ } catch (SecurityException se) { > ++ // setAlwaysOnTop is restricted, > ++ // the exception is ignored > ++ } > + } > + > + public void update(Graphics g) { > +diff -r dd66920b2d51 test/javax/swing/JPopupMenu/6691503/bug6691503.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Feb 23 13:50:58 2011 -0500 > +@@ -0,0 +1,113 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6691503 > ++ * @summary Checks that there is no opportunity for a malicious applet > ++ * to show a popup menu which has whole screen size. > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6691503 > ++ */ > ++ > ++import sun.awt.SunToolkit; > ++ > ++import javax.swing.*; > ++import java.awt.*; > ++ > ++public class bug6691503 { > ++ private JPopupMenu popupMenu; > ++ private JFrame frame; > ++ private boolean isAlwaysOnTop1 = false; > ++ private boolean isAlwaysOnTop2 = true; > ++ > ++ public static void main(String[] args) { > ++ bug6691503 test = new bug6691503(); > ++ test.setupUI(); > ++ test.testApplication(); > ++ test.testApplet(); > ++ test.checkResult(); > ++ test.stopEDT(); > ++ } > ++ > ++ private void setupUI() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame = new JFrame(); > ++ frame.setVisible(true); > ++ popupMenu = new JPopupMenu(); > ++ JMenuItem click = new JMenuItem("Click"); > ++ popupMenu.add(click); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplication() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplet() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ System.setSecurityManager(new SecurityManager()); > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void checkResult() { > ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); > ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { > ++ throw new RuntimeException("Malicious applet can show always-on-top " + > ++ "popup menu which has whole screen size"); > ++ } > ++ System.out.println("Test passed"); > ++ } > ++ > ++ private void stopEDT() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame.dispose(); > ++ } > ++ }); > ++ } > ++} > ++ > ++ > exporting patch: > # HG changeset patch > # User Denis Lila > # Date 1298488299 18000 > # Node ID 934d7afe1f5278f4142400fa6b2d9e0b23aba664 > # Parent 326f7589d7e8d02f5d6cc1e361a0f0912e9e805e > Fix for security exceptions when JPopupMenu sets always on top. > > diff -r 326f7589d7e8 -r 934d7afe1f52 ChangeLog > --- a/ChangeLog Tue Feb 15 23:02:33 2011 +0000 > +++ b/ChangeLog Wed Feb 23 14:11:39 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-23 Denis Lila > + > + * Makefile.am: Added patches. > + * NEWS: Updated. > + * patches/openjdk/6675802-securityExceptions-applets.patch: > + Get permissions before setting always on top. > + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: > + Remove the fix above. Do nothing if SecurityException is thrown. > + > 2011-02-15 Andrew John Hughes > > * NEWS: Add 1.8.8 section. > diff -r 326f7589d7e8 -r 934d7afe1f52 Makefile.am > --- a/Makefile.am Tue Feb 15 23:02:33 2011 +0000 > +++ b/Makefile.am Wed Feb 23 14:11:39 2011 -0500 > @@ -373,7 +373,9 @@ > patches/openjdk/6541476-png-iTXt-chunk.patch \ > patches/openjdk/6782079-png_metadata_oom.patch \ > patches/rh676659-gcc-export-dynamic.patch \ > - patches/latent_jaxp_bug.patch > + patches/latent_jaxp_bug.patch \ > + patches/openjdk/6675802-securityExceptions-applets.patch \ > + patches/openjdk/6691503-malicious-applet-always-on-top.patch > > if WITH_ALT_HSBUILD > ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ > diff -r 326f7589d7e8 -r 934d7afe1f52 NEWS > --- a/NEWS Tue Feb 15 23:02:33 2011 +0000 > +++ b/NEWS Wed Feb 23 14:11:39 2011 -0500 > @@ -10,6 +10,10 @@ > > New in release 1.8.8 (20XX-XX-XX): > > +* Backports > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > + > New in release 1.8.7 (2011-02-15): > > * Security updates > @@ -21,6 +25,8 @@ > - S6985453, CVE-2010-4471: Java2D font-related system property leak > - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation > - RH677332, CVE-2011-0706: Multiple signers privilege escalation > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > * Bug fixes > - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken > - Fix latent JAXP bug caused by missing import > diff -r 326f7589d7e8 -r 934d7afe1f52 patches/openjdk/6675802-securityExceptions-applets.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Wed Feb 23 14:11:39 2011 -0500 > @@ -0,0 +1,75 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208528462 -14400 > +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +# Parent 147803acf437b81e72e50236030f2bc9ac37caee > +6675802: Regression: heavyweight popups cause SecurityExceptions in applets > +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() > +Reviewed-by: alexp > + > +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -229,7 +229,14 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- setAlwaysOnTop(true); > ++ java.security.AccessController.doPrivileged( > ++ new java.security.PrivilegedAction() { > ++ public Object run() { > ++ setAlwaysOnTop(true); > ++ return null; > ++ } > ++ } > ++ ); > + } > + > + public void update(Graphics g) { > +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -0,0 +1,43 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6675802 > ++ * @summary Checks that there is no AccessControlException when > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6675802 > ++ */ > ++ > ++import javax.swing.*; > ++ > ++public class bug6675802 { > ++ public static void main(String[] args) { > ++ System.setSecurityManager(new SecurityManager()); > ++ final JPopupMenu popupMenu = new JPopupMenu(); > ++ popupMenu.add(new JMenuItem("Click")); > ++ popupMenu.show(null, 0, 0); > ++ System.out.println("Test passed"); > ++ } > ++} > diff -r 326f7589d7e8 -r 934d7afe1f52 patches/openjdk/6691503-malicious-applet-always-on-top.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:11:39 2011 -0500 > @@ -0,0 +1,173 @@ > +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 > +@@ -1,12 +1,12 @@ > + /* > +- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. > ++ * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > + * under the terms of the GNU General Public License version 2 only, as > +- * published by the Free Software Foundation. Sun designates this > ++ * published by the Free Software Foundation. Oracle designates this > + * particular file as subject to the "Classpath" exception as provided > +- * by Sun in the LICENSE file that accompanied this code. > ++ * by Oracle in the LICENSE file that accompanied this code. > + * > + * This code is distributed in the hope that it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > +@@ -18,9 +18,9 @@ > + * 2 along with this work; if not, write to the Free Software Foundation, > + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > + * > +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > +- * CA 95054 USA or visit www.sun.com if you need additional information or > +- * have any questions. > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > + */ > + > + package javax.swing; > +@@ -229,14 +229,15 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- java.security.AccessController.doPrivileged( > +- new java.security.PrivilegedAction() { > +- public Object run() { > +- setAlwaysOnTop(true); > +- return null; > +- } > +- } > +- ); > ++ // Try to set "always-on-top" for the popup window. > ++ // Applets usually don't have sufficient permissions to do it. > ++ // In this case simply ignore the exception. > ++ try { > ++ setAlwaysOnTop(true); > ++ } catch (SecurityException se) { > ++ // setAlwaysOnTop is restricted, > ++ // the exception is ignored > ++ } > + } > + > + public void update(Graphics g) { > +diff -r dd66920b2d51 test/javax/swing/JPopupMenu/6691503/bug6691503.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Feb 23 13:50:58 2011 -0500 > +@@ -0,0 +1,113 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6691503 > ++ * @summary Checks that there is no opportunity for a malicious applet > ++ * to show a popup menu which has whole screen size. > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6691503 > ++ */ > ++ > ++import sun.awt.SunToolkit; > ++ > ++import javax.swing.*; > ++import java.awt.*; > ++ > ++public class bug6691503 { > ++ private JPopupMenu popupMenu; > ++ private JFrame frame; > ++ private boolean isAlwaysOnTop1 = false; > ++ private boolean isAlwaysOnTop2 = true; > ++ > ++ public static void main(String[] args) { > ++ bug6691503 test = new bug6691503(); > ++ test.setupUI(); > ++ test.testApplication(); > ++ test.testApplet(); > ++ test.checkResult(); > ++ test.stopEDT(); > ++ } > ++ > ++ private void setupUI() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame = new JFrame(); > ++ frame.setVisible(true); > ++ popupMenu = new JPopupMenu(); > ++ JMenuItem click = new JMenuItem("Click"); > ++ popupMenu.add(click); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplication() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplet() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ System.setSecurityManager(new SecurityManager()); > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void checkResult() { > ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); > ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { > ++ throw new RuntimeException("Malicious applet can show always-on-top " + > ++ "popup menu which has whole screen size"); > ++ } > ++ System.out.println("Test passed"); > ++ } > ++ > ++ private void stopEDT() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame.dispose(); > ++ } > ++ }); > ++ } > ++} > ++ > ++ > exporting patch: > # HG changeset patch > # User Denis Lila > # Date 1298490602 18000 > # Node ID 3e07e563aeb454fd519da1830798a1b65d0ed8e6 > # Parent d6deb6050f4a62e2a50d22676d1dca9cc9e143cf > Fix for security exceptions when JPopupMenu sets always on top. > > diff -r d6deb6050f4a -r 3e07e563aeb4 ChangeLog > --- a/ChangeLog Tue Feb 15 22:20:29 2011 +0000 > +++ b/ChangeLog Wed Feb 23 14:50:02 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-23 Denis Lila > + > + * Makefile.am: Added patches. > + * NEWS: Updated. > + * patches/openjdk/6675802-securityExceptions-applets.patch: > + Get permissions before setting always on top. > + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: > + Remove the fix above. Do nothing if SecurityException is thrown. > + > 2011-02-15 Andrew John Hughes > > * NEWS: Add 1.9.8 section. > diff -r d6deb6050f4a -r 3e07e563aeb4 Makefile.am > --- a/Makefile.am Tue Feb 15 22:20:29 2011 +0000 > +++ b/Makefile.am Wed Feb 23 14:50:02 2011 -0500 > @@ -337,7 +337,9 @@ > patches/openjdk/6782079-png_metadata_oom.patch \ > patches/rh676659-gcc-export-dynamic.patch \ > patches/g344659-sparc_fix.patch \ > - patches/latent_jaxp_bug.patch > + patches/latent_jaxp_bug.patch \ > + patches/openjdk/6675802-securityExceptions-applets.patch \ > + patches/openjdk/6691503-malicious-applet-always-on-top.patch > > if WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r d6deb6050f4a -r 3e07e563aeb4 NEWS > --- a/NEWS Tue Feb 15 22:20:29 2011 +0000 > +++ b/NEWS Wed Feb 23 14:50:02 2011 -0500 > @@ -10,6 +10,10 @@ > > New in release 1.9.8 (20XX-XX-XX): > > +* Backports > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > + > New in release 1.9.7 (2011-02-15): > > * Security updates > diff -r d6deb6050f4a -r 3e07e563aeb4 patches/openjdk/6675802-securityExceptions-applets.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Wed Feb 23 14:50:02 2011 -0500 > @@ -0,0 +1,75 @@ > +# HG changeset patch > +# User mlapshin > +# Date 1208528462 -14400 > +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 > +# Parent 147803acf437b81e72e50236030f2bc9ac37caee > +6675802: Regression: heavyweight popups cause SecurityExceptions in applets > +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() > +Reviewed-by: alexp > + > +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -229,7 +229,14 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- setAlwaysOnTop(true); > ++ java.security.AccessController.doPrivileged( > ++ new java.security.PrivilegedAction() { > ++ public Object run() { > ++ setAlwaysOnTop(true); > ++ return null; > ++ } > ++ } > ++ ); > + } > + > + public void update(Graphics g) { > +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 > +@@ -0,0 +1,43 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6675802 > ++ * @summary Checks that there is no AccessControlException when > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6675802 > ++ */ > ++ > ++import javax.swing.*; > ++ > ++public class bug6675802 { > ++ public static void main(String[] args) { > ++ System.setSecurityManager(new SecurityManager()); > ++ final JPopupMenu popupMenu = new JPopupMenu(); > ++ popupMenu.add(new JMenuItem("Click")); > ++ popupMenu.show(null, 0, 0); > ++ System.out.println("Test passed"); > ++ } > ++} > diff -r d6deb6050f4a -r 3e07e563aeb4 patches/openjdk/6691503-malicious-applet-always-on-top.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:50:02 2011 -0500 > @@ -0,0 +1,144 @@ > +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 > +@@ -229,14 +229,15 @@ > + // Popups are typically transient and most likely won't benefit > + // from true double buffering. Turn it off here. > + getRootPane().setUseTrueDoubleBuffering(false); > +- java.security.AccessController.doPrivileged( > +- new java.security.PrivilegedAction() { > +- public Object run() { > +- setAlwaysOnTop(true); > +- return null; > +- } > +- } > +- ); > ++ // Try to set "always-on-top" for the popup window. > ++ // Applets usually don't have sufficient permissions to do it. > ++ // In this case simply ignore the exception. > ++ try { > ++ setAlwaysOnTop(true); > ++ } catch (SecurityException se) { > ++ // setAlwaysOnTop is restricted, > ++ // the exception is ignored > ++ } > + } > + > + public void update(Graphics g) { > +diff -r dd66920b2d51 test/javax/swing/JPopupMenu/6691503/bug6691503.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Feb 23 13:50:58 2011 -0500 > +@@ -0,0 +1,113 @@ > ++/* > ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/* > ++ * @test > ++ * @bug 6691503 > ++ * @summary Checks that there is no opportunity for a malicious applet > ++ * to show a popup menu which has whole screen size. > ++ * a heaviweight popup menu is shown from an applet. > ++ * @author Mikhail Lapshin > ++ * @run main bug6691503 > ++ */ > ++ > ++import sun.awt.SunToolkit; > ++ > ++import javax.swing.*; > ++import java.awt.*; > ++ > ++public class bug6691503 { > ++ private JPopupMenu popupMenu; > ++ private JFrame frame; > ++ private boolean isAlwaysOnTop1 = false; > ++ private boolean isAlwaysOnTop2 = true; > ++ > ++ public static void main(String[] args) { > ++ bug6691503 test = new bug6691503(); > ++ test.setupUI(); > ++ test.testApplication(); > ++ test.testApplet(); > ++ test.checkResult(); > ++ test.stopEDT(); > ++ } > ++ > ++ private void setupUI() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame = new JFrame(); > ++ frame.setVisible(true); > ++ popupMenu = new JPopupMenu(); > ++ JMenuItem click = new JMenuItem("Click"); > ++ popupMenu.add(click); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplication() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void testApplet() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ System.setSecurityManager(new SecurityManager()); > ++ popupMenu.show(frame, 0, 0); > ++ Window popupWindow = (Window) > ++ (popupMenu.getParent().getParent().getParent().getParent()); > ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); > ++ System.out.println( > ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); > ++ popupMenu.setVisible(false); > ++ } > ++ }); > ++ } > ++ > ++ private void checkResult() { > ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); > ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { > ++ throw new RuntimeException("Malicious applet can show always-on-top " + > ++ "popup menu which has whole screen size"); > ++ } > ++ System.out.println("Test passed"); > ++ } > ++ > ++ private void stopEDT() { > ++ SwingUtilities.invokeLater(new Runnable() { > ++ public void run() { > ++ frame.dispose(); > ++ } > ++ }); > ++ } > ++} > ++ > ++ -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dlila at icedtea.classpath.org Wed Feb 23 12:48:42 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Wed, 23 Feb 2011 20:48:42 +0000 Subject: /hg/release/icedtea6-1.7: Fix for security exceptions when JPopu... Message-ID: changeset d780d2efc830 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=d780d2efc830 author: Denis Lila date: Wed Feb 23 14:00:24 2011 -0500 Fix for security exceptions when JPopupMenu sets always on top. diffstat: 5 files changed, 264 insertions(+), 1 deletion(-) ChangeLog | 9 Makefile.am | 4 NEWS | 4 patches/openjdk/6675802-securityExceptions-applets.patch | 75 ++++ patches/openjdk/6691503-malicious-applet-always-on-top.patch | 173 ++++++++++ diffs (300 lines): diff -r 6a127ad66978 -r d780d2efc830 ChangeLog --- a/ChangeLog Tue Feb 15 23:04:22 2011 +0000 +++ b/ChangeLog Wed Feb 23 14:00:24 2011 -0500 @@ -1,3 +1,12 @@ 2011-02-15 Andrew John Hughes + + * Makefile.am: Added patches. + * NEWS: Updated. + * patches/openjdk/6675802-securityExceptions-applets.patch: + Get permissions before setting always on top. + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: + Remove the fix above. Do nothing if SecurityException is thrown. + 2011-02-15 Andrew John Hughes * NEWS: Add 1.7.11 section. diff -r 6a127ad66978 -r d780d2efc830 Makefile.am --- a/Makefile.am Tue Feb 15 23:04:22 2011 +0000 +++ b/Makefile.am Wed Feb 23 14:00:24 2011 -0500 @@ -393,7 +393,9 @@ ICEDTEA_PATCHES = \ patches/openjdk/6541476-png-iTXt-chunk.patch \ patches/openjdk/6782079-png_metadata_oom.patch \ patches/rh676659-gcc-export-dynamic.patch \ - patches/latent_jaxp_bug.patch + patches/latent_jaxp_bug.patch \ + patches/openjdk/6675802-securityExceptions-applets.patch \ + patches/openjdk/6691503-malicious-applet-always-on-top.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ diff -r 6a127ad66978 -r d780d2efc830 NEWS --- a/NEWS Tue Feb 15 23:04:22 2011 +0000 +++ b/NEWS Wed Feb 23 14:00:24 2011 -0500 @@ -9,6 +9,10 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 1.7.11 (20XX-XX-XX): + +* Backports + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size New in release 1.7.10 (2011-02-15): diff -r 6a127ad66978 -r d780d2efc830 patches/openjdk/6675802-securityExceptions-applets.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Wed Feb 23 14:00:24 2011 -0500 @@ -0,0 +1,75 @@ +# HG changeset patch +# User mlapshin +# Date 1208528462 -14400 +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 +# Parent 147803acf437b81e72e50236030f2bc9ac37caee +6675802: Regression: heavyweight popups cause SecurityExceptions in applets +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() +Reviewed-by: alexp + +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 +@@ -229,7 +229,14 @@ + // Popups are typically transient and most likely won't benefit + // from true double buffering. Turn it off here. + getRootPane().setUseTrueDoubleBuffering(false); +- setAlwaysOnTop(true); ++ java.security.AccessController.doPrivileged( ++ new java.security.PrivilegedAction() { ++ public Object run() { ++ setAlwaysOnTop(true); ++ return null; ++ } ++ } ++ ); + } + + public void update(Graphics g) { +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 6675802 ++ * @summary Checks that there is no AccessControlException when ++ * a heaviweight popup menu is shown from an applet. ++ * @author Mikhail Lapshin ++ * @run main bug6675802 ++ */ ++ ++import javax.swing.*; ++ ++public class bug6675802 { ++ public static void main(String[] args) { ++ System.setSecurityManager(new SecurityManager()); ++ final JPopupMenu popupMenu = new JPopupMenu(); ++ popupMenu.add(new JMenuItem("Click")); ++ popupMenu.show(null, 0, 0); ++ System.out.println("Test passed"); ++ } ++} diff -r 6a127ad66978 -r d780d2efc830 patches/openjdk/6691503-malicious-applet-always-on-top.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:00:24 2011 -0500 @@ -0,0 +1,173 @@ +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 +@@ -1,12 +1,12 @@ + /* +- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. Sun designates this ++ * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided +- * by Sun in the LICENSE file that accompanied this code. ++ * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +@@ -18,9 +18,9 @@ + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +- * CA 95054 USA or visit www.sun.com if you need additional information or +- * have any questions. ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. + */ + + package javax.swing; +@@ -229,14 +229,15 @@ + // Popups are typically transient and most likely won't benefit + // from true double buffering. Turn it off here. + getRootPane().setUseTrueDoubleBuffering(false); +- java.security.AccessController.doPrivileged( +- new java.security.PrivilegedAction() { +- public Object run() { +- setAlwaysOnTop(true); +- return null; +- } +- } +- ); ++ // Try to set "always-on-top" for the popup window. ++ // Applets usually don't have sufficient permissions to do it. ++ // In this case simply ignore the exception. ++ try { ++ setAlwaysOnTop(true); ++ } catch (SecurityException se) { ++ // setAlwaysOnTop is restricted, ++ // the exception is ignored ++ } + } + + public void update(Graphics g) { +diff -r dd66920b2d51 test/javax/swing/JPopupMenu/6691503/bug6691503.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Feb 23 13:50:58 2011 -0500 +@@ -0,0 +1,113 @@ ++/* ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 6691503 ++ * @summary Checks that there is no opportunity for a malicious applet ++ * to show a popup menu which has whole screen size. ++ * a heaviweight popup menu is shown from an applet. ++ * @author Mikhail Lapshin ++ * @run main bug6691503 ++ */ ++ ++import sun.awt.SunToolkit; ++ ++import javax.swing.*; ++import java.awt.*; ++ ++public class bug6691503 { ++ private JPopupMenu popupMenu; ++ private JFrame frame; ++ private boolean isAlwaysOnTop1 = false; ++ private boolean isAlwaysOnTop2 = true; ++ ++ public static void main(String[] args) { ++ bug6691503 test = new bug6691503(); ++ test.setupUI(); ++ test.testApplication(); ++ test.testApplet(); ++ test.checkResult(); ++ test.stopEDT(); ++ } ++ ++ private void setupUI() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ frame = new JFrame(); ++ frame.setVisible(true); ++ popupMenu = new JPopupMenu(); ++ JMenuItem click = new JMenuItem("Click"); ++ popupMenu.add(click); ++ } ++ }); ++ } ++ ++ private void testApplication() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ popupMenu.show(frame, 0, 0); ++ Window popupWindow = (Window) ++ (popupMenu.getParent().getParent().getParent().getParent()); ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); ++ System.out.println( ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); ++ popupMenu.setVisible(false); ++ } ++ }); ++ } ++ ++ private void testApplet() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ System.setSecurityManager(new SecurityManager()); ++ popupMenu.show(frame, 0, 0); ++ Window popupWindow = (Window) ++ (popupMenu.getParent().getParent().getParent().getParent()); ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); ++ System.out.println( ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); ++ popupMenu.setVisible(false); ++ } ++ }); ++ } ++ ++ private void checkResult() { ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { ++ throw new RuntimeException("Malicious applet can show always-on-top " + ++ "popup menu which has whole screen size"); ++ } ++ System.out.println("Test passed"); ++ } ++ ++ private void stopEDT() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ frame.dispose(); ++ } ++ }); ++ } ++} ++ ++ From dlila at icedtea.classpath.org Wed Feb 23 12:50:19 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Wed, 23 Feb 2011 20:50:19 +0000 Subject: /hg/release/icedtea6-1.8: Fix for security exceptions when JPopu... Message-ID: changeset 934d7afe1f52 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=934d7afe1f52 author: Denis Lila date: Wed Feb 23 14:11:39 2011 -0500 Fix for security exceptions when JPopupMenu sets always on top. diffstat: 5 files changed, 266 insertions(+), 1 deletion(-) ChangeLog | 9 Makefile.am | 4 NEWS | 6 patches/openjdk/6675802-securityExceptions-applets.patch | 75 ++++ patches/openjdk/6691503-malicious-applet-always-on-top.patch | 173 ++++++++++ diffs (309 lines): diff -r 326f7589d7e8 -r 934d7afe1f52 ChangeLog --- a/ChangeLog Tue Feb 15 23:02:33 2011 +0000 +++ b/ChangeLog Wed Feb 23 14:11:39 2011 -0500 @@ -1,3 +1,12 @@ 2011-02-15 Andrew John Hughes + + * Makefile.am: Added patches. + * NEWS: Updated. + * patches/openjdk/6675802-securityExceptions-applets.patch: + Get permissions before setting always on top. + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: + Remove the fix above. Do nothing if SecurityException is thrown. + 2011-02-15 Andrew John Hughes * NEWS: Add 1.8.8 section. diff -r 326f7589d7e8 -r 934d7afe1f52 Makefile.am --- a/Makefile.am Tue Feb 15 23:02:33 2011 +0000 +++ b/Makefile.am Wed Feb 23 14:11:39 2011 -0500 @@ -373,7 +373,9 @@ ICEDTEA_PATCHES = \ patches/openjdk/6541476-png-iTXt-chunk.patch \ patches/openjdk/6782079-png_metadata_oom.patch \ patches/rh676659-gcc-export-dynamic.patch \ - patches/latent_jaxp_bug.patch + patches/latent_jaxp_bug.patch \ + patches/openjdk/6675802-securityExceptions-applets.patch \ + patches/openjdk/6691503-malicious-applet-always-on-top.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ diff -r 326f7589d7e8 -r 934d7afe1f52 NEWS --- a/NEWS Tue Feb 15 23:02:33 2011 +0000 +++ b/NEWS Wed Feb 23 14:11:39 2011 -0500 @@ -10,6 +10,10 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/ New in release 1.8.8 (20XX-XX-XX): +* Backports + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size + New in release 1.8.7 (2011-02-15): * Security updates @@ -21,6 +25,8 @@ New in release 1.8.7 (2011-02-15): - S6985453, CVE-2010-4471: Java2D font-related system property leak - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation - RH677332, CVE-2011-0706: Multiple signers privilege escalation + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size * Bug fixes - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken - Fix latent JAXP bug caused by missing import diff -r 326f7589d7e8 -r 934d7afe1f52 patches/openjdk/6675802-securityExceptions-applets.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Wed Feb 23 14:11:39 2011 -0500 @@ -0,0 +1,75 @@ +# HG changeset patch +# User mlapshin +# Date 1208528462 -14400 +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 +# Parent 147803acf437b81e72e50236030f2bc9ac37caee +6675802: Regression: heavyweight popups cause SecurityExceptions in applets +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() +Reviewed-by: alexp + +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 +@@ -229,7 +229,14 @@ + // Popups are typically transient and most likely won't benefit + // from true double buffering. Turn it off here. + getRootPane().setUseTrueDoubleBuffering(false); +- setAlwaysOnTop(true); ++ java.security.AccessController.doPrivileged( ++ new java.security.PrivilegedAction() { ++ public Object run() { ++ setAlwaysOnTop(true); ++ return null; ++ } ++ } ++ ); + } + + public void update(Graphics g) { +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 6675802 ++ * @summary Checks that there is no AccessControlException when ++ * a heaviweight popup menu is shown from an applet. ++ * @author Mikhail Lapshin ++ * @run main bug6675802 ++ */ ++ ++import javax.swing.*; ++ ++public class bug6675802 { ++ public static void main(String[] args) { ++ System.setSecurityManager(new SecurityManager()); ++ final JPopupMenu popupMenu = new JPopupMenu(); ++ popupMenu.add(new JMenuItem("Click")); ++ popupMenu.show(null, 0, 0); ++ System.out.println("Test passed"); ++ } ++} diff -r 326f7589d7e8 -r 934d7afe1f52 patches/openjdk/6691503-malicious-applet-always-on-top.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:11:39 2011 -0500 @@ -0,0 +1,173 @@ +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 +@@ -1,12 +1,12 @@ + /* +- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. ++ * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. + * + * This code is free software; you can redistribute it and/or modify it + * under the terms of the GNU General Public License version 2 only, as +- * published by the Free Software Foundation. Sun designates this ++ * published by the Free Software Foundation. Oracle designates this + * particular file as subject to the "Classpath" exception as provided +- * by Sun in the LICENSE file that accompanied this code. ++ * by Oracle in the LICENSE file that accompanied this code. + * + * This code is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or +@@ -18,9 +18,9 @@ + * 2 along with this work; if not, write to the Free Software Foundation, + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. + * +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, +- * CA 95054 USA or visit www.sun.com if you need additional information or +- * have any questions. ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. + */ + + package javax.swing; +@@ -229,14 +229,15 @@ + // Popups are typically transient and most likely won't benefit + // from true double buffering. Turn it off here. + getRootPane().setUseTrueDoubleBuffering(false); +- java.security.AccessController.doPrivileged( +- new java.security.PrivilegedAction() { +- public Object run() { +- setAlwaysOnTop(true); +- return null; +- } +- } +- ); ++ // Try to set "always-on-top" for the popup window. ++ // Applets usually don't have sufficient permissions to do it. ++ // In this case simply ignore the exception. ++ try { ++ setAlwaysOnTop(true); ++ } catch (SecurityException se) { ++ // setAlwaysOnTop is restricted, ++ // the exception is ignored ++ } + } + + public void update(Graphics g) { +diff -r dd66920b2d51 test/javax/swing/JPopupMenu/6691503/bug6691503.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Feb 23 13:50:58 2011 -0500 +@@ -0,0 +1,113 @@ ++/* ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 6691503 ++ * @summary Checks that there is no opportunity for a malicious applet ++ * to show a popup menu which has whole screen size. ++ * a heaviweight popup menu is shown from an applet. ++ * @author Mikhail Lapshin ++ * @run main bug6691503 ++ */ ++ ++import sun.awt.SunToolkit; ++ ++import javax.swing.*; ++import java.awt.*; ++ ++public class bug6691503 { ++ private JPopupMenu popupMenu; ++ private JFrame frame; ++ private boolean isAlwaysOnTop1 = false; ++ private boolean isAlwaysOnTop2 = true; ++ ++ public static void main(String[] args) { ++ bug6691503 test = new bug6691503(); ++ test.setupUI(); ++ test.testApplication(); ++ test.testApplet(); ++ test.checkResult(); ++ test.stopEDT(); ++ } ++ ++ private void setupUI() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ frame = new JFrame(); ++ frame.setVisible(true); ++ popupMenu = new JPopupMenu(); ++ JMenuItem click = new JMenuItem("Click"); ++ popupMenu.add(click); ++ } ++ }); ++ } ++ ++ private void testApplication() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ popupMenu.show(frame, 0, 0); ++ Window popupWindow = (Window) ++ (popupMenu.getParent().getParent().getParent().getParent()); ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); ++ System.out.println( ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); ++ popupMenu.setVisible(false); ++ } ++ }); ++ } ++ ++ private void testApplet() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ System.setSecurityManager(new SecurityManager()); ++ popupMenu.show(frame, 0, 0); ++ Window popupWindow = (Window) ++ (popupMenu.getParent().getParent().getParent().getParent()); ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); ++ System.out.println( ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); ++ popupMenu.setVisible(false); ++ } ++ }); ++ } ++ ++ private void checkResult() { ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { ++ throw new RuntimeException("Malicious applet can show always-on-top " + ++ "popup menu which has whole screen size"); ++ } ++ System.out.println("Test passed"); ++ } ++ ++ private void stopEDT() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ frame.dispose(); ++ } ++ }); ++ } ++} ++ ++ From omajid at redhat.com Wed Feb 23 12:50:33 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 15:50:33 -0500 Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <529548900.551107.1298492047767.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <529548900.551107.1298492047767.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <4D657319.4000306@redhat.com> On 02/23/2011 03:14 PM, Denis Lila wrote: >> > It might be a good idea to update the copyright (Sun -> Oracle). > Done. > Also, I noticed that the old patches I posted were bad because > they were against some very old clones of the release branches. > I fixed that. > > Ok to push now? > Some comments inline. > hgexport1.7.patch > > diff -r 6a127ad66978 -r d780d2efc830 patches/openjdk/6691503-malicious-applet-always-on-top.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:00:24 2011 -0500 > @@ -0,0 +1,173 @@ > +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 > +@@ -1,12 +1,12 @@ > + /* > +- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. > ++ * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > + * > + * This code is free software; you can redistribute it and/or modify it > + * under the terms of the GNU General Public License version 2 only, as > +- * published by the Free Software Foundation. Sun designates this > ++ * published by the Free Software Foundation. Oracle designates this > + * particular file as subject to the "Classpath" exception as provided > +- * by Sun in the LICENSE file that accompanied this code. > ++ * by Oracle in the LICENSE file that accompanied this code. > + * > + * This code is distributed in the hope that it will be useful, but WITHOUT > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > +@@ -18,9 +18,9 @@ > + * 2 along with this work; if not, write to the Free Software Foundation, > + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > + * > +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > +- * CA 95054 USA or visitwww.sun.com if you need additional information or > +- * have any questions. > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visitwww.oracle.com if you need additional information or have any > ++ * questions. > + */ > + > + package javax.swing; Normally we only fix copyrights in new files; not files being modified. Also, you are not doing this for 1.9. Any particular reason why? > > > hgexport1.8.patch > > > diff -r 326f7589d7e8 -r 934d7afe1f52 NEWS > --- a/NEWS Tue Feb 15 23:02:33 2011 +0000 > +++ b/NEWS Wed Feb 23 14:11:39 2011 -0500 > @@ -10,6 +10,10 @@ > > New in release 1.8.8 (20XX-XX-XX): > > +* Backports > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > + > New in release 1.8.7 (2011-02-15): > > * Security updates > @@ -21,6 +25,8 @@ > - S6985453, CVE-2010-4471: Java2D font-related system property leak > - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation > - RH677332, CVE-2011-0706: Multiple signers privilege escalation > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > * Bug fixes > - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken > - Fix latent JAXP bug caused by missing import You are listing the same bugs twice in the NEWS file. I dont think that's right. Rest looks fine to me. Cheers, OMair From dlila at icedtea.classpath.org Wed Feb 23 12:50:43 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Wed, 23 Feb 2011 20:50:43 +0000 Subject: /hg/release/icedtea6-1.9: Fix for security exceptions when JPopu... Message-ID: changeset 3e07e563aeb4 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=3e07e563aeb4 author: Denis Lila date: Wed Feb 23 14:50:02 2011 -0500 Fix for security exceptions when JPopupMenu sets always on top. diffstat: 5 files changed, 235 insertions(+), 1 deletion(-) ChangeLog | 9 Makefile.am | 4 NEWS | 4 patches/openjdk/6675802-securityExceptions-applets.patch | 75 +++++ patches/openjdk/6691503-malicious-applet-always-on-top.patch | 144 ++++++++++ diffs (271 lines): diff -r d6deb6050f4a -r 3e07e563aeb4 ChangeLog --- a/ChangeLog Tue Feb 15 22:20:29 2011 +0000 +++ b/ChangeLog Wed Feb 23 14:50:02 2011 -0500 @@ -1,3 +1,12 @@ 2011-02-15 Andrew John Hughes + + * Makefile.am: Added patches. + * NEWS: Updated. + * patches/openjdk/6675802-securityExceptions-applets.patch: + Get permissions before setting always on top. + * patches/openjdk/6691503-malicious-applet-always-on-top.patch: + Remove the fix above. Do nothing if SecurityException is thrown. + 2011-02-15 Andrew John Hughes * NEWS: Add 1.9.8 section. diff -r d6deb6050f4a -r 3e07e563aeb4 Makefile.am --- a/Makefile.am Tue Feb 15 22:20:29 2011 +0000 +++ b/Makefile.am Wed Feb 23 14:50:02 2011 -0500 @@ -337,7 +337,9 @@ ICEDTEA_PATCHES = \ patches/openjdk/6782079-png_metadata_oom.patch \ patches/rh676659-gcc-export-dynamic.patch \ patches/g344659-sparc_fix.patch \ - patches/latent_jaxp_bug.patch + patches/latent_jaxp_bug.patch \ + patches/openjdk/6675802-securityExceptions-applets.patch \ + patches/openjdk/6691503-malicious-applet-always-on-top.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r d6deb6050f4a -r 3e07e563aeb4 NEWS --- a/NEWS Tue Feb 15 22:20:29 2011 +0000 +++ b/NEWS Wed Feb 23 14:50:02 2011 -0500 @@ -9,6 +9,10 @@ CVE-XXXX-YYYY: http://www.cve.mitre.org/ CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY New in release 1.9.8 (20XX-XX-XX): + +* Backports + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size New in release 1.9.7 (2011-02-15): diff -r d6deb6050f4a -r 3e07e563aeb4 patches/openjdk/6675802-securityExceptions-applets.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6675802-securityExceptions-applets.patch Wed Feb 23 14:50:02 2011 -0500 @@ -0,0 +1,75 @@ +# HG changeset patch +# User mlapshin +# Date 1208528462 -14400 +# Node ID dd66920b2d51e33ca2157ab045117cc7c7f5f0c0 +# Parent 147803acf437b81e72e50236030f2bc9ac37caee +6675802: Regression: heavyweight popups cause SecurityExceptions in applets +Summary: The problem code in Popup class is surrounded by AccessController.doPrivileged() +Reviewed-by: alexp + +diff -r 147803acf437 -r dd66920b2d51 src/share/classes/javax/swing/Popup.java +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Mon Apr 14 16:41:00 2008 +0400 ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 +@@ -229,7 +229,14 @@ + // Popups are typically transient and most likely won't benefit + // from true double buffering. Turn it off here. + getRootPane().setUseTrueDoubleBuffering(false); +- setAlwaysOnTop(true); ++ java.security.AccessController.doPrivileged( ++ new java.security.PrivilegedAction() { ++ public Object run() { ++ setAlwaysOnTop(true); ++ return null; ++ } ++ } ++ ); + } + + public void update(Graphics g) { +diff -r 147803acf437 -r dd66920b2d51 test/javax/swing/JPopupMenu/6675802/bug6675802.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6675802/bug6675802.java Fri Apr 18 18:21:02 2008 +0400 +@@ -0,0 +1,43 @@ ++/* ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 6675802 ++ * @summary Checks that there is no AccessControlException when ++ * a heaviweight popup menu is shown from an applet. ++ * @author Mikhail Lapshin ++ * @run main bug6675802 ++ */ ++ ++import javax.swing.*; ++ ++public class bug6675802 { ++ public static void main(String[] args) { ++ System.setSecurityManager(new SecurityManager()); ++ final JPopupMenu popupMenu = new JPopupMenu(); ++ popupMenu.add(new JMenuItem("Click")); ++ popupMenu.show(null, 0, 0); ++ System.out.println("Test passed"); ++ } ++} diff -r d6deb6050f4a -r 3e07e563aeb4 patches/openjdk/6691503-malicious-applet-always-on-top.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:50:02 2011 -0500 @@ -0,0 +1,144 @@ +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 +@@ -229,14 +229,15 @@ + // Popups are typically transient and most likely won't benefit + // from true double buffering. Turn it off here. + getRootPane().setUseTrueDoubleBuffering(false); +- java.security.AccessController.doPrivileged( +- new java.security.PrivilegedAction() { +- public Object run() { +- setAlwaysOnTop(true); +- return null; +- } +- } +- ); ++ // Try to set "always-on-top" for the popup window. ++ // Applets usually don't have sufficient permissions to do it. ++ // In this case simply ignore the exception. ++ try { ++ setAlwaysOnTop(true); ++ } catch (SecurityException se) { ++ // setAlwaysOnTop is restricted, ++ // the exception is ignored ++ } + } + + public void update(Graphics g) { +diff -r dd66920b2d51 test/javax/swing/JPopupMenu/6691503/bug6691503.java +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 ++++ openjdk/jdk/test/javax/swing/JPopupMenu/6691503/bug6691503.java Wed Feb 23 13:50:58 2011 -0500 +@@ -0,0 +1,113 @@ ++/* ++ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved. ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. ++ * ++ * This code is free software; you can redistribute it and/or modify it ++ * under the terms of the GNU General Public License version 2 only, as ++ * published by the Free Software Foundation. ++ * ++ * This code is distributed in the hope that it will be useful, but WITHOUT ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License ++ * version 2 for more details (a copy is included in the LICENSE file that ++ * accompanied this code). ++ * ++ * You should have received a copy of the GNU General Public License version ++ * 2 along with this work; if not, write to the Free Software Foundation, ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ * ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA ++ * or visit www.oracle.com if you need additional information or have any ++ * questions. ++ */ ++ ++/* ++ * @test ++ * @bug 6691503 ++ * @summary Checks that there is no opportunity for a malicious applet ++ * to show a popup menu which has whole screen size. ++ * a heaviweight popup menu is shown from an applet. ++ * @author Mikhail Lapshin ++ * @run main bug6691503 ++ */ ++ ++import sun.awt.SunToolkit; ++ ++import javax.swing.*; ++import java.awt.*; ++ ++public class bug6691503 { ++ private JPopupMenu popupMenu; ++ private JFrame frame; ++ private boolean isAlwaysOnTop1 = false; ++ private boolean isAlwaysOnTop2 = true; ++ ++ public static void main(String[] args) { ++ bug6691503 test = new bug6691503(); ++ test.setupUI(); ++ test.testApplication(); ++ test.testApplet(); ++ test.checkResult(); ++ test.stopEDT(); ++ } ++ ++ private void setupUI() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ frame = new JFrame(); ++ frame.setVisible(true); ++ popupMenu = new JPopupMenu(); ++ JMenuItem click = new JMenuItem("Click"); ++ popupMenu.add(click); ++ } ++ }); ++ } ++ ++ private void testApplication() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ popupMenu.show(frame, 0, 0); ++ Window popupWindow = (Window) ++ (popupMenu.getParent().getParent().getParent().getParent()); ++ isAlwaysOnTop1 = popupWindow.isAlwaysOnTop(); ++ System.out.println( ++ "Application: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop1); ++ popupMenu.setVisible(false); ++ } ++ }); ++ } ++ ++ private void testApplet() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ System.setSecurityManager(new SecurityManager()); ++ popupMenu.show(frame, 0, 0); ++ Window popupWindow = (Window) ++ (popupMenu.getParent().getParent().getParent().getParent()); ++ isAlwaysOnTop2 = popupWindow.isAlwaysOnTop(); ++ System.out.println( ++ "Applet: popupWindow.isAlwaysOnTop() = " + isAlwaysOnTop2); ++ popupMenu.setVisible(false); ++ } ++ }); ++ } ++ ++ private void checkResult() { ++ ((SunToolkit)(Toolkit.getDefaultToolkit())).realSync(); ++ if (!isAlwaysOnTop1 || isAlwaysOnTop2) { ++ throw new RuntimeException("Malicious applet can show always-on-top " + ++ "popup menu which has whole screen size"); ++ } ++ System.out.println("Test passed"); ++ } ++ ++ private void stopEDT() { ++ SwingUtilities.invokeLater(new Runnable() { ++ public void run() { ++ frame.dispose(); ++ } ++ }); ++ } ++} ++ ++ From dlila at redhat.com Wed Feb 23 12:54:53 2011 From: dlila at redhat.com (Denis Lila) Date: Wed, 23 Feb 2011 15:54:53 -0500 (EST) Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <4D657319.4000306@redhat.com> Message-ID: <367807156.551655.1298494493526.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > Normally we only fix copyrights in new files; not files being > modified. Ok, I can fix this. > Also, you are not doing this for 1.9. Any particular reason why? Because the 1.9 copyrights are already Oracle copyrights. > You are listing the same bugs twice in the NEWS file. I dont think > that's right. You're right, thanks for catching this. Regards, Denis. ----- Original Message ----- > On 02/23/2011 03:14 PM, Denis Lila wrote: > >> > It might be a good idea to update the copyright (Sun -> Oracle). > > Done. > > Also, I noticed that the old patches I posted were bad because > > they were against some very old clones of the release branches. > > I fixed that. > > > > Ok to push now? > > > > > > > hgexport1.7.patch > > > > > diff -r 6a127ad66978 -r d780d2efc830 > > patches/openjdk/6691503-malicious-applet-always-on-top.patch > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch > > Wed Feb 23 14:00:24 2011 -0500 > > @@ -0,0 +1,173 @@ > > +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri > > Apr 18 18:21:02 2008 +0400 > > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 > > 13:50:58 2011 -0500 > > +@@ -1,12 +1,12 @@ > > + /* > > +- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. > > ++ * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All > > rights reserved. > > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > > + * > > + * This code is free software; you can redistribute it and/or > > modify it > > + * under the terms of the GNU General Public License version 2 > > only, as > > +- * published by the Free Software Foundation. Sun designates this > > ++ * published by the Free Software Foundation. Oracle designates > > this > > + * particular file as subject to the "Classpath" exception as > > provided > > +- * by Sun in the LICENSE file that accompanied this code. > > ++ * by Oracle in the LICENSE file that accompanied this code. > > + * > > + * This code is distributed in the hope that it will be useful, but > > WITHOUT > > + * ANY WARRANTY; without even the implied warranty of > > MERCHANTABILITY or > > +@@ -18,9 +18,9 @@ > > + * 2 along with this work; if not, write to the Free Software > > Foundation, > > + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > > + * > > +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, > > Santa Clara, > > +- * CA 95054 USA or visitwww.sun.com if you need additional > > information or > > +- * have any questions. > > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA > > 94065 USA > > ++ * or visitwww.oracle.com if you need additional information or > > have any > > ++ * questions. > > + */ > > + > > + package javax.swing; > > > > > > > > hgexport1.8.patch > > > > > > > diff -r 326f7589d7e8 -r 934d7afe1f52 NEWS > > --- a/NEWS Tue Feb 15 23:02:33 2011 +0000 > > +++ b/NEWS Wed Feb 23 14:11:39 2011 -0500 > > @@ -10,6 +10,10 @@ > > > > New in release 1.8.8 (20XX-XX-XX): > > > > +* Backports > > + - S6675802: Regression: heavyweight popups cause > > SecurityExceptions in applets > > + - S6691503: Malicious applet can show always-on-top popup menu > > which has whole screen size > > + > > New in release 1.8.7 (2011-02-15): > > > > * Security updates > > @@ -21,6 +25,8 @@ > > - S6985453, CVE-2010-4471: Java2D font-related system property > > leak > > - S6927050, CVE-2010-4470: JAXP untrusted component state > > manipulation > > - RH677332, CVE-2011-0706: Multiple signers privilege escalation > > + - S6675802: Regression: heavyweight popups cause > > SecurityExceptions in applets > > + - S6691503: Malicious applet can show always-on-top popup menu > > which has whole screen size > > * Bug fixes > > - RH676659: Pass -export-dynamic flag to linker using -Wl, as > > option in gcc 4.6+ is broken > > - Fix latent JAXP bug caused by missing import > > > Rest looks fine to me. > > Cheers, > OMair From dlila at icedtea.classpath.org Wed Feb 23 13:07:22 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Wed, 23 Feb 2011 21:07:22 +0000 Subject: /hg/release/icedtea6-1.8: Remove duplicate NEWS entries from the... Message-ID: changeset b290bff215e8 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=b290bff215e8 author: Denis Lila date: Wed Feb 23 16:10:06 2011 -0500 Remove duplicate NEWS entries from the previous changeset. diffstat: 2 files changed, 5 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ NEWS | 2 -- diffs (24 lines): diff -r 934d7afe1f52 -r b290bff215e8 ChangeLog --- a/ChangeLog Wed Feb 23 14:11:39 2011 -0500 +++ b/ChangeLog Wed Feb 23 16:10:06 2011 -0500 @@ -1,3 +1,8 @@ 2011-02-23 Denis Lila + + * NEWS: the previous changeset put the bug fixes under the wrong + release. Fixed this. + 2011-02-23 Denis Lila * Makefile.am: Added patches. diff -r 934d7afe1f52 -r b290bff215e8 NEWS --- a/NEWS Wed Feb 23 14:11:39 2011 -0500 +++ b/NEWS Wed Feb 23 16:10:06 2011 -0500 @@ -25,8 +25,6 @@ New in release 1.8.7 (2011-02-15): - S6985453, CVE-2010-4471: Java2D font-related system property leak - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation - RH677332, CVE-2011-0706: Multiple signers privilege escalation - - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets - - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size * Bug fixes - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken - Fix latent JAXP bug caused by missing import From mjw at icedtea.classpath.org Wed Feb 23 13:26:57 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Wed, 23 Feb 2011 21:26:57 +0000 Subject: /hg/buildbot: Add icedtea6-squeeze-x86_64-quick-jamvm and -cacao... Message-ID: changeset 08aadbc57f29 in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=08aadbc57f29 author: Mark Wielaard date: Wed Feb 23 22:26:53 2011 +0100 Add icedtea6-squeeze-x86_64-quick-jamvm and -cacao builders. Don't bootstrap, only run langtools checks. diffstat: 1 file changed, 50 insertions(+) icedtea/master.cfg | 50 ++++++++++++++++++++++++++++++++++++++++++++++++++ diffs (81 lines): diff -r f644988c61fd -r 08aadbc57f29 icedtea/master.cfg --- a/icedtea/master.cfg Wed Feb 23 14:37:20 2011 +0100 +++ b/icedtea/master.cfg Wed Feb 23 22:26:53 2011 +0100 @@ -60,6 +60,8 @@ c['schedulers'].append(Scheduler(name="i treeStableTimer=5*60, builderNames=["icedtea6-squeeze-x86_64-quick", "icedtea6-squeeze-x86_64-quick-hotspot", + "icedtea6-squeeze-x86_64-quick-jamvm", + "icedtea6-squeeze-x86_64-quick-cacao", "icedtea6-natty-armv7l-quick", "icedtea6-natty-armv7l-quick-cacao", "icedtea6-natty-armv7l-quick-jamvm", @@ -275,6 +277,42 @@ f3h.addStep(JTRegCheck(command=["make", description="check-hotspot", workdir="build")) f3h.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build")) + +f3j = factory.BuildFactory() +f3j.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3j.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3j.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3j.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--disable-docs", + "--enable-jamvm"], + workdir="build")) +f3j.addStep(Compile(workdir="build")) +f3j.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build")) + +f3c = factory.BuildFactory() +f3c.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3c.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3c.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3c.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--disable-docs", + "--enable-cacao"], + workdir="build")) +f3c.addStep(Compile(workdir="build")) +f3c.addStep(JTRegCheck(command=["make", "check-langtools"], description="check-langtools", workdir="build")) @@ -556,6 +594,16 @@ icedtea6_builder_quick_hotspot = { 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea6-quick-hotspot", 'factory': f3h } +icedtea6_builder_quick_jamvm = { + 'name': "icedtea6-squeeze-x86_64-quick-jamvm", + 'slavenames': ["squeeze-x86_64"], + 'builddir': "icedtea6-quick-jamvm", + 'factory': f3j } +icedtea6_builder_quick_cacao = { + 'name': "icedtea6-squeeze-x86_64-quick-cacao", + 'slavenames': ["squeeze-x86_64"], + 'builddir': "icedtea6-quick-cacao", + 'factory': f3c } icedtea6_builder_quick_arm_natty = { 'name': "icedtea6-natty-armv7l-quick", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea6-natty-armv7l-quick", @@ -668,6 +716,8 @@ icedtea7_builder_full = { 'name': "icedt c['builders'] = [icedtea6_builder_quick, icedtea6_builder_quick_hotspot, + icedtea6_builder_quick_jamvm, + icedtea6_builder_quick_cacao, icedtea6_builder_quick_arm_natty, icedtea6_builder_quick_arm_natty_cacao, icedtea6_builder_quick_arm_natty_jamvm, From andrew at icedtea.classpath.org Wed Feb 23 13:28:05 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 21:28:05 +0000 Subject: /hg/icedtea6: Invert AM_CONDITIONAL test in --with-x-src-zip to ... Message-ID: changeset f6c3aa89e083 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=f6c3aa89e083 author: Andrew John Hughes date: Wed Feb 23 21:26:54 2011 +0000 Invert AM_CONDITIONAL test in --with-x-src-zip to get correct behaviour. 2011-02-23 Andrew John Hughes * acinclude.m4: (IT_CHECK_WITH_CACAO_SRC_ZIP): Invert AM_CONDITIONAL test to get correct behaviour. (IT_CHECK_WITH_JAMVM_SRC_ZIP): Likewise. (IT_WITH_OPENJDK_SRC_ZIP): Likewise. (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. (IT_WITH_JAXP_DROP_ZIP): Likewise. (IT_WITH_JAF_DROP_ZIP): Likewise. (IT_WITH_JAXWS_DROP_ZIP): Likewise. diffstat: 2 files changed, 19 insertions(+), 7 deletions(-) ChangeLog | 12 ++++++++++++ acinclude.m4 | 14 +++++++------- diffs (85 lines): diff -r fcde34790552 -r f6c3aa89e083 ChangeLog --- a/ChangeLog Wed Feb 23 20:39:53 2011 +0000 +++ b/ChangeLog Wed Feb 23 21:26:54 2011 +0000 @@ -1,3 +1,15 @@ 2011-02-23 Andrew John Hughes + + * acinclude.m4: + (IT_CHECK_WITH_CACAO_SRC_ZIP): Invert + AM_CONDITIONAL test to get correct behaviour. + (IT_CHECK_WITH_JAMVM_SRC_ZIP): Likewise. + (IT_WITH_OPENJDK_SRC_ZIP): Likewise. + (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. + (IT_WITH_JAXP_DROP_ZIP): Likewise. + (IT_WITH_JAF_DROP_ZIP): Likewise. + (IT_WITH_JAXWS_DROP_ZIP): Likewise. + 2011-02-23 Andrew John Hughes * acinclude.m4: diff -r fcde34790552 -r f6c3aa89e083 acinclude.m4 --- a/acinclude.m4 Wed Feb 23 20:39:53 2011 +0000 +++ b/acinclude.m4 Wed Feb 23 21:26:54 2011 +0000 @@ -608,7 +608,7 @@ AC_DEFUN([IT_WITH_OPENJDK_SRC_ZIP], [ ALT_OPENJDK_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test "x{ALT_OPENJDK_SRC_ZIP}" = "xnot specified") + AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test "x{ALT_OPENJDK_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_OPENJDK_SRC_ZIP}) AC_SUBST(ALT_OPENJDK_SRC_ZIP) ]) @@ -938,7 +938,7 @@ AC_DEFUN([IT_WITH_JAMVM_SRC_ZIP], [ ALT_JAMVM_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test "x{ALT_JAMVM_SRC_ZIP}" = "xnot specified") + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test "x{ALT_JAMVM_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAMVM_SRC_ZIP}) AC_SUBST(ALT_JAMVM_SRC_ZIP) ]) @@ -1001,7 +1001,7 @@ AC_DEFUN([IT_WITH_CACAO_SRC_ZIP], [ ALT_CACAO_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x{ALT_CACAO_SRC_ZIP}" = "xnot specified") + AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x{ALT_CACAO_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_CACAO_SRC_ZIP}) AC_SUBST(ALT_CACAO_SRC_ZIP) ]) @@ -1081,7 +1081,7 @@ AC_DEFUN([IT_WITH_HOTSPOT_SRC_ZIP], [ ALT_HOTSPOT_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test "x{ALT_HOTSPOT_SRC_ZIP}" = "xnot specified") + AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test "x{ALT_HOTSPOT_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_HOTSPOT_SRC_ZIP}) AC_SUBST(ALT_HOTSPOT_SRC_ZIP) ]) @@ -1102,7 +1102,7 @@ AC_DEFUN([IT_WITH_JAXP_DROP_ZIP], [ ALT_JAXP_DROP_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAXP_DROP_ZIP, test "x{ALT_JAXP_DROP_ZIP}" = "xnot specified") + AM_CONDITIONAL(USE_ALT_JAXP_DROP_ZIP, test "x{ALT_JAXP_DROP_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAXP_DROP_ZIP}) AC_SUBST(ALT_JAXP_DROP_ZIP) ]) @@ -1123,7 +1123,7 @@ AC_DEFUN([IT_WITH_JAF_DROP_ZIP], [ ALT_JAF_DROP_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAF_DROP_ZIP, test "x{ALT_JAF_DROP_ZIP}" = "xnot specified") + AM_CONDITIONAL(USE_ALT_JAF_DROP_ZIP, test "x{ALT_JAF_DROP_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAF_DROP_ZIP}) AC_SUBST(ALT_JAF_DROP_ZIP) ]) @@ -1144,7 +1144,7 @@ AC_DEFUN([IT_WITH_JAXWS_DROP_ZIP], [ ALT_JAXWS_DROP_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAXWS_DROP_ZIP, test "x{ALT_JAXWS_DROP_ZIP}" = "xnot specified") + AM_CONDITIONAL(USE_ALT_JAXWS_DROP_ZIP, test "x{ALT_JAXWS_DROP_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAXWS_DROP_ZIP}) AC_SUBST(ALT_JAXWS_DROP_ZIP) ]) From ahughes at redhat.com Wed Feb 23 13:43:51 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 21:43:51 +0000 Subject: Backport JPopupMenu fixes to release branches. In-Reply-To: <4D657319.4000306@redhat.com> References: <529548900.551107.1298492047767.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <4D657319.4000306@redhat.com> Message-ID: <20110223214351.GG24648@rivendell.middle-earth.co.uk> On 15:50 Wed 23 Feb , Omair Majid wrote: > On 02/23/2011 03:14 PM, Denis Lila wrote: > >> > It might be a good idea to update the copyright (Sun -> Oracle). > > Done. > > Also, I noticed that the old patches I posted were bad because > > they were against some very old clones of the release branches. > > I fixed that. > > > > Ok to push now? > > > > Some comments inline. > Sorry, I'm getting mixed up here. I thought this was the one for HEAD and just straight backports. > > > hgexport1.7.patch > > > > > diff -r 6a127ad66978 -r d780d2efc830 patches/openjdk/6691503-malicious-applet-always-on-top.patch > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > +++ b/patches/openjdk/6691503-malicious-applet-always-on-top.patch Wed Feb 23 14:00:24 2011 -0500 > > @@ -0,0 +1,173 @@ > > +diff -r dd66920b2d51 src/share/classes/javax/swing/Popup.java > > +--- openjdk.orig/jdk/src/share/classes/javax/swing/Popup.java Fri Apr 18 18:21:02 2008 +0400 > > ++++ openjdk/jdk/src/share/classes/javax/swing/Popup.java Wed Feb 23 13:50:58 2011 -0500 > > +@@ -1,12 +1,12 @@ > > + /* > > +- * Copyright 1999-2007 Sun Microsystems, Inc. All Rights Reserved. > > ++ * Copyright (c) 1999, 2008, Oracle and/or its affiliates. All rights reserved. > > + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > > + * > > + * This code is free software; you can redistribute it and/or modify it > > + * under the terms of the GNU General Public License version 2 only, as > > +- * published by the Free Software Foundation. Sun designates this > > ++ * published by the Free Software Foundation. Oracle designates this > > + * particular file as subject to the "Classpath" exception as provided > > +- * by Sun in the LICENSE file that accompanied this code. > > ++ * by Oracle in the LICENSE file that accompanied this code. > > + * > > + * This code is distributed in the hope that it will be useful, but WITHOUT > > + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > > +@@ -18,9 +18,9 @@ > > + * 2 along with this work; if not, write to the Free Software Foundation, > > + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > > + * > > +- * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, > > +- * CA 95054 USA or visitwww.sun.com if you need additional information or > > +- * have any questions. > > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > > ++ * or visitwww.oracle.com if you need additional information or have any > > ++ * questions. > > + */ > > + > > + package javax.swing; > > Normally we only fix copyrights in new files; not files being modified. > Also, you are not doing this for 1.9. Any particular reason why? > 1.7 and 1.8 are Sun copyrighted. 1.9 is Oracle copyrighted. Please don't change the copyright on existing files; for one thing, it's pointless work :-) The only change needed is for new files in a backport with Sun copyright to be modified to the Oracle copyright when going into 1.9, 1.10 or HEAD. This is to make it easier to get it upstream later as Joe requires this for OpenJDK6 (so we don't revert back to Sun copyrights there). If it's done now, it doesn't matter. But don't waste your time changing them in future :-) > > > > > > hgexport1.8.patch > > > > > > > diff -r 326f7589d7e8 -r 934d7afe1f52 NEWS > > --- a/NEWS Tue Feb 15 23:02:33 2011 +0000 > > +++ b/NEWS Wed Feb 23 14:11:39 2011 -0500 > > @@ -10,6 +10,10 @@ > > > > New in release 1.8.8 (20XX-XX-XX): > > > > +* Backports > > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > > + > > New in release 1.8.7 (2011-02-15): > > > > * Security updates > > @@ -21,6 +25,8 @@ > > - S6985453, CVE-2010-4471: Java2D font-related system property leak > > - S6927050, CVE-2010-4470: JAXP untrusted component state manipulation > > - RH677332, CVE-2011-0706: Multiple signers privilege escalation > > + - S6675802: Regression: heavyweight popups cause SecurityExceptions in applets > > + - S6691503: Malicious applet can show always-on-top popup menu which has whole screen size > > * Bug fixes > > - RH676659: Pass -export-dynamic flag to linker using -Wl, as option in gcc 4.6+ is broken > > - Fix latent JAXP bug caused by missing import > > You are listing the same bugs twice in the NEWS file. I dont think > that's right. > There seems to be some patching error here. They should be listed once under the yet-to-be released 1.8.8, 1.7.11 and 1.9.8. All the others should be considered read-only sections as they are copies of release notes for releases that have been and gone. > Rest looks fine to me. > > Cheers, > OMair -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Wed Feb 23 13:55:54 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 21:55:54 +0000 Subject: /hg/icedtea6: Add the missing $. Message-ID: changeset 21f2a8d15854 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=21f2a8d15854 author: Andrew John Hughes date: Wed Feb 23 21:55:37 2011 +0000 Add the missing $. 2011-02-23 Andrew John Hughes * acinclude.m4: (IT_CHECK_WITH_CACAO_SRC_ZIP): Add missing $. (IT_CHECK_WITH_JAMVM_SRC_ZIP): Likewise. (IT_WITH_OPENJDK_SRC_ZIP): Likewise. (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. (IT_WITH_JAXP_DROP_ZIP): Likewise. (IT_WITH_JAF_DROP_ZIP): Likewise. (IT_WITH_JAXWS_DROP_ZIP): Likewise. diffstat: 2 files changed, 18 insertions(+), 7 deletions(-) ChangeLog | 11 +++++++++++ acinclude.m4 | 14 +++++++------- diffs (84 lines): diff -r f6c3aa89e083 -r 21f2a8d15854 ChangeLog --- a/ChangeLog Wed Feb 23 21:26:54 2011 +0000 +++ b/ChangeLog Wed Feb 23 21:55:37 2011 +0000 @@ -1,3 +1,14 @@ 2011-02-23 Andrew John Hughes + + * acinclude.m4: + (IT_CHECK_WITH_CACAO_SRC_ZIP): Add missing $. + (IT_CHECK_WITH_JAMVM_SRC_ZIP): Likewise. + (IT_WITH_OPENJDK_SRC_ZIP): Likewise. + (IT_WITH_HOTSPOT_SRC_ZIP): Likewise. + (IT_WITH_JAXP_DROP_ZIP): Likewise. + (IT_WITH_JAF_DROP_ZIP): Likewise. + (IT_WITH_JAXWS_DROP_ZIP): Likewise. + 2011-02-23 Andrew John Hughes * acinclude.m4: diff -r f6c3aa89e083 -r 21f2a8d15854 acinclude.m4 --- a/acinclude.m4 Wed Feb 23 21:26:54 2011 +0000 +++ b/acinclude.m4 Wed Feb 23 21:55:37 2011 +0000 @@ -608,7 +608,7 @@ AC_DEFUN([IT_WITH_OPENJDK_SRC_ZIP], [ ALT_OPENJDK_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test "x{ALT_OPENJDK_SRC_ZIP}" != "xnot specified") + AM_CONDITIONAL(USE_ALT_OPENJDK_SRC_ZIP, test "x${ALT_OPENJDK_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_OPENJDK_SRC_ZIP}) AC_SUBST(ALT_OPENJDK_SRC_ZIP) ]) @@ -938,7 +938,7 @@ AC_DEFUN([IT_WITH_JAMVM_SRC_ZIP], [ ALT_JAMVM_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test "x{ALT_JAMVM_SRC_ZIP}" != "xnot specified") + AM_CONDITIONAL(USE_ALT_JAMVM_SRC_ZIP, test "x${ALT_JAMVM_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAMVM_SRC_ZIP}) AC_SUBST(ALT_JAMVM_SRC_ZIP) ]) @@ -1001,7 +1001,7 @@ AC_DEFUN([IT_WITH_CACAO_SRC_ZIP], [ ALT_CACAO_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x{ALT_CACAO_SRC_ZIP}" != "xnot specified") + AM_CONDITIONAL(USE_ALT_CACAO_SRC_ZIP, test "x${ALT_CACAO_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_CACAO_SRC_ZIP}) AC_SUBST(ALT_CACAO_SRC_ZIP) ]) @@ -1081,7 +1081,7 @@ AC_DEFUN([IT_WITH_HOTSPOT_SRC_ZIP], [ ALT_HOTSPOT_SRC_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test "x{ALT_HOTSPOT_SRC_ZIP}" != "xnot specified") + AM_CONDITIONAL(USE_ALT_HOTSPOT_SRC_ZIP, test "x${ALT_HOTSPOT_SRC_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_HOTSPOT_SRC_ZIP}) AC_SUBST(ALT_HOTSPOT_SRC_ZIP) ]) @@ -1102,7 +1102,7 @@ AC_DEFUN([IT_WITH_JAXP_DROP_ZIP], [ ALT_JAXP_DROP_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAXP_DROP_ZIP, test "x{ALT_JAXP_DROP_ZIP}" != "xnot specified") + AM_CONDITIONAL(USE_ALT_JAXP_DROP_ZIP, test "x${ALT_JAXP_DROP_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAXP_DROP_ZIP}) AC_SUBST(ALT_JAXP_DROP_ZIP) ]) @@ -1123,7 +1123,7 @@ AC_DEFUN([IT_WITH_JAF_DROP_ZIP], [ ALT_JAF_DROP_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAF_DROP_ZIP, test "x{ALT_JAF_DROP_ZIP}" != "xnot specified") + AM_CONDITIONAL(USE_ALT_JAF_DROP_ZIP, test "x${ALT_JAF_DROP_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAF_DROP_ZIP}) AC_SUBST(ALT_JAF_DROP_ZIP) ]) @@ -1144,7 +1144,7 @@ AC_DEFUN([IT_WITH_JAXWS_DROP_ZIP], [ ALT_JAXWS_DROP_ZIP="not specified" ]) - AM_CONDITIONAL(USE_ALT_JAXWS_DROP_ZIP, test "x{ALT_JAXWS_DROP_ZIP}" != "xnot specified") + AM_CONDITIONAL(USE_ALT_JAXWS_DROP_ZIP, test "x${ALT_JAXWS_DROP_ZIP}" != "xnot specified") AC_MSG_RESULT(${ALT_JAXWS_DROP_ZIP}) AC_SUBST(ALT_JAXWS_DROP_ZIP) ]) From andrew at icedtea.classpath.org Wed Feb 23 14:26:59 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 22:26:59 +0000 Subject: /hg/icedtea6: Added tag icedtea6-1.10-branchpoint for changeset ... Message-ID: changeset ab9fdaab9e4a in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ab9fdaab9e4a author: Andrew John Hughes date: Wed Feb 23 22:26:48 2011 +0000 Added tag icedtea6-1.10-branchpoint for changeset 21f2a8d15854 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r 21f2a8d15854 -r ab9fdaab9e4a .hgtags --- a/.hgtags Wed Feb 23 21:55:37 2011 +0000 +++ b/.hgtags Wed Feb 23 22:26:48 2011 +0000 @@ -19,3 +19,4 @@ 8826d5735e2ca97ecdb35e7c977785d3e5b99556 8826d5735e2ca97ecdb35e7c977785d3e5b99556 icedtea-1.7-branchpoint 9420faca6468e1c75e9bfa73b31246ba0b73a77d icedtea6-1.8-branchpoint cb463b94b82da269ea089c481ed5e39700525a8a icedtea6-1.9-branchpoint +21f2a8d158545a161ba0d997c13bdba1e6166394 icedtea6-1.10-branchpoint From andrew at icedtea.classpath.org Wed Feb 23 14:28:05 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 22:28:05 +0000 Subject: /hg/icedtea6: Prepare for 1.11. Message-ID: changeset 286474c9997e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=286474c9997e author: Andrew John Hughes date: Wed Feb 23 22:28:01 2011 +0000 Prepare for 1.11. 2011-02-23 Andrew John Hughes * NEWS: Add 1.11 section. * configure.ac: Bump to 1.11pre. diffstat: 3 files changed, 8 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ NEWS | 2 ++ configure.ac | 2 +- diffs (33 lines): diff -r ab9fdaab9e4a -r 286474c9997e ChangeLog --- a/ChangeLog Wed Feb 23 22:26:48 2011 +0000 +++ b/ChangeLog Wed Feb 23 22:28:01 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-23 Andrew John Hughes + + * NEWS: Add 1.11 section. + * configure.ac: Bump to 1.11pre. + 2011-02-23 Andrew John Hughes * acinclude.m4: diff -r ab9fdaab9e4a -r 286474c9997e NEWS --- a/NEWS Wed Feb 23 22:26:48 2011 +0000 +++ b/NEWS Wed Feb 23 22:28:01 2011 +0000 @@ -7,6 +7,8 @@ GX - http://bugs.gentoo.org/show_bug.cg GX - http://bugs.gentoo.org/show_bug.cgi?id=X CVE-XXXX-YYYY: http://www.cve.mitre.org/cgi-bin/cvename.cgi?name=XXXX-YYYY + +New in release 1.11 (2011-XX-XX): New in release 1.10 (2011-XX-XX): diff -r ab9fdaab9e4a -r 286474c9997e configure.ac --- a/configure.ac Wed Feb 23 22:26:48 2011 +0000 +++ b/configure.ac Wed Feb 23 22:28:01 2011 +0000 @@ -1,4 +1,4 @@ AC_INIT([icedtea6],[1.10pre],[distro-pkg -AC_INIT([icedtea6],[1.10pre],[distro-pkg-dev at openjdk.java.net]) +AC_INIT([icedtea6],[1.11pre],[distro-pkg-dev at openjdk.java.net]) AM_INIT_AUTOMAKE([1.9 tar-pax foreign]) AC_CONFIG_FILES([Makefile]) From andrew at icedtea.classpath.org Wed Feb 23 14:39:30 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Wed, 23 Feb 2011 22:39:30 +0000 Subject: /hg/release/icedtea6-1.10: Added tag icedtea6-1.10-branch for ch... Message-ID: changeset 11791e43c0f4 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=11791e43c0f4 author: Andrew John Hughes date: Wed Feb 23 22:39:16 2011 +0000 Added tag icedtea6-1.10-branch for changeset 21f2a8d15854 diffstat: 1 file changed, 1 insertion(+) .hgtags | 1 + diffs (8 lines): diff -r 21f2a8d15854 -r 11791e43c0f4 .hgtags --- a/.hgtags Wed Feb 23 21:55:37 2011 +0000 +++ b/.hgtags Wed Feb 23 22:39:16 2011 +0000 @@ -19,3 +19,4 @@ 8826d5735e2ca97ecdb35e7c977785d3e5b99556 8826d5735e2ca97ecdb35e7c977785d3e5b99556 icedtea-1.7-branchpoint 9420faca6468e1c75e9bfa73b31246ba0b73a77d icedtea6-1.8-branchpoint cb463b94b82da269ea089c481ed5e39700525a8a icedtea6-1.9-branchpoint +21f2a8d158545a161ba0d997c13bdba1e6166394 icedtea6-1.10-branch From ahughes at redhat.com Wed Feb 23 14:49:33 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Wed, 23 Feb 2011 22:49:33 +0000 Subject: IcedTea6 1.10 Branch Open for Business! Release: 2nd of March, 2011 Message-ID: <20110223224933.GI24648@rivendell.middle-earth.co.uk> IcedTea6 has now officially branched for the 1.10 release. The planned release date is a week from now: *Wednesday, the 2nd of March, 2011* Please start your test machines! All commits to the 1.10 branch (as with other release branches) require PRIOR APPROVAL. Known issues: * Shark fails with hs20: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 * JamVM does not yet build (as in ./configure --enable-jamvm). If these issues are not resolved prior to the release date, the options will be disabled in configure and fixes welcome (dependent on approval) for later minor releases. If b22 is released prior to the release date with the expected minimal changes of security fix integration, IcedTea6 1.10 will use this release instead of the current b21. This avoids us having to carry those security fixes on the release branch permanently. For TCK users: We are aware that builds of IcedTea6 since the integration of b21 have failed the TCK. If this situation should not change prior to the release of 1.10, you may need to revert the following patches locally or apply your own fixes if a TCK pass is essential to your use of IcedTea6 1.10: * http://hg.openjdk.java.net/jdk6/jdk6/jaxp/rev/e83211607595 * http://hg.openjdk.java.net/jdk6/jdk6/langtools/rev/5c2858bccb3f We will not be reverting this in 1.10 itself as we feel this is detrimental to users who don't use or care about this proprietary test suite. Onwards to 1.11! -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Wed Feb 23 15:36:43 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 18:36:43 -0500 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <20110223175112.GW24648@rivendell.middle-earth.co.uk> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> Message-ID: <4D659A0B.7080005@redhat.com> On 02/23/2011 12:51 PM, Dr Andrew John Hughes wrote: > What is the motivation for this change? Assuming it still runs without > all-permissions, the change looks fine. > From my very limited testing, it doesnt :( With IcedTea-Web 1.0 $ ./javaws -about netx v0.5 - (C)2001-2003 Jon A. Maxwell (jmaxwell at users.sourceforge.net) Launching about window... net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. [snip] Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.net.sourceforge.jnlp.about) [snip] With IcedTea-Web HEAD before the change to non-JDK dirs: $ ./javaws -about icedtea-web 1.1pre+rd7fee305bd4f Launching about window... net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. [snip] Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.net.sourceforge.jnlp.about) [snip] (As an aside, I wonder why the hg revision shown does not correspond to the version used to build). With IcedTea-Web HEAD $ bin/javaws -about icedtea-web 1.1pre+rd7fee305bd4f Launching about window... JAR jar:file:/home/omajid/code/icedtea-web-image/share/icedtea-web/netx.jar!/net/sourceforge/jnlp/resources/about.jar not found. Continuing. net.sourceforge.jnlp.LaunchException: Fatal: Launch Error: Could not launch JNLP file. [snip] > Please do the Makefile.am change in a separate patch; it's easier to > debug and revert things when issues are separate. > I posted the Makefile.am patch right around the same time Jiri posted this one; Deepak approved it and I have pushed it to HEAD already. Omair From omajid at redhat.com Wed Feb 23 16:21:26 2011 From: omajid at redhat.com (Omair Majid) Date: Wed, 23 Feb 2011 19:21:26 -0500 Subject: [icedtea-web] RFC: versions should reflect the current changeset id, not repository tip Message-ID: <4D65A486.3030704@redhat.com> Hi, The attached patch makes it so that the IcedTea-Web version string includes the current changeset number, not the changeset number corresponding to tip. For people just checking out code or always building icedtea-web from (their) tip, the two are the same. But if you clone the latest version and update to a previous revision (say for bisecting), then the two numbers are quite different; it makes no sense to associate the changeset id for tip with the current changeset id. The attached patch uses hg id -i to obtain the current changeset id. As a slight bonus, the version string produced from hg id contains a '+' at the end if the changeset has been modified. For example, building from tip with this patch applied results in: 1.1pre+rd7fee305bd4f+ This should make it easier to tell if the build is based on a pristine changeset or contains local modifications. Any thoughts or comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: current-version-instead-of-tip.patch Type: text/x-patch Size: 552 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110223/b46ab773/current-version-instead-of-tip.patch From andrew at icedtea.classpath.org Wed Feb 23 16:44:20 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 24 Feb 2011 00:44:20 +0000 Subject: /hg/icedtea6: PR639: Add missing include line for Shark. Message-ID: changeset 883350003da5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=883350003da5 author: Andrew John Hughes date: Thu Feb 24 00:44:14 2011 +0000 PR639: Add missing include line for Shark. 2011-02-24 Andrew John Hughes * Makefile.am: Add new patch. * patches/pr639-missing_shark_include.patch: Add missing include for Shark. diffstat: 3 files changed, 20 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ Makefile.am | 3 ++- patches/pr639-missing_shark_include.patch | 12 ++++++++++++ diffs (42 lines): diff -r 286474c9997e -r 883350003da5 ChangeLog --- a/ChangeLog Wed Feb 23 22:28:01 2011 +0000 +++ b/ChangeLog Thu Feb 24 00:44:14 2011 +0000 @@ -1,3 +1,9 @@ 2011-02-23 Andrew John Hughes + + * Makefile.am: Add new patch. + * patches/pr639-missing_shark_include.patch: + Add missing include for Shark. + 2011-02-23 Andrew John Hughes * NEWS: Add 1.11 section. diff -r 286474c9997e -r 883350003da5 Makefile.am --- a/Makefile.am Wed Feb 23 22:28:01 2011 +0000 +++ b/Makefile.am Thu Feb 24 00:44:14 2011 +0000 @@ -325,7 +325,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/6663040-com.sun.awt.patch \ patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ patches/openjdk/6766342-AA-simple-shape-performance.patch \ - patches/pr600-arm-jvm.cfg.patch + patches/pr600-arm-jvm.cfg.patch \ + patches/pr639-missing_shark_include.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 286474c9997e -r 883350003da5 patches/pr639-missing_shark_include.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/pr639-missing_shark_include.patch Thu Feb 24 00:44:14 2011 +0000 @@ -0,0 +1,12 @@ +--- openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-01-25 22:57:24.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-02-24 00:28:58.000000000 +0000 +@@ -37,6 +37,9 @@ + #include "memory/allocation.inline.hpp" + #include "runtime/deoptimization.hpp" + #include "utilities/growableArray.hpp" ++#ifdef SHARK ++#include "shark/shark_globals.hpp" ++#endif + + // ciTypeFlow::JsrSet + // From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 16:53:10 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 00:53:10 +0000 Subject: [Bug 639] Shark fails with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 ------- Comment #1 from gnu_andrew at member.fsf.org 2011-02-24 00:53 ------- Fixed by http://icedtea.classpath.org/hg/icedtea6/rev/883350003da5 but still fails to link: Linking vm... echo Linking launcher... Linking launcher... gcc -m64 -Xlinker -O1 -m64 -Wl,-export-dynamic -L `pwd` -o gamma launcher/java_md.o launcher/wildcard.o launcher/java.o launcher/jli_util.o -ljvm -lm -ldl -lpthread /usr/lib/gcc/x86_64-pc-linux-gnu/4.5.2/../../../../x86_64-pc-linux-gnu/bin/ld: warning: libLLVM-2.8.so, needed by /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so, not found (try using -rpath or -rpath-link) /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkTraceInstalls' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkPrintAsmOf' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkMaxInlineSize' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkCompiler::free_compiled_method(unsigned char*)' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkPrintBitcodeOf' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkCompiler::SharkCompiler()' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkCompiler::generate_native_wrapper(MacroAssembler*, methodHandle, BasicType*, BasicType)' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `LLVMLinkInJIT' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `SharkPerformanceWarnings' /mnt/builder/shark6/openjdk.build-ecj/hotspot/outputdir/linux_amd64_shark/product/libjvm.so: undefined reference to `MaxNodeLimit' collect2: ld returned 1 exit status -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Wed Feb 23 16:54:06 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 24 Feb 2011 00:54:06 +0000 Subject: /hg/release/icedtea6-1.10: PR639: Add missing include line for S... Message-ID: changeset 31d8dc2212b0 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=31d8dc2212b0 author: Andrew John Hughes date: Thu Feb 24 00:44:14 2011 +0000 PR639: Add missing include line for Shark. 2011-02-24 Andrew John Hughes * Makefile.am: Add new patch. * patches/pr639-missing_shark_include.patch: Add missing include for Shark. diffstat: 3 files changed, 20 insertions(+), 1 deletion(-) ChangeLog | 6 ++++++ Makefile.am | 3 ++- patches/pr639-missing_shark_include.patch | 12 ++++++++++++ diffs (42 lines): diff -r 11791e43c0f4 -r 31d8dc2212b0 ChangeLog --- a/ChangeLog Wed Feb 23 22:39:16 2011 +0000 +++ b/ChangeLog Thu Feb 24 00:44:14 2011 +0000 @@ -1,3 +1,9 @@ 2011-02-23 Andrew John Hughes + + * Makefile.am: Add new patch. + * patches/pr639-missing_shark_include.patch: + Add missing include for Shark. + 2011-02-23 Andrew John Hughes * acinclude.m4: diff -r 11791e43c0f4 -r 31d8dc2212b0 Makefile.am --- a/Makefile.am Wed Feb 23 22:39:16 2011 +0000 +++ b/Makefile.am Thu Feb 24 00:44:14 2011 +0000 @@ -325,7 +325,8 @@ ICEDTEA_PATCHES = \ patches/openjdk/6663040-com.sun.awt.patch \ patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ patches/openjdk/6766342-AA-simple-shape-performance.patch \ - patches/pr600-arm-jvm.cfg.patch + patches/pr600-arm-jvm.cfg.patch \ + patches/pr639-missing_shark_include.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 11791e43c0f4 -r 31d8dc2212b0 patches/pr639-missing_shark_include.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/pr639-missing_shark_include.patch Thu Feb 24 00:44:14 2011 +0000 @@ -0,0 +1,12 @@ +--- openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-01-25 22:57:24.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-02-24 00:28:58.000000000 +0000 +@@ -37,6 +37,9 @@ + #include "memory/allocation.inline.hpp" + #include "runtime/deoptimization.hpp" + #include "utilities/growableArray.hpp" ++#ifdef SHARK ++#include "shark/shark_globals.hpp" ++#endif + + // ciTypeFlow::JsrSet + // From dj at lucasit.com Wed Feb 23 16:56:33 2011 From: dj at lucasit.com (DJ Lucas) Date: Wed, 23 Feb 2011 18:56:33 -0600 Subject: Typo in Makefile.am 1.19 (and HEAD?) Message-ID: <4D65ACC1.2080505@lucasit.com> Rediffing my patches, I found a typo in Makefile.am in 1.10 (probably also in HEAD). In the icedtea-debug target you have: stamps/add/tzdata-support-debug.stamp Should be: stamps/add-tzdata-support-debug.stamp ^ -- DJ Lucas -- This message has been scanned for viruses and dangerous content, and is believed to be clean. From ahughes at redhat.com Wed Feb 23 16:59:39 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 00:59:39 +0000 Subject: IcedTea6 1.10 Branch Open for Business! Release: 2nd of March, 2011 In-Reply-To: <20110223224933.GI24648@rivendell.middle-earth.co.uk> References: <20110223224933.GI24648@rivendell.middle-earth.co.uk> Message-ID: <20110224005939.GJ24648@rivendell.middle-earth.co.uk> On 22:49 Wed 23 Feb , Dr Andrew John Hughes wrote: > IcedTea6 has now officially branched for the 1.10 release. > The planned release date is a week from now: *Wednesday, the 2nd of March, 2011* > Please start your test machines! > All commits to the 1.10 branch (as with other release branches) require PRIOR APPROVAL. > > Known issues: > * Shark fails with hs20: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 > * JamVM does not yet build (as in ./configure --enable-jamvm). > > If these issues are not resolved prior to the release date, the options will be > disabled in configure and fixes welcome (dependent on approval) for later minor > releases. > > If b22 is released prior to the release date with the expected minimal changes of > security fix integration, IcedTea6 1.10 will use this release instead of the current > b21. This avoids us having to carry those security fixes on the release branch > permanently. > > For TCK users: > > We are aware that builds of IcedTea6 since the integration of b21 have failed the TCK. > If this situation should not change prior to the release of 1.10, you may need to > revert the following patches locally or apply your own fixes if a TCK pass is essential > to your use of IcedTea6 1.10: > * http://hg.openjdk.java.net/jdk6/jdk6/jaxp/rev/e83211607595 > * http://hg.openjdk.java.net/jdk6/jdk6/langtools/rev/5c2858bccb3f > We will not be reverting this in 1.10 itself as we feel this is detrimental to users > who don't use or care about this proprietary test suite. > > Onwards to 1.11! > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 I made progress on the Shark issue via http://icedtea.classpath.org/hg/icedtea6/rev/883350003da5 It still fails to link though :-( -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dj at lucasit.com Wed Feb 23 17:00:50 2011 From: dj at lucasit.com (DJ Lucas) Date: Wed, 23 Feb 2011 19:00:50 -0600 Subject: Typo in Makefile.am IcedTea6-1.10 (and HEAD?) In-Reply-To: <4D65ACC1.2080505@lucasit.com> References: <4D65ACC1.2080505@lucasit.com> Message-ID: <4D65ADC2.2080901@lucasit.com> On 02/23/2011 06:56 PM, DJ Lucas wrote: > Rediffing my patches, I found a typo in Makefile.am in 1.10 (probably > also in HEAD). In the icedtea-debug target you have: > > stamps/add/tzdata-support-debug.stamp > > Should be: > > stamps/add-tzdata-support-debug.stamp > ^ > > -- DJ Lucas > > Grrr...that should have read IcedTea6-1.10 (not 1.19). Sorry for the confusion. -- DJ Lucas -- This message has been scanned for viruses and dangerous content, and is believed to be clean. From ahughes at redhat.com Wed Feb 23 17:12:09 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 01:12:09 +0000 Subject: Typo in Makefile.am IcedTea6-1.10 (and HEAD?) In-Reply-To: <4D65ADC2.2080901@lucasit.com> References: <4D65ACC1.2080505@lucasit.com> <4D65ADC2.2080901@lucasit.com> Message-ID: <20110224011208.GK24648@rivendell.middle-earth.co.uk> On 19:00 Wed 23 Feb , DJ Lucas wrote: > On 02/23/2011 06:56 PM, DJ Lucas wrote: > > Rediffing my patches, I found a typo in Makefile.am in 1.10 (probably > > also in HEAD). In the icedtea-debug target you have: > > > > stamps/add/tzdata-support-debug.stamp > > > > Should be: > > > > stamps/add-tzdata-support-debug.stamp > > ^ > > > > -- DJ Lucas > > > > > Grrr...that should have read IcedTea6-1.10 (not 1.19). Sorry for the > confusion. > It's ok, got it anyway. I'll fix it shortly. Thanks for spotting. Clearly no-one builds the debug build ;-) > -- DJ Lucas > > > -- > This message has been scanned for viruses and > dangerous content, and is believed to be clean. > -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Wed Feb 23 17:40:15 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 24 Feb 2011 01:40:15 +0000 Subject: /hg/icedtea6: Only apply PR639 fix on hs20. Message-ID: changeset 9b2c580934df in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=9b2c580934df author: Andrew John Hughes date: Thu Feb 24 01:40:07 2011 +0000 Only apply PR639 fix on hs20. 2011-02-24 Andrew John Hughes * Makefile.am: Only apply PR639 fix on hs20. * NEWS: Updated. diffstat: 3 files changed, 11 insertions(+), 2 deletions(-) ChangeLog | 6 ++++++ Makefile.am | 6 ++++-- NEWS | 1 + diffs (46 lines): diff -r 883350003da5 -r 9b2c580934df ChangeLog --- a/ChangeLog Thu Feb 24 00:44:14 2011 +0000 +++ b/ChangeLog Thu Feb 24 01:40:07 2011 +0000 @@ -1,3 +1,9 @@ 2011-02-24 Andrew John Hughes + + * Makefile.am: + Only apply PR639 fix on hs20. + * NEWS: Updated. + 2011-02-24 Andrew John Hughes * Makefile.am: Add new patch. diff -r 883350003da5 -r 9b2c580934df Makefile.am --- a/Makefile.am Thu Feb 24 00:44:14 2011 +0000 +++ b/Makefile.am Thu Feb 24 01:40:07 2011 +0000 @@ -325,14 +325,16 @@ ICEDTEA_PATCHES = \ patches/openjdk/6663040-com.sun.awt.patch \ patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ patches/openjdk/6766342-AA-simple-shape-performance.patch \ - patches/pr600-arm-jvm.cfg.patch \ - patches/pr639-missing_shark_include.patch + patches/pr600-arm-jvm.cfg.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ patches/hotspot/$(HSBUILD)/no-precompiled-headers.patch \ patches/hotspot/$(HSBUILD)/too-many-args.patch \ patches/openjdk/6997495-test_correction_6857159.patch +else +ICEDTEA_PATCHES += \ + patches/pr639-missing_shark_include.patch endif if WITH_RHINO diff -r 883350003da5 -r 9b2c580934df NEWS --- a/NEWS Thu Feb 24 00:44:14 2011 +0000 +++ b/NEWS Thu Feb 24 01:40:07 2011 +0000 @@ -442,6 +442,7 @@ New in release 1.10 (2011-XX-XX): - PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 - PR586: Sources missing from src.zip + - PR639: Add missing include line for Shark. * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. From andrew at icedtea.classpath.org Wed Feb 23 17:40:44 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 24 Feb 2011 01:40:44 +0000 Subject: /hg/release/icedtea6-1.10: Only apply PR639 fix on hs20. Message-ID: changeset 07b540ab66e5 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=07b540ab66e5 author: Andrew John Hughes date: Thu Feb 24 01:40:07 2011 +0000 Only apply PR639 fix on hs20. 2011-02-24 Andrew John Hughes * Makefile.am: Only apply PR639 fix on hs20. * NEWS: Updated. diffstat: 3 files changed, 11 insertions(+), 2 deletions(-) ChangeLog | 6 ++++++ Makefile.am | 6 ++++-- NEWS | 1 + diffs (46 lines): diff -r 31d8dc2212b0 -r 07b540ab66e5 ChangeLog --- a/ChangeLog Thu Feb 24 00:44:14 2011 +0000 +++ b/ChangeLog Thu Feb 24 01:40:07 2011 +0000 @@ -1,3 +1,9 @@ 2011-02-24 Andrew John Hughes + + * Makefile.am: + Only apply PR639 fix on hs20. + * NEWS: Updated. + 2011-02-24 Andrew John Hughes * Makefile.am: Add new patch. diff -r 31d8dc2212b0 -r 07b540ab66e5 Makefile.am --- a/Makefile.am Thu Feb 24 00:44:14 2011 +0000 +++ b/Makefile.am Thu Feb 24 01:40:07 2011 +0000 @@ -325,14 +325,16 @@ ICEDTEA_PATCHES = \ patches/openjdk/6663040-com.sun.awt.patch \ patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ patches/openjdk/6766342-AA-simple-shape-performance.patch \ - patches/pr600-arm-jvm.cfg.patch \ - patches/pr639-missing_shark_include.patch + patches/pr600-arm-jvm.cfg.patch if !WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ patches/hotspot/$(HSBUILD)/no-precompiled-headers.patch \ patches/hotspot/$(HSBUILD)/too-many-args.patch \ patches/openjdk/6997495-test_correction_6857159.patch +else +ICEDTEA_PATCHES += \ + patches/pr639-missing_shark_include.patch endif if WITH_RHINO diff -r 31d8dc2212b0 -r 07b540ab66e5 NEWS --- a/NEWS Thu Feb 24 00:44:14 2011 +0000 +++ b/NEWS Thu Feb 24 01:40:07 2011 +0000 @@ -440,6 +440,7 @@ New in release 1.10 (2011-XX-XX): - PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 - PR586: Sources missing from src.zip + - PR639: Add missing include line for Shark. * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. From dj at lucasit.com Wed Feb 23 17:48:10 2011 From: dj at lucasit.com (DJ Lucas) Date: Wed, 23 Feb 2011 19:48:10 -0600 Subject: Xerces-2.10+ in ecj-bootstrap Message-ID: <4D65B8DA.4050101@lucasit.com> This came up a couple of months ago on list and I wanted to bring it back up now that 1.10 has branched. http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2010-December/011293.html At the time, I regretfully said that I didn't think it was important, but changed my own mind in a couple of days as I couldn't see one of my users having a really old version of Xerces laying around, and the possibility of them installing newer was something that I wanted to nip before it happened. I'm currently using this simple patch as a workaround: http://www.linuxfromscratch.org/patches/blfs/svn/icedtea6-1.9.7-xerces2_10-1.patch I don't know exactly how old would be considered too old, but it looks like the xml-apis.jar file has been there for a while, but I haven't tested with anything older than 2.9, for which the patch is not required but doesn't cause any harm with icedtea in java-home. I also have not tested with gcj in java-home. Further in the previously mentioned thread, Andrew had suggested that if the bootstrap compiler was IcedTea, that test cases be added to see if the bootstrap compiler was capable without the need for the external project files. I haven't yet put any time into that (a couple extra meg for my users is just not a big deal as I'd imagine it's not likely a big deal for most maintainers). -- DJ Lucas -- This message has been scanned for viruses and dangerous content, and is believed to be clean. From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 18:06:59 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 02:06:59 +0000 Subject: [Bug 639] Shark fails with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 ------- Comment #2 from gnu_andrew at member.fsf.org 2011-02-24 02:06 ------- The LLVM library issue can be fixed but is a misnomer as to the real issue. >From my logs, it doesn't seem to be compiling any of the Shark code. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Wed Feb 23 19:23:01 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 24 Feb 2011 03:23:01 +0000 Subject: /hg/icedtea6: PR639: Add missing paths and LLVM flags for Shark. Message-ID: changeset 6e7f2c1f25df in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=6e7f2c1f25df author: Andrew John Hughes date: Thu Feb 24 03:22:54 2011 +0000 PR639: Add missing paths and LLVM flags for Shark. 2011-02-24 Andrew John Hughes * patches/pr639-missing_shark_include.patch: Renamed. * Makefile.am: Fix name of patch. * NEWS: Updated. * patches/pr639-broken_shark_build.patch: Fix other Shark build issues with missing compilation of Shark files and lack of LLVM linker flags for the launcher. diffstat: 5 files changed, 57 insertions(+), 14 deletions(-) ChangeLog | 11 +++++++ Makefile.am | 2 - NEWS | 2 - patches/pr639-broken_shark_build.patch | 44 +++++++++++++++++++++++++++++ patches/pr639-missing_shark_include.patch | 12 ------- diffs (106 lines): diff -r 9b2c580934df -r 6e7f2c1f25df ChangeLog --- a/ChangeLog Thu Feb 24 01:40:07 2011 +0000 +++ b/ChangeLog Thu Feb 24 03:22:54 2011 +0000 @@ -1,3 +1,14 @@ 2011-02-24 Andrew John Hughes + + * patches/pr639-missing_shark_include.patch: + Renamed. + * Makefile.am: Fix name of patch. + * NEWS: Updated. + * patches/pr639-broken_shark_build.patch: + Fix other Shark build issues with missing + compilation of Shark files and lack of + LLVM linker flags for the launcher. + 2011-02-24 Andrew John Hughes * Makefile.am: diff -r 9b2c580934df -r 6e7f2c1f25df Makefile.am --- a/Makefile.am Thu Feb 24 01:40:07 2011 +0000 +++ b/Makefile.am Thu Feb 24 03:22:54 2011 +0000 @@ -334,7 +334,7 @@ ICEDTEA_PATCHES += \ patches/openjdk/6997495-test_correction_6857159.patch else ICEDTEA_PATCHES += \ - patches/pr639-missing_shark_include.patch + patches/pr639-broken_shark_build.patch endif if WITH_RHINO diff -r 9b2c580934df -r 6e7f2c1f25df NEWS --- a/NEWS Thu Feb 24 01:40:07 2011 +0000 +++ b/NEWS Thu Feb 24 03:22:54 2011 +0000 @@ -442,7 +442,7 @@ New in release 1.10 (2011-XX-XX): - PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 - PR586: Sources missing from src.zip - - PR639: Add missing include line for Shark. + - PR639: Add missing include line, paths and LLVM flags for Shark. * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. diff -r 9b2c580934df -r 6e7f2c1f25df patches/pr639-broken_shark_build.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/pr639-broken_shark_build.patch Thu Feb 24 03:22:54 2011 +0000 @@ -0,0 +1,44 @@ +--- openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-01-25 22:57:24.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-02-24 00:28:58.000000000 +0000 +@@ -37,6 +37,9 @@ + #include "memory/allocation.inline.hpp" + #include "runtime/deoptimization.hpp" + #include "utilities/growableArray.hpp" ++#ifdef SHARK ++#include "shark/shark_globals.hpp" ++#endif + + // ciTypeFlow::JsrSet + // +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2011-02-23 21:28:45.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2011-02-24 02:17:30.000000000 +0000 +@@ -139,13 +139,15 @@ + COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt + COMPILER2_PATHS += $(GENERATED)/adfiles + ++SHARK_PATHS := $(GAMMADIR)/src/share/vm/shark ++ + # Include dirs per type. + Src_Dirs/CORE := $(CORE_PATHS) + Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) + Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS) + Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) + Src_Dirs/ZERO := $(CORE_PATHS) +-Src_Dirs/SHARK := $(CORE_PATHS) ++Src_Dirs/SHARK := $(CORE_PATHS) $(SHARK_PATHS) + Src_Dirs := $(Src_Dirs/$(TYPE)) + + COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\* +--- openjdk.orig/hotspot/make/linux/makefiles/launcher.make 2011-02-22 16:51:24.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/launcher.make 2011-02-24 03:01:36.000000000 +0000 +@@ -52,6 +52,10 @@ + LAUNCHER.o = launcher.o + LFLAGS_LAUNCHER += -L `pwd` + LIBS_LAUNCHER += -l$(JVM) $(LIBS) ++ ifeq ($(SHARK_BUILD), true) ++ LFLAGS_LAUNCHER += $(LLVM_LDFLAGS) ++ LIBS_LAUNCHER += $(LLVM_LIBS) ++ endif + endif + + LINK_LAUNCHER = $(LINK.c) diff -r 9b2c580934df -r 6e7f2c1f25df patches/pr639-missing_shark_include.patch --- a/patches/pr639-missing_shark_include.patch Thu Feb 24 01:40:07 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ ---- openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-01-25 22:57:24.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-02-24 00:28:58.000000000 +0000 -@@ -37,6 +37,9 @@ - #include "memory/allocation.inline.hpp" - #include "runtime/deoptimization.hpp" - #include "utilities/growableArray.hpp" -+#ifdef SHARK -+#include "shark/shark_globals.hpp" -+#endif - - // ciTypeFlow::JsrSet - // From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 19:26:44 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 03:26:44 +0000 Subject: [Bug 639] Shark fails with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #3 from gnu_andrew at member.fsf.org 2011-02-24 03:26 ------- Fixed both issues in http://icedtea.classpath.org/hg/icedtea6/rev/6e7f2c1f25df vm.make was filtering out shark from the list of core files, but then never actually adding them at all. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 19:27:40 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 03:27:40 +0000 Subject: [Bug 639] Shark fails with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6-1.10 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From andrew at icedtea.classpath.org Wed Feb 23 19:28:23 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Thu, 24 Feb 2011 03:28:23 +0000 Subject: /hg/release/icedtea6-1.10: PR639: Add missing paths and LLVM fla... Message-ID: changeset 6ac1377e670b in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=6ac1377e670b author: Andrew John Hughes date: Thu Feb 24 03:22:54 2011 +0000 PR639: Add missing paths and LLVM flags for Shark. 2011-02-24 Andrew John Hughes * patches/pr639-missing_shark_include.patch: Renamed. * Makefile.am: Fix name of patch. * NEWS: Updated. * patches/pr639-broken_shark_build.patch: Fix other Shark build issues with missing compilation of Shark files and lack of LLVM linker flags for the launcher. diffstat: 5 files changed, 57 insertions(+), 14 deletions(-) ChangeLog | 11 +++++++ Makefile.am | 2 - NEWS | 2 - patches/pr639-broken_shark_build.patch | 44 +++++++++++++++++++++++++++++ patches/pr639-missing_shark_include.patch | 12 ------- diffs (106 lines): diff -r 07b540ab66e5 -r 6ac1377e670b ChangeLog --- a/ChangeLog Thu Feb 24 01:40:07 2011 +0000 +++ b/ChangeLog Thu Feb 24 03:22:54 2011 +0000 @@ -1,3 +1,14 @@ 2011-02-24 Andrew John Hughes + + * patches/pr639-missing_shark_include.patch: + Renamed. + * Makefile.am: Fix name of patch. + * NEWS: Updated. + * patches/pr639-broken_shark_build.patch: + Fix other Shark build issues with missing + compilation of Shark files and lack of + LLVM linker flags for the launcher. + 2011-02-24 Andrew John Hughes * Makefile.am: diff -r 07b540ab66e5 -r 6ac1377e670b Makefile.am --- a/Makefile.am Thu Feb 24 01:40:07 2011 +0000 +++ b/Makefile.am Thu Feb 24 03:22:54 2011 +0000 @@ -334,7 +334,7 @@ ICEDTEA_PATCHES += \ patches/openjdk/6997495-test_correction_6857159.patch else ICEDTEA_PATCHES += \ - patches/pr639-missing_shark_include.patch + patches/pr639-broken_shark_build.patch endif if WITH_RHINO diff -r 07b540ab66e5 -r 6ac1377e670b NEWS --- a/NEWS Thu Feb 24 01:40:07 2011 +0000 +++ b/NEWS Thu Feb 24 03:22:54 2011 +0000 @@ -440,7 +440,7 @@ New in release 1.10 (2011-XX-XX): - PR633: IcedTea installs javaws manpages on x86 even with --disable-webstart - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 - PR586: Sources missing from src.zip - - PR639: Add missing include line for Shark. + - PR639: Add missing include line, paths and LLVM flags for Shark. * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. diff -r 07b540ab66e5 -r 6ac1377e670b patches/pr639-broken_shark_build.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/pr639-broken_shark_build.patch Thu Feb 24 03:22:54 2011 +0000 @@ -0,0 +1,44 @@ +--- openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-01-25 22:57:24.000000000 +0000 ++++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-02-24 00:28:58.000000000 +0000 +@@ -37,6 +37,9 @@ + #include "memory/allocation.inline.hpp" + #include "runtime/deoptimization.hpp" + #include "utilities/growableArray.hpp" ++#ifdef SHARK ++#include "shark/shark_globals.hpp" ++#endif + + // ciTypeFlow::JsrSet + // +--- openjdk.orig/hotspot/make/linux/makefiles/vm.make 2011-02-23 21:28:45.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/vm.make 2011-02-24 02:17:30.000000000 +0000 +@@ -139,13 +139,15 @@ + COMPILER2_PATHS += $(GAMMADIR)/src/share/vm/libadt + COMPILER2_PATHS += $(GENERATED)/adfiles + ++SHARK_PATHS := $(GAMMADIR)/src/share/vm/shark ++ + # Include dirs per type. + Src_Dirs/CORE := $(CORE_PATHS) + Src_Dirs/COMPILER1 := $(CORE_PATHS) $(COMPILER1_PATHS) + Src_Dirs/COMPILER2 := $(CORE_PATHS) $(COMPILER2_PATHS) + Src_Dirs/TIERED := $(CORE_PATHS) $(COMPILER1_PATHS) $(COMPILER2_PATHS) + Src_Dirs/ZERO := $(CORE_PATHS) +-Src_Dirs/SHARK := $(CORE_PATHS) ++Src_Dirs/SHARK := $(CORE_PATHS) $(SHARK_PATHS) + Src_Dirs := $(Src_Dirs/$(TYPE)) + + COMPILER2_SPECIFIC_FILES := opto libadt bcEscapeAnalyzer.cpp chaitin\* c2_\* runtime_\* +--- openjdk.orig/hotspot/make/linux/makefiles/launcher.make 2011-02-22 16:51:24.000000000 +0000 ++++ openjdk/hotspot/make/linux/makefiles/launcher.make 2011-02-24 03:01:36.000000000 +0000 +@@ -52,6 +52,10 @@ + LAUNCHER.o = launcher.o + LFLAGS_LAUNCHER += -L `pwd` + LIBS_LAUNCHER += -l$(JVM) $(LIBS) ++ ifeq ($(SHARK_BUILD), true) ++ LFLAGS_LAUNCHER += $(LLVM_LDFLAGS) ++ LIBS_LAUNCHER += $(LLVM_LIBS) ++ endif + endif + + LINK_LAUNCHER = $(LINK.c) diff -r 07b540ab66e5 -r 6ac1377e670b patches/pr639-missing_shark_include.patch --- a/patches/pr639-missing_shark_include.patch Thu Feb 24 01:40:07 2011 +0000 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,12 +0,0 @@ ---- openjdk.orig/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-01-25 22:57:24.000000000 +0000 -+++ openjdk/hotspot/src/share/vm/ci/ciTypeFlow.cpp 2011-02-24 00:28:58.000000000 +0000 -@@ -37,6 +37,9 @@ - #include "memory/allocation.inline.hpp" - #include "runtime/deoptimization.hpp" - #include "utilities/growableArray.hpp" -+#ifdef SHARK -+#include "shark/shark_globals.hpp" -+#endif - - // ciTypeFlow::JsrSet - // From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 19:31:15 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 03:31:15 +0000 Subject: [Bug 639] Shark fails with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED | ------- Comment #4 from gnu_andrew at member.fsf.org 2011-02-24 03:31 ------- Jumped too soon: dl failure on line 696Error: failed /mnt/builder/shark6/openjdk.build-ecj/j2sdk-image/jre/lib/amd64/server/libjvm.so, because libLLVM-2.8.so: cannot open shared object file: No such file or directory /home/andrew/builder/shark6/bootstrap/jdk1.6.0/bin/java cannot be found or is corrupted. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Wed Feb 23 20:09:07 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 04:09:07 +0000 Subject: [Bug 641] New: [powerpc] hs20 fails to build (stack size specified is too small, Specify at least 1024k) Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=641 Summary: [powerpc] hs20 fails to build (stack size specified is too small, Specify at least 1024k) Product: IcedTea Version: 6-hg Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: Zero AssignedTo: unassigned at icedtea.classpath.org ReportedBy: doko at ubuntu.com 6-1.10 and 6-hg: stage1 succeeds, then stage2 fails. hs19 builds ok. make[4]: Leaving directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/langtools/make' /bin/mkdir -p /home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk.build/corba (cd ./corba/make && \ /usr/bin/make JDK_TOPDIR=/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/jdk JDK_MAKE_SHARED_DIR=/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/jdk/make/common/shared EXTERNALSANITYCONTROL=true TARGET_CLASS_VERSION=5 MILESTONE=fcs BUILD_NUMBER=b21 JDK_BUILD_NUMBER=b21 FULL_VERSION=1.6.0_21-b21 PREVIOUS_JDK_VERSION=1.6.0 JDK_VERSION=1.6.0_21 JDK_MKTG_VERSION=6u21 JDK_MAJOR_VERSION=1 JDK_MINOR_VERSION=6 JDK_MICRO_VERSION=0 ARCH_DATA_MODEL=32 COOKED_JDK_UPDATE_VERSION=210 COOKED_BUILD_NUMBER=21 ALT_OUTPUTDIR=/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk.build/corba ALT_BOOTDIR=/home/doko/packages/p/openjdk-6-6b21~pre3/build/bootstrap/jdk1.6.0 ALT_JDK_IMPORT_PATH=/home/doko/packages/p/openjdk-6-6b21~pre3/build/bootstrap/jdk1.6.0 ALT_LANGTOOLS_DIST=/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk.build/langtools/dist all) make[4]: Entering directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/corba/make' Begin Processing SUBDIRS: tools javax org sun com >>>Recursively making tools build @ Thu Feb 24 04:03:03 UTC 2011 ... make[5]: Entering directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/corba/make/tools' Begin Processing SUBDIRS: strip_properties idlj logutil >>>Recursively making strip_properties build @ Thu Feb 24 04:03:03 UTC 2011 ... make[6]: Entering directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/corba/make/tools/strip_properties' /home/doko/packages/p/openjdk-6-6b21~pre3/build/bootstrap/jdk1.6.0/bin/javac -J-XX:ThreadStackSize=768 -J-client -J-Xmx896m -J-Xms128m -J-XX:PermSize=32m -J-XX:MaxPermSize=160m -encoding ascii -source 5 -target 5 -d /home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk.build/corba/btclasses \ -sourcepath ../../tools/src ../../tools/src/build/tools/stripproperties/StripProperties.java The stack size specified is too small, Specify at least 1024k Could not create the Java virtual machine. make[6]: *** [/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk.build/corba/btjars/stripproperties.jar] Error 1 make[6]: Leaving directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/corba/make/tools/strip_properties' make[5]: *** [build] Error 1 make[5]: Leaving directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/corba/make/tools' make[4]: *** [build] Error 1 make[4]: Leaving directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk/corba/make' make[3]: *** [corba-build] Error 2 make[3]: Leaving directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk' make[2]: *** [build_product_image] Error 2 make[2]: Leaving directory `/home/doko/packages/p/openjdk-6-6b21~pre3/build/openjdk' make[1]: *** [stamps/icedtea.stamp] Error 2 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From doko at ubuntu.com Wed Feb 23 20:34:56 2011 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 24 Feb 2011 05:34:56 +0100 Subject: IcedTea6 1.10 Branch Open for Business! Release: 2nd of March, 2011 In-Reply-To: <20110224005939.GJ24648@rivendell.middle-earth.co.uk> References: <20110223224933.GI24648@rivendell.middle-earth.co.uk> <20110224005939.GJ24648@rivendell.middle-earth.co.uk> Message-ID: <4D65DFF0.9010802@ubuntu.com> On 24.02.2011 01:59, Dr Andrew John Hughes wrote: > On 22:49 Wed 23 Feb , Dr Andrew John Hughes wrote: >> IcedTea6 has now officially branched for the 1.10 release. >> The planned release date is a week from now: *Wednesday, the 2nd of March, 2011* >> Please start your test machines! >> All commits to the 1.10 branch (as with other release branches) require PRIOR APPROVAL. >> >> Known issues: >> * Shark fails with hs20: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 >> * JamVM does not yet build (as in ./configure --enable-jamvm). More issues: * JamVM fails to build on powerpc * hs20 fails to build on powerpc, see PR641. >> If these issues are not resolved prior to the release date, the options will be >> disabled in configure and fixes welcome (dependent on approval) for later minor >> releases. >> >> If b22 is released prior to the release date with the expected minimal changes of >> security fix integration, IcedTea6 1.10 will use this release instead of the current >> b21. This avoids us having to carry those security fixes on the release branch >> permanently. > I made progress on the Shark issue via http://icedtea.classpath.org/hg/icedtea6/rev/883350003da5 > It still fails to link though :-( it works on Debian/Ubuntu. If the shared library is not installed in /usr/lib, shouldn't llvm-config or LLVM_LDFLAGS be adjusted? Matthias From ahughes at redhat.com Thu Feb 24 02:05:55 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 10:05:55 +0000 Subject: IcedTea6 1.10 Branch Open for Business! Release: 2nd of March, 2011 In-Reply-To: <4D65DFF0.9010802@ubuntu.com> References: <20110223224933.GI24648@rivendell.middle-earth.co.uk> <20110224005939.GJ24648@rivendell.middle-earth.co.uk> <4D65DFF0.9010802@ubuntu.com> Message-ID: <20110224100555.GA3448@rivendell.middle-earth.co.uk> On 05:34 Thu 24 Feb , Matthias Klose wrote: > On 24.02.2011 01:59, Dr Andrew John Hughes wrote: > > On 22:49 Wed 23 Feb , Dr Andrew John Hughes wrote: > >> IcedTea6 has now officially branched for the 1.10 release. > >> The planned release date is a week from now: *Wednesday, the 2nd of March, 2011* > >> Please start your test machines! > >> All commits to the 1.10 branch (as with other release branches) require PRIOR APPROVAL. > >> > >> Known issues: > >> * Shark fails with hs20: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 > >> * JamVM does not yet build (as in ./configure --enable-jamvm). > > More issues: > > * JamVM fails to build on powerpc Fails to build for me too (see above), I've already reported this to Xerces. What are the details of your failure? > * hs20 fails to build on powerpc, see PR641. > So in short we need to bump -J-XX:ThreadStackSize=768 to 1024. I can patch this, but you'll at least have to test it. > >> If these issues are not resolved prior to the release date, the options will be > >> disabled in configure and fixes welcome (dependent on approval) for later minor > >> releases. > >> > >> If b22 is released prior to the release date with the expected minimal changes of > >> security fix integration, IcedTea6 1.10 will use this release instead of the current > >> b21. This avoids us having to carry those security fixes on the release branch > >> permanently. > > > I made progress on the Shark issue via http://icedtea.classpath.org/hg/icedtea6/rev/883350003da5 > > It still fails to link though :-( > > it works on Debian/Ubuntu. If the shared library is not installed in /usr/lib, > shouldn't llvm-config or LLVM_LDFLAGS be adjusted? > I doubt it did before: http://icedtea.classpath.org/hg/icedtea6/rev/6e7f2c1f25df as it wasn't actually compiling any of the Shark code. The problem is now that OpenJDK builds but doesn't run as it can find libLLVM. I guess we need to use -rpath or something so it can find the library it linked against during build at run-time. Unless you have any better suggestions? > Matthias -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From mjw at icedtea.classpath.org Thu Feb 24 04:54:33 2011 From: mjw at icedtea.classpath.org (mjw at icedtea.classpath.org) Date: Thu, 24 Feb 2011 12:54:33 +0000 Subject: /hg/buildbot: Add icedtea6-squeeze-x86_64-quick-shark builder. Message-ID: changeset 1866231bf5e8 in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=1866231bf5e8 author: Mark Wielaard date: Thu Feb 24 13:54:19 2011 +0100 Add icedtea6-squeeze-x86_64-quick-shark builder. diffstat: 1 file changed, 25 insertions(+) icedtea/master.cfg | 25 +++++++++++++++++++++++++ diffs (56 lines): diff -r 08aadbc57f29 -r 1866231bf5e8 icedtea/master.cfg --- a/icedtea/master.cfg Wed Feb 23 22:26:53 2011 +0100 +++ b/icedtea/master.cfg Thu Feb 24 13:54:19 2011 +0100 @@ -62,6 +62,7 @@ c['schedulers'].append(Scheduler(name="i "icedtea6-squeeze-x86_64-quick-hotspot", "icedtea6-squeeze-x86_64-quick-jamvm", "icedtea6-squeeze-x86_64-quick-cacao", + "icedtea6-squeeze-x86_64-quick-shark", "icedtea6-natty-armv7l-quick", "icedtea6-natty-armv7l-quick-cacao", "icedtea6-natty-armv7l-quick-jamvm", @@ -313,6 +314,24 @@ f3c.addStep(Configure(command=["../src/c workdir="build")) f3c.addStep(Compile(workdir="build")) f3c.addStep(JTRegCheck(command=["make", "check-langtools"], + description="check-langtools", + workdir="build")) + +f3s = factory.BuildFactory() +f3s.addStep(Mercurial(baseURL=hgrepo, workdir="src", mode="update")) +f3s.addStep(ShellCommand(command=["./autogen.sh"], + workdir="src", + description="autogen")) +f3s.addStep(ShellCommand(command=["rm", "-rf", "build"], + workdir=".", + description="clean build dir")) +f3s.addStep(Configure(command=["../src/configure", + "--disable-bootstrap", + "--disable-docs", + "--enable-shark"], + workdir="build")) +f3s.addStep(Compile(workdir="build")) +f3s.addStep(JTRegCheck(command=["make", "check-langtools"], description="check-langtools", workdir="build")) @@ -604,6 +623,11 @@ icedtea6_builder_quick_cacao = { 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea6-quick-cacao", 'factory': f3c } +icedtea6_builder_quick_shark = { + 'name': "icedtea6-squeeze-x86_64-quick-shark", + 'slavenames': ["squeeze-x86_64"], + 'builddir': "icedtea6-quick-shark", + 'factory': f3c } icedtea6_builder_quick_arm_natty = { 'name': "icedtea6-natty-armv7l-quick", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea6-natty-armv7l-quick", @@ -718,6 +742,7 @@ c['builders'] = [icedtea6_builder_quick, icedtea6_builder_quick_hotspot, icedtea6_builder_quick_jamvm, icedtea6_builder_quick_cacao, + icedtea6_builder_quick_shark, icedtea6_builder_quick_arm_natty, icedtea6_builder_quick_arm_natty_cacao, icedtea6_builder_quick_arm_natty_jamvm, From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 05:40:33 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 13:40:33 +0000 Subject: [Bug 635] zero fails to build on icedtea6 trunk 20110217 with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=635 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED ------- Comment #4 from gnu_andrew at member.fsf.org 2011-02-24 13:40 ------- ARM port disabled: http://icedtea.classpath.org/hg/icedtea6/rev/18fbca177289 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 05:40:44 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Thu, 24 Feb 2011 13:40:44 +0000 Subject: [Bug 635] zero fails to build on icedtea6 trunk 20110217 with hs20 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=635 gnu_andrew at member.fsf.org changed: What |Removed |Added ---------------------------------------------------------------------------- Target Milestone|--- |6-1.10 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From ptisnovs at icedtea.classpath.org Thu Feb 24 07:21:49 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 24 Feb 2011 15:21:49 +0000 Subject: /hg/release/icedtea6-1.7: Testcase correction - the test LastErr... Message-ID: changeset fe162bbd42f8 in /hg/release/icedtea6-1.7 details: http://icedtea.classpath.org/hg/release/icedtea6-1.7?cmd=changeset;node=fe162bbd42f8 author: ptisnovs date: Thu Feb 24 16:25:04 2011 +0100 Testcase correction - the test LastErrorString must not rewrite system files. diffstat: 3 files changed, 210 insertions(+), 1 deletion(-) ChangeLog | 7 + Makefile.am | 3 patches/jtreg-LastErrorString.patch | 201 +++++++++++++++++++++++++++++++++++ diffs (232 lines): diff -r d780d2efc830 -r fe162bbd42f8 ChangeLog --- a/ChangeLog Wed Feb 23 14:00:24 2011 -0500 +++ b/ChangeLog Thu Feb 24 16:25:04 2011 +0100 @@ -1,3 +1,10 @@ 2011-02-23 Denis Lila + + * Makefile.am: Add patch. + * patches/jtreg-LastErrorString.patch: + Testcase correction - the test LastErrorString must not rewrite system + files. + 2011-02-23 Denis Lila * Makefile.am: Added patches. diff -r d780d2efc830 -r fe162bbd42f8 Makefile.am --- a/Makefile.am Wed Feb 23 14:00:24 2011 -0500 +++ b/Makefile.am Thu Feb 24 16:25:04 2011 +0100 @@ -395,7 +395,8 @@ ICEDTEA_PATCHES = \ patches/rh676659-gcc-export-dynamic.patch \ patches/latent_jaxp_bug.patch \ patches/openjdk/6675802-securityExceptions-applets.patch \ - patches/openjdk/6691503-malicious-applet-always-on-top.patch + patches/openjdk/6691503-malicious-applet-always-on-top.patch \ + patches/jtreg-LastErrorString.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ diff -r d780d2efc830 -r fe162bbd42f8 patches/jtreg-LastErrorString.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jtreg-LastErrorString.patch Thu Feb 24 16:25:04 2011 +0100 @@ -0,0 +1,201 @@ +diff -Nru IOException/LastErrorString.java /home/brq/ptisnovs/IOException/LastErrorString.java +--- openjdk-old/jdk/test/java/io/IOException/LastErrorString.java 2011-01-21 00:54:47.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2011-02-21 15:34:58.972481000 +0100 +@@ -21,9 +21,13 @@ + * questions. + */ + +-/* @test +- @bug 4167937 +- @summary Test code paths that use the JVM_LastErrorString procedure ++/* ++ * @test ++ * @bug 4167937 ++ * @summary Test code paths that use the JVM_LastErrorString procedure ++ * ++ * @compile LastErrorString.java ++ * @run shell LastErrorString.sh + */ + + import java.io.IOException; +@@ -37,33 +41,11 @@ + + static String UNWRITEABLE_DIR; + static String UNREADABLE_FILE; ++ static String UNWRITEABLE_FILE; + static String READABLE_FILE; + static String WRITEABLE_FILE; + static String INVALID_PATH; + +- static { +- if (File.separatorChar == '/') { +- UNWRITEABLE_DIR = "/etc/dfs"; +- UNREADABLE_FILE = "/etc/shadow"; +- } else if (File.separatorChar == '\\') { +- UNREADABLE_FILE = "c:/pagefile.sys"; +- UNWRITEABLE_DIR = "z:/fooBAR/baz/GORP"; +- } else { +- throw new RuntimeException("What kind of system is this?"); +- } +- File d = new File(System.getProperty("test.src", ".")); +- READABLE_FILE = new File(d, "LastErrorString.java").getPath(); +- WRITEABLE_FILE = "x.LastErrorString"; +- String s = "foo/"; +- for (;;) { +- s = s + s; +- if (s.length() > 8192) break; +- } +- s += "bar"; +- INVALID_PATH = s; +- } +- +- + static abstract class Test { + + String name; +@@ -197,7 +179,7 @@ + + new Test("FileOutputStream") { + public void run() throws IOException { +- new FileOutputStream(UNREADABLE_FILE); ++ new FileOutputStream(UNWRITEABLE_FILE); + }}.go(); + + new ClosedFOSTest("write()") { +@@ -257,8 +239,29 @@ + + } + ++ public static void preparePaths(String workDir) { ++ System.out.println("Work directory: " + workDir); ++ ++ // directory prepared by shell script ++ UNWRITEABLE_DIR = workDir + "unwriteable_dir"; ++ ++ // files prepared by shell script ++ READABLE_FILE = workDir + "readable_file"; ++ WRITEABLE_FILE = workDir + "writeable_file"; ++ UNREADABLE_FILE = workDir + "unreadable_file"; ++ UNWRITEABLE_FILE = workDir + "unwriteable_file"; ++ ++ String s = "foo/"; ++ for (;;) { ++ s = s + s; ++ if (s.length() > 8192) break; ++ } ++ s += "bar"; ++ INVALID_PATH = s; ++ } + + public static void main(String[] args) throws Exception { ++ preparePaths(args[0]); + go(); + } + +diff -Nru IOException/LastErrorString.sh /home/brq/ptisnovs/IOException/LastErrorString.sh +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2011-02-21 15:34:58.972481000 +0100 +@@ -0,0 +1,103 @@ ++#!/bin/sh ++ ++# Copyright (c) 2011, Red Hat Inc. ++# ++# This code is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++# ++# This code is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++# @test ++# @bug 4167937 ++# @summary Test code paths that use the JVM_LastErrorString procedure ++# ++# @compile LastErrorString.java ++# @run shell LastErrorString.sh ++ ++if [ "${TESTSRC}" = "" ] ++then ++ TESTSRC=. ++fi ++ ++# if TESTJAVA isn't set then we assume an interactive run. So that it's ++# clear which version of 'java' is running we do a 'which java' and ++# a 'java -version'. ++if [ "${TESTJAVA}" = "" ] ++then ++ PARENT=`dirname \`which java\`` ++ TESTJAVA=`dirname ${PARENT}` ++ echo "TESTJAVA not set, selecting ${TESTJAVA}" ++ echo "If this is incorrect, try selecting the variable manually." ++fi ++ ++echo "TESTJAVA is set to ${TESTJAVA}" ++ ++if [ "${TESTCLASSES}" = "" ] ++then ++ echo "TESTCLASSES not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++echo "TESTCLASSES is set to ${TESTCLASSES}" ++ ++CLASSPATH=${TESTCLASSES} ++export CLASSPATH ++ ++WORK_DIR=`pwd` ++echo "WORK_DIR is set to ${WORK_DIR}" ++ ++# set platform-dependent variables and create work files ++OS=`uname -s` ++case "$OS" in ++ Linux | SunOS ) ++ echo "UNIX-like system found - that's great!" ++ FS="/" ++ ;; ++ Windows_* ) ++ echo "Windows system found, can live with that." ++ FS="\\" ++ ;; ++ * ) ++ echo "Unrecognized system $OS!" ++ exit 1 ++ ;; ++esac ++ ++# erase files created by previous test run ++rm -f readable_file ++rm -f writeable_file ++rm -f unreadable_file ++rm -f unwriteable_file ++ ++# create directory + files ++mkdir unwriteable_dir ++touch readable_file ++touch writeable_file ++touch unreadable_file ++touch unwriteable_file ++ ++# set proper ACL ++chmod u+r readable_file ++chmod u+w writeable_file ++chmod a-r unreadable_file ++chmod a-w unwriteable_file ++chmod a-w unwriteable_dir ++ ++echo "Work directory content:" ++ls -l . ++ ++# first parameter to test: work directory + separator ++${TESTJAVA}${FS}bin${FS}java LastErrorString ${WORK_DIR}${FS} ++STATUS=$? ++ ++exit $STATUS ++ From ptisnovs at icedtea.classpath.org Thu Feb 24 07:24:44 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 24 Feb 2011 15:24:44 +0000 Subject: /hg/release/icedtea6-1.8: Testcase correction - the test LastErr... Message-ID: changeset d8e980ec37e7 in /hg/release/icedtea6-1.8 details: http://icedtea.classpath.org/hg/release/icedtea6-1.8?cmd=changeset;node=d8e980ec37e7 author: ptisnovs date: Thu Feb 24 16:28:01 2011 +0100 Testcase correction - the test LastErrorString must not rewrite system files. diffstat: 3 files changed, 210 insertions(+), 1 deletion(-) ChangeLog | 7 + Makefile.am | 3 patches/jtreg-LastErrorString.patch | 201 +++++++++++++++++++++++++++++++++++ diffs (232 lines): diff -r b290bff215e8 -r d8e980ec37e7 ChangeLog --- a/ChangeLog Wed Feb 23 16:10:06 2011 -0500 +++ b/ChangeLog Thu Feb 24 16:28:01 2011 +0100 @@ -1,3 +1,10 @@ 2011-02-23 Denis Lila + + * Makefile.am: Add patch. + * patches/jtreg-LastErrorString.patch: + Testcase correction - the test LastErrorString must not rewrite system + files. + 2011-02-23 Denis Lila * NEWS: the previous changeset put the bug fixes under the wrong diff -r b290bff215e8 -r d8e980ec37e7 Makefile.am --- a/Makefile.am Wed Feb 23 16:10:06 2011 -0500 +++ b/Makefile.am Thu Feb 24 16:28:01 2011 +0100 @@ -375,7 +375,8 @@ ICEDTEA_PATCHES = \ patches/rh676659-gcc-export-dynamic.patch \ patches/latent_jaxp_bug.patch \ patches/openjdk/6675802-securityExceptions-applets.patch \ - patches/openjdk/6691503-malicious-applet-always-on-top.patch + patches/openjdk/6691503-malicious-applet-always-on-top.patch \ + patches/jtreg-LastErrorString.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += patches/hotspot/$(HSBUILD)/openjdk-6886353-ignore_deoptimizealot.patch \ diff -r b290bff215e8 -r d8e980ec37e7 patches/jtreg-LastErrorString.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jtreg-LastErrorString.patch Thu Feb 24 16:28:01 2011 +0100 @@ -0,0 +1,201 @@ +diff -Nru IOException/LastErrorString.java /home/brq/ptisnovs/IOException/LastErrorString.java +--- openjdk-old/jdk/test/java/io/IOException/LastErrorString.java 2011-01-21 00:54:47.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2011-02-21 15:34:58.972481000 +0100 +@@ -21,9 +21,13 @@ + * questions. + */ + +-/* @test +- @bug 4167937 +- @summary Test code paths that use the JVM_LastErrorString procedure ++/* ++ * @test ++ * @bug 4167937 ++ * @summary Test code paths that use the JVM_LastErrorString procedure ++ * ++ * @compile LastErrorString.java ++ * @run shell LastErrorString.sh + */ + + import java.io.IOException; +@@ -37,33 +41,11 @@ + + static String UNWRITEABLE_DIR; + static String UNREADABLE_FILE; ++ static String UNWRITEABLE_FILE; + static String READABLE_FILE; + static String WRITEABLE_FILE; + static String INVALID_PATH; + +- static { +- if (File.separatorChar == '/') { +- UNWRITEABLE_DIR = "/etc/dfs"; +- UNREADABLE_FILE = "/etc/shadow"; +- } else if (File.separatorChar == '\\') { +- UNREADABLE_FILE = "c:/pagefile.sys"; +- UNWRITEABLE_DIR = "z:/fooBAR/baz/GORP"; +- } else { +- throw new RuntimeException("What kind of system is this?"); +- } +- File d = new File(System.getProperty("test.src", ".")); +- READABLE_FILE = new File(d, "LastErrorString.java").getPath(); +- WRITEABLE_FILE = "x.LastErrorString"; +- String s = "foo/"; +- for (;;) { +- s = s + s; +- if (s.length() > 8192) break; +- } +- s += "bar"; +- INVALID_PATH = s; +- } +- +- + static abstract class Test { + + String name; +@@ -197,7 +179,7 @@ + + new Test("FileOutputStream") { + public void run() throws IOException { +- new FileOutputStream(UNREADABLE_FILE); ++ new FileOutputStream(UNWRITEABLE_FILE); + }}.go(); + + new ClosedFOSTest("write()") { +@@ -257,8 +239,29 @@ + + } + ++ public static void preparePaths(String workDir) { ++ System.out.println("Work directory: " + workDir); ++ ++ // directory prepared by shell script ++ UNWRITEABLE_DIR = workDir + "unwriteable_dir"; ++ ++ // files prepared by shell script ++ READABLE_FILE = workDir + "readable_file"; ++ WRITEABLE_FILE = workDir + "writeable_file"; ++ UNREADABLE_FILE = workDir + "unreadable_file"; ++ UNWRITEABLE_FILE = workDir + "unwriteable_file"; ++ ++ String s = "foo/"; ++ for (;;) { ++ s = s + s; ++ if (s.length() > 8192) break; ++ } ++ s += "bar"; ++ INVALID_PATH = s; ++ } + + public static void main(String[] args) throws Exception { ++ preparePaths(args[0]); + go(); + } + +diff -Nru IOException/LastErrorString.sh /home/brq/ptisnovs/IOException/LastErrorString.sh +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2011-02-21 15:34:58.972481000 +0100 +@@ -0,0 +1,103 @@ ++#!/bin/sh ++ ++# Copyright (c) 2011, Red Hat Inc. ++# ++# This code is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++# ++# This code is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++# @test ++# @bug 4167937 ++# @summary Test code paths that use the JVM_LastErrorString procedure ++# ++# @compile LastErrorString.java ++# @run shell LastErrorString.sh ++ ++if [ "${TESTSRC}" = "" ] ++then ++ TESTSRC=. ++fi ++ ++# if TESTJAVA isn't set then we assume an interactive run. So that it's ++# clear which version of 'java' is running we do a 'which java' and ++# a 'java -version'. ++if [ "${TESTJAVA}" = "" ] ++then ++ PARENT=`dirname \`which java\`` ++ TESTJAVA=`dirname ${PARENT}` ++ echo "TESTJAVA not set, selecting ${TESTJAVA}" ++ echo "If this is incorrect, try selecting the variable manually." ++fi ++ ++echo "TESTJAVA is set to ${TESTJAVA}" ++ ++if [ "${TESTCLASSES}" = "" ] ++then ++ echo "TESTCLASSES not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++echo "TESTCLASSES is set to ${TESTCLASSES}" ++ ++CLASSPATH=${TESTCLASSES} ++export CLASSPATH ++ ++WORK_DIR=`pwd` ++echo "WORK_DIR is set to ${WORK_DIR}" ++ ++# set platform-dependent variables and create work files ++OS=`uname -s` ++case "$OS" in ++ Linux | SunOS ) ++ echo "UNIX-like system found - that's great!" ++ FS="/" ++ ;; ++ Windows_* ) ++ echo "Windows system found, can live with that." ++ FS="\\" ++ ;; ++ * ) ++ echo "Unrecognized system $OS!" ++ exit 1 ++ ;; ++esac ++ ++# erase files created by previous test run ++rm -f readable_file ++rm -f writeable_file ++rm -f unreadable_file ++rm -f unwriteable_file ++ ++# create directory + files ++mkdir unwriteable_dir ++touch readable_file ++touch writeable_file ++touch unreadable_file ++touch unwriteable_file ++ ++# set proper ACL ++chmod u+r readable_file ++chmod u+w writeable_file ++chmod a-r unreadable_file ++chmod a-w unwriteable_file ++chmod a-w unwriteable_dir ++ ++echo "Work directory content:" ++ls -l . ++ ++# first parameter to test: work directory + separator ++${TESTJAVA}${FS}bin${FS}java LastErrorString ${WORK_DIR}${FS} ++STATUS=$? ++ ++exit $STATUS ++ From ptisnovs at icedtea.classpath.org Thu Feb 24 07:27:45 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 24 Feb 2011 15:27:45 +0000 Subject: /hg/release/icedtea6-1.9: Testcase correction - the test LastErr... Message-ID: changeset e71c8f4ba044 in /hg/release/icedtea6-1.9 details: http://icedtea.classpath.org/hg/release/icedtea6-1.9?cmd=changeset;node=e71c8f4ba044 author: ptisnovs date: Thu Feb 24 16:31:02 2011 +0100 Testcase correction - the test LastErrorString must not rewrite system files. diffstat: 3 files changed, 210 insertions(+), 1 deletion(-) ChangeLog | 7 + Makefile.am | 3 patches/jtreg-LastErrorString.patch | 201 +++++++++++++++++++++++++++++++++++ diffs (232 lines): diff -r 3e07e563aeb4 -r e71c8f4ba044 ChangeLog --- a/ChangeLog Wed Feb 23 14:50:02 2011 -0500 +++ b/ChangeLog Thu Feb 24 16:31:02 2011 +0100 @@ -1,3 +1,10 @@ 2011-02-23 Denis Lila + + * Makefile.am: Add patch. + * patches/jtreg-LastErrorString.patch: + Testcase correction - the test LastErrorString must not rewrite system + files. + 2011-02-23 Denis Lila * Makefile.am: Added patches. diff -r 3e07e563aeb4 -r e71c8f4ba044 Makefile.am --- a/Makefile.am Wed Feb 23 14:50:02 2011 -0500 +++ b/Makefile.am Thu Feb 24 16:31:02 2011 +0100 @@ -339,7 +339,8 @@ ICEDTEA_PATCHES = \ patches/g344659-sparc_fix.patch \ patches/latent_jaxp_bug.patch \ patches/openjdk/6675802-securityExceptions-applets.patch \ - patches/openjdk/6691503-malicious-applet-always-on-top.patch + patches/openjdk/6691503-malicious-applet-always-on-top.patch \ + patches/jtreg-LastErrorString.patch if WITH_ALT_HSBUILD ICEDTEA_PATCHES += \ diff -r 3e07e563aeb4 -r e71c8f4ba044 patches/jtreg-LastErrorString.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jtreg-LastErrorString.patch Thu Feb 24 16:31:02 2011 +0100 @@ -0,0 +1,201 @@ +diff -Nru IOException/LastErrorString.java /home/brq/ptisnovs/IOException/LastErrorString.java +--- openjdk-old/jdk/test/java/io/IOException/LastErrorString.java 2011-01-21 00:54:47.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.java 2011-02-21 15:34:58.972481000 +0100 +@@ -21,9 +21,13 @@ + * questions. + */ + +-/* @test +- @bug 4167937 +- @summary Test code paths that use the JVM_LastErrorString procedure ++/* ++ * @test ++ * @bug 4167937 ++ * @summary Test code paths that use the JVM_LastErrorString procedure ++ * ++ * @compile LastErrorString.java ++ * @run shell LastErrorString.sh + */ + + import java.io.IOException; +@@ -37,33 +41,11 @@ + + static String UNWRITEABLE_DIR; + static String UNREADABLE_FILE; ++ static String UNWRITEABLE_FILE; + static String READABLE_FILE; + static String WRITEABLE_FILE; + static String INVALID_PATH; + +- static { +- if (File.separatorChar == '/') { +- UNWRITEABLE_DIR = "/etc/dfs"; +- UNREADABLE_FILE = "/etc/shadow"; +- } else if (File.separatorChar == '\\') { +- UNREADABLE_FILE = "c:/pagefile.sys"; +- UNWRITEABLE_DIR = "z:/fooBAR/baz/GORP"; +- } else { +- throw new RuntimeException("What kind of system is this?"); +- } +- File d = new File(System.getProperty("test.src", ".")); +- READABLE_FILE = new File(d, "LastErrorString.java").getPath(); +- WRITEABLE_FILE = "x.LastErrorString"; +- String s = "foo/"; +- for (;;) { +- s = s + s; +- if (s.length() > 8192) break; +- } +- s += "bar"; +- INVALID_PATH = s; +- } +- +- + static abstract class Test { + + String name; +@@ -197,7 +179,7 @@ + + new Test("FileOutputStream") { + public void run() throws IOException { +- new FileOutputStream(UNREADABLE_FILE); ++ new FileOutputStream(UNWRITEABLE_FILE); + }}.go(); + + new ClosedFOSTest("write()") { +@@ -257,8 +239,29 @@ + + } + ++ public static void preparePaths(String workDir) { ++ System.out.println("Work directory: " + workDir); ++ ++ // directory prepared by shell script ++ UNWRITEABLE_DIR = workDir + "unwriteable_dir"; ++ ++ // files prepared by shell script ++ READABLE_FILE = workDir + "readable_file"; ++ WRITEABLE_FILE = workDir + "writeable_file"; ++ UNREADABLE_FILE = workDir + "unreadable_file"; ++ UNWRITEABLE_FILE = workDir + "unwriteable_file"; ++ ++ String s = "foo/"; ++ for (;;) { ++ s = s + s; ++ if (s.length() > 8192) break; ++ } ++ s += "bar"; ++ INVALID_PATH = s; ++ } + + public static void main(String[] args) throws Exception { ++ preparePaths(args[0]); + go(); + } + +diff -Nru IOException/LastErrorString.sh /home/brq/ptisnovs/IOException/LastErrorString.sh +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/java/io/IOException/LastErrorString.sh 2011-02-21 15:34:58.972481000 +0100 +@@ -0,0 +1,103 @@ ++#!/bin/sh ++ ++# Copyright (c) 2011, Red Hat Inc. ++# ++# This code is free software; you can redistribute it and/or modify ++# it under the terms of the GNU General Public License as published by ++# the Free Software Foundation; either version 2, or (at your option) ++# any later version. ++# ++# This code is distributed in the hope that it will be useful, but ++# WITHOUT ANY WARRANTY; without even the implied warranty of ++# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU ++# General Public License for more details. ++# ++# You should have received a copy of the GNU General Public License version ++# 2 along with this work; if not, write to the Free Software Foundation, ++# Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. ++ ++# @test ++# @bug 4167937 ++# @summary Test code paths that use the JVM_LastErrorString procedure ++# ++# @compile LastErrorString.java ++# @run shell LastErrorString.sh ++ ++if [ "${TESTSRC}" = "" ] ++then ++ TESTSRC=. ++fi ++ ++# if TESTJAVA isn't set then we assume an interactive run. So that it's ++# clear which version of 'java' is running we do a 'which java' and ++# a 'java -version'. ++if [ "${TESTJAVA}" = "" ] ++then ++ PARENT=`dirname \`which java\`` ++ TESTJAVA=`dirname ${PARENT}` ++ echo "TESTJAVA not set, selecting ${TESTJAVA}" ++ echo "If this is incorrect, try selecting the variable manually." ++fi ++ ++echo "TESTJAVA is set to ${TESTJAVA}" ++ ++if [ "${TESTCLASSES}" = "" ] ++then ++ echo "TESTCLASSES not set. Test cannot execute. Failed." ++ exit 1 ++fi ++ ++echo "TESTCLASSES is set to ${TESTCLASSES}" ++ ++CLASSPATH=${TESTCLASSES} ++export CLASSPATH ++ ++WORK_DIR=`pwd` ++echo "WORK_DIR is set to ${WORK_DIR}" ++ ++# set platform-dependent variables and create work files ++OS=`uname -s` ++case "$OS" in ++ Linux | SunOS ) ++ echo "UNIX-like system found - that's great!" ++ FS="/" ++ ;; ++ Windows_* ) ++ echo "Windows system found, can live with that." ++ FS="\\" ++ ;; ++ * ) ++ echo "Unrecognized system $OS!" ++ exit 1 ++ ;; ++esac ++ ++# erase files created by previous test run ++rm -f readable_file ++rm -f writeable_file ++rm -f unreadable_file ++rm -f unwriteable_file ++ ++# create directory + files ++mkdir unwriteable_dir ++touch readable_file ++touch writeable_file ++touch unreadable_file ++touch unwriteable_file ++ ++# set proper ACL ++chmod u+r readable_file ++chmod u+w writeable_file ++chmod a-r unreadable_file ++chmod a-w unwriteable_file ++chmod a-w unwriteable_dir ++ ++echo "Work directory content:" ++ls -l . ++ ++# first parameter to test: work directory + separator ++${TESTJAVA}${FS}bin${FS}java LastErrorString ${WORK_DIR}${FS} ++STATUS=$? ++ ++exit $STATUS ++ From xerxes at zafena.se Thu Feb 24 07:33:35 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Thu, 24 Feb 2011 16:33:35 +0100 Subject: RFC: icedtea6 - fix non fatal mv warnings Message-ID: <4D667A4F.4000203@zafena.se> The attached patch fixes these non fatal icedtea6 mv warnings by correcting the code to actually check if the file exist before trying to move it. mv: cannot stat `cacao-6a5eda011e49.tar.gz': No such file or directory mv: cannot stat `jamvm-10329d9f3205698af125bba131b4f47339e81d90.tar.gz': No such file or directory mv: cannot stat `openjdk-6-src-b21-20_jan_2011.tar.gz': No such file or directory and mv: cannot stat `hotspot.tar.gz': No such file or directory Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: fix_mv_warning.patch Type: text/x-patch Size: 1902 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/fa7ac248/fix_mv_warning.patch From xerxes at zafena.se Thu Feb 24 08:16:21 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Thu, 24 Feb 2011 17:16:21 +0100 Subject: RFC: add JamVM patch queue and add ignore-more-XX-options JamVM patch. Message-ID: <4D668455.1080700@zafena.se> Hi the attached patch creates a IcedTea patch queue to be applied on top of the extracted jamvm sources. The patch also fix PR640 http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=640 by making JamVM ignore the -XX:ThreadStackSize option. Ok to push? Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: jamvm-patch-queue.patch Type: text/x-patch Size: 1332 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/640ea495/jamvm-patch-queue.patch From jvanek at redhat.com Thu Feb 24 08:43:19 2011 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 24 Feb 2011 17:43:19 +0100 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D659A0B.7080005@redhat.com> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> Message-ID: <4D668AA7.30503@redhat.com> On 02/24/2011 12:36 AM, Omair Majid wrote: So, this patch expects fixed about.jnlp to have code base of file://$DEST_DIR/share Then removes all-permissions, and lunched fixed window without them. The window is not running in invoke later(which probably caused the hang) but runs in javaws's own thread. Also points directly to correct jnlp local file and runs offline. > On 02/23/2011 12:51 PM, Dr Andrew John Hughes wrote: >> What is the motivation for this change? Assuming it still runs without >> all-permissions, the change looks fine. >> > > From my very limited testing, it doesnt :( > > snip # HG changeset patch # User Jiri Vanek # Date 1298565203 -3600 # Node ID e2f1a23ade0931e1b6810cb06d4b313ee9333415 # Parent d7fee305bd4f63d3a37cfa041b9af726e296d22f about.jar can now be lunched localy, without all-permissions, and about.jnlp is red from directory instead from jar. diff -r d7fee305bd4f -r e2f1a23ade09 ChangeLog --- a/ChangeLog Wed Feb 23 13:37:10 2011 -0500 +++ b/ChangeLog Thu Feb 24 17:33:23 2011 +0100 @@ -1,3 +1,11 @@ +2011-02-24 Jiri Vanek + + * netx/net/sourceforge/jnlp/runtime/Boot.java: getAboutFile changed to return path to local about.jnlp instead of inner-ftom jar + * extras/net/sourceforge/jnlp/about/Main.java: removed ivokelater, useless hypertextlistener and runtime which needed special permissions. + * netx/net/sourceforge/jnlp/resources/about.jnlp: removed + + + 2011-02-23 Omair Majid * Makefile.am: Add missing slash to JRE. diff -r d7fee305bd4f -r e2f1a23ade09 extra/net/sourceforge/jnlp/about/Main.java --- a/extra/net/sourceforge/jnlp/about/Main.java Wed Feb 23 13:37:10 2011 -0500 +++ b/extra/net/sourceforge/jnlp/about/Main.java Thu Feb 24 17:33:23 2011 +0100 @@ -41,19 +41,15 @@ import java.awt.Dimension; import java.awt.Toolkit; import java.io.IOException; -import java.net.URL; + import javax.swing.JFrame; import javax.swing.JPanel; import javax.swing.JTabbedPane; import javax.swing.UIManager; -import javax.swing.event.HyperlinkEvent; -import javax.swing.event.HyperlinkListener; -import net.sourceforge.jnlp.Launcher; -import net.sourceforge.jnlp.runtime.JNLPRuntime; -public class Main extends JPanel implements HyperlinkListener { +public class Main extends JPanel{ private final String notes = "/net/sourceforge/jnlp/about/resources/notes.html"; private final String apps = "/net/sourceforge/jnlp/about/resources/applications.html"; @@ -62,13 +58,11 @@ public Main() throws IOException { super(new BorderLayout()); - + HTMLPanel notesPanel = new HTMLPanel(getClass().getResource(notes)); HTMLPanel appsPanel = new HTMLPanel(getClass().getResource(apps)); HTMLPanel aboutPanel = new HTMLPanel(getClass().getResource(about)); - appsPanel.pane.addHyperlinkListener(this); - tabbedPane = new JTabbedPane(); tabbedPane.add("About NetX", aboutPanel); @@ -80,7 +74,6 @@ } private static void createAndShowGUI() { - JNLPRuntime.setExitClass(Main.class); try { UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); @@ -112,24 +105,8 @@ } public static void main(String[] args) { - javax.swing.SwingUtilities.invokeLater(new Runnable() { - public void run() { - createAndShowGUI(); - } - }); - } + createAndShowGUI(); + } - public void hyperlinkUpdate(HyperlinkEvent e) { - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { - URL url = e.getURL(); - Launcher launcher = new Launcher( - JNLPRuntime.getDefaultLaunchHandler()); - try { - launcher.launchBackground(url); - } catch (Exception ex) { - ex.printStackTrace(); - } - } - } } diff -r d7fee305bd4f -r e2f1a23ade09 netx/net/sourceforge/jnlp/resources/about.jnlp --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 2011 -0500 +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 17:33:23 2011 +0100 @@ -1,5 +1,5 @@ - + About window for NetX NetX @@ -12,7 +12,7 @@ - + diff -r d7fee305bd4f -r e2f1a23ade09 netx/net/sourceforge/jnlp/runtime/Boot.java --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 17:33:23 2011 +0100 @@ -141,22 +141,26 @@ System.exit(0); } - if (null != getOption("-about")) + if (null != getOption("-about")) { System.out.println(aboutMessage); + } - if (null != getOption("-verbose")) + if (null != getOption("-verbose")) { JNLPRuntime.setDebug(true); + } if (null != getOption("-update")) { int value = Integer.parseInt(getOption("-update")); JNLPRuntime.setDefaultUpdatePolicy(new UpdatePolicy(value * 1000l)); } - if (null != getOption("-headless")) + if (null != getOption("-headless")) { JNLPRuntime.setHeadless(true); + } - if (null != getOption("-noupdate")) + if (null != getOption("-noupdate")) { JNLPRuntime.setDefaultUpdatePolicy(UpdatePolicy.NEVER); + } if (null != getOption("-Xnofork")) { JNLPRuntime.setForksAllowed(false); @@ -194,8 +198,9 @@ } catch (LaunchException ex) { // default handler prints this } catch (Exception ex) { - if (JNLPRuntime.isDebug()) + if (JNLPRuntime.isDebug()) { ex.printStackTrace(); + } fatalError(R("RUnexpected", ex.toString(), ex.getStackTrace()[0])); } @@ -218,8 +223,16 @@ cl = ClassLoader.getSystemClassLoader(); } try { - return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); + //exctracts full path to about.jnlp + String s = cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); + s=s.substring(0,s.indexOf("!")); + s=s.substring(s.indexOf(":")+1); + s=s.substring(s.indexOf(":")+1); + s="file://"+s.replace("netx.jar","about.jnlp"); + System.out.println(s); + return s; } catch (Exception e) { + e.printStackTrace(); return null; } } @@ -235,8 +248,9 @@ // override -jnlp with aboutFile if (getOption("-about") != null) { location = getAboutFile(); - if (location == null) + if (location == null) { fatalError(R("RNoAboutJnlp")); + } } else { location = getJNLPFile(); } @@ -246,21 +260,24 @@ System.exit(1); } - if (JNLPRuntime.isDebug()) + if (JNLPRuntime.isDebug()) { System.out.println(R("BFileLoc") + ": " + location); + } URL url = null; try { - if (new File(location).exists()) - // TODO: Should be toURI().toURL() + if (new File(location).exists()) // TODO: Should be toURI().toURL() + { url = new File(location).toURL(); // Why use file.getCanonicalFile? - else + } else { url = new URL(ServiceUtil.getBasicService().getCodeBase(), location); + } } catch (Exception e) { fatalError("Invalid jnlp file " + location); - if (JNLPRuntime.isDebug()) + if (JNLPRuntime.isDebug()) { e.printStackTrace(); + } } boolean strict = (null != getOption("-strict")); @@ -275,20 +292,26 @@ // add in extra params from command line addProperties(file); - if (file.isApplet()) + if (file.isApplet()) { addParameters(file); + } - if (file.isApplication()) + if (file.isApplication()) { addArguments(file); + } if (JNLPRuntime.isDebug()) { - if (getOption("-arg") != null) - if (file.isInstaller() || file.isApplet()) + if (getOption("-arg") != null) { + if (file.isInstaller() || file.isApplet()) { System.out.println(R("BArgsNA")); + } + } - if (getOption("-param") != null) - if (file.isApplication()) + if (getOption("-param") != null) { + if (file.isApplication()) { System.out.println(R("BParamNA")); + } + } } return file; @@ -304,8 +327,9 @@ for (int i = 0; i < props.length; i++) { // allows empty property, not sure about validity of that. int equals = props[i].indexOf("="); - if (equals == -1) + if (equals == -1) { fatalError(R("BBadProp", props[i])); + } String key = props[i].substring(0, equals); String value = props[i].substring(equals + 1, props[i].length()); @@ -325,8 +349,9 @@ for (int i = 0; i < params.length; i++) { // allows empty param, not sure about validity of that. int equals = params[i].indexOf("="); - if (equals == -1) + if (equals == -1) { fatalError(R("BBadParam", params[i])); + } String name = params[i].substring(0, equals); String value = params[i].substring(equals + 1, params[i].length()); @@ -381,10 +406,11 @@ private static String getOption(String option) { String result[] = getOptions(option); - if (result.length == 0) + if (result.length == 0) { return null; - else + } else { return result[0]; + } } /** @@ -398,14 +424,16 @@ for (int i = 0; i < args.length; i++) { if (option.equals(args[i])) { - if (-1 == doubleArgs.indexOf(option)) + if (-1 == doubleArgs.indexOf(option)) { result.add(option); - else if (i + 1 < args.length) + } else if (i + 1 < args.length) { result.add(args[i + 1]); + } } - if (args[i].startsWith("-") && -1 != doubleArgs.indexOf(args[i])) + if (args[i].startsWith("-") && -1 != doubleArgs.indexOf(args[i])) { i++; + } } return result.toArray(new String[result.size()]); -------------- next part -------------- A non-text attachment was scrubbed... Name: diff.diff Type: text/x-patch Size: 10476 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/b1831713/diff.diff From ahughes at redhat.com Thu Feb 24 08:47:06 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 16:47:06 +0000 Subject: RFC: add JamVM patch queue and add ignore-more-XX-options JamVM patch. In-Reply-To: <4D668455.1080700@zafena.se> References: <4D668455.1080700@zafena.se> Message-ID: <20110224164706.GF3448@rivendell.middle-earth.co.uk> On 17:16 Thu 24 Feb , Xerxes R?nby wrote: > Hi the attached patch creates a IcedTea patch queue to be applied on top of the extracted jamvm sources. > The patch also fix PR640 > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=640 > by making JamVM ignore the -XX:ThreadStackSize option. > > Ok to push? > > Cheers > Xerxes Does JamVM now build? I didn't realise adding the patches would be that simple but I guess the patching is after JamVM is extracted. Please commit to HEAD and 1.10 branch. > Index: icedtea6/Makefile.am > =================================================================== > --- icedtea6.orig/Makefile.am 2011-02-24 16:41:59.365413137 +0100 > +++ icedtea6/Makefile.am 2011-02-24 16:48:21.413908589 +0100 > @@ -356,6 +356,11 @@ > patches/cacao/ignore-tests.patch > endif > > +if BUILD_JAMVM > +ICEDTEA_PATCHES += \ > + patches/jamvm/ignore-more-XX-options.patch > +endif > + > if ENABLE_PULSE_JAVA > ICEDTEA_PATCHES += \ > patches/pulse-soundproperties.patch > Index: icedtea6/patches/jamvm/ignore-more-XX-options.patch > =================================================================== > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > +++ icedtea6/patches/jamvm/ignore-more-XX-options.patch 2011-02-24 16:47:09.269910195 +0100 > @@ -0,0 +1,12 @@ > +Index: jamvm/jamvm/src/jni.c > +=================================================================== > +--- jamvm/jamvm.orig/src/jni.c 2011-02-23 09:54:17.000000000 +0100 > ++++ jamvm/jamvm/src/jni.c 2011-02-23 09:58:21.000000000 +0100 > +@@ -1638,6 +1638,7 @@ > + #endif > + /* Compatibility options */ > + } else if(strncmp(string, "-XX:PermSize=", 13) == 0 || > ++ strncmp(string, "-XX:ThreadStackSize=", 20) == 0 || > + strncmp(string, "-XX:MaxPermSize=", 16) == 0) { > + /* Ignore */ > + } else if(!vm_args->ignoreUnrecognized) { -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 08:47:44 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 16:47:44 +0000 Subject: RFC: add JamVM patch queue and add ignore-more-XX-options JamVM patch. In-Reply-To: <20110224164706.GF3448@rivendell.middle-earth.co.uk> References: <4D668455.1080700@zafena.se> <20110224164706.GF3448@rivendell.middle-earth.co.uk> Message-ID: <20110224164744.GG3448@rivendell.middle-earth.co.uk> On 16:47 Thu 24 Feb , Dr Andrew John Hughes wrote: > On 17:16 Thu 24 Feb , Xerxes R?nby wrote: > > Hi the attached patch creates a IcedTea patch queue to be applied on top of the extracted jamvm sources. > > The patch also fix PR640 > > http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=640 > > by making JamVM ignore the -XX:ThreadStackSize option. > > > > Ok to push? > > > > Cheers > > Xerxes > > Does JamVM now build? > > I didn't realise adding the patches would be that simple but I guess the patching > is after JamVM is extracted. > > Please commit to HEAD and 1.10 branch. > You should also update NEWS if JamVM does build... > > Index: icedtea6/Makefile.am > > =================================================================== > > --- icedtea6.orig/Makefile.am 2011-02-24 16:41:59.365413137 +0100 > > +++ icedtea6/Makefile.am 2011-02-24 16:48:21.413908589 +0100 > > @@ -356,6 +356,11 @@ > > patches/cacao/ignore-tests.patch > > endif > > > > +if BUILD_JAMVM > > +ICEDTEA_PATCHES += \ > > + patches/jamvm/ignore-more-XX-options.patch > > +endif > > + > > if ENABLE_PULSE_JAVA > > ICEDTEA_PATCHES += \ > > patches/pulse-soundproperties.patch > > Index: icedtea6/patches/jamvm/ignore-more-XX-options.patch > > =================================================================== > > --- /dev/null 1970-01-01 00:00:00.000000000 +0000 > > +++ icedtea6/patches/jamvm/ignore-more-XX-options.patch 2011-02-24 16:47:09.269910195 +0100 > > @@ -0,0 +1,12 @@ > > +Index: jamvm/jamvm/src/jni.c > > +=================================================================== > > +--- jamvm/jamvm.orig/src/jni.c 2011-02-23 09:54:17.000000000 +0100 > > ++++ jamvm/jamvm/src/jni.c 2011-02-23 09:58:21.000000000 +0100 > > +@@ -1638,6 +1638,7 @@ > > + #endif > > + /* Compatibility options */ > > + } else if(strncmp(string, "-XX:PermSize=", 13) == 0 || > > ++ strncmp(string, "-XX:ThreadStackSize=", 20) == 0 || > > + strncmp(string, "-XX:MaxPermSize=", 16) == 0) { > > + /* Ignore */ > > + } else if(!vm_args->ignoreUnrecognized) { > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From doko at ubuntu.com Thu Feb 24 08:52:56 2011 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 24 Feb 2011 17:52:56 +0100 Subject: RFC: add JamVM patch queue and add ignore-more-XX-options JamVM patch. In-Reply-To: <20110224164706.GF3448@rivendell.middle-earth.co.uk> References: <4D668455.1080700@zafena.se> <20110224164706.GF3448@rivendell.middle-earth.co.uk> Message-ID: <4D668CE8.1040602@ubuntu.com> On 24.02.2011 17:47, Dr Andrew John Hughes wrote: > On 17:16 Thu 24 Feb , Xerxes R?nby wrote: >> Hi the attached patch creates a IcedTea patch queue to be applied on top of the extracted jamvm sources. >> The patch also fix PR640 >> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=640 >> by making JamVM ignore the -XX:ThreadStackSize option. >> >> Ok to push? >> >> Cheers >> Xerxes > > Does JamVM now build? I have builds for ix86 and x86_64, not yet for ARM. Robert told about his plans to fix the builds for powerpc and ppc64. > I didn't realise adding the patches would be that simple but I guess the patching > is after JamVM is extracted. yes, same approach as with CACAO. Matthias From ahughes at redhat.com Thu Feb 24 08:23:42 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 16:23:42 +0000 Subject: RFC: icedtea6 - fix non fatal mv warnings In-Reply-To: <4D667A4F.4000203@zafena.se> References: <4D667A4F.4000203@zafena.se> Message-ID: <20110224162341.GE3448@rivendell.middle-earth.co.uk> On 16:33 Thu 24 Feb , Xerxes R?nby wrote: > The attached patch fixes these non fatal icedtea6 mv warnings by correcting the code to actually check if the file exist before trying to move it. > > mv: cannot stat `cacao-6a5eda011e49.tar.gz': No such file or directory > > mv: cannot stat `jamvm-10329d9f3205698af125bba131b4f47339e81d90.tar.gz': No such file or directory > > mv: cannot stat `openjdk-6-src-b21-20_jan_2011.tar.gz': No such file or directory > > and > > mv: cannot stat `hotspot.tar.gz': No such file or directory > > > Cheers > Xerxes > > Sounds ok to me, but change the test to -e. Otherwise, potentially a directory or symbolic link could exist with that name. The former may not be common, but the latter is as the alt-src-zip support creates such links. > Index: icedtea6/Makefile.am > =================================================================== > --- icedtea6.orig/Makefile.am 2011-02-24 15:59:08.933380661 +0100 > +++ icedtea6/Makefile.am 2011-02-24 16:02:29.285916690 +0100 > @@ -748,7 +748,7 @@ > if ! echo "$(CACAO_SHA256SUM) $(CACAO_SRC_ZIP)" \ > | $(SHA256SUM) --check ; \ > then \ > - if [ $(CACAO_SRC_ZIP) ] ; \ > + if [ -f $(CACAO_SRC_ZIP) ] ; \ > then \ > mv $(CACAO_SRC_ZIP) $(CACAO_SRC_ZIP).old ; \ > fi ; \ > @@ -776,7 +776,7 @@ > if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ > | $(SHA256SUM) --check ; \ > then \ > - if [ $(JAMVM_SRC_ZIP) ] ; \ > + if [ -f $(JAMVM_SRC_ZIP) ] ; \ > then \ > mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ > fi ; \ > @@ -818,7 +818,7 @@ > if ! echo "$(OPENJDK_MD5SUM) $(OPENJDK_SRC_ZIP)" \ > | $(MD5SUM) --check ; \ > then \ > - if [ $(OPENJDK_SRC_ZIP) ] ; \ > + if [ -f $(OPENJDK_SRC_ZIP) ] ; \ > then \ > mv $(OPENJDK_SRC_ZIP) $(OPENJDK_SRC_ZIP).old ; \ > fi ; \ > @@ -835,7 +835,7 @@ > if ! echo "$${hotspot_md5sum} $(HOTSPOT_SRC_ZIP)" \ > | $(MD5SUM) --check ; \ > then \ > - if [ $(HOTSPOT_SRC_ZIP) ] ; \ > + if [ -f $(HOTSPOT_SRC_ZIP) ] ; \ > then \ > mv $(HOTSPOT_SRC_ZIP) $(HOTSPOT_SRC_ZIP).old ; \ > fi ; \ > Index: icedtea6/ChangeLog > =================================================================== > --- icedtea6.orig/ChangeLog 2011-02-24 16:04:43.765910894 +0100 > +++ icedtea6/ChangeLog 2011-02-24 16:14:30.469910614 +0100 > @@ -1,3 +1,12 @@ > +2011-02-24 Xerxes Ranby > + > + * Makefile.am (stamps/download-cacao.stamp): > + Fix warning, check if the CACAO_SRC_ZIP file exist > + before trying to rename it. > + (stamps/download-jamvm.stamp): Likewise for JAMVM_SRC_ZIP. > + (stamps/download-openjdk.stamp): > + Likewise for OPENJDK_SRC_ZIP and HOTSPOT_SRC_ZIP. > + > 2011-02-24 Andrew John Hughes > > * patches/pr639-missing_shark_include.patch: -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 08:59:16 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 16:59:16 +0000 Subject: RFC: add JamVM patch queue and add ignore-more-XX-options JamVM patch. In-Reply-To: <4D668CE8.1040602@ubuntu.com> References: <4D668455.1080700@zafena.se> <20110224164706.GF3448@rivendell.middle-earth.co.uk> <4D668CE8.1040602@ubuntu.com> Message-ID: <20110224165916.GI3448@rivendell.middle-earth.co.uk> On 17:52 Thu 24 Feb , Matthias Klose wrote: > On 24.02.2011 17:47, Dr Andrew John Hughes wrote: > > On 17:16 Thu 24 Feb , Xerxes R?nby wrote: > >> Hi the attached patch creates a IcedTea patch queue to be applied on top of the extracted jamvm sources. > >> The patch also fix PR640 > >> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=640 > >> by making JamVM ignore the -XX:ThreadStackSize option. > >> > >> Ok to push? > >> > >> Cheers > >> Xerxes > > > > Does JamVM now build? > > I have builds for ix86 and x86_64, not yet for ARM. Robert told about his plans > to fix the builds for powerpc and ppc64. > Presumably with this patch? Otherwise you hit PR640. > > I didn't realise adding the patches would be that simple but I guess the patching > > is after JamVM is extracted. > > yes, same approach as with CACAO. > > Matthias -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 09:04:31 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 17:04:31 +0000 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D668AA7.30503@redhat.com> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> Message-ID: <20110224170431.GJ3448@rivendell.middle-earth.co.uk> On 17:43 Thu 24 Feb , Jiri Vanek wrote: > On 02/24/2011 12:36 AM, Omair Majid wrote: > > So, this patch expects fixed about.jnlp to have code base of > file://$DEST_DIR/share > > Then removes all-permissions, and lunched fixed window without them. The > window is not running in invoke later(which probably caused the hang) > but runs in javaws's own thread. Also points directly to correct jnlp > local file and runs offline. > Comments inline. Please separate any formatting changes to another patch, though I don't see why these are necessary at all. > > On 02/23/2011 12:51 PM, Dr Andrew John Hughes wrote: > >> What is the motivation for this change? Assuming it still runs without > >> all-permissions, the change looks fine. > >> > > > > From my very limited testing, it doesnt :( > > > > snip > > # HG changeset patch > # User Jiri Vanek > # Date 1298565203 -3600 > # Node ID e2f1a23ade0931e1b6810cb06d4b313ee9333415 > # Parent d7fee305bd4f63d3a37cfa041b9af726e296d22f > about.jar can now be lunched localy, without all-permissions, and > about.jnlp is red from directory instead from jar. > > diff -r d7fee305bd4f -r e2f1a23ade09 ChangeLog > --- a/ChangeLog Wed Feb 23 13:37:10 2011 -0500 > +++ b/ChangeLog Thu Feb 24 17:33:23 2011 +0100 > @@ -1,3 +1,11 @@ > +2011-02-24 Jiri Vanek > + > + * netx/net/sourceforge/jnlp/runtime/Boot.java: getAboutFile changed to > return path to local about.jnlp instead of inner-ftom jar What does ftom stand for? > + * extras/net/sourceforge/jnlp/about/Main.java: removed ivokelater, > useless hypertextlistener and runtime which needed special permissions. Why is it useless? Both this and the above need to be more verbose to include the changes made. > + * netx/net/sourceforge/jnlp/resources/about.jnlp: removed > > + > + > + > 2011-02-23 Omair Majid > > * Makefile.am: Add missing slash to JRE. > diff -r d7fee305bd4f -r e2f1a23ade09 > extra/net/sourceforge/jnlp/about/Main.java > --- a/extra/net/sourceforge/jnlp/about/Main.java Wed Feb 23 13:37:10 > 2011 -0500 > +++ b/extra/net/sourceforge/jnlp/about/Main.java Thu Feb 24 17:33:23 > 2011 +0100 > @@ -41,19 +41,15 @@ > import java.awt.Dimension; > import java.awt.Toolkit; > import java.io.IOException; > -import java.net.URL; > + > > import javax.swing.JFrame; > import javax.swing.JPanel; > import javax.swing.JTabbedPane; > import javax.swing.UIManager; > -import javax.swing.event.HyperlinkEvent; > -import javax.swing.event.HyperlinkListener; > > -import net.sourceforge.jnlp.Launcher; > -import net.sourceforge.jnlp.runtime.JNLPRuntime; > > -public class Main extends JPanel implements HyperlinkListener { > +public class Main extends JPanel{ > Why these changes? > private final String notes = > "/net/sourceforge/jnlp/about/resources/notes.html"; > private final String apps = > "/net/sourceforge/jnlp/about/resources/applications.html"; > @@ -62,13 +58,11 @@ > > public Main() throws IOException { > super(new BorderLayout()); > - > + > HTMLPanel notesPanel = new HTMLPanel(getClass().getResource(notes)); > HTMLPanel appsPanel = new HTMLPanel(getClass().getResource(apps)); > HTMLPanel aboutPanel = new HTMLPanel(getClass().getResource(about)); > > - appsPanel.pane.addHyperlinkListener(this); > - > tabbedPane = new JTabbedPane(); > > tabbedPane.add("About NetX", aboutPanel); > @@ -80,7 +74,6 @@ > } > > private static void createAndShowGUI() { > - JNLPRuntime.setExitClass(Main.class); > > try { > UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); > @@ -112,24 +105,8 @@ > } > > public static void main(String[] args) { > - javax.swing.SwingUtilities.invokeLater(new Runnable() { > - public void run() { > - createAndShowGUI(); > - } > - }); > - } > + createAndShowGUI(); > + } > > - public void hyperlinkUpdate(HyperlinkEvent e) { > - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { > - URL url = e.getURL(); > > - Launcher launcher = new Launcher( > - JNLPRuntime.getDefaultLaunchHandler()); > - try { > - launcher.launchBackground(url); > - } catch (Exception ex) { > - ex.printStackTrace(); > - } > - } > - } > } > diff -r d7fee305bd4f -r e2f1a23ade09 > netx/net/sourceforge/jnlp/resources/about.jnlp > --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 > 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 17:33:23 > 2011 +0100 > @@ -1,5 +1,5 @@ > > - codebase="http://icedtea.classpath.org/netx/"> > + codebase="file:///home/jvanek/icedtea-web-image/share/icedtea-web/"> > > About window for NetX > NetX > @@ -12,7 +12,7 @@ > > > > - > + > > > > diff -r d7fee305bd4f -r e2f1a23ade09 > netx/net/sourceforge/jnlp/runtime/Boot.java > --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 > 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 17:33:23 > 2011 +0100 > @@ -141,22 +141,26 @@ > System.exit(0); > } > > - if (null != getOption("-about")) > + if (null != getOption("-about")) { > System.out.println(aboutMessage); > + } > > - if (null != getOption("-verbose")) > + if (null != getOption("-verbose")) { > JNLPRuntime.setDebug(true); > + } > I don't see the point in these changes. This is just noise which makes the patch hard to read. > if (null != getOption("-update")) { > int value = Integer.parseInt(getOption("-update")); > JNLPRuntime.setDefaultUpdatePolicy(new UpdatePolicy(value > * 1000l)); > } > > - if (null != getOption("-headless")) > + if (null != getOption("-headless")) { > JNLPRuntime.setHeadless(true); > + } > > - if (null != getOption("-noupdate")) > + if (null != getOption("-noupdate")) { > JNLPRuntime.setDefaultUpdatePolicy(UpdatePolicy.NEVER); > + } > > if (null != getOption("-Xnofork")) { > JNLPRuntime.setForksAllowed(false); > @@ -194,8 +198,9 @@ > } catch (LaunchException ex) { > // default handler prints this > } catch (Exception ex) { > - if (JNLPRuntime.isDebug()) > + if (JNLPRuntime.isDebug()) { > ex.printStackTrace(); > + } > > fatalError(R("RUnexpected", ex.toString(), > ex.getStackTrace()[0])); > } > @@ -218,8 +223,16 @@ > cl = ClassLoader.getSystemClassLoader(); > } > try { > - return > cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > + //exctracts full path to about.jnlp Typo; extracts > + String s = > cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); > + s=s.substring(0,s.indexOf("!")); > + s=s.substring(s.indexOf(":")+1); > + s=s.substring(s.indexOf(":")+1); > + s="file://"+s.replace("netx.jar","about.jnlp"); > + System.out.println(s); > + return s; What does this do? > } catch (Exception e) { > + e.printStackTrace(); > return null; > } > } > @@ -235,8 +248,9 @@ > // override -jnlp with aboutFile > if (getOption("-about") != null) { > location = getAboutFile(); > - if (location == null) > + if (location == null) { > fatalError(R("RNoAboutJnlp")); > + } > } else { > location = getJNLPFile(); > } > @@ -246,21 +260,24 @@ > System.exit(1); > } > > - if (JNLPRuntime.isDebug()) > + if (JNLPRuntime.isDebug()) { > System.out.println(R("BFileLoc") + ": " + location); > + } > > URL url = null; > > try { > - if (new File(location).exists()) > - // TODO: Should be toURI().toURL() > + if (new File(location).exists()) // TODO: Should be > toURI().toURL() > + { > url = new File(location).toURL(); // Why use > file.getCanonicalFile? > - else > + } else { > url = new > URL(ServiceUtil.getBasicService().getCodeBase(), location); > + } > } catch (Exception e) { > fatalError("Invalid jnlp file " + location); > - if (JNLPRuntime.isDebug()) > + if (JNLPRuntime.isDebug()) { > e.printStackTrace(); > + } > } > > boolean strict = (null != getOption("-strict")); > @@ -275,20 +292,26 @@ > // add in extra params from command line > addProperties(file); > > - if (file.isApplet()) > + if (file.isApplet()) { > addParameters(file); > + } > > - if (file.isApplication()) > + if (file.isApplication()) { > addArguments(file); > + } > > if (JNLPRuntime.isDebug()) { > - if (getOption("-arg") != null) > - if (file.isInstaller() || file.isApplet()) > + if (getOption("-arg") != null) { > + if (file.isInstaller() || file.isApplet()) { > System.out.println(R("BArgsNA")); > + } > + } > > - if (getOption("-param") != null) > - if (file.isApplication()) > + if (getOption("-param") != null) { > + if (file.isApplication()) { > System.out.println(R("BParamNA")); > + } > + } > } > > return file; > @@ -304,8 +327,9 @@ > for (int i = 0; i < props.length; i++) { > // allows empty property, not sure about validity of that. > int equals = props[i].indexOf("="); > - if (equals == -1) > + if (equals == -1) { > fatalError(R("BBadProp", props[i])); > + } > > String key = props[i].substring(0, equals); > String value = props[i].substring(equals + 1, > props[i].length()); > @@ -325,8 +349,9 @@ > for (int i = 0; i < params.length; i++) { > // allows empty param, not sure about validity of that. > int equals = params[i].indexOf("="); > - if (equals == -1) > + if (equals == -1) { > fatalError(R("BBadParam", params[i])); > + } > > String name = params[i].substring(0, equals); > String value = params[i].substring(equals + 1, > params[i].length()); > @@ -381,10 +406,11 @@ > private static String getOption(String option) { > String result[] = getOptions(option); > > - if (result.length == 0) > + if (result.length == 0) { > return null; > - else > + } else { > return result[0]; > + } > } > > /** > @@ -398,14 +424,16 @@ > > for (int i = 0; i < args.length; i++) { > if (option.equals(args[i])) { > - if (-1 == doubleArgs.indexOf(option)) > + if (-1 == doubleArgs.indexOf(option)) { > result.add(option); > - else if (i + 1 < args.length) > + } else if (i + 1 < args.length) { > result.add(args[i + 1]); > + } > } > > - if (args[i].startsWith("-") && -1 != > doubleArgs.indexOf(args[i])) > + if (args[i].startsWith("-") && -1 != > doubleArgs.indexOf(args[i])) { > i++; > + } > } > > return result.toArray(new String[result.size()]); > # HG changeset patch > # User Jiri Vanek > # Date 1298565203 -3600 > # Node ID e2f1a23ade0931e1b6810cb06d4b313ee9333415 > # Parent d7fee305bd4f63d3a37cfa041b9af726e296d22f > about.jar can now be lunched localy, without all-permissions, and about.jnlp is red from directory instead from jar. > > diff -r d7fee305bd4f -r e2f1a23ade09 ChangeLog > --- a/ChangeLog Wed Feb 23 13:37:10 2011 -0500 > +++ b/ChangeLog Thu Feb 24 17:33:23 2011 +0100 > @@ -1,3 +1,11 @@ > +2011-02-24 Jiri Vanek > + > + * netx/net/sourceforge/jnlp/runtime/Boot.java: getAboutFile changed to return path to local about.jnlp instead of inner-ftom jar > + * extras/net/sourceforge/jnlp/about/Main.java: removed ivokelater, useless hypertextlistener and runtime which needed special permissions. > + * netx/net/sourceforge/jnlp/resources/about.jnlp: removed > + > + > + > 2011-02-23 Omair Majid > > * Makefile.am: Add missing slash to JRE. > diff -r d7fee305bd4f -r e2f1a23ade09 extra/net/sourceforge/jnlp/about/Main.java > --- a/extra/net/sourceforge/jnlp/about/Main.java Wed Feb 23 13:37:10 2011 -0500 > +++ b/extra/net/sourceforge/jnlp/about/Main.java Thu Feb 24 17:33:23 2011 +0100 > @@ -41,19 +41,15 @@ > import java.awt.Dimension; > import java.awt.Toolkit; > import java.io.IOException; > -import java.net.URL; > + > > import javax.swing.JFrame; > import javax.swing.JPanel; > import javax.swing.JTabbedPane; > import javax.swing.UIManager; > -import javax.swing.event.HyperlinkEvent; > -import javax.swing.event.HyperlinkListener; > > -import net.sourceforge.jnlp.Launcher; > -import net.sourceforge.jnlp.runtime.JNLPRuntime; > > -public class Main extends JPanel implements HyperlinkListener { > +public class Main extends JPanel{ > > private final String notes = "/net/sourceforge/jnlp/about/resources/notes.html"; > private final String apps = "/net/sourceforge/jnlp/about/resources/applications.html"; > @@ -62,13 +58,11 @@ > > public Main() throws IOException { > super(new BorderLayout()); > - > + > HTMLPanel notesPanel = new HTMLPanel(getClass().getResource(notes)); > HTMLPanel appsPanel = new HTMLPanel(getClass().getResource(apps)); > HTMLPanel aboutPanel = new HTMLPanel(getClass().getResource(about)); > > - appsPanel.pane.addHyperlinkListener(this); > - > tabbedPane = new JTabbedPane(); > > tabbedPane.add("About NetX", aboutPanel); > @@ -80,7 +74,6 @@ > } > > private static void createAndShowGUI() { > - JNLPRuntime.setExitClass(Main.class); > > try { > UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); > @@ -112,24 +105,8 @@ > } > > public static void main(String[] args) { > - javax.swing.SwingUtilities.invokeLater(new Runnable() { > - public void run() { > - createAndShowGUI(); > - } > - }); > - } > + createAndShowGUI(); > + } > > - public void hyperlinkUpdate(HyperlinkEvent e) { > - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { > - URL url = e.getURL(); > > - Launcher launcher = new Launcher( > - JNLPRuntime.getDefaultLaunchHandler()); > - try { > - launcher.launchBackground(url); > - } catch (Exception ex) { > - ex.printStackTrace(); > - } > - } > - } > } > diff -r d7fee305bd4f -r e2f1a23ade09 netx/net/sourceforge/jnlp/resources/about.jnlp > --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 17:33:23 2011 +0100 > @@ -1,5 +1,5 @@ > > - > + > > About window for NetX > NetX > @@ -12,7 +12,7 @@ > > > > - > + > > > > diff -r d7fee305bd4f -r e2f1a23ade09 netx/net/sourceforge/jnlp/runtime/Boot.java > --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 17:33:23 2011 +0100 > @@ -141,22 +141,26 @@ > System.exit(0); > } > > - if (null != getOption("-about")) > + if (null != getOption("-about")) { > System.out.println(aboutMessage); > + } > > - if (null != getOption("-verbose")) > + if (null != getOption("-verbose")) { > JNLPRuntime.setDebug(true); > + } > > if (null != getOption("-update")) { > int value = Integer.parseInt(getOption("-update")); > JNLPRuntime.setDefaultUpdatePolicy(new UpdatePolicy(value * 1000l)); > } > > - if (null != getOption("-headless")) > + if (null != getOption("-headless")) { > JNLPRuntime.setHeadless(true); > + } > > - if (null != getOption("-noupdate")) > + if (null != getOption("-noupdate")) { > JNLPRuntime.setDefaultUpdatePolicy(UpdatePolicy.NEVER); > + } > > if (null != getOption("-Xnofork")) { > JNLPRuntime.setForksAllowed(false); > @@ -194,8 +198,9 @@ > } catch (LaunchException ex) { > // default handler prints this > } catch (Exception ex) { > - if (JNLPRuntime.isDebug()) > + if (JNLPRuntime.isDebug()) { > ex.printStackTrace(); > + } > > fatalError(R("RUnexpected", ex.toString(), ex.getStackTrace()[0])); > } > @@ -218,8 +223,16 @@ > cl = ClassLoader.getSystemClassLoader(); > } > try { > - return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > + //exctracts full path to about.jnlp > + String s = cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); > + s=s.substring(0,s.indexOf("!")); > + s=s.substring(s.indexOf(":")+1); > + s=s.substring(s.indexOf(":")+1); > + s="file://"+s.replace("netx.jar","about.jnlp"); > + System.out.println(s); > + return s; > } catch (Exception e) { > + e.printStackTrace(); > return null; > } > } > @@ -235,8 +248,9 @@ > // override -jnlp with aboutFile > if (getOption("-about") != null) { > location = getAboutFile(); > - if (location == null) > + if (location == null) { > fatalError(R("RNoAboutJnlp")); > + } > } else { > location = getJNLPFile(); > } > @@ -246,21 +260,24 @@ > System.exit(1); > } > > - if (JNLPRuntime.isDebug()) > + if (JNLPRuntime.isDebug()) { > System.out.println(R("BFileLoc") + ": " + location); > + } > > URL url = null; > > try { > - if (new File(location).exists()) > - // TODO: Should be toURI().toURL() > + if (new File(location).exists()) // TODO: Should be toURI().toURL() > + { > url = new File(location).toURL(); // Why use file.getCanonicalFile? > - else > + } else { > url = new URL(ServiceUtil.getBasicService().getCodeBase(), location); > + } > } catch (Exception e) { > fatalError("Invalid jnlp file " + location); > - if (JNLPRuntime.isDebug()) > + if (JNLPRuntime.isDebug()) { > e.printStackTrace(); > + } > } > > boolean strict = (null != getOption("-strict")); > @@ -275,20 +292,26 @@ > // add in extra params from command line > addProperties(file); > > - if (file.isApplet()) > + if (file.isApplet()) { > addParameters(file); > + } > > - if (file.isApplication()) > + if (file.isApplication()) { > addArguments(file); > + } > > if (JNLPRuntime.isDebug()) { > - if (getOption("-arg") != null) > - if (file.isInstaller() || file.isApplet()) > + if (getOption("-arg") != null) { > + if (file.isInstaller() || file.isApplet()) { > System.out.println(R("BArgsNA")); > + } > + } > > - if (getOption("-param") != null) > - if (file.isApplication()) > + if (getOption("-param") != null) { > + if (file.isApplication()) { > System.out.println(R("BParamNA")); > + } > + } > } > > return file; > @@ -304,8 +327,9 @@ > for (int i = 0; i < props.length; i++) { > // allows empty property, not sure about validity of that. > int equals = props[i].indexOf("="); > - if (equals == -1) > + if (equals == -1) { > fatalError(R("BBadProp", props[i])); > + } > > String key = props[i].substring(0, equals); > String value = props[i].substring(equals + 1, props[i].length()); > @@ -325,8 +349,9 @@ > for (int i = 0; i < params.length; i++) { > // allows empty param, not sure about validity of that. > int equals = params[i].indexOf("="); > - if (equals == -1) > + if (equals == -1) { > fatalError(R("BBadParam", params[i])); > + } > > String name = params[i].substring(0, equals); > String value = params[i].substring(equals + 1, params[i].length()); > @@ -381,10 +406,11 @@ > private static String getOption(String option) { > String result[] = getOptions(option); > > - if (result.length == 0) > + if (result.length == 0) { > return null; > - else > + } else { > return result[0]; > + } > } > > /** > @@ -398,14 +424,16 @@ > > for (int i = 0; i < args.length; i++) { > if (option.equals(args[i])) { > - if (-1 == doubleArgs.indexOf(option)) > + if (-1 == doubleArgs.indexOf(option)) { > result.add(option); > - else if (i + 1 < args.length) > + } else if (i + 1 < args.length) { > result.add(args[i + 1]); > + } > } > > - if (args[i].startsWith("-") && -1 != doubleArgs.indexOf(args[i])) > + if (args[i].startsWith("-") && -1 != doubleArgs.indexOf(args[i])) { > i++; > + } > } > > return result.toArray(new String[result.size()]); -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ptisnovs at icedtea.classpath.org Thu Feb 24 09:11:29 2011 From: ptisnovs at icedtea.classpath.org (ptisnovs at icedtea.classpath.org) Date: Thu, 24 Feb 2011 17:11:29 +0000 Subject: /hg/icedtea6: Fixed tree to which the patch jtreg-png-reader.pat... Message-ID: changeset ea1b6c251de5 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=ea1b6c251de5 author: ptisnovs date: Thu Feb 24 18:13:43 2011 +0100 Fixed tree to which the patch jtreg-png-reader.patch is applied. diffstat: 2 files changed, 15 insertions(+), 10 deletions(-) ChangeLog | 5 +++++ patches/jtreg-png-reader.patch | 20 ++++++++++---------- diffs (68 lines): diff -r 6e7f2c1f25df -r ea1b6c251de5 ChangeLog --- a/ChangeLog Thu Feb 24 03:22:54 2011 +0000 +++ b/ChangeLog Thu Feb 24 18:13:43 2011 +0100 @@ -1,3 +1,8 @@ 2011-02-24 Andrew John Hughes + + * patches/jtreg-png-reader.patch: + Fixed tree to which this patch is applied. + 2011-02-24 Andrew John Hughes * patches/pr639-missing_shark_include.patch: diff -r 6e7f2c1f25df -r ea1b6c251de5 patches/jtreg-png-reader.patch --- a/patches/jtreg-png-reader.patch Thu Feb 24 03:22:54 2011 +0000 +++ b/patches/jtreg-png-reader.patch Thu Feb 24 18:13:43 2011 +0100 @@ -1,6 +1,6 @@ diff -Nu old/AbstractImageProcessor.java diff -Nu old/AbstractImageProcessor.java PngReader/AbstractImageProcessor.java ---- openjdk/jdk/test/javax/imageio/plugins/png/PngReader/AbstractImageProcessor.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk-old/jdk/test/javax/imageio/plugins/png/PngReader/AbstractImageProcessor.java 2011-01-31 13:59:40.976990000 +0100 +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/javax/imageio/plugins/png/PngReader/AbstractImageProcessor.java 2011-01-31 13:59:40.976990000 +0100 @@ -0,0 +1,316 @@ +/* + * Copyright 2011 Red Hat, Inc. All Rights Reserved. @@ -319,8 +319,8 @@ diff -Nu old/AbstractImageProcessor.java + +} diff -Nu old/BrokenPngImageProcessor.java PngReader/BrokenPngImageProcessor.java ---- openjdk/jdk/test/javax/imageio/plugins/png/PngReader/BrokenPngImageProcessor.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk-old/jdk/test/javax/imageio/plugins/png/PngReader/BrokenPngImageProcessor.java 2011-01-31 13:59:40.976990000 +0100 +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/javax/imageio/plugins/png/PngReader/BrokenPngImageProcessor.java 2011-01-31 13:59:40.976990000 +0100 @@ -0,0 +1,36 @@ +/* + * Copyright 2011 Red Hat, Inc. All Rights Reserved. @@ -359,8 +359,8 @@ diff -Nu old/BrokenPngImageProcessor.jav + } +} diff -Nu old/GoodPngImageProcessor.java PngReader/GoodPngImageProcessor.java ---- openjdk/jdk/test/javax/imageio/plugins/png/PngReader/GoodPngImageProcessor.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk-old/jdk/test/javax/imageio/plugins/png/PngReader/GoodPngImageProcessor.java 2011-01-31 13:59:40.976990000 +0100 +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/javax/imageio/plugins/png/PngReader/GoodPngImageProcessor.java 2011-01-31 13:59:40.976990000 +0100 @@ -0,0 +1,36 @@ +/* + * Copyright 2011 Red Hat, Inc. All Rights Reserved. @@ -399,8 +399,8 @@ diff -Nu old/GoodPngImageProcessor.java + } +} diff -Nu old/ImageReadException.java PngReader/ImageReadException.java ---- openjdk/jdk/test/javax/imageio/plugins/png/PngReader/ImageReadException.java 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk-old/jdk/test/javax/imageio/plugins/png/PngReader/ImageReadException.java 2011-01-31 13:59:40.976990000 +0100 +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/javax/imageio/plugins/png/PngReader/ImageReadException.java 2011-01-31 13:59:40.976990000 +0100 @@ -0,0 +1,48 @@ +/* + * Copyright 2011 Red Hat, Inc. All Rights Reserved. @@ -451,8 +451,8 @@ diff -Nu old/ImageReadException.java Png + +} diff -Nu old/pngsuite.doc PngReader/pngsuite.doc ---- openjdk/jdk/test/javax/imageio/plugins/png/PngReader/pngsuite.doc 1970-01-01 01:00:00.000000000 +0100 -+++ openjdk-old/jdk/test/javax/imageio/plugins/png/PngReader/pngsuite.doc 2011-01-31 13:59:40.976990000 +0100 +--- /dev/null 1970-01-01 01:00:00.000000000 +0100 ++++ openjdk/jdk/test/javax/imageio/plugins/png/PngReader/pngsuite.doc 2011-01-31 13:59:40.976990000 +0100 @@ -0,0 +1,520 @@ + PNGSUITE +---------------- From jvanek at redhat.com Thu Feb 24 09:20:12 2011 From: jvanek at redhat.com (Jiri Vanek) Date: Thu, 24 Feb 2011 18:20:12 +0100 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <20110224170431.GJ3448@rivendell.middle-earth.co.uk> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> Message-ID: <4D66934C.3010908@redhat.com> On 02/24/2011 06:04 PM, Dr Andrew John Hughes wrote: > On 17:43 Thu 24 Feb , Jiri Vanek wrote: >> On 02/24/2011 12:36 AM, Omair Majid wrote: >> >> So, this patch expects fixed about.jnlp to have code base of >> file://$DEST_DIR/share >> >> Then removes all-permissions, and lunched fixed window without them. The >> window is not running in invoke later(which probably caused the hang) >> but runs in javaws's own thread. Also points directly to correct jnlp >> local file and runs offline. >> > > Comments inline. > > Please separate any formatting changes to another patch, though I don't > see why these are necessary at all. > All the formating chanegs are {} behind if. Their's existence protect from stupid mistake. >>> On 02/23/2011 12:51 PM, Dr Andrew John Hughes wrote: >>>> What is the motivation for this change? Assuming it still runs without >>>> all-permissions, the change looks fine. >>>> >>> >>> From my very limited testing, it doesnt :( >> > >>> snip >> >> # HG changeset patch >> # User Jiri Vanek >> # Date 1298565203 -3600 >> # Node ID e2f1a23ade0931e1b6810cb06d4b313ee9333415 >> # Parent d7fee305bd4f63d3a37cfa041b9af726e296d22f >> about.jar can now be lunched localy, without all-permissions, and >> about.jnlp is red from directory instead from jar. >> >> diff -r d7fee305bd4f -r e2f1a23ade09 ChangeLog >> --- a/ChangeLog Wed Feb 23 13:37:10 2011 -0500 >> +++ b/ChangeLog Thu Feb 24 17:33:23 2011 +0100 >> @@ -1,3 +1,11 @@ >> +2011-02-24 Jiri Vanek >> + >> + * netx/net/sourceforge/jnlp/runtime/Boot.java: getAboutFile changed to >> return path to local about.jnlp instead of inner-ftom jar > > What does ftom stand for? about.jnlp was laoded from inside from jar. No it is loaded from directory where netx.jar is placed. > >> + * extras/net/sourceforge/jnlp/about/Main.java: removed ivokelater, >> useless hypertextlistener and runtime which needed special permissions. > > Why is it useless? > Without permissions, the likns can not be lunched by clicking. Most of the likns are on second tab with demos, which should be removed from my point of view... Eh bed words maybe. Runtime is useless without hyperlinklistener and without invoke later, but it itself needed special permissions should it have to be removed. > Both this and the above need to be more verbose to include the changes made. > >> + * netx/net/sourceforge/jnlp/resources/about.jnlp: removed >> >> + >> + >> + >> 2011-02-23 Omair Majid >> >> * Makefile.am: Add missing slash to JRE. >> diff -r d7fee305bd4f -r e2f1a23ade09 >> extra/net/sourceforge/jnlp/about/Main.java >> --- a/extra/net/sourceforge/jnlp/about/Main.java Wed Feb 23 13:37:10 >> 2011 -0500 >> +++ b/extra/net/sourceforge/jnlp/about/Main.java Thu Feb 24 17:33:23 >> 2011 +0100 >> @@ -41,19 +41,15 @@ >> import java.awt.Dimension; >> import java.awt.Toolkit; >> import java.io.IOException; >> -import java.net.URL; >> + >> >> import javax.swing.JFrame; >> import javax.swing.JPanel; >> import javax.swing.JTabbedPane; >> import javax.swing.UIManager; >> -import javax.swing.event.HyperlinkEvent; >> -import javax.swing.event.HyperlinkListener; >> >> -import net.sourceforge.jnlp.Launcher; >> -import net.sourceforge.jnlp.runtime.JNLPRuntime; >> >> -public class Main extends JPanel implements HyperlinkListener { >> +public class Main extends JPanel{ >> > > Why these changes? > as explained^^ >> private final String notes = >> "/net/sourceforge/jnlp/about/resources/notes.html"; >> private final String apps = >> "/net/sourceforge/jnlp/about/resources/applications.html"; >> @@ -62,13 +58,11 @@ >> >> public Main() throws IOException { >> super(new BorderLayout()); >> - >> + >> HTMLPanel notesPanel = new HTMLPanel(getClass().getResource(notes)); >> HTMLPanel appsPanel = new HTMLPanel(getClass().getResource(apps)); >> HTMLPanel aboutPanel = new HTMLPanel(getClass().getResource(about)); >> >> - appsPanel.pane.addHyperlinkListener(this); >> - >> tabbedPane = new JTabbedPane(); >> >> tabbedPane.add("About NetX", aboutPanel); >> @@ -80,7 +74,6 @@ >> } >> >> private static void createAndShowGUI() { >> - JNLPRuntime.setExitClass(Main.class); >> >> try { >> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); >> @@ -112,24 +105,8 @@ >> } >> >> public static void main(String[] args) { >> - javax.swing.SwingUtilities.invokeLater(new Runnable() { >> - public void run() { >> - createAndShowGUI(); >> - } >> - }); >> - } >> + createAndShowGUI(); >> + } >> >> - public void hyperlinkUpdate(HyperlinkEvent e) { >> - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { >> - URL url = e.getURL(); >> >> - Launcher launcher = new Launcher( >> - JNLPRuntime.getDefaultLaunchHandler()); >> - try { >> - launcher.launchBackground(url); >> - } catch (Exception ex) { >> - ex.printStackTrace(); >> - } >> - } >> - } >> } >> diff -r d7fee305bd4f -r e2f1a23ade09 >> netx/net/sourceforge/jnlp/resources/about.jnlp >> --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 >> 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 17:33:23 >> 2011 +0100 >> @@ -1,5 +1,5 @@ >> >> -> codebase="http://icedtea.classpath.org/netx/"> >> +> codebase="file:///home/jvanek/icedtea-web-image/share/icedtea-web/"> >> >> About window for NetX >> NetX >> @@ -12,7 +12,7 @@ >> >> >> >> - >> + >> >> >> >> diff -r d7fee305bd4f -r e2f1a23ade09 >> netx/net/sourceforge/jnlp/runtime/Boot.java >> --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 >> 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 17:33:23 >> 2011 +0100 >> @@ -141,22 +141,26 @@ >> System.exit(0); >> } >> >> - if (null != getOption("-about")) >> + if (null != getOption("-about")) { >> System.out.println(aboutMessage); >> + } >> >> - if (null != getOption("-verbose")) >> + if (null != getOption("-verbose")) { >> JNLPRuntime.setDebug(true); >> + } >> > > I don't see the point in these changes. This is just noise which makes > the patch hard to read. > I really hate missing brackets behind if() structure. SO I have added them. As a cosmetic change it should be another patch. >> if (null != getOption("-update")) { >> int value = Integer.parseInt(getOption("-update")); >> JNLPRuntime.setDefaultUpdatePolicy(new UpdatePolicy(value >> * 1000l)); >> } >> >> - if (null != getOption("-headless")) >> + if (null != getOption("-headless")) { >> JNLPRuntime.setHeadless(true); >> + } >> >> - if (null != getOption("-noupdate")) >> + if (null != getOption("-noupdate")) { >> JNLPRuntime.setDefaultUpdatePolicy(UpdatePolicy.NEVER); >> + } >> >> if (null != getOption("-Xnofork")) { >> JNLPRuntime.setForksAllowed(false); >> @@ -194,8 +198,9 @@ >> } catch (LaunchException ex) { >> // default handler prints this >> } catch (Exception ex) { >> - if (JNLPRuntime.isDebug()) >> + if (JNLPRuntime.isDebug()) { >> ex.printStackTrace(); >> + } >> >> fatalError(R("RUnexpected", ex.toString(), >> ex.getStackTrace()[0])); >> } >> @@ -218,8 +223,16 @@ >> cl = ClassLoader.getSystemClassLoader(); >> } >> try { >> - return >> cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); >> + //exctracts full path to about.jnlp > > Typo; extracts > >> + String s = >> cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); >> + s=s.substring(0,s.indexOf("!")); >> + s=s.substring(s.indexOf(":")+1); >> + s=s.substring(s.indexOf(":")+1); >> + s="file://"+s.replace("netx.jar","about.jnlp"); >> + System.out.println(s); >> + return s; > > What does this do? This extracts full path to netx.jar (and from it) to about.jnlp file. I do not know different way ho to mine this information. > >> } catch (Exception e) { >> + e.printStackTrace(); >> return null; >> } >> } >> @@ -235,8 +248,9 @@ >> // override -jnlp with aboutFile >> if (getOption("-about") != null) { >> location = getAboutFile(); >> - if (location == null) >> + if (location == null) { >> fatalError(R("RNoAboutJnlp")); >> + } >> } else { >> location = getJNLPFile(); >> } >> @@ -246,21 +260,24 @@ >> System.exit(1); >> } >> >> - if (JNLPRuntime.isDebug()) >> + if (JNLPRuntime.isDebug()) { >> System.out.println(R("BFileLoc") + ": " + location); >> + } >> >> URL url = null; >> >> try { >> - if (new File(location).exists()) >> - // TODO: Should be toURI().toURL() >> + if (new File(location).exists()) // TODO: Should be >> toURI().toURL() >> + { >> url = new File(location).toURL(); // Why use >> file.getCanonicalFile? >> - else >> + } else { >> url = new >> URL(ServiceUtil.getBasicService().getCodeBase(), location); >> + } >> } catch (Exception e) { >> fatalError("Invalid jnlp file " + location); >> - if (JNLPRuntime.isDebug()) >> + if (JNLPRuntime.isDebug()) { >> e.printStackTrace(); >> + } >> } >> >> boolean strict = (null != getOption("-strict")); >> @@ -275,20 +292,26 @@ >> // add in extra params from command line >> addProperties(file); >> >> - if (file.isApplet()) snip (hope that I have not overlooked comment) Regards J. From dlila at redhat.com Thu Feb 24 09:45:04 2011 From: dlila at redhat.com (Denis Lila) Date: Thu, 24 Feb 2011 12:45:04 -0500 (EST) Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <1585881139.603167.1298569404945.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <204813908.603254.1298569504746.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. I want to push this patch: http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried attaching it, but it was too big and I cancelled the message. The changes are: patches/openjdk/6967436-6976265-6967434-pisces.patch was replaced by 6967436-6967433-floating-pt-conversion.patch, 6967434-bad-round-joins.patch, and 6976265-stroke-control.patch. Each of the separate patches is its own changeset in openjdk7, so it was my mistake to begin with to lump them all into one backport. Splitting it up into the 3 patches fixes it. Also each of the three patches is an unmodified "hg export" of its openjdk7 revision. What we had in 6967436-6976265-6967434-pisces.patch wasn't, because I had to remove some of the @Override annotations so that the build wouldn't fail. The proper way to get around this is by changing the source and target options to ecj, which is what patches/piscesMakefile.patch does. I replaced patches/renderer-crossing.patch with patches/openjdk/6887494-NPE-in-pisces.patch. The former adds if (crossingIndices != null && crossingIndices.length > DEFAULT_INDICES_SIZE) { while the latter adds if (crossingIndices != null && crossingIndices.length > DEFAULT_INDICES_SIZE) { so they do exactly the same thing, but the layout is different. What I think happened is that patches/renderer-crossing.patch was added to icedtea before openjdk7, and when it went into openjdk7 the newlines were changed. So now I'm replacing the patch with a proper backport. The other changes are just removing obsolete patches, and they're described in the ChangeLog. Thank you, Denis. From omajid at redhat.com Thu Feb 24 09:52:21 2011 From: omajid at redhat.com (Omair Majid) Date: Thu, 24 Feb 2011 12:52:21 -0500 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <20110224170431.GJ3448@rivendell.middle-earth.co.uk> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> Message-ID: <4D669AD5.3070907@redhat.com> Hi, I am attaching a patch that makes net.sourceforge.jnlp.runtime.Boot use the location of about.jnlp as determined at build time. There are a few other things that I will be adding to build.properties. The rest of this email assumes this patch is applied before applying your patch, and where there are conflicts (such as the codebase of about.jnlp, this patch takes precedence). On 02/24/2011 12:04 PM, Dr Andrew John Hughes wrote: > On 17:43 Thu 24 Feb , Jiri Vanek wrote: >> On 02/24/2011 12:36 AM, Omair Majid wrote: >> >> So, this patch expects fixed about.jnlp to have code base of >> file://$DEST_DIR/share >> The attached patch takes care of this (but nothing else). More changes (including some that you have in this patch are needed to make it work properly. >> Then removes all-permissions, and lunched fixed window without them. The >> window is not running in invoke later(which probably caused the hang) >> but runs in javaws's own thread. Also points directly to correct jnlp >> local file and runs offline. >> > > Comments inline. > Likewise. > Please separate any formatting changes to another patch, though I don't > see why these are necessary at all. > Agreed. It just makes applying the patch and reviewing it more painful. >> diff -r d7fee305bd4f -r e2f1a23ade09 >> extra/net/sourceforge/jnlp/about/Main.java >> --- a/extra/net/sourceforge/jnlp/about/Main.java Wed Feb 23 13:37:10 >> 2011 -0500 >> +++ b/extra/net/sourceforge/jnlp/about/Main.java Thu Feb 24 17:33:23 >> 2011 +0100 >> @@ -41,19 +41,15 @@ >> import java.awt.Dimension; >> import java.awt.Toolkit; >> import java.io.IOException; >> -import java.net.URL; >> + >> >> import javax.swing.JFrame; >> import javax.swing.JPanel; >> import javax.swing.JTabbedPane; >> import javax.swing.UIManager; >> -import javax.swing.event.HyperlinkEvent; >> -import javax.swing.event.HyperlinkListener; >> >> -import net.sourceforge.jnlp.Launcher; >> -import net.sourceforge.jnlp.runtime.JNLPRuntime; >> >> -public class Main extends JPanel implements HyperlinkListener { >> +public class Main extends JPanel{ >> > > Why these changes? > From what I can tell, these changes disable the hyperlinks from working. Access to net.sourceforge.jnlp package is required do make that functional. So if we dont want to grant all-permissions to about.jnlp/about.jar, then we need to remove all access to the net.sourceforge.jnlp package. The changes to this file do exactly that. Unfortunately, that's not enough. The code in about.jar is also in net.sourceforge.jnlp package. So disallowing access to net.sourceforge.jnlp also breaks about.jar From a build where I applied my patch and then Jiri's changes: $ ./javaws -about [snip] Caused by: java.security.AccessControlException: access denied (java.lang.RuntimePermission accessClassInPackage.net.sourceforge.jnlp.about) [snip] net.sourceforge.jnlp.runtime.JNLPClassLoader.loadClass(JNLPClassLoader.java:981) at net.sourceforge.jnlp.about.Main.main(Main.java:110) ... 6 more The only way to make this work without granting about.jar all-permissions might be to move it to another package. >> @@ -112,24 +105,8 @@ >> } >> >> public static void main(String[] args) { >> - javax.swing.SwingUtilities.invokeLater(new Runnable() { >> - public void run() { >> - createAndShowGUI(); >> - } >> - }); >> - } >> + createAndShowGUI(); >> + } >> I dont agree with this change. createAndShowGUI() create a JFrame; running this code on the main thread is a violation of the Swing threading guidelines [1]. Not saying that there's no bug here (I haven't really looked) but the removal of invokeLater looks wrong. >> diff -r d7fee305bd4f -r e2f1a23ade09 >> netx/net/sourceforge/jnlp/resources/about.jnlp >> --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 >> 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 17:33:23 >> 2011 +0100 >> @@ -1,5 +1,5 @@ >> >> -> codebase="http://icedtea.classpath.org/netx/"> >> +> codebase="file:///home/jvanek/icedtea-web-image/share/icedtea-web/"> >> >> About window for NetX >> NetX Well, if you expect this code to be fixed by someone else's (not posted) patch, please dont change it :) It makes patches conflict. >> @@ -12,7 +12,7 @@ >> >> >> >> - >> + >> >> >> Again, removing all-permissions and accessing the net.sourceforge.jnlp package is currently not possible :( >> @@ -218,8 +223,16 @@ >> cl = ClassLoader.getSystemClassLoader(); >> } >> try { >> - return >> cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); >> + //exctracts full path to about.jnlp > > Typo; extracts > >> + String s = >> cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); >> + s=s.substring(0,s.indexOf("!")); >> + s=s.substring(s.indexOf(":")+1); >> + s=s.substring(s.indexOf(":")+1); >> + s="file://"+s.replace("netx.jar","about.jnlp"); >> + System.out.println(s); >> + return s; > > What does this do? > If I understand this properly, it uses the installed location of netx.jar to compute the location of about.jnlp. That is, if netx.jar is at /usr/local/share/icedtea-web/netx.jar, then it finds about.jnlp to be located at /usr/local/share/icedtea-web/about.jnlp. The attached patch determines the paths at build time and puts them in a build.properties file. Cheers, Omair [1] http://download.oracle.com/javase/tutorial/uiswing/concurrency/dispatch.html -------------- next part -------------- A non-text attachment was scrubbed... Name: find-about-jnlp-at-build-time.patch Type: text/x-patch Size: 3645 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/a8d8363b/find-about-jnlp-at-build-time.patch From ahughes at redhat.com Thu Feb 24 10:28:04 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 18:28:04 +0000 Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <204813908.603254.1298569504746.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <1585881139.603167.1298569404945.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <204813908.603254.1298569504746.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110224182804.GL3448@rivendell.middle-earth.co.uk> On 12:45 Thu 24 Feb , Denis Lila wrote: > Hi. > > I want to push this patch: > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried attaching it, > but it was too big and I cancelled the message. > Ok let's split this up and do them in individual changesets with individual ChangeLogs. It's much easier to track things that way if we're not mixing up orthogonal things. > The changes are: > patches/openjdk/6967436-6976265-6967434-pisces.patch was replaced by > 6967436-6967433-floating-pt-conversion.patch, 6967434-bad-round-joins.patch, > and 6976265-stroke-control.patch. Each of the separate patches is its own > changeset in openjdk7, so it was my mistake to begin with to lump them > all into one backport. Splitting it up into the 3 patches fixes it. Also > each of the three patches is an unmodified "hg export" of its openjdk7 > revision. What we had in 6967436-6976265-6967434-pisces.patch wasn't, > because I had to remove some of the @Override annotations so that the > build wouldn't fail. The proper way to get around this is by changing > the source and target options to ecj, which is what > patches/piscesMakefile.patch does. > Ok so this is one patch: the three patch split + the piscesMakefile to make it work. > I replaced patches/renderer-crossing.patch with > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > if (crossingIndices != null && crossingIndices.length > DEFAULT_INDICES_SIZE) { > while the latter adds > if (crossingIndices != null && > crossingIndices.length > DEFAULT_INDICES_SIZE) > { > so they do exactly the same thing, but the layout is different. What I think > happened is that patches/renderer-crossing.patch was added to icedtea before > openjdk7, and when it went into openjdk7 the newlines were changed. So now > I'm replacing the patch with a proper backport. > The IcedTea version: 2008-10-27 Mark Wielaard * patches/icedtea-renderer-crossing.patch: New patch. predates the OpenJDK one: changeset: 1878:ccc36189f2a7 user: rkennke date: Mon Oct 05 23:12:22 2009 +0200 by just under a year. Roman may even have been using the IcedTea patch and not bothered to report to us. Anyway, good to be replaced in a separate changeset. > The other changes are just removing obsolete patches, and they're described > in the ChangeLog. > Again, separate changeset. > Thank you, > Denis. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 10:38:01 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 18:38:01 +0000 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D66934C.3010908@redhat.com> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> <4D66934C.3010908@redhat.com> Message-ID: <20110224183801.GM3448@rivendell.middle-earth.co.uk> On 18:20 Thu 24 Feb , Jiri Vanek wrote: > On 02/24/2011 06:04 PM, Dr Andrew John Hughes wrote: > > On 17:43 Thu 24 Feb , Jiri Vanek wrote: > >> On 02/24/2011 12:36 AM, Omair Majid wrote: > >> > >> So, this patch expects fixed about.jnlp to have code base of > >> file://$DEST_DIR/share > >> > >> Then removes all-permissions, and lunched fixed window without them. The > >> window is not running in invoke later(which probably caused the hang) > >> but runs in javaws's own thread. Also points directly to correct jnlp > >> local file and runs offline. > >> > > > > Comments inline. > > > > Please separate any formatting changes to another patch, though I don't > > see why these are necessary at all. > > > > All the formating chanegs are {} behind if. Their's existence protect > from stupid mistake. > Even if it's valid, it should be a separate patch. > >>> On 02/23/2011 12:51 PM, Dr Andrew John Hughes wrote: > >>>> What is the motivation for this change? Assuming it still runs without > >>>> all-permissions, the change looks fine. > >>>> > >>> > >>> From my very limited testing, it doesnt :( > >> > > >>> snip > >> > >> # HG changeset patch > >> # User Jiri Vanek > >> # Date 1298565203 -3600 > >> # Node ID e2f1a23ade0931e1b6810cb06d4b313ee9333415 > >> # Parent d7fee305bd4f63d3a37cfa041b9af726e296d22f > >> about.jar can now be lunched localy, without all-permissions, and > >> about.jnlp is red from directory instead from jar. > >> > >> diff -r d7fee305bd4f -r e2f1a23ade09 ChangeLog > >> --- a/ChangeLog Wed Feb 23 13:37:10 2011 -0500 > >> +++ b/ChangeLog Thu Feb 24 17:33:23 2011 +0100 > >> @@ -1,3 +1,11 @@ > >> +2011-02-24 Jiri Vanek > >> + > >> + * netx/net/sourceforge/jnlp/runtime/Boot.java: getAboutFile changed to > >> return path to local about.jnlp instead of inner-ftom jar > > > > What does ftom stand for? > > about.jnlp was laoded from inside from jar. No it is loaded from > directory where netx.jar is placed. So 'inner-ftom' should be 'inside the' :-) > > > >> + * extras/net/sourceforge/jnlp/about/Main.java: removed ivokelater, > >> useless hypertextlistener and runtime which needed special permissions. > > > > Why is it useless? > > > > Without permissions, the likns can not be lunched by clicking. Most of > the likns are on second tab with demos, which should be removed from my > point of view... Eh bed words maybe. Runtime is useless without > hyperlinklistener and without invoke later, but it itself needed special > permissions should it have to be removed. > If it breaks functionality, why are we removing the permissions? We should keep the demo tab IMHO. > > Both this and the above need to be more verbose to include the changes made. > > > >> + * netx/net/sourceforge/jnlp/resources/about.jnlp: removed > >> > >> + > >> + > >> + > >> 2011-02-23 Omair Majid > >> > >> * Makefile.am: Add missing slash to JRE. > >> diff -r d7fee305bd4f -r e2f1a23ade09 > >> extra/net/sourceforge/jnlp/about/Main.java > >> --- a/extra/net/sourceforge/jnlp/about/Main.java Wed Feb 23 13:37:10 > >> 2011 -0500 > >> +++ b/extra/net/sourceforge/jnlp/about/Main.java Thu Feb 24 17:33:23 > >> 2011 +0100 > >> @@ -41,19 +41,15 @@ > >> import java.awt.Dimension; > >> import java.awt.Toolkit; > >> import java.io.IOException; > >> -import java.net.URL; > >> + > >> > >> import javax.swing.JFrame; > >> import javax.swing.JPanel; > >> import javax.swing.JTabbedPane; > >> import javax.swing.UIManager; > >> -import javax.swing.event.HyperlinkEvent; > >> -import javax.swing.event.HyperlinkListener; > >> > >> -import net.sourceforge.jnlp.Launcher; > >> -import net.sourceforge.jnlp.runtime.JNLPRuntime; > >> > >> -public class Main extends JPanel implements HyperlinkListener { > >> +public class Main extends JPanel{ > >> > > > > Why these changes? > > > > as explained^^ > >> private final String notes = > >> "/net/sourceforge/jnlp/about/resources/notes.html"; > >> private final String apps = > >> "/net/sourceforge/jnlp/about/resources/applications.html"; > >> @@ -62,13 +58,11 @@ > >> > >> public Main() throws IOException { > >> super(new BorderLayout()); > >> - > >> + > >> HTMLPanel notesPanel = new HTMLPanel(getClass().getResource(notes)); > >> HTMLPanel appsPanel = new HTMLPanel(getClass().getResource(apps)); > >> HTMLPanel aboutPanel = new HTMLPanel(getClass().getResource(about)); > >> > >> - appsPanel.pane.addHyperlinkListener(this); > >> - > >> tabbedPane = new JTabbedPane(); > >> > >> tabbedPane.add("About NetX", aboutPanel); > >> @@ -80,7 +74,6 @@ > >> } > >> > >> private static void createAndShowGUI() { > >> - JNLPRuntime.setExitClass(Main.class); > >> > >> try { > >> UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName()); > >> @@ -112,24 +105,8 @@ > >> } > >> > >> public static void main(String[] args) { > >> - javax.swing.SwingUtilities.invokeLater(new Runnable() { > >> - public void run() { > >> - createAndShowGUI(); > >> - } > >> - }); > >> - } > >> + createAndShowGUI(); > >> + } > >> > >> - public void hyperlinkUpdate(HyperlinkEvent e) { > >> - if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) { > >> - URL url = e.getURL(); > >> > >> - Launcher launcher = new Launcher( > >> - JNLPRuntime.getDefaultLaunchHandler()); > >> - try { > >> - launcher.launchBackground(url); > >> - } catch (Exception ex) { > >> - ex.printStackTrace(); > >> - } > >> - } > >> - } > >> } > >> diff -r d7fee305bd4f -r e2f1a23ade09 > >> netx/net/sourceforge/jnlp/resources/about.jnlp > >> --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 > >> 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 17:33:23 > >> 2011 +0100 > >> @@ -1,5 +1,5 @@ > >> > >> - >> codebase="http://icedtea.classpath.org/netx/"> > >> + >> codebase="file:///home/jvanek/icedtea-web-image/share/icedtea-web/"> > >> > >> About window for NetX > >> NetX > >> @@ -12,7 +12,7 @@ > >> > >> > >> > >> - > >> + > >> > >> > >> > >> diff -r d7fee305bd4f -r e2f1a23ade09 > >> netx/net/sourceforge/jnlp/runtime/Boot.java > >> --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 > >> 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 17:33:23 > >> 2011 +0100 > >> @@ -141,22 +141,26 @@ > >> System.exit(0); > >> } > >> > >> - if (null != getOption("-about")) > >> + if (null != getOption("-about")) { > >> System.out.println(aboutMessage); > >> + } > >> > >> - if (null != getOption("-verbose")) > >> + if (null != getOption("-verbose")) { > >> JNLPRuntime.setDebug(true); > >> + } > >> > > > > I don't see the point in these changes. This is just noise which makes > > the patch hard to read. > > > I really hate missing brackets behind if() structure. SO I have added > them. As a cosmetic change it should be another patch. Yes, the main issue is: not in this patch :-) > >> if (null != getOption("-update")) { > >> int value = Integer.parseInt(getOption("-update")); > >> JNLPRuntime.setDefaultUpdatePolicy(new UpdatePolicy(value > >> * 1000l)); > >> } > >> > >> - if (null != getOption("-headless")) > >> + if (null != getOption("-headless")) { > >> JNLPRuntime.setHeadless(true); > >> + } > >> > >> - if (null != getOption("-noupdate")) > >> + if (null != getOption("-noupdate")) { > >> JNLPRuntime.setDefaultUpdatePolicy(UpdatePolicy.NEVER); > >> + } > >> > >> if (null != getOption("-Xnofork")) { > >> JNLPRuntime.setForksAllowed(false); > >> @@ -194,8 +198,9 @@ > >> } catch (LaunchException ex) { > >> // default handler prints this > >> } catch (Exception ex) { > >> - if (JNLPRuntime.isDebug()) > >> + if (JNLPRuntime.isDebug()) { > >> ex.printStackTrace(); > >> + } > >> > >> fatalError(R("RUnexpected", ex.toString(), > >> ex.getStackTrace()[0])); > >> } > >> @@ -218,8 +223,16 @@ > >> cl = ClassLoader.getSystemClassLoader(); > >> } > >> try { > >> - return > >> cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > >> + //exctracts full path to about.jnlp > > > > Typo; extracts > > > >> + String s = > >> cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); > >> + s=s.substring(0,s.indexOf("!")); > >> + s=s.substring(s.indexOf(":")+1); > >> + s=s.substring(s.indexOf(":")+1); > >> + s="file://"+s.replace("netx.jar","about.jnlp"); > >> + System.out.println(s); > >> + return s; > > > > What does this do? > > > This extracts full path to netx.jar (and from it) to about.jnlp file. > I do not know different way ho to mine this information. I get the first line. What does all the substitution do? And should we be printing to stdout? > > > > >> } catch (Exception e) { > >> + e.printStackTrace(); > >> return null; > >> } > >> } > >> @@ -235,8 +248,9 @@ > >> // override -jnlp with aboutFile > >> if (getOption("-about") != null) { > >> location = getAboutFile(); > >> - if (location == null) > >> + if (location == null) { > >> fatalError(R("RNoAboutJnlp")); > >> + } > >> } else { > >> location = getJNLPFile(); > >> } > >> @@ -246,21 +260,24 @@ > >> System.exit(1); > >> } > >> > >> - if (JNLPRuntime.isDebug()) > >> + if (JNLPRuntime.isDebug()) { > >> System.out.println(R("BFileLoc") + ": " + location); > >> + } > >> > >> URL url = null; > >> > >> try { > >> - if (new File(location).exists()) > >> - // TODO: Should be toURI().toURL() > >> + if (new File(location).exists()) // TODO: Should be > >> toURI().toURL() > >> + { > >> url = new File(location).toURL(); // Why use > >> file.getCanonicalFile? > >> - else > >> + } else { > >> url = new > >> URL(ServiceUtil.getBasicService().getCodeBase(), location); > >> + } > >> } catch (Exception e) { > >> fatalError("Invalid jnlp file " + location); > >> - if (JNLPRuntime.isDebug()) > >> + if (JNLPRuntime.isDebug()) { > >> e.printStackTrace(); > >> + } > >> } > >> > >> boolean strict = (null != getOption("-strict")); > >> @@ -275,20 +292,26 @@ > >> // add in extra params from command line > >> addProperties(file); > >> > >> - if (file.isApplet()) > snip > > (hope that I have not overlooked comment) Just the one about ChangeLog verbosity ;-) > > Regards J. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 10:44:53 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Thu, 24 Feb 2011 18:44:53 +0000 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D669AD5.3070907@redhat.com> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> <4D669AD5.3070907@redhat.com> Message-ID: <20110224184453.GN3448@rivendell.middle-earth.co.uk> On 12:52 Thu 24 Feb , Omair Majid wrote: > Hi, > > I am attaching a patch that makes net.sourceforge.jnlp.runtime.Boot use > the location of about.jnlp as determined at build time. There are a few > other things that I will be adding to build.properties. > > The rest of this email assumes this patch is applied before applying > your patch, and where there are conflicts (such as the codebase of > about.jnlp, this patch takes precedence). > snip... > > >> @@ -112,24 +105,8 @@ > >> } > >> > >> public static void main(String[] args) { > >> - javax.swing.SwingUtilities.invokeLater(new Runnable() { > >> - public void run() { > >> - createAndShowGUI(); > >> - } > >> - }); > >> - } > >> + createAndShowGUI(); > >> + } > >> > > I dont agree with this change. createAndShowGUI() create a JFrame; > running this code on the main thread is a violation of the Swing > threading guidelines [1]. Not saying that there's no bug here (I haven't > really looked) but the removal of invokeLater looks wrong. > Looks wrong to me too, I saw the code removal but not this addition. This will stop the main thread exiting AFAICS. > >> diff -r d7fee305bd4f -r e2f1a23ade09 > >> netx/net/sourceforge/jnlp/resources/about.jnlp > >> --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 > >> 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 17:33:23 > >> 2011 +0100 > >> @@ -1,5 +1,5 @@ > >> > >> - >> codebase="http://icedtea.classpath.org/netx/"> > >> + >> codebase="file:///home/jvanek/icedtea-web-image/share/icedtea-web/"> > >> > >> About window for NetX > >> NetX > > Well, if you expect this code to be fixed by someone else's (not posted) > patch, please dont change it :) It makes patches conflict. > > >> @@ -12,7 +12,7 @@ > >> > >> > >> > >> - > >> + > >> > >> > >> > > Again, removing all-permissions and accessing the net.sourceforge.jnlp > package is currently not possible :( > > >> @@ -218,8 +223,16 @@ > >> cl = ClassLoader.getSystemClassLoader(); > >> } > >> try { > >> - return > >> cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > >> + //exctracts full path to about.jnlp > > > > Typo; extracts > > > >> + String s = > >> cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); > >> + s=s.substring(0,s.indexOf("!")); > >> + s=s.substring(s.indexOf(":")+1); > >> + s=s.substring(s.indexOf(":")+1); > >> + s="file://"+s.replace("netx.jar","about.jnlp"); > >> + System.out.println(s); > >> + return s; > > > > What does this do? > > > > If I understand this properly, it uses the installed location of > netx.jar to compute the location of about.jnlp. That is, if netx.jar is > at /usr/local/share/icedtea-web/netx.jar, then it finds about.jnlp to be > located at /usr/local/share/icedtea-web/about.jnlp. > It's the use of ':' and '!' that confuses me. Exactly what does cl.getResource return here? > The attached patch determines the paths at build time and puts them in a > build.properties file. > I'd prefer that approach. > Cheers, > Omair > > [1] > http://download.oracle.com/javase/tutorial/uiswing/concurrency/dispatch.html > diff -r d7fee305bd4f Makefile.am > --- a/Makefile.am Wed Feb 23 13:37:10 2011 -0500 > +++ b/Makefile.am Thu Feb 24 12:06:16 2011 -0500 > @@ -242,7 +242,11 @@ > netx-source-files.txt: > find $(NETX_SRCDIR) -name '*.java' | sort > $@ > > -stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp > +build.properties: $(NETX_SRCDIR)/net/sourceforge/jnlp/build.properties.in > + sed "s#[@]ABOUT_JNLP_LOCATION[@]#$(DESTDIR)$(datadir)/icedtea-web/about.jnlp#" < $< > $@ Is there a reason we aren't doing this via configure? $(DESTDIR) will not be the final install location so should be in here. It's a staging location. > + > +stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp \ > + build.properties > mkdir -p $(NETX_DIR) > $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ > -d $(NETX_DIR) \ > @@ -255,6 +259,7 @@ > ${INSTALL_DATA} -D $${files} \ > $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \ > done) > + cp -pPR build.properties $(NETX_DIR)/net/sourceforge/jnlp/ Any reason not to just use cp -a? > mkdir -p stamps > touch $@ > > @@ -274,6 +279,7 @@ > > clean-netx: > rm -rf $(NETX_DIR) > + rm -f build.properties configure would do this for you. > rm -f stamps/netx-dist.stamp > rm -f netx-source-files.txt > rm -f stamps/netx.stamp > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/build.properties.in > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/build.properties.in Thu Feb 24 12:06:16 2011 -0500 > @@ -0,0 +1,1 @@ > +about.jnlp.location=@ABOUT_JNLP_LOCATION@ > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/resources/about.jnlp > --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 12:06:16 2011 -0500 > @@ -1,5 +1,5 @@ > > - > + > > About window for NetX > NetX > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/Boot.java > --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 12:06:16 2011 -0500 > @@ -19,6 +19,7 @@ > import static net.sourceforge.jnlp.runtime.Translator.R; > > import java.io.File; > +import java.io.InputStream; > import java.io.IOException; > import java.net.MalformedURLException; > import java.net.URL; > @@ -27,6 +28,7 @@ > import java.util.ArrayList; > import java.util.Arrays; > import java.util.List; > +import java.util.Properties; > > import net.sourceforge.jnlp.AppletDesc; > import net.sourceforge.jnlp.ApplicationDesc; > @@ -213,15 +215,31 @@ > * does not exist. > */ > private static String getAboutFile() { > + String location = null; > ClassLoader cl = Boot.class.getClassLoader(); > if (cl == null) { > cl = ClassLoader.getSystemClassLoader(); > } > + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/build.properties"); > try { > - return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > - } catch (Exception e) { > - return null; > + Properties buildProperties = new Properties(); > + buildProperties.load(in); > + location = buildProperties.getProperty("about.jnlp.location"); > + } catch (IOException e) { > + // ignore and return null later on > + if (JNLPRuntime.isDebug()) { > + e.printStackTrace(); > + } > + } finally { > + if (in != null) { > + try { > + in.close(); > + } catch (IOException e) { > + e.printStackTrace(); > + } > + } > } > + return location; > } > > /** Code changes look fine. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Thu Feb 24 11:04:33 2011 From: omajid at redhat.com (Omair Majid) Date: Thu, 24 Feb 2011 14:04:33 -0500 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <20110224183801.GM3448@rivendell.middle-earth.co.uk> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> <4D66934C.3010908@redhat.com> <20110224183801.GM3448@rivendell.middle-earth.co.uk> Message-ID: <4D66ABC1.508@redhat.com> On 02/24/2011 01:38 PM, Dr Andrew John Hughes wrote: > On 18:20 Thu 24 Feb , Jiri Vanek wrote: >> On 02/24/2011 06:04 PM, Dr Andrew John Hughes wrote: >>> On 17:43 Thu 24 Feb , Jiri Vanek wrote: >>>> + * extras/net/sourceforge/jnlp/about/Main.java: removed ivokelater, >>>> useless hypertextlistener and runtime which needed special permissions. >>> >>> Why is it useless? >>> >> >> Without permissions, the likns can not be lunched by clicking. Most of >> the likns are on second tab with demos, which should be removed from my >> point of view... Eh bed words maybe. Runtime is useless without >> hyperlinklistener and without invoke later, but it itself needed special >> permissions should it have to be removed. >> > > If it breaks functionality, why are we removing the permissions? > We should keep the demo tab IMHO. > I dont really have a strong preference either way, but here are some thoughts. Permissions can only be granted to signed jars. If we are using a local jar, we will have to modify the build to actually create a keystore, initialize it and use it to sign about.jar just built. And this still doesnt fix the problem where the user is shown a scary security warning when they run javaws -about. We certainly dont want users to get in the habit of accepting security dialogs. Having an unsigned about.jar (if that's possible - we are discovering a ridiculous number of problems with making it all work) will not prompt the user with a security dialog. Cheers, Omair From omajid at redhat.com Thu Feb 24 11:14:29 2011 From: omajid at redhat.com (Omair Majid) Date: Thu, 24 Feb 2011 14:14:29 -0500 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <20110224184453.GN3448@rivendell.middle-earth.co.uk> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> <4D669AD5.3070907@redhat.com> <20110224184453.GN3448@rivendell.middle-earth.co.uk> Message-ID: <4D66AE15.7010307@redhat.com> On 02/24/2011 01:44 PM, Dr Andrew John Hughes wrote: > On 12:52 Thu 24 Feb , Omair Majid wrote: >> Hi, >> >> I am attaching a patch that makes net.sourceforge.jnlp.runtime.Boot use >> the location of about.jnlp as determined at build time. There are a few >> other things that I will be adding to build.properties. >> >> The rest of this email assumes this patch is applied before applying >> your patch, and where there are conflicts (such as the codebase of >> about.jnlp, this patch takes precedence). >> > > snip... >>>> @@ -218,8 +223,16 @@ >>>> cl = ClassLoader.getSystemClassLoader(); >>>> } >>>> try { >>>> - return >>>> cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); >>>> + //exctracts full path to about.jnlp >>> >>> Typo; extracts >>> >>>> + String s = >>>> cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); >>>> + s=s.substring(0,s.indexOf("!")); >>>> + s=s.substring(s.indexOf(":")+1); >>>> + s=s.substring(s.indexOf(":")+1); >>>> + s="file://"+s.replace("netx.jar","about.jnlp"); >>>> + System.out.println(s); >>>> + return s; >>> >>> What does this do? >>> >> >> If I understand this properly, it uses the installed location of >> netx.jar to compute the location of about.jnlp. That is, if netx.jar is >> at /usr/local/share/icedtea-web/netx.jar, then it finds about.jnlp to be >> located at /usr/local/share/icedtea-web/about.jnlp. >> > > It's the use of ':' and '!' that confuses me. Exactly what does cl.getResource > return here? > It returns a jar url. Jar urls look like this: jar:file:/home/omajid/code/icedtea-web-image/share/icedtea-web/netx.jar!/net/sourceforge/jnlp/runtime/Boot.class The ! separates the url of the jar file itself from the path of the file stored inside a jar. >> The attached patch determines the paths at build time and puts them in a >> build.properties file. >> > > I'd prefer that approach. > >> Cheers, >> Omair >> >> [1] >> http://download.oracle.com/javase/tutorial/uiswing/concurrency/dispatch.html > >> diff -r d7fee305bd4f Makefile.am >> --- a/Makefile.am Wed Feb 23 13:37:10 2011 -0500 >> +++ b/Makefile.am Thu Feb 24 12:06:16 2011 -0500 >> @@ -242,7 +242,11 @@ >> netx-source-files.txt: >> find $(NETX_SRCDIR) -name '*.java' | sort> $@ >> >> -stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp >> +build.properties: $(NETX_SRCDIR)/net/sourceforge/jnlp/build.properties.in >> + sed "s#[@]ABOUT_JNLP_LOCATION[@]#$(DESTDIR)$(datadir)/icedtea-web/about.jnlp#"< $< > $@ > > Is there a reason we aren't doing this via configure? > Yes, as indicated in the autoconf manual [1], configure will replace @datadir@ with {datarootdir}, not the actual path. > $(DESTDIR) will not be the final install location so should be in here. > It's a staging location. > >> + >> +stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp \ >> + build.properties >> mkdir -p $(NETX_DIR) >> $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ >> -d $(NETX_DIR) \ >> @@ -255,6 +259,7 @@ >> ${INSTALL_DATA} -D $${files} \ >> $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \ >> done) >> + cp -pPR build.properties $(NETX_DIR)/net/sourceforge/jnlp/ > > Any reason not to just use cp -a? > No. None that I can think of. >> mkdir -p stamps >> touch $@ >> >> @@ -274,6 +279,7 @@ >> >> clean-netx: >> rm -rf $(NETX_DIR) >> + rm -f build.properties > > configure would do this for you. > Yes, except as I said above, it wont work with file paths :( >> rm -f stamps/netx-dist.stamp >> rm -f netx-source-files.txt >> rm -f stamps/netx.stamp >> diff -r d7fee305bd4f netx/net/sourceforge/jnlp/build.properties.in >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/netx/net/sourceforge/jnlp/build.properties.in Thu Feb 24 12:06:16 2011 -0500 >> @@ -0,0 +1,1 @@ >> +about.jnlp.location=@ABOUT_JNLP_LOCATION@ >> diff -r d7fee305bd4f netx/net/sourceforge/jnlp/resources/about.jnlp >> --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 12:06:16 2011 -0500 >> @@ -1,5 +1,5 @@ >> >> - >> + >> >> About window for NetX >> NetX >> diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/Boot.java >> --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 2011 -0500 >> +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 12:06:16 2011 -0500 >> @@ -19,6 +19,7 @@ >> import static net.sourceforge.jnlp.runtime.Translator.R; >> >> import java.io.File; >> +import java.io.InputStream; >> import java.io.IOException; >> import java.net.MalformedURLException; >> import java.net.URL; >> @@ -27,6 +28,7 @@ >> import java.util.ArrayList; >> import java.util.Arrays; >> import java.util.List; >> +import java.util.Properties; >> >> import net.sourceforge.jnlp.AppletDesc; >> import net.sourceforge.jnlp.ApplicationDesc; >> @@ -213,15 +215,31 @@ >> * does not exist. >> */ >> private static String getAboutFile() { >> + String location = null; >> ClassLoader cl = Boot.class.getClassLoader(); >> if (cl == null) { >> cl = ClassLoader.getSystemClassLoader(); >> } >> + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/build.properties"); >> try { >> - return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); >> - } catch (Exception e) { >> - return null; >> + Properties buildProperties = new Properties(); >> + buildProperties.load(in); >> + location = buildProperties.getProperty("about.jnlp.location"); >> + } catch (IOException e) { >> + // ignore and return null later on >> + if (JNLPRuntime.isDebug()) { >> + e.printStackTrace(); >> + } >> + } finally { >> + if (in != null) { >> + try { >> + in.close(); >> + } catch (IOException e) { >> + e.printStackTrace(); >> + } >> + } >> } >> + return location; >> } >> >> /** > > Code changes look fine. Thanks for looking over the path. Unfortunately the changes are not sufficient. We will still need to either sign about.jar or somehow fix it so it works without all permissions. Jiri, what's your take? Cheers, Omair [1] http://www.gnu.org/software/hello/manual/autoconf/Installation-Directory-Variables.html From dlila at redhat.com Thu Feb 24 11:46:04 2011 From: dlila at redhat.com (Denis Lila) Date: Thu, 24 Feb 2011 14:46:04 -0500 (EST) Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <20110224182804.GL3448@rivendell.middle-earth.co.uk> Message-ID: <2087662562.610660.1298576764187.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > The IcedTea version: > > 2008-10-27 Mark Wielaard > > * patches/icedtea-renderer-crossing.patch: New patch. > > predates the OpenJDK one: > > changeset: 1878:ccc36189f2a7 > user: rkennke > date: Mon Oct 05 23:12:22 2009 +0200 > > by just under a year. Roman may even have been using the IcedTea patch > and not bothered > to report to us. > > Anyway, good to be replaced in a separate changeset. The attached patch does the replacement of patches/renderer-crossings.patch. I do this first because it came before any of the other things, and the other patches won't apply without it. Unfortunately, it also has to stop applying patches/openjdk/6967436-6976265-6967434-pisces.patch patches/openjdk/6766342-AA-simple-shape-performance.patch If we don't stop applying the first of those, the patching will fail. It's not a good idea to apply the second because it changes a file that is also changed by 6967436-6976265-6967434-pisces.patch. So until the replacement for 6967436-6976265-6967434-pisces.patch is in, we shouldn't apply it. Ok to push? The next changeset after this will introduce the three replacements of patches/openjdk/6967436-6976265-6967434-pisces.patch. Thank you. ----- Original Message ----- > On 12:45 Thu 24 Feb , Denis Lila wrote: > > Hi. > > > > I want to push this patch: > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > attaching it, > > but it was too big and I cancelled the message. > > > > Ok let's split this up and do them in individual changesets with > individual > ChangeLogs. It's much easier to track things that way if we're not > mixing > up orthogonal things. > > > The changes are: > > patches/openjdk/6967436-6976265-6967434-pisces.patch was replaced by > > 6967436-6967433-floating-pt-conversion.patch, > > 6967434-bad-round-joins.patch, > > and 6976265-stroke-control.patch. Each of the separate patches is > > its own > > changeset in openjdk7, so it was my mistake to begin with to lump > > them > > all into one backport. Splitting it up into the 3 patches fixes it. > > Also > > each of the three patches is an unmodified "hg export" of its > > openjdk7 > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > wasn't, > > because I had to remove some of the @Override annotations so that > > the > > build wouldn't fail. The proper way to get around this is by > > changing > > the source and target options to ecj, which is what > > patches/piscesMakefile.patch does. > > > > Ok so this is one patch: the three patch split + the piscesMakefile to > make > it work. > > > I replaced patches/renderer-crossing.patch with > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > if (crossingIndices != null && crossingIndices.length > > > DEFAULT_INDICES_SIZE) { > > while the latter adds > > if (crossingIndices != null && > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > { > > so they do exactly the same thing, but the layout is different. What > > I think > > happened is that patches/renderer-crossing.patch was added to > > icedtea before > > openjdk7, and when it went into openjdk7 the newlines were changed. > > So now > > I'm replacing the patch with a proper backport. > > > > > > The other changes are just removing obsolete patches, and they're > > described > > in the ChangeLog. > > > > Again, separate changeset. > > > Thank you, > > Denis. > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -------------- next part -------------- A non-text attachment was scrubbed... Name: cleanupPart1.patch Type: text/x-patch Size: 6573 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/c94b3486/cleanupPart1.patch From xranby at icedtea.classpath.org Thu Feb 24 12:43:22 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Thu, 24 Feb 2011 20:43:22 +0000 Subject: /hg/icedtea6: Fix warnings, check if files exist before renaming. Message-ID: changeset e5b29d42117e in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=e5b29d42117e author: Xerxes R?nby date: Thu Feb 24 21:43:07 2011 +0100 Fix warnings, check if files exist before renaming. 2011-02-24 Xerxes Ranby * Makefile.am (stamps/download-cacao.stamp): Fix warning, check if the CACAO_SRC_ZIP file exist before trying to rename it. (stamps/download-jamvm.stamp): Likewise for JAMVM_SRC_ZIP. (stamps/download-openjdk.stamp): Likewise for OPENJDK_SRC_ZIP and HOTSPOT_SRC_ZIP. diffstat: 2 files changed, 13 insertions(+), 4 deletions(-) ChangeLog | 9 +++++++++ Makefile.am | 8 ++++---- diffs (55 lines): diff -r ea1b6c251de5 -r e5b29d42117e ChangeLog --- a/ChangeLog Thu Feb 24 18:13:43 2011 +0100 +++ b/ChangeLog Thu Feb 24 21:43:07 2011 +0100 @@ -1,3 +1,12 @@ 2011-02-24 Pavel Tisnovsky + + * Makefile.am (stamps/download-cacao.stamp): + Fix warning, check if the CACAO_SRC_ZIP file exist + before trying to rename it. + (stamps/download-jamvm.stamp): Likewise for JAMVM_SRC_ZIP. + (stamps/download-openjdk.stamp): + Likewise for OPENJDK_SRC_ZIP and HOTSPOT_SRC_ZIP. + 2011-02-24 Pavel Tisnovsky * patches/jtreg-png-reader.patch: diff -r ea1b6c251de5 -r e5b29d42117e Makefile.am --- a/Makefile.am Thu Feb 24 18:13:43 2011 +0100 +++ b/Makefile.am Thu Feb 24 21:43:07 2011 +0100 @@ -748,7 +748,7 @@ endif if ! echo "$(CACAO_SHA256SUM) $(CACAO_SRC_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ $(CACAO_SRC_ZIP) ] ; \ + if [ -e $(CACAO_SRC_ZIP) ] ; \ then \ mv $(CACAO_SRC_ZIP) $(CACAO_SRC_ZIP).old ; \ fi ; \ @@ -776,7 +776,7 @@ endif if ! echo "$(JAMVM_SHA256SUM) $(JAMVM_SRC_ZIP)" \ | $(SHA256SUM) --check ; \ then \ - if [ $(JAMVM_SRC_ZIP) ] ; \ + if [ -e $(JAMVM_SRC_ZIP) ] ; \ then \ mv $(JAMVM_SRC_ZIP) $(JAMVM_SRC_ZIP).old ; \ fi ; \ @@ -818,7 +818,7 @@ else if ! echo "$(OPENJDK_MD5SUM) $(OPENJDK_SRC_ZIP)" \ | $(MD5SUM) --check ; \ then \ - if [ $(OPENJDK_SRC_ZIP) ] ; \ + if [ -e $(OPENJDK_SRC_ZIP) ] ; \ then \ mv $(OPENJDK_SRC_ZIP) $(OPENJDK_SRC_ZIP).old ; \ fi ; \ @@ -835,7 +835,7 @@ endif if ! echo "$${hotspot_md5sum} $(HOTSPOT_SRC_ZIP)" \ | $(MD5SUM) --check ; \ then \ - if [ $(HOTSPOT_SRC_ZIP) ] ; \ + if [ -e $(HOTSPOT_SRC_ZIP) ] ; \ then \ mv $(HOTSPOT_SRC_ZIP) $(HOTSPOT_SRC_ZIP).old ; \ fi ; \ From dlila at redhat.com Thu Feb 24 12:45:10 2011 From: dlila at redhat.com (Denis Lila) Date: Thu, 24 Feb 2011 15:45:10 -0500 (EST) Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <2087662562.610660.1298576764187.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <1396987442.611766.1298580310791.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> This: http://icedtea.classpath.org/~dlila/cleanupPart2.patch is the second part of the clean up. It removes patches/openjdk/6967436-6976265-6967434-pisces.patch (which we stopped applying in the previous cleanupPart1.patch), it adds the 3 replacement patches for it, it adds piscesMakefile.patch to make the build work, and it reapplies patches/openjdk/6766342-AA-simple-shape-performance.patch. It also stops applying 3 patches made obsolete by the 3 new patches (but doesn't remove them (should it?). I've left this for the next changeset). Ok to push (contingent on cleanupPart1.patch being ok)? Thank you, Denis. ----- Original Message ----- > > The IcedTea version: > > > > 2008-10-27 Mark Wielaard > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > predates the OpenJDK one: > > > > changeset: 1878:ccc36189f2a7 > > user: rkennke > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > by just under a year. Roman may even have been using the IcedTea > > patch > > and not bothered > > to report to us. > > > > Anyway, good to be replaced in a separate changeset. > > The attached patch does the replacement of > patches/renderer-crossings.patch. I do this first because it came > before any of the other things, and the other patches won't apply > without it. > > Unfortunately, it also has to stop applying > patches/openjdk/6967436-6976265-6967434-pisces.patch > patches/openjdk/6766342-AA-simple-shape-performance.patch > If we don't stop applying the first of those, the patching will > fail. It's not a good idea to apply the second because it changes > a file that is also changed by 6967436-6976265-6967434-pisces.patch. > So until the replacement for 6967436-6976265-6967434-pisces.patch is > in, we shouldn't apply it. > > Ok to push? > > The next changeset after this will introduce the three replacements of > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > Thank you. > > ----- Original Message ----- > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > Hi. > > > > > > I want to push this patch: > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > attaching it, > > > but it was too big and I cancelled the message. > > > > > > > Ok let's split this up and do them in individual changesets with > > individual > > ChangeLogs. It's much easier to track things that way if we're not > > mixing > > up orthogonal things. > > > > > The changes are: > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was replaced > > > by > > > 6967436-6967433-floating-pt-conversion.patch, > > > 6967434-bad-round-joins.patch, > > > and 6976265-stroke-control.patch. Each of the separate patches is > > > its own > > > changeset in openjdk7, so it was my mistake to begin with to lump > > > them > > > all into one backport. Splitting it up into the 3 patches fixes > > > it. > > > Also > > > each of the three patches is an unmodified "hg export" of its > > > openjdk7 > > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > > wasn't, > > > because I had to remove some of the @Override annotations so that > > > the > > > build wouldn't fail. The proper way to get around this is by > > > changing > > > the source and target options to ecj, which is what > > > patches/piscesMakefile.patch does. > > > > > > > Ok so this is one patch: the three patch split + the piscesMakefile > > to > > make > > it work. > > > > > I replaced patches/renderer-crossing.patch with > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > if (crossingIndices != null && crossingIndices.length > > > > DEFAULT_INDICES_SIZE) { > > > while the latter adds > > > if (crossingIndices != null && > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > { > > > so they do exactly the same thing, but the layout is different. > > > What > > > I think > > > happened is that patches/renderer-crossing.patch was added to > > > icedtea before > > > openjdk7, and when it went into openjdk7 the newlines were > > > changed. > > > So now > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > The other changes are just removing obsolete patches, and they're > > > described > > > in the ChangeLog. > > > > > > > Again, separate changeset. > > > > > Thank you, > > > Denis. > > > > -- > > Andrew :) > > > > Free Java Software Engineer > > Red Hat, Inc. (http://www.redhat.com) > > > > Support Free Java! > > Contribute to GNU Classpath and IcedTea > > http://www.gnu.org/software/classpath > > http://icedtea.classpath.org > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From xranby at icedtea.classpath.org Thu Feb 24 13:04:34 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Thu, 24 Feb 2011 21:04:34 +0000 Subject: /hg/icedtea6: PR640: JamVM fails to build - Unrecognised option:... Message-ID: changeset cac9031cdd0d in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=cac9031cdd0d author: Xerxes R?nby date: Thu Feb 24 22:04:13 2011 +0100 PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. 2011-02-24 Xerxes Ranby PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. * NEWS: Updated. * Makefile.am (ICEDTEA_PATCHES): Add JamVM patches if BUILD_JAMVM are defined. * patches/jamvm/ignore-more-XX-options.patch: New JamVM patch. diffstat: 4 files changed, 26 insertions(+) ChangeLog | 8 ++++++++ Makefile.am | 5 +++++ NEWS | 1 + patches/jamvm/ignore-more-XX-options.patch | 12 ++++++++++++ diffs (57 lines): diff -r e5b29d42117e -r cac9031cdd0d ChangeLog --- a/ChangeLog Thu Feb 24 21:43:07 2011 +0100 +++ b/ChangeLog Thu Feb 24 22:04:13 2011 +0100 @@ -1,3 +1,11 @@ 2011-02-24 Xerxes Ranby + + PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. + * NEWS: Updated. + * Makefile.am (ICEDTEA_PATCHES): + Add JamVM patches if BUILD_JAMVM are defined. + * patches/jamvm/ignore-more-XX-options.patch: New JamVM patch. + 2011-02-24 Xerxes Ranby * Makefile.am (stamps/download-cacao.stamp): diff -r e5b29d42117e -r cac9031cdd0d Makefile.am --- a/Makefile.am Thu Feb 24 21:43:07 2011 +0100 +++ b/Makefile.am Thu Feb 24 22:04:13 2011 +0100 @@ -354,6 +354,11 @@ ICEDTEA_PATCHES += \ ICEDTEA_PATCHES += \ patches/cacao/ignore-jdi-tests.patch \ patches/cacao/ignore-tests.patch +endif + +if BUILD_JAMVM +ICEDTEA_PATCHES += \ + patches/jamvm/ignore-more-XX-options.patch endif if ENABLE_PULSE_JAVA diff -r e5b29d42117e -r cac9031cdd0d NEWS --- a/NEWS Thu Feb 24 21:43:07 2011 +0100 +++ b/NEWS Thu Feb 24 22:04:13 2011 +0100 @@ -443,6 +443,7 @@ New in release 1.10 (2011-XX-XX): - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 - PR586: Sources missing from src.zip - PR639: Add missing include line, paths and LLVM flags for Shark. + - PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. diff -r e5b29d42117e -r cac9031cdd0d patches/jamvm/ignore-more-XX-options.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jamvm/ignore-more-XX-options.patch Thu Feb 24 22:04:13 2011 +0100 @@ -0,0 +1,12 @@ +Index: jamvm/jamvm/src/jni.c +=================================================================== +--- jamvm/jamvm.orig/src/jni.c 2011-02-23 09:54:17.000000000 +0100 ++++ jamvm/jamvm/src/jni.c 2011-02-23 09:58:21.000000000 +0100 +@@ -1638,6 +1638,7 @@ + #endif + /* Compatibility options */ + } else if(strncmp(string, "-XX:PermSize=", 13) == 0 || ++ strncmp(string, "-XX:ThreadStackSize=", 20) == 0 || + strncmp(string, "-XX:MaxPermSize=", 16) == 0) { + /* Ignore */ + } else if(!vm_args->ignoreUnrecognized) { From xranby at icedtea.classpath.org Thu Feb 24 13:11:35 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Thu, 24 Feb 2011 21:11:35 +0000 Subject: /hg/release/icedtea6-1.10: PR640: JamVM fails to build - Unrecog... Message-ID: changeset 4a9e475fd35d in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=4a9e475fd35d author: Xerxes R?nby date: Thu Feb 24 22:11:20 2011 +0100 PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. 2011-02-24 Xerxes Ranby PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. * NEWS: Updated. * Makefile.am (ICEDTEA_PATCHES): Add JamVM patches if BUILD_JAMVM are defined. * patches/jamvm/ignore-more-XX-options.patch: New JamVM patch. diffstat: 4 files changed, 26 insertions(+) ChangeLog | 8 ++++++++ Makefile.am | 5 +++++ NEWS | 1 + patches/jamvm/ignore-more-XX-options.patch | 12 ++++++++++++ diffs (57 lines): diff -r 6ac1377e670b -r 4a9e475fd35d ChangeLog --- a/ChangeLog Thu Feb 24 03:22:54 2011 +0000 +++ b/ChangeLog Thu Feb 24 22:11:20 2011 +0100 @@ -1,3 +1,11 @@ 2011-02-24 Andrew John Hughes + + PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. + * NEWS: Updated. + * Makefile.am (ICEDTEA_PATCHES): + Add JamVM patches if BUILD_JAMVM are defined. + * patches/jamvm/ignore-more-XX-options.patch: New JamVM patch. + 2011-02-24 Andrew John Hughes * patches/pr639-missing_shark_include.patch: diff -r 6ac1377e670b -r 4a9e475fd35d Makefile.am --- a/Makefile.am Thu Feb 24 03:22:54 2011 +0000 +++ b/Makefile.am Thu Feb 24 22:11:20 2011 +0100 @@ -354,6 +354,11 @@ ICEDTEA_PATCHES += \ ICEDTEA_PATCHES += \ patches/cacao/ignore-jdi-tests.patch \ patches/cacao/ignore-tests.patch +endif + +if BUILD_JAMVM +ICEDTEA_PATCHES += \ + patches/jamvm/ignore-more-XX-options.patch endif if ENABLE_PULSE_JAVA diff -r 6ac1377e670b -r 4a9e475fd35d NEWS --- a/NEWS Thu Feb 24 03:22:54 2011 +0000 +++ b/NEWS Thu Feb 24 22:11:20 2011 +0100 @@ -441,6 +441,7 @@ New in release 1.10 (2011-XX-XX): - PR635: zero fails to build on icedtea6 trunk 20110217 with hs20 - PR586: Sources missing from src.zip - PR639: Add missing include line, paths and LLVM flags for Shark. + - PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. diff -r 6ac1377e670b -r 4a9e475fd35d patches/jamvm/ignore-more-XX-options.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/jamvm/ignore-more-XX-options.patch Thu Feb 24 22:11:20 2011 +0100 @@ -0,0 +1,12 @@ +Index: jamvm/jamvm/src/jni.c +=================================================================== +--- jamvm/jamvm.orig/src/jni.c 2011-02-23 09:54:17.000000000 +0100 ++++ jamvm/jamvm/src/jni.c 2011-02-23 09:58:21.000000000 +0100 +@@ -1638,6 +1638,7 @@ + #endif + /* Compatibility options */ + } else if(strncmp(string, "-XX:PermSize=", 13) == 0 || ++ strncmp(string, "-XX:ThreadStackSize=", 20) == 0 || + strncmp(string, "-XX:MaxPermSize=", 16) == 0) { + /* Ignore */ + } else if(!vm_args->ignoreUnrecognized) { From xerxes at zafena.se Thu Feb 24 13:19:12 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Thu, 24 Feb 2011 22:19:12 +0100 Subject: RFC: icedtea6 - fix non fatal mv warnings In-Reply-To: <20110224162341.GE3448@rivendell.middle-earth.co.uk> References: <4D667A4F.4000203@zafena.se> <20110224162341.GE3448@rivendell.middle-earth.co.uk> Message-ID: <4D66CB50.4020004@zafena.se> On 2011-02-24 17:23, Dr Andrew John Hughes wrote: > On 16:33 Thu 24 Feb , Xerxes R?nby wrote: >> The attached patch fixes these non fatal icedtea6 mv warnings by correcting the code to actually check if the file exist before trying to move it. >> >> mv: cannot stat `cacao-6a5eda011e49.tar.gz': No such file or directory >> >> mv: cannot stat `jamvm-10329d9f3205698af125bba131b4f47339e81d90.tar.gz': No such file or directory >> >> mv: cannot stat `openjdk-6-src-b21-20_jan_2011.tar.gz': No such file or directory >> >> and >> >> mv: cannot stat `hotspot.tar.gz': No such file or directory >> >> >> Cheers >> Xerxes >> >> > > Sounds ok to me, but change the test to -e. Otherwise, potentially a > directory or symbolic link could exist with that name. The former > may not be common, but the latter is as the alt-src-zip support creates > such links. > Thank you Andrew! Changed to -e and committed: http://icedtea.classpath.org/hg/icedtea6/rev/e5b29d42117e Cheers Xerxes From dlila at redhat.com Thu Feb 24 13:20:24 2011 From: dlila at redhat.com (Denis Lila) Date: Thu, 24 Feb 2011 16:20:24 -0500 (EST) Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <1396987442.611766.1298580310791.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <301067285.612468.1298582424772.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> And the attached file is the final part of the cleanup. It just removes 3 patches that were obsoleted by the previous changeset (if the previous changest is approved for pushing, that is). Ok to push? Thank you, Denis. ----- Original Message ----- > This: > http://icedtea.classpath.org/~dlila/cleanupPart2.patch > is the second part of the clean up. It removes > patches/openjdk/6967436-6976265-6967434-pisces.patch > (which we stopped applying in the previous cleanupPart1.patch), > it adds the 3 replacement patches for it, it adds > piscesMakefile.patch to make the build work, and it reapplies > patches/openjdk/6766342-AA-simple-shape-performance.patch. > > It also stops applying 3 patches made obsolete by the 3 new > patches (but doesn't remove them (should it?). I've left this > for the next changeset). > > Ok to push (contingent on cleanupPart1.patch being ok)? > > Thank you, > Denis. > > ----- Original Message ----- > > > The IcedTea version: > > > > > > 2008-10-27 Mark Wielaard > > > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > > > predates the OpenJDK one: > > > > > > changeset: 1878:ccc36189f2a7 > > > user: rkennke > > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > > > by just under a year. Roman may even have been using the IcedTea > > > patch > > > and not bothered > > > to report to us. > > > > > > Anyway, good to be replaced in a separate changeset. > > > > The attached patch does the replacement of > > patches/renderer-crossings.patch. I do this first because it came > > before any of the other things, and the other patches won't apply > > without it. > > > > Unfortunately, it also has to stop applying > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > patches/openjdk/6766342-AA-simple-shape-performance.patch > > If we don't stop applying the first of those, the patching will > > fail. It's not a good idea to apply the second because it changes > > a file that is also changed by 6967436-6976265-6967434-pisces.patch. > > So until the replacement for 6967436-6976265-6967434-pisces.patch is > > in, we shouldn't apply it. > > > > Ok to push? > > > > The next changeset after this will introduce the three replacements > > of > > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > > > Thank you. > > > > ----- Original Message ----- > > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > > Hi. > > > > > > > > I want to push this patch: > > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > > attaching it, > > > > but it was too big and I cancelled the message. > > > > > > > > > > Ok let's split this up and do them in individual changesets with > > > individual > > > ChangeLogs. It's much easier to track things that way if we're not > > > mixing > > > up orthogonal things. > > > > > > > The changes are: > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was > > > > replaced > > > > by > > > > 6967436-6967433-floating-pt-conversion.patch, > > > > 6967434-bad-round-joins.patch, > > > > and 6976265-stroke-control.patch. Each of the separate patches > > > > is > > > > its own > > > > changeset in openjdk7, so it was my mistake to begin with to > > > > lump > > > > them > > > > all into one backport. Splitting it up into the 3 patches fixes > > > > it. > > > > Also > > > > each of the three patches is an unmodified "hg export" of its > > > > openjdk7 > > > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > > > wasn't, > > > > because I had to remove some of the @Override annotations so > > > > that > > > > the > > > > build wouldn't fail. The proper way to get around this is by > > > > changing > > > > the source and target options to ecj, which is what > > > > patches/piscesMakefile.patch does. > > > > > > > > > > Ok so this is one patch: the three patch split + the > > > piscesMakefile > > > to > > > make > > > it work. > > > > > > > I replaced patches/renderer-crossing.patch with > > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > > if (crossingIndices != null && crossingIndices.length > > > > > DEFAULT_INDICES_SIZE) { > > > > while the latter adds > > > > if (crossingIndices != null && > > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > > { > > > > so they do exactly the same thing, but the layout is different. > > > > What > > > > I think > > > > happened is that patches/renderer-crossing.patch was added to > > > > icedtea before > > > > openjdk7, and when it went into openjdk7 the newlines were > > > > changed. > > > > So now > > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > > > > > > The other changes are just removing obsolete patches, and > > > > they're > > > > described > > > > in the ChangeLog. > > > > > > > > > > Again, separate changeset. > > > > > > > Thank you, > > > > Denis. > > > > > > -- > > > Andrew :) > > > > > > Free Java Software Engineer > > > Red Hat, Inc. (http://www.redhat.com) > > > > > > Support Free Java! > > > Contribute to GNU Classpath and IcedTea > > > http://www.gnu.org/software/classpath > > > http://icedtea.classpath.org > > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -------------- next part -------------- A non-text attachment was scrubbed... Name: cleanupPart3.patch Type: text/x-patch Size: 9335 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/73812e74/cleanupPart3.patch From dlila at redhat.com Thu Feb 24 13:42:15 2011 From: dlila at redhat.com (Denis Lila) Date: Thu, 24 Feb 2011 16:42:15 -0500 (EST) Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <301067285.612468.1298582424772.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <644979765.612795.1298583735247.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> This is the final java2d backport I wanted to do, and it is the reason for the 3 previous patches I'm testing it right now, and 30 minutes into the build everything is fine (with the previous 3 patches applied (in the order they were posted) to revision 6e7f2c1f25df of head). I'll have to do a merge :-(. Regards, Denis. ----- Original Message ----- > And the attached file is the final part of the cleanup. > It just removes 3 patches that were obsoleted by the > previous changeset (if the previous changest is approved > for pushing, that is). > > Ok to push? > > Thank you, > Denis. > > ----- Original Message ----- > > This: > > http://icedtea.classpath.org/~dlila/cleanupPart2.patch > > is the second part of the clean up. It removes > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > (which we stopped applying in the previous cleanupPart1.patch), > > it adds the 3 replacement patches for it, it adds > > piscesMakefile.patch to make the build work, and it reapplies > > patches/openjdk/6766342-AA-simple-shape-performance.patch. > > > > It also stops applying 3 patches made obsolete by the 3 new > > patches (but doesn't remove them (should it?). I've left this > > for the next changeset). > > > > Ok to push (contingent on cleanupPart1.patch being ok)? > > > > Thank you, > > Denis. > > > > ----- Original Message ----- > > > > The IcedTea version: > > > > > > > > 2008-10-27 Mark Wielaard > > > > > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > > > > > predates the OpenJDK one: > > > > > > > > changeset: 1878:ccc36189f2a7 > > > > user: rkennke > > > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > > > > > by just under a year. Roman may even have been using the IcedTea > > > > patch > > > > and not bothered > > > > to report to us. > > > > > > > > Anyway, good to be replaced in a separate changeset. > > > > > > The attached patch does the replacement of > > > patches/renderer-crossings.patch. I do this first because it came > > > before any of the other things, and the other patches won't apply > > > without it. > > > > > > Unfortunately, it also has to stop applying > > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > > patches/openjdk/6766342-AA-simple-shape-performance.patch > > > If we don't stop applying the first of those, the patching will > > > fail. It's not a good idea to apply the second because it changes > > > a file that is also changed by > > > 6967436-6976265-6967434-pisces.patch. > > > So until the replacement for 6967436-6976265-6967434-pisces.patch > > > is > > > in, we shouldn't apply it. > > > > > > Ok to push? > > > > > > The next changeset after this will introduce the three > > > replacements > > > of > > > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > > > > > Thank you. > > > > > > ----- Original Message ----- > > > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > > > Hi. > > > > > > > > > > I want to push this patch: > > > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > > > attaching it, > > > > > but it was too big and I cancelled the message. > > > > > > > > > > > > > Ok let's split this up and do them in individual changesets with > > > > individual > > > > ChangeLogs. It's much easier to track things that way if we're > > > > not > > > > mixing > > > > up orthogonal things. > > > > > > > > > The changes are: > > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was > > > > > replaced > > > > > by > > > > > 6967436-6967433-floating-pt-conversion.patch, > > > > > 6967434-bad-round-joins.patch, > > > > > and 6976265-stroke-control.patch. Each of the separate patches > > > > > is > > > > > its own > > > > > changeset in openjdk7, so it was my mistake to begin with to > > > > > lump > > > > > them > > > > > all into one backport. Splitting it up into the 3 patches > > > > > fixes > > > > > it. > > > > > Also > > > > > each of the three patches is an unmodified "hg export" of its > > > > > openjdk7 > > > > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > > > > wasn't, > > > > > because I had to remove some of the @Override annotations so > > > > > that > > > > > the > > > > > build wouldn't fail. The proper way to get around this is by > > > > > changing > > > > > the source and target options to ecj, which is what > > > > > patches/piscesMakefile.patch does. > > > > > > > > > > > > > Ok so this is one patch: the three patch split + the > > > > piscesMakefile > > > > to > > > > make > > > > it work. > > > > > > > > > I replaced patches/renderer-crossing.patch with > > > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > > > if (crossingIndices != null && crossingIndices.length > > > > > > DEFAULT_INDICES_SIZE) { > > > > > while the latter adds > > > > > if (crossingIndices != null && > > > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > > > { > > > > > so they do exactly the same thing, but the layout is > > > > > different. > > > > > What > > > > > I think > > > > > happened is that patches/renderer-crossing.patch was added to > > > > > icedtea before > > > > > openjdk7, and when it went into openjdk7 the newlines were > > > > > changed. > > > > > So now > > > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > > > > > > > > > > > The other changes are just removing obsolete patches, and > > > > > they're > > > > > described > > > > > in the ChangeLog. > > > > > > > > > > > > > Again, separate changeset. > > > > > > > > > Thank you, > > > > > Denis. > > > > > > > > -- > > > > Andrew :) > > > > > > > > Free Java Software Engineer > > > > Red Hat, Inc. (http://www.redhat.com) > > > > > > > > Support Free Java! > > > > Contribute to GNU Classpath and IcedTea > > > > http://www.gnu.org/software/classpath > > > > http://icedtea.classpath.org > > > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -------------- next part -------------- A non-text attachment was scrubbed... Name: dashingPerfBackport.patch Type: text/x-patch Size: 90259 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/162821fe/dashingPerfBackport.patch From xranby at icedtea.classpath.org Thu Feb 24 14:12:34 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Thu, 24 Feb 2011 22:12:34 +0000 Subject: /hg/icedtea6: Fun ChangeLog whitespace fix Message-ID: changeset a76f4fe0c47c in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a76f4fe0c47c author: Xerxes R?nby date: Thu Feb 24 23:12:17 2011 +0100 Fun ChangeLog whitespace fix diffstat: 1 file changed, 20 insertions(+), 20 deletions(-) ChangeLog | 40 ++++++++++++++++++++-------------------- diffs (153 lines): diff -r cac9031cdd0d -r a76f4fe0c47c ChangeLog --- a/ChangeLog Thu Feb 24 22:04:13 2011 +0100 +++ b/ChangeLog Thu Feb 24 23:12:17 2011 +0100 @@ -14,7 +14,7 @@ 2011-02-24 Xerxes Ranby * patches/jtreg-png-reader.patch: @@ -825,7 +825,7 @@ 2010-01-22 Mark Wielaard - * Makefile.am (ICEDTEA_PATCHES): Add missing backslash. + * Makefile.am (ICEDTEA_PATCHES): Add missing backslash. 2011-01-22 Andrew John Hughes @@ -1189,10 +1189,10 @@ 2010-11-10 Jiri Vanek * Makefile.am: - (FONTCONFIG_PATH): Added path to fontconfig files. + (FONTCONFIG_PATH): Added path to fontconfig files. (ICEDTEA_PATCHES): Add f14-fonts.patch. (fonts): Added cloning of fontconfig.Fedora - to Fedora.12,11,10,9. + to Fedora.12,11,10,9. (patch-fsg): Depend on fonts.stamp. * patches/f14-fonts.patch Updated font configurations for Fedora 9-14 @@ -3120,7 +3120,7 @@ 2010-07-19 Omair Majid - Xerxes R??nby + Xerxes R??nby PR icedtea/498 * ports/hotspot/src/share/vm/shark/sharkTopLevelBlock.cpp @@ -6811,7 +6811,7 @@ 2010-01-16 Andrew John Hughes - * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp + * ports/hotspot/src/os_cpu/linux_zero/vm/os_linux_zero.cpp Implement is_allocatable to make build word with hs16 2010-01-15 Xerxes R??nby @@ -8499,9 +8499,9 @@ 2009-09-10 Andrew John Hughes - * Makefile.am, patches/icedtea-jar-misc.patch: Import patch from - upstream OpenJDK 6. - http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/b35f1e5075a4 + * Makefile.am, patches/icedtea-jar-misc.patch: Import patch from + upstream OpenJDK 6. + http://hg.openjdk.java.net/jdk6/jdk6/jdk/rev/b35f1e5075a4 2009-09-09 Gary Benson @@ -8810,7 +8810,7 @@ 2009-08-27 Kees Cook @@ -9540,7 +9540,7 @@ 2009-07-15 Xerxes R??nby * Makefile.am: Fix npplugin build. @@ -9649,12 +9649,12 @@ 2009-07-10 Deepak Bhole * ports/hotspot/src/share/vm/shark/sharkBuilder.hpp @@ -10754,7 +10754,7 @@ 2009-05-27 Gary Benson - Omair Majid + Omair Majid * pulseaudio/src/java/org/classpath/icedtea/pulseaudio/PulseAudioSourceDataLine.java (write): Fix bounds checking. @@ -13745,7 +13745,7 @@ 2009-01-12 Andrew Haley * ports/hotspot/src/share/vm/shark/sharkBlock.cpp (SharkBlock::do_ldc): - Add logic for ldc(Class). + Add logic for ldc(Class). 2009-01-11 Mark Wielaard @@ -17256,7 +17256,7 @@ 2008-04-16 Gary Benson - Yi Zhan + Yi Zhan * patches/icedtea-ia64-fdlibm.patch: New file. * Makefile.am (ICEDTEA_PATCHES): Added the above. From doko at ubuntu.com Thu Feb 24 14:32:27 2011 From: doko at ubuntu.com (Matthias Klose) Date: Thu, 24 Feb 2011 23:32:27 +0100 Subject: [patch] fix hotspot hs20 build on powerpc and powerpc64 Message-ID: <4D66DC7B.9090103@ubuntu.com> hs20 on powerpc64 fails to build in the java -version check with java -version The stack size specified is too small, Specify at least 1600k Could not create the Java virtual machine. increased the default to 2048k, for powerpc64 only. the default zero stack size for 32bit is then 1024k for 32bit archs, 1536k for 64bit archs and 2048k for powerpc. the remaining bits use the new defaults sizes to build corba and the jdk, and something lower, which lets the build fail on both powerpc and powerpc64. bootstrapped on both 32bit and 64bit. That should go the trunk and the branch. Matthias -------------- next part -------------- A non-text attachment was scrubbed... Name: powerpc.diff Type: text/x-diff Size: 2461 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110224/5bbd7b5f/powerpc.diff From xerxes at zafena.se Thu Feb 24 15:25:18 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Fri, 25 Feb 2011 00:25:18 +0100 Subject: [patch] fix hotspot hs20 build on powerpc and powerpc64 In-Reply-To: <4D66DC7B.9090103@ubuntu.com> References: <4D66DC7B.9090103@ubuntu.com> Message-ID: <4D66E8DE.5000707@zafena.se> On 2011-02-24 23:32, Matthias Klose wrote: > hs20 on powerpc64 fails to build in the java -version check with > > java -version > The stack size specified is too small, Specify at least 1600k > Could not create the Java virtual machine. > > increased the default to 2048k, for powerpc64 only. > > the default zero stack size for 32bit is then 1024k for 32bit archs, > 1536k for 64bit archs and 2048k for powerpc. the remaining bits use the > new defaults sizes to build corba and the jdk, and something lower, > which lets the build fail on both powerpc and powerpc64. > > bootstrapped on both 32bit and 64bit. That should go the trunk and the > branch. > > Matthias (23.51.19) xranby-home: doko: do you have resources to add a ppc builder? (23.55.52) xranby-home: doko: its hard to tell by simply looking at the patch if it are going to fix the build since it only requests more memory :/ , the patch itself looks ok (23.59.03) doko: xranby: no, I have only a PS3 at home, and I turn it off for the most time, it get's too expensive to run it the whole time (23.59.42) doko: xranby-home: can you confirm on the ML? (2011-02-25 00.00.30) xranby-home: i can confirm for the trunk +1 to go to the trunk Cheers Xerxes From xranby at icedtea.classpath.org Thu Feb 24 15:51:59 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Thu, 24 Feb 2011 23:51:59 +0000 Subject: /hg/buildbot: Make icedtea6-squeeze-x86_64-quick-shark actualy u... Message-ID: changeset 71feefad7baa in /hg/buildbot details: http://icedtea.classpath.org/hg/buildbot?cmd=changeset;node=71feefad7baa author: Xerxes R?nby date: Fri Feb 25 00:51:44 2011 +0100 Make icedtea6-squeeze-x86_64-quick-shark actualy use the f3s shark factory. 2011-02-25 Xerxes Ranby * icedtea/master.cfg (icedtea6-squeeze-x86_64-quick-shark): Fixed typo, Make the shark builder use the f3s shark factory. diffstat: 1 file changed, 1 insertion(+), 1 deletion(-) icedtea/master.cfg | 2 +- diffs (12 lines): diff -r 1866231bf5e8 -r 71feefad7baa icedtea/master.cfg --- a/icedtea/master.cfg Thu Feb 24 13:54:19 2011 +0100 +++ b/icedtea/master.cfg Fri Feb 25 00:51:44 2011 +0100 @@ -627,7 +627,7 @@ icedtea6_builder_quick_shark = { 'name': "icedtea6-squeeze-x86_64-quick-shark", 'slavenames': ["squeeze-x86_64"], 'builddir': "icedtea6-quick-shark", - 'factory': f3c } + 'factory': f3s } icedtea6_builder_quick_arm_natty = { 'name': "icedtea6-natty-armv7l-quick", 'slavenames': ["natty-armv7l"], 'builddir': "icedtea6-natty-armv7l-quick", From ahughes at redhat.com Thu Feb 24 16:06:44 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:06:44 +0000 Subject: [patch] fix hotspot hs20 build on powerpc and powerpc64 In-Reply-To: <4D66DC7B.9090103@ubuntu.com> References: <4D66DC7B.9090103@ubuntu.com> Message-ID: <20110225000644.GO3448@rivendell.middle-earth.co.uk> On 23:32 Thu 24 Feb , Matthias Klose wrote: > hs20 on powerpc64 fails to build in the java -version check with > > java -version > The stack size specified is too small, Specify at least 1600k > Could not create the Java virtual machine. > > increased the default to 2048k, for powerpc64 only. > > the default zero stack size for 32bit is then 1024k for 32bit archs, 1536k for > 64bit archs and 2048k for powerpc. the remaining bits use the new defaults sizes > to build corba and the jdk, and something lower, which lets the build fail on > both powerpc and powerpc64. > > bootstrapped on both 32bit and 64bit. That should go the trunk and the branch. > > Matthias Approved for both HEAD and 1.10. > 2011-02-24 Matthias Klose > > * patches/hotspot/hs20/powerpc-stacksize.patch: New, > increase stack size for powerpc builds. > * Makefile.am (ICEDTEA_PATCHES): Apply. > > diff -r cac9031cdd0d Makefile.am > --- a/Makefile.am Thu Feb 24 22:04:13 2011 +0100 > +++ b/Makefile.am Thu Feb 24 23:07:55 2011 +0100 > @@ -334,7 +334,8 @@ > patches/openjdk/6997495-test_correction_6857159.patch > else > ICEDTEA_PATCHES += \ > - patches/pr639-broken_shark_build.patch > + patches/pr639-broken_shark_build.patch \ > + patches/hotspot/$(HSBUILD)/powerpc-stacksize.patch > endif > > if WITH_RHINO > diff -r cac9031cdd0d patches/hotspot/hs20/powerpc-stacksize.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/hotspot/hs20/powerpc-stacksize.patch Thu Feb 24 23:07:55 2011 +0100 > @@ -0,0 +1,42 @@ > +--- openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp~ 2011-02-22 17:51:24.000000000 +0100 > ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2011-02-24 18:58:27.758228950 +0100 > +@@ -32,7 +32,11 @@ > + // > + > + define_pd_global(bool, DontYieldALot, false); > ++#ifdef __powerpc64__ > ++define_pd_global(intx, ThreadStackSize, 2048); > ++#else > + define_pd_global(intx, ThreadStackSize, 1536); > ++#endif > + #ifdef _LP64 > + define_pd_global(intx, VMThreadStackSize, 1024); > + #else > +--- openjdk/corba/make/common/shared/Defs-java.gmk~ 2011-02-24 18:56:20.278228999 +0100 > ++++ openjdk/corba/make/common/shared/Defs-java.gmk 2011-02-24 19:01:47.938229001 +0100 > +@@ -68,9 +68,9 @@ > + > + # 64-bit builds require a larger thread stack size. > + ifeq ($(ARCH_DATA_MODEL), 32) > +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 > ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1024 > + else > +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536 > ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=2048 > + endif > + JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%) > + > +--- openjdk/jdk/make/common/shared/Defs-java.gmk~ 2011-02-24 20:10:20.598229000 +0100 > ++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2011-02-24 20:11:45.608228331 +0100 > +@@ -75,9 +75,9 @@ > + > + # 64-bit builds require a larger thread stack size. > + ifeq ($(ARCH_DATA_MODEL), 32) > +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 > ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1024 > + else > +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536 > ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=2048 > + endif > + JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%) > + -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From doko at icedtea.classpath.org Thu Feb 24 16:24:41 2011 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Fri, 25 Feb 2011 00:24:41 +0000 Subject: /hg/icedtea6: fix hotspot hs20 build on powerpc and powerpc64 Message-ID: changeset 896d8e5807c7 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=896d8e5807c7 author: doko at ubuntu.com date: Fri Feb 25 01:14:43 2011 +0100 fix hotspot hs20 build on powerpc and powerpc64 2011-02-24 Matthias Klose * patches/hotspot/hs20/powerpc-stacksize.patch: New, increase stack size for powerpc builds. * Makefile.am (ICEDTEA_PATCHES): Apply. diffstat: 3 files changed, 50 insertions(+), 1 deletion(-) ChangeLog | 6 +++ Makefile.am | 3 + patches/hotspot/hs20/powerpc-stacksize.patch | 42 ++++++++++++++++++++++++++ diffs (72 lines): diff -r a76f4fe0c47c -r 896d8e5807c7 ChangeLog --- a/ChangeLog Thu Feb 24 23:12:17 2011 +0100 +++ b/ChangeLog Fri Feb 25 01:14:43 2011 +0100 @@ -1,3 +1,9 @@ 2011-02-24 Xerxes Ranby + + * patches/hotspot/hs20/powerpc-stacksize.patch: New, + increase stack size for powerpc builds. + * Makefile.am (ICEDTEA_PATCHES): Apply. + 2011-02-24 Xerxes Ranby PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. diff -r a76f4fe0c47c -r 896d8e5807c7 Makefile.am --- a/Makefile.am Thu Feb 24 23:12:17 2011 +0100 +++ b/Makefile.am Fri Feb 25 01:14:43 2011 +0100 @@ -334,7 +334,8 @@ ICEDTEA_PATCHES += \ patches/openjdk/6997495-test_correction_6857159.patch else ICEDTEA_PATCHES += \ - patches/pr639-broken_shark_build.patch + patches/pr639-broken_shark_build.patch \ + patches/hotspot/$(HSBUILD)/powerpc-stacksize.patch endif if WITH_RHINO diff -r a76f4fe0c47c -r 896d8e5807c7 patches/hotspot/hs20/powerpc-stacksize.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/hs20/powerpc-stacksize.patch Fri Feb 25 01:14:43 2011 +0100 @@ -0,0 +1,42 @@ +--- openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp~ 2011-02-22 17:51:24.000000000 +0100 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2011-02-24 18:58:27.758228950 +0100 +@@ -32,7 +32,11 @@ + // + + define_pd_global(bool, DontYieldALot, false); ++#ifdef __powerpc64__ ++define_pd_global(intx, ThreadStackSize, 2048); ++#else + define_pd_global(intx, ThreadStackSize, 1536); ++#endif + #ifdef _LP64 + define_pd_global(intx, VMThreadStackSize, 1024); + #else +--- openjdk/corba/make/common/shared/Defs-java.gmk~ 2011-02-24 18:56:20.278228999 +0100 ++++ openjdk/corba/make/common/shared/Defs-java.gmk 2011-02-24 19:01:47.938229001 +0100 +@@ -68,9 +68,9 @@ + + # 64-bit builds require a larger thread stack size. + ifeq ($(ARCH_DATA_MODEL), 32) +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1024 + else +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=2048 + endif + JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%) + +--- openjdk/jdk/make/common/shared/Defs-java.gmk~ 2011-02-24 20:10:20.598229000 +0100 ++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2011-02-24 20:11:45.608228331 +0100 +@@ -75,9 +75,9 @@ + + # 64-bit builds require a larger thread stack size. + ifeq ($(ARCH_DATA_MODEL), 32) +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1024 + else +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=2048 + endif + JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%) + From ahughes at redhat.com Thu Feb 24 16:25:36 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:25:36 +0000 Subject: [patch] fix hotspot hs20 build on powerpc and powerpc64 In-Reply-To: <4D66E8DE.5000707@zafena.se> References: <4D66DC7B.9090103@ubuntu.com> <4D66E8DE.5000707@zafena.se> Message-ID: <20110225002536.GQ3448@rivendell.middle-earth.co.uk> On 00:25 Fri 25 Feb , Xerxes R?nby wrote: > (2011-02-25 00.00.30) xranby-home: i can confirm for the trunk > > +1 to go to the trunk > Branch pushes require an approval but there's no specially endowed person who has to give that approval i.e. you can do it if you feel comfortable doing so. The current policy is: * For IcedTea * HEAD - commit if sure, ask for review if not * Branches - require approval for commit * For IcedTea-Web & VisualVM Harness * All commits require approval. I'd try and enforce review on IcedTea HEAD, but in practice, patches tend to get stuck in an unreviewed state. IcedTea-Web, in contrast, is working so far (touch wood). To reiterate, approval is just from another developer who feels qualified to give it. Obviously, if you don't know that bit of the code too well, it's best to err on the side of caution and not approve. > Cheers > Xerxes -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From doko at icedtea.classpath.org Thu Feb 24 16:27:05 2011 From: doko at icedtea.classpath.org (doko at icedtea.classpath.org) Date: Fri, 25 Feb 2011 00:27:05 +0000 Subject: /hg/release/icedtea6-1.10: fix hotspot hs20 build on powerpc and... Message-ID: changeset b442b847be56 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=b442b847be56 author: doko at ubuntu.com date: Fri Feb 25 01:17:08 2011 +0100 fix hotspot hs20 build on powerpc and powerpc64 2011-02-24 Matthias Klose * patches/hotspot/hs20/powerpc-stacksize.patch: New, increase stack size for powerpc builds. * Makefile.am (ICEDTEA_PATCHES): Apply. diffstat: 3 files changed, 50 insertions(+), 1 deletion(-) ChangeLog | 6 +++ Makefile.am | 3 + patches/hotspot/hs20/powerpc-stacksize.patch | 42 ++++++++++++++++++++++++++ diffs (72 lines): diff -r 4a9e475fd35d -r b442b847be56 ChangeLog --- a/ChangeLog Thu Feb 24 22:11:20 2011 +0100 +++ b/ChangeLog Fri Feb 25 01:17:08 2011 +0100 @@ -1,3 +1,9 @@ 2011-02-24 Xerxes Ranby + + * patches/hotspot/hs20/powerpc-stacksize.patch: New, + increase stack size for powerpc builds. + * Makefile.am (ICEDTEA_PATCHES): Apply. + 2011-02-24 Xerxes Ranby PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. diff -r 4a9e475fd35d -r b442b847be56 Makefile.am --- a/Makefile.am Thu Feb 24 22:11:20 2011 +0100 +++ b/Makefile.am Fri Feb 25 01:17:08 2011 +0100 @@ -334,7 +334,8 @@ ICEDTEA_PATCHES += \ patches/openjdk/6997495-test_correction_6857159.patch else ICEDTEA_PATCHES += \ - patches/pr639-broken_shark_build.patch + patches/pr639-broken_shark_build.patch \ + patches/hotspot/$(HSBUILD)/powerpc-stacksize.patch endif if WITH_RHINO diff -r 4a9e475fd35d -r b442b847be56 patches/hotspot/hs20/powerpc-stacksize.patch --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/patches/hotspot/hs20/powerpc-stacksize.patch Fri Feb 25 01:17:08 2011 +0100 @@ -0,0 +1,42 @@ +--- openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp~ 2011-02-22 17:51:24.000000000 +0100 ++++ openjdk/hotspot/src/os_cpu/linux_zero/vm/globals_linux_zero.hpp 2011-02-24 18:58:27.758228950 +0100 +@@ -32,7 +32,11 @@ + // + + define_pd_global(bool, DontYieldALot, false); ++#ifdef __powerpc64__ ++define_pd_global(intx, ThreadStackSize, 2048); ++#else + define_pd_global(intx, ThreadStackSize, 1536); ++#endif + #ifdef _LP64 + define_pd_global(intx, VMThreadStackSize, 1024); + #else +--- openjdk/corba/make/common/shared/Defs-java.gmk~ 2011-02-24 18:56:20.278228999 +0100 ++++ openjdk/corba/make/common/shared/Defs-java.gmk 2011-02-24 19:01:47.938229001 +0100 +@@ -68,9 +68,9 @@ + + # 64-bit builds require a larger thread stack size. + ifeq ($(ARCH_DATA_MODEL), 32) +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1024 + else +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=2048 + endif + JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%) + +--- openjdk/jdk/make/common/shared/Defs-java.gmk~ 2011-02-24 20:10:20.598229000 +0100 ++++ openjdk/jdk/make/common/shared/Defs-java.gmk 2011-02-24 20:11:45.608228331 +0100 +@@ -75,9 +75,9 @@ + + # 64-bit builds require a larger thread stack size. + ifeq ($(ARCH_DATA_MODEL), 32) +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=768 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1024 + else +- JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=1536 ++ JAVAC_JVM_FLAGS += -J-XX:ThreadStackSize=2048 + endif + JAVAC_JVM_FLAGS += $(JAVA_TOOLS_FLAGS:%=-J%) + From ahughes at redhat.com Thu Feb 24 16:33:17 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:33:17 +0000 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D66AE15.7010307@redhat.com> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> <4D669AD5.3070907@redhat.com> <20110224184453.GN3448@rivendell.middle-earth.co.uk> <4D66AE15.7010307@redhat.com> Message-ID: <20110225003316.GR3448@rivendell.middle-earth.co.uk> On 14:14 Thu 24 Feb , Omair Majid wrote: > On 02/24/2011 01:44 PM, Dr Andrew John Hughes wrote: > > On 12:52 Thu 24 Feb , Omair Majid wrote: > >> Hi, > >> > >> I am attaching a patch that makes net.sourceforge.jnlp.runtime.Boot use > >> the location of about.jnlp as determined at build time. There are a few > >> other things that I will be adding to build.properties. > >> > >> The rest of this email assumes this patch is applied before applying > >> your patch, and where there are conflicts (such as the codebase of > >> about.jnlp, this patch takes precedence). > >> > > > > snip... > > >>>> @@ -218,8 +223,16 @@ > >>>> cl = ClassLoader.getSystemClassLoader(); > >>>> } > >>>> try { > >>>> - return > >>>> cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > >>>> + //exctracts full path to about.jnlp > >>> > >>> Typo; extracts > >>> > >>>> + String s = > >>>> cl.getResource("net/sourceforge/jnlp/runtime/Boot.class").toString(); > >>>> + s=s.substring(0,s.indexOf("!")); > >>>> + s=s.substring(s.indexOf(":")+1); > >>>> + s=s.substring(s.indexOf(":")+1); > >>>> + s="file://"+s.replace("netx.jar","about.jnlp"); > >>>> + System.out.println(s); > >>>> + return s; > >>> > >>> What does this do? > >>> > >> > >> If I understand this properly, it uses the installed location of > >> netx.jar to compute the location of about.jnlp. That is, if netx.jar is > >> at /usr/local/share/icedtea-web/netx.jar, then it finds about.jnlp to be > >> located at /usr/local/share/icedtea-web/about.jnlp. > >> > > > > It's the use of ':' and '!' that confuses me. Exactly what does cl.getResource > > return here? > > > > It returns a jar url. Jar urls look like this: > > jar:file:/home/omajid/code/icedtea-web-image/share/icedtea-web/netx.jar!/net/sourceforge/jnlp/runtime/Boot.class > > The ! separates the url of the jar file itself from the path of the file > stored inside a jar. > Ok makes more sense now. Still think the System.out should go though or at least be switch to output to System.err only when debugging is on. > >> The attached patch determines the paths at build time and puts them in a > >> build.properties file. > >> > > > > I'd prefer that approach. > > > >> Cheers, > >> Omair > >> > >> [1] > >> http://download.oracle.com/javase/tutorial/uiswing/concurrency/dispatch.html > > > >> diff -r d7fee305bd4f Makefile.am > >> --- a/Makefile.am Wed Feb 23 13:37:10 2011 -0500 > >> +++ b/Makefile.am Thu Feb 24 12:06:16 2011 -0500 > >> @@ -242,7 +242,11 @@ > >> netx-source-files.txt: > >> find $(NETX_SRCDIR) -name '*.java' | sort> $@ > >> > >> -stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp > >> +build.properties: $(NETX_SRCDIR)/net/sourceforge/jnlp/build.properties.in > >> + sed "s#[@]ABOUT_JNLP_LOCATION[@]#$(DESTDIR)$(datadir)/icedtea-web/about.jnlp#"< $< > $@ > > > > Is there a reason we aren't doing this via configure? > > > > Yes, as indicated in the autoconf manual [1], configure will replace > @datadir@ with {datarootdir}, not the actual path. > Ugh ok. You still need to fix the DESTDIR issue. > > $(DESTDIR) will not be the final install location so should be in here. > > It's a staging location. > > > >> + > >> +stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp \ > >> + build.properties > >> mkdir -p $(NETX_DIR) > >> $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ > >> -d $(NETX_DIR) \ > >> @@ -255,6 +259,7 @@ > >> ${INSTALL_DATA} -D $${files} \ > >> $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \ > >> done) > >> + cp -pPR build.properties $(NETX_DIR)/net/sourceforge/jnlp/ > > > > Any reason not to just use cp -a? > > > > No. None that I can think of. > > >> mkdir -p stamps > >> touch $@ > >> > >> @@ -274,6 +279,7 @@ > >> > >> clean-netx: > >> rm -rf $(NETX_DIR) > >> + rm -f build.properties > > > > configure would do this for you. > > > > Yes, except as I said above, it wont work with file paths :( > > >> rm -f stamps/netx-dist.stamp > >> rm -f netx-source-files.txt > >> rm -f stamps/netx.stamp > >> diff -r d7fee305bd4f netx/net/sourceforge/jnlp/build.properties.in > >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > >> +++ b/netx/net/sourceforge/jnlp/build.properties.in Thu Feb 24 12:06:16 2011 -0500 > >> @@ -0,0 +1,1 @@ > >> +about.jnlp.location=@ABOUT_JNLP_LOCATION@ > >> diff -r d7fee305bd4f netx/net/sourceforge/jnlp/resources/about.jnlp > >> --- a/netx/net/sourceforge/jnlp/resources/about.jnlp Wed Feb 23 13:37:10 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/resources/about.jnlp Thu Feb 24 12:06:16 2011 -0500 > >> @@ -1,5 +1,5 @@ > >> > >> - > >> + > >> > >> About window for NetX > >> NetX > >> diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/Boot.java > >> --- a/netx/net/sourceforge/jnlp/runtime/Boot.java Wed Feb 23 13:37:10 2011 -0500 > >> +++ b/netx/net/sourceforge/jnlp/runtime/Boot.java Thu Feb 24 12:06:16 2011 -0500 > >> @@ -19,6 +19,7 @@ > >> import static net.sourceforge.jnlp.runtime.Translator.R; > >> > >> import java.io.File; > >> +import java.io.InputStream; > >> import java.io.IOException; > >> import java.net.MalformedURLException; > >> import java.net.URL; > >> @@ -27,6 +28,7 @@ > >> import java.util.ArrayList; > >> import java.util.Arrays; > >> import java.util.List; > >> +import java.util.Properties; > >> > >> import net.sourceforge.jnlp.AppletDesc; > >> import net.sourceforge.jnlp.ApplicationDesc; > >> @@ -213,15 +215,31 @@ > >> * does not exist. > >> */ > >> private static String getAboutFile() { > >> + String location = null; > >> ClassLoader cl = Boot.class.getClassLoader(); > >> if (cl == null) { > >> cl = ClassLoader.getSystemClassLoader(); > >> } > >> + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/build.properties"); > >> try { > >> - return cl.getResource("net/sourceforge/jnlp/resources/about.jnlp").toString(); > >> - } catch (Exception e) { > >> - return null; > >> + Properties buildProperties = new Properties(); > >> + buildProperties.load(in); > >> + location = buildProperties.getProperty("about.jnlp.location"); > >> + } catch (IOException e) { > >> + // ignore and return null later on > >> + if (JNLPRuntime.isDebug()) { > >> + e.printStackTrace(); > >> + } > >> + } finally { > >> + if (in != null) { > >> + try { > >> + in.close(); > >> + } catch (IOException e) { > >> + e.printStackTrace(); > >> + } > >> + } > >> } > >> + return location; > >> } > >> > >> /** > > > > Code changes look fine. > > Thanks for looking over the path. Unfortunately the changes are not > sufficient. We will still need to either sign about.jar or somehow fix > it so it works without all permissions. > > Jiri, what's your take? > > Cheers, > Omair > > [1] > http://www.gnu.org/software/hello/manual/autoconf/Installation-Directory-Variables.html -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 16:37:17 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:37:17 +0000 Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <2087662562.610660.1298576764187.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <20110224182804.GL3448@rivendell.middle-earth.co.uk> <2087662562.610660.1298576764187.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110225003717.GS3448@rivendell.middle-earth.co.uk> On 14:46 Thu 24 Feb , Denis Lila wrote: > > The IcedTea version: > > > > 2008-10-27 Mark Wielaard > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > predates the OpenJDK one: > > > > changeset: 1878:ccc36189f2a7 > > user: rkennke > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > by just under a year. Roman may even have been using the IcedTea patch > > and not bothered > > to report to us. > > > > Anyway, good to be replaced in a separate changeset. > > The attached patch does the replacement of > patches/renderer-crossings.patch. I do this first because it came > before any of the other things, and the other patches won't apply > without it. > Looks good. > Unfortunately, it also has to stop applying > patches/openjdk/6967436-6976265-6967434-pisces.patch > patches/openjdk/6766342-AA-simple-shape-performance.patch > If we don't stop applying the first of those, the patching will > fail. It's not a good idea to apply the second because it changes > a file that is also changed by 6967436-6976265-6967434-pisces.patch. > So until the replacement for 6967436-6976265-6967434-pisces.patch is > in, we shouldn't apply it. > I can accept this temporarily but 6766342 should be re-enabled once the Pisces patch is split. You may have to rejig it to apply, but that's life. It's usually just a case of applying rejected chunks manually and generating a fresh patch. > Ok to push? > Yes. > The next changeset after this will introduce the three replacements of > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > Thank you. > > ----- Original Message ----- > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > Hi. > > > > > > I want to push this patch: > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > attaching it, > > > but it was too big and I cancelled the message. > > > > > > > Ok let's split this up and do them in individual changesets with > > individual > > ChangeLogs. It's much easier to track things that way if we're not > > mixing > > up orthogonal things. > > > > > The changes are: > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was replaced by > > > 6967436-6967433-floating-pt-conversion.patch, > > > 6967434-bad-round-joins.patch, > > > and 6976265-stroke-control.patch. Each of the separate patches is > > > its own > > > changeset in openjdk7, so it was my mistake to begin with to lump > > > them > > > all into one backport. Splitting it up into the 3 patches fixes it. > > > Also > > > each of the three patches is an unmodified "hg export" of its > > > openjdk7 > > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > > wasn't, > > > because I had to remove some of the @Override annotations so that > > > the > > > build wouldn't fail. The proper way to get around this is by > > > changing > > > the source and target options to ecj, which is what > > > patches/piscesMakefile.patch does. > > > > > > > Ok so this is one patch: the three patch split + the piscesMakefile to > > make > > it work. > > > > > I replaced patches/renderer-crossing.patch with > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > if (crossingIndices != null && crossingIndices.length > > > > DEFAULT_INDICES_SIZE) { > > > while the latter adds > > > if (crossingIndices != null && > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > { > > > so they do exactly the same thing, but the layout is different. What > > > I think > > > happened is that patches/renderer-crossing.patch was added to > > > icedtea before > > > openjdk7, and when it went into openjdk7 the newlines were changed. > > > So now > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > The other changes are just removing obsolete patches, and they're > > > described > > > in the ChangeLog. > > > > > > > Again, separate changeset. > > > > > Thank you, > > > Denis. > > > > -- > > Andrew :) > > > > Free Java Software Engineer > > Red Hat, Inc. (http://www.redhat.com) > > > > Support Free Java! > > Contribute to GNU Classpath and IcedTea > > http://www.gnu.org/software/classpath > > http://icedtea.classpath.org > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 > diff -r 6e7f2c1f25df ChangeLog > --- a/ChangeLog Thu Feb 24 03:22:54 2011 +0000 > +++ b/ChangeLog Thu Feb 24 14:36:52 2011 -0500 > @@ -1,3 +1,15 @@ > +2011-02-24 Denis Lila > + > + * Makefile.am: Replaced patches/renderer-crossing.patch with > + patches/openjdk/6887494-NPE-in-pisces.patch. > + No longer applying: > + patches/openjdk/6967436-6976265-6967434-pisces.patch > + patches/openjdk/6766342-AA-simple-shape-performance.patch > + * patches/openjdk/6887494-NPE-in-pisces.patch: > + Added. > + * patches/renderer-crossing.patch: > + Removed. Replaced by 6887494-NPE-in-pisces.patch. > + > 2011-02-24 Andrew John Hughes > > * patches/pr639-missing_shark_include.patch: > diff -r 6e7f2c1f25df Makefile.am > --- a/Makefile.am Thu Feb 24 03:22:54 2011 +0000 > +++ b/Makefile.am Thu Feb 24 14:36:52 2011 -0500 > @@ -249,7 +249,6 @@ > patches/arch.patch \ > patches/lc_ctype.patch \ > patches/xjc.patch \ > - patches/renderer-crossing.patch \ > patches/stroker-finish.patch \ > patches/linker-libs-order.patch \ > patches/testenv.patch \ > @@ -293,7 +292,6 @@ > patches/openjdk/6650759-missing_inference.patch \ > patches/numa_on_early_glibc.patch \ > patches/jtreg-international-fonts.patch \ > - patches/openjdk/6967436-6976265-6967434-pisces.patch \ > patches/f14-fonts.patch \ > patches/jtreg-T6638712-fix.patch \ > patches/jtreg-T6650759m-fix.patch \ > @@ -323,8 +321,8 @@ > patches/pr586-include_all_srcs.patch \ > patches/jtreg-LastErrorString.patch \ > patches/openjdk/6663040-com.sun.awt.patch \ > + patches/openjdk/6887494-NPE-in-pisces.patch \ > patches/openjdk/6775317-non-AA-simple-shape-performance.patch \ > - patches/openjdk/6766342-AA-simple-shape-performance.patch \ > patches/pr600-arm-jvm.cfg.patch > > if !WITH_ALT_HSBUILD > diff -r 6e7f2c1f25df patches/openjdk/6887494-NPE-in-pisces.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/6887494-NPE-in-pisces.patch Thu Feb 24 14:36:52 2011 -0500 > @@ -0,0 +1,90 @@ > +# HG changeset patch > +# User rkennke > +# Date 1254777142 -7200 > +# Node ID ccc36189f2a7615ffb798e76ba5b31d8c535dc40 > +# Parent 31e68419715e0a8e88ee6005ab1d69180cfe6f44 > +6887494: NPE in pisces Renderer > +Summary: Only recreate crossings array, if there actually exists one before. > +Reviewed-by: flar, tdv > + > +diff -r 31e68419715e -r ccc36189f2a7 src/share/classes/sun/java2d/pisces/Renderer.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Renderer.java Fri Oct 02 10:15:12 2009 -0700 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Renderer.java Mon Oct 05 23:12:22 2009 +0200 > +@@ -775,10 +775,12 @@ > + > + // Free sorting arrays if larger than maximum size > + private void crossingListFinished() { > +- if (crossings.length > DEFAULT_CROSSINGS_SIZE) { > ++ if (crossings != null && crossings.length > DEFAULT_CROSSINGS_SIZE) { > + crossings = new int[DEFAULT_CROSSINGS_SIZE]; > + } > +- if (crossingIndices.length > DEFAULT_INDICES_SIZE) { > ++ if (crossingIndices != null && > ++ crossingIndices.length > DEFAULT_INDICES_SIZE) > ++ { > + crossingIndices = new int[DEFAULT_INDICES_SIZE]; > + } > + } > +diff -r 31e68419715e -r ccc36189f2a7 test/sun/java2d/pisces/Renderer/TestNPE.java > +--- /dev/null Thu Jan 01 00:00:00 1970 +0000 > ++++ openjdk/jdk/test/sun/java2d/pisces/Renderer/TestNPE.java Mon Oct 05 23:12:22 2009 +0200 > +@@ -0,0 +1,59 @@ > ++/* > ++ * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. > ++ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > ++ * > ++ * This code is free software; you can redistribute it and/or modify it > ++ * under the terms of the GNU General Public License version 2 only, as > ++ * published by the Free Software Foundation. > ++ * > ++ * This code is distributed in the hope that it will be useful, but WITHOUT > ++ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > ++ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > ++ * version 2 for more details (a copy is included in the LICENSE file that > ++ * accompanied this code). > ++ * > ++ * You should have received a copy of the GNU General Public License version > ++ * 2 along with this work; if not, write to the Free Software Foundation, > ++ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > ++ * > ++ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA > ++ * or visit www.oracle.com if you need additional information or have any > ++ * questions. > ++ */ > ++ > ++/** > ++ * @test > ++ * @bug 6887494 > ++ * > ++ * @summary Verifies that no NullPointerException is thrown in Pisces Renderer > ++ * under certain circumstances. > ++ * > ++ * @run main TestNPE > ++ */ > ++ > ++import java.awt.*; > ++import java.awt.geom.*; > ++import java.awt.image.BufferedImage; > ++ > ++public class TestNPE { > ++ > ++ private static void paint(Graphics g) { > ++ Graphics2D g2d = (Graphics2D) g; > ++ g2d.setRenderingHint(RenderingHints.KEY_ANTIALIASING, > ++ RenderingHints.VALUE_ANTIALIAS_ON); > ++ g2d.setClip(0, 0, 0, 0); > ++ g2d.setTransform( > ++ new AffineTransform(4.0f, 0.0f, 0.0f, 4.0f, -1248.0f, -744.0f)); > ++ g2d.draw(new Line2D.Float(131.21428571428572f, 33.0f, > ++ 131.21428571428572f, 201.0f)); > ++ } > ++ > ++ public static void main(String[] args) { > ++ BufferedImage im = new BufferedImage(100, 100, > ++ BufferedImage.TYPE_INT_ARGB); > ++ > ++ // Trigger exception in main thread. > ++ Graphics g = im.getGraphics(); > ++ paint(g); > ++ } > ++} > diff -r 6e7f2c1f25df patches/renderer-crossing.patch > --- a/patches/renderer-crossing.patch Thu Feb 24 03:22:54 2011 +0000 > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > @@ -1,15 +0,0 @@ > ---- openjdk6/jdk/src/share/classes/sun/java2d/pisces/Renderer.java 2008-08-28 10:14:15.000000000 +0200 > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Renderer.java 2008-10-27 13:54:25.000000000 +0100 > -@@ -775,10 +775,10 @@ > - > - // Free sorting arrays if larger than maximum size > - private void crossingListFinished() { > -- if (crossings.length > DEFAULT_CROSSINGS_SIZE) { > -+ if (crossings != null && crossings.length > DEFAULT_CROSSINGS_SIZE) { > - crossings = new int[DEFAULT_CROSSINGS_SIZE]; > - } > -- if (crossingIndices.length > DEFAULT_INDICES_SIZE) { > -+ if (crossingIndices != null && crossingIndices.length > DEFAULT_INDICES_SIZE) { > - crossingIndices = new int[DEFAULT_INDICES_SIZE]; > - } > - } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 16:39:17 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:39:17 +0000 Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <1396987442.611766.1298580310791.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <2087662562.610660.1298576764187.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <1396987442.611766.1298580310791.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110225003917.GT3448@rivendell.middle-earth.co.uk> On 15:45 Thu 24 Feb , Denis Lila wrote: > This: > http://icedtea.classpath.org/~dlila/cleanupPart2.patch > is the second part of the clean up. It removes > patches/openjdk/6967436-6976265-6967434-pisces.patch > (which we stopped applying in the previous cleanupPart1.patch), > it adds the 3 replacement patches for it, it adds > piscesMakefile.patch to make the build work, and it reapplies > patches/openjdk/6766342-AA-simple-shape-performance.patch. > > It also stops applying 3 patches made obsolete by the 3 new > patches (but doesn't remove them (should it?). I've left this > for the next changeset). > > Ok to push (contingent on cleanupPart1.patch being ok)? > There's no patch attached AFAICS. I'd say do the removals in the same patch. > Thank you, > Denis. > > ----- Original Message ----- > > > The IcedTea version: > > > > > > 2008-10-27 Mark Wielaard > > > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > > > predates the OpenJDK one: > > > > > > changeset: 1878:ccc36189f2a7 > > > user: rkennke > > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > > > by just under a year. Roman may even have been using the IcedTea > > > patch > > > and not bothered > > > to report to us. > > > > > > Anyway, good to be replaced in a separate changeset. > > > > The attached patch does the replacement of > > patches/renderer-crossings.patch. I do this first because it came > > before any of the other things, and the other patches won't apply > > without it. > > > > Unfortunately, it also has to stop applying > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > patches/openjdk/6766342-AA-simple-shape-performance.patch > > If we don't stop applying the first of those, the patching will > > fail. It's not a good idea to apply the second because it changes > > a file that is also changed by 6967436-6976265-6967434-pisces.patch. > > So until the replacement for 6967436-6976265-6967434-pisces.patch is > > in, we shouldn't apply it. > > > > Ok to push? > > > > The next changeset after this will introduce the three replacements of > > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > > > Thank you. > > > > ----- Original Message ----- > > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > > Hi. > > > > > > > > I want to push this patch: > > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > > attaching it, > > > > but it was too big and I cancelled the message. > > > > > > > > > > Ok let's split this up and do them in individual changesets with > > > individual > > > ChangeLogs. It's much easier to track things that way if we're not > > > mixing > > > up orthogonal things. > > > > > > > The changes are: > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was replaced > > > > by > > > > 6967436-6967433-floating-pt-conversion.patch, > > > > 6967434-bad-round-joins.patch, > > > > and 6976265-stroke-control.patch. Each of the separate patches is > > > > its own > > > > changeset in openjdk7, so it was my mistake to begin with to lump > > > > them > > > > all into one backport. Splitting it up into the 3 patches fixes > > > > it. > > > > Also > > > > each of the three patches is an unmodified "hg export" of its > > > > openjdk7 > > > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > > > wasn't, > > > > because I had to remove some of the @Override annotations so that > > > > the > > > > build wouldn't fail. The proper way to get around this is by > > > > changing > > > > the source and target options to ecj, which is what > > > > patches/piscesMakefile.patch does. > > > > > > > > > > Ok so this is one patch: the three patch split + the piscesMakefile > > > to > > > make > > > it work. > > > > > > > I replaced patches/renderer-crossing.patch with > > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > > if (crossingIndices != null && crossingIndices.length > > > > > DEFAULT_INDICES_SIZE) { > > > > while the latter adds > > > > if (crossingIndices != null && > > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > > { > > > > so they do exactly the same thing, but the layout is different. > > > > What > > > > I think > > > > happened is that patches/renderer-crossing.patch was added to > > > > icedtea before > > > > openjdk7, and when it went into openjdk7 the newlines were > > > > changed. > > > > So now > > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > > > > > > The other changes are just removing obsolete patches, and they're > > > > described > > > > in the ChangeLog. > > > > > > > > > > Again, separate changeset. > > > > > > > Thank you, > > > > Denis. > > > > > > -- > > > Andrew :) > > > > > > Free Java Software Engineer > > > Red Hat, Inc. (http://www.redhat.com) > > > > > > Support Free Java! > > > Contribute to GNU Classpath and IcedTea > > > http://www.gnu.org/software/classpath > > > http://icedtea.classpath.org > > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 16:40:04 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:40:04 +0000 Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <301067285.612468.1298582424772.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <1396987442.611766.1298580310791.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <301067285.612468.1298582424772.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110225004004.GU3448@rivendell.middle-earth.co.uk> On 16:20 Thu 24 Feb , Denis Lila wrote: > And the attached file is the final part of the cleanup. > It just removes 3 patches that were obsoleted by the > previous changeset (if the previous changest is approved > for pushing, that is). > As I said in my previous reply, these can be removed with the patch that obsoletes them. But can you explain why they are obsolete? > Ok to push? > > Thank you, > Denis. > > ----- Original Message ----- > > This: > > http://icedtea.classpath.org/~dlila/cleanupPart2.patch > > is the second part of the clean up. It removes > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > (which we stopped applying in the previous cleanupPart1.patch), > > it adds the 3 replacement patches for it, it adds > > piscesMakefile.patch to make the build work, and it reapplies > > patches/openjdk/6766342-AA-simple-shape-performance.patch. > > > > It also stops applying 3 patches made obsolete by the 3 new > > patches (but doesn't remove them (should it?). I've left this > > for the next changeset). > > > > Ok to push (contingent on cleanupPart1.patch being ok)? > > > > Thank you, > > Denis. > > > > ----- Original Message ----- > > > > The IcedTea version: > > > > > > > > 2008-10-27 Mark Wielaard > > > > > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > > > > > predates the OpenJDK one: > > > > > > > > changeset: 1878:ccc36189f2a7 > > > > user: rkennke > > > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > > > > > by just under a year. Roman may even have been using the IcedTea > > > > patch > > > > and not bothered > > > > to report to us. > > > > > > > > Anyway, good to be replaced in a separate changeset. > > > > > > The attached patch does the replacement of > > > patches/renderer-crossings.patch. I do this first because it came > > > before any of the other things, and the other patches won't apply > > > without it. > > > > > > Unfortunately, it also has to stop applying > > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > > patches/openjdk/6766342-AA-simple-shape-performance.patch > > > If we don't stop applying the first of those, the patching will > > > fail. It's not a good idea to apply the second because it changes > > > a file that is also changed by 6967436-6976265-6967434-pisces.patch. > > > So until the replacement for 6967436-6976265-6967434-pisces.patch is > > > in, we shouldn't apply it. > > > > > > Ok to push? > > > > > > The next changeset after this will introduce the three replacements > > > of > > > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > > > > > Thank you. > > > > > > ----- Original Message ----- > > > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > > > Hi. > > > > > > > > > > I want to push this patch: > > > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > > > attaching it, > > > > > but it was too big and I cancelled the message. > > > > > > > > > > > > > Ok let's split this up and do them in individual changesets with > > > > individual > > > > ChangeLogs. It's much easier to track things that way if we're not > > > > mixing > > > > up orthogonal things. > > > > > > > > > The changes are: > > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was > > > > > replaced > > > > > by > > > > > 6967436-6967433-floating-pt-conversion.patch, > > > > > 6967434-bad-round-joins.patch, > > > > > and 6976265-stroke-control.patch. Each of the separate patches > > > > > is > > > > > its own > > > > > changeset in openjdk7, so it was my mistake to begin with to > > > > > lump > > > > > them > > > > > all into one backport. Splitting it up into the 3 patches fixes > > > > > it. > > > > > Also > > > > > each of the three patches is an unmodified "hg export" of its > > > > > openjdk7 > > > > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > > > > wasn't, > > > > > because I had to remove some of the @Override annotations so > > > > > that > > > > > the > > > > > build wouldn't fail. The proper way to get around this is by > > > > > changing > > > > > the source and target options to ecj, which is what > > > > > patches/piscesMakefile.patch does. > > > > > > > > > > > > > Ok so this is one patch: the three patch split + the > > > > piscesMakefile > > > > to > > > > make > > > > it work. > > > > > > > > > I replaced patches/renderer-crossing.patch with > > > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > > > if (crossingIndices != null && crossingIndices.length > > > > > > DEFAULT_INDICES_SIZE) { > > > > > while the latter adds > > > > > if (crossingIndices != null && > > > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > > > { > > > > > so they do exactly the same thing, but the layout is different. > > > > > What > > > > > I think > > > > > happened is that patches/renderer-crossing.patch was added to > > > > > icedtea before > > > > > openjdk7, and when it went into openjdk7 the newlines were > > > > > changed. > > > > > So now > > > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > > > > > > > > > > > The other changes are just removing obsolete patches, and > > > > > they're > > > > > described > > > > > in the ChangeLog. > > > > > > > > > > > > > Again, separate changeset. > > > > > > > > > Thank you, > > > > > Denis. > > > > > > > > -- > > > > Andrew :) > > > > > > > > Free Java Software Engineer > > > > Red Hat, Inc. (http://www.redhat.com) > > > > > > > > Support Free Java! > > > > Contribute to GNU Classpath and IcedTea > > > > http://www.gnu.org/software/classpath > > > > http://icedtea.classpath.org > > > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 > diff -r 5c0be31545ff ChangeLog > --- a/ChangeLog Thu Feb 24 15:30:47 2011 -0500 > +++ b/ChangeLog Thu Feb 24 16:13:11 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-24 Denis Lila > + > + * patches/java2d-stroker-internal-close-joint.patch: > + Obsolete and unused. Removed. > + * patches/java2d-stroker-internal-joint.patch: > + Obsolete and unused. Removed. > + * patches/stroker-finish.patch: > + Obsolete and unused. Removed. > + > 2011-02-24 Denis Lila > > * Makefile.am: Added patches > diff -r 5c0be31545ff patches/java2d-stroker-internal-close-joint.patch > --- a/patches/java2d-stroker-internal-close-joint.patch Thu Feb 24 15:30:47 2011 -0500 > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > @@ -1,96 +0,0 @@ > ---- openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig 2009-04-29 14:01:43.000000000 -0400 > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java 2009-04-29 14:00:03.000000000 -0400 > -@@ -633,7 +633,7 @@ > - } > - > - emitLineTo(sx0 + mx0, sy0 + my0); > -- emitLineTo(sx0 - mx0, sy0 - my0); // same as reverse[0], reverse[1] > -+ emitMoveTo(sx0, sy0); // same as reverse[0], reverse[1] > - > - // Draw final join on the inside > - if (ccw) { > ---- /dev/null 2009-04-15 13:37:55.776002308 -0400 > -+++ openjdk/jdk/test/sun/pisces/MiterInternalCloseJointTest.java 2009-04-29 13:59:31.000000000 -0400 > -@@ -0,0 +1,82 @@ > -+/* > -+ * Copyright 2009 Red Hat, Inc. All Rights Reserved. > -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > -+ * > -+ * This code is free software; you can redistribute it and/or modify it > -+ * under the terms of the GNU General Public License version 2 only, as > -+ * published by the Free Software Foundation. > -+ * > -+ * This code is distributed in the hope that it will be useful, but WITHOUT > -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > -+ * version 2 for more details (a copy is included in the LICENSE file that > -+ * accompanied this code). > -+ * > -+ * You should have received a copy of the GNU General Public License version > -+ * 2 along with this work; if not, write to the Free Software Foundation, > -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > -+ */ > -+ > -+/* > -+ @test > -+ @summary Check that the final joint created using > -+ generalPath.closePath() is correct > -+ @author Omair Majid > -+ @run main MiterInternalCloseJointTest > -+ */ > -+import java.awt.BasicStroke; > -+import java.awt.Color; > -+import java.awt.Graphics2D; > -+import java.awt.geom.GeneralPath; > -+import java.awt.image.BufferedImage; > -+ > -+public class MiterInternalCloseJointTest { > -+ > -+ static final int WIDTH = 200; > -+ static final int HEIGHT = 200; > -+ > -+ static final int x0 = 50, y0 = 50; > -+ static final int x1 = 150, y1 = 50; > -+ static final int x2 = 100, y2 = 100; > -+ > -+ private static BufferedImage createTestImage() { > -+ final BufferedImage image = new BufferedImage(WIDTH, HEIGHT, > -+ BufferedImage.TYPE_INT_BGR); > -+ Graphics2D g = image.createGraphics(); > -+ > -+ g.setColor(Color.BLACK); > -+ g.fillRect(0, 0, WIDTH, HEIGHT); > -+ > -+ float wideStrokeWidth = 20.0f; > -+ BasicStroke wideStroke = new BasicStroke(wideStrokeWidth, > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth); > -+ float thinStrokeWidth = 3.0f; > -+ BasicStroke thinStroke = new BasicStroke(thinStrokeWidth, > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth); > -+ > -+ g.setColor(Color.WHITE); > -+ GeneralPath path = new GeneralPath(); > -+ path.moveTo(x0, y0); > -+ path.lineTo(x1, y1); > -+ path.lineTo(x2, y2); > -+ path.closePath(); > -+ path.closePath(); > -+ g.setStroke(thinStroke); > -+ g.draw(wideStroke.createStrokedShape(path)); > -+ > -+ return image; > -+ } > -+ > -+ public static void main(String[] args) { > -+ > -+ BufferedImage testImage = createTestImage(); > -+ > -+ int color = testImage.getRGB(x0,y0-5); > -+ System.out.println("Color seen: #" + Integer.toHexString(color)); > -+ if (color == Color.WHITE.getRGB()) { > -+ throw new RuntimeException( > -+ "Test Failed; did not expected to see a white line at the start of the path"); > -+ } > -+ > -+ } > -+} > diff -r 5c0be31545ff patches/java2d-stroker-internal-joint.patch > --- a/patches/java2d-stroker-internal-joint.patch Thu Feb 24 15:30:47 2011 -0500 > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > @@ -1,98 +0,0 @@ > ---- openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig 2009-04-29 13:30:24.000000000 -0400 > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java 2009-04-29 13:31:05.000000000 -0400 > -@@ -614,6 +614,8 @@ > - ROUND_JOIN_INTERNAL_THRESHOLD); > - } > - > -+ emitLineTo(x0, y0, !ccw); > -+ > - emitLineTo(x0 + mx, y0 + my); > - emitLineTo(sx0 + mx, sy0 + my); > - > ---- /dev/null 2009-04-15 13:37:55.776002308 -0400 > -+++ openjdk/jdk/test/sun/pisces/MiterInternalJointTest.java 2009-04-29 13:41:30.000000000 -0400 > -@@ -0,0 +1,84 @@ > -+/* > -+ * Copyright 2009 Red Hat, Inc. All Rights Reserved. > -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > -+ * > -+ * This code is free software; you can redistribute it and/or modify it > -+ * under the terms of the GNU General Public License version 2 only, as > -+ * published by the Free Software Foundation. > -+ * > -+ * This code is distributed in the hope that it will be useful, but WITHOUT > -+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or > -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License > -+ * version 2 for more details (a copy is included in the LICENSE file that > -+ * accompanied this code). > -+ * > -+ * You should have received a copy of the GNU General Public License version > -+ * 2 along with this work; if not, write to the Free Software Foundation, > -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > -+ */ > -+ > -+/* > -+ @test > -+ @summary Check that the penultimate joint created using > -+ generalPath.closePath() is correct > -+ @author Omair Majid > -+ @run main MiterInternalJointTest > -+ */ > -+ > -+ > -+import java.awt.BasicStroke; > -+import java.awt.Color; > -+import java.awt.Graphics2D; > -+import java.awt.geom.GeneralPath; > -+import java.awt.image.BufferedImage; > -+ > -+public class MiterInternalJointTest { > -+ > -+ static final int WIDTH = 200; > -+ static final int HEIGHT = 200; > -+ > -+ static final int x0 = 50, y0 = 50; > -+ static final int x1 = 150, y1 = 50; > -+ static final int x2 = 100, y2 = 100; > -+ > -+ private static BufferedImage createTestImage() { > -+ final BufferedImage image = new BufferedImage(WIDTH, HEIGHT, > -+ BufferedImage.TYPE_INT_BGR); > -+ Graphics2D g = image.createGraphics(); > -+ > -+ g.setColor(Color.BLACK); > -+ g.fillRect(0, 0, WIDTH, HEIGHT); > -+ > -+ float wideStrokeWidth = 20.0f; > -+ BasicStroke wideStroke = new BasicStroke(wideStrokeWidth, > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth); > -+ float thinStrokeWidth = 3.0f; > -+ BasicStroke thinStroke = new BasicStroke(thinStrokeWidth, > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth); > -+ > -+ g.setColor(Color.WHITE); > -+ GeneralPath path = new GeneralPath(); > -+ path.moveTo(x0, y0); > -+ path.lineTo(x1, y1); > -+ path.lineTo(x2, y2); > -+ path.closePath(); > -+ path.closePath(); > -+ g.setStroke(thinStroke); > -+ g.draw(wideStroke.createStrokedShape(path)); > -+ > -+ return image; > -+ } > -+ > -+ public static void main(String[] args) { > -+ > -+ BufferedImage testImage = createTestImage(); > -+ > -+ int color = testImage.getRGB(x2,y2); > -+ System.out.println("Color seen: #" + Integer.toHexString(color)); > -+ if (color != Color.WHITE.getRGB()) { > -+ throw new RuntimeException( > -+ "Test Failed; expected to see a white vertex above the bottom of the triangle"); > -+ } > -+ > -+ } > -+} > diff -r 5c0be31545ff patches/stroker-finish.patch > --- a/patches/stroker-finish.patch Thu Feb 24 15:30:47 2011 -0500 > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > @@ -1,20 +0,0 @@ > ---- openjdk6/jdk/src/share/classes/sun/java2d/pisces/Stroker.java > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java > -@@ -695,7 +695,7 @@ > - long ldx = (long)(px0 - x0); > - long ldy = (long)(py0 - y0); > - long llen = lineLength(ldx, ldy); > -- long s = (long)lineWidth2*65536/llen; > -+ long s = (llen == 0) ? 0 : (long)lineWidth2*65536/llen; > - > - int capx = x0 - (int)(ldx*s >> 16); > - int capy = y0 - (int)(ldy*s >> 16); > -@@ -717,7 +717,7 @@ > - long ldx = (long)(sx1 - sx0); > - long ldy = (long)(sy1 - sy0); > - long llen = lineLength(ldx, ldy); > -- long s = (long)lineWidth2*65536/llen; > -+ long s = (llen == 0) ? 0 : (long)lineWidth2*65536/llen; > - > - int capx = sx0 - (int)(ldx*s >> 16); > - int capy = sy0 - (int)(ldy*s >> 16); -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 16:40:37 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:40:37 +0000 Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <644979765.612795.1298583735247.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <301067285.612468.1298582424772.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <644979765.612795.1298583735247.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110225004037.GV3448@rivendell.middle-earth.co.uk> On 16:42 Thu 24 Feb , Denis Lila wrote: > This is the final java2d backport I wanted to do, and > it is the reason for the 3 previous patches > > I'm testing it right now, and 30 minutes into the build > everything is fine (with the previous 3 patches applied > (in the order they were posted) to revision 6e7f2c1f25df > of head). I'll have to do a merge :-(. > Looks ok. > Regards, > Denis. > > ----- Original Message ----- > > And the attached file is the final part of the cleanup. > > It just removes 3 patches that were obsoleted by the > > previous changeset (if the previous changest is approved > > for pushing, that is). > > > > Ok to push? > > > > Thank you, > > Denis. > > > > ----- Original Message ----- > > > This: > > > http://icedtea.classpath.org/~dlila/cleanupPart2.patch > > > is the second part of the clean up. It removes > > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > > (which we stopped applying in the previous cleanupPart1.patch), > > > it adds the 3 replacement patches for it, it adds > > > piscesMakefile.patch to make the build work, and it reapplies > > > patches/openjdk/6766342-AA-simple-shape-performance.patch. > > > > > > It also stops applying 3 patches made obsolete by the 3 new > > > patches (but doesn't remove them (should it?). I've left this > > > for the next changeset). > > > > > > Ok to push (contingent on cleanupPart1.patch being ok)? > > > > > > Thank you, > > > Denis. > > > > > > ----- Original Message ----- > > > > > The IcedTea version: > > > > > > > > > > 2008-10-27 Mark Wielaard > > > > > > > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > > > > > > > predates the OpenJDK one: > > > > > > > > > > changeset: 1878:ccc36189f2a7 > > > > > user: rkennke > > > > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > > > > > > > by just under a year. Roman may even have been using the IcedTea > > > > > patch > > > > > and not bothered > > > > > to report to us. > > > > > > > > > > Anyway, good to be replaced in a separate changeset. > > > > > > > > The attached patch does the replacement of > > > > patches/renderer-crossings.patch. I do this first because it came > > > > before any of the other things, and the other patches won't apply > > > > without it. > > > > > > > > Unfortunately, it also has to stop applying > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > > > patches/openjdk/6766342-AA-simple-shape-performance.patch > > > > If we don't stop applying the first of those, the patching will > > > > fail. It's not a good idea to apply the second because it changes > > > > a file that is also changed by > > > > 6967436-6976265-6967434-pisces.patch. > > > > So until the replacement for 6967436-6976265-6967434-pisces.patch > > > > is > > > > in, we shouldn't apply it. > > > > > > > > Ok to push? > > > > > > > > The next changeset after this will introduce the three > > > > replacements > > > > of > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > > > > > > > Thank you. > > > > > > > > ----- Original Message ----- > > > > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > > > > Hi. > > > > > > > > > > > > I want to push this patch: > > > > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > > > > attaching it, > > > > > > but it was too big and I cancelled the message. > > > > > > > > > > > > > > > > Ok let's split this up and do them in individual changesets with > > > > > individual > > > > > ChangeLogs. It's much easier to track things that way if we're > > > > > not > > > > > mixing > > > > > up orthogonal things. > > > > > > > > > > > The changes are: > > > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was > > > > > > replaced > > > > > > by > > > > > > 6967436-6967433-floating-pt-conversion.patch, > > > > > > 6967434-bad-round-joins.patch, > > > > > > and 6976265-stroke-control.patch. Each of the separate patches > > > > > > is > > > > > > its own > > > > > > changeset in openjdk7, so it was my mistake to begin with to > > > > > > lump > > > > > > them > > > > > > all into one backport. Splitting it up into the 3 patches > > > > > > fixes > > > > > > it. > > > > > > Also > > > > > > each of the three patches is an unmodified "hg export" of its > > > > > > openjdk7 > > > > > > revision. What we had in 6967436-6976265-6967434-pisces.patch > > > > > > wasn't, > > > > > > because I had to remove some of the @Override annotations so > > > > > > that > > > > > > the > > > > > > build wouldn't fail. The proper way to get around this is by > > > > > > changing > > > > > > the source and target options to ecj, which is what > > > > > > patches/piscesMakefile.patch does. > > > > > > > > > > > > > > > > Ok so this is one patch: the three patch split + the > > > > > piscesMakefile > > > > > to > > > > > make > > > > > it work. > > > > > > > > > > > I replaced patches/renderer-crossing.patch with > > > > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > > > > if (crossingIndices != null && crossingIndices.length > > > > > > > DEFAULT_INDICES_SIZE) { > > > > > > while the latter adds > > > > > > if (crossingIndices != null && > > > > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > > > > { > > > > > > so they do exactly the same thing, but the layout is > > > > > > different. > > > > > > What > > > > > > I think > > > > > > happened is that patches/renderer-crossing.patch was added to > > > > > > icedtea before > > > > > > openjdk7, and when it went into openjdk7 the newlines were > > > > > > changed. > > > > > > So now > > > > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > > > > > > > > > > > > > > > > The other changes are just removing obsolete patches, and > > > > > > they're > > > > > > described > > > > > > in the ChangeLog. > > > > > > > > > > > > > > > > Again, separate changeset. > > > > > > > > > > > Thank you, > > > > > > Denis. > > > > > > > > > > -- > > > > > Andrew :) > > > > > > > > > > Free Java Software Engineer > > > > > Red Hat, Inc. (http://www.redhat.com) > > > > > > > > > > Support Free Java! > > > > > Contribute to GNU Classpath and IcedTea > > > > > http://www.gnu.org/software/classpath > > > > > http://icedtea.classpath.org > > > > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > > > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 > diff -r 3179d5bf9efe ChangeLog > --- a/ChangeLog Thu Feb 24 16:15:58 2011 -0500 > +++ b/ChangeLog Thu Feb 24 16:33:33 2011 -0500 > @@ -1,3 +1,12 @@ > +2011-02-24 Denis Lila > + > + * Makefile.am: > + Added patch. > + * NEWS: > + Added backport entry. > + * patches/openjdk/7016856-pisces-performance.patch: > + Backport. > + > 2011-02-24 Denis Lila > > * patches/java2d-stroker-internal-close-joint.patch: > diff -r 3179d5bf9efe Makefile.am > --- a/Makefile.am Thu Feb 24 16:15:58 2011 -0500 > +++ b/Makefile.am Thu Feb 24 16:33:33 2011 -0500 > @@ -325,7 +325,8 @@ > patches/openjdk/6967436-6967433-floating-pt-conversion.patch \ > patches/openjdk/6976265-stroke-control.patch \ > patches/openjdk/6967434-bad-round-joins.patch \ > - patches/openjdk/6766342-AA-simple-shape-performance.patch > + patches/openjdk/6766342-AA-simple-shape-performance.patch \ > + patches/openjdk/7016856-pisces-performance.patch > > if !WITH_ALT_HSBUILD > ICEDTEA_PATCHES += \ > diff -r 3179d5bf9efe NEWS > --- a/NEWS Thu Feb 24 16:15:58 2011 -0500 > +++ b/NEWS Thu Feb 24 16:33:33 2011 -0500 > @@ -433,6 +433,7 @@ > - S6444769: java/awt/Insets/WindowWithWarningTest/WindowWithWarningTest.html fails > - S6775317: Improve performance of non-AA transformed rectangles and single wide lines in software pipelines > - S6766342: Improve performance of Ductus rasterizer > + - S7016856: fix dashing performance regression. Improve other rendering performance. > * Bug fixes > - RH661505: JPEGs with sRGB IEC61966-2.1 color profiles have wrong colors > - PR600: HS19 upgrade broke CACAO build on ARM > diff -r 3179d5bf9efe patches/openjdk/7016856-pisces-performance.patch > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/patches/openjdk/7016856-pisces-performance.patch Thu Feb 24 16:33:33 2011 -0500 > @@ -0,0 +1,2116 @@ > +# HG changeset patch > +# User dlila > +# Date 1297174969 18000 > +# Node ID 5e624003e6225ec1ee92536bc356cba90043826c > +# Parent 21621a756b32028fde37935cd91330a8e194f96b > +7016856: dashing performance was reduced during latest changes to the OpenJDK rasterizer > +Summary: Optimized dashing, rasterizing, and the flow of transformed coordinates > +Reviewed-by: flar > + > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/Curve.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Curve.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Curve.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -27,7 +27,7 @@ > + > + import java.util.Iterator; > + > +-class Curve { > ++final class Curve { > + > + float ax, ay, bx, by, cx, cy, dx, dy; > + float dax, day, dbx, dby; > +@@ -101,14 +101,6 @@ > + return t * (t * day + dby) + cy; > + } > + > +- private float ddxat(float t) { > +- return 2 * dax * t + dbx; > +- } > +- > +- private float ddyat(float t) { > +- return 2 * day * t + dby; > +- } > +- > + int dxRoots(float[] roots, int off) { > + return Helpers.quadraticRoots(dax, dbx, cx, roots, off); > + } > +@@ -131,17 +123,17 @@ > + // finds points where the first and second derivative are > + // perpendicular. This happens when g(t) = f'(t)*f''(t) == 0 (where > + // * is a dot product). Unfortunately, we have to solve a cubic. > +- private int perpendiculardfddf(float[] pts, int off, final float err) { > ++ private int perpendiculardfddf(float[] pts, int off) { > + assert pts.length >= off + 4; > + > +- // these are the coefficients of g(t): > ++ // these are the coefficients of some multiple of g(t) (not g(t), > ++ // because the roots of a polynomial are not changed after multiplication > ++ // by a constant, and this way we save a few multiplications). > + final float a = 2*(dax*dax + day*day); > + final float b = 3*(dax*dbx + day*dby); > + final float c = 2*(dax*cx + day*cy) + dbx*dbx + dby*dby; > + final float d = dbx*cx + dby*cy; > +- // TODO: We might want to divide the polynomial by a to make the > +- // coefficients smaller. This won't change the roots. > +- return Helpers.cubicRootsInAB(a, b, c, d, pts, off, err, 0f, 1f); > ++ return Helpers.cubicRootsInAB(a, b, c, d, pts, off, 0f, 1f); > + } > + > + // Tries to find the roots of the function ROC(t)-w in [0, 1). It uses > +@@ -161,7 +153,7 @@ > + // no OOB exception, because by now off<=6, and roots.length >= 10 > + assert off <= 6 && roots.length >= 10; > + int ret = off; > +- int numPerpdfddf = perpendiculardfddf(roots, off, err); > ++ int numPerpdfddf = perpendiculardfddf(roots, off); > + float t0 = 0, ft0 = ROCsq(t0) - w*w; > + roots[off + numPerpdfddf] = 1f; // always check interval end points > + numPerpdfddf++; > +@@ -189,8 +181,9 @@ > + // A slight modification of the false position algorithm on wikipedia. > + // This only works for the ROCsq-x functions. It might be nice to have > + // the function as an argument, but that would be awkward in java6. > +- // It is something to consider for java7, depending on how closures > +- // and function objects turn out. Same goes for the newton's method > ++ // TODO: It is something to consider for java8 (or whenever lambda > ++ // expressions make it into the language), depending on how closures > ++ // and turn out. Same goes for the newton's method > + // algorithm in Helpers.java > + private float falsePositionROCsqMinusX(float x0, float x1, > + final float x, final float err) > +@@ -203,7 +196,7 @@ > + for (int i = 0; i < iterLimit && Math.abs(t - s) > err * Math.abs(t + s); i++) { > + r = (fs * t - ft * s) / (fs - ft); > + fr = ROCsq(r) - x; > +- if (fr * ft > 0) {// have the same sign > ++ if (sameSign(fr, ft)) { > + ft = fr; t = r; > + if (side < 0) { > + fs /= (1 << (-side)); > +@@ -226,55 +219,65 @@ > + return r; > + } > + > ++ private static boolean sameSign(double x, double y) { > ++ // another way is to test if x*y > 0. This is bad for small x, y. > ++ return (x < 0 && y < 0) || (x > 0 && y > 0); > ++ } > ++ > + // returns the radius of curvature squared at t of this curve > + // see http://en.wikipedia.org/wiki/Radius_of_curvature_(applications) > + private float ROCsq(final float t) { > +- final float dx = dxat(t); > +- final float dy = dyat(t); > +- final float ddx = ddxat(t); > +- final float ddy = ddyat(t); > ++ // dx=xat(t) and dy=yat(t). These calls have been inlined for efficiency > ++ final float dx = t * (t * dax + dbx) + cx; > ++ final float dy = t * (t * day + dby) + cy; > ++ final float ddx = 2 * dax * t + dbx; > ++ final float ddy = 2 * day * t + dby; > + final float dx2dy2 = dx*dx + dy*dy; > + final float ddx2ddy2 = ddx*ddx + ddy*ddy; > + final float ddxdxddydy = ddx*dx + ddy*dy; > +- float ret = ((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy))*dx2dy2; > +- return ret; > ++ return dx2dy2*((dx2dy2*dx2dy2) / (dx2dy2 * ddx2ddy2 - ddxdxddydy*ddxdxddydy)); > + } > + > +- // curve to be broken should be in pts[0] > +- // this will change the contents of both pts and Ts > ++ // curve to be broken should be in pts > ++ // this will change the contents of pts but not Ts > + // TODO: There's no reason for Ts to be an array. All we need is a sequence > + // of t values at which to subdivide. An array statisfies this condition, > + // but is unnecessarily restrictive. Ts should be an Iterator instead. > + // Doing this will also make dashing easier, since we could easily make > + // LengthIterator an Iterator and feed it to this function to simplify > + // the loop in Dasher.somethingTo. > +- static Iterator breakPtsAtTs(final float[][] pts, final int type, > ++ static Iterator breakPtsAtTs(final float[] pts, final int type, > + final float[] Ts, final int numTs) > + { > +- assert pts.length >= 2 && pts[0].length >= 8 && numTs <= Ts.length; > +- return new Iterator() { > +- int nextIdx = 0; > ++ assert pts.length >= 2*type && numTs <= Ts.length; > ++ return new Iterator() { > ++ // these prevent object creation and destruction during autoboxing. > ++ // Because of this, the compiler should be able to completely > ++ // eliminate the boxing costs. > ++ final Integer i0 = 0; > ++ final Integer itype = type; > + int nextCurveIdx = 0; > ++ Integer curCurveOff = i0; > + float prevT = 0; > + > + @Override public boolean hasNext() { > + return nextCurveIdx < numTs + 1; > + } > + > +- @Override public float[] next() { > +- float[] ret; > ++ @Override public Integer next() { > ++ Integer ret; > + if (nextCurveIdx < numTs) { > + float curT = Ts[nextCurveIdx]; > + float splitT = (curT - prevT) / (1 - prevT); > + Helpers.subdivideAt(splitT, > +- pts[nextIdx], 0, > +- pts[nextIdx], 0, > +- pts[1-nextIdx], 0, type); > +- updateTs(Ts, Ts[nextCurveIdx], nextCurveIdx + 1, numTs - nextCurveIdx - 1); > +- ret = pts[nextIdx]; > +- nextIdx = 1 - nextIdx; > ++ pts, curCurveOff, > ++ pts, 0, > ++ pts, type, type); > ++ prevT = curT; > ++ ret = i0; > ++ curCurveOff = itype; > + } else { > +- ret = pts[nextIdx]; > ++ ret = curCurveOff; > + } > + nextCurveIdx++; > + return ret; > +@@ -283,12 +286,5 @@ > + @Override public void remove() {} > + }; > + } > +- > +- // precondition: ts[off]...ts[off+len-1] must all be greater than t. > +- private static void updateTs(float[] ts, final float t, final int off, final int len) { > +- for (int i = off; i < off + len; i++) { > +- ts[i] = (ts[i] - t) / (1 - t); > +- } > +- } > + } > + > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/Dasher.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Dasher.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Dasher.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -38,7 +38,7 @@ > + * semantics are unclear. > + * > + */ > +-public class Dasher implements sun.awt.geom.PathConsumer2D { > ++final class Dasher implements sun.awt.geom.PathConsumer2D { > + > + private final PathConsumer2D out; > + private final float[] dash; > +@@ -169,7 +169,7 @@ > + float dx = x1 - x0; > + float dy = y1 - y0; > + > +- float len = (float) Math.hypot(dx, dy); > ++ float len = (float) Math.sqrt(dx*dx + dy*dy); > + > + if (len == 0) { > + return; > +@@ -226,7 +226,7 @@ > + return; > + } > + if (li == null) { > +- li = new LengthIterator(4, 0.0001f); > ++ li = new LengthIterator(4, 0.01f); > + } > + li.initializeIterationOnCurve(curCurvepts, type); > + > +@@ -237,9 +237,9 @@ > + while ((t = li.next(leftInThisDashSegment)) < 1) { > + if (t != 0) { > + Helpers.subdivideAt((t - lastSplitT) / (1 - lastSplitT), > +- curCurvepts, curCurveoff, > +- curCurvepts, 0, > +- curCurvepts, type, type); > ++ curCurvepts, curCurveoff, > ++ curCurvepts, 0, > ++ curCurvepts, type, type); > + lastSplitT = t; > + goTo(curCurvepts, 2, type); > + curCurveoff = type; > +@@ -307,6 +307,11 @@ > + private int recLevel; > + private boolean done; > + > ++ // the lengths of the lines of the control polygon. Only its first > ++ // curveType/2 - 1 elements are valid. This is an optimization. See > ++ // next(float) for more detail. > ++ private float[] curLeafCtrlPolyLengths = new float[3]; > ++ > + public LengthIterator(int reclimit, float err) { > + this.limit = reclimit; > + this.minTincrement = 1f / (1 << limit); > +@@ -344,11 +349,52 @@ > + this.lastSegLen = 0; > + } > + > ++ // 0 == false, 1 == true, -1 == invalid cached value. > ++ private int cachedHaveLowAcceleration = -1; > ++ > ++ private boolean haveLowAcceleration(float err) { > ++ if (cachedHaveLowAcceleration == -1) { > ++ final float len1 = curLeafCtrlPolyLengths[0]; > ++ final float len2 = curLeafCtrlPolyLengths[1]; > ++ // the test below is equivalent to !within(len1/len2, 1, err). > ++ // It is using a multiplication instead of a division, so it > ++ // should be a bit faster. > ++ if (!Helpers.within(len1, len2, err*len2)) { > ++ cachedHaveLowAcceleration = 0; > ++ return false; > ++ } > ++ if (curveType == 8) { > ++ final float len3 = curLeafCtrlPolyLengths[2]; > ++ // if len1 is close to 2 and 2 is close to 3, that probably > ++ // means 1 is close to 3 so the second part of this test might > ++ // not be needed, but it doesn't hurt to include it. > ++ if (!(Helpers.within(len2, len3, err*len3) && > ++ Helpers.within(len1, len3, err*len3))) { > ++ cachedHaveLowAcceleration = 0; > ++ return false; > ++ } > ++ } > ++ cachedHaveLowAcceleration = 1; > ++ return true; > ++ } > ++ > ++ return (cachedHaveLowAcceleration == 1); > ++ } > ++ > ++ // we want to avoid allocations/gc so we keep this array so we > ++ // can put roots in it, > ++ private float[] nextRoots = new float[4]; > ++ > ++ // caches the coefficients of the current leaf in its flattened > ++ // form (see inside next() for what that means). The cache is > ++ // invalid when it's third element is negative, since in any > ++ // valid flattened curve, this would be >= 0. > ++ private float[] flatLeafCoefCache = new float[] {0, 0, -1, 0}; > + // returns the t value where the remaining curve should be split in > + // order for the left subdivided curve to have length len. If len > + // is >= than the length of the uniterated curve, it returns 1. > +- public float next(float len) { > +- float targetLength = lenAtLastSplit + len; > ++ public float next(final float len) { > ++ final float targetLength = lenAtLastSplit + len; > + while(lenAtNextT < targetLength) { > + if (done) { > + lastSegLen = lenAtNextT - lenAtLastSplit; > +@@ -357,8 +403,46 @@ > + goToNextLeaf(); > + } > + lenAtLastSplit = targetLength; > +- float t = binSearchForLen(lenAtLastSplit - lenAtLastT, > +- recCurveStack[recLevel], curveType, lenAtNextT - lenAtLastT, ERR); > ++ final float leaflen = lenAtNextT - lenAtLastT; > ++ float t = (targetLength - lenAtLastT) / leaflen; > ++ > ++ // cubicRootsInAB is a fairly expensive call, so we just don't do it > ++ // if the acceleration in this section of the curve is small enough. > ++ if (!haveLowAcceleration(0.05f)) { > ++ // We flatten the current leaf along the x axis, so that we're > ++ // left with a, b, c which define a 1D Bezier curve. We then > ++ // solve this to get the parameter of the original leaf that > ++ // gives us the desired length. > ++ > ++ if (flatLeafCoefCache[2] < 0) { > ++ float x = 0+curLeafCtrlPolyLengths[0], > ++ y = x+curLeafCtrlPolyLengths[1]; > ++ if (curveType == 8) { > ++ float z = y + curLeafCtrlPolyLengths[2]; > ++ flatLeafCoefCache[0] = 3*(x - y) + z; > ++ flatLeafCoefCache[1] = 3*(y - 2*x); > ++ flatLeafCoefCache[2] = 3*x; > ++ flatLeafCoefCache[3] = -z; > ++ } else if (curveType == 6) { > ++ flatLeafCoefCache[0] = 0f; > ++ flatLeafCoefCache[1] = y - 2*x; > ++ flatLeafCoefCache[2] = 2*x; > ++ flatLeafCoefCache[3] = -y; > ++ } > ++ } > ++ float a = flatLeafCoefCache[0]; > ++ float b = flatLeafCoefCache[1]; > ++ float c = flatLeafCoefCache[2]; > ++ float d = t*flatLeafCoefCache[3]; > ++ > ++ // we use cubicRootsInAB here, because we want only roots in 0, 1, > ++ // and our quadratic root finder doesn't filter, so it's just a > ++ // matter of convenience. > ++ int n = Helpers.cubicRootsInAB(a, b, c, d, nextRoots, 0, 0, 1); > ++ if (n == 1 && !Float.isNaN(nextRoots[0])) { > ++ t = nextRoots[0]; > ++ } > ++ } > + // t is relative to the current leaf, so we must make it a valid parameter > + // of the original curve. > + t = t * (nextT - lastT) + lastT; > +@@ -379,36 +463,6 @@ > + return lastSegLen; > + } > + > +- // Returns t such that if leaf is subdivided at t the left > +- // curve will have length len. leafLen must be the length of leaf. > +- private static Curve bsc = new Curve(); > +- private static float binSearchForLen(float len, float[] leaf, int type, > +- float leafLen, float err) > +- { > +- assert len <= leafLen; > +- bsc.set(leaf, type); > +- float errBound = err*len; > +- float left = 0, right = 1; > +- while (left < right) { > +- float m = (left + right) / 2; > +- if (m == left || m == right) { > +- return m; > +- } > +- float x = bsc.xat(m); > +- float y = bsc.yat(m); > +- float leftLen = Helpers.linelen(leaf[0], leaf[1], x, y); > +- if (Math.abs(leftLen - len) < errBound) { > +- return m; > +- } > +- if (leftLen < len) { > +- left = m; > +- } else { > +- right = m; > +- } > +- } > +- return left; > +- } > +- > + // go to the next leaf (in an inorder traversal) in the recursion tree > + // preconditions: must be on a leaf, and that leaf must not be the root. > + private void goToNextLeaf() { > +@@ -437,6 +491,9 @@ > + lenAtLastT = lenAtNextT; > + nextT += (1 << (limit - recLevel)) * minTincrement; > + lenAtNextT += len; > ++ // invalidate caches > ++ flatLeafCoefCache[2] = -1; > ++ cachedHaveLowAcceleration = -1; > + } else { > + Helpers.subdivide(recCurveStack[recLevel], 0, > + recCurveStack[recLevel+1], 0, > +@@ -450,11 +507,24 @@ > + // this is a bit of a hack. It returns -1 if we're not on a leaf, and > + // the length of the leaf if we are on a leaf. > + private float onLeaf() { > +- float polylen = Helpers.polyLineLength(recCurveStack[recLevel], 0, curveType); > +- float linelen = Helpers.linelen(recCurveStack[recLevel][0], recCurveStack[recLevel][1], > +- recCurveStack[recLevel][curveType - 2], recCurveStack[recLevel][curveType - 1]); > +- return (polylen - linelen < ERR || recLevel == limit) ? > +- (polylen + linelen)/2 : -1; > ++ float[] curve = recCurveStack[recLevel]; > ++ float polyLen = 0; > ++ > ++ float x0 = curve[0], y0 = curve[1]; > ++ for (int i = 2; i < curveType; i += 2) { > ++ final float x1 = curve[i], y1 = curve[i+1]; > ++ final float len = Helpers.linelen(x0, y0, x1, y1); > ++ polyLen += len; > ++ curLeafCtrlPolyLengths[i/2 - 1] = len; > ++ x0 = x1; > ++ y0 = y1; > ++ } > ++ > ++ final float lineLen = Helpers.linelen(curve[0], curve[1], curve[curveType-2], curve[curveType-1]); > ++ if (polyLen - lineLen < ERR || recLevel == limit) { > ++ return (polyLen + lineLen)/2; > ++ } > ++ return -1; > + } > + } > + > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/Helpers.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Helpers.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Helpers.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -26,6 +26,12 @@ > + package sun.java2d.pisces; > + > + import java.util.Arrays; > ++import static java.lang.Math.PI; > ++import static java.lang.Math.cos; > ++import static java.lang.Math.sqrt; > ++import static java.lang.Math.cbrt; > ++import static java.lang.Math.acos; > ++ > + > + final class Helpers { > + private Helpers() { > +@@ -75,100 +81,74 @@ > + return ret - off; > + } > + > +- // find the roots of g(t) = a*t^3 + b*t^2 + c*t + d in [A,B) > +- // We will not use Cardano's method, since it is complicated and > +- // involves too many square and cubic roots. We will use Newton's method. > +- // TODO: this should probably return ALL roots. Then the user can do > +- // his own filtering of roots outside [A,B). > +- static int cubicRootsInAB(final float a, final float b, > +- final float c, final float d, > +- float[] pts, final int off, final float E, > ++ // find the roots of g(t) = d*t^3 + a*t^2 + b*t + c in [A,B) > ++ static int cubicRootsInAB(float d, float a, float b, float c, > ++ float[] pts, final int off, > + final float A, final float B) > + { > +- if (a == 0) { > +- return quadraticRoots(b, c, d, pts, off); > ++ if (d == 0) { > ++ int num = quadraticRoots(a, b, c, pts, off); > ++ return filterOutNotInAB(pts, off, num, A, B) - off; > + } > +- // the coefficients of g'(t). no dc variable because dc=c > +- // we use these to get the critical points of g(t), which > +- // we then use to chose starting points for Newton's method. These > +- // should be very close to the actual roots. > +- final float da = 3 * a; > +- final float db = 2 * b; > +- int numCritPts = quadraticRoots(da, db, c, pts, off+1); > +- numCritPts = filterOutNotInAB(pts, off+1, numCritPts, A, B) - off - 1; > +- // need them sorted. > +- if (numCritPts == 2 && pts[off+1] > pts[off+2]) { > +- float tmp = pts[off+1]; > +- pts[off+1] = pts[off+2]; > +- pts[off+2] = tmp; > ++ // From Graphics Gems: > ++ // http://tog.acm.org/resources/GraphicsGems/gems/Roots3And4.c > ++ // (also from awt.geom.CubicCurve2D. But here we don't need as > ++ // much accuracy and we don't want to create arrays so we use > ++ // our own customized version). > ++ > ++ /* normal form: x^3 + ax^2 + bx + c = 0 */ > ++ a /= d; > ++ b /= d; > ++ c /= d; > ++ > ++ // substitute x = y - A/3 to eliminate quadratic term: > ++ // x^3 +Px + Q = 0 > ++ // > ++ // Since we actually need P/3 and Q/2 for all of the > ++ // calculations that follow, we will calculate > ++ // p = P/3 > ++ // q = Q/2 > ++ // instead and use those values for simplicity of the code. > ++ double sq_A = a * a; > ++ double p = 1.0/3 * (-1.0/3 * sq_A + b); > ++ double q = 1.0/2 * (2.0/27 * a * sq_A - 1.0/3 * a * b + c); > ++ > ++ /* use Cardano's formula */ > ++ > ++ double cb_p = p * p * p; > ++ double D = q * q + cb_p; > ++ > ++ int num; > ++ if (D < 0) { > ++ // see: http://en.wikipedia.org/wiki/Cubic_function#Trigonometric_.28and_hyperbolic.29_method > ++ final double phi = 1.0/3 * acos(-q / sqrt(-cb_p)); > ++ final double t = 2 * sqrt(-p); > ++ > ++ pts[ off+0 ] = (float)( t * cos(phi)); > ++ pts[ off+1 ] = (float)(-t * cos(phi + PI / 3)); > ++ pts[ off+2 ] = (float)(-t * cos(phi - PI / 3)); > ++ num = 3; > ++ } else { > ++ final double sqrt_D = sqrt(D); > ++ final double u = cbrt(sqrt_D - q); > ++ final double v = - cbrt(sqrt_D + q); > ++ > ++ pts[ off ] = (float)(u + v); > ++ num = 1; > ++ > ++ if (within(D, 0, 1e-8)) { > ++ pts[off+1] = -(pts[off] / 2); > ++ num = 2; > ++ } > + } > + > +- int ret = off; > ++ final float sub = 1.0f/3 * a; > + > +- // we don't actually care much about the extrema themselves. We > +- // only use them to ensure that g(t) is monotonic in each > +- // interval [pts[i],pts[i+1] (for i in off...off+numCritPts+1). > +- // This will allow us to determine intervals containing exactly > +- // one root. > +- // The end points of the interval are always local extrema. > +- pts[off] = A; > +- pts[off + numCritPts + 1] = B; > +- numCritPts += 2; > ++ for (int i = 0; i < num; ++i) { > ++ pts[ off+i ] -= sub; > ++ } > + > +- float x0 = pts[off], fx0 = evalCubic(a, b, c, d, x0); > +- for (int i = off; i < off + numCritPts - 1; i++) { > +- float x1 = pts[i+1], fx1 = evalCubic(a, b, c, d, x1); > +- if (fx0 == 0f) { > +- pts[ret++] = x0; > +- } else if (fx1 * fx0 < 0f) { // have opposite signs > +- pts[ret++] = CubicNewton(a, b, c, d, > +- x0 + fx0 * (x1 - x0) / (fx0 - fx1), E); > +- } > +- x0 = x1; > +- fx0 = fx1; > +- } > +- return ret - off; > +- } > +- > +- // precondition: the polynomial to be evaluated must not be 0 at x0. > +- static float CubicNewton(final float a, final float b, > +- final float c, final float d, > +- float x0, final float err) > +- { > +- // considering how this function is used, 10 should be more than enough > +- final int itlimit = 10; > +- float fx0 = evalCubic(a, b, c, d, x0); > +- float x1; > +- int count = 0; > +- while(true) { > +- x1 = x0 - (fx0 / evalCubic(0, 3 * a, 2 * b, c, x0)); > +- if (Math.abs(x1 - x0) < err * Math.abs(x1 + x0) || count == itlimit) { > +- break; > +- } > +- x0 = x1; > +- fx0 = evalCubic(a, b, c, d, x0); > +- count++; > +- } > +- return x1; > +- } > +- > +- // fills the input array with numbers 0, INC, 2*INC, ... > +- static void fillWithIdxes(final float[] data, final int[] idxes) { > +- if (idxes.length > 0) { > +- idxes[0] = 0; > +- for (int i = 1; i < idxes.length; i++) { > +- idxes[i] = idxes[i-1] + (int)data[idxes[i-1]]; > +- } > +- } > +- } > +- > +- static void fillWithIdxes(final int[] idxes, final int inc) { > +- if (idxes.length > 0) { > +- idxes[0] = 0; > +- for (int i = 1; i < idxes.length; i++) { > +- idxes[i] = idxes[i-1] + inc; > +- } > +- } > ++ return filterOutNotInAB(pts, off, num, A, B) - off; > + } > + > + // These use a hardcoded factor of 2 for increasing sizes. Perhaps this > +@@ -182,6 +162,7 @@ > + } > + return Arrays.copyOf(in, 2 * (cursize + numToAdd)); > + } > ++ > + static int[] widenArray(int[] in, final int cursize, final int numToAdd) { > + if (in.length >= cursize + numToAdd) { > + return in; > +@@ -208,7 +189,7 @@ > + { > + int ret = off; > + for (int i = off; i < off + len; i++) { > +- if (nums[i] > a && nums[i] < b) { > ++ if (nums[i] >= a && nums[i] < b) { > + nums[ret++] = nums[i]; > + } > + } > +@@ -225,7 +206,9 @@ > + } > + > + static float linelen(float x1, float y1, float x2, float y2) { > +- return (float)Math.hypot(x2 - x1, y2 - y1); > ++ final float dx = x2 - x1; > ++ final float dy = y2 - y1; > ++ return (float)Math.sqrt(dx*dx + dy*dy); > + } > + > + static void subdivide(float[] src, int srcoff, float[] left, int leftoff, > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/PiscesCache.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesCache.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -32,7 +32,7 @@ > + * > + * @see PiscesRenderer#render > + */ > +-public final class PiscesCache { > ++final class PiscesCache { > + > + final int bboxX0, bboxY0, bboxX1, bboxY1; > + > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesRenderingEngine.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -27,7 +27,6 @@ > + > + import java.awt.Shape; > + import java.awt.BasicStroke; > +-import java.awt.geom.NoninvertibleTransformException; > + import java.awt.geom.Path2D; > + import java.awt.geom.AffineTransform; > + import java.awt.geom.PathIterator; > +@@ -250,7 +249,7 @@ > + float dashphase, > + PathConsumer2D pc2d) > + { > +- // We use inat and outat so that in Stroker and Dasher we can work only > ++ // We use strokerat and outat so that in Stroker and Dasher we can work only > + // with the pre-transformation coordinates. This will repeat a lot of > + // computations done in the path iterator, but the alternative is to > + // work with transformed paths and compute untransformed coordinates > +@@ -265,7 +264,7 @@ > + // transformation after the path processing has been done. > + // We can't do this if normalization is on, because it isn't a good > + // idea to normalize before the transformation is applied. > +- AffineTransform inat = null; > ++ AffineTransform strokerat = null; > + AffineTransform outat = null; > + > + PathIterator pi = null; > +@@ -284,9 +283,9 @@ > + // again so, nothing can be drawn. > + > + // Every path needs an initial moveTo and a pathDone. If these > +- // aren't there this causes a SIGSEV in libawt.so (at the time > ++ // are not there this causes a SIGSEGV in libawt.so (at the time > + // of writing of this comment (September 16, 2010)). Actually, > +- // I'm not sure if the moveTo is necessary to avoid the SIGSEV > ++ // I am not sure if the moveTo is necessary to avoid the SIGSEGV > + // but the pathDone is definitely needed. > + pc2d.moveTo(0, 0); > + pc2d.pathDone(); > +@@ -313,25 +312,32 @@ > + if (normalize != NormMode.OFF) { > + pi = new NormalizingPathIterator(pi, normalize); > + } > +- // leave inat and outat null. > ++ // by now strokerat == null && outat == null. Input paths to > ++ // stroker (and maybe dasher) will have the full transform at > ++ // applied to them and nothing will happen to the output paths. > + } else { > +- // We only need the inverse if normalization is on. Otherwise > +- // we just don't transform the input paths, do all the stroking > +- // and then transform out output (instead of making PathIterator > +- // apply the transformation, us applying the inverse, and then > +- // us applying the transform again to our output). > +- outat = at; > + if (normalize != NormMode.OFF) { > +- try { > +- inat = outat.createInverse(); > +- } catch (NoninvertibleTransformException e) { > +- // we made sure this can't happen > +- e.printStackTrace(); > +- } > ++ strokerat = at; > + pi = src.getPathIterator(at); > + pi = new NormalizingPathIterator(pi, normalize); > ++ // by now strokerat == at && outat == null. Input paths to > ++ // stroker (and maybe dasher) will have the full transform at > ++ // applied to them, then they will be normalized, and then > ++ // the inverse of *only the non translation part of at* will > ++ // be applied to the normalized paths. This won't cause problems > ++ // in stroker, because, suppose at = T*A, where T is just the > ++ // translation part of at, and A is the rest. T*A has already > ++ // been applied to Stroker/Dasher's input. Then Ainv will be > ++ // applied. Ainv*T*A is not equal to T, but it is a translation, > ++ // which means that none of stroker's assumptions about its > ++ // input will be violated. After all this, A will be applied > ++ // to stroker's output. > + } else { > ++ outat = at; > + pi = src.getPathIterator(null); > ++ // outat == at && strokerat == null. This is because if no > ++ // normalization is done, we can just apply all our > ++ // transformations to stroker's output. > + } > + } > + } else { > +@@ -343,13 +349,17 @@ > + } > + } > + > ++ // by now, at least one of outat and strokerat will be null. Unless at is not > ++ // a constant multiple of an orthogonal transformation, they will both be > ++ // null. In other cases, outat == at if normalization is off, and if > ++ // normalization is on, strokerat == at. > + pc2d = TransformingPathConsumer2D.transformConsumer(pc2d, outat); > ++ pc2d = TransformingPathConsumer2D.deltaTransformConsumer(pc2d, strokerat); > + pc2d = new Stroker(pc2d, width, caps, join, miterlimit); > + if (dashes != null) { > + pc2d = new Dasher(pc2d, dashes, dashphase); > + } > +- pc2d = TransformingPathConsumer2D.transformConsumer(pc2d, inat); > +- > ++ pc2d = TransformingPathConsumer2D.inverseDeltaTransformConsumer(pc2d, strokerat); > + pathTo(pi, pc2d); > + } > + > +@@ -588,9 +598,9 @@ > + } > + > + Renderer r = new Renderer(3, 3, > +- clip.getLoX(), clip.getLoY(), > +- clip.getWidth(), clip.getHeight(), > +- PathIterator.WIND_EVEN_ODD); > ++ clip.getLoX(), clip.getLoY(), > ++ clip.getWidth(), clip.getHeight(), > ++ PathIterator.WIND_EVEN_ODD); > + > + r.moveTo((float) x, (float) y); > + r.lineTo((float) (x+dx1), (float) (y+dy1)); > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/PiscesTileGenerator.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -30,7 +30,7 @@ > + > + import sun.java2d.pipe.AATileGenerator; > + > +-public final class PiscesTileGenerator implements AATileGenerator { > ++final class PiscesTileGenerator implements AATileGenerator { > + public static final int TILE_SIZE = PiscesCache.TILE_SIZE; > + > + // perhaps we should be using weak references here, but right now > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/Renderer.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Renderer.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Renderer.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -25,12 +25,9 @@ > + > + package sun.java2d.pisces; > + > +-import java.util.Arrays; > +-import java.util.Iterator; > +- > + import sun.awt.geom.PathConsumer2D; > + > +-public class Renderer implements PathConsumer2D { > ++final class Renderer implements PathConsumer2D { > + > + private class ScanlineIterator { > + > +@@ -39,115 +36,81 @@ > + // crossing bounds. The bounds are not necessarily tight (the scan line > + // at minY, for example, might have no crossings). The x bounds will > + // be accumulated as crossings are computed. > +- private int minY, maxY; > ++ private final int maxY; > + private int nextY; > + > + // indices into the segment pointer lists. They indicate the "active" > + // sublist in the segment lists (the portion of the list that contains > + // all the segments that cross the next scan line). > +- private int elo, ehi; > +- private final int[] edgePtrs; > +- private int qlo, qhi; > +- private final int[] quadPtrs; > +- private int clo, chi; > +- private final int[] curvePtrs; > ++ private int edgeCount; > ++ private int[] edgePtrs; > + > + private static final int INIT_CROSSINGS_SIZE = 10; > + > + private ScanlineIterator() { > + crossings = new int[INIT_CROSSINGS_SIZE]; > +- > +- edgePtrs = new int[numEdges]; > +- Helpers.fillWithIdxes(edgePtrs, SIZEOF_EDGE); > +- qsort(edges, edgePtrs, YMIN, 0, numEdges - 1); > +- > +- quadPtrs = new int[numQuads]; > +- Helpers.fillWithIdxes(quadPtrs, SIZEOF_QUAD); > +- qsort(quads, quadPtrs, YMIN, 0, numQuads - 1); > +- > +- curvePtrs = new int[numCurves]; > +- Helpers.fillWithIdxes(curvePtrs, SIZEOF_CURVE); > +- qsort(curves, curvePtrs, YMIN, 0, numCurves - 1); > ++ edgePtrs = new int[INIT_CROSSINGS_SIZE]; > + > + // We don't care if we clip some of the line off with ceil, since > + // no scan line crossings will be eliminated (in fact, the ceil is > + // the y of the first scan line crossing). > +- nextY = minY = Math.max(boundsMinY, (int)Math.ceil(edgeMinY)); > +- maxY = Math.min(boundsMaxY, (int)Math.ceil(edgeMaxY)); > +- > +- for (elo = 0; elo < numEdges && edges[edgePtrs[elo]+YMAX] <= minY; elo++) > +- ; > +- // the active list is *edgePtrs[lo] (inclusive) *edgePtrs[hi] (exclusive) > +- for (ehi = elo; ehi < numEdges && edges[edgePtrs[ehi]+YMIN] <= minY; ehi++) > +- edgeSetCurY(edgePtrs[ehi], minY);// TODO: make minY a float to avoid casts > +- > +- for (qlo = 0; qlo < numQuads && quads[quadPtrs[qlo]+YMAX] <= minY; qlo++) > +- ; > +- for (qhi = qlo; qhi < numQuads && quads[quadPtrs[qhi]+YMIN] <= minY; qhi++) > +- quadSetCurY(quadPtrs[qhi], minY); > +- > +- for (clo = 0; clo < numCurves && curves[curvePtrs[clo]+YMAX] <= minY; clo++) > +- ; > +- for (chi = clo; chi < numCurves && curves[curvePtrs[chi]+YMIN] <= minY; chi++) > +- curveSetCurY(curvePtrs[chi], minY); > ++ final int minY = getFirstScanLineCrossing(); > ++ nextY = minY; > ++ maxY = getScanLineCrossingEnd()-1; > ++ edgeCount = 0; > + } > + > + private int next() { > +- // we go through the active lists and remove segments that don't cross > +- // the nextY scanline. > +- int crossingIdx = 0; > +- for (int i = elo; i < ehi; i++) { > +- if (edges[edgePtrs[i]+YMAX] <= nextY) { > +- edgePtrs[i] = edgePtrs[elo++]; > ++ int cury = nextY++; > ++ int bucket = cury - boundsMinY; > ++ int count = this.edgeCount; > ++ int ptrs[] = this.edgePtrs; > ++ int bucketcount = edgeBucketCounts[bucket]; > ++ if ((bucketcount & 0x1) != 0) { > ++ int newCount = 0; > ++ for (int i = 0; i < count; i++) { > ++ int ecur = ptrs[i]; > ++ if (edges[ecur+YMAX] > cury) { > ++ ptrs[newCount++] = ecur; > ++ } > + } > ++ count = newCount; > + } > +- for (int i = qlo; i < qhi; i++) { > +- if (quads[quadPtrs[i]+YMAX] <= nextY) { > +- quadPtrs[i] = quadPtrs[qlo++]; > ++ ptrs = Helpers.widenArray(ptrs, count, bucketcount >> 1); > ++ for (int ecur = edgeBuckets[bucket]; ecur != NULL; ecur = (int)edges[ecur+NEXT]) { > ++ ptrs[count++] = ecur; > ++ // REMIND: Adjust start Y if necessary > ++ } > ++ this.edgePtrs = ptrs; > ++ this.edgeCount = count; > ++// if ((count & 0x1) != 0) { > ++// System.out.println("ODD NUMBER OF EDGES!!!!"); > ++// } > ++ int xings[] = this.crossings; > ++ if (xings.length < count) { > ++ this.crossings = xings = new int[ptrs.length]; > ++ } > ++ for (int i = 0; i < count; i++) { > ++ int ecur = ptrs[i]; > ++ float curx = edges[ecur+CURX]; > ++ int cross = ((int) curx) << 1; > ++ edges[ecur+CURX] = curx + edges[ecur+SLOPE]; > ++ if (edges[ecur+OR] > 0) { > ++ cross |= 1; > + } > ++ int j = i; > ++ while (--j >= 0) { > ++ int jcross = xings[j]; > ++ if (jcross <= cross) { > ++ break; > ++ } > ++ xings[j+1] = jcross; > ++ ptrs[j+1] = ptrs[j]; > ++ } > ++ xings[j+1] = cross; > ++ ptrs[j+1] = ecur; > + } > +- for (int i = clo; i < chi; i++) { > +- if (curves[curvePtrs[i]+YMAX] <= nextY) { > +- curvePtrs[i] = curvePtrs[clo++]; > +- } > +- } > +- > +- crossings = Helpers.widenArray(crossings, 0, ehi-elo+qhi-qlo+chi-clo); > +- > +- // Now every edge between lo and hi crosses nextY. Compute it's > +- // crossing and put it in the crossings array. > +- for (int i = elo; i < ehi; i++) { > +- int ptr = edgePtrs[i]; > +- addCrossing(nextY, (int)edges[ptr+CURX], edges[ptr+OR], crossingIdx); > +- edgeGoToNextY(ptr); > +- crossingIdx++; > +- } > +- for (int i = qlo; i < qhi; i++) { > +- int ptr = quadPtrs[i]; > +- addCrossing(nextY, (int)quads[ptr+CURX], quads[ptr+OR], crossingIdx); > +- quadGoToNextY(ptr); > +- crossingIdx++; > +- } > +- for (int i = clo; i < chi; i++) { > +- int ptr = curvePtrs[i]; > +- addCrossing(nextY, (int)curves[ptr+CURX], curves[ptr+OR], crossingIdx); > +- curveGoToNextY(ptr); > +- crossingIdx++; > +- } > +- > +- nextY++; > +- // Expand active lists to include new edges. > +- for (; ehi < numEdges && edges[edgePtrs[ehi]+YMIN] <= nextY; ehi++) { > +- edgeSetCurY(edgePtrs[ehi], nextY); > +- } > +- for (; qhi < numQuads && quads[quadPtrs[qhi]+YMIN] <= nextY; qhi++) { > +- quadSetCurY(quadPtrs[qhi], nextY); > +- } > +- for (; chi < numCurves && curves[curvePtrs[chi]+YMIN] <= nextY; chi++) { > +- curveSetCurY(curvePtrs[chi], nextY); > +- } > +- Arrays.sort(crossings, 0, crossingIdx); > +- return crossingIdx; > ++ return count; > + } > + > + private boolean hasNext() { > +@@ -157,51 +120,7 @@ > + private int curY() { > + return nextY - 1; > + } > +- > +- private void addCrossing(int y, int x, float or, int idx) { > +- x <<= 1; > +- crossings[idx] = ((or > 0) ? (x | 0x1) : x); > +- } > + } > +- // quicksort implementation for sorting the edge indices ("pointers") > +- // by increasing y0. first, last are indices into the "pointer" array > +- // It sorts the pointer array from first (inclusive) to last (inclusive) > +- private static void qsort(final float[] data, final int[] ptrs, > +- final int fieldForCmp, int first, int last) > +- { > +- if (last > first) { > +- int p = partition(data, ptrs, fieldForCmp, first, last); > +- if (first < p - 1) { > +- qsort(data, ptrs, fieldForCmp, first, p - 1); > +- } > +- if (p < last) { > +- qsort(data, ptrs, fieldForCmp, p, last); > +- } > +- } > +- } > +- > +- // i, j are indices into edgePtrs. > +- private static int partition(final float[] data, final int[] ptrs, > +- final int fieldForCmp, int i, int j) > +- { > +- int pivotValFieldForCmp = ptrs[i]+fieldForCmp; > +- while (i <= j) { > +- // edges[edgePtrs[i]+1] is equivalent to (*(edgePtrs[i])).y0 in C > +- while (data[ptrs[i]+fieldForCmp] < data[pivotValFieldForCmp]) > +- i++; > +- while (data[ptrs[j]+fieldForCmp] > data[pivotValFieldForCmp]) > +- j--; > +- if (i <= j) { > +- int tmp = ptrs[i]; > +- ptrs[i] = ptrs[j]; > +- ptrs[j] = tmp; > +- i++; > +- j--; > +- } > +- } > +- return i; > +- } > +-//============================================================================ > + > + > + ////////////////////////////////////////////////////////////////////////////// > +@@ -209,269 +128,89 @@ > + ////////////////////////////////////////////////////////////////////////////// > + // TODO(maybe): very tempting to use fixed point here. A lot of opportunities > + // for shifts and just removing certain operations altogether. > +-// TODO: it might be worth it to make an EdgeList class. It would probably > +-// clean things up a bit and not impact performance much. > + > + // common to all types of input path segments. > +- private static final int YMIN = 0; > +- private static final int YMAX = 1; > +- private static final int CURX = 2; > +- // this and OR are meant to be indeces into "int" fields, but arrays must > ++ private static final int YMAX = 0; > ++ private static final int CURX = 1; > ++ // NEXT and OR are meant to be indices into "int" fields, but arrays must > + // be homogenous, so every field is a float. However floats can represent > + // exactly up to 26 bit ints, so we're ok. > +- private static final int CURY = 3; > +- private static final int OR = 4; > +- > +- // for straight lines only: > +- private static final int SLOPE = 5; > +- > +- // for quads and cubics: > +- private static final int X0 = 5; > +- private static final int Y0 = 6; > +- private static final int XL = 7; > +- private static final int COUNT = 8; > +- private static final int CURSLOPE = 9; > +- private static final int DX = 10; > +- private static final int DY = 11; > +- private static final int DDX = 12; > +- private static final int DDY = 13; > +- > +- // for cubics only > +- private static final int DDDX = 14; > +- private static final int DDDY = 15; > ++ private static final int OR = 2; > ++ private static final int SLOPE = 3; > ++ private static final int NEXT = 4; > + > + private float edgeMinY = Float.POSITIVE_INFINITY; > + private float edgeMaxY = Float.NEGATIVE_INFINITY; > + private float edgeMinX = Float.POSITIVE_INFINITY; > + private float edgeMaxX = Float.NEGATIVE_INFINITY; > + > +- private static final int SIZEOF_EDGE = 6; > ++ private static final int SIZEOF_EDGE = 5; > ++ // don't just set NULL to -1, because we want NULL+NEXT to be negative. > ++ private static final int NULL = -SIZEOF_EDGE; > + private float[] edges = null; > ++ private int[] edgeBuckets = null; > ++ private int[] edgeBucketCounts = null; // 2*newedges + (1 if pruning needed) > + private int numEdges; > +- // these are static because we need them to be usable from ScanlineIterator > +- private void edgeSetCurY(final int idx, int y) { > +- edges[idx+CURX] += (y - edges[idx+CURY]) * edges[idx+SLOPE]; > +- edges[idx+CURY] = y; > +- } > +- private void edgeGoToNextY(final int idx) { > +- edges[idx+CURY] += 1; > +- edges[idx+CURX] += edges[idx+SLOPE]; > +- } > +- > +- > +- private static final int SIZEOF_QUAD = 14; > +- private float[] quads = null; > +- private int numQuads; > +- // This function should be called exactly once, to set the first scanline > +- // of the curve. Before it is called, the curve should think its first > +- // scanline is CEIL(YMIN). > +- private void quadSetCurY(final int idx, final int y) { > +- assert y < quads[idx+YMAX]; > +- assert (quads[idx+CURY] > y); > +- assert (quads[idx+CURY] == Math.ceil(quads[idx+CURY])); > +- > +- while (quads[idx+CURY] < ((float)y)) { > +- quadGoToNextY(idx); > +- } > +- } > +- private void quadGoToNextY(final int idx) { > +- quads[idx+CURY] += 1; > +- // this will get overriden if the while executes. > +- quads[idx+CURX] += quads[idx+CURSLOPE]; > +- int count = (int)quads[idx+COUNT]; > +- // this loop should never execute more than once because our > +- // curve is monotonic in Y. Still we put it in because you can > +- // never be too sure when dealing with floating point. > +- while(quads[idx+CURY] >= quads[idx+Y0] && count > 0) { > +- float x0 = quads[idx+X0], y0 = quads[idx+Y0]; > +- count = executeQuadAFDIteration(idx); > +- float x1 = quads[idx+X0], y1 = quads[idx+Y0]; > +- // our quads are monotonic, so this shouldn't happen, but > +- // it is conceivable that for very flat quads with different > +- // y values at their endpoints AFD might give us a horizontal > +- // segment. > +- if (y1 == y0) { > +- continue; > +- } > +- quads[idx+CURSLOPE] = (x1 - x0) / (y1 - y0); > +- quads[idx+CURX] = x0 + (quads[idx+CURY] - y0) * quads[idx+CURSLOPE]; > +- } > +- } > +- > +- > +- private static final int SIZEOF_CURVE = 16; > +- private float[] curves = null; > +- private int numCurves; > +- private void curveSetCurY(final int idx, final int y) { > +- assert y < curves[idx+YMAX]; > +- assert (curves[idx+CURY] > y); > +- assert (curves[idx+CURY] == Math.ceil(curves[idx+CURY])); > +- > +- while (curves[idx+CURY] < ((float)y)) { > +- curveGoToNextY(idx); > +- } > +- } > +- private void curveGoToNextY(final int idx) { > +- curves[idx+CURY] += 1; > +- // this will get overriden if the while executes. > +- curves[idx+CURX] += curves[idx+CURSLOPE]; > +- int count = (int)curves[idx+COUNT]; > +- // this loop should never execute more than once because our > +- // curve is monotonic in Y. Still we put it in because you can > +- // never be too sure when dealing with floating point. > +- while(curves[idx+CURY] >= curves[idx+Y0] && count > 0) { > +- float x0 = curves[idx+X0], y0 = curves[idx+Y0]; > +- count = executeCurveAFDIteration(idx); > +- float x1 = curves[idx+X0], y1 = curves[idx+Y0]; > +- // our curves are monotonic, so this shouldn't happen, but > +- // it is conceivable that for very flat curves with different > +- // y values at their endpoints AFD might give us a horizontal > +- // segment. > +- if (y1 == y0) { > +- continue; > +- } > +- curves[idx+CURSLOPE] = (x1 - x0) / (y1 - y0); > +- curves[idx+CURX] = x0 + (curves[idx+CURY] - y0) * curves[idx+CURSLOPE]; > +- } > +- } > +- > + > + private static final float DEC_BND = 20f; > + private static final float INC_BND = 8f; > ++ > ++ // each bucket is a linked list. this method adds eptr to the > ++ // start "bucket"th linked list. > ++ private void addEdgeToBucket(final int eptr, final int bucket) { > ++ edges[eptr+NEXT] = edgeBuckets[bucket]; > ++ edgeBuckets[bucket] = eptr; > ++ edgeBucketCounts[bucket] += 2; > ++ } > ++ > + // Flattens using adaptive forward differencing. This only carries out > + // one iteration of the AFD loop. All it does is update AFD variables (i.e. > + // X0, Y0, D*[X|Y], COUNT; not variables used for computing scanline crossings). > +- private int executeQuadAFDIteration(int idx) { > +- int count = (int)quads[idx+COUNT]; > +- float ddx = quads[idx+DDX]; > +- float ddy = quads[idx+DDY]; > +- float dx = quads[idx+DX]; > +- float dy = quads[idx+DY]; > +- > +- while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { > +- ddx = ddx / 4; > +- ddy = ddy / 4; > +- dx = (dx - ddx) / 2; > +- dy = (dy - ddy) / 2; > ++ private void quadBreakIntoLinesAndAdd(float x0, float y0, > ++ final Curve c, > ++ final float x2, final float y2) { > ++ final float QUAD_DEC_BND = 32; > ++ final int countlg = 4; > ++ int count = 1 << countlg; > ++ int countsq = count * count; > ++ float maxDD = Math.max(c.dbx / countsq, c.dby / countsq); > ++ while (maxDD > QUAD_DEC_BND) { > ++ maxDD /= 4; > + count <<= 1; > + } > +- // can only do this on even "count" values, because we must divide count by 2 > +- while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { > +- dx = 2 * dx + ddx; > +- dy = 2 * dy + ddy; > +- ddx = 4 * ddx; > +- ddy = 4 * ddy; > +- count >>= 1; > ++ > ++ countsq = count * count; > ++ final float ddx = c.dbx / countsq; > ++ final float ddy = c.dby / countsq; > ++ float dx = c.bx / countsq + c.cx / count; > ++ float dy = c.by / countsq + c.cy / count; > ++ > ++ while (count-- > 1) { > ++ float x1 = x0 + dx; > ++ dx += ddx; > ++ float y1 = y0 + dy; > ++ dy += ddy; > ++ addLine(x0, y0, x1, y1); > ++ x0 = x1; > ++ y0 = y1; > + } > +- count--; > +- if (count > 0) { > +- quads[idx+X0] += dx; > +- dx += ddx; > +- quads[idx+Y0] += dy; > +- dy += ddy; > +- } else { > +- quads[idx+X0] = quads[idx+XL]; > +- quads[idx+Y0] = quads[idx+YMAX]; > +- } > +- quads[idx+COUNT] = count; > +- quads[idx+DDX] = ddx; > +- quads[idx+DDY] = ddy; > +- quads[idx+DX] = dx; > +- quads[idx+DY] = dy; > +- return count; > +- } > +- private int executeCurveAFDIteration(int idx) { > +- int count = (int)curves[idx+COUNT]; > +- float ddx = curves[idx+DDX]; > +- float ddy = curves[idx+DDY]; > +- float dx = curves[idx+DX]; > +- float dy = curves[idx+DY]; > +- float dddx = curves[idx+DDDX]; > +- float dddy = curves[idx+DDDY]; > +- > +- while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { > +- dddx /= 8; > +- dddy /= 8; > +- ddx = ddx/4 - dddx; > +- ddy = ddy/4 - dddy; > +- dx = (dx - ddx) / 2; > +- dy = (dy - ddy) / 2; > +- count <<= 1; > +- } > +- // can only do this on even "count" values, because we must divide count by 2 > +- while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { > +- dx = 2 * dx + ddx; > +- dy = 2 * dy + ddy; > +- ddx = 4 * (ddx + dddx); > +- ddy = 4 * (ddy + dddy); > +- dddx = 8 * dddx; > +- dddy = 8 * dddy; > +- count >>= 1; > +- } > +- count--; > +- if (count > 0) { > +- curves[idx+X0] += dx; > +- dx += ddx; > +- ddx += dddx; > +- curves[idx+Y0] += dy; > +- dy += ddy; > +- ddy += dddy; > +- } else { > +- curves[idx+X0] = curves[idx+XL]; > +- curves[idx+Y0] = curves[idx+YMAX]; > +- } > +- curves[idx+COUNT] = count; > +- curves[idx+DDDX] = dddx; > +- curves[idx+DDDY] = dddy; > +- curves[idx+DDX] = ddx; > +- curves[idx+DDY] = ddy; > +- curves[idx+DX] = dx; > +- curves[idx+DY] = dy; > +- return count; > ++ addLine(x0, y0, x2, y2); > + } > + > +- > +- private void initLine(final int idx, float[] pts, int or) { > +- edges[idx+SLOPE] = (pts[2] - pts[0]) / (pts[3] - pts[1]); > +- edges[idx+CURX] = pts[0] + (edges[idx+CURY] - pts[1]) * edges[idx+SLOPE]; > +- } > +- > +- private void initQuad(final int idx, float[] points, int or) { > ++ // x0, y0 and x3,y3 are the endpoints of the curve. We could compute these > ++ // using c.xat(0),c.yat(0) and c.xat(1),c.yat(1), but this might introduce > ++ // numerical errors, and our callers already have the exact values. > ++ // Another alternative would be to pass all the control points, and call c.set > ++ // here, but then too many numbers are passed around. > ++ private void curveBreakIntoLinesAndAdd(float x0, float y0, > ++ final Curve c, > ++ final float x3, final float y3) { > + final int countlg = 3; > +- final int count = 1 << countlg; > ++ int count = 1 << countlg; > + > + // the dx and dy refer to forward differencing variables, not the last > + // coefficients of the "points" polynomial > +- final float ddx, ddy, dx, dy; > +- c.set(points, 6); > +- > +- ddx = c.dbx / (1 << (2 * countlg)); > +- ddy = c.dby / (1 << (2 * countlg)); > +- dx = c.bx / (1 << (2 * countlg)) + c.cx / (1 << countlg); > +- dy = c.by / (1 << (2 * countlg)) + c.cy / (1 << countlg); > +- > +- quads[idx+DDX] = ddx; > +- quads[idx+DDY] = ddy; > +- quads[idx+DX] = dx; > +- quads[idx+DY] = dy; > +- quads[idx+COUNT] = count; > +- quads[idx+XL] = points[4]; > +- quads[idx+X0] = points[0]; > +- quads[idx+Y0] = points[1]; > +- executeQuadAFDIteration(idx); > +- float x1 = quads[idx+X0], y1 = quads[idx+Y0]; > +- quads[idx+CURSLOPE] = (x1 - points[0]) / (y1 - points[1]); > +- quads[idx+CURX] = points[0] + (quads[idx+CURY] - points[1])*quads[idx+CURSLOPE]; > +- } > +- > +- private void initCurve(final int idx, float[] points, int or) { > +- final int countlg = 3; > +- final int count = 1 << countlg; > +- > +- // the dx and dy refer to forward differencing variables, not the last > +- // coefficients of the "points" polynomial > +- final float dddx, dddy, ddx, ddy, dx, dy; > +- c.set(points, 8); > ++ float dddx, dddy, ddx, ddy, dx, dy; > + dddx = 2f * c.dax / (1 << (3 * countlg)); > + dddy = 2f * c.day / (1 << (3 * countlg)); > + > +@@ -480,93 +219,100 @@ > + dx = c.ax / (1 << (3 * countlg)) + c.bx / (1 << (2 * countlg)) + c.cx / (1 << countlg); > + dy = c.ay / (1 << (3 * countlg)) + c.by / (1 << (2 * countlg)) + c.cy / (1 << countlg); > + > +- curves[idx+DDDX] = dddx; > +- curves[idx+DDDY] = dddy; > +- curves[idx+DDX] = ddx; > +- curves[idx+DDY] = ddy; > +- curves[idx+DX] = dx; > +- curves[idx+DY] = dy; > +- curves[idx+COUNT] = count; > +- curves[idx+XL] = points[6]; > +- curves[idx+X0] = points[0]; > +- curves[idx+Y0] = points[1]; > +- executeCurveAFDIteration(idx); > +- float x1 = curves[idx+X0], y1 = curves[idx+Y0]; > +- curves[idx+CURSLOPE] = (x1 - points[0]) / (y1 - points[1]); > +- curves[idx+CURX] = points[0] + (curves[idx+CURY] - points[1])*curves[idx+CURSLOPE]; > +- } > +- > +- private void addPathSegment(float[] pts, final int type, final int or) { > +- int idx; > +- float[] addTo; > +- switch (type) { > +- case 4: > +- idx = numEdges * SIZEOF_EDGE; > +- addTo = edges = Helpers.widenArray(edges, numEdges*SIZEOF_EDGE, SIZEOF_EDGE); > +- numEdges++; > +- break; > +- case 6: > +- idx = numQuads * SIZEOF_QUAD; > +- addTo = quads = Helpers.widenArray(quads, numQuads*SIZEOF_QUAD, SIZEOF_QUAD); > +- numQuads++; > +- break; > +- case 8: > +- idx = numCurves * SIZEOF_CURVE; > +- addTo = curves = Helpers.widenArray(curves, numCurves*SIZEOF_CURVE, SIZEOF_CURVE); > +- numCurves++; > +- break; > +- default: > +- throw new InternalError(); > +- } > +- // set the common fields, except CURX, for which we must know the kind > +- // of curve. NOTE: this must be done before the type specific fields > +- // are initialized, because those depend on the common ones. > +- addTo[idx+YMIN] = pts[1]; > +- addTo[idx+YMAX] = pts[type-1]; > +- addTo[idx+OR] = or; > +- addTo[idx+CURY] = (float)Math.ceil(pts[1]); > +- switch (type) { > +- case 4: > +- initLine(idx, pts, or); > +- break; > +- case 6: > +- initQuad(idx, pts, or); > +- break; > +- case 8: > +- initCurve(idx, pts, or); > +- break; > +- default: > +- throw new InternalError(); > ++ // we use x0, y0 to walk the line > ++ float x1 = x0, y1 = y0; > ++ while (count > 0) { > ++ while (Math.abs(ddx) > DEC_BND || Math.abs(ddy) > DEC_BND) { > ++ dddx /= 8; > ++ dddy /= 8; > ++ ddx = ddx/4 - dddx; > ++ ddy = ddy/4 - dddy; > ++ dx = (dx - ddx) / 2; > ++ dy = (dy - ddy) / 2; > ++ count <<= 1; > ++ } > ++ // can only do this on even "count" values, because we must divide count by 2 > ++ while (count % 2 == 0 && Math.abs(dx) <= INC_BND && Math.abs(dy) <= INC_BND) { > ++ dx = 2 * dx + ddx; > ++ dy = 2 * dy + ddy; > ++ ddx = 4 * (ddx + dddx); > ++ ddy = 4 * (ddy + dddy); > ++ dddx = 8 * dddx; > ++ dddy = 8 * dddy; > ++ count >>= 1; > ++ } > ++ count--; > ++ if (count > 0) { > ++ x1 += dx; > ++ dx += ddx; > ++ ddx += dddx; > ++ y1 += dy; > ++ dy += ddy; > ++ ddy += dddy; > ++ } else { > ++ x1 = x3; > ++ y1 = y3; > ++ } > ++ addLine(x0, y0, x1, y1); > ++ x0 = x1; > ++ y0 = y1; > + } > + } > + > +- // precondition: the curve in pts must be monotonic and increasing in y. > +- private void somethingTo(float[] pts, final int type, final int or) { > +- // NOTE: it's very important that we check for or >= 0 below (as > +- // opposed to or == 1, or or > 0, or anything else). That's > +- // because if we check for or==1, when the curve being added > +- // is a horizontal line, or will be 0 so or==1 will be false and > +- // x0 and y0 will be updated to pts[0] and pts[1] instead of pts[type-2] > +- // and pts[type-1], which is the correct thing to do. > +- this.x0 = or >= 0 ? pts[type - 2] : pts[0]; > +- this.y0 = or >= 0 ? pts[type - 1] : pts[1]; > +- > +- float minY = pts[1], maxY = pts[type - 1]; > +- if (Math.ceil(minY) >= Math.ceil(maxY) || > +- Math.ceil(minY) >= boundsMaxY || maxY < boundsMinY) > +- { > ++ // Preconditions: y2 > y1 and the curve must cross some scanline > ++ // i.e.: y1 <= y < y2 for some y such that boundsMinY <= y < boundsMaxY > ++ private void addLine(float x1, float y1, float x2, float y2) { > ++ float or = 1; // orientation of the line. 1 if y increases, 0 otherwise. > ++ if (y2 < y1) { > ++ or = y2; // no need to declare a temp variable. We have or. > ++ y2 = y1; > ++ y1 = or; > ++ or = x2; > ++ x2 = x1; > ++ x1 = or; > ++ or = 0; > ++ } > ++ final int firstCrossing = Math.max((int) Math.ceil(y1), boundsMinY); > ++ final int lastCrossing = Math.min((int)Math.ceil(y2), boundsMaxY); > ++ if (firstCrossing >= lastCrossing) { > + return; > + } > + > +- if (minY < edgeMinY) { edgeMinY = minY; } > +- if (maxY > edgeMaxY) { edgeMaxY = maxY; } > ++ if (y1 < edgeMinY) { edgeMinY = y1; } > ++ if (y2 > edgeMaxY) { edgeMaxY = y2; } > + > +- int minXidx = (pts[0] < pts[type-2] ? 0 : type - 2); > +- float minX = pts[minXidx]; > +- float maxX = pts[type - 2 - minXidx]; > +- if (minX < edgeMinX) { edgeMinX = minX; } > +- if (maxX > edgeMaxX) { edgeMaxX = maxX; } > +- addPathSegment(pts, type, or); > ++ final float slope = (x2 - x1) / (y2 - y1); > ++ > ++ if (slope > 0) { // <==> x1 < x2 > ++ if (x1 < edgeMinX) { edgeMinX = x1; } > ++ if (x2 > edgeMaxX) { edgeMaxX = x2; } > ++ } else { > ++ if (x2 < edgeMinX) { edgeMinX = x2; } > ++ if (x1 > edgeMaxX) { edgeMaxX = x1; } > ++ } > ++ > ++ final int ptr = numEdges * SIZEOF_EDGE; > ++ edges = Helpers.widenArray(edges, ptr, SIZEOF_EDGE); > ++ numEdges++; > ++ edges[ptr+OR] = or; > ++ edges[ptr+CURX] = x1 + (firstCrossing - y1) * slope; > ++ edges[ptr+SLOPE] = slope; > ++ edges[ptr+YMAX] = y2; > ++ final int bucketIdx = firstCrossing - boundsMinY; > ++ addEdgeToBucket(ptr, bucketIdx); > ++ if (lastCrossing < boundsMaxY) { > ++ edgeBucketCounts[lastCrossing - boundsMinY] |= 1; > ++ } > ++ } > ++ > ++ // preconditions: should not be called before the last line has been added > ++ // to the edge list (even though it will return a correct answer at that > ++ // point in time, it's not meant to be used that way). > ++ private int getFirstScanLineCrossing() { > ++ return Math.max(boundsMinY, (int)Math.ceil(edgeMinY)); > ++ } > ++ private int getScanLineCrossingEnd() { > ++ return Math.min(boundsMaxY, (int)Math.ceil(edgeMaxY)); > + } > + > + // END EDGE LIST > +@@ -619,6 +365,10 @@ > + this.boundsMinY = pix_boundsY * SUBPIXEL_POSITIONS_Y; > + this.boundsMaxX = (pix_boundsX + pix_boundsWidth) * SUBPIXEL_POSITIONS_X; > + this.boundsMaxY = (pix_boundsY + pix_boundsHeight) * SUBPIXEL_POSITIONS_Y; > ++ > ++ edgeBuckets = new int[boundsMaxY - boundsMinY]; > ++ java.util.Arrays.fill(edgeBuckets, NULL); > ++ edgeBucketCounts = new int[edgeBuckets.length]; > + } > + > + private float tosubpixx(float pix_x) { > +@@ -636,74 +386,34 @@ > + this.x0 = tosubpixx(pix_x0); > + } > + > +- public void lineJoin() { /* do nothing */ } > +- > +- private final float[][] pts = new float[2][8]; > +- private final float[] ts = new float[4]; > +- > +- private static void invertPolyPoints(float[] pts, int off, int type) { > +- for (int i = off, j = off + type - 2; i < j; i += 2, j -= 2) { > +- float tmp = pts[i]; > +- pts[i] = pts[j]; > +- pts[j] = tmp; > +- tmp = pts[i+1]; > +- pts[i+1] = pts[j+1]; > +- pts[j+1] = tmp; > +- } > +- } > +- > +- // return orientation before making the curve upright. > +- private static int makeMonotonicCurveUpright(float[] pts, int off, int type) { > +- float y0 = pts[off + 1]; > +- float y1 = pts[off + type - 1]; > +- if (y0 > y1) { > +- invertPolyPoints(pts, off, type); > +- return -1; > +- } else if (y0 < y1) { > +- return 1; > +- } > +- return 0; > +- } > +- > + public void lineTo(float pix_x1, float pix_y1) { > +- pts[0][0] = x0; pts[0][1] = y0; > +- pts[0][2] = tosubpixx(pix_x1); pts[0][3] = tosubpixy(pix_y1); > +- int or = makeMonotonicCurveUpright(pts[0], 0, 4); > +- somethingTo(pts[0], 4, or); > ++ float x1 = tosubpixx(pix_x1); > ++ float y1 = tosubpixy(pix_y1); > ++ addLine(x0, y0, x1, y1); > ++ x0 = x1; > ++ y0 = y1; > + } > + > + Curve c = new Curve(); > +- private void curveOrQuadTo(int type) { > +- c.set(pts[0], type); > +- int numTs = c.dxRoots(ts, 0); > +- numTs += c.dyRoots(ts, numTs); > +- numTs = Helpers.filterOutNotInAB(ts, 0, numTs, 0, 1); > +- Helpers.isort(ts, 0, numTs); > +- > +- Iterator it = Curve.breakPtsAtTs(pts, type, ts, numTs); > +- while(it.hasNext()) { > +- float[] curCurve = it.next(); > +- int or = makeMonotonicCurveUpright(curCurve, 0, type); > +- somethingTo(curCurve, type, or); > +- } > +- } > +- > + @Override public void curveTo(float x1, float y1, > + float x2, float y2, > + float x3, float y3) > + { > +- pts[0][0] = x0; pts[0][1] = y0; > +- pts[0][2] = tosubpixx(x1); pts[0][3] = tosubpixy(y1); > +- pts[0][4] = tosubpixx(x2); pts[0][5] = tosubpixy(y2); > +- pts[0][6] = tosubpixx(x3); pts[0][7] = tosubpixy(y3); > +- curveOrQuadTo(8); > ++ final float xe = tosubpixx(x3); > ++ final float ye = tosubpixy(y3); > ++ c.set(x0, y0, tosubpixx(x1), tosubpixy(y1), tosubpixx(x2), tosubpixy(y2), xe, ye); > ++ curveBreakIntoLinesAndAdd(x0, y0, c, xe, ye); > ++ x0 = xe; > ++ y0 = ye; > + } > + > + @Override public void quadTo(float x1, float y1, float x2, float y2) { > +- pts[0][0] = x0; pts[0][1] = y0; > +- pts[0][2] = tosubpixx(x1); pts[0][3] = tosubpixy(y1); > +- pts[0][4] = tosubpixx(x2); pts[0][5] = tosubpixy(y2); > +- curveOrQuadTo(6); > ++ final float xe = tosubpixx(x2); > ++ final float ye = tosubpixy(y2); > ++ c.set(x0, y0, tosubpixx(x1), tosubpixy(y1), xe, ye); > ++ quadBreakIntoLinesAndAdd(x0, y0, c, xe, ye); > ++ x0 = xe; > ++ y0 = ye; > + } > + > + public void closePath() { > +@@ -728,9 +438,9 @@ > + // 0x1 if EVEN_ODD, all bits if NON_ZERO > + int mask = (windingRule == WIND_EVEN_ODD) ? 0x1 : ~0x0; > + > +- // add 1 to better deal with the last pixel in a pixel row. > +- int width = pix_bboxx1 - pix_bboxx0 + 1; > +- int[] alpha = new int[width+1]; > ++ // add 2 to better deal with the last pixel in a pixel row. > ++ int width = pix_bboxx1 - pix_bboxx0; > ++ int[] alpha = new int[width+2]; > + > + int bboxx0 = pix_bboxx0 << SUBPIXEL_LG_POSITIONS_X; > + int bboxx1 = pix_bboxx1 << SUBPIXEL_LG_POSITIONS_X; > +@@ -766,7 +476,8 @@ > + for (int i = 0; i < numCrossings; i++) { > + int curxo = crossings[i]; > + int curx = curxo >> 1; > +- int crorientation = ((curxo & 0x1) == 0x1) ? 1 : -1; > ++ // to turn {0, 1} into {-1, 1}, multiply by 2 and subtract 1. > ++ int crorientation = ((curxo & 0x1) << 1) -1; > + if ((sum & mask) != 0) { > + int x0 = Math.max(prev, bboxx0); > + int x1 = Math.min(curx, bboxx1); > +@@ -811,26 +522,26 @@ > + } > + > + public void endRendering() { > +- final int bminx = boundsMinX >> SUBPIXEL_LG_POSITIONS_X; > +- final int bmaxx = boundsMaxX >> SUBPIXEL_LG_POSITIONS_X; > +- final int bminy = boundsMinY >> SUBPIXEL_LG_POSITIONS_Y; > +- final int bmaxy = boundsMaxY >> SUBPIXEL_LG_POSITIONS_Y; > +- final int eminx = ((int)Math.floor(edgeMinX)) >> SUBPIXEL_LG_POSITIONS_X; > +- final int emaxx = ((int)Math.ceil(edgeMaxX)) >> SUBPIXEL_LG_POSITIONS_X; > +- final int eminy = ((int)Math.floor(edgeMinY)) >> SUBPIXEL_LG_POSITIONS_Y; > +- final int emaxy = ((int)Math.ceil(edgeMaxY)) >> SUBPIXEL_LG_POSITIONS_Y; > ++ int spminX = Math.max((int)Math.ceil(edgeMinX), boundsMinX); > ++ int spmaxX = Math.min((int)Math.ceil(edgeMaxX), boundsMaxX); > ++ int spminY = Math.max((int)Math.ceil(edgeMinY), boundsMinY); > ++ int spmaxY = Math.min((int)Math.ceil(edgeMaxY), boundsMaxY); > + > +- final int minX = Math.max(bminx, eminx); > +- final int maxX = Math.min(bmaxx, emaxx); > +- final int minY = Math.max(bminy, eminy); > +- final int maxY = Math.min(bmaxy, emaxy); > +- if (minX > maxX || minY > maxY) { > +- this.cache = new PiscesCache(bminx, bminy, bmaxx, bmaxy); > ++ int pminX = spminX >> SUBPIXEL_LG_POSITIONS_X; > ++ int pmaxX = (spmaxX + SUBPIXEL_MASK_X) >> SUBPIXEL_LG_POSITIONS_X; > ++ int pminY = spminY >> SUBPIXEL_LG_POSITIONS_Y; > ++ int pmaxY = (spmaxY + SUBPIXEL_MASK_Y) >> SUBPIXEL_LG_POSITIONS_Y; > ++ > ++ if (pminX > pmaxX || pminY > pmaxY) { > ++ this.cache = new PiscesCache(boundsMinX >> SUBPIXEL_LG_POSITIONS_X, > ++ boundsMinY >> SUBPIXEL_LG_POSITIONS_Y, > ++ boundsMaxX >> SUBPIXEL_LG_POSITIONS_X, > ++ boundsMaxY >> SUBPIXEL_LG_POSITIONS_Y); > + return; > + } > + > +- this.cache = new PiscesCache(minX, minY, maxX, maxY); > +- _endRendering(minX, minY, maxX, maxY); > ++ this.cache = new PiscesCache(pminX, pminY, pmaxX, pmaxY); > ++ _endRendering(pminX, pminY, pmaxX, pmaxY); > + } > + > + public PiscesCache getCache() { > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/Stroker.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/Stroker.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -33,7 +33,7 @@ > + // TODO: some of the arithmetic here is too verbose and prone to hard to > + // debug typos. We should consider making a small Point/Vector class that > + // has methods like plus(Point), minus(Point), dot(Point), cross(Point)and such > +-public class Stroker implements PathConsumer2D { > ++final class Stroker implements PathConsumer2D { > + > + private static final int MOVE_TO = 0; > + private static final int DRAWING_OP_TO = 1; // ie. curve, line, or quad > +@@ -130,7 +130,7 @@ > + private static void computeOffset(final float lx, final float ly, > + final float w, final float[] m) > + { > +- final float len = (float)Math.hypot(lx, ly); > ++ final float len = (float)Math.sqrt(lx*lx + ly*ly); > + if (len == 0) { > + m[0] = m[1] = 0; > + } else { > +@@ -758,7 +758,7 @@ > + // This is where the curve to be processed is put. We give it > + // enough room to store 2 curves: one for the current subdivision, the > + // other for the rest of the curve. > +- private float[][] middle = new float[2][8]; > ++ private float[] middle = new float[2*8]; > + private float[] lp = new float[8]; > + private float[] rp = new float[8]; > + private static final int MAX_N_CURVES = 11; > +@@ -766,55 +766,55 @@ > + > + private void somethingTo(final int type) { > + // need these so we can update the state at the end of this method > +- final float xf = middle[0][type-2], yf = middle[0][type-1]; > +- float dxs = middle[0][2] - middle[0][0]; > +- float dys = middle[0][3] - middle[0][1]; > +- float dxf = middle[0][type - 2] - middle[0][type - 4]; > +- float dyf = middle[0][type - 1] - middle[0][type - 3]; > ++ final float xf = middle[type-2], yf = middle[type-1]; > ++ float dxs = middle[2] - middle[0]; > ++ float dys = middle[3] - middle[1]; > ++ float dxf = middle[type - 2] - middle[type - 4]; > ++ float dyf = middle[type - 1] - middle[type - 3]; > + switch(type) { > + case 6: > + if ((dxs == 0f && dys == 0f) || > + (dxf == 0f && dyf == 0f)) { > +- dxs = dxf = middle[0][4] - middle[0][0]; > +- dys = dyf = middle[0][5] - middle[0][1]; > ++ dxs = dxf = middle[4] - middle[0]; > ++ dys = dyf = middle[5] - middle[1]; > + } > + break; > + case 8: > + boolean p1eqp2 = (dxs == 0f && dys == 0f); > + boolean p3eqp4 = (dxf == 0f && dyf == 0f); > + if (p1eqp2) { > +- dxs = middle[0][4] - middle[0][0]; > +- dys = middle[0][5] - middle[0][1]; > ++ dxs = middle[4] - middle[0]; > ++ dys = middle[5] - middle[1]; > + if (dxs == 0f && dys == 0f) { > +- dxs = middle[0][6] - middle[0][0]; > +- dys = middle[0][7] - middle[0][1]; > ++ dxs = middle[6] - middle[0]; > ++ dys = middle[7] - middle[1]; > + } > + } > + if (p3eqp4) { > +- dxf = middle[0][6] - middle[0][2]; > +- dyf = middle[0][7] - middle[0][3]; > ++ dxf = middle[6] - middle[2]; > ++ dyf = middle[7] - middle[3]; > + if (dxf == 0f && dyf == 0f) { > +- dxf = middle[0][6] - middle[0][0]; > +- dyf = middle[0][7] - middle[0][1]; > ++ dxf = middle[6] - middle[0]; > ++ dyf = middle[7] - middle[1]; > + } > + } > + } > + if (dxs == 0f && dys == 0f) { > + // this happens iff the "curve" is just a point > +- lineTo(middle[0][0], middle[0][1]); > ++ lineTo(middle[0], middle[1]); > + return; > + } > + // if these vectors are too small, normalize them, to avoid future > + // precision problems. > + if (Math.abs(dxs) < 0.1f && Math.abs(dys) < 0.1f) { > +- double len = Math.hypot(dxs, dys); > +- dxs = (float)(dxs / len); > +- dys = (float)(dys / len); > ++ float len = (float)Math.sqrt(dxs*dxs + dys*dys); > ++ dxs /= len; > ++ dys /= len; > + } > + if (Math.abs(dxf) < 0.1f && Math.abs(dyf) < 0.1f) { > +- double len = Math.hypot(dxf, dyf); > +- dxf = (float)(dxf / len); > +- dyf = (float)(dyf / len); > ++ float len = (float)Math.sqrt(dxf*dxf + dyf*dyf); > ++ dxf /= len; > ++ dyf /= len; > + } > + > + computeOffset(dxs, dys, lineWidth2, offset[0]); > +@@ -822,20 +822,20 @@ > + final float my = offset[0][1]; > + drawJoin(cdx, cdy, cx0, cy0, dxs, dys, cmx, cmy, mx, my); > + > +- int nSplits = findSubdivPoints(middle[0], subdivTs, type,lineWidth2); > ++ int nSplits = findSubdivPoints(middle, subdivTs, type, lineWidth2); > + > + int kind = 0; > +- Iterator it = Curve.breakPtsAtTs(middle, type, subdivTs, nSplits); > ++ Iterator it = Curve.breakPtsAtTs(middle, type, subdivTs, nSplits); > + while(it.hasNext()) { > +- float[] curCurve = it.next(); > ++ int curCurveOff = it.next(); > + > + kind = 0; > + switch (type) { > + case 8: > +- kind = computeOffsetCubic(curCurve, 0, lp, rp); > ++ kind = computeOffsetCubic(middle, curCurveOff, lp, rp); > + break; > + case 6: > +- kind = computeOffsetQuad(curCurve, 0, lp, rp); > ++ kind = computeOffsetQuad(middle, curCurveOff, lp, rp); > + break; > + } > + if (kind != 0) { > +@@ -871,8 +871,7 @@ > + // to get good offset curves a distance of w away from the middle curve. > + // Stores the points in ts, and returns how many of them there were. > + private static Curve c = new Curve(); > +- private static int findSubdivPoints(float[] pts, float[] ts, > +- final int type, final float w) > ++ private static int findSubdivPoints(float[] pts, float[] ts, final int type, final float w) > + { > + final float x12 = pts[2] - pts[0]; > + final float y12 = pts[3] - pts[1]; > +@@ -919,6 +918,7 @@ > + // now we must subdivide at points where one of the offset curves will have > + // a cusp. This happens at ts where the radius of curvature is equal to w. > + ret += c.rootsOfROCMinusW(ts, ret, w, 0.0001f); > ++ > + ret = Helpers.filterOutNotInAB(ts, 0, ret, 0.0001f, 0.9999f); > + Helpers.isort(ts, 0, ret); > + return ret; > +@@ -928,10 +928,10 @@ > + float x2, float y2, > + float x3, float y3) > + { > +- middle[0][0] = cx0; middle[0][1] = cy0; > +- middle[0][2] = x1; middle[0][3] = y1; > +- middle[0][4] = x2; middle[0][5] = y2; > +- middle[0][6] = x3; middle[0][7] = y3; > ++ middle[0] = cx0; middle[1] = cy0; > ++ middle[2] = x1; middle[3] = y1; > ++ middle[4] = x2; middle[5] = y2; > ++ middle[6] = x3; middle[7] = y3; > + somethingTo(8); > + } > + > +@@ -940,9 +940,9 @@ > + } > + > + @Override public void quadTo(float x1, float y1, float x2, float y2) { > +- middle[0][0] = cx0; middle[0][1] = cy0; > +- middle[0][2] = x1; middle[0][3] = y1; > +- middle[0][4] = x2; middle[0][5] = y2; > ++ middle[0] = cx0; middle[1] = cy0; > ++ middle[2] = x1; middle[3] = y1; > ++ middle[4] = x2; middle[5] = y2; > + somethingTo(6); > + } > + > +diff -r 21621a756b32 -r 5e624003e622 src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java > +--- openjdk.orig/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java Thu Feb 03 19:15:30 2011 -0800 > ++++ openjdk/jdk/src/share/classes/sun/java2d/pisces/TransformingPathConsumer2D.java Tue Feb 08 09:22:49 2011 -0500 > +@@ -28,7 +28,7 @@ > + import sun.awt.geom.PathConsumer2D; > + import java.awt.geom.AffineTransform; > + > +-public class TransformingPathConsumer2D { > ++final class TransformingPathConsumer2D { > + public static PathConsumer2D > + transformConsumer(PathConsumer2D out, > + AffineTransform at) > +@@ -50,17 +50,72 @@ > + return new TranslateFilter(out, Mxt, Myt); > + } > + } else { > +- return new ScaleFilter(out, Mxx, Myy, Mxt, Myt); > ++ if (Mxt == 0f && Myt == 0f) { > ++ return new DeltaScaleFilter(out, Mxx, Myy); > ++ } else { > ++ return new ScaleFilter(out, Mxx, Myy, Mxt, Myt); > ++ } > + } > ++ } else if (Mxt == 0f && Myt == 0f) { > ++ return new DeltaTransformFilter(out, Mxx, Mxy, Myx, Myy); > + } else { > + return new TransformFilter(out, Mxx, Mxy, Mxt, Myx, Myy, Myt); > + } > + } > + > +- static class TranslateFilter implements PathConsumer2D { > +- PathConsumer2D out; > +- float tx; > +- float ty; > ++ public static PathConsumer2D > ++ deltaTransformConsumer(PathConsumer2D out, > ++ AffineTransform at) > ++ { > ++ if (at == null) { > ++ return out; > ++ } > ++ float Mxx = (float) at.getScaleX(); > ++ float Mxy = (float) at.getShearX(); > ++ float Myx = (float) at.getShearY(); > ++ float Myy = (float) at.getScaleY(); > ++ if (Mxy == 0f && Myx == 0f) { > ++ if (Mxx == 1f && Myy == 1f) { > ++ return out; > ++ } else { > ++ return new DeltaScaleFilter(out, Mxx, Myy); > ++ } > ++ } else { > ++ return new DeltaTransformFilter(out, Mxx, Mxy, Myx, Myy); > ++ } > ++ } > ++ > ++ public static PathConsumer2D > ++ inverseDeltaTransformConsumer(PathConsumer2D out, > ++ AffineTransform at) > ++ { > ++ if (at == null) { > ++ return out; > ++ } > ++ float Mxx = (float) at.getScaleX(); > ++ float Mxy = (float) at.getShearX(); > ++ float Myx = (float) at.getShearY(); > ++ float Myy = (float) at.getScaleY(); > ++ if (Mxy == 0f && Myx == 0f) { > ++ if (Mxx == 1f && Myy == 1f) { > ++ return out; > ++ } else { > ++ return new DeltaScaleFilter(out, 1.0f/Mxx, 1.0f/Myy); > ++ } > ++ } else { > ++ float det = Mxx * Myy - Mxy * Myx; > ++ return new DeltaTransformFilter(out, > ++ Myy / det, > ++ -Mxy / det, > ++ -Myx / det, > ++ Mxx / det); > ++ } > ++ } > ++ > ++ static final class TranslateFilter implements PathConsumer2D { > ++ private final PathConsumer2D out; > ++ private final float tx; > ++ private final float ty; > + > + TranslateFilter(PathConsumer2D out, > + float tx, float ty) > +@@ -107,12 +162,12 @@ > + } > + } > + > +- static class ScaleFilter implements PathConsumer2D { > +- PathConsumer2D out; > +- float sx; > +- float sy; > +- float tx; > +- float ty; > ++ static final class ScaleFilter implements PathConsumer2D { > ++ private final PathConsumer2D out; > ++ private final float sx; > ++ private final float sy; > ++ private final float tx; > ++ private final float ty; > + > + ScaleFilter(PathConsumer2D out, > + float sx, float sy, float tx, float ty) > +@@ -161,14 +216,14 @@ > + } > + } > + > +- static class TransformFilter implements PathConsumer2D { > +- PathConsumer2D out; > +- float Mxx; > +- float Mxy; > +- float Mxt; > +- float Myx; > +- float Myy; > +- float Myt; > ++ static final class TransformFilter implements PathConsumer2D { > ++ private final PathConsumer2D out; > ++ private final float Mxx; > ++ private final float Mxy; > ++ private final float Mxt; > ++ private final float Myx; > ++ private final float Myy; > ++ private final float Myt; > + > + TransformFilter(PathConsumer2D out, > + float Mxx, float Mxy, float Mxt, > +@@ -226,4 +281,113 @@ > + return 0; > + } > + } > ++ > ++ static final class DeltaScaleFilter implements PathConsumer2D { > ++ private final float sx, sy; > ++ private final PathConsumer2D out; > ++ > ++ public DeltaScaleFilter(PathConsumer2D out, float Mxx, float Myy) { > ++ sx = Mxx; > ++ sy = Myy; > ++ this.out = out; > ++ } > ++ > ++ public void moveTo(float x0, float y0) { > ++ out.moveTo(x0 * sx, y0 * sy); > ++ } > ++ > ++ public void lineTo(float x1, float y1) { > ++ out.lineTo(x1 * sx, y1 * sy); > ++ } > ++ > ++ public void quadTo(float x1, float y1, > ++ float x2, float y2) > ++ { > ++ out.quadTo(x1 * sx, y1 * sy, > ++ x2 * sx, y2 * sy); > ++ } > ++ > ++ public void curveTo(float x1, float y1, > ++ float x2, float y2, > ++ float x3, float y3) > ++ { > ++ out.curveTo(x1 * sx, y1 * sy, > ++ x2 * sx, y2 * sy, > ++ x3 * sx, y3 * sy); > ++ } > ++ > ++ public void closePath() { > ++ out.closePath(); > ++ } > ++ > ++ public void pathDone() { > ++ out.pathDone(); > ++ } > ++ > ++ public long getNativeConsumer() { > ++ return 0; > ++ } > ++ } > ++ > ++ static final class DeltaTransformFilter implements PathConsumer2D { > ++ private PathConsumer2D out; > ++ private final float Mxx; > ++ private final float Mxy; > ++ private final float Myx; > ++ private final float Myy; > ++ > ++ DeltaTransformFilter(PathConsumer2D out, > ++ float Mxx, float Mxy, > ++ float Myx, float Myy) > ++ { > ++ this.out = out; > ++ this.Mxx = Mxx; > ++ this.Mxy = Mxy; > ++ this.Myx = Myx; > ++ this.Myy = Myy; > ++ } > ++ > ++ public void moveTo(float x0, float y0) { > ++ out.moveTo(x0 * Mxx + y0 * Mxy, > ++ x0 * Myx + y0 * Myy); > ++ } > ++ > ++ public void lineTo(float x1, float y1) { > ++ out.lineTo(x1 * Mxx + y1 * Mxy, > ++ x1 * Myx + y1 * Myy); > ++ } > ++ > ++ public void quadTo(float x1, float y1, > ++ float x2, float y2) > ++ { > ++ out.quadTo(x1 * Mxx + y1 * Mxy, > ++ x1 * Myx + y1 * Myy, > ++ x2 * Mxx + y2 * Mxy, > ++ x2 * Myx + y2 * Myy); > ++ } > ++ > ++ public void curveTo(float x1, float y1, > ++ float x2, float y2, > ++ float x3, float y3) > ++ { > ++ out.curveTo(x1 * Mxx + y1 * Mxy, > ++ x1 * Myx + y1 * Myy, > ++ x2 * Mxx + y2 * Mxy, > ++ x2 * Myx + y2 * Myy, > ++ x3 * Mxx + y3 * Mxy, > ++ x3 * Myx + y3 * Myy); > ++ } > ++ > ++ public void closePath() { > ++ out.closePath(); > ++ } > ++ > ++ public void pathDone() { > ++ out.pathDone(); > ++ } > ++ > ++ public long getNativeConsumer() { > ++ return 0; > ++ } > ++ } > + } -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Thu Feb 24 16:42:34 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 00:42:34 +0000 Subject: /hg/icedtea6: fix hotspot hs20 build on powerpc and powerpc64 In-Reply-To: References: Message-ID: <20110225004234.GW3448@rivendell.middle-earth.co.uk> On 00:24 Fri 25 Feb , doko at icedtea.classpath.org wrote: > changeset 896d8e5807c7 in /hg/icedtea6 > details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=896d8e5807c7 > author: doko at ubuntu.com > date: Fri Feb 25 01:14:43 2011 +0100 > > fix hotspot hs20 build on powerpc and powerpc64 > > 2011-02-24 Matthias Klose > > * patches/hotspot/hs20/powerpc-stacksize.patch: New, > increase stack size for powerpc builds. > * Makefile.am (ICEDTEA_PATCHES): Apply. > > FYI: for future reference, it's nice to put the bug ID (PR641 here) in the first line of the commit message so it appears in the summary. -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From andrew at icedtea.classpath.org Thu Feb 24 16:45:45 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 25 Feb 2011 00:45:45 +0000 Subject: /hg/icedtea6: Update NEWS with latest bug fixes. Message-ID: changeset a11e45028768 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=a11e45028768 author: Andrew John Hughes date: Fri Feb 25 00:45:39 2011 +0000 Update NEWS with latest bug fixes. 2011-02-25 Andrew John Hughes * NEWS: Update with latest bug fixes. diffstat: 2 files changed, 6 insertions(+) ChangeLog | 4 ++++ NEWS | 2 ++ diffs (23 lines): diff -r 896d8e5807c7 -r a11e45028768 ChangeLog --- a/ChangeLog Fri Feb 25 01:14:43 2011 +0100 +++ b/ChangeLog Fri Feb 25 00:45:39 2011 +0000 @@ -1,3 +1,7 @@ 2011-02-24 Matthias Klose + + * NEWS: Update with latest bug fixes. + 2011-02-24 Matthias Klose * patches/hotspot/hs20/powerpc-stacksize.patch: New, diff -r 896d8e5807c7 -r a11e45028768 NEWS --- a/NEWS Fri Feb 25 01:14:43 2011 +0100 +++ b/NEWS Fri Feb 25 00:45:39 2011 +0000 @@ -444,6 +444,8 @@ New in release 1.10 (2011-XX-XX): - PR586: Sources missing from src.zip - PR639: Add missing include line, paths and LLVM flags for Shark. - PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. + - PR641: Increase stack size for PPC + - PR497: Mercurial revision detection not very reliable * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. From andrew at icedtea.classpath.org Thu Feb 24 16:46:18 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 25 Feb 2011 00:46:18 +0000 Subject: /hg/release/icedtea6-1.10: Update NEWS with latest bug fixes. Message-ID: changeset f1416523b090 in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=f1416523b090 author: Andrew John Hughes date: Fri Feb 25 00:45:39 2011 +0000 Update NEWS with latest bug fixes. 2011-02-25 Andrew John Hughes * NEWS: Update with latest bug fixes. diffstat: 2 files changed, 6 insertions(+) ChangeLog | 4 ++++ NEWS | 2 ++ diffs (23 lines): diff -r b442b847be56 -r f1416523b090 ChangeLog --- a/ChangeLog Fri Feb 25 01:17:08 2011 +0100 +++ b/ChangeLog Fri Feb 25 00:45:39 2011 +0000 @@ -1,3 +1,7 @@ 2011-02-24 Matthias Klose + + * NEWS: Update with latest bug fixes. + 2011-02-24 Matthias Klose * patches/hotspot/hs20/powerpc-stacksize.patch: New, diff -r b442b847be56 -r f1416523b090 NEWS --- a/NEWS Fri Feb 25 01:17:08 2011 +0100 +++ b/NEWS Fri Feb 25 00:45:39 2011 +0000 @@ -442,6 +442,8 @@ New in release 1.10 (2011-XX-XX): - PR586: Sources missing from src.zip - PR639: Add missing include line, paths and LLVM flags for Shark. - PR640: JamVM fails to build - Unrecognised option: -XX:ThreadStackSize. + - PR641: Increase stack size for PPC + - PR497: Mercurial revision detection not very reliable * Cleanup - Patches are no longer prefixed with 'icedtea-'. - All m4 macros are now prefixed with 'IT_' to denote their origin correctly. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:09:08 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:09:08 +0000 Subject: [Bug 642] New: openjdk/hotspot/test/gc/6581734 fails to compile Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=642 Summary: openjdk/hotspot/test/gc/6581734 fails to compile Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net openjdk/hotspot/test/gc/6581734 fails to compile, reason is simple: icedtea6-1.9.7/openjdk/hotspot/test/gc/6581734/Test6581734.java:124: ')' expected throw new RuntimeException("collectors found with zero time"; ^ If required I can attach the full JTR. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:10:42 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:10:42 +0000 Subject: [Bug 643] New: openjdk/hotspot/test/runtime/6929067 fails to run on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=643 Summary: openjdk/hotspot/test/runtime/6929067 fails to run on ia64 Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net openjdk/hotspot/test/runtime/6929067 fails to run on ia64, probably because of hardcoded x86 paths. JTR attached. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:11:05 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:11:05 +0000 Subject: [Bug 643] openjdk/hotspot/test/runtime/6929067 fails to run on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=643 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:11 ------- Created an attachment (id=462) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=462&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:15:29 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:15:29 +0000 Subject: [Bug 644] New: Internal Error when running test/compiler/6849574 on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=644 Summary: Internal Error when running test/compiler/6849574 on ia64 Product: IcedTea Version: 6-1.9.7 Platform: ia64 OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net # Internal Error (referenceProcessor.cpp:1369), pid=8969, tid=2305843043592335872 # guarantee(sentinel_ref() != NULL && sentinel_ref()->is_oop()) failed: Lost _sentinelRef JTR and HS error log attached. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:15:48 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:15:48 +0000 Subject: [Bug 644] Internal Error when running test/compiler/6849574 on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=644 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:15 ------- Created an attachment (id=463) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=463&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:18:39 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:18:39 +0000 Subject: [Bug 644] Internal Error when running test/compiler/6849574 on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=644 ------- Comment #2 from devurandom at gmx.net 2011-02-25 07:18 ------- (In reply to comment #0) > JTR and HS error log attached. Please ignore the part about the HS log. That was already gone from the JTwork/scratch directory. Maybe it got dumped to /tmp, but I just emptied that dir because if was filled with files apparently created during several test runs. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:19:45 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:19:45 +0000 Subject: [Bug 645] New: openjdk/hotspot/test/compiler/6795161 does not run: Unrecognized VM option '+DoEscapeAnalysis' Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=645 Summary: openjdk/hotspot/test/compiler/6795161 does not run: Unrecognized VM option '+DoEscapeAnalysis' Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net Unrecognized VM option '+DoEscapeAnalysis' Could not create the Java virtual machine. JTR attached. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:20:05 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:20:05 +0000 Subject: [Bug 645] openjdk/hotspot/test/compiler/6795161 does not run: Unrecognized VM option '+DoEscapeAnalysis' Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=645 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:20 ------- Created an attachment (id=464) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=464&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:21:17 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:21:17 +0000 Subject: [Bug 643] openjdk/hotspot/test/runtime/6929067 fails to run on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=643 devurandom at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|all |ia64 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:21:49 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:21:49 +0000 Subject: [Bug 646] New: test/tools/javac/processing/6499119 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=646 Summary: test/tools/javac/processing/6499119 fails Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net test result: Error. Parse Exception: Bad option for compile: process JTR attached -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:22:03 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:22:03 +0000 Subject: [Bug 646] test/tools/javac/processing/6499119 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=646 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:22 ------- Created an attachment (id=465) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=465&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:23:50 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:23:50 +0000 Subject: [Bug 647] New: openjdk/langtools/test/tools/javac/limits fails with java.lang.StackOverflowError Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=647 Summary: openjdk/langtools/test/tools/javac/limits fails with java.lang.StackOverflowError Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net The system is out of resources. Consult the following stack trace for details. java.lang.StackOverflowError [...] JTR attached. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:24:06 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:24:06 +0000 Subject: [Bug 647] openjdk/langtools/test/tools/javac/limits fails with java.lang.StackOverflowError Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=647 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:24 ------- Created an attachment (id=466) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=466&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:25:37 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:25:37 +0000 Subject: [Bug 647] openjdk/langtools/test/tools/javac/limits fails with java.lang.StackOverflowError Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=647 ------- Comment #2 from devurandom at gmx.net 2011-02-25 07:25 ------- Created an attachment (id=467) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=467&action=view) JTR (ArrayDims3) Previous JTR was for ArrayDims1 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:26:45 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:26:45 +0000 Subject: [Bug 648] New: openjdk/langtools/test/tools/javac/generics/inference/6638712 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=648 Summary: openjdk/langtools/test/tools/javac/generics/inference/66 38712 fails Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net T6638712a.java:16:41: compiler.err.invalid.inferred.types: T, (- compiler.misc.inferred.do.not.conform.to.params: java.lang.Iterable>, java.util.List>) 1 error result: Failed. Output does not match reference file: T6638712a.out, line 1 JTR attached -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:28:12 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:28:12 +0000 Subject: [Bug 648] openjdk/langtools/test/tools/javac/generics/inference/6638712 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=648 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:28 ------- Created an attachment (id=468) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=468&action=view) JTR If you need the .out file and can tell me where to find it, please say so. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:29:38 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:29:38 +0000 Subject: [Bug 648] openjdk/langtools/test/tools/javac/generics/inference/6638712 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=648 ------- Comment #2 from devurandom at gmx.net 2011-02-25 07:29 ------- Created an attachment (id=469) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=469&action=view) JTR (b) Previous JTR was for T6638712a, this one is for -b. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:30:03 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:30:03 +0000 Subject: [Bug 648] openjdk/langtools/test/tools/javac/generics/inference/6638712 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=648 ------- Comment #3 from devurandom at gmx.net 2011-02-25 07:30 ------- Created an attachment (id=470) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=470&action=view) JTR (c) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:30:21 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:30:21 +0000 Subject: [Bug 648] openjdk/langtools/test/tools/javac/generics/inference/6638712 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=648 ------- Comment #4 from devurandom at gmx.net 2011-02-25 07:30 ------- Created an attachment (id=471) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=471&action=view) JTR (d) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:30:40 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:30:40 +0000 Subject: [Bug 648] openjdk/langtools/test/tools/javac/generics/inference/6638712 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=648 ------- Comment #5 from devurandom at gmx.net 2011-02-25 07:30 ------- Created an attachment (id=472) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=472&action=view) JTR (e) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:31:26 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:31:26 +0000 Subject: [Bug 649] New: openjdk/langtools/test/tools/javac/generics/inference/6650759 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=649 Summary: openjdk/langtools/test/tools/javac/generics/inference/66 50759 fails Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net T6650759m.java:43:36: compiler.err.prob.found.req: (- compiler.misc.incompatible.types), java.util.List, java.util.List 1 error result: Failed. Output does not match reference file: T6650759m.out, line 1 JTR attached -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:31:42 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:31:42 +0000 Subject: [Bug 649] openjdk/langtools/test/tools/javac/generics/inference/6650759 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=649 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:31 ------- Created an attachment (id=473) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=473&action=view) JTR (m) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:33:05 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:33:05 +0000 Subject: [Bug 650] New: openjdk/jdk/test/java/lang/management/MemoryMXBean fails with error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=650 Summary: openjdk/jdk/test/java/lang/management/MemoryMXBean fails with error Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net Exception in thread "Checker thread" java.lang.RuntimeException: Notif Count = 2 expected to be 1 at CollectionUsageThreshold$Checker.checkResult(CollectionUsageThreshold.java:211) at CollectionUsageThreshold$Checker.run(CollectionUsageThreshold.java:197) result: Error. Execution failed JTR attached -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:33:38 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:33:38 +0000 Subject: [Bug 650] openjdk/jdk/test/java/lang/management/MemoryMXBean fails with error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=650 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:33 ------- Created an attachment (id=474) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=474&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:36:42 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:36:42 +0000 Subject: [Bug 651] New: openjdk/jdk/test/com/sun/jdi fails with error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=651 Summary: openjdk/jdk/test/com/sun/jdi fails with error Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net The test fails and apparently the harness does not notice it, ever, because the test timeouts after 3h (patched by me, since my machine is slow). Shall the timeout be reported in a separate bug? Starting: /var/tmp/portage/dev-java/icedtea-6.1.9.7-r2/work/icedtea6-1.9.7/openjdk.build/j2sdk-image/jre/bin/java -classpath /var/tmp/portage/dev-java/icedtea-6.1.9.7-r2/work/icedtea6-1.9.7/test/jdk/JTwork/classes/com/sun/jdi -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=60389 -agentlib:jdwp=transport=dt_socket,server=y,suspend=y,address=60389 Exit0 Error occurred during initialization of VM agent library failed to init: jdwp ERROR: Cannot load this JVM TI agent twice, check your java command line for duplicate jdwp options. ----------System.err:(0/0)---------- result: Error. Program `/var/tmp/portage/dev-java/icedtea-6.1.9.7-r2/work/icedtea6-1.9.7/openjdk.build/j2sdk-image/bin/java' interrupted! (timed out?) JTR attached. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:37:00 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:37:00 +0000 Subject: [Bug 651] openjdk/jdk/test/com/sun/jdi fails with error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=651 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:37 ------- Created an attachment (id=475) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=475&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:38:19 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:38:19 +0000 Subject: [Bug 651] openjdk/jdk/test/com/sun/jdi fails with error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=651 ------- Comment #2 from devurandom at gmx.net 2011-02-25 07:38 ------- Created an attachment (id=476) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=476&action=view) JTR (PopAsynchronous) Previous JTR was about DoubleAgent, this one is for PopAsynchronous, both in the jdi test group. run args: [PopAsynchronousTarg] popping fibonacci(2) java.lang.UnsupportedOperationException: target does not support popping frames at com.sun.tools.jdi.ThreadReferenceImpl.popFrames(ThreadReferenceImpl.java:539) at PopAsynchronousTest$HarassThread.run(PopAsynchronousTest.java:137) TEST FAILURE: exception java.lang.UnsupportedOperationException: target does not support popping frames Harassment complete, count = 0 result: Error. Program `/var/tmp/portage/dev-java/icedtea-6.1.9.7-r2/work/icedtea6-1.9.7/openjdk.build/j2sdk-image/bin/java' interrupted! (timed out?) -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:39:37 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:39:37 +0000 Subject: [Bug 652] New: openjdk/jdk/test/java/lang/System/finalization fails with timeout Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=652 Summary: openjdk/jdk/test/java/lang/System/finalization fails with timeout Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net I cannot see the reason for the timeout, maybe a deadlock? JTR attached. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:39:53 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:39:53 +0000 Subject: [Bug 652] openjdk/jdk/test/java/lang/System/finalization fails with timeout Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=652 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:39 ------- Created an attachment (id=477) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=477&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:40:31 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:40:31 +0000 Subject: [Bug 646] openjdk/langtools/test/tools/javac/processing/6499119 fails Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=646 devurandom at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|test/tools/javac/processing/|openjdk/langtools/test/tools |6499119 fails |/javac/processing/6499119 | |fails -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:41:42 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:41:42 +0000 Subject: [Bug 651] openjdk/jdk/test/com/sun/jdi fails with error Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=651 devurandom at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|all |ia64 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:46:44 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:46:44 +0000 Subject: [Bug 653] New: Internal Error when running test/jdk: os_linux_zero.cpp:236 - caught unhandled signal 7 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=653 Summary: Internal Error when running test/jdk: os_linux_zero.cpp:236 - caught unhandled signal 7 Product: IcedTea Version: 6-1.9.7 Platform: all OS/Version: Linux Status: NEW Severity: normal Priority: P2 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: devurandom at gmx.net Happens for example with openjdk/jdk/test/java/rmi/MarshalledObject/compare, but also several other tests I looked at so far (1313 are failing in total). JTR attached. The attached HS error log was created when running another test, but fails in the same place: os_linux_zero.cpp:236 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:46:58 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:46:58 +0000 Subject: [Bug 653] Internal Error when running test/jdk: os_linux_zero.cpp:236 - caught unhandled signal 7 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=653 ------- Comment #1 from devurandom at gmx.net 2011-02-25 07:46 ------- Created an attachment (id=478) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=478&action=view) JTR -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:47:16 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:47:16 +0000 Subject: [Bug 653] Internal Error when running test/jdk: os_linux_zero.cpp:236 - caught unhandled signal 7 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=653 ------- Comment #2 from devurandom at gmx.net 2011-02-25 07:47 ------- Created an attachment (id=479) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=479&action=view) HS error log -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:55:18 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:55:18 +0000 Subject: [Bug 653] Internal Error when running test/jdk: os_linux_zero.cpp:236 - caught unhandled signal 7 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=653 ------- Comment #3 from devurandom at gmx.net 2011-02-25 07:55 ------- P.S: iirc SIGBUS on ia64 is usually an unaligned memory access, see also the IA64 SysV ABI: http://refspecs.freestandards.org/elf/IA64-SysV-psABI.pdf -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:57:55 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:57:55 +0000 Subject: [Bug 644] Internal Error when running test/compiler/6849574 in referenceProcessor.cpp:1369 on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=644 devurandom at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Internal Error when running |Internal Error when running |test/compiler/6849574 on |test/compiler/6849574 in |ia64 |referenceProcessor.cpp:1369 | |on ia64 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:58:38 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:58:38 +0000 Subject: [Bug 653] Internal Error in os_linux_zero.cpp:236 when running test/jdk on ia64: caught unhandled signal 7 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=653 devurandom at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Platform|all |ia64 Summary|Internal Error when running |Internal Error in |test/jdk: |os_linux_zero.cpp:236 when |os_linux_zero.cpp:236 - |running test/jdk on ia64: |caught unhandled signal 7 |caught unhandled signal 7 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Thu Feb 24 23:59:05 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 07:59:05 +0000 Subject: [Bug 644] Internal Error in referenceProcessor.cpp:1369 when running test/compiler/6849574 on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=644 devurandom at gmx.net changed: What |Removed |Added ---------------------------------------------------------------------------- Summary|Internal Error when running |Internal Error in |test/compiler/6849574 in |referenceProcessor.cpp:1369 |referenceProcessor.cpp:1369 |when running |on ia64 |test/compiler/6849574 on | |ia64 -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From bugzilla-daemon at icedtea.classpath.org Fri Feb 25 02:06:26 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Fri, 25 Feb 2011 10:06:26 +0000 Subject: [Bug 643] openjdk/hotspot/test/runtime/6929067 fails to run on ia64 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=643 ------- Comment #2 from devurandom at gmx.net 2011-02-25 10:06 ------- Message is: gcc: .../openjdk.build/j2sdk-image/jre/lib/i386/client/libjvm.so: No such file or directory .../openjdk/hotspot/test/runtime/6929067/Test6929067.sh: line 59: ./invoke: No such file or directory Assumed reason: $(CC) fails to compile the extra binary "invoke", but the failure is ignored. Later when actually executing the test, the program is missing for obvious reasons. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug, or are watching the assignee. From jvanek at redhat.com Fri Feb 25 03:31:10 2011 From: jvanek at redhat.com (Jiri Vanek) Date: Fri, 25 Feb 2011 12:31:10 +0100 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <20110225003316.GR3448@rivendell.middle-earth.co.uk> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> <4D669AD5.3070907@redhat.com> <20110224184453.GN3448@rivendell.middle-earth.co.uk> <4D66AE15.7010307@redhat.com> <20110225003316.GR3448@rivendell.middle-earth.co.uk> Message-ID: <4D6792FE.4080604@redhat.com> [snip] Please don't forget that this was initially started, because javaws -about was hanging after closing of about window [1]#c1. So far we have successfully decided that we will lunch about.jar from local instalaltion instead from classpath.org [1] (although we can exec it eg by ProcessBuilder, or via Desktop class,just invoke dialog when about.jar will be on classpath). From my point of view is keeping executing jnlp the most suitable, but we must take all restrictions following from javaws sandbox. Now we need to read about.jnlp file which is stored in same directory as netx.jar and about.jar. (Or wee can keep using jnlp inside jar!). notThe reading of file outside of jar is much nicer, but brings problem to locate it. Whether we use my approach of dynamic resolving[2] or Omair's build.properties[3] I don't care. My opinion is, that if there are more usages for build.properties, then we definitely should use them as they are very useful and flexible. On the other hand, if there is no more use then we should use my simple hack. Build.properties can work little bit "unpredictable-because-i'm-dummy" when installed from rpm. But I'm not configure/makefile guy;) For the signed/unsigned about jar - there is absolutly no need to have signed jar. Application shows just a window with text! We deffinetly should get rid of the signature. But it will bring limitations of unsigned jars. I can just guess why jar was signed - for working links? because author was snot sure about ivokelater? ... Most of the links in 'second tab' is not working either, or are useless. I really think that they have no place in "about window". And if there will remain some link (eg classpath.org) they do not need to be clickable. In case of unsigned jar is my patch [4] correct. I have removed all parts which needed special permissions. And i have removed invokelater (all thread work need special permissions). Removing of invokelater with DISPOSE_ON_CLOSE running in javaws thread for single appliaction will work correctly (each new application in javaws runtime have its own thread). I would be little bit more careful if about window have to have some more logic in future... But I doubt it will have. [1] https://bugzilla.redhat.com/show_bug.cgi?id=677334 [2] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012332.html Boot.java [3] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012345.html [4] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012332.html Main.java Regards J. From omajid at redhat.com Fri Feb 25 07:38:09 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 10:38:09 -0500 Subject: [icedtea-web] RFC: add proxy auto config support In-Reply-To: <20110217221617.GC27039@rivendell.middle-earth.co.uk> References: <4D5C23D0.7050809@redhat.com> <20110216195129.GB26007@rivendell.middle-earth.co.uk> <4D5C39D6.2050308@redhat.com> <20110217221617.GC27039@rivendell.middle-earth.co.uk> Message-ID: <4D67CCE1.6020205@redhat.com> On 02/17/2011 05:16 PM, Dr Andrew John Hughes wrote: > On 15:55 Wed 16 Feb , Omair Majid wrote: >> On 02/16/2011 02:51 PM, Dr Andrew John Hughes wrote: >>> On 14:21 Wed 16 Feb , Omair Majid wrote: >>>> The attached patch adds support for reading, parsing and using proxy >>>> auto config (PAC) files to icedtea-web. >>>> >>>> PAC files are written in javascript, so this patch also adds a >>>> dependency on rhino for building. A dependency on jrunscript is also >>>> added for testing. >>>> >>>> PAC files will be used by both plugin and netx if deployment.proxy.type >>>> is 2 (PAC) and deployment.proxy.auto.config.url points to a valid PAC >>>> file. PAC files may also be used by netx if deployment.proxy.type is 3 >>>> (browser) and the browser (firefox) is using a proxy auto config file >>>> for resolving proxies. >>>> >>>> The PAC file is evaluated inside a sandbox - which only has permissions >>>> to resolve urls. Because we dont want to grant createclassloader >>>> permissions, I have had to set (in ProxyAutoConfig.java): >>>> cx.setOptimizationLevel(-1); >>>> which works without creating classes (and so works without >>>> createClassLoader permissions). This option is not available by going >>>> through the Java ScriptEngine apis. The patch therefore uses the rhino >>>> apis directly. >>>> >>>> Since parsing a PAC file requires access to a set of additional >>>> functions, the patch also implements them. Tests for these are included. >>>> >>>> make check should run these tests and end by printing a line like: >>>> X of Y tests failed >>>> >>>> Any thoughts or comments? >>>> Some further changes: the attached patch now works with or without rhino support. If rhino is not available, it always returns "DIRECT" as the proxy. >>> There seems to be a completely broken assumption that rhino.jar is going >>> to be in the JDK??? It should detect it as IcedTea does. >>> >> >> I think I do. The check for sun.org.mozilla.javascript.Context that you >> have pointed out later is a check for rhino. And rhino.jar is in the JDK >> (at least it appears on icedtea6's default builds). > > It might be in IcedTea. It is not in any arbitrary JDK. We are trying to > break ties to IcedTea, not introduce more. > > We should be using the system Rhino which has org.mozilla.javascript.Context. > Done. The attached patches uses the system rhino (if available). >> >>> What is jrunscript? I've never heard of this before. >>> >> >> It's a tool under JDK_HOME/bin (in icedtea6 builds). It's a front end to >> rhino's shell. The patch I posed uses it to run javascript though the shell. >> > > Right, ok. Not heard of this before. > Does Rhino not provide it itself? Or is it only in the JDK? > Hm... Rhino does provide a binary named rhino (in /usr/bin on my system) that appears to be the same thing. In the attached patch though, I create a simple wrapper script (also named jrunscript) that just invokes the rhino Main class. >>>> + if [ -e $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar ] ; then \ >>>> + ln -s $(SYSTEM_JDK_DIR)/jre/lib/rhino.jar $(BOOT_DIR)/jre/lib ; \ >>>> + else \ >>>> + ln -s rt.jar $(BOOT_DIR)/jre/lib/rhino.jar ; \ >>> >>> This is even more confusing. First you assume that rhino.jar is going to be in >>> the JDK. If it isn't there, you then symlink to rt.jar??? >>> >> >> I do check for sun.org.mozilla.javascript.Context (that's one of the few >> rhino classes we care about) in configure. >> > > You want org.mozilla.javascript.Context. The sun prefixed version is some > Oracle JDK specific thing. > >> What I wanted to express in the makefile/configure (and clearly failed >> to) is this: >> 1. rhino classes are required to build now (that's the configure check). > > Fine. > >> 2. rhino.jar should be included in the classpath if it exists. If >> rhino.jar does not exist (but we found it's classes), it's probably >> rt.jar. So symlink rhino.jar to it. > > No it's not probably rt.jar. Please just use the Rhino check from IcedTea. > Done. >> 3. Use rhino.jar when trying to compile code. > > The problem with this is the hardcoded path, you need to know where the system > rhino is and use that. > >> >> Does that make sense? >> > > It does, it's just going about it the wrong way. > Hopefully the attached patch does it the right way. >>>> fi >>>> ln -sf $(SYSTEM_JDK_DIR)/jre/lib/$(JRE_ARCH_DIR) \ >>>> $(BOOT_DIR)/jre/lib/&& \ >>>> diff -r cd1eda4f0d97 acinclude.m4 >>>> --- a/acinclude.m4 Tue Feb 15 11:01:01 2011 -0500 >>>> +++ b/acinclude.m4 Wed Feb 16 13:59:02 2011 -0500 >>>> @@ -250,6 +250,40 @@ >>>> AC_SUBST(ECJ_JAR) >>>> ]) >>>> >>>> +AC_DEFUN([FIND_JRUNSCRIPT], >>> >>> Missing prefix; should be IT_FIND_JRUNSCRIPT. >>> >> >> I looked around acinclude.m4 and was slightly confused about the naming. >> I will fix this and post an update. >> > > The IT_ prefix is used to denote IcedTea macros. > On second thoughts, this should really use ITW_ if it's IcedTea-Web-specific. > The IT_ ones are imported from IcedTea6. > Well, the rhino check is from IT, so I have left it as IT_. The java check is IT_ as it based on IT_FIND_JAVAC. >>>> +[ >>>> + AC_MSG_CHECKING([for jrunscript]) >>>> + AC_ARG_WITH([jrunscript], >>>> + [AS_HELP_STRING(--with-jrunscript,specify location of the jrunscript binary)], >>>> + [ >>>> + if test -f "${withval}"; then >>>> + JRUNSCRIPT="${withval}" >>>> + fi >>>> + ], >>> >>> You don't handle withval being yes or no, which is valid (generated by --with-jrunscript or >>> --without-jrunscript). >>> >> >> Thanks, I will fix this. >> The attached patch does not have --with-jrunscript. >>>> + [ >>>> + JRUNSCRIPT=${SYSTEM_JDK_DIR}/bin/jrunscript >>>> + ]) >>>> + if test -z "${JRUNSCRIPT}"; then >>>> + for dir in /usr/lib/jvm/java-openjdk/bin /usr/lib/jvm/icedtea6/bin \ >>>> + /usr/lib/jvm/java-6-openjdk/bin /usr/lib/jvm/openjdk/bin \ >>>> + /usr/lib/jvm/java-icedtea/bin /usr/lib/jvm/java-gcj/bin \ >>>> + /usr/lib/jvm/gcj-jdk/bin ; do >>>> + if test -e $dir/jrunscript; then >>>> + JRUNSCRIPT=$dir/jrunscript >>>> + break >>>> + fi >>>> + done >>>> + if test -z "${JRUNSCRIPT}"; then >>>> + JRUNSCRIPT=no >>>> + fi >>>> + fi >>>> + AC_MSG_RESULT(${JRUNSCRIPT}) >>>> + if test "x${JRUNSCRIPT}" = "xno" ; then >>>> + AC_MSG_WARN([cannot find a jrunscript, use --with-jrunscript]) >>>> + fi >>>> + AC_SUBST(JRUNSCRIPT) >>>> +]) >>>> + >>>> AC_DEFUN_ONCE([IT_CHECK_PLUGIN], >>>> [ >>>> AC_MSG_CHECKING([whether to build the browser plugin]) >>>> diff -r cd1eda4f0d97 configure.ac >>>> --- a/configure.ac Tue Feb 15 11:01:01 2011 -0500 >>>> +++ b/configure.ac Wed Feb 16 13:59:02 2011 -0500 >>>> @@ -34,6 +34,7 @@ >>>> FIND_ECJ_JAR >>>> IT_FIND_JAVADOC >>>> AC_CONFIG_FILES([javac], [chmod +x javac]) >>>> +FIND_JRUNSCRIPT >>>> >>>> IT_SET_VERSION >>>> IT_CHECK_XULRUNNER_VERSION >>>> @@ -64,6 +65,7 @@ >>>> IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEMANAGER, [java.net.CookieManager]) >>>> IT_CHECK_FOR_CLASS(JAVA_NET_HTTPCOOKIE, [java.net.HttpCookie]) >>>> IT_CHECK_FOR_CLASS(JAVA_NET_COOKIEHANDLER, [java.net.CookieHandler]) >>>> +IT_CHECK_FOR_CLASS(SUN_ORG_MOZILLA_JAVASCRIPT_CONTEXT, [sun.org.mozilla.javascript.Context]) >>> >>> Ugh... we should be making this list shorter not adding to it. >>> Why is this necessary? Why can't you use a standard class from the JDK or Rhino? >>> >> >> This is rhino :) Or at least, rhino as icedtea6 ships it. > > Hacked up Rhino from the rewriter. Don't use. > Fixed to remove this check and use real rhino. >>>> diff -r cd1eda4f0d97 netx/net/sourceforge/jnlp/resources/pac-funcs.js >>>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >>>> +++ b/netx/net/sourceforge/jnlp/resources/pac-funcs.js Wed Feb 16 13:59:02 2011 -0500 >>>> @@ -0,0 +1,830 @@ >>>> +/* pac-funcs.js >>>> + Copyright (C) 2011 Red Hat, Inc. >>>> + >>>> +This file is part of IcedTea. >>>> + >>>> +IcedTea is free software; you can redistribute it and/or >>>> +modify it under the terms of the GNU General Public License as published by >>>> +the Free Software Foundation, version 2. >>>> + >>> >>> Shouldn't these headers now say IcedTea-Web? >>> >> >> I am just going with the flow. I can fix this one if you want. Do you >> want me to fix all others too? /me shudders at the thought of a patch >> that updates all headers > > Oracle love such header changes :-) It means all the backports break > in really stupid ways... > > No, I don't think it's worth the hassle. It's still in the IcedTea superproject. > Ok, so I have left it unchanged. >>>> +/* >>>> + * These helper functions are required to be able to parse Proxy Auto Config >>>> + * (PAC) files. PAC files will use these helper functions to decide the best >>>> + * proxy for connecting to a host. >>>> + * >>>> + * This implementation is based on the description at: >>>> + * http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html >>>> + */ >>> >>> Based on? To what extent? Is any of this code copied? Is it legal? >>> >> >> There is no code provided at that url (well, there is some code that >> shows how the functions might be used). Just function descriptions and >> examples. I made sure not to use any of their examples. The javadocs >> consist of descriptions of the functions in my own words. >> >> Also that url seems dead now :/ This works for me right now: >> http://web.archive.org/web/20080406080210/http://wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html >> > > Ugh... Is there a more stable URL? > I havent been able to find one yet :/ Which is quite surprising given that some current firefox documentation links to it. >>> >>>> +import sun.org.mozilla.javascript.Context; >>>> +import sun.org.mozilla.javascript.Function; >>>> +import sun.org.mozilla.javascript.Scriptable; >>> >>> Please don't add more sun.* dependencies. >>> >> >> I only added it because it's rhino. If you are not comfortable having >> rhino as a required dependency, I can try and make it optional. >> > > The problem is, as mentioned above, you need to use proper Rhino not > the hacked up version in IcedTea6. > Done. These dependencies are now org.mozilla.javascript.*. >>>> diff -r cd1eda4f0d97 tests/netx/pac/pac-funcs-test.js >>>> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >>>> +++ b/tests/netx/pac/pac-funcs-test.js Wed Feb 16 13:59:02 2011 -0500 >>>> @@ -0,0 +1,446 @@ >>>> + >>>> +var ICEDTEA_CLASSPATH_ORG_IP = "208.78.240.231"; >>>> +var CLASSPATH_ORG_IP = "199.232.41.10"; >>> >>> These should be able to be overridden. Same with others below. >>> >> >> Do you mean make check should be setting the value of these constants? >> Which others below are you talking about? I only see various 0 and 255 >> combinations below and they are netmasks. >> > > Sorry I meant the use of 'icedtea.classpath.org'. It would be nice to pass > these as arguments but it can wait until another patch. > I have left it unchanged for now. >>> >>> Needs work. >> >> Nice summary :) I posted this knowing it was (very likely) incomplete. >> Thanks for your comments. They are always appreciated! >> > > No worries, hope you don't mind my savaging of your code! ;-) > Savaging? I prefer to think of it as improving :) Any thoughts on the attached patch? Also, do you have any links to good documentation on AC_CONFIG_FILES and good practices for it? I would like to use it if possible for build.properties but so far I dont have much to go on. Thanks, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: pac-support-07.patch Type: text/x-patch Size: 74909 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110225/d03483bc/pac-support-07.patch From omajid at redhat.com Fri Feb 25 08:09:13 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 11:09:13 -0500 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D6792FE.4080604@redhat.com> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> <20110224170431.GJ3448@rivendell.middle-earth.co.uk> <4D669AD5.3070907@redhat.com> <20110224184453.GN3448@rivendell.middle-earth.co.uk> <4D66AE15.7010307@redhat.com> <20110225003316.GR3448@rivendell.middle-earth.co.uk> <4D6792FE.4080604@redhat.com> Message-ID: <4D67D429.1060001@redhat.com> On 02/25/2011 06:31 AM, Jiri Vanek wrote: > [snip] > Please don't forget that this was initially started, because javaws > -about was hanging after closing of about window [1]#c1. > Right; I was focusing more on keeping the information up to date (that is, running it locally) > So far we have successfully decided that we will lunch about.jar from > local instalaltion instead from classpath.org [1] (although we can exec > it eg by ProcessBuilder, or via Desktop class,just invoke dialog when > about.jar will be on classpath). From my point of view is keeping > executing jnlp the most suitable, but we must take all restrictions > following from javaws sandbox. > > Now we need to read about.jnlp file which is stored in same directory as > netx.jar and about.jar. (Or wee can keep using jnlp inside jar!). notThe > reading of file outside of jar is much nicer, but brings problem to > locate it. Whether we use my approach of dynamic resolving[2] or Omair's > build.properties[3] I don't care. My opinion is, that if there are more > usages for build.properties, then we definitely should use them as they > are very useful and flexible. On the other hand, if there is no more use > then we should use my simple hack. Yeah, the only reason I proposed a build.properties is because I have more stuff to add to it. The proxy auto config patch [1] that I just posted needs it. I would like to update the tagsoup patch [2] to also use build.properties. > Build.properties can work little bit "unpredictable-because-i'm-dummy" > when installed from rpm. But I'm not configure/makefile guy;) > Hm... are there any issues that you have run into? > For the signed/unsigned about jar - there is absolutly no need to have > signed jar. Application shows just a window with text! We deffinetly > should get rid of the signature. But it will bring limitations of > unsigned jars. I can just guess why jar was signed - for working links? > because author was snot sure about ivokelater? ... Most of the links in > 'second tab' is not working either, or are useless. I really think that > they have no place in "about window". And if there will remain some link > (eg classpath.org) they do not need to be clickable. > Sorry, I dont have any idea about why it was signed either. If the links are not working, they should definitely be removed. Also, I can confirm that invokeLater does not require any permissions. > In case of unsigned jar is my patch [4] correct. I have removed all > parts which needed special permissions. And i have removed invokelater > (all thread work need special permissions). Removing of invokelater with > DISPOSE_ON_CLOSE running in javaws thread for single appliaction will > work correctly (each new application in javaws runtime have its own > thread). I would be little bit more careful if about window have to have > some more logic in future... But I doubt it will have. > While I agree with you, there are two concerns: 1. The about.jar uses the net.sourceforge.jnlp.about package. IcedTea-Web explicitly disallows permission to use the net.sourceforge.jnlp package. From what I can tell, there is no way about can load classes from its own package (which lies under net.sourceforge.jnlp) unless it's granted permissions or the package is renamed. 2. While I am no expert on Swing, removing invokeLater seems like a bad idea. Please take a look at the javadocs [3] for details. I like to avoid hacks as much as possible. Perhaps EXIT_ON_CLOSE might be more appropriate and easily fix the problem? Cheers, Omair > [1] https://bugzilla.redhat.com/show_bug.cgi?id=677334 > [2] > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012332.html > Boot.java > [3] > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012345.html > > [4] > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012332.html > Main.java > > Regards J. [1] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012412.html [2] http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-January/011684.html [3] http://download.oracle.com/javase/6/docs/api/javax/swing/package-summary.html#threading From omajid at redhat.com Fri Feb 25 08:12:12 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 11:12:12 -0500 Subject: [icedtea-web] RFC: integrate jnlp authenticator into rest of security system In-Reply-To: <4D0FAD56.2050007@redhat.com> References: <4D0F9D37.9030102@redhat.com> <20101220182610.GD25130@rivendell.middle-earth.co.uk> <4D0FA2AF.4020806@redhat.com> <20101220191206.GG25130@rivendell.middle-earth.co.uk> <4D0FAD56.2050007@redhat.com> Message-ID: <4D67D4DC.2050006@redhat.com> On 12/20/2010 02:24 PM, Omair Majid wrote: > On 12/20/2010 02:12 PM, Dr Andrew John Hughes wrote: >> On 13:38 Mon 20 Dec , Omair Majid wrote: >>> On 12/20/2010 01:26 PM, Dr Andrew John Hughes wrote: >>>> On 13:15 Mon 20 Dec , Omair Majid wrote: >>>>> Hi, >>>>> >>>>> The attached patches further integrates JNLPAuthenticator and >>>>> PasswordAuthenticationDialog into icedtea-web. The patches shows the >>>>> dialogs using the secure thread, localizes strings, and removes >>>>> hardcoded mention of the icedteaplugin. >>>>> >>>>> I have split the change into two patches: one deals with renaming >>>>> files, >>>>> the other deals with the actual code changes. >>>>> >>>>> The first patch renames classes to ensure consistency. It contains no >>>>> functional changes (other than those required for renaming). The class >>>>> net.sourceforge.jnlp.security.SecurityWarning is renamed to >>>>> net.sourceforge.jnlp.security.SecurityDialogs, >>>>> net.sourceforge.jnlp.security.SecurityWarningDialog is renamed to >>>>> net.sourceforge.jnlp.security.SecurityDialog and >>>>> net.sourceforge.jnlp.security.PasswordAuthenticationDialog is >>>>> renamed to >>>>> net.sourceforge.jnlp.PasswordAuthenticationPanel. >>>>> >>>> >>>> What is the reason for the renaming? Could we not delay this until >>>> the 2.0 series? >>>> >>> >>> Well, the SecurityWarning class should show security _warnings_. The >>> second patch modifies (the original) SecurityWarning and >>> SecurityWarningDialog classes to display authentication dialogs dialogs >>> (along with warning dialogs). An authentication dialog is not a warning, >>> and hence the rename. >>> >>> In general, the idea is that anything sensitive that requires a GUI >>> dialog should be run through SecurityWarning/SecurityDialog. >>> >>> If you think that we we should hold off the rename, I am fine with that. >>> The names of classes might be misleading/awkward for a while then. >>> >> >> Are we planning other API changes in 1.1? I'm just trying to work out the >> extent to which we see 1.1 as stable, I guess. If we are making other API >> changes, then I guess the rename is ok. > > That depends on how you define API changes. We definitely will be adding > classes in the 1.1 time frame, but I am not sure if we have any more > renames/removals planned. > Any thoughts? If you are not ok with renaming the class, then I would like to skip that bit and apply the second part of the patch (which integrates the authentication dialog into the rest of the security system). Thanks, Omair From omajid at redhat.com Fri Feb 25 13:18:47 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 16:18:47 -0500 Subject: [icedtea-web] RFC: remove unused manifest file Message-ID: <4D681CB7.9070707@redhat.com> Hi, The attached patch removes an unused manifest file from icedtea-web. Okay to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: remove-unused-manifest.patch Type: text/x-patch Size: 381 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110225/964391f7/remove-unused-manifest.patch From andrew at icedtea.classpath.org Fri Feb 25 13:21:44 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 25 Feb 2011 21:21:44 +0000 Subject: /hg/icedtea6: Fix typo in debug build. Message-ID: changeset d38a85ed9c32 in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=d38a85ed9c32 author: Andrew John Hughes date: Fri Feb 25 21:21:36 2011 +0000 Fix typo in debug build. 2011-02-25 DJ Lucas * Makefile.am: (icedtea-debug-against-debug): Correct typo. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 2 +- diffs (24 lines): diff -r a11e45028768 -r d38a85ed9c32 ChangeLog --- a/ChangeLog Fri Feb 25 00:45:39 2011 +0000 +++ b/ChangeLog Fri Feb 25 21:21:36 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-25 Andrew John Hughes + + * Makefile.am: + (icedtea-debug-against-debug): Correct typo. + 2011-02-25 Andrew John Hughes * NEWS: Update with latest bug fixes. diff -r a11e45028768 -r d38a85ed9c32 Makefile.am --- a/Makefile.am Fri Feb 25 00:45:39 2011 +0000 +++ b/Makefile.am Fri Feb 25 21:21:36 2011 +0000 @@ -1398,7 +1398,7 @@ stamps/icedtea-debug-against-icedtea.sta stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp \ stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp \ stamps/add-zero-debug.stamp stamps/add-systemtap-debug.stamp stamps/add-pulseaudio-debug.stamp \ - stamps/add-nss-debug.stamp stamps/add/tzdata-support-debug.stamp + stamps/add-nss-debug.stamp stamps/add-tzdata-support-debug.stamp mkdir -p stamps touch stamps/icedtea-debug-against-icedtea.stamp From andrew at icedtea.classpath.org Fri Feb 25 13:22:53 2011 From: andrew at icedtea.classpath.org (andrew at icedtea.classpath.org) Date: Fri, 25 Feb 2011 21:22:53 +0000 Subject: /hg/release/icedtea6-1.10: Fix typo in debug build. Message-ID: changeset 7ae32a60dcca in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=7ae32a60dcca author: Andrew John Hughes date: Fri Feb 25 21:21:36 2011 +0000 Fix typo in debug build. 2011-02-25 DJ Lucas * Makefile.am: (icedtea-debug-against-debug): Correct typo. diffstat: 2 files changed, 6 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 2 +- diffs (24 lines): diff -r f1416523b090 -r 7ae32a60dcca ChangeLog --- a/ChangeLog Fri Feb 25 00:45:39 2011 +0000 +++ b/ChangeLog Fri Feb 25 21:21:36 2011 +0000 @@ -1,3 +1,8 @@ 2011-02-25 Andrew John Hughes + + * Makefile.am: + (icedtea-debug-against-debug): Correct typo. + 2011-02-25 Andrew John Hughes * NEWS: Update with latest bug fixes. diff -r f1416523b090 -r 7ae32a60dcca Makefile.am --- a/Makefile.am Fri Feb 25 00:45:39 2011 +0000 +++ b/Makefile.am Fri Feb 25 21:21:36 2011 +0000 @@ -1398,7 +1398,7 @@ stamps/icedtea-debug-against-icedtea.sta stamps/icedtea-debug-against-icedtea.stamp: stamps/icedtea-debug.stamp \ stamps/add-jamvm-debug.stamp stamps/add-cacao-debug.stamp \ stamps/add-zero-debug.stamp stamps/add-systemtap-debug.stamp stamps/add-pulseaudio-debug.stamp \ - stamps/add-nss-debug.stamp stamps/add/tzdata-support-debug.stamp + stamps/add-nss-debug.stamp stamps/add-tzdata-support-debug.stamp mkdir -p stamps touch stamps/icedtea-debug-against-icedtea.stamp From ahughes at redhat.com Fri Feb 25 13:26:12 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 21:26:12 +0000 Subject: [icedtea-web] RFC: integrate jnlp authenticator into rest of security system In-Reply-To: <4D67D4DC.2050006@redhat.com> References: <4D0F9D37.9030102@redhat.com> <20101220182610.GD25130@rivendell.middle-earth.co.uk> <4D0FA2AF.4020806@redhat.com> <20101220191206.GG25130@rivendell.middle-earth.co.uk> <4D0FAD56.2050007@redhat.com> <4D67D4DC.2050006@redhat.com> Message-ID: <20110225212612.GX3448@rivendell.middle-earth.co.uk> On 11:12 Fri 25 Feb , Omair Majid wrote: > On 12/20/2010 02:24 PM, Omair Majid wrote: > > On 12/20/2010 02:12 PM, Dr Andrew John Hughes wrote: > >> On 13:38 Mon 20 Dec , Omair Majid wrote: > >>> On 12/20/2010 01:26 PM, Dr Andrew John Hughes wrote: > >>>> On 13:15 Mon 20 Dec , Omair Majid wrote: > >>>>> Hi, > >>>>> > >>>>> The attached patches further integrates JNLPAuthenticator and > >>>>> PasswordAuthenticationDialog into icedtea-web. The patches shows the > >>>>> dialogs using the secure thread, localizes strings, and removes > >>>>> hardcoded mention of the icedteaplugin. > >>>>> > >>>>> I have split the change into two patches: one deals with renaming > >>>>> files, > >>>>> the other deals with the actual code changes. > >>>>> > >>>>> The first patch renames classes to ensure consistency. It contains no > >>>>> functional changes (other than those required for renaming). The class > >>>>> net.sourceforge.jnlp.security.SecurityWarning is renamed to > >>>>> net.sourceforge.jnlp.security.SecurityDialogs, > >>>>> net.sourceforge.jnlp.security.SecurityWarningDialog is renamed to > >>>>> net.sourceforge.jnlp.security.SecurityDialog and > >>>>> net.sourceforge.jnlp.security.PasswordAuthenticationDialog is > >>>>> renamed to > >>>>> net.sourceforge.jnlp.PasswordAuthenticationPanel. > >>>>> > >>>> > >>>> What is the reason for the renaming? Could we not delay this until > >>>> the 2.0 series? > >>>> > >>> > >>> Well, the SecurityWarning class should show security _warnings_. The > >>> second patch modifies (the original) SecurityWarning and > >>> SecurityWarningDialog classes to display authentication dialogs dialogs > >>> (along with warning dialogs). An authentication dialog is not a warning, > >>> and hence the rename. > >>> > >>> In general, the idea is that anything sensitive that requires a GUI > >>> dialog should be run through SecurityWarning/SecurityDialog. > >>> > >>> If you think that we we should hold off the rename, I am fine with that. > >>> The names of classes might be misleading/awkward for a while then. > >>> > >> > >> Are we planning other API changes in 1.1? I'm just trying to work out the > >> extent to which we see 1.1 as stable, I guess. If we are making other API > >> changes, then I guess the rename is ok. > > > > That depends on how you define API changes. We definitely will be adding > > classes in the 1.1 time frame, but I am not sure if we have any more > > renames/removals planned. > > > > Any thoughts? If you are not ok with renaming the class, then I would > like to skip that bit and apply the second part of the patch (which > integrates the authentication dialog into the rest of the security system). > I'd say go ahead and rename. Do we have a planned release date for 1.1 yet? > Thanks, > Omair -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Fri Feb 25 13:31:16 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 16:31:16 -0500 Subject: [icedtea-web] RFC: do not add unneeded files to netx.jar Message-ID: <4D681FA4.2030402@redhat.com> Hi, The attached patch remove the addition of unrequired files to netx.jar. Currently a number of uneeded files (html files, man pages) are added to netx.jar. The diff in the file list for netx.jar with the patch applied looks like this: net/sourceforge/jnlp/runtime/JNLPProxySelector.class net/sourceforge/jnlp/DefaultLaunchHandler.class net/sourceforge/jnlp/StreamEater.class -net/sourceforge/jnlp/cache/package.html -net/sourceforge/jnlp/event/package.html -net/sourceforge/jnlp/services/package.html -net/sourceforge/jnlp/package.html -net/sourceforge/jnlp/runtime/package.html -javaws.1 As you can seen, only html files and the man page is removed. Okay to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: do-not-add-random-stuff-to-netx.patch Type: text/x-patch Size: 478 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110225/6c1890ec/do-not-add-random-stuff-to-netx.patch From ahughes at redhat.com Fri Feb 25 13:46:48 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 21:46:48 +0000 Subject: [icedtea-web] RFC: add proxy auto config support In-Reply-To: <4D67CCE1.6020205@redhat.com> References: <4D5C23D0.7050809@redhat.com> <20110216195129.GB26007@rivendell.middle-earth.co.uk> <4D5C39D6.2050308@redhat.com> <20110217221617.GC27039@rivendell.middle-earth.co.uk> <4D67CCE1.6020205@redhat.com> Message-ID: <20110225214648.GY3448@rivendell.middle-earth.co.uk> On 10:38 Fri 25 Feb , Omair Majid wrote: snip (this is essentially a rewrite of the build work :-) > > Any thoughts on the attached patch? Also, do you have any links to good > documentation on AC_CONFIG_FILES and good practices for it? I would like > to use it if possible for build.properties but so far I dont have much > to go on. > The autoconf manual is what I usually use. I'm not aware of anything else. Of course, you do have the source for it... ;-) I think it's just simple subsitution - i.e. @x@ is replaced with the value of x. Nothing clever. So you'd need to create a RHINO_AVAILABLE in configure and then allow it to be substituted. Comments below. Only issue for this patch is the IT_FIND_JAVA macro. The autoconf changes should be in a separate patch. This one is already big enough ;-) > Thanks, > Omair > diff -r d7fee305bd4f Makefile.am > --- a/Makefile.am Wed Feb 23 13:37:10 2011 -0500 > +++ b/Makefile.am Thu Feb 24 19:34:38 2011 -0500 > @@ -8,7 +8,14 @@ > # Build directories > > BOOT_DIR = $(abs_top_builddir)/bootstrap/jdk1.6.0 > -RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar > + > +if WITH_RHINO > + RHINO_RUNTIME=:$(RHINO_JAR) > +else > + RHINO_RUNTIME= > +endif > + > +RUNTIME = $(BOOT_DIR)/jre/lib/rt.jar:$(BOOT_DIR)/jre/lib/jsse.jar$(RHINO_RUNTIME) > Looks good. > # Flags > IT_CFLAGS=$(CFLAGS) $(ARCHFLAG) > @@ -18,8 +25,8 @@ > IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) > > JRE='"$(SYSTEM_JDK_DIR)/jre"' > -LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" > -PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' > +LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar$(RHINO_RUNTIME)" > +PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar$(RHINO_RUNTIME)"' > > # Fake update version to shut up the plugin detector hosted by Oracle. > # If Oracle ever release a JDK update greater than 50, this needs to be increased. > @@ -88,8 +95,10 @@ > all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp $(NETX_DIR)/launcher/javaws \ > javaws.desktop stamps/docs.stamp $(NETX_DIR)/launcher/controlpanel/itweb-settings itweb-settings.desktop > > +check-local: check-pac-functions > + > clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \ > - clean-native-ecj clean-desktop-files clean-docs > + clean-native-ecj clean-desktop-files clean-docs clean-tests > if [ -e stamps ] ; then \ > rmdir stamps ; \ > fi > @@ -241,8 +250,20 @@ > > netx-source-files.txt: > find $(NETX_SRCDIR) -name '*.java' | sort > $@ > +if !WITH_RHINO > + sed -i '/RhinoBasedPacEvaluator/ d' $@ > +endif > > -stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp > +build.properties: > + echo "# This contains build-time settings " > $@ > +if WITH_RHINO > + echo "rhino.available=true" >> $@ > +else > + echo "rhino.available=false" >> $@ > +endif > + > +stamps/netx.stamp: netx-source-files.txt stamps/bootstrap-directory.stamp \ > + build.properties > mkdir -p $(NETX_DIR) > $(BOOT_DIR)/bin/javac $(IT_JAVACFLAGS) \ > -d $(NETX_DIR) \ > @@ -255,6 +276,7 @@ > ${INSTALL_DATA} -D $${files} \ > $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \ > done) > + cp -pPR build.properties $(NETX_DIR)/net/sourceforge/jnlp/ > mkdir -p stamps > touch $@ > > @@ -274,6 +296,7 @@ > > clean-netx: > rm -rf $(NETX_DIR) > + rm -f build.properties > rm -f stamps/netx-dist.stamp > rm -f netx-source-files.txt > rm -f stamps/netx.stamp > @@ -378,6 +401,28 @@ > rm -rf ${abs_top_builddir}/docs/plugin > rm -f stamps/plugin-docs.stamp > > + > +# check > +# ========================== > + > +jrunscript: > +if WITH_RHINO > + echo '$(BOOT_DIR)/bin/java -cp $(RHINO_JAR) org.mozilla.javascript.tools.shell.Main $$@' > jrunscript > + chmod u+x jrunscript > +else > + echo "jrunscript requires rhino support" > + exit 1 > +endif autoconf could do this too FWIW. Look at javac.in in IcedTea. > + > +check-pac-functions: stamps/bootstrap-directory.stamp jrunscript > + ./jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \ > + $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) > + > +clean-tests: clean-jrunscript > + > +clean-jrunscript: > + rm -f jrunscript > + > # plugin tests > > if ENABLE_PLUGIN > @@ -414,6 +459,7 @@ > # bootstrap > stamps/bootstrap-directory.stamp: stamps/native-ecj.stamp > mkdir -p $(BOOT_DIR)/bin stamps/ > + ln -sf $(JAVA) $(BOOT_DIR)/bin/java Wasn't this already present? > ln -sf $(JAR) $(BOOT_DIR)/bin/jar > ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac > ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc > diff -r d7fee305bd4f acinclude.m4 > --- a/acinclude.m4 Wed Feb 23 13:37:10 2011 -0500 > +++ b/acinclude.m4 Thu Feb 24 19:34:38 2011 -0500 > @@ -122,6 +122,13 @@ > fi > ]) > > +AC_DEFUN([IT_FIND_JAVA]) > +[ > + AC_REQUIRE([IT_CHECK_FOR_JDK]) > + JAVA=${SYSTEM_JDK_DIR}/bin/java > + AC_SUBS(JAVA) > +] > + This isn't the one from IcedTea. It's a lot more complicated... BTW, AC_SUBS should be AC_SUBST? > AC_DEFUN([IT_FIND_JAVAC], > [ > AC_ARG_WITH([javac], > @@ -250,6 +257,56 @@ > AC_SUBST(ECJ_JAR) > ]) > > +AC_DEFUN([IT_FIND_RHINO_JAR], > +[ > + AC_MSG_CHECKING([whether to include Javascript support via Rhino]) > + AC_ARG_WITH([rhino], > + [AS_HELP_STRING(--with-rhino,specify location of the rhino jar)], > + [ > + case "${withval}" in > + yes) > + RHINO_JAR=yes > + ;; > + no) > + RHINO_JAR=no > + ;; > + *) > + if test -f "${withval}"; then > + RHINO_JAR="${withval}" > + elif test -z "${withval}"; then > + RHINO_JAR=yes > + else > + AC_MSG_RESULT([not found]) > + AC_MSG_ERROR("The rhino jar ${withval} was not found.") > + fi > + ;; > + esac > + ], > + [ > + RHINO_JAR=yes > + ]) > + if test x"${RHINO_JAR}" = "xyes"; then > + if test -e "/usr/share/java/rhino.jar"; then > + RHINO_JAR=/usr/share/java/rhino.jar > + elif test -e "/usr/share/java/js.jar"; then > + RHINO_JAR=/usr/share/java/js.jar > + elif test -e "/usr/share/rhino-1.6/lib/js.jar"; then > + RHINO_JAR=/usr/share/rhino-1.6/lib/js.jar > + fi > + if test x"${RHINO_JAR}" = "xyes"; then > + AC_MSG_RESULT([not found]) > + AC_MSG_ERROR("A rhino jar was not found in /usr/share/java as either rhino.jar or js.jar.") > + fi > + fi > + AC_MSG_RESULT(${RHINO_JAR}) > + AM_CONDITIONAL(WITH_RHINO, test x"${RHINO_JAR}" != "xno") > +dnl Clear RHINO_JAR if it doesn't contain a valid filename > + if test x"${RHINO_JAR}" = "xno"; then > + RHINO_JAR= > + fi > + AC_SUBST(RHINO_JAR) > +]) > + > AC_DEFUN_ONCE([IT_CHECK_PLUGIN], > [ > AC_MSG_CHECKING([whether to build the browser plugin]) > diff -r d7fee305bd4f configure.ac > --- a/configure.ac Wed Feb 23 13:37:10 2011 -0500 > +++ b/configure.ac Thu Feb 24 19:34:38 2011 -0500 > @@ -32,7 +32,9 @@ > FIND_JAVAC > FIND_JAR > FIND_ECJ_JAR > +IT_FIND_JAVA > IT_FIND_JAVADOC > +IT_FIND_RHINO_JAR > AC_CONFIG_FILES([javac], [chmod +x javac]) > > IT_SET_VERSION > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java > --- a/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Wed Feb 23 13:37:10 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/browser/BrowserAwareProxySelector.java Thu Feb 24 19:34:38 2011 -0500 > @@ -54,6 +54,8 @@ > > import net.sourceforge.jnlp.runtime.JNLPProxySelector; > import net.sourceforge.jnlp.runtime.JNLPRuntime; > +import net.sourceforge.jnlp.runtime.PacEvaluator; > +import net.sourceforge.jnlp.runtime.PacEvaluatorFactory; > > /** > * A ProxySelector which can read proxy settings from a browser's > @@ -85,6 +87,8 @@ > private String browserSocks4ProxyHost; > private int browserSocks4ProxyPort; > > + private PacEvaluator browserProxyAutoConfig = null; > + > /** > * Create a new instance of this class, reading configuration fropm the browser > */ > @@ -128,6 +132,12 @@ > e.printStackTrace(); > } > > + if (browserProxyType == BROWSER_PROXY_TYPE_PAC) { > + if (browserAutoConfigUrl != null) { > + browserProxyAutoConfig = PacEvaluatorFactory.getPacEvaluator(browserAutoConfigUrl); > + } > + } > + > browserUseSameProxy = Boolean.valueOf(prefs.get("network.proxy.share_proxy_settings")); > > browserHttpProxyHost = prefs.get("network.proxy.http"); > @@ -216,8 +226,21 @@ > * browser. > */ > private List getFromBrowserPAC(URI uri) { > - System.err.println(R("RPRoxyPacNotImplemented")); > - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > + if (browserAutoConfigUrl == null || uri.getScheme().equals("socket")) { > + return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > + } > + > + List proxies = new ArrayList(); > + > + try { > + String proxiesString = browserProxyAutoConfig.getProxies(uri.toURL()); > + proxies.addAll(getProxiesFromPacResult(proxiesString)); > + } catch (MalformedURLException e) { > + e.printStackTrace(); > + proxies.add(Proxy.NO_PROXY); > + } > + > + return proxies; > } > > /** > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/resources/Messages.properties > --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Wed Feb 23 13:37:10 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Thu Feb 24 19:34:38 2011 -0500 > @@ -142,7 +142,7 @@ > RUnexpected=Unexpected {0} at {1} > RConfigurationError=Fatal error while reading the configuration > RConfigurationFatal=ERROR: a fatal error has occurred while loading configuration. Perhaps a global configuration was required but could not be found > -RPRoxyPacNotImplemented=Using Proxy Auto Config (PAC) files is not supported yet. > +RPRoxyPacNotSupported=Using Proxy Auto Config (PAC) files is not supported. > RProxyFirefoxNotFound=Unable to use Firefox's proxy settings. Using "DIRECT" as proxy type. > RProxyFirefoxOptionNotImplemented=Browser proxy option "{0}" ({1}) not supported yet. > > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/FakePacEvaluator.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/runtime/FakePacEvaluator.java Thu Feb 24 19:34:38 2011 -0500 > @@ -0,0 +1,54 @@ > +/* FakePacEvaluator.java > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +package net.sourceforge.jnlp.runtime; > + > +import static net.sourceforge.jnlp.runtime.Translator.R; > +import java.net.URL; > + > +/** > + * A dummy PacEvaluator that always returns "DIRECT" > + */ > +public class FakePacEvaluator implements PacEvaluator { > + @Override > + public String getProxies(URL url) { > + if (JNLPRuntime.isDebug()) { > + System.err.println(R("RPRoxyPacNotSupported")); > + } > + return "DIRECT"; > + } > +} > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java > --- a/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Wed Feb 23 13:37:10 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/runtime/JNLPProxySelector.java Thu Feb 24 19:34:38 2011 -0500 > @@ -16,7 +16,6 @@ > > package net.sourceforge.jnlp.runtime; > > -import static net.sourceforge.jnlp.runtime.Translator.R; > import java.io.IOException; > import java.net.InetAddress; > import java.net.InetSocketAddress; > @@ -52,6 +51,8 @@ > /** The default port to use as a fallback. Currently squid's default port */ > public static final int FALLBACK_PROXY_PORT = 3128; > > + private PacEvaluator pacEvaluator = null; > + > /** The proxy type. See PROXY_TYPE_* constants */ > private int proxyType = PROXY_TYPE_UNKNOWN; > > @@ -96,8 +97,7 @@ > > proxyType = Integer.valueOf(config.getProperty(DeploymentConfiguration.KEY_PROXY_TYPE)); > > - String autoConfigString = config > - .getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); > + String autoConfigString = config.getProperty(DeploymentConfiguration.KEY_PROXY_AUTO_CONFIG_URL); > if (autoConfigString != null) { > try { > autoConfigUrl = new URL(autoConfigString); > @@ -106,6 +106,10 @@ > } > } > > + if (autoConfigUrl != null) { > + pacEvaluator = PacEvaluatorFactory.getPacEvaluator(autoConfigUrl); > + } > + > bypassList = new ArrayList(); > String proxyBypass = config.getProperty(DeploymentConfiguration.KEY_PROXY_BYPASS_LIST); > if (proxyBypass != null) { > @@ -333,14 +337,22 @@ > * > * @return a List of valid Proxy objects > */ > - private List getFromPAC(URI uri) { > - if (autoConfigUrl == null) { > + protected List getFromPAC(URI uri) { > + if (autoConfigUrl == null || uri.getScheme().equals("socket")) { > return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > } > - // TODO implement this by reading and using the PAC file > - System.err.println(R("RPRoxyPacNotImplemented")); > > - return Arrays.asList(new Proxy[] { Proxy.NO_PROXY }); > + List proxies = new ArrayList(); > + > + try { > + String proxiesString = pacEvaluator.getProxies(uri.toURL()); > + proxies.addAll(getProxiesFromPacResult(proxiesString)); > + } catch (MalformedURLException e) { > + e.printStackTrace(); > + proxies.add(Proxy.NO_PROXY); > + } > + > + return proxies; > } > > /** > @@ -351,5 +363,56 @@ > */ > protected abstract List getFromBrowser(URI uri); > > + /** > + * Converts a proxy string from a browser into a List of Proxy objects > + * suitable for java. > + * @param pacString a string indicating proxies. For example > + * "PROXY foo.bar:3128; DIRECT" > + * @return a list of Proxy objects represeting the parsed string. > + */ > + public static List getProxiesFromPacResult(String pacString) { > + List proxies = new ArrayList(); > + > + String[] tokens = pacString.split(";"); > + for (String token: tokens) { > + if (token.startsWith("PROXY")) { > + String hostPortPair = token.substring("PROXY".length()).trim(); > + if (!hostPortPair.contains(":")) { > + continue; > + } > + String host = hostPortPair.split(":")[0]; > + int port; > + try { > + port = Integer.valueOf(hostPortPair.split(":")[1]); > + } catch (NumberFormatException nfe) { > + continue; > + } > + SocketAddress sa = new InetSocketAddress(host, port); > + proxies.add(new Proxy(Type.HTTP, sa)); > + } else if (token.startsWith("SOCKS")) { > + String hostPortPair = token.substring("SOCKS".length()).trim(); > + if (!hostPortPair.contains(":")) { > + continue; > + } > + String host = hostPortPair.split(":")[0]; > + int port; > + try { > + port = Integer.valueOf(hostPortPair.split(":")[1]); > + } catch (NumberFormatException nfe) { > + continue; > + } > + SocketAddress sa = new InetSocketAddress(host, port); > + proxies.add(new Proxy(Type.SOCKS, sa)); > + } else if (token.startsWith("DIRECT")) { > + proxies.add(Proxy.NO_PROXY); > + } else { > + if (JNLPRuntime.isDebug()) { > + System.out.println("Unrecognized proxy token: " + token); > + } > + } > + } > + > + return proxies; > + } > > } > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/PacEvaluator.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/runtime/PacEvaluator.java Thu Feb 24 19:34:38 2011 -0500 > @@ -0,0 +1,56 @@ > +/* PacEvaluator.java > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +package net.sourceforge.jnlp.runtime; > + > +import java.net.URL; > + > +/** > + * This interface represents an object which can evaluate Proxy Auto Config > + * files. > + */ > +public interface PacEvaluator { > + /** > + * Get the proxies for accessing a given URL. The result is obtained by > + * evaluating the PAC file with the given url (and the host) as input. > + * > + * @param url the url for which a proxy is desired > + * @return a list of proxies in a string like > + *
"PROXY foo.example.com:8080; PROXY bar.example.com:8080; DIRECT"
> + */ > + public String getProxies(URL url); > +} > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/PacEvaluatorFactory.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/runtime/PacEvaluatorFactory.java Thu Feb 24 19:34:38 2011 -0500 > @@ -0,0 +1,107 @@ > +/* PacEvaluatorFactory.java > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +package net.sourceforge.jnlp.runtime; > + > +import java.io.IOException; > +import java.io.InputStream; > +import java.lang.reflect.Constructor; > +import java.lang.reflect.InvocationTargetException; > +import java.net.URL; > +import java.util.Properties; > + > + > +public class PacEvaluatorFactory { > + > + public static PacEvaluator getPacEvaluator(URL pacUrl) { > + boolean useRhino = false; > + > + ClassLoader cl = PacEvaluatorFactory.class.getClassLoader(); > + if (cl == null) { > + cl = ClassLoader.getSystemClassLoader(); > + } > + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/build.properties"); > + Properties properties = null; > + try { > + properties = new Properties(); > + properties.load(in); > + } catch (IOException e) { > + if (JNLPRuntime.isDebug()) { > + e.printStackTrace(); > + } > + } finally { > + try { > + in.close(); > + } catch (IOException e) { > + if (JNLPRuntime.isDebug()) { > + e.printStackTrace(); > + } > + } > + } > + > + if (properties == null) { > + return new FakePacEvaluator(); > + } > + > + String available = properties.getProperty("rhino.available"); > + useRhino = Boolean.valueOf(available); > + > + if (useRhino) { > + try { > + Class evaluator = Class.forName("net.sourceforge.jnlp.runtime.RhinoBasedPacEvaluator"); > + Constructor constructor = evaluator.getConstructor(URL.class); > + return (PacEvaluator) constructor.newInstance(pacUrl); > + } catch (ClassNotFoundException e) { > + // ignore > + } catch (InstantiationException e) { > + e.printStackTrace(); > + } catch (IllegalAccessException e) { > + e.printStackTrace(); > + } catch (NoSuchMethodException e) { > + e.printStackTrace(); > + } catch (IllegalArgumentException e) { > + e.printStackTrace(); > + } catch (InvocationTargetException e) { > + if (e.getCause() != null) { > + e.getCause().printStackTrace(); > + } > + } > + } > + > + return new FakePacEvaluator(); > + } > +} > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/RhinoBasedPacEvaluator.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/runtime/RhinoBasedPacEvaluator.java Thu Feb 24 19:34:38 2011 -0500 > @@ -0,0 +1,256 @@ > +/* RhinoBasedPacEvaluator.java > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +package net.sourceforge.jnlp.runtime; > + > +import java.io.BufferedReader; > +import java.io.IOException; > +import java.io.InputStream; > +import java.io.InputStreamReader; > +import java.net.SocketPermission; > +import java.net.URL; > +import java.security.AccessControlContext; > +import java.security.AccessController; > +import java.security.Permissions; > +import java.security.PrivilegedAction; > +import java.security.ProtectionDomain; > + > +import net.sourceforge.jnlp.util.TimedHashMap; > + > +import org.mozilla.javascript.Context; > +import org.mozilla.javascript.Function; > +import org.mozilla.javascript.Scriptable; > + > +/** > + * Represents a Proxy Auto Config file. This object can be used to evaluate the > + * proxy file to find the proxy for a given url. > + * > + * @see http://en.wikipedia.org/wiki/Proxy_auto-config#The_PAC_file > + */ > +public class RhinoBasedPacEvaluator implements PacEvaluator { > + > + private final String pacHelperFunctionContents; > + private final String pacContents; > + private final URL pacUrl; > + private final TimedHashMap cache; > + > + /** > + * Initialize a new object by using the PAC file located at the given URL. > + * > + * @param pacUrl the url of the PAC file to use > + */ > + public RhinoBasedPacEvaluator(URL pacUrl) { > + if (JNLPRuntime.isDebug()) { > + System.err.println("Using the Rhino based PAC evaluator for url " + pacUrl); > + } > + pacHelperFunctionContents = getHelperFunctionContents(); > + this.pacUrl = pacUrl; > + pacContents = getPacContents(pacUrl); > + cache = new TimedHashMap(); > + } > + > + /** > + * Get the proxies for accessing a given URL. The result is obtained by > + * evaluating the PAC file with the given url (and the host) as input. > + * > + * This method performs caching of the result. > + * > + * @param url the url for which a proxy is desired > + * @return a list of proxies in a string like > + *
"PROXY foo.example.com:8080; PROXY bar.example.com:8080; DIRECT"
> + * > + * @see #getProxiesWithoutCaching(URL) > + */ > + public String getProxies(URL url) { > + String cachedResult = getFromCache(url); > + if (cachedResult != null) { > + return cachedResult; > + } > + > + String result = getProxiesWithoutCaching(url); > + addToCache(url, cachedResult); > + return result; > + } > + > + /** > + * Get the proxies for accessing a given URL. The result is obtained by > + * evaluating the PAC file with the given url (and the host) as input. > + * > + * @param url the url for which a proxy is desired > + * @return a list of proxies in a string like > + *
"PROXY example.com:3128; DIRECT"
> + * > + * @see #getProxies(URL) > + */ > + private String getProxiesWithoutCaching(URL url) { > + if (pacHelperFunctionContents == null) { > + System.err.println("Error loading pac functions"); > + return "DIRECT"; > + } > + > + EvaluatePacAction evaluatePacAction = new EvaluatePacAction(pacContents, pacUrl.toString(), > + pacHelperFunctionContents, url); > + Permissions p = new Permissions(); > + p.add(new RuntimePermission("accessClassInPackage.org.mozilla.javascript")); > + p.add(new SocketPermission("*", "resolve")); > + ProtectionDomain pd = new ProtectionDomain(null, p); > + AccessControlContext context = new AccessControlContext(new ProtectionDomain[] { pd }); > + > + return AccessController.doPrivileged(evaluatePacAction, context); > + } > + > + /** > + * Returns the contents of file at pacUrl as a String. > + */ > + private String getPacContents(URL pacUrl) { > + StringBuilder contents = null; > + try { > + String line = null; > + BufferedReader pacReader = new BufferedReader(new InputStreamReader(pacUrl.openStream())); > + contents = new StringBuilder(); > + while ((line = pacReader.readLine()) != null) { > + // System.out.println(line); > + contents = contents.append(line).append("\n"); > + } > + } catch (IOException e) { > + contents = null; > + } > + > + System.out.println(contents); > + return (contents != null) ? contents.toString() : null; > + } > + > + /** > + * Returns the pac helper functions as a String. The functions are read > + * from net/sourceforge/jnlp/resources/pac-funcs.js > + */ > + private String getHelperFunctionContents() { > + StringBuilder contents = null; > + try { > + String line; > + ClassLoader cl = this.getClass().getClassLoader(); > + if (cl == null) { > + cl = ClassLoader.getSystemClassLoader(); > + } > + InputStream in = cl.getResourceAsStream("net/sourceforge/jnlp/runtime/pac-funcs.js"); > + BufferedReader pacFuncsReader = new BufferedReader(new InputStreamReader(in)); > + contents = new StringBuilder(); > + while ((line = pacFuncsReader.readLine()) != null) { > + // System.out.println(line); > + contents = contents.append(line).append("\n"); > + } > + } catch (IOException e) { > + e.printStackTrace(); > + contents = null; > + } > + > + return (contents != null) ? contents.toString() : null; > + } > + > + /** > + * Gets an entry from the cache > + */ > + private String getFromCache(URL url) { > + String lookupString = url.getProtocol() + "://" + url.getHost(); > + String result = cache.get(lookupString); > + return result; > + } > + > + /** > + * Adds an entry to the cache > + */ > + private void addToCache(URL url, String proxyResult) { > + String lookupString = url.getAuthority() + "://" + url.getHost(); > + cache.put(lookupString, proxyResult); > + } > + > + /** > + * Helper classs to run remote javascript code (specified by the user as > + * PAC URL) inside a sandbox. > + */ > + private static class EvaluatePacAction implements PrivilegedAction { > + > + private String pacContents; > + private String pacUrl; > + private String pacFuncsContents; > + private URL url; > + > + public EvaluatePacAction(String pacContents, String pacUrl, String pacFuncsContents, URL url) { > + this.pacContents = pacContents; > + this.pacUrl = pacUrl; > + this.pacFuncsContents = pacFuncsContents; > + this.url = url; > + } > + > + public String run() { > + Context cx = Context.enter(); > + try { > + /* > + * TODO defense in depth. > + * > + * This is already running within a sandbox, but we can (and we > + * should) lock it down further. Look into ClassShutter. > + */ > + Scriptable scope = cx.initStandardObjects(); > + // any optimization level greater than -1 will trigger code generation > + // and this block will then need classloader permissions > + cx.setOptimizationLevel(-1); > + Object result = null; > + result = cx.evaluateString(scope, pacFuncsContents, "internal", 1, null); > + result = cx.evaluateString(scope, pacContents, pacUrl, 1, null); > + > + Object functionObj = scope.get("FindProxyForURL", scope); > + if (!(functionObj instanceof Function)) { > + System.err.println("FindProxyForURL not found"); > + return null; > + } else { > + Function findProxyFunction = (Function) functionObj; > + > + Object[] args = { url.toString(), url.getHost() }; > + result = findProxyFunction.call(cx, scope, scope, args); > + return (String) result; > + } > + } catch (Exception e) { > + e.printStackTrace(); > + return "DIRECT"; > + } finally { > + Context.exit(); > + } > + } > + } > + > +} > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/pac-funcs.js > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/runtime/pac-funcs.js Thu Feb 24 19:34:38 2011 -0500 > @@ -0,0 +1,830 @@ > +/* pac-funcs.js > + Copyright (C) 2011 Red Hat, Inc. > + > +This file is part of IcedTea. > + > +IcedTea is free software; you can redistribute it and/or > +modify it under the terms of the GNU General Public License as published by > +the Free Software Foundation, version 2. > + > +IcedTea is distributed in the hope that it will be useful, > +but WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with IcedTea; see the file COPYING. If not, write to > +the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA > +02110-1301 USA. > + > +Linking this library statically or dynamically with other modules is > +making a combined work based on this library. Thus, the terms and > +conditions of the GNU General Public License cover the whole > +combination. > + > +As a special exception, the copyright holders of this library give you > +permission to link this library with independent modules to produce an > +executable, regardless of the license terms of these independent > +modules, and to copy and distribute the resulting executable under > +terms of your choice, provided that you also meet, for each linked > +independent module, the terms and conditions of the license of that > +module. An independent module is a module which is not derived from > +or based on this library. If you modify this library, you may extend > +this exception to your version of the library, but you are not > +obligated to do so. If you do not wish to do so, delete this > +exception statement from your version. > +*/ > + > +/* > + * These helper functions are required to be able to parse Proxy Auto Config > + * (PAC) files. PAC files will use these helper functions to decide the best > + * proxy for connecting to a host. > + * > + * This implementation is based on the description of the functions at: > + * http://web.archive.org/web/20060424005037/wp.netscape.com/eng/mozilla/2.0/relnotes/demo/proxy-live.html > + */ > + > +/** > + * Returns true if the host does not contain a domain (there are no dots) > + */ > +function isPlainHostName(host) { > + if (host.indexOf(".") === -1) { > + return true; > + } else { > + return false; > + } > +} > + > +/** > + * Returns true if the host is part of the domain (the host ends with domain) > + */ > +function dnsDomainIs(host, domain) { > + var loc = host.lastIndexOf(domain); > + if (loc === -1) { > + return false; > + } > + if (loc + domain.length === host.length) { > + // host ends with domain > + return true; > + } > + return false; > +} > + > +/** > + * Returns true if the host is an exact match of hostdom or if host is not a > + * fully qualified name but has the same hostname as hostdom > + */ > +function localHostOrDomainIs(host, hostdom) { > + if (host === hostdom) { > + // exact match > + return true; > + } > + var firstdot = hostdom.indexOf("."); > + if (firstdot === -1) { > + // hostdom has no dots > + return false; > + } > + if (host === hostdom.substring(0, firstdot)) { > + // hostname matches > + return true; > + } > + return false; > +} > + > +/** > + * Returns true if the host name can be resolved. > + */ > +function isResolvable(host) { > + try { > + java.net.InetAddress.getByName(host); > + return true; > + } catch (e) { > + //if (e.javaException instanceof java.net.UnknownHostException) { > + return false; > + //} else { > + // throw e; > + //} > + } > +} > + > +/** > + * Return true if the ip address of the host matches the pattern given the mask. > + */ > +function isInNet(host, pattern, mask) { > + if (!isResolvable(host)) { > + return false; > + } > + > + var hostIp = dnsResolve(host); > + var hostParts = hostIp.split("."); > + var patternParts = pattern.split("."); > + var maskParts = mask.split("."); > + > + if (hostParts.length !== 4 || > + patternParts.length !== hostParts.length || > + maskParts.length !== hostParts.length) { > + return false; > + } > + > + var matched = true; > + for (var i = 0; i < hostParts.length; i++) { > + var partMatches = (hostParts[i] & maskParts[i]) === (patternParts[i] & maskParts[i]); > + matched = matched && partMatches; > + } > + > + return matched; > +} > + > +/** > + * Returns the IP address of the host as a string > + */ > +function dnsResolve(host) { > + return java.net.InetAddress.getByName(host).getHostAddress() + ""; > +} > + > +/** > + * Returns the local IP address > + */ > +function myIpAddress() { > + return java.net.InetAddress.getLocalHost().getHostAddress() + ""; > +} > + > +/** > + * Returns the number of domains in a hostname > + */ > +function dnsDomainLevels(host) { > + var levels = 0; > + for (var i = 0; i < host.length; i++) { > + if (host[i] === '.') { > + levels++; > + } > + } > + return levels; > +} > + > +/** > + * Returns true if the shell expression matches the given input string > + */ > +function shExpMatch(str, shExp) { > + > + // TODO support all special characters > + // right now we support only * and ? > + > + > + try { > + > + // turn shExp into a regular expression > + > + var work = ""; > + > + // escape characters > + for (var i = 0; i < shExp.length; i++) { > + var ch = shExp[i]; > + switch (ch) { > + case "\\": work = work + "\\\\"; break; > + case "^": work = work + "\\^"; break; > + case "$": work = work + "\\$"; break; > + case "+": work = work + "\\+"; break; > + case ".": work = work + "\\."; break; > + case "(": work = work + "\\("; break; > + case ")": work = work + "\\)"; break; > + case "{": work = work + "\\{"; break; > + case "}": work = work + "\\}"; break; > + case "[": work = work + "\\["; break; > + case "]": work = work + "\\]"; break; > + > + case "?": work = work + ".{1}"; break; > + case "*": work = work + ".*"; break; > + > + default: > + work = work + ch; > + } > + > + } > + > + var regExp = "^" + work + "$"; > + > + // match > + //java.lang.System.out.println("") > + //java.lang.System.out.println("Input String : " + str); > + //java.lang.System.out.println("Input Pattern : " + shExp); > + //java.lang.System.out.println("RegExp : " + regExp.toString()); > + var match = str.match(regExp); > + > + if (match === null) { > + return false; > + } else { > + return true; > + } > + > + > + } catch (e) { > + return false; > + } > + > +} > + > + > +/** > + * Returns true if the current weekday matches the desired weekday(s) > + * > + * Possible ways of calling: > + * weekdayRange(wd1); > + * weekdayRange(wd1, "GMT"); > + * weekdayRange(wd1, wd2); > + * weekdayRange(wd1, wd2, "GMT"); > + * > + * Where wd1 and wd2 are one of "SUN", "MON", "TUE", "WED", "THU", "FRI" and > + * "SAT" > + * > + * The argument "GMT", if present, is always the last argument > + */ > +function weekdayRange() { > + var wd1; > + var wd2; > + var gmt = false; > + > + function isWeekDay(day) { > + if (day === "SUN" || day === "MON" || day === "TUE" || day === "WED" || > + day === "THU" || day === "FRI" || day === "SAT") { > + return true; > + } > + return false; > + } > + > + function strToWeekDay(str) { > + switch (str) { > + case "SUN": return 0; > + case "MON": return 1; > + case "TUE": return 2; > + case "WED": return 3; > + case "THU": return 4; > + case "FRI": return 5; > + case "SAT": return 6; > + default: return 0; > + } > + } > + > + if (arguments.length > 1) { > + if (arguments[arguments.length-1] === "GMT") { > + gmt = true; > + arguments.splice(0,arguments.length-1); > + } > + } > + > + if (arguments.length === 0) { return false; } > + > + wd1 = arguments[0]; > + > + if (!isWeekDay(wd1)) { return false; } > + > + var today = new Date().getDay(); > + if (arguments.length >= 2) { > + // return true if current weekday is between wd1 and wd2 (inclusive) > + wd2 = arguments[1]; > + if (!isWeekDay(wd2)) { return false; } > + > + var day1 = strToWeekDay(wd1); > + var day2 = strToWeekDay(wd2); > + > + if (day1 <= day2) { > + if ( day1 <= today && today <= day2) { > + return true; > + } > + return false; > + } else { > + if (day1 <= today || today <= day2) { > + return true; > + } > + return false; > + } > + } else { > + // return true if the current weekday is wd1 > + if (strToWeekDay(wd1) === today) { > + return true; > + } > + return false; > + } > +} > + > +/** > + * Returns true if the current date matches the given date(s) > + * > + * Possible ways of calling: > + * dateRange(day) > + * dateRange(day1, day2) > + * dateRange(month) > + * dateRange(month1, month2) > + * dateRange(year) > + * dateRange(year1, year2) > + * dateRange(day1, month1, day2, month2) > + * dateRange(month1, year1, month2, year2) > + * dateRange(day1, month1, year1, day2, month2, year2) > + * > + * The parameter "GMT" may additionally be passed as the last argument in any > + * of the above ways of calling. > + */ > +function dateRange() { > + > + // note: watch out for wrapping around of dates. date ranges, like > + // month=9 to month=8, wrap around and cover the entire year. this > + // makes everything more interesting > + > + var gmt; > + if (arguments.length > 1) { > + if (arguments[arguments.length-1] === "GMT") { > + gmt = true; > + arguments.splice(0,arguments.length-1); > + } > + } > + > + function isDate(date) { > + if (typeof(date) === 'number' && (date <= 31 && date >= 1)) { > + return true; > + } > + return false; > + } > + > + function strToMonth(month) { > + switch (month) { > + case "JAN": return 0; > + case "FEB": return 1; > + case "MAR": return 2; > + case "APR": return 3; > + case "MAY": return 4; > + case "JUN": return 5; > + case "JUL": return 6; > + case "AUG": return 7; > + case "SEP": return 8; > + case "OCT": return 9; > + case "NOV": return 10; > + case "DEC": return 11; > + default: return 0; > + } > + } > + > + function isMonth(month) { > + if (month === "JAN" || month === "FEB" || month === "MAR" || > + month === "APR" || month === "MAY" || month === "JUN" || > + month === "JUL" || month === "AUG" || month === "SEP" || > + month === "OCT" || month === "NOV" || month === "DEC") { > + return true; > + } > + return false; > + } > + > + function isYear(year) { > + if (typeof(year) === 'number') { > + return true; > + } > + return false; > + } > + > + function inDateRange(today, date1, date2) { > + if (date1 <= date2) { > + if (date1 <= today.getDate() && today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (date1 <= today.getDate() || today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + function inMonthRange(today, month1, month2) { > + if (month1 <= month2) { > + if (month1 <= today.getMonth() && today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (month1 <= today.getMonth() || today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + function inYearRange(today, year1, year2) { > + if (year1 <= today.getYear() && today.getYear() <= year2) { > + return true; > + } else { > + return false; > + } > + } > + > + function inMonthDateRange(today, date1, month1, date2, month2) { > + if (month1 === month2) { > + if (today.getMonth() === month1) { > + if (date1 <= today.getDate() && today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (date1 <= date2) { > + return false; > + } else { > + return true; > + } > + } > + } else if (month1 < month2) { > + if (month1 <= today.getMonth() && today.getMonth() <= month2) { > + if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month2) { > + if (today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + if (month1 <= today.getMonth() || today.getMonth() <= month2) { > + if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month2) { > + if (today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } > + } > + > + function inYearMonthRange(today, month1, year1, month2, year2) { > + if (year1 === year2) { > + if (today.getYear() === year1) { > + if (month1 <= today.getMonth() && today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } else { > + return false; > + } > + } > + if (year1 < year2) { > + if (year1 <= today.getYear() && today.getYear() <= year2) { > + if (today.getYear() === year1) { > + if (today.getMonth() >= month1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getYear() === year2) { > + if (today.getMonth() <= month2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + return false; > + } > + > + } > + > + function inYearMonthDateRange(today, date1, month1, year1, date2, month2, year2) { > + if (year1 === year2) { > + if (year1 === today.getYear()) { > + if ((month1 <= today.getMonth()) && (today.getMonth() <= month2)) { > + if (month1 === month2) { > + if (date1 <= today.getDate() && today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() === month2) { > + if (today.getDate() <= date2) { > + return true; > + } else { > + return false; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + return false; > + } > + } else if (year1 < year2) { > + if (year1 <= today.getYear() && today.getYear() <= year2) { > + if (today.getYear() === year1) { > + if (today.getMonth() === month1) { > + if (today.getDate() >= date1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getMonth() > month1) { > + return true; > + } else { > + return false; > + } > + } else if (today.getYear() === year2) { > + if (today.getMonth() <= month2) { > + > + } else { > + return true; > + } > + } else { > + return true; > + } > + } else { > + return false; > + } > + } else { > + return false; > + } > + } > + > + // TODO: change date to gmt, whatever > + var today = new Date(); > + > + var arg1; > + var arg2; > + var arg3; > + var arg4; > + var arg5; > + var arg6; > + > + switch (arguments.length) { > + case 1: > + var arg = arguments[0]; > + if (isDate(arg)) { > + if (today.getDate() === arg) { > + return true; > + } else { > + return false; > + } > + } else if (isMonth(arg)) { > + if (strToMonth(arg) === today.getMonth()) { > + return true; > + } else { > + return false; > + } > + } else { // year > + if (today.getYear() === arg) { > + return true; > + } else { > + return false; > + } > + } > + case 2: > + arg1 = arguments[0]; > + arg2 = arguments[1]; > + if (isDate(arg1) && isDate(arg2)) { > + var date1 = arg1; > + var date2 = arg2; > + > + return inDateRange(today, date1, date2); > + > + } else if (isMonth(arg1) && isMonth(arg2)) { > + var month1 = strToMonth(arg1); > + var month2 = strToMonth(arg2); > + > + return inMonthRange(today, month1, month2); > + > + } else if (isYear(arg1) && isYear(arg2)) { > + var year1 = arg1; > + var year2 = arg2; > + > + return inYearRange(today, year1, year2); > + } else { > + return false; > + } > + case 4: > + arg1 = arguments[0]; > + arg2 = arguments[1]; > + arg3 = arguments[2]; > + arg4 = arguments[3]; > + > + if (isDate(arg1) && isMonth(arg2) && isDate(arg3) && isMonth(arg4)) { > + var date1 = arg1; > + var month1 = strToMonth(arg2); > + var date2 = arg3; > + var month2 = strToMonth(arg4); > + > + return inMonthDateRange(today, date1, month1, date2, month2); > + > + } else if (isMonth(arg1) && isYear(arg2) && isMonth(arg3) && isYear(arg4)) { > + var month1 = strToMonth(arg1); > + var year1 = arg2; > + var month2 = strToMonth(arg3); > + var year2 = arg4; > + > + return inYearMonthRange(today, month1, year1, month2, year2); > + } else { > + return false; > + } > + case 6: > + arg1 = arguments[0]; > + arg2 = arguments[1]; > + arg3 = arguments[2]; > + arg4 = arguments[3]; > + arg5 = arguments[4]; > + arg6 = arguments[5]; > + if (isDate(arg1) && isMonth(arg2) && isYear(arg3) && > + isDate(arg4) && isMonth(arg5) && isYear(arg6)) { > + var day1 = arg1; > + var month1 = strToMonth(arg2); > + var year1 = arg3; > + var day2 = arg4; > + var month2 = strToMonth(arg5); > + var year2 = arg6; > + > + return inYearMonthDateRange(today, day1, month1, year1, day2, month2, year2); > + } else { > + return false; > + } > + default: > + return false; > + } > + > +} > + > +/** > + * Returns true if the current time matches the range given > + * > + * timeRange(hour) > + * timeRange(hour1, hour2) > + * timeRange(hour1, min1, hour2, min2) > + * timeRange(hour1, min1, sec1, hour2, min2, sec2) > + * > + * The string "GMT" can be used as the last additional parameter in addition to > + * the methods listed above. > + */ > +function timeRange() { > + > + // watch out for wrap around of times > + > + var gmt; > + if (arguments.length > 1) { > + if (arguments[arguments.length-1] === "GMT") { > + gmt = true; > + arguments.splice(0,arguments.length-1); > + } > + } > + > + function isHour(hour) { > + if (typeof(hour) === "number" && ( 0 <= hour && hour <= 23)) { > + return true; > + } else { > + return false; > + } > + } > + > + function isMin(minute) { > + if (typeof(minute) === "number" && (0 <= minute && minute <= 59)) { > + return true; > + } else { > + return false; > + } > + } > + > + function inHourRange(now, hour1, hour2) { > + if (hour1 === hour2) { > + if (now.getHours() === hour1) { > + return true; > + } else { > + return false; > + } > + } else if (hour1 < hour2) { > + if (hour1 <= now.getHours() && now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (hour1 <= now.getHours() || now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + function inHourMinuteRange(now, hour1, min1, hour2, min2) { > + if (hour1 == hour2) { > + if (now.getHours() == hour1) { > + if (min1 <= min2) { > + if (min1 <= now.getMinutes() && now.getMinutes() <= min2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (min1 <= now.getMinutes() || now.getMinutes() <= min2) { > + return true; > + } else { > + return false; > + } > + } > + } else { > + if (min1 <= min2) { > + return false; > + } else { > + return true; > + } > + } > + } else if (hour1 < hour2) { > + if (hour1 <= now.getHours() && now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } else { > + if (hour1 <= now.getHours() || now.getHours() <= hour2) { > + return true; > + } else { > + return false; > + } > + } > + } > + > + var today = new Date(); > + > + switch (arguments.length) { > + case 1: > + var hour = arguments[0]; > + if (today.getHours() === hour) { > + return true; > + } else { > + return false; > + } > + case 2: > + var hour1 = arguments[0]; > + var hour2 = arguments[1]; > + if (isHour(hour1) && isHour(hour2)) { > + return inHourRange(today, hour1, hour2); > + } else { > + return false; > + } > + case 4: > + var hour1 = arguments[0]; > + var min1 = arguments[1]; > + var hour2 = arguments[2]; > + var min2 = arguments[3]; > + > + if (isHour(hour1) && isMin(min1) && isHour(hour2) && isMin(min2)) { > + return inHourMinuteRange(today, hour1, min1, hour2, min2); > + } else { > + return false; > + } > + > + case 6: > + var hour1 = arguments[0]; > + var min1 = arguments[1]; > + var sec1 = arguments[2]; > + var hour2 = arguments[3]; > + var min2 = arguments[4]; > + var sec2 = arguments[5]; > + > + // TODO handle seconds properly > + > + return inHourMinuteRange(today, hour1, min1, hour2, min2); > + default: > + return false; > + } > +} > + > diff -r d7fee305bd4f tests/netx/pac/pac-funcs-test.js > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/tests/netx/pac/pac-funcs-test.js Thu Feb 24 19:34:38 2011 -0500 > @@ -0,0 +1,446 @@ > + > +var ICEDTEA_CLASSPATH_ORG_IP = "208.78.240.231"; > +var CLASSPATH_ORG_IP = "199.232.41.10"; > + > +var testsFailed = 0; > +var testsPassed = 0; > + > +print("loading needed files\n"); > +file = arguments[0] + ""; > +load(file) > +print("finished loaded needed files\n"); > + > + > +function main() { > + > + testIsPlainHostName(); > + testDnsDomainIs(); > + testLocalHostOrDomainIs(); > + testIsResolvable(); > + testIsInNet(); > + testDnsResolve(); > + testDnsDomainLevels(); > + testShExpMatch(); > + testWeekdayRange(); > + testDateRange(); > + testTimeRange(); > + > + java.lang.System.out.println(testsFailed + " of " + (testsFailed + testsPassed) + " tests failed"); > +} > + > +function runTests(name, tests) { > + java.lang.System.out.println("Testing: " + name.name); > + > + var undefined_var; > + > + for ( var i = 0; i < tests.length; i++) { > + > + java.lang.System.out.print("Test " + (i + 1) + ": "); > + var expectedVal = tests[i][0]; > + var args = tests[i].slice(1); > + var returnVal; > + try { > + returnVal = name.apply(null, args); > + } catch (e) { > + returnVal = e; > + } > + if (returnVal === expectedVal) { > + java.lang.System.out.println("Passed."); > + testsPassed++; > + } else { > + java.lang.System.out.println("FAILED."); > + java.lang.System.out.println(name.name + "(" + args.join(", ") + ")"); > + java.lang.System.out.println("Expected '" + expectedVal + "' but got '" + returnVal + "'"); > + testsFailed++; > + } > + } > +} > + > +function testIsPlainHostName() { > + var tests = [ > + [ false, "icedtea.classpath.org" ], > + [ false, "classpath.org" ], > + [ true, "org" ], > + [ true, "icedtea" ], > + [ false, ".icedtea.classpath.org" ], > + [ false, "icedtea." ], > + [ false, "icedtea.classpath." ] > + ]; > + > + runTests(isPlainHostName, tests); > +} > + > +function testDnsDomainIs() { > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > + [ true, "icedtea.classpath.org", ".classpath.org" ], > + [ true, "icedtea.classpath.org", ".org" ], > + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], > + [ false, "icedtea.classpath.org", "icedtea.classpath" ], > + [ false, "icedtea.classpath", "icedtea.classpath.org" ], > + [ false, "icedtea", "icedtea.classpath.org" ] > + ]; > + > + runTests(dnsDomainIs, tests); > +} > + > +function testLocalHostOrDomainIs() { > + > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > + [ true, "icedtea", "icedtea.classpath.org" ], > + [ false, "icedtea.classpath.org", "icedtea.classpath.com" ], > + [ false, "icedtea.classpath", "icedtea.classpath.org" ], > + [ false, "foo.classpath.org", "icedtea.classpath.org" ], > + [ false, "foo", "icedtea.classpath.org" ] > + ]; > + > + runTests(localHostOrDomainIs, tests); > +} > + > +function testIsResolvable() { > + > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org" ], > + [ true, "classpath.org" ], > + [ false, "icedtea" ], > + [ false, "foobar.classpath.org" ], > + [ false, "icedtea.classpath.com" ] > + ]; > + > + runTests(isResolvable, tests); > +} > + > +function testIsInNet() { > + > + var parts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); > + > + var fakeParts = ICEDTEA_CLASSPATH_ORG_IP.split("\."); > + fakeParts[0] = fakeParts[0] + 1; > + > + function createIp(array) { > + return array[0] + "." + array[1] + "." + array[2] + "." + array[3]; > + } > + > + var tests = [ > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.0.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.0.0.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "255.255.255.255"], > + [ true, "icedtea.classpath.org", ICEDTEA_CLASSPATH_ORG_IP, "0.0.0.0"], > + [ true, "icedtea.classpath.org", createIp(parts), "255.255.255.255" ], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.255"], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.255.0"], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.255.0.0"], > + [ false, "icedtea.classpath.org", createIp(fakeParts), "255.0.0.0"], > + [ true, "icedtea.classpath.org", createIp(fakeParts), "0.0.0.0"] > + ]; > + > + runTests(isInNet, tests); > +} > + > +function testDnsResolve() { > + var tests = [ > + [ ICEDTEA_CLASSPATH_ORG_IP, "icedtea.classpath.org" ], > + //[ CLASSPATH_ORG_IP, "classpath.org" ], > + [ "127.0.0.1", "localhost" ] > + ]; > + > + runTests(dnsResolve, tests); > +} > + > +function testDnsDomainLevels() { > + var tests = [ > + [ 0, "org" ], > + [ 1, "classpath.org" ], > + [ 2, "icedtea.classpath.org" ], > + [ 3, "foo.icedtea.classpath.org" ] > + ]; > + > + runTests(dnsDomainLevels, tests); > + > +} > +function testShExpMatch() { > + var tests = [ > + [ true, "icedtea.classpath.org", "icedtea.classpath.org"], > + [ false, "icedtea.classpath.org", ".org"], > + [ false, "icedtea.classpath.org", "icedtea."], > + [ false, "icedtea", "icedtea.classpath.org"], > + > + [ true, "icedtea.classpath.org", "*" ], > + [ true, "icedtea.classpath.org", "*.classpath.org" ], > + [ true, "http://icedtea.classpath.org", "*.classpath.org" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*/foobar/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*foobar*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*foo*" ], > + [ false, "http://icedtea.classpath.org/foobar/", "*/foo/*" ], > + [ false, "http://icedtea.classpath.org/foobar/", "*/foob/*" ], > + [ false, "http://icedtea.classpath.org/foobar/", "*/fooba/*" ], > + [ false, "http://icedtea.classpath.org/foo/", "*foobar*" ], > + > + [ true, "1", "?" ], > + [ true, "12", "??" ], > + [ true, "123", "1?3" ], > + [ true, "123", "?23" ], > + [ true, "123", "12?" ], > + [ true, "1234567890", "??????????" ], > + [ false, "1234567890", "?????????" ], > + [ false, "123", "1?1" ], > + [ false, "123", "??" ], > + > + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], > + [ true, "http://icedtea1.classpath.org/f1/", "*icedtea?.classpath*/f?/*" ], > + [ false, "http://icedtea.classpath.org/f1/", "*/f2/*" ], > + [ true, "http://icedtea.classpath.org/f1/", "*/f?/*" ], > + [ false, "http://icedtea.classpath.org/f1", "f?*"], > + [ false, "http://icedtea.classpath.org/f1", "f?*"], > + [ false, "http://icedtea.classpath.org/f1", "f?*"], > + > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + [ true, "http://icedtea.classpath.org/foobar/", "*.classpath.org/*" ], > + > + [ true, "http://icedtea.classpath.org/foo.php?id=bah", "*foo.php*" ], > + [ false, "http://icedtea.classpath.org/foo_php?id=bah", "*foo.php*" ] > + ]; > + > + runTests(shExpMatch, tests); > +} > + > +function testWeekdayRange() { > + > + var today = new Date(); > + var day = today.getDay(); > + > + function dayToStr(day) { > + switch (day) { > + case -2: return "FRI"; > + case -1: return "SAT"; > + case 0: return "SUN"; > + case 1: return "MON"; > + case 2: return "TUE"; > + case 3: return "WED"; > + case 4: return "THU"; > + case 5: return "FRI"; > + case 6: return "SAT"; > + case 7: return "SUN"; > + case 8: return "MON"; > + default: return "FRI"; > + } > + > + } > + > + var tests = [ > + [ true, dayToStr(day) ], > + [ false, dayToStr(day+1) ], > + [ false, dayToStr(day-1) ], > + ]; > +} > + > +function testDateRange() { > + > + function incDate(date) { > + return (date + 1 - 1) % 31 +1 ; > + } > + > + function decDate(date) { > + return (date - 1 - 1 + 31) % 31 + 1; > + } > + > + function monthToStr(month) { > + switch (month) { > + case -1: return "DEC"; > + case 0: return "JAN"; > + case 1: return "FEB"; > + case 2: return "MAR"; > + case 3: return "APR"; > + case 4: return "MAY"; > + case 5: return "JUN"; > + case 6: return "JUL"; > + case 7: return "AUG"; > + case 8: return "SEP"; > + case 9: return "OCT"; > + case 10: return "NOV"; > + case 11: return "DEC"; > + case 12: return "JAN"; > + default: throw "Invalid Month"; > + } > + } > + > + var today = new Date(); > + var date = today.getDate(); > + var month = today.getMonth(); > + var year = today.getYear(); > + > + var tests = [ > + [ true, date ], > + [ false, incDate(date) ], > + [ false, decDate(date) ], > + > + [ true, monthToStr(month) ], > + [ false, monthToStr(month+1) ], > + [ false, monthToStr(month-1) ], > + > + [ true, year ], > + [ false, year - 1], > + [ false, year + 1], > + > + [ true, date, date ], > + [ true, date, incDate(date) ], > + [ true, decDate(date), date ], > + [ true, decDate(date), incDate(date) ], > + [ false, incDate(date), decDate(date) ], > + [ false, decDate(decDate(date)), decDate(date) ], > + [ false, incDate(date), incDate(incDate(date)) ], > + > + [ true, monthToStr(month), monthToStr(month) ], > + [ true, monthToStr(month), monthToStr(month+1) ], > + [ true, monthToStr(month-1), monthToStr(month) ], > + [ true, monthToStr(month-1), monthToStr(month+1) ], > + [ true, "JAN", "DEC" ], > + [ true, "DEC", "NOV" ], > + [ true, "JUL", "JUN"], > + [ false, monthToStr(month+1), monthToStr(month+1) ], > + [ false, monthToStr(month-1), monthToStr(month-1) ], > + [ false, monthToStr(month+1), monthToStr(month-1) ], > + > + [ true, year, year ], > + [ true, year, year+1 ], > + [ true, year-1, year ], > + [ true, year-1, year+1 ], > + [ false, year-2, year-1 ], > + [ false, year+1, year+1 ], > + [ false, year+1, year+2 ], > + [ false, year+1, year-1 ], > + > + [ true, date, monthToStr(month) , date, monthToStr(month) ], > + [ true, decDate(date), monthToStr(month) , date, monthToStr(month) ], > + [ false, decDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], > + [ true, date, monthToStr(month) , incDate(date), monthToStr(month) ], > + [ false, incDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], > + [ true, decDate(date), monthToStr(month) , incDate(date), monthToStr(month) ], > + [ false, incDate(date), monthToStr(month) , decDate(date), monthToStr(month) ], > + [ true, date, monthToStr(month-1) , date, monthToStr(month) ], > + [ true, date, monthToStr(month) , date, monthToStr(month+1) ], > + [ true, date, monthToStr(month-1) , date, monthToStr(month+1) ], > + [ true, incDate(date), monthToStr(month-1) , date, monthToStr(month+1) ], > + [ true, date, monthToStr(month-1) , decDate(date), monthToStr(month+1) ], > + [ false, date, monthToStr(month+1) , date, monthToStr(month-1) ], > + [ false, incDate(date), monthToStr(month+1) , incDate(date), monthToStr(month-1) ], > + [ false, decDate(date), monthToStr(month+1) , decDate(date), monthToStr(month-1) ], > + [ true, 1, "JAN", 31, "DEC" ], > + [ true, 2, "JAN", 1, "JAN" ], > + [ false, 1, monthToStr(month+1), 31, monthToStr(month+1) ], > + [ false, 1, monthToStr(month-1), 31, monthToStr(month-1) ], > + > + [ true, monthToStr(month), year, monthToStr(month), year ], > + [ true, monthToStr(month-1), year, monthToStr(month), year ], > + [ true, monthToStr(month), year, monthToStr(month+1), year ], > + [ true, monthToStr(month-1), year, monthToStr(month+1), year ], > + [ true, monthToStr(0), year, monthToStr(11), year ], > + [ false, monthToStr(month+1), year, monthToStr(month-1), year ], > + [ false, monthToStr(month+1), year, monthToStr(month+1), year ], > + [ false, monthToStr(month-1), year, monthToStr(month-1), year ], > + [ false, monthToStr(month), year-1, monthToStr(month-1), year ], > + [ true, monthToStr(month), year, monthToStr(month), year + 1 ], > + [ true, monthToStr(month), year-1, monthToStr(month), year ], > + [ true, monthToStr(month), year-1, monthToStr(month), year+1 ], > + [ true, monthToStr(0), year, monthToStr(0), year+1 ], > + [ true, monthToStr(0), year-1, monthToStr(0), year+1 ], > + [ false, monthToStr(0), year-1, monthToStr(11), year-1 ], > + [ false, monthToStr(0), year+1, monthToStr(11), year+1 ], > + > + [ true, date, monthToStr(month), year, date, monthToStr(month), year ], > + [ true, decDate(date), monthToStr(month), year, incDate(date), monthToStr(month), year ], > + [ true, decDate(date), monthToStr(month-1), year, incDate(date), monthToStr(month+1), year ], > + [ true, decDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], > + [ true, incDate(date), monthToStr(month-1), year-1, incDate(date), monthToStr(month+1), year+1 ], > + [ false, incDate(date), monthToStr(month), year, incDate(date), monthToStr(month+1), year+1 ], > + [ false, date, monthToStr(month+1), year, incDate(date), monthToStr(month+1), year+1 ], > + [ true, 1, monthToStr(0), 0, 31, monthToStr(11), 100000 ], > + [ true, 1, monthToStr(0), year, 31, monthToStr(11), year ], > + [ true, 1, monthToStr(0), year-1, 31, monthToStr(11), year+1 ], > + [ false, 1, monthToStr(0), year-1, 31, monthToStr(11), year-1 ], > + [ false, 1, monthToStr(0), year+1, 31, monthToStr(11), year+1 ], > + > + ]; > + > + runTests(dateRange, tests); > + > +} > + > +function testTimeRange() { > + var now = new Date(); > + > + var hour = now.getHours(); > + var min = now.getMinutes(); > + var sec = now.getSeconds(); > + > + function toHour(input) { > + if (input < 0) { > + while (input < 0) { > + input = input + 24; > + } > + return (input % 24); > + } else { > + return (input % 24); > + } > + } > + > + function toMin(input) { > + if (input < 0) { > + while (input < 0) { > + input = input + 60; > + } > + return (input % 60); > + } else { > + return (input % 60); > + } > + } > + > + tests = [ > + [ true, hour ], > + [ false, toHour(hour+1)], > + [ false, toHour(hour-1)], > + > + [ true, hour, hour ], > + [ true, toHour(hour-1), hour ], > + [ true, hour, toHour(hour+1)], > + [ true, toHour(hour-1), toHour(hour+1)], > + [ true, toHour(hour+1), hour ], > + [ true, hour, toHour(hour-1) ], > + [ false, toHour(hour-2), toHour(hour-1)], > + [ false, toHour(hour+1), toHour(hour+2)], > + [ false, toHour(hour+1), toHour(hour-1) ], > + [ true, 0, 23 ], > + [ true, 12, 11 ], > + > + [ true, hour, min, hour, min ], > + [ true, hour, min, hour, toMin(min+1) ], > + [ true, hour, toMin(min-1), hour, min ], > + [ true, hour, toMin(min-1), hour, toMin(min+1) ], > + [ true, hour, toMin(min+2), hour, toMin(min+1) ], > + [ false, hour, toMin(min+1), hour, toMin(min+1) ], > + [ false, hour, toMin(min-1), hour, toMin(min-1) ], > + [ false, hour, toMin(min+1), hour, toMin(min-1) ], > + [ true, toHour(hour-1), min, hour, min ], > + [ true, hour, min, toHour(hour+1), min ], > + [ true, toHour(hour-1), min, toHour(hour+1), min ], > + [ true, 0, 0, 23, 59 ], > + [ true, 0, 1, 0, 0 ], > + > + [ true, 0, 1, 0, 0, 0, 0 ], > + [ true, hour, min, sec, hour, min, sec ], > + [ true, hour, min, sec, hour, min + 10, sec ], > + [ true, hour, min, sec - 10, hour, min, sec ], > + [ true, hour, min, sec, hour, min-1 , sec ], > + > + ]; > + > + runTests(timeRange, tests); > +} > + > +main(); -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Fri Feb 25 13:52:05 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 21:52:05 +0000 Subject: [icedtea-web] RFC: do not add unneeded files to netx.jar In-Reply-To: <4D681FA4.2030402@redhat.com> References: <4D681FA4.2030402@redhat.com> Message-ID: <20110225215205.GA3448@rivendell.middle-earth.co.uk> On 16:31 Fri 25 Feb , Omair Majid wrote: > Hi, > > The attached patch remove the addition of unrequired files to netx.jar. > Currently a number of uneeded files (html files, man pages) are added to > netx.jar. > > The diff in the file list for netx.jar with the patch applied looks like > this: > > net/sourceforge/jnlp/runtime/JNLPProxySelector.class > net/sourceforge/jnlp/DefaultLaunchHandler.class > net/sourceforge/jnlp/StreamEater.class > -net/sourceforge/jnlp/cache/package.html > -net/sourceforge/jnlp/event/package.html > -net/sourceforge/jnlp/services/package.html > -net/sourceforge/jnlp/package.html > -net/sourceforge/jnlp/runtime/package.html > -javaws.1 > > As you can seen, only html files and the man page is removed. Okay to > commit? > Looks fine. That code dates back to when we used the OpenJDK import mechanism. If they weren't in classes.jar then, they wouldn't have been used. > Cheers, > Omair > diff -r d7fee305bd4f Makefile.am > --- a/Makefile.am Wed Feb 23 13:37:10 2011 -0500 > +++ b/Makefile.am Fri Feb 25 16:25:49 2011 -0500 > @@ -266,8 +266,6 @@ > cp -pPR $(SRC_DIR_LINK) $(NETX_SRCDIR) src; \ > find src -type f -exec chmod 640 '{}' ';' -o -type d -exec chmod 750 '{}' ';'; \ > cd src ; \ > - $(BOOT_DIR)/bin/jar uf $(NETX_DIR)/lib/classes.jar \ > - `find . -type f -not -name '*.java'` ; \ > $(ZIP) -qr $(NETX_DIR)/lib/src.zip javax net ) > mkdir -p stamps > touch $@ -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From dbhole at redhat.com Fri Feb 25 13:54:46 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Fri, 25 Feb 2011 16:54:46 -0500 Subject: [icedtea-web] RFC: do not add unneeded files to netx.jar In-Reply-To: <20110225215205.GA3448@rivendell.middle-earth.co.uk> References: <4D681FA4.2030402@redhat.com> <20110225215205.GA3448@rivendell.middle-earth.co.uk> Message-ID: <20110225215446.GB19666@redhat.com> * Dr Andrew John Hughes [2011-02-25 16:53]: > On 16:31 Fri 25 Feb , Omair Majid wrote: > > Hi, > > > > The attached patch remove the addition of unrequired files to netx.jar. > > Currently a number of uneeded files (html files, man pages) are added to > > netx.jar. > > > > The diff in the file list for netx.jar with the patch applied looks like > > this: > > > > net/sourceforge/jnlp/runtime/JNLPProxySelector.class > > net/sourceforge/jnlp/DefaultLaunchHandler.class > > net/sourceforge/jnlp/StreamEater.class > > -net/sourceforge/jnlp/cache/package.html > > -net/sourceforge/jnlp/event/package.html > > -net/sourceforge/jnlp/services/package.html > > -net/sourceforge/jnlp/package.html > > -net/sourceforge/jnlp/runtime/package.html > > -javaws.1 > > > > As you can seen, only html files and the man page is removed. Okay to > > commit? > > > > Looks fine. That code dates back to when we used the OpenJDK import mechanism. > If they weren't in classes.jar then, they wouldn't have been used. > Tis will also require reversal of 9dfc0ff64b70: http://icedtea.classpath.org/hg/icedtea-web/rev/9dfc0ff64b70 Which looks in the jar by default for the jnlp. Cheers, Deepak > > Cheers, > > Omair > > > diff -r d7fee305bd4f Makefile.am > > --- a/Makefile.am Wed Feb 23 13:37:10 2011 -0500 > > +++ b/Makefile.am Fri Feb 25 16:25:49 2011 -0500 > > @@ -266,8 +266,6 @@ > > cp -pPR $(SRC_DIR_LINK) $(NETX_SRCDIR) src; \ > > find src -type f -exec chmod 640 '{}' ';' -o -type d -exec chmod 750 '{}' ';'; \ > > cd src ; \ > > - $(BOOT_DIR)/bin/jar uf $(NETX_DIR)/lib/classes.jar \ > > - `find . -type f -not -name '*.java'` ; \ > > $(ZIP) -qr $(NETX_DIR)/lib/src.zip javax net ) > > mkdir -p stamps > > touch $@ > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From ahughes at redhat.com Fri Feb 25 14:02:52 2011 From: ahughes at redhat.com (Dr Andrew John Hughes) Date: Fri, 25 Feb 2011 22:02:52 +0000 Subject: [icedtea-web] RFC: remove unused manifest file In-Reply-To: <4D681CB7.9070707@redhat.com> References: <4D681CB7.9070707@redhat.com> Message-ID: <20110225220252.GC3448@rivendell.middle-earth.co.uk> On 16:18 Fri 25 Feb , Omair Majid wrote: > Hi, > > The attached patch removes an unused manifest file from icedtea-web. > > Okay to commit? > > Cheers, > Omair > diff -r d7fee305bd4f netx/net/sourceforge/jnlp/resources/Manifest.mf > --- a/netx/net/sourceforge/jnlp/resources/Manifest.mf Wed Feb 23 13:37:10 2011 -0500 > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > @@ -1,6 +0,0 @@ > -Manifest-Version: 1.0 > -Created-By: jnlp.sourceforge.net > -Specification-Title: netx JNLP client > -Sealed: true > -Main-Class: net.sourceforge.jnlp.runtime.Boot13 > - Fine. I think we can class that one as trivial ;-) -- Andrew :) Free Java Software Engineer Red Hat, Inc. (http://www.redhat.com) Support Free Java! Contribute to GNU Classpath and IcedTea http://www.gnu.org/software/classpath http://icedtea.classpath.org PGP Key: F5862A37 (https://keys.indymedia.org/) Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 From omajid at redhat.com Fri Feb 25 14:05:41 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 17:05:41 -0500 Subject: [icedtea-web] RFC: do not add unneeded files to netx.jar In-Reply-To: <20110225215446.GB19666@redhat.com> References: <4D681FA4.2030402@redhat.com> <20110225215205.GA3448@rivendell.middle-earth.co.uk> <20110225215446.GB19666@redhat.com> Message-ID: <4D6827B5.90603@redhat.com> On 02/25/2011 04:54 PM, Deepak Bhole wrote: > * Dr Andrew John Hughes [2011-02-25 16:53]: >>> >>> net/sourceforge/jnlp/runtime/JNLPProxySelector.class >>> net/sourceforge/jnlp/DefaultLaunchHandler.class >>> net/sourceforge/jnlp/StreamEater.class >>> -net/sourceforge/jnlp/cache/package.html >>> -net/sourceforge/jnlp/event/package.html >>> -net/sourceforge/jnlp/services/package.html >>> -net/sourceforge/jnlp/package.html >>> -net/sourceforge/jnlp/runtime/package.html >>> -javaws.1 >>> > > Tis will also require reversal of 9dfc0ff64b70: > http://icedtea.classpath.org/hg/icedtea-web/rev/9dfc0ff64b70 > > Which looks in the jar by default for the jnlp. > Actually, it wont. Notice that about.jnlp is not in the list of files being removed. All files under netx/net/sourceforge/jnlp/resources are added to netx.jar by a separate rule. Cheers, Omair From omajid at icedtea.classpath.org Fri Feb 25 14:51:58 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Fri, 25 Feb 2011 22:51:58 +0000 Subject: /hg/icedtea-web: Remove unused manifest file Message-ID: changeset 10a5de5188f2 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=10a5de5188f2 author: Omair Majid date: Fri Feb 25 17:51:42 2011 -0500 Remove unused manifest file The file netx/net/sourceforge/jnlp/resources/Manifest.mf looks like a holdover from the original NetX project. We use a different manifest file now for netx.jar 2011-02-25 Omair Majid * netx/net/sourceforge/jnlp/resources/Manifest.mf: Remove unused file. diffstat: 2 files changed, 4 insertions(+), 6 deletions(-) ChangeLog | 4 ++++ netx/net/sourceforge/jnlp/resources/Manifest.mf | 6 ------ diffs (21 lines): diff -r d7fee305bd4f -r 10a5de5188f2 ChangeLog --- a/ChangeLog Wed Feb 23 13:37:10 2011 -0500 +++ b/ChangeLog Fri Feb 25 17:51:42 2011 -0500 @@ -1,3 +1,7 @@ 2011-02-23 Omair Majid + + * netx/net/sourceforge/jnlp/resources/Manifest.mf: Remove unused file. + 2011-02-23 Omair Majid * Makefile.am: Add missing slash to JRE. diff -r d7fee305bd4f -r 10a5de5188f2 netx/net/sourceforge/jnlp/resources/Manifest.mf --- a/netx/net/sourceforge/jnlp/resources/Manifest.mf Wed Feb 23 13:37:10 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,6 +0,0 @@ -Manifest-Version: 1.0 -Created-By: jnlp.sourceforge.net -Specification-Title: netx JNLP client -Sealed: true -Main-Class: net.sourceforge.jnlp.runtime.Boot13 - From omajid at redhat.com Fri Feb 25 14:53:25 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 17:53:25 -0500 Subject: [icedtea-web] RFC: remove unused manifest file In-Reply-To: <20110225220252.GC3448@rivendell.middle-earth.co.uk> References: <4D681CB7.9070707@redhat.com> <20110225220252.GC3448@rivendell.middle-earth.co.uk> Message-ID: <4D6832E5.8050307@redhat.com> On 02/25/2011 05:02 PM, Dr Andrew John Hughes wrote: > On 16:18 Fri 25 Feb , Omair Majid wrote: >> Hi, >> >> The attached patch removes an unused manifest file from icedtea-web. > > Fine. I think we can class that one as trivial ;-) Just following the rules :) Pushed. Cheers, Omair From omajid at icedtea.classpath.org Fri Feb 25 15:17:25 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Fri, 25 Feb 2011 23:17:25 +0000 Subject: /hg/icedtea-web: Do not add extra files to netx.jar Message-ID: changeset 02ef9ba4d8a2 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=02ef9ba4d8a2 author: Omair Majid date: Fri Feb 25 18:16:48 2011 -0500 Do not add extra files to netx.jar To quote Andrew John Hughes: This code dates back to when we used the OpenJDK import mechanism. If they weren't in classes.jar then, they wouldn't have been used. 2011-02-25 Omair Majid * Makefile.am (stamps/netx-dist.stamp): Do not add extra files to classes.jar. diffstat: 2 files changed, 5 insertions(+), 2 deletions(-) ChangeLog | 5 +++++ Makefile.am | 2 -- diffs (24 lines): diff -r 10a5de5188f2 -r 02ef9ba4d8a2 ChangeLog --- a/ChangeLog Fri Feb 25 17:51:42 2011 -0500 +++ b/ChangeLog Fri Feb 25 18:16:48 2011 -0500 @@ -1,3 +1,8 @@ 2011-02-25 Omair Majid + + * Makefile.am (stamps/netx-dist.stamp): Do not add extra files to + classes.jar. + 2011-02-25 Omair Majid * netx/net/sourceforge/jnlp/resources/Manifest.mf: Remove unused file. diff -r 10a5de5188f2 -r 02ef9ba4d8a2 Makefile.am --- a/Makefile.am Fri Feb 25 17:51:42 2011 -0500 +++ b/Makefile.am Fri Feb 25 18:16:48 2011 -0500 @@ -266,8 +266,6 @@ stamps/netx-dist.stamp: stamps/netx.stam cp -pPR $(SRC_DIR_LINK) $(NETX_SRCDIR) src; \ find src -type f -exec chmod 640 '{}' ';' -o -type d -exec chmod 750 '{}' ';'; \ cd src ; \ - $(BOOT_DIR)/bin/jar uf $(NETX_DIR)/lib/classes.jar \ - `find . -type f -not -name '*.java'` ; \ $(ZIP) -qr $(NETX_DIR)/lib/src.zip javax net ) mkdir -p stamps touch $@ From omajid at redhat.com Fri Feb 25 15:18:19 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 18:18:19 -0500 Subject: [icedtea-web] RFC: do not add unneeded files to netx.jar In-Reply-To: <20110225215205.GA3448@rivendell.middle-earth.co.uk> References: <4D681FA4.2030402@redhat.com> <20110225215205.GA3448@rivendell.middle-earth.co.uk> Message-ID: <4D6838BB.3080807@redhat.com> On 02/25/2011 04:52 PM, Dr Andrew John Hughes wrote: > On 16:31 Fri 25 Feb , Omair Majid wrote: >> Hi, >> >> The attached patch remove the addition of unrequired files to netx.jar. >> Currently a number of uneeded files (html files, man pages) are added to >> netx.jar. >> >> The diff in the file list for netx.jar with the patch applied looks like >> this: >> >> net/sourceforge/jnlp/runtime/JNLPProxySelector.class >> net/sourceforge/jnlp/DefaultLaunchHandler.class >> net/sourceforge/jnlp/StreamEater.class >> -net/sourceforge/jnlp/cache/package.html >> -net/sourceforge/jnlp/event/package.html >> -net/sourceforge/jnlp/services/package.html >> -net/sourceforge/jnlp/package.html >> -net/sourceforge/jnlp/runtime/package.html >> -javaws.1 >> >> As you can seen, only html files and the man page is removed. Okay to >> commit? >> > > Looks fine. That code dates back to when we used the OpenJDK import mechanism. > If they weren't in classes.jar then, they wouldn't have been used. > Ah, that explains a lot. Thanks for looking over the patch. I have pushed it to HEAD. Cheers, Omair From omajid at redhat.com Fri Feb 25 16:06:37 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 19:06:37 -0500 Subject: [icedtea-web] RFC: add proxy auto config support In-Reply-To: <20110225214648.GY3448@rivendell.middle-earth.co.uk> References: <4D5C23D0.7050809@redhat.com> <20110216195129.GB26007@rivendell.middle-earth.co.uk> <4D5C39D6.2050308@redhat.com> <20110217221617.GC27039@rivendell.middle-earth.co.uk> <4D67CCE1.6020205@redhat.com> <20110225214648.GY3448@rivendell.middle-earth.co.uk> Message-ID: <4D68440D.5020003@redhat.com> Updated patch attached. On 02/25/2011 04:46 PM, Dr Andrew John Hughes wrote: > On 10:38 Fri 25 Feb , Omair Majid wrote: > > snip (this is essentially a rewrite of the build work :-) > There are some code changes too (nothing in the actual implementation of PAC parsing though). The PacEvaluator interface and PacEvaluatorFactory were added to allow icedtea-web to continue building without rhino. >> >> Any thoughts on the attached patch? Also, do you have any links to good >> documentation on AC_CONFIG_FILES and good practices for it? I would like >> to use it if possible for build.properties but so far I dont have much >> to go on. >> > > The autoconf manual is what I usually use. I'm not aware of anything else. > Of course, you do have the source for it... ;-) > Yeah, but there is a big difference between making something work and making it work well. Even if I read and understand all of autoconf's source, I wont know about the best practices. > I think it's just simple subsitution - i.e. @x@ is replaced with the value of x. > Nothing clever. So you'd need to create a RHINO_AVAILABLE in configure and > then allow it to be substituted. > > Comments below. Only issue for this patch is the IT_FIND_JAVA macro. > The autoconf changes should be in a separate patch. This one is already > big enough ;-) > Ah, good. That's exactly what I was hoping :D >> @@ -255,6 +276,7 @@ >> ${INSTALL_DATA} -D $${files} \ >> $(NETX_DIR)/net/sourceforge/jnlp/resources/$${files}; \ >> done) >> + cp -pPR build.properties $(NETX_DIR)/net/sourceforge/jnlp/ Added an explicit copy here to copy pac-funcs.js to build dir. >> @@ -378,6 +401,28 @@ >> rm -rf ${abs_top_builddir}/docs/plugin >> rm -f stamps/plugin-docs.stamp >> >> + >> +# check >> +# ========================== >> + >> +jrunscript: >> +if WITH_RHINO >> + echo '$(BOOT_DIR)/bin/java -cp $(RHINO_JAR) org.mozilla.javascript.tools.shell.Main $$@'> jrunscript >> + chmod u+x jrunscript >> +else >> + echo "jrunscript requires rhino support" >> + exit 1 >> +endif > > autoconf could do this too FWIW. Look at javac.in in IcedTea. > I will address this in a separate patch. >> + >> +check-pac-functions: stamps/bootstrap-directory.stamp jrunscript >> + ./jrunscript $(abs_top_srcdir)/tests/netx/pac/pac-funcs-test.js \ >> + $$(readlink -f $(abs_top_srcdir)/netx/net/sourceforge/jnlp/runtime/pac-funcs.js) >> + >> +clean-tests: clean-jrunscript >> + >> +clean-jrunscript: >> + rm -f jrunscript >> + >> # plugin tests >> >> if ENABLE_PLUGIN >> @@ -414,6 +459,7 @@ >> # bootstrap >> stamps/bootstrap-directory.stamp: stamps/native-ecj.stamp >> mkdir -p $(BOOT_DIR)/bin stamps/ >> + ln -sf $(JAVA) $(BOOT_DIR)/bin/java > > Wasn't this already present? > Surprisingly, no. Here's what my bootstrap tree looks like from a fresh clone: $ find . ./jdk1.6.0 ./jdk1.6.0/bin ./jdk1.6.0/bin/jar ./jdk1.6.0/bin/javac ./jdk1.6.0/bin/javadoc ./jdk1.6.0/jre ./jdk1.6.0/jre/lib ./jdk1.6.0/jre/lib/amd64 ./jdk1.6.0/jre/lib/rt.jar ./jdk1.6.0/jre/lib/jsse.jar ./jdk1.6.0/include ./jdk1.6.0/include/jvmti.h ./jdk1.6.0/include/classfile_constants.h ./jdk1.6.0/include/jvmticmlr.h ./jdk1.6.0/include/linux ./jdk1.6.0/include/jawt.h ./jdk1.6.0/include/jni.h ./jdk1.6.0/include/jdwpTransport.h >> ln -sf $(JAR) $(BOOT_DIR)/bin/jar >> ln -sf $(abs_top_builddir)/javac $(BOOT_DIR)/bin/javac >> ln -sf $(JAVADOC) $(BOOT_DIR)/bin/javadoc >> diff -r d7fee305bd4f acinclude.m4 >> --- a/acinclude.m4 Wed Feb 23 13:37:10 2011 -0500 >> +++ b/acinclude.m4 Thu Feb 24 19:34:38 2011 -0500 >> @@ -122,6 +122,13 @@ >> fi >> ]) >> >> +AC_DEFUN([IT_FIND_JAVA]) >> +[ >> + AC_REQUIRE([IT_CHECK_FOR_JDK]) >> + JAVA=${SYSTEM_JDK_DIR}/bin/java >> + AC_SUBS(JAVA) >> +] >> + > > This isn't the one from IcedTea. It's a lot more complicated... > BTW, AC_SUBS should be AC_SUBST? > I somehow missed the FIND_JAVA from IcedTea6 :/ I see it there now. I have added it as IT_FIND_JAVA. Yes, that should be AC_SUBST (I wonder how it worked when I was testing it...). >> diff -r d7fee305bd4f netx/net/sourceforge/jnlp/runtime/RhinoBasedPacEvaluator.java >> --- /dev/null Thu Jan 01 00:00:00 1970 +0000 >> +++ b/netx/net/sourceforge/jnlp/runtime/RhinoBasedPacEvaluator.java Thu Feb 24 19:34:38 2011 -0500 >> @@ -0,0 +1,256 @@ >> + /** >> + * Returns the contents of file at pacUrl as a String. >> + */ >> + private String getPacContents(URL pacUrl) { >> + StringBuilder contents = null; >> + try { >> + String line = null; >> + BufferedReader pacReader = new BufferedReader(new InputStreamReader(pacUrl.openStream())); >> + contents = new StringBuilder(); >> + while ((line = pacReader.readLine()) != null) { >> + // System.out.println(line); >> + contents = contents.append(line).append("\n"); >> + } >> + } catch (IOException e) { >> + contents = null; >> + } >> + >> + System.out.println(contents); Removed print statement. Ok to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: pac-support-08.patch Type: text/x-patch Size: 75458 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110225/3d6a2ae3/pac-support-08.patch From omajid at redhat.com Fri Feb 25 16:09:17 2011 From: omajid at redhat.com (Omair Majid) Date: Fri, 25 Feb 2011 19:09:17 -0500 Subject: [icedtea-web] RFC: integrate jnlp authenticator into rest of security system In-Reply-To: <20110225212612.GX3448@rivendell.middle-earth.co.uk> References: <4D0F9D37.9030102@redhat.com> <20101220182610.GD25130@rivendell.middle-earth.co.uk> <4D0FA2AF.4020806@redhat.com> <20101220191206.GG25130@rivendell.middle-earth.co.uk> <4D0FAD56.2050007@redhat.com> <4D67D4DC.2050006@redhat.com> <20110225212612.GX3448@rivendell.middle-earth.co.uk> Message-ID: <4D6844AD.8090909@redhat.com> On 02/25/2011 04:26 PM, Dr Andrew John Hughes wrote: > On 11:12 Fri 25 Feb , Omair Majid wrote: >> On 12/20/2010 02:24 PM, Omair Majid wrote: >>> On 12/20/2010 02:12 PM, Dr Andrew John Hughes wrote: >>>> On 13:38 Mon 20 Dec , Omair Majid wrote: >>>>> On 12/20/2010 01:26 PM, Dr Andrew John Hughes wrote: >>>>>> On 13:15 Mon 20 Dec , Omair Majid wrote: >>>>>>> Hi, >>>>>>> >>>>>>> The attached patches further integrates JNLPAuthenticator and >>>>>>> PasswordAuthenticationDialog into icedtea-web. The patches shows the >>>>>>> dialogs using the secure thread, localizes strings, and removes >>>>>>> hardcoded mention of the icedteaplugin. >>>>>>> >>>>>>> I have split the change into two patches: one deals with renaming >>>>>>> files, >>>>>>> the other deals with the actual code changes. >>>>>>> >>>>>>> The first patch renames classes to ensure consistency. It contains no >>>>>>> functional changes (other than those required for renaming). The class >>>>>>> net.sourceforge.jnlp.security.SecurityWarning is renamed to >>>>>>> net.sourceforge.jnlp.security.SecurityDialogs, >>>>>>> net.sourceforge.jnlp.security.SecurityWarningDialog is renamed to >>>>>>> net.sourceforge.jnlp.security.SecurityDialog and >>>>>>> net.sourceforge.jnlp.security.PasswordAuthenticationDialog is >>>>>>> renamed to >>>>>>> net.sourceforge.jnlp.PasswordAuthenticationPanel. >>>>>>> >>>>>> >>>>>> What is the reason for the renaming? Could we not delay this until >>>>>> the 2.0 series? >>>>>> >>>>> >>>>> Well, the SecurityWarning class should show security _warnings_. The >>>>> second patch modifies (the original) SecurityWarning and >>>>> SecurityWarningDialog classes to display authentication dialogs dialogs >>>>> (along with warning dialogs). An authentication dialog is not a warning, >>>>> and hence the rename. >>>>> >>>>> In general, the idea is that anything sensitive that requires a GUI >>>>> dialog should be run through SecurityWarning/SecurityDialog. >>>>> >>>>> If you think that we we should hold off the rename, I am fine with that. >>>>> The names of classes might be misleading/awkward for a while then. >>>>> >>>> >>>> Are we planning other API changes in 1.1? I'm just trying to work out the >>>> extent to which we see 1.1 as stable, I guess. If we are making other API >>>> changes, then I guess the rename is ok. >>> >>> That depends on how you define API changes. We definitely will be adding >>> classes in the 1.1 time frame, but I am not sure if we have any more >>> renames/removals planned. >>> >> >> Any thoughts? If you are not ok with renaming the class, then I would >> like to skip that bit and apply the second part of the patch (which >> integrates the authentication dialog into the rest of the security system). >> > > I'd say go ahead and rename. > Thanks. Will rename and push. > Do we have a planned release date for 1.1 yet? > I pinged Deepak about this, and he said that mid-march seems like a reasonable target. Cheers, Omair From mark at klomp.org Sat Feb 26 15:45:49 2011 From: mark at klomp.org (Mark Wielaard) Date: Sun, 27 Feb 2011 00:45:49 +0100 (CET) Subject: IcedTea server upgraded, bugzilla still down Message-ID: <33509.80.101.103.228.1298763949.squirrel@gnu.wildebeest.org> Hi hackers, The icedtea.classpath.org server was upgraded on Saturday. Mailinglists, mercurial repos, web server and wiki are back up. New remote backups are being made. Bugzilla is still down. This will take a bit more work on Sunday. Apologies for the inconvenience. Please report any issues with the upgraded server. Cheers, Mark From xerxes at zafena.se Sun Feb 27 03:40:30 2011 From: xerxes at zafena.se (Xerxes Ranby) Date: Sun, 27 Feb 2011 12:40:30 +0100 Subject: RFC: JamVM: Fix configure --enable-jamvm full bootstrap build. Message-ID: <4D6A382E.2010803@zafena.se> Greetings The attached patch makes --enable-jamvm builds self-hosting! The patch updates JamVM to the latest revision upstream that fix a bug in JVM_NewMultiArray. http://git.berlios.de/cgi-bin/gitweb.cgi?p=jamvm;a=commit;h=30c4a6b93ffa385833360921bfc613829fb081c9 Ok to push to IcedTea6 HEAD and 1.10 ? Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: 27feb-jamvm.patch Type: text/x-patch Size: 1963 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110227/2d7820be/27feb-jamvm.patch From bugzilla-daemon at icedtea.classpath.org Sun Feb 27 04:20:05 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Sun, 27 Feb 2011 12:20:05 +0000 Subject: [Bug 603] How to but icedtea? Already added a bug report, but no answer. In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=603 --- Comment #7 from IcedTea 2011-02-27 12:20:05 --- Is this still a problem with the new icedtea-web component? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From mark at klomp.org Sun Feb 27 04:23:11 2011 From: mark at klomp.org (Mark Wielaard) Date: Sun, 27 Feb 2011 13:23:11 +0100 (CET) Subject: IcedTea server upgraded In-Reply-To: <33509.80.101.103.228.1298763949.squirrel@gnu.wildebeest.org> References: <33509.80.101.103.228.1298763949.squirrel@gnu.wildebeest.org> Message-ID: <33136.80.101.103.228.1298809391.squirrel@gnu.wildebeest.org> On Sun, February 27, 2011 00:45, Mark Wielaard wrote: > The icedtea.classpath.org server was upgraded on Saturday. > Mailinglists, mercurial repos, web server and wiki are back up. > New remote backups are being made. Bugzilla is still down. > This will take a bit more work on Sunday. The bugzilla upgrade has also been completed now. > Apologies for the inconvenience. > Please report any issues with the upgraded server. Thanks, Mark From mark at klomp.org Sun Feb 27 04:25:49 2011 From: mark at klomp.org (Mark Wielaard) Date: Sun, 27 Feb 2011 13:25:49 +0100 (CET) Subject: RFC: JamVM: Fix configure --enable-jamvm full bootstrap build. In-Reply-To: <4D6A382E.2010803@zafena.se> References: <4D6A382E.2010803@zafena.se> Message-ID: <49898.80.101.103.228.1298809549.squirrel@gnu.wildebeest.org> Hi Xerxes, On Sun, February 27, 2011 12:40, Xerxes Ranby wrote: > The attached patch makes --enable-jamvm builds self-hosting! > > The patch updates JamVM to the latest revision upstream that fix a bug > in JVM_NewMultiArray. > http://git.berlios.de/cgi-bin/gitweb.cgi?p=jamvm;a=commit;h=30c4a6b93ffa385833360921bfc613829fb081c9 That is great! > Ok to push to IcedTea6 HEAD Certainly for head. > and 1.10 ? That is up to Andrew. Cheers, Mark From mark at klomp.org Sun Feb 27 09:10:10 2011 From: mark at klomp.org (Mark Wielaard) Date: Sun, 27 Feb 2011 18:10:10 +0100 (CET) Subject: Call to Arms: OpenJDK7 In-Reply-To: <20110223182853.GA24648@rivendell.middle-earth.co.uk> References: <20110223182853.GA24648@rivendell.middle-earth.co.uk> Message-ID: <49806.80.101.103.228.1298826610.squirrel@gnu.wildebeest.org> On Wed, February 23, 2011 19:28, Dr Andrew John Hughes wrote: > We need to get our Free builds up-to-date ASAP to provide an alternative > to the proprietary Oracle offering. IcedTea7 is currently horribly > behind. Damien (CCed) made experimental IcedTea7 trunk/1.14 packages for Debian based on b131: http://people.debian.org/~drazzib/debian/ Maybe those sources/changes can be used as base to upgrade icedtea7? Cheers, Mark From drazzib at drazzib.com Sun Feb 27 10:18:53 2011 From: drazzib at drazzib.com (Damien Raude-Morvan) Date: Sun, 27 Feb 2011 19:18:53 +0100 Subject: Call to Arms: OpenJDK7 In-Reply-To: <49806.80.101.103.228.1298826610.squirrel@gnu.wildebeest.org> References: <20110223182853.GA24648@rivendell.middle-earth.co.uk> <49806.80.101.103.228.1298826610.squirrel@gnu.wildebeest.org> Message-ID: <201102271918.57649.drazzib@drazzib.com> Le dimanche 27 f?vrier 2011 18:10:10, Mark Wielaard a ?crit : > On Wed, February 23, 2011 19:28, Dr Andrew John Hughes wrote: > > We need to get our Free builds up-to-date ASAP to provide an alternative > > to the proprietary Oracle offering. IcedTea7 is currently horribly > > behind. Hi Mark, > Damien (CCed) made experimental IcedTea7 trunk/1.14 packages for Debian > based on b131: http://people.debian.org/~drazzib/debian/ > Maybe those sources/changes can be used as base to upgrade icedtea7? I've used IcedTea7 tip as base for this work and already submitted some of my patches to distro-pkg-dev. Everything is publicly available on my debian account [1]. I would be happy if someone can merge them into icedtea repository [2]. This effort as some limitations : - Cacao altvm doesn't build because of removal of HPI from OpenJDK [3] - Zero/Shark FTBFS too (some issue on icedtea6 - seems linked to HS20) [4] - It's based on jdk7 hg forest and not on icedtea7 hg forest (someone has to merge jdk7 into icedtea7 - although I'm not sure of the purpose of this hg forest) [1] http://people.debian.org/~drazzib/openjdk/ [2] http://icedtea.classpath.org/hg/icedtea [3] http://server.complang.tuwien.ac.at/cgi-bin/bugzilla/show_bug.cgi?id=154 [4] http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=639 Cheers, PS: I'm subscribed to distro-pkg-dev@, so no need to CC me. -- Damien -------------- next part -------------- A non-text attachment was scrubbed... Name: not available Type: application/pgp-signature Size: 836 bytes Desc: This is a digitally signed message part. Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110227/8cf00994/attachment.bin From xranby at icedtea.classpath.org Sun Feb 27 11:11:26 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Sun, 27 Feb 2011 19:11:26 +0000 Subject: /hg/icedtea6: JamVM: Fix configure --enable-jamvm full bootstrap... Message-ID: changeset 7f61b6fae9da in /hg/icedtea6 details: http://icedtea.classpath.org/hg/icedtea6?cmd=changeset;node=7f61b6fae9da author: Xerxes R?nby date: Sun Feb 27 20:11:15 2011 +0100 JamVM: Fix configure --enable-jamvm full bootstrap build. 2011-02-27 Xerxes Ranby JamVM: Fix configure --enable-jamvm full bootstrap build. * NEWS: Updated. * Makefile.am: (JAMVM_VERSION): Updated to latest JamVM revision. (JAMVM_SHA256SUM): Updated. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 1 - diffs (40 lines): diff -r d38a85ed9c32 -r 7f61b6fae9da ChangeLog --- a/ChangeLog Fri Feb 25 21:21:36 2011 +0000 +++ b/ChangeLog Sun Feb 27 20:11:15 2011 +0100 @@ -1,3 +1,11 @@ 2011-02-25 DJ Lucas + + JamVM: Fix configure --enable-jamvm full bootstrap build. + * NEWS: Updated. + * Makefile.am: + (JAMVM_VERSION): Updated to latest JamVM revision. + (JAMVM_SHA256SUM): Updated. + 2011-02-25 DJ Lucas * Makefile.am: diff -r d38a85ed9c32 -r 7f61b6fae9da Makefile.am --- a/Makefile.am Fri Feb 25 21:21:36 2011 +0000 +++ b/Makefile.am Sun Feb 27 20:11:15 2011 +0100 @@ -11,8 +11,8 @@ CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VE CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz -JAMVM_VERSION = 10329d9f3205698af125bba131b4f47339e81d90 -JAMVM_SHA256SUM = 0e87f22bc6a35c327ab343e7ca0e89512e3797aff93ee8a5539f0babfbd40f9b +JAMVM_VERSION = 30c4a6b93ffa385833360921bfc613829fb081c9 +JAMVM_SHA256SUM = e77434a7d02d75de7fe44e9e1d7d6a3fd7ddcd5447ddd175fde2a7ccb40f8838 JAMVM_BASE_URL = http://icedtea.classpath.org/download/drops/jamvm JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz diff -r d38a85ed9c32 -r 7f61b6fae9da NEWS --- a/NEWS Fri Feb 25 21:21:36 2011 +0000 +++ b/NEWS Sun Feb 27 20:11:15 2011 +0100 @@ -18,6 +18,7 @@ New in release 1.10 (2011-XX-XX): * The option --with-openjdk becomes --with-jdk-home and --disable-bootstrap * Support for building with HotSpot 20 from its stable tree * Added out-of-the-box JamVM support using --enable-jamvm + JamVM builds can bootstrap and are self-hosting. * Allow building of JamVM beside the default VM by using --with-additional-vms=jamvm * Allow the location of the JamVM source zip to be specified using From xerxes at zafena.se Sun Feb 27 11:23:11 2011 From: xerxes at zafena.se (Xerxes Ranby) Date: Sun, 27 Feb 2011 20:23:11 +0100 Subject: RFC: JamVM: Fix configure --enable-jamvm full bootstrap build. In-Reply-To: <49898.80.101.103.228.1298809549.squirrel@gnu.wildebeest.org> References: <4D6A382E.2010803@zafena.se> <49898.80.101.103.228.1298809549.squirrel@gnu.wildebeest.org> Message-ID: <4D6AA49F.9080205@zafena.se> On 2011-02-27 13:25, Mark Wielaard wrote: > Hi Xerxes, > > On Sun, February 27, 2011 12:40, Xerxes Ranby wrote: >> The attached patch makes --enable-jamvm builds self-hosting! >> >> The patch updates JamVM to the latest revision upstream that fix a bug >> in JVM_NewMultiArray. >> http://git.berlios.de/cgi-bin/gitweb.cgi?p=jamvm;a=commit;h=30c4a6b93ffa385833360921bfc613829fb081c9 > That is great! > >> Ok to push to IcedTea6 HEAD > Certainly for head. Great! Commited to: http://icedtea.classpath.org/hg/icedtea6/rev/7f61b6fae9da >> and 1.10 ? > That is up to Andrew. "Branch pushes require an approval but there's no specially endowed person who has to give that approval i.e. you can do it if you feel comfortable doing so." See: http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012362.html Ok for 1.10 ? > Cheers, > > Mark > Cheers, Xerxes From mark at klomp.org Sun Feb 27 15:01:58 2011 From: mark at klomp.org (Mark Wielaard) Date: Mon, 28 Feb 2011 00:01:58 +0100 (CET) Subject: RFC: JamVM: Fix configure --enable-jamvm full bootstrap build. In-Reply-To: <4D6AA49F.9080205@zafena.se> References: <4D6A382E.2010803@zafena.se> <49898.80.101.103.228.1298809549.squirrel@gnu.wildebeest.org> <4D6AA49F.9080205@zafena.se> Message-ID: <47998.80.101.103.228.1298847718.squirrel@gnu.wildebeest.org> On Sun, February 27, 2011 20:23, Xerxes Ranby wrote: > On 2011-02-27 13:25, Mark Wielaard wrote: >>> Ok to push to IcedTea6 HEAD >> Certainly for head. > Great! > Commited to: > http://icedtea.classpath.org/hg/icedtea6/rev/7f61b6fae9da > >>> and 1.10 ? >> That is up to Andrew. > "Branch pushes require an approval but there's no specially endowed > person who has to give that approval i.e. you can do it if you > feel comfortable doing so." > See: > http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012362.html > > Ok for 1.10 ? I think if it is fine for trunk, then it is fine for the branch too. It doesn't really make sense to have a non-bootstrappable jamvm on the trunk. BTW. If you look at the buildbot test results there is something odd going on with the langtools tests. There are some failures that we should take a look at. But the odd thing is that they seem to just abort after T6397044. I can reproduce this locally. The logs stop at T6397044, but I have a (passing) T6397286.jtr file. Which seems to mean the actual failure/crash/abort is in that one or in processing the results from it. I haven't debugged it further. From xranby at icedtea.classpath.org Sun Feb 27 15:20:28 2011 From: xranby at icedtea.classpath.org (xranby at icedtea.classpath.org) Date: Sun, 27 Feb 2011 23:20:28 +0000 Subject: /hg/release/icedtea6-1.10: JamVM: Fix configure --enable-jamvm f... Message-ID: changeset d09de0dcaf8b in /hg/release/icedtea6-1.10 details: http://icedtea.classpath.org/hg/release/icedtea6-1.10?cmd=changeset;node=d09de0dcaf8b author: Xerxes R?nby date: Mon Feb 28 00:19:18 2011 +0100 JamVM: Fix configure --enable-jamvm full bootstrap build. 2011-02-27 Xerxes Ranby JamVM: Fix configure --enable-jamvm full bootstrap build. * NEWS: Updated. * Makefile.am: (JAMVM_VERSION): Updated to latest JamVM revision. (JAMVM_SHA256SUM): Updated. diffstat: 2 files changed, 5 insertions(+), 1 deletion(-) ChangeLog | 5 +++++ Makefile.am | 1 - diffs (40 lines): diff -r 7ae32a60dcca -r d09de0dcaf8b ChangeLog --- a/ChangeLog Fri Feb 25 21:21:36 2011 +0000 +++ b/ChangeLog Mon Feb 28 00:19:18 2011 +0100 @@ -1,3 +1,11 @@ 2011-02-25 DJ Lucas + + JamVM: Fix configure --enable-jamvm full bootstrap build. + * NEWS: Updated. + * Makefile.am: + (JAMVM_VERSION): Updated to latest JamVM revision. + (JAMVM_SHA256SUM): Updated. + 2011-02-25 DJ Lucas * Makefile.am: diff -r 7ae32a60dcca -r d09de0dcaf8b Makefile.am --- a/Makefile.am Fri Feb 25 21:21:36 2011 +0000 +++ b/Makefile.am Mon Feb 28 00:19:18 2011 +0100 @@ -11,8 +11,8 @@ CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VE CACAO_URL = $(CACAO_BASE_URL)/$(CACAO_VERSION).tar.gz CACAO_SRC_ZIP = cacao-$(CACAO_VERSION).tar.gz -JAMVM_VERSION = 10329d9f3205698af125bba131b4f47339e81d90 -JAMVM_SHA256SUM = 0e87f22bc6a35c327ab343e7ca0e89512e3797aff93ee8a5539f0babfbd40f9b +JAMVM_VERSION = 30c4a6b93ffa385833360921bfc613829fb081c9 +JAMVM_SHA256SUM = e77434a7d02d75de7fe44e9e1d7d6a3fd7ddcd5447ddd175fde2a7ccb40f8838 JAMVM_BASE_URL = http://icedtea.classpath.org/download/drops/jamvm JAMVM_URL = $(JAMVM_BASE_URL)/jamvm-$(JAMVM_VERSION).tar.gz JAMVM_SRC_ZIP = jamvm-$(JAMVM_VERSION).tar.gz diff -r 7ae32a60dcca -r d09de0dcaf8b NEWS --- a/NEWS Fri Feb 25 21:21:36 2011 +0000 +++ b/NEWS Mon Feb 28 00:19:18 2011 +0100 @@ -16,6 +16,7 @@ New in release 1.10 (2011-XX-XX): * The option --with-openjdk becomes --with-jdk-home and --disable-bootstrap * Support for building with HotSpot 20 from its stable tree * Added out-of-the-box JamVM support using --enable-jamvm + JamVM builds can bootstrap and are self-hosting. * Allow building of JamVM beside the default VM by using --with-additional-vms=jamvm * Allow the location of the JamVM source zip to be specified using From xerxes at zafena.se Sun Feb 27 15:26:21 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 28 Feb 2011 00:26:21 +0100 Subject: RFC: JamVM: Fix configure --enable-jamvm full bootstrap build. In-Reply-To: <47998.80.101.103.228.1298847718.squirrel@gnu.wildebeest.org> References: <4D6A382E.2010803@zafena.se> <49898.80.101.103.228.1298809549.squirrel@gnu.wildebeest.org> <4D6AA49F.9080205@zafena.se> <47998.80.101.103.228.1298847718.squirrel@gnu.wildebeest.org> Message-ID: <4D6ADD9D.8070506@zafena.se> On 2011-02-28 00:01, Mark Wielaard wrote: > On Sun, February 27, 2011 20:23, Xerxes Ranby wrote: >> On 2011-02-27 13:25, Mark Wielaard wrote: >>>> Ok to push to IcedTea6 HEAD >>> Certainly for head. >> Great! >> Commited to: >> http://icedtea.classpath.org/hg/icedtea6/rev/7f61b6fae9da >> >>>> and 1.10 ? >>> That is up to Andrew. >> "Branch pushes require an approval but there's no specially endowed >> person who has to give that approval i.e. you can do it if you >> feel comfortable doing so." >> See: >> http://mail.openjdk.java.net/pipermail/distro-pkg-dev/2011-February/012362.html >> >> Ok for 1.10 ? > > I think if it is fine for trunk, then it is fine for the branch too. Good, commited to 1.10: http://icedtea.classpath.org/hg/release/icedtea6-1.10/rev/d09de0dcaf8b > It doesn't really make sense to have a non-bootstrappable jamvm on the > trunk. > Cheers Xerxes From xerxes at zafena.se Sun Feb 27 15:37:31 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 28 Feb 2011 00:37:31 +0100 Subject: RFC: JamVM: there is something odd going on with the langtools tests Message-ID: <4D6AE03B.7050503@zafena.se> On 2011-02-28 00:01, Mark Wielaard wrote: > BTW. If you look at the buildbot test results there is something > odd going on with the langtools tests. There are some failures that > we should take a look at. But the odd thing is that they seem to > just abort after T6397044. I can reproduce this locally. > The logs stop at T6397044, but I have a (passing) T6397286.jtr > file. Which seems to mean the actual failure/crash/abort is in > that one or in processing the results from it. I haven't debugged > it further. > Yes this is odd. I have attached a patch for icedtea6 that disables a lot more Unrecognized options. I belive this will help us to locate tests that take-down JamVM in a unclean way. By finding these failing tests we will have a easier time to fix remaining bugs in JamVM. Ok for TRUNK ? Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: jamvm-ignore-more.patch Type: text/x-patch Size: 2735 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/2513fa7a/jamvm-ignore-more.patch From doko at ubuntu.com Sun Feb 27 15:56:48 2011 From: doko at ubuntu.com (Matthias Klose) Date: Mon, 28 Feb 2011 00:56:48 +0100 Subject: RFC: JamVM: Fix configure --enable-jamvm full bootstrap build. In-Reply-To: <47998.80.101.103.228.1298847718.squirrel@gnu.wildebeest.org> References: <4D6A382E.2010803@zafena.se> <49898.80.101.103.228.1298809549.squirrel@gnu.wildebeest.org> <4D6AA49F.9080205@zafena.se> <47998.80.101.103.228.1298847718.squirrel@gnu.wildebeest.org> Message-ID: <4D6AE4C0.6010708@ubuntu.com> On 28.02.2011 00:01, Mark Wielaard wrote: > BTW. If you look at the buildbot test results there is something > odd going on with the langtools tests. There are some failures that > we should take a look at. But the odd thing is that they seem to > just abort after T6397044. I can reproduce this locally. > The logs stop at T6397044, but I have a (passing) T6397286.jtr > file. Which seems to mean the actual failure/crash/abort is in > that one or in processing the results from it. I haven't debugged > it further. would it help to disable -samevm when running the tests with jamvm? From xerxes at zafena.se Sun Feb 27 16:44:41 2011 From: xerxes at zafena.se (=?ISO-8859-1?Q?Xerxes_R=E5nby?=) Date: Mon, 28 Feb 2011 01:44:41 +0100 Subject: RFC: JamVM: there is something odd going on with the langtools tests In-Reply-To: <4D6AE03B.7050503@zafena.se> References: <4D6AE03B.7050503@zafena.se> Message-ID: <4D6AEFF9.7070106@zafena.se> On 2011-02-28 00:37, Xerxes R?nby wrote: > On 2011-02-28 00:01, Mark Wielaard wrote: > > BTW. If you look at the buildbot test results there is something > > odd going on with the langtools tests. There are some failures that > > we should take a look at. But the odd thing is that they seem to > > just abort after T6397044. I can reproduce this locally. > > The logs stop at T6397044, but I have a (passing) T6397286.jtr > > file. Which seems to mean the actual failure/crash/abort is in > > that one or in processing the results from it. I haven't debugged > > it further. > > > Yes this is odd. > > I have attached a patch for icedtea6 that disables a lot more > Unrecognized options. I belive this will help us to locate tests that > take-down JamVM in a unclean way. By finding these failing tests we will > have a easier time to fix remaining bugs in JamVM. Updated the patch once more. > Ok for TRUNK ? Now whem running make check-hotspot the list of remaining FAILED and Error tests have been reduced to a handfull. make check-hotspot FAILED: compiler/6603011/Test.java Unexpected exit from test [exit code: 136] * Needs investigation! FAILED: compiler/6800154/Test6800154.java Unexpected exit from test [exit code: 136] * Needs investigation! Error: compiler/6866651/Test.java elapsed time (seconds): 120.004 (timed out) Error: compiler/6901572/Test.java elapsed time (seconds): 120.001 (timed out) FAILED: gc/6581734/Test6581734.java Exception: No matching memory pools found: test with -XX:+UseConcMarkSweepGC * Test are unsuitable for JamVM it should be ignored if possible when using JamVM. FAILED: runtime/6626217/Test6626217.sh Execution failed: exit code 1 * Needs investigation! Error: runtime/6925573/SortMethodsTest.java elapsed time (seconds): 120.001 (timed out) FAILED: runtime/6929067/Test6929067.sh Execution failed: exit code 127 * Needs investigation! Test results: passed: 91; failed: 5; error: 3 Cheers Xerxes -------------- next part -------------- A non-text attachment was scrubbed... Name: jamvm-ignore-more-28feb.patch Type: text/x-patch Size: 2958 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/d3e071bb/jamvm-ignore-more-28feb.patch From bugzilla-daemon at icedtea.classpath.org Sun Feb 27 18:22:53 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 02:22:53 +0000 Subject: [Bug 641] [powerpc] hs20 fails to build (stack size specified is too small, Specify at least 1024k) In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=641 Matthias Klose changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED Resolution| |FIXED --- Comment #1 from Matthias Klose 2011-02-28 02:22:53 --- now fixed in 6-1.10 and 6-hg. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From asu at redhat.com Sun Feb 27 19:45:38 2011 From: asu at redhat.com (Andrew Su) Date: Sun, 27 Feb 2011 22:45:38 -0500 (EST) Subject: [RFC][Icedtea-Web]: Hide unused components in itw-settings. In-Reply-To: <97191491.267279.1298864736653.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <209259151.267284.1298864738994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Hello, The attached patch will hide the unused components in itw-settings. Unused: Setting cache size. Selecting another JRE for plugin to bind to. Questions? Comments? Concerns? Cheers, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: 20110227_patch1_hide_unused.patch Type: text/x-patch Size: 3471 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110227/a6c636c1/20110227_patch1_hide_unused.patch From asu at redhat.com Sun Feb 27 20:27:13 2011 From: asu at redhat.com (Andrew Su) Date: Sun, 27 Feb 2011 23:27:13 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1714513635.267447.1298867128013.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <495685143.267461.1298867232999.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Hello, This patch ensures that the port fields in itw-settings only accept numeric values. In this patch: - New Class: NumberDocument. - All port fields now use NumberDocument. Questions? Comments? Concerns? Cheers, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: 20110227_patch2_ensure_port_fields_are_numbers_only.patch Type: text/x-patch Size: 4918 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110227/f5faafde/20110227_patch2_ensure_port_fields_are_numbers_only.patch From bugzilla-daemon at icedtea.classpath.org Sun Feb 27 22:25:08 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 06:25:08 +0000 Subject: Your Bugzilla buglist needs attention. Message-ID: [This e-mail has been automatically generated.] You have one or more bugs assigned to you in the Bugzilla bug tracking system (http://icedtea.classpath.org/bugzilla/) that require attention. All of these bugs are in the NEW or REOPENED state, and have not been touched in 7 days or more. You need to take a look at them, and decide on an initial action. Generally, this means one of three things: (1) You decide this bug is really quick to deal with (like, it's INVALID), and so you get rid of it immediately. (2) You decide the bug doesn't belong to you, and you reassign it to someone else. (Hint: if you don't know who to reassign it to, make sure that the Component field seems reasonable, and then use the "Reassign bug to default assignee of selected component" option.) (3) You decide the bug belongs to you, but you can't solve it this moment. Just use the "Accept bug" command. To get a list of all NEW/REOPENED bugs, you can use this URL (bookmark it if you like!): http://icedtea.classpath.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=REOPENED&assigned_to=unassigned at icedtea.classpath.org Or, you can use the general query page, at http://icedtea.classpath.org/bugzilla/query.cgi Appended below are the individual URLs to get to all of your NEW bugs that haven't been touched for a week or more. You will get this message once a day until you've dealt with these bugs! org.omg.CORBA tests fail due to ORB class not implemented -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=17 Double.toString(string) expands value -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=32 Icedtea 1.7.0 and SwingWorker problem -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=87 SIGSEGV in 64 bit JDK 1.6 when using JNI, and both library and Java app are threaded -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=276 regressions in jdk testsuite with new hotspot -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=288 JVM fatal error in VM code (HS 14) after NetworkManager disable / reenable cycle -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=293 eclipse crashes if I try to configure PyDev plugin -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=305 run scilab 5.1 demos at openSUSE11.1 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=308 unexpected error -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=316 allow specifying explicit target arch -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=334 hotspot produces/executes incorrect code (works with cacao and zero) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=352 setPreferedSize without layout manager works on Sun. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=362 SIGBUS error at [libzip.so+0x40d1] -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=363 IntelliJ IDEA crashes due to SIGSEGV in libjvm.so+0x4760e6 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=365 Eclipse repeatedly crashes after changing C++ Project Properties -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=368 firefox with openjdk-plugin hangs whenever jmol app is used -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=395 SIGSEGV (0xb) around pango_layout_new+0x2a -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=396 SIGSEGV: JavaThread "Java2D Disposer" crashes JVM -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=408 similar error observed here -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=409 Applet cannot load j2pkcs11 library -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=411 Crash with ibus and JOSM -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=413 JVM Crash (SIGSEGV) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=418 Iced tea openjdk1.6 and jdk1.7 crashes in remote x server (cygwin) environment -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=423 Error: guarantee(get_thread_slow() == thread,"must be the same thread, slowly") -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=424 unable to compile icedtea-6.1.7: interpreter segfault in java.lang.Thread. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=435 YaCy crashed with SIGSEGV -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=437 Build fails on 64-bit systems due to upstream XPCOM bug -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=439 Iceweasel freezes and is unresponsive -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=443 Java VM: OpenJDK 64-Bit Server VM (1.6.0_0-b11 mixed mode linux-amd64) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=447 cacao fails to load icedtea plugin because ManagementFactory is broken on cacao VM -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=448 SIGSEGV while running jna test cases in ld-linux -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=452 shark test crashes on powerpc -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=456 building shark with shark fails on powerpc -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=467 Eclipse Galileo CDT crashes for SIGSEGV after saving a c++ file on CentOS 5.4 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=468 SIGSEGV memcpy -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=470 debugging using eclipse -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=471 Fatal error when running tests in Eclipse -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=478 Zero fails openjdk/jdk/test/java/lang/Rint -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=482 OpenOffice crashes due to a JRE fatal error -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=490 Eclipse crash due to error in Java Runtime Environment -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=499 OpenJDK SIGSEGV [libjvm.so+0x1c1937] -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=501 Uniform scalings broken when drawing dashed lines. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=504 Jagged round endcaps when drawing scaled up lines. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=506 Antialiased horizontal or vertical lines are not drawn properly. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=509 System.load on applet hang the second time -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=510 chromium constantly crash when IcedTea is installed on opensuse -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=511 shark build failure on ARM using thumb toolchain -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=514 Crash when running mkgmap -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=523 OpenOffice crash -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=524 Bad variable in hotspot.method_entry|exit probes from hotspot.stp -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=527 OpenJDK Shark VM warning: there may be trouble ahead -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=529 Shark running DaCapo 9.12 eclipse triggers Unimplemented in sharkTopLevelBlock.cpp:1180 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=530 install thinkingrock 3.1.2 start get erroe and crash -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=531 compilation of icedtea-6-1.8.1 fails on test_gamma -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=533 zero doesn't work on sparc linux -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=534 DaCapo 9.12 eclipse triggers Error: guarantee(cont_offset != 0,"unhandled implicit exception in compiled code") -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=536 I am open a tuxguitar and icedtea6 is crash -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=537 when jconsole try to connect remote target, target JVM down -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=540 shark fails to build on icedtea7 trunk 20100907 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=544 eclipse 3.5 - 4.0 crash on startup when using icedtea with cacao -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=545 Error: Deadlock in safepoint code. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=548 icedtea6-1.9 compile failure with --enable-zero --enable-shark on ppc64 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=551 shark + hs19 crashes in building docs -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=559 Building failed -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=560 javac error -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=561 NetX depends on sun.misc.BASE64Encoder -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=564 gerrit crash - problem points to jdk -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=566 NetX depends on sun.applet.AppletViewPanel -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=570 NetX depends on com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager.java -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=571 icedtea and keepvid.com -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=577 shark using llvm-2.8 fails to build on newer x86_64 hardware -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=581 ARM Zero c++ interpreter freecol crash using -Xincgc -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=584 icedtea6/1.8.2-3 on Maemo5 PR1.3: TV-Browser app crashes -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=589 Unable to build openjdk/icedtea on Slack 13.1 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=591 OpenJDK crashes on debian sqeeze (64 bit) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=594 ExceptionInInitializerError/AccessControlException in AppletAudioClip.play() -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=595 Tomcat crashes on tomcat stop -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=598 JRE failure with CollabNetSubversionEdge-1.3.0_linux-x86.tar.gz -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=601 [regression] backport of S6638712 lets the eucalyptus build fail -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=607 zero fails to build on icedtea7 trunk 20101210 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=608 Changing the Look and feel crashes the jvm -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=609 SIGSEGV (0xb) at pc=0xb70254c7, pid=7087, tid=2339584880 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=610 Minecraft -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=611 Virtual Machine Crashes while using GMOTE -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=617 JVM crashes with Tomcat -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=624 SIGSEGV in GCTaskThread -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=627 From ptisnovs at redhat.com Mon Feb 28 02:33:56 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Mon, 28 Feb 2011 11:33:56 +0100 Subject: JTreg failures - unable to connect to icedtea.classpath.org Message-ID: <4D6B7A14.6010905@redhat.com> Hi Mark, this morning I saw a lot of new regression test failures, mainly in tests under /java/nio/channels: FAILED: java/nio/channels/Selector/Alias.java FAILED: java/nio/channels/Selector/BasicConnect.java FAILED: java/nio/channels/Selector/Connect.java FAILED: java/nio/channels/Selector/ConnectWrite.java FAILED: java/nio/channels/Selector/OpRead.java FAILED: java/nio/channels/SocketChannel/AdaptSocket.java FAILED: java/nio/channels/SocketChannel/Basic.java FAILED: java/nio/channels/SocketChannel/ConnectState.java FAILED: java/nio/channels/SocketChannel/FinishConnect.java FAILED: java/nio/channels/SocketChannel/IsConnectable.java FAILED: java/nio/channels/SocketChannel/LocalAddress.java FAILED: java/nio/channels/SocketChannel/Shutdown.java FAILED: java/nio/channels/SocketChannel/Stream.java FAILED: java/nio/channels/SocketChannel/VectorParams.java These tests tries to connect to icedtea.classpath.org (this hostname is stored in test environment), but after upgrade of this server it is not possible to use this hostname for testing. Can you please fix that? Or should we use another address for testing? Thank you in advance Pavel T. From mark at klomp.org Mon Feb 28 05:19:42 2011 From: mark at klomp.org (Mark Wielaard) Date: Mon, 28 Feb 2011 14:19:42 +0100 (CET) Subject: JTreg failures - unable to connect to icedtea.classpath.org In-Reply-To: <4D6B7A14.6010905@redhat.com> References: <4D6B7A14.6010905@redhat.com> Message-ID: <36304.80.101.103.228.1298899182.squirrel@gnu.wildebeest.org> On Mon, February 28, 2011 11:33, Pavel Tisnovsky wrote: > These tests tries to connect to icedtea.classpath.org (this hostname is > stored in test environment), but after upgrade of this server it is not > possible to use this hostname for testing. > > Can you please fix that? Sorry for the inconvenience. The inetd deamon didn't get started after the upgrade. Should be fixed now. Thanks, Mark From ptisnovs at redhat.com Mon Feb 28 05:56:38 2011 From: ptisnovs at redhat.com (Pavel Tisnovsky) Date: Mon, 28 Feb 2011 14:56:38 +0100 Subject: JTreg failures - unable to connect to icedtea.classpath.org In-Reply-To: <36304.80.101.103.228.1298899182.squirrel@gnu.wildebeest.org> References: <4D6B7A14.6010905@redhat.com> <36304.80.101.103.228.1298899182.squirrel@gnu.wildebeest.org> Message-ID: <4D6BA996.8060708@redhat.com> Mark Wielaard wrote: > On Mon, February 28, 2011 11:33, Pavel Tisnovsky wrote: >> These tests tries to connect to icedtea.classpath.org (this hostname is >> stored in test environment), but after upgrade of this server it is not >> possible to use this hostname for testing. >> >> Can you please fix that? > > Sorry for the inconvenience. The inetd deamon didn't get started after > the upgrade. Should be fixed now. > > Thanks, > > Mark > Hi Mark, thank you very much for your quick response! I'll check the correct behavior on tomorrow's JTreg results ;-) Cheers Pavel From dbhole at redhat.com Mon Feb 28 07:16:31 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 10:16:31 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <495685143.267461.1298867232999.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <1714513635.267447.1298867128013.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <495685143.267461.1298867232999.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <20110228151630.GA7666@redhat.com> * Andrew Su [2011-02-27 23:28]: > Hello, > > This patch ensures that the port fields in itw-settings only accept numeric values. > > In this patch: > - New Class: NumberDocument. > - All port fields now use NumberDocument. > > Questions? Comments? Concerns? > Rather than defining a separate class, it might be better to use JFormatterTextField to force the field to accept numbers only. Cheers, Deepak > Cheers, > Andrew > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > --- a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java Sun Feb 27 21:48:17 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java Sun Feb 27 23:26:36 2011 -0500 > @@ -115,6 +115,7 @@ > JLabel http = new JLabel(Translator.R("APSLabelHTTP") + ":"); > final JTextField httpAddressField = new JTextField(fields[0]); > final JTextField httpPortField = new JTextField(fields[1]); > + httpPortField.setDocument(new NumberDocument()); > httpAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 0)); > httpPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 1)); > > @@ -122,6 +123,7 @@ > JLabel secure = new JLabel(Translator.R("APSLabelSecure") + ":"); > final JTextField secureAddressField = new JTextField(fields[2]); > final JTextField securePortField = new JTextField(fields[3]); > + securePortField.setDocument(new NumberDocument()); > secureAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 2)); > securePortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 3)); > > @@ -129,6 +131,7 @@ > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + ":"); > final JTextField ftpAddressField = new JTextField(fields[4]); > final JTextField ftpPortField = new JTextField(fields[5]); > + ftpPortField.setDocument(new NumberDocument()); > ftpAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 4)); > ftpPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 5)); > > @@ -136,6 +139,7 @@ > JLabel socks = new JLabel(Translator.R("APSLabelSocks") + ":"); > final JTextField socksAddressField = new JTextField(fields[6]); > final JTextField socksPortField = new JTextField(fields[7]); > + socksPortField.setDocument(new NumberDocument()); > socksAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 6)); > socksPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 7)); > > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > --- a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Sun Feb 27 21:48:17 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Sun Feb 27 23:26:36 2011 -0500 > @@ -114,6 +114,7 @@ > addressField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1])); > > final JTextField portField = new JTextField(config.getProperty(properties[2]), 3); > + portField.setDocument(new NumberDocument()); > portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[2])); > > // Create the button which allows setting of other types of proxy. > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java Sun Feb 27 23:26:36 2011 -0500 > @@ -0,0 +1,53 @@ > +/* NumberDocument.java -- Allow only numeric entries on this document. > +Copyright (C) 2011 Red Hat > + > +This program is free software; you can redistribute it and/or modify > +it under the terms of the GNU General Public License as published by > +the Free Software Foundation; either version 2 of the License, or > +(at your option) any later version. > + > +This program is distributed in the hope that it will be useful, but > +WITHOUT ANY WARRANTY; without even the implied warranty of > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > +General Public License for more details. > + > +You should have received a copy of the GNU General Public License > +along with this program; if not, write to the Free Software > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > + */ > + > +package net.sourceforge.jnlp.controlpanel; > + > +import javax.swing.text.AttributeSet; > +import javax.swing.text.BadLocationException; > +import javax.swing.text.PlainDocument; > + > +/** > + * This class will ensure that strings entered into this document will be > + * numbers only. > + * > + * @author Andrew Su (asu at redhat.com, andrew.su at utoronto.ca) > + * > + */ > +public class NumberDocument extends PlainDocument { > + > + /** > + * Constructs an instance of NumberDocument. > + */ > + public NumberDocument() { > + super(); > + } > + > + @Override > + public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { > + if (str != null) { > + try { > + Integer.valueOf(str); > + super.insertString(offs, str, a); > + } catch (Exception e) { > + // Nothing to do > + } > + } > + return; > + } > +} > \ No newline at end of file From dbhole at redhat.com Mon Feb 28 07:19:29 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 10:19:29 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <20110228151630.GA7666@redhat.com> References: <1714513635.267447.1298867128013.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <495685143.267461.1298867232999.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <20110228151630.GA7666@redhat.com> Message-ID: <20110228151929.GB7666@redhat.com> * Deepak Bhole [2011-02-28 10:18]: > * Andrew Su [2011-02-27 23:28]: > > Hello, > > > > This patch ensures that the port fields in itw-settings only accept numeric values. > > > > In this patch: > > - New Class: NumberDocument. > > - All port fields now use NumberDocument. > > > > Questions? Comments? Concerns? > > > > Rather than defining a separate class, it might be better to use > JFormatterTextField to force the field to accept numbers only. > s/JFormatterTextField/JFormattedTextField > Cheers, > Deepak > > > Cheers, > > Andrew > > > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > --- a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java Sun Feb 27 21:48:17 2011 -0500 > > +++ b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java Sun Feb 27 23:26:36 2011 -0500 > > @@ -115,6 +115,7 @@ > > JLabel http = new JLabel(Translator.R("APSLabelHTTP") + ":"); > > final JTextField httpAddressField = new JTextField(fields[0]); > > final JTextField httpPortField = new JTextField(fields[1]); > > + httpPortField.setDocument(new NumberDocument()); > > httpAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 0)); > > httpPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 1)); > > > > @@ -122,6 +123,7 @@ > > JLabel secure = new JLabel(Translator.R("APSLabelSecure") + ":"); > > final JTextField secureAddressField = new JTextField(fields[2]); > > final JTextField securePortField = new JTextField(fields[3]); > > + securePortField.setDocument(new NumberDocument()); > > secureAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 2)); > > securePortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 3)); > > > > @@ -129,6 +131,7 @@ > > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + ":"); > > final JTextField ftpAddressField = new JTextField(fields[4]); > > final JTextField ftpPortField = new JTextField(fields[5]); > > + ftpPortField.setDocument(new NumberDocument()); > > ftpAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 4)); > > ftpPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 5)); > > > > @@ -136,6 +139,7 @@ > > JLabel socks = new JLabel(Translator.R("APSLabelSocks") + ":"); > > final JTextField socksAddressField = new JTextField(fields[6]); > > final JTextField socksPortField = new JTextField(fields[7]); > > + socksPortField.setDocument(new NumberDocument()); > > socksAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 6)); > > socksPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 7)); > > > > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > --- a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Sun Feb 27 21:48:17 2011 -0500 > > +++ b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Sun Feb 27 23:26:36 2011 -0500 > > @@ -114,6 +114,7 @@ > > addressField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1])); > > > > final JTextField portField = new JTextField(config.getProperty(properties[2]), 3); > > + portField.setDocument(new NumberDocument()); > > portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[2])); > > > > // Create the button which allows setting of other types of proxy. > > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > +++ b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java Sun Feb 27 23:26:36 2011 -0500 > > @@ -0,0 +1,53 @@ > > +/* NumberDocument.java -- Allow only numeric entries on this document. > > +Copyright (C) 2011 Red Hat > > + > > +This program is free software; you can redistribute it and/or modify > > +it under the terms of the GNU General Public License as published by > > +the Free Software Foundation; either version 2 of the License, or > > +(at your option) any later version. > > + > > +This program is distributed in the hope that it will be useful, but > > +WITHOUT ANY WARRANTY; without even the implied warranty of > > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > +General Public License for more details. > > + > > +You should have received a copy of the GNU General Public License > > +along with this program; if not, write to the Free Software > > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA > > + */ > > + > > +package net.sourceforge.jnlp.controlpanel; > > + > > +import javax.swing.text.AttributeSet; > > +import javax.swing.text.BadLocationException; > > +import javax.swing.text.PlainDocument; > > + > > +/** > > + * This class will ensure that strings entered into this document will be > > + * numbers only. > > + * > > + * @author Andrew Su (asu at redhat.com, andrew.su at utoronto.ca) > > + * > > + */ > > +public class NumberDocument extends PlainDocument { > > + > > + /** > > + * Constructs an instance of NumberDocument. > > + */ > > + public NumberDocument() { > > + super(); > > + } > > + > > + @Override > > + public void insertString(int offs, String str, AttributeSet a) throws BadLocationException { > > + if (str != null) { > > + try { > > + Integer.valueOf(str); > > + super.insertString(offs, str, a); > > + } catch (Exception e) { > > + // Nothing to do > > + } > > + } > > + return; > > + } > > +} > > \ No newline at end of file > From dbhole at redhat.com Mon Feb 28 07:21:46 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 10:21:46 -0500 Subject: [RFC][Icedtea-Web]: Hide unused components in itw-settings. In-Reply-To: <209259151.267284.1298864738994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <97191491.267279.1298864736653.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <209259151.267284.1298864738994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <20110228152146.GC7666@redhat.com> * Andrew Su [2011-02-27 22:47]: > Hello, > > The attached patch will hide the unused components in itw-settings. > Unused: > Setting cache size. > Selecting another JRE for plugin to bind to. > > > Questions? Comments? Concerns? > > Cheers, > Andrew Indentations are off. In the interest of keeping it looking clean, can you please fix it so that the // are right beside the code, and aligned? e.g. > - new SettingsPanel(Translator.R("CPTabRuntimes"), createRuntimesSettingsPanel()), > + // new SettingsPanel(Translator.R("CPTabRuntimes"), createRuntimesSettingsPanel()), to > - new SettingsPanel(Translator.R("CPTabRuntimes"), createRuntimesSettingsPanel()), > + // new SettingsPanel(Translator.R("CPTabRuntimes"), createRuntimesSettingsPanel()), Also, please add a comment in the code stating why it is disabled, so that it is not forgotten in the future. Cheers, Deepak > diff -r 02ef9ba4d8a2 netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java > --- a/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java Fri Feb 25 18:16:48 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/ControlPanel.java Sun Feb 27 21:44:06 2011 -0500 > @@ -225,7 +225,7 @@ > new SettingsPanel(Translator.R("CPTabDebugging"), createDebugSettingsPanel()), > new SettingsPanel(Translator.R("CPTabDesktopIntegration"), createDesktopSettingsPanel()), > new SettingsPanel(Translator.R("CPTabNetwork"), createNetworkSettingsPanel()), > - new SettingsPanel(Translator.R("CPTabRuntimes"), createRuntimesSettingsPanel()), > + // new SettingsPanel(Translator.R("CPTabRuntimes"), createRuntimesSettingsPanel()), > new SettingsPanel(Translator.R("CPTabSecurity"), createSecuritySettingsPanel()), }; > > // Add panels. > diff -r 02ef9ba4d8a2 netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java > --- a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java Fri Feb 25 18:16:48 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java Sun Feb 27 21:44:06 2011 -0500 > @@ -152,15 +152,15 @@ > }); > > // This is to work with how much space is available for caching. > - JLabel lCacheSize = new JLabel(Translator.R("TIFPCacheSize") + ":"); > - slCacheSize = new JSlider(minSize, maxSize, Integer.parseInt(this.config.getProperty(properties[2]))); > - slCacheSize.setMinorTickSpacing(50); > - slCacheSize.setPaintTicks(true); > - SpinnerNumberModel snmCacheSize = new SpinnerNumberModel(Integer.parseInt(this.config.getProperty(properties[2])), minSize, maxSize, 1); > - spCacheSize = new JSpinner(snmCacheSize); > - > - slCacheSize.addChangeListener(this); > - spCacheSize.addChangeListener(this); > +// JLabel lCacheSize = new JLabel(Translator.R("TIFPCacheSize") + ":"); > +// slCacheSize = new JSlider(minSize, maxSize, Integer.parseInt(this.config.getProperty(properties[2]))); > +// slCacheSize.setMinorTickSpacing(50); > +// slCacheSize.setPaintTicks(true); > +// SpinnerNumberModel snmCacheSize = new SpinnerNumberModel(Integer.parseInt(this.config.getProperty(properties[2])), minSize, maxSize, 1); > +// spCacheSize = new JSpinner(snmCacheSize); > +// > +// slCacheSize.addChangeListener(this); > +// spCacheSize.addChangeListener(this); > > c.gridy = 0; > c.gridx = 0; > @@ -169,16 +169,16 @@ > c.gridx = 1; > c.weightx = 0; > diskSpacePanel.add(cbCompression, c); > - c.gridy = 1; > - c.gridx = 0; > - c.gridwidth = GridBagConstraints.REMAINDER; > +// c.gridy = 1; > +// c.gridx = 0; > +// c.gridwidth = GridBagConstraints.REMAINDER; > c.weightx = 1; > - diskSpacePanel.add(lCacheSize, c); > - c.gridwidth = 1; > - c.gridy = 2; > - diskSpacePanel.add(slCacheSize, c); > - c.gridx = 1; > - diskSpacePanel.add(spCacheSize, c); > +// diskSpacePanel.add(lCacheSize, c); > +// c.gridwidth = 1; > +// c.gridy = 2; > +// diskSpacePanel.add(slCacheSize, c); > +// c.gridx = 1; > +// diskSpacePanel.add(spCacheSize, c); > > JPanel buttonDeleteRestore = new JPanel(new FlowLayout(FlowLayout.TRAILING)); > JButton bViewFiles = new JButton(Translator.R("TIFPViewFiles")); From omajid at redhat.com Mon Feb 28 07:33:20 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 10:33:20 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <20110228151630.GA7666@redhat.com> References: <1714513635.267447.1298867128013.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <495685143.267461.1298867232999.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <20110228151630.GA7666@redhat.com> Message-ID: <4D6BC040.7020300@redhat.com> On 02/28/2011 10:16 AM, Deepak Bhole wrote: > * Andrew Su [2011-02-27 23:28]: >> Hello, >> >> This patch ensures that the port fields in itw-settings only accept numeric values. >> >> In this patch: >> - New Class: NumberDocument. >> - All port fields now use NumberDocument. >> >> Questions? Comments? Concerns? >> > > Rather than defining a separate class, it might be better to use > JFormatterTextField to force the field to accept numbers only. > net.sourceforge.jnlp.config.BasicValueValidators contains some code that is used elsewhere to validate some values. It would be great if that code could be reused (by JFormatterTextField) or extended to work for this case too. Cheers, Omair From asu at redhat.com Mon Feb 28 08:04:58 2011 From: asu at redhat.com (Andrew Su) Date: Mon, 28 Feb 2011 11:04:58 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <20110228151929.GB7666@redhat.com> Message-ID: <1222117990.279478.1298909098994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Deepak Bhole" > To: "Deepak Bhole" > Cc: "Andrew Su" , "IcedTea" > Sent: Monday, February 28, 2011 10:19:29 AM > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > * Deepak Bhole [2011-02-28 10:18]: > > * Andrew Su [2011-02-27 23:28]: > > > Hello, > > > > > > This patch ensures that the port fields in itw-settings only > > > accept numeric values. > > > > > > In this patch: > > > - New Class: NumberDocument. > > > - All port fields now use NumberDocument. > > > > > > Questions? Comments? Concerns? > > > > > > > Rather than defining a separate class, it might be better to use > > JFormatterTextField to force the field to accept numbers only. > > > > s/JFormatterTextField/JFormattedTextField Hi Deepak, I didn't think JFormatterTextField fits what I'm trying to do here, since the value gets cleared when text field loses focus. I wanted it to make sure that no "bad" inputs are given the moment it is typed. Cheers, Andrew > > > Cheers, > > Deepak > > > > > Cheers, > > > Andrew > > > > > diff -r 4860276e9bf2 > > > netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > --- > > > a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > Sun Feb 27 21:48:17 2011 -0500 > > > +++ > > > b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > Sun Feb 27 23:26:36 2011 -0500 > > > @@ -115,6 +115,7 @@ > > > JLabel http = new JLabel(Translator.R("APSLabelHTTP") + > > > ":"); > > > final JTextField httpAddressField = new > > > JTextField(fields[0]); > > > final JTextField httpPortField = new > > > JTextField(fields[1]); > > > + httpPortField.setDocument(new NumberDocument()); > > > httpAddressField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 0)); > > > httpPortField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 1)); > > > > > > @@ -122,6 +123,7 @@ > > > JLabel secure = new JLabel(Translator.R("APSLabelSecure") > > > + ":"); > > > final JTextField secureAddressField = new > > > JTextField(fields[2]); > > > final JTextField securePortField = new > > > JTextField(fields[3]); > > > + securePortField.setDocument(new NumberDocument()); > > > secureAddressField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 2)); > > > securePortField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 3)); > > > > > > @@ -129,6 +131,7 @@ > > > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + > > > ":"); > > > final JTextField ftpAddressField = new > > > JTextField(fields[4]); > > > final JTextField ftpPortField = new > > > JTextField(fields[5]); > > > + ftpPortField.setDocument(new NumberDocument()); > > > ftpAddressField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 4)); > > > ftpPortField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 5)); > > > > > > @@ -136,6 +139,7 @@ > > > JLabel socks = new JLabel(Translator.R("APSLabelSocks") + > > > ":"); > > > final JTextField socksAddressField = new > > > JTextField(fields[6]); > > > final JTextField socksPortField = new > > > JTextField(fields[7]); > > > + socksPortField.setDocument(new NumberDocument()); > > > socksAddressField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 6)); > > > socksPortField.getDocument().addDocumentListener(new > > > DocumentAdapter(fields, 7)); > > > > > > diff -r 4860276e9bf2 > > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > --- > > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > Sun Feb 27 21:48:17 2011 -0500 > > > +++ > > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > Sun Feb 27 23:26:36 2011 -0500 > > > @@ -114,6 +114,7 @@ > > > addressField.getDocument().addDocumentListener(new > > > DocumentAdapter(config, properties[1])); > > > > > > final JTextField portField = new > > > JTextField(config.getProperty(properties[2]), 3); > > > + portField.setDocument(new NumberDocument()); > > > portField.getDocument().addDocumentListener(new > > > DocumentAdapter(config, properties[2])); > > > > > > // Create the button which allows setting of other types > > > of proxy. > > > diff -r 4860276e9bf2 > > > netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > > +++ b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > Sun Feb 27 23:26:36 2011 -0500 > > > @@ -0,0 +1,53 @@ > > > +/* NumberDocument.java -- Allow only numeric entries on this > > > document. > > > +Copyright (C) 2011 Red Hat > > > + > > > +This program is free software; you can redistribute it and/or > > > modify > > > +it under the terms of the GNU General Public License as published > > > by > > > +the Free Software Foundation; either version 2 of the License, or > > > +(at your option) any later version. > > > + > > > +This program is distributed in the hope that it will be useful, > > > but > > > +WITHOUT ANY WARRANTY; without even the implied warranty of > > > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > > +General Public License for more details. > > > + > > > +You should have received a copy of the GNU General Public License > > > +along with this program; if not, write to the Free Software > > > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA > > > 02111-1307 USA > > > + */ > > > + > > > +package net.sourceforge.jnlp.controlpanel; > > > + > > > +import javax.swing.text.AttributeSet; > > > +import javax.swing.text.BadLocationException; > > > +import javax.swing.text.PlainDocument; > > > + > > > +/** > > > + * This class will ensure that strings entered into this document > > > will be > > > + * numbers only. > > > + * > > > + * @author Andrew Su (asu at redhat.com, andrew.su at utoronto.ca) > > > + * > > > + */ > > > +public class NumberDocument extends PlainDocument { > > > + > > > + /** > > > + * Constructs an instance of NumberDocument. > > > + */ > > > + public NumberDocument() { > > > + super(); > > > + } > > > + > > > + @Override > > > + public void insertString(int offs, String str, AttributeSet a) > > > throws BadLocationException { > > > + if (str != null) { > > > + try { > > > + Integer.valueOf(str); > > > + super.insertString(offs, str, a); > > > + } catch (Exception e) { > > > + // Nothing to do > > > + } > > > + } > > > + return; > > > + } > > > +} > > > \ No newline at end of file > > From omajid at redhat.com Mon Feb 28 08:10:33 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 11:10:33 -0500 Subject: [icedtea-web] RFC: replace binary launchers with shell scripts Message-ID: <4D6BC8F9.2070700@redhat.com> Hi, The attached patch replaces the binary launchers with simple shell scripts. It also (I hope) fixes some mistakes in $(DESTDIR) usage. Any thoughts or comments? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: replace-launcher-with-shell-scripts-01.patch Type: text/x-patch Size: 9264 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/c86ba522/replace-launcher-with-shell-scripts-01.patch From dbhole at redhat.com Mon Feb 28 08:12:54 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 11:12:54 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1222117990.279478.1298909098994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <20110228151929.GB7666@redhat.com> <1222117990.279478.1298909098994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <20110228161253.GG7666@redhat.com> * Andrew Su [2011-02-28 11:04]: > > > ----- Original Message ----- > > From: "Deepak Bhole" > > To: "Deepak Bhole" > > Cc: "Andrew Su" , "IcedTea" > > Sent: Monday, February 28, 2011 10:19:29 AM > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > > * Deepak Bhole [2011-02-28 10:18]: > > > * Andrew Su [2011-02-27 23:28]: > > > > Hello, > > > > > > > > This patch ensures that the port fields in itw-settings only > > > > accept numeric values. > > > > > > > > In this patch: > > > > - New Class: NumberDocument. > > > > - All port fields now use NumberDocument. > > > > > > > > Questions? Comments? Concerns? > > > > > > > > > > Rather than defining a separate class, it might be better to use > > > JFormatterTextField to force the field to accept numbers only. > > > > > > > s/JFormatterTextField/JFormattedTextField > > Hi Deepak, > > I didn't think JFormatterTextField fits what I'm trying to do here, since the value gets cleared when text field loses focus. I wanted it to make sure that no "bad" inputs are given the moment it is typed. > What do you mean the value gets cleared when it loses focus? Deepak > Cheers, > Andrew > > > > > > Cheers, > > > Deepak > > > > > > > Cheers, > > > > Andrew > > > > > > > diff -r 4860276e9bf2 > > > > netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > --- > > > > a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > +++ > > > > b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > @@ -115,6 +115,7 @@ > > > > JLabel http = new JLabel(Translator.R("APSLabelHTTP") + > > > > ":"); > > > > final JTextField httpAddressField = new > > > > JTextField(fields[0]); > > > > final JTextField httpPortField = new > > > > JTextField(fields[1]); > > > > + httpPortField.setDocument(new NumberDocument()); > > > > httpAddressField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 0)); > > > > httpPortField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 1)); > > > > > > > > @@ -122,6 +123,7 @@ > > > > JLabel secure = new JLabel(Translator.R("APSLabelSecure") > > > > + ":"); > > > > final JTextField secureAddressField = new > > > > JTextField(fields[2]); > > > > final JTextField securePortField = new > > > > JTextField(fields[3]); > > > > + securePortField.setDocument(new NumberDocument()); > > > > secureAddressField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 2)); > > > > securePortField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 3)); > > > > > > > > @@ -129,6 +131,7 @@ > > > > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + > > > > ":"); > > > > final JTextField ftpAddressField = new > > > > JTextField(fields[4]); > > > > final JTextField ftpPortField = new > > > > JTextField(fields[5]); > > > > + ftpPortField.setDocument(new NumberDocument()); > > > > ftpAddressField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 4)); > > > > ftpPortField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 5)); > > > > > > > > @@ -136,6 +139,7 @@ > > > > JLabel socks = new JLabel(Translator.R("APSLabelSocks") + > > > > ":"); > > > > final JTextField socksAddressField = new > > > > JTextField(fields[6]); > > > > final JTextField socksPortField = new > > > > JTextField(fields[7]); > > > > + socksPortField.setDocument(new NumberDocument()); > > > > socksAddressField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 6)); > > > > socksPortField.getDocument().addDocumentListener(new > > > > DocumentAdapter(fields, 7)); > > > > > > > > diff -r 4860276e9bf2 > > > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > --- > > > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > +++ > > > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > @@ -114,6 +114,7 @@ > > > > addressField.getDocument().addDocumentListener(new > > > > DocumentAdapter(config, properties[1])); > > > > > > > > final JTextField portField = new > > > > JTextField(config.getProperty(properties[2]), 3); > > > > + portField.setDocument(new NumberDocument()); > > > > portField.getDocument().addDocumentListener(new > > > > DocumentAdapter(config, properties[2])); > > > > > > > > // Create the button which allows setting of other types > > > > of proxy. > > > > diff -r 4860276e9bf2 > > > > netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > > > +++ b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > @@ -0,0 +1,53 @@ > > > > +/* NumberDocument.java -- Allow only numeric entries on this > > > > document. > > > > +Copyright (C) 2011 Red Hat > > > > + > > > > +This program is free software; you can redistribute it and/or > > > > modify > > > > +it under the terms of the GNU General Public License as published > > > > by > > > > +the Free Software Foundation; either version 2 of the License, or > > > > +(at your option) any later version. > > > > + > > > > +This program is distributed in the hope that it will be useful, > > > > but > > > > +WITHOUT ANY WARRANTY; without even the implied warranty of > > > > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU > > > > +General Public License for more details. > > > > + > > > > +You should have received a copy of the GNU General Public License > > > > +along with this program; if not, write to the Free Software > > > > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA > > > > 02111-1307 USA > > > > + */ > > > > + > > > > +package net.sourceforge.jnlp.controlpanel; > > > > + > > > > +import javax.swing.text.AttributeSet; > > > > +import javax.swing.text.BadLocationException; > > > > +import javax.swing.text.PlainDocument; > > > > + > > > > +/** > > > > + * This class will ensure that strings entered into this document > > > > will be > > > > + * numbers only. > > > > + * > > > > + * @author Andrew Su (asu at redhat.com, andrew.su at utoronto.ca) > > > > + * > > > > + */ > > > > +public class NumberDocument extends PlainDocument { > > > > + > > > > + /** > > > > + * Constructs an instance of NumberDocument. > > > > + */ > > > > + public NumberDocument() { > > > > + super(); > > > > + } > > > > + > > > > + @Override > > > > + public void insertString(int offs, String str, AttributeSet a) > > > > throws BadLocationException { > > > > + if (str != null) { > > > > + try { > > > > + Integer.valueOf(str); > > > > + super.insertString(offs, str, a); > > > > + } catch (Exception e) { > > > > + // Nothing to do > > > > + } > > > > + } > > > > + return; > > > > + } > > > > +} > > > > \ No newline at end of file > > > From asu at redhat.com Mon Feb 28 08:18:57 2011 From: asu at redhat.com (Andrew Su) Date: Mon, 28 Feb 2011 11:18:57 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <20110228161253.GG7666@redhat.com> Message-ID: <1927455152.279883.1298909937810.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Deepak Bhole" > To: "Andrew Su" > Cc: "Deepak Bhole" , "IcedTea" > Sent: Monday, February 28, 2011 11:12:54 AM > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > * Andrew Su [2011-02-28 11:04]: > > > > > > ----- Original Message ----- > > > From: "Deepak Bhole" > > > To: "Deepak Bhole" > > > Cc: "Andrew Su" , "IcedTea" > > > > > > Sent: Monday, February 28, 2011 10:19:29 AM > > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are > > > numeric values > > > * Deepak Bhole [2011-02-28 10:18]: > > > > * Andrew Su [2011-02-27 23:28]: > > > > > Hello, > > > > > > > > > > This patch ensures that the port fields in itw-settings only > > > > > accept numeric values. > > > > > > > > > > In this patch: > > > > > - New Class: NumberDocument. > > > > > - All port fields now use NumberDocument. > > > > > > > > > > Questions? Comments? Concerns? > > > > > > > > > > > > > Rather than defining a separate class, it might be better to use > > > > JFormatterTextField to force the field to accept numbers only. > > > > > > > > > > s/JFormatterTextField/JFormattedTextField > > > > Hi Deepak, > > > > I didn't think JFormatterTextField fits what I'm trying to do > > here, since the value gets cleared when text field loses focus. I > > wanted it to make sure that no "bad" inputs are given the moment > > it is typed. > > > > What do you mean the value gets cleared when it loses focus? I meant that if the value entered is invalid it gets cleared. Of course this behaviour can be changed, but iirc it only does the check after the focus to the JFormattedTextField. Regards, Andrew > > Deepak > > > Cheers, > > Andrew > > > > > > > > > Cheers, > > > > Deepak > > > > > > > > > Cheers, > > > > > Andrew > > > > > > > > > diff -r 4860276e9bf2 > > > > > netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > --- > > > > > a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > +++ > > > > > b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > @@ -115,6 +115,7 @@ > > > > > JLabel http = new JLabel(Translator.R("APSLabelHTTP") > > > > > + > > > > > ":"); > > > > > final JTextField httpAddressField = new > > > > > JTextField(fields[0]); > > > > > final JTextField httpPortField = new > > > > > JTextField(fields[1]); > > > > > + httpPortField.setDocument(new NumberDocument()); > > > > > httpAddressField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 0)); > > > > > httpPortField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 1)); > > > > > > > > > > @@ -122,6 +123,7 @@ > > > > > JLabel secure = new > > > > > JLabel(Translator.R("APSLabelSecure") > > > > > + ":"); > > > > > final JTextField secureAddressField = new > > > > > JTextField(fields[2]); > > > > > final JTextField securePortField = new > > > > > JTextField(fields[3]); > > > > > + securePortField.setDocument(new NumberDocument()); > > > > > secureAddressField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 2)); > > > > > securePortField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 3)); > > > > > > > > > > @@ -129,6 +131,7 @@ > > > > > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + > > > > > ":"); > > > > > final JTextField ftpAddressField = new > > > > > JTextField(fields[4]); > > > > > final JTextField ftpPortField = new > > > > > JTextField(fields[5]); > > > > > + ftpPortField.setDocument(new NumberDocument()); > > > > > ftpAddressField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 4)); > > > > > ftpPortField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 5)); > > > > > > > > > > @@ -136,6 +139,7 @@ > > > > > JLabel socks = new > > > > > JLabel(Translator.R("APSLabelSocks") + > > > > > ":"); > > > > > final JTextField socksAddressField = new > > > > > JTextField(fields[6]); > > > > > final JTextField socksPortField = new > > > > > JTextField(fields[7]); > > > > > + socksPortField.setDocument(new NumberDocument()); > > > > > socksAddressField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 6)); > > > > > socksPortField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(fields, 7)); > > > > > > > > > > diff -r 4860276e9bf2 > > > > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > --- > > > > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > +++ > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > @@ -114,6 +114,7 @@ > > > > > addressField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(config, properties[1])); > > > > > > > > > > final JTextField portField = new > > > > > JTextField(config.getProperty(properties[2]), 3); > > > > > + portField.setDocument(new NumberDocument()); > > > > > portField.getDocument().addDocumentListener(new > > > > > DocumentAdapter(config, properties[2])); > > > > > > > > > > // Create the button which allows setting of other > > > > > types > > > > > of proxy. > > > > > diff -r 4860276e9bf2 > > > > > netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > > > > +++ > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > @@ -0,0 +1,53 @@ > > > > > +/* NumberDocument.java -- Allow only numeric entries on this > > > > > document. > > > > > +Copyright (C) 2011 Red Hat > > > > > + > > > > > +This program is free software; you can redistribute it and/or > > > > > modify > > > > > +it under the terms of the GNU General Public License as > > > > > published > > > > > by > > > > > +the Free Software Foundation; either version 2 of the > > > > > License, or > > > > > +(at your option) any later version. > > > > > + > > > > > +This program is distributed in the hope that it will be > > > > > useful, > > > > > but > > > > > +WITHOUT ANY WARRANTY; without even the implied warranty of > > > > > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > > > > GNU > > > > > +General Public License for more details. > > > > > + > > > > > +You should have received a copy of the GNU General Public > > > > > License > > > > > +along with this program; if not, write to the Free Software > > > > > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA > > > > > 02111-1307 USA > > > > > + */ > > > > > + > > > > > +package net.sourceforge.jnlp.controlpanel; > > > > > + > > > > > +import javax.swing.text.AttributeSet; > > > > > +import javax.swing.text.BadLocationException; > > > > > +import javax.swing.text.PlainDocument; > > > > > + > > > > > +/** > > > > > + * This class will ensure that strings entered into this > > > > > document > > > > > will be > > > > > + * numbers only. > > > > > + * > > > > > + * @author Andrew Su (asu at redhat.com, andrew.su at utoronto.ca) > > > > > + * > > > > > + */ > > > > > +public class NumberDocument extends PlainDocument { > > > > > + > > > > > + /** > > > > > + * Constructs an instance of NumberDocument. > > > > > + */ > > > > > + public NumberDocument() { > > > > > + super(); > > > > > + } > > > > > + > > > > > + @Override > > > > > + public void insertString(int offs, String str, AttributeSet > > > > > a) > > > > > throws BadLocationException { > > > > > + if (str != null) { > > > > > + try { > > > > > + Integer.valueOf(str); > > > > > + super.insertString(offs, str, a); > > > > > + } catch (Exception e) { > > > > > + // Nothing to do > > > > > + } > > > > > + } > > > > > + return; > > > > > + } > > > > > +} > > > > > \ No newline at end of file > > > > From dlila at redhat.com Mon Feb 28 08:19:43 2011 From: dlila at redhat.com (Denis Lila) Date: Mon, 28 Feb 2011 11:19:43 -0500 (EST) Subject: Request for review: cleanup in preparation of the final java2d backport. In-Reply-To: <20110225004004.GU3448@rivendell.middle-earth.co.uk> Message-ID: <1818697751.803179.1298909983128.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. http://icedtea.classpath.org/~dlila/cleanupPart1v2.patch http://icedtea.classpath.org/~dlila/cleanupPart2v2.patch and the attached patch are the revised patches (the only thing that has changed is that now I'm removing patches in the same changeset where I stop applying them). Ok to push? Regards, Denis. ----- Original Message ----- > On 16:20 Thu 24 Feb , Denis Lila wrote: > > And the attached file is the final part of the cleanup. > > It just removes 3 patches that were obsoleted by the > > previous changeset (if the previous changest is approved > > for pushing, that is). > > > > As I said in my previous reply, these can be removed with > the patch that obsoletes them. > > But can you explain why they are obsolete? > > > Ok to push? > > > > Thank you, > > Denis. > > > > ----- Original Message ----- > > > This: > > > http://icedtea.classpath.org/~dlila/cleanupPart2.patch > > > is the second part of the clean up. It removes > > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > > (which we stopped applying in the previous cleanupPart1.patch), > > > it adds the 3 replacement patches for it, it adds > > > piscesMakefile.patch to make the build work, and it reapplies > > > patches/openjdk/6766342-AA-simple-shape-performance.patch. > > > > > > It also stops applying 3 patches made obsolete by the 3 new > > > patches (but doesn't remove them (should it?). I've left this > > > for the next changeset). > > > > > > Ok to push (contingent on cleanupPart1.patch being ok)? > > > > > > Thank you, > > > Denis. > > > > > > ----- Original Message ----- > > > > > The IcedTea version: > > > > > > > > > > 2008-10-27 Mark Wielaard > > > > > > > > > > * patches/icedtea-renderer-crossing.patch: New patch. > > > > > > > > > > predates the OpenJDK one: > > > > > > > > > > changeset: 1878:ccc36189f2a7 > > > > > user: rkennke > > > > > date: Mon Oct 05 23:12:22 2009 +0200 > > > > > > > > > > by just under a year. Roman may even have been using the > > > > > IcedTea > > > > > patch > > > > > and not bothered > > > > > to report to us. > > > > > > > > > > Anyway, good to be replaced in a separate changeset. > > > > > > > > The attached patch does the replacement of > > > > patches/renderer-crossings.patch. I do this first because it > > > > came > > > > before any of the other things, and the other patches won't > > > > apply > > > > without it. > > > > > > > > Unfortunately, it also has to stop applying > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch > > > > patches/openjdk/6766342-AA-simple-shape-performance.patch > > > > If we don't stop applying the first of those, the patching will > > > > fail. It's not a good idea to apply the second because it > > > > changes > > > > a file that is also changed by > > > > 6967436-6976265-6967434-pisces.patch. > > > > So until the replacement for > > > > 6967436-6976265-6967434-pisces.patch is > > > > in, we shouldn't apply it. > > > > > > > > Ok to push? > > > > > > > > The next changeset after this will introduce the three > > > > replacements > > > > of > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch. > > > > > > > > Thank you. > > > > > > > > ----- Original Message ----- > > > > > On 12:45 Thu 24 Feb , Denis Lila wrote: > > > > > > Hi. > > > > > > > > > > > > I want to push this patch: > > > > > > http://icedtea.classpath.org/~dlila/hgCleanup.diff. I tried > > > > > > attaching it, > > > > > > but it was too big and I cancelled the message. > > > > > > > > > > > > > > > > Ok let's split this up and do them in individual changesets > > > > > with > > > > > individual > > > > > ChangeLogs. It's much easier to track things that way if we're > > > > > not > > > > > mixing > > > > > up orthogonal things. > > > > > > > > > > > The changes are: > > > > > > patches/openjdk/6967436-6976265-6967434-pisces.patch was > > > > > > replaced > > > > > > by > > > > > > 6967436-6967433-floating-pt-conversion.patch, > > > > > > 6967434-bad-round-joins.patch, > > > > > > and 6976265-stroke-control.patch. Each of the separate > > > > > > patches > > > > > > is > > > > > > its own > > > > > > changeset in openjdk7, so it was my mistake to begin with to > > > > > > lump > > > > > > them > > > > > > all into one backport. Splitting it up into the 3 patches > > > > > > fixes > > > > > > it. > > > > > > Also > > > > > > each of the three patches is an unmodified "hg export" of > > > > > > its > > > > > > openjdk7 > > > > > > revision. What we had in > > > > > > 6967436-6976265-6967434-pisces.patch > > > > > > wasn't, > > > > > > because I had to remove some of the @Override annotations so > > > > > > that > > > > > > the > > > > > > build wouldn't fail. The proper way to get around this is by > > > > > > changing > > > > > > the source and target options to ecj, which is what > > > > > > patches/piscesMakefile.patch does. > > > > > > > > > > > > > > > > Ok so this is one patch: the three patch split + the > > > > > piscesMakefile > > > > > to > > > > > make > > > > > it work. > > > > > > > > > > > I replaced patches/renderer-crossing.patch with > > > > > > patches/openjdk/6887494-NPE-in-pisces.patch. The former adds > > > > > > if (crossingIndices != null && crossingIndices.length > > > > > > > DEFAULT_INDICES_SIZE) { > > > > > > while the latter adds > > > > > > if (crossingIndices != null && > > > > > > crossingIndices.length > DEFAULT_INDICES_SIZE) > > > > > > { > > > > > > so they do exactly the same thing, but the layout is > > > > > > different. > > > > > > What > > > > > > I think > > > > > > happened is that patches/renderer-crossing.patch was added > > > > > > to > > > > > > icedtea before > > > > > > openjdk7, and when it went into openjdk7 the newlines were > > > > > > changed. > > > > > > So now > > > > > > I'm replacing the patch with a proper backport. > > > > > > > > > > > > > > > > > > > > > > > > > > The other changes are just removing obsolete patches, and > > > > > > they're > > > > > > described > > > > > > in the ChangeLog. > > > > > > > > > > > > > > > > Again, separate changeset. > > > > > > > > > > > Thank you, > > > > > > Denis. > > > > > > > > > > -- > > > > > Andrew :) > > > > > > > > > > Free Java Software Engineer > > > > > Red Hat, Inc. (http://www.redhat.com) > > > > > > > > > > Support Free Java! > > > > > Contribute to GNU Classpath and IcedTea > > > > > http://www.gnu.org/software/classpath > > > > > http://icedtea.classpath.org > > > > > PGP Key: F5862A37 (https://keys.indymedia.org/) > > > > > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 > > > > > 2A37 > > > diff -r 5c0be31545ff ChangeLog > > --- a/ChangeLog Thu Feb 24 15:30:47 2011 -0500 > > +++ b/ChangeLog Thu Feb 24 16:13:11 2011 -0500 > > @@ -1,3 +1,12 @@ > > +2011-02-24 Denis Lila > > + > > + * patches/java2d-stroker-internal-close-joint.patch: > > + Obsolete and unused. Removed. > > + * patches/java2d-stroker-internal-joint.patch: > > + Obsolete and unused. Removed. > > + * patches/stroker-finish.patch: > > + Obsolete and unused. Removed. > > + > > 2011-02-24 Denis Lila > > > > * Makefile.am: Added patches > > diff -r 5c0be31545ff > > patches/java2d-stroker-internal-close-joint.patch > > --- a/patches/java2d-stroker-internal-close-joint.patch Thu Feb 24 > > 15:30:47 2011 -0500 > > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > > @@ -1,96 +0,0 @@ > > ---- > > openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig > > 2009-04-29 14:01:43.000000000 -0400 > > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java > > 2009-04-29 14:00:03.000000000 -0400 > > -@@ -633,7 +633,7 @@ > > - } > > - > > - emitLineTo(sx0 + mx0, sy0 + my0); > > -- emitLineTo(sx0 - mx0, sy0 - my0); // same as reverse[0], > > reverse[1] > > -+ emitMoveTo(sx0, sy0); // same as reverse[0], reverse[1] > > - > > - // Draw final join on the inside > > - if (ccw) { > > ---- /dev/null 2009-04-15 13:37:55.776002308 -0400 > > -+++ openjdk/jdk/test/sun/pisces/MiterInternalCloseJointTest.java > > 2009-04-29 13:59:31.000000000 -0400 > > -@@ -0,0 +1,82 @@ > > -+/* > > -+ * Copyright 2009 Red Hat, Inc. All Rights Reserved. > > -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > > -+ * > > -+ * This code is free software; you can redistribute it and/or > > modify it > > -+ * under the terms of the GNU General Public License version 2 > > only, as > > -+ * published by the Free Software Foundation. > > -+ * > > -+ * This code is distributed in the hope that it will be useful, > > but WITHOUT > > -+ * ANY WARRANTY; without even the implied warranty of > > MERCHANTABILITY or > > -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public > > License > > -+ * version 2 for more details (a copy is included in the LICENSE > > file that > > -+ * accompanied this code). > > -+ * > > -+ * You should have received a copy of the GNU General Public > > License version > > -+ * 2 along with this work; if not, write to the Free Software > > Foundation, > > -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > > -+ */ > > -+ > > -+/* > > -+ @test > > -+ @summary Check that the final joint created using > > -+ generalPath.closePath() is correct > > -+ @author Omair Majid > > -+ @run main MiterInternalCloseJointTest > > -+ */ > > -+import java.awt.BasicStroke; > > -+import java.awt.Color; > > -+import java.awt.Graphics2D; > > -+import java.awt.geom.GeneralPath; > > -+import java.awt.image.BufferedImage; > > -+ > > -+public class MiterInternalCloseJointTest { > > -+ > > -+ static final int WIDTH = 200; > > -+ static final int HEIGHT = 200; > > -+ > > -+ static final int x0 = 50, y0 = 50; > > -+ static final int x1 = 150, y1 = 50; > > -+ static final int x2 = 100, y2 = 100; > > -+ > > -+ private static BufferedImage createTestImage() { > > -+ final BufferedImage image = new BufferedImage(WIDTH, HEIGHT, > > -+ BufferedImage.TYPE_INT_BGR); > > -+ Graphics2D g = image.createGraphics(); > > -+ > > -+ g.setColor(Color.BLACK); > > -+ g.fillRect(0, 0, WIDTH, HEIGHT); > > -+ > > -+ float wideStrokeWidth = 20.0f; > > -+ BasicStroke wideStroke = new BasicStroke(wideStrokeWidth, > > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth); > > -+ float thinStrokeWidth = 3.0f; > > -+ BasicStroke thinStroke = new BasicStroke(thinStrokeWidth, > > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth); > > -+ > > -+ g.setColor(Color.WHITE); > > -+ GeneralPath path = new GeneralPath(); > > -+ path.moveTo(x0, y0); > > -+ path.lineTo(x1, y1); > > -+ path.lineTo(x2, y2); > > -+ path.closePath(); > > -+ path.closePath(); > > -+ g.setStroke(thinStroke); > > -+ g.draw(wideStroke.createStrokedShape(path)); > > -+ > > -+ return image; > > -+ } > > -+ > > -+ public static void main(String[] args) { > > -+ > > -+ BufferedImage testImage = createTestImage(); > > -+ > > -+ int color = testImage.getRGB(x0,y0-5); > > -+ System.out.println("Color seen: #" + Integer.toHexString(color)); > > -+ if (color == Color.WHITE.getRGB()) { > > -+ throw new RuntimeException( > > -+ "Test Failed; did not expected to see a white line at the start > > of the path"); > > -+ } > > -+ > > -+ } > > -+} > > diff -r 5c0be31545ff patches/java2d-stroker-internal-joint.patch > > --- a/patches/java2d-stroker-internal-joint.patch Thu Feb 24 > > 15:30:47 2011 -0500 > > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > > @@ -1,98 +0,0 @@ > > ---- > > openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java.orig > > 2009-04-29 13:30:24.000000000 -0400 > > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java > > 2009-04-29 13:31:05.000000000 -0400 > > -@@ -614,6 +614,8 @@ > > - ROUND_JOIN_INTERNAL_THRESHOLD); > > - } > > - > > -+ emitLineTo(x0, y0, !ccw); > > -+ > > - emitLineTo(x0 + mx, y0 + my); > > - emitLineTo(sx0 + mx, sy0 + my); > > - > > ---- /dev/null 2009-04-15 13:37:55.776002308 -0400 > > -+++ openjdk/jdk/test/sun/pisces/MiterInternalJointTest.java > > 2009-04-29 13:41:30.000000000 -0400 > > -@@ -0,0 +1,84 @@ > > -+/* > > -+ * Copyright 2009 Red Hat, Inc. All Rights Reserved. > > -+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. > > -+ * > > -+ * This code is free software; you can redistribute it and/or > > modify it > > -+ * under the terms of the GNU General Public License version 2 > > only, as > > -+ * published by the Free Software Foundation. > > -+ * > > -+ * This code is distributed in the hope that it will be useful, > > but WITHOUT > > -+ * ANY WARRANTY; without even the implied warranty of > > MERCHANTABILITY or > > -+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public > > License > > -+ * version 2 for more details (a copy is included in the LICENSE > > file that > > -+ * accompanied this code). > > -+ * > > -+ * You should have received a copy of the GNU General Public > > License version > > -+ * 2 along with this work; if not, write to the Free Software > > Foundation, > > -+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. > > -+ */ > > -+ > > -+/* > > -+ @test > > -+ @summary Check that the penultimate joint created using > > -+ generalPath.closePath() is correct > > -+ @author Omair Majid > > -+ @run main MiterInternalJointTest > > -+ */ > > -+ > > -+ > > -+import java.awt.BasicStroke; > > -+import java.awt.Color; > > -+import java.awt.Graphics2D; > > -+import java.awt.geom.GeneralPath; > > -+import java.awt.image.BufferedImage; > > -+ > > -+public class MiterInternalJointTest { > > -+ > > -+ static final int WIDTH = 200; > > -+ static final int HEIGHT = 200; > > -+ > > -+ static final int x0 = 50, y0 = 50; > > -+ static final int x1 = 150, y1 = 50; > > -+ static final int x2 = 100, y2 = 100; > > -+ > > -+ private static BufferedImage createTestImage() { > > -+ final BufferedImage image = new BufferedImage(WIDTH, HEIGHT, > > -+ BufferedImage.TYPE_INT_BGR); > > -+ Graphics2D g = image.createGraphics(); > > -+ > > -+ g.setColor(Color.BLACK); > > -+ g.fillRect(0, 0, WIDTH, HEIGHT); > > -+ > > -+ float wideStrokeWidth = 20.0f; > > -+ BasicStroke wideStroke = new BasicStroke(wideStrokeWidth, > > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, wideStrokeWidth); > > -+ float thinStrokeWidth = 3.0f; > > -+ BasicStroke thinStroke = new BasicStroke(thinStrokeWidth, > > -+ BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, thinStrokeWidth); > > -+ > > -+ g.setColor(Color.WHITE); > > -+ GeneralPath path = new GeneralPath(); > > -+ path.moveTo(x0, y0); > > -+ path.lineTo(x1, y1); > > -+ path.lineTo(x2, y2); > > -+ path.closePath(); > > -+ path.closePath(); > > -+ g.setStroke(thinStroke); > > -+ g.draw(wideStroke.createStrokedShape(path)); > > -+ > > -+ return image; > > -+ } > > -+ > > -+ public static void main(String[] args) { > > -+ > > -+ BufferedImage testImage = createTestImage(); > > -+ > > -+ int color = testImage.getRGB(x2,y2); > > -+ System.out.println("Color seen: #" + Integer.toHexString(color)); > > -+ if (color != Color.WHITE.getRGB()) { > > -+ throw new RuntimeException( > > -+ "Test Failed; expected to see a white vertex above the bottom of > > the triangle"); > > -+ } > > -+ > > -+ } > > -+} > > diff -r 5c0be31545ff patches/stroker-finish.patch > > --- a/patches/stroker-finish.patch Thu Feb 24 15:30:47 2011 -0500 > > +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 > > @@ -1,20 +0,0 @@ > > ---- openjdk6/jdk/src/share/classes/sun/java2d/pisces/Stroker.java > > -+++ openjdk/jdk/src/share/classes/sun/java2d/pisces/Stroker.java > > -@@ -695,7 +695,7 @@ > > - long ldx = (long)(px0 - x0); > > - long ldy = (long)(py0 - y0); > > - long llen = lineLength(ldx, ldy); > > -- long s = (long)lineWidth2*65536/llen; > > -+ long s = (llen == 0) ? 0 : (long)lineWidth2*65536/llen; > > - > > - int capx = x0 - (int)(ldx*s >> 16); > > - int capy = y0 - (int)(ldy*s >> 16); > > -@@ -717,7 +717,7 @@ > > - long ldx = (long)(sx1 - sx0); > > - long ldy = (long)(sy1 - sy0); > > - long llen = lineLength(ldx, ldy); > > -- long s = (long)lineWidth2*65536/llen; > > -+ long s = (llen == 0) ? 0 : (long)lineWidth2*65536/llen; > > - > > - int capx = sx0 - (int)(ldx*s >> 16); > > - int capy = sy0 - (int)(ldy*s >> 16); > > > -- > Andrew :) > > Free Java Software Engineer > Red Hat, Inc. (http://www.redhat.com) > > Support Free Java! > Contribute to GNU Classpath and IcedTea > http://www.gnu.org/software/classpath > http://icedtea.classpath.org > PGP Key: F5862A37 (https://keys.indymedia.org/) > Fingerprint = EA30 D855 D50F 90CD F54D 0698 0713 C3ED F586 2A37 -------------- next part -------------- A non-text attachment was scrubbed... Name: dashingPerfBackportv2.patch Type: text/x-patch Size: 90505 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/ded27b09/dashingPerfBackportv2.patch From asu at redhat.com Mon Feb 28 08:21:46 2011 From: asu at redhat.com (Andrew Su) Date: Mon, 28 Feb 2011 11:21:46 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1927455152.279883.1298909937810.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <1815935088.279970.1298910106867.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Andrew Su" > To: "Deepak Bhole" > Cc: "IcedTea" > Sent: Monday, February 28, 2011 11:18:57 AM > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > ----- Original Message ----- > > From: "Deepak Bhole" > > To: "Andrew Su" > > Cc: "Deepak Bhole" , "IcedTea" > > > > Sent: Monday, February 28, 2011 11:12:54 AM > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are > > numeric values > > * Andrew Su [2011-02-28 11:04]: > > > > > > > > > ----- Original Message ----- > > > > From: "Deepak Bhole" > > > > To: "Deepak Bhole" > > > > Cc: "Andrew Su" , "IcedTea" > > > > > > > > Sent: Monday, February 28, 2011 10:19:29 AM > > > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are > > > > numeric values > > > > * Deepak Bhole [2011-02-28 10:18]: > > > > > * Andrew Su [2011-02-27 23:28]: > > > > > > Hello, > > > > > > > > > > > > This patch ensures that the port fields in itw-settings > > > > > > only > > > > > > accept numeric values. > > > > > > > > > > > > In this patch: > > > > > > - New Class: NumberDocument. > > > > > > - All port fields now use NumberDocument. > > > > > > > > > > > > Questions? Comments? Concerns? > > > > > > > > > > > > > > > > Rather than defining a separate class, it might be better to > > > > > use > > > > > JFormatterTextField to force the field to accept numbers only. > > > > > > > > > > > > > s/JFormatterTextField/JFormattedTextField > > > > > > Hi Deepak, > > > > > > I didn't think JFormatterTextField fits what I'm trying to do > > > here, since the value gets cleared when text field loses focus. > > > I > > > wanted it to make sure that no "bad" inputs are given the moment > > > it is typed. > > > > > > > What do you mean the value gets cleared when it loses focus? > > I meant that if the value entered is invalid it gets cleared. Of > course this behaviour can be changed, but iirc it only does the check > after the focus to the JFormattedTextField. focus to the JFormattedTextField is lost.* > > Regards, > Andrew > > > > > Deepak > > > > > Cheers, > > > Andrew > > > > > > > > > > > > Cheers, > > > > > Deepak > > > > > > > > > > > Cheers, > > > > > > Andrew > > > > > > > > > > > diff -r 4860276e9bf2 > > > > > > netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > --- > > > > > > a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > > +++ > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > @@ -115,6 +115,7 @@ > > > > > > JLabel http = new > > > > > > JLabel(Translator.R("APSLabelHTTP") > > > > > > + > > > > > > ":"); > > > > > > final JTextField httpAddressField = new > > > > > > JTextField(fields[0]); > > > > > > final JTextField httpPortField = new > > > > > > JTextField(fields[1]); > > > > > > + httpPortField.setDocument(new NumberDocument()); > > > > > > httpAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 0)); > > > > > > httpPortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 1)); > > > > > > > > > > > > @@ -122,6 +123,7 @@ > > > > > > JLabel secure = new > > > > > > JLabel(Translator.R("APSLabelSecure") > > > > > > + ":"); > > > > > > final JTextField secureAddressField = new > > > > > > JTextField(fields[2]); > > > > > > final JTextField securePortField = new > > > > > > JTextField(fields[3]); > > > > > > + securePortField.setDocument(new NumberDocument()); > > > > > > secureAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 2)); > > > > > > securePortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 3)); > > > > > > > > > > > > @@ -129,6 +131,7 @@ > > > > > > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") > > > > > > + > > > > > > ":"); > > > > > > final JTextField ftpAddressField = new > > > > > > JTextField(fields[4]); > > > > > > final JTextField ftpPortField = new > > > > > > JTextField(fields[5]); > > > > > > + ftpPortField.setDocument(new NumberDocument()); > > > > > > ftpAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 4)); > > > > > > ftpPortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 5)); > > > > > > > > > > > > @@ -136,6 +139,7 @@ > > > > > > JLabel socks = new > > > > > > JLabel(Translator.R("APSLabelSocks") + > > > > > > ":"); > > > > > > final JTextField socksAddressField = new > > > > > > JTextField(fields[6]); > > > > > > final JTextField socksPortField = new > > > > > > JTextField(fields[7]); > > > > > > + socksPortField.setDocument(new NumberDocument()); > > > > > > socksAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 6)); > > > > > > socksPortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 7)); > > > > > > > > > > > > diff -r 4860276e9bf2 > > > > > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > --- > > > > > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > > +++ > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > @@ -114,6 +114,7 @@ > > > > > > addressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(config, properties[1])); > > > > > > > > > > > > final JTextField portField = new > > > > > > JTextField(config.getProperty(properties[2]), 3); > > > > > > + portField.setDocument(new NumberDocument()); > > > > > > portField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(config, properties[2])); > > > > > > > > > > > > // Create the button which allows setting of other > > > > > > types > > > > > > of proxy. > > > > > > diff -r 4860276e9bf2 > > > > > > netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > > > > > +++ > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > @@ -0,0 +1,53 @@ > > > > > > +/* NumberDocument.java -- Allow only numeric entries on > > > > > > this > > > > > > document. > > > > > > +Copyright (C) 2011 Red Hat > > > > > > + > > > > > > +This program is free software; you can redistribute it > > > > > > and/or > > > > > > modify > > > > > > +it under the terms of the GNU General Public License as > > > > > > published > > > > > > by > > > > > > +the Free Software Foundation; either version 2 of the > > > > > > License, or > > > > > > +(at your option) any later version. > > > > > > + > > > > > > +This program is distributed in the hope that it will be > > > > > > useful, > > > > > > but > > > > > > +WITHOUT ANY WARRANTY; without even the implied warranty of > > > > > > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See > > > > > > the > > > > > > GNU > > > > > > +General Public License for more details. > > > > > > + > > > > > > +You should have received a copy of the GNU General Public > > > > > > License > > > > > > +along with this program; if not, write to the Free Software > > > > > > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA > > > > > > 02111-1307 USA > > > > > > + */ > > > > > > + > > > > > > +package net.sourceforge.jnlp.controlpanel; > > > > > > + > > > > > > +import javax.swing.text.AttributeSet; > > > > > > +import javax.swing.text.BadLocationException; > > > > > > +import javax.swing.text.PlainDocument; > > > > > > + > > > > > > +/** > > > > > > + * This class will ensure that strings entered into this > > > > > > document > > > > > > will be > > > > > > + * numbers only. > > > > > > + * > > > > > > + * @author Andrew Su (asu at redhat.com, > > > > > > andrew.su at utoronto.ca) > > > > > > + * > > > > > > + */ > > > > > > +public class NumberDocument extends PlainDocument { > > > > > > + > > > > > > + /** > > > > > > + * Constructs an instance of NumberDocument. > > > > > > + */ > > > > > > + public NumberDocument() { > > > > > > + super(); > > > > > > + } > > > > > > + > > > > > > + @Override > > > > > > + public void insertString(int offs, String str, > > > > > > AttributeSet > > > > > > a) > > > > > > throws BadLocationException { > > > > > > + if (str != null) { > > > > > > + try { > > > > > > + Integer.valueOf(str); > > > > > > + super.insertString(offs, str, a); > > > > > > + } catch (Exception e) { > > > > > > + // Nothing to do > > > > > > + } > > > > > > + } > > > > > > + return; > > > > > > + } > > > > > > +} > > > > > > \ No newline at end of file > > > > > From dbhole at redhat.com Mon Feb 28 08:34:38 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 11:34:38 -0500 Subject: [icedtea-web] RFC: replace binary launchers with shell scripts In-Reply-To: <4D6BC8F9.2070700@redhat.com> References: <4D6BC8F9.2070700@redhat.com> Message-ID: <20110228163437.GH7666@redhat.com> * Omair Majid [2011-02-28 11:16]: > Hi, > > The attached patch replaces the binary launchers with simple shell scripts. > > It also (I hope) fixes some mistakes in $(DESTDIR) usage. > > Any thoughts or comments? > What is the motivation for this change? Deepak > Cheers, > Omair > diff -r 02ef9ba4d8a2 Makefile.am > --- a/Makefile.am Fri Feb 25 18:16:48 2011 -0500 > +++ b/Makefile.am Mon Feb 28 10:59:27 2011 -0500 > @@ -18,8 +18,8 @@ > IT_JAVACFLAGS=$(IT_JAVAC_SETTINGS) -source $(IT_LANGUAGE_SOURCE_VERSION) -target $(IT_CLASS_TARGET_VERSION) > > JRE='"$(SYSTEM_JDK_DIR)/jre"' > -LAUNCHER_BOOTCLASSPATH="-J-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar" > -PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar:$(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar"' > +LAUNCHER_BOOTCLASSPATH="-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar" > +PLUGIN_BOOTCLASSPATH='"-Xbootclasspath/a:$(datadir)/$(PACKAGE_NAME)/netx.jar:$(datadir)/$(PACKAGE_NAME)/plugin.jar"' > > # Fake update version to shut up the plugin detector hosted by Oracle. > # If Oracle ever release a JDK update greater than 50, this needs to be increased. > @@ -65,28 +65,27 @@ > endif > endif > > -# Launcher > - > -LAUNCHER_SRCDIR = $(abs_top_srcdir)/launcher > -LAUNCHER_OBJECTS = java.o java_md.o splashscreen_stubs.o jli_util.o parse_manifest.o version_comp.o wildcard.o > -NETX_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/,$(LAUNCHER_OBJECTS)) > -CONTROLPANEL_LAUNCHER_OBJECTS = $(addprefix $(NETX_DIR)/launcher/controlpanel/,$(LAUNCHER_OBJECTS)) > -LAUNCHER_FLAGS = -O2 -fno-strict-aliasing -fPIC -pthread -W -Wall -Wno-unused -Wno-parentheses -pipe -fno-omit-frame-pointer \ > - -g -D_LARGEFILE64_SOURCE -D_GNU_SOURCE -D_REENTRANT -DLAUNCHER_NAME='"java"' -I$(LAUNCHER_SRCDIR) \ > - -DJDK_MAJOR_VERSION='"1"' -DJDK_MINOR_VERSION='"6"' -DLIBARCHNAME='"$(JRE_ARCH_DIR)"' \ > - -DEXPAND_CLASSPATH_WILDCARDS > -LAUNCHER_LINK = -o $@ -pthread -Xlinker -O1 -Xlinker -z -Xlinker defs -L$(BOOT_DIR)/lib/$(INSTALL_ARCH_DIR) \ > - -Wl,-soname=lib.so -Wl,-z -Wl,origin -Wl,--allow-shlib-undefined $(X11_CFLAGS) $(X11_LIBS) -ldl -lz > PLUGIN_VERSION = IcedTea-Web $(FULL_VERSION) > > -EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra launcher \ > +EXTRA_DIST = $(top_srcdir)/netx $(top_srcdir)/plugin javaws.png javaws.desktop.in extra \ > itweb-settings.desktop.in > > +edit = sed \ > + -e 's|[@]bindir[@]|$(bindir)|g' \ > + -e 's|[@]libdir[@]|$(libdir)|g' \ > + -e 's|[@]prefix[@]|$(prefix)|g' > + > +edit_launcher_script = sed \ > + -e 's|[@]LAUNCHER_BOOTCLASSPATH[@]|$(LAUNCHER_BOOTCLASSPATH)|g' \ > + -e 's|[@]JAVAWS_BIN_LOCATION[@]|$(bindir)/javaws|g' \ > + -e 's|[@]ITWEB_SETTINGS_BIN_LOCATION[@]|$(bindir)/itweb-settings|g' > + > + > # Top-Level Targets > # ================= > > -all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp $(NETX_DIR)/launcher/javaws \ > - javaws.desktop stamps/docs.stamp $(NETX_DIR)/launcher/controlpanel/itweb-settings itweb-settings.desktop > +all-local: stamps/netx-dist.stamp extra-lib/about.jar stamps/plugin.stamp launcher/javaws \ > + javaws.desktop stamps/docs.stamp launcher/itweb-settings itweb-settings.desktop > > clean-local: clean-netx clean-plugin clean-liveconnect clean-extra clean-bootstrap-directory \ > clean-native-ecj clean-desktop-files clean-docs > @@ -104,9 +103,9 @@ > ${INSTALL_DATA} $(abs_top_builddir)/liveconnect/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/plugin.jar > endif > ${INSTALL_DATA} $(NETX_DIR)/lib/classes.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/netx.jar > - ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/javaws $(DESTDIR)$(bindir) > + ${INSTALL_PROGRAM} launcher/javaws $(DESTDIR)$(bindir) > ${INSTALL_DATA} extra-lib/about.jar $(DESTDIR)$(datadir)/$(PACKAGE_NAME)/about.jar > - ${INSTALL_PROGRAM} $(NETX_DIR)/launcher/controlpanel/itweb-settings $(DESTDIR)$(bindir) > + ${INSTALL_PROGRAM} launcher/itweb-settings $(DESTDIR)$(bindir) > > install-data-local: > ${mkinstalldirs} -d $(DESTDIR)$(mandir)/man1 > @@ -306,23 +305,11 @@ > extra-lib/about.jar: stamps/extra-class-files.stamp > $(BOOT_DIR)/bin/jar cf $@ -C extra-lib net ; > > -$(NETX_DIR)/launcher/%.o: $(LAUNCHER_SRCDIR)/%.c > - mkdir -p $(NETX_DIR)/launcher && \ > - $(CC) $(LAUNCHER_FLAGS) \ > - -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-J-Djava.icedtea-web.bin=$(DESTDIR)$(bindir)/javaws", "net.sourceforge.jnlp.runtime.Boot", }' \ > - -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"javaws"' -c -o $@ $< > +launcher/javaws: launcher/javaws.in > + $(edit_launcher_script) < $< > $@ > > -$(NETX_DIR)/launcher/controlpanel/%.o: $(LAUNCHER_SRCDIR)/%.c > - mkdir -p $(NETX_DIR)/launcher/controlpanel && \ > - $(CC) $(LAUNCHER_FLAGS) \ > - -DJAVA_ARGS='{ $(LAUNCHER_BOOTCLASSPATH), "-J-ms8m", "-Dprogram.name=itweb-settings", "net.sourceforge.jnlp.controlpanel.CommandLine", }' \ > - -DICEDTEA_WEB_JRE=$(JRE) -DPROGNAME='"itweb-settings"' -c -o $@ $< > - > -$(NETX_DIR)/launcher/javaws: $(NETX_LAUNCHER_OBJECTS) > - $(CC) $(NETX_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) > - > -$(NETX_DIR)/launcher/controlpanel/itweb-settings: $(CONTROLPANEL_LAUNCHER_OBJECTS) > - $(CC) $(CONTROLPANEL_LAUNCHER_OBJECTS) $(LAUNCHER_LINK) > +launcher/itweb-settings: launcher/itweb-settings.in > + $(edit_launcher_script) < $< > $@ > > javaws.desktop: javaws.desktop.in > sed "s#PATH_TO_JAVAWS#$(DESTDIR)$(bindir)/javaws#" < $(srcdir)/javaws.desktop.in > javaws.desktop > diff -r 02ef9ba4d8a2 acinclude.m4 > --- a/acinclude.m4 Fri Feb 25 18:16:48 2011 -0500 > +++ b/acinclude.m4 Mon Feb 28 10:59:27 2011 -0500 > @@ -683,3 +683,5 @@ > AC_MSG_RESULT([${FULL_VERSION}]) > AC_SUBST([FULL_VERSION]) > ]) > + > + > diff -r 02ef9ba4d8a2 configure.ac > --- a/configure.ac Fri Feb 25 18:16:48 2011 -0500 > +++ b/configure.ac Mon Feb 28 10:59:27 2011 -0500 > @@ -79,4 +79,21 @@ > IT_CHECK_FOR_CLASS(SUN_APPLET_APPLETIMAGEREF, [sun.applet.AppletImageRef]) > IT_CHECK_FOR_APPLETVIEWERPANEL_HOLE > > + > +LAUNCHER_FLAGS=-Xms8m > +AC_SUBST([LAUNCHER_FLAGS]) > +JAVAWS_MAIN_CLASS=net.sourceforge.jnlp.runtime.Boot > +AC_SUBST([JAVAWS_MAIN_CLASS]) > +ITWEB_SETTINGS_MAIN_CLASS=net.sourceforge.jnlp.controlpanel.CommandLine > +AC_SUBST([ITWEB_SETTINGS_MAIN_CLASS]) > +JAVAWS_PROGRAM_NAME=javaws > +AC_SUBST([JAVAWS_PROGRAM_NAME]) > +ITWEB_SETTINGS_PROGRAM_NAME=itweb-settings > +AC_SUBST([ITWEB_SETTINGS_PROGRAM_NAME]) > + > +AC_CONFIG_FILES([ > +launcher/javaws.in > +launcher/itweb-settings.in > +]) > + > AC_OUTPUT > diff -r 02ef9ba4d8a2 launcher/itweb-settings.in.in > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/launcher/itweb-settings.in.in Mon Feb 28 10:59:27 2011 -0500 > @@ -0,0 +1,15 @@ > +#!/bin/bash > + > +JAVA=@JAVA@ > +LAUNCHER_BOOTCLASSPATH=@LAUNCHER_BOOTCLASSPATH@ > +LAUNCHER_FLAGS=@LAUNCHER_FLAGS@ > +CLASSNAME=@ITWEB_SETTINGS_MAIN_CLASS@ > +BINARY_LOCATION=@ITWEB_SETTINGS_BIN_LOCATION@ > +PROGRAM_NAME=@ITWEB_SETTINGS_PROGRAM_NAME@ > + > +${JAVA} ${LAUNCHER_BOOTCLASSPATH} ${LAUNCHER_FLAGS} \ > + -Djava.icedtea-web.bin.name=${PROGRAM_NAME} \ > + -Djava.icedtea-web.bin.location=${BINARY_LOCATION} \ > + ${CLASSNAME} \ > + $@ > + > diff -r 02ef9ba4d8a2 launcher/javaws.in.in > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > +++ b/launcher/javaws.in.in Mon Feb 28 10:59:27 2011 -0500 > @@ -0,0 +1,14 @@ > +#!/bin/bash > + > +JAVA=@JAVA@ > +LAUNCHER_BOOTCLASSPATH=@LAUNCHER_BOOTCLASSPATH@ > +LAUNCHER_FLAGS=@LAUNCHER_FLAGS@ > +CLASSNAME=@JAVAWS_MAIN_CLASS@ > +BINARY_LOCATION=@JAVAWS_BIN_LOCATION@ > +PROGRAM_NAME=@JAVAWS_PROGRAM_NAME@ > + > +${JAVA} ${LAUNCHER_BOOTCLASSPATH} ${LAUNCHER_FLAGS} \ > + -Djava.icedtea-web.bin.name=${PROGRAM_NAME} \ > + -Djava.icedtea-web.bin.location=${BINARY_LOCATION} \ > + ${CLASSNAME} \ > + $@ > diff -r 02ef9ba4d8a2 netx/net/sourceforge/jnlp/Launcher.java > --- a/netx/net/sourceforge/jnlp/Launcher.java Fri Feb 25 18:16:48 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/Launcher.java Mon Feb 28 10:59:27 2011 -0500 > @@ -327,7 +327,7 @@ > List commands = new LinkedList(); > > // this property is set by the javaws launcher to point to the javaws binary > - String pathToWebstartBinary = System.getProperty("java.icedtea-web.bin"); > + String pathToWebstartBinary = System.getProperty("java.icedtea-web.bin.location"); > commands.add(pathToWebstartBinary); > // use -Jargument format to pass arguments to the JVM through the launcher > for (String arg : vmArgs) { > diff -r 02ef9ba4d8a2 netx/net/sourceforge/jnlp/controlpanel/CommandLine.java > --- a/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java Fri Feb 25 18:16:48 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java Mon Feb 28 10:59:27 2011 -0500 > @@ -74,7 +74,7 @@ > * Creates a new instance > */ > public CommandLine() { > - PROGRAM_NAME = System.getProperty("program.name"); > + PROGRAM_NAME = System.getProperty("java.icedtea-web.bin.name"); > > config = new DeploymentConfiguration(); > try { > diff -r 02ef9ba4d8a2 netx/net/sourceforge/jnlp/util/XDesktopEntry.java > --- a/netx/net/sourceforge/jnlp/util/XDesktopEntry.java Fri Feb 25 18:16:48 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/util/XDesktopEntry.java Mon Feb 28 10:59:27 2011 -0500 > @@ -72,8 +72,7 @@ > */ > public Reader getContentsAsReader() { > > - String pathToJavaws = System.getProperty("java.home") + File.separator + "bin" > - + File.separator + "javaws"; > + String pathToJavaws = System.getProperty("java.icedtea-web.bin.location"); > String cacheDir = JNLPRuntime.getConfiguration() > .getProperty(DeploymentConfiguration.KEY_USER_CACHE_DIR); > File cacheFile = CacheUtil.urlToPath(file.getSourceLocation(), cacheDir); From dbhole at redhat.com Mon Feb 28 08:36:09 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 11:36:09 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1927455152.279883.1298909937810.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <20110228161253.GG7666@redhat.com> <1927455152.279883.1298909937810.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <20110228163609.GI7666@redhat.com> * Andrew Su [2011-02-28 11:18]: > > > ----- Original Message ----- > > From: "Deepak Bhole" > > To: "Andrew Su" > > Cc: "Deepak Bhole" , "IcedTea" > > Sent: Monday, February 28, 2011 11:12:54 AM > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > > * Andrew Su [2011-02-28 11:04]: > > > > > > > > > ----- Original Message ----- > > > > From: "Deepak Bhole" > > > > To: "Deepak Bhole" > > > > Cc: "Andrew Su" , "IcedTea" > > > > > > > > Sent: Monday, February 28, 2011 10:19:29 AM > > > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are > > > > numeric values > > > > * Deepak Bhole [2011-02-28 10:18]: > > > > > * Andrew Su [2011-02-27 23:28]: > > > > > > Hello, > > > > > > > > > > > > This patch ensures that the port fields in itw-settings only > > > > > > accept numeric values. > > > > > > > > > > > > In this patch: > > > > > > - New Class: NumberDocument. > > > > > > - All port fields now use NumberDocument. > > > > > > > > > > > > Questions? Comments? Concerns? > > > > > > > > > > > > > > > > Rather than defining a separate class, it might be better to use > > > > > JFormatterTextField to force the field to accept numbers only. > > > > > > > > > > > > > s/JFormatterTextField/JFormattedTextField > > > > > > Hi Deepak, > > > > > > I didn't think JFormatterTextField fits what I'm trying to do > > > here, since the value gets cleared when text field loses focus. I > > > wanted it to make sure that no "bad" inputs are given the moment > > > it is typed. > > > > > > > What do you mean the value gets cleared when it loses focus? > > I meant that if the value entered is invalid it gets cleared. Of course this behaviour can be changed, but iirc it only does the check after the focus to the JFormattedTextField. > Ah, but JFormattedTextField wouldn't allow invalid values in the first place, so there should be nothing to clear.. or am I missing something? Deepak > Regards, > Andrew > > > > > Deepak > > > > > Cheers, > > > Andrew > > > > > > > > > > > > Cheers, > > > > > Deepak > > > > > > > > > > > Cheers, > > > > > > Andrew > > > > > > > > > > > diff -r 4860276e9bf2 > > > > > > netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > --- > > > > > > a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > > +++ > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > @@ -115,6 +115,7 @@ > > > > > > JLabel http = new JLabel(Translator.R("APSLabelHTTP") > > > > > > + > > > > > > ":"); > > > > > > final JTextField httpAddressField = new > > > > > > JTextField(fields[0]); > > > > > > final JTextField httpPortField = new > > > > > > JTextField(fields[1]); > > > > > > + httpPortField.setDocument(new NumberDocument()); > > > > > > httpAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 0)); > > > > > > httpPortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 1)); > > > > > > > > > > > > @@ -122,6 +123,7 @@ > > > > > > JLabel secure = new > > > > > > JLabel(Translator.R("APSLabelSecure") > > > > > > + ":"); > > > > > > final JTextField secureAddressField = new > > > > > > JTextField(fields[2]); > > > > > > final JTextField securePortField = new > > > > > > JTextField(fields[3]); > > > > > > + securePortField.setDocument(new NumberDocument()); > > > > > > secureAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 2)); > > > > > > securePortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 3)); > > > > > > > > > > > > @@ -129,6 +131,7 @@ > > > > > > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + > > > > > > ":"); > > > > > > final JTextField ftpAddressField = new > > > > > > JTextField(fields[4]); > > > > > > final JTextField ftpPortField = new > > > > > > JTextField(fields[5]); > > > > > > + ftpPortField.setDocument(new NumberDocument()); > > > > > > ftpAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 4)); > > > > > > ftpPortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 5)); > > > > > > > > > > > > @@ -136,6 +139,7 @@ > > > > > > JLabel socks = new > > > > > > JLabel(Translator.R("APSLabelSocks") + > > > > > > ":"); > > > > > > final JTextField socksAddressField = new > > > > > > JTextField(fields[6]); > > > > > > final JTextField socksPortField = new > > > > > > JTextField(fields[7]); > > > > > > + socksPortField.setDocument(new NumberDocument()); > > > > > > socksAddressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 6)); > > > > > > socksPortField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(fields, 7)); > > > > > > > > > > > > diff -r 4860276e9bf2 > > > > > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > --- > > > > > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > > +++ > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > @@ -114,6 +114,7 @@ > > > > > > addressField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(config, properties[1])); > > > > > > > > > > > > final JTextField portField = new > > > > > > JTextField(config.getProperty(properties[2]), 3); > > > > > > + portField.setDocument(new NumberDocument()); > > > > > > portField.getDocument().addDocumentListener(new > > > > > > DocumentAdapter(config, properties[2])); > > > > > > > > > > > > // Create the button which allows setting of other > > > > > > types > > > > > > of proxy. > > > > > > diff -r 4860276e9bf2 > > > > > > netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > > > > > +++ > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > @@ -0,0 +1,53 @@ > > > > > > +/* NumberDocument.java -- Allow only numeric entries on this > > > > > > document. > > > > > > +Copyright (C) 2011 Red Hat > > > > > > + > > > > > > +This program is free software; you can redistribute it and/or > > > > > > modify > > > > > > +it under the terms of the GNU General Public License as > > > > > > published > > > > > > by > > > > > > +the Free Software Foundation; either version 2 of the > > > > > > License, or > > > > > > +(at your option) any later version. > > > > > > + > > > > > > +This program is distributed in the hope that it will be > > > > > > useful, > > > > > > but > > > > > > +WITHOUT ANY WARRANTY; without even the implied warranty of > > > > > > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the > > > > > > GNU > > > > > > +General Public License for more details. > > > > > > + > > > > > > +You should have received a copy of the GNU General Public > > > > > > License > > > > > > +along with this program; if not, write to the Free Software > > > > > > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA > > > > > > 02111-1307 USA > > > > > > + */ > > > > > > + > > > > > > +package net.sourceforge.jnlp.controlpanel; > > > > > > + > > > > > > +import javax.swing.text.AttributeSet; > > > > > > +import javax.swing.text.BadLocationException; > > > > > > +import javax.swing.text.PlainDocument; > > > > > > + > > > > > > +/** > > > > > > + * This class will ensure that strings entered into this > > > > > > document > > > > > > will be > > > > > > + * numbers only. > > > > > > + * > > > > > > + * @author Andrew Su (asu at redhat.com, andrew.su at utoronto.ca) > > > > > > + * > > > > > > + */ > > > > > > +public class NumberDocument extends PlainDocument { > > > > > > + > > > > > > + /** > > > > > > + * Constructs an instance of NumberDocument. > > > > > > + */ > > > > > > + public NumberDocument() { > > > > > > + super(); > > > > > > + } > > > > > > + > > > > > > + @Override > > > > > > + public void insertString(int offs, String str, AttributeSet > > > > > > a) > > > > > > throws BadLocationException { > > > > > > + if (str != null) { > > > > > > + try { > > > > > > + Integer.valueOf(str); > > > > > > + super.insertString(offs, str, a); > > > > > > + } catch (Exception e) { > > > > > > + // Nothing to do > > > > > > + } > > > > > > + } > > > > > > + return; > > > > > > + } > > > > > > +} > > > > > > \ No newline at end of file > > > > > From omajid at redhat.com Mon Feb 28 08:50:56 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 11:50:56 -0500 Subject: [icedtea-web] RFC: replace binary launchers with shell scripts In-Reply-To: <20110228163437.GH7666@redhat.com> References: <4D6BC8F9.2070700@redhat.com> <20110228163437.GH7666@redhat.com> Message-ID: <4D6BD270.4090802@redhat.com> On 02/28/2011 11:34 AM, Deepak Bhole wrote: > * Omair Majid [2011-02-28 11:16]: >> Hi, >> >> The attached patch replaces the binary launchers with simple shell scripts. >> >> It also (I hope) fixes some mistakes in $(DESTDIR) usage. >> >> Any thoughts or comments? >> > > What is the motivation for this change? > Mainly, just less code. The existing launcher code is over 9000 lines. All of that can be removed after applying this patch. As a side effect, this will also avoid issues like CVE-2010-4450 [1] in the future. Cheers, Omair [1] http://icedtea.classpath.org/hg/icedtea-web/rev/5cb73fdbe246 From asu at redhat.com Mon Feb 28 08:55:58 2011 From: asu at redhat.com (Andrew Su) Date: Mon, 28 Feb 2011 11:55:58 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <20110228163609.GI7666@redhat.com> Message-ID: <1111303930.282683.1298912158236.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Deepak Bhole" > To: "Andrew Su" > Cc: "Deepak Bhole" , "IcedTea" > Sent: Monday, February 28, 2011 11:36:09 AM > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > * Andrew Su [2011-02-28 11:18]: > > > > > > ----- Original Message ----- > > > From: "Deepak Bhole" > > > To: "Andrew Su" > > > Cc: "Deepak Bhole" , "IcedTea" > > > > > > Sent: Monday, February 28, 2011 11:12:54 AM > > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are > > > numeric values > > > * Andrew Su [2011-02-28 11:04]: > > > > > > > > > > > > ----- Original Message ----- > > > > > From: "Deepak Bhole" > > > > > To: "Deepak Bhole" > > > > > Cc: "Andrew Su" , "IcedTea" > > > > > > > > > > Sent: Monday, February 28, 2011 10:19:29 AM > > > > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are > > > > > numeric values > > > > > * Deepak Bhole [2011-02-28 10:18]: > > > > > > * Andrew Su [2011-02-27 23:28]: > > > > > > > Hello, > > > > > > > > > > > > > > This patch ensures that the port fields in itw-settings > > > > > > > only > > > > > > > accept numeric values. > > > > > > > > > > > > > > In this patch: > > > > > > > - New Class: NumberDocument. > > > > > > > - All port fields now use NumberDocument. > > > > > > > > > > > > > > Questions? Comments? Concerns? > > > > > > > > > > > > > > > > > > > Rather than defining a separate class, it might be better to > > > > > > use > > > > > > JFormatterTextField to force the field to accept numbers > > > > > > only. > > > > > > > > > > > > > > > > s/JFormatterTextField/JFormattedTextField > > > > > > > > Hi Deepak, > > > > > > > > I didn't think JFormatterTextField fits what I'm trying to do > > > > here, since the value gets cleared when text field loses > > > > focus. I > > > > wanted it to make sure that no "bad" inputs are given the > > > > moment > > > > it is typed. > > > > > > > > > > What do you mean the value gets cleared when it loses focus? > > > > I meant that if the value entered is invalid it gets cleared. Of > > course this behaviour can be changed, but iirc it only does the > > check after the focus to the JFormattedTextField. > > > > Ah, but JFormattedTextField wouldn't allow invalid values in the first > place, so there should be nothing to clear.. or am I missing > something? Here's what I did to test it: http://fpaste.org/Y4cy/ Steps: 1. Enter some non-numeric value. 2. Click button (to lose focus on text box). [Should get cleared] 3. Clear field then enter some digits. 4. Click button (to lose focus on text box). [Should have no change] 5. Add some non-digits to the field. 6. Click button (to lose focus on text box). [Should revert back to value at #4] 7. Remove all items in the field. 8. Click button (to lose focus on text box). [Reverts back to value at #4] --Andrew > > Deepak > > > Regards, > > Andrew > > > > > > > > Deepak > > > > > > > Cheers, > > > > Andrew > > > > > > > > > > > > > > > Cheers, > > > > > > Deepak > > > > > > > > > > > > > Cheers, > > > > > > > Andrew > > > > > > > > > > > > > diff -r 4860276e9bf2 > > > > > > > netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > > --- > > > > > > > a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > > > +++ > > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > > @@ -115,6 +115,7 @@ > > > > > > > JLabel http = new > > > > > > > JLabel(Translator.R("APSLabelHTTP") > > > > > > > + > > > > > > > ":"); > > > > > > > final JTextField httpAddressField = new > > > > > > > JTextField(fields[0]); > > > > > > > final JTextField httpPortField = new > > > > > > > JTextField(fields[1]); > > > > > > > + httpPortField.setDocument(new NumberDocument()); > > > > > > > httpAddressField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 0)); > > > > > > > httpPortField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 1)); > > > > > > > > > > > > > > @@ -122,6 +123,7 @@ > > > > > > > JLabel secure = new > > > > > > > JLabel(Translator.R("APSLabelSecure") > > > > > > > + ":"); > > > > > > > final JTextField secureAddressField = new > > > > > > > JTextField(fields[2]); > > > > > > > final JTextField securePortField = new > > > > > > > JTextField(fields[3]); > > > > > > > + securePortField.setDocument(new NumberDocument()); > > > > > > > secureAddressField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 2)); > > > > > > > securePortField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 3)); > > > > > > > > > > > > > > @@ -129,6 +131,7 @@ > > > > > > > JLabel ftp = new > > > > > > > JLabel(Translator.R("APSLabelFTP") + > > > > > > > ":"); > > > > > > > final JTextField ftpAddressField = new > > > > > > > JTextField(fields[4]); > > > > > > > final JTextField ftpPortField = new > > > > > > > JTextField(fields[5]); > > > > > > > + ftpPortField.setDocument(new NumberDocument()); > > > > > > > ftpAddressField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 4)); > > > > > > > ftpPortField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 5)); > > > > > > > > > > > > > > @@ -136,6 +139,7 @@ > > > > > > > JLabel socks = new > > > > > > > JLabel(Translator.R("APSLabelSocks") + > > > > > > > ":"); > > > > > > > final JTextField socksAddressField = new > > > > > > > JTextField(fields[6]); > > > > > > > final JTextField socksPortField = new > > > > > > > JTextField(fields[7]); > > > > > > > + socksPortField.setDocument(new NumberDocument()); > > > > > > > socksAddressField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 6)); > > > > > > > socksPortField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(fields, 7)); > > > > > > > > > > > > > > diff -r 4860276e9bf2 > > > > > > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > > --- > > > > > > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > > Sun Feb 27 21:48:17 2011 -0500 > > > > > > > +++ > > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > > @@ -114,6 +114,7 @@ > > > > > > > addressField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(config, properties[1])); > > > > > > > > > > > > > > final JTextField portField = new > > > > > > > JTextField(config.getProperty(properties[2]), 3); > > > > > > > + portField.setDocument(new NumberDocument()); > > > > > > > portField.getDocument().addDocumentListener(new > > > > > > > DocumentAdapter(config, properties[2])); > > > > > > > > > > > > > > // Create the button which allows setting of > > > > > > > other > > > > > > > types > > > > > > > of proxy. > > > > > > > diff -r 4860276e9bf2 > > > > > > > netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > > > --- /dev/null Thu Jan 01 00:00:00 1970 +0000 > > > > > > > +++ > > > > > > > b/netx/net/sourceforge/jnlp/controlpanel/NumberDocument.java > > > > > > > Sun Feb 27 23:26:36 2011 -0500 > > > > > > > @@ -0,0 +1,53 @@ > > > > > > > +/* NumberDocument.java -- Allow only numeric entries on > > > > > > > this > > > > > > > document. > > > > > > > +Copyright (C) 2011 Red Hat > > > > > > > + > > > > > > > +This program is free software; you can redistribute it > > > > > > > and/or > > > > > > > modify > > > > > > > +it under the terms of the GNU General Public License as > > > > > > > published > > > > > > > by > > > > > > > +the Free Software Foundation; either version 2 of the > > > > > > > License, or > > > > > > > +(at your option) any later version. > > > > > > > + > > > > > > > +This program is distributed in the hope that it will be > > > > > > > useful, > > > > > > > but > > > > > > > +WITHOUT ANY WARRANTY; without even the implied warranty > > > > > > > of > > > > > > > +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See > > > > > > > the > > > > > > > GNU > > > > > > > +General Public License for more details. > > > > > > > + > > > > > > > +You should have received a copy of the GNU General Public > > > > > > > License > > > > > > > +along with this program; if not, write to the Free > > > > > > > Software > > > > > > > +Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA > > > > > > > 02111-1307 USA > > > > > > > + */ > > > > > > > + > > > > > > > +package net.sourceforge.jnlp.controlpanel; > > > > > > > + > > > > > > > +import javax.swing.text.AttributeSet; > > > > > > > +import javax.swing.text.BadLocationException; > > > > > > > +import javax.swing.text.PlainDocument; > > > > > > > + > > > > > > > +/** > > > > > > > + * This class will ensure that strings entered into this > > > > > > > document > > > > > > > will be > > > > > > > + * numbers only. > > > > > > > + * > > > > > > > + * @author Andrew Su (asu at redhat.com, > > > > > > > andrew.su at utoronto.ca) > > > > > > > + * > > > > > > > + */ > > > > > > > +public class NumberDocument extends PlainDocument { > > > > > > > + > > > > > > > + /** > > > > > > > + * Constructs an instance of NumberDocument. > > > > > > > + */ > > > > > > > + public NumberDocument() { > > > > > > > + super(); > > > > > > > + } > > > > > > > + > > > > > > > + @Override > > > > > > > + public void insertString(int offs, String str, > > > > > > > AttributeSet > > > > > > > a) > > > > > > > throws BadLocationException { > > > > > > > + if (str != null) { > > > > > > > + try { > > > > > > > + Integer.valueOf(str); > > > > > > > + super.insertString(offs, str, a); > > > > > > > + } catch (Exception e) { > > > > > > > + // Nothing to do > > > > > > > + } > > > > > > > + } > > > > > > > + return; > > > > > > > + } > > > > > > > +} > > > > > > > \ No newline at end of file > > > > > > From omajid at redhat.com Mon Feb 28 09:25:29 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 12:25:29 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1222117990.279478.1298909098994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <1222117990.279478.1298909098994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <4D6BDA89.4070504@redhat.com> On 02/28/2011 11:04 AM, Andrew Su wrote: >>>> >>>> This patch ensures that the port fields in itw-settings only >>>> accept numeric values. >>>> >>>> In this patch: - New Class: NumberDocument. - All port fields >>>> now use NumberDocument. >>>> >>>> Questions? Comments? Concerns? >>>> >>> >>> Rather than defining a separate class, it might be better to use >>> JFormatterTextField to force the field to accept numbers only. >>> >> >> s/JFormatterTextField/JFormattedTextField > > I didn't think JFormatterTextField fits what I'm trying to do here, > since the value gets cleared when text field loses focus. I wanted it > to make sure that no "bad" inputs are given the moment it is typed. > Perhaps an InputVerifier might be useful? Take a look at the javadocs for JFormattedTextField [1] for an example. Cheers, Omair [1] http://download.oracle.com/javase/6/docs/api/javax/swing/JFormattedTextField.html From dbhole at redhat.com Mon Feb 28 09:27:45 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 12:27:45 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1111303930.282683.1298912158236.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <20110228163609.GI7666@redhat.com> <1111303930.282683.1298912158236.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <20110228172744.GK7666@redhat.com> * Andrew Su [2011-02-28 11:56]: > > ... > > > I meant that if the value entered is invalid it gets cleared. Of > > > course this behaviour can be changed, but iirc it only does the > > > check after the focus to the JFormattedTextField. > > > > > > > Ah, but JFormattedTextField wouldn't allow invalid values in the first > > place, so there should be nothing to clear.. or am I missing > > something? > > Here's what I did to test it: http://fpaste.org/Y4cy/ > > Steps: > 1. Enter some non-numeric value. > 2. Click button (to lose focus on text box). [Should get cleared] > 3. Clear field then enter some digits. > 4. Click button (to lose focus on text box). [Should have no change] > 5. Add some non-digits to the field. > 6. Click button (to lose focus on text box). [Should revert back to value at #4] > 7. Remove all items in the field. > 8. Click button (to lose focus on text box). [Reverts back to value at #4] > > --Andrew > Ah, I see what you mean now. In that case, take a look at MaskFormatter: http://download.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html#maskformatter Cheers, Deepak From omajid at redhat.com Mon Feb 28 09:52:32 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 12:52:32 -0500 Subject: Reviewer needed - fix for Re: Strange behaviour during javaws -about In-Reply-To: <4D668AA7.30503@redhat.com> References: <4D65412D.4030905@redhat.com> <20110223175112.GW24648@rivendell.middle-earth.co.uk> <4D659A0B.7080005@redhat.com> <4D668AA7.30503@redhat.com> Message-ID: <4D6BE0E0.4020902@redhat.com> On 02/24/2011 11:43 AM, Jiri Vanek wrote: > On 02/24/2011 12:36 AM, Omair Majid wrote: > > So, this patch expects fixed about.jnlp to have code base of > file://$DEST_DIR/share > > Then removes all-permissions, and lunched fixed window without them. The > window is not running in invoke later(which probably caused the hang) > but runs in javaws's own thread. Also points directly to correct jnlp > local file and runs offline. > >> On 02/23/2011 12:51 PM, Dr Andrew John Hughes wrote: >>> What is the motivation for this change? Assuming it still runs without >>> all-permissions, the change looks fine. >>> >> >> From my very limited testing, it doesnt :( > > >> snip Contrary to what I had expected, this patch works just fine. I am still not sure if we want to do it this way, but it works. The comments below are an attempt to explain why it works. > @@ -112,24 +105,8 @@ > } > > public static void main(String[] args) { > - javax.swing.SwingUtilities.invokeLater(new Runnable() { > - public void run() { > - createAndShowGUI(); > - } > - }); > - } > + createAndShowGUI(); > + } > This was what was really confusing me. The "new Runnable() {...}" bit is really an inner class, Main$1. Main and HTMLPanel are loaded by netx itself (which has permissions to access any package), but Main$1 is loaded by Main, which does not have access to the package net.sourceforge.jnlp.about. So keeping the invokeLater causes an AccessControlException (as Main tries to access net.sourceforge.jnlp.about.Main$1), while removing it makes the untrusted about application work. The correct fix, IMHO, would be to change the package of about, so about.jar can access all it's own classes without security exceptions. On the other hand, I think that may be an overly complex solution; removing invokeLater works for now (thought it may break at some point). Does anyone else have any thoughts about this? Cheers, Omair From dbhole at redhat.com Mon Feb 28 10:27:43 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 13:27:43 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <4D6BDA89.4070504@redhat.com> References: <1222117990.279478.1298909098994.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> <4D6BDA89.4070504@redhat.com> Message-ID: <20110228182743.GA22018@redhat.com> * Omair Majid [2011-02-28 13:03]: > On 02/28/2011 11:04 AM, Andrew Su wrote: > >>>> > >>>>This patch ensures that the port fields in itw-settings only > >>>>accept numeric values. > >>>> > >>>>In this patch: - New Class: NumberDocument. - All port fields > >>>>now use NumberDocument. > >>>> > >>>>Questions? Comments? Concerns? > >>>> > >>> > >>>Rather than defining a separate class, it might be better to use > >>>JFormatterTextField to force the field to accept numbers only. > >>> > >> > >>s/JFormatterTextField/JFormattedTextField > > > >I didn't think JFormatterTextField fits what I'm trying to do here, > >since the value gets cleared when text field loses focus. I wanted it > >to make sure that no "bad" inputs are given the moment it is typed. > > > > Perhaps an InputVerifier might be useful? Take a look at the javadocs > for JFormattedTextField [1] for an example. > InputVerifier cannot check for bad input as it is typed. It relies on loss of focus as a verification trigger.. Deepak > Cheers, > Omair > > [1] http://download.oracle.com/javase/6/docs/api/javax/swing/JFormattedTextField.html From omajid at icedtea.classpath.org Mon Feb 28 11:33:47 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Mon, 28 Feb 2011 19:33:47 +0000 Subject: /hg/icedtea-web: 2 new changesets Message-ID: changeset ff13474daadb in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=ff13474daadb author: Omair Majid date: Mon Feb 28 13:40:12 2011 -0500 Rename security warning classes to security dialog classes. Some of the security dialogs that are shown are not warning dialogs. 2011-02-28 Omair Majid Rename files * netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java : Rename to ... * netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java: New file. * netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java: Rename to... * netx/net/sourceforge/jnlp/security/SecurityDialog.java: New file. * netx/net/sourceforge/jnlp/security/SecurityWarning.java: Rename to... * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: New file. * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java, * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java, * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java, * netx/net/sourceforge/jnlp/security/AccessWarningPane.java, * netx/net/sourceforge/jnlp/security/AppletWarningPane.java, * netx/net/sourceforge/jnlp/security/CertWarningPane.java, * netx/net/sourceforge/jnlp/security/CertsInfoPane.java, * netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java, * netx/net/sourceforge/jnlp/security/MoreInfoPane.java, * netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java, * netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java, * netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java , * netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java, * netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java, * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java, * netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java, * netx/net/sourceforge/jnlp/services/ServiceUtil.java, * netx/net/sourceforge/jnlp/services/XClipboardService.java, * netx/net/sourceforge/jnlp/services/XExtendedService.java, * netx/net/sourceforge/jnlp/services/XFileOpenService.java, * netx/net/sourceforge/jnlp/services/XFileSaveService.java: Update class names to the new classes. changeset 54077eaf4670 in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=54077eaf4670 author: Omair Majid date: Mon Feb 28 14:30:39 2011 -0500 Integrate JNLPAuthenticator into the rest of the security subsystem This patch integrates the password authentication pane into the rest of the security dialog system. The password authentication dialog is now shown using the secure thread, rather than the thread of the JNLP application. 2011-02-28 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add Password, Username and SAuthenticationPrompt. * netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java (getPasswordAuthentication): Show password prompt using the secure thread. * netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java (PasswordAuthenticationPane): Initialize variables. (initialize): For consistency, rename to.. (addComponents): New method. Set the appropriate return value when user takes an action. (askUser): Remove. (main): Remove. * netx/net/sourceforge/jnlp/security/SecurityDialog.java (initDialog): Add extra case for AUTHENTICATION dialog type. (installPanel): Likewise. * netx/net/sourceforge/jnlp/security/SecurityDialogs.java (DialogType): Add AUTHENTICATION. (showAuthenicationPrompt): New method. Shows a password authentication prompt. diffstat: 15 files changed, 493 insertions(+), 479 deletions(-) ChangeLog | 29 + netx/net/sourceforge/jnlp/resources/Messages.properties | 1 netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java | 1 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java | 1 netx/net/sourceforge/jnlp/security/AccessWarningPane.java | 2 netx/net/sourceforge/jnlp/security/CertWarningPane.java | 2 netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java | 123 ------ netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java | 91 ++++ netx/net/sourceforge/jnlp/security/SecurityDialog.java | 186 ++++++++++ netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java | 1 netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java | 2 netx/net/sourceforge/jnlp/security/SecurityDialogs.java | 183 +++++++++ netx/net/sourceforge/jnlp/security/SecurityWarning.java | 165 -------- netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java | 184 --------- netx/net/sourceforge/jnlp/services/ServiceUtil.java | 1 diffs (truncated from 2452 to 500 lines): diff -r 02ef9ba4d8a2 -r 54077eaf4670 ChangeLog --- a/ChangeLog Fri Feb 25 18:16:48 2011 -0500 +++ b/ChangeLog Mon Feb 28 14:30:39 2011 -0500 @@ -1,3 +1,59 @@ 2011-02-25 Omair Majid + + * netx/net/sourceforge/jnlp/resources/Messages.properties: Add Password, + Username and SAuthenticationPrompt. + * netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java + (getPasswordAuthentication): Show password prompt using the secure thread. + * netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java + (PasswordAuthenticationPane): Initialize variables. + (initialize): For consistency, rename to.. + (addComponents): New method. Set the appropriate return value when user + takes an action. + (askUser): Remove. + (main): Remove. + * netx/net/sourceforge/jnlp/security/SecurityDialog.java + (initDialog): Add extra case for AUTHENTICATION dialog type. + (installPanel): Likewise. + * netx/net/sourceforge/jnlp/security/SecurityDialogs.java + (DialogType): Add AUTHENTICATION. + (showAuthenicationPrompt): New method. Shows a password authentication + prompt. + +2011-02-28 Omair Majid + + Rename files + * netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java: + Rename to ... + * netx/net/sourceforge/jnlp/security/PasswordAuthenticationPane.java: New + file. + * netx/net/sourceforge/jnlp/security/SecurityWarningDialog.java: Rename + to... + * netx/net/sourceforge/jnlp/security/SecurityDialog.java: New file. + * netx/net/sourceforge/jnlp/security/SecurityWarning.java: Rename to... + * netx/net/sourceforge/jnlp/security/SecurityDialogs.java: New file. + * netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java, + * netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java, + * netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java, + * netx/net/sourceforge/jnlp/security/AccessWarningPane.java, + * netx/net/sourceforge/jnlp/security/AppletWarningPane.java, + * netx/net/sourceforge/jnlp/security/CertWarningPane.java, + * netx/net/sourceforge/jnlp/security/CertsInfoPane.java, + * netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java, + * netx/net/sourceforge/jnlp/security/MoreInfoPane.java, + * netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java, + * netx/net/sourceforge/jnlp/security/SecurityDialogMessage.java, + * netx/net/sourceforge/jnlp/security/SecurityDialogMessageHandler.java, + * netx/net/sourceforge/jnlp/security/SecurityDialogPanel.java, + * netx/net/sourceforge/jnlp/security/SingleCertInfoPane.java, + * netx/net/sourceforge/jnlp/security/VariableX509TrustManager.java, + * netx/net/sourceforge/jnlp/security/viewer/CertificatePane.java, + * netx/net/sourceforge/jnlp/services/ServiceUtil.java, + * netx/net/sourceforge/jnlp/services/XClipboardService.java, + * netx/net/sourceforge/jnlp/services/XExtendedService.java, + * netx/net/sourceforge/jnlp/services/XFileOpenService.java, + * netx/net/sourceforge/jnlp/services/XFileSaveService.java: Update class + names to the new classes. + 2011-02-25 Omair Majid * Makefile.am (stamps/netx-dist.stamp): Do not add extra files to diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/resources/Messages.properties --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Mon Feb 28 14:30:39 2011 -0500 @@ -22,8 +22,10 @@ Field=Field Field=Field From=From Name=Name +Password=Password: Publisher=Publisher Unknown= +Username=Username: Value=Value Version=Version @@ -195,6 +197,7 @@ SNotAllSignedSummary=Only parts of this SNotAllSignedSummary=Only parts of this application code are signed. SNotAllSignedDetail=This application contains both signed and unsigned code. While signed code is safe if you trust the provider, unsigned code may imply code outside of the trusted provider's control. SNotAllSignedQuestion=Do you wish to proceed and run this application anyway? +SAuthenticationPrompt=The {0} server at {1} is requesting authentication. It says "{2}" # Security - used for the More Information dialog SBadKeyUsage=Resources contain entries whose signer certificate's KeyUsage extension doesn't allow code signing. diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java --- a/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/ApplicationInstance.java Mon Feb 28 14:30:39 2011 -0500 @@ -35,8 +35,8 @@ import net.sourceforge.jnlp.config.Deplo import net.sourceforge.jnlp.config.DeploymentConfiguration; import net.sourceforge.jnlp.event.ApplicationEvent; import net.sourceforge.jnlp.event.ApplicationListener; -import net.sourceforge.jnlp.security.SecurityWarning; -import net.sourceforge.jnlp.security.SecurityWarning.AccessType; +import net.sourceforge.jnlp.security.SecurityDialogs; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import net.sourceforge.jnlp.util.WeakList; import net.sourceforge.jnlp.util.XDesktopEntry; @@ -184,12 +184,12 @@ public class ApplicationInstance { } else if (currentSetting.equals(ShortcutDesc.CREATE_ALWAYS)) { createShortcut = true; } else if (currentSetting.equals(ShortcutDesc.CREATE_ASK_USER)) { - if (SecurityWarning.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) { + if (SecurityDialogs.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) { createShortcut = true; } } else if (currentSetting.equals(ShortcutDesc.CREATE_ASK_USER_IF_HINTED)) { if (sd != null && sd.onDesktop()) { - if (SecurityWarning.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) { + if (SecurityDialogs.showAccessWarningDialog(AccessType.CREATE_DESTKOP_SHORTCUT, file)) { createShortcut = true; } } diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPClassLoader.java Mon Feb 28 14:30:39 2011 -0500 @@ -58,8 +58,8 @@ import net.sourceforge.jnlp.cache.CacheU import net.sourceforge.jnlp.cache.CacheUtil; import net.sourceforge.jnlp.cache.ResourceTracker; import net.sourceforge.jnlp.cache.UpdatePolicy; -import net.sourceforge.jnlp.security.SecurityWarning; -import net.sourceforge.jnlp.security.SecurityWarning.AccessType; +import net.sourceforge.jnlp.security.SecurityDialogs; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import net.sourceforge.jnlp.tools.JarSigner; import net.sourceforge.jnlp.util.FileUtils; import sun.misc.JarIndex; @@ -289,7 +289,7 @@ public class JNLPClassLoader extends URL if (extLoader != null && extLoader != loader) { if (loader.signing && !extLoader.signing) - if (!SecurityWarning.showNotAllSignedWarningDialog(file)) + if (!SecurityDialogs.showNotAllSignedWarningDialog(file)) throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo")); loader.merge(extLoader); @@ -436,7 +436,7 @@ public class JNLPClassLoader extends URL signing = true; if (!js.allJarsSigned() && - !SecurityWarning.showNotAllSignedWarningDialog(file)) + !SecurityDialogs.showNotAllSignedWarningDialog(file)) throw new LaunchException(file, null, R("LSFatal"), R("LCClient"), R("LSignedAppJarUsingUnsignedJar"), R("LSignedAppJarUsingUnsignedJarInfo")); //user does not trust this publisher @@ -503,7 +503,7 @@ public class JNLPClassLoader extends URL private void checkTrustWithUser(JarSigner js) throws LaunchException { if (!js.getRootInCacerts()) { //root cert is not in cacerts - boolean b = SecurityWarning.showCertWarningDialog( + boolean b = SecurityDialogs.showCertWarningDialog( AccessType.UNVERIFIED, file, js); if (!b) throw new LaunchException(null, null, R("LSFatal"), @@ -511,10 +511,10 @@ public class JNLPClassLoader extends URL } else if (js.getRootInCacerts()) { //root cert is in cacerts boolean b = false; if (js.noSigningIssues()) - b = SecurityWarning.showCertWarningDialog( + b = SecurityDialogs.showCertWarningDialog( AccessType.VERIFIED, file, js); else if (!js.noSigningIssues()) - b = SecurityWarning.showCertWarningDialog( + b = SecurityDialogs.showCertWarningDialog( AccessType.SIGNING_ERROR, file, js); if (!b) throw new LaunchException(null, null, R("LSFatal"), diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java --- a/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/runtime/JNLPSecurityManager.java Mon Feb 28 14:30:39 2011 -0500 @@ -30,7 +30,7 @@ import javax.swing.JWindow; import javax.swing.JWindow; import net.sourceforge.jnlp.JNLPFile; -import net.sourceforge.jnlp.security.SecurityWarning.AccessType; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import net.sourceforge.jnlp.services.ServiceUtil; import net.sourceforge.jnlp.util.WeakList; import sun.awt.AWTSecurityManager; diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/AccessWarningPane.java --- a/netx/net/sourceforge/jnlp/security/AccessWarningPane.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/AccessWarningPane.java Mon Feb 28 14:30:39 2011 -0500 @@ -58,11 +58,11 @@ import javax.swing.SwingConstants; import javax.swing.SwingConstants; import net.sourceforge.jnlp.JNLPFile; -import net.sourceforge.jnlp.security.SecurityWarning.AccessType; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import net.sourceforge.jnlp.util.FileUtils; /** - * Provides a panel to show inside a SecurityWarningDialog. These dialogs are + * Provides a panel to show inside a SecurityDialog. These dialogs are * used to warn the user when either signed code (with or without signing * issues) is going to be run, or when service permission (file, clipboard, * printer, etc) is needed with unsigned code. @@ -74,12 +74,12 @@ public class AccessWarningPane extends S JCheckBox alwaysAllow; Object[] extras; - public AccessWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) { + public AccessWarningPane(SecurityDialog x, CertVerifier certVerifier) { super(x, certVerifier); addComponents(); } - public AccessWarningPane(SecurityWarningDialog x, Object[] extras, CertVerifier certVerifier) { + public AccessWarningPane(SecurityDialog x, Object[] extras, CertVerifier certVerifier) { super(x, certVerifier); this.extras = extras; addComponents(); diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/AppletWarningPane.java --- a/netx/net/sourceforge/jnlp/security/AppletWarningPane.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/AppletWarningPane.java Mon Feb 28 14:30:39 2011 -0500 @@ -51,7 +51,7 @@ import javax.swing.JPanel; public class AppletWarningPane extends SecurityDialogPanel { - public AppletWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) { + public AppletWarningPane(SecurityDialog x, CertVerifier certVerifier) { super(x, certVerifier); addComponents(); } diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/CertWarningPane.java --- a/netx/net/sourceforge/jnlp/security/CertWarningPane.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertWarningPane.java Mon Feb 28 14:30:39 2011 -0500 @@ -68,11 +68,11 @@ import net.sourceforge.jnlp.runtime.JNLP import net.sourceforge.jnlp.runtime.JNLPRuntime; import net.sourceforge.jnlp.security.KeyStores.Level; import net.sourceforge.jnlp.security.KeyStores.Type; -import net.sourceforge.jnlp.security.SecurityWarning.AccessType; +import net.sourceforge.jnlp.security.SecurityDialogs.AccessType; import net.sourceforge.jnlp.util.FileUtils; /** - * Provides the panel for using inside a SecurityWarningDialog. These dialogs are + * Provides the panel for using inside a SecurityDialog. These dialogs are * used to warn the user when either signed code (with or without signing * issues) is going to be run, or when service permission (file, clipboard, * printer, etc) is needed with unsigned code. @@ -84,7 +84,7 @@ public class CertWarningPane extends Sec JCheckBox alwaysTrust; CertVerifier certVerifier; - public CertWarningPane(SecurityWarningDialog x, CertVerifier certVerifier) { + public CertWarningPane(SecurityDialog x, CertVerifier certVerifier) { super(x, certVerifier); this.certVerifier = certVerifier; addComponents(); @@ -231,7 +231,7 @@ public class CertWarningPane extends Sec private class MoreInfoButtonListener implements ActionListener { public void actionPerformed(ActionEvent e) { - SecurityWarningDialog.showMoreInfoDialog(parent.getJarSigner(), + SecurityDialog.showMoreInfoDialog(parent.getJarSigner(), parent); } } diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/CertsInfoPane.java --- a/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/CertsInfoPane.java Mon Feb 28 14:30:39 2011 -0500 @@ -75,7 +75,7 @@ public class CertsInfoPane extends Secur private String[] columnNames = { R("Field"), R("Value") }; protected ArrayList certsData; - public CertsInfoPane(SecurityWarningDialog x, CertVerifier certVerifier) { + public CertsInfoPane(SecurityDialog x, CertVerifier certVerifier) { super(x, certVerifier); addComponents(); } diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java --- a/netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/JNLPAuthenticator.java Mon Feb 28 14:30:39 2011 -0500 @@ -42,6 +42,7 @@ import java.net.PasswordAuthentication; public class JNLPAuthenticator extends Authenticator { + @Override public PasswordAuthentication getPasswordAuthentication() { // No security check is required here, because the only way to set @@ -50,12 +51,16 @@ public class JNLPAuthenticator extends A String type = this.getRequestorType() == RequestorType.PROXY ? "proxy" : "web"; - // request auth info from user - PasswordAuthenticationDialog pwDialog = new PasswordAuthenticationDialog(); - PasswordAuthentication auth = pwDialog.askUser(this.getRequestingHost(), this.getRequestingPort(), this.getRequestingPrompt(), type); + String host = getRequestingHost(); + int port = getRequestingPort(); + String prompt = getRequestingPrompt(); - // send it along - return auth; + Object[] response = SecurityDialogs.showAuthenicationPrompt(host, port, prompt, type); + if (response == null) { + return null; + } else { + return new PasswordAuthentication((String) response[0], (char[]) response[1]); + } } } diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/MoreInfoPane.java --- a/netx/net/sourceforge/jnlp/security/MoreInfoPane.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/MoreInfoPane.java Mon Feb 28 14:30:39 2011 -0500 @@ -61,7 +61,7 @@ import javax.swing.SwingConstants; */ public class MoreInfoPane extends SecurityDialogPanel { - public MoreInfoPane(SecurityWarningDialog x, CertVerifier certVerifier) { + public MoreInfoPane(SecurityDialog x, CertVerifier certVerifier) { super(x, certVerifier); addComponents(); } @@ -105,7 +105,7 @@ public class MoreInfoPane extends Securi private class CertInfoButtonListener implements ActionListener { public void actionPerformed(ActionEvent e) { - SecurityWarningDialog.showCertInfoDialog(parent.getJarSigner(), + SecurityDialog.showCertInfoDialog(parent.getJarSigner(), parent); } } diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java --- a/netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java Fri Feb 25 18:16:48 2011 -0500 +++ b/netx/net/sourceforge/jnlp/security/NotAllSignedWarningPane.java Mon Feb 28 14:30:39 2011 -0500 @@ -57,7 +57,7 @@ import net.sourceforge.jnlp.JNLPFile; public class NotAllSignedWarningPane extends SecurityDialogPanel { - public NotAllSignedWarningPane(SecurityWarningDialog x) { + public NotAllSignedWarningPane(SecurityDialog x) { super(x); addComponents(); } diff -r 02ef9ba4d8a2 -r 54077eaf4670 netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java --- a/netx/net/sourceforge/jnlp/security/PasswordAuthenticationDialog.java Fri Feb 25 18:16:48 2011 -0500 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 @@ -1,247 +0,0 @@ -/* PasswordAuthenticationDialog -- requests authentication information from users - Copyright (C) 2009 Red Hat - -This file is part of IcedTea. - -IcedTea is free software; you can redistribute it and/or modify -it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 2, or (at your option) -any later version. - -IcedTea is distributed in the hope that it will be useful, but -WITHOUT ANY WARRANTY; without even the implied warranty of -MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -General Public License for more details. - -You should have received a copy of the GNU General Public License -along with IcedTea; see the file COPYING. If not, write to the -Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA -02110-1301 USA. - -Linking this library statically or dynamically with other modules is -making a combined work based on this library. Thus, the terms and -conditions of the GNU General Public License cover the whole -combination. - -As a special exception, the copyright holders of this library give you -permission to link this library with independent modules to produce an -executable, regardless of the license terms of these independent -modules, and to copy and distribute the resulting executable under -terms of your choice, provided that you also meet, for each linked -independent module, the terms and conditions of the license of that -module. An independent module is a module which is not derived from -or based on this library. If you modify this library, you may extend -this exception to your version of the library, but you are not -obligated to do so. If you do not wish to do so, delete this -exception statement from your version. */ - -package net.sourceforge.jnlp.security; - -import java.awt.Dimension; -import java.awt.GridBagConstraints; -import java.awt.GridBagLayout; -import java.awt.Insets; -import java.awt.event.ActionEvent; -import java.awt.event.ActionListener; -import java.net.PasswordAuthentication; - -import javax.swing.JButton; -import javax.swing.JDialog; -import javax.swing.JLabel; -import javax.swing.JPasswordField; -import javax.swing.JTextField; -import javax.swing.SwingUtilities; - -import net.sourceforge.jnlp.runtime.JNLPRuntime; - -/** - * Modal non-minimizable dialog to request http authentication credentials - */ - -public class PasswordAuthenticationDialog extends JDialog { - - private JLabel jlInfo = new JLabel(""); - private JTextField jtfUserName = new JTextField(); - private JPasswordField jpfPassword = new JPasswordField(); - private boolean userCancelled; - - public PasswordAuthenticationDialog() { - initialize(); - } - - /** - * Initialized the dialog components - */ - - public void initialize() { - - setTitle("IcedTea Java Plugin - Authorization needed to proceed"); - - setLayout(new GridBagLayout()); - - JLabel jlUserName = new JLabel("Username: "); - JLabel jlPassword = new JLabel("Password: "); - JButton jbOK = new JButton("OK"); - JButton jbCancel = new JButton("Cancel"); - - jtfUserName.setSize(20, 10); - jpfPassword.setSize(20, 10); - - GridBagConstraints c; - - c = new GridBagConstraints(); - c.fill = c.HORIZONTAL; - c.gridx = 0; - c.gridy = 0; - c.gridwidth = 2; - c.insets = new Insets(10, 5, 3, 3); - add(jlInfo, c); - - c = new GridBagConstraints(); - c.gridx = 0; - c.gridy = 1; - c.insets = new Insets(10, 5, 3, 3); - add(jlUserName, c); - - c = new GridBagConstraints(); - c.fill = c.HORIZONTAL; - c.gridx = 1; - c.gridy = 1; - c.insets = new Insets(10, 5, 3, 3); - c.weightx = 1.0; - add(jtfUserName, c); - - c = new GridBagConstraints(); - c.gridx = 0; - c.gridy = 2; - c.insets = new Insets(5, 5, 3, 3); - add(jlPassword, c); - - c = new GridBagConstraints(); - c.fill = c.HORIZONTAL; - c.gridx = 1; - c.gridy = 2; - c.insets = new Insets(5, 5, 3, 3); - c.weightx = 1.0; - add(jpfPassword, c); - - c = new GridBagConstraints(); - c.anchor = c.SOUTHEAST; - c.gridx = 1; - c.gridy = 3; - c.insets = new Insets(5, 5, 3, 70); - c.weightx = 0.0; - add(jbCancel, c); - - c = new GridBagConstraints(); - c.anchor = c.SOUTHEAST; - c.gridx = 1; - c.gridy = 3; - c.insets = new Insets(5, 5, 3, 3); - c.weightx = 0.0; - add(jbOK, c); - - setMinimumSize(new Dimension(400, 150)); - setMaximumSize(new Dimension(1024, 150)); - setAlwaysOnTop(true); - - setSize(400, 150); - setLocationRelativeTo(null); - - // OK => read supplied info and pass it on - jbOK.addActionListener(new ActionListener() { - public void actionPerformed(ActionEvent e) { - userCancelled = false; - dispose(); - } - }); - - // Cancel => discard supplied info and pass on an empty auth From asu at redhat.com Mon Feb 28 11:35:23 2011 From: asu at redhat.com (Andrew Su) Date: Mon, 28 Feb 2011 14:35:23 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <20110228172744.GK7666@redhat.com> Message-ID: <1233689822.291397.1298921723133.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Deepak Bhole" > To: "Andrew Su" > Cc: "Deepak Bhole" , "IcedTea" > Sent: Monday, February 28, 2011 12:27:45 PM > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > * Andrew Su [2011-02-28 11:56]: > > > > > ... > > > > I meant that if the value entered is invalid it gets cleared. Of > > > > course this behaviour can be changed, but iirc it only does the > > > > check after the focus to the JFormattedTextField. > > > > > > > > > > Ah, but JFormattedTextField wouldn't allow invalid values in the > > > first > > > place, so there should be nothing to clear.. or am I missing > > > something? > > > > Here's what I did to test it: http://fpaste.org/Y4cy/ > > > > Steps: > > 1. Enter some non-numeric value. > > 2. Click button (to lose focus on text box). [Should get cleared] > > 3. Clear field then enter some digits. > > 4. Click button (to lose focus on text box). [Should have no > > change] > > 5. Add some non-digits to the field. > > 6. Click button (to lose focus on text box). [Should revert back > > to value at #4] > > 7. Remove all items in the field. > > 8. Click button (to lose focus on text box). [Reverts back to > > value at #4] > > > > --Andrew > > > > Ah, I see what you mean now. In that case, take a look at > MaskFormatter: > http://download.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html#maskformatter Ok, I tested MaskFormatter, which does check on input, but it seems to prepopulate the textfield with blank spaces. If the user clicks the end of text they can't input anything. and in the even that they don't enter the number of digits requested, it is deemed invalid and won't record that field. Similarly, when losing focus a check to see if it follow the format happens and then reverts back to last valid entry. The user could still enter 1 [right arrow] 2 [right arrow] etc, which of course will revert to last valid entry. Regards, Andrew > > Cheers, > Deepak From dbhole at redhat.com Mon Feb 28 11:48:23 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 14:48:23 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1233689822.291397.1298921723133.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <20110228172744.GK7666@redhat.com> <1233689822.291397.1298921723133.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <20110228194822.GE22018@redhat.com> * Andrew Su [2011-02-28 14:35]: > > > ----- Original Message ----- > > From: "Deepak Bhole" > > To: "Andrew Su" > > Cc: "Deepak Bhole" , "IcedTea" > > Sent: Monday, February 28, 2011 12:27:45 PM > > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > > * Andrew Su [2011-02-28 11:56]: > > > > > > > > ... > > > > > I meant that if the value entered is invalid it gets cleared. Of > > > > > course this behaviour can be changed, but iirc it only does the > > > > > check after the focus to the JFormattedTextField. > > > > > > > > > > > > > Ah, but JFormattedTextField wouldn't allow invalid values in the > > > > first > > > > place, so there should be nothing to clear.. or am I missing > > > > something? > > > > > > Here's what I did to test it: http://fpaste.org/Y4cy/ > > > > > > Steps: > > > 1. Enter some non-numeric value. > > > 2. Click button (to lose focus on text box). [Should get cleared] > > > 3. Clear field then enter some digits. > > > 4. Click button (to lose focus on text box). [Should have no > > > change] > > > 5. Add some non-digits to the field. > > > 6. Click button (to lose focus on text box). [Should revert back > > > to value at #4] > > > 7. Remove all items in the field. > > > 8. Click button (to lose focus on text box). [Reverts back to > > > value at #4] > > > > > > --Andrew > > > > > > > Ah, I see what you mean now. In that case, take a look at > > MaskFormatter: > > http://download.oracle.com/javase/tutorial/uiswing/components/formattedtextfield.html#maskformatter > > Ok, I tested MaskFormatter, which does check on input, but it seems to prepopulate the textfield with blank spaces. If the user clicks the end of text they can't input anything. and in the even that they don't enter the number of digits requested, it is deemed invalid and won't record that field. > Ah, that sucks. > Similarly, when losing focus a check to see if it follow the format happens and then reverts back to last valid entry. The user could still enter 1 [right arrow] 2 [right arrow] etc, which of course will revert to last valid entry. > Okay so then I guess since check-as-you-type is not possible. InputVerifier is probably the next best thing. You can make it show the user a dialog instead of silently changing the value back, so the user is more aware of the error.. Deepak > Regards, > Andrew > > > > > > Cheers, > > Deepak From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 12:48:41 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 20:48:41 +0000 Subject: [Bug 654] New: Problem using NetBeans 6.9.1 to do a Memory profile of Tomcat 6.0.18 Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=654 Summary: Problem using NetBeans 6.9.1 to do a Memory profile of Tomcat 6.0.18 Product: IcedTea Version: unspecified Platform: x86_64 OS/Version: Linux Status: NEW Severity: normal Priority: P5 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: jewing at integ.com Created an attachment (id=480) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=480) Generated error report I have been trying to use NetBeans 6.9.1 to do a Memory profile of our Tomcat 6.0.18 server. After the profiler starts, Tomcat quickly aborts, with the following text having been printed. An error report file is referenced below, which has been attached to this issue. Feb 28, 2011 5:31:19 PM org.apache.catalina.startup.Catalina start INFO: Server startup in 94047 ms Profiler Agent: Waiting for connection on port 5140 (Protocol version: 10) Profiler Agent: Established connection with the tool Profiler Agent: 250 classes cached. Profiler Agent: Local accelerated session Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. Profiler Agent: 250 classes cached. # # An unexpected error has been detected by Java Runtime Environment: # # SIGSEGV (0xb) at pc=0x00002aaaab0577d0, pid=31573, tid=1162164544 # # Java VM: OpenJDK 64-Bit Server VM (1.6.0-b09 mixed mode linux-amd64) # Problematic frame: # V [libjvm.so+0x5987d0] # # An error report file with more information is saved as: # /srv/liferay-portal-5.2.3/tomcat-6.0.18/bin/hs_err_pid31573.log # # If you would like to submit a bug report, please visit: # http://icedtea.classpath.org/bugzilla # Aborted -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 12:53:23 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 20:53:23 +0000 Subject: [Bug 87] Icedtea 1.7.0 and SwingWorker problem In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=87 Omair Majid changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |omajid at redhat.com Status|REOPENED |RESOLVED Resolution| |FIXED --- Comment #12 from Omair Majid 2011-02-28 20:53:23 --- http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/fc09152d5cf6 was reclassified as a security fix and applied to icedtea6 along with other security fixes: http://icedtea.classpath.org/hg/icedtea6/rev/420a4eede08d closing as FIXED. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From omajid at redhat.com Mon Feb 28 13:31:48 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 16:31:48 -0500 Subject: [icedtea-web] RFC: extend "itweb-settings reset" to accept "all" Message-ID: <4D6C1444.9010508@redhat.com> Hi, The attached patch makes "itweb-settings reset all" reset the entire configuration. Okay to commit? Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: add-reset-all.patch Type: text/x-patch Size: 1508 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/495c1c27/add-reset-all.patch From dlila at redhat.com Mon Feb 28 13:33:49 2011 From: dlila at redhat.com (Denis Lila) Date: Mon, 28 Feb 2011 16:33:49 -0500 (EST) Subject: [RFC][Icedtea-Web]: minor refactoring + dead code removal In-Reply-To: <2034148368.825922.1298926806682.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <739458127.826341.1298928829491.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. This makes PluginMain non-instantiable since none of its created instances were ever used. It also removes a couple of functions that were never called, and turns into local variables a few variables that were only used in one place. Ok to push? Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: pluginMainRefact.patch Type: text/x-patch Size: 3847 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/99b1ed41/pluginMainRefact.patch From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 13:36:16 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 21:36:16 +0000 Subject: [Bug 655] New: SIGBUS MappedByteBuffer.load Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=655 Summary: SIGBUS MappedByteBuffer.load Product: IcedTea Version: 6-1.7.5 Platform: unspecified OS/Version: All Status: NEW Severity: major Priority: P5 Component: IcedTea6 AssignedTo: unassigned at icedtea.classpath.org ReportedBy: scotth at onyxtop.com VM Crash happens randomly but on the same code. See attached log for details. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 13:36:58 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 21:36:58 +0000 Subject: [Bug 655] SIGBUS MappedByteBuffer.load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=655 --- Comment #1 from Scott Harmon 2011-02-28 21:36:58 --- Created an attachment (id=481) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=481) Error Log -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 13:38:04 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 21:38:04 +0000 Subject: [Bug 655] SIGBUS MappedByteBuffer.load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=655 --- Comment #2 from Scott Harmon 2011-02-28 21:38:03 --- Created an attachment (id=482) --> (http://icedtea.classpath.org/bugzilla/attachment.cgi?id=482) Another error log -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From omajid at redhat.com Mon Feb 28 13:38:26 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 16:38:26 -0500 Subject: [icedtea-web] RFC: fix typo in output of itweb-settings Message-ID: <4D6C15D2.4040309@redhat.com> Hi, The attached patch fixes a typo in itweb-settings. Instead of the property name, it was actually showing the property value: $ itweb-settings set unknown.property.name foo Unknown property-name "foo" It now correctly shows the property name: $ itweb-settings set unknown.property.name foo Unknown property-name "unknown.property.name" Okay to commit? As a side note: the set command is executed and a new property is created whether the property name is recognized or not. Cheers, Omair -------------- next part -------------- A non-text attachment was scrubbed... Name: typo-in-set-help.patch Type: text/x-patch Size: 545 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/b12e6606/typo-in-set-help.patch From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 13:44:22 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 21:44:22 +0000 Subject: [Bug 655] SIGBUS MappedByteBuffer.load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=655 --- Comment #3 from Scott Harmon 2011-02-28 21:44:22 --- Is it possibly related to this: http://bugs.sun.com/view_bug.do?bug_id=6934977 ? -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From dbhole at redhat.com Mon Feb 28 13:52:50 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 16:52:50 -0500 Subject: [RFC][Icedtea-Web]: minor refactoring + dead code removal In-Reply-To: <739458127.826341.1298928829491.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <2034148368.825922.1298926806682.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> <739458127.826341.1298928829491.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110228215249.GF22018@redhat.com> * Denis Lila [2011-02-28 16:35]: > Hi. > > This makes PluginMain non-instantiable since none of its > created instances were ever used. It also removes a couple > of functions that were never called, and turns into local > variables a few variables that were only used in one place. > > Ok to push? > Please post ChangeLog. See below for additional comments. > Thank you, > Denis. > diff -r 54077eaf4670 plugin/icedteanp/java/sun/applet/PluginMain.java > --- a/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 14:30:39 2011 -0500 > +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 16:23:07 2011 -0500 > @@ -85,14 +85,9 @@ > public static final String PLUGIN_STDERR_FILE = "java.stderr"; > public static final String PLUGIN_STDOUT_FILE = "java.stdout"; > > - final boolean redirectStreams = System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > - static PluginStreamHandler streamHandler; > - > // This is used in init(). Getting rid of this is desirable but depends > // on whether the property that uses it is necessary/standard. > - public static final String theVersion = System.getProperty("java.version"); > - > - private PluginAppletSecurityContext securityContext; > + private static final String theVersion = System.getProperty("java.version"); > > /** > * The main entry point into AppletViewer. > @@ -105,7 +100,24 @@ > } > > try { > - PluginMain pm = new PluginMain(args[0], args[1]); > + PluginStreamHandler streamHandler = connect(args[0], args[1]); > + boolean redirectStreams = System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > + > + // must be called before JNLPRuntime.initialize() > + JNLPRuntime.setRedirectStreams(redirectStreams); > + > + PluginAppletSecurityContext sc = new PluginAppletSecurityContext(0); > + sc.prePopulateLCClasses(); > + PluginAppletSecurityContext.setStreamhandler(streamHandler); > + AppletSecurityContextManager.addContext(0, sc); > + > + PluginAppletViewer.setStreamhandler(streamHandler); > + PluginAppletViewer.setPluginCallRequestFactory(new PluginCallRequestFactory()); > + > + init(); > + > + // Streams set. Start processing. > + streamHandler.startProcessing(); > } catch (Exception e) { > e.printStackTrace(); > System.err.println("Something very bad happened. I don't know what to do, so I am going to exit :("); > @@ -113,34 +125,19 @@ > } > } > > - public PluginMain(String inPipe, String outPipe) { > - > - connect(inPipe, outPipe); > - > - // must be called before JNLPRuntime.initialize() > - JNLPRuntime.setRedirectStreams(redirectStreams); > - > - securityContext = new PluginAppletSecurityContext(0); > - securityContext.prePopulateLCClasses(); > - securityContext.setStreamhandler(streamHandler); > - AppletSecurityContextManager.addContext(0, securityContext); > - > - PluginAppletViewer.setStreamhandler(streamHandler); > - PluginAppletViewer.setPluginCallRequestFactory(new PluginCallRequestFactory()); > - > - init(); > - > - // Streams set. Start processing. > - streamHandler.startProcessing(); > + private PluginMain() throws Exception { > + throw new Exception("The PluginMain constructor should never, EVER, be called"); > } > Indentation is off in the above. Also, Having a private constructor is enough. I don't think we need to make it throw an exception. Cheers, Deepak > - public void connect(String inPipe, String outPipe) { > + private static PluginStreamHandler connect(String inPipe, String outPipe) { > + PluginStreamHandler streamHandler = null; > try { > streamHandler = new PluginStreamHandler(new FileInputStream(inPipe), new FileOutputStream(outPipe)); > PluginDebug.debug("Streams initialized"); > } catch (IOException ioe) { > ioe.printStackTrace(); > } > + return streamHandler; > } > > private static void init() { > @@ -206,13 +203,4 @@ > CookieManager ckManager = new PluginCookieManager(); > CookieHandler.setDefault(ckManager); > } > - > - static boolean messageAvailable() { > - return streamHandler.messageAvailable(); > - } > - > - static String getMessage() { > - return streamHandler.getMessage(); > - } > - > } From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 13:51:24 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Mon, 28 Feb 2011 21:51:24 +0000 Subject: [Bug 655] SIGBUS MappedByteBuffer.load In-Reply-To: References: Message-ID: http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=655 Denis Lila changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |dlila at redhat.com --- Comment #4 from Denis Lila 2011-02-28 21:51:24 --- @Scott: That looks very likely, since we don't have that changeset in icedtea6 yet. We should probably backport it. Thanks for finding the sun bug. -- Configure bugmail: http://icedtea.classpath.org/bugzilla/userprefs.cgi?tab=email ------- You are receiving this mail because: ------- You are the assignee for the bug. From dbhole at redhat.com Mon Feb 28 13:54:40 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 16:54:40 -0500 Subject: [icedtea-web] RFC: extend "itweb-settings reset" to accept "all" In-Reply-To: <4D6C1444.9010508@redhat.com> References: <4D6C1444.9010508@redhat.com> Message-ID: <20110228215440.GG22018@redhat.com> * Omair Majid [2011-02-28 16:32]: > Hi, > > The attached patch makes "itweb-settings reset all" reset the entire > configuration. > > Okay to commit? > I think we should have a GUI button for reset all, rather than a command-line switch. If a GUI button already exists, we don't need a CL switch. Cheers, Deepak > Cheers, > Omair > diff -r 54077eaf4670 netx/net/sourceforge/jnlp/controlpanel/CommandLine.java > --- a/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java Mon Feb 28 14:30:39 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java Mon Feb 28 16:27:06 2011 -0500 > @@ -244,7 +244,7 @@ > */ > public void printResetHelp() { > System.out.println(R("Usage")); > - System.out.println(" " + PROGRAM_NAME + " reset property-name"); > + System.out.println(" " + PROGRAM_NAME + " reset [all|property-name]"); > System.out.println(R("CLResetDescription")); > } > > @@ -268,14 +268,26 @@ > > String key = args.get(0); > > + boolean resetAll = false; > + if (key.equals("all")) { > + resetAll = true; > + } > + > Map> all = config.getRaw(); > - if (!all.containsKey(key)) { > + if (!resetAll && !all.containsKey(key)) { > System.out.println(R("CLUnknownProperty", key)); > return ERROR; > } > > - Setting setting = all.get(key); > - setting.setValue(setting.getDefaultValue()); > + if (resetAll) { > + for (String aKey: all.keySet()) { > + Setting setting = all.get(aKey); > + setting.setValue(setting.getDefaultValue()); > + } > + } else { > + Setting setting = all.get(key); > + setting.setValue(setting.getDefaultValue()); > + } > > try { > config.save(); From omajid at redhat.com Mon Feb 28 14:11:12 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 17:11:12 -0500 Subject: [icedtea-web] RFC: extend "itweb-settings reset" to accept "all" In-Reply-To: <20110228215440.GG22018@redhat.com> References: <4D6C1444.9010508@redhat.com> <20110228215440.GG22018@redhat.com> Message-ID: <4D6C1D80.4010605@redhat.com> On 02/28/2011 04:54 PM, Deepak Bhole wrote: > * Omair Majid [2011-02-28 16:32]: >> Hi, >> >> The attached patch makes "itweb-settings reset all" reset the entire >> configuration. >> >> Okay to commit? >> > > I think we should have a GUI button for reset all, rather than a > command-line switch. If a GUI button already exists, we don't need a CL > switch. > This is just extending the existing command line (try "itweb-settings help" to see more info about it). Currently we have "itweb-settings reset " which resets just one property; this patch makes reset work with "all" instead of a property name too. I can certainly add something to the GUI, but that would be another patch. Cheers, Omair From dbhole at redhat.com Mon Feb 28 14:15:59 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 17:15:59 -0500 Subject: [icedtea-web] RFC: extend "itweb-settings reset" to accept "all" In-Reply-To: <4D6C1D80.4010605@redhat.com> References: <4D6C1444.9010508@redhat.com> <20110228215440.GG22018@redhat.com> <4D6C1D80.4010605@redhat.com> Message-ID: <20110228221557.GH22018@redhat.com> * Omair Majid [2011-02-28 17:11]: > On 02/28/2011 04:54 PM, Deepak Bhole wrote: > >* Omair Majid [2011-02-28 16:32]: > >>Hi, > >> > >>The attached patch makes "itweb-settings reset all" reset the entire > >>configuration. > >> > >>Okay to commit? > >> > > > >I think we should have a GUI button for reset all, rather than a > >command-line switch. If a GUI button already exists, we don't need a CL > >switch. > > > > This is just extending the existing command line (try > "itweb-settings help" to see more info about it). Currently we have > "itweb-settings reset " which resets just one > property; this patch makes reset work with "all" instead of a > property name too. > > I can certainly add something to the GUI, but that would be another patch. > Please do. Patch is okay for head. Cheers, Deepak > Cheers, > Omair From dlila at redhat.com Mon Feb 28 14:18:49 2011 From: dlila at redhat.com (Denis Lila) Date: Mon, 28 Feb 2011 17:18:49 -0500 (EST) Subject: [RFC][Icedtea-Web]: minor refactoring + dead code removal In-Reply-To: <20110228215249.GF22018@redhat.com> Message-ID: <382978728.827063.1298931529071.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Is it ok now? ChangeLog: +2011-02-28 Denis Lila + + * plugin/icedteanp/java/sun/applet/PluginMain.java + (redirectStreams, streamHandler, securityContext) make them local. + (theVersion): make it private. + (PluginMain): make it private. Empty the body. + (main): Do all the work that used to be in PluginMain. + (connect): make it static, and now it returns a PluginStreamHandler + instead of setting a static variable. + (messageAvailable, getMessage): Remove. + Thank you, Denis. ----- Original Message ----- > * Denis Lila [2011-02-28 16:35]: > > Hi. > > > > This makes PluginMain non-instantiable since none of its > > created instances were ever used. It also removes a couple > > of functions that were never called, and turns into local > > variables a few variables that were only used in one place. > > > > Ok to push? > > > > Please post ChangeLog. See below for additional comments. > > > Thank you, > > Denis. > > > diff -r 54077eaf4670 > > plugin/icedteanp/java/sun/applet/PluginMain.java > > --- a/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 > > 14:30:39 2011 -0500 > > +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 > > 16:23:07 2011 -0500 > > @@ -85,14 +85,9 @@ > > public static final String PLUGIN_STDERR_FILE = "java.stderr"; > > public static final String PLUGIN_STDOUT_FILE = "java.stdout"; > > > > - final boolean redirectStreams = > > System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > > - static PluginStreamHandler streamHandler; > > - > > // This is used in init(). Getting rid of this is desirable but > > depends > > // on whether the property that uses it is necessary/standard. > > - public static final String theVersion = > > System.getProperty("java.version"); > > - > > - private PluginAppletSecurityContext securityContext; > > + private static final String theVersion = > > System.getProperty("java.version"); > > > > /** > > * The main entry point into AppletViewer. > > @@ -105,7 +100,24 @@ > > } > > > > try { > > - PluginMain pm = new PluginMain(args[0], args[1]); > > + PluginStreamHandler streamHandler = connect(args[0], args[1]); > > + boolean redirectStreams = > > System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > > + > > + // must be called before JNLPRuntime.initialize() > > + JNLPRuntime.setRedirectStreams(redirectStreams); > > + > > + PluginAppletSecurityContext sc = new > > PluginAppletSecurityContext(0); > > + sc.prePopulateLCClasses(); > > + PluginAppletSecurityContext.setStreamhandler(streamHandler); > > + AppletSecurityContextManager.addContext(0, sc); > > + > > + PluginAppletViewer.setStreamhandler(streamHandler); > > + PluginAppletViewer.setPluginCallRequestFactory(new > > PluginCallRequestFactory()); > > + > > + init(); > > + > > + // Streams set. Start processing. > > + streamHandler.startProcessing(); > > } catch (Exception e) { > > e.printStackTrace(); > > System.err.println("Something very bad happened. I > > don't know what to do, so I am going to exit :("); > > @@ -113,34 +125,19 @@ > > } > > } > > > > - public PluginMain(String inPipe, String outPipe) { > > - > > - connect(inPipe, outPipe); > > - > > - // must be called before JNLPRuntime.initialize() > > - JNLPRuntime.setRedirectStreams(redirectStreams); > > - > > - securityContext = new PluginAppletSecurityContext(0); > > - securityContext.prePopulateLCClasses(); > > - securityContext.setStreamhandler(streamHandler); > > - AppletSecurityContextManager.addContext(0, securityContext); > > - > > - PluginAppletViewer.setStreamhandler(streamHandler); > > - PluginAppletViewer.setPluginCallRequestFactory(new > > PluginCallRequestFactory()); > > - > > - init(); > > - > > - // Streams set. Start processing. > > - streamHandler.startProcessing(); > > + private PluginMain() throws Exception { > > + throw new Exception("The PluginMain constructor should never, > > EVER, be called"); > > } > > > > Indentation is off in the above. > > Also, Having a private constructor is enough. I don't think we need to > make it throw an exception. > > Cheers, > Deepak > > > - public void connect(String inPipe, String outPipe) { > > + private static PluginStreamHandler connect(String inPipe, String > > outPipe) { > > + PluginStreamHandler streamHandler = null; > > try { > > streamHandler = new PluginStreamHandler(new > > FileInputStream(inPipe), new > > FileOutputStream(outPipe)); > > PluginDebug.debug("Streams initialized"); > > } catch (IOException ioe) { > > ioe.printStackTrace(); > > } > > + return streamHandler; > > } > > > > private static void init() { > > @@ -206,13 +203,4 @@ > > CookieManager ckManager = new PluginCookieManager(); > > CookieHandler.setDefault(ckManager); > > } > > - > > - static boolean messageAvailable() { > > - return streamHandler.messageAvailable(); > > - } > > - > > - static String getMessage() { > > - return streamHandler.getMessage(); > > - } > > - > > } -------------- next part -------------- A non-text attachment was scrubbed... Name: PluginMainRefact.patch Type: text/x-patch Size: 4535 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/4fdeb279/PluginMainRefact.patch From dbhole at redhat.com Mon Feb 28 14:27:26 2011 From: dbhole at redhat.com (Deepak Bhole) Date: Mon, 28 Feb 2011 17:27:26 -0500 Subject: [RFC][Icedtea-Web]: minor refactoring + dead code removal In-Reply-To: <382978728.827063.1298931529071.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <20110228215249.GF22018@redhat.com> <382978728.827063.1298931529071.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <20110228222726.GI22018@redhat.com> * Denis Lila [2011-02-28 17:18]: > Is it ok now? > > ChangeLog: > > +2011-02-28 Denis Lila > + > + * plugin/icedteanp/java/sun/applet/PluginMain.java > + (redirectStreams, streamHandler, securityContext) make them local. > + (theVersion): make it private. > + (PluginMain): make it private. Empty the body. > + (main): Do all the work that used to be in PluginMain. > + (connect): make it static, and now it returns a PluginStreamHandler > + instead of setting a static variable. > + (messageAvailable, getMessage): Remove. > + > Yep, looks good. Okay for head. Cheers, Deepak > Thank you, > Denis. > > ----- Original Message ----- > > * Denis Lila [2011-02-28 16:35]: > > > Hi. > > > > > > This makes PluginMain non-instantiable since none of its > > > created instances were ever used. It also removes a couple > > > of functions that were never called, and turns into local > > > variables a few variables that were only used in one place. > > > > > > Ok to push? > > > > > > > Please post ChangeLog. See below for additional comments. > > > > > Thank you, > > > Denis. > > > > > diff -r 54077eaf4670 > > > plugin/icedteanp/java/sun/applet/PluginMain.java > > > --- a/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 > > > 14:30:39 2011 -0500 > > > +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 > > > 16:23:07 2011 -0500 > > > @@ -85,14 +85,9 @@ > > > public static final String PLUGIN_STDERR_FILE = "java.stderr"; > > > public static final String PLUGIN_STDOUT_FILE = "java.stdout"; > > > > > > - final boolean redirectStreams = > > > System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > > > - static PluginStreamHandler streamHandler; > > > - > > > // This is used in init(). Getting rid of this is desirable but > > > depends > > > // on whether the property that uses it is necessary/standard. > > > - public static final String theVersion = > > > System.getProperty("java.version"); > > > - > > > - private PluginAppletSecurityContext securityContext; > > > + private static final String theVersion = > > > System.getProperty("java.version"); > > > > > > /** > > > * The main entry point into AppletViewer. > > > @@ -105,7 +100,24 @@ > > > } > > > > > > try { > > > - PluginMain pm = new PluginMain(args[0], args[1]); > > > + PluginStreamHandler streamHandler = connect(args[0], args[1]); > > > + boolean redirectStreams = > > > System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > > > + > > > + // must be called before JNLPRuntime.initialize() > > > + JNLPRuntime.setRedirectStreams(redirectStreams); > > > + > > > + PluginAppletSecurityContext sc = new > > > PluginAppletSecurityContext(0); > > > + sc.prePopulateLCClasses(); > > > + PluginAppletSecurityContext.setStreamhandler(streamHandler); > > > + AppletSecurityContextManager.addContext(0, sc); > > > + > > > + PluginAppletViewer.setStreamhandler(streamHandler); > > > + PluginAppletViewer.setPluginCallRequestFactory(new > > > PluginCallRequestFactory()); > > > + > > > + init(); > > > + > > > + // Streams set. Start processing. > > > + streamHandler.startProcessing(); > > > } catch (Exception e) { > > > e.printStackTrace(); > > > System.err.println("Something very bad happened. I > > > don't know what to do, so I am going to exit :("); > > > @@ -113,34 +125,19 @@ > > > } > > > } > > > > > > - public PluginMain(String inPipe, String outPipe) { > > > - > > > - connect(inPipe, outPipe); > > > - > > > - // must be called before JNLPRuntime.initialize() > > > - JNLPRuntime.setRedirectStreams(redirectStreams); > > > - > > > - securityContext = new PluginAppletSecurityContext(0); > > > - securityContext.prePopulateLCClasses(); > > > - securityContext.setStreamhandler(streamHandler); > > > - AppletSecurityContextManager.addContext(0, securityContext); > > > - > > > - PluginAppletViewer.setStreamhandler(streamHandler); > > > - PluginAppletViewer.setPluginCallRequestFactory(new > > > PluginCallRequestFactory()); > > > - > > > - init(); > > > - > > > - // Streams set. Start processing. > > > - streamHandler.startProcessing(); > > > + private PluginMain() throws Exception { > > > + throw new Exception("The PluginMain constructor should never, > > > EVER, be called"); > > > } > > > > > > > Indentation is off in the above. > > > > Also, Having a private constructor is enough. I don't think we need to > > make it throw an exception. > > > > Cheers, > > Deepak > > > > > - public void connect(String inPipe, String outPipe) { > > > + private static PluginStreamHandler connect(String inPipe, String > > > outPipe) { > > > + PluginStreamHandler streamHandler = null; > > > try { > > > streamHandler = new PluginStreamHandler(new > > > FileInputStream(inPipe), new > > > FileOutputStream(outPipe)); > > > PluginDebug.debug("Streams initialized"); > > > } catch (IOException ioe) { > > > ioe.printStackTrace(); > > > } > > > + return streamHandler; > > > } > > > > > > private static void init() { > > > @@ -206,13 +203,4 @@ > > > CookieManager ckManager = new PluginCookieManager(); > > > CookieHandler.setDefault(ckManager); > > > } > > > - > > > - static boolean messageAvailable() { > > > - return streamHandler.messageAvailable(); > > > - } > > > - > > > - static String getMessage() { > > > - return streamHandler.getMessage(); > > > - } > > > - > > > } > diff -r 54077eaf4670 ChangeLog > --- a/ChangeLog Mon Feb 28 14:30:39 2011 -0500 > +++ b/ChangeLog Mon Feb 28 17:21:13 2011 -0500 > @@ -1,3 +1,14 @@ > +2011-02-28 Denis Lila > + > + * plugin/icedteanp/java/sun/applet/PluginMain.java > + (redirectStreams, streamHandler, securityContext) make them local. > + (theVersion): make it private. > + (PluginMain): make it private. Empty the body. > + (main): Do all the work that used to be in PluginMain. > + (connect): make it static, and now it returns a PluginStreamHandler > + instead of setting a static variable. > + (messageAvailable, getMessage): Remove. > + > 2011-02-28 Omair Majid > > * netx/net/sourceforge/jnlp/resources/Messages.properties: Add Password, > diff -r 54077eaf4670 plugin/icedteanp/java/sun/applet/PluginMain.java > --- a/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 14:30:39 2011 -0500 > +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 17:21:13 2011 -0500 > @@ -85,14 +85,9 @@ > public static final String PLUGIN_STDERR_FILE = "java.stderr"; > public static final String PLUGIN_STDOUT_FILE = "java.stdout"; > > - final boolean redirectStreams = System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > - static PluginStreamHandler streamHandler; > - > // This is used in init(). Getting rid of this is desirable but depends > // on whether the property that uses it is necessary/standard. > - public static final String theVersion = System.getProperty("java.version"); > - > - private PluginAppletSecurityContext securityContext; > + private static final String theVersion = System.getProperty("java.version"); > > /** > * The main entry point into AppletViewer. > @@ -105,7 +100,24 @@ > } > > try { > - PluginMain pm = new PluginMain(args[0], args[1]); > + PluginStreamHandler streamHandler = connect(args[0], args[1]); > + boolean redirectStreams = System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); > + > + // must be called before JNLPRuntime.initialize() > + JNLPRuntime.setRedirectStreams(redirectStreams); > + > + PluginAppletSecurityContext sc = new PluginAppletSecurityContext(0); > + sc.prePopulateLCClasses(); > + PluginAppletSecurityContext.setStreamhandler(streamHandler); > + AppletSecurityContextManager.addContext(0, sc); > + > + PluginAppletViewer.setStreamhandler(streamHandler); > + PluginAppletViewer.setPluginCallRequestFactory(new PluginCallRequestFactory()); > + > + init(); > + > + // Streams set. Start processing. > + streamHandler.startProcessing(); > } catch (Exception e) { > e.printStackTrace(); > System.err.println("Something very bad happened. I don't know what to do, so I am going to exit :("); > @@ -113,34 +125,19 @@ > } > } > > - public PluginMain(String inPipe, String outPipe) { > - > - connect(inPipe, outPipe); > - > - // must be called before JNLPRuntime.initialize() > - JNLPRuntime.setRedirectStreams(redirectStreams); > - > - securityContext = new PluginAppletSecurityContext(0); > - securityContext.prePopulateLCClasses(); > - securityContext.setStreamhandler(streamHandler); > - AppletSecurityContextManager.addContext(0, securityContext); > - > - PluginAppletViewer.setStreamhandler(streamHandler); > - PluginAppletViewer.setPluginCallRequestFactory(new PluginCallRequestFactory()); > - > - init(); > - > - // Streams set. Start processing. > - streamHandler.startProcessing(); > + private PluginMain() { > + // The PluginMain constructor should never, EVER, be called > } > > - public void connect(String inPipe, String outPipe) { > + private static PluginStreamHandler connect(String inPipe, String outPipe) { > + PluginStreamHandler streamHandler = null; > try { > streamHandler = new PluginStreamHandler(new FileInputStream(inPipe), new FileOutputStream(outPipe)); > PluginDebug.debug("Streams initialized"); > } catch (IOException ioe) { > ioe.printStackTrace(); > } > + return streamHandler; > } > > private static void init() { > @@ -206,13 +203,4 @@ > CookieManager ckManager = new PluginCookieManager(); > CookieHandler.setDefault(ckManager); > } > - > - static boolean messageAvailable() { > - return streamHandler.messageAvailable(); > - } > - > - static String getMessage() { > - return streamHandler.getMessage(); > - } > - > } From dlila at icedtea.classpath.org Mon Feb 28 14:27:22 2011 From: dlila at icedtea.classpath.org (dlila at icedtea.classpath.org) Date: Mon, 28 Feb 2011 22:27:22 +0000 Subject: /hg/icedtea-web: minor refactoring + dead code removal Message-ID: changeset 26b24fb414ec in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=26b24fb414ec author: Denis Lila date: Mon Feb 28 17:30:40 2011 -0500 minor refactoring + dead code removal diffstat: 2 files changed, 7 insertions(+), 3 deletions(-) ChangeLog | 7 +++++++ plugin/icedteanp/java/sun/applet/PluginMain.java | 3 --- diffs (117 lines): diff -r 54077eaf4670 -r 26b24fb414ec ChangeLog --- a/ChangeLog Mon Feb 28 14:30:39 2011 -0500 +++ b/ChangeLog Mon Feb 28 17:30:40 2011 -0500 @@ -1,3 +1,14 @@ 2011-02-28 Omair Majid + + * plugin/icedteanp/java/sun/applet/PluginMain.java + (redirectStreams, streamHandler, securityContext) make them local. + (theVersion): make it private. + (PluginMain): make it private. Empty the body. + (main): Do all the work that used to be in PluginMain. + (connect): make it static, and now it returns a PluginStreamHandler + instead of setting a static variable. + (messageAvailable, getMessage): Remove. + 2011-02-28 Omair Majid * netx/net/sourceforge/jnlp/resources/Messages.properties: Add Password, diff -r 54077eaf4670 -r 26b24fb414ec plugin/icedteanp/java/sun/applet/PluginMain.java --- a/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 14:30:39 2011 -0500 +++ b/plugin/icedteanp/java/sun/applet/PluginMain.java Mon Feb 28 17:30:40 2011 -0500 @@ -85,14 +85,9 @@ public class PluginMain { public static final String PLUGIN_STDERR_FILE = "java.stderr"; public static final String PLUGIN_STDOUT_FILE = "java.stdout"; - final boolean redirectStreams = System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); - static PluginStreamHandler streamHandler; - // This is used in init(). Getting rid of this is desirable but depends // on whether the property that uses it is necessary/standard. - public static final String theVersion = System.getProperty("java.version"); - - private PluginAppletSecurityContext securityContext; + private static final String theVersion = System.getProperty("java.version"); /** * The main entry point into AppletViewer. @@ -105,7 +100,24 @@ public class PluginMain { } try { - PluginMain pm = new PluginMain(args[0], args[1]); + PluginStreamHandler streamHandler = connect(args[0], args[1]); + boolean redirectStreams = System.getenv().containsKey("ICEDTEAPLUGIN_DEBUG"); + + // must be called before JNLPRuntime.initialize() + JNLPRuntime.setRedirectStreams(redirectStreams); + + PluginAppletSecurityContext sc = new PluginAppletSecurityContext(0); + sc.prePopulateLCClasses(); + PluginAppletSecurityContext.setStreamhandler(streamHandler); + AppletSecurityContextManager.addContext(0, sc); + + PluginAppletViewer.setStreamhandler(streamHandler); + PluginAppletViewer.setPluginCallRequestFactory(new PluginCallRequestFactory()); + + init(); + + // Streams set. Start processing. + streamHandler.startProcessing(); } catch (Exception e) { e.printStackTrace(); System.err.println("Something very bad happened. I don't know what to do, so I am going to exit :("); @@ -113,34 +125,19 @@ public class PluginMain { } } - public PluginMain(String inPipe, String outPipe) { - - connect(inPipe, outPipe); - - // must be called before JNLPRuntime.initialize() - JNLPRuntime.setRedirectStreams(redirectStreams); - - securityContext = new PluginAppletSecurityContext(0); - securityContext.prePopulateLCClasses(); - securityContext.setStreamhandler(streamHandler); - AppletSecurityContextManager.addContext(0, securityContext); - - PluginAppletViewer.setStreamhandler(streamHandler); - PluginAppletViewer.setPluginCallRequestFactory(new PluginCallRequestFactory()); - - init(); - - // Streams set. Start processing. - streamHandler.startProcessing(); + private PluginMain() { + // The PluginMain constructor should never, EVER, be called } - public void connect(String inPipe, String outPipe) { + private static PluginStreamHandler connect(String inPipe, String outPipe) { + PluginStreamHandler streamHandler = null; try { streamHandler = new PluginStreamHandler(new FileInputStream(inPipe), new FileOutputStream(outPipe)); PluginDebug.debug("Streams initialized"); } catch (IOException ioe) { ioe.printStackTrace(); } + return streamHandler; } private static void init() { @@ -206,13 +203,4 @@ public class PluginMain { CookieManager ckManager = new PluginCookieManager(); CookieHandler.setDefault(ckManager); } - - static boolean messageAvailable() { - return streamHandler.messageAvailable(); - } - - static String getMessage() { - return streamHandler.getMessage(); - } - } From dlila at redhat.com Mon Feb 28 14:28:18 2011 From: dlila at redhat.com (Denis Lila) Date: Mon, 28 Feb 2011 17:28:18 -0500 (EST) Subject: [RFC][Icedtea-Web]: minor refactoring + dead code removal In-Reply-To: <20110228222726.GI22018@redhat.com> Message-ID: <1535480339.827220.1298932098117.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> > Yep, looks good. Okay for head. Thanks for the review, Denis. ----- Original Message ----- > * Denis Lila [2011-02-28 17:18]: > > Is it ok now? ... From omajid at icedtea.classpath.org Mon Feb 28 14:33:55 2011 From: omajid at icedtea.classpath.org (omajid at icedtea.classpath.org) Date: Mon, 28 Feb 2011 22:33:55 +0000 Subject: /hg/icedtea-web: Handle 'reset all' as an itweb-settings command Message-ID: changeset c4b91b61f88e in /hg/icedtea-web details: http://icedtea.classpath.org/hg/icedtea-web?cmd=changeset;node=c4b91b61f88e author: Omair Majid date: Mon Feb 28 17:29:31 2011 -0500 Handle 'reset all' as an itweb-settings command 2011-02-28 Omair Majid * netx/net/sourceforge/jnlp/controlpanel/CommandLine.java (printResetHelp): Indicate that "all" is a valid argument. (handleResetCommand): Deal with "all" instead of a property name by reseting all properties. diffstat: 1 file changed, 5 insertions(+) ChangeLog | 5 +++++ diffs (56 lines): diff -r 26b24fb414ec -r c4b91b61f88e ChangeLog --- a/ChangeLog Mon Feb 28 17:30:40 2011 -0500 +++ b/ChangeLog Mon Feb 28 17:29:31 2011 -0500 @@ -1,3 +1,10 @@ 2011-02-28 Denis Lila + + * netx/net/sourceforge/jnlp/controlpanel/CommandLine.java + (printResetHelp): Indicate that "all" is a valid argument. + (handleResetCommand): Deal with "all" instead of a property name by + reseting all properties. + 2011-02-28 Denis Lila * plugin/icedteanp/java/sun/applet/PluginMain.java diff -r 26b24fb414ec -r c4b91b61f88e netx/net/sourceforge/jnlp/controlpanel/CommandLine.java --- a/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java Mon Feb 28 17:30:40 2011 -0500 +++ b/netx/net/sourceforge/jnlp/controlpanel/CommandLine.java Mon Feb 28 17:29:31 2011 -0500 @@ -244,7 +244,7 @@ public class CommandLine { */ public void printResetHelp() { System.out.println(R("Usage")); - System.out.println(" " + PROGRAM_NAME + " reset property-name"); + System.out.println(" " + PROGRAM_NAME + " reset [all|property-name]"); System.out.println(R("CLResetDescription")); } @@ -268,14 +268,26 @@ public class CommandLine { String key = args.get(0); + boolean resetAll = false; + if (key.equals("all")) { + resetAll = true; + } + Map> all = config.getRaw(); - if (!all.containsKey(key)) { + if (!resetAll && !all.containsKey(key)) { System.out.println(R("CLUnknownProperty", key)); return ERROR; } - Setting setting = all.get(key); - setting.setValue(setting.getDefaultValue()); + if (resetAll) { + for (String aKey: all.keySet()) { + Setting setting = all.get(aKey); + setting.setValue(setting.getDefaultValue()); + } + } else { + Setting setting = all.get(key); + setting.setValue(setting.getDefaultValue()); + } try { config.save(); From asu at redhat.com Mon Feb 28 14:52:28 2011 From: asu at redhat.com (Andrew Su) Date: Mon, 28 Feb 2011 17:52:28 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <20110228194822.GE22018@redhat.com> Message-ID: <1732174622.302051.1298933548708.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Deepak Bhole" > To: "Andrew Su" > Cc: "IcedTea" > Sent: Monday, February 28, 2011 2:48:23 PM > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values --snip-- > > > > Ok, I tested MaskFormatter, which does check on input, but it seems > > to prepopulate the textfield with blank spaces. If the user clicks > > the end of text they can't input anything. and in the even that they > > don't enter the number of digits requested, it is deemed invalid and > > won't record that field. > > > > Ah, that sucks. > > > Similarly, when losing focus a check to see if it follow the format > > happens and then reverts back to last valid entry. The user could > > still enter 1 [right arrow] 2 [right arrow] etc, which of course > > will revert to last valid entry. > > > > Okay so then I guess since check-as-you-type is not possible. > > InputVerifier is probably the next best thing. You can make it show > the > user a dialog instead of silently changing the value back, so the user > is more aware of the error.. > Here is the updated version. I did not see the need to use InputVerifier for the advanced options in the network setting tab. Reason is because there was little to verify there which could be done at time of clicking "Ok". If I were to add it in there as well, there would be need to either make a subclass of InputVerifier to reduce redundant creation of anonymous classes (which was what you wanted to avoid[creating new class]). Comments question concerns about this patch? Cheers, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: 20110228_patch1_validate_port_text_fields.patch Type: text/x-patch Size: 6358 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/fafec29c/20110228_patch1_validate_port_text_fields.patch From dlila at redhat.com Mon Feb 28 15:07:43 2011 From: dlila at redhat.com (Denis Lila) Date: Mon, 28 Feb 2011 18:07:43 -0500 (EST) Subject: [RFC]: backport to fix PR655 In-Reply-To: <852283458.827682.1298934020420.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <1094153931.827786.1298934463491.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Hi. The attached patch would backport this changeset: http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/24741c4bf300 which fixes S6934977. PR655 seems to be a duplicate of that (but I don't have a reproducer for PR655 so I can't say for certain; however, looking at the 2 bug descriptions, there is little doubt). Ok to push? Thank you, Denis. -------------- next part -------------- A non-text attachment was scrubbed... Name: mappedBytebuffer.patch Type: text/x-patch Size: 14485 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/7328d4bf/mappedBytebuffer.patch From omajid at redhat.com Mon Feb 28 15:27:43 2011 From: omajid at redhat.com (Omair Majid) Date: Mon, 28 Feb 2011 18:27:43 -0500 Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <1732174622.302051.1298933548708.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> References: <1732174622.302051.1298933548708.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> Message-ID: <4D6C2F6F.5010309@redhat.com> On 02/28/2011 05:52 PM, Andrew Su wrote: > Here is the updated version. I did not see the need to use > InputVerifier for the advanced options in the network setting tab. > Reason is because there was little to verify there which could be > done at time of clicking "Ok". If I were to add it in there as well, > there would be need to either make a subclass of InputVerifier to > reduce redundant creation of anonymous classes (which was what you > wanted to avoid[creating new class]). > > Comments question concerns about this patch? > It would be really cool if we could indicate the invalid JTextFields (or other control) to the users. A few other comments in-line. > > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > --- a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java Sun Feb 27 21:48:17 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java Mon Feb 28 17:47:41 2011 -0500 > @@ -27,6 +27,7 @@ > import java.awt.event.ActionListener; > import java.awt.event.ItemEvent; > import java.awt.event.ItemListener; > +import java.text.ParseException; > import java.util.ArrayList; > import java.util.List; > > @@ -35,11 +36,14 @@ > import javax.swing.JCheckBox; > import javax.swing.JComponent; > import javax.swing.JDialog; > +import javax.swing.JFormattedTextField; > import javax.swing.JLabel; > +import javax.swing.JOptionPane; > import javax.swing.JPanel; > import javax.swing.JScrollPane; > import javax.swing.JTextArea; > import javax.swing.JTextField; > +import javax.swing.text.MaskFormatter; > Some of these imports look unused - I dont see any MaskFormatter or JFormattedTextField in this file. Please remove them. > import net.sourceforge.jnlp.config.DeploymentConfiguration; > import net.sourceforge.jnlp.runtime.Translator; > @@ -114,28 +118,28 @@ > // This addresses the HTTP proxy settings. > JLabel http = new JLabel(Translator.R("APSLabelHTTP") + ":"); > final JTextField httpAddressField = new JTextField(fields[0]); > - final JTextField httpPortField = new JTextField(fields[1]); > + JTextField httpPortField = new JTextField(fields[1]); > httpAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 0)); > httpPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 1)); > > // This addresses the HTTPS proxy settings. > JLabel secure = new JLabel(Translator.R("APSLabelSecure") + ":"); > final JTextField secureAddressField = new JTextField(fields[2]); > - final JTextField securePortField = new JTextField(fields[3]); > + JTextField securePortField = new JTextField(fields[3]); > secureAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 2)); > securePortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 3)); > > // This addresses the FTP proxy settings. > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + ":"); > final JTextField ftpAddressField = new JTextField(fields[4]); > - final JTextField ftpPortField = new JTextField(fields[5]); > + JTextField ftpPortField = new JTextField(fields[5]); > ftpAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 4)); > ftpPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 5)); > > // This addresses the Socks proxy settings. > JLabel socks = new JLabel(Translator.R("APSLabelSocks") + ":"); > final JTextField socksAddressField = new JTextField(fields[6]); > - final JTextField socksPortField = new JTextField(fields[7]); > + JTextField socksPortField = new JTextField(fields[7]); > socksAddressField.getDocument().addDocumentListener(new DocumentAdapter(fields, 6)); > socksPortField.getDocument().addDocumentListener(new DocumentAdapter(fields, 7)); > Is the only change here making some final variables non-final? Is there a need for this? > @@ -243,6 +247,17 @@ > okButton.addActionListener(new ActionListener() { > @Override > public void actionPerformed(ActionEvent e) { > + > + try { > + if (fields[1] != null) Integer.parseInt(fields[1]); > + if (fields[3] != null) Integer.parseInt(fields[3]); > + if (fields[5] != null) Integer.parseInt(fields[5]); > + if (fields[7] != null) Integer.parseInt(fields[7]); > + } catch (NumberFormatException nfe) { > + JOptionPane.showMessageDialog(null, Translator.R("CPInvalidPort2")); > + return; > + } > + I have a few concerns here. First, the magic constants: is there no other way to validate the values? Second, while you are checking that ports are valid integers, you may also want to check that they are valid port numbers. Port numbers are 16 bit integers, while Java Integers are 32 bit integers - so it is possible to have values which is okay'ed by this code but fails later on. > for (int i = 0; i< fields.length; i++) > config.setProperty(properties[i], fields[i]); > > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > --- a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Sun Feb 27 21:48:17 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java Mon Feb 28 17:47:41 2011 -0500 > @@ -33,9 +33,12 @@ > > import javax.swing.Box; > import javax.swing.ButtonGroup; > +import javax.swing.InputVerifier; > import javax.swing.JButton; > import javax.swing.JCheckBox; > +import javax.swing.JComponent; > import javax.swing.JLabel; > +import javax.swing.JOptionPane; > import javax.swing.JPanel; > import javax.swing.JRadioButton; > import javax.swing.JTextField; > @@ -114,6 +117,25 @@ > addressField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[1])); > > final JTextField portField = new JTextField(config.getProperty(properties[2]), 3); > + portField.setInputVerifier(new InputVerifier() { > + > + @Override > + public boolean verify(JComponent input) { > + JTextField jtf = (JTextField) input; > + > + try { > + String str = jtf.getText(); > + if (str != null&& str.trim().length()> 0) Integer.parseInt(str); > + return true; > + } catch (NumberFormatException nfe) { > + JOptionPane.showMessageDialog(null, Translator.R("CPInvalidPort1")); > + config.setProperty(properties[2], ""); Is setting the config property to "" intentional? > + } > + > + return false; > + } > + > + }); > portField.getDocument().addDocumentListener(new DocumentAdapter(config, properties[2])); > > // Create the button which allows setting of other types of proxy. > diff -r 4860276e9bf2 netx/net/sourceforge/jnlp/resources/Messages.properties > --- a/netx/net/sourceforge/jnlp/resources/Messages.properties Sun Feb 27 21:48:17 2011 -0500 > +++ b/netx/net/sourceforge/jnlp/resources/Messages.properties Mon Feb 28 17:47:41 2011 -0500 > @@ -391,7 +391,9 @@ > CVCPColName=Name > > # Control Panel - Misc. > -CPJRESupport=IcedTea-Web currently does not support the use of multiple JREs. > +CPJRESupport=IcedTea-Web currently does not support the use of multiple JREs. > +CPInvalidPort1=Port field entered for proxy is invalid. A port will not be specified in configuration. > +CPInvalidPort2=There is one or more invalid port value. > > # command line control panel > CLNoInfo=No information avaiable (is this a valid option?). Cheers, Omair From asu at redhat.com Mon Feb 28 16:00:13 2011 From: asu at redhat.com (Andrew Su) Date: Mon, 28 Feb 2011 19:00:13 -0500 (EST) Subject: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values In-Reply-To: <4D6C2F6F.5010309@redhat.com> Message-ID: <1734662973.302875.1298937613077.JavaMail.root@zmail01.collab.prod.int.phx2.redhat.com> ----- Original Message ----- > From: "Omair Majid" > To: "Andrew Su" > Cc: "Deepak Bhole" , "IcedTea" > Sent: Monday, February 28, 2011 6:27:43 PM > Subject: Re: [RFC][Icedtea-Web]: Ensure all ports entered are numeric values > On 02/28/2011 05:52 PM, Andrew Su wrote: > > Here is the updated version. I did not see the need to use > > InputVerifier for the advanced options in the network setting tab. > > Reason is because there was little to verify there which could be > > done at time of clicking "Ok". If I were to add it in there as well, > > there would be need to either make a subclass of InputVerifier to > > reduce redundant creation of anonymous classes (which was what you > > wanted to avoid[creating new class]). > > > > Comments question concerns about this patch? > > > > It would be really cool if we could indicate the invalid JTextFields > (or > other control) to the users. I had that implemented when testing it with InputVerifier, but didn't see that there be a need for it. It would seem a bit in consistant with the rest of the gui. Maybe add it as an enhancement later. :) > > A few other comments in-line. Most of those are residue from working in the same file for all the changes. > > > > > diff -r 4860276e9bf2 > > netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > --- > > a/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > Sun Feb 27 21:48:17 2011 -0500 > > +++ > > b/netx/net/sourceforge/jnlp/controlpanel/AdvancedProxySettingsPane.java > > Mon Feb 28 17:47:41 2011 -0500 > > @@ -27,6 +27,7 @@ > > import java.awt.event.ActionListener; > > import java.awt.event.ItemEvent; > > import java.awt.event.ItemListener; > > +import java.text.ParseException; > > import java.util.ArrayList; > > import java.util.List; > > > > @@ -35,11 +36,14 @@ > > import javax.swing.JCheckBox; > > import javax.swing.JComponent; > > import javax.swing.JDialog; > > +import javax.swing.JFormattedTextField; > > import javax.swing.JLabel; > > +import javax.swing.JOptionPane; > > import javax.swing.JPanel; > > import javax.swing.JScrollPane; > > import javax.swing.JTextArea; > > import javax.swing.JTextField; > > +import javax.swing.text.MaskFormatter; > > > > Some of these imports look unused - I dont see any MaskFormatter or > JFormattedTextField in this file. Please remove them. > > > import net.sourceforge.jnlp.config.DeploymentConfiguration; > > import net.sourceforge.jnlp.runtime.Translator; > > @@ -114,28 +118,28 @@ > > // This addresses the HTTP proxy settings. > > JLabel http = new JLabel(Translator.R("APSLabelHTTP") + > > ":"); > > final JTextField httpAddressField = new > > JTextField(fields[0]); > > - final JTextField httpPortField = new JTextField(fields[1]); > > + JTextField httpPortField = new JTextField(fields[1]); > > httpAddressField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 0)); > > httpPortField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 1)); > > > > // This addresses the HTTPS proxy settings. > > JLabel secure = new JLabel(Translator.R("APSLabelSecure") > > + ":"); > > final JTextField secureAddressField = new > > JTextField(fields[2]); > > - final JTextField securePortField = new JTextField(fields[3]); > > + JTextField securePortField = new JTextField(fields[3]); > > secureAddressField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 2)); > > securePortField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 3)); > > > > // This addresses the FTP proxy settings. > > JLabel ftp = new JLabel(Translator.R("APSLabelFTP") + > > ":"); > > final JTextField ftpAddressField = new > > JTextField(fields[4]); > > - final JTextField ftpPortField = new JTextField(fields[5]); > > + JTextField ftpPortField = new JTextField(fields[5]); > > ftpAddressField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 4)); > > ftpPortField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 5)); > > > > // This addresses the Socks proxy settings. > > JLabel socks = new JLabel(Translator.R("APSLabelSocks") + > > ":"); > > final JTextField socksAddressField = new > > JTextField(fields[6]); > > - final JTextField socksPortField = new JTextField(fields[7]); > > + JTextField socksPortField = new JTextField(fields[7]); > > socksAddressField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 6)); > > socksPortField.getDocument().addDocumentListener(new > > DocumentAdapter(fields, 7)); > > > > Is the only change here making some final variables non-final? Is > there > a need for this? > > > @@ -243,6 +247,17 @@ > > okButton.addActionListener(new ActionListener() { > > @Override > > public void actionPerformed(ActionEvent e) { > > + > > + try { > > + if (fields[1] != null) Integer.parseInt(fields[1]); > > + if (fields[3] != null) Integer.parseInt(fields[3]); > > + if (fields[5] != null) Integer.parseInt(fields[5]); > > + if (fields[7] != null) Integer.parseInt(fields[7]); > > + } catch (NumberFormatException nfe) { > > + JOptionPane.showMessageDialog(null, > > Translator.R("CPInvalidPort2")); > > + return; > > + } > > + > > I have a few concerns here. First, the magic constants: is there no > other way to validate the values? Second, while you are checking that > ports are valid integers, you may also want to check that they are > valid > port numbers. Port numbers are 16 bit integers, while Java Integers > are > 32 bit integers - so it is possible to have values which is okay'ed by > this code but fails later on. Not really, since the fields array is updated as the user inputs. (Unless I add the input verifier code to this too). Added a check to ensure that no value will be above 2^16-1 or below 0. > > > for (int i = 0; i< fields.length; i++) > > config.setProperty(properties[i], fields[i]); > > > > diff -r 4860276e9bf2 > > netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > --- > > a/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > Sun Feb 27 21:48:17 2011 -0500 > > +++ > > b/netx/net/sourceforge/jnlp/controlpanel/NetworkSettingsPanel.java > > Mon Feb 28 17:47:41 2011 -0500 > > @@ -33,9 +33,12 @@ > > > > import javax.swing.Box; > > import javax.swing.ButtonGroup; > > +import javax.swing.InputVerifier; > > import javax.swing.JButton; > > import javax.swing.JCheckBox; > > +import javax.swing.JComponent; > > import javax.swing.JLabel; > > +import javax.swing.JOptionPane; > > import javax.swing.JPanel; > > import javax.swing.JRadioButton; > > import javax.swing.JTextField; > > @@ -114,6 +117,25 @@ > > addressField.getDocument().addDocumentListener(new > > DocumentAdapter(config, properties[1])); > > > > final JTextField portField = new > > JTextField(config.getProperty(properties[2]), 3); > > + portField.setInputVerifier(new InputVerifier() { > > + > > + @Override > > + public boolean verify(JComponent input) { > > + JTextField jtf = (JTextField) input; > > + > > + try { > > + String str = jtf.getText(); > > + if (str != null&& str.trim().length()> 0) Integer.parseInt(str); > > + return true; > > + } catch (NumberFormatException nfe) { > > + JOptionPane.showMessageDialog(null, > > Translator.R("CPInvalidPort1")); > > + config.setProperty(properties[2], ""); > > Is setting the config property to "" intentional? It was suppose to be set to null, mistake. Cheers, Andrew -------------- next part -------------- A non-text attachment was scrubbed... Name: 20110228_patch1_validate_port_text_fields_v3.patch Type: text/x-patch Size: 4155 bytes Desc: not available Url : http://mail.openjdk.java.net/pipermail/distro-pkg-dev/attachments/20110228/f3c2e349/20110228_patch1_validate_port_text_fields_v3.patch From xerxes at zafena.se Mon Feb 28 16:54:09 2011 From: xerxes at zafena.se (=?UTF-8?B?WGVyeGVzIFLDpW5ieQ==?=) Date: Tue, 01 Mar 2011 01:54:09 +0100 Subject: [RFC]: backport to fix PR655 In-Reply-To: <1094153931.827786.1298934463491.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> References: <1094153931.827786.1298934463491.JavaMail.root@zmail04.collab.prod.int.phx2.redhat.com> Message-ID: <4D6C43B1.4000605@zafena.se> Hi! On 2011-03-01 00:07, Denis Lila wrote: > Hi. > > The attached patch would backport this changeset: > http://hg.openjdk.java.net/jdk7/jdk7/jdk/rev/24741c4bf300 > which fixes S6934977. PR655 seems to be a duplicate of that > (but I don't have a reproducer for PR655 so I can't say for > certain; however, looking at the 2 bug descriptions, there > is little doubt). I can reproduce this bug using the testcase at the end of: http://bugs.sun.com/view_bug.do?bug_id=6934977 But hmm.. the test still fail for me with this backport applied.. although in a different way. Do this backport need something that can handle the thrown InternalError Exception to work? With backport applied: java TruncateTest Creating test file...done Creating mapped buffer from test file...done Attempting to truncate the file...done Attempting to load mapped buffer... Exception in thread "main" java.lang.InternalError: a fault occurred in a recent unsafe memory access operation in compiled Java code at sun.nio.cs.UTF_8$Encoder.encodeArrayLoop(UTF_8.java:360) at sun.nio.cs.UTF_8$Encoder.encodeLoop(UTF_8.java:466) at java.nio.charset.CharsetEncoder.encode(CharsetEncoder.java:561) at sun.nio.cs.StreamEncoder.implWrite(StreamEncoder.java:270) at sun.nio.cs.StreamEncoder.write(StreamEncoder.java:124) at java.io.OutputStreamWriter.write(OutputStreamWriter.java:207) at java.io.BufferedWriter.flushBuffer(BufferedWriter.java:128) at java.io.PrintStream.write(PrintStream.java:493) at java.io.PrintStream.print(PrintStream.java:636) at java.io.PrintStream.println(PrintStream.java:773) at TruncateTest.main(TruncateTest.java:30) Unpatched without backport applied: java TruncateTest Creating test file...done Creating mapped buffer from test file...done Attempting to truncate the file...done Attempting to load mapped buffer... # # A fatal error has been detected by the Java Runtime Environment: # # SIGBUS (0x7) at pc=0x00007fccd4874f48, pid=17748, tid=140518804694800 # # JRE version: 6.0_20-b20 # Java VM: OpenJDK 64-Bit Server VM (19.0-b09 mixed mode linux-amd64 ) # Derivative: IcedTea6 1.9.2 # Distribution: Ubuntu 10.04.1 LTS, package 6b20-1.9.2-0ubuntu1~10.04.1 # Problematic frame: # C [libnio.so+0x4f48] Java_java_nio_MappedByteBuffer_load0+0x48 # # An error report file with more information is saved as: # /home/xranby/hs_err_pid17748.log # # If you would like to submit a bug report, please include # instructions how to reproduce the bug and visit: # https://bugs.launchpad.net/ubuntu/+source/openjdk-6/ # The crash happened outside the Java Virtual Machine in native code. # See problematic frame for where to report the bug. # Avbruten (SIGABRT) > > Ok to push? Since this fix only alter the return type of private JNI methods makes me think this are a suitable back-port to IcedTea6. Please verify that this fix passes the reproducer on your machine. > > Thank you, > Denis. Cheers, and have a great day! Xerxes From bugzilla-daemon at icedtea.classpath.org Mon Feb 28 22:25:08 2011 From: bugzilla-daemon at icedtea.classpath.org (bugzilla-daemon at icedtea.classpath.org) Date: Tue, 01 Mar 2011 06:25:08 +0000 Subject: Your Bugzilla buglist needs attention. Message-ID: [This e-mail has been automatically generated.] You have one or more bugs assigned to you in the Bugzilla bug tracking system (http://icedtea.classpath.org/bugzilla/) that require attention. All of these bugs are in the NEW or REOPENED state, and have not been touched in 7 days or more. You need to take a look at them, and decide on an initial action. Generally, this means one of three things: (1) You decide this bug is really quick to deal with (like, it's INVALID), and so you get rid of it immediately. (2) You decide the bug doesn't belong to you, and you reassign it to someone else. (Hint: if you don't know who to reassign it to, make sure that the Component field seems reasonable, and then use the "Reassign bug to default assignee of selected component" option.) (3) You decide the bug belongs to you, but you can't solve it this moment. Just use the "Accept bug" command. To get a list of all NEW/REOPENED bugs, you can use this URL (bookmark it if you like!): http://icedtea.classpath.org/bugzilla/buglist.cgi?bug_status=NEW&bug_status=REOPENED&assigned_to=unassigned at icedtea.classpath.org Or, you can use the general query page, at http://icedtea.classpath.org/bugzilla/query.cgi Appended below are the individual URLs to get to all of your NEW bugs that haven't been touched for a week or more. You will get this message once a day until you've dealt with these bugs! org.omg.CORBA tests fail due to ORB class not implemented -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=17 Double.toString(string) expands value -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=32 SIGSEGV in 64 bit JDK 1.6 when using JNI, and both library and Java app are threaded -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=276 regressions in jdk testsuite with new hotspot -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=288 JVM fatal error in VM code (HS 14) after NetworkManager disable / reenable cycle -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=293 eclipse crashes if I try to configure PyDev plugin -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=305 run scilab 5.1 demos at openSUSE11.1 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=308 unexpected error -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=316 allow specifying explicit target arch -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=334 hotspot produces/executes incorrect code (works with cacao and zero) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=352 setPreferedSize without layout manager works on Sun. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=362 SIGBUS error at [libzip.so+0x40d1] -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=363 IntelliJ IDEA crashes due to SIGSEGV in libjvm.so+0x4760e6 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=365 Eclipse repeatedly crashes after changing C++ Project Properties -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=368 firefox with openjdk-plugin hangs whenever jmol app is used -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=395 SIGSEGV (0xb) around pango_layout_new+0x2a -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=396 SIGSEGV: JavaThread "Java2D Disposer" crashes JVM -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=408 similar error observed here -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=409 Applet cannot load j2pkcs11 library -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=411 Crash with ibus and JOSM -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=413 JVM Crash (SIGSEGV) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=418 Iced tea openjdk1.6 and jdk1.7 crashes in remote x server (cygwin) environment -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=423 Error: guarantee(get_thread_slow() == thread,"must be the same thread, slowly") -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=424 unable to compile icedtea-6.1.7: interpreter segfault in java.lang.Thread. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=435 YaCy crashed with SIGSEGV -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=437 Build fails on 64-bit systems due to upstream XPCOM bug -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=439 Iceweasel freezes and is unresponsive -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=443 Java VM: OpenJDK 64-Bit Server VM (1.6.0_0-b11 mixed mode linux-amd64) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=447 cacao fails to load icedtea plugin because ManagementFactory is broken on cacao VM -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=448 SIGSEGV while running jna test cases in ld-linux -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=452 shark test crashes on powerpc -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=456 building shark with shark fails on powerpc -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=467 Eclipse Galileo CDT crashes for SIGSEGV after saving a c++ file on CentOS 5.4 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=468 SIGSEGV memcpy -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=470 debugging using eclipse -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=471 Fatal error when running tests in Eclipse -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=478 Zero fails openjdk/jdk/test/java/lang/Rint -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=482 OpenOffice crashes due to a JRE fatal error -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=490 Eclipse crash due to error in Java Runtime Environment -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=499 OpenJDK SIGSEGV [libjvm.so+0x1c1937] -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=501 Uniform scalings broken when drawing dashed lines. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=504 Jagged round endcaps when drawing scaled up lines. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=506 Antialiased horizontal or vertical lines are not drawn properly. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=509 System.load on applet hang the second time -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=510 chromium constantly crash when IcedTea is installed on opensuse -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=511 shark build failure on ARM using thumb toolchain -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=514 Crash when running mkgmap -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=523 OpenOffice crash -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=524 Bad variable in hotspot.method_entry|exit probes from hotspot.stp -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=527 OpenJDK Shark VM warning: there may be trouble ahead -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=529 Shark running DaCapo 9.12 eclipse triggers Unimplemented in sharkTopLevelBlock.cpp:1180 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=530 install thinkingrock 3.1.2 start get erroe and crash -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=531 compilation of icedtea-6-1.8.1 fails on test_gamma -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=533 zero doesn't work on sparc linux -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=534 DaCapo 9.12 eclipse triggers Error: guarantee(cont_offset != 0,"unhandled implicit exception in compiled code") -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=536 I am open a tuxguitar and icedtea6 is crash -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=537 when jconsole try to connect remote target, target JVM down -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=540 shark fails to build on icedtea7 trunk 20100907 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=544 eclipse 3.5 - 4.0 crash on startup when using icedtea with cacao -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=545 Error: Deadlock in safepoint code. -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=548 icedtea6-1.9 compile failure with --enable-zero --enable-shark on ppc64 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=551 shark + hs19 crashes in building docs -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=559 Building failed -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=560 javac error -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=561 NetX depends on sun.misc.BASE64Encoder -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=564 gerrit crash - problem points to jdk -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=566 NetX depends on sun.applet.AppletViewPanel -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=570 NetX depends on com.sun.net.ssl.internal.ssl.X509ExtendedTrustManager.java -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=571 icedtea and keepvid.com -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=577 shark using llvm-2.8 fails to build on newer x86_64 hardware -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=581 ARM Zero c++ interpreter freecol crash using -Xincgc -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=584 icedtea6/1.8.2-3 on Maemo5 PR1.3: TV-Browser app crashes -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=589 Unable to build openjdk/icedtea on Slack 13.1 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=591 OpenJDK crashes on debian sqeeze (64 bit) -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=594 ExceptionInInitializerError/AccessControlException in AppletAudioClip.play() -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=595 Tomcat crashes on tomcat stop -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=598 JRE failure with CollabNetSubversionEdge-1.3.0_linux-x86.tar.gz -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=601 [regression] backport of S6638712 lets the eucalyptus build fail -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=607 zero fails to build on icedtea7 trunk 20101210 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=608 Changing the Look and feel crashes the jvm -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=609 SIGSEGV (0xb) at pc=0xb70254c7, pid=7087, tid=2339584880 -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=610 Minecraft -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=611 Virtual Machine Crashes while using GMOTE -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=617 JVM crashes with Tomcat -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=624 SIGSEGV in GCTaskThread -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=627 "make check" succeeds even if tests failed -> http://icedtea.classpath.org/bugzilla/show_bug.cgi?id=637