diff options
Diffstat (limited to 'java/jboss5/files')
-rw-r--r-- | java/jboss5/files/daemonctl.1.in (renamed from java/jboss5/files/daemonctl.1) | 0 | ||||
-rw-r--r-- | java/jboss5/files/daemonctl.c.in (renamed from java/jboss5/files/daemonctl.c) | 2 | ||||
-rw-r--r-- | java/jboss5/files/jboss5.sh.in (renamed from java/jboss5/files/startup.sh) | 2 | ||||
-rw-r--r-- | java/jboss5/files/patch-build-common.xml | 29 | ||||
-rw-r--r-- | java/jboss5/files/patch-build.xml | 39 | ||||
-rw-r--r-- | java/jboss5/files/patch-buildmagic.ent | 37 | ||||
-rw-r--r-- | java/jboss5/files/patch-serial-autoinc | 86 | ||||
-rw-r--r-- | java/jboss5/files/pkg-deinstall.in | 35 | ||||
-rw-r--r-- | java/jboss5/files/pkg-install.in | 46 | ||||
-rw-r--r-- | java/jboss5/files/pkg-message.in (renamed from java/jboss5/files/pkg-message) | 0 |
10 files changed, 188 insertions, 88 deletions
diff --git a/java/jboss5/files/daemonctl.1 b/java/jboss5/files/daemonctl.1.in index 30547f449ef9..30547f449ef9 100644 --- a/java/jboss5/files/daemonctl.1 +++ b/java/jboss5/files/daemonctl.1.in diff --git a/java/jboss5/files/daemonctl.c b/java/jboss5/files/daemonctl.c.in index 215d5bcd50c3..7bcdc6b7f5e8 100644 --- a/java/jboss5/files/daemonctl.c +++ b/java/jboss5/files/daemonctl.c.in @@ -7,7 +7,7 @@ * Original by Ernst de Haan <znerd@freebsd.org> * www/jakarta-tomcat4/files/daemonctl.c * - * $FreeBSD: /tmp/pcvs/ports/java/jboss5/files/Attic/daemonctl.c,v 1.3 2004-12-22 20:44:23 hq Exp $ + * $FreeBSD$ */ #include <assert.h> diff --git a/java/jboss5/files/startup.sh b/java/jboss5/files/jboss5.sh.in index ab89029ac91f..157a5947f826 100644 --- a/java/jboss5/files/startup.sh +++ b/java/jboss5/files/jboss5.sh.in @@ -2,7 +2,7 @@ # # %%APP_TITLE%% startup script. # -# $FreeBSD: /tmp/pcvs/ports/java/jboss5/files/Attic/startup.sh,v 1.4 2006-06-13 17:43:14 glewis Exp $ +# $FreeBSD$ # # PROVIDE: %%APP_SHORTNAME%% diff --git a/java/jboss5/files/patch-build-common.xml b/java/jboss5/files/patch-build-common.xml new file mode 100644 index 000000000000..fb2a1c8308c7 --- /dev/null +++ b/java/jboss5/files/patch-build-common.xml @@ -0,0 +1,29 @@ +--- ./tools/etc/buildmagic/build-common.xml.orig Sun Mar 25 20:25:52 2007 ++++ ./tools/etc/buildmagic/build-common.xml Sun Mar 25 20:27:18 2007 +@@ -2,7 +2,7 @@ + + <!-- Make sure we have the right version of Ant --> + <property name="buildmagic.ant16.baseversion" value="1.6"/> +- ++ <property name="buildmagic.ant17.baseversion" value="1.7"/> + <!-- + | Add new conditions for other supported Ant versions when they + | become avaialble. +@@ -12,13 +12,16 @@ + <or> + <contains string="${ant.version}" + substring="Ant version ${buildmagic.ant16.baseversion}"/> ++ <contains string="${ant.version}" ++ substring="Ant version ${buildmagic.ant17.baseversion}"/> + </or> + </condition> + + <fail unless="buildmagic.ant.compatible"> + Unsupported Ant version: + ${ant.version} +- Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion}. ++ Please install a version which is compatible with Ant ${buildmagic.ant16.baseversion} ++ or ${buildmagic.ant17.baseversion}. + </fail> + + <!-- JDK Detection --> diff --git a/java/jboss5/files/patch-build.xml b/java/jboss5/files/patch-build.xml new file mode 100644 index 000000000000..710f4c6145fa --- /dev/null +++ b/java/jboss5/files/patch-build.xml @@ -0,0 +1,39 @@ +--- ./build/build.xml.orig Sun Mar 25 21:29:21 2007 ++++ ./build/build.xml Sun Mar 25 21:30:56 2007 +@@ -40,6 +40,36 @@ + --> + + <target name="init" unless="init.disable" depends="_buildmagic:init"> ++ <!-- Make sure we have the right version of Ant --> ++ <property name="buildmagic.ant15.baseversion" value="1.5"/> ++ <property name="buildmagic.ant16.baseversion" value="1.6"/> ++ <property name="buildmagic.ant17.baseversion" value="1.7"/> ++ <!-- ++ | Add new conditions for other supported Ant versions when they ++ | become avaialble. ++ --> ++ ++ <condition property="buildmagic.ant.compatible"> ++ <or> ++ <contains string="${ant.version}" ++ substring="Ant version ${buildmagic.ant15.baseversion}"/> ++ <contains string="${ant.version}" ++ substring="Ant version ${buildmagic.ant16.baseversion}"/> ++ <contains string="${ant.version}" ++ substring="Ant version ${buildmagic.ant17.baseversion}"/> ++ </or> ++ </condition> ++ ++ <fail unless="buildmagic.ant.compatible"> ++ ++ Unsupported Ant version: ++ ++ ${ant.version} ++ ++ Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion} ++ or ${buildmagic.ant17.baseversion}. ++ ++ </fail> + </target> + + diff --git a/java/jboss5/files/patch-buildmagic.ent b/java/jboss5/files/patch-buildmagic.ent new file mode 100644 index 000000000000..2e2eeb500927 --- /dev/null +++ b/java/jboss5/files/patch-buildmagic.ent @@ -0,0 +1,37 @@ +--- ./tools/etc/buildmagic/buildmagic.ent.orig Mon Nov 20 07:45:55 2006 ++++ ./tools/etc/buildmagic/buildmagic.ent Sun Mar 25 21:28:14 2007 +@@ -7,34 +7,6 @@ + <!-- Initialize the build system. --> + <target name="_buildmagic:init" unless="init.disable"> + +- <!-- Make sure we have the right version of Ant --> +- <property name="buildmagic.ant15.baseversion" value="1.5"/> +- <property name="buildmagic.ant16.baseversion" value="1.6"/> +- +- <!-- +- | Add new conditions for other supported Ant versions when they +- | become avaialble. +- --> +- +- <condition property="buildmagic.ant.compatible"> +- <or> +- <contains string="${ant.version}" +- substring="Ant version ${buildmagic.ant15.baseversion}"/> +- <contains string="${ant.version}" +- substring="Ant version ${buildmagic.ant16.baseversion}"/> +- </or> +- </condition> +- +- <fail unless="buildmagic.ant.compatible"> +- +- Unsupported Ant version: +- +- ${ant.version} +- +- Please install a version which is compatible with Ant ${buildmagic.ant15.baseversion} or ${buildmagic.ant16.baseversion}. +- +- </fail> +- + <!-- JDK Detection --> + <available classname="java.lang.StackTraceElement" property="HAVE_JDK_1.4"/> + <available classname="java.lang.Enum" property="HAVE_JDK_1.5"/> diff --git a/java/jboss5/files/patch-serial-autoinc b/java/jboss5/files/patch-serial-autoinc deleted file mode 100644 index f39743e63678..000000000000 --- a/java/jboss5/files/patch-serial-autoinc +++ /dev/null @@ -1,86 +0,0 @@ -$FreeBSD$ - -This patch allows JBoss to correctly create tables when -using the auto-increment feature with Postgresql. - -diff -ruN ./server/src/etc/conf/default/standardjbosscmp-jdbc.xml /home/jonc/ports/jboss4/work/jboss-4.0.2-src/server/src/etc/conf/default/standardjbosscmp-jdbc.xml ---- ./server/src/etc/conf/default/standardjbosscmp-jdbc.xml Thu Jan 27 07:51:35 2005 -+++ /home/jonc/ports/jboss4/work/jboss-4.0.2-src/server/src/etc/conf/default/standardjbosscmp-jdbc.xml Tue May 17 16:13:34 2005 -@@ -1293,7 +1293,7 @@ - <row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template> - <pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template> - <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template> -- <auto-increment-template>?1</auto-increment-template> -+ <auto-increment-template>?1 serial</auto-increment-template> - <alias-header-prefix>t</alias-header-prefix> - <alias-header-suffix>_</alias-header-suffix> - <alias-max-length>32</alias-max-length> -@@ -1420,7 +1420,7 @@ - <row-locking-template>SELECT ?1 FROM ?2 WHERE ?3 ORDER BY ?4 FOR UPDATE</row-locking-template> - <pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template> - <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template> -- <auto-increment-template>?1</auto-increment-template> -+ <auto-increment-template>?1 serial</auto-increment-template> - <alias-header-prefix>t</alias-header-prefix> - <alias-header-suffix>_</alias-header-suffix> - <alias-max-length>32</alias-max-length> -@@ -1674,7 +1674,7 @@ - <row-locking-template/> - <pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template> - <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template> -- <auto-increment-template>?1 IDENTITY</auto-increment-template> -+ <auto-increment-template>?1 ?2 ?3 IDENTITY</auto-increment-template> - <add-column-template>ALTER TABLE ?1 ADD COLUMN ?2 ?3</add-column-template> - <drop-column-template>ALTER TABLE ?1 DROP COLUMN ?2</drop-column-template> - <alias-header-prefix>t</alias-header-prefix> -@@ -1973,7 +1973,7 @@ - <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template> - --> - <fk-constraint-template>ALTER TABLE ?1 ADD INDEX (?3), ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template> -- <auto-increment-template>?1 auto_increment</auto-increment-template> -+ <auto-increment-template>?1 ?2 ?3 auto_increment</auto-increment-template> - <alter-column-template>ALTER TABLE ?1 MODIFY ?2 ?3</alter-column-template> - <alias-header-prefix>t</alias-header-prefix> - <alias-header-suffix>_</alias-header-suffix> -@@ -2113,7 +2113,7 @@ - <row-locking-template>SELECT ?1 FROM ?2 with (updlock) WHERE ?3 ORDER BY ?4</row-locking-template> - <pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template> - <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template> -- <auto-increment-template>?1 IDENTITY</auto-increment-template> -+ <auto-increment-template>?1 ?2 ?3 IDENTITY</auto-increment-template> - <alter-column-template>ALTER TABLE ?1 ALTER COLUMN ?2 ?3</alter-column-template> - <alias-header-prefix>t</alias-header-prefix> - <alias-header-suffix>_</alias-header-suffix> -@@ -2245,7 +2245,7 @@ - <row-locking-template>SELECT ?1 FROM ?2 with (xlock) WHERE ?3 ORDER BY ?4</row-locking-template> - <pk-constraint-template>CONSTRAINT ?1 PRIMARY KEY (?2)</pk-constraint-template> - <fk-constraint-template>ALTER TABLE ?1 ADD CONSTRAINT ?2 FOREIGN KEY (?3) REFERENCES ?4 (?5)</fk-constraint-template> -- <auto-increment-template>?1 IDENTITY</auto-increment-template> -+ <auto-increment-template>?1 ?2 ?3 IDENTITY</auto-increment-template> - <alias-header-prefix>t</alias-header-prefix> - <alias-header-suffix>_</alias-header-suffix> - <alias-max-length>32</alias-max-length> -diff -ruN ./server/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStartCommand.java /home/jonc/ports/jboss4/work/jboss-4.0.2-src/server/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStartCommand.java ---- ./server/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStartCommand.java Tue Oct 26 22:28:23 2004 -+++ /home/jonc/ports/jboss4/work/jboss-4.0.2-src/server/src/main/org/jboss/ejb/plugins/cmp/jdbc/JDBCStartCommand.java Tue May 17 16:13:34 2005 -@@ -916,14 +916,18 @@ - // apply auto-increment template - if(type.getAutoIncrement()[0]) - { -- String columnClause = SQLUtil.getCreateTableColumnsClause(type); - JDBCFunctionMappingMetaData autoIncrement = - manager.getMetaData().getTypeMapping().getAutoIncrementTemplate(); - if(autoIncrement == null) - { - throw new IllegalStateException("auto-increment template not found"); - } -- String[] args = new String[]{columnClause}; -+ String[] args = new String[] -+ { -+ type.getColumnNames () [0], -+ type.getSQLTypes () [0], -+ type.getNotNull () [0] ? " not null " : "" -+ }; - autoIncrement.getFunctionSql(args, sqlBuffer); - } - else diff --git a/java/jboss5/files/pkg-deinstall.in b/java/jboss5/files/pkg-deinstall.in new file mode 100644 index 000000000000..72f7b922c69f --- /dev/null +++ b/java/jboss5/files/pkg-deinstall.in @@ -0,0 +1,35 @@ +#!/bin/sh +# +# This script does the following. +# +# * Checks if the JBoss PID file exists. If it does, it kills the +# JBoss process and removes the PID file. +# +# $FreeBSD$ +# + +# Make sure we're in the right stage of the process +if [ "$2" = "DEINSTALL" ]; then + + # Kill JBoss if it is still running + PID_FILE=/var/run/jboss.pid + if [ -s ${PID_FILE} ]; then + PID=`cat ${PID_FILE}` + echo -n ">> Killing JBoss Server process (${PID})..." + /bin/kill ${PID} > /dev/null 2> /dev/null + if [ $? -eq 0 ]; then + echo " [ DONE ]" + else + echo " [ FAILED ]" + fi + echo -n ">> Removing PID file (${PID_FILE})..." + rm ${PID_FILE} > /dev/null 2> /dev/null + if [ $? -eq 0 ]; then + echo " [ DONE ]" + else + echo " [ FAILED ]" + fi + fi +fi + +exit 0 diff --git a/java/jboss5/files/pkg-install.in b/java/jboss5/files/pkg-install.in new file mode 100644 index 000000000000..687ec3fc1f9e --- /dev/null +++ b/java/jboss5/files/pkg-install.in @@ -0,0 +1,46 @@ +#!/bin/sh +# +# Checks if the 'www' user and group exist. If they don't, then +# an attempt is made to create both. +# +# $FreeBSD$ +# + +# Make sure we're called during the 'make install' process +if [ "$2" != "PRE-INSTALL" ]; then + exit 0 +fi + +# Set some constants +USER=www +GROUP=${USER} +UID=80 +GID=${UID} + +# See if the group already exists +if ! pw groupshow "${GROUP}" 2>/dev/null 1>&2; then + + # If not, try to create it + if pw groupadd ${GROUP} -g ${GID}; then + echo "Added group \"${GROUP}\"." + else + echo "Adding group \"${GROUP}\" failed..." + exit 1 + fi +fi + +# See if the user already exists +if ! pw usershow "${USER}" 2>/dev/null 1>&2; then + + # If not, try to create it + if pw useradd ${USER} -u ${UID} -g ${GROUP} -h - \ + -s "/sbin/nologin" -d "/nonexistent" \ + -c "World Wide Web Owner"; \ + then + echo "Added user \"${USER}\"." + else + echo "Adding user \"${USER}\" failed..." + exit 1 + fi +fi +exit 0 diff --git a/java/jboss5/files/pkg-message b/java/jboss5/files/pkg-message.in index e48411f3028c..e48411f3028c 100644 --- a/java/jboss5/files/pkg-message +++ b/java/jboss5/files/pkg-message.in |