Hello community,

here is the log from the commit of package tomcat for openSUSE:Factory checked 
in at 2016-04-12 19:34:40
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/tomcat (Old)
 and      /work/SRC/openSUSE:Factory/.tomcat.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "tomcat"

Changes:
--------
--- /work/SRC/openSUSE:Factory/tomcat/tomcat.changes    2016-03-09 
16:48:45.000000000 +0100
+++ /work/SRC/openSUSE:Factory/.tomcat.new/tomcat.changes       2016-04-12 
19:34:42.000000000 +0200
@@ -1,0 +2,17 @@
+Thu Apr  7 13:01:07 UTC 2016 - tchva...@suse.com
+
+- Fix fixme for the prereq preamble value
+- It seems systemd prints error on adding the @ services to macros
+  so do not do that
+
+-------------------------------------------------------------------
+Thu Mar 31 08:18:39 UTC 2016 - dmacvi...@suse.de
+
+- package was partly merged with the scripts used in the
+  Fedora distribution
+- support running multiple tomcat instances on the same server
+  (fate#317783)
+- add catalina-jmx-remote.jar (fate#318403)
+- remove sysvinit support: systemd is required
+
+-------------------------------------------------------------------

Old:
----
  tomcat-7.0-jsvc.service
  tomcat-7.0-tomcat-sysd
  tomcat-7.0.service

New:
----
  tomcat-8.0-jsvc.service
  tomcat-8.0.service
  tomcat-8.0.sysconfig
  tomcat-functions
  tomcat-named.service
  tomcat-preamble
  tomcat-server

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

Other differences:
------------------
++++++ tomcat.spec ++++++
--- /var/tmp/diff_new_pack.0IgHRi/_old  2016-04-12 19:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.0IgHRi/_new  2016-04-12 19:34:43.000000000 +0200
@@ -17,7 +17,6 @@
 #
 
 
-%global with_systemd 0%{?suse_version} > 1210
 %define jspspec 2.3
 %define servletspec 3.1
 %define elspec 3.0
@@ -26,7 +25,8 @@
 %define micro_version 32
 %define packdname apache-tomcat-%{version}-src
 # FHS 2.3 compliant tree structure - http://www.pathname.com/fhs/2.3/
-%define appdir /srv/%{name}/webapps
+%global basedir /srv/%{name}
+%define appdir %{basedir}/webapps
 %define bindir %{_datadir}/%{name}/bin
 %define confdir %{_sysconfdir}/%{name}
 %define homedir %{_datadir}/%{name}
@@ -45,6 +45,7 @@
 Source0:        
http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz
 Source1:        %{name}-%{major_version}.%{minor_version}.conf
 Source2:        %{name}-%{major_version}.%{minor_version}.init
+Source3:        %{name}-%{major_version}.%{minor_version}.sysconfig
 Source4:        %{name}-%{major_version}.%{minor_version}.wrapper
 Source5:        %{name}-%{major_version}.%{minor_version}.logrotate
 Source6:        %{name}-%{major_version}.%{minor_version}-digest.script
@@ -52,15 +53,18 @@
 Source8:        servlet-api-OSGi-MANIFEST.MF
 Source9:        jsp-api-OSGi-MANIFEST.MF
 Source10:       %{name}-%{major_version}.%{minor_version}-log4j.properties
-Source11:       tomcat-7.0.service
+Source11:       %{name}-%{major_version}.%{minor_version}.service
 Source12:       el-api-OSGi-MANIFEST.MF
 Source13:       jasper-el-OSGi-MANIFEST.MF
 Source14:       jasper-OSGi-MANIFEST.MF
 Source15:       tomcat-api-OSGi-MANIFEST.MF
 Source16:       tomcat-juli-OSGi-MANIFEST.MF
-Source17:       tomcat-7.0-tomcat-sysd
-Source20:       tomcat-7.0-jsvc.service
-Source30:       dbcp-tomcat-build.xml
+Source20:       %{name}-%{major_version}.%{minor_version}-jsvc.service
+Source21:       tomcat-functions
+Source30:       tomcat-preamble
+Source31:       tomcat-server
+Source32:       tomcat-named.service
+Source40:       dbcp-tomcat-build.xml
 Source1000:     tomcat-rpmlintrc
 Source1001:     
http://www.apache.org/dist/tomcat/tomcat-%{major_version}/v%{version}/src/%{packdname}.tar.gz.asc
 Source1002:     %{name}.keyring
@@ -95,6 +99,8 @@
 BuildRequires:  junit
 BuildRequires:  log4j
 BuildRequires:  sed
+BuildRequires:  systemd
+BuildRequires:  systemd-rpm-macros
 BuildRequires:  unzip
 BuildRequires:  wsdl4j
 BuildRequires:  zip
@@ -104,19 +110,14 @@
 Requires:       jakarta-commons-logging
 Requires:       jakarta-commons-pool
 Requires:       log4j
-Requires(post): /sbin/chkconfig
+Requires(post): %fillup_prereq
 Requires(pre):  %{_sbindir}/groupadd
 Requires(pre):  %{_sbindir}/useradd
-Requires(preun): /sbin/chkconfig
 Recommends:     libtcnative-1-0 >= 1.1.24
+Recommends:     logrotate
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
-%if %{with_systemd}
-BuildRequires:  systemd
 %systemd_requires
-%else
-Recommends:     logrotate
-%endif
 
 %description
 Tomcat is the servlet container that is used in the official Reference
@@ -186,7 +187,6 @@
 %description jsp-2_3-api
 Apache Tomcat JSP API implementation classes version 2.3
 
-%if %{with_systemd}
 %package jsvc
 Summary:        Apache jsvc wrapper for Apache Tomcat as separate service
 Group:          Productivity/Networking/Web/Servers
@@ -197,7 +197,6 @@
 Systemd service and wrapper scripts to start tomcat with jsvc,
 which allows tomcat to perform some privileged operations
 (e.g. bind to a port < 1024) and then switch identity to a non-privileged user.
-%endif
 
 %package lib
 Summary:        Libraries needed to run the Tomcat Web container
@@ -242,8 +241,8 @@
 # remove pre-built binaries and windows files
 find . -type f \( -name "*.bat" -o -name "*.class" -o -name Thumbs.db -o -name 
"*.gz" -o \
           -name "*.jar" -o -name "*.war" -o -name "*.zip" \) | xargs -t rm -f
-%patch0 -p1
-%patch1 -p1
+%patch0
+%patch1
 %patch2 -p1
 %patch3
 %patch4 -p1
@@ -257,7 +256,7 @@
 
 mkdir -p commons/dbcp
 pushd commons/dbcp
-cp %{SOURCE30} .
+cp %{SOURCE40} .
 mkdir src
 cp -r %{_usrsrc}/commons-dbcp/java src/
 export CLASSPATH=$(build-classpath commons-pool-tomcat5)
@@ -297,7 +296,7 @@
     -Dno.build.dbcp=true \
     -Dversion="%{version}" \
     -Dversion.build="%{micro_version}" \
-    deploy dist-prepare dist-source javadoc package embed-jars
+    deploy dist-prepare dist-source javadoc package embed-jars 
extras-jmx-remote
 
 # remove some jars that we'll replace with symlinks later
 rm output/build/bin/commons-daemon.jar \
@@ -345,25 +344,27 @@
 install -d -m 0755 %{buildroot}%{_bindir}
 install -d -m 0755 %{buildroot}%{_sbindir}
 install -d -m 0755 %{buildroot}%{_javadocdir}/%{name}
-
-%if %{with_systemd}
-install -d -m 0755 %{buildroot}%{_unitdir}
-%else
-install -d -m 0755 %{buildroot}%{_initddir}
+install -d -m 0755 %{buildroot}%{_initrddir}
+install -d -m 0755 %{buildroot}%{_systemddir}
 install -d -m 0755 %{buildroot}%{_sysconfdir}/logrotate.d
-%endif
-
-install -d -m 0755 %{buildroot}%{_localstatedir}/log/%{name}
+install -d -m 0755 %{buildroot}%{_sysconfdir}/sysconfig
 install -d -m 0755 %{buildroot}%{appdir}
 install -d -m 0755 %{buildroot}%{bindir}
-install -d -m 0755 %{buildroot}%{confdir}
+install -d -m 0775 %{buildroot}%{confdir}
+install -d -m 0755 %{buildroot}%{cachedir}/Catalina/localhost
+install -d -m 0775 %{buildroot}%{confdir}/conf.d
+/bin/echo "Place your custom *.conf files here. Shell expansion is supported." 
> %{buildroot}%{confdir}/conf.d/README
 install -d -m 0755 %{buildroot}%{libdir}
-install -d -m 0755 %{buildroot}%{logdir}
-install -d -m 0755 %{buildroot}%{homedir}
-install -d -m 0755 %{buildroot}%{tempdir}
+install -d -m 0775 %{buildroot}%{logdir}
+/bin/touch %{buildroot}%{logdir}/catalina.out
+install -d -m 0775 %{buildroot}%{_localstatedir}/lib/tomcats
+/bin/echo "%{name}-%{major_version}.%{minor_version}.%{micro_version} RPM 
installed" >> %{buildroot}%{logdir}/catalina.out
+install -d -m 0775 %{buildroot}%{homedir}
+install -d -m 0775 %{buildroot}%{tempdir}
 install -d -m 0775 %{buildroot}%{workdir}
-install -d -m 0755 %{buildroot}%{cachedir}/Catalina/localhost
-install -d -m 0755 %{buildroot}/%{_sbindir}
+install -d -m 0755 %{buildroot}%{_unitdir}
+install -d -m 0755 %{buildroot}%{_libexecdir}/%{name}
+install -d -m 0755 %{buildroot}%{_localstatedir}/adm/fillup-templates
 
 # move things into place
 # First copy supporting libs to tomcat lib
@@ -379,6 +380,11 @@
     cp -a *.jar %{buildroot}%{libdir}
 popd
 
+# tomcat extras
+pushd output/extras
+    cp -a *.jar %{buildroot}%{libdir}
+popd
+
 # bnc#847505: add missing tomcat-dbcp.jar
 cp -a commons/dbcp/dbcp-tomcat5/commons-dbcp-tomcat5.jar 
%{buildroot}/%{libdir}/tomcat-dbcp.jar
 
@@ -387,32 +393,20 @@
 
 sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
          -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g"  \
-         -e "s|\@\@\@JAVAHOME\@\@\@|%{_sysconfdir}/alternatives/jre|g" \
          -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE1} \
     > %{buildroot}%{confdir}/%{name}.conf
-
-%if %{with_systemd}
+sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
+   -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
+   -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE3} \
+    > %{buildroot}%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
+install -m 0644 %{SOURCE4} \
+    %{buildroot}%{_sbindir}/%{name}
 install -m 0644 %{SOURCE11} \
     %{buildroot}%{_unitdir}/%{name}.service
-install -m 0644 %{SOURCE17} \
-    %{buildroot}%{_sbindir}/%{name}-sysd
 install -m 0644 %{SOURCE20} \
     %{buildroot}%{_unitdir}/%{name}-jsvc.service
-(cd %{buildroot}%{_sbindir}; ln -s %{name}-sysd %{name}-jsvc-sysd)
-ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
-ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}-jsvc
-%else
-install -m 0755 %{SOURCE2} \
-    %{buildroot}%{_initddir}/%{name}
-ln -sf %{_initddir}/%{name} %{buildroot}/%{_sbindir}/rc%{name}
-%endif
-
-install -m 0755 %{SOURCE4} \
-    %{buildroot}%{_sbindir}/d%{name}
-%if ! %{with_systemd}
 sed -e "s|\@\@\@TCLOG\@\@\@|%{logdir}|g" %{SOURCE5} \
     > %{buildroot}%{_sysconfdir}/logrotate.d/%{name}
