Commit Graph

866 Commits

Author SHA1 Message Date
Andrea Bolognani
2244ac168d spec: Merge -admin package into -daemon
It's useful to have virt-admin around when debugging issues
with libvirtd, and since it's a tiny binary we can simply
include it in the -daemon package to ensure it's always going
to be available when needed.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-04-22 11:01:27 +02:00
Jiri Denemark
03cc3c9064 spec: Do not build qemu driver for Power on RHEL-9
https://bugzilla.redhat.com/show_bug.cgi?id=1946529

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-04-21 16:25:42 +02:00
Andrea Bolognani
54f3a4b45b spec: Drop BuildDepends on make
make is only used for the syntax-check tests, which we are
explicitly skipping when building RPMs.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2021-03-12 10:11:34 +01:00
Jim Fehlig
9386eadad4 build: Require glib >= 2.56
There are a few uses of g_autoslist in the qemu driver and likely more
will come throughout the codebase in the future. g_autoslist first
appeared in glib 2.56, so bump the minimum version

https://developer.gnome.org/glib/stable/glib-Miscellaneous-Macros.html#g-autoslist

Bumping the minimum version is an opportune time to update the list of
minimum glib versions found on the distros targeted by libvirt's
platform support policy

   RHEL-7: 2.56.1
   RHEL-8: 2.56.4
   Debian (Buster): 2.58.3
   OpenBSD (Ports): 2.66.7
   FreeBSD (Ports): 2.66.7
   openSUSE Leap 15.2, SLE15-SP2: 2.62.6
   Ubuntu (Bionic): 2.56.1
   macOS (Homebrew): 2.66.7

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2021-03-04 10:32:45 -07:00
Laine Stump
993351ff62 build: fix specfile logic for disabling netcf
I *thought* I had tested all the combinations of manually setting
--without netcf, different versions of Fedora, etc, but apparently
not.

The check in libvirt.spec.in to see if the target was an older Fedora
or older RHEL would alway resolve to true, because, e.g., if {?fedora}
is undefined, then "0%{?fedora} < 34" is "0 < 34", which is always
true. Since both {?fedora} and {?rhel} are never defined at the same
time, the result of the entire expression is always true.

Fix this by qualifying each subexpression.

Fixes: 35d5b26aa4
Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-02-03 14:17:31 -05:00
Laine Stump
35d5b26aa4 rpm: disable netcf for the interface driver in rpm build on new targets
libvirt.spec currently adds a hardcoded -Dnetcf=enabled to the meson
commandline, so just setting the default in the meson.build file won't
have any effect for rpm builds - it will be overridden.

This patch changes the meson commandline in the spec file from
hardcoded -Dnetcf=enabled to %{arg_netcf}, which is itself set
according to the value of %{with_netcf}; and *that* is normally set
according to the distro release of the build target (1 for Fedora >=
34 and RHEL >= 9, 0 otherwise), but can be manually overridden by
adding "-without netcf" to the rpmbuild commandline.

Along with being used to determine what arg to pass to meson,
%{with_netcf} is also checked when deciding on whether or not to add
netcf build time / install time dependencies ("Requires: netcf-libs"
and "BuildRequires: netcf-devel")

Signed-off-by: Laine Stump <laine@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2021-01-31 02:43:31 -05:00
Erik Skultety
85be8e3d74 spec: Drop gettext-devel from the SPEC file
With meson, we don't need the gettext headers anymore, meson takes care
of that and we only need to have xgettext installed.
Without this patch RPM build in Fedora containers fails.

Signed-off-by: Erik Skultety <eskultet@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-27 13:19:35 +01:00
Cole Robinson
70307548d1 spec: Increase meson test timeout 10x
Tests time out when building in slow environments, like emulated
s390x in Fedora copr. Bump up the test timeout

Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Cole Robinson <crobinso@redhat.com>
2021-01-24 13:28:18 -05:00
Daniel P. Berrangé
57b1ddcaaa docs: add manpage for virtxend
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
7c2b3558e3 docs: add manpage for virtvboxd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
d11bfe7ea5 docs: add manpage for virtstoraged
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
110f3a9b73 docs: add manpage for virtsecretd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
ec897594a4 docs: add manpage for virtqemud
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
0737f4d492 docs: add manpage for virtnwfilterd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
fca8bcd816 docs: add manpage for virtnodedevd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
3763b624b0 docs: add manpage for virtnetworkd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
bdd57eaf66 docs: add manpage for virtlxcd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
b7e9fefcae docs: add manpage for virtinterfaced
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Daniel P. Berrangé
081dd65148 docs: add manpage for virtproxyd
This is an adaptation of the libvirtd manpage.

Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-15 19:08:00 +00:00
Neal Gompa
0a28ea6f59 rpm: Simplify expression of supported platforms
Stanzas like "0%{?fedora} && 0%{?fedora} >= %{min_fedora}" contain
redundant definitions, as "0%{?fedora} >= %{min_fedora}" implies that
"%fedora" is defined and has a value. Thus, we can simplify this.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Jiri Denemark <jdenemar@redhat.com>
2021-01-07 18:34:31 +01:00
Daniel P. Berrangé
6472403c20 rpm: fix ownership of the swtpm log directory
As soon as a guest using a <tpm> device is launched, libvirt will change
the ownership to 'tss' user and group, with mode 0730, which will cause
RPM verify to then fail.

Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-05 17:15:34 +00:00
Daniel P. Berrangé
6b52e6d803 rpm: ensure swtpm tools are installed with QEMU
These are needed for the <tpm> devices to be usable.

