Date: Sunday, January 29, 2012 @ 13:12:23 Author: ibiru Revision: 148004
archrelease: copy trunk to extra-any Added: tomcat7/repos/extra-any/PKGBUILD (from rev 148003, tomcat7/trunk/PKGBUILD) tomcat7/repos/extra-any/tomcat7 (from rev 148003, tomcat7/trunk/tomcat7) tomcat7/repos/extra-any/tomcat7.conf.d (from rev 148003, tomcat7/trunk/tomcat7.conf.d) tomcat7/repos/extra-any/tomcat7.install (from rev 148003, tomcat7/trunk/tomcat7.install) Deleted: tomcat7/repos/extra-any/PKGBUILD tomcat7/repos/extra-any/tomcat7 tomcat7/repos/extra-any/tomcat7.conf.d tomcat7/repos/extra-any/tomcat7.install -----------------+ PKGBUILD | 259 ++++++++++++++++++++++++++---------------------------- tomcat7 | 154 ++++++++++++++++---------------- tomcat7.conf.d | 30 +++--- tomcat7.install | 54 +++++------ 4 files changed, 247 insertions(+), 250 deletions(-) Deleted: PKGBUILD =================================================================== --- PKGBUILD 2012-01-29 17:42:00 UTC (rev 148003) +++ PKGBUILD 2012-01-29 18:12:23 UTC (rev 148004) @@ -1,131 +0,0 @@ -# Maintainer: Guillaume ALAUX <guilla...@archlinux.org> -pkgbase=tomcat7 -pkgname=('java-servlet3.0-tomcat' 'java-jsp2.2-tomcat' 'tomcat7') -pkgver=7.0.22 -pkgrel=2 -arch=('any') -url='http://tomcat.apache.org/' -license=('APACHE') -# Does not build with JDK7. Same issue as with cassandra: -# https://issues.apache.org/jira/browse/CASSANDRA-3275 -#makedepends=('java-environment>=6' 'apache-ant>=1.8' 'java-commons-daemon' 'eclipse-ecj') -makedepends=('java-environment=6' 'apache-ant>=1.8' 'java-commons-daemon' 'eclipse-ecj') -source=(http://archive.apache.org/dist/tomcat/tomcat-7/v${pkgver}/src/apache-tomcat-${pkgver}-src.tar.gz - http://www.apache.org/dist/commons/dbcp/binaries/commons-dbcp-1.4-bin.tar.gz - tomcat7.conf.d - tomcat7 - tomcat7.install) - -md5sums=('878bc216d86ce803f3bbc65fd40eb96c' - 'bd272e9611b0d880fd02493377d4691b' - 'eea5573b0acd985bb8b630a20719db76' - '361a41c02930a4e43245ab7379a617e9' - '6c5b4ed6d71b227f305b751c349fa31b') - -_servletver=3.0 -_jspver=2.2 - -build() { - cd "${srcdir}/apache-tomcat-${pkgver}-src" - - . /etc/profile.d/apache-ant.sh - ant deploy \ - -Dbase.path=${srcdir}/DOWN_LIBS \ - -Dcommons-daemon.jar=/usr/share/java/commons-daemon.jar \ - -Djdt.jar=/usr/share/java/eclipse-ecj.jar \ - -Dtomcat-dbcp.jar=${srcdir}/commons-dbcp-1.4/commons-dbcp-1.4.jar \ - -Dtomcat-dbcp-src.jar=${srcdir}/commons-dbcp-1.4/commons-dbcp-1.4-sources.jar -} - -#TODO add test "ant test" - -package_java-servlet3.0-tomcat() { - pkgdesc="Servlet 3.0 java library implementation by Apache Tomcat" - depends=('java-environment>=5') - - cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib" - - install -dm755 ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat - install -m644 servlet-api.jar \ - ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar - ln -s servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \ - ${pkgdir}/usr/share/java/servlet-api.jar -} - -package_java-jsp2.2-tomcat() { - pkgdesc="JSP 2.2 java library implementation by Apache Tomcat" - depends=('java-environment>=5') - - cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib" - - install -dm755 ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat - for j in el-api jsp-api; do - install -m644 ${j}.jar \ - ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar - ln -s jsp${_jspver}-tomcat/${j}-${_jspver}.jar ${pkgdir}/usr/share/java/${j}.jar - done -} - -package_tomcat7() { - pkgdesc="Servlet-3.0/JSP-2.2 Container" - depends=('java-runtime>=6' 'java-jsvc' 'java-servlet3.0-tomcat' 'java-jsp2.2-tomcat' 'eclipse-ecj') - optdepends=('tomcat-native: to allow optimal performance in production environments') - backup=(etc/tomcat7/catalina.policy - etc/tomcat7/catalina.properties - etc/tomcat7/context.xml - etc/tomcat7/logging.properties - etc/tomcat7/server.xml - etc/tomcat7/tomcat-users.xml - etc/tomcat7/web.xml - etc/conf.d/tomcat7) - install=tomcat7.install - - cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build" - - # Tomcat general files - install -dm755 ${pkgdir}/usr/share/{,java/}${pkgname} - # commons-daemon and tomcat-natives are packaged on their own - rm bin/{*.bat,commons-daemon*,tomcat-native.tar.gz} - cp -r bin ${pkgdir}/usr/share/${pkgname} - - # eclipse-ecj is packaged on its own - rm lib/eclipse-ecj.jar - install -m644 lib/* ${pkgdir}/usr/share/java/${pkgname} - - # Provided by previous packages - rm ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar - ln -s /usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \ - ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar - - for j in el-api jsp-api; do - rm ${pkgdir}/usr/share/java/${pkgname}/${j}.jar - ln -s /usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar \ - ${pkgdir}/usr/share/java/${pkgname}/${j}.jar - done - ln -s /usr/share/java/${pkgname} ${pkgdir}/usr/share/${pkgname}/lib - - # 66=tomcat / 19=log - install -dm775 -o 66 -g 19 ${pkgdir}/var/log/${pkgname} - ln -s /var/log/${pkgname} ${pkgdir}/usr/share/${pkgname}/logs - touch ${pkgdir}/var/log/${pkgname}/catalina.{out,err} - chgrp 19 ${pkgdir}/var/log/${pkgname}/catalina.{out,err} - - install -dm775 ${pkgdir}/etc/${pkgname} - install -g 66 -m640 conf/* ${pkgdir}/etc/${pkgname} - install -d -g66 -m775 ${pkgdir}/etc/${pkgname}/Catalina - ln -s /etc/${pkgname} ${pkgdir}/usr/share/${pkgname}/conf - - install -dm775 ${pkgdir}/var/lib/${pkgname} - cp -r webapps ${pkgdir}/var/lib/${pkgname} - chown -R 66:66 ${pkgdir}/var/lib/${pkgname} - ln -s /var/lib/${pkgname}/webapps ${pkgdir}/usr/share/${pkgname}/webapps - - install -dm1777 ${pkgdir}/var/tmp - install -dm755 -o 66 -g 66 ${pkgdir}/var/tmp/${pkgname}/{temp,work} - ln -s /var/tmp/${pkgname}/temp ${pkgdir}/usr/share/${pkgname}/temp - ln -s /var/tmp/${pkgname}/work ${pkgdir}/usr/share/${pkgname}/work - - # Arch scripts - install -Dm644 ${srcdir}/${pkgname}.conf.d ${pkgdir}/etc/conf.d/${pkgname} - install -Dm755 ${srcdir}/${pkgname} ${pkgdir}/etc/rc.d/${pkgname} -} Copied: tomcat7/repos/extra-any/PKGBUILD (from rev 148003, tomcat7/trunk/PKGBUILD) =================================================================== --- PKGBUILD (rev 0) +++ PKGBUILD 2012-01-29 18:12:23 UTC (rev 148004) @@ -0,0 +1,128 @@ +# Maintainer: Guillaume ALAUX <guilla...@archlinux.org> +pkgbase=tomcat7 +pkgname=('java-servlet3.0-tomcat' 'java-jsp2.2-tomcat' 'tomcat7') +pkgver=7.0.25 +pkgrel=1 +arch=('any') +url='http://tomcat.apache.org/' +license=('APACHE') +# Does not build with JDK7. Same issue as with cassandra: +# https://issues.apache.org/jira/browse/CASSANDRA-3275 +#makedepends=('java-environment>=6' 'apache-ant>=1.8' 'java-commons-daemon' 'eclipse-ecj') +makedepends=('java-environment=6' 'apache-ant>=1.8' 'java-commons-daemon' 'eclipse-ecj') +source=(http://archive.apache.org/dist/tomcat/tomcat-7/v${pkgver}/src/apache-tomcat-${pkgver}-src.tar.gz + tomcat7.conf.d + tomcat7 + tomcat7.install) + +md5sums=('12ebfd86a071184baac453eaf7c2a760' + 'eea5573b0acd985bb8b630a20719db76' + '361a41c02930a4e43245ab7379a617e9' + '6c5b4ed6d71b227f305b751c349fa31b') + +_servletver=3.0 +_jspver=2.2 + +build() { + cd "${srcdir}/apache-tomcat-${pkgver}-src" + + . /etc/profile.d/apache-ant.sh + ant deploy \ + -Dbase.path=${srcdir}/DOWN_LIBS \ + -Dcommons-daemon.jar=/usr/share/java/commons-daemon.jar \ + -Djdt.jar=/usr/share/java/eclipse-ecj.jar +} + +#TODO add test "ant test" + +package_java-servlet3.0-tomcat() { + pkgdesc="Servlet 3.0 java library implementation by Apache Tomcat" + depends=('java-environment>=5') + + cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib" + + install -dm755 ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat + install -m644 servlet-api.jar \ + ${pkgdir}/usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar + ln -s servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \ + ${pkgdir}/usr/share/java/servlet-api.jar +} + +package_java-jsp2.2-tomcat() { + pkgdesc="JSP 2.2 java library implementation by Apache Tomcat" + depends=('java-environment>=5') + + cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build/lib" + + install -dm755 ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat + for j in el-api jsp-api; do + install -m644 ${j}.jar \ + ${pkgdir}/usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar + ln -s jsp${_jspver}-tomcat/${j}-${_jspver}.jar ${pkgdir}/usr/share/java/${j}.jar + done +} + +package_tomcat7() { + pkgdesc="Servlet-3.0/JSP-2.2 Container" + depends=('java-runtime>=6' 'java-jsvc' 'eclipse-ecj' + "java-servlet3.0-tomcat=${pkgver}" "java-jsp2.2-tomcat=${pkgver}") + optdepends=('tomcat-native: to allow optimal performance in production environments') + backup=(etc/tomcat7/catalina.policy + etc/tomcat7/catalina.properties + etc/tomcat7/context.xml + etc/tomcat7/logging.properties + etc/tomcat7/server.xml + etc/tomcat7/tomcat-users.xml + etc/tomcat7/web.xml + etc/conf.d/tomcat7) + install=tomcat7.install + + cd "${srcdir}/apache-tomcat-${pkgver}-src/output/build" + + # Tomcat general files + install -dm755 ${pkgdir}/usr/share/{,java/}${pkgname} + # commons-daemon and tomcat-natives are packaged on their own + rm bin/{*.bat,commons-daemon*,tomcat-native.tar.gz} + cp -r bin ${pkgdir}/usr/share/${pkgname} + + # eclipse-ecj is packaged on its own + rm lib/eclipse-ecj.jar + install -m644 lib/* ${pkgdir}/usr/share/java/${pkgname} + + # Provided by previous packages + rm ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar + ln -s /usr/share/java/servlet${_servletver}-tomcat/servlet-api-${_servletver}.jar \ + ${pkgdir}/usr/share/java/${pkgname}/servlet-api.jar + + for j in el-api jsp-api; do + rm ${pkgdir}/usr/share/java/${pkgname}/${j}.jar + ln -s /usr/share/java/jsp${_jspver}-tomcat/${j}-${_jspver}.jar \ + ${pkgdir}/usr/share/java/${pkgname}/${j}.jar + done + ln -s /usr/share/java/${pkgname} ${pkgdir}/usr/share/${pkgname}/lib + + # 66=tomcat / 19=log + install -dm775 -o 66 -g 19 ${pkgdir}/var/log/${pkgname} + ln -s /var/log/${pkgname} ${pkgdir}/usr/share/${pkgname}/logs + touch ${pkgdir}/var/log/${pkgname}/catalina.{out,err} + chgrp 19 ${pkgdir}/var/log/${pkgname}/catalina.{out,err} + + install -dm775 ${pkgdir}/etc/${pkgname} + install -g 66 -m640 conf/* ${pkgdir}/etc/${pkgname} + install -d -g66 -m775 ${pkgdir}/etc/${pkgname}/Catalina + ln -s /etc/${pkgname} ${pkgdir}/usr/share/${pkgname}/conf + + install -dm775 ${pkgdir}/var/lib/${pkgname} + cp -r webapps ${pkgdir}/var/lib/${pkgname} + chown -R 66:66 ${pkgdir}/var/lib/${pkgname} + ln -s /var/lib/${pkgname}/webapps ${pkgdir}/usr/share/${pkgname}/webapps + + install -dm1777 ${pkgdir}/var/tmp + install -dm755 -o 66 -g 66 ${pkgdir}/var/tmp/${pkgname}/{temp,work} + ln -s /var/tmp/${pkgname}/temp ${pkgdir}/usr/share/${pkgname}/temp + ln -s /var/tmp/${pkgname}/work ${pkgdir}/usr/share/${pkgname}/work + + # Arch scripts + install -Dm644 ${srcdir}/${pkgname}.conf.d ${pkgdir}/etc/conf.d/${pkgname} + install -Dm755 ${srcdir}/${pkgname} ${pkgdir}/etc/rc.d/${pkgname} +} Deleted: tomcat7 =================================================================== --- tomcat7 2012-01-29 17:42:00 UTC (rev 148003) +++ tomcat7 2012-01-29 18:12:23 UTC (rev 148004) @@ -1,77 +0,0 @@ -#!/bin/bash - -daemon_name=tomcat7 - -. /etc/rc.conf -. /etc/rc.d/functions -. /etc/conf.d/${daemon_name} - -case "$1" in - start) - stat_busy "Starting ${daemon_name} daemon" - - PID=$(get_pid 'jsvc.exec') - if [ -z "$PID" ]; then - [ -f /var/run/${daemon_name}.pid ] && rm -f /var/run/${daemon_name}.pid - # RUN - /usr/bin/jsvc \ - -Dcatalina.home=${CATALINA_HOME} \ - -Dcatalina.base=${CATALINA_BASE} \ - -Djava.io.tmpdir=/var/tmp/tomcat7/temp \ - -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \ - -user tomcat \ - -java-home ${TOMCAT_JAVA_HOME} \ - -wait 10 \ - -pidfile /var/run/${daemon_name}.pid \ - -errfile /var/log/tomcat7/catalina.err \ - -outfile /var/log/tomcat7/catalina.out \ - ${CATALINA_OPTS} \ - org.apache.catalina.startup.Bootstrap - - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - add_daemon ${daemon_name} - stat_done - fi - else - stat_fail - exit 1 - fi - ;; - - stop) - stat_busy "Stopping ${daemon_name} daemon" - # STOP - /usr/bin/jsvc \ - -pidfile /var/run/${daemon_name}.pid \ - -stop \ - org.apache.catalina.startup.Bootstrap - # - if [ $? -gt 0 ]; then - stat_fail - exit 1 - else - rm -f /var/run/${daemon_name}.pid &> /dev/null - rm_daemon ${daemon_name} - stat_done - fi - ;; - - restart) - $0 stop - sleep 3 - $0 start - ;; - - status) - stat_busy "Checking ${daemon_name} status"; - ck_status ${daemon_name} - ;; - - *) - echo "usage: $0 {start|stop|restart|status}" -esac - -exit 0 Copied: tomcat7/repos/extra-any/tomcat7 (from rev 148003, tomcat7/trunk/tomcat7) =================================================================== --- tomcat7 (rev 0) +++ tomcat7 2012-01-29 18:12:23 UTC (rev 148004) @@ -0,0 +1,77 @@ +#!/bin/bash + +daemon_name=tomcat7 + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/${daemon_name} + +case "$1" in + start) + stat_busy "Starting ${daemon_name} daemon" + + PID=$(get_pid 'jsvc.exec') + if [ -z "$PID" ]; then + [ -f /var/run/${daemon_name}.pid ] && rm -f /var/run/${daemon_name}.pid + # RUN + /usr/bin/jsvc \ + -Dcatalina.home=${CATALINA_HOME} \ + -Dcatalina.base=${CATALINA_BASE} \ + -Djava.io.tmpdir=/var/tmp/tomcat7/temp \ + -cp /usr/share/java/commons-daemon.jar:/usr/share/java/eclipse-ecj.jar:${CATALINA_HOME}/bin/bootstrap.jar:${CATALINA_HOME}/bin/tomcat-juli.jar \ + -user tomcat \ + -java-home ${TOMCAT_JAVA_HOME} \ + -wait 10 \ + -pidfile /var/run/${daemon_name}.pid \ + -errfile /var/log/tomcat7/catalina.err \ + -outfile /var/log/tomcat7/catalina.out \ + ${CATALINA_OPTS} \ + org.apache.catalina.startup.Bootstrap + + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + add_daemon ${daemon_name} + stat_done + fi + else + stat_fail + exit 1 + fi + ;; + + stop) + stat_busy "Stopping ${daemon_name} daemon" + # STOP + /usr/bin/jsvc \ + -pidfile /var/run/${daemon_name}.pid \ + -stop \ + org.apache.catalina.startup.Bootstrap + # + if [ $? -gt 0 ]; then + stat_fail + exit 1 + else + rm -f /var/run/${daemon_name}.pid &> /dev/null + rm_daemon ${daemon_name} + stat_done + fi + ;; + + restart) + $0 stop + sleep 3 + $0 start + ;; + + status) + stat_busy "Checking ${daemon_name} status"; + ck_status ${daemon_name} + ;; + + *) + echo "usage: $0 {start|stop|restart|status}" +esac + +exit 0 Deleted: tomcat7.conf.d =================================================================== --- tomcat7.conf.d 2012-01-29 17:42:00 UTC (rev 148003) +++ tomcat7.conf.d 2012-01-29 18:12:23 UTC (rev 148004) @@ -1,15 +0,0 @@ -# The JAVA_HOME of the JVM for Tomcat to use -# (compulsory to enable tomcat to start at boot) -TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk - -# Tomcat home directory -CATALINA_HOME=/usr/share/tomcat7 - -# In many circumstances, it is desirable to have a single copy of a Tomcat -# binary distribution shared among multiple users on the same server. To make -# this possible, you can set the $CATALINA_BASE environment variable to the -# directory that contains the files for your 'personal' Tomcat instance. -CATALINA_BASE=${CATALINA_HOME} - -# Tomcat additional commandline options -CATALINA_OPTS= Copied: tomcat7/repos/extra-any/tomcat7.conf.d (from rev 148003, tomcat7/trunk/tomcat7.conf.d) =================================================================== --- tomcat7.conf.d (rev 0) +++ tomcat7.conf.d 2012-01-29 18:12:23 UTC (rev 148004) @@ -0,0 +1,15 @@ +# The JAVA_HOME of the JVM for Tomcat to use +# (compulsory to enable tomcat to start at boot) +TOMCAT_JAVA_HOME=/usr/lib/jvm/java-7-openjdk + +# Tomcat home directory +CATALINA_HOME=/usr/share/tomcat7 + +# In many circumstances, it is desirable to have a single copy of a Tomcat +# binary distribution shared among multiple users on the same server. To make +# this possible, you can set the $CATALINA_BASE environment variable to the +# directory that contains the files for your 'personal' Tomcat instance. +CATALINA_BASE=${CATALINA_HOME} + +# Tomcat additional commandline options +CATALINA_OPTS= Deleted: tomcat7.install =================================================================== --- tomcat7.install 2012-01-29 17:42:00 UTC (rev 148003) +++ tomcat7.install 2012-01-29 18:12:23 UTC (rev 148004) @@ -1,27 +0,0 @@ -post_install() { - getent group tomcat >/dev/null 2>&1 || groupadd -g 66 tomcat - getent passwd tomcat >/dev/null 2>&1 || useradd -u 66 -g tomcat -d /usr/share/tomcat7 -s /bin/false tomcat - - if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then - echo ">>> It appears that your current kernel has linux security" - echo ">>> capabilities built as a module. Tomcat requires this" - echo ">>> functionality to operate." - echo ">>>" - echo ">>> To activate the module, please load it now (modprobe capability)." - echo ">>> Also, you should add it to your MODULES array in rc.conf, so" - echo ">>> it will be activated automatically at boot-up." - fi -} - -post_upgrade() { - post_install $1 -} - -pre_remove() { - if getent passwd tomcat >/dev/null 2>&1; then - userdel tomcat - fi - if getent group tomcat >/dev/null 2>&1; then - groupdel tomcat - fi -} Copied: tomcat7/repos/extra-any/tomcat7.install (from rev 148003, tomcat7/trunk/tomcat7.install) =================================================================== --- tomcat7.install (rev 0) +++ tomcat7.install 2012-01-29 18:12:23 UTC (rev 148004) @@ -0,0 +1,27 @@ +post_install() { + getent group tomcat >/dev/null 2>&1 || groupadd -g 66 tomcat + getent passwd tomcat >/dev/null 2>&1 || useradd -u 66 -g tomcat -d /usr/share/tomcat7 -s /bin/false tomcat + + if [ -f lib/modules/`uname -r`/kernel/security/capability.ko ]; then + echo ">>> It appears that your current kernel has linux security" + echo ">>> capabilities built as a module. Tomcat requires this" + echo ">>> functionality to operate." + echo ">>>" + echo ">>> To activate the module, please load it now (modprobe capability)." + echo ">>> Also, you should add it to your MODULES array in rc.conf, so" + echo ">>> it will be activated automatically at boot-up." + fi +} + +post_upgrade() { + post_install $1 +} + +pre_remove() { + if getent passwd tomcat >/dev/null 2>&1; then + userdel tomcat + fi + if getent group tomcat >/dev/null 2>&1; then + groupdel tomcat + fi +}