-%endif
 sed -e "s|\@\@\@TCHOME\@\@\@|%{homedir}|g" \
          -e "s|\@\@\@TCTEMP\@\@\@|%{tempdir}|g" \
          -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE6} \
@@ -422,6 +416,18 @@
          -e "s|\@\@\@LIBDIR\@\@\@|%{_libdir}|g" %{SOURCE7} \
     > %{buildroot}%{_bindir}/%{name}-tool-wrapper
 
+install -m 0644 %{SOURCE21} \
+    %{buildroot}%{_libexecdir}/%{name}/functions
+install -m 0755 %{SOURCE30} \
+    %{buildroot}%{_libexecdir}/%{name}/preamble
+install -m 0755 %{SOURCE31} \
+    %{buildroot}%{_libexecdir}/%{name}/server
+install -m 0644 %{SOURCE32} \
+    %{buildroot}%{_unitdir}/%{name}@.service
+
+ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}
+ln -sf %{_sbindir}/service %{buildroot}/%{_sbindir}/rc%{name}-jsvc
+
 # create jsp and servlet and el API symlinks
 pushd %{buildroot}%{_javadir}
    mv %{name}/jsp-api.jar %{name}-jsp-%{jspspec}-api.jar
@@ -568,7 +574,7 @@
 echo "%{name}/catalina-ant" > %{buildroot}/%{_sysconfdir}/ant.d/catalina-ant
 %fdupes %{buildroot} /srv/%{name}
 #bnc#565901
