2019-03-18 17:51:07 +03:00
|
|
|
#!/bin/bash
|
2021-06-21 23:34:43 +03:00
|
|
|
#
|
|
|
|
# Constructs the base container image used to build Weston within CI. Per the
|
|
|
|
# comment at the top of .gitlab-ci.yml, any changes in this file must bump the
|
|
|
|
# $FDO_DISTRIBUTION_TAG variable so we know the container has to be rebuilt.
|
2019-03-18 17:51:07 +03:00
|
|
|
|
2019-11-21 16:03:03 +03:00
|
|
|
set -o xtrace -o errexit
|
2019-03-18 17:51:07 +03:00
|
|
|
|
2020-06-03 16:02:34 +03:00
|
|
|
# These get temporary installed for building Linux and then force-removed.
|
|
|
|
LINUX_DEV_PKGS="
|
|
|
|
bc
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
libelf-dev
|
|
|
|
"
|
|
|
|
|
2020-02-17 16:32:18 +03:00
|
|
|
# These get temporary installed for building Mesa and then force-removed.
|
|
|
|
MESA_DEV_PKGS="
|
|
|
|
bison
|
|
|
|
flex
|
|
|
|
gettext
|
|
|
|
libwayland-egl-backend-dev
|
|
|
|
libxrandr-dev
|
|
|
|
llvm-8-dev
|
|
|
|
python-mako
|
|
|
|
python3-mako
|
|
|
|
"
|
|
|
|
|
|
|
|
# Needed for running the custom-built mesa
|
|
|
|
MESA_RUNTIME_PKGS="
|
|
|
|
libllvm8
|
|
|
|
"
|
|
|
|
|
2019-05-12 12:47:25 +03:00
|
|
|
echo 'deb http://deb.debian.org/debian buster-backports main' >> /etc/apt/sources.list
|
2019-03-18 17:51:07 +03:00
|
|
|
apt-get update
|
2019-11-21 16:04:28 +03:00
|
|
|
apt-get -y --no-install-recommends install \
|
|
|
|
autoconf \
|
|
|
|
automake \
|
|
|
|
build-essential \
|
2021-08-03 15:11:51 +03:00
|
|
|
clang-8 \
|
2019-11-21 16:04:28 +03:00
|
|
|
curl \
|
|
|
|
doxygen \
|
2019-11-21 16:06:30 +03:00
|
|
|
gcovr \
|
2019-11-21 16:04:28 +03:00
|
|
|
git \
|
2019-11-21 16:06:30 +03:00
|
|
|
lcov \
|
2020-07-06 09:58:02 +03:00
|
|
|
libasound2-dev \
|
|
|
|
libbluetooth-dev \
|
2019-11-21 16:04:28 +03:00
|
|
|
libcairo2-dev \
|
|
|
|
libcolord-dev \
|
|
|
|
libdbus-1-dev \
|
|
|
|
libegl1-mesa-dev \
|
|
|
|
libevdev-dev \
|
|
|
|
libexpat1-dev \
|
|
|
|
libffi-dev \
|
|
|
|
libgbm-dev \
|
|
|
|
libgdk-pixbuf2.0-dev \
|
|
|
|
libgles2-mesa-dev \
|
|
|
|
libglu1-mesa-dev \
|
|
|
|
libgstreamer1.0-dev \
|
|
|
|
libgstreamer-plugins-base1.0-dev \
|
|
|
|
libinput-dev \
|
2020-07-06 09:58:02 +03:00
|
|
|
libjack-jackd2-dev \
|
2019-11-21 16:04:28 +03:00
|
|
|
libjpeg-dev \
|
|
|
|
libjpeg-dev \
|
|
|
|
liblcms2-dev \
|
|
|
|
libmtdev-dev \
|
|
|
|
libpam0g-dev \
|
|
|
|
libpango1.0-dev \
|
|
|
|
libpixman-1-dev \
|
|
|
|
libpng-dev \
|
2020-07-06 09:58:02 +03:00
|
|
|
libpulse-dev \
|
|
|
|
libsbc-dev \
|
2019-11-21 16:04:28 +03:00
|
|
|
libsystemd-dev \
|
|
|
|
libtool \
|
|
|
|
libudev-dev \
|
|
|
|
libva-dev \
|
|
|
|
libvpx-dev \
|
2020-07-06 09:58:02 +03:00
|
|
|
libvulkan-dev \
|
2019-11-21 16:04:28 +03:00
|
|
|
libwebp-dev \
|
|
|
|
libx11-dev \
|
|
|
|
libx11-xcb-dev \
|
|
|
|
libxcb1-dev \
|
|
|
|
libxcb-composite0-dev \
|
|
|
|
libxcb-xfixes0-dev \
|
|
|
|
libxcb-xkb-dev \
|
|
|
|
libxcursor-dev \
|
|
|
|
libxkbcommon-dev \
|
|
|
|
libxml2-dev \
|
2021-08-03 15:11:51 +03:00
|
|
|
lld-8 \
|
|
|
|
llvm-8 \
|
2019-11-21 16:04:28 +03:00
|
|
|
mesa-common-dev \
|
|
|
|
ninja-build \
|
|
|
|
pkg-config \
|
|
|
|
python3-pip \
|
|
|
|
python3-setuptools \
|
2020-06-03 16:02:34 +03:00
|
|
|
qemu-system \
|
|
|
|
sysvinit-core \
|
2019-12-11 14:12:52 +03:00
|
|
|
xwayland \
|
2021-06-22 01:53:51 +03:00
|
|
|
$MESA_DEV_PKGS \
|
2021-06-22 01:49:32 +03:00
|
|
|
$MESA_RUNTIME_PKGS \
|
|
|
|
$LINUX_DEV_PKGS \
|
2019-11-21 16:04:28 +03:00
|
|
|
|
2020-09-30 00:56:06 +03:00
|
|
|
apt-get -y --no-install-recommends -t buster-backports install \
|
|
|
|
freerdp2-dev
|
2019-03-18 17:51:07 +03:00
|
|
|
|
2020-02-17 16:32:18 +03:00
|
|
|
|
2021-06-22 01:53:51 +03:00
|
|
|
# Actually build our dependencies ...
|
|
|
|
./.gitlab-ci/build-deps.sh
|
2020-07-06 09:58:02 +03:00
|
|
|
|
2021-04-14 23:37:36 +03:00
|
|
|
|
2021-06-22 01:53:51 +03:00
|
|
|
# And remove packages which are only required for our build dependencies,
|
|
|
|
# which we don't need bloating the image whilst we build and run Weston.
|
2021-06-22 01:49:32 +03:00
|
|
|
apt-get -y --autoremove purge $LINUX_DEV_PKGS $MESA_DEV_PKGS
|