e11d426f99
So this is a somewhat significant change, but I'd like to try having the canonical spec file upstream. A few reasons for this: 1. We integrate tightly with the distros we're destined for, and so we're in a pretty good position for knowing how the software should be packaged. 2. We can atomically change packaging along with the rest of the code. This has important ramifications, including that it'll be easier to integrate with continuous build services like Packit, but releases will also be less fraught with last-minute packaging fixes. 3. I'm playing with Jenkins pipelines and there I'd like to make RPMs the "artifact" that gets moved down the pipeline into later stages (e.g. `cosa build`). We could even eventually make it an actual external artifact so that anyone can easily download RPMs from any random PR for testing. (And in fact, with a thin yumrepo layer on top, it could be used to replace Packit/rdgo entirely). Not that this approach doesn't have issues as well (e.g. on the dist-git side, we'll need some minimal tooling to merge in the changelog), though I think it's worth trying out. Closes: #1900 Approved by: cgwalters
32 lines
1.4 KiB
Bash
Executable File
32 lines
1.4 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 (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
|
|
pkg_install_builddeps rpm-ostree
|
|
# and we have the canonical spec file handy so just builddep from that too
|
|
dnf builddep --spec -y packaging/rpm-ostree.spec.in
|
|
# 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
|