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               gtk-vnc2-devel \
39               hostname \
40               llvm \
41               make \
42               meson \
43               mtools \
44               ninja-build \
45               nmap-ncat \
46               openssh-clients \
47               pcre-static \
48               python3 \
49               python3-PyYAML \
50               python3-numpy \
51               python3-opencv \
52               python3-pillow \
53               python3-pip \
54               python3-sphinx \
55               python3-sphinx_rtd_theme \
56               python3-zombie-imp \
57               rust \
58               sed \
59               socat \
60               sparse \
61               spice-protocol \
62               swtpm \
63               tar \
64               tesseract \
65               tesseract-langpack-eng \
66               util-linux \
67               which \
68               xorriso \
69               zstd && \
70    nosync dnf autoremove -y && \
71    nosync dnf clean all -y && \
72    rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
73
74ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
75ENV LANG "en_US.UTF-8"
76ENV MAKE "/usr/bin/make"
77ENV NINJA "/usr/bin/ninja"
78ENV PYTHON "/usr/bin/python3"
79
80RUN nosync dnf install -y \
81               mingw-w64-tools \
82               mingw32-nsis \
83               mingw64-SDL2 \
84               mingw64-SDL2_image \
85               mingw64-bzip2 \
86               mingw64-curl \
87               mingw64-gcc \
88               mingw64-gcc-c++ \
89               mingw64-gettext \
90               mingw64-glib2 \
91               mingw64-gnutls \
92               mingw64-gtk3 \
93               mingw64-libepoxy \
94               mingw64-libgcrypt \
95               mingw64-libjpeg-turbo \
96               mingw64-libpng \
97               mingw64-libtasn1 \
98               mingw64-nettle \
99               mingw64-pixman \
100               mingw64-pkg-config && \
101    nosync dnf clean all -y && \
102    rpm -qa | sort > /packages.txt && \
103    mkdir -p /usr/libexec/ccache-wrappers && \
104    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-c++ && \
105    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc && \
106    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-g++ && \
107    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-gcc
108
109ENV ABI "x86_64-w64-mingw32"
110ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"
111ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32-
112ENV DEF_TARGET_LIST x86_64-softmmu
113# As a final step configure the user (if env is defined)
114ARG USER
115ARG UID
116RUN if [ "${USER}" ]; then \
117  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
118