From owner-freebsd-java Wed Oct 3 0:24:50 2001 Delivered-To: freebsd-java@freebsd.org Received: from heinz.jollem.com (c104187.upc-c.chello.nl [212.187.104.187]) by hub.freebsd.org (Postfix) with ESMTP id 0569B37B401 for ; Wed, 3 Oct 2001 00:24:41 -0700 (PDT) Received: (from ernst@localhost) by heinz.jollem.com (8.11.3/8.11.4) id f937NBZ07970; Wed, 3 Oct 2001 09:23:11 +0200 (CEST) (envelope-from ernst) Date: Wed, 3 Oct 2001 09:23:11 +0200 From: Ernst de Haan To: java@freebsd.org, Kees Jan Koster Subject: New version of www/orion port Message-ID: <20011003092311.A7877@c104187.upc-c.chello.nl> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="fdj2RfSjLxBAspz7" Content-Disposition: inline User-Agent: Mutt/1.2.5i Sender: owner-freebsd-java@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Hi guys, Would anyone be so kind as to test the new version of the www/orion port? I've attached a diff. Orion is a J2EE Application Server, supporting servlets, JSP's, EJB's, XSLT, etc. It can be integrated with Apache, ColdFusion, PHP, etc. /Ernst -- Ernst de Haan Euronet Internet B.V. "Come to me all who are weary and burdened and I will give you rest" -- Jesus Christ --fdj2RfSjLxBAspz7 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="orion1.4.5_6--1.4.5_7.diff" diff -ruN --exclude=work --exclude=CVS --exclude=README.html /usr/ports/www/orion/Makefile /home/ernst/freebsd-ports/www/orion/Makefile --- /usr/ports/www/orion/Makefile Wed Jun 27 03:51:26 2001 +++ /home/ernst/freebsd-ports/www/orion/Makefile Tue Oct 2 19:22:34 2001 @@ -7,7 +7,7 @@ PORTNAME= orion PORTVERSION= 1.4.5 -PORTREVISION= 6 +PORTREVISION= 7 CATEGORIES= www java MASTER_SITES= ftp://ftp.sunet.se/pub/database/utils/orionserver/ \ ${MASTER_SITE_LOCAL} \ @@ -18,7 +18,7 @@ MAINTAINER= ernst@jollem.com -RUN_DEPENDS= ${JAVA_HOME}/bin/java:${PORTSDIR}/java/linux-jdk13 +RUN_DEPENDS= ${JAVA_HOME}/bin/java:${PORTSDIR}/java/jdk13 USE_ZIP= YES NO_BUILD= YES @@ -30,36 +30,104 @@ ORIONCTL_NAME= orionctl ORIONCTL_DEST= ${PREFIX}/bin/${ORIONCTL_NAME} RC_SCRIPT= ${PREFIX}/etc/rc.d/${PORTNAME}.sh -JAVA_HOME?= ${LOCALBASE}/linux-jdk1.3.1 +JAVA_HOME?= ${LOCALBASE}/jdk1.3.1 +JIKES_LOCATION= ${LOCALBASE}/bin/jikes +WITH_JIKES?= YES +.if ${WITH_JIKES} == "YES" +RUN_DEPENDS+= ${JIKES_LOCATION}:${PORTSDIR}/java/jikes +.endif +USER_NAME?= ${PORTNAME} +GROUP_NAME?= ${USER_NAME} +USER_ID?= 7104 +GROUP_ID?= ${USER_ID} +PW?= /usr/sbin/pw +LISTEN_PORT?= 8090 +AUTO_START?= YES .include +pre-install: + @${ECHO} "Installation settings:" + @${ECHO} " Destination directory: ${ORION_HOME}" + @${ECHO} " Control script location: ${ORIONCTL_DEST}" + @${ECHO} " Startup script location: ${RC_SCRIPT}" + @${ECHO} " Startup script location: ${RC_SCRIPT}" + @${ECHO} " Location of JDK: ${JAVA_HOME}" + @${ECHO} " Using Jikes: ${WITH_JIKES}" + @${ECHO} " Running as (user/group): ${USER_NAME}/${GROUP_NAME} (${USER_ID}:${GROUP_ID})" + @${ECHO} " Port to listen at: ${LISTEN_PORT}" + @${ECHO} " Starting after install: ${AUTO_START}" + do-install: + @# Add the group and the user if they do not exist + ${PW} groupadd -n ${GROUP_NAME} -g ${GROUP_ID} || true + ${PW} useradd -n ${USER_NAME} -u ${USER_ID} -g ${GROUP_NAME} -c "Orion Server account" -d ${ORION_HOME} -s ${SH} -h - || true + + @# Create the destination directory for Orion ${MKDIR} ${ORION_HOME} + + @# Copy all files and make them rwxr-xr-x ${CP} -R ${WRKSRC}/* ${ORION_HOME} ${CHMOD} 755 `find ${ORION_HOME} -type d` + + @# Configure for use of Jikes, if necessary +.if ${WITH_JIKES} == "YES" + ${CAT} ${WRKSRC}/config/server.xml \ + | ${SED} "/\/s//\/" \ + > ${ORION_HOME}/config/server.xml +.endif + + @# Configure the port to listen to + ${CAT} ${WRKSRC}/config/default-web-site.xml \ + | ${SED} "/port=\"80\"/s//port=\"${LISTEN_PORT}\"/" \ + > ${ORION_HOME}/config/default-web-site.xml + + @# Install the 'orionctl' script ${CAT} ${FILESDIR}/${ORIONCTL_NAME} \ | ${SED} "/%%PORTNAME%%/s//${PORTNAME}/" \ | ${SED} "/%%PORTVERSION%%/s//${PORTVERSION}/" \ | ${SED} "/%%ORION_HOME%%/s//${ORION_HOME:S/\//\\\//g}/" \ | ${SED} "/%%RC_SCRIPT_NAME%%/s//${PORTNAME}.sh/" \ | ${SED} "/%%JAVA_HOME%%/s//${JAVA_HOME:S/\//\\\//g}/" \ + | ${SED} "/%%USER_NAME%%/s//${USER_NAME}/" \ > ${ORIONCTL_DEST} - ${CAT} ${FILESDIR}/${ORIONCTL_NAME}.1 \ - | ${SED} "/%%PREFIX%%/s//${PREFIX:S/\//\\\//g}/" \ - > ${WRKDIR}/${ORIONCTL_NAME}.1 ${CHMOD} 755 ${ORIONCTL_DEST} + + @# Fix a small typo in the index.html served as the root + ${CAT} ${WRKSRC}/default-web-app/index.html \ + | ${SED} "/1\.4\.0/s//${PORTVERSION}/" \ + > ${ORION_HOME}/default-web-app/index.html + + @# Install the startup script ${LN} -sf ${ORIONCTL_DEST} ${RC_SCRIPT} + + @# Create the 'application-deployments' directory, since Orion will + @# otherwise create it when it is first run ${MKDIR} ${ORION_HOME}/application-deployments + + @# Install the tools.jar file from the JDK, since it is needed by Orion ${LN} -sf ${JAVA_HOME}/lib/tools.jar ${ORION_HOME}/tools.jar + + @# Change ownership for the files + ${CHOWN} -R ${USER_NAME}:${GROUP_NAME} ${ORION_HOME} + + @# Install the man page .if !defined(NOPORTDOCS) - ${INSTALL_MAN} ${WRKDIR}/orionctl.1 ${MANPREFIX}/man/man1 + ${CAT} ${FILESDIR}/${ORIONCTL_NAME}.1 \ + | ${SED} "/%%PREFIX%%/s//${PREFIX:S/\//\\\//g}/" \ + > ${WRKDIR}/${ORIONCTL_NAME}.1 + ${INSTALL_MAN} ${WRKDIR}/${ORIONCTL_NAME}.1 ${MANPREFIX}/man/man1 .endif post-install: @${ECHO} "${PORTTITLE} ${PORTVERSION} has been installed in ${ORION_HOME}." .if !defined(NOPORTDOCS) @${ECHO} "Use 'man orionctl' for information about starting and stopping Orion." +.endif +.if ${AUTO_START} == "YES" + @${ECHO} -n "Starting..." + @${RC_SCRIPT} start + @${ECHO} "" .endif .include diff -ruN --exclude=work --exclude=CVS --exclude=README.html /usr/ports/www/orion/files/orionctl /home/ernst/freebsd-ports/www/orion/files/orionctl --- /usr/ports/www/orion/files/orionctl Tue Jun 12 12:20:48 2001 +++ /home/ernst/freebsd-ports/www/orion/files/orionctl Tue Oct 2 19:22:34 2001 @@ -1,9 +1,10 @@ #!/bin/sh -# Set some more variables +# Set some variables NAME=%%PORTNAME%% VERSION=%%PORTVERSION%% ORION_HOME=%%ORION_HOME%% +USER_NAME=%%USER_NAME%% LOG=${ORION_HOME}/log/${NAME}.log PID_FILE=/var/run/${NAME}.pid JAR_FILE=${ORION_HOME}/${NAME}.jar @@ -64,13 +65,16 @@ # Create the process ID file rm -f ${PID_FILE} touch ${PID_FILE} - chown root:wheel ${PID_FILE} + chown ${USER_NAME} ${PID_FILE} chmod 600 ${PID_FILE} if [ "${AS_RC_SCRIPT}" = "yes" ]; then echo -n " ${NAME}" fi - ( cd ${ORION_HOME} && ${JAVA_CMD} -jar orion.jar & echo $! > ${PID_FILE} ) > ${LOG} 2>&1 + touch ${PID_FILE} + chown ${USER_NAME} ${PID_FILE} + chmod 600 ${PID_FILE} + su - ${USER_NAME} -c "(cd ${ORION_HOME} && ${JAVA_CMD} -jar orion.jar & echo \$! > ${PID_FILE}) > ${LOG} 2>&1" ;; stop) if [ ! -e ${PID_FILE} ]; then diff -ruN --exclude=work --exclude=CVS --exclude=README.html /usr/ports/www/orion/pkg-plist /home/ernst/freebsd-ports/www/orion/pkg-plist --- /usr/ports/www/orion/pkg-plist Wed Jun 27 02:15:07 2001 +++ /home/ernst/freebsd-ports/www/orion/pkg-plist Tue Oct 2 14:30:31 2001 @@ -394,3 +394,5 @@ @dirrm %%T%%/persistence/ejb @dirrm %%T%%/persistence @dirrm %%T%% +@unexec pw groupdel orion || true +@unexec pw userdel orion || true --fdj2RfSjLxBAspz7-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-java" in the body of the message