From 2d0d3dce323a651bb1a58317dc7fc051a0b52010 Mon Sep 17 00:00:00 2001 From: Jan Brinkmann Date: Sun, 15 May 2005 15:36:37 +0000 Subject: fixed problem with userpriv, see #92663. default shutdown password now gets replaced with a random one, see #92281 (Portage version: 2.0.51.21) --- www-servers/tomcat/ChangeLog | 10 +- www-servers/tomcat/Manifest | 18 +--- www-servers/tomcat/files/digest-tomcat-5.0.27-r5 | 1 - www-servers/tomcat/files/digest-tomcat-5.0.27-r6 | 1 + www-servers/tomcat/tomcat-5.0.27-r5.ebuild | 125 ---------------------- www-servers/tomcat/tomcat-5.0.27-r6.ebuild | 129 +++++++++++++++++++++++ www-servers/tomcat/tomcat-5.0.28-r3.ebuild | 46 ++++---- 7 files changed, 164 insertions(+), 166 deletions(-) delete mode 100644 www-servers/tomcat/files/digest-tomcat-5.0.27-r5 create mode 100644 www-servers/tomcat/files/digest-tomcat-5.0.27-r6 delete mode 100644 www-servers/tomcat/tomcat-5.0.27-r5.ebuild create mode 100644 www-servers/tomcat/tomcat-5.0.27-r6.ebuild (limited to 'www-servers') diff --git a/www-servers/tomcat/ChangeLog b/www-servers/tomcat/ChangeLog index e904bb2801b5..9dd4673c4825 100644 --- a/www-servers/tomcat/ChangeLog +++ b/www-servers/tomcat/ChangeLog @@ -1,6 +1,14 @@ # ChangeLog for www-servers/tomcat # Copyright 2002-2005 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.29 2005/05/14 16:13:34 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/ChangeLog,v 1.30 2005/05/15 15:36:37 luckyduck Exp $ + +*tomcat-5.0.27-r6 (15 May 2005) + + 15 May 2005; Jan Brinkmann + -tomcat-5.0.27-r5.ebuild, +tomcat-5.0.27-r6.ebuild, + tomcat-5.0.28-r3.ebuild: + fixed problem with userpriv, see #92663. default shutdown password now gets + replaced with a random one, see #92281 *tomcat-5.0.28-r3 (14 May 2005) diff --git a/www-servers/tomcat/Manifest b/www-servers/tomcat/Manifest index 15698941d120..108e0a5147b8 100644 --- a/www-servers/tomcat/Manifest +++ b/www-servers/tomcat/Manifest @@ -1,11 +1,8 @@ ------BEGIN PGP SIGNED MESSAGE----- -Hash: SHA1 - -MD5 65da85ab9720d9a3b9089a24676d8441 tomcat-5.0.28-r3.ebuild 9894 -MD5 f1fe88bfc0fcd20ac959642431e6ffc7 tomcat-5.0.27-r5.ebuild 3756 -MD5 c77c73dbbeddd8c2d2d25697426186ab ChangeLog 15987 +MD5 dc2bf09c4d8f3a3bdd1cb1e5f58fc30e tomcat-5.0.28-r3.ebuild 9861 +MD5 0a4b9e6513220a9be35787340aaba1d9 tomcat-5.0.27-r6.ebuild 3931 +MD5 9cc9deb1c7d8a315c36b8bec9431a241 ChangeLog 16273 MD5 c11ce937193406815ff7a2b306784fd8 metadata.xml 555 -MD5 d5a48abc8db5543a73abbbf151d0630e files/digest-tomcat-5.0.27-r5 75 +MD5 d5a48abc8db5543a73abbbf151d0630e files/digest-tomcat-5.0.27-r6 75 MD5 af26ca4772989a2090085a6e24b71628 files/digest-tomcat-5.0.28-r3 78 MD5 cbb635ed31e3b7ddabe1db851a8b471e files/5.0.27/gentoo.diff 463 MD5 38c130772e7d43dcdff78b3d94f96efd files/5.0.27/tomcat.env 27 @@ -20,10 +17,3 @@ MD5 d538c7caef4b5cecd6cc95ee1988bace files/5.0.28/tomcat.conf 2652 MD5 c0d89ffb4276e8a6d0cf08fcad6517f9 files/5.0.28/tomcat.init 701 MD5 744a9ce174144fc5689c1fabee527e55 files/5.0.28/build.xml-02.patch 3177 MD5 98a29b32de00d97f156dc31dfe3cf472 files/5.0.28/jikes.diff 584 ------BEGIN PGP SIGNATURE----- -Version: GnuPG v1.4.0 (GNU/Linux) - -iD8DBQFChiPC06ebR+OMO78RAhARAJ4k6V3rjXtmgmfkBFwEHkJcfcZNVwCeP+X3 -VWGU7cbvKwP0cWBvQucAWUo= -=WeIz ------END PGP SIGNATURE----- diff --git a/www-servers/tomcat/files/digest-tomcat-5.0.27-r5 b/www-servers/tomcat/files/digest-tomcat-5.0.27-r5 deleted file mode 100644 index f96d1cd9d33a..000000000000 --- a/www-servers/tomcat/files/digest-tomcat-5.0.27-r5 +++ /dev/null @@ -1 +0,0 @@ -MD5 b802ee042677e284bcf65738c7bdc3b6 jakarta-tomcat-5.0.27.tar.gz 10298374 diff --git a/www-servers/tomcat/files/digest-tomcat-5.0.27-r6 b/www-servers/tomcat/files/digest-tomcat-5.0.27-r6 new file mode 100644 index 000000000000..f96d1cd9d33a --- /dev/null +++ b/www-servers/tomcat/files/digest-tomcat-5.0.27-r6 @@ -0,0 +1 @@ +MD5 b802ee042677e284bcf65738c7bdc3b6 jakarta-tomcat-5.0.27.tar.gz 10298374 diff --git a/www-servers/tomcat/tomcat-5.0.27-r5.ebuild b/www-servers/tomcat/tomcat-5.0.27-r5.ebuild deleted file mode 100644 index d889c8ba9222..000000000000 --- a/www-servers/tomcat/tomcat-5.0.27-r5.ebuild +++ /dev/null @@ -1,125 +0,0 @@ -# Copyright 1999-2005 Gentoo Foundation -# Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.0.27-r5.ebuild,v 1.1 2005/04/13 18:22:59 luckyduck Exp $ - -inherit eutils - -DESCRIPTION="Apache Servlet-2.4/JSP-2.0 Container" - -JT_P="jakarta-${P}.tar.gz" -S=${WORKDIR}/jakarta-${P} -SLOT="${PV/.*}" -SRC_URI="mirror://apache/jakarta/tomcat-${SLOT}/v${PV}/bin/${JT_P}" -HOMEPAGE="http://jakarta.apache.org/tomcat" -KEYWORDS="x86 ppc ~sparc ~alpha ~amd64 ~ppc64" -LICENSE="Apache-2.0" -DEPEND="sys-apps/sed" -RDEPEND=">=virtual/jdk-1.3 - jikes? ( dev-java/jikes )" -IUSE="doc jikes" - -TOMCAT_HOME="/opt/${PN}${SLOT}" -TOMCAT_NAME="${PN}${SLOT}" - -src_unpack() { - unpack ${A} - cd ${S} - epatch ${FILESDIR}/${PV}/gentoo.diff - use jikes && epatch ${FILESDIR}/${PV}/jikes.diff -} - -src_install() { - dodoc RELEASE* RUNNING.txt LICENSE - - # init.d, conf.d , env.d - insinto /etc/init.d - insopts -m0750 - newins ${FILESDIR}/${PV}/${PN}.init ${TOMCAT_NAME} - - newenvd ${FILESDIR}/${PV}/${PN}.env 21${PN} - - insinto /etc/conf.d - insopts -m0644 - newins ${FILESDIR}/${PV}/${PN}.conf ${TOMCAT_NAME} - use jikes && sed -e "\cCATALINA_OPTScaCATALINA_OPTS=\"-Dbuild.compiler.emacs=true\"" -i ${D}/etc/conf.d/${TOMCAT_NAME} - - diropts -m750 - dodir ${TOMCAT_HOME} /var/log/${TOMCAT_NAME} /etc/${TOMCAT_NAME} - keepdir /var/log/${TOMCAT_NAME} - - # we don't want DOS related things - rm -f bin/*.{bat,exe} - - mv conf/* ${D}/etc/${TOMCAT_NAME} - mv bin common server shared temp work ${D}${TOMCAT_HOME} - keepdir ${TOMCAT_HOME}/{work,temp} - - if ! use doc; then - rm -rf webapps/{tomcat-docs,jsp-examples,servlets-examples} - fi - mv webapps ${D}${TOMCAT_HOME} - - dosym /etc/${TOMCAT_NAME} ${TOMCAT_HOME}/conf - dosym /var/log/${TOMCAT_NAME} ${TOMCAT_HOME}/logs - - fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml -} - - -pkg_preinst() { - enewgroup tomcat - enewuser tomcat -1 -1 /dev/null tomcat - - chown -R tomcat:tomcat ${D}/opt/${TOMCAT_NAME} - chown -R tomcat:tomcat ${D}/etc/${TOMCAT_NAME} - chown -R tomcat:tomcat ${D}/var/log/${TOMCAT_NAME} -} - -pkg_postinst() { - #due to previous ebuild bloopers, make sure everything is correct - chown -R root:root /usr/share/doc/${PF} - chown root:root /etc/init.d/${TOMCAT_NAME} - chown root:root /etc/conf.d/${TOMCAT_NAME} - - chown -R tomcat:tomcat /opt/${TOMCAT_NAME} - chown -R tomcat:tomcat /etc/${TOMCAT_NAME} - chown -R tomcat:tomcat /var/log/${TOMCAT_NAME} - - chmod 750 /etc/${TOMCAT_NAME} - - einfo " " - einfo " NOTICE!" - einfo " FILE LOCATIONS:" - einfo " 1. Tomcat home directory: ${TOMCAT_HOME}" - einfo " Contains application data, configuration files." - einfo " 2. Runtime settings: /etc/conf.d/${TOMCAT_NAME}" - einfo " Contains CLASSPATH and JAVA_HOME settings." - einfo " 3. Configuration: /etc/${TOMCAT_NAME}" - einfo " 4. Logs: /var/log/${TOMCAT_NAME}/" - einfo " " - einfo " " - einfo " STARTING AND STOPPING TOMCAT:" - einfo " /etc/init.d/${TOMCAT_NAME} start" - einfo " /etc/init.d/${TOMCAT_NAME} stop" - einfo " /etc/init.d/${TOMCAT_NAME} restart" - einfo " " - einfo " " - ewarn " If you are upgrading from older ebuild do NOT use" - ewarn " /etc/init.d/tomcat and /etc/conf.d/tomcat you probably" - ewarn " want to remove these. " - ewarn " A version number has been appended so that tomcat 3, 4 and 5" - ewarn " can be installed side by side" - einfo " " - einfo " NETWORK CONFIGURATION:" - einfo " By default, Tomcat runs on port 8080. You can change this" - einfo " value by editing /etc/${TOMCAT_NAME}/server.xml." - einfo " " - einfo " To test Tomcat while it's running, point your web browser to:" - einfo " http://localhost:8080/" - einfo " " - einfo " " - einfo " BUGS:" - einfo " Please file any bugs at http://bugs.gentoo.org/ or else it" - einfo " may not get seen. Thank you." - einfo " " -} diff --git a/www-servers/tomcat/tomcat-5.0.27-r6.ebuild b/www-servers/tomcat/tomcat-5.0.27-r6.ebuild new file mode 100644 index 000000000000..4edb346d5061 --- /dev/null +++ b/www-servers/tomcat/tomcat-5.0.27-r6.ebuild @@ -0,0 +1,129 @@ +# Copyright 1999-2005 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.0.27-r6.ebuild,v 1.1 2005/05/15 15:36:37 luckyduck Exp $ + +inherit eutils + +DESCRIPTION="Apache Servlet-2.4/JSP-2.0 Container" + +JT_P="jakarta-${P}.tar.gz" +S=${WORKDIR}/jakarta-${P} +SLOT="${PV/.*}" +SRC_URI="mirror://apache/jakarta/tomcat-${SLOT}/v${PV}/bin/${JT_P}" +HOMEPAGE="http://jakarta.apache.org/tomcat" +KEYWORDS="x86 ppc ~sparc ~alpha ~amd64 ~ppc64" +LICENSE="Apache-2.0" +DEPEND="sys-apps/sed" +RDEPEND=">=virtual/jdk-1.3 + jikes? ( dev-java/jikes )" +IUSE="doc jikes" + +TOMCAT_HOME="/opt/${PN}${SLOT}" +TOMCAT_NAME="${PN}${SLOT}" + +src_unpack() { + unpack ${A} + cd ${S} + epatch ${FILESDIR}/${PV}/gentoo.diff + use jikes && epatch ${FILESDIR}/${PV}/jikes.diff +} + +src_install() { + dodoc RELEASE* RUNNING.txt LICENSE + + # init.d, conf.d , env.d + insinto /etc/init.d + insopts -m0750 + newins ${FILESDIR}/${PV}/${PN}.init ${TOMCAT_NAME} + + newenvd ${FILESDIR}/${PV}/${PN}.env 21${PN} + + insinto /etc/conf.d + insopts -m0644 + newins ${FILESDIR}/${PV}/${PN}.conf ${TOMCAT_NAME} + use jikes && sed -e "\cCATALINA_OPTScaCATALINA_OPTS=\"-Dbuild.compiler.emacs=true\"" -i ${D}/etc/conf.d/${TOMCAT_NAME} + + diropts -m750 + dodir ${TOMCAT_HOME} /var/log/${TOMCAT_NAME} /etc/${TOMCAT_NAME} + keepdir /var/log/${TOMCAT_NAME} + + # we don't want DOS related things + rm -f bin/*.{bat,exe} + + # 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 + + mv conf/* ${D}/etc/${TOMCAT_NAME} + mv bin common server shared temp work ${D}${TOMCAT_HOME} + keepdir ${TOMCAT_HOME}/{work,temp} + + if ! use doc; then + rm -rf webapps/{tomcat-docs,jsp-examples,servlets-examples} + fi + mv webapps ${D}${TOMCAT_HOME} + + dosym /etc/${TOMCAT_NAME} ${TOMCAT_HOME}/conf + dosym /var/log/${TOMCAT_NAME} ${TOMCAT_HOME}/logs + + fperms 640 /etc/${TOMCAT_NAME}/tomcat-users.xml +} + + +pkg_preinst() { + enewgroup tomcat + enewuser tomcat -1 -1 /dev/null tomcat + + chown -R tomcat:tomcat ${D}/opt/${TOMCAT_NAME} + chown -R tomcat:tomcat ${D}/etc/${TOMCAT_NAME} + chown -R tomcat:tomcat ${D}/var/log/${TOMCAT_NAME} +} + +pkg_postinst() { + #due to previous ebuild bloopers, make sure everything is correct + chown -R root:root /usr/share/doc/${PF} + chown root:root /etc/init.d/${TOMCAT_NAME} + chown root:root /etc/conf.d/${TOMCAT_NAME} + + chown -R tomcat:tomcat /opt/${TOMCAT_NAME} + chown -R tomcat:tomcat /etc/${TOMCAT_NAME} + chown -R tomcat:tomcat /var/log/${TOMCAT_NAME} + + chmod 750 /etc/${TOMCAT_NAME} + + einfo " " + einfo " NOTICE!" + einfo " FILE LOCATIONS:" + einfo " 1. Tomcat home directory: ${TOMCAT_HOME}" + einfo " Contains application data, configuration files." + einfo " 2. Runtime settings: /etc/conf.d/${TOMCAT_NAME}" + einfo " Contains CLASSPATH and JAVA_HOME settings." + einfo " 3. Configuration: /etc/${TOMCAT_NAME}" + einfo " 4. Logs: /var/log/${TOMCAT_NAME}/" + einfo " " + einfo " " + einfo " STARTING AND STOPPING TOMCAT:" + einfo " /etc/init.d/${TOMCAT_NAME} start" + einfo " /etc/init.d/${TOMCAT_NAME} stop" + einfo " /etc/init.d/${TOMCAT_NAME} restart" + einfo " " + einfo " " + ewarn " If you are upgrading from older ebuild do NOT use" + ewarn " /etc/init.d/tomcat and /etc/conf.d/tomcat you probably" + ewarn " want to remove these. " + ewarn " A version number has been appended so that tomcat 3, 4 and 5" + ewarn " can be installed side by side" + einfo " " + einfo " NETWORK CONFIGURATION:" + einfo " By default, Tomcat runs on port 8080. You can change this" + einfo " value by editing /etc/${TOMCAT_NAME}/server.xml." + einfo " " + einfo " To test Tomcat while it's running, point your web browser to:" + einfo " http://localhost:8080/" + einfo " " + einfo " " + einfo " BUGS:" + einfo " Please file any bugs at http://bugs.gentoo.org/ or else it" + einfo " may not get seen. Thank you." + einfo " " +} diff --git a/www-servers/tomcat/tomcat-5.0.28-r3.ebuild b/www-servers/tomcat/tomcat-5.0.28-r3.ebuild index 07b6f8246124..5792f0377ac1 100644 --- a/www-servers/tomcat/tomcat-5.0.28-r3.ebuild +++ b/www-servers/tomcat/tomcat-5.0.28-r3.ebuild @@ -1,6 +1,6 @@ # Copyright 1999-2005 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.0.28-r3.ebuild,v 1.1 2005/05/14 16:13:34 luckyduck Exp $ +# $Header: /var/cvsroot/gentoo-x86/www-servers/tomcat/tomcat-5.0.28-r3.ebuild,v 1.2 2005/05/15 15:36:37 luckyduck Exp $ inherit eutils java-pkg @@ -131,14 +131,20 @@ src_install() { fi # create dir structure - dodir /usr/share/${TOMCAT_NAME} diropts -m750 + dodir /usr/share/${TOMCAT_NAME} + chown root:tomcat ${D}/usr/share/${TOMCAT_NAME} dodir /var/log/${TOMCAT_NAME}/default + chown -R tomcat:tomcat ${D}/var/log/${TOMCAT_NAME} dodir /etc/${TOMCAT_NAME}/default/ + chown -R tomcat:tomcat ${D}/etc/${TOMCAT_NAME} dodir /var/tmp/${TOMCAT_NAME}/default + chown -R tomcat:tomcat ${D}/var/tmp/${TOMCAT_NAME} dodir /var/run/${TOMCAT_NAME}/default + chown -R tomcat:tomcat ${D}/var/run/${TOMCAT_NAME} dodir /var/lib/${TOMCAT_NAME}/default + chown -R tomcat:tomcat ${D}/var/lib/${TOMCAT_NAME} keepdir /var/log/${TOMCAT_NAME}/default keepdir /etc/${TOMCAT_NAME}/default/ @@ -156,7 +162,7 @@ src_install() { conf/Catalina/localhost # make the jars available via java-config -p and jar-from, etc - base=`pwd` + base=$(pwd) libdirs="common/lib server/lib" for dir in ${libdirs} do @@ -168,12 +174,13 @@ src_install() { if [ ! -L ${jar} ]; then java-pkg_dojar ${jar} rm -f ${jar} - ln -s ${DESTTREE}/share/${PN}-${SLOT}/lib/${jar} ${jar} + ln -s ${DESTTREE}/share/${TOMCAT_NAME}/lib/${jar} ${jar} fi done cd ${base} done + chown -R root:tomcat ${D}/usr/share/${TOMCAT_NAME} # replace a packed struts.jar cd server/webapps/admin/WEB-INF/lib @@ -181,15 +188,20 @@ src_install() { java-pkg_jar-from struts struts.jar cd ${base} - # copy over the directories - cp -ra conf/* ${D}/etc/${TOMCAT_NAME}/default || die "failed to copy conf" - cp -ra bin common server shared ${D}/usr/share/${TOMCAT_NAME} || die "failed to copy" + # 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 root:tomcat conf/ bin/ common/ server/ shared/ + cp -pra conf/* ${D}/etc/${TOMCAT_NAME}/default || die "failed to copy conf" + cp -pra bin common server shared ${D}/usr/share/${TOMCAT_NAME} || die "failed to copy" # if the useflag is set, copy over the examples dodir /var/lib/${TOMCAT_NAME}/default/webapps if use examples; then - cp ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt - cp -r webapps/{tomcat-docs,jsp-examples,servlets-examples,ROOT,webdav} \ + cp -p ../RELEASE-NOTES webapps/ROOT/RELEASE-NOTES.txt + cp -pr webapps/{tomcat-docs,jsp-examples,servlets-examples,ROOT,webdav} \ ${D}/var/lib/${TOMCAT_NAME}/default/webapps fi @@ -207,13 +219,6 @@ src_install() { pkg_preinst() { enewgroup tomcat enewuser tomcat -1 -1 /dev/null tomcat - - chown -R root:tomcat ${D}/usr/share/${TOMCAT_NAME} - chown -R tomcat:tomcat ${D}/etc/${TOMCAT_NAME} - chown -R tomcat:tomcat ${D}/var/log/${TOMCAT_NAME} - chown -R tomcat:tomcat ${D}/var/tmp/${TOMCAT_NAME} - chown -R tomcat:tomcat ${D}/var/run/${TOMCAT_NAME} - chown -R tomcat:tomcat ${D}/var/lib/${TOMCAT_NAME} } pkg_postinst() { @@ -221,15 +226,6 @@ pkg_postinst() { chown root:root /etc/init.d/${TOMCAT_NAME} chown root:root /etc/conf.d/${TOMCAT_NAME} - # These directories contain the runtime files and - # are therefor owned by tomcat - chown -R tomcat:tomcat /etc/${TOMCAT_NAME} - chown -R tomcat:tomcat /var/log/${TOMCAT_NAME} - chown -R tomcat:tomcat /var/tmp/${TOMCAT_NAME} - chown -R tomcat:tomcat /var/run/${TOMCAT_NAME} - chown -R tomcat:tomcat /var/lib/${TOMCAT_NAME} - - chmod 750 /etc/${TOMCAT_NAME} einfo " " -- cgit v1.2.3-65-gdbad