Summary(pl.UTF-8): Silnik Servlet/JSP Apache będący wzorcową implementacją API Servlet 2.4/JSP 2.0
Name: tomcat
Version: 5.5.27
-Release: 0.5
+Release: 0.6
License: Apache v2.0
Group: Networking/Daemons/Java
Source0: http://www.apache.org/dist/tomcat/tomcat-5/v%{version}/src/apache-%{name}-%{version}-src.tar.gz
Requires: jsse >= 1.0.2
%{?with_jta:Requires: jta >= 1.0.1}
Requires: rc-scripts
+Provides: group(servlet)
Provides: group(tomcat)
Provides: java-servlet-container
Provides: user(tomcat)
# we don't need dos scripts
rm -f container/catalina/src/bin/*.bat
+# or those
+rm -f container/catalina/src/bin/{startup,shutdown}.sh
# causes file(1) rpm to abort, and not really neccessary file
rm container/webapps/admin/images/Thumbs.db
cp -a temp $CATALINADIR
ln -sf %{_logdir}/tomcat $CATALINADIR/logs
+ln -sf %{_logdir}/tomcat $TOMCATDIR/logs
ln -sf %{_vardir}/work $TOMCATDIR/work
ln -sf %{_vardir}/conf $TOMCATDIR/conf
ln -sf %{_vardir}/conf $RPM_BUILD_ROOT%{_sysconfdir}
%pre
%groupadd -g 234 -r -f tomcat
-%useradd -u 234 -r -d /var/lib/tomcat -s /bin/false -c "Tomcat User" -g tomcat tomcat
+%groupadd -g 237 -r -f servlet
+%useradd -u 234 -r -d /var/lib/tomcat -s /bin/false -c "Tomcat User" -g tomcat -G servlet tomcat
%post
/sbin/chkconfig --add tomcat
if [ "$1" = "0" ]; then
%userremove tomcat
%groupremove tomcat
+ %groupremove servlet
fi
%files
%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/Catalina/localhost/webdav.xml
%{_tomcatdir}/webapps/webdav
+%{_tomcatdir}/logs
%{_tomcatdir}/work
%{_tomcatdir}/shared
%dir %{_vardir}
-%dir %{_vardir}/conf
-%dir %{_vardir}/conf/Catalina
+# these directory has to be writeable because /admin need to modify config
+# files and create temporary files
+%dir %attr(775,root,tomcat) %{_vardir}/conf
+%dir %attr(775,root,tomcat) %{_vardir}/conf/Catalina
%dir %{_vardir}/conf/Catalina/localhost
# tomcat config has to be writeable because of tomcat-users.xml file and Catalina dir
%config(noreplace) %attr(664,root,tomcat) %verify(not md5 mtime size) %{_vardir}/conf/MANIFEST.MF