-ln -sf %{_sbindir}/d%{name} %{buildroot}/%{bindir}/catalina.sh
+ln -sf %{_sbindir}/%{name} %{buildroot}/%{bindir}/catalina.sh
 
 # Install update-alternatives content
 mkdir -p %{buildroot}%{_sysconfdir}/alternatives
@@ -581,38 +587,29 @@
 touch %{buildroot}%{_sysconfdir}/alternatives/servlet.jar
 ln -sf %{_sysconfdir}/alternatives/servlet.jar 
%{buildroot}%{_javadir}/servlet.jar
 
+mkdir -p %{buildroot}%{_tmpfilesdir}
+cat > %{buildroot}%{_tmpfilesdir}/%{name}.conf <<EOF
+f %{_localstatedir}/run/%{name}.pid 0644 tomcat tomcat -
+EOF
+
 %pre
 # add the tomcat user and group
 %{_sbindir}/groupadd -r tomcat 2>/dev/null || :
 %{_sbindir}/useradd -c "Apache Tomcat" -g tomcat \
     -s /bin/sh -r -d %{homedir} tomcat 2>/dev/null || :
-%if %{with_systemd}
 %service_add_pre %{name}.service
-%endif
 
 %post
-%if %{with_systemd}
 %service_add_post %{name}.service
