69e3af4331
Doing builddep once based on the baked config and then once more from the spec file can cause issues sometimes. For example, right now the latest rpm-ostree release uses libmodulemd1, but we want to rebase to libmodulemd (2.0). And `dnf` will get confused trying to move from one to the other. Really, we don't need to builddep from the last release at all, so just drop that and rely only on the spec file. Adapt `pkg_install_builddeps` to allow no args to mean only installing the basic buildroot stuff like `dnf builddep` and `@buildsys-build`.
38 lines
1.5 KiB
Bash
Executable File
38 lines
1.5 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
# Install build dependencies
|
|
|
|
set -xeuo pipefail
|
|
|
|
dn=$(dirname $0)
|
|
. ${dn}/libbuild.sh
|
|
|
|
if [ -n "${SKIP_INSTALLDEPS:-}" ]; then
|
|
exit 0
|
|
fi
|
|
|
|
# Use the latest ostree by default (XXX: currently pulling in f29 ostree, need
|
|
# to bump rdgo to f30 or wait for packit)
|
|
id=$(. /etc/os-release && echo $ID)
|
|
version_id=$(. /etc/os-release && echo $VERSION_ID)
|
|
if [ "$id" == fedora ] && [ "$version_id" -ge 29 ]; then
|
|
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
|
|
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
|
|
mv ${repo}.new ${repo}
|
|
done
|
|
fi
|
|
|
|
pkg_upgrade
|
|
# install base builddeps like @buildsys-build
|
|
pkg_install_builddeps
|
|
# we have the canonical spec file handy so just builddep from that
|
|
# XXX: use --allowerasing as a temporary hack to ease the migration to libmodulemd2
|
|
dnf builddep --spec -y packaging/rpm-ostree.spec.in --allowerasing
|
|
# Mostly dependencies for tests
|
|
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
|