Commit Graph

842 Commits

Author SHA1 Message Date
Eric Blake
02f790ffbe backup: Parse and output backup XML
Accept XML describing a generic block job, and output it again as
needed. This may still need a few tweaks to match the documented XML
and RNG schema.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-12-10 12:41:56 +01:00
Ján Tomko
dd01eb4fd1 bootstrap: remove regex module
Now that we use GRegex everywhere, there is no need for this module.

Signed-off-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Peter Krempa <pkrempa@redhat.com>
2019-11-20 13:30:55 +01:00
Pavel Hrdina
48423a0b5d vircgroup: introduce virCgroupV2DevicesAttachProg
This function loads the BPF prog with prepared map into kernel and
attaches it into guest cgroup.  It can be also used to replace existing
program in the cgroup if we need to resize BPF map to store more rules
for devices. The old program will be closed and removed from kernel.

There are two possible ways how to create BPF program:

    - One way is to write simple C-like code which can by compiled into
      BPF object file which can be loaded into kernel using elfutils.

    - The second way is to define macros which look like assembler
      instructions and can be used directly to create BPF program that
      can be directly loaded into kernel.

Since the program is not too complex we can use the second option.

If there is no program, all devices are allowed, if there is some
program it is executed and based on the exit status the access is
denied for 0 and allowed for 1.

Our program will follow these rules:

    - first it will try to look for the specific key using major and
      minor to see if there is any rule for that specific device

    - if there is no specific rule it will try to look for any rule that
      matches only major of the device

    - if there is no match with major it will try the same but with
      minor of the device

    - as the last attempt it will try to look for rule for all devices
      and if there is no match it will return 0 to deny that access

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-11-15 12:58:05 +01:00
Pavel Hrdina
07946d6e39 util: introduce virbpf helpers
In order to implement devices controller with cgroup v2 we need to
add support for BPF programs, cgroup v2 doesn't have devices controller.

This introduces required helpers wrapping linux syscalls.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-11-15 12:58:00 +01:00
Michal Privoznik
070d6969fe virhostuptime: Add linux stub for musl
When we want to know the boot timestamp of the host, we can call
virHostGetBootTime(). Under the hood, it uses getutxid() which is
defined by POSIX and properly check for in configure. However,
musl took a path where it declares the function but instead of
providing any useful implementation it returns NULL meaning "no
record found". If that's the case, use our second best option -
/proc/uptime and a bit of maths.

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

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Cole Robinson <crobinso@redhat.com>
2019-11-14 15:20:38 +01:00
Pavel Hrdina
4753fd0553 src: remote: generate source files into build directory
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 17:07:57 +01:00
Pavel Hrdina
d6be9e7f65 src: admin: generate source files into build directory
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 17:07:57 +01:00
Pavel Hrdina
b98f90cf91 src: access: generate source files into build directory
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 17:07:57 +01:00
Pavel Hrdina
afd89b1135 po: README.md: add a note about which Zanata client is required
Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 17:07:57 +01:00
Pavel Hrdina
8beb7fdd0e po: rewrite the way how we generate files
There was no need to handle files for translation from build directory
but that will change with following patches where we will stop
generating source files into source directory.

In order to have them included for translation we have to prefix each
file with SRCDIR or BUILDDIR.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 17:07:57 +01:00
Pavel Hrdina
8c9ca8a284 po: generate files into build directory
Historically we did not support VPATH builds and everything was
generated into source directory.  The introduction of VPATH builds
did not changed the way how our translation files are handled.

This patch changes the rules to generate everything into build
directory and stops distributing generated files in order to have
properly separated VPATH builds.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 17:07:51 +01:00
Pavel Hrdina
c647107922 syntax-check.mk: fix sc_po_check rule
Commit <22d8e27ccd5faf48ee2bf288a1b9059aa7ffd28b> introduced our
syntax-check.mk file based on gnulib rules. However, the rule was
completely ignored as we don't have POTFILES.in file.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-11-08 17:07:50 +01:00
Pavel Hrdina
3097282d86 build: move admin code into admin directory
There is no need to have the libvirt-admin.so library definition in the
src directory.  In addition the library uses directly code from admin
sub-directory so move the remaining bits there as well.

