You are not logged in.

#1 2005-06-15 18:49:36

bpisciot
Member
From: Flyover Land
Registered: 2004-12-16
Posts: 78

Where, oh where, is Tomcat

Anyone know where Tomcat has got off to?  The Wiki points to a folder called "Incoming" on the Arch FTP server.  That directory doesn't appear to exist at the moment.  There were some forum postings about Incoming being offline in March or something like that.

Failing an actual precompiled package, does anyone have a working PKGBUILD for Tomcat?

I'd be grateful for any leads or help.

Bob Pisciotta
Prairie Village, KS


"You're only young once, but you can always be immature."

Offline

#2 2005-06-15 18:53:00

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Where, oh where, is Tomcat

That really sucks. I made the tomcat package not long after I joined Arch (I wrote the wiki page too), and it was a bit of a headache. Maybe because I didn't know what I was doing... I don't see a tomcat PKGBUILD anywhere. Hopefully somebody will post one to AUR for you. If they don't I'll try to investigate it at some point.

Dusty

Offline

#3 2005-06-15 20:31:34

JGC
Developer
Registered: 2003-12-03
Posts: 1,664

Re: Where, oh where, is Tomcat

Hmm, Tomcat, the sucky slow JSP/Servlet container that doesn't have up2date documentation. Try Jetty instead, which is in the repositories AFAIK (note: I only use Jetty on 2 production servers with debian, not archlinux).

Offline

#4 2005-06-15 20:57:02

cactus
Taco Eater
From: t͈̫̹ͨa͖͕͎̱͈ͨ͆ć̥̖̝o̫̫̼s͈̭̱̞͍̃!̰
Registered: 2004-05-25
Posts: 4,622
Website

Re: Where, oh where, is Tomcat

or JBOSS


"Be conservative in what you send; be liberal in what you accept." -- Postel's Law
"tacos" -- Cactus' Law
"t̥͍͎̪̪͗a̴̻̩͈͚ͨc̠o̩̙͈ͫͅs͙͎̙͊ ͔͇̫̜t͎̳̀a̜̞̗ͩc̗͍͚o̲̯̿s̖̣̤̙͌ ̖̜̈ț̰̫͓ạ̪͖̳c̲͎͕̰̯̃̈o͉ͅs̪ͪ ̜̻̖̜͕" -- -̖͚̫̙̓-̺̠͇ͤ̃ ̜̪̜ͯZ͔̗̭̞ͪA̝͈̙͖̩L͉̠̺͓G̙̞̦͖O̳̗͍

Offline

#5 2005-06-15 21:36:48

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Where, oh where, is Tomcat

Here's a PKGBUILD for tomcat 5, but I didn't try it; no idea if it will work or not. I know configuring it is different from configuring tomcat 4, which is what is described in the wiki.

