summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Version 1.8.4.1.8.4Richard W.M. Jones2011-03-2916-804/+823
|
* perl: Canonicalize /dev/vd* paths in old inspection code (RHBZ#691724).Richard W.M. Jones2011-03-291-0/+3
| | | | (cherry picked from commit 759f4369de965f46f4a93b3a75dada050f87e223)
* README: Note that getfacl, getfattr are optional dependencies.Richard W.M. Jones2011-03-291-0/+2
| | | | (cherry picked from commit d82d6f0633f63d4a884147b1e85851e96ff8f58d)
* fuse: Fix getxattr, listxattr calls and add a regression test (RHBZ#691389).Richard W.M. Jones2011-03-294-17/+67
| | | | | | | | | | | | | | | | | | | | | | The documentation for the getxattr and listxattr calls is not very clear and as a result we were always returning something different from that which the Linux kernel would usually return. This fixes these calls, at least far enough that both the 'getfattr' and 'getfacl' programs now work fine on FUSE-mounted filesystems. Note that SELinux attrs are *not* passed through. This appears to be a known bug between SELinux and FUSE. For more information see: http://www.spinics.net/lists/selinux/msg09460.html Cherry picked from commit 0d6fd9e1d2488841c912c5351086e536772837ef: - rebased on stable-1.8 branch - removed unintended hunk (which changed -m documentation in guestmount --help output) - removed parts of test-fuse.sh which will fail because there is no support for passing acl,user_xattr options in an extended -m option
* RHEL 5: Use mke4fs on RHEL 5 as replacement for mke2fs.Richard W.M. Jones2011-03-293-3/+10
| | | | (cherry picked from commit a0e3b2183733c7440ad017c4ffe361935672339b)
* mkfs: Force mke2fs to create a filesystem even on raw IDE device (RHBZ#690819).Richard W.M. Jones2011-03-293-3/+57
| | | | (cherry picked from commit 227bea6c7ef89b707fe2c01c4d0d0fb9081e8c04)
* Rename $tmpdir/sock to $tmpdir/guestfsd.sock.Richard W.M. Jones2011-03-292-6/+6
| | | | | | No functional change; this simply makes the purpose of the socket clearer. (cherry picked from commit 110bfe1fcc9964b82acf7df6d4d60774471f9157)
* fish: Add better quick help to --help output.Richard W.M. Jones2011-03-291-10/+10
| | | | (cherry picked from commit 0daf7e81a659bcdc1ce327151cc1207b124a35a1)
* fish: Add -w|--rw option to --help output.Richard W.M. Jones2011-03-291-1/+2
| | | | (cherry picked from commit c8faa5d0b0a17689d27bd33bc787ba0fe9a3f076)
* inspect: Don't fail for Windows guests with multiple disks (RHBZ#674130).Richard W.M. Jones2011-03-292-2/+15
| | | | | Cherry picked from commit d06fee159c14d4fe7654a02bae8849c4f82565f8 and backported to stable-1.8 branch.
* inspect: Simplify Windows root heuristic code.Richard W.M. Jones2011-03-291-12/+38
| | | | | | | Add special is_file_nocase and is_dir_nocase functions and remove the duplicate checks for files and directories with different cases. (cherry picked from commit 5776c145d411e5ae00072ecf422055f3d0bd29e2)
* Version 1.8.3.1.8.3Richard W.M. Jones2011-03-2118-242/+246
|
* guestfs(3): 'kernel' -> 'supermin appliance'.Richard W.M. Jones2011-03-211-4/+4
| | | | (cherry picked from commit 1541f3a564f8ff14c1a63298120e4dc618ea3274)
* guestfs(3): Indent line to keep code together.Richard W.M. Jones2011-03-211-1/+1
| | | | (cherry picked from commit cf6f380c544456ee3e84fd41a480ea4cab3d94dd)
* fish: Add all stamp-*.pod files to CLEANFILES.Richard W.M. Jones2011-03-211-1/+6
| | | | (cherry picked from commit c6310bd242ddaa7b0801df9da7e4fba7346dc53e)
* proto: Fix both-ends-cancel case.Richard W.M. Jones2011-03-219-13/+53
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | In the case where both ends cancel at the same time (eg. both ends realize there are errors before or during the transfer), previously we skipped sending back an error from the daemon, on the spurious basis that the library would not need it (the library is cancelling because of its own error). However this is wrong: we should always send back an error message from the daemon in order to preserve synchronization of the protocol. A simple test case is: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory libguestfs: error: unexpected procedure number (66/282) (Notice two things: there are errors at both ends, and the loss of synchronization). After applying this commit, the loss of synchronization does not occur and we just see the library error: $ guestfish -N fs -m /dev/sda1 upload nosuchfile / libguestfs: error: open: nosuchfile: No such file or directory The choice of displaying the library or the daemon error is fairly arbitrary in this case -- it would be valid to display either or even to combine them into one error. Displaying the library error only makes the code considerably simpler. This commit also (re-)enables a test for this case. Cherry picked and rebased from commit f4d996fd26762053d68f46de5790aae893f03d38.
* proto: Fix FileIn ops that abort during the chunk upload stage.Richard W.M. Jones2011-03-2112-48/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | As a previous, incorrect attempt to fix RHBZ#576879 we tried to prevent the daemon from sending an error reply if the daemon had cancelled the transfer. This is wrong: the daemon should send an error reply in these cases. A simple test case is this: guestfish -N fs -m /dev/sda1 upload big-file / (This fails because the target "/" is a directory, not a file.) Prior to this commit, libguestfs would hang instead of printing an error. With this commit, libguestfs prints an error. What is happening is: (1) Library is uploading a file (2) In the middle of the long upload, daemon detects an error. Daemon cancels. (3) Library detects cancel, sends cancel chunk, then waits for the error reply from the daemon. (4) Daemon is supposed to send an error reply message. Because step (4) wasn't happening, uploads that failed like this would hang in the library (waiting for the error message, while the daemon was waiting for the next request). This also adds a regression test. This temporarily breaks the "both ends cancel" case (RHBZ#576879c5). Therefore the test for that is disabled, and this is fixed in the next patch in the series. This partially reverts commit dc706a639eec16084c0618baf7bfde00c6565f63. Cherry picked and rebased from commit 33b638109ed66ea360b53b80b1f407b3a5f5ec39.
* proto: Don't drop outgoing message when daemon cancels (RHBZ#576879).Richard Jones2011-03-211-2/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is a (potential) fix for the long standing protocol bug which causes loss of synchronization when a FileIn action fails very early on the daemon side. The canonical example would be the 'upload' action failing immediately if no filesystem is mounted. What's supposed to happen is this: (1) library sends request message (2) daemon processes request first chunk of data and sees that it will fail, sends cancellation (3) discards chunks of data (4) library sees daemon cancellation and stops sending chunks It was going wrong in step (1), in guestfs___send_to_daemon. In some (timing related) circumstances, send_to_daemon could receive the cancellation before sending the first chunk, at which point it would exit, *discarding the first chunk*. This causes the daemon to fail in step (3) since it reads the next request as if it was a chunk, thus losing synchronization. (The protocol specifies that you always have to send at least one chunk if there is a FileIn or FileOut parameter). The patch changes guestfs___send_to_daemon so that if it detects cancellation, it sends the remaining data in its output buffer instead of discarding it. (This also fixes another edge case to do with sending partial data although I don't think we ever saw that in practice). (cherry picked from commit c7368ce167d6dbfd3e69ba208301c5af3f17a8a1)
* regressions: Enable both tests for bug 576879 (not fixed).Richard W.M. Jones2011-03-211-2/+2
| | | | (cherry picked from commit dc8e4b057ecd3984d7c27c8ece54048b6a06d662)
* haskell: Small fixes for ghc 7.Richard W.M. Jones2011-03-212-2/+2
| | | | (cherry picked from commit 502a98948c1bade2969758aff3db09869481105a)
* regressions: Rename the file we are uploading too.Richard W.M. Jones2011-03-211-1/+1
| | | | | This updates commit cbd8da6d4dd2e4cbc3b87fbc7cb7d6129eb69172. (cherry picked from commit e34fc32092e18b38282306558dcef66263a0fb10)
* regressions: Split the test rhbz576879.sh into two halves.Richard W.M. Jones2011-03-213-20/+36
| | | | | | | | We suspect that there are in fact two separate bugs. In any case it makes sense for the two tests to be done separately. Note that these tests still fail. (cherry picked from commit cbd8da6d4dd2e4cbc3b87fbc7cb7d6129eb69172)
* check the pid is > 0 before calling waitpid()Angus Salkeld2011-03-211-1/+1
| | | | | Signed-off-by: Angus Salkeld <asalkeld@redhat.com> (cherry picked from commit d1f1f74e5f45fa5b94ebb096fa65fa33ecc23d09)
* check the pid is > 0 before calling waitpid()Angus Salkeld2011-03-211-1/+1
| | | | | Signed-off-by: Angus Salkeld <asalkeld@redhat.com> (cherry picked from commit 6f7c1a9f9d76bdf9f112e12e1508531fb41abfb2)
* RHEL5: Old pod2man didn't have --stderr or -u options.Richard W.M. Jones2011-03-212-3/+26
| | | | (cherry picked from commit eb304e9689ca474834207605ed52c369bcdec6ea)
* configure: Remove unnecessary variable assignment.Richard W.M. Jones2011-03-211-1/+0
| | | | | Left over from pre-virtio-serial days. (cherry picked from commit 97eab125fa8e3dc481c1f1ba1a847cf43d537585)
* RHEL5: Make use of 'futimens' function optional.Richard W.M. Jones2011-03-212-1/+5
| | | | (cherry picked from commit 003fbdfe5d8b237f42f575199b742c8dde9b8a11)
* Version 1.8.2.1.8.2Richard W.M. Jones2011-03-0818-4735/+4930
|
* Detect Red Hat Desktop as 'rhel' distro (RHBZ#682979).Richard W.M. Jones2011-03-082-5/+5
| | | | | | | | | | | | | | /etc/redhat-release on Red Hat Desktop contains the following string: Red Hat Desktop release 4 (Nahant Update 8) Previously we matched against the string "Red Hat Enterprise Linux" but since this does not contain that string, this distro wasn't being detected correctly. Note this also changes the obsolete Perl code, for the benefit of virt-v2v. (cherry picked from commit c1a227a960066fb9552e0c225bc473be365b67b0)
* Include <locale.h> in compilation units that use setlocale function.Richard W.M. Jones2011-03-086-0/+6
| | | | | Fix required by gcc 4.6.0. (cherry picked from commit a9d6b948b590f58023a97dddd76302e40d49d2e2)
* generator: Introduce error code (errcode) concept.Richard W.M. Jones2011-03-0811-203/+308
| | | | | | | | | | | There was a lot of repeated code to map return types (eg. RErr) to error cases (eg. -1 or NULL). This commit introduces an error code type and two functions to map return types to error codes and error codes to strings. Cherry picked from commit 8037da06feea097716ce700f38c0eac0d5411a7c and rebased against stable 1.8 branch.
* debian: Rename nilfs2-tools to nilfs-tools.Richard W.M. Jones2011-03-081-1/+1
| | | | (cherry picked from commit 1c772c921186be34331c7610992f57a69d20d908)
* virt-make-fs: Round disk size to integer, fix for qemu-img 0.14.Richard W.M. Jones2011-03-081-0/+2
| | | | | | | | qemu-img used to allow you to specify a fractional image size in bytes (or at least, it used to ignore the part after the decimal place). In qemu-img 0.14 it no longer does this so we round down the size to a whole number of bytes. (cherry picked from commit eda9826d25336bcf661700270c580d4d62128750)
* virt-make-fs: In debug mode, print qemu-img command line.Richard W.M. Jones2011-03-081-0/+3
| | | | (cherry picked from commit 29b3ffdad5d6774f988fd0e25f9c8242e5dd577a)
* Fix inspection code when PCRE or hivex is missing.Richard W.M. Jones2011-03-081-0/+24
| | | | (cherry picked from commit 2b26c7f721fc8ed2e6f64963289981ac286c02aa)
* java: Add a test of g.list_filesystems (a function that returns a Map).Richard W.M. Jones2011-03-081-0/+10
| | | | (cherry picked from commit 21fef55ca4907aa9872754f20320c24c7f8a5fac)
* java: Fix generated functions that return RHashtable.Richard W.M. Jones2011-03-081-15/+30
| | | | | | | | | | Creating a HashMap directly from JNI is possible but very tedious (see: http://java.sun.com/docs/books/jni/html/fldmeth.html#26254) Instead we use the existing code to return hashes from JNI as plain String[], then add some code in the Java wrapper to convert these to HashMap<String,String>. (cherry picked from commit eb54a7ede43d9275f10db6fce1472256550da0eb)
* java: Return Map<String,String> for RHashtable functions.Richard W.M. Jones2011-03-081-1/+2
| | | | | | | | | There's no point returning the specific HashMap type here. Return the generic interface type instead. Note that no users are actually calling these functions yet, since at present they always fail. (cherry picked from commit 0b2e45da609002d44cbbf689cfdee252e6806648)
* java: Fix a minor whitespace error in generated code.Richard W.M. Jones2011-03-081-2/+2
| | | | | | In functions that don't have javadoc, the function prototype wasn't being indented correctly. (cherry picked from commit ec62f1127ec4f8609745f9d08b62c65e0ccbd154)
* java: Remove old test file if one was left around.Richard W.M. Jones2011-03-081-0/+4
| | | | | | | If a test.img file was left over from a previous run, then it would cause the subsequent test to fail. Therefore remove any old test.img file. (cherry picked from commit 80aad709954cc4a3a294200e242876599047cef8)
* java: Enable assertions when doing 'make check'.Richard W.M. Jones2011-03-081-2/+2
| | | | | | | | | | | | It turns out that Java assertions are disabled by default. You have to add the 'java -ea' flag to the JVM. Who knew ..? Because of this oversight, the tests weren't actually performing the assertions that we wanted (although in fact none of the assertions were failing). This change enables assertions when running the tests. (cherry picked from commit db98ac041ec36c4e2ce322d336f5792fa8e6922d)
* daemon: Ignore return value from chdir.Richard W.M. Jones2011-03-081-1/+1
| | | | | This updates commit 7eb012f3710bb554d5fc2c4229036901b0b5ad90. (cherry picked from commit 8d7d7c4ecfd202e04d18736718e9c5bb125ce4f0)
* daemon: change to root directoryRichard W.M. Jones2011-03-081-0/+2
| | | | | Ensure the daemon always starts with current directory == root. (cherry picked from commit 7eb012f3710bb554d5fc2c4229036901b0b5ad90)
* lib: Move appliance launching to separate function.Richard W.M. Jones2011-03-081-14/+24
| | | | | This is just code motion. (cherry picked from commit 99f0d8859fdc8f6c81873d4cdd1c8c780ac25e84)
* php: Ignore another generated file in php/extension directory.Richard W.M. Jones2011-03-081-0/+1
| | | | (cherry picked from commit 5ae752559284efd925fb7959c5760d4fee25f1d6)
* virt-make-fs: Fix typo in man page.Richard W.M. Jones2011-03-081-1/+1
| | | | (cherry picked from commit 0089575d4bd50a7ca55d7c3c8caa8a12ae09d40a)
* perl: Ignore internal_* functions in POD coverage test.Richard W.M. Jones2011-03-081-1/+2
| | | | | This updates commit 1d999540bddd7aea7c2d0fef8b15223d4acc645f. (cherry picked from commit 6975e87153f593fddd5c27435c2e6347825daca9)
* lib: Fix use-after-free bug in XPath parsing code.Richard W.M. Jones2011-03-081-1/+1
| | | | (cherry picked from commit 82f5fdb0dbbc0c7b04861edeadf70c86c9342df2)
* daemon: Add perror to two exit paths to make errors clearer.Richard W.M. Jones2011-03-081-1/+4
| | | | (cherry picked from commit e85fbee7bff9422a370d3f437594d262c043d89b)
* debian: Include actual shared libraries in python-guestfs package.Richard W.M. Jones2011-03-081-1/+1
| | | | (cherry picked from commit 8a406c7bee521289c6f8704549f1f144b5bbbbd9)