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