Bug 700199

Summary: Review Request: tomcat - Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
Product: [Fedora] Fedora Reporter: Ivan Afonichev <ivan.afonichev>
Component: Package ReviewAssignee: Alexander Kurtakov <akurtako>
Status: CLOSED RAWHIDE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: unspecified    
Version: rawhideCC: akurtako, fedora-package-review, leifer, notting, ole.ersoy
Target Milestone: ---Flags: akurtako: fedora‑review+
limburgher: fedora‑cvs+
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2011-05-31 14:41:26 EDT Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:

Description Ivan Afonichev 2011-04-27 14:27:51 EDT
Spec URL: https://github.com/vanaf/tomcat7-fedora/blob/master/tomcat7.spec
SRPM URL: http://baldr.sgu.ru/rpm/tomcat7-7.0.12-1.fc14.src.rpm
Description: 
Tomcat is the servlet container that is used in the official Reference
Implementation for the Java Servlet and JavaServer Pages technologies.
The Java Servlet and JavaServer Pages specifications are developed by
Sun/Oracle under the Java Community Process.

Tomcat is developed in an open and participatory environment and
released under the Apache Software License version 2.0. Tomcat is intended
to be a collaboration of the best-of-breed developers from around the world.
Comment 1 Alexander Kurtakov 2011-04-27 15:12:02 EDT
* Would you please name the package just tomcat instead of tomcat7 ?
* Please remove Provides:         %{name}-log4j = %{epoch}:%{version}-%{release} we don't need it cause there haven't been tomcat7-log4j .
* Please use apache-commons-* names instead of jakarta-commons-* .
* Please remove the old changelog 
* Don't BR/R java-1.6.0 but use java >= 1:1.6.0 , same for java-devel
* Don't copy old crap into the new package e.g.
# Save the conf, app, and lib dirs
# due to rbgz 640686. Copy them to the _tmppath so we don't pollute
# the tomcat file structure
[ -d %{appdir} ] && %{__cp} -rp %{appdir} %{_tmppath}/%{name}-webapps.bak || :
[ -d %{confdir} ] && %{__cp} -rp %{confdir} %{_tmppath}/%{name}-confdir.bak || :
[ -d %{libdir} ] && %{__cp} -rp %{libdir} %{_tmppath}/%{name}-libdir.bak || :

You're not sponsored, right?
Comment 2 Alexander Kurtakov 2011-04-27 15:39:17 EDT
I'm taking this one.
Comment 3 Ivan Afonichev 2011-04-28 01:42:41 EDT
Spec URL: https://github.com/vanaf/tomcat7-fedora/blob/master/tomcat.spec
SRPM URL: http://baldr.sgu.ru/rpm/tomcat-7.0.12-2.fc14.src.rpm


- Package now named just tomcat instead of tomcat7
- Removed Provides:  %{name}-log4j 
- Switched to apache-commons-* names instead of jakarta-commons-* .
- Remove the old changelog 
- BR/R java >= 1:1.6.0 , same for java-devel
- Removed old tomcat6 crap

and actualized tomcat-7.0-tomcat-users-webapp.patch
Comment 4 Alexander Kurtakov 2011-04-30 11:06:40 EDT
You're supposed to run rpmlint on the produced rpms. The current output is huge.