I'm not putting this in AUR because it hasn't been tested, because I'm not prepared to maintain it right now, and because it doesn't conform to the Arch Java Packaging standards.

  #Contributer: Dusty Phillips <dusty@buchuki.com>
  #
  #Note: This package does not conform to Arch Java packaging standards
  pkgname=tomcat
  pkgver=5.5.9
  pkgrel=1
  pkgdesc="Apache's implementation of Sun's Servlet and JSP container"
  url="http://jakarta.apache.org/tomcat/"
  license="BSD-style"
  depends=(j2re)
  makedepends=()
  conflicts=()
  replaces=()
  backup=()
  install=
  source=(http://gulus.usherbrooke.ca/pub/appl/apache/jakarta/tomcat-5/v5.5.9/bin/jakarta-tomcat-5.5.9.ta  r.gz)
  md5sums=('35ea177af353446af1de3c762a4f0f4d')

  build() {
      mkdir -p $startdir/pkg/opt/tomcat
      cp $startdir/src/jakarta-tomcat-$pkgver/* $startdir/pkg/opt/tomcat -r
      cd $startdir/pkg/opt/tomcat
      rm LICENSE
      rm NOTICE
      rm RUNNING.txt
      rm RELEASE-NOTES
      rm bin/*.bat

  }

Offline

#6 2005-06-16 15:38:28

bpisciot
Member
From: Flyover Land
Registered: 2004-12-16
Posts: 78

Re: Where, oh where, is Tomcat

Thanks, Dusty.  I'll give your new PKGBUILD a try this afternoon and let you know how it works.

The application I'm installing (Dspace) uses Tomcat  but can also use Jetty  The installation documentation for this application  is written with Tomcat in mind.  Plus the sysadmins at my place of employment are all Tomcat-centric--so I'll give that a go first.

Thanks, everyone.

Bob P.


"You're only young once, but you can always be immature."

Offline

#7 2005-06-16 17:19:41

qwerty
Member
Registered: 2004-12-17
Posts: 183

Re: Where, oh where, is Tomcat

Hola, a few time ago i needed Tomcat to make a project for my university, so i've looked for an arch package on the ftp and i've found PKGBUILD and stuff needed to make tomcat works. The original PKGBUILD was from Bryan Bulten bbulten AT telus.net and it was for tomcat 5.0.something, now i've modified it to make it works with tomcat 5.5.9 adding a few things from Dusty's one and a few changes needed to make it works with archlinux... (I hope it works... i'm gonna try it in a while smile )

here u are

PKGBUILD:

pkgname=tomcat
pkgver=5.5.9
pkgrel=1
pkgdesc="Servlet container for Java Servlet and JavaServer Pages"
url="http://jakarta.apache.org/tomcat/index.html"
depends=('j2re')
conflicts=()
backup=()
install=
source=(http://mirrors.publicshout.org/apache/jakarta/$pkgname-5/v$pkgver/bin/jakarta-$pkgname-$pkgver.tar.gz)
md5sums=('35ea177af353446af1de3c762a4f0f4d')

build() {
  mkdir -p $startdir/pkg/opt
  cp -R $startdir/src/jakarta-$pkgname-$pkgver $startdir/pkg/opt/tomcat
  cd $startdir/pkg/opt/tomcat
  rm LICENSE
  rm NOTICE
  rm RUNNING.txt
  rm RELEASE-NOTES
  rm bin/*.bat
  rm bin/*.exe
  install -D -m644 $startdir/tomcat.conf.d $startdir/pkg/etc/conf.d/tomcat
  install -D -m755 $startdir/tomcat $startdir/pkg/etc/rc.d/tomcat
}

tomcat.conf.d :

# Java runtime
JAVA_HOME=/opt/java
JRE_HOME=/opt/java/jre

# Web application location
CATALINA_HOME=/opt/tomcat
CATALINA_BASE=${CATALINA_HOME}

# Tomcat's user
CATALINA_USER=tomcat

# Log location
CATALINA_OUT=/var/log/tomcat/catalina.log

# Location of tomcat libraries
CATALINA_LIBDIR=${CATALINA_HOME}/common/lib

# Classpath for tomcat
CLASSPATH=${CLASSPATH}:${CATALINA_LIBDIR}

# (Optional) Temporary directory the JVM should use
#CATALINA_TMPDIR=${CATALINA_HOME}/temp

# Tomcat startup/shutdown
TOMCAT_START="start"
TOMCAT_STOP="stop"

tomcat :

#!/bin/bash

# source application-specific settings
[ -f /etc/conf.d/tomcat ] && . /etc/conf.d/tomcat

# general config
. /etc/rc.conf
. /etc/rc.d/functions

case "$1" in
  start)
    stat_busy "Starting Tomcat Daemon"
        ${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_START} >& /dev/null

    if [ $? -gt 0 ]; then
      stat_fail
    else
      add_daemon tomcat
      stat_done
    fi
    ;;
  stop)
    stat_busy "Stopping Tomcat Daemon"
        ${CATALINA_HOME}/bin/catalina.sh ${TOMCAT_STOP} >& /dev/null

    if [ $? -gt 0 ]; then
      stat_fail
    else
      rm_daemon tomcat
      stat_done
    fi
    ;;
  restart)
    $0 stop
    sleep 3
    $0 start
    ;;
  *)
    echo "usage: $0 {start|stop|restart}"
esac

Offline

#8 2005-06-16 17:27:41

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Where, oh where, is Tomcat

If it works, you could put it in aur. smile

Also, if you want a real project, see if you can make it conform to the Arch Java Packaging standards in the works:
http://www.buchuki.com/misc/archjava.html

I honestly consider tomcat to be one of those "its too big put it in /opt" packages, but I'd love to be proven wrong...  I've packaged some of its deps for other projects, like xerces2 and stuff. It will be going into AUR tonight.

Dusty

Offline

#9 2005-06-16 17:54:50

qwerty
Member
Registered: 2004-12-17
Posts: 183

Re: Where, oh where, is Tomcat

OK, i will read Arch Java Packaging standards and if i'll have a few time between an exam and another one i'll try to make it

(first of all i have to test if/how it works wink )


grtz

Offline

#10 2005-06-16 19:04:51

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Where, oh where, is Tomcat

Good luck! (on both the exams and the tomcat package conversion:))

Dusty

Offline

#11 2005-06-16 19:38:12

bpisciot
Member
From: Flyover Land
Registered: 2004-12-16
Posts: 78

Re: Where, oh where, is Tomcat

Just finished a successful build of Tomcat using qwerty's PKGBUILD.  Thanks everyone for your help.

Bob


"You're only young once, but you can always be immature."

Offline

#12 2005-06-22 20:21:41

qwerty
Member
Registered: 2004-12-17
Posts: 183

Re: Where, oh where, is Tomcat

MMh... i've  put something in the AUR but it's nothing more than the PKGBUILD and files i've put here with a (very) few changes...
I've tested it and it seems to work. I'm actually using it to make a project 4 my university, anyway, i'd like to make it conform to the Arch Java Packaging standards. I don't know when i'll have more free time, but, for sure, i'll have a few things to ask to Dusty. You have been warned wink

Offline

#13 2005-06-22 21:53:57

Dusty
Schwag Merchant
From: Medicine Hat, Alberta, Canada
Registered: 2004-01-18
Posts: 5,986
Website

Re: Where, oh where, is Tomcat

The standards have changed drastically, so I'm glad you didn't put a lot of work into it. Good news is, they're more flexible and it should be easier to do now.

Dusty

Offline

#14 2005-10-31 16:11:35

darose
Member
Registered: 2004-04-13
Posts: 158

Re: Where, oh where, is Tomcat

I've been using the Tomcat PKGBUILD in AUR (after correcting some old URL's in the PKGBUILD, and upgrading it for 5.5.12), and it's generally working fine.  However, I ran into a small problem with it and was wondering if someone here might be able to offer up a fix or workaround.

The catalina.sh script will take a look at the CATALINA_OPTS environment variable, and add its contents onto the command line when executing Tomcat.  This is very helpful for setting Java configuration settings when running Tomcat, like turning on headless (non-X) processing.

However, when I set the CATALINA_OPTS variable in /etc/conf.d/tomcat (e.g., CATALINA_OPTS=-Djava.awt.headless=true) the catalina.sh script does not pick it up.  In fact, none of the settings in /etc/conf.d/tomcat (CATALINA_HOME) are getting picked up by catalina.sh.  In the case of settings like CATALINA_HOME, though, it doesn't matter, since catalina.sh sets an appropriate default if that variable is empty.

I'm able to work around this by specifying "export CATALINA_OPTS=-Djava.awt.headless=true" in /etc/conf.d/tomcat, but I don't understand why the export should be necessary.  None of the other environment scripts in /etc/conf.d/ seem to require it.

If anyone's got an idea for a better fix for this, please either post it here or upgrade the AUR with it.

Thanks,

DR

Offline

#15 2005-10-31 18:09:16

Snowman
Developer/Forum Fellow
From: Montreal, Canada
Registered: 2004-08-20
Posts: 5,212

Re: Where, oh where, is Tomcat

Does catalina.sh source the config file:

[ -f /etc/conf.d/tomcat ] && . /etc/conf.d/tomcat

Offline

#16 2005-10-31 18:51:00

LB06
Member
From: The Netherlands
Registered: 2003-10-29
Posts: 435

Re: Where, oh where, is Tomcat

I believe it's also possible to download tomcat from the site and put it into /opt. Since tomcat is not a dep or sth, It doesn't really matter much that pacman doesn't know about it.

Offline

#17 2005-11-03 02:47:25

darose
Member
Registered: 2004-04-13
Posts: 158

Re: Where, oh where, is Tomcat

Snowman wrote:

Does catalina.sh source the config file:

[ -f /etc/conf.d/tomcat ] && . /etc/conf.d/tomcat

Yes.

Offline

Board footer

Powered by FluxBB