ostree/ci/flatpak.sh
Robert Fairley 86cf6ba5c5 ci/flatpak: Bump FLATPAK_TAG to 1.4.1
Bump the flatpak version used in CI to avoid a repeated definition of
`renameat2()` in libglnx and glibc.

See: https://github.com/ostreedev/ostree/pull/1871#issuecomment-503768062

Closes: #1871
Approved by: jlebon
2019-06-21 13:17:10 +00:00

44 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
# Build and run flatpak's unit tests using the just-built ostree for this PR.
set -xeuo pipefail
# Keep this pinned to avoid arbitrary change for now; it's also
# good to test building older code against newer ostree as it helps
# us notice any API breaks.
FLATPAK_TAG=1.4.1
dn=$(dirname $0)
. ${dn}/libpaprci/libbuild.sh
codedir=$(pwd)
# Build ostree, but we don't install it yet
cd ${codedir}
ci/build.sh
# Build flatpak
tmpd=$(mktemp -d)
cd ${tmpd}
git clone --recursive --depth=1 -b ${FLATPAK_TAG} https://github.com/flatpak/flatpak
cd ${tmpd}/flatpak
# This is a copy of flatpak/ci/build.sh, but we can't use that as we want to install
# our built ostree over it.
pkg_install sudo which attr fuse bison \
libubsan libasan libtsan clang python2 \
elfutils git gettext-devel libappstream-glib-devel hicolor-icon-theme \
/usr/bin/{update-mime-database,update-desktop-database,gtk-update-icon-cache}
pkg_builddep flatpak
# Now install ostree over the package version
cd ${codedir}
make install
cd -
# And build flatpak
build
# We want to capture automake results from flatpak
cleanup() {
mv test-suite.log ${codedir} || true
}
trap cleanup EXIT
make -j 8 check