Hello community, here is the log from the commit of package tomcat6 checked in at Fri Jul 25 17:06:32 CEST 2008. -------- New Changes file: --- /dev/null 2006-09-20 18:56:23.000000000 +0200 +++ /mounts/work_src_done/STABLE/tomcat6/libtcnative-1-0.changes 2008-07-09 15:57:15.000000000 +0200 @@ -0,0 +1,6 @@ +------------------------------------------------------------------- +Wed Jul 9 15:52:08 CEST 2008 - mvyskocil@suse.cz + +- The first release in SUSE (1.2.12) + - fix of enhancenment request [bnc#202339] + --- tomcat6/tomcat6.changes 2008-06-27 14:49:33.000000000 +0200 +++ /mounts/work_src_done/STABLE/tomcat6/tomcat6.changes 2008-07-21 15:46:05.000000000 +0200 @@ -1,0 +2,24 @@ +Mon Jul 21 15:45:27 CEST 2008 - mvyskocil@suse.cz + +- 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). + +------------------------------------------------------------------- New: ---- apr-1.2.12.tar.bz2 libtcnative-1-0.changes libtcnative-1-0.spec ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Other differences: ------------------ ++++++ libtcnative-1-0.spec ++++++ # # spec file for package libtcnative-1-0 (Version MACRO) # # Copyright (c) 2008 SUSE LINUX Products GmbH, Nuernberg, Germany. # This file and all modifications and additions to the pristine # package are under the same license as the package itself. # # Please submit bugfixes or comments via http://bugs.opensuse.org/ # %define section free %define tomcat_macro_version 16 %define tomcat_major_version 6 %define tomcat_minor_version 0 %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 2 %define micro 12 Name: libtcnative-1-0 Version: %{major}.%{minor}.%{micro} Release: 2 Summary: JNI wrappers for Apache Portable Runtime for Tomcat Group: Productivity/Networking/Web/Servers License: The Apache Software License Url: http://tomcat.apache.org/tomcat-6.0-doc/apr.html Source0: http://www.apache.org/dist/tomcat/tomcat-6/v%{tomcat_version}/src/%{packdname}.tar.bz2 Source1: apr-%{version}.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: The 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 %{__rm} -rf ${RPM_BUILD_DIR}/%{name}-%{version} %setup -q -c -T -a 0 -a 1 pushd ${RPM_BUILD_DIR}/%{name}-%{version}/%{packdname}/native/connector chmod a+x build/*.sh mv BUILDING README popd %build pushd ${RPM_BUILD_DIR}/%{name}-%{version}/%{packdname} # 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/connector sh buildconf --with-apr=../../../apr-1.2.12/ ./configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --with-apr=%{_prefix} --with-openssl=%{_prefix} make popd popd %install pushd ${RPM_BUILD_DIR}/%{name}-%{version}/%{packdname}/native/connector 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* %doc %{packdname}/native/connector/README %files devel %defattr(-,root,root) %{_includedir}/* %{_libdir}/pkgconfig/*.pc %changelog * Wed Jul 09 2008 mvyskocil@suse.cz - The first release in SUSE (1.2.12) - fix of enhancenment request [bnc#202339] ++++++ tomcat6.spec ++++++ --- /var/tmp/diff_new_pack.H25112/_old 2008-07-25 17:05:34.000000000 +0200 +++ /var/tmp/diff_new_pack.H25112/_new 2008-07-25 17:05:34.000000000 +0200 @@ -29,7 +29,7 @@ Name: tomcat6 Version: %{major_version}.%{minor_version}.%{macro_version} -Release: 8 +Release: 9 Summary: Apache Servlet/JSP Engine, RI for Servlet 2.5/JSP 2.1 API Group: Productivity/Networking/Web/Servers License: The Apache Software License @@ -58,6 +58,8 @@ BuildRequires: jakarta-taglibs-standard >= 1.1 BuildRequires: fdupes PreReq: %fillup_prereq +PreReq: jpackage-utils +Recommends: libtcnative-1-0 %endif Requires(pre): %{_sbindir}/groupadd Requires(pre): %{_sbindir}/useradd @@ -133,11 +135,9 @@ Requires: %{name}-jsp-2_1-api = %{version}-%{release} Requires: %{name}-servlet-2_5-api = %{version}-%{release} Requires(post): ecj >= 3.2.2 -%if ! %defined suse_version Requires(post): jakarta-commons-collections-tomcat5 Requires(post): jakarta-commons-dbcp-tomcat5 Requires(post): jakarta-commons-pool-tomcat5 -%endif Requires(preun): %{__rm} %description lib @@ -302,6 +302,8 @@ popd %if %defined suse_version %fdupes $RPM_BUILD_ROOT /srv/%{name} +install -d -m 755 $RPM_BUILD_ROOT/%{_sbindir} +ln -sf %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name} %endif %clean @@ -332,13 +334,15 @@ %{_javadir}/%{name}-jsp-%{jspspec}-api.jar 20100 %post lib +# HACK! The commons-dbcp-tomcat5 needs the tomcat6-lib to build, but tomcat6 +# needs this only as post/un dependency to create a symlink, not for build of +# itself. This is mainly for succesfully build, in the production case it +# should not happen! build-jar-repository %{libdir} \ -%if ! %defined suse_version commons-collections-tomcat5 \ commons-dbcp-tomcat5 \ commons-pool-tomcat5 \ -%endif - ecj 2>&1 + ecj 2>&1 || exit 0 %post servlet-2_5-api %{_sbindir}/update-alternatives --install %{_javadir}/servlet.jar servlet \ @@ -350,7 +354,7 @@ %preun # clean tempdir and workdir on removal or upgrade -%{__rm} -fr %{workdir}/* %{tempdir}/* +## % {__rm} -fr %{workdir}/* # %{tempdir}/* %if %defined suse_version %stop_on_removal %{name} %else @@ -363,11 +367,9 @@ %preun lib if [ "$1" = "0" ]; then %{__rm} -f \ -%if ! %defined suse_version %{libdir}/\[commons-collections-tomcat5\].jar \ %{libdir}/\[commons-dbcp-tomcat5\].jar \ %{libdir}/\[commons-pool-tomcat5\].jar \ -%endif %{libdir}/\[ecj\].jar >/dev/null 2>&1 fi %if %defined suse_version @@ -409,12 +411,11 @@ %config(noreplace) %{confdir}/server.xml %attr(660,root,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml %config(noreplace) %{confdir}/web.xml -%if ! %defined suse_version %attr(0775,root,tomcat) %dir %{tempdir} -%endif %attr(0775,root,tomcat) %dir %{workdir} %{homedir} %dir /srv/%{name} +%{_sbindir}/rc%{name} %files admin-webapps %defattr(0644,root,root,0755) @@ -447,6 +448,27 @@ %{appdir}/examples %changelog +* Mon Jul 21 2008 mvyskocil@suse.cz +- 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 2008 mvyskocil@suse.cz - 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 ++++++ tomcat6-6.0.init ++++++ --- tomcat6/tomcat6-6.0.init 2008-05-05 15:59:29.000000000 +0200 +++ /mounts/work_src_done/STABLE/tomcat6/tomcat6-6.0.init 2008-07-18 11:37:04.000000000 +0200 @@ -1,22 +1,30 @@ #!/bin/bash +# Copyright (c) 2008 SuSE Linux AG Nuernberg, Germany. # -# tomcat6 This shell script takes care of starting and stopping Tomcat +# - 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 # -# chkconfig: - 80 20 +# and its symbolic link +# +# /usr/sbin/rctomcat6 +# +# System startup script for the Tomcat servlet container # ### BEGIN INIT INFO -# Provides: tomcat6 +# Provides: tomcat # Required-Start: $network $syslog $remote_fs +# Should-Start: $named $syslog $time # Required-Stop: $network $syslog -# Default-Start: -# Default-Stop: -# Description: Release implementation for Servlet 2.5 and JSP 2.1 -# Short-Description: start and stop tomcat +# 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 -# -# - originally written by Henri Gomez, Keith Irwin, and Nicolas Mailhot -# - heavily rewritten by Deepak Bhole and Jason Corley -# # set a minimalist PATH PATH="/bin:/sbin" @@ -28,6 +36,11 @@ 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" @@ -74,25 +87,34 @@ return 1 } -# pulled from RHEL4 /etc/rc.d/init.d/functions -function echo_failure() { - echo -en "\\033[60G" - echo -n "[ " - echo -n $"FAILED" - echo -n " ]" - echo -ne "\r" - return 1 -} - -# pulled from RHEL4 /etc/rc.d/init.d/functions -function echo_success() { - echo -en "\\033[60G" - echo -n "[ " - echo -n $"OK" - echo -n " ]" - echo -ne "\r" - return 0 -} +# 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() { @@ -164,16 +186,16 @@ # See how we were called. function start() { - echo -n "Starting ${TOMCAT_PROG}: " + echo -n "Starting Tomcat ($CATALINA_BASE)" if [ -f "/var/lock/subsys/${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" - return -1 + rc_failed 0 else - echo "lock file found but no process running for" - echo "pid $kpid, continuing" + echo -n "lock file found but no process running for pid $kpid, continuing" + rc_failed 7 fi fi fi @@ -201,39 +223,49 @@ fi RETVAL="$?" if [ "$RETVAL" -eq 0 ]; then - echo_success + rc_failed 0 touch /var/lock/subsys/${NAME} else - echo_failure + rc_failed 7 fi - echo - return $RETVAL + 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() { - RETVAL="1" + 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 - echo "$0 is already running (${kpid})" - RETVAL="0" + rc_failed 0 else - echo "lock file found but no process running for pid $kpid" + rc_failed 2 fi else - pid="$(/usr/bin/pgrep -u tomcat java)" + #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" - RETVAL="0" + rc_failed 0 else - echo "$0 is stopped" + rc_failed 3 fi fi - return $RETVAL + rc_status -v } function stop() { - echo -n "Stopping $TOMCAT_PROG: " + echo -n "Shutting down Tomcat ($CATALINA_BASE)" if [ -f "/var/lock/subsys/${NAME}" ]; then $SU - $TOMCAT_USER -c "$TOMCAT_SCRIPT stop" >> $TOMCAT_LOG 2>&1 RETVAL="$?" @@ -257,16 +289,17 @@ fi kill -9 $kpid fi - echo_success + rc_failed 0 if [ "$count" -gt "0" ]; then echo -n -e "\n" fi fi rm -f /var/lock/subsys/${NAME} /var/run/${NAME}.pid else - echo_failure + rc_failed 1 fi fi + rc_status -v } @@ -280,28 +313,61 @@ parseOptions 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) parseOptions stop sleep 2 start + rc_status ;; - condrestart) - if [ -f "/var/run/${NAME}.pid" ]; then - restart - fi - ;; + 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 ;; - version) - $TOMCAT_SCRIPT version + probe) + ## Optional: Probe for the necessity of a reload, + ## give out the argument which is required for a reload. ;; *) - echo -n "Usage: $TOMCAT_PROG " - echo "{start|stop|restart|condrestart|status|version}" - exit 1 + echo "Usage: $0 {start|stop|status|try-restart|restart|force-reload|reload|probe}" + exit 1 + ;; esac - -exit $RETVAL - +rc_exit ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ Remember to have fun... --------------------------------------------------------------------- To unsubscribe, e-mail: opensuse-commit+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-commit+help@opensuse.org
participants (1)
-
root@Hilbert.suse.de