Re: [libvirt] Refactor libvirt spec file

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

 



On Thu, Sep 17, 2009 at 03:23:29PM +0200, Matthias Bolte wrote:
> 2009/9/17 Daniel P. Berrange <berrange@xxxxxxxxxx>:
> > The following patch refactors the libvirt spec file conditional
> > logic to make it a little easier to manage all the different
> > Fedora/RHEL OS build variations, and also allow for easy
> > creation of a client-only build
> >
> > The patch follows, but I'm including the full specfile below
> > too, since its easier to understand than the diff
> >
> > # -*- rpm-spec -*-
> >
> > # A client only build will create a libvirt.so only containing
> > # the generic RPC driver, and test driver and no libvirtd
> > # Default to a full server + client build
> > %define client_only        0
> >
> > # Now turn off server build in certain cases
> >
> > # RHEL-5 builds are client-only for s390, ppc
> > %if 0%{?rhel} == 5
> > %ifnarch i386 i586 i686 x86_64 ia64
> > %define client_only        1
> > %endif
> > %endif
> >
> > # Disable all server side drivers if client only build requested
> > %if %{client_only}
> > %define server_drivers     0
> > %else
> > %define server_drivers     1
> > %endif
> >
> >
> > # Now set the defaults for all the important features, independant
> > # of any particular OS
> >
> > # First the daemon itself
> > %define with_libvirtd      0%{!?_without_libvirtd:%{server_drivers}}
> > %define with_avahi         0%{!?_without_avahi:%{server_drivers}}
> >
> > # Then the hypervisor drivers
> > %define with_xen           0%{!?_without_xen:%{server_drivers}}
> > %define with_xen_proxy     0%{!?_without_xen_proxy:%{server_drivers}}
> > %define with_qemu          0%{!?_without_qemu:%{server_drivers}}
> > %define with_openvz        0%{!?_without_openvz:%{server_drivers}}
> > %define with_lxc           0%{!?_without_lxc:%{server_drivers}}
> > %define with_vbox          0%{!?_without_vbox:%{server_drivers}}
> > %define with_uml           0%{!?_without_uml:%{server_drivers}}
> > %define with_one           0%{!?_without_one:%{server_drivers}}
> > %define with_phyp          0%{!?_without_phyp:%{server_drivers}}
> > %define with_esx           0%{!?_without_esx:%{server_drivers}}
> 
> Technically the phyp and esx drivers are client side drivers, because
> they don't rely on libvirtd for their remote communication. If the
> phyp and esx drivers are disabled due to a client only build, then the
> access to phyp and esx servers (using this client only build) is not
> possible, because there is no libvirtd running on phyp and esx servers
> a client only libvirt could connect to.

Good point - I'll make them toggle independantly on the 'server_drivers'
flag.

> [...]
> > %if %{with_phyp}
> > BuildRequires: libssh2-devel
> > %endif
> 
> The build requirement for libssh2-devel should have an explicit check
> for version >= 1.0.
> 
> I think a build requirement for libcurl is missing here.
> 
> %if %{with_esx}
> BuildRequires: libcurl-devel > 7.18.0
> %endif

I think that's pulled in to the build roots automatically, but there's
no harm in adding an explicit requires too.

Daniel.
-- 
|: Red Hat, Engineering, London   -o-   http://people.redhat.com/berrange/ :|
|: http://libvirt.org  -o-  http://virt-manager.org  -o-  http://ovirt.org :|
|: http://autobuild.org       -o-         http://search.cpan.org/~danberr/ :|
|: GnuPG: 7D3B9505  -o-  F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|

--
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]