BuildRequires: redhat-rpm-config

Adam Jackson ajax at redhat.com
Thu Nov 14 15:45:25 UTC 2013


On Thu, 2013-11-14 at 08:56 +0000, Richard W.M. Jones wrote:
> I had a bug filed that a Python package I'm maintaining cannot be
> rebuilt using 'rpmbuild --rebuild'.  The failure was that the *.pyc
> and *.pyo files are missing.
> 
> After a lot of head-scratching and debugging it turns out that
> brp-python-bytecompile was not running, and that happens because the
> RPM macro %{__os_install_post} didn't contain a call to
> brp-python-bytecompile.  This macro exists in base RPM, but is
> overridden/extended when redhat-rpm-config is installed.
> 
> Installing redhat-rpm-config fixes the problem for the bug reporter.
> 
> However this raises some questions:
> 
>  - Should this package explicitly BR redhat-rpm-config?

No.

>  - Should all Python packages explicitly BuildRequire redhat-rpm-config?

No.

>  - Should this package not be packaging up the *.py[co] files?

No.

>  - Is this a bug in redhat-rpm-config/Python/RPM/Fedora?

Yes.  People hit this _constantly_ in a lot of ways.  Like "why am I not
getting debuginfo packages".  The theory is that you might want to build
with some other set of macros, which is why rpmbuild doesn't just
require r-r-c.

I think this is foolish, and that we should just fix rpmbuild: if you
wanted some other set of macros, start by rebuilding rpm to require
something other than r-r-c.  The counter-argument is - and I find this
completely baffling - that it's easier to replace packages than rebuild
them, so that instead rpmbuild should Require: system-rpm-config and
then r-r-c happens to be what provides that by default.  Which, sure,
that's also a thing we could do.

Either solution would be better than what we have.

>  - Should I just ignore this because it builds fine in Koji?

Yes.

- ajax



More information about the devel mailing list