update to 2.5.0 [release 2.5.0-1mamba;Thu Oct 03 2019]

This commit is contained in:
Silvan Calarco 2024-01-06 00:04:24 +01:00
parent 5a6ca94c30
commit e047a2ff89
15 changed files with 13 additions and 771 deletions

View File

@ -1,22 +0,0 @@
<project>
<modelVersion>4.0.0</modelVersion>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<packaging>jar</packaging>
<name>HSQLDB</name>
<version>1.8.0.10</version>
<url>http://hsqldb.org/</url>
<description>Lightweight 100% Java SQL Database Engine</description>
<licenses>
<license>
<name>HSQLDB License</name>
<url>http://hsqldb.org/web/hsqlLicense.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<scm>
<url>http://sourceforge.net/cvs/?group_id=23316</url>
</scm>
<dependencies>
</dependencies>
</project>

View File

@ -1,24 +0,0 @@
--- hsqldb/bin/hsqldb 2009-06-01 18:43:14.000000000 +0200
+++ hsqldb/bin/hsqldb-gil 2009-06-01 18:46:12.000000000 +0200
@@ -189,21 +189,6 @@
exit 4
}
-# Use bsd-style enable/disable if it's in place.
-BSDCFG=
-[ -r /etc/rc.conf ] && [ -f /etc/rc.conf ] && {
- . /etc/rc.conf
- BSDCFG=1
-}
-[ -r /etc/rc.conf.local ] && [ -f /etc/rc.conf.local ] && {
- . /etc/rc.conf.local
- BSDCFG=1
-}
-[ -n "$BSDCFG" ] && {
- case "$hsqldb_enable" in [Yy][Ee][Ss]);; [Oo][Nn]);; [Tt][Rr][Uu][Ee]);;
- *) exit 0;; # Don't run if not enabled for BSD startup
- esac
-}
COMMAND="$1"; shift

View File

@ -1,15 +0,0 @@
<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>

View File

@ -1,11 +0,0 @@
--- src/org/hsqldb/Library.java 2006-07-17 00:29:33.000000000 +0200
+++ src/org/hsqldb/Library.java-gil 2011-01-29 09:18:08.000000000 +0100
@@ -1957,7 +1957,7 @@
functionMap.put("bitand", bitand);
functionMap.put("bitlength", bitLength);
functionMap.put("bitor", bitor);
- functionMap.put("bitxor", bitor);
+ functionMap.put("bitxor", bitxor);
functionMap.put("character", character);
functionMap.put("concat", concat);
functionMap.put("cot", cot);

View File

@ -1,29 +0,0 @@
diff -Nru hsqldb/src/org/hsqldb/Table.java hsqldb-gil/src/org/hsqldb/Table.java
--- hsqldb/src/org/hsqldb/Table.java 2007-10-19 23:59:07.000000000 +0200
+++ hsqldb-gil/src/org/hsqldb/Table.java 2011-01-29 09:29:24.000000000 +0100
@@ -149,10 +149,10 @@
Constraint[] constraintList; // constrainst for the table
HsqlArrayList[] triggerLists; // array of trigger lists
private int[] colTypes; // fredt - types of columns
- private int[] colSizes; // fredt - copy of SIZE values for columns
+ int[] colSizes; // fredt - copy of SIZE values for columns
private int[] colScales; // fredt - copy of SCALE values for columns
private boolean[] colNullable; // fredt - modified copy of isNullable() values
- private Expression[] colDefaults; // fredt - expressions of DEFAULT values
+ Expression[] colDefaults; // fredt - expressions of DEFAULT values
private int[] defaultColumnMap; // fred - holding 0,1,2,3,...
private boolean hasDefaultValues; //fredt - shortcut for above
boolean sqlEnforceSize; // inherited from the database -
diff -Nru hsqldb/src/org/hsqldb/TableWorks.java hsqldb-gil/src/org/hsqldb/TableWorks.java
--- hsqldb/src/org/hsqldb/TableWorks.java 2007-01-14 06:48:16.000000000 +0100
+++ hsqldb-gil/src/org/hsqldb/TableWorks.java 2011-01-29 09:31:11.000000000 +0100
@@ -670,7 +670,8 @@
// default expressions can change
oldCol.setType(newCol);
oldCol.setDefaultExpression(newCol.getDefaultExpression());
- table.setColumnTypeVars(colIndex);
+ table.colSizes[colIndex] = oldCol.getSize();
+ table.colDefaults[colIndex] = oldCol.getDefaultExpression();
table.resetDefaultsFlag();
return;

