Commit Graph

699 Commits

Author SHA1 Message Date
Pavel Hrdina
e1bc278ecc spec: remove libcgroup and cgconfig
RHEL-6/CentOS-6 is no longer supported, let's remove dependency on
libcgroup and code that enables/starts cgconfig service.

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

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-07-18 12:58:09 +02:00
Jiri Denemark
073d5041c7 spec: Explicitly require matching libvirt-libs
All drivers now link directly to libvirt.so rather than getting the
symbols from the daemon. Let's explicitly mention this dependency in the
spec file instead of relying on transitive dependency from
libvirt-daemon.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2018-07-11 13:37:48 +02:00
Pavel Hrdina
36e92adc7e spec: list new nwfilter schema files
Commit <41d619e99c2015eab2d56bea874e23ba9f52f829> introduced new RNG
schema files for nwfilter but forgot to update spec file.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-06-27 10:42:52 +02:00
Andrea Bolognani
aa51063927 spec: Move SASL configuration file from -libs to -daemon
SASL authentication is configured server-side, so the sample
configuration file should be shipped along with the daemon
rather than with the libraries.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2018-06-26 10:57:54 +02:00
Stefan Berger
d9c087f57d qemu: Extend qemu_conf with tpm-emulator support
Extend qemu_conf with user and group for running the tpm-emulator
and add directories to the configuration for the locations of the
log, state, and socket of the tpm-emulator.

Also add these new directories to the QEMU Makefile.inc.am and
the RPM spec file libvirt.spec.in.

Signed-off-by: Stefan Berger <stefanb@linux.vnet.ibm.com>
Reviewed-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2018-06-06 10:48:41 -04:00
Jiri Denemark
55e0cc2a42 spec: Fix requirement for "tc" on new distros
At least since Fedora 26 (maybe earlier, but we don't support older
Fedora releases), the "tc" tool is provided by a separate iproute-tc
package.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2018-06-01 17:38:37 +02:00
Jiri Denemark
7f8e1cb68f spec: Fix permissions of nwfilter XMLs
The nwfilter XMLs in /etc are defined as %ghost in the spec file, which
means rpm will not install them, but it will record its existence and
permissions in the database. During installation the files are copied in
a %post scriptlet from /usr/share/libvirt/nwfilter, but once libvirtd is
restarted, it will rewrite the files to add generated UUIDs.

While RPM recorded 644 mode for the XMLs, libvirt saves them with 600
and thus any future attempt to verify the libvirt-daemon-config-nwfilter
package would fail. We need to tell RPM the ghost files are supposed to
have 600 permissions.

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

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Erik Skultety <eskultet@redhat.com>
2018-05-30 11:21:28 +02:00
Jiri Denemark
11a2550c27 spec: Enable libssh on future RHEL
Future RHEL will certainly be modern enough to support libssh.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2018-05-25 09:45:15 +02:00
Jiri Denemark
b6dddb5408 spec: Fix build without QEMU
libvirt_qemu_probes.stp is only generated when QEMU driver is enabled.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
2018-05-21 10:33:39 +02:00
Cole Robinson
fe0fe366bf spec: Remove Group: tags
It's only required on el5 which we don't support anymore. Everywhere
else it's not used for anything useful

https://fedoraproject.org/wiki/RPMGroups

Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-05-08 09:50:55 -04:00
Igor Gnatenko
8a6e9c9b70 spec: Remove %clean section
None of currently supported distributions need that.
Last one was EL5 which is EOL for a while.

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-05-08 09:50:58 -04:00
Igor Gnatenko
c6ffdff878 spec: Remove BuildRoot definition
None of currently supported distributions need that.
It was needed last for EL5 which is EOL now

Signed-off-by: Igor Gnatenko <ignatenkobrain@fedoraproject.org>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2018-05-08 09:50:55 -04:00
Daniel P. Berrangé
01888af0e2 storage: create separate loadable modules for storage file drivers
The storage file drivers are currently loaded as a side effect of
loading the storage driver. This is a bogus dependancy because the
storage file code has no interaction with the storage drivers, and
even ultimately be running in a completely separate daemon.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-03 13:17:59 +01:00
Daniel P. Berrangé
78c5dfab42 rpm: set wireshark plugin directory from pkg-config
The wireshark plugin directory moved again in Fedora 29, and will
move again every time wireshark do a new minor release. Call out
to pkg-config to find the right directory to use in the RPM file
list.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-03 12:17:31 +01:00
Daniel P. Berrangé
9d3859d9d7 rpm: libvirt-daemon-driver-libxl must obsolete libvirt-daemon-driver-xen
Snce the xen driver was deleted we need to ensure that the old
libvirt-daemon-driver-xen sub-RPM gets removed on upgrade. We
achieve this my making libvirt-daemon-driver-libxl obsolete it.

We don't add a Provides: too, because libvirt-daemon-driver-libxl
is not a functionally identical replacement, since we don't want
to satisfy deps for 3rd party apps that have a Requires on the
libvirt-daemon-driver-xen RPM.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-05-03 11:18:42 +01:00
Jim Fehlig
bdb6ba0fad spec: remove legacy xen driver
Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-09 11:39:28 -06:00
Daniel P. Berrangé
c018533156 rpm: add deps on rpcgen/libtirpc-devel
Since RPC support moved out of glibc we need to have explicit deps on
the new packages providing this functionality

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-03 16:05:51 +01:00
Daniel P. Berrangé
7495b1a779 rpm: fix incorrect expansion of macros with line continuations for args
Macros in RPMs are expanded before line continuations, so when we write

   %systemd_preun foo \
                  bar

