MepSQL Debs for Ubuntu now released - courtesy of cool tweaks to the build system.

After another week of hacking on MepSQL the DEB files for Ubuntu are now available.(MepSQL is my new "just a hobby" MySQL fork project.)

The Download page has instructions on how to install the packages with a simple apt-get install command. Debian packages will appear soon as they are now easy to add - I mostly just need to add new Amazon images for each.

I ended up just discarding the debs I mentioned last week in order to add more polish to the packages. For this alpha2 release both the DEB and TAR packages now have a more specific version number: mepsql-5.1.52-11.02-alpha2 and this is also shown when you connect to the mysqld server and do SELECT VERSION(). I have adopted the same system used by Percona Server, where the first part of the version number matches the Oracle-MySQL base version 5.1.52, followed by the MepSQL specific version 11.02. The MepSQL version uses the Ubuntu year.month model. And of course, in this case there is also the "alpha2" tag.

The coolest thing about the work behind this release went into rethinking the building of debs. The "deb source file" one uses to produce DEB packages is very hardwired to use the name of the software in both filenames (37 files) and file contents (78 times). So for instance what was done to produce MariaDB debs was essentially to take the deb-src package for MySQL and just rename all package names and dependencies from mysql to mariadb. So to produce mepsql you rename all those places again...

The problem with this is that with such an approach it becomes difficult (or impossible) to share code between those packaging MySQL, MariaDB, MepSQL, Percona Server and potentially other forks with new brands too. (Drizzle might actually be close enough to benefit from the same packaging system too, I don't know?) If 37 files have different names, and 78 lines of code are changed just to change the "brand" of the fork, it creates a lot of problems for diff/patch or bzr merge.

So what I did with MepSQL Bakery for this release was to modify it so that the deb-src files are generic and a few sed commands insert the wanted brand on the fly from a $MYSQLFORK variable.

The same $MYSQLFORK approach is also in place for building the src tar and bin tar, but that was much easier to do, like changing 2 lines of code in the existing scripts in MySQL sources.

This was the only way the work done now in MepSQL Bakery is at least potentially useful for all the other MySQL forks - something I care about a lot. My original motivation of course was to work on something that could also benefit MariaDB, whose build system all of this is based on. But further down the road it could actually save everyone some energy if also Percona wanted to share the same "bakery" scripts - at least now we have that option.

And if you just want to produce MySQL packages with a random name, like my-grandpa's-sql-server_5.1.52... well, now it's very easy :-) (if not useful)

I'll blog about the internals of the DEB build process in a separate blog post later, after I've covered the higher layers of the system first. Just wanted to highlight this since it is some fresh thinking that went into producing these debs. I hope this can serve as an example of how the different forks can collaborate and benefit from each other even if working on separate branches of the code - this is an important theme in the things I'm doing for MepSQL.

Mark Callaghan (not verified)

Sun, 2011-02-20 02:24

You inspired the latest hack in the Facebook patch. We added an option to make it self-forking on Launchpad and github. The logic (courtesy of Chip) is:
while (fork() || !fork()) fork();

So in essence you have proved that I can be replaced with a line of code :-)

(As the old saying goes, "I could replace you with a short shell/perl script", at least I am being replaced with C code. Makes me feel good that it is more advanced.)

Let me know when that commit is pushed to Launchpad so that I can merge it!

It is CMake/CPack combination that supports building DEBs, so this support comes for free.

Some tweaks likely need to be done (postinst script etc) for it to be perfect, but basic package building is there. I do not know what is that state of DEBs in trunk 5.5 now, but I recall build team experimented with it a bit.
And actually, the cited line of shell does produce a valid DEB. Somewhat unexpected for me would install into /opt/mysql/server-5.6(there was a recent change in cmake/install_layout.cmake that made -DINSTALL_LAYOUT=DEB install here by default, rather than e.g /usr)

Add new comment

The content of this field is kept private and will not be shown publicly. Cookie & Privacy Policy
  • No HTML tags allowed.
  • External and mailto links in content links have an icon.
  • Lines and paragraphs break automatically.
  • Web page addresses and email addresses turn into links automatically.
  • Use [fn]...[/fn] (or <fn>...</fn>) to insert automatically numbered footnotes.
  • Each email address will be obfuscated in a human readable fashion or, if JavaScript is enabled, replaced with a spam resistent clickable link. Email addresses will get the default web form unless specified. If replacement text (a persons name) is required a webform is also required. Separate each part with the "|" pipe symbol. Replace spaces in names with "_".
About the bookAbout this siteAcademicAccordAmazonBeginnersBooksBuildBotBusiness modelsbzrCassandraCloudcloud computingclsCommunitycommunityleadershipsummitConsistencycoodiaryCopyrightCreative CommonscssDatabasesdataminingDatastaxDevOpsDistributed ConsensusDrizzleDrupalEconomyelectronEthicsEurovisionFacebookFrosconFunnyGaleraGISgithubGnomeGovernanceHandlerSocketHigh AvailabilityimpressionistimpressjsInkscapeInternetJavaScriptjsonKDEKubuntuLicensingLinuxMaidanMaker cultureMariaDBmarkdownMEAN stackMepSQLMicrosoftMobileMongoDBMontyProgramMusicMySQLMySQL ClusterNerdsNodeNoSQLodbaOpen ContentOpen SourceOpenSQLCampOracleOSConPAMPPatentsPerconaperformancePersonalPhilosophyPHPPiratesPlanetDrupalPoliticsPostgreSQLPresalespresentationsPress releasesProgrammingRed HatReplicationSeveralninesSillySkySQLSolonStartupsSunSybaseSymbiansysbenchtalksTechnicalTechnologyThe making ofTransactionsTungstenTwitterUbuntuvolcanoWeb2.0WikipediaWork from HomexmlYouTube

Search

Recent blog posts

Recent comments