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

Bug 75224

Summary: Make Tomcat 5.5 Ebuild With jsvc Support
Product: Gentoo Linux Reporter: Ian Brandt <ian>
Component: New packagesAssignee: Java team <java>
Status: RESOLVED WONTFIX    
Severity: enhancement CC: andrei.ivanov, bert, fordfrog, gentoo.bugs.10, gentoo, Mark, max, mslinn, nicolas-laplante, pb101, spamlover, steeeeeveee, sven.koehler, wltjr
Priority: Normal Keywords: InVCS
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Bug Depends on: 80526, 117698    
Bug Blocks: 94190    
Attachments: Tomcat 5.5.9 ebuild with jsvc support, uses precompiled tomcat
conf.d-file for my ebuild
init.d-scipt for my ebuild
new conf.d-file
new init.d-file

Description Ian Brandt 2004-12-21 11:51:14 UTC
Tomcat 5.5.4 is a production release.  It would be nice to have an Ebuild for it that uses a jsvc based initscript optionally allowing Tomcat to run on privaledged ports.

Reproducible: Always
Steps to Reproduce:
Comment 1 Ian Brandt 2004-12-21 12:30:37 UTC
I'm starting to work on this because I need it.  Would people want this slotted as "5.5", or in slot 5 with 5.0.28?  I get the impression 5.5.x is meant to supplant 5.0.x, so my vote would be to use slot 5.
Comment 2 Karl Trygve Kalleberg (RETIRED) gentoo-dev 2004-12-22 16:27:44 UTC
If we want people to try a slow transition from 5.0.x to 5.5.x, by having the installed in parallell to do testing, we need them slotted differently.

I'm not a tomcat user, but I really loved that about apache (1.3.x vs 2.0.x).
Comment 3 Jan Brinkmann (RETIRED) gentoo-dev 2005-02-07 15:45:44 UTC
i'm now going to maintain tomcat. starting from tomorrow i'll start to work on this
Comment 4 Segedunum 2005-02-12 09:16:39 UTC
I'm going to be following this, as it is something I need to get up and running and will be using along with the Jonas J2EE web app server. Post any changes back to this bug report and I'll chip in with some help and testing.
Comment 5 Jan Brinkmann (RETIRED) gentoo-dev 2005-02-12 09:28:10 UTC
that's the next point on my TODO list, i'm currently working on the ebuild for 5.0 and will port the new 5.0 ebuild over to 5.5. please join #gentoo-java on irc.freenode.net , it's much easier to talk about this via irc. =)
Comment 6 Jan Brinkmann (RETIRED) gentoo-dev 2005-02-14 08:59:33 UTC
we need jdtcore in the main tree for 5.5.x
Comment 7 Carsten Lohrke (RETIRED) gentoo-dev 2005-02-24 05:22:09 UTC
*** Bug 83152 has been marked as a duplicate of this bug. ***
Comment 8 Dead Schorsch 2005-03-16 04:49:41 UTC
Make it slotted as Context definition files have changed their format from 5.0 to 5.5
Comment 9 Adam Gzella 2005-03-17 13:49:39 UTC
Could anybody tell me when this ebuild for 5.5.x will be avaliable? Unfortunatelly I need it now... I've tried to adopt 5.0.28 ebuild but it doesn't want to work by now.
Comment 10 Jan Brinkmann (RETIRED) gentoo-dev 2005-03-17 13:53:42 UTC
i can add it when the jdtcore stuff goes into the maintree, you can find a preview version here:

http://gentooexperimental.org/svn/java/

you can also find the needed dependencies there. just follow these instructions:

http://gentoo-wiki.com/Experimental_Java_tree
Comment 11 Patrizio Bassi 2005-03-17 14:28:24 UTC
come on! jdk 1.5 hangs with actual tomcat (and some its deps)

bump :)
Comment 12 Sven 2005-08-04 00:23:55 UTC
Created attachment 65047 [details]
Tomcat 5.5.9 ebuild with jsvc support, uses precompiled tomcat
Comment 13 Sven 2005-08-04 00:25:12 UTC
Created attachment 65048 [details]
conf.d-file for my ebuild
Comment 14 Sven 2005-08-04 00:25:50 UTC
Created attachment 65049 [details]
init.d-scipt for my ebuild
Comment 15 Sven 2005-08-04 00:29:45 UTC
I attached an ebuild with jsvc support. It doesn't compile tomcat and it doesn't
depend on any gentoo-java-package. It is stricter than the ebuild supplied by
the gentoo people:

- tomcat is not allowed to write to /opt/tomcat5.5 (where the tomcat is installed)
- /opt/tomcat5.5/work is linked to /var/opt/tomcat5.5 (there, the generated
java/class-files will be placed)
- the admin-app is not included (do things by hand in server.xml)
- it installs server-minimal.xml as the default server.xml
- the full server.xml is renamed to server.example.xml

Have fun with it.
Comment 16 Sven 2005-08-06 07:12:44 UTC
Created attachment 65231 [details]
new conf.d-file
Comment 17 Sven 2005-08-06 07:13:03 UTC
Created attachment 65232 [details]
new init.d-file
Comment 18 Sven 2005-08-06 07:16:44 UTC
new conf.d/init.d-file which set the umask of the started tomcat-process. The
default umask is 002. This is very useful, since often you want that the
tomcat-group can write files/directories, and not only the tomcat-user.

