Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 363931

Summary: build tomcat-7 properly with docs/examples
Product: Gentoo Linux Reporter: Marc Arens <gentoo>
Component: [OLD] JavaAssignee: Java team <java>
Severity: normal    
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Bug Depends on: 428002    
Bug Blocks: 322979    
Attachments: patch for already existing build.xml patch
patch for the ebuild of tomcat-7.0.12
context.xml needed to allow symlinking in examples webapp
fixes reference to file in earlier patch

Description Marc Arens 2011-04-17 15:33:15 UTC
Currently there are problems when users try to install tomcat with useflags +doc/+examples see #357437 and #283273

Reproducible: Always

Steps to Reproduce:
1. emerge tomcat with +docs +examples
Actual Results:  
1, xml files instead of html files for docs are installed
2, examples aren't compiled, symlinks to needed links don't work

Expected Results:  
docs and examples are usable 

See the added patches to solve both problems. To make the examples work i had to add a context.xml to examples/META-INF with allowLinking="true". The docu mentions:

"NOTE: This flag MUST NOT be set to true on the Windows platform (or any other OS which does not have a case sensitive filesystem), as it will disable case sensitivity checks, allowing JSP source code disclosure, among other security problems."

So please doublecheck this solution. Another solution is to simply copy the jars instead of linking them.

Btw. the ebuild still mentions CVE 2007-2449,2007-2450 which are both fixed since tomcat-6.0.14 according to so you could remove those warning, too.
Comment 1 Marc Arens 2011-04-17 15:34:13 UTC
Created attachment 270275 [details, diff]
patch for already existing  build.xml patch
Comment 2 Marc Arens 2011-04-17 15:34:41 UTC
Created attachment 270277 [details, diff]
patch for the ebuild of tomcat-7.0.12
Comment 3 Marc Arens 2011-04-17 15:35:16 UTC
Created attachment 270279 [details]
context.xml needed to allow symlinking in examples webapp
Comment 4 Marc Arens 2011-04-22 23:00:18 UTC
Created attachment 270925 [details, diff]
fixes reference to file in earlier patch
Comment 5 Mark H. Wood 2012-09-25 23:17:10 UTC
Still broken in 7.0.27.  Here's another way to make /docs/ work:

toolshed localhost # cat /etc/tomcat-7/Catalina/localhost/docs.xml 
<?xml version='1.0'?>
<Context docBase='/usr/share/tomcat-7/webapps/docs'>

I haven't wanted /examples/ but something similar might serve.
Comment 6 Ralph Sennhauser (RETIRED) gentoo-dev 2012-12-07 16:48:50 UTC
docs and examples are now properly built and installed with USE=extra-webapps set. See for more information.

Thanks for the report.