Thanks — happy to drive this. Before I push an MR, here's the approach I have
  in mind; since you've hit conflicts on past attempts, I'd rather confirm the
  direction (and hear what previously went wrong) than re-tread it.

  First, the complete scope. I diffed every shared-path (non-triplet) file in
  the dependency closure across amd64 and arm64. The entire co-install blocker
  is just three things:

    * libmariadb-dev-compat: 0 files differ between arches. It only lacks
      Multi-Arch: same.
    * libmariadb-dev: exactly 2 files differ, nothing else (148 shared files
      checked; my_config.h and all other headers are byte-identical):
        - /usr/bin/mariadb_config            (compiled ELF, differs entirely)
        - /usr/include/mariadb/mariadb_version.h  (differs only in
          MARIADB_MACHINE_TYPE and MARIADB_PLUGINDIR)

  If past attempts "ran into conflicts," my guess is an incomplete inventory —
  a missed differing file. I believe the list above is exhaustive for 11.8.8-1.

  Proposed fix:

  1. libmariadb-dev-compat — add Multi-Arch: same. Nothing else differs.
     Open question for you: does its self-Provides + Conflicts/Breaks of
     libmariadbclient-dev-compat / libmariadb-client-lgpl-dev-compat need
     adjusting once it's M-A: same, or is two instances of the same package
     providing the same virtual fine? I'll verify empirically either way.

  2. libmariadb-dev — add Multi-Arch: same and resolve the 2 files:
     a) mariadb_config: replace the compiled binary with an
        architecture-independent POSIX shell script that derives the multiarch
        triplet at runtime (cc -print-multiarch, falling back to
        dpkg-architecture -qDEB_HOST_MULTIARCH). This is the historical
        mysql_config form and makes the file byte-identical across arches.
     b) mariadb_version.h: relocate it to the multiarch include dir
        /usr/include/<triplet>/mariadb/ (auto-searched by the compiler), so
        MARIADB_PLUGINDIR / MARIADB_MACHINE_TYPE may legitimately differ. I'd
        prefer this over neutralizing the defines, which could break consumers
        that read MARIADB_PLUGINDIR — but if you'd rather keep the header in the
        common path and drop/derive those defines, I'm fine with that too.

  Two questions:
    - Does (2a) the shell-script mariadb_config conflict with anything you tried
      before, or with a reason it was made a compiled program?
    - For (2b), do you prefer relocation or neutralizing the defines?

  Once you confirm the direction I'll build it, verify amd64+arm64 actually
  co-install in a clean trixie/sid container, and open the MR at
  salsa.debian.org/mariadb-team/mariadb-server.

  Thanks,
  Dick

Reply via email to