Commit Graph

38140 Commits

Author SHA1 Message Date
Pavel Hrdina
3f6b78746c meson: add firewalld build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
8b7dbdf19a meson: add dlopen build dependency
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
b12657e472 meson: add devmapper build dependency
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
3eb4e0049d meson: add dbus build dependency
Convert #if VAL into #ifdef VAL in order to make meson more readable and
because it's not necessary to have both defines existing.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
22ca7edef5 meson: add curl build dependency
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
91b65f2362 meson: add capng build dependency
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
0dcbbb29e9 meson: add blkid build dependency
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
f6c5da9c14 meson: add bash_completion build options
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
d4be1919cd meson: add readline build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
1e952c20da meson: add audit build dependency
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
3ace72965c meson: add attr build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
d75d7ddc06 meson: add AppArmor build dependency
APPARMOR_MOUNT is not used so dropping it in meson.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
296bb0bb95 meson: add acl build dependency
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
066de4a8d3 meson: add driver_remote option only into meson_options.txt
We cannot add the full option with the code in meson.build because it
depends on xdr option which will be introduced later but we have to have
the option present because it is used by libssh, libssh2 and sasl
options so we need to break the circular dependency.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
636bb28c8b meson: add iscsiadm as optional program
We compile src/util/viriscsi unconditionally where we require ISCSIADM
to be defined.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
52d459d04f meson: add programs checks
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
09684ddac2 meson: add sizeof check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
ce9b4462f7 meson: add members check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
f46965b5f5 meson: add types check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
44ac9e688a meson: add symbols check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
1e6320e05a meson: add headers check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
d0fd4f55ed meson: add functions check
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
6639943b23 meson: add include directory
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
116f94913f meson: add scripts directory
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
30b301c6ea meson: add linker checks
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
c9d0ef07ed meson: add compiler warnings
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
8dd259d0c6 meson: add manywarnings
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:59 +02:00
Pavel Hrdina
6bfa9efeea meson: add static analysis detection
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:57 +02:00
Pavel Hrdina
2e613fae7c meson: add test_coverage build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:55 +02:00
Pavel Hrdina
3a7faf84df meson: add expensive_tests build option
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:53 +02:00
Pavel Hrdina
d69bc20d5f meson: add packager build options
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:50 +02:00
Pavel Hrdina
84b9a7455b meson: generate configmake.h
We don't use all of the defines so copy only the ones actually used.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:48 +02:00
Pavel Hrdina
2d6cbcaa4d meson: set windows variables for AI_ADDRCONFIG
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:45 +02:00
Pavel Hrdina
1a231590d3 meson: move content from config-post.h to config.h
With meson we generate meson-config.h into the build directory and
include it in config.h so there is no need to have separate
config-post.h file.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:42 +02:00
Pavel Hrdina
179797ee05 meson: build everything with PIE
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:39 +02:00
Pavel Hrdina
8770571e4d meson: introduce meson build files
The PACKAGE* variables are defined by AC_INIT so we have to define
explicitly with meson.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:36 +02:00
Pavel Hrdina
1ba97d7f6b meson: tests: virmockstathelpers: replace check for _FILE_OFFSET_BITS
Meson always defines _FILE_OFFSET_BITS=64 which effectively makes
mocking of non 64-bit stat functions dead code.

On linux it was not an issue because we use the 64-bit versions but
on FreeBSD there are not 64-bit versions, there is only stat & lstat.

We cannot simply drop the check as that would resolve to compilation
error on 64-bit linux:

{standard input}: Assembler messages:
{standard input}:11468: Error: symbol `__xstat64' is already defined
{standard input}:11679: Error: symbol `__xstat64.cold' is already defined
{standard input}:12034: Error: symbol `__lxstat64' is already defined
{standard input}:12245: Error: symbol `__lxstat64.cold' is already defined

So we have to replace the _FILE_OFFSET_BITS with a check if the
corresponding 64-bit version of the stat function exists.

Replicate the meson behavior by always defining _FILE_OFFSET_BITS
instead of using AC_SYS_LARGEFILE otherwise this change would break
our tests.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:36 +02:00
Pavel Hrdina
2298b42878 meson: src/util/virfile: rewrite virFileActivateDirOverrideForProg
With meson we no longer have .libs directory with the actual binary so
we have to take a different approach to detect if running from build
directory.

This is not as robust as for autotools because if you select --prefix
in the build directory it will incorrectly enable the override as well
but nobody should do that.

We have to modify some of the tests to not add current build path into
PATH variable and use the full path for virsh instead. Otherwise it
would be impossible to figure out that we are running virsh from build
directory.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:36 +02:00
Pavel Hrdina
71f95ea1a4 meson: syntax-check: drop Makefile and m4 related checks
Rewrite to meson will eliminate most of the Makefile and all of m4
files so there is no need to check them.

We still need to ignore mk files otherwise syntax-check.mk would be
considered as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:33 +02:00
Pavel Hrdina
cf398f53d8 meson: Makefile: drop cov target
Coverage functionality is provided directly by meson so there is no need
to convert it into meson.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:31 +02:00
Pavel Hrdina
f988ce2fd5 meson: drop test_suite configure argument
With autoconf this option controlled if the test suite is compiled by
default or not with the fact that it will be compiled later when
running `make check`.

With meson it is not possible to compile it later when running
`ninja test` as it will be always compiled if referenced by `test()`
function in meson.build files.

Since we cannot postpone compilation of the test suite drop this option
as it will not be converted to meson.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:31 +02:00
Pavel Hrdina
a4dc88d24a meson: drop driver_module configure argument
Building without driver_module is not supported anymore so drop the
option before switching to meson as we will not introduce it there.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:28 +02:00
Pavel Hrdina
943fe685a2 meson: drop default_editor configure argument
Most likely rarely changed with configure option and it is used only
as fallback if there is no VISUAL or EDITOR environment variable.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:28 +02:00
Pavel Hrdina
da6d644ea7 meson: drop debug_logs configure argument
There is no point of having this option in libvirt because the debug
logs can be configured using log filters.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:28 +02:00
Pavel Hrdina
b63c979fc9 meson: remove automake specific directives
EXTRA_DIST is not relevant because meson makes a git copy when creating
dist archive so everything tracked by git is part of dist tarball.

The remaining ones are not converted to meson files as they are
automatically tracked by meson.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:26:25 +02:00
Pavel Hrdina
9aea94b385 meson: ci: increase git clone depth to 1000
Having limit set to 100 is in most cases perfect but sometimes there can
be a larger series that will have more than 100 patches and it will make
the check-dco job fail.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 09:25:54 +02:00
Ján Tomko
a82e1d4e57 ci: run container jobs right away
The jobs building containers do not depend on anything.
Make this explicit by including the 'needs' keyword in case
we need to shuffle around the stages in the future.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 08:36:15 +02:00
Ján Tomko
09464e6929 ci: run Cirrus-based builds sooner
Jobs using cirrus-run don't need to wait for any jobs from
the container stage. Run them as soon as possible.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 08:35:22 +02:00
Ján Tomko
14ef032e20 ci: add clang jobs
Run the build with clang on Fedora Rawhide, Debian 10 and CentOS 8.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 08:35:22 +02:00
Ján Tomko
34f62f8ecb ci: refresh Dockerfiles
The corresponding libvirt-ci commit is:
commit 512b1011559165e3f37eae675dd43a431b95baa3
    projects: install clang on Linux

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Neal Gompa <ngompa13@gmail.com>
2020-08-03 08:35:13 +02:00