rpms/tomcat6/devel tomcat6-6.0.init,1.1,1.2 tomcat6.spec,1.3,1.4

David Walluck dwalluck at fedoraproject.org
Mon Oct 13 20:16:04 UTC 2008


Author: dwalluck

Update of /cvs/pkgs/rpms/tomcat6/devel
In directory cvs1.fedora.phx.redhat.com:/tmp/cvs-serv10422

Modified Files:
	tomcat6-6.0.init tomcat6.spec 
Log Message:
* Tue Oct 07 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-6
- use lsb_release instead of lsb-release to get the distributor

* Tue Oct 07 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-5
- fix initscript messages on Mandriva Linux
- fix help message in initscript

* Wed Oct 01 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-4
- redefine %%_initrddir for FHS-compliance
- make initscript LSB-complaint

* Fri Sep 26 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-3
- fix status in initscript

* Thu Sep 25 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-2
- remove initscripts and /sbin/service requirement
- call initscript directly without using /sbin/service
- require /sbin/chkconfig instead of chkconfig
- remove chkconfig requirement from packages that don't require it



Index: tomcat6-6.0.init
===================================================================
RCS file: /cvs/pkgs/rpms/tomcat6/devel/tomcat6-6.0.init,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- tomcat6-6.0.init	7 Apr 2008 22:37:26 -0000	1.1
+++ tomcat6-6.0.init	13 Oct 2008 20:15:33 -0000	1.2
@@ -18,8 +18,16 @@
 # - heavily rewritten by Deepak Bhole and Jason Corley
 #
 
-# Source function library.
-. /etc/rc.d/init.d/functions
+## Source function library.
+#. /etc/rc.d/init.d/functions
+# 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
@@ -137,9 +145,12 @@
     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_success
-                echo
+#           if checkpid $kpid 2>&1; then
+            if [ -d "/proc/${kpid}" ]; then
+                log_success_msg
+                if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
+                    echo
+                fi
                 return 0
             fi
         fi
@@ -169,12 +180,14 @@
     fi
     RETVAL="$?"
     if [ "$RETVAL" -eq 0 ]; then 
-        echo_success
+        log_success_msg
         touch /var/lock/subsys/${NAME}
     else
-        echo_failure
+        log_failure_msg
+    fi
+    if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
+        echo
     fi
-    echo
     return $RETVAL
 }
 
@@ -203,16 +216,18 @@
                     fi
                     kill -9 $kpid
                 fi
-                echo_success
+                log_success_msg
             fi
             rm -f /var/lock/subsys/${NAME} /var/run/${NAME}.pid
         else
-            echo_failure
+            log_failure_msg
         fi
     else
-        echo_success       
+        log_success_msg
+    fi
+    if [ "$DISTRIB_ID" = "MandrivaLinux" ]; then
+        echo
     fi
-    echo
     return $RETVAL
 }
 
@@ -245,13 +260,20 @@
         ;;
     status)
         if [ -f "/var/run/${NAME}.pid" ]; then
-            status ${NAME}
-            RETVAL="$?"
+#           status ${NAME}
+#           RETVAL="$?"
+            read kpid < /var/run/${NAME}.pid
+            if [ -d "/proc/${kpid}" ]; then
+                echo "${NAME} (pid ${kpid}) is running..."
+                RETVAL="0"
+            fi
         else
-            pid="$(/usr/bin/pgrep -d , -u tomcat -G tomcat java)"
+            pid="$(/usr/bin/pgrep -d , -u ${TOMCAT_USER} -G ${TOMCAT_USER} java)"
             if [ -z "$pid" ]; then
-                status ${NAME}
-                RETVAL="$?"
+#               status ${NAME}
+#               RETVAL="$?"
+                echo "${NAME} is stopped"
+                RETVAL="3"
             else
                 echo "${NAME} (pid $pid) is running..."
                 RETVAL="0"
@@ -262,7 +284,7 @@
         ${TOMCAT_SCRIPT} version
         ;;
     *)
-        echo -n "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}"
+        echo "Usage: $0 {start|stop|restart|condrestart|try-restart|reload|force-reload|status|version}"
         RETVAL="2"
 esac
 


