1. 27 4月, 2016 2 次提交
  2. 26 4月, 2016 28 次提交
    • C
      conf: Drop restrictions on rng backend path · 67f2b727
      Cole Robinson 提交于
      Currently we only allow /dev/random and /dev/hwrng as host input
      for <rng><backend model='random'/> device. This was added after
      various upstream discussions in commit 4932ef45
      
      However this restriction has generated quite a few complaints over
      the years, so a new discussion was initiated:
      
      http://www.redhat.com/archives/libvir-list/2016-April/msg00987.html
      
      Several people suggested removing the restriction, and nobody really
      spoke up to defend it. So this patch drops the path restriction
      entirely
      
      https://bugzilla.redhat.com/show_bug.cgi?id=1074464
      67f2b727
    • C
      remote: Don't reject remote polkit if client lacks support · 84371303
      Cole Robinson 提交于
      If you compile a client --without-polkit, and connect to a URI that needs
      polkit auth, the connection will fail with:
      
      $ ./tools/virsh --connect qemu+ssh://crobinso@machine/system
      error: failed to connect to the hypervisor
      error: authentication failed: unsupported authentication type 2
      
      This is because the client side portion of the polkit handling is
      compiled out. However, nothing polkit specific is actually required
      of the client.
      
      Fix that error by unconditionally compiling the basic polkit client
      handling.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=635529
      84371303
    • A
      spec: Use proper indentation · a528ae7f
      Andrea Bolognani 提交于
      Commit 1d440008 added some code that was not indented properly
      and broke syntax-check. Fix it.
      a528ae7f
    • C
      spec: If installing default network, restart libvirtd · 1d440008
      Cole Robinson 提交于
      If libvirt-daemon-config-network is installed while libvirtd is already
      running, the daemon doesn't notice the network. Users then have to
      manually restart libvirtd (or reboot) to pick up the network.
      
      Instead let's trigger a daemon restart when the package is first installed.
      Then the default network is available immediately if libvirtd was already
      running.
      
      https://bugzilla.redhat.com/show_bug.cgi?id=867546
      1d440008
    • C
      schema: Allow space character in disk vendor/product · 600a666c
      Cole Robinson 提交于
      The hex range already tried to allow for it, but it wasn't using
      the correct XML hex syntax. Fix it, and test it
      600a666c
    • A
      maint: Ignore all intermediate and generated man pages · 10ef8c66
      Andrea Bolognani 提交于
      Since commit 9b77ce63 we create a .in file while building all
      man pages, including those in the tools/ directory; update the
      ignore patterns to take this change into account.
      
      The new ignore patterns are generic enough that we can get rid of
      a few existing ones as well.
      10ef8c66
    • A
      apibuild: Fix method call · cb447371
      Andrea Bolognani 提交于
      cb447371
    • A
      apibuild: Introduce app class · 4a98ebb0
      Andrea Bolognani 提交于
      All top-level functions have been moved to this class.
      
      On top of that, the app.warning() method has been defined,
      so that calls to it - already present in rebuild() - can
      actually succeed.
      4a98ebb0
    • A
      apibuild: Add index.warning() method · ccaceab7
      Andrea Bolognani 提交于
      This method is used in eg. index.merge(), but is not defined
      anywhere. The implementation has been copied from docBuilder.
      ccaceab7
    • A
      docs: Pass relative paths to apibuild.py · 22a592a4
      Andrea Bolognani 提交于
      Since commit d195cffa, both $(srcdir) and $(abs_builddir)
      are passed to the apibuild.py script; however, since the
      former is a relative path and the latter an absolute one, the
      script might not be able to detect whether they point to the
      same location.
      
      Pass both as relative paths to avoid the issue.
      22a592a4
    • J
      secret: Change virSecretDef variable names · 662bf30c
      John Ferlan 提交于
      Change 'ephemeral' to 'isephemeral' and 'private' to 'isprivate' since
      both are bools.
      662bf30c
    • J
      secret: Introduce virSecretObjGetValue and virSecretObjGetValueSize · 43d3e3c1
      John Ferlan 提交于
      Introduce the final accessor's to _virSecretObject data and move the
      structure from virsecretobj.h to virsecretobj.c
      
      The virSecretObjSetValue logic will handle setting both the secret
      value and the value_size. Some slight adjustments to the error path
      over what was in secretSetValue were made.
      
      Additionally, a slight logic change in secretGetValue where we'll
      check for the internalFlags and error out before checking for
      and erroring out for a NULL secret->value. That way, it won't be
      obvious to anyone that the secret value wasn't set rather they'll
      just know they cannot get the secret value since it's private.
      43d3e3c1
    • J
      secret: Introduce virSecretObj{Get|Set}Def · 9e1e5621
      John Ferlan 提交于
      Introduce fetch and set accessor to the secretObj->def field for usage
      by the driver to avoid the driver needing to know the format of virSecretObj
      9e1e5621
    • J
      secret: Introduce virSecretObjSave{Config|Data} · ac9ffd60
      John Ferlan 提交于
      Move and rename the secretRewriteFile, secretSaveDef, and secretSaveValue
      from secret_driver to virsecretobj
      
      Need to make some slight adjustments since the secretSave* functions
      called secretEnsureDirectory, but otherwise mostly just a move of code.
      ac9ffd60
    • J
      secret: Introduce virSecretObjDelete{Config|Data} · d467ac07
      John Ferlan 提交于
      Move and rename secretDeleteSaved from secret_driver into virsecretobj and
      split it up into two parts since there is error path code that looks to
      just delete the secret data file
      d467ac07
    • J
      secret: Move and rename secretLoadAllConfigs · 85ec94f8
      John Ferlan 提交于
      Move to secret_conf.c and rename to virSecretLoadAllConfigs. Also includes
      moving/renaming the supporting virSecretLoad, virSecretLoadValue, and
      virSecretLoadValidateUUID.
      85ec94f8
    • J
      secret: Use the hashed virSecretObjList · 993f9128
      John Ferlan 提交于
      This patch replaces most of the guts of secret_driver.c with recently
      added secret_conf.c APIs in order manage secret lists and objects
      using the hashed virSecretObjList* lookup API's.
      993f9128
    • J
      secret: Introduce virSecretObjListGetUUIDs · bb1fba62
      John Ferlan 提交于
      Add function to return counted listed of uuids to from the hashed secrets
      object list. This will replace the guts of secretConnectListSecrets.
      bb1fba62
    • J
      secret: Introduce virSecretObjListExport · d12c6721
      John Ferlan 提交于
      Add function to return a "match" filtered list of secret objects. This
      function replaces the guts of secretConnectListAllSecrets.
      
      Need to also move and make global virSecretUsageIDForDef since it'll
      be used by both secret_driver.c and secret_conf.c
      d12c6721
    • J
      secret: Introduce virSecretObjListNumOfSecrets · 5249d076
      John Ferlan 提交于
      Add function to count the hashed secret obj list with filters. This
      will replace the guts of secret_driver's secretConnectNumOfSecrets.
      5249d076
    • J
      secret: Introduce virSecretObjListAdd* and virSecretObjListRemove · d4287b98
      John Ferlan 提交于
      Add the functions to add/remove elements from the hashed secret obj list.
      These will replace secret_driver functions secretAssignDef and secretObjRemove.
      
      The virSecretObjListAddLocked will perform the necessary lookups and
      decide whether to replace an existing hash entry or create a new one.
      This includes setting up the configPath and base64Path as well as being
      able to support the caller's need to restore from a previous definition
      in case something goes wrong in the caller.
      d4287b98
    • J
      secret: Introduce virSecretUsageIDForDef · 615c8cce
      John Ferlan 提交于
      Move the driver specific secretUsageIDForDef into secret_conf.c. It could
      be more of a general purpose API.
      615c8cce
    • J
      secret: Introduce virSecretObjListFindBy{UUID|Usage} support · 00a3f0d0
      John Ferlan 提交于
      New API's including unlocked and Locked versions in order to be able
      to use in either manner.
      
      Support for searching hash object lists instead of linked lists will
      replace existing secret_driver functions secretFindByUUID and
      secretFindByUsage
      00a3f0d0
    • J
      secret: Create virsecretobj.c and virsecretconf.h · 4652b158
      John Ferlan 提交于
      Move virSecretObj from secret_driver.c to virsecretobj.h
      
      To support being able to create a hashed secrets list, move the
      virSecretObj to virsecretobj.h so that the code can at least find
      the definition.
      
      This should be a temporary situation while the virsecretobj.c code
      is patched in order to support a hashed secret object while still
      having the linked list support in secret_driver.c. Eventually, the
      goal is to move the virSecretObj into virsecretobj.c, although it
      is notable that the existing model from which virSecretObj was
      derived has virDomainObj in src/conf/domain_conf.h and virNetworkObj
      in src/conf/network_conf.h, so virSecretObj wouldn't be unique if
      it were to remain in virsecretobj.h  Still adding accessors to fetch
      and store hashed object data will be the end goal.
      
      Add definitions and infrastucture in virsecretobj.c to create and
      handle a hashed virSecretObj and virSecretObjList including the class,
      object, lock setup, and disposal API's. Nothing will call these yet.
      
      This infrastructure will replace the forward linked list logic
      within the secret_driver, eventually.
      4652b158
    • M
      wireshark: Fix distcheck · dc3002b4
      Michal Privoznik 提交于
      Our distcheck is broken. Well, it works but only by pure chance.
      When wireshark plugin is enabled, we try to query which path
      should the plugin be installed into. Firstly, we try to ask
      pkg-config as some releases of wireshark already sets
      corresponding variable in their pkg-config files. However, if we
      obtained no value from there we try to construct the path on our
      own. Based on our observations it usually is:
      $libdir/wireshark/plugins/$version/.
      Now, the problem is in the way we are deciding whether we have
      obtained the plugin directory from pkg-config or not. Simply
      said, we are checking wrong variable. The variable we are
      checking has never been set, thus in our test is empty and
      therefore we will always construct the plugin dir path on our
      own, regardless of its presence in the pkg-config file.
      To make things worse, after fixing this problem, VPATH build was
      broken as it now tried to install plugin into correct directory.
      Yes, this is problem, because --prefix was not honoured and
      everything but the plugin was installed into given prefix. I've
      managed to resolve this issue by replacing plugin dir prefix with
      our own. So when doing regular installation (our prefix ==
      wireshark prefix), nothing changes. When doing VPATH build &
      installation plugin is installed into correctly prefixed dir.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      dc3002b4
    • M
      tools: Introduce install-nss targets · 90bf5f5c
      Michal Privoznik 提交于
      We do have something similar for installing init system files.
      Basically I'm trying to avoid the following warning produced by
      automake:
      
      tools/Makefile.am:429: warning: uninstall-local was already defined in condition TRUE, which includes condition WITH_BSD_NSS ...
      tools/Makefile.am:292: ... 'uninstall-local' previously defined here
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      90bf5f5c
    • M
      Makefile: Enable distuninstallcheck again · a977cbb4
      Michal Privoznik 提交于
      This target has been disabled historically for whatever reason.
      Now that we do uninstall properly enable the test again.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      a977cbb4
    • M
      qemuProcessCreatePretendCmd: Rework FIPS handling · 927d047e
      Michal Privoznik 提交于
      This function - in contrast with qemuBuildCommandLine - merely
      constructs our internal command representation of a domain. This
      is then later compared against expected output. Or, this function
      is used also in virConnectDomainXMLToNative(). But due to a copy
      paste error this function, just like its image - has @forceFips
      argument that if enabled forces FIPS, otherwise mimics FIPS state
      in the host. If FIPS is enabled or forced the generated command
      line is different to state in which FIPS is disabled. Problem is,
      while this could be desired in the virConnectDomainXMLToNative()
      case, this is undesirable in the test suite as it will produce
      unpredicted results.
      Solution to this is to rename argument to @enableFips to
      specifically tell whether we expect command line to be build in
      either of fashions and make virConnectDomainXMLToNative()
      implementation fetch FIPS state and pass it to
      qemuProcessCreatePretendCmd().
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      927d047e
  3. 25 4月, 2016 10 次提交
    • L
      qemu: fix error log in qemuAssignPCIAddresses() · ff212622
      Laine Stump 提交于
      This error message was too specific, based on the incorrect assumption
      that any error was cause by auto-added bridges:
      
        failed to create PCI bridge on bus 2: too many devices
        with fixed addresses
      
      In practice you can't know if a bridge with an index <= the bus it's
      connecting to was added automatically, or if it was a mistake in
      explicit config, and the auto-add problem is going to be dealt with in
      a different way in an upcoming patch. The new message is this:
      
        PCI Controller at index 1 (0x01) has "
        bus='0x02', but bus must be <= index
      
      (note that index is given in both decimal and hex because it is
      formatted as decimal in the XML, but bus is formatted as hex, and
      displaying the hex value of index makes it easier to see the problem
      when index > 9 (which will often be the case with PCIe, since most
      controllers only have a single port, not 32 slots as with standard
      PCI)).
      
      Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1004593
      ff212622
    • A
      man: Fix links · 9538ecd5
      Andrea Bolognani 提交于
      Use L<> instead of C<> for URLs and man pages.
      9538ecd5
    • A
      man: Fix SYNOPSIS section · 92b2c047
      Andrea Bolognani 提交于
      Format the text properly.
      92b2c047
    • A
      man: Fix NAME section · acd58c48
      Andrea Bolognani 提交于
      podchecker(1) complained about these, eg.
      
        *** WARNING: Verbatim paragraph in NAME section at line 3 in
                     file tools/virt-host-validate.pod
      acd58c48
    • A
      build: Always ship virt-login-shell.conf · 6e742c7f
      Andrea Bolognani 提交于
      No need to special-case this one: we can add it to EXTRA_DIST so
      that it will be shipped in any case, and if WITH_LOGIN_SHELL
      happens to be enabled we mark it for installation as well.
      6e742c7f
    • A
      build: Replace variables in man pages · 49ba028a
      Andrea Bolognani 提交于
      We can't use eg. @sysconfdir@ directly in the .pod file, because
      pod2man(1) will interpret that as a variable name and format it
      accordingly.
      
      Instead, we use eg. SYSCONFDIR and use a subsequent sed(1) call
      to turn it into the expected @sysconfdir@.
      49ba028a
    • A
      build: Ensure intermediate files are cleaned up properly · f806febb
      Andrea Bolognani 提交于
      All $(MANINFILES) should be deleted on distclean.
      f806febb
    • A
      build: Group files · 7351f7fe
      Andrea Bolognani 提交于
      Define $(PODFILES) and $(MANINFILES) so that adding a new man
      page only requires changes in a few, well defined spots.
      7351f7fe
    • A
      build: Never ship man pages · 378338ba
      Andrea Bolognani 提交于
      The generated man pages may contain information that depend on
      the build configuration, so they should not be shipped but
      rather always built on the user's machine.
      378338ba
    • A
      build: Standardize on .pod -> .x.in -> .x · 5b479f3b
      Andrea Bolognani 提交于
      After this commit, all man pages are generated using the same two
      steps:
      
        1. Process a source $command.pod file with pod2man(1) to obtain
           a valid man page in $command.$section.in
      
        2. Process $command.$section.in with sed(1) to obtain the final
           man page in $command.$section
      5b479f3b