tomcat-jsp-2.2-api.noarch: W: non-standard-group Internet/WWW/Dynamic Content
tomcat-jsp-2.2-api.noarch: W: no-documentation
tomcat-el-2.2-api.noarch: W: non-standard-group Development/Libraries/Java
tomcat-el-2.2-api.noarch: W: no-documentation
tomcat-admin-webapps.noarch: W: non-standard-group System Environment/Applications
tomcat-admin-webapps.noarch: W: no-documentation
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/META-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/WEB-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/WEB-INF/jsp 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/WEB-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/images 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/META-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/images 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/WEB-INF/jsp 0775L
tomcat-lib.noarch: W: non-standard-group Development/Compilers
tomcat-lib.noarch: W: no-documentation
tomcat-lib.noarch: W: dangling-relative-symlink /usr/share/java/tomcat/tomcat-jsp-2.2-api.jar ../tomcat-jsp-2.2-api.jar
tomcat-lib.noarch: W: dangling-relative-symlink /usr/share/java/tomcat/tomcat-servlet-3.0-api.jar ../tomcat-servlet-3.0-api.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/tomcat-juli.jar /usr/share/tomcat/bin/tomcat-juli.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/commons-collections.jar /usr/share/java/apache-commons-collections.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/jasper-jdt.jar /usr/share/java/ecj.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/log4j.jar /usr/share/java/log4j.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/commons-dbcp.jar /usr/share/java/apache-commons-dbcp.jar
tomcat-lib.noarch: W: dangling-relative-symlink /usr/share/java/tomcat/tomcat-el-2.2-api.jar ../tomcat-el-2.2-api.jar
tomcat.noarch: W: spelling-error %description -l en_US servlet -> settler
tomcat.noarch: W: non-standard-group Networking/Daemons
tomcat.noarch: W: incoherent-version-in-changelog 0:7.0.12-1 ['0:7.0.12-2.fc15', '0:7.0.12-2']
tomcat.noarch: W: non-conffile-in-etc /etc/maven/fragments/tomcat
tomcat.noarch: E: non-standard-dir-perm /usr/share/doc/tomcat-7.0.12 0775L
tomcat.noarch: E: non-standard-dir-perm /var/lib/tomcat 0775L
tomcat.noarch: E: zero-length /var/log/tomcat/catalina.out
tomcat.noarch: E: non-standard-dir-perm /etc/tomcat 0775L
tomcat.noarch: E: non-standard-dir-perm /var/log/tomcat 0775L
tomcat.noarch: E: non-standard-dir-perm /usr/share/tomcat 0775L
tomcat.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps 0775L
tomcat.noarch: E: non-standard-dir-perm /etc/tomcat/Catalina/localhost 0775L
tomcat.noarch: W: dangling-symlink /usr/share/tomcat/lib /usr/share/java/tomcat
tomcat.noarch: E: world-writable /etc/tomcat/web.xml 0666L
tomcat.noarch: E: non-standard-dir-perm /var/cache/tomcat 0775L
tomcat.noarch: E: non-standard-dir-perm /etc/tomcat/Catalina 0775L
tomcat.noarch: E: non-standard-dir-perm /var/cache/tomcat/work 0775L
tomcat.noarch: E: non-standard-dir-perm /var/cache/tomcat/temp 0775L
tomcat.noarch: W: no-manual-page-for-binary tomcat-digest
tomcat.noarch: W: no-manual-page-for-binary dtomcat
tomcat.noarch: W: no-manual-page-for-binary tomcat-tool-wrapper
tomcat.noarch: W: no-manual-page-for-binary tomcat
tomcat.noarch: W: dangerous-command-in-%preun rm
tomcat.noarch: W: dangerous-command-in-%posttrans cp
tomcat.noarch: E: use-tmp-in-%posttrans
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat-servlet-3.0-api.noarch: W: non-standard-group Internet/WWW/Dynamic Content
tomcat-servlet-3.0-api.noarch: W: no-documentation
tomcat-servlet-3.0-api.noarch: W: non-conffile-in-etc /etc/maven/fragments/tomcat-servlet-api
tomcat-webapps.noarch: W: non-standard-group System Environment/Applications
tomcat-webapps.noarch: W: no-documentation
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/compressionFilters 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/lib 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/images 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/jsp2/examples 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/listeners 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsp2/simpletag 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/chat 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsp2/jspx 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/chat 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsp2 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/ROOT/WEB-INF 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/security/protected 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/include 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/jsp2 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsp2/el 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/sample 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/forward 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/security 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/sessions 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/tagplugin 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/colors 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/tags 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/jsp/applet 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/dates 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/async 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsp2/jspattribute 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/colors 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/sample/WEB-INF/classes 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/sample/WEB-INF/classes/mypackage 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/cal 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/validators 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/simpletag 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/sessions 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/sample/META-INF 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsptoserv 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/sample/WEB-INF 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/servlets 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/ROOT 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/xml 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/plugin 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/error 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/jsp2/examples/simpletag 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/servlets/images 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/filters 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/jsp2/examples/el 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsp2/misc 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/cal 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/error 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/checkbox 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/dates 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/util 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/sample/images 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/plugin/applet 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/async 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/num 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/jsp2 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/jsp 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/snp 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/examples 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/checkbox 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/WEB-INF/classes/num 0775L
tomcat-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/examples/jsp/jsp2/tagfiles 0775L
tomcat-docs-webapp.noarch: W: non-standard-group System Environment/Applications
tomcat-docs-webapp.noarch: W: no-documentatio