View File

@ -1,91 +0,0 @@
--- src/org/hsqldb/Expression.java 2010-06-23 14:49:25.000000000 +0200
+++ src/org/hsqldb/Expression.java-gil 2011-01-29 09:04:33.000000000 +0100
@@ -808,11 +808,12 @@
case EXISTS :
buf.append(' ').append(Token.T_EXISTS).append(' ');
- break;
+
+ return buf.toString();
case COUNT :
buf.append(' ').append(Token.T_COUNT).append('(');
- break;
+ if ( "(*)".equals(left))buf.append('*');else buf.append(left); buf.append(')'); return buf.toString();
case SUM :
buf.append(' ').append(Token.T_SUM).append('(');
@@ -822,47 +823,47 @@
case MIN :
buf.append(' ').append(Token.T_MIN).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case MAX :
buf.append(' ').append(Token.T_MAX).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case AVG :
buf.append(' ').append(Token.T_AVG).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case EVERY :
buf.append(' ').append(Token.T_EVERY).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case SOME :
buf.append(' ').append(Token.T_SOME).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case STDDEV_POP :
buf.append(' ').append(Token.T_STDDEV_POP).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case STDDEV_SAMP :
buf.append(' ').append(Token.T_STDDEV_SAMP).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case VAR_POP :
buf.append(' ').append(Token.T_VAR_POP).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
case VAR_SAMP :
buf.append(' ').append(Token.T_VAR_SAMP).append('(');
buf.append(left).append(')');
- break;
+ return buf.toString();
}
throw Trace.error(Trace.EXPRESSION_NOT_SUPPORTED);
@@ -1527,6 +1528,16 @@
if (exprType == COLUMN) {
return columnName;
}
+ if ( isAggregate(exprType) )
+ {
+ try
+ {
+ return getDDL();
+ }
+ catch(Exception e)
+ {
+ }
+ }
return "";
}

View File

@ -1,10 +0,0 @@
--- src/org/hsqldb/persist/HsqlDatabaseProperties.java 2008-03-17 17:05:41.000000000 +0100
+++ src/org/hsqldb/persist/HsqlDatabaseProperties.java-gil 2011-01-29 09:15:02.000000000 +0100
@@ -429,6 +429,7 @@
setProperty(hsqldb_log_size, 10);
setProperty(sql_enforce_strict_size, true);
setProperty(hsqldb_nio_data_file, false);
+ setProperty(hsqldb_lock_file, true);
}
// OOo end

View File

@ -1,20 +0,0 @@
--- hsqldb/bin/runUtil.sh 2004-07-15 19:48:51.000000000 +0200
+++ hsqldb/bin/runUtil.sh-gil 2009-06-01 18:13:03.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

View File

@ -1,37 +0,0 @@
--- bin/hsqldb 2011-01-29 09:05:58.000000000 +0100
+++ bin/hsqldb-gil 2011-01-29 09:04:33.000000000 +0100
@@ -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
@@ -354,7 +353,7 @@
# 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
@@ -449,7 +448,7 @@
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 $?

View File

@ -1,21 +0,0 @@
# 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

View File

@ -1,98 +0,0 @@
# $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
###########################################################################

View File

@ -1,13 +0,0 @@
# 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

View File

@ -1,129 +0,0 @@
# $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
# 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=\"\"

View File

