From 7d768a7b96d6a26d5970b2c12e722f07757da1a5 Mon Sep 17 00:00:00 2001 From: William Thomson Date: Mon, 2 Apr 2007 16:24:29 +0000 Subject: Modified ebuild to work with split-ant, or not since it needs to be stabilized ASAP, and split ant is not stable yet. Package-Manager: portage-2.1.2.2 --- www-servers/tomcat/ChangeLog | 9 +- www-servers/tomcat/Manifest | 22 +- www-servers/tomcat/files/digest-tomcat-5.5.23 | 3 - www-servers/tomcat/files/digest-tomcat-5.5.23-r1 | 3 + www-servers/tomcat/tomcat-5.5.23-r1.ebuild | 329 +++++++++++++++++++++++ www-servers/tomcat/tomcat-5.5.23.ebuild | 328 ---------------------- 6 files changed, 351 insertions(+), 343 deletions(-) delete mode 100644 www-servers/tomcat/files/digest-tomcat-5.5.23 create mode 100644 www-servers/tomcat/files/digest-tomcat-5.5.23-r1 create mode 100644 www-servers/tomcat/tomcat-5.5.23-r1.ebuild delete mode 100644 www-servers/tomcat/tomcat-5.5.23.ebuild (limited to 'www-servers') diff --git a/www-servers/tomcat/ChangeLog b/www-servers/tomcat/ChangeLog index 6f1b86f154ef..0da8cad6112d 100644 --- a/www-servers/tomcat/ChangeLog +++ b/www-servers/tomcat/ChangeLog @@ -1,6 +1,13 @@ # 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.129 2007/03/30 23:17:05 wltjr Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.130 2007/04/02 16:24:29 wltjr Exp $ + +*tomcat-5.5.23-r1 (02 Apr 2007) + + 02 Apr 2007; William L. Thomson Jr. + -tomcat-5.5.23.ebuild, +tomcat-5.5.23-r1.ebuild: + Modified ebuild to work with split-ant, or not since it needs to be + stabilized ASAP, and split ant is not stable yet. 30 Mar 2007; William L. Thomson Jr. tomcat-5.5.20-r8.ebuild, tomcat-5.5.23.ebuild, tomcat-6.0.10-r1.ebuild: diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 4cd38a230af0..0497f3d82e83 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -93,18 +93,18 @@ EBUILD tomcat-5.5.20-r8.ebuild 10244 RMD160 d99fee7973616b0b7f165ccdb1d2126a7fee MD5 b35390dd66d703bef0d76905378f3f8c tomcat-5.5.20-r8.ebuild 10244 RMD160 d99fee7973616b0b7f165ccdb1d2126a7fee031c tomcat-5.5.20-r8.ebuild 10244 SHA256 215bb2f0f8ef97b47f2003c5c79862b54243a0decb52d965a51af45590f93ec9 tomcat-5.5.20-r8.ebuild 10244 -EBUILD tomcat-5.5.23.ebuild 10536 RMD160 04b34cdf8b4a7f94ac6f27675329f56934483a08 SHA1 230d6461f32f638e1d6be8670de6a053b169efd8 SHA256 8441ec3f77be4ed8a9f61b2d74386ff423b124f027a1e29acb3a40bff49a6cbb -MD5 776a987f7a5678daac42a02ecb01e331 tomcat-5.5.23.ebuild 10536 -RMD160 04b34cdf8b4a7f94ac6f27675329f56934483a08 tomcat-5.5.23.ebuild 10536 -SHA256 8441ec3f77be4ed8a9f61b2d74386ff423b124f027a1e29acb3a40bff49a6cbb tomcat-5.5.23.ebuild 10536 +EBUILD tomcat-5.5.23-r1.ebuild 10586 RMD160 68b348b5cd512de49a277c39e0ade0c8f877161c SHA1 d7a08e474d8f12d35c5eae11450eb3bc19cc89b2 SHA256 d4618860e9fd2da7c501d021fa1c68c6d4d945c9d2aeaf4dfc27dcf2e0eda625 +MD5 218569e768631547f9c812c9a0ebb7f6 tomcat-5.5.23-r1.ebuild 10586 +RMD160 68b348b5cd512de49a277c39e0ade0c8f877161c tomcat-5.5.23-r1.ebuild 10586 +SHA256 d4618860e9fd2da7c501d021fa1c68c6d4d945c9d2aeaf4dfc27dcf2e0eda625 tomcat-5.5.23-r1.ebuild 10586 EBUILD tomcat-6.0.10-r1.ebuild 5020 RMD160 47410070eee746c2e9d35934acad4f1d826a56d2 SHA1 3dc49b928e184a0f7a09f0169c61d6beb836840a SHA256 9adb6e238ea27e8febeaaf0279c721f287bc0118dea14d62cdf0c57caca4dfe2 MD5 d10ccf2250d5978776b327eb2114abc0 tomcat-6.0.10-r1.ebuild 5020 RMD160 47410070eee746c2e9d35934acad4f1d826a56d2 tomcat-6.0.10-r1.ebuild 5020 SHA256 9adb6e238ea27e8febeaaf0279c721f287bc0118dea14d62cdf0c57caca4dfe2 tomcat-6.0.10-r1.ebuild 5020 -MISC ChangeLog 41890 RMD160 40f7991444e4fc1ca18f89537bddb73a2345aad0 SHA1 6b1a3718048934499f56a5b76ba07ce500fb7018 SHA256 0679fb55c75283a27f7d11b4c4455cd74e02035abda217738e6b49f4f402e9d9 -MD5 157940a8137073d799811c13cfcc5647 ChangeLog 41890 -RMD160 40f7991444e4fc1ca18f89537bddb73a2345aad0 ChangeLog 41890 -SHA256 0679fb55c75283a27f7d11b4c4455cd74e02035abda217738e6b49f4f402e9d9 ChangeLog 41890 +MISC ChangeLog 42154 RMD160 456ff023ee01fc3bd7ad131166caee537de8f070 SHA1 f6eefe0223a21621da61f089b9f53723d6483f84 SHA256 20d7f5b615b59c188d26c17142559200b53eee1d372219814216c6766d8be650 +MD5 d8e8d40805bd7e8c4d1316d6f2691fe5 ChangeLog 42154 +RMD160 456ff023ee01fc3bd7ad131166caee537de8f070 ChangeLog 42154 +SHA256 20d7f5b615b59c188d26c17142559200b53eee1d372219814216c6766d8be650 ChangeLog 42154 MISC metadata.xml 556 RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 SHA1 e8dcd8204d0ea02558dd07e1aded5dc58ed1460c SHA256 ac94c1d58b05b47598f311e6efb971fdb30ad9a25f3c32cb9c064fb6330dad79 MD5 0609d3339e0b8d5a3b4707f6b02aad3a metadata.xml 556 RMD160 88a7809fe3f73c2d351b9fdda025fe88dfb11f31 metadata.xml 556 @@ -112,9 +112,9 @@ SHA256 ac94c1d58b05b47598f311e6efb971fdb30ad9a25f3c32cb9c064fb6330dad79 metadata MD5 8adc14a8534e1c6f8d5f96b371e1895f files/digest-tomcat-5.5.20-r8 277 RMD160 b9c5deac84bf5acd7a65ad80bdfaca9f7e343f3f files/digest-tomcat-5.5.20-r8 277 SHA256 fda2efc7c4fe103d3fec9599fe3797d8784381008f71d9006c7224db91862b30 files/digest-tomcat-5.5.20-r8 277 -MD5 6947c731df35ce2149f4a2f8009b575f files/digest-tomcat-5.5.23 277 -RMD160 c7a3b4f7dd1b085332606c3d6a68cc21f0ff78e2 files/digest-tomcat-5.5.23 277 -SHA256 7c1430575374307e6337ec7f22b7822c2093deb36bb3e9fffaa4cf8b23f34051 files/digest-tomcat-5.5.23 277 +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-r1 277 RMD160 3d16b85b1dcb55e6874b535c06f2a5df00b46ce1 files/digest-tomcat-6.0.10-r1 277 SHA256 49aef00c733c574a5c8536a6e5406769105dbe0b64ad0ea9b9682ca42bff23f0 files/digest-tomcat-6.0.10-r1 277 diff --git a/www-servers/tomcat/files/digest-tomcat-5.5.23 b/www-servers/tomcat/files/digest-tomcat-5.5.23 deleted file mode 100644 index e0e59f68fbb2..000000000000 --- a/www-servers/tomcat/files/digest-tomcat-5.5.23 +++ /dev/null @@ -1,3 +0,0 @@ -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-5.5.23-r1 b/www-servers/tomcat/files/digest-tomcat-5.5.23-r1 new file mode 100644 index 000000000000..e0e59f68fbb2 --- /dev/null +++ b/www-servers/tomcat/files/digest-tomcat-5.5.23-r1 @@ -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/tomcat-5.5.23-r1.ebuild b/www-servers/tomcat/tomcat-5.5.23-r1.ebuild new file mode 100644 index 000000000000..6d1f2222eaeb --- /dev/null +++ b/www-servers/tomcat/tomcat-5.5.23-r1.ebuild @@ -0,0 +1,329 @@ +# 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-r1.ebuild,v 1.1 2007/04/02 16:24:29 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} + 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} + || ( dev-java/ant-trax dev-java/ant-tasks ) " + +S=${WORKDIR}/${MY_P} + +TOMCAT_NAME="${PN}-${SLOT}" +WEBAPPS_DIR="/var/lib/${TOMCAT_NAME}/webapps" + +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 + + # 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 ${TOMCAT_NAME} + newconfd ${FILESDIR}/${SLOT}/tomcat.conf ${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" + + 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-5.5.23.ebuild b/www-servers/tomcat/tomcat-5.5.23.ebuild deleted file mode 100644 index 2b46aa23279f..000000000000 --- a/www-servers/tomcat/tomcat-5.5.23.ebuild +++ /dev/null @@ -1,328 +0,0 @@ -# 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.ebuild,v 1.3 2007/03/30 23:17:05 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} - 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() { - # 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 - - # 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 ${TOMCAT_NAME} - newconfd ${FILESDIR}/${SLOT}/tomcat.conf ${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" - - 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 -} -- cgit v1.2.3-65-gdbad