Commit Graph

666 Commits

Author SHA1 Message Date
Daniel P. Berrange
2efd35a307 rpm: updates wrt min required fedora version
Update the min fedora to 26. Use a macro to record the min versions so that the
later error message is always in sync with the earlier version check. Clarify
the comment that refers to guessing of dist which does not actually happen.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-17 12:09:33 +00:00
Pavel Hrdina
5209781f67 spec: enable bash completion only on new enough distros
RHEL-6 doesn't have bash-completion package by default, it has to be
installed from EPEL.

Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-01-17 12:08:16 +01:00
Michal Privoznik
f0d390bc16 tools: Provide bash autompletion file
The only purpose of this file is to be sourced. After that one
can use completion even for their bash:

  # virsh list --<TAB><TAB>
  --all                   --inactive ...

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-01-11 18:53:04 +01:00
Jiri Denemark
4fe1125b77 spec: Make the build reproducible
If the spec file applies a patch which touches any file in the API XMLs
dependency tree, we need to regenerate the XMLs and consequently
recreate hvsupport.html. The file will contain a time stamp in a comment
which means it will be different every time the package is built. The
commit a54c962286 which added the time stamp also added support for
SOURCE_DATE_EPOCH environment variable. Let's set it to the time stamp
of the spec file itself to make the build reproducible.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
2017-11-29 17:08:18 +01:00
Jiri Denemark
c2dc04c5aa spec: Turn on verbose build
When building a package in a build system, such as koji or cbs, logs are
the only thing which can be used to diagnose failures. Make them verbose
since human friendly output of V=0 build doesn't really help when a
build fails.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Pino Toscano <ptoscano@redhat.com>
2017-11-29 17:08:18 +01:00
Jiri Denemark
1bf8934066 spec: Restart libvirtd in posttrans
When upgrading libvirt packages, there's no strict ordering for the
installation or removal of the individual libvirt sub packages. Thus
libvirt-daemon may be upgraded (and its %postun scriptlet) started
before all sub packages with driver libraries are upgraded. When
libvirt-daemon's %postun scriptlet restarts the daemon old drivers may
still be laying around and the daemon may crash when it tries to use
them.

Let's restart the daemon in %posttrans to make sure libvirtd is
restarted only after all sub packages are at the same version.

https://bugzilla.redhat.com/show_bug.cgi?id=1464300

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-10-31 16:00:50 +01:00
Daniel P. Berrange
f72d7cd933 Remove obsolete TODO file
We stopped autogenerating a TODO file from RFE bugs a long time
ago.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-10-16 10:22:34 +01:00
Jiri Denemark
0846296342 spec: Install README.md
Installing dead README symlink only is pretty useless.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2017-10-11 12:17:35 +02:00
Jiri Denemark
43d9cbd97b spec: Enable qemu driver on s390x on RHEL/CentOS
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-10-05 09:58:14 +02:00
Jiri Denemark
4ddb4bb861 spec: Delay supported_platform check
Building RPM should only be allowed on a supported platform, but
unpacking the source and applying all patches can be done anywhere.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-10-03 13:45:57 +02:00
Cole Robinson
11b0e889b5 spec: Fix %license compat on RHEL6
The macro needs to be defined closer to its usage
2017-09-15 13:04:18 -04:00
Cole Robinson
6cf1475a1c spec: Use %license when available
This is required by the fedora packaging guidelines:

https://fedoraproject.org/wiki/Packaging:LicensingGuidelines

This macro isn't available on stock RHEL6 so provide a backcompat
definition

https://bugzilla.redhat.com/show_bug.cgi?id=1483293

Reported-by: Ville Skyttä <ville.skytta@iki.fi>
2017-09-15 08:43:54 -04:00
Ville Skyttä
6966a8cd18 spec: Own %{_libdir}/libvirt{,/connection-driver} dirs
Owning all created directories is a requirement of the Fedora
packaging guidelines

https://bugzilla.redhat.com/show_bug.cgi?id=1483293
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2017-09-15 08:43:54 -04:00
Daniel P. Berrange
0c3d8bb514 rpm: conditionalize dep on perl for perl-interpretor split in F27
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-04 16:20:12 +01:00
Daniel P. Berrange
f802c9de09 docs: drop XHTML 1.0 validation of website
The HTML pages are currently validated against an XHTML 1.0 DTD.
This makes it impossible to take advantage of features that are
introduced in HTML 5, because they'll fail validation.

