Hello community,

here is the log from the commit of package tomcat6 for 
openSUSE:12.1:Update:Test checked in at 2012-01-24 10:29:38
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:12.1:Update:Test/tomcat6 (Old)
 and      /work/SRC/openSUSE:12.1:Update:Test/.tomcat6.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tomcat6", Maintainer is "[email protected]"

Changes:
--------
New Changes file:

--- /dev/null   2010-08-26 16:28:41.000000000 +0200
+++ /work/SRC/openSUSE:12.1:Update:Test/.tomcat6.new/libtcnative-1-0.changes    
2012-01-24 10:29:44.000000000 +0100
@@ -0,0 +1,33 @@
+-------------------------------------------------------------------
+Thu Aug  5 15:30:21 UTC 2010 - [email protected]
+
+- fixes bnc#622430 - move .so file to main package 
+
+-------------------------------------------------------------------
+Tue Mar 16 12:35:08 CET 2010 - [email protected]
+
+- build from tomcat-native-1.1.20-src.tar.gz
+- package needs work, does not have to live in tomcat src any more
+
+-------------------------------------------------------------------
+Wed Jun  3 11:10:45 CEST 2009 - [email protected]
+
+- Tomcat update to 6.0.20
+- APR update to 1.3.3 - the bugfix release
+
+-------------------------------------------------------------------
+Fri Sep 12 09:33:38 CEST 2008 - [email protected]
+
+- Tomcat update to 6.0.18 
+
+-------------------------------------------------------------------
+Thu Aug  7 15:59:03 CEST 2008 - [email protected]
+
+- move the .so file to -devel subpackage to prevent of an rpmlint error 
+
+-------------------------------------------------------------------
+Wed Jul  9 15:52:08 CEST 2008 - [email protected]
+
+- The first release in SUSE (1.2.12)
+  - fix of enhancenment request [bnc#202339]
+
New Changes file:

--- /dev/null   2010-08-26 16:28:41.000000000 +0200
+++ /work/SRC/openSUSE:12.1:Update:Test/.tomcat6.new/tomcat6.changes    
2012-01-24 10:29:44.000000000 +0100
@@ -0,0 +1,243 @@
+-------------------------------------------------------------------
+Mon Aug 29 13:33:51 UTC 2011 - [email protected]
+
+- update to latest upstream version 6.0.33 (bugfix release)
+- fix bnc#714620 - tomcat6: use of /var/lock/subsys unsupported
+  use /var/run/rctomcat6 instead
+
+-------------------------------------------------------------------
+Fri Feb 11 08:27:50 UTC 2011 - [email protected]
+
+- update to latest upstream version 6.0.32 (bugfix release)
+- obsolete CVE-2010-4172 patch
+- fixes bnc#669897 (CVE-2010-3718), bnc#669926 (CVE-2010-4476), bnc#669928
+  (CVE-2011-0013) and bnc#669930 (CVE-2011-0534)
+
+-------------------------------------------------------------------
+Thu Dec  9 10:50:46 UTC 2010 - [email protected]
+
+- fix bnc#655440#c14 - clean workdir of tomcat's webapps to be sure
+  our fixed jsps will be redeployed on each update
+
+-------------------------------------------------------------------
+Thu Nov 25 10:33:51 UTC 2010 - [email protected]
+
+- fix bnc#655440 - VUL-0: tomcat6: Apache Tomcat Manager application XSS
+  vulnerability (CVE-2010-4172)
+  http://svn.apache.org/viewvc?view=revision&revision=1037779
+- fix bnc#653586 - spacewalk 1.2 requires jasper 5.5
+  * add offline jasper compiler /usr/bin/jspc
+- unpack tarball to apache-tomcat-$VERSION-src directory directly
+
+-------------------------------------------------------------------
+Tue Nov  2 10:19:13 UTC 2010 - [email protected]
+
+- Fix bnc#650130 - Update of tomcat6 not possible (cpio: Is a directory)
+  * workaround the rpm bug - it cannot update directory to symlink
+  * make /etc/tomcat6/Catalina/ as ghost file
+  * create link in %posttrans
+
+-------------------------------------------------------------------
+Tue Sep 14 13:18:45 UTC 2010 - [email protected]
+
+- Update to 6.0.29 (bugfix release)
+- fix bnc#625415:  Tomcat6 does not have permissions to its own directories
+  * also fix the /etc/tomcat6/Catalina link target
+- revert a setclasspath.sh changes
+- disable user/group verification of tomcat owned files and directories to
+  allow easy change of the tomcat user without rpm --verify complaints
+
+-------------------------------------------------------------------
+Thu Jul 15 09:21:45 UTC 2010 - [email protected]
+
+- Update to 6.0.28 (bugfix release) 
+- fix bnc#565901 - missing catalina.sh again
+  * move catalina.sh to CATALINA_HOME/bin
+  * add jpackage.org compatible CATALINA_HOME/bin/setclasspath.sh
+- add missing logrotate requires
+- install scripts with mode 0755
+
+-------------------------------------------------------------------
+Wed Feb  3 12:39:44 UTC 2010 - [email protected]
+
+- Update to 6.0.24 (bugfix release). This obsoletes patch
+  * tomcat6-bug47316.patch
+- Merged with tomcat6-6.0.18-10.jpp6.src.rpm
+  * return the jpackage.org license header in spec
+  * polish in spec (use more macros)
+  * add logrotate support
+  * add patch to document webapps in %%{_sysconfdir}/%%{name}/tomcat-users.xml
+  * move %%{_bindir}/d%%{name} to %%{_sbindir}/%%{name} and provide symlink to
+    %%{_sbindir}/d%%{name}
+  * add digest and tool-wrapper scripts
+  * explicitly unset CLASSPATH
+  * explicitly set OPT_JAR_LIST to include ant/ant-trax
+  * build and install sample webapp
+  * use copy instead of move to fix short-circuit install build
+  * version jsp and servlet Provides with their spec versions
+  * make initscript LSB-complaint
+  * add el subpackage
+
+-------------------------------------------------------------------
+Tue Jan  5 14:20:08 UTC 2010 - [email protected]
+
+- fixed bnc#565901 - missing catalina.sh
+  * added catalina.sh (link from dtomcat6) to improve upstream compatibility
+
+-------------------------------------------------------------------
+Wed Sep 30 08:01:35 UTC 2009 - [email protected]
+
+- fixed bnc#542634: Tomcat NPE on start
+  applied patch from upstream bugzilla
+  https://issues.apache.org/bugzilla/show_bug.cgi?id=47316#c3
+
+-------------------------------------------------------------------
+Wed Aug 26 13:01:22 UTC 2009 - [email protected]
+
+- fixed bnc#520532: marked all webapp/ROOT/* files as config(noreplace)
+- marked /etc/ant.d/catalina-ant as config(noreplace)
+
+-------------------------------------------------------------------
+Mon Jun 15 09:09:12 CEST 2009 - [email protected]
+
+- added a missing -p1 for %patch0
+
+-------------------------------------------------------------------
+Wed Jun  3 10:39:19 CEST 2009 - [email protected]
+
+- fixed bnc#488061: work directory clean on tomcat stop
+- update to 6.0.20 - the bugfix release:
+  * MemoryUserDatabase is read-only by default
+  * Allow huge request body packets for AJP13
+  * Never return an empty HTTP status reason phrase
+  * Prevent double initialisation of JSPs
+  * A node should ignore its own heartbeat messages
+  * Prettry error messages (instead of stacktrace) if shutdown port is disabled
+
+-------------------------------------------------------------------
+Mon Mar 16 15:57:55 CET 2009 - [email protected]
+
+- fixed bnc#418664 - Tomcat6 installation has missing bits
+  - added /etc/ant.d/catalina-ant
+- another fix for bnc#471639 - tomcat does not start/work
+  * merged a sysconfig and tomcat6.conf to allow a dtomcat6 start works
+  * also fixs (bnc#471639)
+- fixed bnc#424675 - Access rights to /etc/tomcat6 directory not set right
+  * create a link from /etc/tomcat6/Catalina to /var/cache/tomcat6/Catalina
+- removed a CATALINA_OPTS from stop in dtcomcat6 (bao#42951)
+
+-------------------------------------------------------------------
+Wed Feb 25 14:31:44 CET 2009 - [email protected]
+
+- fixed bnc#471301: tomcat6 doesn't want to be started when sun java 1.5 is 
selected
+  - built with -target 1.5
+
+-------------------------------------------------------------------
+Mon Feb  9 16:50:07 CET 2009 - [email protected]
+
+- Fixed bnc#471639 - tomcat does not start/work
+  - fill up a default JVM in sysconfig
+- changed a default JAVA_HOME from JRE to SDK in config
+
+-------------------------------------------------------------------
+Mon Nov 24 14:05:10 CET 2008 - [email protected]
+
+- Fixed bnc#446598 - Tomcat6: tomcat6.conf overwrites sysconfig/tomcat6 values 
+
+-------------------------------------------------------------------
+Fri Sep 12 09:28:26 CEST 2008 - [email protected]
+
+- Update to 6.0.18. This obsoletes patches:
+       apache-tomcat-CVE-2008-1232
+       apache-tomcat-CVE-2008-1947
+       apache-tomcat-CVE-2008-2370
+       apache-tomcat-CVE-2008-2938
+
+-------------------------------------------------------------------
+Tue Aug 19 13:16:48 CEST 2008 - [email protected]
+
+- fix CVE-2008-2938: VUL-0: tomcat5: directory traversal 
+
+-------------------------------------------------------------------
+Wed Aug  6 11:11:58 CEST 2008 - [email protected]
+
+- fix CVE-2008-1232 and CVE-2008-2370: VUL-0: Apache Tomcat Cross-Site
+  Scripting and Security Bypass [bnc#414657]
+
+-------------------------------------------------------------------
+Mon Jul 21 15:45:27 CEST 2008 - [email protected]
+
+- fixed [bnc#394503]:  tomcat6 is missing rctomcat6 link
+  - add a /usr/sbin/rctomcat6 symlink
+  - and heavy rewrite and improve of original jpackage tomcat6 init script
+    - add Should-Start and Should-Stop section and values for Default-Start and
+      Default-Stop
+    - removed the echo_success and echo_failure functions and usage
+    - include a /etc/rc.status and use a rc_XXXXX functions instead of echo and
+      return. Plus add a comments with error codes explanations
+    - merge the start/stop/status messages from previous version
+    - use `ps' command instead of pgrep
+    - changes in commands: added a try-restart|force-reload|reload|probe and
+      removed the version|conrestart
+- fixed [bnc#394499]: add a PreReq to jpackage-utils
+- fixed [bnc#408253]: tomcat6 fails because if missing commons-xxxx jars
+  - add a removed dependencies to the jakarta-commons-*-tomcat5 packages
+  - fixed a proper link creation in post/n scripts
+  - fixed a build cycle, jakarta-commons-dbcp-tomcat5 needs the tomcat6-lib for
+    build, but the tomcat6-lib has this package in Requires(post). The
+    %post scripplet is non-fatal if the jars cannot be found (but this would
+    not happens in a production state).
+
+-------------------------------------------------------------------
+Fri Jun 27 14:47:03 CEST 2008 - [email protected]
+
+- fixed [bnc#396962]: VUL-0: tomcat5: [SECURITY] CVE-2008-1947: Tomcat 
host-manager XSS vulnerability
+- fixed [bnc#403310]: Tomcat startup script uses wrong java.io.tmpdir
+  - the temp directory is in /var/cache/tomcat6/temp
+
++++ 46 more lines (skipped)
++++ between /dev/null
++++ and /work/SRC/openSUSE:12.1:Update:Test/.tomcat6.new/tomcat6.changes

New:
----
  _link
  apache-tomcat-6.0.33-src.tar.gz
  apr-1.3.3.tar.bz2
  libtcnative-1-0.changes
  libtcnative-1-0.spec
  tomcat-native-1.1.20-src.tar.gz
  tomcat6-6.0-digest.script
  tomcat6-6.0-tomcat-users-webapp.patch
  tomcat6-6.0-tool-wrapper.script
  tomcat6-6.0.bootstrap-MANIFEST.MF.patch
  tomcat6-6.0.conf
  tomcat6-6.0.init
  tomcat6-6.0.jasper.sh
  tomcat6-6.0.jspc
  tomcat6-6.0.logrotate
  tomcat6-6.0.starter
  tomcat6-6.0.wrapper
  tomcat6-rpmlintrc
  tomcat6.changes
  tomcat6.spec

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ libtcnative-1-0.spec ++++++
#
# spec file for package libtcnative-1-0
#
# Copyright (c) 2011 SUSE LINUX Products GmbH, Nuernberg, Germany.
#
# All modifications and additions to the file contributed by third parties
# remain the property of their copyright owners, unless otherwise agreed
# upon. The license for this file, and modifications and additions to the
# file, is the same license as for the pristine package itself (unless the
# license for the pristine package is not an Open Source License, in which
# case the license is the MIT License). An "Open Source License" is a
# license that conforms to the Open Source Definition (Version 1.9)
# published by the Open Source Initiative.

# Please submit bugfixes or comments via http://bugs.opensuse.org/
#


%define section free
%define tomcat_major_version 6
%define tomcat_minor_version 0
%define tomcat_macro_version 24
%define tomcat_version        
%{tomcat_major_version}.%{tomcat_minor_version}.%{tomcat_macro_version}
%define packdname apache-tomcat-%{tomcat_version}-src
%define libname libtcnative-1
%define major   1
%define minor   3
%define micro   3

Name:           libtcnative-1-0
Version:        %{major}.%{minor}.%{micro}
Release:        12
Summary:        JNI wrappers for Apache Portable Runtime for Tomcat
Group:          Productivity/Networking/Web/Servers
License:        Apache Software License ..
Url:            http://tomcat.apache.org/tomcat-6.0-doc/apr.html
Source0:        tomcat-native-1.1.20-src.tar.gz
Source1:        apr-1.3.3.tar.bz2
BuildRoot:      %{_tmppath}/%{name}-%{version}-build
BuildRequires:  python
BuildRequires:  libapr1-devel
BuildRequires:  openssl-devel
BuildRequires:  java-devel
BuildRequires:  fdupes
AutoReqProv:    on

%description
Tomcat can use the Apache Portable Runtime to provide superior
scalability, performance, and better integration with native server
technologies. The Apache Portable Runtime is a highly portable library
that is at the heart of Apache HTTP Server 2.x. APR has many uses,
including access to advanced IO functionality (such as sendfile, epoll
and OpenSSL), OS level functionality (random number generation, system
status, etc), and native process handling (shared memory, NT pipes and
Unix sockets).

These features allows making Tomcat a general purpose webserver, will
enable much better integration with other native web technologies, and
overall make Java much more viable as a full fledged webserver platform
rather than simply a backend focused technology.



%package devel
License:        Apache Software License ..
Requires:       %{name} = %{version}-%{release}
Requires:       libapr1-devel
Requires:       libopenssl-devel
Requires:       glibc-devel
Group:          Development/Libraries/C and C++
Summary:        JNI wrappers for Apache Portable Runtime for Tomcat

%description devel
Tomcat can use the Apache Portable Runtime to provide superior
scalability, performance, and better integration with native server
technologies. The Apache Portable Runtime is a highly portable library
that is at the heart of Apache HTTP Server 2.x. APR has many uses,
including access to advanced IO functionality (such as sendfile, epoll
and OpenSSL), OS level functionality (random number generation, system
status, etc), and native process handling (shared memory, NT pipes and
Unix sockets).

These features allows making Tomcat a general purpose webserver, will
enable much better integration with other native web technologies, and
overall make Java much more viable as a full fledged webserver platform
rather than simply a backend focused technology.



%prep
%setup -q -n tomcat-native-1.1.20-src -a 1
pushd jni/native
chmod a+x build/*.sh
mv BUILDING README
popd

%build
pushd jni
    # remove pre-built binaries and windows files
    find . \( -name "*.bat" -o -name "*.class" -o -name "*.gz" -o \
              -name "*.jar" -o -name "*.zip" \) | xargs -t %{__rm} -f
    # we don't care about the tarballs and we're going to replace
    # tomcat-dbcp.jar with jakarta-commons-{collections,dbcp,pool}-tomcat5.jar
    # so just create a dummy file for later removal
    touch HACK
    pushd native
        sh buildconf --with-apr=../../apr-%{version}/
        ./configure \
                --prefix=%{_prefix} \
                --libdir=%{_libdir} \
                --with-apr=%{_prefix} --with-openssl=%{_prefix}
        make
    popd
popd

%install
pushd jni/native
make DESTDIR=${RPM_BUILD_ROOT} install
%{__install} -d -m 755 ${RPM_BUILD_ROOT}/%{_includedir}
%{__install} -m 644 include/* ${RPM_BUILD_ROOT}/%{_includedir}
rm ${RPM_BUILD_ROOT}/%{_libdir}/*.la
popd

%clean 
rm -rf $RPM_BUILD_ROOT

%post -p /sbin/ldconfig

%postun -p /sbin/ldconfig

%files
%defattr(-,root,root)
%{_libdir}/%{libname}.so.*
#bnc#622430 - java expects so files installed
%{_libdir}/%{libname}.so
%doc jni/native/README

%files devel
%defattr(-,root,root)
%{_includedir}/*
%{_libdir}/pkgconfig/*.pc

%changelog
++++++ tomcat6.spec ++++++
++++ 608 lines (skipped)

++++++ _link ++++++
<link project="openSUSE:12.1" package="tomcat6" 
baserev="a0008df3cd886dfc05901a15803d2ccc">
  <patches>
    <branch/>
  </patches>
</link>
++++++ tomcat6-6.0-digest.script ++++++
#!/bin/sh
#
# tomcat6-digest script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Get the tomcat config (use this for environment specific settings)
if [ -z "${TOMCAT_CFG}" ]; then
    TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
fi

if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi

set_javacmd

# CLASSPATH munging
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
export CLASSPATH

# Configuration
MAIN_CLASS="org.apache.catalina.startup.Tool"
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
BASE_OPTIONS=""
BASE_JARS="commons-daemon tomcat6/catalina servlet"

# Set parameters
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run -server org.apache.catalina.realm.RealmBase "$@"
++++++ tomcat6-6.0-tomcat-users-webapp.patch ++++++
Index: conf/tomcat-users.xml
===================================================================
--- conf/tomcat-users.xml.orig  2010-06-29 16:33:40.000000000 +0200
+++ conf/tomcat-users.xml       2010-07-15 09:35:36.400001376 +0200
@@ -33,4 +33,9 @@
   <user username="both" password="tomcat" roles="tomcat,role1"/>
   <user username="role1" password="tomcat" roles="role1"/>
 -->
+
+<!-- The host manager webapp is restricted to users with role "admin" -->
+<!--<user name="tomcat" password="password" roles="admin" />-->
+<!-- The manager webapp is restricted to users with role "manager" -->
+<!--<user name="tomcat" password="password" roles="manager" />-->
 </tomcat-users>
++++++ tomcat6-6.0-tool-wrapper.script ++++++
#!/bin/sh
#
# tomcat6-digest script
# JPackage Project <http://www.jpackage.org/>

# Source functions library
if [ -f /usr/share/java-utils/java-functions ] ; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't find functions library, aborting"
  exit 1
fi

# Get the tomcat config (use this for environment specific settings)
if [ -z "${TOMCAT_CFG}" ]; then
    TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
fi

if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi

set_javacmd

# CLASSPATH munging
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
export CLASSPATH

# Configuration
MAIN_CLASS="org.apache.catalina.startup.Tool"
BASE_OPTIONS=""
BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
BASE_JARS="commons-daemon tomcat6/catalina servlet"

# Set parameters
set_classpath $BASE_JARS
set_flags $BASE_FLAGS
set_options $BASE_OPTIONS

# Let's start
run "$@"
++++++ tomcat6-6.0.bootstrap-MANIFEST.MF.patch ++++++
Index: apache-tomcat-6.0.29-src/res/META-INF/bootstrap.jar.manifest
===================================================================
--- apache-tomcat-6.0.29-src/res/META-INF/bootstrap.jar.manifest        
2010-06-29 16:33:42.000000000 +0200
+++ apache-tomcat-6.0.29-src/res/META-INF/bootstrap.jar.manifest        
2010-07-15 09:35:10.044876580 +0200
@@ -1,6 +1,5 @@
 Manifest-Version: 1.0
 Main-Class: org.apache.catalina.startup.Bootstrap
-Class-Path: commons-daemon.jar tomcat-juli.jar
 Specification-Title: Apache Tomcat Bootstrap
 Specification-Version: @VERSION_MAJOR_MINOR@
 Specification-Vendor: Apache Software Foundation
@@ -8,4 +7,4 @@
 Implementation-Version: @VERSION@
 Implementation-Vendor: Apache Software Foundation
 X-Compile-Source-JDK: @source.jdk@
-X-Compile-Target-JDK: @target.jdk@
\ No newline at end of file
+X-Compile-Target-JDK: @target.jdk@
++++++ tomcat6-6.0.conf ++++++
# System-wide configuration file for tomcat6 services
# This will be sourced by tomcat6 and any secondary service
#
# This file should be merged with content of /etc/sysconfig/tomcat6, which was
# removed from tomcat6 installations in SUSE

# Where your java installation lives
JAVA_HOME="@@@JAVAHOME@@@"

# Where your tomcat installation lives
CATALINA_BASE="@@@TCHOME@@@"
CATALINA_HOME="@@@TCHOME@@@"
JASPER_HOME="@@@TCHOME@@@"
CATALINA_TMPDIR="@@@TCTEMP@@@"

# You can pass some parameters to java here if you wish to
#JAVA_OPTS="-Xminf0.1 -Xmaxf0.3"

# Use JAVA_OPTS to set java.library.path for libtcnative.so
#JAVA_OPTS="-Djava.library.path=/usr/lib"

# What user should run tomcat
TOMCAT_USER="tomcat"

# You can change your tomcat locale here
#LANG="en_US"

# Run tomcat under the Java Security Manager
SECURITY_MANAGER="false"

# Time to wait in seconds, before killing process
SHUTDOWN_WAIT="30"

# Whether to annoy the user with "attempting to shut down" messages or not
SHUTDOWN_VERBOSE="false"

# Set the TOMCAT_PID location
CATALINA_PID="/var/run/tomcat6.pid"

# Connector port is 8080 for this tomcat6 instance
#CONNECTOR_PORT="8080"

# If you wish to further customize your tomcat environment,
# put your own definitions here
# (i.e. LD_LIBRARY_PATH for some jdbc drivers)

# Clear work directory when tomcat is stopped or restarted
CLEAR_WORK="false"

# Java runtime options used when the "start", or "run" command is executed
# Use # it if you want:
# Set a location of JAAS config file
# 
CATALINA_OPTS="-Djava.security.auth.login.config=$CATALINA_HOME/conf/jaas.config"
# To collect data on how long garbage collection is taking
# CATALINA_OPTS="-verbose:gc"
# Make jikes error messages compatible with jasper
# CATALINA_OPTS="-Dbuild.compiler.emacs=true"
# Debug the permission (WARNING - This will generate many megabytes of output!)
# CATALINA_OPTS="-Djava.security.debug=all"
++++++ tomcat6-6.0.init ++++++
#!/bin/bash
# Copyright (c) 2008 SuSE Linux AG Nuernberg, Germany.
#
# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot
# - heavily rewritten by Deepak Bhole and Jason Corley
# - merged with previous SUSE's rctomcat55 by Petr Mladek and jpackage.org
#   original by Michal Vyskocil
#
# /etc/init.d/tomcat6
#
#   and its symbolic link
#
# /usr/sbin/rctomcat6
#
# System startup script for the Tomcat servlet container
#
### BEGIN INIT INFO
# Provides: tomcat6
# Required-Start: $network $syslog $remote_fs
# Should-Start: $named $syslog $time
# Required-Stop: $network $syslog
# Should-Stop: $named $syslog $time
# Default-Start:  3 5
# Default-Stop:   0 1 2 6
# Short-Description: Tomcat Servlet Container
# Description:    Start Tomcat to allow JAVA server pages
### END INIT INFO

# set a minimalist PATH
PATH="/bin:/sbin"

# Source LSB function library.
if [ -r /lib/lsb/init-functions ]; then
    . /lib/lsb/init-functions
else
    exit 1
fi
DISTRIB_ID=`lsb_release -i -s 2>/dev/null`

NAME="$(basename $0)"
unset ISBOOT
if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
    NAME="${NAME:3}"
    ISBOOT="1"
fi

# remove SUSE's rc name
if [ "${NAME:0:2}" = "rc" ]; then
    NAME="${NAME:2}"
fi

# For SELinux we need to use 'runuser' not 'su'
if [ -x "/sbin/runuser" ]; then
    SU="/sbin/runuser"
else
    SU="/bin/su"
fi

# Get the tomcat config (use this for environment specific settings)
TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi

# /etc/sysconfig/tomcat6 was removed from SuSE.
# use /etc/tomcat6/tomcat6.conf instead
# Get instance specific config file
#if [ -r "/etc/sysconfig/${NAME}" ]; then
#    . /etc/sysconfig/${NAME}
#fi

# Define which connector port to use
CONNECTOR_PORT="${CONNECTOR_PORT:-8080}"

# Path to the tomcat launch script
TOMCAT_SCRIPT="/usr/sbin/dtomcat6"

# Tomcat program name
TOMCAT_PROG="${NAME}"
        
# Define the tomcat username
TOMCAT_USER="${TOMCAT_USER:-tomcat}"

# Define the tomcat log file
TOMCAT_LOG="${TOMCAT_LOG:-/var/log/${NAME}/catalina.out}"
# Define the tomcat pid file
export CATALINA_PID="/var/run/${NAME}.pid"

RETVAL="0"

# pulled from RHEL4 /etc/rc.d/init.d/functions
function checkpid() {
    local i
    for i in $* ; do
        if [ -d "/proc/${i}" ]; then
            return 0
        fi
    done
    return 1
}

# Shell functions sourced from /etc/rc.status:
#      rc_check         check and set local and overall rc status
#      rc_status        check and set local and overall rc status
#      rc_status -v     ditto but be verbose in local rc status
#      rc_status -v -r  ditto and clear the local rc status
#      rc_failed        set local and overall rc status to failed
#      rc_failed <num>  set local and overall rc status to <num><num>
#      rc_reset         clear local rc status (overall remains)
#      rc_exit          exit appropriate to overall rc status
. /etc/rc.status

# First reset status of this service
rc_reset

# Return values acc. to LSB for all commands but status:
# 0 - success
# 1 - generic or unspecified error
# 2 - invalid or excess argument(s)
# 3 - unimplemented feature (e.g. "reload")
# 4 - insufficient privilege
# 5 - program is not installed
# 6 - program is not configured
# 7 - program is not running
# 
# Note that starting an already running service, stopping
# or restarting a not-running service as well as the restart
# with force-reload (in case signalling is not supported) are
# considered a success.

# Look for open ports, as the function name might imply
function findFreePorts() {
    local isSet1="false"
    local isSet2="false"
    local isSet3="false"
    local lower="8000"
    randomPort1="0"
    randomPort2="0"
    randomPort3="0"
    local -a listeners="( $(
                        netstat -ntl | \
                        awk '/^tcp/ {gsub("(.)*:", "", $4); print $4}'
                    ) )"
    while [ "$isSet1" = "false" ] || \
          [ "$isSet2" = "false" ] || \
          [ "$isSet3" = "false" ]; do
        let port="${lower}+${RANDOM:0:4}"
        if [ -z `expr " ${listeners[*]} " : ".*\( $port \).*"` ]; then
            if [ "$isSet1" = "false" ]; then
                export randomPort1="$port"
                isSet1="true"
            elif [ "$isSet2" = "false" ]; then
                export randomPort2="$port"
                isSet2="true"
            elif [ "$isSet3" = "false" ]; then
                export randomPort3="$port"
                isSet3="true"
            fi
        fi
    done
}

function makeHomeDir() {
    if [ ! -d "$CATALINA_HOME" ]; then
        echo "$CATALINA_HOME does not exist, creating"
        if [ ! -d "/usr/share/${NAME}" ]; then
            mkdir /usr/share/${NAME}
            cp -pLR /usr/share/tomcat6/* /usr/share/${NAME}
        fi
        mkdir -p /var/log/${NAME} \
                 /var/cache/${NAME} \
                 /var/tmp/${NAME}
        ln -fs /var/cache/${NAME} ${CATALINA_HOME}/work
        ln -fs /var/tmp/${NAME} ${CATALINA_HOME}/temp
        cp -pLR /usr/share/${NAME}/bin $CATALINA_HOME
        cp -pLR /usr/share/${NAME}/conf $CATALINA_HOME
        ln -fs /usr/share/java/tomcat6 ${CATALINA_HOME}/lib
        ln -fs /usr/share/tomcat6/webapps ${CATALINA_HOME}/webapps
        chown ${TOMCAT_USER}:${TOMCAT_USER} /var/log/${NAME}
    fi
}

function parseOptions() {
    options=""
    options="$options $(
                 awk '!/^#/ && !/^$/ { ORS=" "; print "export ", $0, ";" }' \
                 $TOMCAT_CFG
             )"
#    if [ -r "/etc/sysconfig/${NAME}" ]; then
#        options="$options $(
#                     awk '!/^#/ && !/^$/ { ORS=" "; 
#                                           print "export ", $0, ";" }' \
#                     /etc/sysconfig/${NAME}
#                 )"
#    fi
    TOMCAT_SCRIPT="$options ${TOMCAT_SCRIPT}"
}

# See how we were called.
function start() {
    echo -n "Starting Tomcat ($CATALINA_BASE)"
    if [ -f "/var/run/rc${NAME}" ] ; then
        if [ -f "/var/run/${NAME}.pid" ]; then
            read kpid < /var/run/${NAME}.pid
                if checkpid $kpid 2>&1; then
                    echo "$NAME process already running"
                        rc_failed 0
                    else
                        echo -n "lock file found but no process running for pid 
$kpid, continuing"
                        rc_failed 7
                fi
        fi
    fi
    # fix permissions on the log and pid files
    export CATALINA_PID="/var/run/${NAME}.pid"
    touch $CATALINA_PID
    chown ${TOMCAT_USER}:${TOMCAT_USER} $CATALINA_PID
    touch $TOMCAT_LOG
    chown ${TOMCAT_USER}:${TOMCAT_USER} $TOMCAT_LOG
    if [ "$CATALINA_HOME" != "/usr/share/tomcat6" ]; then
        # Create a tomcat directory if it doesn't exist
        makeHomeDir
        # If CATALINA_HOME doesn't exist modify port number so that
        # multiple instances don't interfere with each other
        findFreePorts
        sed -i -e "s/8005/${randomPort1}/g" -e "s/8080/${CONNECTOR_PORT}/g" \
            -e "s/8009/${randomPort2}/g" -e "s/8443/${randomPort3}/g" \
            ${CATALINA_HOME}/conf/server.xml
    fi
    parseOptions
    if [ "$SECURITY_MANAGER" = "true" ]; then
        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start-security" \
            >> $TOMCAT_LOG 2>&1
    else
        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} start" >> $TOMCAT_LOG 2>&1
    fi
    RETVAL="$?"
    if [ "$RETVAL" -eq 0 ]; then 
        rc_failed 0
        touch /var/run/rc${NAME}
    else
        rc_failed 7
    fi
    rc_status -v
}

## Check status with checkproc(8), if process is running
## checkproc will return with exit status 0.

# Status has a slightly different for the status command:
# 0 - service running
# 1 - service dead, but /var/run/  pid  file exists
# 2 - service dead, but /var/lock/ lock file exists
# 3 - service not running

# NOTE: checkproc returns LSB compliant status values.
function status() {
    echo -n "Checking for Tomcat ($CATALINA_BASE)"
    if [ -f "/var/run/${NAME}.pid" ]; then
        read kpid < /var/run/${NAME}.pid
        if checkpid $kpid 2>&1; then
            rc_failed 0
        else
            rc_failed 2
        fi
    else
        #don't be dependent on procps
        #pid="$(/usr/bin/pgrep -u tomcat java)"
        pid="$(ps U tomcat o pid,cmd | grep java | grep -v 'grep java')"
        if [ -n "$pid" ]; then
            echo "$0 running (${pid}) but no PID file exists"
            rc_failed 0
        else
            rc_failed 3
        fi
    fi
    rc_status -v
}

function stop() {
    echo -n "Shutting down Tomcat ($CATALINA_BASE)"
    if [ -f "/var/run/rc${NAME}" ]; then
        parseOptions
        $SU - $TOMCAT_USER -c "${TOMCAT_SCRIPT} stop" >> $TOMCAT_LOG 2>&1
        RETVAL="$?"
        if [ "$RETVAL" -eq "0" ]; then
            count="0"
            if [ -f "/var/run/${NAME}.pid" ]; then
                read kpid < /var/run/${NAME}.pid
                until [ "$(ps --pid $kpid | grep -c $kpid)" -eq "0" ] || \
                      [ "$count" -gt "$SHUTDOWN_WAIT" ]; do
                    if [ "$SHUTDOWN_VERBOSE" = "true" ]; then
                        echo "waiting for processes $kpid to exit"
                    fi
                    sleep 1
                    let count="${count}+1"
                done
                if [ "$count" -gt "$SHUTDOWN_WAIT" ]; then
                    if [ "$SHUTDOWN_VERBOSE" = "true" ]; then
                        echo "killing processes which didn't stop after 
$SHUTDOWN_WAIT seconds"
                        echo -n -e "after "
                        echo -n "$SHUTDOWN_WAIT seconds"
                    fi
                    kill -9 $kpid
                fi
                rc_failed 0
                if [ "$count" -gt "0" ]; then
                    echo -n -e "\n"
                fi
            fi
            rm -f /var/run/rc${NAME} /var/run/${NAME}.pid
            if [ "${CLEAR_WORK}" = "true" ]; then
                echo -n "Cleaning work directory: "
                #rm -rf ${CATALINA_HOME}/work/*
                find ${CATALINA_HOME}/work/ -maxdepth 1 -type 'd' \! -name 
'Catalina' \! -name 'temp' -print0 | xargs -0 rm -rf
                find ${CATALINA_HOME}/work/Catalina/ 
${CATALINA_HOME}/work/temp/ -print0 | xargs -0 rm -rf
                if [ "$?" -eq "0" ]; then
                        echo_success
                        echo -n -e "\n"
                fi
             fi

        else
            rc_failed 1
        fi
    fi
    rc_status -v
}


# See how we were called.
case "$1" in
    start)
        start
        ;;
    stop)
        stop
        ;;
    try-restart)
        ## Stop the service and if this succeeds (i.e. the 
        ## service was running before), start it again.
        ## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
        $0 status >/dev/null &&  $0 restart
        
        # Remember status and be quiet
        rc_status
        ;;
    restart)
        stop
        sleep 2    
        start
        rc_status
        ;;
    force-reload)
        ## Signal the daemon to reload its config. Most daemons
        ## do this on signal 1 (SIGHUP).
        ## If it does not support it, restart.

        echo -n "Reload service Tomcat $($CATALINA_BASE)"
        ## if it supports it:
        #killproc -HUP $TOMCAT_BIN
        #touch /var/run/FOO.pid
        #rc_status -v

        ## Otherwise:
        $0 stop  &&  $0 start
        rc_status
        ;;
    reload)
        ## Like force-reload, but if daemon does not support
        ## signalling, do nothing (!)

        # If it supports signalling:
        #echo -n "Reload service FOO"
        #killproc -HUP $TOMCAT_BIN
        #touch /var/run/FOO.pid
        #rc_status -v
        
        ## Otherwise if it does not support reload:
        rc_failed 3
        rc_status -v
        ;;
    status)
        status
        ;;
    probe)
        ## Optional: Probe for the necessity of a reload,
        ## give out the argument which is required for a reload.
        ;;
    *)
        echo "Usage: $0 
{start|stop|status|try-restart|restart|force-reload|reload|probe}"
        exit 1
        ;;
esac
rc_exit
++++++ tomcat6-6.0.jasper.sh ++++++
#!/bin/bash

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# -----------------------------------------------------------------------------
# Script for Jasper compiler
#   - mvyskocil reworked for SUSE tomcat6 package - see
#   https://bugzilla.novell.com/show_bug.cgi?id=653586
#
# Environment Variable Prequisites
#
#   JASPER_HOME   May point at your Catalina "build" directory.
#
#   JASPER_OPTS   (Optional) Java runtime options used when the "start",
#                 "stop", or "run" command is executed.
#
#   JAVA_HOME     Must point at your Java Development Kit installation.
#
#   JAVA_OPTS     (Optional) Java runtime options used when the "start",
#                 "stop", or "run" command is executed.

# Get the tomcat config (use this for environment specific settings)

if [ -z "${TOMCAT_CFG}" ]; then
    TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
fi

if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi

CLASSPATH="${CLASSPATH}:$(build-classpath tomcat6 ant)"
CLASSPATH="${CLASSPATH}:$(build-classpath tomcat6-servlet-2.5-api 
tomcat6-jsp-2.1-api tomcat6-el-1.0-api)"
# CLASSPATH munging
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"

# ----- Execute The Requested Command -----------------------------------------

if [ "$1" = "jspc" ] ; then

  shift
  exec "${JAVA_HOME}/bin/java" $JAVA_OPTS $JASPER_OPTS \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
    -Djasper.home="$JASPER_HOME" \
    -Dcatalina.home="$JASPER_HOME" \
    org.apache.jasper.JspC "$@"

elif [ "$1" = "debug" ] ; then

  shift
  exec "${JAVA_HOME}/bin/jdb" $JAVA_OPTS $JASPER_OPTS \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" -classpath "$CLASSPATH" \
    -Djasper.home="$JASPER_HOME" \
    -Dcatalina.home="$JASPER_HOME" \
    org.apache.jasper.JspC "$@"

else

  echo "Usage: jasper.sh ( jspc )"
  echo "Commands:"
  echo "  jspc - Run the offline JSP compiler"
  exit 1

fi
++++++ tomcat6-6.0.jspc ++++++
#!/bin/sh

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# -----------------------------------------------------------------------------
# Script to run the Jasper "offline JSP compiler"
#   - mvyskocil reworked for SUSE tomcat6 package - see
#   https://bugzilla.novell.com/show_bug.cgi?id=653586
#
# $Id: jspc.sh 565193 2007-08-12 22:53:10Z markt $
# -----------------------------------------------------------------------------
 
PRGDIR=/usr/share/tomcat6/bin
EXECUTABLE=jasper.sh

# Check that target executable exists
if [ ! -x "$PRGDIR"/"$EXECUTABLE" ]; then
  echo "Cannot find $PRGDIR/$EXECUTABLE"
  echo "This file is needed to run this program"
  exit 1
fi

if [ "$1" = "debug" ]; then
  shift
  exec "$PRGDIR"/"$EXECUTABLE" debug "$@"
else
  exec "$PRGDIR"/"$EXECUTABLE" jspc "$@"
fi
++++++ tomcat6-6.0.logrotate ++++++
@@@TCLOG@@@/catalina.out {
    copytruncate
    weekly
    rotate 52
    compress
    missingok
    create 0644 tomcat tomcat
}
++++++ tomcat6-6.0.starter ++++++
#!/bin/sh
#
# Wrapper script for Tomcat 6.0, to be sure it will allways
# be run with correct user profile (tomcat by default)
#
# derived from stuff in tomcat5.init
#
# Gomez Henri <[email protected]>
# Keith Irwin <[email protected]>
# Nicolas Mailhot <[email protected]>
#
# version 1.01 - Fix webapps dir permissions
#


# Get Tomcat config

TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"

[ -r "$TOMCAT_CFG" ] && . "${TOMCAT_CFG}"

export CATALINA_BASE
export CATALINA_HOME

# Path to the tomcat launch script
TOMCAT_SCRIPT=/usr/sbin/dtomcat6

# Tomcat name :)
TOMCAT_PROG=tomcat6
        
# if TOMCAT_USER is not set, use tomcat
if [ -z "$TOMCAT_USER" ]; then
    TOMCAT_USER="tomcat"
fi

RETVAL=0

su $TOMCAT_USER -c "$TOMCAT_SCRIPT $@"
RETVAL=$?
exit $RETVAL
++++++ tomcat6-6.0.wrapper ++++++
#!/bin/bash

if [ -r /usr/share/java-utils/java-functions ]; then
  . /usr/share/java-utils/java-functions
else
  echo "Can't read Java functions library, aborting"
  exit 1
fi

# Get the tomcat config (use this for environment specific settings)
if [ -z "${TOMCAT_CFG}" ]; then
    TOMCAT_CFG="/etc/tomcat6/tomcat6.conf"
fi

if [ -r "$TOMCAT_CFG" ]; then
    . $TOMCAT_CFG
fi

set_javacmd

# CLASSPATH munging
if [ -n "$JSSE_HOME" ]; then
  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
fi
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/bootstrap.jar"
CLASSPATH="${CLASSPATH}:${CATALINA_HOME}/bin/tomcat-juli.jar"
CLASSPATH="${CLASSPATH}:$(build-classpath commons-daemon 2>/dev/null)"

if [ "$1" = "start" ]; then
  ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \
    -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    -Djava.util.logging.config.file="${CATALINA_BASE}/conf/logging.properties" \
    -Djava.util.logging.manager="org.apache.juli.ClassLoaderLogManager" \
    org.apache.catalina.startup.Bootstrap start \
    >> ${CATALINA_BASE}/logs/catalina.out 2>&1 &
    if [ ! -z "$CATALINA_PID" ]; then
      echo $! > $CATALINA_PID
    fi
elif [ "$1" = "start-security" ]; then
  ${JAVACMD} $JAVA_OPTS $CATALINA_OPTS \
    -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    -Djava.security.manager \
    -Djava.security.policy="${CATALINA_BASE}/conf/catalina.policy" \
    -Djava.util.logging.config.file="${CATALINA_BASE}/conf/logging.properties" \
    -Djava.util.logging.manager="org.apache.juli.ClassLoaderLogManager" \
    org.apache.catalina.startup.Bootstrap start \
    >> ${CATALINA_BASE}/logs/catalina.out 2>&1 &
    if [ ! -z "$CATALINA_PID" ]; then
      echo $! > $CATALINA_PID
    fi
elif [ "$1" = "stop" ]; then
  ${JAVACMD} $JAVA_OPTS \
    -classpath "$CLASSPATH" \
    -Dcatalina.base="$CATALINA_BASE" \
    -Dcatalina.home="$CATALINA_HOME" \
    -Djava.endorsed.dirs="$JAVA_ENDORSED_DIRS" \
    -Djava.io.tmpdir="$CATALINA_TMPDIR" \
    org.apache.catalina.startup.Bootstrap stop \
    >> ${CATALINA_BASE}/logs/catalina.out 2>&1
elif [ "$1" = "version" ]; then
  ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
    org.apache.catalina.util.ServerInfo
else
  echo "Usage: $0 {start|start-security|stop|version}"
  exit 1
fi
++++++ tomcat6-rpmlintrc ++++++
# this is OK - fix of bnc#520532
addFilter(".*non-etc-or-var-file-marked-as-conffile 
/srv/tomcat6/webapps/ROOT.*")
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to