summaryrefslogtreecommitdiffstats
path: root/src/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* inspection: Read libosinfo database in order to inspect OS install ↵Richard W.M. Jones2012-11-291-0/+2
| | | | CD/DVD/ISOs (RHBZ#803650, RHBZ#805417).
* lib: Indent CFLAGS in Makefile.am.Richard W.M. Jones2012-11-291-6/+6
| | | | This is just a whitespace change.
* appliance: Pass lpj=... on the appliance command line (thanks Marcelo Tosatti).Richard W.M. Jones2012-11-241-0/+1
| | | | | | | | | | | | | | | | | | | | | Try to get the host's loops_per_jiffy value and pass this on the command line to the guest. In theory this should avoid the appliance having to recalculate this value in a VM with TCG (which is generally error-prone). This should avoid timing issues. We only do this when we are certain that the guest will be TCG. Currently we only have enough information to do this from the libvirt attach-method. So mostly this will only affect people using Fedora in a VM. The host loops_per_jiffy value is not exported by the kernel. It is only printed by the kernel early during boot, so if boot messages have "scrolled off" the kernel ring buffer, it won't be available. Some operating systems save early kernel messages in /var/log/dmesg but (a) Fedora 18+ seem to have abandoned this file and (b) on Ubuntu this file is unreadable for spurious "security" reasons. I have submitted a patch to make lpj available through /proc/cpuinfo.
* lib: Split up huge src/guestfs.c into logical compilation units.Richard W.M. Jones2012-11-121-1/+6
| | | | | | | | | | | | | | | | | | | This file had grown by accretion to include: - code related to handles (now in src/handle.c) - safe allocation (src/alloc.c) - debug, errors, warnings (src/errors.c) - private data (src/private-data.c) - miscellaneous functions (src/canonical-name.c, src/utils.c) This commit also removes about a dozen #include files which were probably not really used. This is just code motion.
* lib: Rework temporary and cache directory code.Richard W.M. Jones2012-11-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New APIs: set-tmpdir, get-tmpdir, set-cachedir, get-cachedir. The current code has evolved over time and has a number of problems: (a) A single environment variable ($TMPDIR) controls the location of several directories. (b) It's hard for the library user to predict which directory libguestfs will use, unless the user simulates the same internal steps that libguestfs performs. This commit fixes these issues. (a) Now three environment variables control the location of all small temporary files, and the appliance cache: For temporary files: $LIBGUESTFS_TMPDIR or $TMPDIR or /tmp. For the appliance cache: $LIBGUESTFS_CACHEDIR or $TMPDIR or /var/tmp. The user can also set these directories explicitly through API calls (guestfs_set_tmpdir and guestfs_set_cachedir). (b) The user can also retrieve the actual directories that libguestfs will use, by calling guestfs_get_tmpdir and guestfs_get_cachedir. These functions are also used internally. This commit also: - reworks the internal tmpdir code - removes the internal (undocumented) guestfs_tmpdir call (replacing it with calls to the documented guestfs_get_tmpdir API instead) - changes the ./run script to set LIBGUESTFS_TMPDIR and LIBGUESTFS_CACHEDIR - adds a test - fixes a few places like libguestfs-make-fixed-appliance which depended on $TMPDIR
* generator: Split up huge src/actions.c into separate files.Richard W.M. Jones2012-11-021-2/+14
| | | | | | | | Split the functions according to a simple hash across C.nr_actions_files files (this number can be increased later if necessary). This is just code motion.
* generator: actions: Move variant functions to a separate file.Richard W.M. Jones2012-11-021-0/+2
| | | | This is just code motion.
* generator: actions: Move 3 helper functions to a separate file.Richard W.M. Jones2012-11-021-0/+1
| | | | This is just code motion.
* generator: Move struct-freeing functions to a separate source file.Richard W.M. Jones2012-10-301-0/+2
| | | | This is just code motion.
* lib: Add a new 'command' mini-library for running external commands.Richard W.M. Jones2012-10-181-0/+1
| | | | | | | | | | | | | This is a wrapper or mini-library for running external command, loosely based on libvirt's virCommand interface. Amongst the advantages are: - Can redirect errors into the error log (RHBZ#713678). - Can redirect output into a callback function. - Handles shell quoting properly. - Safely resets signal handlers, closes file descriptors, etc. - Single place where we can implement other improvements in future.
* New APIs: Model libvirt authentication events through the API.Richard W.M. Jones2012-10-131-0/+1
| | | | | | | | | | | | | | | | | | | | | This commit models libvirt authentication events through the API, adding one new event (GUESTFS_EVENT_LIBVIRT_AUTH) and several new APIs: guestfs_set_libvirt_supported_credentials guestfs_get_libvirt_requested_credentials guestfs_get_libvirt_requested_credential_prompt guestfs_get_libvirt_requested_credential_challenge guestfs_get_libvirt_requested_credential_defresult guestfs_set_libvirt_requested_credential See the documentation and example which shows how to use the new API. This commit also changes existing calls to virConnectOpen* within the library so that the new API is used. Also included is an example (but not a test, because it's hard to see how to automatically test the libvirt API).
* lib: Rename src/libvirtdomain.c -> src/libvirt-domain.c.Richard W.M. Jones2012-10-131-1/+1
| | | | No change, just code motion.
* syntax: Use __PATTERNS__ instead of @PATTERNS@ in podwrapper man pages.Richard W.M. Jones2012-10-031-3/+3
| | | | | It is slightly dangerous to use @PATTERNS@, since these might be substituted by autoconf when they appear in Makefile.am files.
* New API: guestfs_disk_formatRichard W.M. Jones2012-09-031-0/+1
| | | | Detect the disk image format of a file, in a secure way.
* Update inspection and example programs to use new hivex* APIs (RHBZ#852394).Richard W.M. Jones2012-08-291-2/+2
| | | | | | | | | | | | | | | | | | | | | | | I tested this by comparing the output of virt-inspector over Windows guests before and after the change, which was identical: $ md5sum `ls -1 /tmp/*.before /tmp/*.after` c292d6629b5a761eccb4a279754399b4 /tmp/Win2003.after c292d6629b5a761eccb4a279754399b4 /tmp/Win2003.before eb1e1ff29208a9ee46e9c100dfec26b2 /tmp/Win2012.after eb1e1ff29208a9ee46e9c100dfec26b2 /tmp/Win2012.before d060a95d7ffe5dce6c4e66feb80c2837 /tmp/Win7x32.after d060a95d7ffe5dce6c4e66feb80c2837 /tmp/Win7x32.before 8914eee70ac4f8a0317659e09e00dcdc /tmp/Win7x32Dynamic.after 8914eee70ac4f8a0317659e09e00dcdc /tmp/Win7x32Dynamic.before a2dcdfc0f9d64054640875aa791889e0 /tmp/Win7x32TwoDisks.after a2dcdfc0f9d64054640875aa791889e0 /tmp/Win7x32TwoDisks.before 5ed49568a5147dce7517c99de41ebf2e /tmp/Win8previewx64.after 5ed49568a5147dce7517c99de41ebf2e /tmp/Win8previewx64.before fdfc7d272b79a665ae3313ae1ae30660 /tmp/WinXP.after fdfc7d272b79a665ae3313ae1ae30660 /tmp/WinXP.before 3c705444be664f1316b21c5d8d3cb0be /tmp/WinXPRecConsole.after 3c705444be664f1316b21c5d8d3cb0be /tmp/WinXPRecConsole.before
* lib: Remove AUGEAS_CFLAGS, AUGEAS_LIBS.Richard W.M. Jones2012-08-291-2/+2
| | | | | | The library doesn't actually use libaugeas, except indirectly via the libguestfs API. The libguestfs API implements this in the daemon, so there's no need for the library to link to augeas at all.
* remove ulockmgr from fuse LDFLAGSOlaf Hering2012-08-291-1/+1
| | | | | | | | | | libguestfs fails to build with --enable-fuse on openSuSE 11.4 and earlier because the included fuse version does not include libulockmgr.so. configure already used pkgconfig to retrieve the correct CFLAGS, so there is no need to hardcode -lulockmgr. With this change the build succeeds again. Signed-off-by: Olaf Hering <olaf@aepfle.de>
* podwrapper: Add --license parameter, which is required.Richard W.M. Jones2012-08-211-0/+1
| | | | | | | | | | This adds standard LICENSE and BUGS sections to all of the man pages that are processed by podwrapper. Modify all the calls to $(PODWRAPPER) to add the right --license parameter according to the content. Note that this relaxes the license on some code example pages, making them effectively BSD-style licensed.
* guestfs_cat: Reimplement to avoid protocol limits.Richard W.M. Jones2012-08-171-0/+1
|
* Mac OS X: Use u_int64_t/uint64_t instead of unsigned hyper in .x fileMasami HIRATA2012-07-241-2/+11
| | | | | | | Signed-off-by: Masami HIRATA <msmhrt@gmail.com> RWMJ: Fixed whitespace in generator_xdr.ml
* launch: Add libvirt backend.Richard W.M. Jones2012-07-221-0/+1
| | | | | | | | | | | | Complete the attach-method libvirt backend. This backend uses libvirt to create a transient KVM domain to run the appliance. Note that this still will only work with local libvirt URIs since the <kernel>, <initrd> and appliance links in the libvirt XML refer to local files, and virtio serial only works locally (limitation of libvirt). Remote support will be added later.
* lib: Split launch.c into separate files.Richard W.M. Jones2012-07-191-0/+2
| | | | | | | | | | | | | | | | | | | | | | launch-appliance.c contains the code associated with the 'appliance' attach-method. Mostly. In fact there are a few APIs which don't fit so nicely: - config: deprecated API which fiddles with the qemu command line directly - max-disks: depends on the qemu implementation (virtio-scsi or not) - debug-drives: used for testing only launch-unix.c contains the code associated with 'unix:<path>'. launch.c is the common code for launching, along with a few other APIs such as guestfs_add_drive_opts. This commit also reduces the number of headers to just those which are required.
* build: Rename most C files that contain underscore with dash.Richard W.M. Jones2012-07-191-10/+10
| | | | | | | This is just code motion. Some files cannot be renamed. Notably rpcgen input and output files must not contain dash characters, else rpcgen breaks.
* build: Rename src/virt.c to src/libvirtdomain.cRichard W.M. Jones2012-07-191-1/+1
| | | | | This file contains the code implementing guestfs_add_domain (for adding a libvirt domain) so this name is less confusing.
* build: Arrange libguestfs_la_SOURCES in order.Richard W.M. Jones2012-07-191-1/+1
|
* build: Change calls to podwrapper.sh to use $(PODWRAPPER).Richard W.M. Jones2012-07-161-1/+1
| | | | | This will allow us to easily change the location of this script in future.
* Remove "convenience header" "gettext.h" and use <libintl.h> instead.Richard W.M. Jones2012-05-011-1/+0
| | | | | | | | | | | | gettextize provides a local file called "gettext.h". Remove this and use <libintl.h> from glibc headers instead. Most of this change is mechanical: #include <libintl.h> in every C file which uses any gettext function. But also we remove the gettext.h file, and adjust the "_" macros. Note that this effectively removes the ./configure --disable-nls option, although we don't know if that ever worked.
* Move 'libguestfs.pc' (pkgconfig file) to src/ directory.Richard W.M. Jones2012-04-301-0/+6
| | | | Since it describes the C library, it's better in the src/ directory.
* New APIs: mount-local, mount-local-run, umount-local (FUSE support in the API).Richard W.M. Jones2012-03-291-1/+8
| | | | | | | | | | Add FUSE support directly to the API. Instead of needing to use the external 'guestmount' command, you can mount the libguestfs filesystem space on a local mountpoint using an API call from any language. Note that although mount-local-run is marked as Cancellable, the current implementation does not support it, but it would be relatively simple to add it.
* lib: Use -fvisibilty=hidden by default; only ABI symbols are now visible.Richard W.M. Jones2012-01-181-3/+5
| | | | http://gcc.gnu.org/wiki/Visibility
* Fix rpcgen post-processing for out-of-tree buildsHilko Bengen2011-12-061-1/+1
|
* libguestfs: Added gnulib includes from builddir, as suggested by the Gnulib ↵Hilko Bengen2011-12-011-1/+1
| | | | | | | | documentation Since some modules (`getopt', for example) may copy files into the build directory, `top_builddir/lib' is needed as well as `top_srcdir/lib'. -- GNU Gnulib manual, section 2.2 Initial import
* Update FSF address.Matthew Booth2011-11-081-1/+1
|
* out-of-tree build: fix building libraryHilko Bengen2011-08-151-3/+3
|
* out-of-tree build: fix documentation generationHilko Bengen2011-08-151-4/+4
|
* gnulib: Add all other libs when linking libguestfs.so.Richard W.M. Jones2011-08-051-2/+9
| | | | This updates the previous two commits.
* gnulib: Add $(LIB_CLOCK_GETTIME) when linking libguestfs.so.Richard W.M. Jones2011-08-051-1/+2
| | | | | We don't use this library (it is only used in the daemon), but we need to add this to make the linker happy.
* New API: inspect-get-icon returns the guest icon.Richard W.M. Jones2011-06-281-0/+1
| | | | | | | | | | This API returns the guest's favicon if found, else an icon representing the guest operating system. Currently supported by this patch: Fedora, RHEL and derivatives, Debian (but not Ubuntu), Windows XP, Windows 7. This also updates virt-inspector to include an <icon> element containing the icon in base64 encoding.
* Enable deprecation warnings on all C programs.Richard W.M. Jones2011-05-171-0/+1
|
* inspect: Abstract out db_dump code for listing RPM applications.Richard W.M. Jones2011-04-141-0/+1
| | | | | | | | | | | There are two changes here: (1) The code for listing RPM applications ran db_dump and parsed the output. We abstract out that parsing code into a separate reusable module (src/dbdump.c). (2) The old db_dump parsing code used db_dump -p (printable) format. Instead use db_dump -k (hex) format so we can read binary fields.
* inspect: Split code into separate files.Richard W.M. Jones2011-04-141-0/+5
| | | | | | | | | | | | | | | | | The src/inspect.c file had grown rather large -- 3,500 lines. Split it across several files according to function. This is just moving code. After the split the files are more evenly divided: 536 src/inspect_apps.c 766 src/inspect.c 537 src/inspect_fs.c 404 src/inspect_fs_cd.c 785 src/inspect_fs_unix.c 535 src/inspect_fs_windows.c 3563 total
* inspect: Move shared PCRE match functions to separate file.Richard W.M. Jones2011-04-131-0/+1
| | | | This is just moving code around.
* Compile rpcgen-generated files with -fno-strict-aliasingMatthew Booth2011-04-071-7/+4
| | | | | rpcgen generates source which can't be safely compiled with strict-aliasing enabled.
* New event API (RHBZ#664558).Richard W.M. Jones2011-03-151-0/+1
| | | | | | | | | | | | | This API allows more than one callback to be registered for each event, makes it possible to call the API from other languages, and allows [nearly all] log, debug and trace messages to be rerouted from stderr. An older version of this API was discussed on the mailing list here: https://www.redhat.com/archives/libguestfs/2010-December/msg00081.html https://www.redhat.com/archives/libguestfs/2011-January/msg00012.html This also updates guestfish to use the new API for its progress bars.
* build: Remove check for root.Richard W.M. Jones2010-12-091-11/+0
| | | | | | | With the new package building system, it is no longer dangerous to run 'configure', 'make' or 'make check' as root (although it is still not necessary and not advisable). In any case we don't need to check this.
* build: Centralize all POD manipulation in 'podwrapper.sh' script.Richard W.M. Jones2010-11-241-17/+14
|
* build: Missing backslash again.Maxim Koltsov2010-11-141-1/+1
|
* lib: Make <guestfs.h> be completely generated.Richard W.M. Jones2010-11-111-5/+2
| | | | | This removes the 'not-quite-separate' guestfs-actions.h and guestfs-structs.h files.
* Fix small typo in a comment in src/Makefile.am.Richard W.M. Jones2010-11-111-1/+1
|
* New API: add-domainRichard Jones2010-11-111-1/+6
| | | | | | | | | | | | | | | | | | | This new API allows you to add the disks from a libvirt domain. In guestfish you can use the 'domain' command to access the API, eg: ><fs> domain Fedora14 libvirturi:qemu:///system 1 The returned number is the number of disks that were added. Also here is a proposed (but commented out) low-level API which would allow you to add a domain from a virDomainPtr. However there are several problems with this API -- see discussion on the list: https://www.redhat.com/archives/libguestfs/2010-November/thread.html#00028