There is intentionally no DTD defined for HTML 5, so there's no
alternative to XHTML 1.0 DTD that we could switch to. The only
options are to stick with XHTML 1.0 forever, or drop the DTD
validation, and we pick the latter.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-08-02 17:00:11 +01:00
Neal Gompa
9af764e86a spec: Add support for building the zfs storage driver
Where it can be supported in Fedora, the driver is built and made
available as a subpackage.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
2017-07-19 12:39:20 -04:00
Andrea Bolognani
53d3f8b224 spec: Use HTTPS instead of HTTP
libvirt.org supports HTTPS, so might as well use it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2017-05-11 18:35:45 +02:00
Cole Robinson
1d07a5bf3c spec: Update version check for maint Source URL
New maint release version numbers of just A.B.C format, not the old
A.B.C.D format. Adjust the check that dynamically changes the Source
URL for maint releases

Signed-off-by: Cole Robinson <crobinso@redhat.com>
Acked-by: Andrea Bolognani <abologna@redhat.com>
2017-05-09 12:09:34 -04:00
Daniel P. Berrange
4727594078 Don't use ceph-devel on Fedora
A previous commit changed the spec to use librbd1-devel on
RHEL-7, since this replaces ceph-devel from RHEL-6:

  commit 6cfc8834c8
  Author: Peter Krempa <pkrempa@redhat.com>
  Date:   Thu Mar 5 11:40:54 2015 +0100

    spec: Enable RBD storage driver in RHEL-7

    Use correct package names too as they differ.

RHEL-7 inherited this rename from Fedora though, so it should
have also made Fedora use the new names.

This was missed, because Fedora still provides a (deprecated)
back-compat RPM for ceph-devel that just pulls in librbd1-devel
(and others).

