Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 383445

Summary: dev-db/hsqldb-2.4.0 version bump
Product: Gentoo Linux Reporter: ScytheMan <scytheman666>
Component: Current packagesAssignee: Java team <java>
Status: CONFIRMED ---    
Severity: normal CC: jstein, luciano, the.dmol
Priority: Normal    
Version: unspecified   
Hardware: All   
OS: Linux   
Package list:
Runtime testing required: ---
Attachments: hsqldb-2.2.8.ebuild
Alternative ebuild for hsqldb-2.8.8

Description ScytheMan 2011-09-18 04:33:46 UTC
Please add it to the tree.

You might need to slot it as most software depends on hsqldb:1.8
Comment 1 Miroslav Šulc gentoo-dev 2011-10-19 11:06:03 UTC
  19 Oct 2011; Miroslav Šulc <> +hsqldb-
  Version bump

with regard to hsqldb:2 series, it would be best if someone who is actively using hsqldb would package it, as this is not simple package and needs some knowledge about hsqldb. it does not necessarily have to be a gentoo developer, someone from the community can try to package it with assistence from gentoo developers.
Comment 2 Ivan Baidakou (dmol) 2012-07-03 14:56:03 UTC
Created attachment 317037 [details]
Comment 3 Ivan Baidakou (dmol) 2012-07-03 14:56:35 UTC
Created attachment 317039 [details]
Comment 4 Ivan Baidakou (dmol) 2012-07-03 14:57:29 UTC
Created attachment 317041 [details]

