** Description changed:
+ [Impact]
+
+ When cross-building a package with a Build-Depends on mysql-server,
+ mysql-client, or mysql-client-core, apt build-dep -a <CROSS_ARCH>
+ attempts to install binaries for the target architecture instead of
+ using those of the native build-architecture. This can make dependency
+ resolution fail or select a target-architecture executable that cannot
+ run on the build host, blocking cross-builds which use mysqld or MySQL
+ client tools.
+
+ The fix should be backported to mysql-9.7 in stonking and mysql-8.4 in
+ resolute so that packages which run the MySQL server binary and client
+ tools during their build or tests can use the native executable. This
+ avoids unnecessary target-architecture installations and conflicts
+ without changing MySQL behavior for existing native installations.
+
+ The issue is fixed by adding Multi-Arch: foreign to mysql-server, mysql-
+ client, and mysql-client-core. This allows the native build-architecture
+ package to satisfy the dependency for a package being built for another
+ architecture.
+
+ [Test Plan]
+
+ - Add arm64 as a foreign arch and install the current native packages:
+
+ sudo dpkg --add-architecture arm64
+ sudo apt update
+ sudo apt install software-properties-common mysql-server mysql-client
mysql-client-core
+
+ - Create a minimal source package to check the build:
+
+ mkdir -p /tmp/mysql-ma-test/debian
+ cat <<EOF > /tmp/mysql-ma-test/debian/control
+ Source: mysql-ma-test
+ Section: devel
+ Priority: optional
+ Build-Depends: mysql-server, mysql-client, mysql-client-core
+ Standards-Version: 4.7.0
+ EOF
+
+ - Check the dependency resolution
+
+ apt-get build-dep --simulate -a arm64 /tmp/mysql-ma-test
+ dpkg-query -W -f='${Package}:${Architecture}: ${Multi-Arch}\n' mysql-server
+ dpkg-query -W -f='${Package}:${Architecture}: ${Multi-Arch}\n' mysql-client
+ dpkg-query -W -f='${Package}:${Architecture}: ${Multi-Arch}\n'
mysql-client-core
+
+ - With the fix this should show:
+
+ mysql-server:amd64: foreign
+ mysql-client:amd64: foreign
+ mysql-client-core:amd64: foreign
+
+
+ [Where problems could occur]
+
+ The upload changes apt and dpkg dependency metadata specifically, so
+ problems would most likely occur during package installation. If Multi-
+ Arch: foreign is inappropriate for a caller, apt could satisfy a target-
+ architecture dependency with a native mysqld when the caller actually
+ requires a target-architecture binary. That would show up as an
+ unexpected native package selection, an exec-format failure, or a
+ failing cross-build test. Same for mysql client binaries.
+
+ The changed metadata can also affect package resolver choices during
+ installation or upgrade on multiarch-enabled systems. An incorrect
+ result could add target-architecture MySQL packages, remove native
+ packages, or make the packages unsatisfiable.
+
+ [Other Info]
+
+ This bug is similar to LP: #2174047, but for mysql packages with the
+ version suffix removed.
+
+ This was fixed in tenacious with the release of 9.7.4.1-2 from Debian
+
+ [Original Description]
+
Hello,
I reported this bug already in the predecessor package mysql-server-8.0
(https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/2099894).
The problem is still the same:
Package mysql-server has no Muti-Arch flag set, but the flag should be
Multi-Arch: foreign.
The Problem:
I want to cross-compile a package which has a Build-Depends on mysql-server,
but since mysql-server has no Multi-Arch set apt build-dep -a <CROSS_ARCH> ./
tries to install mysql-server for architecture CROSS_ARCH. But this will not
work since /usr/bin/mysql differs for CROSS_ARCH and my native architecture,
since its compiled code.
Justification:
Setting Multi-Arch: foreign, forbids installing mysql-server in an other
architecture than the native one, especially it would prevent conflicts with an
already installed native version of mysql-server.
Greetings,
André
** No longer affects: mysql-8.0 (Ubuntu)
** No longer affects: mysql-8.0 (Ubuntu Jammy)
** No longer affects: mysql-8.0 (Ubuntu Noble)
** Changed in: mysql-9.7 (Ubuntu Stonking)
Assignee: (unassigned) => Lena Voytek (lvoytek)
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2174381
Title:
Package mysql-server has no Muti-Arch flag set
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-8.4/+bug/2174381/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs