2018-10-11 23:14:43 +03:00
#!/usr/bin/bash
# Install build dependencies
set -xeuo pipefail
dn = $( dirname $0 )
. ${ dn } /libbuild.sh
2019-08-29 05:08:15 +03:00
if [ -n " ${ SKIP_INSTALLDEPS :- } " ] ; then
exit 0
fi
2019-09-06 23:15:59 +03:00
# Use the latest ostree by default (XXX: currently pulling in f29 ostree, need
# to bump rdgo to f30 or wait for packit)
2018-10-11 23:14:43 +03:00
id = $( . /etc/os-release && echo $ID )
version_id = $( . /etc/os-release && echo $VERSION_ID )
2019-09-06 23:15:59 +03:00
if [ " $id " = = fedora ] && [ " $version_id " -ge 29 ] ; then
2018-10-11 23:14:43 +03:00
echo -e '[fahc]\nmetadata_expire=1m\nbaseurl=https://ci.centos.org/artifacts/sig-atomic/fahc/rdgo/build/\ngpgcheck=0\n' > /etc/yum.repos.d/fahc.repo
# Until we fix https://github.com/rpm-software-management/libdnf/pull/149
excludes = 'exclude=ostree ostree-libs ostree-grub2 rpm-ostree'
for repo in /etc/yum.repos.d/fedora*.repo; do
2019-03-15 17:57:40 +03:00
cat ${ repo } | ( while IFS = read -r line; do if echo " $line " | grep -qE -e '^enabled=1' ; then echo " ${ excludes } " ; fi ; echo " $line " ; done ) > ${ repo } .new
2018-10-11 23:14:43 +03:00
mv ${ repo } .new ${ repo }
done
fi
pkg_upgrade
2020-02-21 23:30:32 +03:00
# install base builddeps like @buildsys-build
pkg_install_builddeps
# we have the canonical spec file handy so just builddep from that
2020-02-21 18:58:31 +03:00
# XXX: use --allowerasing as a temporary hack to ease the migration to libmodulemd2
dnf builddep --spec -y packaging/rpm-ostree.spec.in --allowerasing
2018-10-11 23:14:43 +03:00
# Mostly dependencies for tests
2019-05-08 17:15:48 +03:00
pkg_install ostree{ ,-devel,-grub2} createrepo_c /usr/bin/jq python3-pyyaml \
libubsan libasan libtsan elfutils fuse sudo python3-gobject-base \
selinux-policy-devel selinux-policy-targeted python3-createrepo_c \
rsync python3-rpm parallel clang rustfmt-preview