d34f24581a
- Use `IFS=` so that we don't drop leading whitespace when reading in, which can be used to specify multiple baseurls on multiple lines. - Use `-r` as good practice so we don't try to interpret anything. - Use `echo "$line"` so that we don't drop leading whitespace when writing out. Closes: #1787 Approved by: cgwalters
32 lines
1.3 KiB
Bash
Executable File
32 lines
1.3 KiB
Bash
Executable File
#!/usr/bin/bash
|
|
# Install build dependencies
|
|
|
|
set -xeuo pipefail
|
|
|
|
dn=$(dirname $0)
|
|
. ${dn}/libbuild.sh
|
|
|
|
# Use the latest ostree by default
|
|
id=$(. /etc/os-release && echo $ID)
|
|
version_id=$(. /etc/os-release && echo $VERSION_ID)
|
|
if [ "$id" == fedora ] && [ "$version_id" == 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
|
|
pkg_install_if_os centos epel-release
|
|
pkg_install_builddeps rpm-ostree
|
|
# Mostly dependencies for tests
|
|
pkg_install ostree{,-devel,-grub2} createrepo_c /usr/bin/jq PyYAML \
|
|
libubsan libasan libtsan elfutils fuse sudo python-gobject-base \
|
|
selinux-policy-devel selinux-policy-targeted python2-createrepo_c \
|
|
rsync rpm-python # provided by python2-rpm on Fedora
|
|
# For more CI testing
|
|
pkg_install_if_os fedora parallel clang rustfmt-preview
|