Reviewed-by: Laine Stump <laine@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2021-01-05 17:15:34 +00:00
Nikolay Shirokovskiy
95b95e63eb spec: don't touch existing nwfilters on update
Nwfilter can be edited by the user and we don't want to overwrite the editings.
Also the filters in %{datadir} does not have UUIDs and these are generated on
libvirtd start. Thus this patch also fixes regeneration of UUIDs on libvirtd
update.

Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-12-11 09:18:28 +03:00
Andrea Bolognani
a1a960acb6 spec: Drop UUID handling for default network
We're no longer generating a UUID during installation, so we
clearly don't need to strip it afterwards; and since the network
driver is perfectly capable of generating a UUID if necessary, we
don't need to do that at %post time either.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Laine Stump <laine@redhat.com>
2020-11-20 11:44:07 +01:00
Daniel P. Berrangé
7e09a6f1fd rpm: enable wireshark build for RHEL-8 and later
wireshark plugin was disabled in RHEL because RHEL-7 was too old, but we
forgot to enable it in RHEL-8 where it builds fine.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-17 10:19:05 +00:00
Daniel P. Berrangé
8d3c427dea rpm: remove version checks for wireshark
We only turn on with_wireshark if we already know the distro is
guaranteed to have new enough packages. The versioned dep is thus not
required.

Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-17 10:19:03 +00:00
Daniel P. Berrangé
a4636c76fc rpm: more fixes for disabling features
The %meson macro sets "--auto-features=enabled", so it is not enough to
disable the driver options, we must also disable any library options
which the drivers depend on.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-11-09 13:15:28 +00:00
Andrea Bolognani
8dfb6ed826 Revert "Revert "spec: Simplify setting features off by default""
As explained in the original commit (31d687a321), these values
are actually unaffected by the corresponding _without_* macros
and so we can leave out the additional processing / obfuscation.

This reverts commit ae23a87d85.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Martin Kletzander <mkletzan@redhat.com>
2020-11-06 15:19:21 +01:00
Daniel P. Berrangé
0d669b2aa3 rpm: tell meson whether to use libssh or libssh2 explicitly
The %meson macro sets "--auto-features=enabled", thus any feature in the
RPM which has a "with_XXX" condition, needs to explicitly pass a
"-DXXX=state" arg to %meson to override the auto features setting.

The with_libssh and with_libssh2 conditions were not exposed to meson,
so if either was set disabled, then meson would fail the build if the
-devel packages were not found.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-29 17:15:47 +00:00
Daniel P. Berrangé
a44f4f3726 rpm: remove with_bash_completion condition
The %meson macro sets "--auto-features=enabled", thus any feature in the
RPM which has a "with_XXX" condition, needs to explicitly pass a
"-DXXX=state" arg to %meson to override the auto features setting.

The with_bash_completion condition is always set to 1, so rather than
adding an arg to %meson, just remove the condition.

Reviewed-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-29 17:15:47 +00:00
Neal Gompa
ae23a87d85 Revert "spec: Simplify setting features off by default"
As it turns out, the rather complicated structure that is
currently used for enabling or disabling features in the libvirt
build does not cleanly map well to RPM's bcond feature.

Consequently, we need these back in order to support trivially
activating these features through extra macros as build inputs.

This reverts commit 31d687a321.

Signed-off-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-27 10:59:03 +01:00
Daniel P. Berrangé
a16c0402ba rpm: disable LTO in Fedora 34
A binutils change has caused breakage when linking the tests