-%else
 %{fillup_only %{name}}
-%endif
+%{_bindir}/systemd-tmpfiles --create  >/dev/null 2>&1 || :
 
 %preun
-%if %{with_systemd}
 %service_del_preun %{name}.service
-%else
-%stop_on_removal %{name}
-%endif
 
 %postun
-%if %{with_systemd}
 %service_del_postun %{name}.service
-%else
-%insserv_cleanup
-%restart_on_update %{name}
-%endif
 
-%if %{with_systemd}
 %pre jsvc
 %service_add_pre %{name}-jsvc.service
 
@@ -624,7 +621,6 @@
 
 %postun jsvc
 %service_del_postun %{name}-jsvc.service
-%endif
 
 %post el-3_0-api
 update-alternatives --install %{_javadir}/el_api.jar el_api 
%{_javadir}/%{name}-el-%{elspec}-api.jar 20300
@@ -665,34 +661,46 @@
     %{libdir}/\[ecj\].jar >/dev/null 2>&1
 
 %files
-%defattr(-,root,root)
+%defattr(0664,root,tomcat,0755)
 %doc {LICENSE,NOTICE,RELEASE*}
 %attr(0755,root,root) %{_bindir}/%{name}-digest
 %attr(0755,root,root) %{_bindir}/%{name}-tool-wrapper
-%attr(0755,root,root) %{_sbindir}/d%{name}
-%if %{with_systemd}
+%attr(0755,root,root) %{_sbindir}/%{name}
 %attr(0644,root,root) %{_unitdir}/%{name}.service
-%attr(0755,root,root) %{_sbindir}/%{name}-sysd
-%else
-%attr(0755,root,root) %{_initddir}/%{name}
-%endif
+%{_sbindir}/rc%{name}
+%attr(0644,root,root) %{_unitdir}/%{name}@.service
+%attr(0755,root,root) %dir %{_libexecdir}/%{name}
+%attr(0755,root,root) %dir %{_localstatedir}/lib/tomcats
+%attr(0755,root,root) %{_libexecdir}/%{name}/functions
+%attr(0755,root,root) %{_libexecdir}/%{name}/preamble
+%attr(0755,root,root) %{_libexecdir}/%{name}/server
 #bnc#565901
 %{bindir}/catalina.sh
-%if ! %{with_systemd}
 %attr(0644,root,root) %config(noreplace) %{_sysconfdir}/logrotate.d/%{name}
-%endif
-# bnc#726307
-%attr(0775,root,tomcat) %dir %{confdir}
+%attr(0755,root,tomcat) %dir %{basedir}
+%attr(0755,root,tomcat) %dir %{confdir}
+%defattr(0664,tomcat,root,0770)
+%attr(0775,root,tomcat) %dir %{appdir}
+%attr(0770,tomcat,root) %{logdir}
+%attr(0660,tomcat,tomcat) %{logdir}/catalina.out
+%attr(0770,root,tomcat) %{cachedir}
+%defattr(0664,root,tomcat,0770)
+%attr(0770,root,tomcat) %dir %{tempdir}
+%attr(0770,root,tomcat) %dir %{workdir}
+# tomcat group writtable dirs - bnc#625415
+%defattr(0664,root,tomcat,0775)
 %{confdir}/Catalina
