On Wed, Aug 05, 2020 at 03:23:44PM +0200, Erik Skultety wrote:
On Wed, Aug 05, 2020 at 03:14:52PM +0200, Andrea Bolognani wrote:
> On Wed, 2020-08-05 at 14:30 +0200, Pavel Hrdina wrote:
> > Once we (hopefully) move remaining projects to meson and some of the
> > projects would require newer meson we would have to introduce the ugly
> > hack into these spec files as well (if there are any).
> >
> > After checking what is in the macro file the only drawback is that the
> > build-in `%meson` macro has the path to meson defined by `%__meson` so
> > my suggestion would not work.
> >
> > I wanted to suggest to use rpmbuild --nodeps --load /path/to/marcos.meson
> > but PyPi meson doesn't ship that file :/.
> >
> > We probably doesn't have any other option than adding the ugly macro
> > content into the spec file which I don't like at all.
>
> It makes sense that the path would point to /usr/bin because the
> macros are intended to be used with the RPMs, not random versions of
> Meson installed from PyPi.
>
> Maybe the most sensible thing to do is just admit that we can't
> reasonably build RPMs for libvirt on platforms where Meson itself is
> not available as an RPM package.
If we add the macro ourselves to spec file it will be already ugly so we
don't have to use /usr/bin/meson but meson only to get whatever is in
the path which would be the PyPi installed one. This way it should work
everywhere where it worked with autoconf and you have correct meson
version installed.
> Users can still take the Fedora package and rebuild it on CentOS
if
> they're so inclined, and we should be able to get Meson 0.54.0
Already ahead of you....tried to rebuild it, didn't work - I hit specfile
syntax issues and not being well-versed in SPEC at all, I gave up and
installed it directly from Fedora, worked like a charm. I'll contact the RHEL
packager and ask about getting updated meson.
Exactly because of the `%__meson` macro the source RPM will not work as
well if you don't have correct version of meson that ships the RPM
macros file.
Downstream maintainers can bundle meson directly into the source RPM and
remove the meson BuildRequires and redefine `%__meson` macro to the
bundled meson.
> included in a future CentOS 8 update to minimize the impact of
this
> problem further, so ultimately we're only losing CentOS 7 coverage
> for the RPM build in the long-ish run.
>
> Note that we're currently not building RPMs as part of the CI
> pipeline at all :)
I don't mind fixing it if we come up with something reasonable but I
also don't mind leaving it as it is. If we get a lot of complains from
users we can push for a fix.
Pavel