1# THIS FILE WAS AUTO-GENERATED
2#
3#  $ lcitool dockerfile --layers all --cross-arch mingw64 fedora-38 qemu
4#
5# https://gitlab.com/libvirt/libvirt-ci
6
7FROM registry.fedoraproject.org/fedora:38
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               bison \
24               bzip2 \
25               ca-certificates \
26               ccache \
27               ctags \
28               dbus-daemon \
29               diffutils \
30               findutils \
31               flex \
32               gcc \
33               gcovr \
34               git \
35               glib2-devel \
36               glibc-langpack-en \
37               hostname \
38               llvm \
39               make \
40               meson \
41               mtools \
42               ninja-build \
43               nmap-ncat \
44               openssh-clients \
45               pcre-static \
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               sed \
55               socat \
56               sparse \
57               spice-protocol \
58               swtpm \
59               tar \
60               tesseract \
61               tesseract-langpack-eng \
62               util-linux \
63               which \
64               xorriso \
65               zstd && \
66    nosync dnf autoremove -y && \
67    nosync dnf clean all -y && \
68    rm -f /usr/lib*/python3*/EXTERNALLY-MANAGED
69
70ENV CCACHE_WRAPPERSDIR "/usr/libexec/ccache-wrappers"
71ENV LANG "en_US.UTF-8"
72ENV MAKE "/usr/bin/make"
73ENV NINJA "/usr/bin/ninja"
74ENV PYTHON "/usr/bin/python3"
75
76RUN nosync dnf install -y \
77               mingw32-nsis \
78               mingw64-SDL2 \
79               mingw64-SDL2_image \
80               mingw64-bzip2 \
81               mingw64-curl \
82               mingw64-gcc \
83               mingw64-gcc-c++ \
84               mingw64-gettext \
85               mingw64-glib2 \
86               mingw64-gnutls \
87               mingw64-gtk3 \
88               mingw64-libepoxy \
89               mingw64-libgcrypt \
90               mingw64-libjpeg-turbo \
91               mingw64-libpng \
92               mingw64-libtasn1 \
93               mingw64-nettle \
94               mingw64-pixman \
95               mingw64-pkg-config && \
96    nosync dnf clean all -y && \
97    rpm -qa | sort > /packages.txt && \
98    mkdir -p /usr/libexec/ccache-wrappers && \
99    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-c++ && \
100    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-cc && \
101    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-g++ && \
102    ln -s /usr/bin/ccache /usr/libexec/ccache-wrappers/x86_64-w64-mingw32-gcc
103
104ENV ABI "x86_64-w64-mingw32"
105ENV MESON_OPTS "--cross-file=/usr/share/mingw/toolchain-mingw64.meson"
106ENV QEMU_CONFIGURE_OPTS --cross-prefix=x86_64-w64-mingw32-
107ENV DEF_TARGET_LIST x86_64-softmmu
108# As a final step configure the user (if env is defined)
109ARG USER
110ARG UID
111RUN if [ "${USER}" ]; then \
112  id ${USER} 2>/dev/null || useradd -u ${UID} -U ${USER}; fi
113