/usr/bin/ld: tests/libtest_qemu_driver.so: undefined reference to `__open_missing_mode'

This is probably a regression in binutils, so disable LTO until we get
more clarity on the root cause and whether binutils or libvirt will need
changing.

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

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2020-10-21 14:24:53 +01:00
Boris Fiuczynski
07d0a64ddb spec: Fix numad check
This caused

DEBUG: meson.build:2149:2: ERROR: Problem encountered: You must have numactl enabled for numad support.

on s390x.

Fixes: 974dc0a4c6
Signed-off-by: Boris Fiuczynski <fiuczy@linux.ibm.com>
Reviewed-by: Marc Hartmayer <mhartmay@linux.ibm.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-19 15:25:08 +02:00
Daniel Letai
6caaed65f2 rpm: remove rpath from rpms
The rpath improvements in:

  commit 69980ab798
  Author: Andrea Bolognani <abologna@redhat.com>
  Date:   Wed Aug 19 11:15:35 2020 +0200

    meson: Improve RPATH handling

missed that Fedora's %meson macro sets --auto-features=enabled, thus
force enabling rpath in the RPM build. Thus we need to explicitly
disable it

Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Signed-off-by: Daniel Letai <dani@letai.org.il>
2020-10-13 11:27:27 +01:00
Andrea Bolognani
974dc0a4c6 spec: Introduce arches_*
With this commit, all architecture lists that we base feature
enablement decisions on are defined within a few lines of each
other, increasing maintainability.

Additionally, generic architecture lists that appear in the
conditions for multiple features are defined, so that repetition
is reduced.

Note that a few checks (numactl, zfs, ceph) have been changed
from %ifarch to %ifnarch for consistency: while doing so, the
corresponding list of architectures has also been replaced with
the complement of the original one to ensure the overall behavior
would be preserved.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:28 +02:00
Andrea Bolognani
7f56b31562 spec: Refactor qemu_kvm_arches definition
There's no need to set a default for it if we're going to override
it immediately afterwards anyway, and setting with_qemu_tcg at the
same time only makes things more confusing.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:26 +02:00
Andrea Bolognani
e3000eb018 spec: Drop s390 architecture from conditionals
Neither Fedora nor RHEL build packages on this architecture.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Thomas Huth <thuth@redhat.com>
2020-10-09 14:34:25 +02:00
Andrea Bolognani
8ee421dd09 spec: Move _vpath_builddir definition
It belongs before package-specific feature flags are defined.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:24 +02:00
Andrea Bolognani
0fef1fed0b spec: Introduce with_dmidecode
To keep things maintainable, we want to have architecture handling
all in one spot instead of sprinkling %ifarch conditionals all over
the place.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:23 +02:00
Andrea Bolognani
33632cbeee spec: Move with_numactl definition
Keep it close to similar ones.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:21 +02:00
Andrea Bolognani
b9714eba27 spec: bash completion actually defaults to on
Remove the red herring.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:20 +02:00
Andrea Bolognani
c2402b818c spec: firewalld is always enabled
Knowing this, we can remove some code.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:18 +02:00
Andrea Bolognani
31d687a321 spec: Simplify setting features off by default
The right-hand side of these expressions will always evaluate to
zero. Stop obfuscating this fact.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-10-09 14:34:12 +02:00
Pavel Hrdina
67f08376fd meson: add tests build option to enable/disable unit tests
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-09 13:44:54 +02:00
Pavel Hrdina
033c5b8b0b meson: add docs option to enable/disable generating documentation
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-09 13:44:54 +02:00
Pavel Hrdina
b3e2ef408b meson: add libnl build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2020-10-09 13:44:54 +02:00
Matt Coleman
6fa53f02df hyperv: bump minimum openwsman version to 2.6.3
Bug fixes and comments specific to older versions have been removed.

Signed-off-by: Matt Coleman <matt@datto.com>
Reviewed-by: Michal Privoznik <mprivozn@redhat.com>
2020-10-09 10:13:38 +02:00
Andrea Bolognani
74546bd5fb spec: Rework comment to avoid macro expansion
Without this, rpmbuild fails with

  warning: Macro expanded in comment on line 402: %firewalld_reload macro
  error: line 402: Unknown tag: test -f /usr/bin/firewall-cmd && firewall-cmd --reload --quiet || :

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
2020-10-08 16:34:37 +02:00
Andrea Bolognani
10c8edfeee spec: Explain the BuildRequires on firewalld-filesystem
It's not immediately obvious why it is needed.

Suggested-by: Pavel Hrdina <phrdina@redhat.com>
Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2020-10-08 14:55:41 +02:00
Jiri Denemark
03df87ce0d spec: Install all schemas
The main spec file was missing basictypes.rng and mingw did not install
cpu.rng. Let's just install all *.rng files in the schemas directory.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2020-10-08 09:58:44 +02:00