Re: [PATCH] build: only install examples when nwfilter is defined

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 06/04/2013 11:32 AM, Jim Fehlig wrote:
> Eric Blake wrote:
>> On 06/04/2013 08:43 AM, Jim Fehlig wrote:
>>   
>>> Only install nwfilter example XML files when WITH_NWFILTER
>>> is defined.
>>>     
>>
>> Does this require any corresponding libvirt.spec.in file changes?
>>   
> 
> I don't think so.  I stumbled across this issue doing a client-only
> package build, where WITH_NWFILTER is not defined yet the XML examples
> get installed.

I'm looking at examples like this in the spec file:

%if ! %{with_python}
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version}
%else
rm -rf $RPM_BUILD_ROOT%{_datadir}/doc/libvirt-python-%{version}/examples
%endif

but note that those files are also conditionally called out later under
%files python.

My initial concern was whether we need a corresponding %if !
%{with_nwfilter} clause which removes the nwfilter example files when
building an rpm without nwfilter.  But looking for where those files get
installed, I only found the recursive:

%doc examples/xml

which merely copies into the rpm all doc files that got installed; and
your change is to the Makefile to not install them in the first place.
Different from the python examples, the examples/xml files are all
installed into a single sub-package.  So it looks like creating an rpm
of just the client libraries should still succeed, as it's not
referencing any file name that didn't exist, nor stranding any files behind.

I ran out of time to actually test a 'make rpm' of just a client build,
but have convinced myself that: a) your change seems like it is clean,
and b) we have time to fix it before 1.0.7 if further testing turns up
anything.

On the other hand; WITH_NWFILTER controlls what libvirtd provides, not
what the client can do.  Technically, even on a machine where the client
was built without nwfilter support, that client can still talk to a
libvirtd with nwfilter enabled, at which point the examples are still
usable.

I'm still reluctant to give ack, but now for a different reason.  I'm
not convinced that compiling client-only has any bearing on whether the
nwfilter xml examples are useful, because it is not the client that
talks to nwfilter in the first place, but libvirtd, and you can't know
what capabilities the libvirtd will have that the client will be talking
to.  Does anyone else have an opinion?

-- 
Eric Blake   eblake redhat com    +1-919-301-3266
Libvirt virtualization library http://libvirt.org

Attachment: signature.asc
Description: OpenPGP digital signature

--
libvir-list mailing list
libvir-list@xxxxxxxxxx
https://www.redhat.com/mailman/listinfo/libvir-list

[Index of Archives]     [Virt Tools]     [Libvirt Users]     [Lib OS Info]     [Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [KDE Users]     [Fedora Tools]