We can greatly simplify the Rust goop now since:
1. upstream now hard requires Rust, so there's no need to make a
conditional for `--enable-rust`.
2. we're not rebasing rpm-ostree in f27, so we can simplify the `>= 28`
conditionals
3. el7 is strictly backports only, so we can simplify the `0%{?rhel}`
conditionals (though we still want to support CentOS 7)
4. the new recommended way of using Rust in el8 is to just
`BuildRequires: rust-toolset`, so we can drop all the SCL crud.
The `cargo` BR was already pulling in the `rust` one, though to be clear
and look closer to what the guidelines suggest, let's make that
explicit.
Also guidelines suggest we should add a BR on the `-runtime` package as
well. It includes RPM macros to help with toolset stuff (although we're
not making use of them right now).
So, this is a hack to somewhat help legibility. RPM allows leading
spaces of `%directives` but not of e.g. `BuildRequires` and
`ExclusiveArch`, so this looks a bit more awkward than it should. But
overall I think it still helps with making sense of all the nested
conditionals.
The `%_configure` thing was especially painful to figure out.
But anyways tested and works.
I'd like to make Rust mandatory soon, along with the general
trend of paring down our experimental/optional feature matrix.
We use this spec file to build on CentOS as well. There,
`python2-sphinx` does not exist, only `python-sphinx`. Let's accommodate
this while still respecting guidelines on Fedora.
See also:
https://github.com/CentOS/sig-atomic-buildscripts/issues/324
RPMDiff was complaining about this:
```
Subpackage rpm-ostree on x86_64 consumes library
librpmostree-1.so.1()(64bit) from subpackage rpm-ostree-libs but does
not have explicit package version requirement.
Please add Requires: rpm-ostree-libs = %{version}-%{release} to
rpm-ostree in the specfile to avoid the need to test interoperability
between the various combinations of old and new subpackages.
```
Since we don't use any symbol versioning in rpm-ostree, this seems like
a fair point. In practice, the matching -libs package should be
available at the same time when composing/installing, though this
protects us from manual `rpm` invocations as well.
Using the synchronize module made rsync try to fetch the files from the
VM, even though we were part of the delegated block. Might be a subtle
bug in ansible. But really, there's no point in using the module here.
Both src and dest are local, so we can just call rsync ourselves.