Signed-off-by: Pavel Hrdina <phrdina@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-10-23 14:30:58 +02:00
Daniel P. Berrangé
b2c2a3ae91 build-aux: rewrite po file minimizer in Python
As part of an goal to eliminate Perl from libvirt build tools,
rewrite the minimize-po.pl tool in Python.

This was a straight conversion, manually going line-by-line to
change the syntax from Perl to Python. Thus the overall structure
of the file and approach is the same.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-10-18 13:54:03 +01:00
Daniel P. Berrangé
c2219efd06 po: refresh translations from zanata
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-10-18 13:57:53 +01:00
Daniel P. Berrangé
de3c1d2f53 build: drop the getopt-posix gnulib module
The getopt-posix module fixes a problem with optind being incorrectly
set after a failed option parse. It was also previously used to allow
the bhyve driver to access a private internal reentrant getopt impl.
None of this matters to libvirt code any more.

This partially reverts

  commit b436a8ae5c
  Author: Fabian Freyer <fabian.freyer@physik.tu-berlin.de>
  Date:   Thu Jun 9 00:50:35 2016 +0000

    gnulib: add getopt module

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-10-07 11:34:24 +01:00
Jim Fehlig
2171442d62 xenapi: remove driver
The xenapi driver has not seen any development since its initial
contribution 9 years ago. There have been no bug reports, no patches,
and no queries about the driver on the developer or user mailing lists.
Remove the driver from the libvirt sources.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-09-03 15:37:54 -06:00
Jim Fehlig
ecc4d75d01 xenconfig: move contents to libxl driver and remove directory
After the legacy xen driver was removed the libxl driver became
the only consumer of xenconfig. Move the few files in xenconfig
to the libxl driver and remove the directory.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-08-26 11:06:12 -06:00
Daniel P. Berrangé
3bdca9273c po: refresh translations from zanata
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-30 12:43:31 +01:00
Eric Blake
689beaa47c backup: Implement virsh support for checkpoints
Introduce a bunch of new virsh commands for managing checkpoints in
isolation. More commands are needed for performing incremental
backups, but these commands were easy to implement by modeling heavily
after virsh-snapshot.c. There is no need for checkpoint-revert or
checkpoint-current since those snapshot APIs have no checkpoint
counterpart.  Similarly, it is not necessary to change which
checkpoint is current when redefining from XML, since until we
integrate checkpoints with snapshots, there is only a linear chain
(and you can deduce the current checkpoint by instead using
'checkpoint-list --leaves').  Other aspects of checkpoint-list are
also a bit simpler than the snapshot counterpart, in part because we
don't have to cater to back-compat to older API.

Upcoming patches will test these interfaces once the test driver
supports checkpoints.

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-26 16:48:58 -05:00
Eric Blake
1a4df34a0f backup: Parse and output checkpoint XML
Add a new file checkpoint_conf.c that performs the translation to and
from new XML describing a checkpoint. The code shares a common base
class with snapshots, since a checkpoint similarly represents the
domain state at a moment in time. Add some basic testing of round trip
XML handling through the new code.

Of note - this code intentionally differs from snapshots in that XML
schema validation is unconditional, rather than based on a public API
flag.  We have many existing interfaces that still need to add a flag
for opt-in schema validation, but those interfaces have existing
clients that may not have been producing strictly-compliant XML, or we
may still uncover bugs where our RNG grammar is inconsistent with our
code (where omitting the opt-in flag allows existing apps to keep
working while waiting for an RNG patch).  But since checkpoints are
brand-new, it's easier to ensure the code matches the schema by always
using the schema.  If needed, a later patch could extend the API and
add a flag to turn on to request schema validation, rather than having
it forced (possibly just the validation of the <domain> sub-element
during REDEFINE) - but if a user encounters XML that looks like it
should be good but fails to validate with our RNG schema, they would
either have to upgrade to a new libvirt that adds the new flag, or
upgrade to a new libvirt that fixes the RNG schema, which implies
adding such a flag won't help much.

Also, the redefine flag requires the <domain> sub-element to be
present, rather than catering to historical back-compat to older
versions.

Signed-off-by: Eric Blake <eblake@redhat.com>
2019-07-26 16:48:58 -05:00
Eric Blake
0d44788fc3 backup: Introduce virDomainCheckpoint APIs
Introduce a bunch of new public APIs related to backup checkpoints.
Checkpoints are modeled heavily after virDomainSnapshotPtr (both
represent a point in time of the guest), although a snapshot exists
with the intent of rolling back to that state, while a checkpoint
exists to make it possible to create an incremental backup at a later
time.  We may have a future hypervisor that can completely manage
checkpoints without libvirt metadata, but the first two planned
hypervisors (qemu and test) both always use libvirt for tracking
metadata relations between checkpoints, so for now, I've deferred
the counterpart of virDomainSnapshotHasMetadata for a separate
API addition at a later date if there is ever a need for it.

Note that until we allow snapshots and checkpoints to exist
simultaneously on the same domain (although the actual prevention of
this will be in a separate patch for the sake of an easier revert down
the road), that it is not possible to branch out to create more than
one checkpoint child to a given parent, although it may become
possible later when we revert to a snapshot that coincides with a
checkpoint.  This also means that for now, the decision of which
checkpoint becomes the parent of a newly created one is the only
checkpoint with no child (so while there are APIs for dealing with a
current snapshot, we do not need those for checkpoints).  We may end
up exposing a notion of a current checkpoint later, but it's easier to
add stuff when proven needed than to blindly support it now and wish
we hadn't exposed it.

The following map shows the API relations to snapshots, with new APIs
on the right:

Operate on a domain object to create/redefine a child:
virDomainSnapshotCreateXML          virDomainCheckpointCreateXML

Operate on a child object for lifetime management:
virDomainSnapshotDelete             virDomainCheckpointDelete
virDomainSnapshotFree               virDomainCheckpointFree
virDomainSnapshotRef                virDomainCheckpointRef

Operate on a child object to learn more about it:
virDomainSnapshotGetXMLDesc         virDomainCheckpointGetXMLDesc
virDomainSnapshotGetConnect         virDomainCheckpointGetConnect
virDomainSnapshotGetDomain          virDomainCheckpointGetDomain
virDomainSnapshotGetName            virDomainCheckpiontGetName
virDomainSnapshotGetParent          virDomainCheckpiontGetParent
virDomainSnapshotHasMetadata        (deferred for later)
virDomainSnapshotIsCurrent          (no counterpart, see note above)

Operate on a domain object to list all children:
virDomainSnapshotNum                (no counterparts, these are the old
virDomainSnapshotListNames           racy interfaces)
virDomainSnapshotListAllSnapshots   virDomainListAllCheckpoints

Operate on a child object to list descendents:
virDomainSnapshotNumChildren        (no counterparts, these are the old
virDomainSnapshotListChildrenNames   racy interfaces)
virDomainSnapshotListAllChildren    virDomainCheckpointListAllChildren

Operate on a domain to locate a particular child:
virDomainSnapshotLookupByName       virDomainCheckpointLookupByName
virDomainSnapshotCurrent            (no counterpart, see note above)
virDomainHasCurrentSnapshot         (no counterpart, old racy interface)

Operate on a snapshot to roll back to earlier state:
virDomainSnapshotRevert             (no counterpart, instead checkpoints
                                     are used in incremental backups via
				     XML to virDomainBackupBegin)

Signed-off-by: Eric Blake <eblake@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-26 16:48:58 -05:00
Peter Krempa
dd94cc2e71 po: Drop src/xenconfig/xen_sxpr.c from POTFILES
Commit 2f1c909991 forgot this change.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2019-07-09 11:32:19 +02:00
Peter Krempa
c7a8ccc040 util: Drop virsexpr module
There are no users any more.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2019-07-09 10:27:20 +02:00
Daniel P. Berrangé
e0c44300c4 Refresh translations from Zanata
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-07-01 19:02:08 +01:00
Daniel P. Berrangé
5a148ce846 remote: delete the avahi mDNS support
Libvirtd has long had integration with avahi for advertising libvirtd
using mDNS when TCP/TLS listening is enabled. For a long time the
virt-manager application had support for auto-detecting libvirtds
on the local network using mDNS, but this was removed last year

  commit fc8f8d5d7e3ba80a0771df19cf20e84a05ed2422
  Author: Cole Robinson <crobinso@redhat.com>
  Date:   Sat Oct 6 20:55:31 2018 -0400

    connect: Drop avahi support

    Libvirtd can advertise itself over avahi. The feature is disabled by
    default though and in practice I hear of no one actually using it
    and frankly I don't think it's all that useful

    The 'Open Connection' wizard has a disproportionate amount of code
    devoted to this feature, but I don't think it's useful or worth
    maintaining, so let's drop it

I've never heard of any other applications having support for using
mDNS to detect libvirtd instances. Though it is theoretically possible
something exists out there, it is clearly going to be a niche use case
in the virt ecosystem as a whole.

By removing avahi integration we can cut down the dependency chain for
the basic libvirtd install and reduce our code maint burden.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-06-21 12:59:42 +01:00
Peter Krempa
e8b505c956 qemu: Move qemuParseKeywords(Free) to the monitor code
The only user is now in qemu_monitor_json.c to re-parse the command line
format into keyvalue pairs for use in QMP command construction.

Move and rename the functions.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
Reviewed-by: Andrea Bolognani <abologna@redhat.com>
2019-06-20 12:15:05 +02:00
Daniel P. Berrangé
1851233d31 po: refresh translations from zanata
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2019-01-14 18:10:21 +00:00
Michal Privoznik
29682196d8 Drop UML driver
The driver is unmaintained, untested and severely broken for
quite some time now. Since nobody even reported any issue with it
let us drop it.

Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-12-17 17:52:46 +01:00
Daniel P. Berrangé
72d48f1891 Refresh translations from zanata
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-11-28 17:25:02 +00:00
Daniel P. Berrangé
7bda210e6d po: refresh translations from zanata
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-07-31 12:34:06 +01:00
Daniel P. Berrangé
3f4db69c2f po: don't install gmo files when --disable-nls is given
With --disable-nls is given we turn off use of gettext in the source
code, but mistakenly still installed the gmo files.

Reported-by: Olaf Hering <olaf@aepfle.de>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-06-05 17:36:42 +01:00
Daniel P. Berrangé
45f9905a3f po: delete bogus translations from various languages
For unknown reasons about 21 languages had the same 212 msgid entries
copied into the msgstr field without having any translation applied.
This bogus non-translated data has now been purged from Zanata.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-30 10:40:58 +01:00
Daniel P. Berrangé
fd4581ad1e Refresh translations to drop unused strings
Refresh transaltion po files to drop msgid/msgstr entries that are no
longer required due to deletion/refactoring of source code.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-30 10:40:58 +01:00
Daniel P. Berrangé
655df05500 po: attempt to fix srcdir != builddir builds
The .pot, .po and .gmo files are slightly unusual in that we generate
them in the srcdir when building form git. This is because they'll be
bundled in the tar archive, so a build-from-tar will see them in srcdir.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 14:52:51 +01:00
Daniel P. Berrangé
2b6ea81717 po: minimize language zu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:20:00 +01:00
Daniel P. Berrangé
69ab5ce502 po: minimize language zh_TW
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:51 +01:00
Daniel P. Berrangé
c88abc93ad po: minimize language zh_HK
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:48 +01:00
Daniel P. Berrangé
7a8a84ecd1 po: minimize language zh_CN
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:37 +01:00
Daniel P. Berrangé
6e9b2d3982 po: minimize language yo
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:34 +01:00
Daniel P. Berrangé
dfe326b239 po: minimize language wba
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:31 +01:00
Daniel P. Berrangé
1d60d9d5ad po: minimize language vi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:29 +01:00
Daniel P. Berrangé
70235923e9 po: minimize language ur
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:26 +01:00
Daniel P. Berrangé
da441e30b3 po: minimize language uk
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:24 +01:00
Daniel P. Berrangé
e2133c66c2 po: minimize language tw
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:21 +01:00
Daniel P. Berrangé
5f5f354cab po: minimize language tr
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:19 +01:00
Daniel P. Berrangé
35c9ddd2c4 po: minimize language th
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:16 +01:00
Daniel P. Berrangé
d0f61dce3d po: minimize language tg
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:14 +01:00
Daniel P. Berrangé
04261e683b po: minimize language te
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:12 +01:00
Daniel P. Berrangé
3ae2d1afdf po: minimize language ta
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:09 +01:00
Daniel P. Berrangé
e4863d547d po: minimize language sv
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:06 +01:00
Daniel P. Berrangé
5fce08ce18 po: minimize language sr
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:04 +01:00
Daniel P. Berrangé
0819df40d0 po: minimize language sr@latin
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:19:01 +01:00
Daniel P. Berrangé
6ff59ecd42 po: minimize language sq
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:59 +01:00
Daniel P. Berrangé
32bfe14efd po: minimize language sl
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:56 +01:00
Daniel P. Berrangé
6b6078fb59 po: minimize language sk
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:54 +01:00
Daniel P. Berrangé
9e31e2c523 po: minimize language si
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:51 +01:00
Daniel P. Berrangé
e37bb513bb po: minimize language ru
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:47 +01:00
Daniel P. Berrangé
395d8779a2 po: minimize language ro
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:45 +01:00
Daniel P. Berrangé
e30b355a28 po: minimize language pt
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:42 +01:00
Daniel P. Berrangé
b8213f9667 po: minimize language pt_BR
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:39 +01:00
Daniel P. Berrangé
14578e7913 po: minimize language pl
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:36 +01:00
Daniel P. Berrangé
0c9c5dc259 po: minimize language pa
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:33 +01:00
Daniel P. Berrangé
5fea85aacc po: minimize language or
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:30 +01:00
Daniel P. Berrangé
827a75d022 po: minimize language nso
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:27 +01:00
Daniel P. Berrangé
393c4dbe9d po: minimize language nn
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:24 +01:00
Daniel P. Berrangé
ffca88e48c po: minimize language nl
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:21 +01:00
Daniel P. Berrangé
2dc3ff5269 po: minimize language ne
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:19 +01:00
Daniel P. Berrangé
f25cf4bbaa po: minimize language nds
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:16 +01:00
Daniel P. Berrangé
277daec3f9 po: minimize language nb
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:14 +01:00
Daniel P. Berrangé
aa711c67bf po: minimize language my
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:11 +01:00
Daniel P. Berrangé
81c044937a po: minimize language ms
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:09 +01:00
Daniel P. Berrangé
2c9882e729 po: minimize language mr
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:04 +01:00
Daniel P. Berrangé
287e8e67d2 po: minimize language mn
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:18:01 +01:00
Daniel P. Berrangé
d6739dbfe9 po: minimize language ml
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:57 +01:00
Daniel P. Berrangé
2152abbb85 po: minimize language mk
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:54 +01:00
Daniel P. Berrangé
df602cb005 po: minimize language mai
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:51 +01:00
Daniel P. Berrangé
6487debe85 po: minimize language lv
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:48 +01:00
Daniel P. Berrangé
8546872d8d po: minimize language lt
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:46 +01:00
Daniel P. Berrangé
c42c81697e po: minimize language ky
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:43 +01:00
Daniel P. Berrangé
0c327eaa1c po: minimize language kw@uccor
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:40 +01:00
Daniel P. Berrangé
3c901b32bb po: minimize language kw
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:37 +01:00
Daniel P. Berrangé
5549fd04c9 po: minimize language kw@kkcor
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:34 +01:00
Daniel P. Berrangé
0c55984608 po: minimize language kw_GB
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:31 +01:00
Daniel P. Berrangé
e24c91382a po: minimize language ko
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:28 +01:00
Daniel P. Berrangé
520461aab7 po: minimize language kn
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:14 +01:00
Daniel P. Berrangé
47c3e4ba58 po: minimize language km
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:11 +01:00
Daniel P. Berrangé
980e5e06c2 po: minimize language kk
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:08 +01:00
Daniel P. Berrangé
0c82655ddb po: minimize language ka
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:06 +01:00
Daniel P. Berrangé
b7506ec47b po: minimize language ja
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:03 +01:00
Daniel P. Berrangé
ed328522f8 po: minimize language it
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:17:00 +01:00
Daniel P. Berrangé
fdb6db2391 po: minimize language is
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:50 +01:00
Daniel P. Berrangé
c1f6fbcdd7 po: minimize language ilo
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:48 +01:00
Daniel P. Berrangé
4a742166da po: minimize language id
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:45 +01:00
Daniel P. Berrangé
7b55350ddc po: minimize language ia
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:41 +01:00
Daniel P. Berrangé
8ab9d04290 po: minimize language hu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:37 +01:00
Daniel P. Berrangé
83feb4fbaa po: minimize language hr
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:35 +01:00
Daniel P. Berrangé
5bb09356c0 po: minimize language hi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:32 +01:00
Daniel P. Berrangé
1e060aafee po: minimize language he
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:29 +01:00
Daniel P. Berrangé
9120dfcc2b po: minimize language gu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:26 +01:00
Daniel P. Berrangé
19dc2b5e0a po: minimize language gl
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:23 +01:00
Daniel P. Berrangé
59b61454b0 po: minimize language ga
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:20 +01:00
Daniel P. Berrangé
e7bb87ae0d po: minimize language fur
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:16 +01:00
Daniel P. Berrangé
8e9c220381 po: minimize language fr
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:12 +01:00
Daniel P. Berrangé
74b6ab04f3 po: minimize language fi
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:07 +01:00
Daniel P. Berrangé
2477971666 po: minimize language fil
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:04 +01:00
Daniel P. Berrangé
472ded5dc0 po: minimize language fa
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:16:01 +01:00
Daniel P. Berrangé
36545e85cf po: minimize language eu
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:58 +01:00
Daniel P. Berrangé
b4508a26c2 po: minimize language et
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:55 +01:00
Daniel P. Berrangé
2edb1d44c1 po: minimize language es
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:52 +01:00
Daniel P. Berrangé
bdc647404a po: minimize language eo
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:49 +01:00
Daniel P. Berrangé
5d224f2e4f po: minimize language en_GB
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:46 +01:00
Daniel P. Berrangé
c545d73f74 po: minimize language el
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:43 +01:00
Daniel P. Berrangé
07bb2d4df7 po: minimize language de
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:39 +01:00
Daniel P. Berrangé
c11ee734f0 po: minimize language de_CH
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:35 +01:00
Daniel P. Berrangé
a6c2d8543f po: minimize language da
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:31 +01:00
Daniel P. Berrangé
804d3ba6b8 po: minimize language cy
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:28 +01:00
Daniel P. Berrangé
d577eb0da9 po: minimize language cs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:25 +01:00
Daniel P. Berrangé
e4b0f71ce5 po: minimize language ca
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:19 +01:00
Daniel P. Berrangé
04b7c3b749 po: minimize language bs
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:15 +01:00
Daniel P. Berrangé
a1b6fae3f2 po: minimize language brx
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:10 +01:00
Daniel P. Berrangé
49e7d213a8 po: minimize language br
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:06 +01:00
Daniel P. Berrangé
cf50974fcc po: minimize language bo
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:15:01 +01:00
Daniel P. Berrangé
d2825a3a3a po: minimize language bn
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:58 +01:00
Daniel P. Berrangé
e9c3dcc6c1 po: minimize language bn_IN
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:49 +01:00
Daniel P. Berrangé
17fbfc38f7 po: minimize language bg
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:44 +01:00
Daniel P. Berrangé
e2bd50c8f2 po: minimize language be
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:40 +01:00
Daniel P. Berrangé
cc955c1b74 po: minimize language bal
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:34 +01:00
Daniel P. Berrangé
fa7e7a8ce3 po: minimize language ast
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:29 +01:00
Daniel P. Berrangé
b2c57c91ca po: minimize language as
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:14:17 +01:00
Daniel P. Berrangé
f2da1535f0 po: minimize language ar
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:27 +01:00
Daniel P. Berrangé
0a6054f8de po: minimize language anp
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:18 +01:00
Daniel P. Berrangé
2ee64e5889 po: minimize language am
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:09 +01:00
Daniel P. Berrangé
2ffcb25cfc po: minimize language af
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:13:02 +01:00
Daniel P. Berrangé
a3857dbeeb po: minimize & canonicalize translations stored in git
Similar to the libvirt.pot, .po files contain line numbers and file
names identifying where in the source a translatable string comes from.
The source locations in the .po files are thrown away and replaced with
content from the libvirt.pot whenever msgmerge is run, so this is not
precious information that needs to be stored in git.

When msgmerge processes a .po file, it will add in any msgids from the
libvirt.pot that were not already present. Thus, if a particular msgid
currently has no translation, it can be considered redundant and again
does not need storing in git.

When msgmerge processes a .po file and can't find an exact existing
translation match, it will try todo fuzzy matching instead, marking such
entries with a "# fuzzy" comment to alert the translator to take a
look and either discard, edit or accept the match. Looking at the
existing fuzzy matches in .po files shows that the quality is awful,
with many having a completely different set of printf format specifiers
between the msgid and fuzzy msgstr entry. Fortunately when msgfmt
generates the .gmo, the fuzzy entries are all ignored anyway. The fuzzy
entries could be useful to translators if they were working on the .po
files directly from git, but Libvirt outsourced translation to the
Fedora Zanata system, so keeping fuzzy matches in git is not much help.

Finally, by default msgids are sorted based on source location. Thus, if
a bit of code with translatable text is moved from one file to another,
it may shift around in the .po file, despite the msgid not itself changing.
If the msgids were sorted alphabetically, the .po files would have
stable ordering when code is refactored.

This patch takes advantage of the above observations to canonicalize
and minimize the content stored for .po files in git. Instead of storing
the real .po files, we now store .mini.po files.

The .mini.po files are the same file format as .po files, but have no
source location comments, are sorted alphabetically, and all fuzzy
msgstrs and msgids with no translation are discarded. This cuts the size
of content in the po directory from 109MB to 19MB.

