libuuid1-2.31.1-0.4ubuntu3 install fails with cross-arch install
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
util-linux (Ubuntu) |
New
|
Undecided
|
Unassigned |
Bug Description
My goal was to install libxml2-dev:${arch} in a ubuntu for cross compilation. This failed because of libuuid1's dependency information.
https:/
Attempting to install libuuid1 from another architecture is trying to remove essential packages.
On a x86_64 host:
$ cat Dockerfile
ARG BASE=ubuntu:18.04
FROM $BASE
ENV DEBIAN_
# Arch dependence
ARG DEBARCH=s390x
ARG PACKAGE=libuuid1
RUN echo "deb [arch=$DEBARCH] http://
# Install package for static cross compilation
RUN dpkg --add-architecture $DEBARCH; \
apt-get -y update; \
apt-get -y install $PACKAGE:$DEBARCH ; \
rm -rf /var/lib/
$ docker build .
Sending build context to Docker daemon 2.048kB
Step 1/7 : ARG BASE=ubuntu:18.04
Step 2/7 : FROM $BASE
---> 113a43faa138
Step 3/7 : ENV DEBIAN_
---> Using cache
---> 5c2ee26240f2
Step 4/7 : ARG DEBARCH=s390x
---> Using cache
---> 83be859bd660
Step 5/7 : ARG PACKAGE=libuuid1
---> Using cache
---> 668235a94420
Step 6/7 : RUN echo "deb [arch=$DEBARCH] http://
---> Running in 557433eca31b
Removing intermediate container 557433eca31b
---> 2a8aa77040e7
Step 7/7 : RUN dpkg --add-architecture $DEBARCH; apt-get -y update; apt-get -y install $PACKAGE:$DEBARCH ; rm -rf /var/lib/
---> Running in 134f7edb28ed
Get:1 http://
...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
gcc-8-base:s390x libc6:s390x libgcc1:s390x
Suggested packages:
glibc-doc:s390x locales:s390x
Recommended packages:
uuid-
The following packages will be REMOVED:
e2fsprogs fdisk libblkid1 libfdisk1 libmount1 libuuid1 mount sysvinit-utils
util-linux
The following NEW packages will be installed:
gcc-8-base:s390x libc6:s390x libgcc1:s390x libuuid1:s390x
WARNING: The following essential packages will be removed.
This should NOT be done unless you know exactly what you are doing!
e2fsprogs libblkid1 (due to e2fsprogs) libuuid1 (due to e2fsprogs) fdisk
libfdisk1 (due to fdisk) libmount1 (due to fdisk) mount
util-linux (due to mount) sysvinit-utils
0 upgraded, 4 newly installed, 9 to remove and 0 not upgraded.
E: Essential packages were removed and -y was used without --allow-
Removing intermediate container 134f7edb28ed
Removing the ubuntu-ports line from the Dockerfile resulted in a working install on debian:stable
$ docker build --build-arg BASE=debian:stable .
Sending build context to Docker daemon 2.048kB
Step 1/6 : ARG BASE=ubuntu:18.04
Step 2/6 : FROM $BASE
---> b18abcb8ff46
Step 3/6 : ENV DEBIAN_
---> Running in b4deef44a701
Removing intermediate container b4deef44a701
---> 83aa1773a21e
Step 4/6 : ARG DEBARCH=s390x
---> Running in ea75827e75da
Removing intermediate container ea75827e75da
---> 7a359b6826e9
Step 5/6 : ARG PACKAGE=libuuid1
---> Running in b4ec0003580e
Removing intermediate container b4ec0003580e
---> 2ae853e70822
Step 6/6 : RUN dpkg --add-architecture $DEBARCH; apt-get -y update; apt-get -y install $PACKAGE:$DEBARCH ; rm -rf /var/lib/
---> Running in a6cc3937dcf9
Ign:1 http://
Get:2 http://
Get:3 http://
Get:4 http://
Get:5 http://
Get:6 http://
Get:7 http://
Get:8 http://
Get:9 http://
Get:10 http://
Get:11 http://
Fetched 15.0 MB in 9s (1618 kB/s)
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
gcc-6-base:s390x libc6:s390x libgcc1:s390x uuid-runtime
Suggested packages:
glibc-doc:s390x libc-l10n:s390x locales:s390x
The following NEW packages will be installed:
gcc-6-base:s390x libc6:s390x libgcc1:s390x libuuid1:s390x uuid-runtime
0 upgraded, 5 newly installed, 0 to remove and 0 not upgraded.
Need to get 2872 kB of archives.
...
Setting up libuuid1:s390x (2.29.2-1+deb9u1) ...
Processing triggers for libc-bin (2.24-11+deb9u3) ...
Removing intermediate container a6cc3937dcf9
---> 779a44ae446e
Successfully built 779a44ae446e
This also worked for libxml2-dev on Debian
$ docker build --build-arg BASE=debian:stable --build-arg PACKAGE=libxml2-dev .
...
Reading package lists...
Reading package lists...
Building dependency tree...
Reading state information...
The following additional packages will be installed:
gcc-6-base:s390x icu-devtools libatomic1:s390x libc-dev-bin libc6:s390x
libc6-dev:s390x libgcc-6-dev:s390x libgcc1:s390x libgomp1:s390x
libicu-dev:s390x libicu57 libicu57:s390x libitm1:s390x liblzma5:s390x
libstdc+
manpages manpages-dev sgml-base xml-core zlib1g:s390x
Suggested packages:
glibc-doc:s390x libc-l10n:s390x locales:s390x icu-doc:s390x
libstdc+
The following NEW packages will be installed:
gcc-6-base:s390x icu-devtools libatomic1:s390x libc-dev-bin libc6:s390x
libc6-dev:s390x libgcc-6-dev:s390x libgcc1:s390x libgomp1:s390x
libicu-dev:s390x libicu57 libicu57:s390x libitm1:s390x liblzma5:s390x
libstdc+
linux-
0 upgraded, 24 newly installed, 0 to remove and 0 not upgraded.
Need to get 46.6 MB of archives.