1. 25 4月, 2016 9 次提交
    • 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
  2. 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
  3. 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
  4. 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
  5. 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
  6. 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
  7. 20 3月, 2016 1 次提交
  8. 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
  9. 14 1月, 2016 1 次提交
  10. 13 1月, 2016 3 次提交
  11. 25 12月, 2015 1 次提交
  12. 17 12月, 2015 1 次提交
  13. 30 11月, 2015 2 次提交
  14. 25 9月, 2015 1 次提交
    • M
      tools: Link libvirt.la and readline to libvirt_shell.a · 1fb8ac4c
      Michal Privoznik 提交于
      So, our mingw build is broken. It's because while libvirt_shell
      library is using some of our internal APIs, e.g. virStrndup, and
      readline API but it's not being linked with nor libvirt.la nor
      libreadline.  Only subsequent users of the library, like virsh,
      do link to the needed libraries. In fact, I'm surprised Linux
      linker doesn't care, because how can it make a static library
      with missing symbols is mystery to me.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      1fb8ac4c
  15. 24 9月, 2015 1 次提交
  16. 14 8月, 2015 1 次提交
    • E
      tools: Introduce new client generic module vsh · 834c5720
      Erik Skultety 提交于
      In order to share as much virsh' logic as possible with upcomming
      virt-admin client we need to split virsh logic into virsh specific and
      client generic features.
      
      Since majority of virsh methods should be generic enough to be used by
      other clients, it's much easier to rename virsh specific data to virshX
      than doing this vice versa. It moved generic virsh commands (including info
      and opts structures) to generic module vsh.c.
      
      Besides renaming methods and structures, this patch also involves introduction
      of a client specific control structure being referenced as private data in the
      original control structure, introduction of a new global vsh Initializer,
      which currently doesn't do much, but there is a potential for added
      functionality in the future.
      Lastly it introduced client hooks which are especially necessary during
      client connecting phase.
      834c5720
  17. 02 4月, 2014 1 次提交
    • E
      conf: move storage source type to util/ · 8a20e227
      Eric Blake 提交于
      With this patch, all information related to a host resource in
      a storage file backing chain now lives in util/virstoragefile.h.
      The next step will be to consolidate various places that have
      been tracking backing chain details to all use a common struct.
      
      The changes to tools/Makefile.am were made necessary by the
      fact that virstorageencryption includes uses of libxml, and is
      now pulled in by inclusion from virstoragefile.h.  No
      additional libraries are linked into the final image, and in
      comparison, the build of the setuid library in src/Makefile.am
      already was using LIBXML_CFLAGS via AM_CFLAGS.
      
      * src/conf/domain_conf.h (virDomainDiskSourceDef): Move...
      * src/util/virstoragefile.h (virStorageSource): ...and rename.
      * src/conf/domain_conf.c (virDomainDiskSourceDefClear)
      (virDomainDiskAuthClear): Adjust clients.
      * tools/Makefile.am (virt_login_shell_CFLAGS)
      (virt_host_validate_CFLAGS): Add libxml headers.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8a20e227
  18. 21 1月, 2014 1 次提交
    • L
      build: add $(prefix) to SYSTEMD_UNIT_DIR · 00e9d607
      Laine Stump 提交于
      I noticed this problem when adding systemd support to netcf, because I
      setup the configure.ac to automatically prefer using systemd over
      initscripts when possible - although I had copied the
      install-data-local target from the example of libvirt's
      "libvirt-guests" service more or less verbatim, "make distcheck" would
      fail because it was trying to install the service file directly into
      /lib/systemd/system rather than into
      /home/user/some/unimportant/name/lib/systemd/system.
      
      This is caused by the install/uninstall rules for the systemd unit
      files relying on $(DESTDIR) pointing the installed files to the right
      place, but in reality $(DESTDIR) is empty during this part of make
      distcheck - it instead sets $(prefix) with the toplevel directory used
      for its test build/install/uninstall cycle.
      
      (This problem hasn't been seen when running "make distcheck" in
      libvirt because libvirt will never build/install systemd support
      unless explicitly told to do so on the configure commandline, and
      "make distcheck" doesn't put the "--with-initscript=..." option on the
      configure commandline.)
      
      I verified that the same problem does exist in libvirt by modifying
      libvirt's configure.ac to set:
      
        init_systemd=yes
        with_init_script=systemd+redhat
      
      This forces a build/install of the systemd unit files during
      distcheck, which yields an error like this:
      
      /usr/bin/install -c -m 644 virtlockd.service \
        /lib/systemd/system/
      libtool: install: warning: relinking `libvirt-qemu.la'
      /usr/bin/install: cannot remove '/lib/systemd/system/virtlockd.service': Permission denied
      make[4]: *** [install-systemd] Error 1
      
      After adding $(prefix) to all the definitions of SYSTEMD_UNIT_DIR,
      make distcheck now completes successfully with the modified
      configure.ac, and the above lines change to something like this:
      
      /usr/bin/install -c -m 644 virtlockd.service \
        /home/laine/devel/libvirt/libvirt-1.2.1/_inst/lib/systemd/system/
      00e9d607
  19. 21 10月, 2013 1 次提交
    • D
      Don't link virt-login-shell against libvirt.so (CVE-2013-4400) · 3e2f27e1
      Daniel P. Berrange 提交于
      The libvirt.so library has far too many library deps to allow
      linking against it from setuid programs. Those libraries can
      do stuff in __attribute__((constructor) functions which is
      not setuid safe.
      
      The virt-login-shell needs to link directly against individual
      files that it uses, with all library deps turned off except
      for libxml2 and libselinux.
      
      Create a libvirt-setuid-rpc-client.la library which is linked
      to by virt-login-shell. A config-post.h file allows this library
      to disable all external deps except libselinux and libxml2.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      3e2f27e1
  20. 28 9月, 2013 1 次提交
    • E
      build: fix build --without-lxc · 8771b947
      Eric Blake 提交于
      'make distcheck' fails from a directory configured --without-lxc:
      
        GEN      virt-login-shell.1
      Can't write-open ../../tools/virt-login-shell.1: Permission denied at /usr/bin/pod2man line 69.
      
      * tools/Makefile.am (EXTRA_DIST): Ship pre-built man page.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8771b947
  21. 04 9月, 2013 1 次提交
    • E
      build: enforce makefile conditional style · ec81852f
      Eric Blake 提交于
      Automake has builtin support to prevent botched conditional nesting,
      but only if you use:
      if FOO
      else !FOO
      endif !FOO
      
      An example error message when using the wrong name:
      
      daemon/Makefile.am:378: error: else reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
      daemon/Makefile.am:381: error: endif reminder (LIBVIRT_INIT_SCRIPT_SYSTEMD_TRUE) incompatible with current conditional: LIBVIRT_INIT_SCRIPT_SYSTEMD_FALSE
      
      As our makefiles tend to have quite a bit of nested conditionals,
      it's better to take advantage of the benefits of the build system
      double-checking that our conditionals are well-nested, but that
      requires a syntax check to enforce our usage style.
      
      Alas, unlike C preprocessor and spec files, we can't use indentation
      to make it easier to see how deeply nesting goes.
      
      * cfg.mk (sc_makefile_conditionals): New rule.
      * daemon/Makefile.am: Enforce the style.
      * gnulib/tests/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      ec81852f
  22. 03 9月, 2013 1 次提交
  23. 31 8月, 2013 1 次提交
    • E
      build: only create virt-login-shell for lxc builds · b9189c80
      Eric Blake 提交于
      I noticed from an ./autobuild.sh run that we were installing a
      virt-login-shell.exe binary when cross-building for mingw,
      even though such a binary is necessarily worthless since the
      code depends on lxc which is a Linux-only concept.
      
      * tools/Makefile.am (conf_DATA, bin_PROGRAMS, dist_man1_MANS):
      Make virt-login-shell installation conditional.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      b9189c80
  24. 22 8月, 2013 2 次提交