1# THIS FILE WAS AUTO-GENERATED
2#
3#  $ lcitool dockerfile --layers all --cross aarch64 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 arm64 && \
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++-aarch64-linux-gnu \
79                      gcc-aarch64-linux-gnu \
80                      libaio-dev:arm64 \
81                      libasan5:arm64 \
82                      libasound2-dev:arm64 \
83                      libattr1-dev:arm64 \
84                      libbpf-dev:arm64 \
85                      libbrlapi-dev:arm64 \
86                      libbz2-dev:arm64 \
87                      libc6-dev:arm64 \
88                      libcacard-dev:arm64 \
89                      libcap-ng-dev:arm64 \
90                      libcapstone-dev:arm64 \
91                      libcmocka-dev:arm64 \
92                      libcurl4-gnutls-dev:arm64 \
93                      libdaxctl-dev:arm64 \
94                      libdrm-dev:arm64 \
95                      libepoxy-dev:arm64 \
96                      libfdt-dev:arm64 \
97                      libffi-dev:arm64 \
98                      libfuse3-dev:arm64 \
99                      libgbm-dev:arm64 \
100                      libgcrypt20-dev:arm64 \
101                      libglib2.0-dev:arm64 \
102                      libglusterfs-dev:arm64 \
103                      libgnutls28-dev:arm64 \
104                      libgtk-3-dev:arm64 \
105                      libibumad-dev:arm64 \
106                      libibverbs-dev:arm64 \
107                      libiscsi-dev:arm64 \
108                      libjemalloc-dev:arm64 \
109                      libjpeg62-turbo-dev:arm64 \
110                      libjson-c-dev:arm64 \
111                      liblttng-ust-dev:arm64 \
112                      liblzo2-dev:arm64 \
113                      libncursesw5-dev:arm64 \
114                      libnfs-dev:arm64 \
115                      libnuma-dev:arm64 \
116                      libpam0g-dev:arm64 \
117                      libpixman-1-dev:arm64 \
118                      libpng-dev:arm64 \
119                      libpulse-dev:arm64 \
120                      librbd-dev:arm64 \
121                      librdmacm-dev:arm64 \
122                      libsasl2-dev:arm64 \
123                      libsdl2-dev:arm64 \
124                      libsdl2-image-dev:arm64 \
125                      libseccomp-dev:arm64 \
126                      libselinux1-dev:arm64 \
127                      libslirp-dev:arm64 \
128                      libsnappy-dev:arm64 \
129                      libspice-server-dev:arm64 \
130                      libssh-gcrypt-dev:arm64 \
131                      libsystemd-dev:arm64 \
132                      libtasn1-6-dev:arm64 \
133                      libubsan1:arm64 \
134                      libudev-dev:arm64 \
135                      liburing-dev:arm64 \
136                      libusb-1.0-0-dev:arm64 \
137                      libusbredirhost-dev:arm64 \
138                      libvdeplug-dev:arm64 \
139                      libvirglrenderer-dev:arm64 \
140                      libvte-2.91-dev:arm64 \
141                      libxen-dev:arm64 \
142                      libzstd-dev:arm64 \
143                      nettle-dev:arm64 \
144                      systemtap-sdt-dev:arm64 \
145                      xfslibs-dev:arm64 \
146                      zlib1g-dev:arm64 && \
147    eatmydata apt-get autoremove -y && \
148    eatmydata apt-get autoclean -y && \
149    mkdir -p /usr/local/share/meson/cross && \
150    printf "[binaries]\n\
151c = '/usr/bin/aarch64-linux-gnu-gcc'\n\
152ar = '/usr/bin/aarch64-linux-gnu-gcc-ar'\n\
153strip = '/usr/bin/aarch64-linux-gnu-strip'\n\
154pkgconfig = '/usr/bin/aarch64-linux-gnu-pkg-config'\n\
155\n\
156[host_machine]\n\
157system = 'linux'\n\
158cpu_family = 'aarch64'\n\
159cpu = 'aarch64'\n\
160endian = 'little'\n" > /usr/local/share/meson/cross/aarch64-linux-gnu && \
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/aarch64-linux-gnu-c++ && \
164    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-cc && \
165    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-g++ && \
166    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/aarch64-linux-gnu-gcc
167
168ENV ABI "aarch64-linux-gnu"
169ENV MESON_OPTS "--cross-file=aarch64-linux-gnu"
170ENV QEMU_CONFIGURE_OPTS --cross-prefix=aarch64-linux-gnu-
171ENV DEF_TARGET_LIST aarch64-softmmu,aarch64-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