diff --git a/.gitignore b/.gitignore new file mode 100644 index 0000000..b94d4dd --- /dev/null +++ b/.gitignore @@ -0,0 +1 @@ +SOURCES/hsqldb_1_8_1_3.zip diff --git a/.hsqldb.metadata b/.hsqldb.metadata new file mode 100644 index 0000000..b5a519b --- /dev/null +++ b/.hsqldb.metadata @@ -0,0 +1 @@ +15b1ece2f131bdb007cae5762f631e8d5fd6eaae SOURCES/hsqldb_1_8_1_3.zip diff --git a/SOURCES/hsqldb-1.8.0-scripts.patch b/SOURCES/hsqldb-1.8.0-scripts.patch new file mode 100644 index 0000000..efe0f0d --- /dev/null +++ b/SOURCES/hsqldb-1.8.0-scripts.patch @@ -0,0 +1,20 @@ +--- 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/SOURCES/hsqldb-1.8.0-specify-su-shell.patch b/SOURCES/hsqldb-1.8.0-specify-su-shell.patch new file mode 100644 index 0000000..10bba3a --- /dev/null +++ b/SOURCES/hsqldb-1.8.0-specify-su-shell.patch @@ -0,0 +1,37 @@ +--- 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/SOURCES/hsqldb-1.8.0-standard-server.properties b/SOURCES/hsqldb-1.8.0-standard-server.properties new file mode 100644 index 0000000..fea30f4 --- /dev/null +++ b/SOURCES/hsqldb-1.8.0-standard-server.properties @@ -0,0 +1,21 @@ +# Hsqldb Server cfg file. +# See the Advanced Topics chapter of the Hsqldb User Guide. + +server.database.0 file:data/db0 +server.dbname.0 firstdb +server.urlid.0 db0-url +server.silent true +server.trace false + +server.port 9001 +server.no_system_exit true + +# Until the following setting is changed, the HSQLDB service will not accept +# remote connections. Failing to set a value for server.address at all will +# result in the service binding itself to 0.0.0.0 and accepting remote +# connections. +# +# IT IS STRONGLY ADVISED that before doing this you alter the password of +# the default account (username "sa"). By default, no password is required +# to connect to HSQLDB with the "sa" account. +server.address localhost diff --git a/SOURCES/hsqldb-1.8.0-standard-sqltool.rc b/SOURCES/hsqldb-1.8.0-standard-sqltool.rc new file mode 100644 index 0000000..a85907c --- /dev/null +++ b/SOURCES/hsqldb-1.8.0-standard-sqltool.rc @@ -0,0 +1,98 @@ +# $Id: hsqldb-1.73.0-standard-sqltool.rc,v 1.1 2004/12/23 22:21:08 fnasser Exp $ + +# This is a sample SqlTool configuration file, a.k.a. rc file. + +# You can run SqlTool right now by copying this file to your home directory +# and running +# java -jar /path/to/hsqldb.jar mem +# This will access the first urlid definition below in order to use a +# personal Memory-Only database. + +# If you have the least concerns about security, then secure access to +# your sqltool.rc file. +# See the documentation for SqlTool for various ways to use this file. + +# A personal Memory-Only database. +urlid mem +url jdbc:hsqldb:mem:memdbid +username sa +password + +# This is for a hsqldb Server running with default settings on your local +# computer (and for which you have not changed the password for "sa"). +urlid db0-url +url jdbc:hsqldb:hsql://localhost/firstdb +username sa +password + + +########################################################################### +# Template for a urlid for an Oracle database. +# You will need to put the oracle.jdbc.OracleDriver class into your +# classpath. +# In the great majority of cases, you want to use the file classes12.zip +# (which you can get from the directory $ORACLE_HOME/jdbc/lib of any +# Oracle installation compatible with your server). +# Since you need to add to the classpath, you can't invoke SqlTool with +# the jar switch, like "java -jar .../hsqldb.jar..." or +# "java -jar .../hsqlsqltool.jar...". +# Put both the HSQLDB jar and classes12.zip in your classpath (and export!) +# and run something like "java org.hsqldb.util.SqlTool...". + +#urlid cardiff2 +#url jdbc:oracle:thin:@aegir.admc.com:1522:TRAFFIC_SID +#username blaine +#password secretpassword +#driver oracle.jdbc.OracleDriver +########################################################################### + + +########################################################################### +# Template for a urlid for a Postgresql database. +# You will need to put the org.postgresql.Driver class into your +# classpath. +# The postgresql jar will be named postgresql.jar (if you built Postgresql +# from source), or something like pg73b1jdbc3.jar or jdbc7.2x-1.2.jar. +# You can obtain it from a client or server Postgresql installation, or +# download it from http://jdbc.postgresql.org/download.html. +# Notice that the jar file names (other than "postgresql.jar") contain both +# the target Postgresql server version and the client-side JDBC level (which +# is determined by your client-side Java version, as explained at +# http://jdbc.postgresql.org/download.html). +# I recommend the latest production version for your JDBC version. The +# later JDBC drivers work better even with older Postgresql servers. +# (E.g. \dt won't list owners with an older driver). +# N.b.: Suse Linux 9.1 users should download a new driver from the PG site, +# since Suse distributes the 7.3 drivers with Postgresql 7.4 (why???). +# Since you need to add to the classpath, you can't invoke SqlTool with +# the jar switch, like "java -jar .../hsqldb.jar..." or +# "java -jar .../hsqlsqltool.jar...". +# Put both the HSQLDB jar and the Postgresql jar in your classpath (and +# export!) and run something like "java org.hsqldb.util.SqlTool...". +# N.b.: I notice that Postgresql is unusual in that it does not do an +# implicit commit before DDL commands. If you get an error message +# "... cannot run inside a transaction block", just run "commit;" and retry. + +#urlid commerce +#url jdbc:postgresql://dbsvr2/commercedb +#username blaine +#password obscured +#driver org.postgresql.Driver +########################################################################### + + +########################################################################### +# Template for a TLS-encrypted HSQLDB Server. +# Remember that the hostname in hsqls (and https) JDBC URLs must match the +# CN of the server certificate (the port and instance alias that follows +# are not part of the certificate at all). +# You only need to set "truststore" if the server cert is not approved by +# your system default truststore (which a commercial certificate probably +# would be). + +#urlid tls +#url jdbc:hsqldb:hsqls://db.admc.com:9001/lm2 +#username blaine +#password asecret +#truststore /home/blaine/ca/db/db-trust.store +########################################################################### diff --git a/SOURCES/hsqldb-1.8.0-standard-webserver.properties b/SOURCES/hsqldb-1.8.0-standard-webserver.properties new file mode 100644 index 0000000..8470951 --- /dev/null +++ b/SOURCES/hsqldb-1.8.0-standard-webserver.properties @@ -0,0 +1,13 @@ +# Hsqldb Server cfg file. +# See the Advanced Topics chapter of the Hsqldb User Guide. + +server.database.0 file:data/db0 +server.dbname.0 firstdb +server.urlid.0 db0-url +server.silent true +server.trace false + +server.port 80 +server.default_page index.html +server.root ./ +.html=text/html diff --git a/SOURCES/hsqldb-1.8.0-standard.cfg b/SOURCES/hsqldb-1.8.0-standard.cfg new file mode 100644 index 0000000..53d83d3 --- /dev/null +++ b/SOURCES/hsqldb-1.8.0-standard.cfg @@ -0,0 +1,129 @@ +# $Id: hsqldb-1.73.0-standard.cfg,v 1.1 2004/12/23 22:21:08 fnasser Exp $ + +# Sample configuration file for HSQLDB database server. +# See the "UNIX Quick Start" chapter of the Hsqldb User Guide. + +# N.b.!!!! You must place this in the right location for your type of UNIX. +# See the init script "hsqldb" to see where this must be placed and +# what it should be renamed to. + +# This file is "sourced" by a Bourne shell, so use Bourne shell syntax. + +# This file WILL NOT WORK until you set (at least) the non-commented +# variables to the appropriate values for your system. +# Life will be easier if you avoid all filepaths with spaces or any other +# funny characters. Don't ask for support if you ignore this advice. + +# Thanks to Meikel Bisping for his contributions. -- Blaine + +# JPackage hsqldb home is /var/lib/hsqldb + +HSQLDB_HOME=/var/lib/hsqldb + +# JPackage source Java config + +. /etc/java/java.conf + +JAVA_HOME=${JAVA_HOME:-/usr/lib/jvm/jre} +JAVA_EXECUTABLE=${JAVA_HOME}/bin/java + +# Unless you copied a hsqldb.jar file from another system, this typically +# resides at $HSQLDB_HOME/lib/hsqldb.jar, where $HSQLDB_HOME is your HSQLDB +# software base directory. +HSQLDB_JAR_PATH=${HSQLDB_HOME}/lib/hsqldb.jar + +# Where the file "server.properties" (or "webserver.properties") resides. +SERVER_HOME=${HSQLDB_HOME} + +# What UNIX user the Server/WebServer process will run as. +# (The shutdown client is always run as root or the invoker of the init script). +# Runs as root by default, but you should take the time to set database file +# ownerships to another user and set that user name here. +# You do need to run as root if your Server/WebServer will run on a privileged +# (< 1024) port. +# If you really do want to run as root, comment out the HSQLDB_OWNER setting +# completely. I.e., do not set it to root. This will run Server/Webserver +# without any "su" at all. +HSQLDB_OWNER=hsqldb + +# We require all Server/WebServer instances to be accessible within +# $MAX_START_SECS from when the Server/WebServer is started. +# Defaults to 60. +# Raise this is you are running lots of DB instances or have a slow server. +#MAX_START_SECS=200 +# Ditto for this one +#SU_ECHO_SECS=1 + +# Time to allow for JVM to die after all HSQLDB instances stopped. +# Defaults to 1. +#MAX_TERMINATE_SECS=0 + +# These are "urlid" values from a SqlTool authentication file +# ** IN ADDITION TO THOSE IN YOUR server.properties OR webserver.properties ** +# file. All server.urlid.X values from your properties file will automatically +# be started/stopped/tested. $SHUTDOWN_URLIDS is for additional urlids which +# will stopped. (Therefore, most users will not set this at all). +# Separate multiple values with white space. NO OTHER SPECIAL CHARACTERS! +# Make sure to quote the entire value if it contains white space separator(s). +# Defaults to none (i.e., only urlids set in properties file will be stopped). +#SHUTDOWN_URLIDS='sa mygms' + +# SqlTool authentication file used only for shutdown. +# The default value will be sqltool.rc in root's home directory, since it is +# root who runs the init script. +# (See the SqlTool chapter of the HSQLDB User Guide if you don't understand +# this). +AUTH_FILE=${HSQLDB_HOME}/sqltool.rc + +# Set to 'WebServer' to start a HSQLDB WebServer instead of a Server. +# Defaults to 'Server'. +#TARGET_CLASS=WebServer + +# Server-side classpath IN ADDITION TO the HSQLDB_JAR_PATH set above. +# The classpath here is *earlier* than HSQLDB_JAR_PATH, to allow you +# override classes in the HSQLDB_JAR_PATH jar file. +# In particular, you will want to add classpath elements to give access of +# all of your store procedures (store procedures are documented in the +# HSQLDB User Guide in the SQL Syntax chapter. +# +# N.B.! +# If you're adding files to the classpath in order to be able to call them +# from SQL queries, you will be unable to access them unless you adjust the +# value of the system property hsqldb.method_class_names. Please see the +# comments on SERVER_JVMARGS, at the end of this file. +# SERVER_ADDL_CLASSPATH=/home/blaine/storedprocs.jar:/usr/dev/dbutil/classes + +# For TLS encryption for your Server, set these two variables. +# N.b.: If you set these, then make this file unreadable to non-root users!!!! +# See the TLS chapter of the HSQLDB User Guide, paying attention to the +# security warning(s). +# If you are running with a private server cert, then you will also need to +# set "truststore" in the your SqlTool config file (location is set by the +# AUTH_FILE variable in this file, or it must be at the default location for +# HSQLDB_OWNER). +#TLS_KEYSTORE=/path/to/jks/server.store +#TLS_PASSWORD=password + +# Any JVM args for the invocation of the JDBC client used to verify DB +# instances and to shut them down (SqlToolSprayer). +# For multiple args, put quotes around entire value. +#CLIENT_JVMARGS=-Djavax.net.debug=ssl + +# Any JVM args for the server. +# For multiple args, put quotes around entire value. +# +# N.B.! +# The default value of SERVER_JVMARGS sets the system property +# hsqldb.method_class_names to be empty. This is in order to lessen the +# security risk posed by HSQLDB allowing Java method calls in SQL statements. +# The implications of changing this value (as explained by the authors of +# HSQLDB) are as follows: +# If [it] is not set, then static methods of all available Java classes +# can be accessed as functions in HSQLDB. If the property is set, then +# only the list of semicolon seperated method names becomes accessible. +# An empty property value means no class is accessible. +# Regardless of the value of hsqldb.method_class_names, methods in +# org.hsqldb.Library will be accessible. +# Before making changes to the value below, please be advised of the possible +# dangers involved in allowing SQL queries to contain Java method calls. +SERVER_JVMARGS=-Dhsqldb.method_class_names=\"\" diff --git a/SOURCES/hsqldb-1.8.0.10.pom b/SOURCES/hsqldb-1.8.0.10.pom new file mode 100644 index 0000000..bd0c1fd --- /dev/null +++ b/SOURCES/hsqldb-1.8.0.10.pom @@ -0,0 +1,22 @@ + + 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/SOURCES/hsqldb-jdbc-4.1.patch b/SOURCES/hsqldb-jdbc-4.1.patch new file mode 100644 index 0000000..30ae18c --- /dev/null +++ b/SOURCES/hsqldb-jdbc-4.1.patch @@ -0,0 +1,293 @@ +diff -ur hsqldb.orig/build/build.xml hsqldb/build/build.xml +--- hsqldb.orig/build/build.xml 2010-06-23 08:49:15.000000000 -0400 ++++ hsqldb/build/build.xml 2012-01-24 15:09:43.000000000 -0500 +@@ -98,7 +98,11 @@ + + + +- ++ ++ ++ ++ ++ + + + +@@ -210,6 +214,7 @@ + + + ++ + + + +@@ -244,6 +249,7 @@ + + + ++ + + + +@@ -279,10 +285,47 @@ + + + ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ ++ + + + +- + T getObject(String columnLabel, Class type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public T getObject(int ColumnIndex, Class type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++*/ ++ ++//#endif JAVA7 + } +diff -ur hsqldb.orig/src/org/hsqldb/jdbc/jdbcConnection.java hsqldb/src/org/hsqldb/jdbc/jdbcConnection.java +--- hsqldb.orig/src/org/hsqldb/jdbc/jdbcConnection.java 2010-02-27 12:04:52.000000000 -0500 ++++ hsqldb/src/org/hsqldb/jdbc/jdbcConnection.java 2012-01-24 14:53:02.000000000 -0500 +@@ -50,6 +50,14 @@ + */ + + //#endif JAVA6 ++ ++//#ifdef JAVA7 ++/* ++import java.util.concurrent.Executor; ++*/ ++ ++//#endif JAVA7 ++ + import java.sql.PreparedStatement; + import java.sql.SQLException; + import java.sql.SQLWarning; +@@ -2794,4 +2802,33 @@ + */ + + //#endif JAVA6 ++ ++//#ifdef JAVA7 ++/* ++ public int getNetworkTimeout() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void setNetworkTimeout(Executor executor, int millis) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void abort(Executor executor) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public String getSchema() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void setSchema(String schema) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++*/ ++//#endif JAVA7 + } +diff -ur hsqldb.orig/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java +--- hsqldb.orig/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java 2010-02-27 12:04:52.000000000 -0500 ++++ hsqldb/src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java 2012-01-24 15:03:07.000000000 -0500 +@@ -5697,4 +5697,21 @@ + */ + + //#endif JAVA6 ++ ++//#ifdef JAVA7 ++/* ++ public boolean generatedKeyAlwaysReturned() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public ResultSet getPseudoColumns(String catalog, String schemaPattern, ++ String tableNamePattern, String columnNamePattern) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++*/ ++ ++//#endif JAVA7 + } +diff -ur hsqldb.orig/src/org/hsqldb/jdbc/jdbcDataSource.java hsqldb/src/org/hsqldb/jdbc/jdbcDataSource.java +--- hsqldb.orig/src/org/hsqldb/jdbc/jdbcDataSource.java 2010-02-27 12:04:52.000000000 -0500 ++++ hsqldb/src/org/hsqldb/jdbc/jdbcDataSource.java 2012-01-24 15:08:29.000000000 -0500 +@@ -47,6 +47,13 @@ + //#endif JAVA4 + import org.hsqldb.jdbcDriver; + ++//#ifdef JAVA7 ++/* ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; ++*/ ++//#endif JAVA7 ++ + // boucherb@users 20040411 - doc 1.7.2 - javadoc updates toward 1.7.2 final + + /** +@@ -325,4 +332,14 @@ + */ + + //#endif JAVA6 ++ ++//#ifdef JAVA7 ++/* ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException ++ { ++ throw new SQLFeatureNotSupportedException("Not supported yet."); ++ } ++*/ ++ ++//#endif JAVA7 + } +diff -ur hsqldb.orig/src/org/hsqldb/jdbc/jdbcResultSet.java hsqldb/src/org/hsqldb/jdbc/jdbcResultSet.java +--- hsqldb.orig/src/org/hsqldb/jdbc/jdbcResultSet.java 2010-06-23 08:49:19.000000000 -0400 ++++ hsqldb/src/org/hsqldb/jdbc/jdbcResultSet.java 2012-01-24 14:55:16.000000000 -0500 +@@ -5332,4 +5332,21 @@ + */ + + //#endif JAVA6 ++ ++ ++//#ifdef JAVA7 ++/* ++ ++ public T getObject(String columnLabel, Class type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public T getObject(int columnNum, Class type) throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++*/ ++ ++//#endif JAVA6 + } +diff -ur hsqldb.orig/src/org/hsqldb/jdbc/jdbcStatement.java hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java +--- hsqldb.orig/src/org/hsqldb/jdbc/jdbcStatement.java 2010-02-27 12:04:52.000000000 -0500 ++++ hsqldb/src/org/hsqldb/jdbc/jdbcStatement.java 2012-01-24 14:58:14.000000000 -0500 +@@ -1610,4 +1610,18 @@ + } + */ + //#endif JAVA6 ++ ++//#ifdef JAVA7 ++/* ++ public boolean isCloseOnCompletion() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++ ++ public void closeOnCompletion() throws SQLException ++ { ++ throw new UnsupportedOperationException("Not supported yet."); ++ } ++*/ ++//#endif JAVA7 + } +diff -ur hsqldb.orig/src/org/hsqldb/jdbcDriver.java hsqldb/src/org/hsqldb/jdbcDriver.java +--- hsqldb.orig/src/org/hsqldb/jdbcDriver.java 2009-02-16 19:29:55.000000000 -0500 ++++ hsqldb/src/org/hsqldb/jdbcDriver.java 2012-01-24 15:08:44.000000000 -0500 +@@ -42,6 +42,13 @@ + import org.hsqldb.persist.HsqlDatabaseProperties; + import org.hsqldb.persist.HsqlProperties; + ++//#ifdef JAVA7 ++/* ++import java.sql.SQLFeatureNotSupportedException; ++import java.util.logging.Logger; ++*/ ++//#endif JAVA7 ++ + // fredt@users 20011220 - patch 1.7.0 by fredt + // new version numbering scheme + // fredt@users 20020320 - patch 1.7.0 - JDBC 2 support and error trapping +@@ -321,4 +328,14 @@ + DriverManager.registerDriver(new jdbcDriver()); + } catch (Exception e) {} + } ++ ++//#ifdef JAVA7 ++/* ++ public Logger getParentLogger() throws SQLFeatureNotSupportedException ++ { ++ throw new SQLFeatureNotSupportedException("Not supported yet."); ++ } ++*/ ++ ++//#endif JAVA7 + } diff --git a/SOURCES/hsqldb-post b/SOURCES/hsqldb-post new file mode 100644 index 0000000..8ddb1b9 --- /dev/null +++ b/SOURCES/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.util.SqlToolSprayer '--;' diff --git a/SOURCES/hsqldb-stop b/SOURCES/hsqldb-stop new file mode 100644 index 0000000..5d5bf71 --- /dev/null +++ b/SOURCES/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.util.SqlToolSprayer "shutdown ;" \ + $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/SOURCES/hsqldb-tmp.patch b/SOURCES/hsqldb-tmp.patch new file mode 100644 index 0000000..013e4a7 --- /dev/null +++ b/SOURCES/hsqldb-tmp.patch @@ -0,0 +1,15 @@ +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/SOURCES/hsqldb-wrapper b/SOURCES/hsqldb-wrapper new file mode 100644 index 0000000..e28c255 --- /dev/null +++ b/SOURCES/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/SOURCES/hsqldb.systemd b/SOURCES/hsqldb.systemd new file mode 100644 index 0000000..d9653cf --- /dev/null +++ b/SOURCES/hsqldb.systemd @@ -0,0 +1,14 @@ +[Unit] +Description=HyperSQL Database Engine +After=network.target + +[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 diff --git a/SPECS/hsqldb.spec b/SPECS/hsqldb.spec new file mode 100644 index 0000000..8067925 --- /dev/null +++ b/SPECS/hsqldb.spec @@ -0,0 +1,467 @@ +# Copyright (c) 2000-2007, JPackage Project +# All rights reserved. +# +# Redistribution and use in source and binary forms, with or without +# modification, are permitted provided that the following conditions +# are met: +# +# 1. Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# 2. 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. +# 3. Neither the name of the JPackage Project 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 THE COPYRIGHT +# OWNER 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. +# + +%global cvs_version 1_8_1_3 + +Name: hsqldb +Version: 1.8.1.3 +Release: 14%{?dist} +Epoch: 1 +Summary: HyperSQL Database Engine +License: BSD +URL: http://hsqldb.sourceforge.net/ +Group: Applications/Databases + +BuildArch: noarch + +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 +# 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 + +Patch0: %{name}-1.8.0-scripts.patch +Patch1: hsqldb-tmp.patch +Patch2: %{name}-1.8.0-specify-su-shell.patch +Patch3: %{name}-jdbc-4.1.patch + +BuildRequires: ant +BuildRequires: jpackage-utils >= 0:1.5 +BuildRequires: junit +BuildRequires: systemd-units +BuildRequires: tomcat-servlet-3.0-api + +Requires: java +Requires: tomcat-servlet-3.0-api +Requires(pre): shadow-utils +Requires(post): systemd-sysv +Requires(post): systemd-units +Requires(preun): systemd-units +Requires(postun): systemd-units + + +%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 +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! + +%package manual +Summary: Manual for %{name} +Group: Documentation + +%description manual +Documentation for %{name}. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation +Requires: jpackage-utils + +%description javadoc +Javadoc for %{name}. + +%package demo +Summary: Demo for %{name} +Group: Development/Tools +Requires: %{name} = %{epoch}:%{version}-%{release} + +%description demo +Demonstrations and samples for %{name}. + +%prep +%setup -T -c -n %{name} +(cd .. +unzip -q %{SOURCE0} +) +# set right permissions +find . -name "*.sh" -exec chmod 755 \{\} \; +# remove all _notes directories +for dir in `find . -name _notes`; do rm -rf $dir; done +# remove all binary libs +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 +%patch1 -p1 +%patch2 +%patch3 -p1 + +cp %{SOURCE5} ./pom.xml + +%build +export CLASSPATH=$(build-classpath \ +servlet \ +junit) +pushd build +ant jar javadoc +popd + +%install +# jar +install -d -m 755 %{buildroot}%{_javadir} +install -m 644 lib/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar +# bin +install -d -m 755 %{buildroot}%{_bindir} +install -m 755 bin/runUtil.sh %{buildroot}%{_bindir}/%{name}RunUtil +# 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 %{buildroot}%{_sysconfdir}/sysconfig +install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/%{name} +# serverconfig +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 %{buildroot}%{_localstatedir}/lib/%{name}/lib +install -m 644 lib/functions %{buildroot}%{_localstatedir}/lib/%{name}/lib +# data +install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/data +# demo +install -d -m 755 %{buildroot}%{_datadir}/%{name}/demo +install -m 755 demo/*.sh %{buildroot}%{_datadir}/%{name}/demo +install -m 644 demo/*.html %{buildroot}%{_datadir}/%{name}/demo +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -r doc/src/* %{buildroot}%{_javadocdir}/%{name} +rm -rf doc/src +# manual +install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version} +cp -r doc/* %{buildroot}%{_docdir}/%{name}-%{version} +cp index.html %{buildroot}%{_docdir}/%{name}-%{version} + +# Maven metadata +install -pD -T -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap + +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 +%systemd_preun hsqldb.service + +%pre +# Add the "hsqldb" user and group +# we need a shell to be able to use su - later +%{_sbindir}/groupadd -g 96 -f -r %{name} 2> /dev/null || : +%{_sbindir}/useradd -u 96 -g %{name} -s /sbin/nologin \ + -d %{_localstatedir}/lib/%{name} -r %{name} 2> /dev/null || : + +%post +%systemd_post hsqldb.service + +%postun +%systemd_postun_with_restart hsqldb.service + +%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}/* +%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 +%{_localstatedir}/lib/%{name}/webserver.properties +%attr(0600,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/sqltool.rc +%dir %{_localstatedir}/lib/%{name} +%{_mavendepmapfragdir}/* +%{_mavenpomdir}/* + +%files manual +%doc %{_docdir}/%{name}-%{version} +%doc doc/hsqldb_lic.txt + +%files javadoc +%{_javadocdir}/%{name} +%doc doc/hsqldb_lic.txt + +%files demo +%{_datadir}/%{name} + +%changelog +* Thu Oct 8 2015 Mikolaj Izdebski - 1:1.8.1.3-14 +- Remove dependency on initscripts +- Add After=network.target to systemd service +- Resolves: rhbz#1283893, rhbz#1269717 + +* Fri Dec 27 2013 Daniel Mach - 1:1.8.1.3-13 +- Mass rebuild 2013-12-27 + +* Fri Jun 28 2013 Mikolaj Izdebski - 1:1.8.1.3-12 +- Rebuild to regenerate API documentation +- Resolves: CVE-2013-1571 + +* Fri May 17 2013 Mikolaj Izdebski - 1:1.8.1.3-11 +- Fix incorrect permissions on systemd unit file +- Resolves: rhbz#963911 + +* Thu Feb 14 2013 Fedora Release Engineering - 1:1.8.1.3-10 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_19_Mass_Rebuild + +* Fri Aug 24 2012 Tomas Radej - 1:1.8.1.3-9 +- Switched from SysV to systemd +- Spec rearrangements + +* Thu Jul 19 2012 Fedora Release Engineering - 1:1.8.1.3-8 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_18_Mass_Rebuild + +* Fri Apr 6 2012 Alexander Kurtakov 1:1.8.1.3-7 +- Switch to servlet 3.0 by default. + +* Thu Mar 08 2012 Tomas Radej - 1:1.8.1.3-6 +- Fixed symlink + +* Tue Jan 24 2012 Deepak Bhole - 1:1.8.1.3-5 +- Added patch to support JDBC 4.1/Java 7 + +* Fri Jan 13 2012 Fedora Release Engineering - 1:1.8.1.3-4 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_17_Mass_Rebuild + +* Wed Feb 09 2011 Fedora Release Engineering - 1:1.8.1.3-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_15_Mass_Rebuild + +* Tue Jan 25 2011 Alexander Kurtakov 1:1.8.1.3-2 +- More merge review fixes. + +* Mon Jan 24 2011 Alexander Kurtakov 1:1.8.1.3-1 +- Update to new upstream version. +- Fixes for the merge review. + +* Wed Oct 6 2010 Alexander Kurtakov 1:1.8.0.10-6 +- Update to use tomcat6 servlet implementation. + +* Mon Jan 11 2010 Mary Ellen Foster - 1.8.0.10-5 +- Add maven2 pom and metadata + +* Thu Oct 22 2009 Jesse Keating - 1.8.0.10-4 +- Add patches from Caolan for #523110 and #517839 + +* Fri Jul 24 2009 Fedora Release Engineering - 1:1.8.0.10-3 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_12_Mass_Rebuild + +* Tue Feb 24 2009 Fedora Release Engineering - 1:1.8.0.10-2 +- Rebuilt for https://fedoraproject.org/wiki/Fedora_11_Mass_Rebuild + +* Thu Jul 10 2008 Jon Prindiville - 1:1.8.0.10-1 +- Upgrade to 1.8.0.10 + +* Wed Jul 9 2008 Tom "spot" Callaway - 1:1.8.0.9-3 +- drop repotag + +* Thu May 29 2008 Tom "spot" Callaway - 1:1.8.0.9-2jpp.2 +- fix license tag + +* Mon Feb 18 2008 Fedora Release Engineering - 1:1.8.0.9-2jpp.1 +- Autorebuild for GCC 4.3 + +* Tue Jan 22 2008 Jon Prindiville 1.8.0.9-1jpp.1 +- Fix for bz# 428520: Defining JAVA_HOME in /etc/sysconfig/hsqldb + +* Thu Jan 17 2008 Jon Prindiville 1.8.0.9-1jpp +- Upgrade to 1.8.0.9 + +* Tue Dec 04 2007 Jon Prindiville 1.8.0.8-1jpp.5 +- Backport patch, addressing CVE-2007-4576 + +* Tue Oct 16 2007 Deepak Bhole 1.8.0.8-1jpp.4 +- Rebuild + +* Tue Oct 16 2007 Deepak Bhole 1.8.0.8-1jpp.3 +- Fix bz# 218135: Init script now specifies shell when starting service + +* Thu Sep 20 2007 Deepak Bhole 1:1.8.0.8-1jpp.2 +- Added %%{?dist} to release, as per Fedora policy + +* Fri Aug 31 2007 Fernando Nasser 1:1.8.0.8-1jpp.1 +- Merge with upstream + +* Fri Aug 31 2007 Fernando Nasser 1:1.8.0.8-1jpp +- Upgrade to 1.8.0.8 + +* Mon Jan 22 2007 Deepak Bhole 1:1.8.0.7-2jpp +- Update copyright date + +* Thu Jan 22 2007 Deepak Bhole 1:1.8.0.7-1jpp.2 +- Bump release to build in rawhide + +* Thu Jan 11 2007 Deepak Bhole 1:1.8.0.7-1jpp +- Updgrade to 1.8.0.7 + +* Thu Nov 30 2006 Deepak Bhole 1:1.8.0.4-4jpp.2 +- Bump release to build in rawhide + +* Wed Nov 29 2006 Deepak Bhole 1: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 + +* Wed Oct 11 2006 Fernando Nasser 1:1.8.0.4-3jpp.4 +- Add post requires for servletapi5 to ensure installation order + +* Sun Oct 01 2006 Jesse Keating 1:1.8.0.4-3jpp.3 +- rebuilt for unwind info generation, broken in gcc-4.1.1-21 + +* Wed Sep 20 2006 Steve Grubb 1:1.8.0.4-3jpp.2 +- Apply patch correcting tmp file usage + +* Mon Aug 21 2006 Deepak Bhole 1:1.8.0.4-3jpp +- Add missing postun section. + +* Tue Aug 08 2006 Deepak Bhole 1:1.8.0.4-2jpp.2 +- Fix regression re: missing shadow-utils prereq. + +* 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)