Accepting request 198271 from Java:packages
Submit of succeeding java packages for factory OBS-URL: https://build.opensuse.org/request/show/198271 OBS-URL: https://build.opensuse.org/package/show/openSUSE:Factory/hsqldb?expand=0&rev=15
This commit is contained in:
commit
276c4f037b
@ -1,20 +0,0 @@
|
||||
--- 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
|
@ -3,7 +3,6 @@
|
||||
|
||||
server.database.0 file:data/db0
|
||||
server.dbname.0 firstdb
|
||||
server.urlid.0 db0-url
|
||||
server.silent true
|
||||
server.trace false
|
||||
|
||||
|
@ -1,523 +0,0 @@
|
||||
Index: bin/hsqldb
|
||||
===================================================================
|
||||
--- bin/hsqldb.orig 2011-01-14 13:55:34.636488672 +0100
|
||||
+++ bin/hsqldb 2011-01-14 14:05:37.464628070 +0100
|
||||
@@ -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,73 @@
|
||||
|
||||
# -- 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
|
||||
|
||||
+# "chown" lives in /usr on some UNIXes.
|
||||
+PATH="/bin:/sbin:/usr/sbin"
|
||||
+
|
||||
+
|
||||
+NAME="$(/bin/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"` || {
|
||||
+INVOC_PATH=`/usr/bin/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:
|
||||
|
||||
@@ -110,9 +164,12 @@
|
||||
SU_ECHO_SECS=1
|
||||
# File used as semaphore. If file is removed, a running pid checker
|
||||
# process will exit.
|
||||
-PIDCHECKER_FLAGFILE=`mktemp /tmp/hsqldb.XXXXXXXX`
|
||||
+PIDCHECKER_FLAGFILE=`/bin/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 +225,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 +272,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 +288,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 +318,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,28 +341,36 @@
|
||||
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"
|
||||
-
|
||||
# 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.
|
||||
@@ -279,15 +382,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 +405,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 +446,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 +467,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" -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
|
||||
- exit 1
|
||||
+ rc_failed 1
|
||||
+ rc_status -v
|
||||
+ rc_exit
|
||||
}
|
||||
export JAVA_EXECUTABLE
|
||||
export HSQLDB_JAR_PATH
|
||||
@@ -382,10 +511,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 +535,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 +547,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 +561,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 +596,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
|
@ -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>
|
27
hsqldb-2.2.9.pom
Normal file
27
hsqldb-2.2.9.pom
Normal file
@ -0,0 +1,27 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
|
||||
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>org.hsqldb</groupId>
|
||||
<artifactId>hsqldb</artifactId>
|
||||
<version>2.2.9</version>
|
||||
<name>HyperSQL Database</name>
|
||||
<description>HSQLDB - Lightweight 100% Java SQL Database Engine</description>
|
||||
<url>http://hsqldb.org</url>
|
||||
<inceptionYear>2001</inceptionYear>
|
||||
<organization>
|
||||
<name>The HSQL Development Group</name>
|
||||
<url>http://hsqldb.org</url>
|
||||
</organization>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>HSQLDB License, a BSD open source license</name>
|
||||
<url>http://hsqldb.org/web/hsqlLicense.html</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<connection>scm:svn:http://hsqldb.svn.sourceforge.net/svnroot/hsqldb/base</connection>
|
||||
<url>http://hsqldb.svn.sourceforge.net/viewvc/hsqldb/base/trunk</url>
|
||||
</scm>
|
||||
</project>
|
3
hsqldb-2.2.9.zip
Normal file
3
hsqldb-2.2.9.zip
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:6b60decdb59513f52b915abed2223e287ba19360fa77fc8141c4fc6af90c5e72
|
||||
size 7450194
|
12
hsqldb-apidocs.patch
Normal file
12
hsqldb-apidocs.patch
Normal file
@ -0,0 +1,12 @@
|
||||
diff --git a/build/build.xml b/build/build.xml
|
||||
index 3a2b77f..c18fda0 100644
|
||||
--- a/build/build.xml
|
||||
+++ b/build/build.xml
|
||||
@@ -130,6 +130,7 @@ examples:
|
||||
There is no performance penalty, since the javadoc task regenerates
|
||||
everything each run.
|
||||
-->
|
||||
+ <mkdir dir="doc/apidocs"/>
|
||||
<copy todir="doc/apidocs">
|
||||
<!-- IMPORTANT:
|
||||
Add a fixcrlf if we add non-binary files to doc/apidocs. -->
|
21
hsqldb-cmdline.patch
Normal file
21
hsqldb-cmdline.patch
Normal file
@ -0,0 +1,21 @@
|
||||
diff --git a/build/build.xml b/build/build.xml
|
||||
index ae8b37b..f3453fd 100644
|
||||
--- a/build/build.xml
|
||||
+++ b/build/build.xml
|
||||
@@ -493,7 +493,7 @@ examples:
|
||||
</target>
|
||||
|
||||
<!-- compiles the cmdline classes -->
|
||||
- <target name="-cmdline" if="ant.java.iscjava15"
|
||||
+ <target name="-cmdline"
|
||||
depends="-prepare, -update-switch-branch,
|
||||
-conditionalize-sqlfile-scanner, -sqlfile-scanner">
|
||||
<javac srcdir="${swsrc}"
|
||||
@@ -700,7 +700,6 @@ examples:
|
||||
<exclude name="org/hsqldb/util/Zaurus*"/>
|
||||
<exclude name="org/hsqldb/test/*.class"/>
|
||||
<exclude name="org/hsqldb/sample/*.class"/>
|
||||
- <exclude name="org/hsqldb/cmdline/**"/>
|
||||
</jar>
|
||||
</target>
|
||||
|
@ -1,293 +0,0 @@
|
||||
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 @@
|
||||
<echo message="ant.java.hasjsse=${ant.java.hasjsse}" />
|
||||
</target>
|
||||
|
||||
- <target name="javaversion6">
|
||||
+ <target name="javaversion7">
|
||||
+ <available classname="java.util.Objects" property="ant.java.iscjava17"/>
|
||||
+ </target>
|
||||
+
|
||||
+ <target name="javaversion6" depends="javaversion7" unless="ant.java.iscjava17">
|
||||
<available classname="java.net.IDN" property="ant.java.iscjava16"/>
|
||||
</target>
|
||||
|
||||
@@ -210,6 +214,7 @@
|
||||
<arg value="+JAVA2FULL"/>
|
||||
<arg value="-JAVA4"/>
|
||||
<arg value="-JAVA6"/>
|
||||
+ <arg value="-JAVA7"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
@@ -244,6 +249,7 @@
|
||||
<arg value="+JAVA2FULL"/>
|
||||
<arg value="+JAVA4"/>
|
||||
<arg value="-JAVA6"/>
|
||||
+ <arg value="-JAVA7"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
@@ -279,10 +285,47 @@
|
||||
<arg value="+JAVA2FULL"/>
|
||||
<arg value="+JAVA4"/>
|
||||
<arg value="+JAVA6"/>
|
||||
+ <arg value="-JAVA7"/>
|
||||
+ </java>
|
||||
+ </target>
|
||||
+
|
||||
+ <target name="switchtojdk17" depends="switchtojdk16"
|
||||
+ description="self explanatory" if="ant.java.iscjava17">
|
||||
+ <java classname="org.hsqldb.util.CodeSwitcher" classpath="classes" >
|
||||
+ <arg file="${src}/org/hsqldb/lib/java/JavaSystem.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/lib/HsqlTimer.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbcDriver.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcBlob.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDatabaseMetaData.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcDataSource.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcCallableStatement.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcClob.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcConnection.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcParameterMetaData.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcPreparedStatement.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSet.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcResultSetMetaData.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/jdbc/jdbcStatement.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/persist/LockFile.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/persist/Logger.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/persist/ScaledRAFile.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/util/DatabaseManager.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/util/ConnectionDialogCommon.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/lib/SimpleLog.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/rowio/RowInputTextLog.java"/>
|
||||
+ <arg file="${src}/org/hsqldb/HsqlDateTime.java"/>
|
||||
+ <arg value="+JAVA2"/>
|
||||
+ <arg value="+JAVA2FULL"/>
|
||||
+ <arg value="+JAVA4"/>
|
||||
+ <arg value="+JAVA6"/>
|
||||
+ <arg value="+JAVA7"/>
|
||||
</java>
|
||||
</target>
|
||||
|
||||
- <target name="store" depends="switchtojdk16"
|
||||
+ <target name="store" depends="switchtojdk17"
|
||||
description="compiles the /store folder">
|
||||
<javac srcdir="${src}"
|
||||
destdir="classes"
|
||||
diff -ur hsqldb.orig/src/org/hsqldb/jdbc/jdbcCallableStatement.java hsqldb/src/org/hsqldb/jdbc/jdbcCallableStatement.java
|
||||
--- hsqldb.orig/src/org/hsqldb/jdbc/jdbcCallableStatement.java 2010-02-27 12:04:52.000000000 -0500
|
||||
+++ hsqldb/src/org/hsqldb/jdbc/jdbcCallableStatement.java 2012-01-24 15:00:15.000000000 -0500
|
||||
@@ -3379,4 +3379,20 @@
|
||||
*/
|
||||
|
||||
//#endif JAVA6
|
||||
+
|
||||
+//#ifdef JAVA7
|
||||
+/*
|
||||
+ public <T> T getObject(String columnLabel, Class<T> type) throws SQLException
|
||||
+ {
|
||||
+ throw new UnsupportedOperationException("Not supported yet.");
|
||||
+ }
|
||||
+
|
||||
+ public <T> T getObject(int ColumnIndex, Class<T> 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> T getObject(String columnLabel, Class<T> type) throws SQLException
|
||||
+ {
|
||||
+ throw new UnsupportedOperationException("Not supported yet.");
|
||||
+ }
|
||||
+
|
||||
+ public <T> T getObject(int columnNum, Class<T> 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
|
||||
}
|
83
hsqldb-post
Normal file
83
hsqldb-post
Normal file
@ -0,0 +1,83 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file was created with portions of the original SysV init script shipped
|
||||
# with hsqldb
|
||||
|
||||
# Copyright (c) 2001-2004, The HSQL Development Group
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# Neither the name of the HSQL Development Group nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
|
||||
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
# $MAX_START_SECS from when the Server/WebServer is started.
|
||||
MAX_START_SECS=60
|
||||
|
||||
# Class in the org.hsqldb package to start.
|
||||
# At this time, only the values "Server" or "WebServer" will work.
|
||||
TARGET_CLASS=Server
|
||||
|
||||
. /etc/hsqldb.conf
|
||||
|
||||
. /usr/share/java-utils/java-functions
|
||||
|
||||
[ -z "$JAVA_EXECUTABLE" ] && {
|
||||
set_javacmd
|
||||
JAVA_EXECUTABLE=${JAVACMD}
|
||||
}
|
||||
|
||||
# PROPERTY_FILE is a derived value.
|
||||
case "$TARGET_CLASS" in
|
||||
Server) PROPERTY_FILE="$SERVER_HOME"/server.properties;;
|
||||
WebServer) PROPERTY_FILE="$SERVER_HOME"/webserver.properties;;
|
||||
*)
|
||||
echo 'Unsupported value for $TARGET_CLASS: '"$TARGET_CLASS" 1>&2
|
||||
exit 2;;
|
||||
esac
|
||||
[ -f "$PROPERTY_FILE" ] || {
|
||||
echo "'$PROPERTY_FILE' is missing" 1>&2
|
||||
exit 2
|
||||
}
|
||||
[ -r "$PROPERTY_FILE" ] || {
|
||||
echo "'$PROPERTY_FILE' isn't readable" 1>&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
AUTH_FILE_SWITCH=
|
||||
# N.b., there will be a problem if there are special characters or
|
||||
# spaces inside of $AUTH_FILE.
|
||||
[ -n "$AUTH_FILE" ] && AUTH_FILE_SWITCH="-Dsqltoolsprayer.rcfile=$AUTH_FILE"
|
||||
|
||||
# Might as well set CLASSPATH for a cleaner command.
|
||||
CLASSPATH="$HSQLDB_JAR_PATH"
|
||||
export CLASSPATH
|
||||
|
||||
sleep 1
|
||||
|
||||
"$JAVA_EXECUTABLE" $AUTH_FILE_SWITCH $CLIENT_JVMARGS \
|
||||
"-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \
|
||||
"-Dsqltoolsprayer.maxtime=${MAX_START_SECS}000" \
|
||||
org.hsqldb.cmdline.SqlToolSprayer '' db0-url
|
91
hsqldb-stop
Normal file
91
hsqldb-stop
Normal file
@ -0,0 +1,91 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file was created with portions of the original SysV init script shipped
|
||||
# with hsqldb
|
||||
|
||||
# Copyright (c) 2001-2004, The HSQL Development Group
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# Neither the name of the HSQL Development Group nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
|
||||
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
# Class in the org.hsqldb package to start.
|
||||
# At this time, only the values "Server" or "WebServer" will work.
|
||||
TARGET_CLASS=Server
|
||||
MAX_TERMINATE_SECS=1
|
||||
|
||||
# To customize settings, edit this file:
|
||||
. /etc/hsqldb.conf
|
||||
|
||||
. /usr/share/java-utils/java-functions
|
||||
|
||||
[ -z "$JAVA_EXECUTABLE" ] && {
|
||||
set_javacmd
|
||||
JAVA_EXECUTABLE=${JAVACMD}
|
||||
}
|
||||
|
||||
# PROPERTY_FILE is a derived value.
|
||||
case "$TARGET_CLASS" in
|
||||
Server) PROPERTY_FILE="$SERVER_HOME"/server.properties;;
|
||||
WebServer) PROPERTY_FILE="$SERVER_HOME"/webserver.properties;;
|
||||
*)
|
||||
echo 'Unsupported value for $TARGET_CLASS: '"$TARGET_CLASS" 1>&2
|
||||
exit 6;;
|
||||
esac
|
||||
[ -f "$PROPERTY_FILE" ] || {
|
||||
echo "'$PROPERTY_FILE' is missing" 1>&2
|
||||
exit 6
|
||||
}
|
||||
[ -r "$PROPERTY_FILE" ] || {
|
||||
echo "'$PROPERTY_FILE' isn't readable" 1>&2
|
||||
exit 6
|
||||
}
|
||||
[ -r "$HSQLDB_JAR_PATH" ] || {
|
||||
echo "'$HSQLDB_JAR_PATH' isn't readable" 1>&2
|
||||
exit 6
|
||||
}
|
||||
[ -x "$JAVA_EXECUTABLE" ] || {
|
||||
echo "No Java executable found at '$JAVA_EXECUTABLE'" 1>&2
|
||||
exit 6
|
||||
}
|
||||
|
||||
AUTH_FILE_SWITCH=
|
||||
# N.b., there will be a problem if there are special characters or
|
||||
# spaces inside of $AUTH_FILE.
|
||||
[ -n "$AUTH_FILE" ] &&
|
||||
AUTH_FILE_SWITCH="-Dsqltoolsprayer.rcfile=$AUTH_FILE"
|
||||
# Might as well set CLASSPATH for a cleaner command.
|
||||
CLASSPATH="$HSQLDB_JAR_PATH"
|
||||
export CLASSPATH
|
||||
export PATH # Required only for some funny init environments.
|
||||
"$JAVA_EXECUTABLE" $AUTH_FILE_SWITCH $CLIENT_JVMARGS \
|
||||
"-Dsqltoolsprayer.propfile=$PROPERTY_FILE" \
|
||||
org.hsqldb.cmdline.SqlToolSprayer '' \
|
||||
db0-url $SHUTDOWN_URLIDS
|
||||
sleep $MAX_TERMINATE_SECS # Give the JVM a sec. or 2 to fully exit.
|
||||
echo "Successful shutdown ${SHUTDOWN_OPTION} (for the $TARGET_CLASS process)!"
|
||||
exit 0
|
||||
|
@ -1,14 +0,0 @@
|
||||
--- 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
|
104
hsqldb-wrapper
Normal file
104
hsqldb-wrapper
Normal file
@ -0,0 +1,104 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This file was created with portions of the original SysV init script shipped
|
||||
# with hsqldb
|
||||
|
||||
# Copyright (c) 2001-2004, The HSQL Development Group
|
||||
# All rights reserved.
|
||||
#
|
||||
# Redistribution and use in source and binary forms, with or without
|
||||
# modification, are permitted provided that the following conditions are met:
|
||||
#
|
||||
# Redistributions of source code must retain the above copyright notice, this
|
||||
# list of conditions and the following disclaimer.
|
||||
#
|
||||
# Redistributions in binary form must reproduce the above copyright notice,
|
||||
# this list of conditions and the following disclaimer in the documentation
|
||||
# and/or other materials provided with the distribution.
|
||||
#
|
||||
# Neither the name of the HSQL Development Group nor the names of its
|
||||
# contributors may be used to endorse or promote products derived from this
|
||||
# software without specific prior written permission.
|
||||
#
|
||||
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
|
||||
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
# ARE DISCLAIMED. IN NO EVENT SHALL HSQL DEVELOPMENT GROUP, HSQLDB.ORG,
|
||||
# OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
|
||||
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
|
||||
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
|
||||
# LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
|
||||
# ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
|
||||
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
|
||||
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
|
||||
|
||||
# Class in the org.hsqldb package to start.
|
||||
# At this time, only the values "Server" or "WebServer" will work.
|
||||
TARGET_CLASS=Server
|
||||
|
||||
. /etc/hsqldb.conf
|
||||
|
||||
. /usr/share/java-utils/java-functions
|
||||
|
||||
[ -z "$JAVA_EXECUTABLE" ] && {
|
||||
set_javacmd
|
||||
JAVA_EXECUTABLE=${JAVACMD}
|
||||
}
|
||||
|
||||
# Suffix delimiter to $SERVER_ADDL_CLASSPATH, if it is set.
|
||||
[ -n "$SERVER_ADDL_CLASSPATH" ] &&
|
||||
SERVER_ADDL_CLASSPATH="${SERVER_ADDL_CLASSPATH}:"
|
||||
# Validate that config file sets all required variables.
|
||||
[ -n "$JAVA_EXECUTABLE" ] && [ -n "$HSQLDB_JAR_PATH" ] &&
|
||||
[ -n "$SERVER_HOME" ] || {
|
||||
echo "Config file '$CFGFILE' does not set one or more of following variables
|
||||
JAVA_EXECUTABLE, HSQLDB_JAR_PATH, SERVER_HOME" 1>&2
|
||||
exit 2
|
||||
}
|
||||
[ -d "$SERVER_HOME" ] || {
|
||||
echo "SERVER_HOME variable in '$CFGFILE' is set to a non-directory." 1>&2
|
||||
exit 2
|
||||
}
|
||||
[ -f "$JAVA_EXECUTABLE" ] && [ -f "$HSQLDB_JAR_PATH" ] || {
|
||||
echo "JAVA_EXECUTABLE or HSQLDB_JAR_PATH in '$CFGFILE' is set to a non-file." 1>&2
|
||||
exit 2
|
||||
}
|
||||
[ -r "$HSQLDB_JAR_PATH" ] || {
|
||||
echo "'$HSQLDB_JAR_PATH' isn't readable" 1>&2
|
||||
exit 2
|
||||
}
|
||||
[ -x "$JAVA_EXECUTABLE" ] || {
|
||||
echo "No Java executable found at '$JAVA_EXECUTABLE'" 1>&2
|
||||
exit 2
|
||||
}
|
||||
|
||||
# Make a good effort (but not bullet-proof) check on permissions of the
|
||||
# auth file. Unfortunately, if auth-file is not specified, this depends
|
||||
# upon both (a) $HOME being set; and (b) SqlToolSprayer and SqlTool defaults.
|
||||
# On the other hand, it works great if AUTH_FILE is set explicitly by user.
|
||||
if [ -z "$AUTH_FILE" ] && [ -z "$HOME" ]; then
|
||||
: # Lousy init environment didn't set $HOME, so can't find dflt cfg file.
|
||||
else
|
||||
_AUTH_TEST_PATH="$AUTH_FILE"
|
||||
[ -n "${_AUTH_TEST_PATH}" ] || _AUTH_TEST_PATH="$HOME/sqltool.rc"
|
||||
[ -f "$_AUTH_TEST_PATH" ] || {
|
||||
echo "No auth file found at '$_AUTH_TEST_PATH'" 1>&2
|
||||
exit 2
|
||||
}
|
||||
[ -r "$_AUTH_TEST_PATH" ] || {
|
||||
echo "Auth file '$_AUTH_TEST_PATH' not readable" 1>&2
|
||||
exit 2
|
||||
}
|
||||
ls -ld "$_AUTH_TEST_PATH" | grep '^-..------' > /dev/null 2>&1 || {
|
||||
echo "Fix permissions on '$_AUTH_TEST_PATH' like 'chmod 600 $_AUTH_TEST_PATH'" 1>&2
|
||||
exit 2
|
||||
}
|
||||
fi
|
||||
|
||||
TLS_SWITCHES=
|
||||
[ -n "$TLS_KEYSTORE" ] &&
|
||||
TLS_SWITCHES="-Djavax.net.ssl.keyStore=$TLS_KEYSTORE -Djavax.net.ssl.keyStorePassword=$TLS_PASSWORD"
|
||||
|
||||
cd "$SERVER_HOME" &&
|
||||
exec "$JAVA_EXECUTABLE" $SERVER_JVMARGS $TLS_SWITCHES -classpath "${SERVER_ADDL_CLASSPATH}${HSQLDB_JAR_PATH}" org.hsqldb.util.MainInvoker org.hsqldb.$TARGET_CLASS $INVOC_ADDL_ARGS
|
@ -1,3 +1,40 @@
|
||||
-------------------------------------------------------------------
|
||||
Mon Sep 9 11:05:43 UTC 2013 - tchvatal@suse.com
|
||||
|
||||
- Move from jpackage-utils to javapackage-tools
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Sep 4 12:42:55 UTC 2013 - mvyskocil@suse.com
|
||||
|
||||
- Update to 2.2.9
|
||||
* new core fully multithreaded core supports 2PL (two-phased locking)
|
||||
and MVCC (multiversion concurrency control), plus a hybrid 2PL+MVCC
|
||||
transaction control mode
|
||||
* Massive high performance LOB store for BLOBs and CLOBs up to multi-gigabyte
|
||||
size, with total storage capacity of 64 terabytes.
|
||||
* Increased default storage space of 16GB for ordinary data, with fast
|
||||
startup and shutdown. Storage space can be extended to 2TB.
|
||||
* Large result sets, views and subqueries can now be stored on disk (on the
|
||||
server side) while being generated and accessed. The threshold to store
|
||||
a result on disk, as well as the actual fetch size in client-server
|
||||
configurations can be specified per connection.
|
||||
* All query conditions, whether in a JOIN or WHERE clause, are now
|
||||
allocated to an index if possible.
|
||||
* HyperSQL supports schema-based stored procedures and functions written
|
||||
entirely in SQL and JAVA.
|
||||
* Support for BIT, BIT VARYING, CLOB, BLOB, INTERVAL according to the
|
||||
SQL Standards
|
||||
* and many more - see http://hsqldb.sourceforge.net/web/features200.html
|
||||
- Dropped patches
|
||||
* hsqldb-1.8.0-scripts.patch
|
||||
* hsqldb-1.8.0.10-suse-initscript.patch (systemd service is used)
|
||||
* hsqldb-jdbc-4.1.patch
|
||||
* hsqldb-tmp.patch (hsqldb-wrapper is used)
|
||||
- New patches
|
||||
* hsqldb-apidocs.patch
|
||||
* hsqldb-cmdline.patch
|
||||
- systemd integration and drop init script
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 21 12:19:01 UTC 2012 - mvyskocil@suse.cz
|
||||
|
||||
|
243
hsqldb.spec
243
hsqldb.spec
@ -1,7 +1,7 @@
|
||||
#
|
||||
# spec file for package hsqldb
|
||||
#
|
||||
# Copyright (c) 2012 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany.
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
@ -17,38 +17,46 @@
|
||||
|
||||
|
||||
Name: hsqldb
|
||||
Version: 1.8.1.13
|
||||
Version: 2.2.9
|
||||
Release: 0
|
||||
Summary: HYperSQL Database Engine
|
||||
Summary: HyperSQL Database Engine
|
||||
License: BSD-3-Clause
|
||||
Group: Development/Libraries/Java
|
||||
Group: Productivity/Databases/Servers
|
||||
Url: http://hsqldb.sourceforge.net/
|
||||
Source0: %{name}_1_8_1_3.zip
|
||||
Source1: %{name}-1.8.0-standard.cfg
|
||||
Source2: %{name}-1.8.0-standard-server.properties
|
||||
Source3: %{name}-1.8.0-standard-webserver.properties
|
||||
Source4: %{name}-1.8.0-standard-sqltool.rc
|
||||
Source5: %{name}-1.8.0.10.pom
|
||||
Patch0: %{name}-1.8.0-scripts.patch
|
||||
Patch1: hsqldb-tmp.patch
|
||||
Patch3: hsqldb-jdbc-4.1.patch
|
||||
Patch1000: hsqldb-1.8.0.10-suse-initscript.patch
|
||||
Source0: http://downloads.sourceforge.net/hsqldb/%{name}-%{version}.zip
|
||||
Source1: hsqldb-1.8.0-standard.cfg
|
||||
Source2: hsqldb-1.8.0-standard-server.properties
|
||||
Source3: hsqldb-1.8.0-standard-webserver.properties
|
||||
Source4: hsqldb-1.8.0-standard-sqltool.rc
|
||||
Source5: http://www.hsqldb.org/repos/org/hsqldb/hsqldb/%{version}/hsqldb-%{version}.pom
|
||||
|
||||
# Custom systemd files - talking with upstream about incorporating them, see
|
||||
# http://sourceforge.net/projects/hsqldb/forums/forum/73673/topic/5367103
|
||||
Source6: hsqldb.systemd
|
||||
Source7: hsqldb-wrapper
|
||||
Source8: hsqldb-post
|
||||
Source9: hsqldb-stop
|
||||
|
||||
# Javadoc fails to create since apidocs folder is deleted and not recreated
|
||||
Patch0: %{name}-apidocs.patch
|
||||
# Package org.hsqldb.cmdline was only compiled with java 1.5
|
||||
Patch1: %{name}-cmdline.patch
|
||||
|
||||
BuildRoot: %{_tmppath}/%{name}-%{version}-build
|
||||
BuildArch: noarch
|
||||
|
||||
Requires: java
|
||||
Requires: servletapi5
|
||||
%{systemd_requires}
|
||||
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: jpackage-utils >= 1.5
|
||||
BuildRequires: javapackages-tools
|
||||
BuildRequires: junit
|
||||
BuildRequires: servletapi5
|
||||
BuildRequires: systemd
|
||||
BuildRequires: unzip
|
||||
|
||||
PreReq: %fillup_prereq
|
||||
|
||||
%description
|
||||
HSQLdb is a relational database engine written in JavaTM , with a JDBC
|
||||
driver, supporting a subset of ANSI-92 SQL. It offers a small (about
|
||||
@ -68,108 +76,52 @@ 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: Hsqldb Database Engine
|
||||
Group: Development/Libraries/Java
|
||||
Summary: Manual for %{name}
|
||||
Group: Documentation/Other
|
||||
|
||||
%description manual
|
||||
HSQLdb is a relational database engine written in JavaTM , with a JDBC
|
||||
driver, supporting a subset of ANSI-92 SQL. It offers a small (about
|
||||
100k), fast database engine which offers both in memory and disk based
|
||||
tables. Embedded and server modes are available. Additionally, it
|
||||
includes tools such as a minimal web server, in-memory query and
|
||||
management tools (can be run as applets or servlets, too) and a number
|
||||
of demonstration examples.
|
||||
|
||||
Downloaded code should be regarded as being of production quality. The
|
||||
product is currently being used as a database and persistence engine in
|
||||
many Open Source Software projects and even in commercial projects and
|
||||
products! In it's current version it is extremely stable and reliable.
|
||||
It is best known for its small size, ability to execute completely in
|
||||
memory and its speed. Yet it is a completely functional relational
|
||||
database management system that is completely free under the Modified
|
||||
BSD License. Yes, that's right, completely free of cost or
|
||||
restrictions!
|
||||
|
||||
Manual for %{name}.
|
||||
|
||||
|
||||
%package javadoc
|
||||
Summary: Hsqldb Database Engine
|
||||
Group: Development/Libraries/Java
|
||||
Summary: Javadoc for %{name}
|
||||
Group: Documentation/HTML
|
||||
|
||||
%description javadoc
|
||||
HSQLdb is a relational database engine written in JavaTM , with a JDBC
|
||||
driver, supporting a subset of ANSI-92 SQL. It offers a small (about
|
||||
100k), fast database engine which offers both in memory and disk based
|
||||
tables. Embedded and server modes are available. Additionally, it
|
||||
includes tools such as a minimal web server, in-memory query and
|
||||
management tools (can be run as applets or servlets, too) and a number
|
||||
of demonstration examples.
|
||||
|
||||
Downloaded code should be regarded as being of production quality. The
|
||||
product is currently being used as a database and persistence engine in
|
||||
many Open Source Software projects and even in commercial projects and
|
||||
products! In it's current version it is extremely stable and reliable.
|
||||
It is best known for its small size, ability to execute completely in
|
||||
memory and its speed. Yet it is a completely functional relational
|
||||
database management system that is completely free under the Modified
|
||||
BSD License. Yes, that's right, completely free of cost or
|
||||
restrictions!
|
||||
|
||||
Javadoc for %{name}.
|
||||
|
||||
|
||||
%package demo
|
||||
Summary: Hsqldb Database Engine
|
||||
Summary: Demo for %{name}
|
||||
Group: Development/Libraries/Java
|
||||
Requires: %{name} = %{version}
|
||||
|
||||
%description demo
|
||||
HSQLdb is a relational database engine written in JavaTM , with a JDBC
|
||||
driver, supporting a subset of ANSI-92 SQL. It offers a small (about
|
||||
100k), fast database engine which offers both in memory and disk based
|
||||
tables. Embedded and server modes are available. Additionally, it
|
||||
includes tools such as a minimal web server, in-memory query and
|
||||
management tools (can be run as applets or servlets, too) and a number
|
||||
of demonstration examples.
|
||||
|
||||
Downloaded code should be regarded as being of production quality. The
|
||||
product is currently being used as a database and persistence engine in
|
||||
many Open Source Software projects and even in commercial projects and
|
||||
products! In it's current version it is extremely stable and reliable.
|
||||
It is best known for its small size, ability to execute completely in
|
||||
memory and its speed. Yet it is a completely functional relational
|
||||
database management system that is completely free under the Modified
|
||||
BSD License. Yes, that's right, completely free of cost or
|
||||
restrictions!
|
||||
|
||||
|
||||
Demonstrations and samples for %{name}.
|
||||
|
||||
%prep
|
||||
%setup -T -c -n %{name}
|
||||
(cd ..; unzip -q %{SOURCE0})
|
||||
%setup -q -n %{name}-%{version}/%{name}
|
||||
|
||||
# set right permissions
|
||||
find . -name "*.sh" -exec chmod 755 \{\} \;
|
||||
find . -name "*.sh" -exec chmod 755 {} +
|
||||
|
||||
# remove all _notes directories
|
||||
for dir in `find . -name _notes`; do rm -rf $dir; done
|
||||
find . -name _notes -exec rm -rf {} +
|
||||
|
||||
# remove all binary libs
|
||||
find . -name "*.jar" -exec rm -f {} \;
|
||||
find . -name "*.class" -exec rm -f {} \;
|
||||
find . -name "*.war" -exec rm -f {} \;
|
||||
find . -name "*.jar" -exec rm -f {} +
|
||||
find . -name "*.class" -exec rm -f {} +
|
||||
find . -name "*.war" -exec rm -f {} +
|
||||
|
||||
# correct silly permissions
|
||||
chmod -R go=u-w *
|
||||
|
||||
%patch0 -p0
|
||||
%patch1 -p1
|
||||
%patch3 -p1
|
||||
%patch1000 -b .suse-initscript
|
||||
# Fix doc location
|
||||
sed -i -e 's/doc-src/doc/g' build/build.xml
|
||||
|
||||
cp %{SOURCE5} pom.xml
|
||||
%patch0 -p1
|
||||
%patch1 -p1
|
||||
|
||||
%build
|
||||
export CLASSPATH=$(build-classpath \
|
||||
@ -177,73 +129,72 @@ servletapi5 \
|
||||
junit)
|
||||
|
||||
pushd build
|
||||
ant jar javadoc
|
||||
export JAVA_TOOL_OPTIONS=-Dfile.encoding=UTF8
|
||||
ant hsqldb javadoc
|
||||
popd
|
||||
|
||||
%install
|
||||
|
||||
# jar
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}
|
||||
install -m 644 lib/%{name}.jar $RPM_BUILD_ROOT%{_javadir}/%{name}.jar
|
||||
install -d -m 755 %{buildroot}%{_javadir}
|
||||
install -m 644 lib/%{name}.jar %{buildroot}%{_javadir}/%{name}.jar
|
||||
|
||||
# bin
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_bindir}
|
||||
install -m 755 bin/runUtil.sh $RPM_BUILD_ROOT%{_bindir}/%{name}RunUtil
|
||||
# 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
|
||||
|
||||
# sysv init
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_initrddir}
|
||||
install -m 755 bin/%{name} $RPM_BUILD_ROOT%{_initrddir}/%{name}
|
||||
# rchsqldb link
|
||||
install -d -m 0755 $RPM_BUILD_ROOT/%{_sbindir}/
|
||||
ln -sf %{_sysconfdir}/init.d/%{name} $RPM_BUILD_ROOT/%{_sbindir}/rc%{name}
|
||||
install -d -m 0755 %{buildroot}/%{_sbindir}/
|
||||
ln -sf ../../sbin/service %{buildroot}/%{_sbindir}/rc%{name}
|
||||
|
||||
# sysconfig
|
||||
#install -d -m 0755 $RPM_BUILD_ROOT/var/adm/fillup-templates
|
||||
#install -m 700 %{SOURCE1} $RPM_BUILD_ROOT/var/adm/fillup-templates/sysconfig.%{name}
|
||||
#install -d -m 0755 %{buildroot}/var/adm/fillup-templates
|
||||
#install -m 700 %{SOURCE1} %{buildroot}/var/adm/fillup-templates/sysconfig.%{name}
|
||||
install -d -m 0755 %{buildroot}/%{_sysconfdir}
|
||||
install -m 0644 %{SOURCE1} %{buildroot}/%{_sysconfdir}/%{name}.conf
|
||||
|
||||
# serverconfig
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}
|
||||
install -m 644 %{SOURCE2} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/server.properties
|
||||
install -m 644 %{SOURCE3} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/webserver.properties
|
||||
install -m 600 %{SOURCE4} $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/sqltool.rc
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}
|
||||
install -m 644 %{SOURCE2} %{buildroot}%{_localstatedir}/lib/%{name}/server.properties
|
||||
install -m 644 %{SOURCE3} %{buildroot}%{_localstatedir}/lib/%{name}/webserver.properties
|
||||
install -m 600 %{SOURCE4} %{buildroot}%{_localstatedir}/lib/%{name}/sqltool.rc
|
||||
|
||||
# lib
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/lib
|
||||
install -m 644 lib/functions $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/lib
|
||||
|
||||
# data
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/data
|
||||
|
||||
# demo
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_datadir}/%{name}/demo
|
||||
install -m 755 demo/*.sh $RPM_BUILD_ROOT%{_datadir}/%{name}/demo
|
||||
install -m 644 demo/*.html $RPM_BUILD_ROOT%{_datadir}/%{name}/demo
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/lib
|
||||
|
||||
# javadoc
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
cp -r doc/src/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}
|
||||
rm -rf doc/src
|
||||
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -r doc/apidocs/* %{buildroot}%{_javadocdir}/%{name}
|
||||
|
||||
# data
|
||||
install -d -m 755 %{buildroot}%{_localstatedir}/lib/%{name}/data
|
||||
|
||||
# demo
|
||||
install -d -m 755 %{buildroot}%{_datadir}/%{name}/sample
|
||||
rm -f sample/%{name}.init
|
||||
install -m 644 sample/* %{buildroot}%{_datadir}/%{name}/sample
|
||||
|
||||
# manual
|
||||
install -d -m 755 $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
||||
cp -pr doc/* $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
||||
cp -p index.html $RPM_BUILD_ROOT%{_docdir}/%{name}-%{version}
|
||||
%fdupes -s %{buildroot}
|
||||
install -d -m 755 %{buildroot}%{_docdir}/%{name}-%{version}
|
||||
cp -pr doc/* %{buildroot}%{_docdir}/%{name}-%{version}
|
||||
cp -p index.html %{buildroot}%{_docdir}/%{name}-%{version}
|
||||
|
||||
cd ..
|
||||
# Maven metadata
|
||||
install -pD -T -m 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%add_to_maven_depmap %{name} %{name} %{version} JPP %{name}
|
||||
install -pD -T -m 644 %{SOURCE5} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%add_maven_depmap
|
||||
|
||||
pushd $RPM_BUILD_ROOT%{_localstatedir}/lib/%{name}/lib
|
||||
pushd %{buildroot}%{_localstatedir}/lib/%{name}/lib
|
||||
# build-classpath can not be used as the jar is not
|
||||
# yet present during the build
|
||||
ln -s %{_javadir}/hsqldb.jar hsqldb.jar
|
||||
ln -s $(build-classpath servletapi5) servletapi5.jar
|
||||
popd
|
||||
|
||||
%clean
|
||||
rm -rf $RPM_BUILD_ROOT
|
||||
%fdupes -s %{buildroot}
|
||||
|
||||
%pre
|
||||
# Add the "hsqldb" user and group
|
||||
@ -257,38 +208,40 @@ if [ `getent passwd %{name}` ]; then
|
||||
: OK user hsqldb already present
|
||||
else
|
||||
%{_sbindir}/useradd -r -g %{name} -c "Hsqldb" -s /bin/sh \
|
||||
-d %{_localstatedir}/lib/%{name} -o %{name} 2> /dev/null || :
|
||||
-d %{_localstatedir}/lib/%{name} %{name} 2> /dev/null || :
|
||||
fi
|
||||
%service_add_pre %{name}.service
|
||||
|
||||
%post
|
||||
%{fillup_and_insserv %{name}}
|
||||
rm -f %{_localstatedir}/lib/%{name}/lib/hsqldb.jar
|
||||
rm -f %{_localstatedir}/lib/%{name}/lib/servlet.jar
|
||||
|
||||
%postun
|
||||
%restart_on_update %{name}
|
||||
%insserv_cleanup
|
||||
%{fillup_only %{name}}
|
||||
%service_add_post %{name}.service
|
||||
|
||||
%preun
|
||||
%stop_on_removal %{name}
|
||||
%service_del_preun %{name}.service
|
||||
|
||||
%postun
|
||||
%service_del_postun %{name}.service
|
||||
|
||||
%files
|
||||
%defattr(0644,root,root,0755)
|
||||
%dir %{_docdir}/%{name}-%{version}
|
||||
%doc %{_docdir}/%{name}-%{version}/hsqldb_lic.txt
|
||||
%{_javadir}/*
|
||||
%attr(0755,root,root) %{_bindir}/*
|
||||
%attr(0755,root,root) %{_sbindir}/rc%{name}
|
||||
%attr(0755,root,root) %{_initrddir}/%{name}
|
||||
%attr(0700,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/data
|
||||
%{_sbindir}/rc%{name}
|
||||
%{_unitdir}/%{name}.service
|
||||
%dir %{_prefix}/lib/%{name}/
|
||||
%attr(0755,root,root) %{_prefix}/lib/%{name}/%{name}-post
|
||||
%attr(0755,root,root) %{_prefix}/lib/%{name}/%{name}-stop
|
||||
%attr(0755,root,root) %{_prefix}/lib/%{name}/%{name}-wrapper
|
||||
%{_localstatedir}/lib/%{name}/lib
|
||||
%attr(0700,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/data
|
||||
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/server.properties
|
||||
%attr(0644,root,root) %{_localstatedir}/lib/%{name}/webserver.properties
|
||||
%attr(0600,hsqldb,hsqldb) %{_localstatedir}/lib/%{name}/sqltool.rc
|
||||
%dir %{_localstatedir}/lib/%{name}
|
||||
%config(noreplace) %{_sysconfdir}/%{name}.conf
|
||||
%dir %{_mavenpomdir}
|
||||
%{_mavenpomdir}/JPP-%{name}.pom
|
||||
%{_mavenpomdir}/*
|
||||
%{_mavendepmapfragdir}/%{name}
|
||||
|
||||
%files manual
|
||||
|
15
hsqldb.systemd
Normal file
15
hsqldb.systemd
Normal file
@ -0,0 +1,15 @@
|
||||
[Unit]
|
||||
Description=HyperSQL Database Engine
|
||||
|
||||
|
||||
[Service]
|
||||
Type=simple
|
||||
User=hsqldb
|
||||
Group=hsqldb
|
||||
ExecStart=/usr/lib/hsqldb/hsqldb-wrapper
|
||||
ExecStartPost=/usr/lib/hsqldb/hsqldb-post
|
||||
ExecStop=/usr/lib/hsqldb/hsqldb-stop
|
||||
SuccessExitStatus=143
|
||||
|
||||
[Install]
|
||||
WantedBy=multi-user.target
|
@ -1,3 +0,0 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:c3669bbebcb5c722b273f20c316af744d4e263bc90cc20fd1e6296dff7cc3d07
|
||||
size 3170550
|
Loading…
x
Reference in New Issue
Block a user