29d051e895
This adds support for e.g.: ``` $ rpm-ostree override replace https://bodhi.fedoraproject.org/updates/FEDORA-2020-2908628031 ``` This will find the Koji builds from the listed update, download all the RPMs (that aren't debuginfo) and pass them for overrides in the same way we support `override replace http://somewebserver/foo.rpm` now. We also support directly linking a Koji build: ``` $ rpm-ostree override replace https://koji.fedoraproject.org/koji/buildinfo?buildID=1625029 ``` Bodhi has a modern HTTP+JSON API, and the lack of a Koji equivalent drove me to create https://github.com/cgwalters/koji-sane-json-api and we currently depend on an instance set up in the OpenShift CI cluster. I hope it shouldn't take long to deploy this in Fedora Infra, but I don't want to block on it. Also notably this still downloads *all* the other RPMs even ones that aren't installed. Handling that truly correctly would require moving this logic to the daemon and core. All of this functionality is keyed off a `cfg(feature = "fedora-integration")` that is detected by a Rust `build.rs` which parses the build environment's `/etc/os-release` for now.
21 lines
715 B
Bash
Executable File
21 lines
715 B
Bash
Executable File
#!/bin/bash
|
|
# kola: { "tags": "needs-internet" }
|
|
# Test https://github.com/coreos/rpm-ostree/pull/2420
|
|
# i.e. using overrides from Fedora Infrastructure tools (koji/bodhi)
|
|
set -euo pipefail
|
|
|
|
. ${KOLA_EXT_DATA}/libtest.sh
|
|
cd $(mktemp -d)
|
|
|
|
# bodhi update for rpm-ostree (Fedora 33)
|
|
rpm-ostree override replace https://bodhi.fedoraproject.org/updates/FEDORA-2020-6e743def1d
|
|
rpm-ostree status > status.txt
|
|
assert_file_has_content_literal status.txt "Diff: 2 downgraded"
|
|
rpm-ostree cleanup -p
|
|
# Same build directly via Koji
|
|
rpm-ostree override replace https://koji.fedoraproject.org/koji/buildinfo?buildID=1637715
|
|
rpm-ostree status > status.txt
|
|
assert_file_has_content_literal status.txt "Diff: 2 downgraded"
|
|
|
|
echo "ok"
|