There's a little problem though: log and pid-files are created with the same
umask  which is not very cool, if the umask gives write-access to everybody :-(

BTW: JAVA_HOME must point to a 1.5 JDK/JRE so that my tomcat works (the ebuild
doesn't install the the backward compatibility packages)
Comment 19 Josh Nichols (RETIRED) gentoo-dev 2005-11-25 15:36:28 UTC
I was playing around with jsvc the other week, and ran into a problem where it
apparently requires something to be enabled in the kernel in order to work. I
will try to dig up the specifics again if I can.

Also, for future reference, please attach text files as text files, and not
application/octet-stream.
Comment 20 Petteri Räty (RETIRED) gentoo-dev 2005-11-25 15:40:04 UTC
(In reply to comment #19)
> I was playing around with jsvc the other week, and ran into a problem where it
> apparently requires something to be enabled in the kernel in order to work. I
> will try to dig up the specifics again if I can.
> 

This is no problem as long as linux-info.eclass is used in the ebuild to check
for proper configuration.
Comment 21 Georg Müller 2005-12-23 07:33:56 UTC
The homepage of tomcat has changes.
Now available at http://tomcat.apache.org

When will this ebuild be included into portage tree?
Comment 22 Petteri Räty (RETIRED) gentoo-dev 2005-12-30 14:06:15 UTC
(In reply to comment #21)
> The homepage of tomcat has changes.
> Now available at http://tomcat.apache.org
>

HOMEPAGE switched. Thanks for reporting.

> 
> When will this ebuild be included into portage tree?
> 

As soon as there is a version that follows the Gentoo Java policy. New ebuilds should for example be compiled from source. We will not be adding binary versions any more if there is source available.
Comment 23 Sven 2006-01-02 12:15:46 UTC
My ebuild is not supposed to be integrated into portage. I knew that you would say, that Tomcat should be compiled from source.

So the feature that need to be in the kernel, could be CONFIG_SECURITY_CAPABILITIES
I think jsvc uses capabilities, to preserve the "capability" to open ports below 1024 while switching the userid.
Comment 24 Josh Nichols (RETIRED) gentoo-dev 2006-01-07 22:09:06 UTC
It is worth noting that work is being done on this in the experimental java overlay:
https://svn.gentooexperimental.org/svn/java/gentoo-java-experimental/www-servers/tomcat
Comment 25 Petteri Räty (RETIRED) gentoo-dev 2006-01-08 02:23:01 UTC
(In reply to comment #24)
> It is worth noting that work is being done on this in the experimental java
> overlay:
> https://svn.gentooexperimental.org/svn/java/gentoo-java-experimental/www-servers/tomcat
> 

But I wouldn't recommend using it unless you are prepared to fix stuff as it is not in a very good shape yet.
Comment 26 William L. Thomson Jr. (RETIRED) gentoo-dev 2006-01-18 17:05:46 UTC
Correction, Tomcat 5.5.12 in java-experimental overlay should be in usable working condition. If you use Tomcat and want 5.5, please test in the overlay and report back. Hopefully will get put into portage soon and will be available for ~x86.
Comment 27 Láďa Durchánek 2006-03-05 04:17:19 UTC
I tried to install Tomcat from overlay to server, but these RDEPENDs are madness. It was about 180MB to downloading  so i give it up.
Comment 28 Mike Slinn 2006-03-08 10:29:24 UTC
From http://tomcat.apache.org/whichversion.html:
"Apache Tomcat 5.5 is the current focus of development. While it supports the same Servlet and JSP Specification versions as Apache Tomcat 5.0.x, there are significant changes in many areas under the hood, resulting in improved performance, stability, and total cost of ownership. Please refer to the Apache Tomcat 5.5 Changelog for details."  Tomcat 5.5.15 is the current stable version.

Tomcat 5.5 is really, really late for mainstream Gentoo usage. JDK 1.5 isn't properly supported and only old versions of Tomcat like 5.0.x are supported.  JDK 1.6 is nearly upon us!

What is the mechanism for bumping up the priority on JDK 1.5 and Tomcat 5.5 for mainstream use?
Comment 29 William L. Thomson Jr. (RETIRED) gentoo-dev 2006-03-11 13:11:44 UTC
JDK 1.5 is coming along with a new java "framework" or "layout" and tools for Gentoo. Including a modified java-config, eclasses, and a whole bunch of stuff.
http://www.gentoo.org/proj/en/java/tiger-faq.xml

Not just to allow for transition to 1.5, but also to 1.6 in the future when it's out. In the mean time till these changes are merged into portage. None of the packages in the java experimental overlay will be added to portage. However many can be used now including Tomcat 5.5.15. I have been running on my development server for a week or so now eith existing and new apps under development. Considering putting on my production servers as well.

Once the new java stuff is migrated into portage. All the ebuilds will have to be updated, including the ones in the java experimental overlay. Then the plug in the pipe will be removed and Java will be flowing again on Gentoo.

The Java team is under staffed and short handed these days. So the migration is moving along but slowly.  Any help is greatly appreciated by all.
Comment 30 Petteri Räty (RETIRED) gentoo-dev 2006-03-11 14:19:34 UTC
I marked this stuff as obsoloted after a request from obsidian studios. The version 5.5.9 is very old at this point and we should be working to integrate jsvc support into our new Tomcat ebuilds any way.
Comment 31 William L. Thomson Jr. (RETIRED) gentoo-dev 2007-05-12 18:40:31 UTC
Ok, I have thought about this for quite some time. Discussed it with others in the community. Seems it's not ideal to start Tomcat via native apps. Even though that's how it's being started via start-stop-daemon.

My official stance at this time, if you want to run Tomcat on privileged ports is to do it via a firewall and port redirection/forwarding.

JSVC might be considered again at some point in the future. But for now, I am closing this bug as WONTFIX. Will remove JSVC from Tomcat Guides as soon as time permits.