forked from pool/hsqldb
This commit is contained in:
commit
3af5c2f1b2
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
20
hsqldb-1.8.0-scripts.patch
Normal file
20
hsqldb-1.8.0-scripts.patch
Normal file
@ -0,0 +1,20 @@
|
||||
--- bin/runUtil.sh
|
||||
+++ bin/runUtil.sh
|
||||
@@ -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
|
21
hsqldb-1.8.0-standard-server.properties
Normal file
21
hsqldb-1.8.0-standard-server.properties
Normal file
@ -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
|
98
hsqldb-1.8.0-standard-sqltool.rc
Normal file
98
hsqldb-1.8.0-standard-sqltool.rc
Normal file
@ -0,0 +1,98 @@
|
||||
# $Id: hsqldb-1.8.0-standard-sqltool.rc,v 1.1 2007/08/31 13:37:06 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
|
||||
###########################################################################
|
13
hsqldb-1.8.0-standard-webserver.properties
Normal file
13
hsqldb-1.8.0-standard-webserver.properties
Normal file
@ -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
|
126
hsqldb-1.8.0-standard.cfg
Normal file
126
hsqldb-1.8.0-standard.cfg
Normal file
@ -0,0 +1,126 @@
|
||||
# $Id: hsqldb-1.8.0-standard.cfg,v 1.2 2007/12/04 15:56:54 jprindiv 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
|
||||
|
||||
# JAVA_EXECUTABLE - a path to ${JAVA_HOME}/bin/java
|
||||
# change if you want to use a different JVM as the default one
|
||||
# JAVA_EXECUTABLE=
|
||||
|
||||
# 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=\"\"
|
281
hsqldb-1.8.0.10-java6.patch
Normal file
281
hsqldb-1.8.0.10-java6.patch
Normal file
@ -0,0 +1,281 @@
|
||||
--- src/org/hsqldb/jdbc/jdbcBlob.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcBlob.java
|
||||
@@ -461,8 +461,6 @@
|
||||
data = newData;
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public void free() throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -472,9 +470,6 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
|
||||
// public static void main(String[] args) throws Exception {
|
||||
//
|
||||
--- src/org/hsqldb/jdbc/jdbcCallableStatement.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcCallableStatement.java
|
||||
@@ -36,13 +36,9 @@
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.CallableStatement;
|
||||
import java.sql.Date;
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
import java.sql.NClob;
|
||||
import java.sql.RowId;
|
||||
import java.sql.SQLXML;
|
||||
-*/
|
||||
-//#endif JAVA6
|
||||
import java.sql.Time;
|
||||
import java.sql.Timestamp;
|
||||
import java.sql.SQLException;
|
||||
@@ -3105,8 +3101,7 @@
|
||||
}
|
||||
|
||||
//#endif JAVA4
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
+
|
||||
public void setPoolable(boolean poolable) throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -3376,7 +3371,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcClob.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcClob.java
|
||||
@@ -463,8 +463,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public void free() throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -474,6 +472,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcConnection.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcConnection.java
|
||||
@@ -42,14 +42,9 @@
|
||||
import java.sql.Connection;
|
||||
import java.sql.DatabaseMetaData;
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
import java.sql.NClob;
|
||||
import java.sql.SQLClientInfoException;
|
||||
import java.sql.SQLXML;
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLWarning;
|
||||
@@ -2728,8 +2723,6 @@
|
||||
return i;
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public Clob createClob() throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -2794,7 +2787,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcDataSource.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcDataSource.java
|
||||
@@ -311,8 +311,6 @@
|
||||
this.user = user;
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -322,7 +320,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcDatabaseMetaData.java
|
||||
@@ -36,12 +36,7 @@
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.SQLException;
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
import java.sql.RowIdLifetime;
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
import org.hsqldb.Column;
|
||||
import org.hsqldb.Library;
|
||||
import org.hsqldb.Trace;
|
||||
@@ -5649,8 +5644,6 @@
|
||||
return schemaName;
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public RowIdLifetime getRowIdLifetime() throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -5694,7 +5687,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcParameterMetaData.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcParameterMetaData.java
|
||||
@@ -382,8 +382,6 @@
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -393,7 +391,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcPreparedStatement.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcPreparedStatement.java
|
||||
@@ -38,14 +38,9 @@
|
||||
import java.math.BigDecimal;
|
||||
import java.sql.Date;
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
import java.sql.NClob;
|
||||
import java.sql.RowId;
|
||||
import java.sql.SQLXML;
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
import java.sql.PreparedStatement;
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
@@ -2292,8 +2287,6 @@
|
||||
return sb.toString();
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public void setPoolable(boolean poolable) throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -2403,7 +2396,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcResultSet.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcResultSet.java
|
||||
@@ -75,14 +75,10 @@
|
||||
import java.sql.ResultSet;
|
||||
import java.sql.ResultSetMetaData;
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
import java.sql.RowId;
|
||||
import java.sql.NClob;
|
||||
import java.sql.SQLXML;
|
||||
-*/
|
||||
|
||||
-//#endif JAVA6
|
||||
import java.sql.SQLException;
|
||||
import java.sql.SQLWarning;
|
||||
import java.sql.Statement;
|
||||
@@ -5074,8 +5070,6 @@
|
||||
: true;
|
||||
}
|
||||
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public RowId getRowId(int columnIndex) throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -5325,7 +5319,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcResultSetMetaData.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcResultSetMetaData.java
|
||||
@@ -1144,8 +1144,6 @@
|
||||
String.valueOf(column));
|
||||
}
|
||||
}
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public <T> T unwrap(Class<T> iface) throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -1155,6 +1153,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-//#endif JAVA6
|
||||
}
|
||||
--- src/org/hsqldb/jdbc/jdbcStatement.java
|
||||
+++ src/org/hsqldb/jdbc/jdbcStatement.java
|
||||
@@ -1587,8 +1587,6 @@
|
||||
throw Util.sqlException(e);
|
||||
}
|
||||
}
|
||||
-//#ifdef JAVA6
|
||||
-/*
|
||||
public void setPoolable(boolean poolable) throws SQLException
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
@@ -1608,6 +1606,4 @@
|
||||
{
|
||||
throw new UnsupportedOperationException("Not supported yet.");
|
||||
}
|
||||
-*/
|
||||
-//#endif JAVA6
|
||||
}
|
514
hsqldb-1.8.0.10-suse-initscript.patch
Normal file
514
hsqldb-1.8.0.10-suse-initscript.patch
Normal file
@ -0,0 +1,514 @@
|
||||
--- bin/hsqldb
|
||||
+++ bin/hsqldb
|
||||
@@ -50,7 +50,7 @@
|
||||
### BEGIN INIT INFO
|
||||
# Provides: HSQLDB-Server
|
||||
# Required-Start: $syslog $remote_fs $network $named
|
||||
-# Required-Stop:
|
||||
+# Required-Stop: $syslog $remote_fs $network $named
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: HSQLDB-Server
|
||||
@@ -89,19 +89,69 @@
|
||||
|
||||
# -- blaine.simpson@admc.com
|
||||
|
||||
+# Shell functions sourced from /etc/rc.status:
|
||||
+# rc_check check and set local and overall rc status
|
||||
+# rc_status check and set local and overall rc status
|
||||
+# rc_status -v ditto but be verbose in local rc status
|
||||
+# rc_status -v -r ditto and clear the local rc status
|
||||
+# rc_failed set local and overall rc status to failed
|
||||
+# rc_failed <num> set local and overall rc status to <num><num>
|
||||
+# rc_reset clear local rc status (overall remains)
|
||||
+# rc_exit exit appropriate to overall rc status
|
||||
+. /etc/rc.status
|
||||
+
|
||||
+# First reset status of this service
|
||||
+rc_reset
|
||||
+
|
||||
+# Return values acc. to LSB for all commands but status:
|
||||
+# 0 - success
|
||||
+# 1 - generic or unspecified error
|
||||
+# 2 - invalid or excess argument(s)
|
||||
+# 3 - unimplemented feature (e.g. "reload")
|
||||
+# 4 - insufficient privilege
|
||||
+# 5 - program is not installed
|
||||
+# 6 - program is not configured
|
||||
+# 7 - program is not running
|
||||
+#
|
||||
+# Note that starting an already running service, stopping
|
||||
+# or restarting a not-running service as well as the restart
|
||||
+# with force-reload (in case signalling is not supported) are
|
||||
+# considered a success.
|
||||
+
|
||||
set +u
|
||||
|
||||
+NAME="$(basename $0)"
|
||||
+unset ISBOOT
|
||||
+if [ "${NAME:0:1}" = "S" -o "${NAME:0:1}" = "K" ]; then
|
||||
+ NAME="${NAME:3}"
|
||||
+ ISBOOT="1"
|
||||
+fi
|
||||
+
|
||||
+# remove SUSE's rc name
|
||||
+if [ "${NAME:0:2}" = "rc" ]; then
|
||||
+ NAME="${NAME:2}"
|
||||
+fi
|
||||
+
|
||||
+# For SELinux we need to use 'runuser' not 'su'
|
||||
+if [ -x "/sbin/runuser" ]; then
|
||||
+ SU="/sbin/runuser"
|
||||
+else
|
||||
+ SU="/bin/su"
|
||||
+fi
|
||||
+
|
||||
# This is only used for recursive invocations.
|
||||
# Will not necessarily be set correctly at system bootup invocations
|
||||
# (where it is sometimes invoked like "sh... /path/to/hsqldb start"),
|
||||
# but, in those cases there will be no recursion.
|
||||
INVOC_PATH=`dirname "$0"` || {
|
||||
echo "'dirname' failed" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -n "$INVOC_PATH" ] && INVOC_PATH="${INVOC_PATH}/"
|
||||
|
||||
-SYNTAX_MSG="SYNTAX: ${INVOC_PATH}hsqldb start|stop|stopcompact|restart|restartcmpacted|status"
|
||||
+SYNTAX_MSG="Usage: ${INVOC_PATH}/${NAME} start|stop|status|try-restart|restart|force-reload|reload|probe"
|
||||
|
||||
# You can override any of these default values in your config file:
|
||||
|
||||
@@ -112,7 +162,10 @@
|
||||
# process will exit.
|
||||
PIDCHECKER_FLAGFILE=`mktemp /tmp/hsqldb.XXXXXXXX`
|
||||
if [ x"$PIDCHECKER_FLAGFILE" = "x" ] ; then
|
||||
- echo "unable to create tmp file"; exit 1
|
||||
+ echo "unable to create tmp file"
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
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.
|
||||
@@ -168,25 +221,31 @@
|
||||
done
|
||||
[ -n "$CFGFILE" ] || {
|
||||
echo "No global config file found in any of allowed locations" 1>&2
|
||||
- exit 11
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
|
||||
# Sanity check
|
||||
[ -n "$LOGFILE" ] && [ -n "$PIDFILE" ] || {
|
||||
echo "Internal problem in init script" 1>&2
|
||||
- exit 11
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
|
||||
[ $# -eq 1 ] || {
|
||||
echo "$SYNTAX_MSG" 1>&2
|
||||
- exit 4
|
||||
+ exit 1
|
||||
}
|
||||
|
||||
# It would be nice to permit some uses, like "status" by non-root users,
|
||||
# but for now our goal is a superuser init script.
|
||||
[ -w / ] || { # Very portable, but perhaps not perfect, test for superuser.
|
||||
echo "Only 'root' may use this init script" 1>&2
|
||||
- exit 4
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
|
||||
# Use bsd-style enable/disable if it's in place.
|
||||
@@ -209,11 +268,15 @@
|
||||
|
||||
[ -r "$CFGFILE" ] || {
|
||||
echo "Unable to read config file '$CFGFILE'" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -f "$CFGFILE" ] || {
|
||||
echo "'$CFGFILE' is not a regular file" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
HSQLDB_OWNER=
|
||||
JAVA_EXECUTABLE=
|
||||
@@ -221,6 +284,28 @@
|
||||
SERVER_HOME=
|
||||
SHUTDOWN_URLIDS=
|
||||
. "$CFGFILE"
|
||||
+
|
||||
+[ -z "$JAVA_EXECUTABLE" ] && {
|
||||
+ # JPackage source Java config
|
||||
+ . /etc/java/java.conf
|
||||
+
|
||||
+ if [ -n "$JAVA_HOME" ]; then
|
||||
+ JAVA_EXECUTABLE=${JAVA_HOME}/bin/java
|
||||
+ else
|
||||
+ JAVA_EXECUTABLE=${JVM_ROOT}/java/bin/java
|
||||
+ fi
|
||||
+
|
||||
+ if [ -z "$JAVA_HOME" ]; then
|
||||
+ if [ -d "$JVM_ROOT/java" ]; then
|
||||
+ JAVA_EXECUTABLE=$JVM_ROOT/java/bin/java
|
||||
+ else
|
||||
+ JAVA_EXECUTABLE=$JVM_ROOT/jre/bin/java
|
||||
+ fi
|
||||
+ else
|
||||
+ JAVA_EXECUTABLE=$JAVA_HOME/bin/java
|
||||
+ fi
|
||||
+}
|
||||
+
|
||||
# Suffix delimiter to $SERVER_ADDL_CLASSPATH, if it is set.
|
||||
[ -n "$SERVER_ADDL_CLASSPATH" ] &&
|
||||
SERVER_ADDL_CLASSPATH="${SERVER_ADDL_CLASSPATH}:"
|
||||
@@ -229,15 +314,21 @@
|
||||
[ -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
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -d "$SERVER_HOME" ] || {
|
||||
echo "SERVER_HOME variable in '$CFGFILE' is set to a non-directory." 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -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
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
|
||||
# PROPERTY_FILE is a derived value.
|
||||
@@ -246,27 +337,38 @@
|
||||
WebServer) PROPERTY_FILE="$SERVER_HOME"/webserver.properties;;
|
||||
*)
|
||||
echo 'Unsupported value for $TARGET_CLASS: '"$TARGET_CLASS" 1>&2
|
||||
- exit 2;;
|
||||
+ rc_failed 2
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
+ ;;
|
||||
esac
|
||||
[ -f "$PROPERTY_FILE" ] || {
|
||||
echo "'$PROPERTY_FILE' is missing" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -r "$PROPERTY_FILE" ] || {
|
||||
echo "'$PROPERTY_FILE' isn't readable" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -r "$HSQLDB_JAR_PATH" ] || {
|
||||
echo "'$HSQLDB_JAR_PATH' isn't readable" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -x "$JAVA_EXECUTABLE" ] || {
|
||||
echo "No Java executable found at '$JAVA_EXECUTABLE'" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
|
||||
-# "chown" lives here on some UNIXes.
|
||||
-PATH="$PATH:/usr/sbin"
|
||||
+# "chown" lives in /usr on some UNIXes.
|
||||
+PATH="/bin:/sbin:/usr/sbin"
|
||||
|
||||
# Make a good effort (but not bullet-proof) check on permissions of the
|
||||
# auth file. Unfortunately, if auth-file is not specified, this depends
|
||||
@@ -279,15 +381,21 @@
|
||||
[ -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
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -r "$_AUTH_TEST_PATH" ] || {
|
||||
echo "Auth file '$_AUTH_TEST_PATH' not readable" 1>&2
|
||||
- exit 2
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
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
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
fi
|
||||
|
||||
@@ -296,29 +404,37 @@
|
||||
[ -r "$PIDFILE" ] && {
|
||||
[ -f "$PIDFILE" ] || {
|
||||
echo "'$PIDFILE' is not a regular file" 1>&2
|
||||
- exit 6
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
[ -w "$PIDFILE" ] || {
|
||||
echo "'$PIDFILE' is not writable" 1>&2
|
||||
- exit 6
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
HSQLDB_PID="`cat $PIDFILE`" || {
|
||||
echo "Failed to read pid file '$PIDFILE'" 1>&2
|
||||
- exit 6
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
case "$HSQLDB_PID" in
|
||||
*[a-zA-Z/!@#$%*+=_~]*) HSQLDB_PID=;;
|
||||
*'^'*) HSQLDB_PID=;;
|
||||
esac
|
||||
[ -n "$HSQLDB_PID" ] || {
|
||||
- echo "Pid file '$PIDFILE' does not contain a valid process identifier" 1>&2
|
||||
- exit 6
|
||||
+ rc_failed 7
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
kill -0 "$HSQLDB_PID" > /dev/null 2>&1 || {
|
||||
echo 'Removing stale pid file'
|
||||
rm -f "$PIDFILE" || {
|
||||
- echo "Failed to remove pid file '$PIDFILE'" 1>&2
|
||||
- exit 6
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
HSQLDB_PID=
|
||||
}
|
||||
@@ -329,7 +445,9 @@
|
||||
status)
|
||||
[ -n "$HSQLDB_PID" ] || {
|
||||
echo "I don't know of any running hsqldb server."
|
||||
- exit 0
|
||||
+ rc_failed 7
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
echo "There is an hsqldb server loaded from $HSQLDB_JAR_PATH
|
||||
running with pid $HSQLDB_PID."
|
||||
@@ -348,32 +466,42 @@
|
||||
"-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \
|
||||
"-Dsqltoolsprayer.monfile=$PIDFILE" \
|
||||
org.hsqldb.util.SqlToolSprayer '--;'
|
||||
+ rc_failed 0
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
;;
|
||||
start)
|
||||
[ -n "$HSQLDB_PID" ] && {
|
||||
echo "There is already a hsqldb server running with pid $HSQLDB_PID." 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 0
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
TLS_SWITCHES=
|
||||
[ -n "$TLS_KEYSTORE" ] &&
|
||||
TLS_SWITCHES="-Djavax.net.ssl.keyStore=$TLS_KEYSTORE -Djavax.net.ssl.keyStorePassword=$TLS_PASSWORD"
|
||||
if [ -n "$HSQLDB_OWNER" ]; then
|
||||
touch "$PIDFILE" || {
|
||||
- echo "Failed to create pid file" 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
chown "$HSQLDB_OWNER" "$PIDFILE" || {
|
||||
echo "Failed to chown pid file to '$HSQLDB_OWNER'" 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
# 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 &
|
||||
+ /usr/bin/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 &
|
||||
else
|
||||
cd "$SERVER_HOME" || {
|
||||
echo "Failed to cd to '$SERVER_HOME'" 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
export JAVA_EXECUTABLE
|
||||
export HSQLDB_JAR_PATH
|
||||
@@ -382,10 +510,12 @@
|
||||
export SERVER_JVMARGS
|
||||
export TARGET_CLASS
|
||||
export INVOC_ADDL_ARGS
|
||||
- nohup sh -c '
|
||||
+ /usr/bin/nohup sh -c '
|
||||
echo $$ > "$PIDFILE" || {
|
||||
echo "Failed to write pid to pid file" 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
eval 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 &
|
||||
@@ -404,7 +534,9 @@
|
||||
# but regardless of why, the pid file does not contain a valid pid.
|
||||
touch "$PIDCHECKER_FLAGFILE" || {
|
||||
echo "Failed to touch file '$PIDCHECKER_FLAGFILE'" 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
export PIDCHECKER_FLAGFILE
|
||||
export PIDFILE
|
||||
@@ -414,7 +546,9 @@
|
||||
[ -f "$PIDCHECKER_FLAGFILE" ] || exit 0
|
||||
kill -0 "`cat $PIDFILE`" > /dev/null 2>&1 || {
|
||||
rm -f "$PIDFILE" "$PIDCHECKER_FLAGFILE"
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
sleep 1
|
||||
done
|
||||
@@ -426,18 +560,24 @@
|
||||
org.hsqldb.util.SqlToolSprayer '--;' && {
|
||||
rm -f "$PIDCHECKER_FLAGFILE"
|
||||
echo "org.hsqldb.$TARGET_CLASS started with pid `cat $PIDFILE`"
|
||||
- exit 0
|
||||
+ rc_failed 0
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
rm -f "$PIDCHECKER_FLAGFILE"
|
||||
echo "Failed to start org.hsqldb.$TARGET_CLASS.
|
||||
See log file '$LOGFILE'." 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
;;
|
||||
stop|stopcompact)
|
||||
[ "$COMMAND" = stopcompact ] && SHUTDOWN_OPTION='compact'
|
||||
[ -n "$HSQLDB_PID" ] || {
|
||||
echo "I don't know of any running hsqldb server." 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 7
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
AUTH_FILE_SWITCH=
|
||||
# N.b., there will be a problem if there are special characters or
|
||||
@@ -455,23 +595,64 @@
|
||||
sleep $MAX_TERMINATE_SECS # Give the JVM a sec. or 2 to fully exit.
|
||||
kill -0 "$HSQLDB_PID" > /dev/null 2>&1 && {
|
||||
echo "WARNING: hsqldb is still running!" 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
rm -f "$PIDFILE" || {
|
||||
echo "Failed to remove pid file '$PIDFILE'" 1>&2
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
echo "Successful shutdown ${SHUTDOWN_OPTION} (for the $TARGET_CLASS process)!"
|
||||
- exit 0
|
||||
+ rc_failed 0
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
;;
|
||||
restart|restartcompacted)
|
||||
STOP_COMMAND=stop
|
||||
[ "$COMMAND" = restartcompacted ] && STOP_COMMAND=stopcompact
|
||||
- "${INVOC_PATH}"hsqldb $STOP_COMMAND || exit $?
|
||||
+ "${INVOC_PATH}"hsqldb $STOP_COMMAND || {
|
||||
+ rc_failed $?
|
||||
+ rc_status -s
|
||||
+ rc_exit
|
||||
+ }
|
||||
exec "${INVOC_PATH}"/hsqldb start
|
||||
+ rc_failed $?
|
||||
+ rc_status -s
|
||||
+ rc_exit
|
||||
;;
|
||||
+ try-restart)
|
||||
+ ## Stop the service and if this succeeds (i.e. the
|
||||
+ ## service was running before), start it again.
|
||||
+ ## Note: try-restart is not (yet) part of LSB (as of 0.7.5)
|
||||
+ $0 status >/dev/null && $0 restart
|
||||
+
|
||||
+ # Remember status and be quiet
|
||||
+ rc_status
|
||||
+ ;;
|
||||
+ force-reload)
|
||||
+ ## Signal the daemon to reload its config. Most daemons
|
||||
+ ## do this on signal 1 (SIGHUP).
|
||||
+ ## If it does not support it, restart.
|
||||
+
|
||||
+ echo -n "Reload service hsqldb"
|
||||
+ ## if it supports it:
|
||||
+ #killproc -HUP $TOMCAT_BIN
|
||||
+ #touch /var/run/FOO.pid
|
||||
+ #rc_status -v
|
||||
+
|
||||
+ ## Otherwise:
|
||||
+ $0 stop && $0 start
|
||||
+ rc_status
|
||||
+ ;;
|
||||
+ reload|probe)
|
||||
+ rc_failed 3
|
||||
+ rc_status -v
|
||||
+ ;;
|
||||
*)
|
||||
echo "$SYNTAX_MSG" 1>&2
|
||||
- exit 5
|
||||
+ exit 1
|
||||
;;
|
||||
esac
|
3
hsqldb-1.8.0.10.tar.bz2
Normal file
3
hsqldb-1.8.0.10.tar.bz2
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:54cd289ab0839146b2c833b7d5e9c79f3f8c63e4bd63f79c94555326d4a652ea
|
||||
size 2536458
|
11
hsqldb-1.8.0.8-should-stop.patch
Normal file
11
hsqldb-1.8.0.8-should-stop.patch
Normal file
@ -0,0 +1,11 @@
|
||||
--- bin/hsqldb
|
||||
+++ bin/hsqldb
|
||||
@@ -50,7 +50,7 @@
|
||||
### BEGIN INIT INFO
|
||||
# Provides: HSQLDB-Server
|
||||
# Required-Start: $syslog $remote_fs $network $named
|
||||
-# Required-Stop:
|
||||
+# Required-Stop: $syslog $remote_fs $network $named
|
||||
# Default-Start: 3 5
|
||||
# Default-Stop: 0 1 2 6
|
||||
# Short-Description: HSQLDB-Server
|
15
hsqldb-component-info.xml
Normal file
15
hsqldb-component-info.xml
Normal file
@ -0,0 +1,15 @@
|
||||
<project name="hsqldb-component-info">
|
||||
<component id="hsqldb"
|
||||
version="@VERSION@"
|
||||
licenseType="hsqldb"
|
||||
projectHome="http://hsqldb.org/"
|
||||
description="Java relational database engine supporting a subset of ANSI-92 SQL plus SQL 99 and 2003 enhancements (with fix for CVE-2007-4576)"
|
||||
scm=":ext:cvs.devel.redhat.com:/cvs/dist/hsqldb"
|
||||
tag="@TAG@">
|
||||
<!-- Built using JDK 1.4 -->
|
||||
<artifact id="hsqldb.jar"/>
|
||||
<export>
|
||||
<include input="hsqldb.jar"/>
|
||||
</export>
|
||||
</component>
|
||||
</project>
|
14
hsqldb-tmp.patch
Normal file
14
hsqldb-tmp.patch
Normal file
@ -0,0 +1,14 @@
|
||||
--- hsqldb/bin/hsqldb
|
||||
+++ hsqldb/bin/hsqldb
|
||||
@@ -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
|
5
hsqldb.changes
Normal file
5
hsqldb.changes
Normal file
@ -0,0 +1,5 @@
|
||||
-------------------------------------------------------------------
|
||||
Wed May 13 09:11:43 CEST 2009 - mvyskocil@suse.cz
|
||||
|
||||
- Initial SUSE packaging od hsqldb 1.8.0.10 from jpackage.org
|
||||
|
305
hsqldb.spec
Normal file
305
hsqldb.spec
Normal file
@ -0,0 +1,305 @@
|
||||
#
|
||||
# spec file for package hsqldb (Version 1.8.0.10)
|
||||
#
|
||||
# Copyright (c) 2009 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
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via http://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define reltag patch01
|
||||
|
||||
Name: hsqldb
|
||||
Version: 1.8.0.10
|
||||
Release: 2
|
||||
Summary: Hsqldb Database Engine
|
||||
Group: Development/Libraries/Java
|
||||
License: BSD 3-Clause
|
||||
Url: http://hsqldb.sourceforge.net/
|
||||
# http://downloads.sourceforge.net/hsqldb/hsqldb_1_8_0_10.zip
|
||||
# unzip -q hsqldb_1_8_0_10.zip
|
||||
# tar -cjf hsqldb-%{version}.tar.bz2 hsqldb/
|
||||
Source0: %{name}-%{version}.tar.bz2
|
||||
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: hsqldb-component-info.xml
|
||||
Patch0: %{name}-1.8.0-scripts.patch
|
||||
Patch1: hsqldb-tmp.patch
|
||||
# Obsoleted by 1.8.0.10
|
||||
#Patch2: hsqldb-1.8.0.8-backport.patch
|
||||
Patch3: hsqldb-1.8.0.10-java6.patch
|
||||
Patch1000: hsqldb-1.8.0.10-suse-initscript.patch
|
||||
PreReq: servletapi5
|
||||
PreReq: pwdutils
|
||||
Requires(post): /bin/rm,/bin/ln
|
||||
Requires(preun):/bin/rm
|
||||
BuildRequires: ant
|
||||
BuildRequires: junit
|
||||
BuildRequires: jpackage-utils >= 1.5
|
||||
BuildRequires: servletapi5
|
||||
BuildRequires: unzip
|
||||
BuildRequires: fdupes
|
||||
PreReq: %fillup_prereq
|
||||
BuildArch: noarch
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
|
||||
%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
|
||||
License: BSD 3-Clause
|
||||
Summary: Hsqldb Database Engine
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%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!
|
||||
|
||||
|
||||
|
||||
%package javadoc
|
||||
License: BSD 3-Clause
|
||||
Summary: Hsqldb Database Engine
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%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!
|
||||
|
||||
|
||||
|
||||
%package demo
|
||||
License: BSD 3-Clause
|
||||
Summary: Hsqldb Database Engine
|
||||
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!
|
||||
|
||||
|
||||
|
||||
%prep
|
||||
%setup -q -n %{name}
|
||||
perl -pi -e 's/\r$//g' doc/*.txt doc/src/hsqldbstylesheet.css
|
||||
# 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 -p0
|
||||
%patch1 -p1
|
||||
if [[ $(readlink -f ${JAVA_HOME} | grep '1\.6\.0') ]]; then
|
||||
%patch3 -b .java6-compatibility
|
||||
fi
|
||||
%patch1000 -b .suse-initscript
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath \
|
||||
jsse/jsse \
|
||||
jsse/jnet \
|
||||
jsse/jcert \
|
||||
jdbc-stdext \
|
||||
servletapi5 \
|
||||
junit)
|
||||
export OPT_JAR_LIST=:
|
||||
pushd build
|
||||
ant -Dant.build.javac.source=1.5 -Dant.build.javac.target=1.5 jar javadoc
|
||||
popd
|
||||
|
||||
%install
|
||||
# jar
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -m 644 lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}-%{version}.jar
|
||||
(cd $RPM_BUILD_ROOT%{_javadir} && for jar in *-%{version}.jar; do ln -sf ${jar} ${jar/-%{version}/}; done)
|
||||
# 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}
|
||||
# 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 -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
|
||||
# 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
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
cp -r doc/src/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version}
|
||||
ln -s %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
# FIXME: (dwalluck): breaks --short-circuit
|
||||
rm -rf doc/src
|
||||
# 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}
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
|
||||
%pre
|
||||
# Add the "hsqldb" user and group
|
||||
# we need a shell to be able to use su - later
|
||||
if [ `getent group %{name}` ]; then
|
||||
: OK group hsqldb already present
|
||||
else
|
||||
%{_sbindir}/groupadd -r %{name} 2> /dev/null || :
|
||||
fi
|
||||
if [ `getent passwd %{name}` ]; then
|
||||
: OK user hsqldb already present
|
||||
else
|
||||
%{_sbindir}/useradd -r -g %{name} -c "Hsqldb" -s /bin/false \
|
||||
-d %{_localstatedir}/lib/%{name} -o %{name} 2> /dev/null || :
|
||||
fi
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv %{name}}
|
||||
rm -f %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
|
||||
rm -f %{_localstatedir}/lib/%{name}/lib/servlet.jar
|
||||
(cd %{_localstatedir}/lib/%{name}/lib
|
||||
ln -s $(build-classpath hsqldb) hsqldb.jar
|
||||
ln -s $(build-classpath servletapi5) servlet.jar
|
||||
) 2>/dev/null || :
|
||||
|
||||
%postun
|
||||
%restart_on_update %{name}
|
||||
%insserv_cleanup
|
||||
|
||||
%preun
|
||||
if [ "$1" = "0" ]; then
|
||||
rm -f %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
|
||||
rm -f %{_localstatedir}/lib/%{name}/lib/servlet.jar
|
||||
#%{_sbindir}/userdel %{name} >> /dev/null 2>&1 || :
|
||||
#%{_sbindir}/groupdel %{name} >> /dev/null 2>&1 || :
|
||||
fi
|
||||
%stop_on_removal %{name}
|
||||
|
||||
%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(0755,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/data
|
||||
%{_localstatedir}/lib/%{name}/lib
|
||||
%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 %{_sysconfdir}/%{name}.conf
|
||||
|
||||
%files manual
|
||||
%defattr(0644,root,root,0755)
|
||||
%doc %{_docdir}/%{name}-%{version}
|
||||
|
||||
%files javadoc
|
||||
%defattr(0644,root,root,0755)
|
||||
%{_javadocdir}/%{name}-%{version}
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%files demo
|
||||
%defattr(-,root,root,0755)
|
||||
%{_datadir}/%{name}
|
||||
|
||||
%changelog
|
||||
* Wed May 13 2009 mvyskocil@suse.cz
|
||||
- Initial SUSE packaging od hsqldb 1.8.0.10 from jpackage.org
|
Loading…
Reference in New Issue
Block a user