[libvirt] [PATCH] libvirt.spec.in: BuildRequires: python-devel

As of f48ab7d8 we are trying to use python-devel to check python's version (or at least gnulib is doing that). However, the specfile doesn't say anything about it and therefore bootstrapping may fail on a minimal installation on rawhide. Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- libvirt.spec.in | 1 + 1 file changed, 1 insertion(+) diff --git a/libvirt.spec.in b/libvirt.spec.in index 0959483..083612c 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -424,6 +424,7 @@ BuildRequires: automake BuildRequires: gettext-devel BuildRequires: libtool BuildRequires: /usr/bin/pod2man +BuildRequires: python-devel %endif BuildRequires: git BuildRequires: perl -- 2.0.4

On 12/01/2014 09:21 AM, Michal Privoznik wrote:
As of f48ab7d8 we are trying to use python-devel to check python's version (or at least gnulib is doing that). However, the specfile doesn't say anything about it and therefore bootstrapping may fail on a minimal installation on rawhide.
What's the failure? The whole point of f48ab7d8 is that the use of 'python-config' is optional, and should not be fatal if it is not found. Requiring it in the specfile feels like a step backwards, and probably breaks on RHEL 5, where we still want 'make rpm' to work.
Signed-off-by: Michal Privoznik <mprivozn@redhat.com> --- libvirt.spec.in | 1 + 1 file changed, 1 insertion(+)
diff --git a/libvirt.spec.in b/libvirt.spec.in index 0959483..083612c 100644 --- a/libvirt.spec.in +++ b/libvirt.spec.in @@ -424,6 +424,7 @@ BuildRequires: automake BuildRequires: gettext-devel BuildRequires: libtool BuildRequires: /usr/bin/pod2man +BuildRequires: python-devel
I'm inclined to NACK this without more evidence why it is needed, in case we come up with a better way to fix the real problem.
%endif BuildRequires: git BuildRequires: perl
-- Eric Blake eblake redhat com +1-919-301-3266 Libvirt virtualization library http://libvirt.org

On 01.12.2014 22:32, Eric Blake wrote:
On 12/01/2014 09:21 AM, Michal Privoznik wrote:
As of f48ab7d8 we are trying to use python-devel to check python's version (or at least gnulib is doing that). However, the specfile doesn't say anything about it and therefore bootstrapping may fail on a minimal installation on rawhide.
What's the failure? The whole point of f48ab7d8 is that the use of 'python-config' is optional, and should not be fatal if it is not found. Requiring it in the specfile feels like a step backwards, and probably breaks on RHEL 5, where we still want 'make rpm' to work.
Do we? [zippy@localhost libvirt.git]$ cat /etc/fedora-release Fedora release 22 (Rawhide) [zippy@localhost libvirt.git]$ rpm -q python-devel package python-devel is not installed [zippy@localhost libvirt.git]$ git clean -fxd; ./autogen.sh --system Removing AUTHORS Removing ChangeLog Running ./configure with --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 running bootstrap... ./bootstrap: Error: 'python-config' not found ./bootstrap: Please install the prerequisite programs Failed to bootstrap, please investigate. [zippy@localhost libvirt.git]$ Michal

On Tue, Dec 02, 2014 at 09:11:56 +0100, Michal Privoznik wrote:
On 01.12.2014 22:32, Eric Blake wrote:
On 12/01/2014 09:21 AM, Michal Privoznik wrote:
As of f48ab7d8 we are trying to use python-devel to check python's version (or at least gnulib is doing that). However, the specfile doesn't say anything about it and therefore bootstrapping may fail on a minimal installation on rawhide.
What's the failure? The whole point of f48ab7d8 is that the use of 'python-config' is optional, and should not be fatal if it is not found. Requiring it in the specfile feels like a step backwards, and probably breaks on RHEL 5, where we still want 'make rpm' to work.
Do we?
[zippy@localhost libvirt.git]$ cat /etc/fedora-release Fedora release 22 (Rawhide) [zippy@localhost libvirt.git]$ rpm -q python-devel package python-devel is not installed [zippy@localhost libvirt.git]$ git clean -fxd; ./autogen.sh --system Removing AUTHORS Removing ChangeLog Running ./configure with --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 running bootstrap... ./bootstrap: Error: 'python-config' not found
./bootstrap: Please install the prerequisite programs Failed to bootstrap, please investigate. [zippy@localhost libvirt.git]$
But requiring python-devel in libvirt.spec is not going to help you with this in any way. RPMs can be built only after you have bootstrapped libvirt. And I guess at that point, python-devel is no longer required or is it? Jirka

On 02.12.2014 10:09, Jiri Denemark wrote:
On Tue, Dec 02, 2014 at 09:11:56 +0100, Michal Privoznik wrote:
On 01.12.2014 22:32, Eric Blake wrote:
On 12/01/2014 09:21 AM, Michal Privoznik wrote:
As of f48ab7d8 we are trying to use python-devel to check python's version (or at least gnulib is doing that). However, the specfile doesn't say anything about it and therefore bootstrapping may fail on a minimal installation on rawhide.
What's the failure? The whole point of f48ab7d8 is that the use of 'python-config' is optional, and should not be fatal if it is not found. Requiring it in the specfile feels like a step backwards, and probably breaks on RHEL 5, where we still want 'make rpm' to work.
Do we?
[zippy@localhost libvirt.git]$ cat /etc/fedora-release Fedora release 22 (Rawhide) [zippy@localhost libvirt.git]$ rpm -q python-devel package python-devel is not installed [zippy@localhost libvirt.git]$ git clean -fxd; ./autogen.sh --system Removing AUTHORS Removing ChangeLog Running ./configure with --prefix=/usr --sysconfdir=/etc --localstatedir=/var --libdir=/usr/lib64 running bootstrap... ./bootstrap: Error: 'python-config' not found
./bootstrap: Please install the prerequisite programs Failed to bootstrap, please investigate. [zippy@localhost libvirt.git]$
But requiring python-devel in libvirt.spec is not going to help you with this in any way. RPMs can be built only after you have bootstrapped libvirt. And I guess at that point, python-devel is no longer required or is it?
I think it's going to help. Let me show you how I install dependencies for libvirt. I download the latest src.rpm from koji web, and yum-builddep it. But that - for some reason - doesn't install all the necessary packages. So I need to go through couple of iterations of 'autogen.sh && make' just to install missing dependencies. Honestly, I don't see any downside of having BuildRequires for additional packages that are required to build from git. Upside is much easier dependency installation. We are already doing that btw: the section I'm adding the dependency to already contains libtool, autoconf, automake, etc. Packages that are not needed when building from released tar.gz rather than when building from git. Michal
participants (3)
-
Eric Blake
-
Jiri Denemark
-
Michal Privoznik