2020-07-10 09:16:35 +00:00
|
|
|
#! /bin/bash
|
|
|
|
|
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.
|
2020-07-10 09:16:35 +00:00
|
|
|
sed -i '/tsflags=nodocs/d' /etc/dnf/dnf.conf
|
|
|
|
dnf -y swap coreutils-single coreutils-full
|
2020-06-04 14:17:32 +00:00
|
|
|
|
2022-08-26 12:43:34 +00:00
|
|
|
dnf install -y git-core 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
|
|
|
|
2023-04-03 13:17:04 +00:00
|
|
|
dnf upgrade -y && dnf distro-sync -y
|
2018-11-25 00:03:29 +00:00
|
|
|
|
|
|
|
# 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 \
|
2023-09-05 08:56:41 +00:00
|
|
|
libcurl-devel \
|
2019-12-25 10:08:08 +00:00
|
|
|
libdav1d \
|
|
|
|
libdav1d-devel \
|
2020-07-10 09:16:35 +00:00
|
|
|
libdrm-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 \
|
2023-09-05 08:56:41 +00:00
|
|
|
curl \
|
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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
gtk-doc \
|
2018-11-25 00:03:29 +00:00
|
|
|
gtk3 \
|
|
|
|
gtk3-devel \
|
2022-08-26 12:43:34 +00:00
|
|
|
gtk4 \
|
|
|
|
gtk4-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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
libsoup \
|
|
|
|
libsoup-devel \
|
2019-02-25 21:00:02 +00:00
|
|
|
mono-devel \
|
2018-11-25 00:03:29 +00:00
|
|
|
procps-ng \
|
|
|
|
patch \
|
2020-07-10 09:16:35 +00:00
|
|
|
qconf \
|
|
|
|
qt5-linguist \
|
|
|
|
qt5-qtbase-devel \
|
|
|
|
qt5-qtbase-private-devel \
|
|
|
|
qt5-qtdeclarative-devel \
|
|
|
|
qt5-qtquickcontrols2-devel \
|
|
|
|
qt5-qttools-common \
|
|
|
|
qt5-qtwayland-devel \
|
|
|
|
qt5-qtx11extras-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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
libva-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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
libxcb-devel \
|
|
|
|
libxkbcommon-devel \
|
|
|
|
libxkbcommon-x11-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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
ninja-build \
|
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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
python3-wheel \
|
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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
vulkan-loader \
|
2018-11-29 10:43:55 +00:00
|
|
|
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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
mesa-dri-drivers \
|
2018-11-29 10:43:55 +00:00
|
|
|
mesa-vulkan-drivers \
|
2020-07-10 09:16:35 +00:00
|
|
|
xset \
|
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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
libdrm \
|
2019-03-12 11:48:59 +00:00
|
|
|
libsoup \
|
2020-07-10 09:16:35 +00:00
|
|
|
libxcb \
|
|
|
|
libxkbcommon \
|
|
|
|
libxkbcommon-x11 \
|
2019-03-12 11:48:59 +00:00
|
|
|
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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
libdvdread \
|
2019-03-12 11:48:59 +00:00
|
|
|
mpg123-libs \
|
|
|
|
neon \
|
|
|
|
orc-compiler \
|
|
|
|
orc \
|
|
|
|
pixman \
|
|
|
|
pulseaudio-libs \
|
|
|
|
pulseaudio-libs-glib2 \
|
|
|
|
wavpack \
|
2020-07-10 09:16:35 +00:00
|
|
|
"libwayland-*" \
|
|
|
|
"wayland-*" \
|
2019-03-12 11:48:59 +00:00
|
|
|
webrtc-audio-processing \
|
|
|
|
ffmpeg \
|
|
|
|
ffmpeg-libs \
|
|
|
|
faad2-libs \
|
|
|
|
libavdevice \
|
|
|
|
libmpeg2 \
|
|
|
|
faac \
|
|
|
|
fdk-aac \
|
2020-07-10 09:16:35 +00:00
|
|
|
vulkan-loader \
|
2019-03-12 11:48:59 +00:00
|
|
|
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 \
|
2020-07-10 09:16:35 +00:00
|
|
|
gstreamer1-plugins-good-qt \
|
2018-11-25 00:03:29 +00:00
|
|
|
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
|
|
|
|
|
2020-07-10 09:16:35 +00:00
|
|
|
dnf remove -y meson -x ninja-build
|
|
|
|
pip3 install meson==1.2.3 hotdoc==0.15 python-gitlab tomli
|
2018-11-25 00:03:29 +00:00
|
|
|
|
|
|
|
# Remove gst-devel packages installed by builddep above
|
|
|
|
dnf remove -y "gstreamer1*devel"
|
|
|
|
|
2020-07-10 09:16:35 +00:00
|
|
|
dnf install -y glib2-doc gdk-pixbuf2-devel gtk3-devel-docs gtk4-devel-docs libsoup-doc
|
|
|
|
|
|
|
|
# Install gdk-pixbuf manually as fedora 34 doesn't build the docs/.devhelp2
|
|
|
|
git clone --branch gdk-pixbuf-2-40 https://gitlab.gnome.org/GNOME/gdk-pixbuf.git
|
|
|
|
cd gdk-pixbuf
|
|
|
|
meson setup _build --prefix=/usr -Ddocs=true
|
|
|
|
meson install -C _build
|
|
|
|
cd ..
|
|
|
|
rm -rf gdk-pixbuf
|
2018-11-11 02:34:59 +00:00
|
|
|
|
2019-12-18 04:11:59 +00:00
|
|
|
# Install Rust
|
2023-06-02 06:47:04 +00:00
|
|
|
RUSTUP_VERSION=1.26.0
|
2023-10-10 09:51:38 +00:00
|
|
|
RUST_VERSION=1.73.0
|
2019-12-18 04:11:59 +00:00
|
|
|
RUST_ARCH="x86_64-unknown-linux-gnu"
|
|
|
|
|
|
|
|
RUSTUP_URL=https://static.rust-lang.org/rustup/archive/$RUSTUP_VERSION/$RUST_ARCH/rustup-init
|
2023-09-05 08:56:41 +00:00
|
|
|
curl -o rustup-init $RUSTUP_URL
|
2019-12-18 04:11:59 +00:00
|
|
|
|
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;
|
2023-08-24 08:34:48 +00:00
|
|
|
./rustup-init -y --no-modify-path --default-toolchain $RUST_VERSION;
|
2019-12-18 04:11:59 +00:00
|
|
|
rm rustup-init;
|
|
|
|
chmod -R a+w $RUSTUP_HOME $CARGO_HOME
|
|
|
|
|
2023-07-31 17:26:34 +00:00
|
|
|
# Apparently rustup did not do that, and it fails now
|
2023-10-10 09:51:47 +00:00
|
|
|
cargo install cargo-c --version 0.9.27+cargo-0.74.0
|
2023-07-31 17:26:34 +00:00
|
|
|
|
2019-12-18 04:11:59 +00:00
|
|
|
rustup --version
|
|
|
|
cargo --version
|
|
|
|
rustc --version
|
|
|
|
|
2020-10-24 17:56:22 +00:00
|
|
|
# get gstreamer and make all subprojects available
|
2021-12-02 22:57:09 +00:00
|
|
|
git clone -b ${GIT_BRANCH} ${GIT_URL} /gstreamer
|
|
|
|
git -C /gstreamer submodule update --init --depth=1
|
2020-10-24 17:56:22 +00:00
|
|
|
meson subprojects download --sourcedir /gstreamer
|
2023-08-29 06:10:49 +00:00
|
|
|
/gstreamer/ci/scripts/handle-subprojects-cache.py --build --cache-dir /subprojects /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-12-02 22:57:09 +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
|
|
|
|
2021-12-02 22:57:09 +00:00
|
|
|
# Now remove the gstreamer clone
|
|
|
|
rm -rf /gstreamer
|
|
|
|
|
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*
|