# Applying the multi-arch patch series to the salsa clone

Three commits, generated against the `debian/` packaging of mariadb 1:11.8.8-1.
All changes live under `debian/` (no upstream/quilt patch needed — the header
split happens at build time in debian/rules).

  0001-libmariadb-dev-make-Multi-Arch-same-co-installable.patch
  0002-libmariadb-dev-compat-make-Multi-Arch-same-co-instal.patch
  0003-changelog-document-multi-arch-co-installability-fix-.patch

## Apply

    git clone git@salsa.debian.org:<your-fork>/mariadb-server.git
    cd mariadb-server
    git checkout -b multiarch-dev-coinstall    # branch off the debian packaging branch
    git am /path/to/patches/0001*.patch /path/to/patches/0002*.patch /path/to/patches/0003*.patch

If `git am` fuzz-fails (salsa HEAD newer than 11.8.8-1), fall back to:

    git apply --3way /path/to/patches/000*.patch
    # then commit, reusing the messages from the .patch headers

Note: the changelog commit (0003) targets 1:11.8.8-2 / UNRELEASED with my name.
The team runs `gbp dch`; drop or regenerate that commit if they prefer.

## Build & verify (the CI gate the maintainer flagged)

    gbp buildpackage --git-pbuilder ...        # or sbuild, on amd64 AND arm64
    # then in a clean container with both arches enabled:
    dpkg --add-architecture arm64 && apt-get update
    apt-get install ./libmariadb-dev_*_amd64.deb ./libmariadb-dev_*_arm64.deb \
                    ./libmariadb-dev-compat_*_{amd64,arm64}.deb
    # expect: co-install succeeds; shared-path files byte-identical across arches

## Open the MR

Push the branch to your fork and open an MR against
salsa.debian.org/mariadb-team/mariadb-server. Use MR-libmariadb-multiarch.md
(one dir up) as the description.

## Locally verified already (by transforming the real 11.8.6 debs to this end state)
  - shared-path files byte-identical across amd64/arm64
  - all four debs co-install together
  - #include <mysql.h> compiles+links; mariadb_config output parity (--version=11.8.6)
Still required: a real source build through salsa CI on amd64 + arm64.
Before final: diff the script's flag set vs the upstream mariadb_config binary
(e.g. confirm nothing relies on a flag the script doesn't implement).
