Commit Graph

28642 Commits

Author SHA1 Message Date
Daniel P. Berrangé
d7d96a6d14 make: split RPC build rules into rpc/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
7cbca93011 make: split admin driver build rules into admin/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
d77f35a5ae make: split lock daemon build rules into locking/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
efb021c8d8 make: split logging daemon build rules into logging/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
3c1e95e6ff make: split access driver build rules into access/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
95d8489ff3 make: split security driver build rules into security/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
240c62ae50 make: split CPU build rules into cpu/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
ed30a13c4b make: split XML conf build rules into conf/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:01 +00:00
Daniel P. Berrangé
124f06534c make: split remote driver & daemon build rules into remote/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:12:00 +00:00
Daniel P. Berrangé
d9da08b759 make: split storage driver build rules into storage/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:11:02 +00:00
Daniel P. Berrangé
d3d8b1bca8 make: split secret driver build rules into secret/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:09:49 +00:00
Daniel P. Berrangé
c6d59fb935 make: split nodedev driver build rules into node_device/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:09:48 +00:00
Daniel P. Berrangé
684388d902 make: split nwfilter driver build rules into nwfilter/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:09:08 +00:00
Daniel P. Berrangé
6d1d414c36 make: split network driver build rules into network/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:08:36 +00:00
Daniel P. Berrangé
09e771c376 make: split interface driver build rules into interface/Makefile.inc.am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 17:08:35 +00:00
Jan Palus
43523d7421 make sure libvirt is linked first
so it's not affected by flags that might be passed in $(*_LIBS) like
-L/usr/lib which might result in linking against system library and
requiring incorrect version of private symbols

Signed-off-by: Jan Palus <atler@pld-linux.org>
2018-03-05 16:49:50 +00:00
Andrea Bolognani
11819aee65 conf: Assign explicit value to VIR_DOMAIN_CONTROLLER_PCI_MODEL_NAME_NONE
Pretty much any reasonable compiler would do this automatically,
but there's no harm in being explicit about it.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Laine Stump <laine@laine.org>
2018-03-05 17:29:40 +01:00
Daniel P. Berrangé
11c0aadb38 Post-release version bump to 4.2.0
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 15:02:51 +00:00
Daniel P. Berrangé
c9c9fc90ce travis: force install of python2 into $PATH on macOS
The homebrew formula's ignored Python PEP-0394 recommendations and
changed the plain python binary in /usr/local/bin to point to Python 3
instead of Python 2. Python 2 is not even installed into a location that
is in $PATH by default anymore. The homebrew packages print a message
to stderr claiming to provide a way to fix this

[quote]
  This formula installs a python2 executable to /usr/local/opt/python@2/bin

  If you wish to have this formula's python executable in your PATH then add

  the following to ~/.bash_profile:

    export PATH="/usr/local/opt/python@2/libexec/bin:$PATH"
[/quote]

When trying to update $PATH are suggested we find out this message is a
lie and /usr/local/opt/python@2 does not even exist, instead Python
seems to end up in /usr/local/Cellar/python@2/2.7.14_1

Rather than hardcoding this version specific directory in our travis
config, we change to run "brew link --force python@2", to make it create
symlinks in /usr/local/bin for the python2 binary.

The original change triggering this problem was

  https://github.com/Homebrew/homebrew-core/pull/24604#issue-171653084

There are countless bug reports against homebrew-core that are closed
without fixes, so it seems they are determined to ignore the Python
PEP 0394 recommendations on this.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-05 13:26:51 +00:00
Ján Tomko
444f15adb8 conf: set postParseFailed even without ALLOW_POST_PARSE_FAIL
We allow the postParse callbacks to fail for some reasons (missing
emulator binary) when parsing the configs from /etc/libvirt.
In that case, def->postParseFailed is set to true and the post
parse callbacks are re-executed on domain startup.

However this bool was only set when virDomainDefPostParse was called
with the ALLOW_POST_PARSE_FAIL flag set. If the callback failed
again on domain startup, the bool would be reset and subsequent
startups would not attempt to reexecute the callback.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 13:25:20 +01:00
Ján Tomko
dc824c6128 vboxDumpNetwork: use switch for adapterType
Also return an error when VIR_STRDUP fails.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
1b75e8c5fa vboxDumpNetwork: use VIR_STEAL_PTR instead of VIR_STRDUP
We can steal the strings instead of creating more copies.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
21f91fc5f6 vboxDumpNetwork: use a switch for attachmentType
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
0310d97ac5 vboxDumpNetwork: Use a single utf8 temp variable
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
56a3f5659a vboxDumpNetwork: Use a single utf16 variable
There is a pattern of using two temporary utf16/utf8 variables
for every value we get from VirtualBox and put in the domain
definition right away.

Reuse the same variable name to improve the chances of getting
the function on one screen.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
6a4b096c66 vboxDumpNetwork: use virMacAddrParseHex
Use the virMacAddrParse helper that does not require colon-separated
values instead of using extra code to format it that way.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
4226024bfb vboxDumpNetworks: do not allocate def->nets upfront
Use VIR_APPEND_ELEMENT instead and change the return type
to int to catch allocation errors.

This removes the need to figure out the adapter count
upfront.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
3b4f2924d8 vboxDumpNetworks: delete pointless comment
Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
a8a2d7db67 vboxDumpNetwork: allocate the network too
Move the allocation from vboxDumpNetworks inside vboxDumpNetwork.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
774bedc496 vboxDumpNetworks: reduce indentation level
The 'enabled' bool is initialized to false, there is no need to nest the
conditions.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
d8cfda3628 vboxDumpNetwork: re-introduce this function
Split out per-adapter code from vboxDumpNetworks.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
8880b8723b vboxDumpNetwork: rename to vboxDumpNetworks
Free up 'vboxDumpNetwork' for dumping single network.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
64db711dd9 vboxDumpNetwork: add temp variable for current network
Instead of using def->nets every time, use a temporary pointer.
This will allow splitting out the per-adapter code.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
c94bb0427b vboxDumpSharedFolders: return a value
The allocation errors in this function are already handled by jumping
to a cleanup label.

