1. 27 8月, 2019 1 次提交
  2. 08 8月, 2019 2 次提交
    • D
      tools: avoid accidentally using files from gnulib · 8242ce4f
      Daniel P. Berrangé 提交于
      The AM_CPPFLAGS setting includes the gnulib headers, which
      means we can get some replacement functions defined. Since
      virt-login-shell and the NSS module intentionally don't link
      to gnulib, these replacement functions causes link failures.
      
      This was seen cross-compiling on Debian for example:
      
      virt-login-shell.o: In function `main':
      /builds/libvirt/libvirt/build/tools/../../tools/virt-login-shell.c:81: undefined reference to `rpl_strerror'
      /builds/libvirt/libvirt/build/tools/../../tools/virt-login-shell.c:66: undefined reference to `rpl_strerror'
      /builds/libvirt/libvirt/build/tools/../../tools/virt-login-shell.c:75: undefined reference to `rpl_strerror'
      
      The only way to avoid these replacement gnulib headers is
      to drop the -Ignulib/lib flags. We do still want to use
      gnulib for configmake.h and intprops.h, but those can be
      included via their full path.
      
      We must also stop using internal.h, since that expects
      -Ignulib/lib to be on the include path in order to resolve
      the verify.h header.
      Reviewed-by: NMichal Privoznik <mprivozn@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      8242ce4f
    • E
      maint: Update to latest gnulib · 05fb5f5a
      Eric Blake 提交于
      Requires adjustments to use verify_expr() which replaces
      verify_true(), and to disable the new syntax check
      'sc_prohibit_gnu_make_extensions' since we require GNU make.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      05fb5f5a
  3. 07 8月, 2019 7 次提交
  4. 21 6月, 2019 1 次提交
    • D
      remote: delete the avahi mDNS support · 5a148ce8
      Daniel P. Berrangé 提交于
      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: NJán Tomko <jtomko@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      5a148ce8
  5. 20 6月, 2019 1 次提交
  6. 18 6月, 2019 1 次提交
  7. 03 6月, 2019 1 次提交
  8. 09 5月, 2019 1 次提交
  9. 12 4月, 2019 1 次提交
  10. 03 4月, 2019 3 次提交
    • D
      cfg.mk: block use of d_type from dirent by default · 86cc922e
      Daniel P. Berrangé 提交于
      The use of d_type is non-portable and leads to surprises when the OS
      does not fill in any value except DT_UNKNOWN. Blacklist its usage
      except in files which inherantly don't require portability (cgroups).
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      86cc922e
    • D
      tests: fix mocking of stat() / lstat() functions · ff376c62
      Daniel P. Berrangé 提交于
      Quite a few of the tests have a need to mock the stat() / lstat()
      functions and they are taking somewhat different & inconsistent
      approaches none of which are actually fully correct. This is shown
      by fact that 'make check' fails on 32-bit hosts. Investigation
      revealed that the code was calling into the native C library impl,
      not getting intercepted by our mocks.
      
      The POSIX stat() function might resolve to any number of different
      symbols in the C library.
      
      The may be an additional stat64() function exposed by the headers
      too.
      
      On 64-bit hosts the stat & stat64 functions are identical, always
      refering to the 64-bit ABI.
      
      On 32-bit hosts they refer to the 32-bit & 64-bit ABIs respectively.
      
      Libvirt uses _FILE_OFFSET_BITS=64 on 32-bit hosts, which causes the
      C library to transparently rewrite stat() calls to be stat64() calls.
      Libvirt will never see the 32-bit ABI from the traditional stat()
      call. We cannot assume this rewriting is done using a macro. It might
      be, but on GLibC it is done with a magic __asm__ statement to apply
      the rewrite at link time instead of at preprocessing.
      
      In GLibC there may be two additional functions exposed by the headers,
      __xstat() and __xstat64(). When these exist, stat() and stat64() are
      transparently rewritten to call __xstat() and __xstat64() respectively.
      The former symbols will not actally exist in the library at all, only
      the header. The leading "__" indicates the symbols are a private impl
      detail of the C library that applications should not care about.
      Unfortunately, because we are trying to mock replace the C library,
      we need to know about this internal impl detail.
      
      With all this in mind the list of functions we have to mock will depend
      on several factors
      
       - If _FILE_OFFSET_BITS is set, then we are on a 32-bit host, and we
         only need to mock stat64 and __xstat64. The other stat / __xstat
         functions exist, but we'll never call them so they can be ignored
         for mocking.
      
       - If _FILE_OFFSET_BITS is not set, then we are on a 64-bit host and
         we should mock stat, stat64, __xstat & __xstat64. Either may be
         called by app code.
      
       - If __xstat & __xstat64 exist, then stat & stat64 will not exist
         as symbols in the library, so the latter should not be mocked.
      
      The same all applies to lstat()
      
      These rules are complex enough that we don't want to duplicate them
      across every mock file, so this centralizes all the logic in a helper
      file virmockstathelper.c that should be #included when needed. The
      code merely need to provide a filename rewriting callback called
      virMockStatRedirect(). Optionally VIR_MOCK_STAT_HOOK can be defined
      as a macro if further processing is needed inline.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      ff376c62
    • A
      maint: Stop generating ChangeLog from git · ce97c33a
      Andrea Bolognani 提交于
      Our ChangeLog is generated by basically redirecting the output
      of 'git log' into it so, as can be expected, it has only gotten
      bigger as development has progressed. As of today, its size has
      reached pretty much comical levels:
      
        $ du -sk ChangeLog
        11328 ChangeLog
      
      All of that for information *literally nobody* cares about: end
      users and distro maintainers have proper release notes lovingly
      compiled for them, while developers peruse the history either by
      calling 'git log' directly or through their favorite $EDITOR's
      git integration.
      
      Replacing the generated ChangeLog with a short message pointing
      interested parties to the git repository does not only reduce
      the size of the unpacked sources from 259904 KiB to 248576 KiB
      (~4% saving): from a quick test on my laptop, doing so reduces
      the size of the *compressed* release archive from 15140 KiB to
      12364 KiB (~18% saving) and also takes the time needed to run
      'make distcheck' down from 4:44 to 4:21 (~8% saving).
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      ce97c33a
  11. 18 3月, 2019 1 次提交
  12. 04 3月, 2019 1 次提交
  13. 25 2月, 2019 1 次提交
  14. 12 2月, 2019 1 次提交
  15. 31 1月, 2019 1 次提交
  16. 09 1月, 2019 2 次提交
  17. 08 1月, 2019 2 次提交
    • E
      maint: split long lines for BSD syntax-check · ab51b22c
      Eric Blake 提交于
      Similar to the gnulib changes we just incorporated into maint.mk,
      it's time to use '$(VC_LIST) | xargs program' instead of
      'program $$($(VC_LIST))', in order to bypass the problem of hitting
      argv limits due to our large set of files.
      
      Drop several uses of $$files as a temporary variable when we can
      instead directly use xargs. While at it, fix a typo in the
      prohibit_windows_special_chars error message.
      
      Note that 'grep $pattern $(generate list)' has be be rewritten
      as 'generate list | xargs grep $pattern /dev/null' - this is
      because for a list that is just long enough, and without /dev/null,
      xargs could make a worst-case split of 'grep $pattern all but one;
      grep $pattern last' which has different output (grep includes the
      filename when there was more than one file, but omits it for a
      single file), while our conversion gives 'grep $pattern /dev/null
      all but one; grep $pattern /dev/null last'. We are less concerned
      about the empty list case (why would we run the syntax check if we
      didn't have at least one file?), but grepping /dev/null happens to
      produce no output and thus nicely also solves that problem without
      relying on the GNU extension of 'xargs -r'.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      ab51b22c
    • E
      maint: prefer $(GREP) in cfg.mk · 2e258dae
      Eric Blake 提交于
      We already used $(GREP) in some places, but might as well use it
      everywhere during syntax check, in line with similar recent gnulib
      changes.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      2e258dae
  18. 04 1月, 2019 1 次提交
  19. 19 12月, 2018 1 次提交
  20. 14 12月, 2018 3 次提交
    • D
      cfg.mk: silence the group-qemu-caps command · b2485c4a
      Daniel P. Berrangé 提交于
      A missing $(AM_V_GEN) meant the raw command was printed by
      mistake.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      b2485c4a
    • D
      Fix many mistakes & inconsistencies in header file layout · 4cfd7090
      Daniel P. Berrangé 提交于
      This introduces a syntax-check script that validates header files use a
      common layout:
      
        /*
         ...copyright header...
         */
        <one blank line>
        #ifndef SYMBOL
        # define SYMBOL
        ....content....
        #endif /* SYMBOL */
      
      For any file ending priv.h, before the #ifndef, we will require a
      guard to prevent bogus imports:
      
        #ifndef SYMBOL_ALLOW
        # error ....
        #endif /* SYMBOL_ALLOW */
        <one blank line>
      
      The many mistakes this script identifies are then fixed.
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      4cfd7090
    • D
      Remove all Author(s): lines from source file headers · 60046283
      Daniel P. Berrangé 提交于
      In many files there are header comments that contain an Author:
      statement, supposedly reflecting who originally wrote the code.
      In a large collaborative project like libvirt, any non-trivial
      file will have been modified by a large number of different
      contributors. IOW, the Author: comments are quickly out of date,
      omitting people who have made significant contribitions.
      
      In some places Author: lines have been added despite the person
      merely being responsible for creating the file by moving existing
      code out of another file. IOW, the Author: lines give an incorrect
      record of authorship.
      
      With this all in mind, the comments are useless as a means to identify
      who to talk to about code in a particular file. Contributors will always
      be better off using 'git log' and 'git blame' if they need to  find the
      author of a particular bit of code.
      
      This commit thus deletes all Author: comments from the source and adds
      a rule to prevent them reappearing.
      
      The Copyright headers are similarly misleading and inaccurate, however,
      we cannot delete these as they have legal meaning, despite being largely
      inaccurate. In addition only the copyright holder is permitted to change
      their respective copyright statement.
      Reviewed-by: NErik Skultety <eskultet@redhat.com>
      Signed-off-by: NDaniel P. Berrangé <berrange@redhat.com>
      60046283
  21. 16 11月, 2018 1 次提交
  22. 15 11月, 2018 1 次提交
  23. 19 10月, 2018 1 次提交
  24. 18 9月, 2018 1 次提交
    • M
      security_manager: Load lock plugin on init · 3e26b476
      Michal Privoznik 提交于
      Now that we know what metadata lock manager user wishes to use we
      can load it when initializing security driver. This is achieved
      by adding new argument to virSecurityManagerNewDriver() and
      subsequently to all functions that end up calling it.
      
      The cfg.mk change is needed in order to allow lock_manager.h
      inclusion in security driver without 'syntax-check' complaining.
      This is safe thing to do as locking APIs will always exist (it's
      only backend implementation that changes). However, instead of
      allowing the include for all other drivers (like cpu, network,
      and so on) allow it only for security driver. This will still
      trigger the error if including from other drivers.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJohn Ferlan <jferlan@redhat.com>
      3e26b476
  25. 12 9月, 2018 1 次提交
  26. 14 7月, 2018 1 次提交
  27. 04 5月, 2018 1 次提交