2019-09-09 13:01:08 +00:00
|
|
|
set -eux
|
2018-11-25 00:03:29 +00:00
|
|
|
|
2020-06-04 14:17:32 +00:00
|
|
|
# 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
|
|
|
|
|
2020-06-10 14:47:08 +00:00
|
|
|
dnf install -y git-core ninja-build dnf-plugins-core python3-pip
|
2018-11-25 00:03:29 +00:00
|
|
|
|
|
|
|
# Configure git for various usage
|
2020-10-24 17:56:22 +00:00
|
|
|
git config --global user.email "gstreamer@gstreamer.net"
|
2018-11-25 00:03:29 +00:00
|
|
|
git config --global user.name "Gstbuild Runner"
|
|
|
|
|
|
|
|
# Add rpm fusion repositories in order to access all of the gst plugins
|
2019-07-15 09:06:38 +00:00
|
|
|
sudo dnf install -y \
|
2021-05-22 14:59:54 +00:00
|
|
|
"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"
|
2018-11-25 00:03:29 +00:00
|
|
|
|
|
|
|
dnf upgrade -y
|
|
|
|
|
|
|
|
# install rest of the extra deps
|
2018-11-29 10:43:55 +00:00
|
|
|
dnf install -y \
|
2019-12-17 16:13:05 +00:00
|
|
|
aalib-devel \
|
2018-11-29 10:43:55 +00:00
|
|
|
aom \
|
2019-08-12 21:17:03 +00:00
|
|
|
bat \
|
2021-05-24 15:10:11 +00:00
|
|
|
intel-mediasdk-devel \
|
2018-11-29 10:43:55 +00:00
|
|
|
libaom \
|
|
|
|
libaom-devel \
|
2019-12-17 16:13:05 +00:00
|
|
|
libcaca-devel \
|
2019-12-25 10:08:08 +00:00
|
|
|
libdav1d \
|
|
|
|
libdav1d-devel \
|
2018-11-29 10:43:55 +00:00
|
|
|
ccache \
|
2018-11-25 00:03:29 +00:00
|
|
|
cmake \
|
2018-11-11 02:34:59 +00:00
|
|
|
clang-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
elfutils \
|
2018-11-29 10:43:55 +00:00
|
|
|
elfutils-libs \
|
|
|
|
elfutils-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
gcc \
|
|
|
|
gcc-c++ \
|
|
|
|
gdb \
|
2019-02-01 16:36:28 +00:00
|
|
|
git-lfs \
|
2019-07-05 03:19:41 +00:00
|
|
|
glslc \
|
2018-11-25 00:03:29 +00:00
|
|
|
gtk3 \
|
|
|
|
gtk3-devel \
|
2020-06-29 13:05:03 +00:00
|
|
|
gtest \
|
|
|
|
gtest-devel \
|
2018-11-29 10:43:55 +00:00
|
|
|
graphene \
|
|
|
|
graphene-devel \
|
|
|
|
gsl \
|
|
|
|
gsl-devel \
|
2020-09-10 18:10:37 +00:00
|
|
|
gupnp \
|
|
|
|
gupnp-devel \
|
|
|
|
gupnp-igd \
|
|
|
|
gupnp-igd-devel \
|
|
|
|
gssdp \
|
|
|
|
gssdp-devel \
|
2020-06-10 14:47:08 +00:00
|
|
|
faac-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
ffmpeg \
|
|
|
|
ffmpeg-libs \
|
|
|
|
ffmpeg-devel \
|
2019-04-25 20:48:02 +00:00
|
|
|
flex \
|
2018-11-29 10:43:55 +00:00
|
|
|
flite \
|
|
|
|
flite-devel \
|
2019-02-25 21:00:02 +00:00
|
|
|
mono-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
procps-ng \
|
|
|
|
patch \
|
2021-03-30 08:27:33 +00:00
|
|
|
qt5-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
redhat-rpm-config \
|
|
|
|
json-glib \
|
|
|
|
json-glib-devel \
|
|
|
|
libnice \
|
|
|
|
libnice-devel \
|
2020-01-15 08:35:34 +00:00
|
|
|
libsodium-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
libunwind \
|
|
|
|
libunwind-devel \
|
2018-11-11 02:34:59 +00:00
|
|
|
libyaml-devel \
|
|
|
|
libxml2-devel \
|
|
|
|
libxslt-devel \
|
|
|
|
llvm-devel \
|
2020-01-30 09:29:57 +00:00
|
|
|
log4c-devel \
|
2018-11-11 02:34:59 +00:00
|
|
|
make \
|
2020-06-04 17:44:51 +00:00
|
|
|
nasm \
|
2018-11-29 10:43:55 +00:00
|
|
|
neon \
|
|
|
|
neon-devel \
|
2019-02-25 21:00:02 +00:00
|
|
|
nunit \
|
2018-11-11 02:34:59 +00:00
|
|
|
npm \
|
2018-11-25 00:03:29 +00:00
|
|
|
opencv \
|
|
|
|
opencv-devel \
|
|
|
|
openjpeg2 \
|
|
|
|
openjpeg2-devel \
|
2018-11-29 10:43:55 +00:00
|
|
|
SDL2 \
|
|
|
|
SDL2-devel \
|
|
|
|
sbc \
|
|
|
|
sbc-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
x264 \
|
|
|
|
x264-libs \
|
|
|
|
x264-devel \
|
2019-09-11 14:41:06 +00:00
|
|
|
python3 \
|
2018-11-11 02:34:59 +00:00
|
|
|
python3-devel \
|
2019-09-11 14:41:06 +00:00
|
|
|
python3-libs \
|
2018-11-25 00:03:29 +00:00
|
|
|
python3-gobject \
|
|
|
|
python3-cairo \
|
|
|
|
python3-cairo-devel \
|
2019-03-11 12:38:02 +00:00
|
|
|
valgrind \
|
2018-11-25 00:03:29 +00:00
|
|
|
vulkan \
|
|
|
|
vulkan-devel \
|
2018-11-29 10:43:55 +00:00
|
|
|
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 \
|
2019-08-06 10:06:46 +00:00
|
|
|
wpewebkit \
|
|
|
|
wpewebkit-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
xorg-x11-server-utils \
|
|
|
|
xorg-x11-server-Xvfb
|
|
|
|
|
2019-03-12 11:48:59 +00:00
|
|
|
# Install common debug symbols
|
|
|
|
dnf debuginfo-install -y gtk3 \
|
|
|
|
glib2 \
|
|
|
|
glibc \
|
2020-09-10 18:10:37 +00:00
|
|
|
gupnp \
|
|
|
|
gupnp-igd \
|
|
|
|
gssdp \
|
2019-03-12 11:48:59 +00:00
|
|
|
freetype \
|
|
|
|
openjpeg \
|
|
|
|
gobject-introspection \
|
|
|
|
python3 \
|
2019-09-11 14:41:06 +00:00
|
|
|
python3-libs \
|
2019-03-12 11:48:59 +00:00
|
|
|
python3-gobject \
|
2020-01-29 14:35:20 +00:00
|
|
|
libappstream-glib-devel \
|
2019-03-12 11:48:59 +00:00
|
|
|
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
|
|
|
|
|
2018-11-25 00:03:29 +00:00
|
|
|
# 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 \
|
2021-05-22 15:00:28 +00:00
|
|
|
python3-gstreamer1
|
|
|
|
|
|
|
|
dnf remove -y meson
|
2021-10-05 00:24:58 +00:00
|
|
|
pip3 install meson==0.59.1 hotdoc python-gitlab
|
|
|
|
|
2018-11-25 00:03:29 +00:00
|
|
|
|
|
|
|
# Remove gst-devel packages installed by builddep above
|
|
|
|
dnf remove -y "gstreamer1*devel"
|
|
|
|
|
2019-05-29 02:59:19 +00:00
|
|
|
# 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
|
2018-11-11 02:34:59 +00:00
|
|
|
|
2019-12-18 04:11:59 +00:00
|
|
|
# Install Rust
|
2021-09-27 07:03:31 +00:00
|
|
|
RUSTUP_VERSION=1.24.3
|
|
|
|
RUST_VERSION=1.55.0
|
2019-12-18 04:11:59 +00:00
|
|
|
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
|
|
|
|
|
2021-09-27 06:41:10 +00:00
|
|
|
export RUSTUP_HOME="/usr/local/rustup"
|
|
|
|
export CARGO_HOME="/usr/local/cargo"
|
|
|
|
export PATH="/usr/local/cargo/bin:$PATH"
|
|
|
|
|
2019-12-18 04:11:59 +00:00
|
|
|
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
|
|
|
|
|
2020-10-24 17:56:22 +00:00
|
|
|
# get gstreamer and make all subprojects available
|
2021-09-27 06:41:10 +00:00
|
|
|
# FIXME: we don't really need to clone it now as we have the repo checkout out already
|
2020-10-24 17:56:22 +00:00
|
|
|
git clone -b ${DEFAULT_BRANCH} https://gitlab.freedesktop.org/gstreamer/gstreamer.git /gstreamer
|
|
|
|
meson subprojects download --sourcedir /gstreamer
|
|
|
|
/gstreamer/ci/scripts/handle-subprojects-cache.py --build /gstreamer/subprojects/
|
2020-12-16 15:16:39 +00:00
|
|
|
|
|
|
|
# Run git gc to prune unwanted refs and reduce the size of the image
|
2021-06-04 09:38:29 +00:00
|
|
|
for i in $(find subprojects/ -mindepth 1 -maxdepth 1 -type d);
|
2020-12-16 15:16:39 +00:00
|
|
|
do
|
|
|
|
git -C $i gc --aggressive || true;
|
2020-10-24 17:56:22 +00:00
|
|
|
done
|
2021-09-27 06:41:10 +00:00
|
|
|
|
|
|
|
echo "Removing DNF cache"
|
|
|
|
dnf clean all
|
|
|
|
|
|
|
|
rm -R /root/*
|
2021-10-05 00:24:58 +00:00
|
|
|
rm -rf /var/cache/dnf /var/log/dnf*
|