-
Notifications
You must be signed in to change notification settings - Fork 125
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Upload HammerDB to Debian/Ubuntu for official distro inclusion #237
Comments
Great suggestion. Yes HammerDB is GPL-3. Packaging for Linux distros was raised in this Issue #38 and now is a good time for the TPC-OSS subcommittee to discuss this. In particular as MariaDB has now been broken out from MySQL #234 this will be included from v4.2, so that would be a good release for inclusion to start from. |
Relevant references: |
Discussed at TPC-OSS Subcommittee meeting 11th May 2021. |
I was thinking of doing this packaging myself (I am a Debian Developer) but the docs at https://www.hammerdb.com/docs/ nor the README.md in the project itself do not have any section on howto compile HammerDB from sources. I don't see any CI system either from where I could look up how compilation is done and or what dependencies are used. The packaging in Arch is from 2015 and has no inline comments whatsoever and it seems to just re-use existing binaries from Sourceforge and does not actually compile the project. |
Yes, this was on the original Issues list when moving over to the TPC listed in #36 and #37 and is definitely something that should be adressed to bring in all source code for all of the packages used on both Linux and Windows. Now, I agree it is not clear where all of the dependent packages are from as the contents of bin and lib in the Release files are compiled separately. This is from a current manual build process rather than intentional obfuscation. it is highly desirable to be able to build all of the dependencies on both Linux and Windows from source automatically, so as a starting point I will provide an overview here of what packages are used and where they are located. Historically the dependent packages have been built manually for a major release and in some cases there has been no configured environment for a build for a particular OS (eg.tkblt on Windows) - meaning e.g. there is a lot of hardcoded Makefiles taken from elsewhere in the environment needing work to bring all of this into GitHub. This does not necessarily mean that we cannot start with Linux first and add Windows later (or vice versa) - up to now the thought process is that both should be added at the same time. (and of course it didn't get done until now). As a starting point to explain the dependencies - HammerDB uses Tcl/Tk as its glue language and everything in the directories src, modules as well as some of the packages in lib are in "pure Tcl" meaning that they are identical on both Linux and Windows. (This does not mean that they are necessarily always interpreted as "procs" are compiled into bytecode at runtime.) So at the highest level HammerDB gets the source for Tcl/Tk from here https://sourceforge.net/projects/tcl/files/Tcl/ and then configures and compiles both Tcl and Tk (v4.X uses Tcl/Tk 8.6.10) giving us the base bin lib and include directories and the tclsh8.6 and wish8.6 binaries in bin. tclsh8.6 is used for the CLI and Web Services, wish8.6 includes Tk and is used for the GUI. gcc is used to compile for Linux and the MSVC command line on Windows. The Tcl compilation also creates the following packages in lib. Everything is unmodified except for tdbcodbc which is used for SQL Server. There are 2 modifications that HammerDB makes to this package, to fix a bug with SQLULEN and to add an Execdirect command that is missing. Note that tpdbcmysql and tdbcpostgres are not used by HammerDB.
So then added to lib are the following "pure tcl" packages that are not compiled.
clearlooks is the graphical theme used in the non-scalable form. awthemes is the scalable themes using SVG graphics and redis0.1 is the interface to the hidden redis workload. (I tried the compiled redis interface but it was slower than the one included.) Then we have the database interfaces from these locations. We extensively updated db2tcl and all of the changes were submitted by pull request to the link below. mariatcl has been created from mysqltcl. The rest are unmodified.
All of these database interfaces require the client libraries of their respective database at compile time (except Oratcl) and at runtime. At runtime the librarycheck command checks if the dependencies are available for the database extensions to be loaded. This leaves the following additional compiled extensions:
On windows there is an additional compiled extension: and for completeness on Windows the Microsoft Visual C runtime libraries are added to the bin directory. It is definitely desirable to bring this source into the project and I will initiate the discussion on how this can be done so all of the dependencies can be compiled together. This should then make packaging more viable. |
How is gcc used? I don't see any Makefile in the project, so can't use the default |
Yes that is correct so a build system such as CMake or Ninja has not been set up yet and yes this should be done. So at the moment it is a manual process. For example the first step of building is to get Tcl/Tk from here https://sourceforge.net/projects/tcl/files/Tcl/ and running configure generates the first Makefile here. /tmp/tcl8.6.10/unix$ ls -1 So as a summary list what is currently manually compiled for Linux for version 4.2/4.3, and the source locations are as follows:
So the next step before packaging is for us to pull all the current source packages into the GitHub repository and set up a build system, so everything can be built at once. At the moment this is not the case, so the packages are manually compiled and the binaries made available in the Release files. |
Reference to a research paper CMake-Based Cross Platform Build System for Tcl/Tk showing similar steps to what is needed for #36 as a first step before packaging. |
There is no (or little) need to waste time manually downloading tk/tcl libraries from Sourceforge when most of them are already in Debian. It is simply enough to define e.g. Some examples:
|
Some of the packages such as tdbc have been modified, also there is oratcl and db2tcl with most of the database interfaces requiring the database libraries to be installed to be compiled. |
I'm going to put in a small plug for the SUSE's Open Build Service here. It's fairly easy to define a project which runs your build steps and emits packages in a repository. I'm a big fan of that particular system because you get one free place which builds packages for Debian-derived systems, quite a few RPM-based systems, and Arch (and appropriate repos for each). Easy to hook into Github so your project gets rebuilt upon release as well. Using kiwi, one can also create AMIs, Docker containers, and whatever from the same job (they provide a docker registry), which is of potential interest in #107. It's always a surprise to me that more people don't use that service. It's really quite nice, after a minor learning curve. :) I'd offer to help, but like everyone else I'm not sure how much time I can devote. If I end up integrating hammerDB into an infrastructure CI system like I'd like to do long term, I'll want a package - so maybe I'll get on it at that point (if someone else hasn't done it before that). |
Hi, Yes, so this hasn't been done as yet but is definitely a key topic at the moment. At the moment the binaries in bin and lib are compiled manually, this is fast becoming unsustainable, so the main task is to bring all the dependencies into the project and enable an automated build. There is some complexity to this as the project supports both Windows and Linux so needs to be done for both. Nevertheless, the plan is to look into this ASAP. |
BAWT is now working as a solution to build all packages from source with one command.
|
Pull Request #323 adds build automation for Linux, with instructions on how to run it. Windows will be done subsequently. |
According to https://github.com/TPC-Council/HammerDB/blob/master/LICENSE the HammerDB software is GPL-3. Yet it does not seem to be included in almost any Linux distro. I see only ArchLinux at https://repology.org/project/hammerdb/versions
Are there any plans to package and submit HammerDB for Debian/Ubuntu?
The text was updated successfully, but these errors were encountered: