# README for Debian package maintainers

This document complements README.source.md with additional information relevant
only the the maintainer.

### Ensuring git contents match what has been uploaded to Debian/Ubuntu

It is possible (but extremely rare) that somebody uploads a MariaDB package to
Debian/Ubuntu and either does not use git at all, or simply forgets to push the
same changes on git, or makes an error in tagging the release or something.
Therefore, maintainers should check that the git contents match what has been
uploaded to Debian/Ubuntu before making new changes on git.

This can be done by using dgit. The example command below will fetch the latest
mariadb package available in Ubuntu 24.04 (Noble) base archive, security archive
or updates archive (whichever has a newer version):

    dgit -d ubuntu clone mariadb noble,-security,-updates
    cp -ra mariadb/* .
    rm -rf mariadb

You can then compare these two directories with a recursive diff or `git diff`.


Another option is to manually check on packages.debian.org or packages.ubuntu.com
what is the latest version, and download and extract it on top of the existing
debian/ directory with:

    curl -SL https://launchpad.net/ubuntu/+archive/primary/+sourcefiles/mariadb-10.6/\
    1:10.6.7-2ubuntu1.1/mariadb-10.6_10.6.7-2ubuntu1.1.debian.tar.xz -o - | tar xv --xz

You can simply run `git diff` to see the report on differences.

## Upstream release information

Upstream will publish maintenance releases at least 5 years after the major
version release, and security updates are likely to come even after that as
long as major distributions ship the version.

See table at
https://mariadb.com/kb/en/mariadb/development/mariadb-maintenance-policy/

Release notes are available at
https://mariadb.com/kb/en/mariadb/development/release-notes/

## Comparing to upstream Debian packaging changes

After importing a new upstream version, it is good to review Debian packaging
fixes done by upstream:

    git difftool --dir-diff upstream/latest -- debian/
    git log --oneline --first-parent 11.4 -- debian/
    git cherry-pick -x id1 id2 id3

## Maintaining translations

Running `debconf-updatepo --verbose` will refresh the translation files.

A call for translations can be initiated with e.g. `podebconf-report-po --call -v --smtp=smtp.kolumbus.fi`.

### Launchpad testing matrix

Since Launchpad only has Ubuntu releases, packages for specific Debian releases
needs to be tested on the Ubuntu release which most closely matches the Debian
release in question. The following matrix maps what package should be tested
where:

- 11.4 for sid on Launchpad oracular
- 10.11 for noble on Launchpad noble
- 10.6 for jammy on Launchpad jammy
- 10.5 for bullseye on Launchpad hirsute (not available anymore)

## Uploading security releases to Debian

After you've got permission from the security team, upload with `dput security-master *.changes`.

For details see https://www.debian.org/doc/manuals/developers-reference/pkgs.html#bug-security

## Uploading security releases to Ubuntu

See example with documented procedure:
 * https://bugs.launchpad.net/ubuntu/+source/mariadb/+bug/2067125

### Upload priority

Do the security uploads in this order for having the best chance of catching
regressions before they spread out to too many users.

Upload priority for 11.4
- debian-13 trixie
- ubuntu-24.10 oracular

Upload priority for 10.11
- debian-12 bookworm
- ubuntu-24.04 noble

Upload priority for 10.6
- ubuntu-22.04 jammy

Upload priority for 10.5
- debian-11 bullseye


## Comparison to other distributions

For tracking security release information, finding solutions for build errors
on many architectures and for general quality control it can be useful to keep
an eye on what packagers in other distributions do:

Fedora:
  * https://apps.fedoraproject.org/packages/mariadb/
  * http://pkgs.fedoraproject.org/cgit/mariadb.git/
OpenSUSE:
  * https://build.opensuse.org/package/show/server:database/mariadb
Arch Linux:
  * https://projects.archlinux.org/svntogit/packages.git/?h=packages/mariadb
Mageia:
  * http://svnweb.mageia.org/packages/cauldron/mariadb/current/

See also: https://repology.org/project/mariadb/badges
