diff options
author | Alistair Bush <ali_bush@gentoo.org> | 2010-03-09 10:31:29 +0000 |
---|---|---|
committer | Alistair Bush <ali_bush@gentoo.org> | 2010-03-09 10:31:29 +0000 |
commit | 7844af74d1e84cc2765c3afd025e0cc1806208eb (patch) | |
tree | a6adff91ea90e8fa3779381b0789ea16be0401d4 /dev-db/hsqldb | |
parent | Automated update of use.local.desc (diff) | |
download | historical-7844af74d1e84cc2765c3afd025e0cc1806208eb.tar.gz historical-7844af74d1e84cc2765c3afd025e0cc1806208eb.tar.bz2 historical-7844af74d1e84cc2765c3afd025e0cc1806208eb.zip |
Version Bump to 1.8.1.2
Package-Manager: portage-2.1.8.1/cvs/Linux x86_64
Diffstat (limited to 'dev-db/hsqldb')
-rw-r--r-- | dev-db/hsqldb/ChangeLog | 8 | ||||
-rw-r--r-- | dev-db/hsqldb/Manifest | 5 | ||||
-rw-r--r-- | dev-db/hsqldb/files/TestBug1191815.java | 129 | ||||
-rw-r--r-- | dev-db/hsqldb/hsqldb-1.8.1.2.ebuild | 182 |
4 files changed, 322 insertions, 2 deletions
diff --git a/dev-db/hsqldb/ChangeLog b/dev-db/hsqldb/ChangeLog index 71baeb2f9374..26f79c1aacce 100644 --- a/dev-db/hsqldb/ChangeLog +++ b/dev-db/hsqldb/ChangeLog @@ -1,6 +1,12 @@ # ChangeLog for dev-db/hsqldb # Copyright 1999-2010 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/dev-db/hsqldb/ChangeLog,v 1.53 2010/01/15 17:43:33 grobian Exp $ +# $Header: /var/cvsroot/gentoo-x86/dev-db/hsqldb/ChangeLog,v 1.54 2010/03/09 10:31:28 ali_bush Exp $ + +*hsqldb-1.8.1.2 (08 Mar 2010) + + 08 Mar 2010; Alistair Bush <ali_bush@gentoo.org> + +files/TestBug1191815.java, +hsqldb-1.8.1.2.ebuild: + Version Bump to 1.8.1.2 15 Jan 2010; Fabian Groffen <grobian@gentoo.org> hsqldb-1.8.0.10.ebuild: Marked ~x64-solaris diff --git a/dev-db/hsqldb/Manifest b/dev-db/hsqldb/Manifest index aa09e92f8812..fb9aafe243fb 100644 --- a/dev-db/hsqldb/Manifest +++ b/dev-db/hsqldb/Manifest @@ -1,11 +1,14 @@ AUX 35hsqldb 33 RMD160 7f6db20183f2a6ebfe3054f8c3572b7417a4b5e3 SHA1 2f9b09ee3443889c2f1703f57c6ff80b4760aa69 SHA256 bd41e5568084a4856f102863b82f8103b0c9e1ad38423217f75e21d6842e447c AUX StringComparator.java 1986 RMD160 c35a39b06d0c1f61e5e3a7f960f6680891d5190b SHA1 360f6e2012436bd871fa2f7e6859564e393f9294 SHA256 9f672518cd27d2da5fb9e0a0f7ffe56a872186cdf188cb5840598ed88b959b95 +AUX TestBug1191815.java 4112 RMD160 1e416f161a0d0465d39bc00bef2c0dc296556fdd SHA1 0a44dbb0233d339ef7ed1f318c6d59bfa7f7a70e SHA256 e101366203272e942f3d4cd5fce772220f60ad66b4f543858204ddef7b0dc563 AUX bundle-all-tools.patch 873 RMD160 e13225f63d202fda9d3e54b5141b92f88c2c0b99 SHA1 72a5539601cc09d385ec2e867afe9ad38db2eaa8 SHA256 9ed2f92a998045430b8685c846ebfaeb32898828f45255df7a8e09ffab267468 AUX hsqldb 464 RMD160 9f491a89bc013085205ddcac0cdcc85b26abe431 SHA1 a947e19e7379da582f4193cb6fbdddc884e52333 SHA256 773d18c752b8392fb1b1677789934ea7a531f8cc0276c18917e21c71b717a3a9 AUX resolve-config-softlinks.patch 846 RMD160 93d6f30829e446f1b5f4fde6f61ab1efdeebd928 SHA1 f1843f12ce59bf866757eff7b385ef1565dea0f2 SHA256 a7de5886aed87fa040e65d265d5418daee38376ba23742fb97119b629b678517 AUX server.properties 686 RMD160 c48bc303a028bca284273b969ca01d3dadb20dcd SHA1 bd7a3cd95e451c6bf11b28609819450cf396221c SHA256 be7c54fc356d2b14c26e8ec0eecb79c7fa1c72e84c3475bedcd4d08548beeabd AUX sqltool.rc 619 RMD160 095cf1293ef4d40eed83df5f3025202c5a57f493 SHA1 8a98d518192c09401d077120f5217a8706a8fc53 SHA256 76ab1af1b6359c070c00a0d7499d7f628c94cc6c7b7d6bb8fe196ccfe080d637 DIST hsqldb_1_8_0_10.zip 3519470 RMD160 8b25da02fbc2702a43cc88b0af8eaeb41c0f75a0 SHA1 7168b0f40aa5c72267899601c116d2348d2f56ec SHA256 d30b13f4ba2e3b6a2d4f020c0dee0a9fb9fc6fbcc2d561f36b78da4bf3802370 +DIST hsqldb_1_8_1_2.zip 3516460 RMD160 da834ca11e34c8acca6539c54283018b070615e5 SHA1 b550a41d2376869dc156d93bcf16d46d657e540c SHA256 828776b24364781ae4443d4d64f60eb2a80ab5179637b8415ec91590f82d7bcb EBUILD hsqldb-1.8.0.10.ebuild 5897 RMD160 e2ee7bed4bfcafb3cfef01de0e5173b363075bec SHA1 e14ec625a3284b3abb3d0e6fbcd2030685ab7856 SHA256 e291803972110dfc4fe15a40c34c5f099f07fa01933b9ddbc9783f5562338ca7 -MISC ChangeLog 7176 RMD160 184c7dd2d1aeaefd550966a2c1195d16532233b6 SHA1 b0601b89e7732c8dfd35afac160a78f401893b82 SHA256 677241701fc79dd16e6fbfb559835ab02146d719eb0af4a619d379f9d576e8d6 +EBUILD hsqldb-1.8.1.2.ebuild 5951 RMD160 4ff832746d1354d3e7c88ac587c90f52db2c7f30 SHA1 6dd9a9c18677899af9f0efee872618d6cf721554 SHA256 1030dbe59eec6c3ea8c99fd71e7a6025b2d62e4845e22a292ce81d06c5c32588 +MISC ChangeLog 7340 RMD160 ed163f71eff1ba603470cc9d32565acfffd1e29b SHA1 efe83b55fb6a17d8b759374655cf07c3e078fd71 SHA256 9b170e70c0a22d3921938e6a175957c9d7e66e54fcc88244ccb6d57589d7ea95 MISC metadata.xml 158 RMD160 493079b5fb71d66863beea1b023901c90ba81be5 SHA1 77cd509a8b3c377b9a24480b48a5d5481b7874f1 SHA256 ea882ceccfd160b16cf7e79de423bdcc12b3fa000f124491a6df36f5783894fb diff --git a/dev-db/hsqldb/files/TestBug1191815.java b/dev-db/hsqldb/files/TestBug1191815.java new file mode 100644 index 000000000000..06c606401cdd --- /dev/null +++ b/dev-db/hsqldb/files/TestBug1191815.java @@ -0,0 +1,129 @@ +/* Copyright (c) 2001-2009, 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. + */ + + +package org.hsqldb.test; + +import java.sql.Connection; +import java.sql.PreparedStatement; +import java.sql.ResultSet; +import java.sql.Statement; +import java.sql.Timestamp; +import java.util.Calendar; +import java.util.GregorianCalendar; +import java.util.TimeZone; + +import junit.framework.TestCase; +import junit.framework.TestResult; + +/** + * Created on Apr 28, 2005 + * @author Antranig Basman (antranig@caret.cam.ac.uk) + */ +public class TestBug1191815 extends TestBase { + + public TestBug1191815(String name) { + super(name); + } + + public void test() throws Exception { + + try { + Connection conn = newConnection(); + Statement stmt = conn.createStatement(); + + stmt.executeUpdate("drop table testA if exists;"); + stmt.executeUpdate("create table testA(data timestamp);"); + + TimeZone pst = TimeZone.getTimeZone("PST"); + Calendar cal = new GregorianCalendar(pst); + + cal.clear(); + cal.set(2005, 0, 1, 0, 0, 0); + + + // yyyy-mm-dd hh:mm:ss.fffffffff + Timestamp ts = new Timestamp(cal.getTimeInMillis()); + ts.setNanos(1000); + PreparedStatement ps = + conn.prepareStatement("insert into testA values(?)"); + + ps.setTimestamp(1, ts, cal); + ps.execute(); + ps.setTimestamp(1, ts, null); + ps.execute(); + + String sql = "select * from testA"; + + stmt = conn.createStatement(); + + ResultSet rs = stmt.executeQuery(sql); + + rs.next(); + + Timestamp returned = rs.getTimestamp(1, cal); + + rs.next(); + + Timestamp def = rs.getTimestamp(1, null); + + assertEquals(ts, returned); + assertEquals(ts, def); + } catch (Exception e) { + e.printStackTrace(); + fail(); + } + } + + public static void main(String[] args) throws Exception { + + TestResult result; + TestCase test; + java.util.Enumeration exceptions; + java.util.Enumeration failures; + int count; + + result = new TestResult(); + test = new TestBug1191815("test"); + + test.run(result); + + count = result.failureCount(); + + System.out.println("TestBug1192000 failure count: " + count); + + failures = result.failures(); + + while (failures.hasMoreElements()) { + System.out.println(failures.nextElement()); + } + } +} + diff --git a/dev-db/hsqldb/hsqldb-1.8.1.2.ebuild b/dev-db/hsqldb/hsqldb-1.8.1.2.ebuild new file mode 100644 index 000000000000..9e0e8fbf6e7e --- /dev/null +++ b/dev-db/hsqldb/hsqldb-1.8.1.2.ebuild @@ -0,0 +1,182 @@ +# Copyright 1999-2010 Gentoo Foundation +# Distributed under the terms of the GNU General Public License v2 +# $Header: /var/cvsroot/gentoo-x86/dev-db/hsqldb/hsqldb-1.8.1.2.ebuild,v 1.1 2010/03/09 10:31:28 ali_bush Exp $ + +EAPI=1 +JAVA_PKG_IUSE="doc source test" +inherit eutils versionator java-pkg-2 java-ant-2 + +MY_PV=$(replace_all_version_separators _ ) +MY_P="${PN}_${MY_PV}" + +DESCRIPTION="The leading SQL relational database engine written in Java." +HOMEPAGE="http://hsqldb.org" +SRC_URI="mirror://sourceforge/${PN}/${MY_P}.zip" + +LICENSE="BSD" +SLOT="0" +KEYWORDS="~amd64 ~ppc ~ppc64 ~x86 ~x86-fbsd ~x64-solaris" +IUSE="java6" + +CDEPEND="java-virtuals/servlet-api:2.3" +RDEPEND="java6? ( >=virtual/jre-1.6 ) + !java6? ( >=virtual/jre-1.4 ) + ${CDEPEND}" +DEPEND="java6? ( >=virtual/jdk-1.6 ) + !java6? ( || ( =virtual/jdk-1.5* =virtual/jdk-1.4* ) ) + test? ( dev-java/junit:0 ) + app-arch/unzip + ${CDEPEND}" + +S="${WORKDIR}/${PN}" + +HSQLDB_JAR=/usr/share/hsqldb/lib/hsqldb.jar +HSQLDB_HOME=/var/lib/hsqldb + +pkg_setup() { + enewgroup hsqldb + enewuser hsqldb -1 /bin/sh /dev/null hsqldb + + java-pkg-2_pkg_setup +} + +src_unpack() { + unpack ${A} + cd "${S}" + + rm -v lib/*.jar || die + java-pkg_jar-from --virtual --into lib servlet-api-2.3 + + sed -i -r \ + -e "s#etc/sysconfig#etc/conf.d#g" \ + bin/hsqldb || die + + java-pkg_filter-compiler jikes + + eant -q -f "${EANT_BUILD_XML}" cleanall > /dev/null + + epatch "${FILESDIR}/resolve-config-softlinks.patch" + + mkdir conf + sed -e "s/^HSQLDB_JAR_PATH=.*$/HSQLDB_JAR_PATH=${HSQLDB_JAR//\//\\/}/g" \ + -e "s/^SERVER_HOME=.*$/SERVER_HOME=\/var\/lib\/hsqldb/g" \ + -e "s/^HSQLDB_OWNER=.*$/HSQLDB_OWNER=hsqldb/g" \ + -e 's/^#AUTH_FILE=.*$/AUTH_FILE=${SERVER_HOME}\/sqltool.rc/g' \ + src/org/hsqldb/sample/sample-hsqldb.cfg > conf/hsqldb || die + cp "${FILESDIR}/server.properties" conf/ || die + cp "${FILESDIR}/sqltool.rc" conf/ || die + + # Missing source file - needed for tests + # http://hsqldb.cvs.sourceforge.net/*checkout*/hsqldb/hsqldb-dev/src/org/hsqldb/lib/StringComparator.java?revision=1.1&pathrev=hsqldb_1_8_0_10 + # http://sourceforge.net/tracker/index.php?func=detail&aid=2008754&group_id=23316&atid=378131 + cp "${FILESDIR}/StringComparator.java" src/org/hsqldb/lib || die + cp "${FILESDIR}/TestBug1191815.java" src/org/hsqldb/test/ || die +} + +# EANT_BUILD_XML used also in src_unpack +EANT_BUILD_XML="build/build.xml" +EANT_BUILD_TARGET="jar jarclient jarsqltool jarutil" +EANT_DOC_TARGET="javadocdev" + +src_test() { + java-pkg_jar-from --into lib junit + eant -f ${EANT_BUILD_XML} jartest + cd testrun/hsqldb || die + ./runTest.sh TestSelf || die "TestSelf hsqldb tests failed" + # TODO. These fail. Investigate why. + #cd "${S}/testrun/sqltool" || die + #CLASSPATH="${S}/lib/hsqldb.jar" ./runtests.bash || die "sqltool test failed" +} + +src_install() { + java-pkg_dojar lib/hsql*.jar + + if use doc; then + dodoc doc/*.txt + dohtml -r doc/zaurus + dohtml -r doc/src + fi + use source && java-pkg_dosrc src/* + + # Install env file for CONFIG_PROTECT support + doenvd "${FILESDIR}/35hsqldb" || die + + # Put init, configuration and authorization files in /etc + doinitd "${FILESDIR}/hsqldb" || die + doconfd conf/hsqldb || die + dodir /etc/hsqldb + insinto /etc/hsqldb + # Change the ownership of server.properties and sqltool.rc + # files to hsqldb:hsqldb. (resolves Bug #111963) + insopts -m0600 -o hsqldb -g hsqldb + doins conf/server.properties || die + insopts -m0600 -o hsqldb -g hsqldb + doins conf/sqltool.rc || die + + # Install init script + dodir "${HSQLDB_HOME}/bin" + keepdir "${HSQLDB_HOME}" + exeinto "${HSQLDB_HOME}/bin" + doexe bin/hsqldb || die + + # Create symlinks to authorization files in the server home dir + # (required by the hqldb init script) + insinto "${HSQLDB_HOME}" + dosym /etc/hsqldb/server.properties "${HSQLDB_HOME}/server.properties" || die + dosym /etc/hsqldb/sqltool.rc "${HSQLDB_HOME}/sqltool.rc" || die + + # Make sure that files have correct permissions + chown -R hsqldb:hsqldb "${D}${HSQLDB_HOME}" + chmod o-rwx "${D}${HSQLDB_HOME}" +} + +pkg_postinst() { + ewarn "If you intend to run Hsqldb in Server mode and you want to create" + ewarn "additional databases, remember to put correct information in both" + ewarn "'server.properties' and 'sqltool.rc' files." + ewarn "(read the 'Init script Setup Procedure' section of the 'Chapter 3." + ewarn "UNIX Quick Start' in the Hsqldb docs for more information)" + echo + elog "Example:" + echo + elog "/etc/hsqldb/server.properties" + elog "=============================" + elog "server.database.1=file:xdb/xdb" + elog "server.dbname.1=xdb" + elog "server.urlid.1=xdb" + elog + elog "/etc/hsqldb/sqltool.rc" + elog "======================" + elog "urlid xdb" + elog "url jdbc:hsqldb:hsql://localhost/xdb" + elog "username sa" + elog "password " + echo + elog "Also note that each hsqldb server can serve only up to 10" + elog "different databases simultaneously (with consecutive {0-9}" + elog "suffixes in the 'server.properties' file)." + echo + ewarn "For data manipulation use:" + ewarn + ewarn "# java -classpath ${HSQLDB_JAR} org.hsqldb.util.DatabaseManager" + ewarn "# java -classpath ${HSQLDB_JAR} org.hsqldb.util.DatabaseManagerSwing" + ewarn "# java -classpath ${HSQLDB_JAR} org.hsqldb.util.SqlTool \\" + ewarn " --rcFile /var/lib/hsqldb/sqltool.rc <dbname>" + echo + elog "The Hsqldb can be run in multiple modes - read 'Chapter 1. Running'" + elog "and Using Hsqldb' in the Hsqldb docs at:" + elog " http://hsqldb.org/web/hsqlDocsFrame.html" + elog "If you intend to run it in the Server mode, it is suggested to add the" + elog "init script to your start-up scripts, this should be done like this:" + elog " \`rc-update add hsqldb default\`" + echo + + # Enable CONFIG_PROTECT for hsqldb + env-update + elog "Hsqldb stores its database files in ${HSQLDB_HOME} and this directory" + elog "is added to the CONFIG_PROTECT list. In order to immediately activate" + elog "these settings please do:" + elog " \`env-update && source /etc/profile\`" + elog "Otherwise the settings will become active next time you login" + echo +} |