diff options
author | Matthew Kennedy <mkennedy@gentoo.org> | 2002-07-15 03:08:43 +0000 |
---|---|---|
committer | Matthew Kennedy <mkennedy@gentoo.org> | 2002-07-15 03:08:43 +0000 |
commit | 838361a50791838844411c46b668f386dda4b0bb (patch) | |
tree | 8d4a4697586206b5bd2cc0826527551a077c74fa /net-www/jboss | |
parent | version bump (diff) | |
download | gentoo-2-838361a50791838844411c46b668f386dda4b0bb.tar.gz gentoo-2-838361a50791838844411c46b668f386dda4b0bb.tar.bz2 gentoo-2-838361a50791838844411c46b668f386dda4b0bb.zip |
initial import
Diffstat (limited to 'net-www/jboss')
-rw-r--r-- | net-www/jboss/ChangeLog | 14 | ||||
-rw-r--r-- | net-www/jboss/files/README.gentoo | 39 | ||||
-rw-r--r-- | net-www/jboss/files/conf.d/jboss | 28 | ||||
-rw-r--r-- | net-www/jboss/files/digest-jboss-3.0.1_rc1 | 1 | ||||
-rw-r--r-- | net-www/jboss/files/init.d/jboss | 28 | ||||
-rw-r--r-- | net-www/jboss/files/log4j.xml | 162 | ||||
-rw-r--r-- | net-www/jboss/jboss-3.0.1_rc1.ebuild | 97 |
7 files changed, 369 insertions, 0 deletions
diff --git a/net-www/jboss/ChangeLog b/net-www/jboss/ChangeLog new file mode 100644 index 000000000000..57699151325b --- /dev/null +++ b/net-www/jboss/ChangeLog @@ -0,0 +1,14 @@ +# ChangeLog for net-www/jboss +# Copyright 2002 Gentoo Technologies, Inc.; Distributed under the GPL v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/jboss/ChangeLog,v 1.1 2002/07/15 03:08:43 mkennedy Exp $ + +*jboss-3.0.1_rc1 (14 Jul 2002) + + 14 Jul 2002; Matthew Kennedy <mkennedy@gentoo.org> ChangeLog, + jboss-3.0.1_rc1.ebuild, files/log4j.xml, conf.d/jboss, + files/README.gentoo files/digest-jboss-3.0.1_rc1 : + + Initial import. + + Ebuild submitted by Thomas Osterlie <thomas.osterlie@acm.org> (bug + #4850) diff --git a/net-www/jboss/files/README.gentoo b/net-www/jboss/files/README.gentoo new file mode 100644 index 000000000000..ec5e0ec832b0 --- /dev/null +++ b/net-www/jboss/files/README.gentoo @@ -0,0 +1,39 @@ +Starting +-------- + +Start JBoss by running the jboss RC script found in /etc/init.d/. Do +the regular 'rc-update jboss <runlevel>' to automatically start JBoss +upon entering a runlevel. Customizing the JBoss setup by changing the +environment variables in /etc/conf.d/jboss. Refer to that file for +further documentation on the environment variables used during +startup. + +For security reasons, the application server is running as the 'jboss' +user. This may be changed in the /etc/conf.d/jboss script, too. + + +Logging +------- + +All configurations shipping with this ebuild have been set up to log +to the /var/log/jboss/server file using a time/date based rolling +file appender. + +While console logging is turned on for debugging purposes, standard +out and standard err are redirected to /dev/null by default. This may +be changed in /etc/conf.d/jboss. As the application server is running +as 'jboss', you will have to tweak /dev/console's access permissions +to allow jboss access to the device. + + +Client applications +------------------- + +The jars required for compiling and running client applications are +installed to /usr/share/jboss/lib. Add these jars to your classpath +with the java-config command using either the --set-system-classpath +or --set-user-classpath parameter. + +Enjoy! + +tho <thomas.osterlie@acm.org> diff --git a/net-www/jboss/files/conf.d/jboss b/net-www/jboss/files/conf.d/jboss new file mode 100644 index 000000000000..87cd6eea1d39 --- /dev/null +++ b/net-www/jboss/files/conf.d/jboss @@ -0,0 +1,28 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +# The directory containing bin, server and lib dirs. +JBOSS_HOME="@jbossprefix@" + +# You can choose which configuration you want to run JBoss with. The +# default configuration is, you guessed it, 'default'. The Gentoo +# JBoss installation ships with two other predefined configurations; +# 'all' and 'minimal'. The configurations are located in +# $JBOSS_HOME/server/ +JBOSS_CONF="default" +# JBOSS_CONF="all" +# JBOSS_CONF="minimal" + +# Console logging defaults to '/dev/null'. This env variable is +# included for debugging purposes. You might have to run add +# $JBOSS_USER to the 'console' group to gain access to '/dev/console'. +JBOSS_CONSOLE="/dev/null" +# JBOSS_CONSOLE="/dev/console" + +# The user JBoss will run as. Comment the next line to run as root +JBOSS_USER="jboss" + +# Commands used in starting/stopping the server +CMD_START="$JBOSS_HOME/bin/run.sh -c $JBOSS_CONF" +CMD_STOP="$JAVA_HOME/bin/java -classpath $JBOSS_HOME/bin/shutdown.jar org.jboss.Shutdown" +SUBIT="su $JBOSS_USER -c " diff --git a/net-www/jboss/files/digest-jboss-3.0.1_rc1 b/net-www/jboss/files/digest-jboss-3.0.1_rc1 new file mode 100644 index 000000000000..88ad8fecb060 --- /dev/null +++ b/net-www/jboss/files/digest-jboss-3.0.1_rc1 @@ -0,0 +1 @@ +MD5 68eef24da0a7734ba9ee8b4de5c7e079 jboss-3.0.1RC1-src.tgz 20269908 diff --git a/net-www/jboss/files/init.d/jboss b/net-www/jboss/files/init.d/jboss new file mode 100644 index 000000000000..8a5672ad1b36 --- /dev/null +++ b/net-www/jboss/files/init.d/jboss @@ -0,0 +1,28 @@ +#!/sbin/runscript +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License, v2 or later + +depend() { + need net +} + +start() { + ebegin "Starting JBoss" + cd $JBOSS_HOME/bin + if [ -z "$SUBIT" ]; then + eval $CMD_START >${JBOSS_CONSOLE} 2>&1 & + else + $SUBIT "$CMD_START >${JBOSS_CONSOLE} 2>&1 &" + fi + eend $? +} + +stop () { + ebegin "Stopping JBoss" + if [ -z "$SUBIT" ]; then + $CMD_STOP + else + $SUBIT "$CMD_STOP" + fi + eend $? +} diff --git a/net-www/jboss/files/log4j.xml b/net-www/jboss/files/log4j.xml new file mode 100644 index 000000000000..9780ef0ec359 --- /dev/null +++ b/net-www/jboss/files/log4j.xml @@ -0,0 +1,162 @@ +<?xml version="1.0" encoding="UTF-8"?> +<!DOCTYPE log4j:configuration SYSTEM "log4j.dtd"> + +<!-- ===================================================================== --> +<!-- --> +<!-- Log4j Configuration --> +<!-- --> +<!-- ===================================================================== --> + +<!-- $Id: log4j.xml,v 1.1 2002/07/15 03:08:43 mkennedy Exp $ --> + +<!-- + | For more configuration infromation and examples see the Jakarta Log4j + | owebsite: http://jakarta.apache.org/log4j + --> + +<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/" debug="false"> + + <!-- ================================= --> + <!-- Preserve messages in a local file --> + <!-- ================================= --> + + <!-- A time/date based rolling appender --> + <appender name="FILE" class="org.jboss.logging.appender.DailyRollingFileAppender"> + <param name="File" value="/var/log/jboss/server.log"/> + <param name="Append" value="false"/> + + <!-- Rollover at midnight each day --> +<!-- <param name="DatePattern" value="'.'yyyy-MM-dd"/> --> + + <!-- Rollover at the top of each hour --> + <param name="DatePattern" value="'.'yyyy-MM-dd-HH"/> + + <layout class="org.apache.log4j.PatternLayout"> + <!-- The default pattern: Date Priority [Category] Message\n --> + <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> + + <!-- The full pattern: Date MS Priority [Category] (Thread:NDC) Message\n + <param name="ConversionPattern" value="%d %-5r %-5p [%c] (%t:%x) %m%n"/> + --> + + </layout> + </appender> + + <!-- A size based file rolling appender + <appender name="FILE" class="org.jboss.logging.appender.RollingFileAppender"> + <param name="File" value="${jboss.server.home.dir}/log/server.log"/> + <param name="Append" value="false"/> + <param name="MaxFileSize" value="500KB"/> + <param name="MaxBackupIndex" value="1"/> + + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="%d %-5p [%c] %m%n"/> + </layout> + </appender> + --> + + <!-- ============================== --> + <!-- Append messages to the console --> + <!-- ============================== --> + + <appender name="CONSOLE" class="org.apache.log4j.ConsoleAppender"> + <param name="Threshold" value="INFO"/> + <param name="Target" value="System.out"/> + + <layout class="org.apache.log4j.PatternLayout"> + <!-- The default pattern: Date Priority [Category] Message\n --> + <param name="ConversionPattern" value="%d{ABSOLUTE} %-5p [%c{1}] %m%n"/> + </layout> + </appender> + + + <!-- ====================== --> + <!-- More Appender examples --> + <!-- ====================== --> + + <!-- Buffer events and log them asynchronously + <appender name="ASYNC" class="org.apache.log4j.AsyncAppender"> + <appender-ref ref="FILE"/> + <appender-ref ref="CONSOLE"/> + <appender-ref ref="SMTP"/> + </appender> + --> + + <!-- EMail events to an administrator + <appender name="SMTP" class="org.apache.log4j.net.SMTPAppender"> + <param name="Threshold" value="ERROR"/> + <param name="To" value="admin@myhost.domain.com"/> + <param name="From" value="nobody@myhost.domain.com"/> + <param name="Subject" value="JBoss Sever Errors"/> + <param name="SMTPHost" value="localhost"/> + <param name="BufferSize" value="10"/> + <layout class="org.apache.log4j.PatternLayout"> + <param name="ConversionPattern" value="[%d{ABSOLUTE},%c{1}] %m%n"/> + </layout> + </appender> + --> + + <!-- Syslog events + <appender name="SYSLOG" class="org.apache.log4j.net.SyslogAppender"> + <param name="Facility" value="LOCAL7"/> + <param name="FacilityPrinting" value="true"/> + <param name="SyslogHost" value="localhost"/> + </appender> + --> + + + <!-- Log events to JMS (requires a topic to be created) + <appender name="JMS" class="org.apache.log4j.net.JMSAppender"> + <param name="Threshold" value="ERROR"/> + <param name="TopicConnectionFactoryBindingName" value="java:/ConnectionFactory"/> + <param name="TopicBindingName" value="topic/MyErrorsTopic"/> + </appender> + --> + + <!-- ================ --> + <!-- Limit categories --> + <!-- ================ --> + + <!-- Limit JBoss categories to INFO + <category name="org.jboss"> + <priority value="INFO"/> + </category> + --> + + <!-- Increase the priority threshold for the DefaultDS category + <category name="DefaultDS"> + <priority value="FATAL"/> + </category> + --> + + <!-- Decrease the priority threshold for the org.jboss.varia category + <category name="org.jboss.varia"> + <priority value="DEBUG"/> + </category> + --> + + <!-- + | An example of enabling the custom TRACE level priority that is used + | by the JBoss internals to diagnose low level details. This example + | turns on TRACE level msgs for the org.jboss.ejb.plugins package and its + | subpackages. This will produce A LOT of logging output. + If you use replace the log4j 1.2 jar with a 1.1.3 jar you will need to + change this from XLevel to XPriority. + <category name="org.jboss.system"> + <priority value="TRACE" class="org.jboss.logging.XLevel"/> + </category> + <category name="org.jboss.ejb.plugins"> + <priority value="TRACE" class="org.jboss.logging.XLevel"/> + </category> + --> + + <!-- ======================= --> + <!-- Setup the Root category --> + <!-- ======================= --> + + <root> + <appender-ref ref="CONSOLE"/> + <appender-ref ref="FILE"/> + </root> + +</log4j:configuration> diff --git a/net-www/jboss/jboss-3.0.1_rc1.ebuild b/net-www/jboss/jboss-3.0.1_rc1.ebuild new file mode 100644 index 000000000000..8ab1eccd3633 --- /dev/null +++ b/net-www/jboss/jboss-3.0.1_rc1.ebuild @@ -0,0 +1,97 @@ +# Copyright 1999-2002 Gentoo Technologies, Inc. +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/net-www/jboss/jboss-3.0.1_rc1.ebuild,v 1.1 2002/07/15 03:08:43 mkennedy Exp $ + +MY_P="jboss-3.0.1RC1-src" +S=${WORKDIR}/${MY_P} + +DESCRIPTION="The Java app-server reference implementation" +SRC_URI=" http://belnet.dl.sourceforge.net/sourceforge/jboss/${MY_P}.tgz" +HOMEPAGE="http://www.jboss.org" +LICENSE="LGPL" + +RDEPEND=">=virtual/jdk-1.3" + +DEPEND="${RDEPEND} + dev-java/ant" + +SLOT="0" +KEYWORDS="*" + +INSTALL_DIR=/usr/lib/${P} + +src_unpack() { + unpack $MY_P.tgz +} + +src_compile() { + export JAVA_HOME=${JDK_HOME} + cd build + sh build.sh all || die +} + +pkg_preinst() { + einfo ">>> Adding user and group for JBoss" + if ! groupmod jboss ; then + groupadd jboss || die "problem adding jboss group" + fi + if ! id jboss ; then + useradd jboss -g jboss || die "problem adding jboss user" + fi +} + +src_install() { + + dodir ${INSTALL_DIR} + dodir ${INSTALL_DIR}/bin + + cp build/output/jboss-3.0.1RC1/bin/run.sh ${D}/${INSTALL_DIR}/bin + cp build/output/jboss-3.0.1RC1/bin/shutdown.sh ${D}/${INSTALL_DIR}/bin + cp build/output/jboss-3.0.1RC1/bin/run.jar ${D}/${INSTALL_DIR}/bin + cp build/output/jboss-3.0.1RC1/bin/shutdown.jar ${D}/${INSTALL_DIR}/bin + + exeinto /etc/init.d + doexe ${FILESDIR}/init.d/jboss + exeinto /etc/conf.d + sed -e "s#@jbossprefix@#/usr/lib/${P}#" ${FILESDIR}/conf.d/jboss >${D}/etc/conf.d/jboss + + einfo ">>> Setting up configuration files and library packages..." + local dirs="build/output/jboss-3.0.1RC1/server build/output/jboss-3.0.1RC1/lib" + for i in $dirs ; do + cp -a $i ${D}/${INSTALL_DIR}/ + done + cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/all/conf + cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/default/conf + cp ${FILESDIR}/log4j.xml ${D}/${INSTALL_DIR}/server/minimal/conf + + einfo ">>> Installing client libraries..." + local dirs="build/output/jboss-3.0.1RC1/client/*" + for i in $dirs ; do + dojar $i + done + + einfo ">>> Setting up documentation..." + dodoc build/output/jboss-3.0.1RC1/docs/LICENSE.txt ${FILESDIR}/README.gentoo + dohtml -a html,htm,png,gif,css,java -r build/output/jboss-3.0.1RC1/docs/ + + einfo ">>> Creating log directory..." + dodir /var/log/jboss +} + +pkg_postinst() { + einfo ">>> Assigning access rights..." + chown -R jboss ${INSTALL_DIR}/server + chgrp -R jboss ${INSTALL_DIR}/server + chown jboss /var/log/jboss + chgrp jboss /var/log/jboss +} + +pkg_postrm() { + einfo ">>> Removing user and group for JBoss" + if ! groupmod jboss ; then + groupdel jboss + fi + if ! id jboss ; then + userdel jboss + fi +} |