Hello community,

here is the log from the commit of package hsqldb for openSUSE:Factory checked 
in at 2013-09-11 13:39:03
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
Comparing /work/SRC/openSUSE:Factory/hsqldb (Old)
 and      /work/SRC/openSUSE:Factory/.hsqldb.new (New)
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Package is "hsqldb"

Changes:
--------
--- /work/SRC/openSUSE:Factory/hsqldb/hsqldb.changes    2012-06-15 
19:35:11.000000000 +0200
+++ /work/SRC/openSUSE:Factory/.hsqldb.new/hsqldb.changes       2013-09-11 
13:39:06.000000000 +0200
@@ -1,0 +2,37 @@
+Mon Sep  9 11:05:43 UTC 2013 - [email protected]
+
+- Move from jpackage-utils to javapackage-tools
+
+-------------------------------------------------------------------
+Wed Sep  4 12:42:55 UTC 2013 - [email protected]
+
+- Update to 2.2.9
+  * new core fully multithreaded core supports 2PL (two-phased locking)
+    and MVCC (multiversion concurrency control), plus a hybrid 2PL+MVCC
+    transaction control mode
+  * Massive high performance LOB store for BLOBs and CLOBs up to multi-gigabyte
+    size, with total storage capacity of 64 terabytes.
+  * Increased default storage space of 16GB for ordinary data, with fast
+    startup and shutdown. Storage space can be extended to 2TB.
+  * Large result sets, views and subqueries can now be stored on disk (on the
+    server side) while being generated and accessed. The threshold to store
+    a result on disk, as well as the actual fetch size in client-server
+    configurations can be specified per connection.
+  * All query conditions, whether in a JOIN or WHERE clause, are now
+    allocated to an index if possible.
+  * HyperSQL supports schema-based stored procedures and functions written
+    entirely in SQL and JAVA.
+  * Support for BIT, BIT VARYING, CLOB, BLOB, INTERVAL according to the
+    SQL Standards
+  * and many more - see http://hsqldb.sourceforge.net/web/features200.html
+- Dropped patches
+  * hsqldb-1.8.0-scripts.patch
+  * hsqldb-1.8.0.10-suse-initscript.patch (systemd service is used)
+  * hsqldb-jdbc-4.1.patch
+  * hsqldb-tmp.patch (hsqldb-wrapper is used)
+- New patches
+  * hsqldb-apidocs.patch
+  * hsqldb-cmdline.patch
+- systemd integration and drop init script
+
+-------------------------------------------------------------------

Old:
----
  hsqldb-1.8.0-scripts.patch
  hsqldb-1.8.0.10-suse-initscript.patch
  hsqldb-1.8.0.10.pom
  hsqldb-jdbc-4.1.patch
  hsqldb-tmp.patch
  hsqldb_1_8_1_3.zip

New:
----
  hsqldb-2.2.9.pom
  hsqldb-2.2.9.zip
  hsqldb-apidocs.patch
  hsqldb-cmdline.patch
  hsqldb-post
  hsqldb-stop
  hsqldb-wrapper
  hsqldb.systemd

++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++

Other differences:
------------------
++++++ hsqldb.spec ++++++
--- /var/tmp/diff_new_pack.aiASHw/_old  2013-09-11 13:39:07.000000000 +0200
+++ /var/tmp/diff_new_pack.aiASHw/_new  2013-09-11 13:39:07.000000000 +0200
@@ -1,7 +1,7 @@
 #
 # spec file for package hsqldb
 #
-# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
+# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
 #
 # All modifications and additions to the file contributed by third parties
 # remain the property of their copyright owners, unless otherwise agreed
@@ -17,38 +17,46 @@
 
 
 Name:           hsqldb
-Version:        1.8.1.13
+Version:        2.2.9
 Release:        0
-Summary:        HYperSQL Database Engine
+Summary:        HyperSQL Database Engine
 License:        BSD-3-Clause
-Group:          Development/Libraries/Java
+Group:          Productivity/Databases/Servers
 Url:            http://hsqldb.sourceforge.net/
