From afbff9584cd1bf15076d7f3e861fc0083ad59d03 Mon Sep 17 00:00:00 2001 From: Jonathan Lebon Date: Wed, 26 Feb 2020 12:54:44 -0500 Subject: [PATCH] buildroot: support list of spec files to builddep For rpm-ostree, we keep the canonical spec file upstream. Use that instead of the latest deps of the last release since it's going to be more up to date. --- src/buildroot-buildreqs.txt | 1 - src/buildroot-specs.txt | 3 +++ src/install-buildroot.sh | 5 +++++ 3 files changed, 8 insertions(+), 1 deletion(-) create mode 100644 src/buildroot-specs.txt diff --git a/src/buildroot-buildreqs.txt b/src/buildroot-buildreqs.txt index 7574edd851..7395abc51b 100644 --- a/src/buildroot-buildreqs.txt +++ b/src/buildroot-buildreqs.txt @@ -2,7 +2,6 @@ # If you want to extend this, feel free to file a PR. ignition ostree -rpm-ostree libdnf librepo kernel diff --git a/src/buildroot-specs.txt b/src/buildroot-specs.txt new file mode 100644 index 0000000000..f164c9d9b4 --- /dev/null +++ b/src/buildroot-specs.txt @@ -0,0 +1,3 @@ +# for projects which have their canonical spec files upstream, use those instead +# since they're more up to date +https://raw.githubusercontent.com/coreos/rpm-ostree/master/packaging/rpm-ostree.spec.in diff --git a/src/install-buildroot.sh b/src/install-buildroot.sh index 96cf5ccc23..c523b812ab 100755 --- a/src/install-buildroot.sh +++ b/src/install-buildroot.sh @@ -8,4 +8,9 @@ echo "${deps}" | xargs yum -y install brs=$(grep -v '^#' "${dn}"/buildroot-buildreqs.txt) echo "Installing build dependencies of primary packages" echo "${brs}" | xargs yum -y builddep +specs=$(grep -v '^#' "${dn}"/buildroot-specs.txt) +echo "Installing build dependencies from canonical spec files" +tmpd=$(mktemp -d) && trap 'rm -rf ${tmpd}' EXIT +(cd "${tmpd}" && echo "${specs}" | xargs curl -L --remote-name-all) +(cd "${tmpd}" && find . -type f -print0 | xargs -0 yum -y builddep --spec) echo 'Done!'