1# THIS FILE WAS AUTO-GENERATED
2#
3#  $ lcitool dockerfile --layers all --cross armv7l debian-11 qemu
4#
5# https://gitlab.com/libvirt/libvirt-ci
6
7FROM docker.io/library/debian:11-slim
8
9RUN export DEBIAN_FRONTEND=noninteractive && \
10    apt-get update && \
11    apt-get install -y eatmydata && \
12    eatmydata apt-get dist-upgrade -y && \
13    eatmydata apt-get install --no-install-recommends -y \
14                      bash \
15                      bc \
16                      bison \
17                      bsdextrautils \
18                      bzip2 \
19                      ca-certificates \
20                      ccache \
21                      dbus \
22                      debianutils \
23                      diffutils \
24                      exuberant-ctags \
25                      findutils \
26                      flex \
27                      gcovr \
28                      genisoimage \
29                      gettext \
30                      git \
31                      hostname \
32                      libglib2.0-dev \
33                      libpcre2-dev \
34                      libsndio-dev \
35                      libspice-protocol-dev \
36                      llvm \
37                      locales \
38                      make \
39                      meson \
40                      ncat \
41                      ninja-build \
42                      openssh-client \
43                      pkgconf \
44                      python3 \
45                      python3-numpy \
46                      python3-opencv \
47                      python3-pillow \
48                      python3-pip \
49                      python3-sphinx \
50                      python3-sphinx-rtd-theme \
51                      python3-venv \
52                      python3-yaml \
53                      rpm2cpio \
54                      sed \
55                      socat \
56                      sparse \
57                      tar \
58                      tesseract-ocr \
59                      tesseract-ocr-eng \
60                      zstd && \
61    eatmydata apt-get autoremove -y && \
62    eatmydata apt-get autoclean -y && \
63    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
64    dpkg-reconfigure locales
65
66ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
67ENV LANG "en_US.UTF-8"
68ENV MAKE "/usr/bin/make"
69ENV NINJA "/usr/bin/ninja"
70ENV PYTHON "/usr/bin/python3"
71
72RUN export DEBIAN_FRONTEND=noninteractive && \
73    dpkg --add-architecture armhf && \
74    eatmydata apt-get update && \
75    eatmydata apt-get dist-upgrade -y && \
76    eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
77    eatmydata apt-get install --no-install-recommends -y \
78                      g++-arm-linux-gnueabihf \
79                      gcc-arm-linux-gnueabihf \
80                      libaio-dev:armhf \
81                      libasan5:armhf \
82                      libasound2-dev:armhf \
83                      libattr1-dev:armhf \
84                      libbpf-dev:armhf \
85                      libbrlapi-dev:armhf \
86                      libbz2-dev:armhf \
87                      libc6-dev:armhf \
88                      libcacard-dev:armhf \
89                      libcap-ng-dev:armhf \
90                      libcapstone-dev:armhf \
91                      libcmocka-dev:armhf \
92                      libcurl4-gnutls-dev:armhf \
93                      libdaxctl-dev:armhf \
94                      libdrm-dev:armhf \
95                      libepoxy-dev:armhf \
96                      libfdt-dev:armhf \
97                      libffi-dev:armhf \
98                      libfuse3-dev:armhf \
99                      libgbm-dev:armhf \
100                      libgcrypt20-dev:armhf \
101                      libglib2.0-dev:armhf \
102                      libglusterfs-dev:armhf \
103                      libgnutls28-dev:armhf \
104                      libgtk-3-dev:armhf \
105                      libibumad-dev:armhf \
106                      libibverbs-dev:armhf \
107                      libiscsi-dev:armhf \
108                      libjemalloc-dev:armhf \
109                      libjpeg62-turbo-dev:armhf \
110                      libjson-c-dev:armhf \
111                      liblttng-ust-dev:armhf \
112                      liblzo2-dev:armhf \
113                      libncursesw5-dev:armhf \
114                      libnfs-dev:armhf \
115                      libnuma-dev:armhf \
116                      libpam0g-dev:armhf \
117                      libpixman-1-dev:armhf \
118                      libpng-dev:armhf \
119                      libpulse-dev:armhf \
120                      librbd-dev:armhf \
121                      librdmacm-dev:armhf \
122                      libsasl2-dev:armhf \
123                      libsdl2-dev:armhf \
124                      libsdl2-image-dev:armhf \
125                      libseccomp-dev:armhf \
126                      libselinux1-dev:armhf \
127                      libslirp-dev:armhf \
128                      libsnappy-dev:armhf \
129                      libspice-server-dev:armhf \
130                      libssh-gcrypt-dev:armhf \
131                      libsystemd-dev:armhf \
132                      libtasn1-6-dev:armhf \
133                      libubsan1:armhf \
134                      libudev-dev:armhf \
135                      liburing-dev:armhf \
136                      libusb-1.0-0-dev:armhf \
137                      libusbredirhost-dev:armhf \
138                      libvdeplug-dev:armhf \
139                      libvirglrenderer-dev:armhf \
140                      libvte-2.91-dev:armhf \
141                      libxen-dev:armhf \
142                      libzstd-dev:armhf \
143                      nettle-dev:armhf \
144                      systemtap-sdt-dev:armhf \
145                      xfslibs-dev:armhf \
146                      zlib1g-dev:armhf && \
147    eatmydata apt-get autoremove -y && \
148    eatmydata apt-get autoclean -y && \
149    mkdir -p /usr/local/share/meson/cross && \
150    echo "[binaries]\n\
151c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
152ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
153strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
154pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
155\n\
156[host_machine]\n\
157system = 'linux'\n\
158cpu_family = 'arm'\n\
159cpu = 'armhf'\n\
160endian = 'little'" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
161    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
162    mkdir -p /usr/libexec/ccache-wrappers && \
163    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-c++ && \
164    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc && \
165    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-g++ && \
166    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-gcc
167
168ENV ABI "arm-linux-gnueabihf"
169ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
170ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
171ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user
172# As a final step configure the user (if env is defined)
173ARG USER
174ARG UID
175RUN if [ "${USER}" ]; then \
176  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
177