Differences between revisions 82 and 83
Revision 82 as of 2015-04-04 18:38:00
Size: 14071
Editor: ?OttoKekalainen
Comment:
Revision 83 as of 2015-04-26 16:00:37
Size: 14291
Editor: ?OttoKekalainen
Comment:
Deletions are marked like this. Additions are marked like this.
Line 26: Line 26:
 * [2015-04-26] 10.0.16 released as part of Debian 8 "Jessie"
Line 193: Line 195:

 1. Use Travis CI for building and testing packages under development, e.g. https://github.com/openquery/mariadb-server/blob/travis-ci-10.0/.travis.yml

Contributions to MariaDB packaging are welcome! Just state your interest on the pkg-mysql-maint mailing list or send git pull requests directly.

Status

  • [2013-12-22] 5.5.32 first version to enter Debian unstable
  • [2014-02-05] 5.5.35 ready for upload
  • [2014-02-18] 5.5.35 uploaded to unstable
  • [2014-03-05] 5.5.36 ready for upload
  • [2014-03-12] 10.0.9 ready for upload
  • [2014-03-13] 5.5.36 uploaded to unstable
  • [2014-03-24] 5.5.36 first version to enter Debian testing
  • [2014-04-01] 10.0.10 ready for upload
  • [2014-04-18] 5.5.37 ready for upload
  • [2014-04-24] 10.0.10 uploaded to experimental and thus entered the NEW queue
  • [2014-04-25] 5.5.37 uploaded to unstable
  • [2014-07-18] 5.5.38 uploaded to unstable
  • [2014-08-11] 5.5.39 uploaded to unstable
  • [2014-08-26] 10.0.10 first version to enter Debian experimental
  • [2014-08-26] client-lgpl first version to enter Debian experimental
  • [2014-09-01] 5.5.39-2 uploaded to unstable
  • [2014-10-01] 10.0.14-1 uploaded to experimental
  • [2014-10-22] 10.0.14-2 uploaded to unstable
  • [2014-11-01] 10.0.14-2 first version to enter Debian testing
  • [2014-12-10] 10.0.15 uploaded to unstable
  • [2015-04-26] 10.0.16 released as part of Debian 8 "Jessie"

Debian

* Complete Debian package listings: mariadb

5.5

10.0

5.5 Galera

  • ITP: 740472

  • Progress has gone past this, not relevant anymore.

10.0 Galera

  • ITP: 740474

  • Progress has gone past this, not relevant anymore.

10.1 (includes Galera WSREP consumer patches)

Galera package (WSREP provider)

MariaDB client LGPL version

Downstream

Ubuntu inherits packages from Debian:

Note that Ubuntu automatically also provides debug packages. For details see

Ubuntu micro release procedure (security update):

Binaries for public testing

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.

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

  # Debian unstable, all packages in one repository
  deb http://labs.seravo.fi/~otto/mariadb-repo/ sid-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ sid-i386/

  # Debian unstable, per-package repositories
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-5.5-sid-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-5.5-sid-i386/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-10.0-sid-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-10.0-sid-i386/

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

  # Ubuntu latest LTS
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-5.5-trusty-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-5.5-trusty-i386/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-10.0-trusty-amd64/
  deb http://labs.seravo.fi/~otto/mariadb-repo/ mariadb-10.0-trusty-i386/

For a full list of available repositories, please browse http://labs.seravo.fi/~otto/mariadb-repo/

There is also a Launchpad page that provides public build logs and testable binaries via PPA repository. See https://launchpad.net/~mysql-ubuntu/+archive/ubuntu/mariadb/+builds?build_text=&build_state=all

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/README.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.

  • However in Oct 2014 the libmariadbclient package was completely removed in favor of mariadb-client-lgpl library package: http://anonscm.debian.org/cgit/pkg-mysql/mariadb-10.0.git/commit/?id=24ed76b33cb076ef886b9637d96aa310cb8efa88

  • 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

Long-term items

  1. Create systemd scripts? Copy from mysql-5.6 package or from upstream MariaDB if closes https://mariadb.atlassian.net/browse/MDEV-427

  2. In which package should the file libmysqld.so live? Should that package depend also on mariadb-server and draw in all of server because the shared lib uses stuff from the server package?
  3. Drop old legacy: mysqld.sym.gz, INFO_SRC, INFO_BIN. Remove in rules legacy lines about STATIC_MYSQLD (was for autotools, does not work with cmake anymore)

  4. Rewrite parallel job support for cmake and skip old make style with -j and jobserver.

  5. Check if dirs files are really needed nowdays (e.g. mariadb-server-10.0.dirs)

  6. Use utf-8 as default in my.cnf as Gentoo does and most users probably want (instead of current latin-1)?

  7. Start using cyassl from Debian instead of bundled library (not possible according to upstream yet). Bundled YaSSL is used instead of OpenSSL.

  8. Add autopkg tests to detect changes introduced by other uploaded packages: http://ci.debian.net/doc/ (examples at http://anonscm.debian.org/cgit/pkg-mysql/mysql-5.5.git/tree/debian/tests)

  9. Implement metadata.yml DEP12). Confirm with Duck that all URLs are functional.

  10. Review all install scripts (pre/post/inst/rm) and remove all legacy stuff and replace the long echos with file templates (or at least use printf instead of echo). This was postponed until mysql-5.5->5.6 transition is done and whole mysql-maint team can participate, as the install scripts are (almost) the same across all packages.

  11. Implement config and data files de-coupling across the MySQL variants, see http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/2014-December/007392.html)--

  12. Add question to installer to make feedback plugin opt-in very easy.
  13. Old hardening-wrapper supported PIE protection, but it does not work anymore with dpkg-buildflags. Research how hardening could be as optimal as possible now, see https://wiki.debian.org/HardeningWalkthrough

  14. Use Travis CI for building and testing packages under development, e.g. https://github.com/openquery/mariadb-server/blob/travis-ci-10.0/.travis.yml