What happens is that it expands to

   if [ $1 -eq 0 ] ; then
        # Package removal, not upgrade
        systemctl --no-reload disable --now foo \ > /dev/null 2>&1 || :
   fi
                 bar

which is obviously complete garbage and not what we expected. It is
simply not safe to ever use line continuations in combination with
macros.

Reviewed-by: Laine Stump <laine@laine.org>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-21 14:46:08 +00:00
Andrea Bolognani
7093e8c7a5 spec: Use Python 3 for building when possible
While RHEL / CentOS are still using Python 2 for the time being,
Fedora has already switched to Python 3 as the default Python
interpreter a while ago, so on that OS it doesn't make sense to
drag in Python 2 anymore; the same applies to future RHEL versions.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-20 14:03:00 +01:00
Daniel P. Berrangé
6c21ed93fc rpm: depend on python2, not bare python
Fedora requires packages to depend on "python2" RPM, not the unversioned
"python" name. Fortunately even though RHEL-6 ships a "python" RPM, it
has a virtual Provides for the "python2" name, so we don't need to
conditionalize this.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-16 17:05:38 +00:00
Andrea Bolognani
9cd42e725f spec: Drop polkit-devel from BuildRequires
As of 2499d1a095 we don't link against libpolkit anymore, so
we only need the polkit package to be available during build.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-15 12:44:07 +01:00
Michal Privoznik
bf1b24514b libvirt:spec: Require gcc for build
According to latest discussion on fedora devel list [1] gcc will
be removed from default buildroot and packages requiring it must
have explicit build dependency,

1: https://lists.fedoraproject.org/archives/list/devel-announce@lists.fedoraproject.org/thread/IJFYI5Q2BYZKIGDFS2WLOBDUSEGWHIKV/

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-03-12 10:32:44 +01:00
Michal Privoznik
3154b3414a libvirt.spec.in: Don't distribute libvirtd.upstart
Firstly, for rpm we are building libvirt with
--init-script=systemd or --init-script=redhat. So upstart is
never enabled. And only due to a bug we installed
libvirtd.upstart file.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
2018-02-23 11:11:20 +01:00
Daniel P. Berrangé
5590122937 rpm: don't enable fuse on RHEL-6
Fuse was recently enabled whereever LXC is enabled:

  commit 34783a9e6b
  Author: Jiri Denemark <jdenemar@redhat.com>
  Date:   Fri Feb 9 13:42:50 2018 +0100

    spec: Enable fuse only if LXC is enabled

Unfortunately the version of Fuse in RHEL-6 is too old for libvirt's
needs, but we still have LXC enabled there.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-22 12:49:15 +00:00
Jiri Denemark
bc84bb9fe0 spec: Drop overlapping triggers
The postun trigger for libvirt-daemon was defined twice for overlapping
ranges of package verions if systemd support was switched off (which
happens when building on something ancient, such as RHEL-6).

Let's combine the two triggers into the one which is called when
libvirt-daemon < 1.3.0 is uninstalled. As a side effect, virtlockd and
virtlogd might be reloaded twice after an upgrade from libvirt newer
than 1.2.1 and older than 1.3.0 (by postun script from the old libvirt
and postun trigger from the new libvirt).

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-14 15:55:18 +01:00
Jiri Denemark
cf555f9212 spec: Fix indentation in daemon's triggerpostun
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-14 15:55:18 +01:00
Jiri Denemark
b2ab38bfdc spec: Prepare for future RHEL
Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-14 15:55:18 +01:00
Jiri Denemark
259b5ca73c spec: Drop checks for old Fedora releases
The oldest Fedora release supported by the spec file is 26. Checking for
anything older makes no sense.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-14 15:55:18 +01:00
Jiri Denemark
42188c1c65 spec: Build virt-login-shell iff LXC driver is enabled
Building virt-login-shell doesn't really make any sense without LXC and
doing so even breaks "make rpm" since the associated files are installed
but unpackaged (the login-shell sub package already depends on LXC).

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-14 15:55:18 +01:00
Jiri Denemark
34783a9e6b spec: Enable fuse only if LXC is enabled
Enabling fuse without LXC does not make a lot of sense because fuse is
used only by LXC.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-14 15:55:18 +01:00
John Ferlan
f65e8a9527 lockd: Install the admin sockets
Commit id 'ce7ae55e' added support for the lockd admin socket, but
forgot to add the socket to the make and spec files for installation
purposes.

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2018-02-09 06:34:20 -05:00
John Ferlan
bffdd6c303 logd: Install the admin sockets
Commit id '85d45ff0' added support for the logd admin socket, but
forgot to add the socket to the make and spec files for installation
purposes.

NB: Includes breaking up the long %systemd_ lists across multiple lines
    for ease of reading

Signed-off-by: John Ferlan <jferlan@redhat.com>
Reviewed-by: Daniel P. Berrange <berrange@redhat.com>
2018-02-09 06:34:20 -05:00
Michal Privoznik
08327dfff3 tools: Make symlinks to vsh bash-completion script
The bash-completion project documents that only those scripts
from $BASH_COMPLETIONS_DIR that share name with the current
command for which <TAB> was hit are loaded [1]. This means, that
vsh script we have there is not loaded. We have to create
symlinks for virsh and virt-admin.

At the same time, we have to create new RPM package because
virt-admin and client packages are independent. That means we
cannot place the vsh script in either of them. What we can do is
to have a different package that contains the completion script
and then virt-admin and client packages contain only the symlink
and require the bash-completion package.

1: https://github.com/scop/bash-completion#faq

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-01-31 15:41:51 +01:00
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