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                      gettext \
29                      git \
30                      hostname \
31                      libglib2.0-dev \
32                      libpcre2-dev \
33                      libsndio-dev \
34                      libspice-protocol-dev \
35                      llvm \
36                      locales \
37                      make \
38                      meson \
39                      mtools \
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                      xorriso \
61                      zstd && \
62    eatmydata apt-get autoremove -y && \
63    eatmydata apt-get autoclean -y && \
64    sed -Ei 's,^# (en_US\.UTF-8 .*)$,\1,' /etc/locale.gen && \
65    dpkg-reconfigure locales
66
67ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
68ENV LANG "en_US.UTF-8"
69ENV MAKE "/usr/bin/make"
70ENV NINJA "/usr/bin/ninja"
71ENV PYTHON "/usr/bin/python3"
72
73RUN export DEBIAN_FRONTEND=noninteractive && \
74    dpkg --add-architecture armhf && \
75    eatmydata apt-get update && \
76    eatmydata apt-get dist-upgrade -y && \
77    eatmydata apt-get install --no-install-recommends -y dpkg-dev && \
78    eatmydata apt-get install --no-install-recommends -y \
79                      g++-arm-linux-gnueabihf \
80                      gcc-arm-linux-gnueabihf \
81                      libaio-dev:armhf \
82                      libasan5:armhf \
83                      libasound2-dev:armhf \
84                      libattr1-dev:armhf \
85                      libbpf-dev:armhf \
86                      libbrlapi-dev:armhf \
87                      libbz2-dev:armhf \
88                      libc6-dev:armhf \
89                      libcacard-dev:armhf \
90                      libcap-ng-dev:armhf \
91                      libcapstone-dev:armhf \
92                      libcmocka-dev:armhf \
93                      libcurl4-gnutls-dev:armhf \
94                      libdaxctl-dev:armhf \
95                      libdrm-dev:armhf \
96                      libepoxy-dev:armhf \
97                      libfdt-dev:armhf \
98                      libffi-dev:armhf \
99                      libfuse3-dev:armhf \
100                      libgbm-dev:armhf \
101                      libgcrypt20-dev:armhf \
102                      libglib2.0-dev:armhf \
103                      libglusterfs-dev:armhf \
104                      libgnutls28-dev:armhf \
105                      libgtk-3-dev:armhf \
106                      libibumad-dev:armhf \
107                      libibverbs-dev:armhf \
108                      libiscsi-dev:armhf \
109                      libjemalloc-dev:armhf \
110                      libjpeg62-turbo-dev:armhf \
111                      libjson-c-dev:armhf \
112                      liblttng-ust-dev:armhf \
113                      liblzo2-dev:armhf \
114                      libncursesw5-dev:armhf \
115                      libnfs-dev:armhf \
116                      libnuma-dev:armhf \
117                      libpam0g-dev:armhf \
118                      libpixman-1-dev:armhf \
119                      libpng-dev:armhf \
120                      libpulse-dev:armhf \
121                      librbd-dev:armhf \
122                      librdmacm-dev:armhf \
123                      libsasl2-dev:armhf \
124                      libsdl2-dev:armhf \
125                      libsdl2-image-dev:armhf \
126                      libseccomp-dev:armhf \
127                      libselinux1-dev:armhf \
128                      libslirp-dev:armhf \
129                      libsnappy-dev:armhf \
130                      libspice-server-dev:armhf \
131                      libssh-gcrypt-dev:armhf \
132                      libsystemd-dev:armhf \
133                      libtasn1-6-dev:armhf \
134                      libubsan1:armhf \
135                      libudev-dev:armhf \
136                      liburing-dev:armhf \
137                      libusb-1.0-0-dev:armhf \
138                      libusbredirhost-dev:armhf \
139                      libvdeplug-dev:armhf \
140                      libvirglrenderer-dev:armhf \
141                      libvte-2.91-dev:armhf \
142                      libxen-dev:armhf \
143                      libzstd-dev:armhf \
144                      nettle-dev:armhf \
145                      systemtap-sdt-dev:armhf \
146                      xfslibs-dev:armhf \
147                      zlib1g-dev:armhf && \
148    eatmydata apt-get autoremove -y && \
149    eatmydata apt-get autoclean -y && \
150    mkdir -p /usr/local/share/meson/cross && \
151    printf "[binaries]\n\
152c = '/usr/bin/arm-linux-gnueabihf-gcc'\n\
153ar = '/usr/bin/arm-linux-gnueabihf-gcc-ar'\n\
154strip = '/usr/bin/arm-linux-gnueabihf-strip'\n\
155pkgconfig = '/usr/bin/arm-linux-gnueabihf-pkg-config'\n\
156\n\
157[host_machine]\n\
158system = 'linux'\n\
159cpu_family = 'arm'\n\
160cpu = 'armhf'\n\
161endian = 'little'\n" > /usr/local/share/meson/cross/arm-linux-gnueabihf && \
162    dpkg-query --showformat '${Package}_${Version}_${Architecture}\n' --show > /packages.txt && \
163    mkdir -p /usr/libexec/ccache-wrappers && \
164    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-c++ && \
165    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-cc && \
166    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-g++ && \
167    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/arm-linux-gnueabihf-gcc
168
169ENV ABI "arm-linux-gnueabihf"
170ENV MESON_OPTS "--cross-file=arm-linux-gnueabihf"
171ENV QEMU_CONFIGURE_OPTS --cross-prefix=arm-linux-gnueabihf-
172ENV DEF_TARGET_LIST arm-softmmu,arm-linux-user
173# As a final step configure the user (if env is defined)
174ARG USER
175ARG UID
176RUN if [ "${USER}" ]; then \
177  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
178