prepare.sh 5.09 KB
Newer Older
1
set -eux
2

3
4
5
6
# Fedora base image disable installing documentation files. See https://pagure.io/atomic-wg/issue/308
# We need them to cleanly build our doc.
sed -i "s/tsflags=nodocs//g" /etc/dnf/dnf.conf

7
dnf install -y git-core ninja-build dnf-plugins-core python3-pip
8
9
10
11
12
13

# Configure git for various usage
git config --global user.email "gst-build@gstreamer.net"
git config --global user.name "Gstbuild Runner"

# Add rpm fusion repositories in order to access all of the gst plugins
14
sudo dnf install -y \
15
16
  "https://mirrors.rpmfusion.org/free/fedora/rpmfusion-free-release-$(rpm -E %fedora).noarch.rpm" \
  "https://mirrors.rpmfusion.org/nonfree/fedora/rpmfusion-nonfree-release-$(rpm -E %fedora).noarch.rpm"
17
18
19
20

dnf upgrade -y

# install rest of the extra deps
21
dnf install -y \
22
    aalib-devel \
23
    aom \
24
    bat \
25
    intel-mediasdk-devel \
26
27
    libaom \
    libaom-devel \
28
    libcaca-devel \
29
30
    libdav1d \
    libdav1d-devel \
31
    ccache \
32
    cmake \
33
    clang-devel \
34
    elfutils \
35
36
    elfutils-libs \
    elfutils-devel \
37
38
39
    gcc \
    gcc-c++ \
    gdb \
Thibault Saunier's avatar
Thibault Saunier committed
40
    git-lfs \
41
    glslc \
42
43
    gtk3 \
    gtk3-devel \
44
45
    gtest \
    gtest-devel \
46
47
48
49
    graphene \
    graphene-devel \
    gsl \
    gsl-devel \
50
51
52
53
54
55
    gupnp \
    gupnp-devel \
    gupnp-igd \
    gupnp-igd-devel \
    gssdp \
    gssdp-devel \
56
    faac-devel \
57
58
59
    ffmpeg \
    ffmpeg-libs \
    ffmpeg-devel \
60
    flex \
61
62
    flite \
    flite-devel \
63
    mono-devel \
64
65
    procps-ng \
    patch \
66
    qt5-devel \
67
68
69
70
71
    redhat-rpm-config \
    json-glib \
    json-glib-devel \
    libnice \
    libnice-devel \
72
    libsodium-devel \
73
74
    libunwind \
    libunwind-devel \
75
76
77
78
    libyaml-devel \
    libxml2-devel \
    libxslt-devel \
    llvm-devel \
79
    log4c-devel \
80
    make \
81
    nasm \
82
83
    neon \
    neon-devel \
84
    nunit \
85
    npm \
86
87
88
89
    opencv \
    opencv-devel \
    openjpeg2 \
    openjpeg2-devel \
90
91
92
93
    SDL2 \
    SDL2-devel \
    sbc \
    sbc-devel \
94
95
96
    x264 \
    x264-libs \
    x264-devel \
97
    python3 \
98
    python3-devel \
99
    python3-libs \
100
101
102
    python3-gobject \
    python3-cairo \
    python3-cairo-devel \
103
    valgrind \
104
105
    vulkan \
    vulkan-devel \
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
    mesa-omx-drivers \
    mesa-libGL \
    mesa-libGL-devel \
    mesa-libGLU \
    mesa-libGLU-devel \
    mesa-libGLES \
    mesa-libGLES-devel \
    mesa-libOpenCL \
    mesa-libOpenCL-devel \
    mesa-libgbm \
    mesa-libgbm-devel \
    mesa-libd3d \
    mesa-libd3d-devel \
    mesa-libOSMesa \
    mesa-libOSMesa-devel \
    mesa-vulkan-drivers \
122
123
    wpewebkit \
    wpewebkit-devel \
124
125
126
    xorg-x11-server-utils \
    xorg-x11-server-Xvfb

127
128
129
130
# Install common debug symbols
dnf debuginfo-install -y gtk3 \
    glib2 \
    glibc \
131
132
133
    gupnp \
    gupnp-igd \
    gssdp \
134
135
136
137
    freetype \
    openjpeg \
    gobject-introspection \
    python3 \
138
    python3-libs \
139
    python3-gobject \
140
    libappstream-glib-devel \
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
    libjpeg-turbo \
    glib-networking \
    libcurl \
    libsoup \
    nss \
    nss-softokn \
    nss-softokn-freebl \
    nss-sysinit \
    nss-util \
    openssl \
    openssl-libs \
    openssl-pkcs11 \
    brotli \
    bzip2-libs \
    gpm-libs \
    harfbuzz \
    harfbuzz-icu \
    json-c \
    json-glib \
    libbabeltrace \
    libffi \
    libsrtp \
    libunwind \
    mpg123-libs \
    neon \
    orc-compiler \
    orc \
    pixman \
    pulseaudio-libs \
    pulseaudio-libs-glib2 \
    wavpack \
    webrtc-audio-processing \
    ffmpeg \
    ffmpeg-libs \
    faad2-libs \
    libavdevice \
    libmpeg2 \
    faac \
    fdk-aac \
    x264 \
    x264-libs \
    x265 \
    x265-libs \
    xz \
    xz-libs \
    zip \
    zlib

189
190
191
192
193
194
195
196
197
198
199
200
201
# Install the dependencies of gstreamer
dnf builddep -y gstreamer1 \
    gstreamer1-plugins-base \
    gstreamer1-plugins-good \
    gstreamer1-plugins-good-extras \
    gstreamer1-plugins-ugly \
    gstreamer1-plugins-ugly-free \
    gstreamer1-plugins-bad-free \
    gstreamer1-plugins-bad-free-extras \
    gstreamer1-plugins-bad-freeworld \
    gstreamer1-libav \
    gstreamer1-rtsp-server  \
    gstreamer1-vaapi \
202
203
204
205
    python3-gstreamer1

dnf remove -y meson
pip3 install meson==0.58.0 hotdoc
206
207
208
209

# Remove gst-devel packages installed by builddep above
dnf remove -y "gstreamer1*devel"

210
211
212
213
214
# FIXME: Why does installing directly with dnf doesn't actually install
# the documentation files?
dnf download glib2-doc gdk-pixbuf2-devel*x86_64* gtk3-devel-docs
rpm -i --reinstall *.rpm
rm -f *.rpm
215

216
# Install Rust
217
218
RUSTUP_VERSION=1.24.2
RUST_VERSION=1.52.1
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
RUST_ARCH="x86_64-unknown-linux-gnu"

dnf install -y wget
RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init
wget $RUSTUP_URL
dnf remove -y wget

chmod +x rustup-init;
./rustup-init -y --no-modify-path --profile minimal --default-toolchain $RUST_VERSION;
rm rustup-init;
chmod -R a+w $RUSTUP_HOME $CARGO_HOME

rustup --version
cargo --version
rustc --version

235
# get gst-build and make all subprojects available
236
git clone -b ${DEFAULT_BRANCH} https://gitlab.freedesktop.org/gstreamer/gst-build.git /gst-build/
237
238
cd /gst-build
meson subprojects download
239
240

# Run git gc to prune unwanted refs and reduce the size of the image
241
for i in $(find subprojects/ -mindepth 1 -maxdepth 1 -type d);
242
243
244
do
    git -C $i gc --aggressive || true;
done