Differences between revisions 40 and 41
Revision 40 as of 2014-03-10 19:05:36
Size: 9264
Editor: ?OttoKekalainen
Comment:
Revision 41 as of 2014-03-12 16:49:56
Size: 9903
Editor: ?OttoKekalainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
2014-03-05: MariaDB 5.5.36 ready for upload
2014-03-12: MariaDB 10.0.9 ready for upload
Line 7: Line 9:
The directory http://labs.seravo.fi/~otto/mariadb-repo/ is browseable and there you can find build logs and both binary and source packages. Build logs have the git hash appended so it is possible to track build logs per commit.

==== 5.5 ====
Line 13: Line 18:
 * The directory http://labs.seravo.fi/~otto/mariadb-repo/ is browseable and there you can find build logs and both binary and source packages. Build logs have the git hash appended so it is possible to track build logs per commit.
==== 10.0 ====
 * ITP: DebianBug:740473
 * Current master (for ''debian/*'' packaging) at http://git.debian.org/?p=pkg-mysql/mariadb-10.0.git (mirrored at https://github.com/ottok/mariadb-10.0 for easy public pull requests)
 * Ready for review

==== 5.5 Galera ====
 * ITP: DebianBug:740472
 * Current master (for ''debian/*'' packaging) at http://git.debian.org/?p=pkg-mysql/mariadb-galera-5.5.git (mirrored at https://github.com/ottok/mariadb-galera-5.5 for easy public pull requests)
 * Otherwise ready, but useless until the package 'galera' lands in Debian. Postponed until that happens (depends on Percona Cluster package refactoring).

==== 10.0 Galera ====
 * ITP: DebianBug:740474
 * Postponed until 5.5 Galera is done.
Line 49: Line 67:
Basically you can just run {{{gbp-clone --pristine-tar git://github.com/ottok/mariadb-5.5.git}}} to check out the code in all branches and then run {{{git-buildpackage --git-pristine-tar}}} to build directly on your own computer, on with {{{--git-pbuilder}}} to use separate chroot environments for installing build dependencies and building. Without pbuilder you need to manually install the build dependencies with apt-get. Basically you can just run {{{gbp-clone --pristine-tar git://github.com/ottok/mariadb-X.git}}} to check out the code in all branches and then run {{{git-buildpackage --git-pristine-tar}}} to build directly on your own computer, on with {{{--git-pbuilder}}} to use separate chroot environments for installing build dependencies and building. Without pbuilder you need to manually install the build dependencies with apt-get.
Line 53: Line 71:
Also see the Debian.maintaner file inside the package.
Line 70: Line 89:
Regarding symbol and soname changes in MariaDB:
 * https://mariadb.atlassian.net/browse/MDEV-5529
Line 85: Line 107:

 1. --(Rename git repo from pkg-mariadb to pkg-mariadb-5.5)--

 1. --(Replace current git branch upstream with git-buildpackage pristine-tar format.)--

 1. --(Wait for .35 to be released by upstream. Then update packages directly to .35.)--
Line 115: Line 131:
 1. Package MariaDB 10.0 for Debian - in progress

 1. Package MariaDB Galera Cluster for Debian - in progress

Status

2014-02-05: MariaDB 5.5.35 ready for upload once enough testing has been done (will replace .32) 2014-03-05: MariaDB 5.5.36 ready for upload 2014-03-12: MariaDB 10.0.9 ready for upload

Debian

The directory http://labs.seravo.fi/~otto/mariadb-repo/ is browseable and there you can find build logs and both binary and source packages. Build logs have the git hash appended so it is possible to track build logs per commit.

5.5

10.0

5.5 Galera

10.0 Galera

  • ITP: 740474

  • Postponed until 5.5 Galera is done.

Downstream

Ubuntu waiting for Debian to progress:

Binaries for public testing

Latest test packages can be installed after adding the sources.list line corresponding to your distro:

  # Debian stable
  deb http://labs.seravo.fi/~otto/mariadb-repo/ wheezy-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ wheezy-i386/

  # Debian unstable
  deb http://labs.seravo.fi/~otto/mariadb-repo/ sid-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ sid-i386/

  # Ubuntu stable LTS
  deb http://labs.seravo.fi/~otto/mariadb-repo/ precise-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ precise-i386/

  # Ubuntu unstable
  deb http://labs.seravo.fi/~otto/mariadb-repo/ trusty-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ trusty-i386/

Building yourself

Basically you can just run gbp-clone --pristine-tar git://github.com/ottok/mariadb-X.git to check out the code in all branches and then run git-buildpackage  --git-pristine-tar to build directly on your own computer, on with --git-pbuilder to use separate chroot environments for installing build dependencies and building. Without pbuilder you need to manually install the build dependencies with apt-get.

See more commands in script at http://labs.seravo.fi/~otto/mariadb-repo/build.sh

Also see the Debian.maintaner file inside the package.

Packaging background

How MariaDB works

  • Simply writing apt-get install mariadb-server will install MariaDB 5.5.x and replace any existing MySQL 5.5.x installation and inherit the databases and configuration files of it. Installing mysql-server will do the opposite. However running mysql-server might raise issues if my.cnf contains something MariaDB-specific or if the database files have some MariaDB-specific table metadata. In those cases MySQL should fail gracefully by simply refusing to start until conditions are correct.

  • Most MariaDB packages have in the control files Provides+Breaks+Replaces for equivalent MySQL packages, so that it is impossible to install both at the same time. Many of the packages contain the same (and thus conflicting) file names and paths as in equivalent MySQL packages.

  • Upstream MariaDB 5.5.x advertises to be a binary-compatible replacement for MySQL 5.5.x (but not anymore for MySQL 5.6 vs. MariaDB 10.0). Anything that works with MySQL 5.5 will work with MariaDB 5.5. Migrating from MySQL 5.5 to MariaDB 5.5 will always work. The contrary might not always be true, as at least MariaDB 5.5 libraries (/usr/lib/x86_64-linux-gnu/libmariadbclient.so.18.0.0) have more symbols (e.g. async support) than the MySQL version and some MariaDB enhanced database tables may be unreadable by MySQL 5.5.
  • Possible "interfaces" of MySQL 5.5 are the server and client binaries (can be used e.g. in shell scripts), the actual server interface (used remotely via port 3306 or locally via socket /var/run/mysqld/mysqld.sock) and the binary interfaces (/usr/lib/x86_64-linux-gnu/libmysqlclient.so.18 and some symbolic links to it, installable from package libmysqlclient18). MariaDB has all of these interfaces, plus the extra libmariadbclient18.so.18.

  • As upstream MariaDB 5.5 is quite an young fork of MySQL, all of the internal file names still have mysql in them, the database files are in the same location, the configuration file /etc/mysql/my.cnf is the same, the port 3306 is the same etc.

  • In Debian packages, libmysqlclient.so.* has been renamed to libmariadbclient.so.* to enable both versions to be installable side-by-side. Initial checking did not find that MySQL nor MariaDB would themselves use the shared libs, but have their own libs statically linked in. These shared libs are meant only for third party usage, and the libs themselves will use whatever server is installed (MySQL or MariaDB). While libmysqlclient18 and libmariadbclient18 are co-installable, the -dev versions have files with same filenames and they conflict, thus making -dev versions NOT co-installable.

  • Mariadb-common is an empty metapackage that depends on mysql-common. MariaDB 5.5 can always use a my.cnf that originates from MySQL 5.5, but it might not work the other way around if the user has added some MariaDB-specific parameters in the my.cnf. The default my.cnf should always be compatible with all MySQL and MariaDB versions (5.5, 5.6, 10.0 and foreseeable future). Any options which are unique to one or the other must never appear in a shipped my.cnf.

  • To mitigate migration confusion, installing MariaDB will show an dialog notifying about the potential one-wayness of the migration.
  • As MariaDB stores data in /var/lib/mysql, there might be issues if somebody wants to run MySQL after using MariaDB for some time. We could ask upstream to copy /var/lib/mysql into /var/lib/mariadb to be on the safe side. In Debian installing MySQL after MariaDB could also be seen as a downgrade, and trigger the mariadb-server-5.5.preinst:77 downgrade warning. The current solution is simply to issue a warning at MariaDB installation time that the migration for some parts in a one-way migration.

Regarding circular dependencies:

Regarding symbol and soname changes in MariaDB:

In the future it might be possible to run something like

   licensecheck --copyright -r . -c . | /usr/lib/cdbs/licensecheck2dep5 > /tmp/copyright

..but at the moment it does not work, so the license file is a hybrid with automation plus manual clean up.

Script license-reconcile can be used to lint the copyright file, but it cannot generate a correct file.

Related issue filed upstream: https://mariadb.atlassian.net/browse/MDEV-5483

TODO

Urgent items

  1. SONAME is defined inside the shared library and to change if the build source itself must be updated. Filed issue https://mariadb.atlassian.net/browse/MDEV-5482)

  2. Test .35 and then upload .35 to Debian, also upload to Ubuntu and make sure all is OK for 14.04 release.

Long-term items

  1. Review debian/patches, do we really need them? At least remove the temporary mysqld_safe-extrafix which was added only to satisfy dpkg-source nag.

  2. Figure out optimal way to add Ubuntu patches upon the Debian base and after that file issue upstream to get rid of debian/dists/(Debian|Ubuntu) folder.
  3. Figure out and document the optimal workflow to from importing upstream changes (using git-dch with correct parameters etc), committing, testing and all the way to uploading into Debian.

  4. Discuss with upstream to bump up the Debian policy version, rename *.files into *.install etc.

  5. Talk with upstream about autobake.sh and possible removal or simplification to run same build process as Debian does.

  6. Ask upstream to have one autobake run for our git also, so that we can benefit from the continuous integration system there https://mariadb.com/kb/en/package-testing-with-buildbot-and-kvm/

  7. In general, minimize delta with upstream to make maintenance and updates easier.
  8. Ask upstream to GPG sign their tar.gz packages. Then we could use the new uscan feature: As of devscripts 2.13.3, uscan now supports verifying cryptographic signatures on upstream source via the pgpsigurlmangle option in debian/watch. See uscan(1) for details and examples.

  9. Add ci.debian.net integration like MySQL has: http://ci.debian.net/#package/mysql-5.5