summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorWilliam Thomson <wltjr@gentoo.org>2007-05-15 04:37:21 +0000
committerWilliam Thomson <wltjr@gentoo.org>2007-05-15 04:37:21 +0000
commite32a4ce7f1d8b8c6c6a455bfeacdb6ab2783f39e (patch)
tree2a2978b4a5089a3caedf9becafdac6c558ad9986 /www-servers/tomcat
parentStable for HPPA (bug #178359). (diff)
downloadhistorical-e32a4ce7f1d8b8c6c6a455bfeacdb6ab2783f39e.tar.gz
historical-e32a4ce7f1d8b8c6c6a455bfeacdb6ab2783f39e.tar.bz2
historical-e32a4ce7f1d8b8c6c6a455bfeacdb6ab2783f39e.zip
Fixes for bugs # 174498, 175393, 176097, 176701, & 176796
Package-Manager: portage-2.1.2.7
Diffstat (limited to 'www-servers/tomcat')
-rw-r--r--www-servers/tomcat/ChangeLog11
-rw-r--r--www-servers/tomcat/Manifest71
-rw-r--r--www-servers/tomcat/files/5.5/catalina.policy261
-rw-r--r--www-servers/tomcat/files/5.5/tomcat.conf.277
-rwxr-xr-xwww-servers/tomcat/files/5.5/tomcat.init.294
-rw-r--r--www-servers/tomcat/files/6/catalina.policy163
-rw-r--r--www-servers/tomcat/files/6/tomcat.conf8
-rwxr-xr-xwww-servers/tomcat/files/6/tomcat.init33
-rw-r--r--www-servers/tomcat/files/digest-tomcat-5.5.23-r23
-rw-r--r--www-servers/tomcat/files/digest-tomcat-6.0.10-r5 (renamed from www-servers/tomcat/files/digest-tomcat-6.0.10-r4)0
-rw-r--r--www-servers/tomcat/tomcat-5.5.23-r2.ebuild336
-rw-r--r--www-servers/tomcat/tomcat-6.0.10-r5.ebuild (renamed from www-servers/tomcat/tomcat-6.0.10-r4.ebuild)8
12 files changed, 1016 insertions, 49 deletions
diff --git a/www-servers/tomcat/ChangeLog b/www-servers/tomcat/ChangeLog
index f9bb2b376178..17eadf0a2bd0 100644
--- a/www-servers/tomcat/ChangeLog
+++ b/www-servers/tomcat/ChangeLog
@@ -1,6 +1,15 @@
# ChangeLog for www-servers/tomcat
# Copyright 1999-2007 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.137 2007/04/29 13:06:31 betelgeuse Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.138 2007/05/15 04:37:21 wltjr Exp $
+
+*tomcat-6.0.10-r5 (09 May 2007)
+*tomcat-5.5.23-r2 (09 May 2007)
+
+ 09 May 2007; William L. Thomson Jr. <wltjr@gentoo.org>
+ +files/5.5/tomcat.init.2, files/6/tomcat.conf, +files/5.5/tomcat.conf.2,
+ files/6/tomcat.init, +tomcat-5.5.23-r2.ebuild, -tomcat-6.0.10-r4.ebuild,
+ +tomcat-6.0.10-r5.ebuild:
+ Fixes for bugs # 174498, 175393, 176097, 176701, & 176796
29 Apr 2007; Petteri Räty <betelgeuse@gentoo.org>
tomcat-5.5.23-r1.ebuild:
diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest
index 0b85347fc3d7..831c3a0631b1 100644
--- a/www-servers/tomcat/Manifest
+++ b/www-servers/tomcat/Manifest
@@ -1,6 +1,7 @@
------BEGIN PGP SIGNED MESSAGE-----
-Hash: SHA1
-
+AUX 5.5/catalina.policy 10897 RMD160 d6accc56803b132d0e82e163cc583464c38248ef SHA1 585f80e24cad7e5927f8c2c6ad03f668eb904cc1 SHA256 8188db94772eb00d44b28cb9b40e9ccf30803acf576c0af1be5844ebd35d763c
+MD5 993e3718a15ef29f63779e56e15a1638 files/5.5/catalina.policy 10897
+RMD160 d6accc56803b132d0e82e163cc583464c38248ef files/5.5/catalina.policy 10897
+SHA256 8188db94772eb00d44b28cb9b40e9ccf30803acf576c0af1be5844ebd35d763c files/5.5/catalina.policy 10897
AUX 5.5/catalina_build_xml.patch 1149 RMD160 9622ca4f688e2c57e4bc34f08ceebb651f75deb1 SHA1 8eda11132851da5773ceb33f90515f0c8ffabdb6 SHA256 dc2d7255dd990359f765f329a04825aca18888e505b4024bb64e0dc6e348498e
MD5 4b2dbaa2a74776229f4fffa1274d0a13 files/5.5/catalina_build_xml.patch 1149
RMD160 9622ca4f688e2c57e4bc34f08ceebb651f75deb1 files/5.5/catalina_build_xml.patch 1149
@@ -25,10 +26,18 @@ AUX 5.5/tomcat.conf 2686 RMD160 37658c50dfc468fd446327e22db290aec2160403 SHA1 6e
MD5 e466bcc62d074cc60b2d0e508da5a0d7 files/5.5/tomcat.conf 2686
RMD160 37658c50dfc468fd446327e22db290aec2160403 files/5.5/tomcat.conf 2686
SHA256 d95cbcfc5e23911755b11807868e64622e1e0c5b473d77db7ff758aa999a5f6c files/5.5/tomcat.conf 2686
+AUX 5.5/tomcat.conf.2 2779 RMD160 bfbc38408d9f78c8a75962f7ccb54338080bedea SHA1 a08e5906db3e110f1992570e3813eefe53660716 SHA256 cd975e26d76482f338fc9f3ff39ddf933171bf1ce7b1f4a2b446ed8727ef306a
+MD5 36bc5deec110ccc04307d6dc2500a0df files/5.5/tomcat.conf.2 2779
+RMD160 bfbc38408d9f78c8a75962f7ccb54338080bedea files/5.5/tomcat.conf.2 2779
+SHA256 cd975e26d76482f338fc9f3ff39ddf933171bf1ce7b1f4a2b446ed8727ef306a files/5.5/tomcat.conf.2 2779
AUX 5.5/tomcat.init 3376 RMD160 bde20b2d738174fda5792531037b36ed27db8280 SHA1 5f3986a35e3046ffd81b839780f81322210fe879 SHA256 421ca1e7e4ab413e30ea708b0cacad398d472b857425b0d7a2963a4a4ce99e62
MD5 19e200c22e63a7ce3b20ca5f6ba35eb4 files/5.5/tomcat.init 3376
RMD160 bde20b2d738174fda5792531037b36ed27db8280 files/5.5/tomcat.init 3376
SHA256 421ca1e7e4ab413e30ea708b0cacad398d472b857425b0d7a2963a4a4ce99e62 files/5.5/tomcat.init 3376
+AUX 5.5/tomcat.init.2 3403 RMD160 64076d86ba1d62e5bf09d017994d48307b760037 SHA1 7b7bc211cc13d9b78f2ef9bc41ff11359a86ced6 SHA256 4863693e4ee4c5eac032e59181b34e45ca94c68f8695de2a8309eeb0be8c3a58
+MD5 cbe49face784d2997633f3c8a5fa7477 files/5.5/tomcat.init.2 3403
+RMD160 64076d86ba1d62e5bf09d017994d48307b760037 files/5.5/tomcat.init.2 3403
+SHA256 4863693e4ee4c5eac032e59181b34e45ca94c68f8695de2a8309eeb0be8c3a58 files/5.5/tomcat.init.2 3403
AUX 5.5/tomcat_build_xml.patch 13828 RMD160 3add8fb7d26bef7df205d3ec43e1a55cd6b739d4 SHA1 3a8ae3d686046f1938c71bd790d6f9ecf4339556 SHA256 9b1b9feb18d6f1dc5c2226c195f88a2f6cb9d68a2144e47e883fb57790c281f9
MD5 47210f9a3e6b7c1809b34cfdab7fdb9b files/5.5/tomcat_build_xml.patch 13828
RMD160 3add8fb7d26bef7df205d3ec43e1a55cd6b739d4 files/5.5/tomcat_build_xml.patch 13828
@@ -37,28 +46,36 @@ AUX 6/build-xml.patch 2611 RMD160 639b3f080dc47f799bf029c36e082c2c1976fd9d SHA1
MD5 8533b95643881c578f24e30098d3d178 files/6/build-xml.patch 2611
RMD160 639b3f080dc47f799bf029c36e082c2c1976fd9d files/6/build-xml.patch 2611
SHA256 7bf3bf095504f1063d5d282643ee2b61bc6bd6b4f32f80906484af53757e02c6 files/6/build-xml.patch 2611
-AUX 6/tomcat.conf 2651 RMD160 f24439b4e260681e9d136e8eb583a43351617afb SHA1 461d8618e98e8b32787a434e4456a8f5a1010d0e SHA256 aaa297f37e83c92f1d7a4a521bbfa970bf896b23e42dd40db8400d11b4ce714a
-MD5 beac076f68ce869066df90b1e3d770f0 files/6/tomcat.conf 2651
-RMD160 f24439b4e260681e9d136e8eb583a43351617afb files/6/tomcat.conf 2651
-SHA256 aaa297f37e83c92f1d7a4a521bbfa970bf896b23e42dd40db8400d11b4ce714a files/6/tomcat.conf 2651
-AUX 6/tomcat.init 3350 RMD160 1fb76aaed26e38112f504bff67c004626af13d36 SHA1 4deda11928f4e6c98368196e4b8eda7c4f908b49 SHA256 a401131da25f7855c6123143bf0e17e3b8df138b0e5fdfdf2dc32e79f51f57b8
-MD5 d7821e761f9d5c7388373648d189bd99 files/6/tomcat.init 3350
-RMD160 1fb76aaed26e38112f504bff67c004626af13d36 files/6/tomcat.init 3350
-SHA256 a401131da25f7855c6123143bf0e17e3b8df138b0e5fdfdf2dc32e79f51f57b8 files/6/tomcat.init 3350
+AUX 6/catalina.policy 6956 RMD160 957ad3b5dc4aeaa5acd289cdaada0a2e48974d52 SHA1 13b65455c8f52fff9d1b09ea67e93ec7a88f1a47 SHA256 9399efda3f6cfc238fb783fb338060e67aff15d0044b31c3d0265e1f9e5769e5
+MD5 379187530127260974bdf88624d22d2e files/6/catalina.policy 6956
+RMD160 957ad3b5dc4aeaa5acd289cdaada0a2e48974d52 files/6/catalina.policy 6956
+SHA256 9399efda3f6cfc238fb783fb338060e67aff15d0044b31c3d0265e1f9e5769e5 files/6/catalina.policy 6956
+AUX 6/tomcat.conf 2742 RMD160 c96fda0f18942b8bffa583f08a82cea1b70430d4 SHA1 4c36744b2e7f29c2f5b8091885a79bb0ce30c7a3 SHA256 bf8a205c477605ea88a7fa1a8d9535edc0a1e1cc4d4b92e0be09e950075474a6
+MD5 fde3c467493c7a29b54eedce3d57ff94 files/6/tomcat.conf 2742
+RMD160 c96fda0f18942b8bffa583f08a82cea1b70430d4 files/6/tomcat.conf 2742
+SHA256 bf8a205c477605ea88a7fa1a8d9535edc0a1e1cc4d4b92e0be09e950075474a6 files/6/tomcat.conf 2742
+AUX 6/tomcat.init 3371 RMD160 9da620b4b2398d1ab5319157daa4a48944e3ca2d SHA1 08957911a0d5ea259978f665830e5deaa1662cac SHA256 04db1a2d8f542a19f3e5ea36ef579e6baaed3e3b14e4dcd61da79ae2099ecb9e
+MD5 c8787eb6ff01c8f58412f5f2129e61c2 files/6/tomcat.init 3371
+RMD160 9da620b4b2398d1ab5319157daa4a48944e3ca2d files/6/tomcat.init 3371
+SHA256 04db1a2d8f542a19f3e5ea36ef579e6baaed3e3b14e4dcd61da79ae2099ecb9e files/6/tomcat.init 3371
DIST apache-tomcat-5.5.23-src.tar.gz 4895919 RMD160 fe669f6b864fd7dcf4ad74dad22a0256e5417005 SHA1 59272b5eedde9c32a126679ff9e1d2a5f56265c8 SHA256 e2f7ce250643349507b511a5ea96df7364030a061a8f4d5b71d8b5a099e2b6bd
DIST apache-tomcat-6.0.10-src.tar.gz 3221070 RMD160 64762f16606645c6ef507906f2eb8eeb102173bb SHA1 4ec1acda174ab19082c4900c293d8bc7f9544a69 SHA256 54ae6b89a3ac3e3e33a580708403ca4ea0a449f287b91e6246bb6a6550e39199
EBUILD tomcat-5.5.23-r1.ebuild 10630 RMD160 a164f36224fb766d6f10092d84b953dc5930b5a0 SHA1 d731665a2123e5d73952c48dce272e94334bbd4e SHA256 97454d3a2e93b87c86d52b29b075842e6e80d77b948e777fac7b9db4d8a7ca2b
MD5 ddc708762bdbc5648c2bbd2363e8996d tomcat-5.5.23-r1.ebuild 10630
RMD160 a164f36224fb766d6f10092d84b953dc5930b5a0 tomcat-5.5.23-r1.ebuild 10630
SHA256 97454d3a2e93b87c86d52b29b075842e6e80d77b948e777fac7b9db4d8a7ca2b tomcat-5.5.23-r1.ebuild 10630
-EBUILD tomcat-6.0.10-r4.ebuild 5510 RMD160 0cb80c1315fe43650232e3166265026f481d5f9a SHA1 b1147f67215491bfdaf3657c1dc2261796eea759 SHA256 8d66e39ff8096386a8847caf1e789586d3bceba183e90683b86afa8194e09a55
-MD5 d787c758a58cda5825213c76ad0748d4 tomcat-6.0.10-r4.ebuild 5510
-RMD160 0cb80c1315fe43650232e3166265026f481d5f9a tomcat-6.0.10-r4.ebuild 5510
-SHA256 8d66e39ff8096386a8847caf1e789586d3bceba183e90683b86afa8194e09a55 tomcat-6.0.10-r4.ebuild 5510
-MISC ChangeLog 44217 RMD160 7547a8c125ad4b7436f19c6ca3647ab79a62e40c SHA1 e4cb9d42b86db269dccc6612f49d819c36b710ba SHA256 143892d2021fb83000b9b486261269a4d88b20718ee1988cf1faecd0fe19fdac
-MD5 13ef18c3bc65e6ea8a273796256360d0 ChangeLog 44217
-RMD160 7547a8c125ad4b7436f19c6ca3647ab79a62e40c ChangeLog 44217
-SHA256 143892d2021fb83000b9b486261269a4d88b20718ee1988cf1faecd0fe19fdac ChangeLog 44217
+EBUILD tomcat-5.5.23-r2.ebuild 10900 RMD160 e45b52fd95e15716f9065f96d140fe3ffa344c2a SHA1 4fc30c9e8844f0f6928e5b093e0618a27df659e6 SHA256 02f9e36e0e7da42eefc5f49ac027a994a02b7f6172d16b29d3953661d915711c
+MD5 351096c6975a777f81f7d3d8c01c8701 tomcat-5.5.23-r2.ebuild 10900
+RMD160 e45b52fd95e15716f9065f96d140fe3ffa344c2a tomcat-5.5.23-r2.ebuild 10900
+SHA256 02f9e36e0e7da42eefc5f49ac027a994a02b7f6172d16b29d3953661d915711c tomcat-5.5.23-r2.ebuild 10900
+EBUILD tomcat-6.0.10-r5.ebuild 5758 RMD160 65caa9eca6d20edcdd89939a7f677d4d3692e2e3 SHA1 a77d7d5faff456de3e57c2e66fc22f7685bc5e28 SHA256 ca1ba13ec634bb7d80e5bfb8fdbdeb0172b0dc1e7cd72b7c7f2dc69c91d42a5f
+MD5 3c3315218509873a57dfb54ce05b1ca8 tomcat-6.0.10-r5.ebuild 5758
+RMD160 65caa9eca6d20edcdd89939a7f677d4d3692e2e3 tomcat-6.0.10-r5.ebuild 5758
+SHA256 ca1ba13ec634bb7d80e5bfb8fdbdeb0172b0dc1e7cd72b7c7f2dc69c91d42a5f tomcat-6.0.10-r5.ebuild 5758
+MISC ChangeLog 44573 RMD160 05261552884b35d629aacf742faa7d4091eba2c9 SHA1 d54491e741204b32f14bf12fe89d7f94458619e3 SHA256 ad2de33ec67fecb26dcf185dc6ebdbd3993103ed6a3404d737d907d928e99cc4
+MD5 42c44f33d5fe4b019c9358968864c2cf ChangeLog 44573
+RMD160 05261552884b35d629aacf742faa7d4091eba2c9 ChangeLog 44573
+SHA256 ad2de33ec67fecb26dcf185dc6ebdbd3993103ed6a3404d737d907d928e99cc4 ChangeLog 44573
MISC metadata.xml 556 RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 SHA1 e8dcd8204d0ea02558dd07e1aded5dc58ed1460c SHA256 ac94c1d58b05b47598f311e6efb971fdb30ad9a25f3c32cb9c064fb6330dad79
MD5 0609d3339e0b8d5a3b4707f6b02aad3a metadata.xml 556
RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 metadata.xml 556
@@ -66,13 +83,9 @@ SHA256 ac94c1d58b05b47598f311e6efb971fdb30ad9a25f3c32cb9c064fb6330dad79 metadata
MD5 6947c731df35ce2149f4a2f8009b575f files/digest-tomcat-5.5.23-r1 277
RMD160 c7a3b4f7dd1b085332606c3d6a68cc21f0ff78e2 files/digest-tomcat-5.5.23-r1 277
SHA256 7c1430575374307e6337ec7f22b7822c2093deb36bb3e9fffaa4cf8b23f34051 files/digest-tomcat-5.5.23-r1 277
-MD5 5f9244a61bfa0875478e8849b6cb845e files/digest-tomcat-6.0.10-r4 277
-RMD160 3d16b85b1dcb55e6874b535c06f2a5df00b46ce1 files/digest-tomcat-6.0.10-r4 277
-SHA256 49aef00c733c574a5c8536a6e5406769105dbe0b64ad0ea9b9682ca42bff23f0 files/digest-tomcat-6.0.10-r4 277
------BEGIN PGP SIGNATURE-----
-Version: GnuPG v2.0.3 (GNU/Linux)
-
-iD8DBQFGNJhccxLzpIGCsLQRAo+RAJ0RvYc7q6HGUUD+u4fyvawLj9MpPgCfSmDn
-fYijM0SC/UmRBbnJN0rljzk=
-=NR5g
------END PGP SIGNATURE-----
+MD5 6947c731df35ce2149f4a2f8009b575f files/digest-tomcat-5.5.23-r2 277
+RMD160 c7a3b4f7dd1b085332606c3d6a68cc21f0ff78e2 files/digest-tomcat-5.5.23-r2 277
+SHA256 7c1430575374307e6337ec7f22b7822c2093deb36bb3e9fffaa4cf8b23f34051 files/digest-tomcat-5.5.23-r2 277
+MD5 5f9244a61bfa0875478e8849b6cb845e files/digest-tomcat-6.0.10-r5 277
+RMD160 3d16b85b1dcb55e6874b535c06f2a5df00b46ce1 files/digest-tomcat-6.0.10-r5 277
+SHA256 49aef00c733c574a5c8536a6e5406769105dbe0b64ad0ea9b9682ca42bff23f0 files/digest-tomcat-6.0.10-r5 277
diff --git a/www-servers/tomcat/files/5.5/catalina.policy b/www-servers/tomcat/files/5.5/catalina.policy
new file mode 100644
index 000000000000..8392623ae4ab
--- /dev/null
+++ b/www-servers/tomcat/files/5.5/catalina.policy
@@ -0,0 +1,261 @@
+// ============================================================================
+// catalina.corepolicy - Security Policy Permissions for Tomcat 5
+//
+// This file contains a default set of security policies to be enforced (by the
+// JVM) when Catalina is executed with the "-security" option. In addition
+// to the permissions granted here, the following additional permissions are
+// granted to the codebase specific to each web application:
+//
+// * Read access to the document root directory
+//
+// $Id: catalina.policy,v 1.1 2007/05/15 04:37:21 wltjr Exp $
+// ============================================================================
+
+
+// ========== SYSTEM CODE PERMISSIONS =========================================
+
+
+// These permissions apply to javac
+grant codeBase "file:${java.home}/lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions
+grant codeBase "file:${java.home}/jre/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/../lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions when
+// ${java.home} points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+
+// ========== CATALINA CODE PERMISSIONS =======================================
+
+
+// These permissions apply to the launcher code
+grant codeBase "file:${catalina.home}/bin/commons-launcher.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the daemon code
+grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the commons-logging API
+grant codeBase "file:${catalina.home}/bin/commons-logging-api.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the server startup code
+grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to JULI
+grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the servlet API classes
+// and those that are shared across all class loaders
+// located in the "common" directory
+grant codeBase "file:${catalina.home}/common/-" {
+ permission java.security.AllPermission;
+};
+
+grant codeBase "file:${catalina.home}/-" {
+ permission java.security.AllPermission;
+};
+// symlinks must be written separately (?)
+grant codeBase "file:${catalina.home}/common/lib/ant-bootstrap.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/ant.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/ant-launcher.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/commons-collections.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/commons-dbcp.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/commons-el.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/commons-pool.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/jasper-compiler.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/jasper-runtime.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/jsp-api.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/naming-factory.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/naming-resources.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/servlet-api.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the container's core code, plus any additional
+// libraries installed in the "server" directory
+grant codeBase "file:${catalina.home}/server/-" {
+ permission java.security.AllPermission;
+};
+// symlinks must be written separately (?)
+grant codeBase "file:${catalina.home}/server/lib/catalina-ant.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/catalina-ant-jmx.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/catalina-cluster.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/catalina.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/catalina-optional.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/catalina-storeconfig.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/commons-beanutils.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/commons-digester.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/commons-modeler.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/servlets-default.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/servlets-invoker.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/servlets-webdav.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/tomcat-ajp.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/tomcat-apr.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/tomcat-coyote.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/tomcat-http.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/tomcat-jkstatus-ant.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/server/lib/tomcat-util.jar" {
+ permission java.security.AllPermission;
+};
+
+// ========== WEB APPLICATION PERMISSIONS =====================================
+
+
+// These permissions are granted by default to all web applications
+// In addition, a web application will be given a read FilePermission
+// and JndiPermission for all files and directories in its document root.
+grant {
+ // Required for JNDI lookup of named JDBC DataSource's and
+ // javamail named MimePart DataSource used to send mail
+ permission java.util.PropertyPermission "java.home", "read";
+ permission java.util.PropertyPermission "java.naming.*", "read";
+ permission java.util.PropertyPermission "javax.sql.*", "read";
+
+ // OS Specific properties to allow read access
+ permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "os.version", "read";
+ permission java.util.PropertyPermission "os.arch", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.util.PropertyPermission "path.separator", "read";
+ permission java.util.PropertyPermission "line.separator", "read";
+
+ // JVM properties to allow read access
+ permission java.util.PropertyPermission "java.version", "read";
+ permission java.util.PropertyPermission "java.vendor", "read";
+ permission java.util.PropertyPermission "java.vendor.url", "read";
+ permission java.util.PropertyPermission "java.class.version", "read";
+ permission java.util.PropertyPermission "java.specification.version", "read";
+ permission java.util.PropertyPermission "java.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.specification.name", "read";
+
+ permission java.util.PropertyPermission "java.vm.specification.version", "read";
+ permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.specification.name", "read";
+ permission java.util.PropertyPermission "java.vm.version", "read";
+ permission java.util.PropertyPermission "java.vm.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.name", "read";
+
+ // Required for OpenJMX
+ permission java.lang.RuntimePermission "getAttribute";
+
+ // Allow read of JAXP compliant XML parser debug
+ permission java.util.PropertyPermission "jaxp.debug", "read";
+
+ // Precompiled JSPs need access to this package.
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
+
+};
+
+
+// You can assign additional permissions to particular web applications by
+// adding additional "grant" entries here, based on the code base for that
+// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
+//
+// Different permissions can be granted to JSP pages, classes loaded from
+// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
+// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
+//
+// For instance, assume that the standard "examples" application
+// included a JDBC driver that needed to establish a network connection to the
+// corresponding database and used the scrape taglib to get the weather from
+// the NOAA web server. You might create a "grant" entries like this:
+//
+// The permissions granted to the context root directory apply to JSP pages.
+// grant codeBase "file:${catalina.home}/webapps/examples/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+//
+// The permissions granted to the context WEB-INF/classes directory
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
+// };
+//
+// The permission granted to your JDBC driver
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// };
+// The permission granted to the scrape taglib
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+
diff --git a/www-servers/tomcat/files/5.5/tomcat.conf.2 b/www-servers/tomcat/files/5.5/tomcat.conf.2
new file mode 100644
index 000000000000..b1cb95d3bc37
--- /dev/null
+++ b/www-servers/tomcat/files/5.5/tomcat.conf.2
@@ -0,0 +1,77 @@
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.5/tomcat.conf.2,v 1.1 2007/05/15 04:37:21 wltjr Exp $
+
+# JVM Runtime
+# Using the default setting, it will determine your JVM from the system-vm
+# set using java-config.
+# See java-config(1) manual page for assistance in determining this value.
+#
+# You can override this value with whatever path you wish.
+# Example: JAVA_HOME=/opt/sun-jdk-1.4.2.05
+
+JAVA_HOME=`java-config --jre-home`
+
+# (Optional) Java runtime options used when the "start", "stop", or "run"
+# commands are executed.
+# Example to set library path for tomcat-native
+# JAVA_OPTS="-Djava.library.path=/usr/lib"
+# JAVA_OPTS=""
+
+# Where your web applications are located
+CATALINA_HOME=/usr/share/tomcat-5.5/
+CATALINA_BASE=/var/lib/tomcat-5.5/
+
+# Tomcat's User/Group
+# Change these at your own risk!!! These are not supported so if it
+# breaks something, you are on your own.
+CATALINA_USER=tomcat
+CATALINA_GROUP=tomcat
+
+# Location of the Tomcat JARs and classes
+CATALINA_LIBDIR=/usr/share/tomcat-5.5/server/lib/
+
+# The CLASSPATH for Tomcat to use, plus any others you need.
+CLASSPATH=${CATALINA_LIBDIR}
+
+# (Optional) Directory path location of temporary directory the JVM should
+# use (java.io.tmpdir). Defaults to $CATALINA_BASE/temp.
+CATALINA_TMPDIR="/var/tmp/tomcat-5.5/"
+
+# TOMCAT STARTUP/SHUTDOWN
+# debug Start Catalina in a debugger
+# -security debug Debug Catalina with a security manager
+# jpda start Start Catalina under JPDA debugger
+# start Start Catalina in a separate window
+# -security start Start in a separate window with security manager
+# stop Stop Catalina"
+#
+# NOTE: -security requires JSSE (see below)
+# NOTE: jpda requires JPDA (see below)
+TOMCAT_START="start"
+TOMCAT_STOP="stop"
+
+# (Optional) Java runtime options used when the "start", "stop", or "run"
+# commands are executed.
+# CATALINA_OPTS=""
+
+# Java Platform Debugger Architecture (JPDA)
+# http://java.sun.com/products/jpda/
+# Included with Java SDK 1.3 and later. No need to specify location.
+#
+# JPDA_TRANSPORT (Optional) JPDA transport used when the "jpda start"
+# command is executed. The default is "dt_socket".
+#
+# JPDA_ADDRESS (Optional) Java runtime options used when the "jpda start"
+# command is executed. The default is 8000.
+#
+# JPDA_TRANSPORT="dt_socket"
+# JPDA_ADDRESS="8000"
+
+# Java Secure Socket Extension (JSSE)
+# http://java.sun.com/products/jsse/
+# Included with Java SDK 1.4 and later.
+#
+# JSSE_HOME (Optional) May point at your Java Secure Sockets Extension
+# (JSSE) installation, whose JAR files will be added to the
+# system class path used to start Tomcat.
+#
+# JSSE_HOME="/opt/sun-jdk-1.4.1.02/jre/lib/"
diff --git a/www-servers/tomcat/files/5.5/tomcat.init.2 b/www-servers/tomcat/files/5.5/tomcat.init.2
new file mode 100755
index 000000000000..ea883b8aa090
--- /dev/null
+++ b/www-servers/tomcat/files/5.5/tomcat.init.2
@@ -0,0 +1,94 @@
+#!/sbin/runscript
+# Copyright 1999-2004 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/5.5/tomcat.init.2,v 1.1 2007/05/15 04:37:21 wltjr Exp $
+
+init_env_vars() {
+ # Set some sane defaults
+ if [ -z "${CATALINA_TMPDIR}" ] ; then
+ CATALINA_TMPDIR="${CATALINA_BASE}"/temp
+ fi
+ JPDA_TRANSPORT=${JPDA_TRANSPORT:="dt_socket"}
+ JPDA_ADDRESS=${JPDA_ADDRESS:="8000"}
+ JPDA_OPTS=${JPDA_OPTS="-Xdebug -Xrunjdwp:transport=${JPDA_TRANSPORT},address=${JPDA_ADDRESS},server=y,suspend=n"}
+
+ # Activate Logging
+ if [ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]; then
+ JAVA_OPTS="${JAVA_OPTS} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
+ -Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
+ fi
+
+ # Populate the classpath
+ CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/server/lib:${JAVA_HOME}/lib/tools.jar"
+ if [ -n "${JSSE_HOME}" ]; then
+ CLASSPATH="${CLASSPATH}:${JSSE_HOME}/lib/jcert.jar:${JSSE_HOME}/lib/jnet.jar:${JSSE_HOME}/lib/jsse.jar"
+ fi
+ CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/commons-logging-api.jar"
+
+ OPTS_CP="${JAVA_OPTS} ${CATALINA_OPTS} \
+ -Djava.endorsed.dirs=${CATALINA_HOME}/common/endorsed \
+ -classpath ${CLASSPATH}"
+
+ CATALINA_ARGS="-Dcatalina.base=${CATALINA_BASE} \
+ -Dcatalina.home=${CATALINA_HOME} \
+ -Djava.io.tmpdir=${CATALINA_TMPDIR} \
+ org.apache.catalina.startup.Bootstrap "
+
+ if [ ! -f "${CATALINA_BASE}logs/catalina.out" ]; then
+ touch "${CATALINA_BASE}logs/catalina.out"
+ chown tomcat:tomcat "${CATALINA_BASE}logs/catalina.out"
+ fi
+}
+
+start_helper() {
+ local executor=${1}
+ shift
+ local arguments="--start --quiet --background \
+ --chdir "${CATALINA_TMPDIR}" \
+ --chuid ${CATALINA_USER}:${CATALINA_GROUP} \
+ --make-pidfile --pidfile /var/run/tomcat-5.5.pid"
+ start-stop-daemon ${arguments} --exec ${executor} -- ${OPTS_CP} "$@" \
+ ${CATALINA_ARGS} ${TOMCAT_START} >> "${CATALINA_BASE}"/logs/catalina.out 2>&1
+ return $?
+}
+
+depend() {
+ use dns logger net
+}
+
+start() {
+ ebegin "Starting Tomcat"
+ init_env_vars
+ # Figure out what arguments to pass start_helper based on TOMCAT_START
+ if [ "${TOMCAT_START}" == "debug" ] ; then
+ start_helper ${JAVA_HOME}/bin/jdb \
+ -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share
+ elif [ "${TOMCAT_START}" == "-security debug" ] ; then
+ start_helper ${JAVA_HOME}/bin/jdb \
+ -sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share \
+ -Djava.security.manager \
+ -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
+ elif [ "${TOMCAT_START}" == "jpda start" ] ; then
+ start_helper ${JAVA_HOME}/bin/java ${JPDA_OPTS}
+ elif [ "${TOMCAT_START}" == "start" ] ; then
+ start_helper ${JAVA_HOME}/bin/java
+ elif [ "${TOMCAT_START}" == "-security start" ] ; then
+ start_helper ${JAVA_HOME}/bin/java \
+ -Djava.security.manager \
+ -Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
+ else
+ eerror "Invalid TOMCAT_START variable value, or one is not set"
+ eerror "Please see /etc/conf.d/tomcat-5.5 for more information"
+ eend 1
+ fi
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping Tomcat"
+ init_env_vars
+ start-stop-daemon --stop --quiet \
+ --make-pidfile --pidfile /var/run/tomcat-5.5.pid \
+ --exec ${JAVA_HOME}/bin/java -- ${OPTS_CP} ${CATALINA_ARGS} ${STD_OUT} stop
+ eend $?
+}
diff --git a/www-servers/tomcat/files/6/catalina.policy b/www-servers/tomcat/files/6/catalina.policy
new file mode 100644
index 000000000000..57bf1b133a0a
--- /dev/null
+++ b/www-servers/tomcat/files/6/catalina.policy
@@ -0,0 +1,163 @@
+// ============================================================================
+// catalina.corepolicy - Security Policy Permissions for Tomcat 6
+//
+// This file contains a default set of security policies to be enforced (by the
+// JVM) when Catalina is executed with the "-security" option. In addition
+// to the permissions granted here, the following additional permissions are
+// granted to the codebase specific to each web application:
+//
+// * Read access to the document root directory
+//
+// $Id: catalina.policy,v 1.1 2007/05/15 04:37:21 wltjr Exp $
+// ============================================================================
+
+
+// ========== SYSTEM CODE PERMISSIONS =========================================
+
+
+// These permissions apply to javac
+grant codeBase "file:${java.home}/lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions
+grant codeBase "file:${java.home}/jre/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to javac when ${java.home] points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/../lib/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to all shared system extensions when
+// ${java.home} points at $JAVA_HOME/jre
+grant codeBase "file:${java.home}/lib/ext/-" {
+ permission java.security.AllPermission;
+};
+
+
+// ========== CATALINA CODE PERMISSIONS =======================================
+
+
+// These permissions apply to the daemon code
+grant codeBase "file:${catalina.home}/bin/commons-daemon.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the logging API
+grant codeBase "file:${catalina.home}/bin/tomcat-juli.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the server startup code
+grant codeBase "file:${catalina.home}/bin/bootstrap.jar" {
+ permission java.security.AllPermission;
+};
+
+// These permissions apply to the servlet API classes
+// and those that are shared across all class loaders
+// located in the "lib" directory
+grant codeBase "file:${catalina.home}/lib/-" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/jsp-api.jar" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/common/lib/servlet-api.jar" {
+ permission java.security.AllPermission;
+};
+
+
+// ========== WEB APPLICATION PERMISSIONS =====================================
+
+
+grant codeBase "file:${catalina.home}/webapps/host-manager/-" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.home}/webapps/manager/-" {
+ permission java.security.AllPermission;
+};
+grant codeBase "file:${catalina.base}/webapps/ROOT/-" {
+ permission java.security.AllPermission;
+};
+
+// These permissions are granted by default to all web applications
+// In addition, a web application will be given a read FilePermission
+// and JndiPermission for all files and directories in its document root.
+grant {
+ // Required for JNDI lookup of named JDBC DataSource's and
+ // javamail named MimePart DataSource used to send mail
+ permission java.util.PropertyPermission "java.home", "read";
+ permission java.util.PropertyPermission "java.naming.*", "read";
+ permission java.util.PropertyPermission "javax.sql.*", "read";
+
+ // OS Specific properties to allow read access
+ permission java.util.PropertyPermission "os.name", "read";
+ permission java.util.PropertyPermission "os.version", "read";
+ permission java.util.PropertyPermission "os.arch", "read";
+ permission java.util.PropertyPermission "file.separator", "read";
+ permission java.util.PropertyPermission "path.separator", "read";
+ permission java.util.PropertyPermission "line.separator", "read";
+
+ // JVM properties to allow read access
+ permission java.util.PropertyPermission "java.version", "read";
+ permission java.util.PropertyPermission "java.vendor", "read";
+ permission java.util.PropertyPermission "java.vendor.url", "read";
+ permission java.util.PropertyPermission "java.class.version", "read";
+ permission java.util.PropertyPermission "java.specification.version", "read";
+ permission java.util.PropertyPermission "java.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.specification.name", "read";
+
+ permission java.util.PropertyPermission "java.vm.specification.version", "read";
+ permission java.util.PropertyPermission "java.vm.specification.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.specification.name", "read";
+ permission java.util.PropertyPermission "java.vm.version", "read";
+ permission java.util.PropertyPermission "java.vm.vendor", "read";
+ permission java.util.PropertyPermission "java.vm.name", "read";
+
+ // Required for OpenJMX
+ permission java.lang.RuntimePermission "getAttribute";
+
+ // Allow read of JAXP compliant XML parser debug
+ permission java.util.PropertyPermission "jaxp.debug", "read";
+
+ // Precompiled JSPs need access to this package.
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime";
+ permission java.lang.RuntimePermission "accessClassInPackage.org.apache.jasper.runtime.*";
+
+};
+
+
+// You can assign additional permissions to particular web applications by
+// adding additional "grant" entries here, based on the code base for that
+// application, /WEB-INF/classes/, or /WEB-INF/lib/ jar files.
+//
+// Different permissions can be granted to JSP pages, classes loaded from
+// the /WEB-INF/classes/ directory, all jar files in the /WEB-INF/lib/
+// directory, or even to individual jar files in the /WEB-INF/lib/ directory.
+//
+// For instance, assume that the standard "examples" application
+// included a JDBC driver that needed to establish a network connection to the
+// corresponding database and used the scrape taglib to get the weather from
+// the NOAA web server. You might create a "grant" entries like this:
+//
+// The permissions granted to the context root directory apply to JSP pages.
+// grant codeBase "file:${catalina.home}/webapps/examples/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+//
+// The permissions granted to the context WEB-INF/classes directory
+// grant codeBase "file:${catalina.home}/webapps/examples/WEB-INF/classes/-" {
+// };
+//
+// The permission granted to your JDBC driver
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/driver.jar!/-" {
+// permission java.net.SocketPermission "dbhost.mycompany.com:5432", "connect";
+// };
+// The permission granted to the scrape taglib
+// grant codeBase "jar:file:${catalina.home}/webapps/examples/WEB-INF/lib/scrape.jar!/-" {
+// permission java.net.SocketPermission "*.noaa.gov:80", "connect";
+// };
+
diff --git a/www-servers/tomcat/files/6/tomcat.conf b/www-servers/tomcat/files/6/tomcat.conf
index 7a56fce515bf..b3648894ab4e 100644
--- a/www-servers/tomcat/files/6/tomcat.conf
+++ b/www-servers/tomcat/files/6/tomcat.conf
@@ -1,4 +1,4 @@
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/6/tomcat.conf,v 1.2 2007/04/19 16:35:22 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/6/tomcat.conf,v 1.3 2007/05/15 04:37:21 wltjr Exp $
# JVM Runtime
# Using the default setting, it will determine your JVM from the system-vm
@@ -12,6 +12,8 @@
# (Optional) Java runtime options used when the "start", "stop", or "run"
# commands are executed.
+# Example to set library path for tomcat-native
+# JAVA_OPTS="-Djava.library.path=/usr/lib"
# JAVA_OPTS=""
# Where your web applications are located
@@ -36,10 +38,10 @@ CATALINA_TMPDIR="/var/tmp/tomcat-6/"
# TOMCAT STARTUP/SHUTDOWN
# debug Start Catalina in a debugger
-# debug -security Debug Catalina with a security manager
+# -security debug Debug Catalina with a security manager
# jpda start Start Catalina under JPDA debugger
# start Start Catalina in a separate window
-# start -security Start in a separate window with security manager
+# -security start Start in a separate window with security manager
# stop Stop Catalina"
#
# NOTE: -security requires JSSE (see below)
diff --git a/www-servers/tomcat/files/6/tomcat.init b/www-servers/tomcat/files/6/tomcat.init
index be49a38999e5..9b7ae58a0c81 100755
--- a/www-servers/tomcat/files/6/tomcat.init
+++ b/www-servers/tomcat/files/6/tomcat.init
@@ -1,7 +1,7 @@
#!/sbin/runscript
# Copyright 1999-2004 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/6/tomcat.init,v 1.5 2007/04/19 16:35:22 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/files/6/tomcat.init,v 1.6 2007/05/15 04:37:21 wltjr Exp $
init_env_vars() {
# Populate JAVA_HOME
@@ -16,14 +16,14 @@ init_env_vars() {
JPDA_OPTS=${JPDA_OPTS="-Xdebug -Xrunjdwp:transport=${JPDA_TRANSPORT},address=${JPDA_ADDRESS},server=y,suspend=n"}
# Activate Logging
- if [[ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]]; then
+ if [ -r "${CATALINA_HOME}"/bin/tomcat-juli.jar ]; then
JAVA_OPTS="${JAVA_OPTS} -Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager \
-Djava.util.logging.config.file=${CATALINA_BASE}/conf/logging.properties"
fi
# Populate the classpath
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/lib:${JAVA_HOME}/lib/tools.jar"
- if [[ -n "${JSSE_HOME}" ]]; then
+ if [ -n "${JSSE_HOME}" ]; then
CLASSPATH="${CLASSPATH}:${JSSE_HOME}/lib/jcert.jar:${JSSE_HOME}/lib/jnet.jar:${JSSE_HOME}/lib/jsse.jar"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar"
@@ -31,9 +31,9 @@ init_env_vars() {
OPTS_CP="${JAVA_OPTS} ${CATALINA_OPTS} -classpath ${CLASSPATH}"
CATALINA_ARGS="-Dcatalina.base=${CATALINA_BASE} \
- -Dcatalina.home=${CATALINA_HOME} \
- -Djava.io.tmpdir=${CATALINA_TMPDIR} \
- org.apache.catalina.startup.Bootstrap "
+ -Dcatalina.home=${CATALINA_HOME} \
+ -Djava.io.tmpdir=${CATALINA_TMPDIR} \
+ org.apache.catalina.startup.Bootstrap "
if [ ! -f "${CATALINA_BASE}logs/catalina.out" ]; then
touch "${CATALINA_BASE}logs/catalina.out"
@@ -44,9 +44,12 @@ init_env_vars() {
start_helper() {
local executor=${1}
shift
- local arguments="--start --quiet --background --chuid ${CATALINA_USER}:${CATALINA_GROUP} \
- --make-pidfile --pidfile /var/run/tomcat.pid"
- start-stop-daemon ${arguments} --exec ${executor} -- ${OPTS_CP} "$@" ${CATALINA_ARGS} ${TOMCAT_START} >> "$CATALINA_BASE"/logs/catalina.out 2>&1
+ local arguments="--start --quiet --background \
+ --chdir "${CATALINA_TMPDIR}" \
+ --chuid ${CATALINA_USER}:${CATALINA_GROUP} \
+ --make-pidfile --pidfile /var/run/tomcat-6.pid"
+ start-stop-daemon ${arguments} --exec ${executor} -- ${OPTS_CP} "$@" \
+ ${CATALINA_ARGS} ${TOMCAT_START} >> "${CATALINA_BASE}"/logs/catalina.out 2>&1
return $?
}
@@ -58,19 +61,19 @@ start() {
ebegin "Starting Tomcat"
init_env_vars
# Figure out what arguments to pass start_helper based on TOMCAT_START
- if [[ "${TOMCAT_START}" == "debug" ]] ; then
+ if [ "${TOMCAT_START}" == "debug" ] ; then
start_helper ${JAVA_HOME}/bin/jdb \
-sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share
- elif [[ "${TOMCAT_START}" == "debug -security" ]] ; then
+ elif [ "${TOMCAT_START}" == "-security debug" ] ; then
start_helper ${JAVA_HOME}/bin/jdb \
-sourcepath ${CATALINA_HOME}/../../jakarta-tomcat-catalina/catalina/src/share \
-Djava.security.manager \
-Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
- elif [[ "${TOMCAT_START}" == "jpda start" ]] ; then
+ elif [ "${TOMCAT_START}" == "jpda start" ] ; then
start_helper ${JAVA_HOME}/bin/java ${JPDA_OPTS}
- elif [[ "${TOMCAT_START}" == "start" ]] ; then
+ elif [ "${TOMCAT_START}" == "start" ] ; then
start_helper ${JAVA_HOME}/bin/java
- elif [[ "${TOMCAT_START}" == "start -security" ]] ; then
+ elif [ "${TOMCAT_START}" == "-security start" ] ; then
start_helper ${JAVA_HOME}/bin/java \
-Djava.security.manager \
-Djava.security.policy=${CATALINA_BASE}/conf/catalina.policy
@@ -86,7 +89,7 @@ stop() {
ebegin "Stopping Tomcat"
init_env_vars
start-stop-daemon --stop --quiet \
- --make-pidfile --pidfile /var/run/tomcat.pid \
+ --make-pidfile --pidfile /var/run/tomcat-6.pid \
--exec ${JAVA_HOME}/bin/java -- ${OPTS_CP} ${CATALINA_ARGS} stop ${STD_OUT}
eend $?
}
diff --git a/www-servers/tomcat/files/digest-tomcat-5.5.23-r2 b/www-servers/tomcat/files/digest-tomcat-5.5.23-r2
new file mode 100644
index 000000000000..e0e59f68fbb2
--- /dev/null
+++ b/www-servers/tomcat/files/digest-tomcat-5.5.23-r2
@@ -0,0 +1,3 @@
+MD5 362d1d8b15dc09882440dcab8c592dd7 apache-tomcat-5.5.23-src.tar.gz 4895919
+RMD160 fe669f6b864fd7dcf4ad74dad22a0256e5417005 apache-tomcat-5.5.23-src.tar.gz 4895919
+SHA256 e2f7ce250643349507b511a5ea96df7364030a061a8f4d5b71d8b5a099e2b6bd apache-tomcat-5.5.23-src.tar.gz 4895919
diff --git a/www-servers/tomcat/files/digest-tomcat-6.0.10-r4 b/www-servers/tomcat/files/digest-tomcat-6.0.10-r5
index 3dd91cc642dc..3dd91cc642dc 100644
--- a/www-servers/tomcat/files/digest-tomcat-6.0.10-r4
+++ b/www-servers/tomcat/files/digest-tomcat-6.0.10-r5
diff --git a/www-servers/tomcat/tomcat-5.5.23-r2.ebuild b/www-servers/tomcat/tomcat-5.5.23-r2.ebuild
new file mode 100644
index 000000000000..c26176961751
--- /dev/null
+++ b/www-servers/tomcat/tomcat-5.5.23-r2.ebuild
@@ -0,0 +1,336 @@
+# Copyright 1999-2007 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.5.23-r2.ebuild,v 1.1 2007/05/15 04:37:21 wltjr Exp $
+
+#WANT_ANT_TASKS="ant-trax"
+
+inherit eutils java-pkg-2 java-ant-2
+
+DESCRIPTION="Tomcat Servlet-2.4/JSP-2.0 Container"
+
+MY_P="apache-${P}-src"
+SLOT="5.5"
+SRC_URI="mirror://apache/${PN}/${PN}-5/v${PV}/src/${MY_P}.tar.gz"
+HOMEPAGE="http://tomcat.apache.org/"
+KEYWORDS="~amd64 -ppc -ppc64 ~x86 ~x86-fbsd"
+LICENSE="Apache-2.0"
+
+IUSE="admin java5 doc examples source test"
+
+RDEPEND="=dev-java/eclipse-ecj-3.2*
+ =dev-java/commons-beanutils-1.7*
+ >=dev-java/commons-collections-3.1
+ >=dev-java/commons-daemon-1.0.1
+ >=dev-java/commons-dbcp-1.2.1
+ >=dev-java/commons-digester-1.7
+ >=dev-java/commons-fileupload-1.1
+ =dev-java/commons-httpclient-2.0*
+ >=dev-java/commons-io-1.1
+ >=dev-java/commons-el-1.0
+ >=dev-java/commons-launcher-0.9
+ >=dev-java/commons-logging-1.0.4
+ >=dev-java/commons-modeler-2.0
+ >=dev-java/commons-pool-1.2
+ >=dev-java/junit-3.8.1
+ >=dev-java/log4j-1.2.9
+ >=dev-java/saxpath-1.0
+ ~dev-java/tomcat-servlet-api-${PV}
+ dev-java/ant-core
+ admin? ( =dev-java/struts-1.2* )
+ dev-java/sun-javamail
+ java5? ( >=virtual/jre-1.5 )
+ !java5? (
+ =virtual/jre-1.4*
+ dev-java/sun-jaf
+ =dev-java/mx4j-core-3*
+ >=dev-java/xerces-2.7.1
+ =dev-java/xml-commons-external-1.3*
+ )"
+DEPEND="java5? ( >=virtual/jdk-1.5 )
+ !java5? ( =virtual/jdk-1.4* )
+ ${RDEPEND}"
+
+S=${WORKDIR}/${MY_P}
+
+TOMCAT_NAME="${PN}-${SLOT}"
+WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps"
+
+pkg_setup() {
+ java-pkg-2_pkg_setup
+ # new user for tomcat
+ enewgroup tomcat
+ enewuser tomcat -1 -1 /dev/null tomcat
+
+ java-pkg_filter-compiler ecj-3.1 ecj-3.2
+}
+
+src_unpack() {
+ unpack ${A}
+ cd ${S}
+
+ local PATCHES="
+ main_build_xml.patch
+ tomcat_build_xml.patch
+ catalina_build_xml.patch
+ jasper_build_xml.patch
+ "
+ for patch in ${PATCHES}; do
+ epatch "${FILESDIR}/${SLOT}/${patch}"
+ done
+ if use examples; then
+ epatch "${FILESDIR}/${SLOT}/jsr152_examples_build_xml.patch"
+ epatch "${FILESDIR}/${SLOT}/jsr154_examples_build_xml.patch"
+ fi
+
+ rm -v "${S}"/connectors/jk/jkstatus/build/classes/org/apache/jk/status/*.class || die
+ rm -v "${S}"/connectors/jk/jkstatus/dist/*.jar || die
+
+ # avoid packed jars :-)
+ mkdir -p ${S}/build/build/common
+ cd ${S}/build/build
+
+ mkdir ./bin && cd ./bin
+ java-pkg_jar-from commons-logging commons-logging-api.jar
+ java-pkg_jar-from commons-daemon
+ if ! use java5; then
+ java-pkg_jar-from mx4j-core-3.0 mx4j.jar jmx.jar
+ java-pkg_jar-from mx4j-core-3.0 mx4j-rjmx.jar jmx-remote.jar
+ mkdir ${S}/build/build/common/endorsed && cd ${S}/build/build/common/endorsed
+ java-pkg_jar-from xml-commons-external-1.3 xml-apis.jar
+ java-pkg_jar-from xerces-2 xercesImpl.jar
+ fi
+
+ mkdir ${S}/build/build/common/lib && cd ${S}/build/build/common/lib
+ java-pkg_jar-from ant-core
+ java-pkg_jar-from commons-collections
+ java-pkg_jar-from commons-dbcp
+ java-pkg_jar-from commons-el
+ java-pkg_jar-from commons-pool
+ java-pkg_jar-from tomcat-servlet-api-2.4
+
+ mkdir -p ${S}/build/build/server/lib && cd ${S}/build/build/server/lib
+ java-pkg_jar-from commons-beanutils-1.7 commons-beanutils.jar
+ java-pkg_jar-from commons-digester
+ java-pkg_jar-from commons-modeler
+
+}
+
+src_compile(){
+ local antflags="-Dbase.path=${T}"
+
+ antflags="${antflags} -Dservletapi.build.notrequired=true"
+ antflags="${antflags} -Djspapi.build.notrequired=true"
+ antflags="${antflags} -Dcommons-beanutils.jar=$(java-pkg_getjar commons-beanutils-1.7 commons-beanutils.jar)"
+ antflags="${antflags} -Dcommons-collections.jar=$(java-pkg_getjars commons-collections)"
+ antflags="${antflags} -Dcommons-daemon.jar=$(java-pkg_getjars commons-daemon)"
+ antflags="${antflags} -Dcommons-digester.jar=$(java-pkg_getjars commons-digester)"
+ antflags="${antflags} -Dcommons-dbcp.jar=$(java-pkg_getjars commons-dbcp)"
+ antflags="${antflags} -Dcommons-el.jar=$(java-pkg_getjars commons-el)"
+ antflags="${antflags} -Dcommons-fileupload.jar=$(java-pkg_getjars commons-fileupload)"
+ antflags="${antflags} -Dcommons-httpclient.jar=$(java-pkg_getjars commons-httpclient)"
+ antflags="${antflags} -Dcommons-launcher.jar=$(java-pkg_getjars commons-launcher)"
+ antflags="${antflags} -Dcommons-logging.jar=$(java-pkg_getjar commons-logging commons-logging.jar)"
+ antflags="${antflags} -Dcommons-logging-api.jar=$(java-pkg_getjar commons-logging commons-logging-api.jar)"
+ antflags="${antflags} -Dcommons-pool.jar=$(java-pkg_getjars commons-pool)"
+ antflags="${antflags} -Dcommons-modeler.jar=$(java-pkg_getjars commons-modeler)"
+ antflags="${antflags} -Djdt.jar=$(java-pkg_getjar eclipse-ecj-3.2 ecj.jar)"
+ antflags="${antflags} -Djsp-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 jsp-api.jar)"
+ antflags="${antflags} -Djunit.jar=$(java-pkg_getjars junit)"
+ antflags="${antflags} -Dlog4j.jar=$(java-pkg_getjars log4j)"
+ antflags="${antflags} -Dmail.jar=$(java-pkg_getjar sun-javamail mail.jar)"
+ antflags="${antflags} -Dsaxpath.jar=$(java-pkg_getjar saxpath saxpath.jar)"
+ antflags="${antflags} -Dservlet-api.jar=$(java-pkg_getjar tomcat-servlet-api-2.4 servlet-api.jar)"
+ if use admin; then
+ antflags="${antflags} -Dstruts.jar=$(java-pkg_getjar struts-1.2 struts.jar)"
+ antflags="${antflags} -Dstruts.home=/usr/share/struts"
+ else
+ antflags="${antflags} -Dadmin.build.notrequired=true"
+ antflags="${antflags} -Dadmin.precompile.notrequired=true"
+ fi
+ if ! use examples; then
+ antflags="${antflags} -Dexamples.build.notrequired=true"
+ antflags="${antflags} -Dexamples.precompile.notrequired=true"
+ fi
+ antflags="${antflags} -Djasper.home=${S}/jasper"
+ if ! use java5; then
+ antflags="${antflags} -Dactivation.jar=$(java-pkg_getjars sun-jaf)"
+ antflags="${antflags} -Djmx.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j.jar)"
+ antflags="${antflags} -Djmx-remote.jar=$(java-pkg_getjar mx4j-core-3.0 mx4j-rjmx.jar)"
+ antflags="${antflags} -DxercesImpl.jar=$(java-pkg_getjar xerces-2 xercesImpl.jar)"
+ antflags="${antflags} -Dxml-apis.jar=$(java-pkg_getjar xml-commons-external-1.3 xml-apis.jar)"
+ fi
+
+ # prevent classpath bloat with ant-1.7.0 which makes admin app fail
+ ANT_TASKS="ant-trax" eant ${antflags}
+}
+
+src_install() {
+ cd ${S}/build/build
+
+ # init.d, conf.d
+ newinitd ${FILESDIR}/${SLOT}/tomcat.init.2 ${TOMCAT_NAME}
+ newconfd ${FILESDIR}/${SLOT}/tomcat.conf.2 ${TOMCAT_NAME}
+
+ # create dir structure
+ diropts -m755 -o tomcat -g tomcat
+ dodir /usr/share/${TOMCAT_NAME}
+ keepdir /var/log/${TOMCAT_NAME}/
+ keepdir /var/tmp/${TOMCAT_NAME}/
+ keepdir /var/run/${TOMCAT_NAME}/
+
+ local CATALINA_BASE=/var/lib/${TOMCAT_NAME}/
+ dodir ${CATALINA_BASE}
+ keepdir ${CATALINA_BASE}/shared/lib
+ keepdir ${CATALINA_BASE}/shared/classes
+
+ keepdir /usr/share/${TOMCAT_NAME}/common/lib
+
+ dodir /etc/${TOMCAT_NAME}
+ fperms 750 /etc/${TOMCAT_NAME}
+
+ diropts -m0755
+
+ # we don't need dos scripts
+ rm -f bin/*.bat
+
+ # copy the manager and admin context's to the right position
+ mkdir -p conf/Catalina/localhost
+ if use admin; then
+ cp ${S}/container/webapps/admin/admin.xml \
+ conf/Catalina/localhost
+ fi
+ cp ${S}/container/webapps/manager/manager.xml \
+ conf/Catalina/localhost
+
+ # make the jars available via java-pkg_getjar and jar-from, etc
+ base=$(pwd)
+ libdirs="common/lib server/lib"
+ for dir in ${libdirs}
+ do
+ cd ${dir}
+
+ for jar in *.jar;
+ do
+ # replace the file with a symlink
+ if [ ! -L ${jar} ]; then
+ java-pkg_dojar ${jar}
+ rm -f ${jar}
+ ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar}
+ fi
+ done
+
+ cd ${base}
+ done
+
+ # replace a packed struts.jar
+ if use admin; then
+ cd server/webapps/admin/WEB-INF/lib
+ rm -f struts.jar
+ java-pkg_jar-from struts-1.2 struts.jar
+ cd ${base}
+ else
+ rm -fR server/webapps/admin
+ fi
+
+ cd server/webapps/manager/WEB-INF/lib
+ java-pkg_jar-from commons-fileupload
+ java-pkg_jar-from commons-io-1
+ cd ${base}
+
+ # replace the default pw with a random one, see #92281
+ local randpw=$(echo ${RANDOM}|md5sum|cut -c 1-15)
+ sed -e s:SHUTDOWN:${randpw}: -i conf/{server,server-minimal}.xml
+
+ # copy over the directories
+ chown -R tomcat:tomcat webapps/* conf/*
+ cp -pR conf/* ${D}/etc/${TOMCAT_NAME} || die "failed to copy conf"
+ cp -HR bin common server ${D}/usr/share/${TOMCAT_NAME} || die "failed to copy"
+
+ # replace catalina.policy with gentoo specific one bug #176701
+ cp ${FILESDIR}/${SLOT}/catalina.policy ${D}/etc/${TOMCAT_NAME} || die "failed to replace catalina.policy"
+
+ keepdir ${WEBAPPS_DIR}
+ set_webapps_perms ${D}/${WEBAPPS_DIR}
+
+ # Copy over webapps, some controlled by use flags
+ cp -p ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt
+ cp -pr webapps/ROOT ${D}${CATALINA_BASE}/webapps
+ if use doc; then
+ cp -pr webapps/tomcat-docs ${D}${CATALINA_BASE}/webapps
+ fi
+ if use examples; then
+ cp -pr webapps/{jsp-examples,servlets-examples,webdav} \
+ ${D}${CATALINA_BASE}/webapps
+ fi
+
+ # symlink the directories to make CATALINA_BASE possible
+ dosym /etc/${TOMCAT_NAME} ${CATALINA_BASE}/conf
+ dosym /var/log/${TOMCAT_NAME} ${CATALINA_BASE}/logs
+ dosym /var/tmp/${TOMCAT_NAME} ${CATALINA_BASE}/temp
+ dosym /var/run/${TOMCAT_NAME} ${CATALINA_BASE}/work
+
+ dodoc ${S}/build/{RELEASE-NOTES,RUNNING.txt}
+ fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml
+}
+
+pkg_postinst() {
+ #due to previous ebuild bloopers, make sure everything is correct
+ chown root:root /etc/init.d/${TOMCAT_NAME}
+ chown root:root /etc/conf.d/${TOMCAT_NAME}
+
+ elog
+ elog " This ebuild implements a new filesystem layout for tomcat"
+ elog " please read http://www.gentoo.org/proj/en/java/tomcat-guide.xml"
+ elog " for more information!."
+ elog
+ ewarn "naming-factory-dbcp.jar is not built at this time. Please fetch"
+ ewarn "jar from upstream binary if you need it. Gentoo Bug # 144276"
+ elog
+ elog " Please file any bugs at http://bugs.gentoo.org/ or else it"
+ elog " may not get seen. Thank you."
+ elog
+}
+
+#helpers
+set_webapps_perms() {
+ chown tomcat:tomcat ${1} || die "Failed to change owner off ${1}."
+ chmod 750 ${1} || die "Failed to change permissions off ${1}."
+}
+
+pkg_config() {
+ # Better suggestions are welcome
+ local currentdir="$(getent passwd tomcat | gawk -F':' '{ print $6 }')"
+
+ elog "The default home directory for Tomcat is /dev/null."
+ elog "You need to change it if your applications needs it to"
+ elog "be an actual directory. Current home directory:"
+ elog "${currentdir}"
+ elog ""
+ elog "Do you want to change it [yes/no]?"
+
+ local answer
+ read answer
+
+ if [[ "${answer}" == "yes" ]]; then
+ elog ""
+ elog "Suggestions:"
+ elog "${WEBAPPS_DIR}"
+ elog ""
+ elog "If you want to suggest a directory, file a bug to"
+ elog "http://bugs.gentoo.org"
+ elog ""
+ elog "Enter home directory:"
+
+ local homedir
+ read homedir
+
+ elog ""
+ elog "Setting home directory to: ${homedir}"
+
+ /usr/sbin/usermod -d"${homedir}" tomcat
+
+ elog "You can run emerge --config =${PF}"
+ elog "again to change to homedir"
+ elog "at any time."
+ fi
+}
diff --git a/www-servers/tomcat/tomcat-6.0.10-r4.ebuild b/www-servers/tomcat/tomcat-6.0.10-r5.ebuild
index 8a75a202c345..61251ad93be2 100644
--- a/www-servers/tomcat/tomcat-6.0.10-r4.ebuild
+++ b/www-servers/tomcat/tomcat-6.0.10-r5.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2007 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.10-r4.ebuild,v 1.1 2007/04/23 20:40:14 wltjr Exp $
+# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-6.0.10-r5.ebuild,v 1.1 2007/05/15 04:37:21 wltjr Exp $
WANT_ANT_TASKS="ant-trax"
@@ -118,6 +118,9 @@ src_install() {
cp -pR conf/* ${D}/etc/${TOMCAT_NAME} || die "failed to copy conf"
cp -pPR output/build/bin ${D}/usr/share/${TOMCAT_NAME} || die "failed to copy"
+ # replace catalina.policy with gentoo specific one bug #176701
+# cp ${FILESDIR}/${SLOT}/catalina.policy ${D}/etc/${TOMCAT_NAME} || die "failed to replace catalina.policy"
+
cp ${T}/tomcat6-deps/jdt/jasper-jdt.jar ${D}/usr/share/${TOMCAT_NAME}/lib \
|| die "failed to copy"
@@ -161,6 +164,9 @@ src_install() {
}
pkg_postinst() {
+ # temp fix for bug #176097
+ chown -fR tomcat:tomcat /etc/${TOMCAT_NAME}
+
elog
elog " This ebuild implements a FHS compliant layout for tomcat"
elog " Please read http://www.gentoo.org/proj/en/java/tomcat6-guide.xml"