Commit Graph

337 Commits

Author SHA1 Message Date
Jiri Denemark
1371cc5251 spec: Remove extra () with return statement 2012-08-01 13:09:57 +02:00
Daniel Veillard
27df13f483 Fix rpm build failures
The 'make check' was rebuilding the binaries just overrided,
so for more safety also override the C program
Also daemon-conf isn't built anymore so remove it from the list
2012-08-01 16:10:36 +08:00
Dmitry Guryanov
cafc26ff5f parallels: add driver skeleton
Parallels Cloud Server is a cloud-ready virtualization
solution that allows users to simultaneously run multiple virtual
machines and containers on the same physical server.

More information can be found here: http://www.parallels.com/products/pcs/
Also beta version of Parallels Cloud Server can be downloaded there.

Signed-off-by: Dmitry Guryanov <dguryanov@parallels.com>
2012-08-01 11:44:26 +08:00
Wen Congyang
95738b3f0d building: fix deps error when some drivers are not built
libvirt-daemon-driver-XXX should be a dependency only when with_driver_modules
is 1.
libvirt-daemon-driver-libxl should be a dependency only when with_libxl is 1.
libvirt-daemon-driver-lxc should be a dependency only when with_lxc is 1.
libvirt-daemon-driver-qemu should be a dependency only when with_qemu is 1.
libvirt-daemon-driver-uml should be a dependency only when with_uml is 1.
libvirt-daemon-driver-xen should be a dependency only when with_xen is 1.
2012-07-24 20:41:05 +08:00
Daniel P. Berrange
678da4a57c Add missing deps on driver modules in libvirt RPM
Turning on the building of driver modules in libvirt.spec.in
means that installing 'libvirt' no longer pulls in all the
drivers. For upgrade compatibility we need to list all drivers
module sub-RPMs against the 'libvirt' RPM.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-07-19 10:18:26 +01:00
Sebastian Wiedenroth
29bc4fe646 Add a sheepdog backend for the storage driver
This patch brings support to manage sheepdog pools and volumes to libvirt.
It uses the "collie" command-line utility that comes with sheepdog for that.

A sheepdog pool in libvirt maps to a sheepdog cluster.
It needs a host and port to connect to, which in most cases
is just going to be the default of localhost on port 7000.

A sheepdog volume in libvirt maps to a sheepdog vdi.
To create one specify the pool, a name and the capacity.
Volumes can also be resized later.

In the volume XML the vdi name has to be put into the <target><path>.
To use the volume as a disk source for virtual machines specify
the vdi name as "name" attribute of the <source>.
The host and port information from the pool are specified inside the host tag.

  <disk type='network'>
    ...
    <source protocol="sheepdog" name="vdi_name">
      <host name="localhost" port="7000"/>
    </source>
  </disk>

To work right this patch parses the output of collie,
so it relies on the raw output option. There recently was a bug which caused
size information to be reported wrong. This is fixed upstream already and
will be in the next release.

Signed-off-by: Sebastian Wiedenroth <wiedi@frubar.net>
2012-07-18 20:08:27 +01:00
Daniel Veillard
3a4d9d1ed3 Release of libvirt-0.9.13
* configure.ac docs/news.html.in libvirt.spec.in: new version and
  documentation update