Index: tomcat6.spec
===================================================================
RCS file: /cvs/pkgs/rpms/tomcat6/devel/tomcat6.spec,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- tomcat6.spec	5 Sep 2008 17:14:04 -0000	1.3
+++ tomcat6.spec	13 Oct 2008 20:15:33 -0000	1.4
@@ -47,11 +47,12 @@
 %define logdir %{_var}/log/%{name}
 %define tempdir %{_var}/cache/%{name}/temp
 %define workdir %{_var}/cache/%{name}/work
+%define _initrddir %{_sysconfdir}/init.d
 
 Name: tomcat6
 Epoch: 0
 Version: %{major_version}.%{minor_version}.%{micro_version}
-Release: 1.1%{?dist}
+Release: 6.1%{?dist}
 Summary: Apache Servlet/JSP Engine, RI for Servlet %{servletspec}/JSP %{jspspec} API
 
 Group: Networking/Daemons
@@ -76,20 +77,20 @@
 BuildRequires: findutils
 BuildRequires: jakarta-commons-collections
 BuildRequires: jakarta-commons-daemon
-BuildRequires: java-1.6.0-devel
+BuildRequires: java-devel
 BuildRequires: jpackage-utils >= 0:1.7.0
 BuildRequires: junit
 Requires(pre): shadow-utils
 Requires(pre): shadow-utils
 Requires: jakarta-commons-daemon
 Requires: jakarta-commons-logging
-Requires: java-1.6.0
+Requires: java
 Requires: procps
 Requires: %{name}-lib = %{epoch}:%{version}-%{release}
-Requires(post): chkconfig
-Requires(preun): chkconfig
-# for /sbin/service
-Requires(preun): initscripts
+Requires(post): /sbin/chkconfig
+Requires(preun): /sbin/chkconfig
+Requires(post): /lib/lsb/init-functions
+Requires(preun): /lib/lsb/init-functions
 
 %description
 Tomcat is the servlet container that is used in the official Reference
@@ -130,8 +131,6 @@
 Provides: jsp = %{jspspec}
 Provides: jsp21
 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
-Requires(post): chkconfig
-Requires(postun): chkconfig
 
 %description jsp-%{jspspec}-api
 Apache Tomcat JSP API implementation classes.
@@ -142,6 +141,7 @@
 Requires: %{name}-jsp-%{jspspec}-api = %{epoch}:%{version}-%{release}
 Requires: %{name}-servlet-%{servletspec}-api = %{epoch}:%{version}-%{release}
 Requires(post): ecj
+Requires(post): %{_javadir}/ecj.jar
 Requires(post): jakarta-commons-collections-tomcat5
 Requires(post): jakarta-commons-dbcp-tomcat5
 Requires(post): jakarta-commons-pool-tomcat5
@@ -156,8 +156,6 @@
 Provides: servlet = %{servletspec}
 Provides: servlet6
 Provides: servlet25
-Requires(post): chkconfig
-Requires(postun): chkconfig
 
 %description servlet-%{servletspec}-api
 Apache Tomcat Servlet API implementation classes.
@@ -352,7 +350,7 @@
 # clean tempdir and workdir on removal or upgrade
 %{__rm} -rf %{workdir}/* %{tempdir}/*
 if [ "$1" = "0" ]; then
-    /sbin/service %{name} stop >/dev/null 2>&1
+    %{_initrddir}/%{name} stop >/dev/null 2>&1
     /sbin/chkconfig --del %{name}
 fi
 
@@ -434,7 +432,27 @@
 %{appdir}/sample
 
 %changelog
-* Tue Aug 26 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-1.1
+* Tue Oct 07 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-6.1
+- use lsb_release instead of lsb-release to get the distributor
+
+* Tue Oct 07 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-5
+- fix initscript messages on Mandriva Linux
+- fix help message in initscript
+
+* Wed Oct 01 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-4
+- redefine %%_initrddir for FHS-compliance
+- make initscript LSB-complaint
+
+* Fri Sep 26 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-3
+- fix status in initscript
+
+* Thu Sep 25 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-2
+- remove initscripts and /sbin/service requirement
+- call initscript directly without using /sbin/service
+- require /sbin/chkconfig instead of chkconfig
+- remove chkconfig requirement from packages that don't require it
+
+* Tue Aug 26 2008 David Walluck <dwalluck at redhat.com> 0:6.0.18-1
 - 6.0.18
 - Resolves: CVE-2008-1232, CVE-2008-1947, CVE-2008-2370, CVE-2008-2938
 - fix definition of java.security.policy with d%%{name} start-security




More information about the scm-commits mailing list