1. 25 4月, 2016 3 次提交
    • 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: 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: Build man pages in $(builddir) · 90709d8d
      Andrea Bolognani 提交于
      No file should be created inside $(srcdir) during build.
      90709d8d
  2. 20 4月, 2016 1 次提交
  3. 13 4月, 2016 1 次提交
  4. 17 2月, 2016 2 次提交
  5. 20 8月, 2015 1 次提交
  6. 27 7月, 2015 1 次提交
    • M
      admin: Tiny cleanups · 7868f017
      Martin Kletzander 提交于
      First hunk changes the use of srcdir to top_srcdir so it complies with
      other rules in the Makefile.  Second one removes the need of
      remote_protocol.h in admin_protocol.h as it was suggested and worked in,
      but this one line was missed apparently.  Last one just removes the
      'remote' naming from admin protocol specification, just so it's cleaner.
      Signed-off-by: NMartin Kletzander <mkletzan@redhat.com>
      7868f017
  7. 18 6月, 2015 1 次提交
    • M
      daemon: Don't just include admin RPC · 13e5ea8b
      Michal Privoznik 提交于
      So, it's a little paradox that we use the file twice. Firstly to build
      libvirt-admin.la (a client side of the Admin API), then once again to
      build the server side. Well, the problem is, this does not play nicely
      with the distclean since the file is generated. So while it's removed
      in the src/ the distclean running in daemon/ will not find the file
      and fail. The file is needed because it contains the RPC wrappers. So
      let's leave the client code as is and from the daemon/ just link the
      client library. The linker will find desired symbols and use them.
      Signed-off-by: NMichal Privoznik <mprivozn@redhat.com>
      13e5ea8b
  8. 17 6月, 2015 2 次提交
  9. 16 6月, 2015 1 次提交
  10. 05 5月, 2015 2 次提交
    • J
      libxl: add logrotate config file · 77664cb4
      Jim Fehlig 提交于
      Add logrotate config for log files in /var/log/libvirt/libxl.
      77664cb4
    • C
      polkit: Allow password-less access for 'libvirt' group · e94979e9
      Cole Robinson 提交于
      Many users, who admin their own machines, want to be able to access
      system libvirtd via tools like virt-manager without having to enter
      a root password. Just google 'virt-manager without password' and
      you'll find many hits. I've read at least 5 blog posts over the years
      describing slightly different ways of achieving this goal.
      
      Let's finally add official support for this.
      
      Install a polkit-1 rules file granting password-less auth for any user
      in the new 'libvirt' group. Create the group on RPM install
      
      https://bugzilla.redhat.com/show_bug.cgi?id=957300
      e94979e9
  11. 27 4月, 2015 1 次提交
  12. 16 4月, 2015 1 次提交
  13. 24 9月, 2014 1 次提交
  14. 22 8月, 2014 1 次提交
  15. 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
  16. 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
  17. 27 9月, 2013 1 次提交
    • E
      build: fix use of rpc.h on cygwin · 8f34f195
      Eric Blake 提交于
      Caused by commit 012c25e8 splitting out a convenience library.
      
        CC       libvirtd_conf_la-libvirtd-config.lo
      In file included from ../src/rpc/virnetmessage.h:24:0,
                       from ../src/rpc/virnetserverprogram.h:27,
                       from ../src/rpc/virnetserver.h:32,
                       from libvirtd-config.c:31:
      ../src/rpc/virnetprotocol.h:9:21: fatal error: rpc/rpc.h: No such file
      or directory
      
      * daemon/Makefile.am (libvirtd_conf_la_CFLAGS): Add XDR_CFLAGS.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      8f34f195
  18. 10 9月, 2013 2 次提交
    • E
      build: use library rather than cross-directory compilation · 012c25e8
      Eric Blake 提交于
      If we use subdir-objects with automake, any reference to a
      cross-directory .c file will result in automake creating
      rules that track dependency in the cross directory.  But this
      presents a problem during 'make distclean' - if the cross
      directory is cleaned up first, then the daemon directory will
      be left with dangling references to .Po dependency files that
      no longer exist.
      
      Meanwhile, referring to the cross-directory .c file means
      that we are compiling the file twice - once in src, and once
      in daemon.  Better is to compile just once in src into a
      convenience library, and then use that library from daemon.
      
      The tests directory had a similar situation of a cross-directory
      .c file; to solve that, we actually need a convenience library.
      
      * daemon/Makefile.am (DAEMON_SOURCES): Drop .c files...
      (libvirtd_LDADD): ...and instead use library.
      (libvirtd_conf_la_SOURCES): Declare a new convenience library.
      (libvirtd_LDFLAGS): Drop duplicate flag.
      * tests/Makefile.am (libvirtdconftest_SOURCES): Drop .c file...
      (libvirtdconftest_LDADD): ..and instead use library.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      012c25e8
    • E
      build: avoid $(srcdir) in *_SOURCES · 073e1575
      Eric Blake 提交于
      Trying to enable automake's subdir-objects option resulted in
      the creation of literal directories such as src/$(srcdir)/remote/.
      I traced this to the fact that we had used a literal $(srcdir)
      in a location that later fed an automake *_SOURCES variable.
      This has also been reported as an automake bug:
      http://debbugs.gnu.org/cgi/bugreport.cgi?bug=13928
      but it's better to fix our code than to wait for an automake fix.
      
      Some things to remember that affect VPATH builds, and where an
      in-tree build is blissfully unaware of the issues: if a VPATH
      build fails to find a file that was used as a prereq of any
      other target, then the rule for that file will expand $@ to
      prefer the current build dir (bad because a VPATH build on a
      fresh checkout will then stick $@ in the current directory
      instead of the desired srcdir); conversely, if a VPATH build
      finds the file in srcdir but decides it needs to be rebuilt,
      then the rule for that file will expand $@ to include the
      directory where it was found out-of-date (bad for an explicit
      listing of $(srcdir)/$@ because an incremental VPATH build will
      then expand srcdir twice).  As we want these files to go into
      srcdir unconditionally, we have to massage or avoid $@ for any
      recipe that involves one of these files.
      
      Therefore, this patch removes all uses of $(srcdir) from any
      generated file name that later feeds a *_SOURCES variable, and
      then rewrites all the recipes to generate those files to
      hard-code their creation into srcdir without the use of $@.
      
      * src/Makefile.am (REMOTE_DRIVER_GENERATED): Drop $(srcdir); VPATH
      builds know how to find the files, and automake subdir-objects
      fails with it in place.
      (LXC_MONITOR_PROTOCOL_GENERATED, (LXC_MONITOR_GENERATED)
      (ACCESS_DRIVER_GENERATED, LOCK_PROTOCOL_GENERATED): Likewise.
      (*_client_bodies.h): Hard-code rules to write into srcdir, as
      VPATH tries to build $@ locally if missing.
      (util/virkeymaps.h): Likewise.
      (lxc/lxc_monitor_dispatch.h): Likewise.
      (access/viraccessapi*): Likewise.
      (locking/lock_daemon_dispatch_stubs.h): Likewise.
      * daemon/Makeflie.am (DAEMON_GENERATED, remote_dispatch.h):
      Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      
      fixup DAEMON_GENERATED
      073e1575
  19. 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
  20. 22 8月, 2013 2 次提交
  21. 19 7月, 2013 1 次提交
    • E
      maint: split long lines in Makefiles · d21d40bf
      Eric Blake 提交于
      Makefiles are another easy file to enforce line limits.
      
      Mostly straightforward; interesting tricks worth noting:
      src/Makefile.am: $(confdir) was already defined, use it in more places
      tests/Makefile.am: path_add and VG required some interesting compression
      
      * cfg.mk (sc_prohibit_long_lines): Add another test.
      * Makefile.am: Fix offenders.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d21d40bf
  22. 24 6月, 2013 1 次提交
  23. 21 5月, 2013 1 次提交
    • E
      maint: use LGPL correctly · d7f53c7b
      Eric Blake 提交于
      Several files called out COPYING or COPYING.LIB instead of using
      the normal boilerplate.  It's especially important that we don't
      call out COPYING from an LGPL file, since COPYING is traditionally
      used for the GPL.  A few files were lacking copyright altogether.
      
      * src/rpc/gendispatch.pl: Add missing copyright.
      * Makefile.nonreentrant: Likewise.
      * src/check-symfile.pl: Likewise.
      * src/check-symsorting.pl: Likewise.
      * src/driver.h: Likewise.
      * src/internal.h: Likewise.
      * tools/libvirt-guests.sh.in: Likewise.
      * tools/virt-pki-validate.in: Mention copyright in comment, not just code.
      * tools/virt-sanlock-cleanup.in: Likewise.
      * src/rpc/genprotocol.pl: Spell out license terms.
      * src/xen/xend_internal.h: Likewise.
      * src/xen/xend_internal.c: Likewise.
      * Makefile.am: Likewise.
      * daemon/Makefile.am: Likewise.
      * docs/Makefile.am: Likewise.
      * docs/schemas/Makefile.am: Likewise.
      * examples/apparmor/Makefile.am: Likewise.
      * examples/domain-events/events-c/Makefile.am: Likewise.
      * examples/dominfo/Makefile.am: Likewise.
      * examples/domsuspend/Makefile.am: Likewise.
      * examples/hellolibvirt/Makefile.am: Likewise.
      * examples/openauth/Makefile.am: Likewise.
      * examples/python/Makefile.am: Likewise.
      * examples/systemtap/Makefile.am: Likewise.
      * examples/xml/nwfilter/Makefile.am: Likewise.
      * gnulib/lib/Makefile.am: Likewise.
      * gnulib/tests/Makefile.am: Likewise.
      * include/Makefile.am: Likewise.
      * include/libvirt/Makefile.am: Likewise.
      * python/Makefile.am: Likewise.
      * python/tests/Makefile.am: Likewise.
      * src/Makefile.am: Likewise.
      * tests/Makefile.am: Likewise.
      * tools/Makefile.am: Likewise.
      * configure.ac: Likewise.
      Signed-off-by: NEric Blake <eblake@redhat.com>
      d7f53c7b
  24. 17 5月, 2013 1 次提交
  25. 14 5月, 2013 1 次提交
  26. 24 4月, 2013 1 次提交
  27. 03 4月, 2013 2 次提交
    • D
      Enable full RELRO mode · fc8c1787
      Daniel P. Berrange 提交于
      By passing the flags -z relro -z now to the linker, we can force
      it to resolve all library symbols at startup, instead of on-demand.
      This allows it to then make the global offset table (GOT) read-only,
      which makes some security attacks harder.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      fc8c1787
    • D
      Build all binaries with PIE · 1150999c
      Daniel P. Berrange 提交于
      PIE (position independent executable) adds security to executables
      by composing them entirely of position-independent code (PIC. The
      .so libraries already build with -fPIC. This adds -fPIE which is
      the equivalent to -fPIC, but for executables. This for allows Exec
      Shield to use address space layout randomization to prevent attackers
      from knowing where existing executable code is during a security
      attack using exploits that rely on knowing the offset of the
      executable code in the binary, such as return-to-libc attacks.
      Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
      1150999c
  28. 29 1月, 2013 1 次提交
  29. 16 1月, 2013 1 次提交
  30. 14 1月, 2013 1 次提交
  31. 11 1月, 2013 1 次提交
  32. 10 1月, 2013 1 次提交
    • E
      maint: distribute libvirtd.service.in · 7cc522be
      Eric Blake 提交于
      I did a build --without-libvirtd, then ran 'make dist'.  The
      resulting tarball was broken, with a complaint that make did not
      know how to create libvirtd.service.in.  I traced it to a use
      of EXTRA_DIST inside a conditional.
      
      * daemon/Makefile.am (EXTRA_DIST): Hoist libvirtd.service.in
      outside of WITH_LIBVIRTD conditional.
      7cc522be