Fixing this stops libvirt pulling Java into the build root in
Fedora.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-05-09 11:57:55 +01:00
Daniel P. Berrange
e6c3b59c19 Add ability to generate man page describing key code names & values
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-04-25 21:20:43 +01:00
Jiri Denemark
1d3963dba5 spec: Avoid RPM verification errors on nwfilter XMLs
/etc/libvirt/nwfilter/*.xml files are installed with no UUID, which
means libvirtd will automatically alter all of them once it starts. Thus
RPM verification will always fail on them. Let's use a trick similar to
the default network XML and store nwfilter XMLs in /usr/share. They will
be copied into /etc in %post. Additionally the /etc files are marked as
%ghost so that they are uninstalled if the RPM package is removed.

Note that the %post script overwrites existing files with new ones on
upgrade, which is what has always been happening.

https://bugzilla.redhat.com/show_bug.cgi?id=1431581
https://bugzilla.redhat.com/show_bug.cgi?id=1378774

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-04-19 11:36:06 +02:00
Daniel P. Berrange
3c647ee4bb Switch to GSSAPI (kerberos) instead of the insecure DIGEST-MD5
RFC 6331 documents a number of serious security weaknesses in
the SASL DIGEST-MD5 mechanism. As such, libvirtd should not
by using it as a default mechanism. GSSAPI is the only other
viable SASL mechanism that can provide secure session encryption
so enable that by defalt as the replacement.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2017-03-15 18:14:51 +00:00
Philipp Hahn
d7dcea6f60 doc: fix writing of QEMU
QEMU should be written all upper or all lower case.
2017-03-08 17:33:07 +01:00
Peter Krempa
27c8e36d60 spec: Modularize the storage driver
Create a new set of sub-packages containing the new storage driver
modules so that certain heavy-weight backends (gluster, rbd) can be
installed separately only if required.

To keep backward compatibility the 'libvirt-driver-storage' package
will be turned into a virtual package pulling in all the new storage
backend sub-packages. The storage driver module will be moved into
libvirt-driver-storage-core including the filesystem backend which is
mandatory.

This then allows to make libvirt-daemon-driver-qemu depend only on the
core of the storage driver.

All other meta-packages still depend on the full storage driver and thus
pull in all the backends.
2017-02-22 09:31:33 +01:00
Peter Krempa
0a6d3e51b4 storage: Turn storage backends into dynamic modules
If driver modules are enabled turn storage driver backends into
dynamically loadable objects. This will allow greater modularity for
binary distributions, where heavyweight dependencies as rbd and gluster
can be avoided by selecting only a subset of drivers if the rest is not
necessary.

The storage modules are installed into 'LIBDIR/libvirt/storage-backend/'
and users can override the location by using
'LIBVIRT_STORAGE_BACKEND_DIR' environment variable.

rpm based distros will at this point install all the backends when
libvirt-daemon-driver-storage package is installed.
2017-02-22 09:31:33 +01:00
Peter Krempa
4fb105f681 spec: Don't check for storage driver backends in configure script
Explicitly enable --with-storage-scsi and disable --without-storage-zfs
and --without-storage-vstorage so that the configure script doesn't
check for them.

Note that --with-storage-dir is enabled by default.
2017-02-22 09:31:33 +01:00
Andrea Bolognani
e04bd5b6fc spec: Require libacl when building the QEMU driver
For the namespaces feature to work properly we need to be able
to make a perfect copy of the original /dev, including ACLs.

By adding a BuildRequires on libacl-devel we ensure that ACL
support will be enabled at configure time and made available
to the QEMU driver.
2017-02-14 19:07:43 +01:00
Jiri Denemark
cff9de3eb4 spec: Enable qemu driver for RHEL-7 on aarch64
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2017-01-30 10:22:16 +01:00
Peter Krempa
dd335d03e8 spec: Depend on the gluster command line tool
The gluster command line tool that is used to lookup storage pool
sources moved from the gluster-client package to gluster-cli.

Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1349441
2017-01-18 11:05:26 +01:00
Michal Privoznik
b64af8f81d libvirt.spec: Package libnss_libvirt_guest.so.2
In 22f7ceb695 I've introduced another NSS module
but forgot to package it in libvirt-nss.rpm.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-12-08 15:25:17 +01:00
Daniel P. Berrange
0be9cea199 test: fix screenshot API impl
When redoing the website we deleted the libvirtLogo.png file
not remembering that the test driver screenshot API impl
relied on it.

Rather than having the test driver use the logo as a side
effect, give it its own dedicated image to use. This is
installed in /usr/share/libvirt/test-screenshot.png and
is taken from a NeXT Cube running WorldWideWeb[1]. The
very first web browser in existance, running on the
hardware it was originally written on.

[1] https://en.wikipedia.org/wiki/WorldWideWeb

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-12-08 10:57:32 +00:00
Nikolay Shirokovskiy
01079727fe libvirtd: systemd: add special target for system shutdown
It is already discussed in "[RFC] daemon: remove hardcode dep on libvirt-guests" [1].

Mgmt can use means to save/restore domains on system shutdown/boot other than
libvirt-guests.service. Thus we need to specify appropriate ordering dependency between
libvirtd, domains and save/restore service. This patch takes approach suggested
in RFC and introduces a systemd target, so that ordering can be built next way:

libvirtd -> domain -> virt-guest-shutdown.target -> save-restore.service.

This way domains are decoupled from specific shutdown service via intermediate
target.

[1] https://www.redhat.com/archives/libvir-list/2016-September/msg01353.html
2016-11-23 11:13:53 +03:00
Pino Toscano
e7a7807bd6 spec: enable libssh transport on Fedora 2016-11-15 15:50:51 +01:00
Daniel P. Berrange
e3e0f36719 docs: redo style of front page
Use a large logo banner across the front page. Tile the
three lists of links into three panels

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-11-11 12:15:03 +00:00
Andrea Bolognani
11d571eaa7 spec: Run all make jobs in parallel
Commit e8861f6971 changed our spec file to compile and run
tests in parallel. That's a very good step forward, but why
stop there? Let's run *all* make jobs in parallel and really
put those expensive cores to use!

On my laptop, this shaves ~10s off 'make rpm'.
2016-11-07 17:27:23 +01:00
Michal Privoznik
e8861f6971 libvirt.spec: Build & run tests in parallel
So far, the main code is built in parallel, which makes it pretty
fast. But with a lots of tests we have now I've noticed this part
takes too much time to build. The problem was that tests were
build and run in a single job.

Also, 'make' in the first hunk is useless. The test suite is not
built due to 'make all' because there's no .git in the sources
unpacked from a tar.xz archive. It's 'make check' which triggers
tests build.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-11-03 21:38:46 +08:00
Andrea Bolognani
c9ddecdf44 spec: Drop support for Fedora < 23
We only claim support for OSs that are still supported by the
respective vendors, which means anything older than Fedora 23
is out. Reword the comment a bit to highlight the criteria.
2016-10-19 17:06:41 +02:00
Jiri Denemark
1ee7efef6f spec: Package cputypes.rng
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2016-09-27 13:27:52 +02:00
Daniel P. Berrange
072e095660 rpm: set TLS priority to @LIBVIRT,SYSTEM on Fedora >= 25
With newest gnutls available in Fedora 25/rawhide, it is
possible to have TLS priority fallbacks, so we can finally
use --tls-priority=@LIBVIRT,SYSTEM

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-08-04 15:59:24 +01:00
Daniel P. Berrange
dcd5f59c5f libvirt.spec.in: fix indentation in previous commit
Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-28 11:48:00 +01:00
Daniel P. Berrange
8035bf718a Fix RPM spec for wireshark on Fedora < 24
This previous commit

  commit cd9fcc8be7
  Author: Michal Privoznik <mprivozn@redhat.com>
  Date:   Wed Jul 27 16:58:32 2016 +0200

    libvirt.spec.in: Adapt to newest wireshark plugindir

Adapted the libvirt spec for wireshark >= 2.1.0 but
this ignored the fact that we enable wireshark from
Fedora 21 and 2.1.0 was only added in Fedora 24

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-28 11:02:02 +01:00
Michal Privoznik
cd9fcc8be7 libvirt.spec.in: Adapt to newest wireshark plugindir
In the old days, when wireshark plugin was introduced it was
installed under /usr/lib64/wireshark/plugins/$VERSION/ while with
wireshark-2.1.0 this path has changed just to
/usr/lib64/wireshark/plugins. We should teach our spec file about
this change.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-27 17:01:18 +02:00
Andrea Bolognani
55d8daa07e spec: Fix indentation
Commit ffc49e579c broke syntax-check:

  cppi: libvirt.spec.in: line 622: not properly indented
  cppi: libvirt.spec.in: line 624: not properly indented
  cppi: libvirt.spec.in: line 640: not properly indented
  cppi: libvirt.spec.in: line 642: not properly indented
  maint.mk: incorrect preprocessor indentation
  cfg.mk:697: recipe for target 'sc_spec_indentation' failed

Indent the new conditionals properly.
2016-07-13 19:02:15 +02:00
Daniel P. Berrange
ffc49e579c libvirt.spec.in: require systemd-container on >= f24
The systemd-machined tools libvirt uses were split into a
systemd-container RPM. Without depending on this, libvirt
may silently fallback to the non-systemd cgroup impl which
is not desirable.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2016-07-13 17:13:07 +01:00
Michal Privoznik
9a6e47c483 spec: Move virt-admin into its own package
The new package for the virt-admin binary is libvirt-admin.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-07 07:22:15 +02:00
Michal Privoznik
70b4f0e719 spec: Split libvirt-client
Currently, we have libvirt-client library which serves as a
collection point for all the libraries and client binaries we
have. Therefore we have couple of silly dependencies, for
instance libvirt-daemon depends on libvirt-client. Only because
the shared library is in the client package.
To solve this, new package libvirt-libs is introduced where all
the libraries are going to live. The client package is then set
to depend on this new package, just like the rest of packages
that suffer the same problem.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2016-07-07 07:22:15 +02:00
Jean-Marc Liger
e893d3ca8e libvirt.spec.in: Use libnl-devel for RHEL-6
RHEL-6 still needs to use libnl instead of libnl3, so re-add
the spec conditional mistakenly removed in

  commit 3694e038fd
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Wed May 4 15:43:08 2016 +0100

    libvirt.spec.in: drop Fedora < 20 and RHEL < 6
2016-06-29 17:38:15 +01:00
Erik Skultety
d0a9dbc323 spec: distribute admin API within libvirt-client package
With respect to to the following thread
https://www.redhat.com/archives/libvir-list/2016-June/msg01822.html, until we
introduce a new rpm package '-libs' that would allow us to drop daemon's
dependency on the client package, distribute admin API related stuff within
the client package (since it's the best analogy to the virsh client).

Signed-off-by: Erik Skultety <eskultet@redhat.com>
2016-06-26 00:21:07 +02:00
Martin Kletzander
ddc99f11ac spec: Make driver-qemu require driver-storage
Without that we might get similar messages in the log:

  error : virDriverLoadModule:73 : failed to load module
  /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so
  /usr/lib64/libvirt/connection-driver/libvirt_driver_qemu.so: undefined
  symbol: virStorageFileCreate

Signed-off-by: Martin Kletzander <mkletzan@redhat.com>
2016-06-17 11:15:43 +02:00
Andrea Bolognani
2c51fa6ec4 maint: Switch to xz compressed PAX release archives
This allows us to produce releases that are roughly a third in
size, have no limitation on path length, and are still readable
by all supported platforms.
2016-06-15 18:53:34 +02:00