Change the return type from void to int and return -1 on error.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
bfdc62e415 vboxDumpSharedFolders: remove pointless comment
Now that the functions are separate, we no longer need comment
separators.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Ján Tomko
3c93a41d6b vboxDumpSharedFolders: rename non-standard label
s/sharedFoldersCleanup/cleanup/

Signed-off-by: Ján Tomko <jtomko@redhat.com>
2018-03-05 12:57:47 +01:00
Nikolay Shirokovskiy
6350527c71 AUTHORS: Add myself to the list of committers
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
2018-03-05 13:45:21 +03:00
Daniel Veillard
6b59754bfd Release of libvirt 4.1.0
- docs/news.xml : updated for release
- po/*.po*: regenerated

Signed-off-by: Daniel Veillard<veillard@redhat.com>
2018-03-05 10:20:35 +01:00
Pavel Hrdina
328b8dbe8b tests: introduce qemucapsfixreplies helper
Sometimes we don't regenerate QEMU capabilities replies using QEMU
binary but we simply add a new entry manually.  In that case you need
to manually fix all the replies ids.  This helper will do that for you.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
2018-03-01 19:04:19 +01:00
Michal Privoznik
6722a32444 news: Update release notes
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2018-03-01 18:23:46 +01:00
Andrea Bolognani
65024c8939 src: Fix checking for clang
The check was trying to use the shell variable $CC instead of
the make variable $(CC); it also interpreted grep's return code
wrong: 1 means the provided pattern was *not* matched. As a
result, pdwtags was never run, not even when building with gcc.

Signed-off-by: Andrea Bolognani <abologna@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-03-01 17:47:54 +01:00
John Ferlan
5535856f0e conf: Fix crash in virDomainDefCompatibleDevice
Commit id 'edae027c' blindly assumed that the passed @oldDev
parameter would not be NULL when calling virDomainDeviceGetInfo;
however, commit id 'b6a264e8' passed NULL for AttachDevice
callers under the premise that there wouldn't be a device
to check/update against.

Signed-off-by: John Ferlan <jferlan@redhat.com>
2018-03-01 08:05:36 -05:00
Daniel P. Berrangé
7a32bedffc travis: test upstart/systemd init script handling
Enable testing of both the upstart and systemd init script handling.
We test a different one in each scenario. Even though trusty only
cares about upstart, it is fine for us to test rules that install
systemd, since we're not actually running these scripts for real.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 17:53:23 +00:00
Daniel P. Berrangé
268ab759d9 travis: test "make install" and "make dist" on macOS
We can't use "make distcheck" on macOS because many unit tests fail. We
can still get coverage of some of the things "distcheck" validates, by
running the "install" and "dist" targets. This is particularly useful
because many conditional features are disabled on macOS, and this helps
make sure we can still successfully install & dist when these bits are
disabled.

The default script is getting unreadable since it is all on one long
line. Rather than adding further conditional clauses to it, we make
use of the travis matrix config override for the script.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 17:53:23 +00:00
Daniel P. Berrangé
60ae63c230 travis: run "make distcheck" instead of just "make check"
Running "make distcheck" includes the "make check", and "make dist"
targets. It ensures that we have CLEANFILES and uninstall rules setup
correctly, as well as validating VPATH builds succeed.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 17:53:23 +00:00
Daniel P. Berrangé
d4ea32e85f travis: drop precise distro jobs
The precise distro is marked deprecated in travis and will be dropped
entirely in 2 months time.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 17:53:23 +00:00
Daniel P. Berrangé
900383f5b8 make: skip pdwtags when building with CLang
When building with CLang the structs that are emitted by pdwtags appear
in a completely different order than with GCC, which causes the
comparison against expected data to fail.

Ideally the test would not be sensitive to the ordering, because even
future GCC could cause changes, but that's not easy to fix. So for now
just skip the test when using clang.

Reviewed-by: Andrea Bolognani <abologna@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 17:53:23 +00:00
Daniel P. Berrangé
6090a816ac docs: remove legacy XHTML <!DOCTYPE> declaration
We have switched the docs to using the HTML5 doctype declaration in

  commit b1c81567c7
  Author: Daniel P. Berrange <berrange@redhat.com>
  Date:   Wed Jul 26 18:01:25 2017 +0100

    docs: switch to using HTML5 doctype declaration

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-28 17:51:03 +00:00
Michal Privoznik
846d3b5874 vshCommandOpt: Do more checking if skipChecks is set
Currently if cmd->skipChecks is set (done only from completers)
some basic checks are skipped because we're working over
partially parsed command. See a26ff63ae4 for more detailed
explanation. Anyway, the referenced commit was too aggressive in
disabling checks and effectively returned success even in clear
case of failure. For instance:

  # domif-getlink --interface <TAB><TAB>

causes virshDomainInterfaceCompleter() to be called, which calls
virshDomainGetXML() which eventually calls
vshCommandOptStringReq(.., name = "domain"); The --domain
argument is required for the command and if not present -1 should
be returned to tell the caller the argument was not found. Well,
zero is returned meaning the argument was not found but it's not
required either.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-02-28 10:36:24 +01:00
Nikolay Shirokovskiy
98c9c3048d vz: fix ref/unref of domain obj in vzDomainRevertToSnapshot
Signed-off-by: Nikolay Shirokovskiy <nshirokovskiy@virtuozzo.com>
2018-02-28 10:35:21 +01:00