- 28 10月, 2012 2 次提交
-
-
由 Cole Robinson 提交于
-
由 Martin Kletzander 提交于
We are currently able to work only with non-translated SELinux contexts, but we are using functions that work with translated contexts throughout the code. This patch swaps all SELinux context translation relative calls with their raw sisters to avoid parsing problems. The problems can be experienced with mcstrans for example. The difference is that if you have translations enabled (yum install mcstrans; service mcstrans start), fgetfilecon_raw() will get you something like 'system_u:object_r:virt_image_t:s0', whereas fgetfilecon() will return 'system_u:object_r:virt_image_t:SystemLow' that we cannot parse. I was trying to confirm that the _raw variants were here since the dawn of time, but the only thing I see now is that it was imported together in the upstream repo [1] from svn, so before 2008. Thanks Laurent Bigonville for finding this out. [1] http://oss.tresys.com/git/selinux.git (cherry picked from commit 9674f2c6)
-
- 19 10月, 2012 3 次提交
-
-
由 Matthias Bolte 提交于
curl_global_init is not thread-safe. curl_easy_init might call curl_global_init when it was no called before. But curl_easy_init can be called from different threads by the ESX driver. Therefore, call curl_global_init from virInitialize to stop curl_easy_init from calling it. Reported by Benjamin Wang. (cherry picked from commit 458c4998)
-
由 Daniel J Walsh 提交于
Currently if you build on a machine that does not support SELinux we end up with the default mount point being /selinux, since this is moved to /sys/fs/selinux, we should start defaulting there. I believe this is causing a bug in libvirt-lxc when /selinux does not exists, even though /sys/fs/selinux exists. (cherry picked from commit aa696e18)
-
由 Jim Fehlig 提交于
In Xen 4.2, xs.h is deprecated in favor of xenstore.h. xs.h now contains #warning xs.h is deprecated use xenstore.h instead #include <xenstore.h> which fails compilation when warnings are treated as errors. Introduce a configure-time check for xenstore.h and if found, use it instead of xs.h. (cherry picked from commit 416eca18)
-
- 18 10月, 2012 1 次提交
-
-
由 Christophe Fergeau 提交于
Commit 9298bfbc introduced code to detect if netcf is linked with libnl1, and to prefer libnl1 over libnl3 when this is the case. This behaviour can be disabled by setting LIBNL_CFLAGS to any value, including the empty string. However, configure.ac sets LIBNL_CFLAGS to "" before attempting libnl detection, so the libnl1 detection code is always disabled. This caused issues on my f17 system where netcf is linked with libnl1 but libvirt got built with libnl3. This commit removes the setting of the LIBNL_* variables to "" as this does not appear to be needed. After this change, libnl1 is used when building libvirt on my f17 system. (cherry picked from commit f6c29515)
-
- 24 9月, 2012 1 次提交
-
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: update for the release * po/*.po*: update from transifex and regenerate
-
- 19 9月, 2012 1 次提交
-
-
由 Doug Goldstein 提交于
Based exclusively on work by Eric Blake in a patch posted with the same subject. However some modifications related to comments and my plans to add another backend. Added WITH_INTERFACE as the only automake variable deciding whether to build the driver and using WITH_NETCF to identify that we're wanting to use the netcf library as the backend. * configure.ac: Added with_interface * src/interface/netcf_driver.c: Renamed.. * src/interface/interface_backend_netcf.c: ..to this to match storage. * src/interface/netcf_driver.h: Renamed.. * src/interface/interface_driver.h: ..to this. * daemon/Makefile.am: Respect WITH_INTERFACE and WITH_NETCF. * libvirt.spec.in: Add RPM support for --with-interface
-
- 18 9月, 2012 1 次提交
-
-
由 Richard W.M. Jones 提交于
With this script you can run libvirt programs without needing to install them first. You just have to do for example: ./run ./tools/virsh [args ...] If you are already in the tools/ subdirectory, then the following command will also work: ../run ./virsh [...] You can also run the C programs under valgrind like this: ./run valgrind [valgrind opts...] ./program or under gdb: ./run gdb --args ./program This also works with sudo (eg. if you need root access for libvirt): sudo ./run ./tools/virsh list --all Derived from libguestfs and simplified. The ./run script in libguestfs is much more sophisticated: https://github.com/libguestfs/libguestfs/blob/master/run.in
-
- 14 9月, 2012 2 次提交
-
-
由 Guido Günther 提交于
so we don't fail when libnetcf is built as multiarch lib.
-
由 Eric Blake 提交于
Commit 9298bfbc changed configure to split the libnl into two separate pkg config checks instead of nesting the second check on the failure path of the first. But the default pkg config behavior is to abort configure if a check fails. Since we have a second check lined up, we need an explicit failure case that does not abort if the first check fails. Meanwhile, commit 51b708c6 is reverted. It did not fix any behavior, and in fact, introduced a regression to the fallback case when the user explicitly sets $LIBNL_CFLAGS. * configure.ac: Don't abort if libnl-3 is not found.
-
- 13 9月, 2012 2 次提交
-
-
由 Osier Yang 提交于
Pushed under build-breaker rule.
-
由 Eric Blake 提交于
Recent spec file changes ensure that in distro situations, netcf and libvirt will link against the same libnl in order to avoid dumping core. But for every-day development, if you use F17 and have the libnl3-devel headers available, libvirt was blindly linking against libnl3 even though F17 netcf still links against libnl1, making testing a self-built binary on F17 impossible. By making configure a little bit smarter, we can avoid this situation - we merely skip the probe of libnl-3 if we can prove that netcf is still using libnl-1. I intentionally wrote the test so that we still favor libnl-3 if netcf is not installed or if we couldn't use ldd to determine things. Defaults being what they are, someone will invariably complain that our smarts were wrong. Never fear - in that case, just run ./configure LIBNL_CFLAGS=..., where the fact that you set LIBNL_CFLAGS (even to the empty string) will go back to probing for libnl-3, regardless of netcf's choice. * configure.ac (LIBNL): Don't probe libnl3 if netcf doesn't use it.
-
- 07 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
FreeBSD and OpenBSD have a <net/if.h> that is not self-contained; and mingw lacks the header altogether. But gnulib has just taken care of that for us, so we might as well simplify our code. In the process, I got a syntax-check failure if we don't also take the gnulib execinfo module. * .gnulib: Update to latest, for execinfo and net_if. * bootstrap.conf (gnulib_modules): Add execinfo and net_if modules. * configure.ac: Let gnulib check for headers. Simplify check for 'struct ifreq', while also including enough prereq headers. * src/internal.h (IF_NAMESIZE): Drop, now that gnulib guarantees it. * src/nwfilter/nwfilter_learnipaddr.h: Use correct header for IF_NAMESIZE. * src/util/virnetdev.c (includes): Assume <net/if.h> exists. * src/util/virnetdevbridge.c (includes): Likewise. * src/util/virnetdevtap.c (includes): Likewise. * src/util/logging.c (includes): Assume <execinfo.h> exists. (virLogStackTraceToFd): Handle gnulib's fallback implementation.
-
- 05 9月, 2012 1 次提交
-
-
由 Eric Blake 提交于
On OpenBSD, clock_gettime() exists in libc rather than librt, and blindly linking with -lrt made the build fail. Gnulib already did the work for determining which libraries to use, so we should reuse that work rather than doing it ourselves. * bootstrap.conf (gnulib_modules): Pull in clock-time. * configure.ac (RT_LIBS): Drop. * src/Makefile.am (libvirt_util_la_LIBADD): Use gnulib variable instead. * src/util/virtime.c (includes): Simplify.
-
- 31 8月, 2012 1 次提交
-
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: update for release * po/*.po*: pulled localization updates for sp,ja,mr,pa,uk,zh_CN,zh_TW and regenerated
-
- 29 8月, 2012 1 次提交
-
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: updates for the release * po/*.po*: update localizations for zh_CN, uk, ja, pt_BR, as, sp, mr, zh_TW
-
- 22 8月, 2012 2 次提交
-
-
由 Eric Blake 提交于
We already skip out on building the LXC under RHEL 5, because the kernel is too old (commits 4c18acff, 2dee8965); but commit 9612e4b2 moved some LXC-only code into common files, resulting in this build failure: util/virfile.c: In function 'virFileLoopDeviceAssociate': util/virfile.c:580: error: 'LO_FLAGS_AUTOCLEAR' undeclared (first use in this function) Unfortunately, the kernel folks only made it an enum, rather than also a #define, so we have to modify configure.ac to record when it is usable. * configure.ac (with_lxc): Mark when LO_FLAGS_AUTOCLEAR was found. * src/util/virfile.c (virFileLoopDeviceAssociate): Avoid compilation when kernel is too old.
-
由 Thomas Woerner 提交于
* configure.ac, spec file: firewalld defaults to enabled if dbus is available, otherwise is disabled. If --with_firewalld is explicitly requested and dbus is not available, configure will fail. * bridge_driver: add dbus filters to get the FirewallD1.Reloaded signal and DBus.NameOwnerChanged on org.fedoraproject.FirewallD1. When these are encountered, reload all the iptables reuls of all libvirt's virtual networks (similar to what happens when libvirtd is restarted). * iptables, ebtables: use firewall-cmd's direct passthrough interface when available, otherwise use iptables and ebtables commands. This decision is made once the first time libvirt calls iptables/ebtables, and that decision is maintained for the life of libvirtd. * Note that the nwfilter part of this patch was separated out into another patch by Stefan in V2, so that needs to be revised and re-reviewed as well. ================ All the configure.ac and specfile changes are unchanged from Thomas' V3. V3 re-ran "firewall-cmd --state" every time a new rule was added, which was extremely inefficient. V4 uses VIR_ONCE_GLOBAL_INIT to set up a one-time initialization function. The VIR_ONCE_GLOBAL_INIT(x) macro references a static function called vir(Ip|Eb)OnceInit(), which will then be called the first time that the static function vir(Ip|Eb)TablesInitialize() is called (that function is defined for you by the macro). This is thread-safe, so there is no chance of any race. IMPORTANT NOTE: I've left the VIR_DEBUG messages in these two init functions (one for iptables, on for ebtables) as VIR_WARN so that I don't have to turn on all the other debug message just to see these. Even if this patch doesn't need any other modification, those messages need to be changed to VIR_DEBUG before pushing. This one-time initialization works well. However, I've encountered problems with testing: 1) Whenever I have enabled the firewalld service, *all* attempts to call firewall-cmd from within libvirtd end with firewall-cmd hanging internally somewhere. This is *not* the case if firewall-cmd returns non-0 in response to "firewall-cmd --state" (i.e. *that* command runs and returns to libvirt successfully.) 2) If I start libvirtd while firewalld is stopped, then start firewalld later, this triggers libvirtd to reload its iptables rules, however it also spits out a *ton* of complaints about deletion failing (I suppose because firewalld has nuked all of libvirt's rules). I guess we need to suppress those messages (which is a more annoying problem to fix than you might think, but that's another story). 3) I noticed a few times during this long line of errors that firewalld made a complaint about "Resource Temporarily unavailable. Having libvirtd access iptables commands directly at the same time as firewalld is doing so is apparently problematic. 4) In general, I'm concerned about the "set it once and never change it" method - if firewalld is disabled at libvirtd startup, causing libvirtd to always use iptables/ebtables directly, this won't cause *terrible* problems, but if libvirtd decides to use firewall-cmd and firewalld is later disabled, libvirtd will not be able to recover.
-
- 21 8月, 2012 2 次提交
-
-
由 Peter Krempa 提交于
This patch adds helper functions that enable us to use libssh2 in conjunction with libvirt's virNetSockets for ssh transport instead of spawning "ssh" client process. This implemetation supports tunneled plaintext, keyboard-interactive, private key, ssh agent based and null authentication. Libvirt's Auth callback is used for interaction with the user. (Keyboard interactive authentication, adding of host keys, private key passphrases). This enables seamless integration into the application using libvirt. No helpers as "ssh-askpass" are needed. Reading and writing of OpenSSH style "known_hosts" files is supported. Communication is done using SSH exec channel, where the user may specify arbitrary command to be executed on the remote side and reads and writes to/from stdin/out are sent through the ssh channel. Usage of stderr is not (yet) supported.
-
由 Eric Blake 提交于
Commit 350583c8 broke development on a RHEL 5 box, where the ancient Autoconf 2.59 lacks AS_VERSION_STRING. Rather than backport the complex awk script that newer autoconf uses for true strverscmp comparisons from the shell, it was easier to just open-code a shell case statement. * configure.ac (qemu_version): Open-code a replacement for AS_VERSION_CHECK.
-
- 14 8月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
The way LIBVIRT_VERSION_INFO is calculated has a timebomb that will cause us to accidentally break soname when we change the major version number to a non-zero value ! Given CURRENT:REVISION:AGE, libtool will generate libvirt.so.($CURRENT-$AGE).$AGE.$REVISION We set CURRENT to be MAJOR+MINOR and AGE to $MINOR, so as soon as MAJOR changes to non-zero, we get libvirt.so.1 as the soname, eg 1.3.9 would create libvirt.so.1.3.9 Looks natural but is not ABI compatible with libvirt.so.0.x.y The fix is to set CURRENT to always be exactly the same as AGE. We want to have the major version reflected in the so symlinks though. So then we set AGE to MAJOR*1000+MINOR eg, so 1.3.9 would create libvirt.so.0.1003.9 and libvirt 2.51.3 would create libvirt.so.0.2051.3
-
由 Martin Kletzander 提交于
libvirt creates invalid commands if wrong locale is selected. For example with locale that uses comma as a decimal point, JSON commands created with decimal numbers are invalid because comma separates the entries in JSON. Fortunately even when decimal point is affected, thousands grouping is not, because for grouping to be enabled with *printf, there has to be an apostrophe flag specified (and supported). This patch adds specific internal function for converting doubles to strings with C locale.
-
- 03 8月, 2012 1 次提交
-
-
由 Eric Blake 提交于
The recent changes to the testsuite to validate exported symbols flushed out a case of unconditionally exporting symbols that were only conditionally compiled under HAVE_AVAHI. * src/Makefile.am (libvirt_net_rpc_server_la_SOURCES): Compile virnetservermdns unconditionally. * configure.ac (HAVE_AVAHI): Drop unused automake conditional. * src/rpc/virnetservermdns.c: Add fallbacks when Avahi is not present.
-
- 02 8月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
On Debian/Ubuntu, one of the libraries libvirt (indirectly) links with exports a symbol named 'base64_encode'. This takes precedence over GNULIB's base64_encode function during linking. Unfortunately they of course have different API semantics. To avoid this problem use a few #defines in config.h to rename the GNULIB provided function to have a 'libvirt_gl_' prefix
-
由 Daniel P. Berrange 提交于
There are a few issues with the current virAtomic APIs - They require use of a virAtomicInt struct instead of a plain int type - Several of the methods do not implement memory barriers - The methods do not implement compiler re-ordering barriers - There is no Win32 native impl The GLib library has a nice LGPLv2+ licensed impl of atomic ops that works with GCC, Win32, or pthreads.h that addresses all these problems. The main downside to their code is that the pthreads impl uses a single global mutex, instead of a per-variable mutex. Given that it does have a Win32 impl though, we don't expect anyone to seriously use the pthread.h impl, so this downside is not significant. * .gitignore: Ignore test case * configure.ac: Check for which atomic ops impl to use * src/Makefile.am: Add viratomic.c * src/nwfilter/nwfilter_dhcpsnoop.c: Switch to new atomic ops APIs and plain int datatype * src/util/viratomic.h: inline impls of all atomic ops for GCC, Win32 and pthreads * src/util/viratomic.c: Global pthreads mutex for atomic ops * tests/viratomictest.c: Test validate to validate safety of atomic ops. Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 01 8月, 2012 1 次提交
-
-
由 Dmitry Guryanov 提交于
Parallels Cloud Server is a cloud-ready virtualization solution that allows users to simultaneously run multiple virtual machines and containers on the same physical server. More information can be found here: http://www.parallels.com/products/pcs/ Also beta version of Parallels Cloud Server can be downloaded there. Signed-off-by: NDmitry Guryanov <dguryanov@parallels.com>
-
- 19 7月, 2012 1 次提交
-
-
由 Sebastian Wiedenroth 提交于
This patch brings support to manage sheepdog pools and volumes to libvirt. It uses the "collie" command-line utility that comes with sheepdog for that. A sheepdog pool in libvirt maps to a sheepdog cluster. It needs a host and port to connect to, which in most cases is just going to be the default of localhost on port 7000. A sheepdog volume in libvirt maps to a sheepdog vdi. To create one specify the pool, a name and the capacity. Volumes can also be resized later. In the volume XML the vdi name has to be put into the <target><path>. To use the volume as a disk source for virtual machines specify the vdi name as "name" attribute of the <source>. The host and port information from the pool are specified inside the host tag. <disk type='network'> ... <source protocol="sheepdog" name="vdi_name"> <host name="localhost" port="7000"/> </source> </disk> To work right this patch parses the output of collie, so it relies on the raw output option. There recently was a bug which caused size information to be reported wrong. This is fixed upstream already and will be in the next release. Signed-off-by: NSebastian Wiedenroth <wiedi@frubar.net>
-
- 17 7月, 2012 1 次提交
-
-
由 Cole Robinson 提交于
See https://www.redhat.com/archives/libvir-list/2012-July/msg00493.html Basically building against librbd doesn't seem to actually require -lcrypto. Also report the rbd linker flags in configure output
-
- 02 7月, 2012 1 次提交
-
-
由 Daniel Veillard 提交于
* configure.ac docs/news.html.in libvirt.spec.in: new version and documentation update * po/*.po*: updated and regenerated localizations
-
- 28 6月, 2012 1 次提交
-
-
由 Marc-André Lureau 提交于
Pushed without ack, under the trivial rule.
-
- 25 6月, 2012 1 次提交
-
-
由 Daniel P. Berrange 提交于
The Mingw32 toolchain is broadly obsoleted by the Mingw64 toolchain. The latter has been adopted by Fedora 17 and newer. Maintaining a RPM spec for Mingw32 is a needless burden, so switch to a Mingw64 RPM spec (which provides 32 & 64 bit builds). Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
- 16 6月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Commit 6e769eba made it a runtime error if libvirt was compiled without yajl support but targets a new enough qemu. But enough users are hitting this on self-compiled libvirt that it is worth erroring out at compilation time, rather than an obscure failure when trying to use the built executable. * configure.ac: If qemu is requested and -version works, require yajl when qemu version is new enough. * src/qemu/qemu_capabilities.c (qemuCapsComputeCmdFlags): Add comment.
-
- 06 6月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Commit 1c275e9a accidentally dropped the storage driver from libvirtd, because it depended on a C preprocessor macro that was not defined. Furthermore, if you do './configure --without-storage-dir --with-storage-disk' or any other combination where you explicitly build a subset of storage backends excluding the dir backend, then the build is broken. Based on analysis by Osier Yang. * configure.ac (WITH_STORAGE): Define top-level conditional. * src/Makefile.am (mod_LTLIBRARIES): Build driver even when storage_dir is disabled. * daemon/libvirtd.c: Pick up storage driver for any backend, not just dir. * daemon/Makefile.am (libvirtd_LDADD): Likewise.
-
- 30 5月, 2012 1 次提交
-
-
由 Eric Blake 提交于
Without this fix, a VPATH build (such as used by ./autobuild.sh) fails with messages like: make[3]: Entering directory `/home/remote/eblake/libvirt-tmp2/build/daemon' ../../build-aux/augeas-gentest.pl libvirtd.conf ../../daemon/test_libvirtd.aug.in test_libvirtd.aug cannot read libvirtd.conf: No such file or directory at ../../build-aux/augeas-gentest.pl line 38. Since the test files are not part of the tarball, we can generate them into the build dir, but rather than create a subdirectory just for the test file, it is easier to test them directly in libvirt.git/src. * daemon/Makefile.am (AUG_GENTEST): Factor out definition. (test_libvirtd.aug): Look for correct file. * src/Makefile.am (AUG_GENTEST): Use $(PERL). (qemu/test_libvirtd_qemu.aug, lxc/test_libvirtd_lxc.aug) (locking/test_libvirt_sanlock.aug): Rename to avoid subdirectories. (check-augeas-qemu, check-augeas-lxc, check-augeas-sanlock): Reflect location of built tests. * configure.ac (PERL): Substitute perl.
-
- 28 5月, 2012 2 次提交
-
-
由 Eric Blake 提交于
Libtool is picky about linking against a module library (aka a .so); giving lots of warnings like this in the tests directory: CCLD networkxml2argvtest *** Warning: Linking the executable networkxml2argvtest against the loadable module *** libvirt_driver_network.so is not portable! Fix that by splitting things into a convenience library which can be used directly by the tests, and making the real .so just wrap the convenience library. Based on a suggestion by Daniel P. Berrange. * configure.ac (--with-driver-modules): Fix help test. * src/Makefile.am (libvirt_driver_xen.la, libvirt_driver_libxl.la) (libvirt_driver_qemu.la, libvirt_driver_lxc.la) (libvirt_driver_uml.la): Factor into new convenience libraries. * tests/Makefile.am (xen_LDADDS, qemu_LDADDS, lxc_LDADDS) (networkxml2argvtest_LDADD): Link to convenience libraries, not shared libraries.
-
由 Daniel P. Berrange 提交于
The CoTaskMemFree function requires the ole32 DLL to be linked against. Currently this is only done for the VirtualBox driver. Also add it to libvirt_util.la * configure.ac: Unconditionally add ole32 DLL to Win32 * src/Makefile.am: Link old32 to libvirt_util.la
-
- 26 5月, 2012 1 次提交
-
-
由 Jim Meyering 提交于
* configure.ac (AM_PROG_CC_STDC): Stop using this macro. It provokes warnings from newer automake and is superseded by autoconf's AC_PROG_CC, which we're already using.
-
- 24 5月, 2012 2 次提交
-
-
由 Daniel P. Berrange 提交于
Always enable driver modules for libvirtd, if we have dlopen available. This allows more modular packaging by distros and ensures we don't break this config * configure.ac: Default to enable driver modules Signed-off-by: NDaniel P. Berrange <berrange@redhat.com>
-
由 Daniel P. Berrange 提交于
The libvirt_test.la library was introduced to allow test suites to reference internal-only symbols. These days, nearly every symbol we care about is in src/libvirt_private.syms, so there is no need for libvirt_test.la to continue to exist * src/Makefile.am: Delete libvirt_test.la & add new .syms files * src/libvirt_private.syms: Export symbols needed by test suite * tests/Makefile.am: Link to libvirt_test.la. Ensure LXC tests link to network_driver.la * src/libvirt_esx.syms, src/libvirt_openvz.syms: Add exports needed by test suite
-