Yesterday I wrote down the approach used in the MepSQL build system to parameterize the TAR package name produced. Today I will follow up with how the same was done for building DEBs. The motivation is to create a system that can be used flexibly to create packages of any MySQL fork, with any brand name:
mariadb-server-*.deb or even just
mysql-server-*.deb (which I might do some day).
While yesterday's tricks with the TAR files were rather straightforward, with the process of building DEBs this turns out to be much more challenging. But not to worry, like my former collague Bernhard Ocklin used to say: This is software, anything is of course possible.
Dealing with the Cambrian Explosion 1/2: How to parameterize the package name in source and binary TAR files
As I mentioned before, it seems that thanks to Git and Bzr introducing distributed version control workflows, the open source community is now living in a phase where forking is easy and happens frequently - referred to by Brian Aker as the Cambrian Explosion of open source. We certainly see that happening in the MySQL Community.
Assuming you have the competence and know your way around a codebase, forking a proper open source project isn't that hard. You create your own project on GitHub or Launchpad and copy the source code. 1 But one thing you need to do is to change to using the new name (Drizzle, Percona, MariaDB, MepSQL....). Typically you want to keep using the original command line and file names (mysql, mysqld_safe, libmysql...), yet the product name as it appears in your installation packages is changed to distinguish it from the parent project.
In the life of an open source project a name change is a relatively rare occurrence. Most projects never fork or change their name. So it is not surprising that all the tools and methods we use while programming assume that the product name is a constant. It turns out it is hardwired into build scripts here and there. Sometimes excessively: when building DEB files the word "mysql" is used over a hundred different times!
- 1. As noted in previous posts, if everything isn't fully open source, which is the case with MySQL, you have a challenge in reproducing from scratch the missing parts, like documentation, build system, etc...
Just wanted to highlight that Percona Server has now added HandlerSocket to its most recent release, being the first "MySQL fork/distribution" to ship it in easy to consume binary downloads.
HandlerSocket brings NoSQL to MySQL, and does so with a vengeance! It was developed at DeNa, by Akira Higuchi and is already used in production in their MySQL servers. The announcement on my former collague Yoshinori Matsunobu's blog flaunts a 7x performance improvement over the standard SQL interface in MySQL. The most astonishing part is that their MySQL is now faster than Memcached, even if the latter doesn't store anything to disk, so with this NoSQL-for-MySQL solution it makes sense to remove the caching layer completely!