** Description changed:
+ [Impact]
+
+ When cross-building a package with a Build-Depends on mysql-server-8.0,
+ apt build-dep -a <CROSS_ARCH> attempts to install the server binary for
+ the target architecture instead of using the native build-architecture
+ binary. 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.
+
+ The fix should be backported to Jammy and Noble so that packages which
+ run the MySQL server binary during their build or tests can use the
+ native executable. This avoids unnecessary target-architecture
+ installations and conflicts without changing MySQL server behavior for
+ existing native installations.
+
+ The issue is fixed by adding Multi-Arch: foreign to mysql-server-8.0.
+ 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-8.0 mysql-client-8.0
+
+ - 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-8.0
+ 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-8.0
+
+ - With the fix this should show:
+
+ mysql-server-8.0:amd64: foreign
+
+ [Where problems could occur]
+
+ The upload changes apt and dpkg dependency metadata rather than MySQL
+ server code. 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.
+
+ 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 mysql-server-8.0 unsatisfiable.
+
+ [Other Info]
+
+ This bug is similar to LP: #2174381, but is specific to mysql-8.0's
+ server package.
+
+ [Original Description]
+
Package mysql-server-8.0 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-8.0, but since mysql-server-8.0 has no Multi-Arch set apt
build-dep -a <CROSS_ARCH> ./ tries to install mysql-server-8.0 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-8.0.
Greetings,
André
--------------------------------------------------------------------------------
lsb_release -rd
Description: Ubuntu 22.04.5 LTS
Release: 22.04
apt-cache policy mysql-server-8.0
mysql-server-8.0:
Installed: 8.0.41-0ubuntu0.22.04.1
Candidate: 8.0.41-0ubuntu0.22.04.1
Version table:
*** 8.0.41-0ubuntu0.22.04.1 500
500 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64
Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64
Packages
100 /var/lib/dpkg/status
8.0.28-0ubuntu4 500
500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
** Description changed:
[Impact]
When cross-building a package with a Build-Depends on mysql-server-8.0,
- apt build-dep -a <CROSS_ARCH> attempts to install the server binary for
- the target architecture instead of using the native build-architecture
- binary. 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.
+ mysql-client-8.0, or mysql-client-core-8.0, 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 Jammy and Noble so that packages which
- run the MySQL server binary during their build or tests can use the
- native executable. This avoids unnecessary target-architecture
- installations and conflicts without changing MySQL server behavior for
- existing native installations.
+ 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-8.0.
- This allows the native build-architecture package to satisfy the
- dependency for a package being built for another architecture.
+ The issue is fixed by adding Multi-Arch: foreign to mysql-server-8.0,
+ mysql-client-8.0, and mysql-client-core-8.0. 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-8.0 mysql-client-8.0
+ sudo apt install software-properties-common mysql-server-8.0 mysql-client-8.0
mysql-client-core-8.0
- 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-8.0
+ Build-Depends: mysql-server-8.0, mysql-client-8.0, mysql-client-core-8.0
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-8.0
+ dpkg-query -W -f='${Package}:${Architecture}: ${Multi-Arch}\n'
mysql-client-8.0
+ dpkg-query -W -f='${Package}:${Architecture}: ${Multi-Arch}\n'
mysql-client-core-8.0
- With the fix this should show:
mysql-server-8.0:amd64: foreign
+ mysql-client-8.0:amd64: foreign
+ mysql-client-core-8.0:amd64: foreign
+
[Where problems could occur]
- The upload changes apt and dpkg dependency metadata rather than MySQL
- server code. 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.
+ 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 mysql-server-8.0 unsatisfiable.
+ packages, or make the packages unsatisfiable.
[Other Info]
- This bug is similar to LP: #2174381, but is specific to mysql-8.0's
- server package.
+ This bug is similar to LP: #2174381, but for -8.0 suffix packages.
[Original Description]
Package mysql-server-8.0 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-8.0, but since mysql-server-8.0 has no Multi-Arch set apt
build-dep -a <CROSS_ARCH> ./ tries to install mysql-server-8.0 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-8.0.
Greetings,
André
--------------------------------------------------------------------------------
lsb_release -rd
Description: Ubuntu 22.04.5 LTS
Release: 22.04
apt-cache policy mysql-server-8.0
mysql-server-8.0:
Installed: 8.0.41-0ubuntu0.22.04.1
Candidate: 8.0.41-0ubuntu0.22.04.1
Version table:
*** 8.0.41-0ubuntu0.22.04.1 500
500 http://de.archive.ubuntu.com/ubuntu jammy-updates/main amd64
Packages
500 http://security.ubuntu.com/ubuntu jammy-security/main amd64
Packages
100 /var/lib/dpkg/status
8.0.28-0ubuntu4 500
500 http://de.archive.ubuntu.com/ubuntu jammy/main amd64 Packages
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2099894
Title:
Package mysql-server-8.0 has no Muti-Arch flag set
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/mysql-8.0/+bug/2099894/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs