1. 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
  2. 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
  3. 07 8月, 2017 1 次提交
  4. 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
  5. 12 4月, 2017 1 次提交
  6. 06 4月, 2017 1 次提交
  7. 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
  8. 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
  9. 07 11月, 2016 1 次提交
  10. 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
  11. 21 10月, 2016 1 次提交
  12. 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
  13. 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
  14. 25 4月, 2016 10 次提交
    • 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
    • A
      build: Perform post-processing on all man pages · 9b77ce63
      Andrea Bolognani 提交于
      Man pages in daemon/ and src/ are being already subjected to this
      post-processing step: make it so those in tools/ are as well.
      9b77ce63
    • A
      build: Build man pages in $(builddir) · 90709d8d
      Andrea Bolognani 提交于
      No file should be created inside $(srcdir) during build.
      90709d8d
    • A
      build: Extract pod from source files · 94bf7e5d
      Andrea Bolognani 提交于
      Instead of embedding the pod information inside the respective
      source files, store them in separate files.
      
      This allows us to reduce the number of custom build rules as
      most of the information can be inferred for the file name;
      moreover, text editors are more likely to use proper syntax
      highlighting for standalone pod files.
      94bf7e5d
    • A
      build: Ship virt-admin.pod · 2d126960
      Andrea Bolognani 提交于
      This is the source file for the virt-admin(1) manual page, so
      it should be shipped.
      2d126960
  15. 21 4月, 2016 3 次提交
    • A
      dist: ln(1) is not guaranteed to have a '-f' option · d0062fb9
      Andrea Bolognani 提交于
      According to the autoconf manual, using '$(LN_S) -f' is not
      portable; remove the target explicitly beforehand to work around
      this limitation.
      
      Adjust some slightly awkward indentation while at it.
      d0062fb9
    • A
      build: Use $(LN_S) safely · ed5c9297
      Andrea Bolognani 提交于
      The autoconf documentation recommends to always use this
      construct when creating symbolic links with $(LN_S) to avoid
      unexpected behavior.
      ed5c9297
    • A
      build: Overwrite existing symbolic links · ce8379ee
      Andrea Bolognani 提交于
      The current rule fails if the target already exists:
      
        cd /home/jenkins/build/libvirt/lib && \
          ln -s libnss_libvirt.so.1 nss_libvirt.so.1
        ln: nss_libvirt.so.1: File exists
        Makefile:3357: recipe for target 'install-exec-hook' failed
      
      However, all other rules concerned with installation are
      idempotent and will happily overwrite an existing target,
      so this one should as well.
      ce8379ee
  16. 20 4月, 2016 1 次提交
    • M
      nss: Try harder to uninstall · 2f3c89fb
      Michal Privoznik 提交于
      On BSD we are creating this symlink to libnss_libvirt.so called
      nss_libvirt.so. That's just the way it is on BSD. However, when
      uninstalling, we try to remove libnss_libvirt.so instead of the
      symlink. Moreover, if file we are trying to remove does not exist
      we error out instead of ignoring the error.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      2f3c89fb
  17. 13 4月, 2016 2 次提交
    • A
      configure: Make virt-host-validate optional · edebc166
      Andrea Bolognani 提交于
      virt-host-validate, just like virt-login-shell, doesn't make sense
      on Windows, so we should avoid building it.
      
      Make the tool optional and build it by default on all platforms
      except Windows, erroring out if the user attempts to build it
      anyway.
      edebc166
    • A
      tools: Reorganize conditional bits · 0b431fa0
      Andrea Bolognani 提交于
      Instead of having separate handling for programs and man pages,
      deal with both in the same place.
      0b431fa0
  18. 09 4月, 2016 1 次提交
    • R
      nss: properly include syms files to dist · ec5b9331
      Roman Bogorodskiy 提交于
      Explicitly add Linux and BSD syms files for nss to EXTRA_DIST
      instead of using the LIBVIRT_NSS_SYMBOL_FILE variable, because its value
      will point to either Linux or BSD syms file, but we need to ship both.
      ec5b9331
  19. 30 3月, 2016 1 次提交
    • R
      nss: FreeBSD support · 45408cd8
      Roman Bogorodskiy 提交于
       * tools/nss/libvirt_nss.[ch]: add BSD-comptabile wrappers and
         register via the nss_module_register() interface
       * m4/virt-nss.m4: add checks if we're building NSS for FreeBSD
       * tools/Makefile.am: handle target library name differences, as
         Linux needs libnss_libvirt.so.2 and FreeBSD needs
         nss_libvirt.so.1. Also, different syms files have to be used
         as Linux needs to export all the methods while FreeBSD
         only needs to have nss_module_register()
       * tests/nsstest.c, tests/nssmock.c: s/__linux__/NSS/
       * tests/nssmock.c: pass int instead of mode_t to va_arg() to please
         gcc 4.8
       * libvirt_nss_bsd.syms: FreeBSD syms file
      45408cd8
  20. 20 3月, 2016 1 次提交
  21. 19 3月, 2016 2 次提交
    • M
      nss: Implement _nss_libvirt_gethostbyname3_r · 7dbcb26f
      Michal Privoznik 提交于
      The implementation is pretty straightforward. Moreover, because
      of the nature of things, gethostbyname_r and gethostbyname2_r can
      be implemented at the same time too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      7dbcb26f
    • M
      Initial support for NSS plugin skeleton · 859cb18d
      Michal Privoznik 提交于
      Name Service Switch is a glibc feature responsible for many
      things. Translating domain names into IP addresses and vice versa
      is just one of them. However, currently it's the only
      functionality that this commit is tickling. Well, in this commit
      the plugin skeleton is introduced. Implementation to come in next
      patches.
      Because of the future testing, where the implementation is to be
      linked with a test, this needs to go into static library. Linking
      a program with an .so statically is not portable. Therefore a
      dummy libnss_libvirt_impl library is being introduced too.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      859cb18d
  22. 14 1月, 2016 1 次提交
  23. 13 1月, 2016 3 次提交
  24. 25 12月, 2015 1 次提交