1. 12 2月, 2019 1 次提交
    • M
      tools: Keep wireshark plugin registration code in git · a87a75e5
      Michal Privoznik 提交于
      In order to be able to dissect libvirt protocol the wireshark
      plugin needs to be registered. So far this plugin registration
      code was generated on every build using a script that was copied
      over from wireshark's tools/ directory.
      
      This is suboptimal, because the way that plugins register changes
      across wireshark releases. Therefore, let's keep the generated
      file in the git, put the command line used to generate the file
      into a comment and remove the script.
      
      This solution allows us to put different registration mechanism
      into one file (under #ifdef-s) and thus compile with wider range
      of wireshark releases.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      Reviewed-by: NJán Tomko <jtomko@redhat.com>
      a87a75e5
  2. 08 1月, 2019 2 次提交
  3. 19 12月, 2018 1 次提交
  4. 24 8月, 2018 1 次提交
  5. 13 8月, 2018 2 次提交
  6. 10 8月, 2018 1 次提交
  7. 09 8月, 2018 1 次提交
    • J
      Fix link errors in tools/nss and tests · b3d9b08e
      Jim Fehlig 提交于
      While local builds succeed fine, a build worker building in a chroot
      environment is encountering errors when linking some items in tools/nss
      and tests, e.g.
      
      [  469s] libtool: link: gcc -shared  -fPIC -DPIC  -Wl,--whole-archive nss/.libs/libnss_libvirt_impl.a -Wl,--no-whole-archive  -lpthread -lutil -ltirpc  -fstack-protector-strong -grecord-gcc-switches -O2 -fstack-protector-strong -g -Wl,--version-script=./nss/libvirt_nss.syms -Wl,-z -Wl,relro -Wl,-z -Wl,now -Wl,--no-copy-dt-needed-entries -Wl,-z -Wl,defs -grecord-gcc-switches -O2 -fstack-protector-strong -g   -pthread -Wl,-soname -Wl,libnss_libvirt.so.2 -o nss/.libs/libnss_libvirt.so.2
      [  469s] nss/.libs/libnss_libvirt_impl.a(libvirt_nss_la-virjsoncompat.o): In function `virJSONJanssonOnce':
      [  469s] /home/abuild/rpmbuild/BUILD/libvirt-4.6.0/src/util/virjsoncompat.c:63: undefined reference to `dlopen'
      [  469s] /home/abuild/rpmbuild/BUILD/libvirt-4.6.0/src/util/virjsoncompat.c:79: undefined reference to `dlsym'
      ...
      
      A similar problem was fixed in commit b018ada3 and inspires this fix.
      Signed-off-by: NJim Fehlig <jfehlig@suse.com>
      Reviewed-by: NDaniel P. Berrangé <berrange@redhat.com>
      b3d9b08e
  8. 06 3月, 2018 1 次提交
  9. 09 2月, 2018 1 次提交
    • D
      build: passing the "-z defs" linker flag to prevent undefined symbols · a1f6030d
      Daniel P. Berrangé 提交于
      Undefined symbols are a bad thing in general because they can get
      resolved in unexpected ways at runtime if multiple sources provide the
      same symbol name. For example both glibc and libtirpc may provide XDR
      symbols and we want to ensure that we resolve to libtirpc if that's what
      we originally built against.
      
      The toolchain maintainers thus strongly recommend that all applications
      use the '-z defs' linker flag to prevent undefined symbols. This is
      shortly becoming part of the default linker flags for RPMs. As an added
      benefit this aligns Linux builds with Windows builds, where the linker
      has never permitted undefined symbols.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      a1f6030d
  10. 01 2月, 2018 1 次提交
  11. 31 1月, 2018 1 次提交
    • M
      tools: Make symlinks to vsh bash-completion script · 08327dff
      Michal Privoznik 提交于
      The bash-completion project documents that only those scripts
      from $BASH_COMPLETIONS_DIR that share name with the current
      command for which <TAB> was hit are loaded [1]. This means, that
      vsh script we have there is not loaded. We have to create
      symlinks for virsh and virt-admin.
      
      At the same time, we have to create new RPM package because
      virt-admin and client packages are independent. That means we
      cannot place the vsh script in either of them. What we can do is
      to have a different package that contains the completion script
      and then virt-admin and client packages contain only the symlink
      and require the bash-completion package.
      
      1: https://github.com/scop/bash-completion#faqSigned-off-by: NMichal Privoznik <mprivozn@redhat.com>
      08327dff
  12. 15 1月, 2018 1 次提交
  13. 12 1月, 2018 3 次提交
  14. 21 11月, 2017 2 次提交
  15. 18 11月, 2017 1 次提交
    • M
      build: Use XDR_CFLAGS in more places · 74a13be4
      Martin Kletzander 提交于
      Since update to glibc-2.26 removed the /usr/include/rpc/rpc.h we used until now,
      it showed us a problem with not using XDR_CFLAGS properly.  On linux that
      variable has usually -I/usr/include/tirpc because we already probe for it
      properly, we just don't use it everywhere we need.  It is needed by wireshark
      dissector as well as testutilsqemu.c (through includes) so the build fails with:
      
      wireshark/src/packet-libvirt.c:33:10: fatal error: rpc/xdr.h: No such file or directory
       #include <rpc/xdr.h>
                ^~~~~~~~~~~
      
      and
      
      In file included from ../src/logging/log_manager.h:29:0,
                       from ../src/qemu/qemu_domain.h:40,
                       from testutilsqemu.c:11:
      ../src/logging/log_protocol.h:9:10: fatal error: rpc/rpc.h: No such file or directory
       #include <rpc/rpc.h>
                ^~~~~~~~~~~
      
      Since lot of tests use testutilsqemu.c it is easier to add XDR_CFLAGS to
      AM_CFLAGS than adding it to all $binary_CFLAGS.  It's just for tests and we
      already have bunch of CFLAGS there anyway.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      74a13be4
  16. 03 11月, 2017 1 次提交
    • A
      Remove backslash alignment attempts · 3e7db8d3
      Andrea Bolognani 提交于
      Right-aligning backslashes when defining macros or using complex
      commands in Makefiles looks cute, but as soon as any changes is
      required to the code you end up with either distractingly broken
      alignment or unnecessarily big diffs where most of the changes
      are just pushing all backslashes a few characters to one side.
      
      Generated using
      
        $ git grep -El '[[:blank:]][[:blank:]]\\$' | \
          grep -E '*\.([chx]|am|mk)$$' | \
          while read f; do \
            sed -Ei 's/[[:blank:]]*[[:blank:]]\\$/ \\/g' "$f"; \
          done
      Signed-off-by: NAndrea Bolognani <abologna@redhat.com>
      3e7db8d3
  17. 07 8月, 2017 1 次提交
  18. 09 6月, 2017 1 次提交
    • R
      virsh: workaround readline prototypes warnings · 9ea3424a
      Roman Bogorodskiy 提交于
      When building with clang 4.0.0, virsh build fails like this:
      
      gmake[3]: Entering directory '/usr/home/novel/code/libvirt/tools'
        CC       virsh-virsh.o
      In file included from virsh.c:45:
      In file included from /usr/local/include/readline/readline.h:31:
      /usr/local/include/readline/rltypedefs.h:35:22: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef int Function () __attribute__ ((deprecated));
                           ^
                            void
      /usr/local/include/readline/rltypedefs.h:36:24: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef void VFunction () __attribute__ ((deprecated));
                             ^
                              void
      /usr/local/include/readline/rltypedefs.h:37:26: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef char *CPFunction () __attribute__ ((deprecated));
                               ^
                                void
      /usr/local/include/readline/rltypedefs.h:38:28: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      typedef char **CPPFunction () __attribute__ ((deprecated));
                                 ^
                                  void
      In file included from virsh.c:45:
      /usr/local/include/readline/readline.h:385:23: error: this function declaration is not a prototype [-Werror,-Wstrict-prototypes]
      extern int rl_message ();
                            ^
                             void
      5 errors generated.
      gmake[3]: *** [Makefile:2823: virsh-virsh.o] Error 1
      
      Fix that by adding -D_FUNCTION_DEF to READLINE_CFLAGS to fix *Function
      related warnings and add a check for stdarg.h so we have HAVE_STDARG_H
      defined that's needed by the readline headers to use proper rl_message
      declaration.
      
      Bug report on the readline mailing list:
      
       http://lists.gnu.org/archive/html/bug-readline/2017-05/msg00004.html
      9ea3424a
  19. 12 4月, 2017 1 次提交
  20. 06 4月, 2017 1 次提交
  21. 12 3月, 2017 1 次提交
    • R
      virt-host-validate: add bhyve support · 321ff408
      Roman Bogorodskiy 提交于
      Add bhyve support to virt-host-validate(1). It checks for the
      essential kernel modules to be available so that user can actually
      start VMs, have networking and console access.
      
      It uses the kldnext(2)/kldstat(2) routines to retrieve modules list.
      As bhyve is only available on FreeBSD and these routines were available
      long before bhyve appeared, not adding any specific configure checks
      for that.
      
      Also, update tools/Makefile.am to add
      virt-host-validate-$driver.[hc] to the build only if the
      appropriate driver is enabled.
      321ff408
  22. 06 12月, 2016 1 次提交
    • M
      nss: Introduce libvirt-guest module · 22f7ceb6
      Michal Privoznik 提交于
      So far the NSS module looks up only hostnames as provided by
      guests themselves. However, there are some cases where this is
      not enough: e.g. when there's a fresh new guest being installed
      (with some generic hostname) say from a live ISO image; or some
      (older) systems don't advertise their hostname in DHCP
      transactions at all.
      In cases like that it would be helpful if we translate domain
      name as seen by libvirt too so that users can:
      
        # virsh start $dom && ssh $dom
      
      In order to achieve that new libvirt-guest module is introduced,
      while older libvirt module maintains its current behaviour (that
      is translating guest provided names into IP addresses).
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      22f7ceb6
  23. 07 11月, 2016 1 次提交
  24. 26 10月, 2016 2 次提交
    • A
      wireshark: Rename plugindir to ws_plugindir · 3cbf0549
      Andrea Bolognani 提交于
      Since we're using autoconf to substitute the right value in
      Makefile.am now, we can use a less generic name without running
      into circular dependencies.
      3cbf0549
    • A
      wireshark: Inject $(prefix) at the right time · c587c735
      Andrea Bolognani 提交于
      Adding $(prefix) in Makefile.am, as we were doing, means that
      it would be prepended even when using --with-ws-plugindir,
      which is something we don't want to happen.
      
      Instead, we add it beforehand but take care that it doesn't
      get expanded until make is called.
      c587c735
  25. 21 10月, 2016 1 次提交
  26. 31 8月, 2016 1 次提交
    • M
      tools: Don't list virsh-* under EXTRA_DIST · 8540301b
      Michal Privoznik 提交于
      When we wanted to break huge and unmaintainable virsh into
      smaller files first thing we did was to just move funcs into
      virsh-.c files and then #include them from virsh. Having it done
      this way we also needed to have them listed under EXTRA_DIST.
      However, things got changed since then and now all the virsh-*.c
      files are proper source files. Therefore they are listed under
      virsh_SOURCES too. But for some reason we forgot to remove them
      from EXTRA_DIST.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      8540301b
  27. 26 4月, 2016 1 次提交
    • 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
  28. 25 4月, 2016 7 次提交