@ -1,14 +0,0 @@
--- hsqldb/bin/hsqldb 2007-08-30 09:37:02.000000000 +0200
+++ hsqldb/bin/hsqldb-gil 2009-06-01 18:18:35.000000000 +0200
@@ -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

View File

@ -1,50 +1,19 @@
%define pkgver %(echo %version|tr . _)
%define majver %(echo %pkgver | cut -d_ -f 1-3)
%define with_gcj 1
%define dirver %(echo %version | cut -d. -f 1-2 | tr . _)
Name: java-hsqldb
Version: 1.8.0.10
Release: 3mamba
Version: 2.5.0
Release: 1mamba
Summary: Lightweight 100% Java SQL Database Engine
Group: Applications/Databases
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco@mambasoft.it>
URL: http://hsqldb.org
Source0: http://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_%{majver}/hsqldb_%{pkgver}.zip
Source1: java-hsqldb-1.8.0.10-standard.cfg
Source2: java-hsqldb-1.8.0.10-standard-server.properties
Source3: java-hsqldb-1.8.0.10-standard-webserver.properties
Source4: java-hsqldb-1.8.0.10-standard-sqltool.rc
Source5: java-hsqldb-1.8.0.10-component-info.xml
Source6: http://mirrors.ibiblio.org/pub/mirrors/maven2/hsqldb/hsqldb/%{version}/hsqldb-%{version}.pom
Patch0: java-hsqldb-1.8.0.10-scripts.patch
Patch1: java-hsqldb-1.8.0.10-tmp.patch
Patch2: java-hsqldb-1.8.0.10-alt-init.patch
Patch3: java-hsqldb-1.8.0.10-specify-su-shell.patch
Patch4: java-hsqldb-1.8.0.10-libreoffice-i96823.patch
Patch5: java-hsqldb-1.8.0.10-libreoffice-i97032.patch
Patch6: java-hsqldb-1.8.0.10-libreoffice-i103528.patch
Patch7: java-hsqldb-1.8.0.10-libreoffice-i104901.patch
Source0: https://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_%{dirver}/hsqldb-%{version}.zip
#Source0: http://sourceforge.net/projects/hsqldb/files/hsqldb/hsqldb_%{majver}/hsqldb_%{pkgver}.zip
License: BSD
## AUTOBUILDREQ-BEGIN
BuildRequires: glibc-devel
BuildRequires: java-gcj-compat
BuildRequires: libgcc
BuildRequires: libgcj4-devel
BuildRequires: libz-devel
## AUTOBUILDREQ-END
BuildRequires: apache-ant
%if "%{stage1}" != "1"
BuildRequires: apache-tomcat5-servletapi5
%endif
BuildRequires: java-junit3
BuildRequires: jpackage-utils
%if "%{stage1}" != "1"
Requires: apache-tomcat5-servletapi5
%endif
Requires: coreutils
Requires: initscripts
Requires: shadow-common
Obsoletes: hsqldb
Provides: hsqldb
BuildRoot: %{_tmppath}/%{name}-%{version}-root
@ -52,223 +21,30 @@ BuildRoot: %{_tmppath}/%{name}-%{version}-root
%description
HSQLDB is a relational database engine written in Java, with a JDBC driver, supporting a large subset of ANSI-92 SQL. A small, fast engine with both in memory and disk based tables. This product is the continuation of HypersonicSQL. Active since 2001.
%package demo
Group: Documentation
Summary: Demo for %{name}
Requires: %{name} = %{version}-%{release}
%description demo
HSQLDB is a relational database engine written in Java, with a JDBC driver, supporting a large subset of ANSI-92 SQL. A small, fast engine with both in memory and disk based tables. This product is the continuation of HypersonicSQL. Active since 2001.
This package contains demonstrations and samples for %{name}.
%package javadoc
Group: Documentation
Summary: Javadoc for %{name}
%description javadoc
HSQLDB is a relational database engine written in Java, with a JDBC driver, supporting a large subset of ANSI-92 SQL. A small, fast engine with both in memory and disk based tables. This product is the continuation of HypersonicSQL. Active since 2001.
This package contains javadoc for %{name}.
%package manual
Group: Documentation
Summary: Manual for %{name}
%description manual
HSQLDB is a relational database engine written in Java, with a JDBC driver, supporting a large subset of ANSI-92 SQL. A small, fast engine with both in memory and disk based tables. This product is the continuation of HypersonicSQL. Active since 2001.
This package contains documentation for %{name}.
%if %with_gcj
%package gcj
Group: System/Libraries/Java
Summary: GCJ support for %{name}
Requires: java-gcj-compat
%description gcj
Lightweight 100% Java SQL Database Engine.
This package contains GCJ support for %{name}.
%endif
%prep
%setup -q -n hsqldb
for j in $(find . -name "*.jar"); do
mv $j $j.no
done
for j in $(find . -name "*.sh"); do
chmod 755 $j
done
for dir in $(find . -name _notes); do
rm -rf $dir
done
for dir in $(find . -name "*.class"); do
rm -rf $dir
done
for dir in $(find . -name "*.war"); do
rm -rf $dir
done
find . -type f -name '*.css' -o -name '*.html' -o -name '*.txt' | xargs -t perl -pi -e 's/\r$//g'
chmod -R go=u-w *
cp %{SOURCE6} pom.xml
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p0
%patch4 -p0
%patch5 -p0
%patch6 -p0
%patch7 -p1
%setup -q -c
unzip -o %{SOURCE0}
mv hsqldb-%{version}/* .
%build
export JAVA_HOME=%{_jvmdir}/jdk
%if "%{stage1}" != "1"
export CLASSPATH=$(build-classpath servletapi5 junit-3.8.2):$JAVA_HOME/jre/lib/jsse.jar:$JAVA_HOME/jre/lib/rt.jar
%else
mv lib/servlet.jar.no lib/servlet.jar
export CLASSPATH=$(build-classpath junit-3.8.2):$JAVA_HOME/jre/lib/jsse.jar:$JAVA_HOME/jre/lib/rt.jar
%endif
pushd build
ant jar javadoc
popd
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
mkdir -p %{buildroot}%{_javadir}
install -pm 755 lib/hsqldb.jar %{buildroot}%{_javadir}/hsqldb-%{version}.jar
(
cd %{buildroot}%{_javadir}
for jar in *-%{version}.jar; do
ln -sf ${jar} ${jar/-%{version}/}
done
)
mkdir -p %{buildroot}%{_bindir}
install -m 755 bin/runUtil.sh %{buildroot}%{_bindir}/RunUtil
mkdir -p %{buildroot}%{_initrddir}
install -m 755 bin/hsqldb %{buildroot}%{_initrddir}/hsqldb
mkdir -p %{buildroot}%{_sysconfdir}/sysconfig
install -m 644 %{SOURCE1} %{buildroot}%{_sysconfdir}/sysconfig/hsqldb
mkdir -p %{buildroot}%{_localstatedir}/lib/hsqldb
install -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/lib/hsqldb/server.properties
install -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/lib/hsqldb/webserver.properties
install -m 600 %{SOURCE4} %{buildroot}%{_localstatedir}/lib/hsqldb/sqltool.rc
mkdir -p %{buildroot}%{_localstatedir}/lib/hsqldb/lib
install -m 644 lib/functions %{buildroot}%{_localstatedir}/lib/hsqldb/lib
pushd %{buildroot}%{_localstatedir}/lib/hsqldb/lib
ln -s %{_javadir}/hsqldb-%{version}.jar hsqldb.jar
ln -s $(build-classpath servletapi5) servlet.jar
popd
mkdir -p %{buildroot}%{_localstatedir}/lib/hsqldb/data
mkdir -p %{buildroot}%{_datadir}/hsqldb/demo
install -m 755 demo/*.sh %{buildroot}%{_datadir}/hsqldb/demo
install -m 644 demo/*.html %{buildroot}%{_datadir}/hsqldb/demo
mkdir -p %{buildroot}%{_javadocdir}/hsqldb-%{version}
cp -r doc/src/* %{buildroot}%{_javadocdir}/hsqldb-%{version}
ln -s hsqldb-%{version} %{buildroot}%{_javadocdir}/hsqldb
rm -rf doc/src
mkdir -p %{buildroot}%{_mavenpomdir}
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-hsqldb.pom
%add_to_maven_depmap nhsqldb hsqldb %{version} JPP hsqldb
%if %with_gcj
%{_bindir}/aot-compile-rpm
%endif
install -D -m0644 hsqldb/lib/hsqldb.jar %{buildroot}%{_javadir}/hsqldb-%{version}.jar
ln -s hsqldb-%{version}.jar %{buildroot}%{_javadir}/hsqldb.jar
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%preun
if [ $1 = 0 ] ; then
/sbin/service hsqldb stop >/dev/null 2>&1
/sbin/chkconfig --del hsqldb
fi
%pre
%{_sbindir}/groupadd -g 96 -f -r hsqldb 2> /dev/null || :
%{_sbindir}/useradd -u 96 -g hsqldb -s /sbin/nologin \
-d %{_localstatedir}/lib/hsqldb -r hsqldb 2> /dev/null || :
%post
/sbin/chkconfig --add hsqldb
%update_maven_depmap
%postun
%update_maven_depmap
%files
%defattr(-,root,root)
%config(noreplace) %attr(644,root,root) %{_sysconfdir}/sysconfig/hsqldb
%attr(755,root,root) %{_initrddir}/hsqldb
%{_bindir}/RunUtil
%dir %{_localstatedir}/lib/hsqldb
%dir %{_localstatedir}/lib/hsqldb/lib
%{_localstatedir}/lib/hsqldb/lib/hsqldb.jar
%{_localstatedir}/lib/hsqldb/lib/servlet.jar
%attr(644,root,root) %{_localstatedir}/lib/hsqldb/lib/functions
%attr(644,root,root) %{_localstatedir}/lib/hsqldb/server.properties
%attr(644,root,root) %{_localstatedir}/lib/hsqldb/webserver.properties
%attr(600,hsqldb,hsqldb) %{_localstatedir}/lib/hsqldb/sqltool.rc
%dir %attr(755,hsqldb,hsqldb) %{_localstatedir}/lib/hsqldb/data
%{_javadir}/hsqldb-%{version}.jar
%{_javadir}/hsqldb.jar
%{_mavenpomdir}
%{_mavendepmapfragdir}
%doc readme.txt doc/hsqldb_lic.txt
%files demo
%defattr(-,root,root)
%dir %{_datadir}/hsqldb
%{_datadir}/hsqldb/demo
%files javadoc
%defattr(-,root,root)
%{_javadocdir}/hsqldb-%{version}
%{_javadocdir}/hsqldb
%files manual
%defattr(-,root,root)
%doc doc/* index.html
%if %with_gcj
%post gcj
if [ -x %{_bindir}/rebuild-gcj-db ] ; then
%{_bindir}/rebuild-gcj-db
fi
%postun gcj
if [ -x %{_bindir}/rebuild-gcj-db ] ; then
%{_bindir}/rebuild-gcj-db
fi
%files gcj
%defattr(-,root,root)
%{_libdir}/gcj/java-hsqldb/hsqldb-%{version}.jar.db
%{_libdir}/gcj/java-hsqldb/hsqldb-%{version}.jar.so
%endif
%changelog
* Thu Oct 03 2019 Silvan Calarco <silvan.calarco@mambasoft.it> 2.5.0-1mamba
- update to 2.5.0
* Thu Jan 27 2011 gil <puntogil@libero.it> 1.8.0.10-3mamba
- rebuilt with java-openjdk
- add gcj support