
Hi, Am Sonntag, 7. März 2021, 13:55:13 CET schrieb Michael Pujos:
The problem comes from docker, returning x86_64 (the arch of the host) in both 'uname -m' and arch outputs:
$docker run --platform linux/386 -it registry.opensuse.org/opensuse/tumbleweed arch x86_64
This confuses zypper, not retrieving the correct arch repo for the container.
This can be overridden in /etc/zypp/zypp.conf: sed -i 's/# arch = s390/arch = i686/' /etc/zypp/zypp.conf For 32bit x86, this could possibly be overwritten in the image itself. For x86_64, autodetection could also result in packages for e.g. "znver2" to be selected, which hardcoding would break. For container images that might be a good thing though, to make them more portable. Cheers, Fabian
There does not see to be a solution at the docker/podman level to return the proper output for these commands.
A workaround with to use setarch:
$setarch i586 zypper ...
or its linux32 shortcut:
$linux32 zypper....
The problem is that setarch part of util-linux, which cannot be installed with zypper.
So it would be a good idea to include the linux32 command in the i586 containers, without the entire util-linux package.
For the time being, I'm copying in the Dockerfile the setarch 32-bit binary into the image and use that.
This happens installing some packages (here wget, but also java-1_8_0-openjdk-headless, shadow) with zypper in the i586 (linux/386 platform in docker parlance) flavor of the tumbleweed docker image. Noticed that as I'm trying to build a custom multiarch docker image based on opensuse/tumbleweed
///
docker run --platform linux/386 -it registry.opensuse.org/opensuse/tumbleweed Problem: wget-1.21.1-1.2.x86_64 requires libc.so.6(GLIBC_2.33)(64bit), but this requirement cannot be provided not installable providers: glibc-2.33-2.1.x86_64[repo-oss] Solution 1: Following actions will be done: architecture change of glibc-2.33-2.1.i586 to glibc-2.33-2.1.x86_64 architecture change of libgpgme11-1.15.1-1.2.i586 to libgpgme11-1.15.1-1.2.x86_64 architecture change of libidn2-0-2.3.0-3.3.i586 to libidn2-0-2.3.0-3.3.x86_64 architecture change of libopenssl1_1-1.1.1j-1.1.i586 to libopenssl1_1-1.1.1j-1.1.x86_64 architecture change of libproxy1-0.4.17-1.2.i586 to libproxy1-0.4.17-1.2.x86_64 architecture change of libpsl5-0.21.1-1.3.i586 to libpsl5-0.21.1-1.3.x86_64 architecture change of libz1-1.2.11-18.2.i586 to libz1-1.2.11-18.2.x86_64 architecture change of libassuan0-2.5.4-1.2.i586 to libassuan0-2.5.4-1.2.x86_64 architecture change of libgpg-error0-1.41-1.2.i586 to libgpg-error0-1.41-1.2.x86_64 architecture change of libunistring2-0.9.10-2.9.i586 to libunistring2-0.9.10-2.9.x86_64 architecture change of libgcc_s1-11.0.0+git183291-1.2.i586 to libgcc_s1-11.0.0+git183291-1.2.x86_64 architecture change of libstdc++6-11.0.0+git183291-1.2.i586 to libstdc++6-11.0.0+git183291-1.2.x86_64 Solution 2: do not install wget-1.21.1-1.2.x86_64 Solution 3: break wget-1.21.1-1.2.x86_64 by ignoring some of its dependencies