-Source0:        %{name}_1_8_1_3.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:        %{name}-1.8.0.10.pom
-Patch0:         %{name}-1.8.0-scripts.patch
-Patch1:         hsqldb-tmp.patch
-Patch3:         hsqldb-jdbc-4.1.patch
-Patch1000:      hsqldb-1.8.0.10-suse-initscript.patch
+Source0:        http://downloads.sourceforge.net/hsqldb/%{name}-%{version}.zip
+Source1:        hsqldb-1.8.0-standard.cfg
+Source2:        hsqldb-1.8.0-standard-server.properties
+Source3:        hsqldb-1.8.0-standard-webserver.properties
+Source4:        hsqldb-1.8.0-standard-sqltool.rc
+Source5:        
http://www.hsqldb.org/repos/org/hsqldb/hsqldb/%{version}/hsqldb-%{version}.pom
+
+# Custom systemd files - talking with upstream about incorporating them, see
+# http://sourceforge.net/projects/hsqldb/forums/forum/73673/topic/5367103
+Source6:        hsqldb.systemd
+Source7:        hsqldb-wrapper
+Source8:        hsqldb-post
+Source9:        hsqldb-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
 
 BuildRoot:      %{_tmppath}/%{name}-%{version}-build
 BuildArch:      noarch
 
 Requires:       java
 Requires:       servletapi5
+%{systemd_requires}
 
 BuildRequires:  ant
 BuildRequires:  fdupes
-BuildRequires:  jpackage-utils >= 1.5
+BuildRequires:  javapackages-tools
 BuildRequires:  junit
 BuildRequires:  servletapi5
+BuildRequires:  systemd
 BuildRequires:  unzip
 
-PreReq:         %fillup_prereq
-
 %description
 HSQLdb is a relational database engine written in JavaTM , with a JDBC
 driver, supporting a subset of ANSI-92 SQL. It offers a small (about
@@ -68,108 +76,52 @@
 BSD License. Yes, that's right, completely free of cost or
 restrictions!
 
-
-
 %package manual
-Summary:        Hsqldb Database Engine
-Group:          Development/Libraries/Java
+Summary:        Manual for %{name}
+Group:          Documentation/Other
 
 %description manual
-HSQLdb is a relational database engine written in JavaTM , with a JDBC
-driver, supporting a subset of ANSI-92 SQL. It offers a small (about
-100k), fast database engine which offers both in memory and disk based
-tables. Embedded and server modes are available. Additionally, it
-includes tools such as a minimal web server, in-memory query and
-management tools (can be run as applets or servlets, too) and a number
-of demonstration examples.
-
-Downloaded code should be regarded as being of production quality. The
-product is currently being used as a database and persistence engine in
-many Open Source Software projects and even in commercial projects and
-products! In it's current version it is extremely stable and reliable.
-It is best known for its small size, ability to execute completely in
-memory and its speed. Yet it is a completely functional relational
-database management system that is completely free under the Modified
-BSD License. Yes, that's right, completely free of cost or
-restrictions!
-
+Manual for %{name}.
 
 
 %package javadoc
-Summary:        Hsqldb Database Engine
-Group:          Development/Libraries/Java
+Summary:        Javadoc for %{name}
+Group:          Documentation/HTML
 
 %description javadoc
-HSQLdb is a relational database engine written in JavaTM , with a JDBC
-driver, supporting a subset of ANSI-92 SQL. It offers a small (about
-100k), fast database engine which offers both in memory and disk based
-tables. Embedded and server modes are available. Additionally, it
-includes tools such as a minimal web server, in-memory query and
-management tools (can be run as applets or servlets, too) and a number
-of demonstration examples.
-
-Downloaded code should be regarded as being of production quality. The
-product is currently being used as a database and persistence engine in
-many Open Source Software projects and even in commercial projects and
-products! In it's current version it is extremely stable and reliable.
-It is best known for its small size, ability to execute completely in
-memory and its speed. Yet it is a completely functional relational
-database management system that is completely free under the Modified
-BSD License. Yes, that's right, completely free of cost or
-restrictions!
-
+Javadoc for %{name}.
 
 
 %package demo
-Summary:        Hsqldb Database Engine
+Summary:        Demo for %{name}
 Group:          Development/Libraries/Java
 Requires:       %{name} = %{version}
 
 %description demo
-HSQLdb is a relational database engine written in JavaTM , with a JDBC
-driver, supporting a subset of ANSI-92 SQL. It offers a small (about
-100k), fast database engine which offers both in memory and disk based
-tables. Embedded and server modes are available. Additionally, it
-includes tools such as a minimal web server, in-memory query and
-management tools (can be run as applets or servlets, too) and a number
-of demonstration examples.
-
-Downloaded code should be regarded as being of production quality. The
-product is currently being used as a database and persistence engine in
-many Open Source Software projects and even in commercial projects and
-products! In it's current version it is extremely stable and reliable.
-It is best known for its small size, ability to execute completely in
-memory and its speed. Yet it is a completely functional relational
-database management system that is completely free under the Modified
-BSD License. Yes, that's right, completely free of cost or
-restrictions!
-
-
+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 \{\} \;
+find . -name "*.sh" -exec chmod 755 {} +
 
 # remove all _notes directories
-for dir in `find . -name _notes`; do rm -rf $dir; done
+find . -name _notes -exec rm -rf {} +
 
 # remove all binary libs
-find . -name "*.jar" -exec rm -f {} \;
-find . -name "*.class" -exec rm -f {} \;
-find . -name "*.war" -exec rm -f {} \;
+find . -name "*.jar" -exec rm -f {} +
+find . -name "*.class" -exec rm -f {} +
+find . -name "*.war" -exec rm -f {} +
 
 # correct silly permissions
 chmod -R go=u-w *
 
-%patch0 -p0
-%patch1 -p1
-%patch3 -p1
-%patch1000 -b .suse-initscript
+# 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 \
@@ -177,73 +129,72 @@
 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
+
+# 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
 
-# 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%{_initrddir}
-install -m 755 bin/%{name} $RPM_BUILD_ROOT%{_initrddir}/%{name}
 # rchsqldb link
-install -d -m 0755 $RPM_BUILD_ROOT/%{_sbindir}/
-ln -sf %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
+install -d -m 0755 %{buildroot}/%{_sbindir}/
+ln -sf ../../sbin/service %{buildroot}/%{_sbindir}/rc%{name}
 
 # sysconfig
-#install -d -m 0755 $RPM_BUILD_ROOT/var/adm/fillup-templates
-#install -m 700 %{SOURCE1} 
$RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name}
+#install -d -m 0755 %{buildroot}/var/adm/fillup-templates
+#install -m 700 %{SOURCE1} 
%{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
+install -d -m 0755 %{buildroot}/%{_sysconfdir}
 install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/%{name}.conf
 
 # 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
+install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/lib
+
+# javadoc
+install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
+cp -r doc/apidocs/* %{buildroot}%{_javadocdir}/%{name}
 
 # data
-install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/data
+install -d -m 755 %{buildroot}%{_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
-
-# 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}%{_datadir}/%{name}/sample
+rm -f sample/%{name}.init
+install -m 644 sample/* %{buildroot}%{_datadir}/%{name}/sample
 
 # manual
-install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-cp -pr doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-cp -p index.html $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
-%fdupes -s %{buildroot}
+install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}
+cp -pr doc/* %{buildroot}%{_docdir}/%{name}-%{version}
+cp -p index.html %{buildroot}%{_docdir}/%{name}-%{version}
 
+cd ..
 # Maven metadata
-install -pD -T -m 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
-%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
+install -pD -T -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
+%add_maven_depmap
 
-pushd $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/lib
+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 servletapi5) servletapi5.jar
 popd
 
-%clean
-rm -rf $RPM_BUILD_ROOT
+%fdupes -s %{buildroot}
 
 %pre
 # Add the "hsqldb" user and group
@@ -257,38 +208,40 @@
     : OK user hsqldb already present
 else
     %{_sbindir}/useradd -r -g %{name} -c "Hsqldb" -s /bin/sh \
-    -d %{_localstatedir}/lib/%{name} -o %{name} 2> /dev/null || :
+    -d %{_localstatedir}/lib/%{name} %{name} 2> /dev/null || :
 fi
+%service_add_pre %{name}.service
 
 %post
-%{fillup_and_insserv %{name}}
-rm -f %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
-rm -f %{_localstatedir}/lib/%{name}/lib/servlet.jar
-
-%postun
-%restart_on_update %{name}
-%insserv_cleanup
+%{fillup_only %{name}}
+%service_add_post %{name}.service
 
 %preun
-%stop_on_removal %{name}
+%service_del_preun %{name}.service
+
+%postun
+%service_del_postun %{name}.service
 
 %files
 %defattr(0644,root,root,0755)
 %dir %{_docdir}/%{name}-%{version}
 %doc %{_docdir}/%{name}-%{version}/hsqldb_lic.txt
 %{_javadir}/*
-%attr(0755,root,root) %{_bindir}/*
-%attr(0755,root,root) %{_sbindir}/rc%{name}
-%attr(0755,root,root) %{_initrddir}/%{name}
-%attr(0700,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/data
+%{_sbindir}/rc%{name}
+%{_unitdir}/%{name}.service
+%dir %{_prefix}/lib/%{name}/
+%attr(0755,root,root) %{_prefix}/lib/%{name}/%{name}-post
+%attr(0755,root,root) %{_prefix}/lib/%{name}/%{name}-stop
+%attr(0755,root,root) %{_prefix}/lib/%{name}/%{name}-wrapper
 %{_localstatedir}/lib/%{name}/lib
+%attr(0700,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/data
 %attr(0644,root,root) %{_localstatedir}/lib/%{name}/server.properties
 %attr(0644,root,root) %{_localstatedir}/lib/%{name}/webserver.properties
 %attr(0600,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/sqltool.rc
 %dir %{_localstatedir}/lib/%{name}
 %config(noreplace) %{_sysconfdir}/%{name}.conf
 %dir %{_mavenpomdir}
-%{_mavenpomdir}/JPP-%{name}.pom
+%{_mavenpomdir}/*
 %{_mavendepmapfragdir}/%{name}
 
 %files manual

++++++ hsqldb-1.8.0-standard-server.properties ++++++
--- /var/tmp/diff_new_pack.aiASHw/_old  2013-09-11 13:39:07.000000000 +0200
+++ /var/tmp/diff_new_pack.aiASHw/_new  2013-09-11 13:39:07.000000000 +0200
@@ -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
 

++++++ hsqldb-apidocs.patch ++++++
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.
       -->
+     <mkdir dir="doc/apidocs"/>
      <copy todir="doc/apidocs">
        <!-- IMPORTANT:
             Add a fixcrlf if we add non-binary files to doc/apidocs. -->
++++++ hsqldb-cmdline.patch ++++++
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:
     </target>
 
     <!-- compiles the cmdline classes -->
-    <target name="-cmdline" if="ant.java.iscjava15"
+    <target name="-cmdline"
             depends="-prepare, -update-switch-branch,
                      -conditionalize-sqlfile-scanner, -sqlfile-scanner">
       <javac srcdir="${swsrc}"
@@ -700,7 +700,6 @@ examples:
          <exclude name="org/hsqldb/util/Zaurus*"/>
          <exclude name="org/hsqldb/test/*.class"/>
          <exclude name="org/hsqldb/sample/*.class"/>
-         <exclude name="org/hsqldb/cmdline/**"/>
       </jar>
     </target>
 
++++++ hsqldb-post ++++++
#!/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/hsqldb.conf

. /usr/share/java-utils/java-functions

[ -z "$JAVA_EXECUTABLE" ] && {
    set_javacmd
    JAVA_EXECUTABLE=${JAVACMD}
}

# 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
++++++ hsqldb-stop ++++++
#!/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/hsqldb.conf

. /usr/share/java-utils/java-functions

[ -z "$JAVA_EXECUTABLE" ] && {
    set_javacmd
    JAVA_EXECUTABLE=${JAVACMD}
}

# 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

++++++ hsqldb-wrapper ++++++
#!/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/hsqldb.conf

. /usr/share/java-utils/java-functions

[ -z "$JAVA_EXECUTABLE" ] && {
    set_javacmd
    JAVA_EXECUTABLE=${JAVACMD}
}

# 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
++++++ hsqldb.systemd ++++++
[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
SuccessExitStatus=143

[Install]
WantedBy=multi-user.target
-- 
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to