Users working from a libvirt git checkout who need the full .po files
can run "make update-po", which merges the libvirt.pot and .mini.po
file to create a .po file containing all the content previously stored
in git.

Conversely if a full .po file has been modified, for example, by
downloading new content from Zanata, the .mini.po files can be updated
by running "make update-mini-po". The resulting diffs of the .mini.po
file will clearly show the changed translations without any of the noise
that previously obscured content. Being able to see content changes
clearly actually identified a bug in the zanata python client where it
was adding bogus "fuzzy" annotations to many messages:

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

Users working from libvirt releases should not see any difference in
behaviour, since the tarballs only contain the full .po files, not the
.mini.po files.

As an added benefit, generating tarballs with "make dist", will no
longer cause creation of dirty files in git, since it won't touch the
.mini.po files, only the .po files which are no longer kept in git.

To avoid creating a single commit 100+MB in size, each language is
minimized separately in a following commit.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 11:11:08 +01:00
Daniel P. Berrangé
d3034944e4 po: stop storing libvirt.pot in git
Storing the libvirt.pot file is a bad idea because it is an
automatically generated file. Most patches will invalidate the stored
libvirt.pot file by changing line numbers or introducing/removing files
with translatable content.

Anyone working with a libvirt GIT checkout who needs the libvirt.pot is
better served creating a fresh copy with "make libvirt.pot".

libvirt.pot is still included in the release dists, so those building
from tarballs see no change in behaviour.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:36:32 +01:00
Daniel P. Berrangé
4aaf5964dc po: add rules for integration with zanata
Add rules to handle pushing libvirt.pot to zanata, and refreshing .po
files with new content from zanata.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:36:20 +01:00
Daniel P. Berrangé
bdfdec31bc po: remove language list from zanata configuration
The <locales> element in zanata.xml is no longer relevant as this info
is recorded server side.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:36:06 +01:00
Daniel P. Berrangé
c0a8ea450d po: provide custom make rules for po file management
Historically we have relied on autopoint/gettextize to install a
standard po/Makefile.in.in. There is very limited scope for customizing
this and it also causes a bunch of extra stuff to be pulled into
configure.ac which potentially clashes with gnulib. Writing make rules
for po file management is no more difficult than any other rules libvirt
has, so stop using autopoint/gettextize.

