diff --git a/.abf.yml b/.abf.yml
index 3288cfb..2d2a5fe 100644
--- a/.abf.yml
+++ b/.abf.yml
@@ -1,2 +1,2 @@
sources:
- "hsqldb_1_8_1_3.zip": 15b1ece2f131bdb007cae5762f631e8d5fd6eaae
+ hsqldb-2.3.1.zip: 6c5d21b7d54ac6ae23a5f5577f1e81a6301ffa32
diff --git a/hsqldb-1.8.0-initscript-restart.patch b/hsqldb-1.8.0-initscript-restart.patch
deleted file mode 100644
index 2f1be00..0000000
--- a/hsqldb-1.8.0-initscript-restart.patch
+++ /dev/null
@@ -1,11 +0,0 @@
---- hsqldb/bin/hsqldb.orig 2008-01-03 20:33:19.000000000 +0100
-+++ hsqldb/bin/hsqldb 2008-01-03 20:34:07.000000000 +0100
-@@ -467,7 +467,7 @@
- restart|restartcompacted)
- STOP_COMMAND=stop
- [ "$COMMAND" = restartcompacted ] && STOP_COMMAND=stopcompact
-- "${INVOC_PATH}"hsqldb $STOP_COMMAND || exit $?
-+ "${INVOC_PATH}"hsqldb $STOP_COMMAND || :
- exec "${INVOC_PATH}"/hsqldb start
- ;;
- *)
diff --git a/hsqldb-1.8.0-scripts.patch b/hsqldb-1.8.0-scripts.patch
deleted file mode 100644
index efe0f0d..0000000
--- a/hsqldb-1.8.0-scripts.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- bin/runUtil.sh.orig 2004-08-10 16:04:01.000000000 +0200
-+++ bin/runUtil.sh 2004-08-10 16:05:43.000000000 +0200
-@@ -31,7 +31,7 @@
- progname=`basename $0`
-
- # ../ will lead us to the home
--dbhome="$progdir/.."
-+dbhome=/var/lib/hsqldb
-
- # absolutize dbhome
-
-@@ -40,7 +40,7 @@
- #
- # bring in needed functions
-
--. ${dbhome}/lib/functions
-+. /var/lib/hsqldb/lib/functions
-
- #--------------------------------------------------------------------------------------------------------------
- pre_main
diff --git a/hsqldb-1.8.0-specify-su-shell.patch b/hsqldb-1.8.0-specify-su-shell.patch
deleted file mode 100644
index 10bba3a..0000000
--- a/hsqldb-1.8.0-specify-su-shell.patch
+++ /dev/null
@@ -1,37 +0,0 @@
---- bin/hsqldb.orig 2011-01-24 11:59:14.356301132 +0200
-+++ bin/hsqldb 2011-01-24 12:00:06.278430417 +0200
-@@ -41,7 +41,7 @@
- # use this file.
-
- # This stuff will be ignored by systems that don't use chkconfig.
--# chkconfig: 345 87 13
-+# chkconfig: - 87 13
- # description: Hsqldb, A High Performance Java Database
- # pidfile: /var/run/hsqldb.pid
- # config: /etc/sysconfig/hsqldb
-@@ -51,7 +51,6 @@
- # Provides: HSQLDB-Server
- # Required-Start: $syslog $remote_fs $network $named
- # Required-Stop:
--# Default-Start: 3 5
- # Default-Stop: 0 1 2 6
- # Short-Description: HSQLDB-Server
- # Description: Hsqldb, A High Performance Java Database Server
-@@ -369,7 +368,7 @@ running with pid $HSQLDB_PID."
- # Some OSes choke if there are newlines in this string.
- # N.b.!!! The shell of the -c command is the target user's default
- # login shell, so keep this command shell-independent!
-- nohup su "$HSQLDB_OWNER" -c "cd '$SERVER_HOME' && echo "'$$'" > '$PIDFILE' && exec '$JAVA_EXECUTABLE' $SERVER_JVMARGS $TLS_SWITCHES -classpath '${SERVER_ADDL_CLASSPATH}${HSQLDB_JAR_PATH}' org.hsqldb.util.MainInvoker org.hsqldb.$TARGET_CLASS $INVOC_ADDL_ARGS" >> "$LOGFILE" 2>&1 &
-+ nohup su "$HSQLDB_OWNER" -s /bin/sh -c "cd '$SERVER_HOME' && echo "'$$'" > '$PIDFILE' && exec '$JAVA_EXECUTABLE' $SERVER_JVMARGS $TLS_SWITCHES -classpath '${SERVER_ADDL_CLASSPATH}${HSQLDB_JAR_PATH}' org.hsqldb.util.MainInvoker org.hsqldb.$TARGET_CLASS $INVOC_ADDL_ARGS" >> "$LOGFILE" 2>&1 &
- else
- cd "$SERVER_HOME" || {
- echo "Failed to cd to '$SERVER_HOME'" 1>&2
-@@ -464,7 +463,7 @@ See log file '$LOGFILE'." 1>&2
- echo "Successful shutdown ${SHUTDOWN_OPTION} (for the $TARGET_CLASS process)!"
- exit 0
- ;;
-- restart|restartcompacted)
-+ restart|restartcompacted|reload)
- STOP_COMMAND=stop
- [ "$COMMAND" = restartcompacted ] && STOP_COMMAND=stopcompact
- "${INVOC_PATH}"hsqldb $STOP_COMMAND || exit $?
diff --git a/hsqldb-1.8.0-standard-server.properties b/hsqldb-1.8.0-standard-server.properties
index fea30f4..0728426 100644
--- a/hsqldb-1.8.0-standard-server.properties
+++ b/hsqldb-1.8.0-standard-server.properties
@@ -3,7 +3,6 @@
server.database.0 file:data/db0
server.dbname.0 firstdb
-server.urlid.0 db0-url
server.silent true
server.trace false
diff --git a/hsqldb-1.8.0-standard-webserver.properties b/hsqldb-1.8.0-standard-webserver.properties
index 8470951..3dee5b0 100644
--- a/hsqldb-1.8.0-standard-webserver.properties
+++ b/hsqldb-1.8.0-standard-webserver.properties
@@ -3,7 +3,6 @@
server.database.0 file:data/db0
server.dbname.0 firstdb
-server.urlid.0 db0-url
server.silent true
server.trace false
diff --git a/hsqldb-1.8.0-standard.cfg b/hsqldb-1.8.0-standard.cfg
old mode 100755
new mode 100644
diff --git a/hsqldb-1.8.0.10.pom b/hsqldb-1.8.0.10.pom
deleted file mode 100644
index bd0c1fd..0000000
--- a/hsqldb-1.8.0.10.pom
+++ /dev/null
@@ -1,22 +0,0 @@
-
- 4.0.0
- hsqldb
- hsqldb
- jar
- HSQLDB
- 1.8.0.10
- http://hsqldb.org/
- Lightweight 100% Java SQL Database Engine
-
-
- HSQLDB License
- http://hsqldb.org/web/hsqlLicense.html
- repo
-
-
-
- http://sourceforge.net/cvs/?group_id=23316
-
-
-
-
diff --git a/hsqldb-2.3.0.pom b/hsqldb-2.3.0.pom
new file mode 100644
index 0000000..a32c619
--- /dev/null
+++ b/hsqldb-2.3.0.pom
@@ -0,0 +1,35 @@
+
+
+ 4.0.0
+ org.hsqldb
+ hsqldb
+ 2.3.0
+ HyperSQL Database
+ HSQLDB - Lightweight 100% Java SQL Database Engine
+ http://hsqldb.org
+ 2001
+
+ The HSQL Development Group
+ http://hsqldb.org
+
+
+
+ HSQLDB License, a BSD open source license
+ http://hsqldb.org/web/hsqlLicense.html
+ repo
+
+
+
+
+ unsaved
+ Blaine Simpson
+ blaine.simpson@admc.com
+
+
+
+ scm:svn:http://hsqldb.svn.sourceforge.net/svnroot/hsqldb/base
+ 2.3.0
+ http://hsqldb.svn.sourceforge.net/viewvc/hsqldb/base/tags/2.3.0
+
+
diff --git a/hsqldb-apidocs.patch b/hsqldb-apidocs.patch
new file mode 100644
index 0000000..59f71a5
--- /dev/null
+++ b/hsqldb-apidocs.patch
@@ -0,0 +1,12 @@
+diff --git a/build/build.xml b/build/build.xml
+index 3a2b77f..c18fda0 100644
+--- a/build/build.xml
++++ b/build/build.xml
+@@ -130,6 +130,7 @@ examples:
+ There is no performance penalty, since the javadoc task regenerates
+ everything each run.
+ -->
++
+
+
diff --git a/hsqldb-cmdline.patch b/hsqldb-cmdline.patch
new file mode 100644
index 0000000..e708e01
--- /dev/null
+++ b/hsqldb-cmdline.patch
@@ -0,0 +1,21 @@
+diff --git a/build/build.xml b/build/build.xml
+index ae8b37b..f3453fd 100644
+--- a/build/build.xml
++++ b/build/build.xml
+@@ -493,7 +493,7 @@ examples:
+
+
+
+-
+
+
+
+-
+
+
+
diff --git a/hsqldb-post b/hsqldb-post
new file mode 100644
index 0000000..f54b97e
--- /dev/null
+++ b/hsqldb-post
@@ -0,0 +1,76 @@
+#!/bin/sh
+
+# This file was created with portions of the original SysV init script shipped
+# with hsqldb
+
+# Copyright (c) 2001-2004, The HSQL Development Group
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# Neither the name of the HSQL Development Group nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# $MAX_START_SECS from when the Server/WebServer is started.
+MAX_START_SECS=60
+
+# Class in the org.hsqldb package to start.
+# At this time, only the values "Server" or "WebServer" will work.
+TARGET_CLASS=Server
+
+. /etc/sysconfig/hsqldb
+
+# PROPERTY_FILE is a derived value.
+case "$TARGET_CLASS" in
+ Server) PROPERTY_FILE="$SERVER_HOME"/server.properties;;
+ WebServer) PROPERTY_FILE="$SERVER_HOME"/webserver.properties;;
+ *)
+ echo 'Unsupported value for $TARGET_CLASS: '"$TARGET_CLASS" 1>&2
+ exit 2;;
+esac
+[ -f "$PROPERTY_FILE" ] || {
+ echo "'$PROPERTY_FILE' is missing" 1>&2
+ exit 2
+}
+[ -r "$PROPERTY_FILE" ] || {
+ echo "'$PROPERTY_FILE' isn't readable" 1>&2
+ exit 2
+}
+
+AUTH_FILE_SWITCH=
+# N.b., there will be a problem if there are special characters or
+# spaces inside of $AUTH_FILE.
+[ -n "$AUTH_FILE" ] && AUTH_FILE_SWITCH="-Dsqltoolsprayer.rcfile=$AUTH_FILE"
+
+# Might as well set CLASSPATH for a cleaner command.
+CLASSPATH="$HSQLDB_JAR_PATH"
+export CLASSPATH
+
+sleep 1
+
+"$JAVA_EXECUTABLE" $AUTH_FILE_SWITCH $CLIENT_JVMARGS \
+ "-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \
+ "-Dsqltoolsprayer.maxtime=${MAX_START_SECS}000" \
+ org.hsqldb.cmdline.SqlToolSprayer '' db0-url
diff --git a/hsqldb-stop b/hsqldb-stop
new file mode 100644
index 0000000..be1f0e7
--- /dev/null
+++ b/hsqldb-stop
@@ -0,0 +1,84 @@
+#!/bin/sh
+
+# This file was created with portions of the original SysV init script shipped
+# with hsqldb
+
+# Copyright (c) 2001-2004, The HSQL Development Group
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# Neither the name of the HSQL Development Group nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+# Class in the org.hsqldb package to start.
+# At this time, only the values "Server" or "WebServer" will work.
+TARGET_CLASS=Server
+MAX_TERMINATE_SECS=1
+
+# To customize settings, edit this file:
+. /etc/sysconfig/hsqldb
+
+# PROPERTY_FILE is a derived value.
+case "$TARGET_CLASS" in
+ Server) PROPERTY_FILE="$SERVER_HOME"/server.properties;;
+ WebServer) PROPERTY_FILE="$SERVER_HOME"/webserver.properties;;
+ *)
+ echo 'Unsupported value for $TARGET_CLASS: '"$TARGET_CLASS" 1>&2
+ exit 6;;
+esac
+[ -f "$PROPERTY_FILE" ] || {
+ echo "'$PROPERTY_FILE' is missing" 1>&2
+ exit 6
+}
+[ -r "$PROPERTY_FILE" ] || {
+ echo "'$PROPERTY_FILE' isn't readable" 1>&2
+ exit 6
+}
+[ -r "$HSQLDB_JAR_PATH" ] || {
+ echo "'$HSQLDB_JAR_PATH' isn't readable" 1>&2
+ exit 6
+}
+[ -x "$JAVA_EXECUTABLE" ] || {
+ echo "No Java executable found at '$JAVA_EXECUTABLE'" 1>&2
+ exit 6
+}
+
+AUTH_FILE_SWITCH=
+# N.b., there will be a problem if there are special characters or
+# spaces inside of $AUTH_FILE.
+[ -n "$AUTH_FILE" ] &&
+AUTH_FILE_SWITCH="-Dsqltoolsprayer.rcfile=$AUTH_FILE"
+# Might as well set CLASSPATH for a cleaner command.
+CLASSPATH="$HSQLDB_JAR_PATH"
+export CLASSPATH
+export PATH # Required only for some funny init environments.
+"$JAVA_EXECUTABLE" $AUTH_FILE_SWITCH $CLIENT_JVMARGS \
+ "-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \
+ org.hsqldb.cmdline.SqlToolSprayer '' \
+ db0-url $SHUTDOWN_URLIDS
+sleep $MAX_TERMINATE_SECS # Give the JVM a sec. or 2 to fully exit.
+echo "Successful shutdown ${SHUTDOWN_OPTION} (for the $TARGET_CLASS process)!"
+exit 0
+
diff --git a/hsqldb-tmp.patch b/hsqldb-tmp.patch
deleted file mode 100644
index 013e4a7..0000000
--- a/hsqldb-tmp.patch
+++ /dev/null
@@ -1,15 +0,0 @@
-diff -ur hsqldb.orig/bin/hsqldb hsqldb/bin/hsqldb
---- hsqldb.orig/bin/hsqldb 2006-09-05 10:37:12.000000000 -0400
-+++ hsqldb/bin/hsqldb 2006-09-05 10:50:45.000000000 -0400
-@@ -110,7 +110,10 @@
- SU_ECHO_SECS=1
- # File used as semaphore. If file is removed, a running pid checker
- # process will exit.
--PIDCHECKER_FLAGFILE=/tmp/pidchecker.run
-+PIDCHECKER_FLAGFILE=`mktemp /tmp/hsqldb.XXXXXXXX`
-+if [ x"$PIDCHECKER_FLAGFILE" = "x" ] ; then
-+ echo "unable to create tmp file"; exit 1
-+fi
- # The following settings get overridden by optional setting in the config file.
- # Time to allow for JVM to die after all HSQLDB instances stopped.
- MAX_TERMINATE_SECS=1
diff --git a/hsqldb-wrapper b/hsqldb-wrapper
new file mode 100644
index 0000000..e28c255
--- /dev/null
+++ b/hsqldb-wrapper
@@ -0,0 +1,97 @@
+#!/bin/sh
+
+# This file was created with portions of the original SysV init script shipped
+# with hsqldb
+
+# Copyright (c) 2001-2004, The HSQL Development Group
+# All rights reserved.
+#
+# Redistribution and use in source and binary forms, with or without
+# modification, are permitted provided that the following conditions are met:
+#
+# Redistributions of source code must retain the above copyright notice, this
+# list of conditions and the following disclaimer.
+#
+# Redistributions in binary form must reproduce the above copyright notice,
+# this list of conditions and the following disclaimer in the documentation
+# and/or other materials provided with the distribution.
+#
+# Neither the name of the HSQL Development Group nor the names of its
+# contributors may be used to endorse or promote products derived from this
+# software without specific prior written permission.
+#
+# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
+# ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
+# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
+# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
+# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
+# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
+# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
+# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
+# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+
+
+# Class in the org.hsqldb package to start.
+# At this time, only the values "Server" or "WebServer" will work.
+TARGET_CLASS=Server
+
+. /etc/sysconfig/hsqldb
+
+# Suffix delimiter to $SERVER_ADDL_CLASSPATH, if it is set.
+[ -n "$SERVER_ADDL_CLASSPATH" ] &&
+SERVER_ADDL_CLASSPATH="${SERVER_ADDL_CLASSPATH}:"
+# Validate that config file sets all required variables.
+[ -n "$JAVA_EXECUTABLE" ] && [ -n "$HSQLDB_JAR_PATH" ] &&
+[ -n "$SERVER_HOME" ] || {
+ echo "Config file '$CFGFILE' does not set one or more of following variables
+ JAVA_EXECUTABLE, HSQLDB_JAR_PATH, SERVER_HOME" 1>&2
+ exit 2
+}
+[ -d "$SERVER_HOME" ] || {
+ echo "SERVER_HOME variable in '$CFGFILE' is set to a non-directory." 1>&2
+ exit 2
+}
+[ -f "$JAVA_EXECUTABLE" ] && [ -f "$HSQLDB_JAR_PATH" ] || {
+ echo "JAVA_EXECUTABLE or HSQLDB_JAR_PATH in '$CFGFILE' is set to a non-file." 1>&2
+ exit 2
+}
+[ -r "$HSQLDB_JAR_PATH" ] || {
+ echo "'$HSQLDB_JAR_PATH' isn't readable" 1>&2
+ exit 2
+}
+[ -x "$JAVA_EXECUTABLE" ] || {
+ echo "No Java executable found at '$JAVA_EXECUTABLE'" 1>&2
+ exit 2
+}
+
+# Make a good effort (but not bullet-proof) check on permissions of the
+# auth file. Unfortunately, if auth-file is not specified, this depends
+# upon both (a) $HOME being set; and (b) SqlToolSprayer and SqlTool defaults.
+# On the other hand, it works great if AUTH_FILE is set explicitly by user.
+if [ -z "$AUTH_FILE" ] && [ -z "$HOME" ]; then
+ : # Lousy init environment didn't set $HOME, so can't find dflt cfg file.
+else
+ _AUTH_TEST_PATH="$AUTH_FILE"
+ [ -n "${_AUTH_TEST_PATH}" ] || _AUTH_TEST_PATH="$HOME/sqltool.rc"
+ [ -f "$_AUTH_TEST_PATH" ] || {
+ echo "No auth file found at '$_AUTH_TEST_PATH'" 1>&2
+ exit 2
+ }
+ [ -r "$_AUTH_TEST_PATH" ] || {
+ echo "Auth file '$_AUTH_TEST_PATH' not readable" 1>&2
+ exit 2
+ }
+ ls -ld "$_AUTH_TEST_PATH" | grep '^-..------' > /dev/null 2>&1 || {
+ echo "Fix permissions on '$_AUTH_TEST_PATH' like 'chmod 600 $_AUTH_TEST_PATH'" 1>&2
+ exit 2
+ }
+fi
+
+TLS_SWITCHES=
+[ -n "$TLS_KEYSTORE" ] &&
+TLS_SWITCHES="-Djavax.net.ssl.keyStore=$TLS_KEYSTORE -Djavax.net.ssl.keyStorePassword=$TLS_PASSWORD"
+
+cd "$SERVER_HOME" &&
+exec "$JAVA_EXECUTABLE" $SERVER_JVMARGS $TLS_SWITCHES -classpath "${SERVER_ADDL_CLASSPATH}${HSQLDB_JAR_PATH}" org.hsqldb.util.MainInvoker org.hsqldb.$TARGET_CLASS $INVOC_ADDL_ARGS
diff --git a/hsqldb.spec b/hsqldb.spec
index 1e22e4c..a7ab29c 100644
--- a/hsqldb.spec
+++ b/hsqldb.spec
@@ -28,37 +28,55 @@
# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
-%global cvs_version 1_8_1_3
+%global pomversion 2.3.0
+
+Name: hsqldb
+Version: 2.3.1
+Release: 1.1
+Epoch: 1
+Summary: HyperSQL Database Engine
+
+License: BSD
+URL: http://hsqldb.sourceforge.net/
+Group: Databases
+
+BuildArch: noarch
+
+Source0: http://downloads.sourceforge.net/hsqldb/%{name}-%{version}.zip
+Source1: %{name}-1.8.0-standard.cfg
+Source2: %{name}-1.8.0-standard-server.properties
+Source3: %{name}-1.8.0-standard-webserver.properties
+Source4: %{name}-1.8.0-standard-sqltool.rc
+Source5: http://www.hsqldb.org/repos/org/hsqldb/hsqldb/%{pomversion}/hsqldb-%{pomversion}.pom
+# Custom systemd files - talking with upstream about incorporating them, see
+# http://sourceforge.net/projects/hsqldb/forums/forum/73673/topic/5367103
+Source6: %{name}.systemd
+Source7: %{name}-wrapper
+Source8: %{name}-post
+Source9: %{name}-stop
+
+# Javadoc fails to create since apidocs folder is deleted and not recreated
+Patch0: %{name}-apidocs.patch
+# Package org.hsqldb.cmdline was only compiled with java 1.5
+Patch1: %{name}-cmdline.patch
-Name: hsqldb
-Version: 1.8.1.3
-Release: 5
-Epoch: 1
-Summary: HyperSQL Database Engine
-License: BSD
-URL: http://hsqldb.sourceforge.net/
-Source0: http://downloads.sourceforge.net/hsqldb/%{name}_%{cvs_version}.zip
-Source1: %{name}-1.8.0-standard.cfg
-Source2: %{name}-1.8.0-standard-server.properties
-Source3: %{name}-1.8.0-standard-webserver.properties
-Source4: %{name}-1.8.0-standard-sqltool.rc
-Source5: http://mirrors.ibiblio.org/pub/mirrors/maven2/%{name}/%{name}/1.8.0.10/%{name}-1.8.0.10.pom
-Patch0: %{name}-1.8.0-scripts.patch
-Patch1: hsqldb-tmp.patch
-Patch2: %{name}-1.8.0-specify-su-shell.patch
-Requires: servlet25
-Requires(post): coreutils
-Requires(preun): coreutils
-Requires(preun): initscripts
-Requires(pre): shadow-utils
-Requires(post): jpackage-utils
-Requires(postun): jpackage-utils
BuildRequires: ant
-BuildRequires: junit
BuildRequires: jpackage-utils >= 0:1.5
+BuildRequires: junit
+BuildRequires: systemd-units
+#BuildRequires: tomcat-servlet-3.0-api
BuildRequires: servlet25
-Group: Databases
-BuildArch: noarch
+
+Requires: java
+Requires: servlet25
+#Requires: tomcat-servlet-3.0-api
+Requires(pre): shadow-utils
+Requires(post): systemd
+Requires(post): systemd-units
+Requires(preun): initscripts
+Requires(preun): systemd-units
+Requires(postun): systemd-units
+
%description
HSQLdb is a relational database engine written in JavaTM , with a JDBC
@@ -79,14 +97,16 @@ BSD License. Yes, that's right, completely free of cost or restrictions!
%package manual
Summary: Manual for %{name}
-Group: Development/Java
+
+
%description manual
Documentation for %{name}.
%package javadoc
Summary: Javadoc for %{name}
-Group: Development/Java
+
+
Requires: jpackage-utils
%description javadoc
@@ -94,17 +114,15 @@ Javadoc for %{name}.
%package demo
Summary: Demo for %{name}
-Group: Development/Java
+
+
Requires: %{name} = %{epoch}:%{version}-%{release}
%description demo
Demonstrations and samples for %{name}.
%prep
-%setup -T -c -n %{name}
-(cd ..
-unzip -q %{SOURCE0}
-)
+%setup -q -n %{name}-%{version}/%{name}
# set right permissions
find . -name "*.sh" -exec chmod 755 \{\} \;
# remove all _notes directories
@@ -116,70 +134,69 @@ find . -name "*.war" -exec rm -f {} \;
# correct silly permissions
chmod -R go=u-w *
-%patch0
-%patch1 -p1
-%patch2
+# Fix doc location
+sed -i -e 's/doc-src/doc/g' build/build.xml
-cp %{SOURCE5} ./pom.xml
+%patch0 -p1
+%patch1 -p1
%build
export CLASSPATH=$(build-classpath \
servlet \
junit)
pushd build
-ant jar javadoc
+export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
+ant hsqldb javadoc
popd
%install
# jar
-install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
-install -m 644 lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
+install -d -m 755 %{buildroot}%{_javadir}
+install -m 644 lib/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
# bin
-install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
-install -m 755 bin/runUtil.sh $RPM_BUILD_ROOT%{_bindir}/%{name}RunUtil
-# sysv init
-install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d
-install -m 755 bin/%{name} $RPM_BUILD_ROOT%{_sysconfdir}/rc.d/init.d/%{name}
+install -d -m 755 %{buildroot}%{_bindir}
+# systemd
+install -d -m 755 %{buildroot}%{_unitdir}
+install -d -m 755 %{buildroot}%{_prefix}/lib/%{name}
+install -m 644 %{SOURCE6} %{buildroot}%{_unitdir}/%{name}.service
+install -m 755 %{SOURCE7} %{buildroot}%{_prefix}/lib/%{name}/%{name}-wrapper
+install -m 755 %{SOURCE8} %{buildroot}%{_prefix}/lib/%{name}/%{name}-post
+install -m 755 %{SOURCE9} %{buildroot}%{_prefix}/lib/%{name}/%{name}-stop
# config
-install -d -m 755 $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig
-install -m 644 %{SOURCE1} $RPM_BUILD_ROOT%{_sysconfdir}/sysconfig/%{name}
+install -d -m 755 %{buildroot}%{_sysconfdir}/sysconfig
+install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name}
# serverconfig
-install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
-install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/server.properties
-install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/webserver.properties
-install -m 600 %{SOURCE4} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/sqltool.rc
+install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}
+install -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/lib/%{name}/server.properties
+install -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/lib/%{name}/webserver.properties
+install -m 600 %{SOURCE4} %{buildroot}%{_localstatedir}/lib/%{name}/sqltool.rc
# lib
-install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/lib
-install -m 644 lib/functions $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/lib
-# data
-install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/data
-# demo
-install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/demo
-install -m 755 demo/*.sh $RPM_BUILD_ROOT%{_datadir}/%{name}/demo
-install -m 644 demo/*.html $RPM_BUILD_ROOT%{_datadir}/%{name}/demo
+install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/lib
# javadoc
-install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-cp -r doc/src/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
-rm -rf doc/src
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
+cp -r doc/apidocs/* %{buildroot}%{_javadocdir}/%{name}
+# data
+install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/data
# manual
-install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-cp -r doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-cp index.html $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
+install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}
+cp -r doc/* %{buildroot}%{_docdir}/%{name}-%{version}
+cp index.html %{buildroot}%{_docdir}/%{name}-%{version}
+cd ..
# Maven metadata
-install -pD -T -m 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
+install -pD -T -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+# %add_maven_depmap
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
-pushd $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/lib
- ln -s $(build-classpath hsqldb) hsqldb.jar
+pushd %{buildroot}%{_localstatedir}/lib/%{name}/lib
+ # build-classpath can not be used as the jar is not
+ # yet present during the build
+ ln -s %{_javadir}/hsqldb.jar hsqldb.jar
ln -s $(build-classpath servlet) servlet.jar
popd
%preun
-if [ $1 = 0 ] ; then
- /sbin/service %{name} stop >/dev/null 2>&1
- /sbin/chkconfig --del %{name}
-fi
+%systemd_preun hsqldb.service
%pre
# Add the "hsqldb" user and group
@@ -189,26 +206,32 @@ fi
-d %{_localstatedir}/lib/%{name} -r %{name} 2> /dev/null || :
%post
-# This adds the proper /etc/rc*.d links for the script
-/sbin/chkconfig --add %{name}
-
-%update_maven_depmap
+%systemd_post hsqldb.service
%postun
-%update_maven_depmap
+%systemd_postun_with_restart hsqldb.service
-%pre javadoc
-# workaround for rpm bug, can be removed in F-17
-[ $1 -gt 1 ] && [ -L %{_javadocdir}/%{name} ] && \
-rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
+%triggerun -- hsqldb < 1.8.1.3-9
+# Save the current service runlevel info
+# User must manually run systemd-sysv-convert --apply httpd
+# to migrate them to systemd targets
+/usr/bin/systemd-sysv-convert --save hsqldb >/dev/null 2>&1 ||:
+
+# If the package is allowed to autostart:
+/bin/systemctl --no-reload enable hsqldb.service >/dev/null 2>&1 ||:
+
+# Run these because the SysV package being removed won't do them
+/sbin/chkconfig --del hsqldb >/dev/null 2>&1 || :
+/bin/systemctl try-restart hsqldb.service >/dev/null 2>&1 || :
%files
%defattr(-,root,root,-)
-%doc doc/hsqldb_lic.txt
%{_javadir}/*
-%attr(0755,root,root) %{_bindir}/*
-%attr(0755,root,root) %{_sysconfdir}/rc.d/init.d/%{name}
%config(noreplace) %{_sysconfdir}/sysconfig/%{name}
+%{_unitdir}/%{name}.service
+%{_prefix}/lib/%{name}/%{name}-wrapper
+%{_prefix}/lib/%{name}/%{name}-post
+%{_prefix}/lib/%{name}/%{name}-stop
%attr(0700,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/data
%{_localstatedir}/lib/%{name}/lib
%{_localstatedir}/lib/%{name}/server.properties
@@ -219,215 +242,10 @@ rm -rf $(readlink -f %{_javadocdir}/%{name}) %{_javadocdir}/%{name} || :
%{_mavenpomdir}/*
%files manual
-%defattr(-,root,root,-)
%doc %{_docdir}/%{name}-%{version}
-%doc doc/hsqldb_lic.txt
%files javadoc
-%defattr(-,root,root,-)
-%{_javadocdir}/%{name}
-%doc doc/hsqldb_lic.txt
+%doc %{_javadocdir}/%{name}
%files demo
-%defattr(-,root,root,-)
-%{_datadir}/%{name}
-
-
-%changelog
-* Sun Nov 27 2011 Guilherme Moro 1:1.8.1.3-5
-+ Revision: 733975
-- rebuild
-- imported package hsqldb
-
- + Oden Eriksson
- - mass rebuild
-
-* Fri Dec 03 2010 Oden Eriksson 1:1.8.0.10-0.0.5mdv2011.0
-+ Revision: 605880
-- rebuild
-
-* Wed Mar 17 2010 Oden Eriksson 1:1.8.0.10-0.0.4mdv2010.1
-+ Revision: 522848
-- rebuilt for 2010.1
-
-* Wed Sep 02 2009 Christophe Fergeau 1:1.8.0.10-0.0.3mdv2010.0
-+ Revision: 425153
-- rebuild
-
-* Sat Mar 07 2009 Antoine Ginies 1:1.8.0.10-0.0.2mdv2009.1
-+ Revision: 351237
-- rebuild
-
-* Wed Jun 18 2008 Alexander Kurtakov 1:1.8.0.10-0.0.1mdv2009.0
-+ Revision: 223788
-- new version 1.8.0.10, use java-rpmbuild, disable gcj_compile
-
-* Fri Feb 15 2008 Anssi Hannula 1:1.8.0.9-0.0.11mdv2008.1
-+ Revision: 169057
-- split server to hsqldb-server subpackage, as OOo needs the classes only
-
-* Mon Jan 14 2008 David Walluck 1:1.8.0.9-0.0.10mdv2008.1
-+ Revision: 151139
-- do not call build-classpath in %%post
-- comment out unused %%preun code
-
- + Marcelo Ricardo Leitner
- - Protect java-rpmbuild buildrequires to mdkversion >= 200810, so we can easily
- backport this package to 2008.0.
-
-* Fri Jan 04 2008 David Walluck 1:1.8.0.9-0.0.9mdv2008.1
-+ Revision: 145272
-- silence commands in %%post
-
-* Fri Jan 04 2008 David Walluck 1:1.8.0.9-0.0.8mdv2008.1
-+ Revision: 144825
-- rebuild
-
-* Thu Jan 03 2008 David Walluck 1:1.8.0.9-0.0.7mdv2008.1
-+ Revision: 143483
-- bump release
-- fix patch name in spec
-- hsqldb user needs a shell or the service can't start
-- patch initscript so that restart works even when no server is currently running
-
-* Thu Jan 03 2008 Anssi Hannula 1:1.8.0.9-0.0.6mdv2008.1
-+ Revision: 142848
-- remove macros from comments causing %%pre errors (Oden)
-
-* Thu Jan 03 2008 David Walluck 1:1.8.0.9-0.0.5mdv2008.1
-+ Revision: 141139
-- spec cleanup
-
- + Anssi Hannula
- - fix hsqldb user creation
-
- + Olivier Blin
- - restore BuildRoot
-
-* Mon Dec 31 2007 David Walluck 1:1.8.0.9-0.0.4mdv2008.1
-+ Revision: 139941
-- fix JAVA_HOME, JAVACMD, and jar locations hsqldb-1.8.0-standard.cfg
-- build with GCJ (1.5.0) for now due to JDBC API changes in 1.7.0
-
- + Anssi Hannula
- - post requires jpackage-utils for build-classpath
- - buildrequire java-rpmbuild, i.e. build with icedtea on x86(_64)
-
- + Thierry Vignaud
- - kill re-definition of %%buildroot on Pixel's request
-
-* Sun Dec 09 2007 David Walluck 1:1.8.0.9-0.0.1mdv2008.1
-+ Revision: 116615
-- 1.8.0.9
-
-* Sat Sep 15 2007 Anssi Hannula 1:1.8.0.8-1.0.2mdv2008.0
-+ Revision: 87386
-- rebuild to filter out autorequires of GCJ AOT objects
-- remove unnecessary Requires(post) on java-gcj-compat
-
-* Mon Sep 03 2007 David Walluck 1:1.8.0.8-1.0.1mdv2008.0
-+ Revision: 78860
-- 1.8.0.8
-
-* Tue Apr 17 2007 David Walluck 1:1.8.0.7-2.1mdv2008.0
-+ Revision: 14164
-- Import hsqldb
-
-
-
-* Thu Feb 02 2007 David Walluck 1:1.8.0.7-2.1mdv2007.1
-- release
-
-* Mon Jan 22 2007 Deepak Bhole 1:1.8.0.7-2jpp
-- Update copyright date
-
-* Thu Jan 11 2007 Deepak Bhole 1.8.0.7-1jpp
-- Updgrade to 1.8.0.7
-
-* Wed Nov 29 2006 Deepak Bhole 1.8.0.4-4jpp
-- Added missing entries to the files section
-- From fnasser@redhat.com:
- - Add post requires for servletapi5 to ensure installation order
-- From sgrubb@redhat.com:
- - Apply patch correcting tmp file usage
-
-* Mon Aug 21 2006 Deepak Bhole 1:1.8.0.4-3jpp
-- Add missing postun section.
-
-* Fri Aug 04 2006 Deepak Bhole 1:1.8.0.4-2jpp
-- Add missing requirements.
-- Merge with fc spec.
- - From gbenson@redhat.com:
- - Change /etc/init.d to /etc/rc.d/init.d.
- - Create hsqldb user and group with low IDs (RH bz #165670).
- - Do not remove hsqldb user and group on uninstall.
- - Build with servletapi5.
- - From ashah@redhat.com:
- - Change hsqldb user shell to /sbin/nologin.
- - From notting@redhat.com
- - use an assigned user/group id
-
-* Fri Apr 28 2006 Fernando Nasser 1:1.8.0.4-1jpp
-- First JPP 1.7 build
-- Upgrade to 1.8.0.4
-
-* Tue Jul 26 2005 Fernando Nasser 0:1.80.1-1jpp
-- Upgrade to 1.8.0.1
-
-* Mon Mar 07 2005 Fernando Nasser 0:1.73.3-1jpp
-- Upgrade to 1.7.3.3
-
-* Wed Mar 02 2005 Fernando Nasser 0:1.73.0-1jpp
-- Upgrade to 1.7.3.0
-
-* Wed Aug 25 2004 Ralph Apel 0:1.72.3-2jpp
-- Build with ant-1.6.2
-
-* Mon Aug 16 2004 Ralph Apel 0:1.72.3-1jpp
-- 1.7.2.3 stable
-
-* Fri Jun 04 2004 Ralph Apel 0:1.72-0.rc6b.1jpp
-- 1.7.2 preview
-
-* Tue May 06 2003 David Walluck 0:1.71-1jpp
-- 1.71
-- update for JPackage 1.5
-
-* Mon Mar 18 2002 Guillaume Rousse 1.61-6jpp
-- generic servlet support
-
-* Mon Jan 21 2002 Guillaume Rousse 1.61-5jpp
-- versioned dir for javadoc
-- no dependencies for javadoc package
-- stricter dependencies for demo package
-- section macro
-- adaptation to new servlet3 package
-
-* Mon Dec 17 2001 Guillaume Rousse 1.61-4jpp
-- javadoc in javadoc package
-- doc reorganisation
-- removed Requires: ant
-- patches regenerated and bzipped
-
-* Wed Nov 21 2001 Christian Zoffoli 1.61-3jpp
-- removed packager tag
-- new jpp extension
-
-* Fri Nov 09 2001 Christian Zoffoli 1.61-2jpp
-- added BuildRequires: servletapi3 ant
-- added Requires: servletapi3 ant
-
-* Fri Nov 09 2001 Christian Zoffoli 1.61-1jpp
-- complete spec restyle
-- splitted & improved linuxization patch
-
-* Fri Nov 09 2001 Christian Zoffoli 1.60-1jpp
-- 1.60 first "official release" of Hsqldb
-
-* Fri Nov 09 2001 Christian Zoffoli 1.43-2jpp
-- fixed version
-
-* Fri Nov 09 2001 Christian Zoffoli 1.43-1jpp
-- first release
-- linuxization patch (doc + script)
diff --git a/hsqldb.systemd b/hsqldb.systemd
new file mode 100644
index 0000000..c7ad1d5
--- /dev/null
+++ b/hsqldb.systemd
@@ -0,0 +1,14 @@
+[Unit]
+Description=HyperSQL Database Engine
+
+
+[Service]
+Type=simple
+User=hsqldb
+Group=hsqldb
+ExecStart=-/usr/lib/hsqldb/hsqldb-wrapper
+ExecStartPost=/usr/lib/hsqldb/hsqldb-post
+ExecStop=/usr/lib/hsqldb/hsqldb-stop
+
+[Install]
+WantedBy=multi-user.target