1
0
mirror of https://github.com/containers/bootc.git synced 2026-02-05 06:45:13 +01:00
Files
bootc/ci/installdeps.sh
Colin Walters 44b8d25d2a build-sys: Add made up binary-dependencies key
This would be a nice thing to try to standardize, but let's just
keep track of this and use it in our CI install flow too. This
helps us be cross distribution a bit more.

Signed-off-by: Colin Walters <walters@verbum.org>
2025-01-03 14:44:52 -05:00

35 lines
1.2 KiB
Bash
Executable File

#!/bin/bash
set -xeuo pipefail
OS_ID=$(. /usr/lib/os-release && echo $ID)
baseurl=
case $OS_ID in
fedora) baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/fedora-\$releasever-\$basearch/ ;;
# Default to c9s (also covers all variants/derivatives)
*) baseurl=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/centos-stream-\$releasever-\$basearch/ ;;
esac
# For some reason dnf copr enable -y says there are no builds?
cat >/etc/yum.repos.d/coreos-continuous.repo << EOF
[copr:copr.fedorainfracloud.org:group_CoreOS:continuous]
name=Copr repo for continuous owned by @CoreOS
baseurl=$baseurl
type=rpm-md
skip_if_unavailable=True
gpgcheck=1
gpgkey=https://download.copr.fedorainfracloud.org/results/@CoreOS/continuous/pubkey.gpg
repo_gpgcheck=0
enabled=1
enabled_metadata=1
EOF
# TODO: Recursively extract this from the existing cargo system-deps metadata
case $OS_ID in
fedora) dnf -y builddep bootc ;;
*) dnf -y install libzstd-devel openssl-devel ostree-devel cargo ;;
esac
bindeps=$(cargo metadata --format-version 1 --no-deps | jq -r '.metadata.["binary-dependencies"].bins | map("/usr/bin/" + .) | join(" ")')
dnf -y install $bindeps