Reviewed-by: Ján Tomko <jtomko@redhat.com>
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-19 10:35:58 +01:00
Jiri Denemark
0eceb3bc14 qemu: New file for all APIs related to migration parameters
In the end, this will allow us to have most of the logic around
migration parameters and capabilities done in one place.

Signed-off-by: Jiri Denemark <jdenemar@redhat.com>
Reviewed-by: Ján Tomko <jtomko@redhat.com>
2018-04-17 10:46:22 +02:00
Jim Fehlig
1dac5fbbbb Remove the xend driver
xend was deprecated in Xen 4.2 and removed from the Xen sources
before the Xen 4.5 release. The last Xen release to contain xend
was Xen 4.4, which was retired upstream in March 2017.

Remove xend support from libvirt since it is unrealistic to use
modern libvirt with ancient Xen.

Signed-off-by: Jim Fehlig <jfehlig@suse.com>
Reviewed-by: Daniel P. Berrangé <berrange@redhat.com>
2018-04-09 11:38:05 -06:00
Daniel Veillard
2b7bb7027d Release of libvirt-4.2.0
* docs/news.xml: updated
* po/*.po*: regenerated

Signed-off-by: Daniel Veillard <veillard@redhat.com>
2018-04-01 10:21:27 +02:00
Peter Krempa
367697c54c qemu: caps: Move QAPI schema related code into separate file
Extract the code into qemu_qapi.c/h so that we separate it from various
parts of the code.

Signed-off-by: Peter Krempa <pkrempa@redhat.com>
2018-03-23 14:52:07 +01:00
Chen Hanxiao
a176d67cdf util: introduce helper to parse message from RTM_GETNEIGH query
introduce helper to parse RTM_GETNEIGH query message and
store it in struct virArpTable.

Signed-off-by: Chen Hanxiao <chenhanxiao@gmail.com>
Signed-off-by: Michal Privoznik <mprivozn@redhat.com>
2018-03-15 11:22:42 +01: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
Daniel P. Berrangé
1f7b198ab4 po: refresh translations from zanata
Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-27 14:12:02 +00:00
Daniel P. Berrangé
91fd3dc932 daemon: move libvirtd code into src/remote/ directory
Having a daemon/ directory makes little sense from a code structure
point of view, as 90% of the code that is built into libvirtd already
lives in the src/ directory. The virtlockd and virlogd daemons also live
entirely in src/{locking,logging} directories. This moves the source
code for libvirtd into src/remote/, alongside the client code.

Signed-off-by: Daniel P. Berrangé <berrange@redhat.com>
2018-02-22 12:21:08 +00:00
Daniel P. Berrangé
064fec69be storage: move storage file backend framework into util directory
The QEMU driver loadable module needs to be able to resolve all ELF
symbols it references against libvirt.so. Some of its symbols can only
be resolved against the storage_driver.so loadable module which creates
a hard dependancy between them. By moving the storage file backend
framework into the util directory, this gets included directly in the
libvirt.so library. The actual backend implementations are still done as
loadable modules, so this doesn't re-add deps on gluster libraries.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-02-09 11:05:10 +00:00
Daniel P. Berrangé
3be2d1684a storage: extract storage file backend from main storage driver backend
The storage driver backends are serving the public storage pools API,
while the storage file backends are serving the internal QEMU driver and
/ or libvirt utility code.

To prep for moving this storage file backend framework into the utility
code, split out the backend definitions.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-02-09 11:05:10 +00:00
Daniel P. Berrange
b1e03dad86 admin: move admins server impl/dispatch into src/admin directory
The admin server functionality is a generic concept that should be wired
up into all libvirt daemons, but is currently integrated with the
libvirtd code. Move it all into the src/admin directory to prepare for
broader reuse.

Signed-off-by: Daniel P. Berrange <berrange@redhat.com>
2018-01-31 15:12:30 +00:00