Please fix as much as possible and/or ask me for help where needed.

Yes I know that tomcat6 is having the same problems but let's try to at least produce better packages when we import them.
Comment 5 Ivan Afonichev 2011-05-01 18:27:49 EDT
Spec URL: https://github.com/vanaf/tomcat7-fedora/blob/master/tomcat.spec
SRPM URL: http://baldr.sgu.ru/rpm/tomcat-7.0.12-3.fc14.src.rpm

- Fixed package groups
- Fixed some permissions
- Fixed some links
- Removed old tomcat6 crap



I keep untouched permissions of some dirs where tomcat, I think, needs ability to write(And I don't know why it is useful to set root as owner)

Also it seems that rpmbuild ignores attr in structures like that:
%attr(0755,root,tomcat) %dir %{confdir}
and set them defattr permissions.

My temporary solution is using multiple %defattr
Comment 6 Alexander Kurtakov 2011-05-03 16:04:23 EDT
The build is trying to download stuff from internet and thus fail in our builders.
See http://koji.fedoraproject.org/koji/getfile?taskID=3048288&name=build.log
Comment 7 Ole 2011-05-04 13:55:29 EDT
This line appears twice in the spec here:

https://github.com/vanaf/tomcat7-fedora/raw/master/tomcat.spec

Requires(pre):    shadow-utils
Requires(pre):    shadow-utils
Comment 8 Ivan Afonichev 2011-05-04 17:45:56 EDT
Spec URL: https://github.com/vanaf/tomcat7-fedora/blob/master/tomcat.spec
SRPM URL: http://baldr.sgu.ru/rpm/tomcat-7.0.12-4.fc14.src.rpm

- Provided local paths for libs
- Fixed dependencies
- Fixed update temp/work cleanup
Comment 9 Ivan Afonichev 2011-05-14 09:52:19 EDT
Spec URL: https://github.com/vanaf/tomcat7-fedora/blob/master/tomcat.spec
SRPM URL: http://baldr.sgu.ru/rpm/tomcat-7.0.14-1.fc14.src.rpm

- Updated to 7.0.14
Comment 10 Alexander Kurtakov 2011-05-16 11:08:23 EDT
Oops. sorry for the delay I got distracted by other things but I promise to get back to this review soon.
Comment 11 Alexander Kurtakov 2011-05-19 17:33:58 EDT
Package Review
==============

Key:
- = N/A
x = Check
! = Problem
? = Not evaluated

=== REQUIRED ITEMS ===
[!]  Rpmlint output:
tomcat-lib.noarch: W: no-documentation
tomcat-lib.noarch: W: dangling-relative-symlink /usr/share/java/tomcat/tomcat-jsp-2.2-api.jar ../tomcat-jsp-2.2-api.jar
tomcat-lib.noarch: W: dangling-relative-symlink /usr/share/java/tomcat/tomcat-servlet-3.0-api.jar ../tomcat-servlet-3.0-api.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/commons-dbcp.jar /usr/share/java/apache-commons-dbcp.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/commons-collections.jar /usr/share/java/apache-commons-collections.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/log4j.jar /usr/share/java/log4j.jar
tomcat-lib.noarch: W: dangling-symlink /usr/share/java/tomcat/jasper-jdt.jar /usr/share/java/ecj.jar
tomcat.noarch: W: spelling-error %description -l en_US servlet -> settler
tomcat.noarch: W: non-conffile-in-etc /etc/maven/fragments/tomcat
These are OK.
tomcat.noarch: E: non-standard-dir-perm /etc/tomcat 0775L
This looks wrong. Do we really want /etc/tomcat that open?

tomcat.noarch: E: non-standard-dir-perm /var/log/tomcat 0775L
tomcat.noarch: E: non-standard-dir-perm /usr/share/tomcat 0775L
tomcat.noarch: E: non-standard-dir-perm /etc/tomcat/Catalina/localhost 0775L
Same for previous three.

tomcat.noarch: W: dangling-symlink /usr/share/tomcat/lib /usr/share/java/tomcat
tomcat.noarch: E: non-readable /etc/tomcat/tomcat-users.xml 0660L
OK
tomcat.noarch: E: non-standard-dir-perm /var/cache/tomcat 0775L
tomcat.noarch: E: non-standard-dir-perm /etc/tomcat/Catalina 0775L
tomcat.noarch: E: non-standard-dir-perm /var/cache/tomcat/work 0775L
tomcat.noarch: E: non-standard-dir-perm /var/cache/tomcat/temp 0775L
tomcat.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps 0775L
Should these be that open?
tomcat.noarch: W: no-manual-page-for-binary tomcat-digest
tomcat.noarch: W: no-manual-page-for-binary dtomcat
tomcat.noarch: W: no-manual-page-for-binary tomcat-tool-wrapper
tomcat.noarch: W: no-manual-page-for-binary tomcat
tomcat.noarch: W: dangerous-command-in-%preun rm
OK. The preun is simply cleaning the work and temp directories.
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
tomcat.noarch: W: incoherent-subsys /etc/init.d/tomcat ${NAME}
Can you ellaborate on this?
tomcat-docs-webapp.noarch: W: no-documentation
tomcat-admin-webapps.noarch: W: no-documentation
OK.
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/META-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/WEB-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/WEB-INF/jsp 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/WEB-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/images 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/META-INF 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/host-manager/images 0775L
tomcat-admin-webapps.noarch: E: non-standard-dir-perm /var/lib/tomcat/webapps/manager/WEB-INF/jsp 0775L
Is tomcat really writing into these folders? I don't think so and they might use standard permissions.
tomcat-webapps.noarch: W: no-documentation
tomcat-jsp-2.2-api.noarch: W: no-documentation
tomcat-servlet-3.0-api.noarch: W: no-documentation
tomcat-servlet-3.0-api.noarch: W: non-conffile-in-etc /etc/maven/fragments/tomcat-servlet-api
tomcat-el-2.2-api.noarch: W: no-documentation
OK.
[x]  Package is named according to the Package Naming Guidelines[1].
[x]  Spec file name must match the base package name, in the format %{name}.spec.
[x]  Package meets the Packaging Guidelines[2].
[x]  Package successfully compiles and builds into binary rpms.
[x]  Buildroot definition is not present
[x]  Package is licensed with an open-source compatible license and meets other legal requirements as defined in the legal section of Packaging Guidelines[3,4].
[x]  License field in the package spec file matches the actual license.
License type: ASL 2.0
[x]  If (and only if) the source package includes the text of the license(s) in its own file, then that file, containing the text of the license(s) for the package is included in %doc.
[!]  All independent sub-packages have license of their own
el-api and servlet-api are independent and should have license.
[x]  Spec file is legible and written in American English.
[x]  Sources used to build the package matches the upstream source, as provided in the spec URL.
[x]  All build dependencies are listed in BuildRequires, except for any that are listed in the exceptions section of Packaging Guidelines[5].
[x]  Package must own all directories that it creates.
[x]  Package requires other packages for directories it uses.
[x]  Package does not contain duplicates in %files.
[!]  Permissions on files are set properly.
[x]  Package does NOT have a %clean section which contains rm -rf %{buildroot} (or $RPM_BUILD_ROOT). (not needed anymore)
[x]  Package consistently uses macros (no %{buildroot} and $RPM_BUILD_ROOT mixing)
[x]  Package contains code, or permissable content.
[x]  Fully versioned dependency in subpackages, if present.
[-]  Package contains a properly installed %{name}.desktop file if it is a GUI application.
[x]  Package does not own files or directories owned by other packages.
[x]  Javadoc documentation files are generated and included in -javadoc subpackage
[x]  Javadocs are placed in %{_javadocdir}/%{name} (no -%{version} symlinks)
[x]  Packages have proper BuildRequires/Requires on jpackage-utils
[!]  Javadoc subpackages have Require: jpackage-utils
Needed because /usr/share/javadoc is provided a jpackage-utils

[x]  Package uses %global not %define
[-]  If package uses tarball from VCS include comment how to re-create that tarball (svn export URL, git clone URL, ...)
[-]  If source tarball includes bundled jar/class files these need to be removed prior to building
[-]  All filenames in rpm packages must be valid UTF-8.
[-]  Jar files are installed to %{_javadir}/%{name}.jar (see [6] for details)
[x]  If package contains pom.xml files install it (including depmaps) even when building with ant
[x]  pom files has correct add_to_maven_depmap call which resolves to the pom file (use "JPP." and "JPP-" correctly)

=== Other suggestions ===
[x]  If possible use upstream build method (maven/ant/javac)
[x]  Avoid having BuildRequires on exact NVR unless necessary
[x]  Package has BuildArch: noarch (if possible)
[x]  Latest version is packaged.
[x]  Reviewer should test that the package builds in mock.



=== Issues ===
1. See rpmlint comments.
2. Missing license for el-api and servlet-api
3. Missing dependency on jpackage-utils for the javadoc subpackage
Comment 12 Ivan Afonichev 2011-05-20 18:10:46 EDT
Spec URL: https://github.com/vanaf/tomcat7-fedora/blob/master/tomcat.spec
SRPM URL: http://baldr.sgu.ru/rpm/tomcat-7.0.14-2.fc14.src.rpm

- Fixed http source link
- Securify some permissions
- Added licenses for el-api and servlet-api
- Added dependency on jpackage-utils for the javadoc subpackage



Permissions:
Tomcat surely needs to write to
/etc/tomcat/Catalina/* (tomcat copies here context.xmls from META-INF from webapps)
/var/cache/tomcat/*
/var/lib/tomcat/webapps/*
/var/log/tomcat/*

for some webapps I think it also need permission to write to 
/usr/share/tomcat


other users I think shouldn't be able to view
/etc/tomcat/tomcat-users.xml
and maybe
/var/cache/tomcat/*
/var/log/tomcat/*

But some permissions are still not standart because of the owner root. I am not sure whether it is needed for some reason or not. I we set user tomcat as owner many of this permissions could become standart.




incoherent-subsys:
I researched /usr/share/rpmlint/InitScriptCheck.py
It seems that rpmlint isn't able to resolve $(basename $0) in /etc/init.d/tomcat to 'tomcat', because of that this warning happens
Comment 13 Alexander Kurtakov 2011-05-24 06:31:07 EDT
Ok, I'm satisfied with this package. 

APPROVED.
Comment 14 Alexander Kurtakov 2011-05-24 06:31:43 EDT
Please let me know of your FAS account so I can sponsor you.
Comment 15 Alexander Kurtakov 2011-05-24 06:38:31 EDT
I found you https://admin.fedoraproject.org/accounts/user/view/van , right?

Please sign the new cla before sponsoring.
Comment 16 Ivan Afonichev 2011-05-24 06:43:54 EDT
Right.
Signed.
Comment 17 Alexander Kurtakov 2011-05-24 07:02:14 EDT
Sponsored, Please request a scm.
Comment 18 Ole 2011-05-24 13:20:01 EDT
%{_javadir}/%{name} appears in several places throughout the spec.  Perhaps replace with %{libdir}?
Comment 19 Ivan Afonichev 2011-05-24 13:35:01 EDT
New Package SCM Request
=======================
Package Name: tomcat
Short Description: Apache Servlet/JSP Engine, RI for Servlet 3.0/JSP 2.2 API
Owners: van akurtakov
Branches: f14 f15 f16
InitialCC: java-sig
Comment 20 Ole 2011-05-24 14:51:55 EDT
The lib package has the following exclude line:

%exclude %{libdir}/%{name}-el-%{elspec}-api.jar

Since this is included in the el package, then I would think that the above line is not necessary...I'm still in the process of getting "Dirty" with RPM...
Comment 21 Alexander Kurtakov 2011-05-24 15:05:42 EDT
(In reply to comment #18)
> %{_javadir}/%{name} appears in several places throughout the spec.  Perhaps
> replace with %{libdir}?

there are both libdir and javadir references because we install(symlink) reusable libs into javadir and tomcat specific into libdir/tomcat.
Comment 22 Ole 2011-05-24 15:26:44 EDT
The main tomcat package %files section has these lines:
%{bindir}/tomcat-juli.jar
%{libdir}/tomcat-juli.jar

Is it right that the jar is in two places?  Also the same jar is excluded from the lib package.  Will RPM automatically do this, since the jar is included in the main package?  It seems like it should, otherwise some of the servlet spec jars, etc. would also be included in the lib package, even though they are in the servlet package.
Comment 23 Ole 2011-05-24 15:33:06 EDT
(In reply to comment #21)
> (In reply to comment #18)
> > %{_javadir}/%{name} appears in several places throughout the spec.  Perhaps
> > replace with %{libdir}?
> 
> there are both libdir and javadir references because we install(symlink)
> reusable libs into javadir and tomcat specific into libdir/tomcat.

Perhaps I'm missing something.  I'm just looking at this global definition:

%global libdir %{_javadir}/%{name}

So it seems to me that all places where we see:

%{_javadir}/%{name}

We can substitute in:

%{libdir}

They are the same thing right?
Comment 24 Alexander Kurtakov 2011-05-24 15:43:05 EDT
(In reply to comment #20)
> The lib package has the following exclude line:
> 
> %exclude %{libdir}/%{name}-el-%{elspec}-api.jar
> 
> Since this is included in the el package, then I would think that the above
> line is not necessary...I'm still in the process of getting "Dirty" with RPM...

The one in libdir is a symlink ot the other.
Comment 25 Alexander Kurtakov 2011-05-24 15:44:29 EDT
(In reply to comment #22)
> The main tomcat package %files section has these lines:
> %{bindir}/tomcat-juli.jar
> %{libdir}/tomcat-juli.jar
> 
> Is it right that the jar is in two places?  Also the same jar is excluded from
> the lib package.  Will RPM automatically do this, since the jar is included in
> the main package?  It seems like it should, otherwise some of the servlet spec
> jars, etc. would also be included in the lib package, even though they are in
> the servlet package.

Same here. The one in libdir is a symlink to the other. Tomcat is a complicated beast and we are fighting it with symlinks.
Comment 26 Alexander Kurtakov 2011-05-24 15:46:47 EDT
(In reply to comment #23)
> (In reply to comment #21)
> > (In reply to comment #18)
> > > %{_javadir}/%{name} appears in several places throughout the spec.  Perhaps
> > > replace with %{libdir}?
> > 
> > there are both libdir and javadir references because we install(symlink)
> > reusable libs into javadir and tomcat specific into libdir/tomcat.
> 
> Perhaps I'm missing something.  I'm just looking at this global definition:
> 
> %global libdir %{_javadir}/%{name}
> 
> So it seems to me that all places where we see:
> 
> %{_javadir}/%{name}
> 
> We can substitute in:
> 
> %{libdir}
> 
> They are the same thing right?

Sorry I misread your question. But I haven't found any reference to %{_javadir}/%{name} though there are reverences to %{_javadir}/%{name}-.... files
Comment 27 Ivan Afonichev 2011-05-24 15:47:58 EDT
(In reply to comment #23)
> 
> So it seems to me that all places where we see:
> 
> %{_javadir}/%{name}
> 
> We can substitute in:
> 
> %{libdir}
> 
> They are the same thing right?


I think we should do this only for 

%{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar


in other places %{name} is not tomcat folder but part of jar name
Comment 28 Ole 2011-05-24 16:38:14 EDT
(In reply to comment #25)
> (In reply to comment #22)
> > The main tomcat package %files section has these lines:
> > %{bindir}/tomcat-juli.jar
> > %{libdir}/tomcat-juli.jar
> > 
> > Is it right that the jar is in two places?  Also the same jar is excluded from
> > the lib package.  Will RPM automatically do this, since the jar is included in
> > the main package?  It seems like it should, otherwise some of the servlet spec
> > jars, etc. would also be included in the lib package, even though they are in
> > the servlet package.
> 
> Same here. The one in libdir is a symlink to the other. Tomcat is a complicated
> beast and we are fighting it with symlinks.

I understand the rationale behind having symlinks for the configuration files.  For instance we have /etc/tomcat/server.xml and /usr/share/tomcat/conf/server.xml.  This is so that people who are used to seeing the file in each location can edit it there.  But why do we have JULI symbolically linked?  JULI is only put on the class path from the init script right?
Comment 29 Ole 2011-05-24 17:23:27 EDT
(In reply to comment #27)
> (In reply to comment #23)
> > 
> > So it seems to me that all places where we see:
> > 
> > %{_javadir}/%{name}
> > 
> > We can substitute in:
> > 
> > %{libdir}
> > 
> > They are the same thing right?
> 
> 
> I think we should do this only for 
> 
> %{_javadir}/%{name}/%{name}-el-%{elspec}-api.jar
> 
> 
> in other places %{name} is not tomcat folder but part of jar name

OK - Yes - I just did a quick search and noticed in in a lot of places and did not realize they were file names.
Comment 30 Jason Tibbitts 2011-05-25 12:00:50 EDT
It is too early to request f16 branches.  Otherwisse,

Git done (by process-git-requests).
Comment 31 Ole 2011-05-27 11:37:07 EDT
Might want to replace "tomcat" with %{name} in the add user and group block:

# add the tomcat user and group
%{_sbindir}/groupadd -g %{tcuid} -r tomcat 2>/dev/null || :
%{_sbindir}/useradd -c "Apache Tomcat" -u %{tcuid} -g tomcat \
    -s /bin/nologin -r -d %{homedir} tomcat 2>/dev/null || :
Comment 32 Ole 2011-05-31 12:17:39 EDT
The bindir definition can be shortened by replacing 
%{_datadir}/%{name}
with 
%{homedir}
Comment 33 Alexander Kurtakov 2011-05-31 14:40:29 EDT
(In reply to comment #32)
> The bindir definition can be shortened by replacing 
> %{_datadir}/%{name}
> with 
> %{homedir}

Would you mind opening a new bug with git patch attached to do all the simplifications you suggest?
It's good to keep review bugs on review issuess. Thanks in advance.
I'm closing this bug now.
Comment 34 Ole 2011-06-01 12:09:40 EDT
Here's the link:
https://bugzilla.redhat.com/show_bug.cgi?id=709791
Comment 35 Leif Gruenwoldt 2012-01-17 22:51:40 EST
(In reply to comment #1)
> * Would you please name the package just tomcat instead of tomcat7 ?

What was the reasoning behind this? I presume the packages "tomcat5" and "tomcat6" were named that way to enable parallel installation. Now for tomcat 7 and greater will this not be possible?
Comment 36 Alexander Kurtakov 2012-01-18 02:38:33 EST
(In reply to comment #35)
> (In reply to comment #1)
> > * Would you please name the package just tomcat instead of tomcat7 ?
> 
> What was the reasoning behind this? I presume the packages "tomcat5" and
> "tomcat6" were named that way to enable parallel installation. Now for tomcat 7
> and greater will this not be possible?

this doesn't change anything really, I asked about it so we have a default tomcat(latest version) which people can depend on and not care whether it's 5,6 or 7. But this doesn't stop people from creating tomcat7 package once the main tomcat package goes to e.g. version 8. 
Though I don't believe that there will be people interested in doing this as tomcat5 is not really maintained and I had to keep it working/building just because of packages depending on it but nobody touching the tomcat5. I spent long enough time on this issue to make me sure that we need one tomcat that everyone depends on and only people really knowing they need some other version depending on versioned compat tomcat. This way we can leave them maintain and not have the Java SIG spend time on them.
Comment 37 Alexander Kurtakov 2012-01-18 02:40:17 EST
A shorter answer - noone from the active members of the Java SIG wants to spend time to keep multiple tomcat versions.
Comment 38 Ivan Afonichev 2014-02-16 13:50:40 EST
Package Change Request
======================
Package Name: tomcat
New Branches: el6
Owners: van akurtakov

I would like to maintain this package for EPEL EL6 too.
Comment 39 Jon Ciesla 2014-02-17 08:17:51 EST
Git done (by process-git-requests).