-%config(noreplace) %{confdir}/%{name}.conf
-%config(noreplace) %{confdir}/*.policy
-%config(noreplace) %{confdir}/*.properties
-%config(noreplace) %{confdir}/context.xml
-%config(noreplace) %{confdir}/server.xml
-%config(noreplace) %{confdir}/web.xml
-%verify (not user group) %attr(0660,tomcat,tomcat) %config(noreplace) 
%{confdir}/tomcat-users.xml
+%attr(0775,root,tomcat) %dir %{confdir}/conf.d
+%attr(0664,tomcat,tomcat) %{confdir}/conf.d/README
+%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/%{name}.conf
+%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.policy
+%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/*.properties
+%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/context.xml
+%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/server.xml
+%attr(0660,tomcat,tomcat) %config(noreplace) %{confdir}/tomcat-users.xml
+%attr(0664,tomcat,tomcat) %config(noreplace) %{confdir}/web.xml
 %dir %{homedir}
-%dir %{bindir}
+%{_tmpfilesdir}/%{name}.conf
 %{bindir}/bootstrap.jar
 %{bindir}/catalina-tasks.xml
 %{homedir}/lib
@@ -701,14 +709,7 @@
 %{homedir}/work
 %{homedir}/logs
 %{homedir}/conf
-%dir /srv/%{name}
-%{_sbindir}/rc%{name}
-%{confdir}/Catalina
-# tomcat group writtable dirs - bnc#625415
-%defattr(0664,root,tomcat,0775)
-%verify (not user group) %dir %{appdir}
-%verify (not user group) %{logdir}
-%verify (not user group) %{cachedir}
+%{_localstatedir}/adm/fillup-templates/sysconfig.%{name}
 
 %files admin-webapps
 %defattr(0644,root,root,0755)
@@ -795,12 +796,9 @@
 %{appdir}/examples
 %{appdir}/sample
 
-%if %{with_systemd}
 %files jsvc
 %defattr(755,root,root,0755)
-%{_sbindir}/%{name}-jsvc-sysd
-%{_sbindir}/rc%{name}-jsvc
 %attr(0644,root,root) %{_unitdir}/%{name}-jsvc.service
-%endif
+%{_sbindir}/rc%{name}-jsvc
 
 %changelog


++++++ tomcat-8.0-bootstrap-MANIFEST.MF.patch ++++++
--- /var/tmp/diff_new_pack.0IgHRi/_old  2016-04-12 19:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.0IgHRi/_new  2016-04-12 19:34:43.000000000 +0200
@@ -1,7 +1,5 @@
-Index: apache-tomcat-7.0.2-src/res/META-INF/bootstrap.jar.manifest
-===================================================================
---- apache-tomcat-7.0.2-src.orig/res/META-INF/bootstrap.jar.manifest   
2010-08-04 01:26:39.000000000 +0200
-+++ apache-tomcat-7.0.2-src/res/META-INF/bootstrap.jar.manifest        
2010-09-23 11:25:07.237277450 +0200
+--- res/META-INF/bootstrap.jar.manifest.orig   2010-04-06 10:11:09.000000000 
-0600
++++ res/META-INF/bootstrap.jar.manifest        2010-04-06 10:45:56.000000000 
-0600
 @@ -1,6 +1,5 @@
  Manifest-Version: 1.0
  Main-Class: org.apache.catalina.startup.Bootstrap

++++++ tomcat-8.0-digest.script ++++++
--- /var/tmp/diff_new_pack.0IgHRi/_old  2016-04-12 19:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.0IgHRi/_new  2016-04-12 19:34:43.000000000 +0200
@@ -10,39 +10,36 @@
   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/tomcat/tomcat.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"
-
-#sanitize the classpath - remove double and trailing colons
-CLASSPATH="`echo ${CLASSPATH} | sed 's/::+/:/g; s/^://; s/:$//g'`"
 export CLASSPATH
- 
+
 # Configuration
 MAIN_CLASS="org.apache.catalina.startup.Tool"
 BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
 BASE_OPTIONS=""
 BASE_JARS="commons-daemon tomcat/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 "$@"

++++++ tomcat-7.0-jsvc.service -> tomcat-8.0-jsvc.service ++++++
--- /work/SRC/openSUSE:Factory/tomcat/tomcat-7.0-jsvc.service   2013-04-20 
18:02:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.tomcat.new/tomcat-8.0-jsvc.service      
2016-04-12 19:34:42.000000000 +0200
@@ -1,25 +1,21 @@
 # Systemd unit file for tomcat
 # 
-# You can clone this service by:
-# 1.) Add a new EnvironmentFile declaring the new values for CATALINA_BASE
-#     and others
-# 2.) Define new Environment=JSVC_PIDFILE=/var/run/tomcat-foo.pid if you want
-#     to run more than one service
+# To create clones of this service:
+# 1) By default SERVICE_NAME=tomcat. When cloned, the value must be defined 
+# before tomcat-sysd is called.
+# 2) Create /etc/sysconfig/${SERVICE_NAME} from /etc/sysconfig/tomcat
+# to override tomcat defaults
 
 [Unit]
 Description=Apache Tomcat Web Application Container JSVC wrapper
-After=network.target
+After=syslog.target network.target
 
 [Service]
 Type=simple
 EnvironmentFile=/etc/tomcat/tomcat.conf
-#PIDFILE is needed for jsvc
-#Environment=JSVC_PIDFILE=/var/run/tomcat-jsvc.pid
-ExecStart=/usr/sbin/tomcat-jsvc-sysd start
-ExecStop=/usr/sbin/tomcat-jsvc-sysd stop
-StandardOutput=syslog
-SyslogIdentifier=%n
-SyslogFacility=daemon
+Environment="NAME=" "USE_JSVC=true"
+ExecStart=/usr/lib/tomcat/server start
+ExecStop=/usr/lib/tomcat/server stop
 
 [Install]
 WantedBy=multi-user.target

++++++ tomcat-8.0-tomcat-users-webapp.patch ++++++
--- /var/tmp/diff_new_pack.0IgHRi/_old  2016-04-12 19:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.0IgHRi/_new  2016-04-12 19:34:43.000000000 +0200
@@ -1,7 +1,5 @@
-Index: apache-tomcat-7.0.2-src/conf/tomcat-users.xml
-===================================================================
---- apache-tomcat-7.0.2-src/conf/tomcat-users.xml      2010-08-04 
01:26:35.000000000 +0200
-+++ apache-tomcat-7.0.2-src/conf/tomcat-users.xml      2010-09-23 
11:27:11.819276755 +0200
+--- conf/tomcat-users.xml~     2008-01-28 17:41:06.000000000 -0500
++++ conf/tomcat-users.xml      2008-03-07 19:40:07.000000000 -0500
 @@ -23,4 +23,14 @@
    <user username="both" password="tomcat" roles="tomcat,role1"/>
    <user username="role1" password="tomcat" roles="role1"/>

++++++ tomcat-8.0-tool-wrapper.script ++++++
--- /var/tmp/diff_new_pack.0IgHRi/_old  2016-04-12 19:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.0IgHRi/_new  2016-04-12 19:34:43.000000000 +0200
@@ -2,7 +2,7 @@
 #
 # tomcat-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
@@ -10,40 +10,36 @@
   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/tomcat/tomcat.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"
-
-#sanitize the classpath - remove double and trailing colons
-CLASSPATH="`echo ${CLASSPATH} | sed 's/::+/:/g; s/^://; s/:$//g'`"
-
 export CLASSPATH
- 
+
 # Configuration
 MAIN_CLASS="org.apache.catalina.startup.Tool"
 BASE_OPTIONS=""
 BASE_FLAGS="-Dcatalina.home=\"$CATALINA_HOME\""
 BASE_JARS="commons-daemon tomcat/catalina servlet"
- 
+
 # Set parameters
 set_classpath $BASE_JARS
 set_flags $BASE_FLAGS
 set_options $BASE_OPTIONS
- 
+
 # Let's start
 run "$@"

++++++ tomcat-8.0.conf ++++++
--- /var/tmp/diff_new_pack.0IgHRi/_old  2016-04-12 19:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.0IgHRi/_new  2016-04-12 19:34:43.000000000 +0200
@@ -1,62 +1,52 @@
 # System-wide configuration file for tomcat services
-# This will be sourced by tomcat and any secondary service
- 
+# This will be loaded by systemd as an environment file,
+# so please keep the syntax. For shell expansion support
+# place your custom files as /etc/tomcat/conf.d/*.conf
+#
+# There are 2 "classes" of startup behavior in this package.
+# The old one, the default service named tomcat.service.
+# The new named instances are called tomcat@instance.service.
+#
+# Use this file to change default values for all services.
+# Change the service specific ones to affect only one service.
+# For tomcat.service it's /etc/sysconfig/tomcat, for
+# tomcat@instance it's /etc/sysconfig/tomcat@instance.
+
+# This variable is used to figure out if config is loaded or not.
+TOMCAT_CFG_LOADED="1"
+
+# In new-style instances, if CATALINA_BASE isn't specified, it will
+# be constructed by joining TOMCATS_BASE and NAME.
+TOMCATS_BASE="/var/lib/tomcats/"
+
 # Where your java installation lives
-JAVA_HOME="@@@JAVAHOME@@@"
- 
+JAVA_HOME="/usr/lib/jvm/jre"
+
 # Where your tomcat installation lives
 CATALINA_HOME="@@@TCHOME@@@"
-# where the given instance lives
-CATALINA_BASE="@@@TCHOME@@@"
-# the temp dir of the instance
-CATALINA_TMPDIR="@@@TCTEMP@@@"
- 
+
+# System-wide tmp
+CATALINA_TMPDIR="/var/cache/tomcat/temp"
+
 # 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=@@@LIBDIR@@@"
- 
-# What user should run tomcat
-# This value is interpreted differently
-# 1.) for systemd units derived from tomcat.service, the User/Group settings 
is used
-# 2.) for systemd units derived from tomcat-jsvc.service this value is 
respected (with tomcat as a default)
-# 3.) for sysv init script, this value is respected (with tomcat as a default)
-#TOMCAT_USER="tomcat"
- 
+#JAVA_OPTS="-Djava.library.path=/usr/lib"
+
+# Set default javax.sql.DataSource factory to apache commons one. See 
rhbz#1214381
+JAVA_OPTS="-Djavax.sql.DataSource.Factory=org.apache.commons.dbcp.BasicDataSourceFactory"
+
 # 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
-# WARNING: does not make any sense for systemd users
-#CATALINA_PID="/var/run/tomcat.pid"
- 
-# Connector port is 8080 for this tomcat instance
-#CONNECTOR_PORT="8080"
- 
+# TODO(stingray): does nothing, fix.
+# SHUTDOWN_WAIT="30"
+
 # 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"

++++++ tomcat-7.0-jsvc.service -> tomcat-8.0.service ++++++
--- /work/SRC/openSUSE:Factory/tomcat/tomcat-7.0-jsvc.service   2013-04-20 
18:02:50.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.tomcat.new/tomcat-8.0.service   2016-04-12 
19:34:42.000000000 +0200
@@ -1,25 +1,23 @@
-# Systemd unit file for tomcat
+# Systemd unit file for default tomcat
 # 
-# You can clone this service by:
-# 1.) Add a new EnvironmentFile declaring the new values for CATALINA_BASE
-#     and others
-# 2.) Define new Environment=JSVC_PIDFILE=/var/run/tomcat-foo.pid if you want
-#     to run more than one service
+# To create clones of this service:
+# DO NOTHING, use tomcat@.service instead.
 
 [Unit]
-Description=Apache Tomcat Web Application Container JSVC wrapper
-After=network.target
+Description=Apache Tomcat Web Application Container
+After=syslog.target network.target
 
 [Service]
 Type=simple
 EnvironmentFile=/etc/tomcat/tomcat.conf
-#PIDFILE is needed for jsvc
-#Environment=JSVC_PIDFILE=/var/run/tomcat-jsvc.pid
-ExecStart=/usr/sbin/tomcat-jsvc-sysd start
-ExecStop=/usr/sbin/tomcat-jsvc-sysd stop
-StandardOutput=syslog
-SyslogIdentifier=%n
-SyslogFacility=daemon
+Environment="NAME="
+EnvironmentFile=-/etc/sysconfig/tomcat
+ExecStart=/usr/lib/tomcat/server start
+ExecStop=/usr/lib/tomcat/server stop
+SuccessExitStatus=143
+User=tomcat
+Group=tomcat
+
 
 [Install]
 WantedBy=multi-user.target

++++++ tomcat-8.0.sysconfig ++++++
# Service-specific configuration file for tomcat. This will be sourced by
# systemd for the default service (tomcat.service)
# If you want to customize named instance, make a similar file
# and name it tomcat@instancename.

# You will not need to set this, usually. For default service it equals
# CATALINA_HOME. For named service, it equals ${TOMCATS_BASE}${NAME}
#CATALINA_BASE="@@@TCHOME@@@"

# Please take a look at /etc/tomcat/tomcat.conf to have an idea what you
# can override.
++++++ tomcat-8.0.wrapper ++++++
--- /var/tmp/diff_new_pack.0IgHRi/_old  2016-04-12 19:34:43.000000000 +0200
+++ /var/tmp/diff_new_pack.0IgHRi/_new  2016-04-12 19:34:43.000000000 +0200
@@ -1,77 +1,24 @@
 #!/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/tomcat/tomcat.conf"
-fi
- 
-if [ -r "$TOMCAT_CFG" ]; then
-    . $TOMCAT_CFG
+
+if [ "$1" = "version" ]; then
+  . /usr/lib/tomcat/preamble
+  exec ${JAVACMD} -classpath ${CATALINA_HOME}/lib/catalina.jar \
+    org.apache.catalina.util.ServerInfo
 fi
- 
-set_javacmd
- 
-# CLASSPATH munging
-if [ -n "$JSSE_HOME" ]; then
-  CLASSPATH="${CLASSPATH}:$(build-classpath jcert jnet jsse 2>/dev/null)"
+
+SRV="tomcat"
+if [ -n "$2" ]; then
+  SRV="tomcat@$2"
 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)"
 
-#sanitize the classpath - remove double and trailing colons
-CLASSPATH="`echo ${CLASSPATH} | sed 's/::+/:/g; s/^://; s/:$//g'`"
- 
 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
+  systemctl start ${SRV}.service
 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
+  systemctl stop ${SRV}.service
 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}"
+  echo "Usage: $0 {start|stop|version} [server-id]"
   exit 1
 fi

++++++ tomcat-functions ++++++
#!/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

_save_function() {
    local ORIG_FUNC=$(declare -f $1)
    local NEWNAME_FUNC="$2${ORIG_FUNC#$1}"
    eval "$NEWNAME_FUNC"
}

run_jsvc(){
    if [ -x /usr/bin/jsvc ]; then
        TOMCAT_USER="tomcat"
        JSVC="/usr/bin/jsvc"
        
        JSVC_OPTS="-nodetach -pidfile /var/run/jsvc-tomcat${NAME}.pid -user 
${TOMCAT_USER} -outfile ${CATALINA_BASE}/logs/catalina.out -errfile 
${CATALINA_BASE}/logs/catalina.out"
        if [ "$1" = "stop" ]; then
                JSVC_OPTS="${JSVC_OPTS} -stop"
        fi

        exec "${JSVC}" ${JSVC_OPTS} ${FLAGS} -classpath "${CLASSPATH}" 
${OPTIONS} "${MAIN_CLASS}" "${@}"
    else
        echo "Can't find /usr/bin/jsvc executable"
    fi

}

_save_function run run_java

run() {
   if [ "${USE_JSVC}" = "true" ] ; then
        run_jsvc $@
   else
        run_java $@
   fi
}

++++++ tomcat-named.service ++++++
# Systemd unit file for tomcat instances.
# 
# To create clones of this service:
# 0. systemctl enable tomcat@name.service
# 1. create catalina.base directory structure in
#    /var/lib/tomcats/name
# 2. profit.

[Unit]
Description=Apache Tomcat Web Application Container
After=syslog.target network.target

[Service]
Type=simple
EnvironmentFile=/etc/tomcat/tomcat.conf
Environment="NAME=%I"
EnvironmentFile=-/etc/sysconfig/tomcat@%I
ExecStart=/usr/lib/tomcat/server start
ExecStop=/usr/lib/tomcat/server stop
SuccessExitStatus=143
User=tomcat
Group=tomcat

[Install]
WantedBy=multi-user.target

++++++ tomcat-preamble ++++++
#!/bin/bash

. /usr/lib/tomcat/functions

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

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

if [ -d "${TOMCAT_CONFD=/etc/tomcat/conf.d}" ]; then
  for file in ${TOMCAT_CONFD}/*.conf ; do
    if [ -f "$file" ] ; then
      . "$file"
    fi
  done
fi

if [ -z "$CATALINA_BASE" ]; then
  if [ -n "$NAME" ]; then
    if [ -z "$TOMCATS_BASE" ]; then
      TOMCATS_BASE="/var/lib/tomcats/"
    fi
    CATALINA_BASE="${TOMCATS_BASE}${NAME}"
  else
    CATALINA_BASE="${CATALINA_HOME}"
  fi
fi
VERBOSE=1
set_javacmd
cd ${CATALINA_HOME}
# CLASSPATH munging
if [ ! -z "$CLASSPATH" ] ; then
  CLASSPATH="$CLASSPATH":
fi

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 [ -z "$LOGGING_PROPERTIES" ] ; then
  LOGGING_PROPERTIES="${CATALINA_BASE}/conf/logging.properties"
  if [ ! -f "${LOGGING_PROPERTIES}" ] ; then
    LOGGING_PROPERTIES="${CATALINA_HOME}/conf/logging.properties"
  fi
fi
++++++ tomcat-server ++++++
#!/bin/bash

. /usr/lib/tomcat/preamble

MAIN_CLASS=org.apache.catalina.startup.Bootstrap

FLAGS="$JAVA_OPTS"
OPTIONS="-Dcatalina.base=$CATALINA_BASE \
-Dcatalina.home=$CATALINA_HOME \
-Djava.endorsed.dirs=$JAVA_ENDORSED_DIRS \
-Djava.io.tmpdir=$CATALINA_TMPDIR \
-Djava.util.logging.config.file=${LOGGING_PROPERTIES} \
-Djava.util.logging.manager=org.apache.juli.ClassLoaderLogManager"

if [ "$1" = "start" ] ; then
  FLAGS="${FLAGS} $CATALINA_OPTS"
  if [ "${SECURITY_MANAGER}" = "true" ] ; then
    OPTIONS="${OPTIONS} \
    -Djava.security.manager \
    -Djava.security.policy==${CATALINA_BASE}/conf/catalina.policy"
  fi
  run start
elif [ "$1" = "stop" ] ; then
  run stop
fi

Reply via email to