* po/*.po*: updated and regenerated localizations
2012-07-02 11:25:36 +08:00
Daniel P. Berrange
48939a4aba Fix typo in RPM specfile
libvirt.spec.in: s/{?rhel}/%{?rhel}/
2012-06-12 15:54:56 +01:00
Daniel P. Berrange
1cdbe4d22a Two RPM conditional fixes for RHEL-7
Ensure systemd is used in RHEL-7 and cgconfig is not used in
RHEL-7
2012-06-11 18:07:20 +01:00
Cole Robinson
dd7bc51bc4 spec: Build against systemd for udev
They have now merged. Fedora details here:

https://lists.fedoraproject.org/pipermail/devel/2012-June/168227.html
2012-06-06 16:53:36 -04:00
Martin Kletzander
730cc8d783 Fixes for check and rpm builds without sanlock (and qemu)
Apart from the non-sanlock check build, there is also a little fix for
qemu (EXTRA_DIST had qemu.conf and others inside even if the build was
supposed to be without qemu).
2012-05-30 18:57:50 +02:00
Daniel P. Berrange
83fe3d22e2 Fix typos in RPM dependencies
s/daemon-driver-nwilter/daemon-driver-nwfilter/
s/daemon-network/daemon-driver-network/

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-28 10:53:54 +01:00
Wen Congyang
81e9e7cf3b fix building error on non fedora system
We forget to define with_storage_rbd if the system is not fedora,
or the version is less than 16.
2012-05-24 21:11:58 +08:00
Daniel P. Berrange
b3cf13bb2f Enable driver modules in libvirt RPM
Turn on loadable modules for libvirtd. Add new sub-RPMs
libvirt-daemon-driver-XXX, one for each loadable .so.
Modify the libvirt-daemon-YYY RPMs to depend on each of
the individual drivers they required

* libvirt.spec.in: Enable driver modules

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2012-05-24 13:18:01 +01:00
Daniel P. Berrange
aad1625da6 Fix dep from libvirt-lock-sanlock RPM
The libvirt-lock-sanlock RPM requires libvirtd, so its RPM dep
should be on libvirt-daemon, not libvirt
2012-05-24 13:18:00 +01:00
Wido den Hollander
74951eadef storage backend: Add RBD (RADOS Block Device) support
This patch adds support for a new storage backend with RBD support.

RBD is the RADOS Block Device and is part of the Ceph distributed storage
system.

It comes in two flavours: Qemu-RBD and Kernel RBD, this storage backend only
supports Qemu-RBD, thus limiting the use of this storage driver to Qemu only.

To function this backend relies on librbd and librados being present on the
local system.

The backend also supports Cephx authentication for safe authentication with
the Ceph cluster.

For storing credentials it uses the built-in secret mechanism of libvirt.

Signed-off-by: Wido den Hollander <wido@widodh.nl>
2012-05-21 12:37:38 -06:00
Daniel P. Berrange
3247b63ba9 Add bundled(gnulib) to RPM specfile
According to Fedora guidelines, because we bundle gnulib we
need to add a virtual Provides: bundled(gnulib).

https://fedoraproject.org/wiki/Packaging:No_Bundled_Libraries#Requirement_if_you_bundle
2012-05-15 16:25:30 +01:00
Daniel Veillard
a25d5cfd80 Release of libvirt-0.9.12
* configure.ac docs/news.html.in libvirt.spec.in: updates for the release
* po/*.po: pushed new sources and synchronized new languages translations
2012-05-14 10:52:04 +08:00
Osier Yang
b736e72255 numad: Update comments in libvirt.spec.in
Not only support CPU placement now.
2012-05-09 13:12:38 +08:00
Cole Robinson
f4345ac21f rpm: Handle different source URLs for maint releases 2012-05-07 10:50:53 -04:00
Daniel P. Berrange
cf2ed25c9a Fix initial hypervisor conditionals
The openvz, virtualbox and vmware drivers do not run inside
libvirtd, therefore they should be grouped with the other
client side drivers
2012-04-04 10:54:20 +01:00
Daniel P. Berrange
899bf6680a Remove bogus xen-devel dep from libvirt-devel RPM
The public libvirt API does not have any application visible
dependency on Xen libraries. The xen-devel dependency is thus
bogus
2012-04-04 10:54:10 +01:00
Daniel P. Berrange
726e391d37 Introduce per-hypervisor virtual RPMs
Introduce a set sub-RPMs, one per hypervisor, which can be used
as dependency targets by applications wishing to pull in the
full stack of packages required for a specific hypervisor. This
avoids the application needing to know what the hypervisor specific
package set is.

ie, applications should not need to know that using the libvirt
Xen hypervisor requires the 'xen' RPM - libvirt should take care
of that knowledge. All the application wants is 'libvirt-daemon-xen'

There are 5 sub-RPMs:

  libvirt-daemon-qemu - non-native TCG based emulators
  libvirt-daemon-kvm  - native KVM hypervisor
  libvirt-daemon-uml  - User Mode linux
  libvirt-daemon-xen  - Xen, either via XenD or libxl
  libvirt-daemon-lxc  - Linux native containers

When driver modules get turned on, these sub-RPMs will also
gain dependencies on the appropriate driver module .so files
2012-04-04 10:53:49 +01:00
Daniel P. Berrange
bb14513465 Split config files & daemon off from main daemon RPM
Take the libvirt RPM and split it into three pieces

 - libvirt-daemon - libvirtd & other mandatory bits for its operation
 - libvirt-daemon-config-network - the virbr0 config definition
 - libvirt-daemon-config-nwfilter - the firewall config rules

For backwards compatibility with existing installs / application RPM
deps, the 'libvirt' RPM is retained, but will have a dependency on
the 3 new RPMs.
2012-04-04 10:53:35 +01:00
Daniel P. Berrange
189fbe1a8f Remove API XML files from libvirt RPM
The API XML files are now formally installed as part of the
libvirt-devel RPM. Thus there is no need to include them as
%doc in the main libvirt RPM
2012-04-04 10:52:39 +01:00
Daniel P. Berrange
524ba61d9b Move all documentation into a -docs sub-RPM
Currently documentation is split between the libvirt RPM and the
libvirt-devel RPM. In the client-only build there is no libvirt
RPM, so the docs need to live elsewhere. The obvious answer is a
dedicated libvirt-docs RPM. For back-compatibility make the
libvirt-devel RPM require the libvirt-docs RPM

* libvirt.spec.in: Create separate libvirt-docs RPM
2012-04-04 10:52:39 +01:00
Daniel Veillard
782afa98e4 Release of libvirt 0.9.11
* configure.ac docs/news.html.in libvirt.spec.in: update for the release
* po/*.po*: updated a number of languages translation including new
  indian languages and regenerated
2012-04-03 15:06:37 +08:00
Daniel Veillard
683e011137 Revert "Refactor the libvirt RPM daemon pieces"
This reverts commit 06a0d57f5a.
2012-04-03 14:49:31 +08:00
Daniel P. Berrange
8bf0442e83 Fix client only RPM build & other misc RPM problems
* libvirt.spec.in: Remove obsolete --with-remote-pid-file arg.
  Add missing %{without_libxl} statement. Fix handling of docs
  in client only build. Put systemtap files in -client RPM
  instead of -daemon RPM
* examples/xml/nwfilter/Makefile.am: Don't install examples if
  nwfilter is disabled.
2012-03-31 13:22:40 +01:00
Daniel P. Berrange
06a0d57f5a Refactor the libvirt RPM daemon pieces
There are a number of flaws with our packaging of the libvirtd
daemon:

 - Installing 'libvirt' does not install 'qemu-kvm' or 'xen'
   etc which are required to actually run the hypervisor in
   question
 - Installing 'libvirt' pulls in the default configuration
   files which may not be wanted & cause problems if installed
   inside a guest
 - It is not possible to explicitly required all the peices
   required to manage a specific hypervisor

This change takes the 'libvirt' RPM and and changes it thus

 - libvirt: just a virtual package with dep on libvirt-daemon,
   libvirt-daemon-config-network & libvirt-daemon-config-nwfilter
 - libvirt-daemon: the libvirt daemon and related pieces
 - libvirt-daemon-config-network: the default network config
 - libvirt-daemon-config-nwfilter: the network filter configs
 - libvirt-docs: the website HTML

We then introduce some more virtual (empty) packages

 - libvirt-daemon-qemu: Deps on libvirt-daemon & 'qemu'
 - libvirt-daemon-kvm: Deps on libvirt-daemon & 'qemu-kvm'
 - libvirt-daemon-lxc: Deps on libvirt-daemon
 - libvirt-daemon-uml: Deps on libvirt-daemon
 - libvirt-daemon-xen: Deps on libvirt-daemon & 'xen'

 - libvirt-qemu: Deps on libvirt-daemon-qemu & libvirt-daemon-config-{network,nwfilter}
 - libvirt-kvm: Deps on libvirt-daemon-kvm & libvirt-daemon-config-{network,nwfilter}
 - libvirt-lxc: Deps on libvirt-daemon-lxc & libvirt-daemon-config-{network,nwfilter}
 - libvirt-uml: Deps on libvirt-daemon-uml & libvirt-daemon-config-{network,nwfilter}
 - libvirt-xen: Deps on libvirt-daemon-xen & libvirt-daemon-config-network

My intent in the future is to turn on the driver modules by
default, at which time 'libvirt-daemon' will cease to include
any specific drivers, instead we'll get libvirt-daemon-driver-XXXX
packages for each driver. The libvirt-daemon-XXX packages will
then pull in each driver that they require.

It is recommended that applications required a locally installed
libvirtd daemon, use either 'Requires: libvirt-daemon-XXXX' or
'Requires: libvirt-XXX' and *not* "Requires: libvirt-daemon"
or 'Requires: libvirt'

* libvirt.spec.in: Refactor RPMs
* docs/packaging.html.in, docs/sitemap.html.in: Document
  new RPM split rationale
2012-03-31 12:20:38 +01:00
Osier Yang
beb76e3742 spec: Add missed dependancy for numad
numad is available since Fedora 17 and RHEL6.X. And it's not supported
on s390[x] and ARM.
2012-03-24 09:35:20 +08:00
Li Zhang
8120325750 Add qemu support for ppc64 on FC16 or above for rpm packaging
On Fedora16 or above, qemu is supported now. So it is added
in rpm packaging.

Signed-off-by: Li Zhang <zhlcindy@linux.vnet.ibm.com>
2012-03-23 12:40:13 -04:00
Martin Kletzander
801a60ff88 Fixed service handling in specfile
After adding the libvirt-guests service into usual runlevels, we used
to start the libvirt-guests service. However this is usually not a
good practice. As mentioned on fedoraproject wiki, the installations
can be in changeroots, in an installer context, or in other situations
where we don't want the services autostarted.
2012-02-24 16:31:04 -07:00
Peter Robinson
cb8b9963fe spec: use ix86 macros
* libvirt.spec.in: Use %{ix86} rather than open-coded list.
2012-02-20 09:37:52 -07:00
Michal Privoznik
286088567d storage: Allow runtime detection of scrub
Currently, if scrub (used for wiping algorithms) is not present
at compile time, we don't support any other wiping algorithms than
zeroing, even if it was installed later. Switch to runtime detection
instead.
2012-02-16 09:09:43 +01:00
Daniel P. Berrange
5452e88c32 Fix typos in API XML file paths
* libvirt.pc.in: Add missing '/api/' in path
* libvirt.spec.in, mingw32-libvirt.spec.in: s/apis/api/
2012-02-15 11:29:38 +00:00
Daniel P. Berrange
c95c90ee4a Install API XML desc to a standard location
Language bindings may well want to use the libvirt-api.xml and
libvirt-qemu-api.xml files to either auto-generate themselves,
or sanity check the manually written bindings for completeness.
Currently these XML files are not installed as standard, merely
ending up as a %doc file in the RPM.

This changes them to be installed into $prefix/share/libvirt/apis/
The *-refs.xml files are not installed, since those are only
useful during generation of the online API doc files.

The pkg-config file is enhanced so that you can query the install
location of the API files. eg

  # pkg-config --variable=libvirt_qemu_api libvirt
  /home/berrange/builder/i686-pc-mingw32/sys-root/mingw/share/libvirt/libvirt-qemu-api.xml

* docs/Makefile.am: Install libvirt-api.xml & libvirt-qemu-api.xml
* libvirt.pc.in: Add vars for querying API install location
* libvirt.spec.in, mingw32-libvirt.spec.in: Include API XML files
2012-02-14 16:42:02 +00:00
Daniel Veillard
bca060a363 Release of libvirt-0.9.10
* configure.ac docs/news.html.in libvirt.spec.in: updated for the release
* po/*.po*: update ja, it and uk localization, fixed the ja one
2012-02-13 22:31:31 +08:00
Laine Stump
60f190735c build: don't require avahi during install
See: https://bugzilla.redhat.com/show_bug.cgi?id=785269

The specfile requires avahi during install if libvirt was built with
avahi support, but there are many situations where it is undesirable
to install avahi due to security concerns. This patch requires only
the avahi-libs package, which is needed by libvirt to call the
function that tries to attach to the avahi daemon, but will instead
silently fail because the avahi-daemon is in the main avahi package,
and that package isn't installed.
2012-02-07 14:24:05 -05:00
Daniel P. Berrange
54a38915d8 Add a virt-host-validate command to sanity check HV config
To assist people in verifying that their host is operating in an
optimal manner, provide a 'virt-host-validate' command. For each
type of hypervisor, it will check any pre-requisites, or other
good recommendations and report what's working & what is not.

eg

  # virt-host-validate
  QEMU: Checking for device /dev/kvm                                         : FAIL (Check that the 'kvm-intel' or 'kvm-amd' modules are loaded & the BIOS has enabled virtualization)
  QEMU: Checking for device /dev/vhost                                       : WARN (Load the 'vhost_net' module to improve performance of virtio networking)
  QEMU: Checking for device /dev/net/tun                                     : PASS
   LXC: Checking for Linux >= 2.6.26                                         : PASS

This warns people if they have vmx/svm, but don't have /dev/kvm. It
also warns about missing /dev/vhost net.
2012-01-27 17:53:18 +00:00
Daniel Veillard
450c927d9a Remove dmidecode dependancy outside PC arches
The new dependancy is only available on ix86, x86_64 and ia64
2012-01-18 00:22:17 +08:00
Daniel Veillard
2f667b5697 Release of libvirt-0.9.9
* configure.ac docs/news.html.in libvirt.spec.in: update for the release
* po/*.po*: updated localizations from transifex and regenerated
2012-01-07 12:18:06 +08:00
Daniel Veillard
cbc7025942 Require avahi as an rpm dependancy
As seen in https://bugzilla.redhat.com/show_bug.cgi?id=746111

If compiled with the daemon and avahi support, then it's better
to require avahi at the rpm level to avoid daemon startup errors.
2011-12-29 22:01:57 +08:00
Wen Congyang
6e53293812 spec: fix inverted logic on sanlock
Commit d336dbdb tried to refactor sanlock to avoid building it
on RHEL for architectures where it is not available, but used
the wrong conditional.

* libvirt.spec.in (with_sanlock): Use %ifarch, not %ifnarch.
2011-12-14 10:31:30 -07:00
Eric Blake
3b95f284f1 spec: fix logic bug in deciding to turn on cgconfig
https://bugzilla.redhat.com/show_bug.cgi?id=738725

Commit ecd8725 tried to silence a spurious warning on the initial
libvirt install, and commit ba6cbb1 tried to fix up the logic to the
correct Fedora version, but the warning was still present due to a
logic bug: since %{fedora} and %{rhel} are never simulatanously
set, then 0%{rhel} <= 6 made the %if always true.  Checking for
minimum versions (via >=) is okay, but checking for maximum versions
(via <=) requires a prerequisite test that the platform being tested
is non-zero.

Also fix a bogus setting of with_libxl (although we previously
hard-code with_libxl to 0 for rhel earlier in the file, so this
was not as severe a bug).

* libvirt.spec.in (with_cgconfig): Don't enable cgconfig on F16.
2011-12-08 13:52:54 -07:00
Eric Blake
9c417636c4 spec: make it easier to autoreconf when building rpm
Over time, Fedora and RHEL RPMs have often backported upstream
patches that touched configure.ac and/or Makefile.am; this
necessitates rerunning the autotools for the patch to be effective.
Making this a one-liner spec tweak will make it easier for future
backports to pull patches without having to find all the places
to touch to properly use the autotools.  Meanwhile, there have been
historical instances where an update in the autotools caused FTBFS
situations, so this is not on by default.

* libvirt.spec.in (enable_autotools): New variable, default off.
(BuildRequires): Conditionally add autotools.
(%build): Conditionally use them before configure.
* mingw32-libvirt.spec.in: Likewise.
2011-12-08 09:49:50 -07:00
Daniel P. Berrange
011a3350be Ensure to prefix %{buildroot} when overriding systemd install location
The %makeinstall macro does not set DESTDIR, instead of explicitly
prefixes %{buildroot} onto all paths. Thus we need to do the same
when setting the systemd unit dir

* libvirt.spec.in: Prefix %{buildroot} onto %{unitdir}
2011-12-08 15:48:49 +00:00
Daniel Veillard
7c6b0653f3 Release of libvirt-0.9.8
* configure.ac docs/news.html.in libvirt.spec.in: updated for the release
* po/*.po*: fetched localization update and regenerated
2011-12-08 15:13:50 +08:00
Eric Blake
fea83dde7b spec: don't use chkconfig --list
https://bugzilla.redhat.com/show_bug.cgi?id=694403 reports that
the specfile is incorrectly checking for a running libvirt-guests
service.  For example,

$ LC_ALL=es_ES chkconfig --list libvirt-guests
libvirt-guests 	  0:desactivado		 1:desactivado	   2:desactivado     3:activo	 4:activo  5:activo	    6:desactivado

will fail to find 5:on, even though it is active.  But chkconfig
already has a mode where you can silently use the exit status to
check for an active service.

* libvirt.spec.in (%post): Use simpler chkconfig options, to avoid
issues with localization.
2011-12-07 20:54:07 -07:00
Eric Blake
d336dbdb33 spec: fix sanlock dependency
* libvirt.spec.in (with_sanlock): On RHEL, don't force sanlock
on architectures where it isn't available.
2011-12-05 11:29:32 -07:00