summaryrefslogtreecommitdiffstats
path: root/daemon/Makefile.am
Commit message (Collapse)AuthorAgeFilesLines
* daemon/Win32: use gnulib modules connect, socket and symlinkat (for readlinkat).Richard Jones2009-11-261-1/+8
|
* daemon/Win32: provide htonl, htons, ntohl, ntohs functions.Richard Jones2009-11-261-0/+1
| | | | These functions are not available on Windows.
* daemon: Link guestfs_protocol.[ch] into the daemon directory.Richard Jones2009-11-261-5/+24
| | | | | | | | | | | Instead of doing a recursive call into the src/ directory to build the object files, hard link the source files into the daemon directory and build them separately. See: http://www.redhat.com/archives/libguestfs/2009-November/msg00254.html Thanks to Jim Meyering for noticing a typo in the original version.
* daemon: Typo generator_build -> generator_builtRichard Jones2009-11-261-1/+1
|
* daemon: Fix build on Unix.Richard Jones2009-11-251-1/+3
|
* daemon: Move statvfs code into separate file.Richard Jones2009-11-251-0/+1
| | | | | | This makes no functional change to the code. It just moves the statvfs-related code out of daemon/stat.c into a new file called daemon/statvfs.c.
* Implement 'dd' command.Richard Jones2009-11-231-0/+1
|
* build: Don't re-check generator.ml for each generator_built in daemon directoryMatthew Booth2009-11-211-1/+2
|
* availability: Add optional groups and implement guestfs_available call.Richard Jones2009-11-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current groups are defined very conservatively using the following criteria: (a) Would be impossible to implement on Windows because of sheer architectural differences (eg: mknod). (b) Already optional (augeas, inotify). (c) Not currently optional but not implemented on older RHEL and Debian releases (ntfs-3g.probe, scrub, zerofree). The optional groups I've defined according to these criteria are: . augeas . inotify . linuxfsuuid . linuxmodules . linuxxattrs . lvm2 . mknod . ntfs3g . scrub . selinux . zerofree (Note that these choices don't prevent us from adding more optional groups in future. On the other hand to avoid breaking ABIs we would not wish to change the above groups). The rest of this large commit is really just implementation: Each optional function is classified using Optional "group" flag in the generator. The daemon has to implement a function int optgroup_<name>_available (void); for each optional group. Some of these functions are fixed at compile time, and some do simple run-time tests. The do_available implementation in the daemon looks up the correct function in a table and runs it. We document the optional groups in the guestfs(3) man page. Also: I added a NOT_AVAILABLE macro in order to unify all the existing places where we had a message equivalent to "function __func__ is not available".
* availability: Add guestfs_available.Richard Jones2009-11-201-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Start a new API allowing groups of functions to be tested for availability. There are two reasons for this: (1) If libguestfs is built with missing dependencies (eg. no Augeas lib) then the corresponding functions are disabled in the appliance. Up till now there has been no way to test for this except to speculatively issue commands and check for errors. (2) When we port the daemon to Win32 it is likely that major pieces of functionality won't be available (eg. LVM support). This API gives a way to test for that. There is no change for existing clients: you still have to check for errors from individual API calls. For new clients, you will be able to test for availability of particular APIs. Usage scenario (A): An LVM editing tool which requires both the LVM API and inotify in order to function at all: char *apis[] = { "inotify", "lvm2", NULL }; r = guestfs_available (g, apis); if (r == -1) { /* print an error and exit */ } Usage scenario (B): A general purpose tool which optionally provides configuration file editing, but this can be disabled, the result merely being reduced functionality: char *apis[] = { "augeas", NULL }; r = guestfs_available (g, apis); enable_config_edit_menus = r == 0;
* build: Fix inter-directory dependenciesMatthew Booth2009-11-191-5/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds an explicit dependency on generator.ml for every file it generates, except java files. Java is left for another time because it's considerably trickier. It also adds a build rule for src/libguestfs.la so it can be rebuilt as required from other directories. It does this by creating a top level make file, subdir-rules.mk, which can be included from sub-directories. sub-directories need to define 'generator_built' to include local files which are built by generator.ml, and they will be updated automatically. This fixes parallel make, and will automatically re-create generated files when make is run from any directory. It also fixes the problem which efad4f53 was targetting. Specifically, src/guestfs_protocol.(c|h) had an erroneous dependency on stamp-generator, and therefore generator.ml, despite not being directly created by it. This caused them to be recreated every time generator.ml ran rather than only when src/guestfs_protocol.x was updated, which cascaded into a daemon and therefore appliance update. This patch also changes the contents of the distribution tarball by including files created by rpcgen.
* New API call: fill - fill a file with octetsRichard Jones2009-11-171-0/+1
|
* Generic partition creation interface.Richard Jones2009-11-101-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This commit introduces a generic partition creation interface which should be future-proof and extensible, and partially replaces the old sfdisk-based interface. The implementation is based on parted but is hopefully not too dependent on the particulars of parted. The following new calls are introduced: guestfs_part_init: Initialize a disk with a partition table. Unlike the sfdisk- based interface, we also support GPT and other partition types, which is essential to scale to devices larger than 2TB. guestfs_part_add: Add a partition to an existing disk. guestfs_part_disk: Convenience function which combines part_init & part_add, creating a single partition that covers the whole disk. guestfs_part_set_bootable: guestfs_part_set_name: Set various aspects of existing partitions. guestfs_part_list: List partitions on a device. This returns a programming-friendly list of partition structs (in contrast to sfdisk-l which cannot be parsed). guestfs_part_get_parttype: Return the partition table type, eg. "msdos" or "gpt". The following calls are planned, but not added currently: guestfs_part_get_bootable guestfs_part_get_name guestfs_part_set_type guestfs_part_get_type
* New API calls: truncate, truncate_size, mkdir_mode, utimens, lchown.Richard Jones2009-11-021-0/+2
| | | | | | | | | | | | | | | truncate, truncate_size: Used to truncate files to a particular size, or to zero bytes. mkdir_mode: Like mkdir but allows you to also specify the initial permissions for the new directory. utimens: Set timestamp on a file with nanosecond accuracy. lchown: Corresponding to lchown(2) syscall (we already have chown). The implementation is complicated by the fact that we had to add an Int64 parameter type to the generator.
* New API: vfs_type - get the Linux VFS driver for a mounted device.Richard Jones2009-10-261-0/+1
|
* Add echo_daemon commandMatthew Booth2009-09-141-0/+1
| | | | | echo_daemon is a simple echo which can be used to test connectivity between the client and daemon.
* New 'modprobe' command.Matthew Booth2009-08-181-0/+1
| | | | Allow kernel modules to be loaded into the appliance.
* daemon: enable -Werror and many gcc warnings when --enable-gcc-warningsJim Meyering2009-08-171-1/+2
| | | | | | | | | | * daemon/m4/gnulib-cache.m4: Add two modules: manywarnings, warnings. * daemon/configure.ac: Implement --enable-gcc-warnings, and selectively disable a few warning options that are either not useful or that provoke too many warnings for now. Define and AC_SUBST WARN_CFLAGS and WERROR_CFLAGS. * daemon/Makefile.am (guestfsd_CFLAGS): Use $(WARN_CFLAGS) and $(WERROR_CFLAGS), rather than just -Wall.
* New commands: mkfs-b, mke2journal*, mke2fs-J*Richard W.M. Jones2009-08-151-0/+1
| | | | | | | | | | mkfs-b: Pass the -b (blocksize) parameter to mkfs. mke2journal and friends: Lets you create external ext2 journals on devices. mke2fs-J and friends: Lets you create ext2/3/4 filesystems with external journals.
* Add 'setcon', 'getcon' commands to set and get the SELinux context.Richard Jones2009-08-131-0/+1
|
* daemon: use gnulibJim Meyering2009-08-061-0/+4
| | | | | | | | | | | | | | | | | * daemon/Makefile.am (SUBDIRS): Define. (AM_CPPFLAGS): Define, to include from gnulib's lib/ (LDADD): Define, to link with gnulib's libgnu.a. * daemon/configure.ac: Use AC_CONFIG_AUX_DIR([build-aux]), gl_EARLY and gl_INIT. (AC_CONFIG_FILES): Add lib/Makefile and tests/Makefile * daemon/m4/gnulib-cache.m4: New file, generated by running ../.gnulib/gnulib-tool --import --with-tests hash * daemon/.gitignore: Ignore all of the imported files. build: tell bootstrap about daemon/ * bootstrap: Run gnulib-tool --update in daemon/. Remove bootstrap's --gnulib-srcdir option, because it probably didn't work, and even if it did, we've discovered that using a separate git repo like that can lead to subtle mix-ups.
* Add interface to Linux 'inotify' API.Richard W.M. Jones2009-07-311-0/+1
|
* New command: 'fallocate' to (pre-)allocate sized files.Richard W.M. Jones2009-07-311-0/+1
|
* New commands: 'ln', 'ln-f', 'ln-s', 'ln-sf' and 'readlink'.Richard W.M. Jones2009-07-311-0/+1
| | | | | These commands can be used to make hard and symbolic links. The readlink command is used to read existing symbolic links.
* Add 'realpath' command.Richard W.M. Jones2009-07-311-0/+1
|
* Implement '*grep*' family of commands.Richard Jones2009-07-291-0/+1
|
* Support for Linux extended attributes.Richard W.M. Jones2009-07-141-0/+1
| | | | | | | | | | | | | | | | This commit adds six calls to support Linux extended attributes. They are: getxattrs list all extended attributes for a file or directory setxattr add/replace an extended attribute removexattr remove an extended attribute lgetxattrs \ lsetxattr (same as above, but operate on symbolic links) lremovexattr / See attr(5) for more information. This also adds support for the FBuffer field type, which maps to an XDR opaque<> or a C (int, char *) pair.
* Make it possible to build in a separate directoryMatthew Booth2009-07-031-2/+2
| | | | | | | | | | | | | | | | | | | | | | This patch allows you to do: mkdir build cd build ../configure ... make This will output all generated files to the build directory. Given that autogen automatically runs configure, you can also do: BUILDDIR=./build ./autogen.sh which will do the right thing. Also: * Fix a dependency bug which means that guestfs_protocol.h isn't automatically rebuilt. * Re-running autogen.sh with no arguments won't blow away your previous configure arguments.
* Add list of function_names to the daemon.Richard W.M. Jones2009-07-021-0/+1
| | | | | Messages which include the proc_nr can now also include the name of the actual function being called.
* Add 'readdir' call.Richard W.M. Jones2009-07-021-0/+1
| | | | | | | | | | | | This adds a readdir call (mostly intended for programs). The return value is a list of guestfs_dirent structures. This adds the new types 'struct guestfs_dirent' and 'struct guestfs_dirent_list', along with all the code to return these in the different language bindings. Also includes additional tests for OCaml and Perl bindings to test this.
* New commands: mknod, mkfifo, mknod_b, mknod_c and umask.Richard W.M. Jones2009-06-301-0/+2
| | | | | | | | | | These commands are used to create block and char device nodes or FIFOs (named pipes) in the filesystem. The umask command is required also because the permissions used by mknod are masked by the umask. Also document and guarantee that the umask starts as 022.
* Implement 'mkswap', 'mkswap_L' and 'mkswap_U' commands.Richard W.M. Jones2009-06-291-0/+1
| | | | | | These commands are used to make Linux swap devices. The mkswap_L command makes one with a label. The mkswap_U command makes one with a known UUID.
* Add 'initrd-list' command to list contents of initrd images.Richard W.M. Jones2009-06-291-0/+1
| | | | | | Add 'initrd-list' command to list the files inside (new-style) initrd images. Update virt-inspector to use this instead of the less efficient download/unpack locally method.
* Added 'du' command.Richard W.M. Jones2009-06-291-0/+1
| | | | This command estimates file usage for files and directories.
* Add 'df' and 'df-h' commands.Richard W.M. Jones2009-06-291-0/+1
| | | | | | | df and df-h commands can be used interactively to show disk space usage. Use existing statvfs command from programs.
* Implement "head", "head-n", "tail", "tail-n" commands.Richard W.M. Jones2009-06-291-0/+1
| | | | | These commands let you view parts of a large file without passing the whole file over the network connection.
* Implementation of 'wc_c', 'wc_w' and 'wc_l' commands.Richard W.M. Jones2009-06-291-0/+1
| | | | These commands count characters, words and lines in a file respectively.
* Added 'scrub-*' commands for securely scrubbing filesystems.Richard W.M. Jones2009-06-231-0/+1
|
* Add 'glob-expand' command.Richard Jones2009-06-221-0/+1
|
* Add 'ntfs_3g_probe' command so we can probe the "mountability" of an NTFS ↵Richard Jones2009-06-081-0/+1
| | | | partition.
* Added 'sleep' command.Richard Jones2009-06-041-0/+1
|
* Added 'find' command.Richard Jones2009-05-191-0/+1
|
* Add: pvresize, sfdisk-N, sfdisk-l, sfdisk-kernel-geomtry, ↵Richard W.M. Jones2009-05-151-0/+1
| | | | sfdisk-disk-geometry commands. Pass --no-reread flag to sfdisk.
* Add support for zerofree command.Richard W.M. Jones2009-05-141-0/+1
|
* Implement 'strings' and 'hexdump' commands.Richard Jones2009-05-081-0/+2
|
* Added 'equal' command to compare files.Richard W.M. Jones2009-05-011-0/+1
|
* Added ping-daemon command.Richard W.M. Jones2009-05-011-0/+1
|
* Added dmesg command.Richard W.M. Jones2009-05-011-0/+1
|
* Added drop-caches command.Richard W.M. Jones2009-05-011-0/+1
|
* Add cp, cp-a and mv commands.Richard W.M. Jones2009-05-011-0/+1
|