1# THIS FILE WAS AUTO-GENERATED
2#
3#  $ lcitool dockerfile --layers all --cross-arch mingw64 fedora-40 qemu,qemu-win-installer
4#
5# https://gitlab.com/libvirt/libvirt-ci
6
7FROM registry.fedoraproject.org/fedora:40
8
9RUN dnf install -y nosync && \
10    printf '#!/bin/sh\n\
11if test -d /usr/lib64\n\
12then\n\
13    export LD_PRELOAD=/usr/lib64/nosync/nosync.so\n\
14else\n\
15    export LD_PRELOAD=/usr/lib/nosync/nosync.so\n\
16fi\n\
17exec "$@"\n' > /usr/bin/nosync && \
18    chmod +x /usr/bin/nosync && \
19    nosync dnf update -y && \
20    nosync dnf install -y \
21               bash \
22               bc \
23               bindgen-cli \
24               bison \
25               bzip2 \
26               ca-certificates \
27               ccache \
28               ctags \
29               dbus-daemon \
30               diffutils \
31               findutils \
32               flex \
33               gcc \
34               gcovr \
35               git \
36               glib2-devel \
37               glibc-langpack-en \
38               hostname \
39               llvm \
40               make \
41               meson \
42               mtools \
43               ninja-build \
44               nmap-ncat \
45               openssh-clients \
46               python3 \
47               python3-PyYAML \
48               python3-numpy \
49               python3-opencv \
50               python3-pillow \
51               python3-pip \
52               python3-sphinx \
53               python3-sphinx_rtd_theme \
54               python3-zombie-imp \
55               rust \
56               sed \
57               socat \
58               sparse \
59               swtpm \
60               tar \
61               tesseract \
62               tesseract-langpack-eng \
63               util-linux \
64               which \
65               xorriso \
66               zstd && \
67    nosync dnf autoremove -y && \
68    nosync dnf clean all -y && \
69    rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
70
71ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
72ENV LANG "en_US.UTF-8"
73ENV MAKE "/usr/bin/make"
74ENV NINJA "/usr/bin/ninja"
75ENV PYTHON "/usr/bin/python3"
76
77RUN nosync dnf install -y \
78               mingw-w64-tools \
79               mingw32-nsis \
80               mingw64-SDL2 \
81               mingw64-SDL2_image \
82               mingw64-bzip2 \
83               mingw64-curl \
84               mingw64-gcc \
85               mingw64-gcc-c++ \
86               mingw64-gettext \
87               mingw64-glib2 \
88               mingw64-gnutls \
89               mingw64-gtk-vnc2 \
90               mingw64-gtk3 \
91               mingw64-libepoxy \
92               mingw64-libgcrypt \
93               mingw64-libjpeg-turbo \
94               mingw64-libpng \
95               mingw64-libtasn1 \
96               mingw64-nettle \
97               mingw64-pixman \
98               mingw64-pkg-config && \
99    nosync dnf clean all -y && \
100    rpm -qa | sort > /packages.txt && \
101    mkdir -p /usr/libexec/ccache-wrappers && \
102    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-c++ && \
103    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc && \
104    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-g++ && \
105    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-gcc
106
107ENV ABI "x86_64-w64-mingw32"
108ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"
109ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32-
110ENV DEF_TARGET_LIST x86_64-softmmu
111# As a final step configure the user (if env is defined)
112ARG USER
113ARG UID
114RUN if [ "${USER}" ]; then \
115  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
116