Here is the initial version of hsqldb-2.2.8. Any comments and remarks are welcome!
Comment 5 Ralph Sennhauser (RETIRED) gentoo-dev 2012-07-05 18:17:53 UTC
(In reply to comment #4)
> Created attachment 317041 [details]
> files/hsqldb-2.2.8-servet-api.patch
> Here is the initial version of hsqldb-2.2.8. Any comments and remarks are
> welcome!

Thanks for picking this up.

Nice, that you dropped all that elog stuff. Some points that stand out immediately:

- 'SRC_URI="mirror://sourceforge/${PN}/${P}.tar.gz"' doesn't seem to exist.
- servlet-api 2.3 and 2.4 shouldn't be used anymore.
- don't use cd, it isn't needed. jar-from has --into
- the patch and jar-from isn't needed if you do rewrite the classpath. (jar-from is generation 1 style).
- don't use chown / chmod, use fowners / fperms if you have to, though proper insopts are preferred.
- don't keepdir non-empty directories.
- use ${T} for temporary files.
- JAVA_PKG_DEBUG is intended to be set on command line.

Incidentally, I started with an ebuild about a week ago as well, unfortunately I don't know enough about the package to make it a walk in the park, so it didn't progress that far, just enough to see what's probably needed.

About the init script I have the feeling this should be a pure runscript and not a wrapper around the shipped example one. There is to much stuff that needs to be bent to make it play nicely was my impression.
Comment 6 Ralph Sennhauser (RETIRED) gentoo-dev 2012-07-05 18:20:32 UTC
Created attachment 317334 [details]
Alternative ebuild for hsqldb-2.8.8

as far as I got ...
Comment 7 Ivan Baidakou (dmol) 2012-07-06 09:02:16 UTC
Yep, sorry about SRC_URI.

The officially provided build ( on source-forge contains not tests (test sources) neither doc-book sources for guide.

The tag in version control contains thats' all:

I'd used it in my ebuild. 

Thank you very match for your comments, I'll fix my ebuild in a few days in accordance with them and some hints/ideas from your ebuild.
Comment 8 Ivan Baidakou (dmol) 2012-07-09 17:15:06 UTC
Created attachment 317714 [details]
Comment 9 Ivan Baidakou (dmol) 2012-07-09 17:15:46 UTC
Created attachment 317716 [details, diff]
Comment 10 Ivan Baidakou (dmol) 2012-07-09 17:16:31 UTC
Created attachment 317718 [details]
Comment 11 Ivan Baidakou (dmol) 2012-07-09 17:22:07 UTC
Here is the updated ebuild, which comes with native gentoo init script. Currently it starts server only in native hsql mode (no web-server yet). 

Remaining problems:
1. no user guide is generated from docbook's xmls.
2. Not all tests to pass (something about 97%). Some failures/errors are caused by classpath rewriting (it does not load resource from classpath?!)
3. There is strange QA notice, which I don't know caused by:

 * QA Notice: command not found:
 * 	/tmp/portage/dev-db/hsqldb-2.2.8/temp/environment: line 4052: --main: command not found
4. no webserver mode.

Comments are welcome.
Comment 12 Ivan Baidakou (dmol) 2012-07-10 17:04:06 UTC
Created attachment 317828 [details]

Updated version to allow server start in webserver mode.
Comment 13 Ivan Baidakou (dmol) 2012-07-10 17:06:23 UTC
Created attachment 317830 [details]

Updated version to allow server start in webserver mode.

The problem with QA notice has gone... Probably, it was caused by mixture of ebuild invocations from root and regular user.
Comment 14 Ralph Sennhauser (RETIRED) gentoo-dev 2012-07-12 15:33:08 UTC
Some more comments.

-${PV}/?view=tar might have the time where the tarball was generated encoded in the tar header. Make sure the checksums remain constant with each download or people will get manifest errors.
- you are still using cd.
- use servlet-api 2.5 if you have to, use 3.0 otherwise. 3.0 requires java6
- the patch can be replaced by setting a property.
- what is the env.d file used for?

As for the runscript
- it's posix shell, so bashism like [[ ]] should be avoided.
- maybe use RC_SVCNAME instead of PN
- maybe you want to document more of the variables used in conf.d, so probably worth an own file.
- use sed to set needed variables in init.d, conf.d
- missing functionality from sample init script?

It is a hard pick, even more so as 1.8 isn't the best example either. On the bright side, you are confronted with many aspects of packaging software. ;)

Thanks again for working on this.
Comment 15 Ivan Baidakou (dmol) 2012-07-21 23:07:37 UTC
Created attachment 318868 [details]
Comment 16 Ivan Baidakou (dmol) 2012-07-21 23:08:16 UTC
Created attachment 318870 [details]
Comment 17 Ivan Baidakou (dmol) 2012-07-21 23:08:48 UTC
Created attachment 318872 [details]
Comment 18 Ivan Baidakou (dmol) 2012-07-21 23:16:13 UTC
(In reply to comment #14)

Thanks for advices. Yep, you was right, the on-fly generated tar-archive from svn repository has always different checksums. Because the sources differ greatly from the official distribution and from the svn, I had to use mostly your ebuild. I've updated the servlet-api to 3.0, and followed your recommendations (mostly) and now the main work was related to configuration and init scripts. 

I'm not yet sure, that it OK. Does it need to have force_stop as tomcat init script?
Comment 19 Ivan Baidakou (dmol) 2012-07-21 23:17:52 UTC
BTW, I started to commit into my git repository: git+ssh://
Comment 20 ScytheMan 2012-09-06 18:24:47 UTC
Please drop the full stop from DESC
Inherit user.eclass for enewuser & enewgroup (it is split off eutils.eclass)
All sed commands need || die

Maybe replace hsqldb with ${PN}
Comment 21 ScytheMan 2012-09-06 18:31:48 UTC
hsqldb-2.2.9 was released
Comment 22 Ivan Baidakou (dmol) 2012-09-08 18:01:58 UTC
Created attachment 323222 [details]
Comment 23 Ivan Baidakou (dmol) 2012-09-08 18:05:25 UTC
(In reply to comment #20)
> Please drop the full stop from DESC
Sorry, I don't understand that. What do you mean? 

> Inherit user.eclass for enewuser & enewgroup (it is split off eutils.eclass)
> All sed commands need || die
done. Thanks for hints. 

(In reply to comment #21)
> hsqldb-2.2.9 was released
Rather trivial changes are required (just rename ebuild). But I got the problem with shutdown with hsqldb-2.2.9 : sqltool reports error on non-interactive shutdown, even through the server shuts down correctly.
Comment 24 James Le Cuirot gentoo-dev 2016-05-03 20:46:45 UTC
*** Bug 562116 has been marked as a duplicate of this bug. ***