Make future ebuilds compile Tomcat from source.
Created attachment 31724 [details] first quick attempt at the ebuild several changes still needed 1) put somewhere else other then /opt 2) add dependencies 3) enable security manager
Created attachment 31738 [details] tomcat-5.0.24.ebuild removed some download dependencies
Re-assigning to java until I have more time.
I have had a look at this ebuild at it seems that apache only keep the current version of tomcat source on there mirrors. So it after renaming this ebuild to it's new version it doesnt seem to work anymore. I am willing to help with this one but it seems to have been dropped in the too hard basket. This it would seem is probably due to overworked developers :) Any comments on this ??
The following list contains all the libs need to build tomcat. This list contains the required lib name, whether or not it is in portage, as well as the library closest version in portage. LIB NAME Present Closest version ----------------------- ------- ------------------------------------ commons-beanutils-1.7.0 YES = dev-java/commons-beanutils-1.7.0 commons-collections-3.1 YES = dev-java/commons-collections-3.1 commons-daemon-1.0 YES = dev-java/commons-daemon-1.0 commons-dbcp-1.2.1 YES = dev-java/commons-dbcp-1.2.1 commons-digester-1.5 YES = dev-java/commons-digester-1.5 commons-el-1.0 YES = dev-java/commons-el-1.0 commons-fileupload-1.0 YES = dev-java/commons-fileupload-1.0 commons-httpclient-2.0 YES = dev-java/commons-httpclient-2.0-r1 commons-launcher-0.9 YES = dev-java/commons-httpclient-2.0-r1 commons-logging-1.0.4 YES = dev-java/commons-logging-1.0.4 commons-modeler-1.1 YES = dev-java/commons-modeler-1.1 commons-pool-1.2 NO = dev-java/commons-pool-1.1 jakarta-log4j-1.2.8 YES = dev-java/log4j-1.2.8-r1 jakarta-regexp-1.3 YES = dev-java/regexp-1.3-r1 jakarta-struts-1.1 NO = dev-java/struts-1.1 jaxen-1.0-FCS NO = dev-java/jaxen-1.0 jsp-api-2.0 YES = dev-java/servletapi-2.4 junit3.8.1 NO = dev-java/junit-3.8.1-r1 mx4j-1.1.1 N\A nsis-2.0 N\A Not needed as it is a windows thing saxpath-1.0-FCS NO = dev-java/saxpath-1.0 servlet-api-2.4 YES = dev-java/servletapi-2.4 xerces-2_6_2 YES = dev-java/xerces-2.6.2-r1 This leads to the following todo list - Create ebuilds for the missing libraries: - mx4j-1.1.1 - http://mx4j.sourceforge.net/ - commons-pool-1.2 - http://jakarta.apache.org/commons/pool/ - Modify existing ebuild to build and install from the source version of tomcat. - Split out the example as a seperate ebuild for convenience. - Work out why some of the deps for this are masked and push them up to stable. - Wipe hands on pants and have a beer.
Created attachment 41145 [details] tarred up ebuild related files for tomcat-5.0.28 This is the first cut of an ebuild that builds tomcat from source I am sure there are a few things that can be done better. TODO List - Move the tomcat out of opt dividing it between /etc /usr/share and /var/lib - Analyse the files downloaded to build the server with a mind to use already installed jars - Work on ensuring source based ebuilds exist for all the dependencies in portage, get them stable and use them. - Look into the methods of reducing the "hacks" required to build this application from source.
Created attachment 41226 [details] tarred up ebuild related files for tomcat-5.0.28 Ok this ebuild reduces the downloads of build dependencies from appox 20 to 7. TODO List is pretty much the same as the previous post except I have started work on the second item. Hopefully someone sees this, tests this ebuild, and maybe even provide feedback :) SUB TODO List is now as follows: - Need to work on two of the deps to make there existing ebuilds more easily intergrated with this ebuild. These are as follows: - Commons Launcher - Need to install LauncherBootstrap.class as a seperate file. - Commons Modeler - Need to have a look at getting this to use mx4j for JMX stuff rather than the reference implementation from sun because I hate manually fetching stuff. - Need to test the following packages and get them marked as stable: - Struts 1.1 - jaxen 1.0 - saxpath-1.0
Created attachment 41360 [details] tarred up ebuild related files for tomcat-5.0.28 Down to four downloads and working on reducing this to two once I fix commons-launcher and commons-modeler.
Created attachment 41373 [details] tomcat-5.0.28.ebuild I made some changes, and it WORKSFORME now
commited, but package.masked it for further testing and it failed to compile with struts 1.2, Will have to check why when i have some time So we probably want to SLOT struts
Anyone else tested this yet?
Created attachment 42407 [details] tar file with tomcat ebuild and related files. Updated the ebuild and the tomcat.conf file. This ebuild moves everything out of the /opt directory and also implements TOMCAT_BASE. See http://gentoo-wiki.com/Tomcat_Gentoo_ebuild for more information. Someone please, please test it :)
I'm looking into compiling this, and have looked at using the masked ebuild in Portage, but I've been struck by the number of dependencies. It also wants to download the blackdown JRE and JDK for JMX, but the JRE is included in the JDK. Is this really necessary?
only the jdk is needed, if you merge the jdk it won't try to merge the jre anymore, this is shortcoming(bug/feature) of portage
Yes you're right - thanks Thomas. JDK installed and JRE disappeared. Anyway, my ultimate aim over the next few weeks is to get a working Tomcat installation going, so I'll be giving this ebuild a whirl. I'm also going much further by getting Jonas up and running.
Created attachment 43029 [details] Changed SRC_URI and position of SLOT definition Changed the SRC_URI. This seems to have been changed by Apache changed to a path under /src. Changed the definition of SLOT to be above the SRC_URI. SLOT was used here but it wasn't set.
The ebuild seems to work absolutely fine, apart from a couple of minor typos (my first ebuild submit!). It seemed to have installed some unnecessary packages like Jython and libreadline-java (are they needed?), but that could have been down to my use flags and installation. Still starting out on some of these Java dependencies. Just something quick to get something working - haven't looked at the todos yet and using struts >=1.2
Hi all. Don't bother to compile Tomcat 5.0.28 against struts 1.2.x. It won't work. The Tomcat people have only been building 5.5 against struts 1.2 so far. According to this bug report: http://issues.apache.org/bugzilla/show_bug.cgi?id=31656 They have backported fixes from 5.5 to 5.0.30, so this will be fixed in that version - hopefully. Looks like it's too late for 5.0.29.
i'm now going to maintain tomcat. starting from tomorrow i'll start to work on this
an reworked ebuild which is based on the one which was contributed by Mark Wolfe is now in the tree. i've removed the packed jar issue and it now installs the jars using java-pkg_dojar to make them available for other packeges, like jetty. the 5.0.28 is the latest stable version from the 5.0 release. i'll add an ebuild an patches etc for 5.5.x in the near future. marking this one as fixed.