diff --git a/libguestfs-1.0.79-no-fuse-test.patch b/libguestfs-1.0.79-no-fuse-test.patch deleted file mode 100644 index b972f9d..0000000 --- a/libguestfs-1.0.79-no-fuse-test.patch +++ /dev/null @@ -1,31 +0,0 @@ -diff -ur libguestfs-1.0.79.orig/fuse/Makefile.am libguestfs-1.0.79/fuse/Makefile.am ---- libguestfs-1.0.79.orig/fuse/Makefile.am 2009-11-18 13:30:50.000000000 +0000 -+++ libguestfs-1.0.79/fuse/Makefile.am 2009-11-18 17:26:41.842299061 +0000 -@@ -64,8 +64,8 @@ - - # Tests. - --TESTS = test-fuse.sh --TESTS_ENVIRONMENT = \ -- top_builddir=.. -+#TESTS = test-fuse.sh -+#TESTS_ENVIRONMENT = \ -+# top_builddir=.. - - endif -diff -ur libguestfs-1.0.79.orig/fuse/Makefile.in libguestfs-1.0.79/fuse/Makefile.in ---- libguestfs-1.0.79.orig/fuse/Makefile.in 2009-11-18 13:30:57.000000000 +0000 -+++ libguestfs-1.0.79/fuse/Makefile.in 2009-11-18 17:26:51.213184201 +0000 -@@ -770,9 +770,9 @@ - - - # Tests. --@HAVE_FUSE_TRUE@TESTS = test-fuse.sh --@HAVE_FUSE_TRUE@TESTS_ENVIRONMENT = \ --@HAVE_FUSE_TRUE@ top_builddir=.. -+#@HAVE_FUSE_TRUE@TESTS = test-fuse.sh -+#@HAVE_FUSE_TRUE@TESTS_ENVIRONMENT = \ -+#@HAVE_FUSE_TRUE@ top_builddir=.. - - all: all-am - diff --git a/libguestfs-1.2.14-aug-clear-full.patch b/libguestfs-1.2.14-aug-clear-full.patch deleted file mode 100644 index a16c494..0000000 --- a/libguestfs-1.2.14-aug-clear-full.patch +++ /dev/null @@ -1,694 +0,0 @@ -diff -urN libguestfs-1.2.14/capitests/tests.c libguestfs-1.2.14.aug-clear/capitests/tests.c ---- libguestfs-1.2.14/capitests/tests.c 2010-10-23 13:13:14.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/capitests/tests.c 2010-10-23 14:51:24.022775717 +0100 -@@ -177,6 +177,7 @@ - fprintf (stderr, "warning: \"guestfs_lvuuid\" has no tests\n"); - fprintf (stderr, "warning: \"guestfs_vgpvuuids\" has no tests\n"); - fprintf (stderr, "warning: \"guestfs_vglvuuids\" has no tests\n"); -+ fprintf (stderr, "warning: \"guestfs_aug_clear\" has no tests\n"); - } - - static int test_part_get_mbr_id_0_skip (void) -diff -urN libguestfs-1.2.14/daemon/actions.h libguestfs-1.2.14.aug-clear/daemon/actions.h ---- libguestfs-1.2.14/daemon/actions.h 2010-09-16 17:15:35.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/daemon/actions.h 2010-10-23 14:51:24.024775830 +0100 -@@ -253,3 +253,4 @@ - extern int do_part_get_bootable (const char *device, int partnum); - extern int do_part_get_mbr_id (const char *device, int partnum); - extern int do_part_set_mbr_id (const char *device, int partnum, int idbyte); -+extern int do_aug_clear (const char *augpath); -diff -urN libguestfs-1.2.14/daemon/augeas.c libguestfs-1.2.14.aug-clear/daemon/augeas.c ---- libguestfs-1.2.14/daemon/augeas.c 2010-09-16 17:15:33.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/daemon/augeas.c 2010-10-23 14:51:24.052777407 +0100 -@@ -210,6 +210,26 @@ - } - - int -+do_aug_clear (const char *path) -+{ -+#ifdef HAVE_AUGEAS -+ int r; -+ -+ NEED_AUG (-1); -+ -+ r = aug_set (aug, path, NULL); -+ if (r == -1) { -+ reply_with_error ("Augeas clear failed"); -+ return -1; -+ } -+ -+ return 0; -+#else -+ NOT_AVAILABLE (-1); -+#endif -+} -+ -+int - do_aug_insert (const char *path, const char *label, int before) - { - #ifdef HAVE_AUGEAS -diff -urN libguestfs-1.2.14/daemon/names.c libguestfs-1.2.14.aug-clear/daemon/names.c ---- libguestfs-1.2.14/daemon/names.c 2010-09-16 17:15:33.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/daemon/names.c 2010-10-23 14:51:24.083779149 +0100 -@@ -257,4 +257,5 @@ - [234] = "part_get_bootable", - [235] = "part_get_mbr_id", - [236] = "part_set_mbr_id", -+ [239] = "aug_clear", - }; -diff -urN libguestfs-1.2.14/daemon/stubs.c libguestfs-1.2.14.aug-clear/daemon/stubs.c ---- libguestfs-1.2.14/daemon/stubs.c 2010-09-16 17:15:27.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/daemon/stubs.c 2010-10-23 14:51:24.086779318 +0100 -@@ -6045,6 +6045,29 @@ - xdr_free ((xdrproc_t) xdr_guestfs_part_set_mbr_id_args, (char *) &args); - } - -+static void aug_clear_stub (XDR *xdr_in) -+{ -+ int r; -+ struct guestfs_aug_clear_args args; -+ -+ memset (&args, 0, sizeof args); -+ -+ if (!xdr_guestfs_aug_clear_args (xdr_in, &args)) { -+ reply_with_error ("daemon failed to decode procedure arguments"); -+ return; -+ } -+ char *augpath = args.augpath; -+ -+ r = do_aug_clear (augpath); -+ if (r == -1) -+ /* do_aug_clear has already called reply_with_error */ -+ goto done; -+ -+ reply (NULL, NULL); -+done: -+ xdr_free ((xdrproc_t) xdr_guestfs_aug_clear_args, (char *) &args); -+} -+ - void dispatch_incoming_message (XDR *xdr_in) - { - switch (proc_nr) { -@@ -6741,6 +6764,9 @@ - case GUESTFS_PROC_PART_SET_MBR_ID: - part_set_mbr_id_stub (xdr_in); - break; -+ case GUESTFS_PROC_AUG_CLEAR: -+ aug_clear_stub (xdr_in); -+ break; - default: - reply_with_error ("dispatch_incoming_message: unknown procedure number %d, set LIBGUESTFS_PATH to point to the matching libguestfs appliance directory", proc_nr); - } -diff -urN libguestfs-1.2.14/fish/cmds.c libguestfs-1.2.14.aug-clear/fish/cmds.c ---- libguestfs-1.2.14/fish/cmds.c 2010-10-23 12:44:26.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/fish/cmds.c 2010-10-23 14:52:16.053701745 +0100 -@@ -42,6 +42,7 @@ - printf ("%-20s %s\n", "add-drive-ro", _("add a drive in snapshot mode (read-only)")); - printf ("%-20s %s\n", "add-drive-ro-with-if", _("add a drive read-only specifying the QEMU block emulation to use")); - printf ("%-20s %s\n", "add-drive-with-if", _("add a drive specifying the QEMU block emulation to use")); -+ printf ("%-20s %s\n", "aug-clear", _("clear Augeas path")); - printf ("%-20s %s\n", "aug-close", _("close the current Augeas handle")); - printf ("%-20s %s\n", "aug-defnode", _("define an Augeas node")); - printf ("%-20s %s\n", "aug-defvar", _("define an Augeas variable")); -@@ -584,7 +585,7 @@ - } - else - if (STRCASEEQ (cmd, "aug_set") || STRCASEEQ (cmd, "aug-set")) { -- pod2text ("aug-set", _("set Augeas path to value"), "=head1 SYNOPSIS\n\n aug-set augpath val\n\n=head1 DESCRIPTION\n\nSet the value associated with C to C."); -+ pod2text ("aug-set", _("set Augeas path to value"), "=head1 SYNOPSIS\n\n aug-set augpath val\n\n=head1 DESCRIPTION\n\nSet the value associated with C to C.\n\nIn the Augeas API, it is possible to clear a node by setting\nthe value to NULL. Due to an oversight in the libguestfs API\nyou cannot do that with this call. Instead you must use the\nC call."); - return 0; - } - else -@@ -1638,6 +1639,11 @@ - return 0; - } - else -+ if (STRCASEEQ (cmd, "aug_clear") || STRCASEEQ (cmd, "aug-clear")) { -+ pod2text ("aug-clear", _("clear Augeas path"), "=head1 SYNOPSIS\n\n aug-clear augpath\n\n=head1 DESCRIPTION\n\nSet the value associated with C to C. This\nis the same as the L C command."); -+ return 0; -+ } -+ else - return display_builtin_command (cmd); - } - -@@ -7572,6 +7578,20 @@ - return r; - } - -+static int run_aug_clear (const char *cmd, size_t argc, char *argv[]) -+{ -+ int r; -+ const char *augpath; -+ if (argc != 1) { -+ fprintf (stderr, _("%s should have %d parameter(s)\n"), cmd, 1); -+ fprintf (stderr, _("type 'help %s' for help on %s\n"), cmd, cmd); -+ return -1; -+ } -+ augpath = argv[0]; -+ r = guestfs_aug_clear (g, augpath); -+ return r; -+} -+ - int run_action (const char *cmd, size_t argc, char *argv[]) - { - if (STRCASEEQ (cmd, "launch") || STRCASEEQ (cmd, "run")) -@@ -8372,6 +8392,9 @@ - if (STRCASEEQ (cmd, "part_set_mbr_id") || STRCASEEQ (cmd, "part-set-mbr-id")) - return run_part_set_mbr_id (cmd, argc, argv); - else -+ if (STRCASEEQ (cmd, "aug_clear") || STRCASEEQ (cmd, "aug-clear")) -+ return run_aug_clear (cmd, argc, argv); -+ else - { - fprintf (stderr, _("%s: unknown command\n"), cmd); - if (command_num == 1) -diff -urN libguestfs-1.2.14/fish/completion.c libguestfs-1.2.14.aug-clear/fish/completion.c ---- libguestfs-1.2.14/fish/completion.c 2010-09-16 17:17:37.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/fish/completion.c 2010-10-23 14:51:24.093779709 +0100 -@@ -319,6 +319,7 @@ - "part-get-bootable", - "part-get-mbr-id", - "part-set-mbr-id", -+ "aug-clear", - NULL - }; - -diff -urN libguestfs-1.2.14/fish/guestfish-actions.pod libguestfs-1.2.14.aug-clear/fish/guestfish-actions.pod ---- libguestfs-1.2.14/fish/guestfish-actions.pod 2010-10-23 12:44:26.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/fish/guestfish-actions.pod 2010-10-23 14:51:24.094779765 +0100 -@@ -96,6 +96,13 @@ - This is the same as L but it allows you - to specify the QEMU interface emulation to use at run time. - -+=head2 aug-clear -+ -+ aug-clear augpath -+ -+Set the value associated with C to C. This -+is the same as the L C command. -+ - =head2 aug-close - - aug-close -@@ -255,6 +262,11 @@ - - Set the value associated with C to C. - -+In the Augeas API, it is possible to clear a node by setting -+the value to NULL. Due to an oversight in the libguestfs API -+you cannot do that with this call. Instead you must use the -+C call. -+ - =head2 available - - available 'groups ...' -diff -urN libguestfs-1.2.14/haskell/Guestfs.hs libguestfs-1.2.14.aug-clear/haskell/Guestfs.hs ---- libguestfs-1.2.14/haskell/Guestfs.hs 2010-09-16 17:16:44.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/haskell/Guestfs.hs 2010-10-23 14:51:24.095779823 +0100 -@@ -191,7 +191,8 @@ - copy_size, - part_del, - part_get_mbr_id, -- part_set_mbr_id -+ part_set_mbr_id, -+ aug_clear - ) where - - -- Unfortunately some symbols duplicate ones already present -@@ -2252,3 +2253,15 @@ - fail err - else return () - -+foreign import ccall unsafe "guestfs_aug_clear" c_aug_clear -+ :: GuestfsP -> CString -> IO (CInt) -+ -+aug_clear :: GuestfsH -> String -> IO () -+aug_clear h augpath = do -+ r <- withCString augpath $ \augpath -> withForeignPtr h (\p -> c_aug_clear p augpath) -+ if (r == -1) -+ then do -+ err <- last_error h -+ fail err -+ else return () -+ -diff -urN libguestfs-1.2.14/java/com/redhat/et/libguestfs/GuestFS.java libguestfs-1.2.14.aug-clear/java/com/redhat/et/libguestfs/GuestFS.java ---- libguestfs-1.2.14/java/com/redhat/et/libguestfs/GuestFS.java 2010-10-23 12:44:26.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/java/com/redhat/et/libguestfs/GuestFS.java 2010-10-23 14:51:24.099780049 +0100 -@@ -1655,6 +1655,11 @@ - *

- * Set the value associated with "path" to "value". - *

-+ * In the Augeas API, it is possible to clear a node by -+ * setting the value to NULL. Due to an oversight in the -+ * libguestfs API you cannot do that with this call. -+ * Instead you must use the "g.aug_clear" call. -+ *

- * @throws LibGuestFSException - */ - public void aug_set (String augpath, String val) -@@ -6619,4 +6624,22 @@ - private native void _part_set_mbr_id (long g, String device, int partnum, int idbyte) - throws LibGuestFSException; - -+ /** -+ * clear Augeas path -+ *

-+ * Set the value associated with "path" to "NULL". This is -+ * the same as the augtool(1) "clear" command. -+ *

-+ * @throws LibGuestFSException -+ */ -+ public void aug_clear (String augpath) -+ throws LibGuestFSException -+ { -+ if (g == 0) -+ throw new LibGuestFSException ("aug_clear: handle is closed"); -+ _aug_clear (g, augpath); -+ } -+ private native void _aug_clear (long g, String augpath) -+ throws LibGuestFSException; -+ - } -diff -urN libguestfs-1.2.14/java/com_redhat_et_libguestfs_GuestFS.c libguestfs-1.2.14.aug-clear/java/com_redhat_et_libguestfs_GuestFS.c ---- libguestfs-1.2.14/java/com_redhat_et_libguestfs_GuestFS.c 2010-09-16 17:17:36.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/java/com_redhat_et_libguestfs_GuestFS.c 2010-10-23 14:51:24.103780275 +0100 -@@ -6784,3 +6784,20 @@ - } - } - -+JNIEXPORT void JNICALL -+Java_com_redhat_et_libguestfs_GuestFS__1aug_1clear -+ (JNIEnv *env, jobject obj, jlong jg, jstring jaugpath) -+{ -+ guestfs_h *g = (guestfs_h *) (long) jg; -+ int r; -+ const char *augpath; -+ -+ augpath = (*env)->GetStringUTFChars (env, jaugpath, NULL); -+ r = guestfs_aug_clear (g, augpath); -+ (*env)->ReleaseStringUTFChars (env, jaugpath, augpath); -+ if (r == -1) { -+ throw_exception (env, guestfs_last_error (g)); -+ return ; -+ } -+} -+ -diff -urN libguestfs-1.2.14/ocaml/guestfs_c_actions.c libguestfs-1.2.14.aug-clear/ocaml/guestfs_c_actions.c ---- libguestfs-1.2.14/ocaml/guestfs_c_actions.c 2010-10-23 13:00:32.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/ocaml/guestfs_c_actions.c 2010-10-23 14:51:24.106780441 +0100 -@@ -683,6 +683,36 @@ - } - - /* Automatically generated wrapper for function -+ * val aug_clear : t -> string -> unit -+ */ -+ -+/* Emit prototype to appease gcc's -Wmissing-prototypes. */ -+CAMLprim value ocaml_guestfs_aug_clear (value gv, value augpathv); -+ -+CAMLprim value -+ocaml_guestfs_aug_clear (value gv, value augpathv) -+{ -+ CAMLparam2 (gv, augpathv); -+ CAMLlocal1 (rv); -+ -+ guestfs_h *g = Guestfs_val (gv); -+ if (g == NULL) -+ ocaml_guestfs_raise_closed ("aug_clear"); -+ -+ const char *augpath = String_val (augpathv); -+ int r; -+ -+ caml_enter_blocking_section (); -+ r = guestfs_aug_clear (g, augpath); -+ caml_leave_blocking_section (); -+ if (r == -1) -+ ocaml_guestfs_raise_error (g, "aug_clear"); -+ -+ rv = Val_unit; -+ CAMLreturn (rv); -+} -+ -+/* Automatically generated wrapper for function - * val aug_close : t -> unit - */ - -diff -urN libguestfs-1.2.14/ocaml/guestfs.ml libguestfs-1.2.14.aug-clear/ocaml/guestfs.ml ---- libguestfs-1.2.14/ocaml/guestfs.ml 2010-09-16 17:16:43.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/ocaml/guestfs.ml 2010-10-23 14:51:24.108780554 +0100 -@@ -163,6 +163,7 @@ - external add_drive_ro : t -> string -> unit = "ocaml_guestfs_add_drive_ro" - external add_drive_ro_with_if : t -> string -> string -> unit = "ocaml_guestfs_add_drive_ro_with_if" - external add_drive_with_if : t -> string -> string -> unit = "ocaml_guestfs_add_drive_with_if" -+external aug_clear : t -> string -> unit = "ocaml_guestfs_aug_clear" - external aug_close : t -> unit = "ocaml_guestfs_aug_close" - external aug_defnode : t -> string -> string -> string -> int_bool = "ocaml_guestfs_aug_defnode" - external aug_defvar : t -> string -> string option -> int = "ocaml_guestfs_aug_defvar" -diff -urN libguestfs-1.2.14/ocaml/guestfs.mli libguestfs-1.2.14.aug-clear/ocaml/guestfs.mli ---- libguestfs-1.2.14/ocaml/guestfs.mli 2010-10-23 12:44:26.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/ocaml/guestfs.mli 2010-10-23 14:51:24.109780612 +0100 -@@ -186,6 +186,9 @@ - val add_drive_with_if : t -> string -> string -> unit - (** add a drive specifying the QEMU block emulation to use *) - -+val aug_clear : t -> string -> unit -+(** clear Augeas path *) -+ - val aug_close : t -> unit - (** close the current Augeas handle *) - -diff -urN libguestfs-1.2.14/perl/Guestfs.xs libguestfs-1.2.14.aug-clear/perl/Guestfs.xs ---- libguestfs-1.2.14/perl/Guestfs.xs 2010-10-23 13:13:14.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/perl/Guestfs.xs 2010-10-23 14:51:24.111780725 +0100 -@@ -4382,3 +4382,14 @@ - if (r == -1) - croak ("%s", guestfs_last_error (g)); - -+void -+aug_clear (g, augpath) -+ guestfs_h *g; -+ char *augpath; -+PREINIT: -+ int r; -+ PPCODE: -+ r = guestfs_aug_clear (g, augpath); -+ if (r == -1) -+ croak ("%s", guestfs_last_error (g)); -+ -diff -urN libguestfs-1.2.14/perl/lib/Sys/Guestfs.pm libguestfs-1.2.14.aug-clear/perl/lib/Sys/Guestfs.pm ---- libguestfs-1.2.14/perl/lib/Sys/Guestfs.pm 2010-10-23 12:44:26.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/perl/lib/Sys/Guestfs.pm 2010-10-23 14:51:24.113780835 +0100 -@@ -184,6 +184,11 @@ - This is the same as C<$h-Eadd_drive> but it allows you - to specify the QEMU interface emulation to use at run time. - -+=item $h->aug_clear ($augpath); -+ -+Set the value associated with C to C. This -+is the same as the L C command. -+ - =item $h->aug_close (); - - Close the current Augeas handle and free up any resources -@@ -317,6 +322,11 @@ - - Set the value associated with C to C. - -+In the Augeas API, it is possible to clear a node by setting -+the value to NULL. Due to an oversight in the libguestfs API -+you cannot do that with this call. Instead you must use the -+C<$h-Eaug_clear> call. -+ - =item $h->available (\@groups); - - This command is used to check the availability of some -diff -urN libguestfs-1.2.14/python/guestfs.py libguestfs-1.2.14.aug-clear/python/guestfs.py ---- libguestfs-1.2.14/python/guestfs.py 2010-10-23 12:44:26.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/python/guestfs.py 2010-10-23 14:51:24.114780892 +0100 -@@ -857,6 +857,11 @@ - - def aug_set (self, augpath, val): - u"""Set the value associated with "path" to "value". -+ -+ In the Augeas API, it is possible to clear a node by -+ setting the value to NULL. Due to an oversight in the -+ libguestfs API you cannot do that with this call. -+ Instead you must use the "g.aug_clear" call. - """ - return libguestfsmod.aug_set (self._o, augpath, val) - -@@ -3386,3 +3391,9 @@ - """ - return libguestfsmod.part_set_mbr_id (self._o, device, partnum, idbyte) - -+ def aug_clear (self, augpath): -+ u"""Set the value associated with "path" to "NULL". This is -+ the same as the augtool(1) "clear" command. -+ """ -+ return libguestfsmod.aug_clear (self._o, augpath) -+ -diff -urN libguestfs-1.2.14/python/guestfs-py.c libguestfs-1.2.14.aug-clear/python/guestfs-py.c ---- libguestfs-1.2.14/python/guestfs-py.c 2010-09-16 17:14:52.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/python/guestfs-py.c 2010-10-23 14:51:24.117781063 +0100 -@@ -7881,6 +7881,31 @@ - return py_r; - } - -+static PyObject * -+py_guestfs_aug_clear (PyObject *self, PyObject *args) -+{ -+ PyObject *py_g; -+ guestfs_h *g; -+ PyObject *py_r; -+ int r; -+ const char *augpath; -+ -+ if (!PyArg_ParseTuple (args, (char *) "Os:guestfs_aug_clear", -+ &py_g, &augpath)) -+ return NULL; -+ g = get_handle (py_g); -+ -+ r = guestfs_aug_clear (g, augpath); -+ if (r == -1) { -+ PyErr_SetString (PyExc_RuntimeError, guestfs_last_error (g)); -+ return NULL; -+ } -+ -+ Py_INCREF (Py_None); -+ py_r = Py_None; -+ return py_r; -+} -+ - static PyMethodDef methods[] = { - { (char *) "create", py_guestfs_create, METH_VARARGS, NULL }, - { (char *) "close", py_guestfs_close, METH_VARARGS, NULL }, -@@ -8172,6 +8197,7 @@ - { (char *) "part_get_bootable", py_guestfs_part_get_bootable, METH_VARARGS, NULL }, - { (char *) "part_get_mbr_id", py_guestfs_part_get_mbr_id, METH_VARARGS, NULL }, - { (char *) "part_set_mbr_id", py_guestfs_part_set_mbr_id, METH_VARARGS, NULL }, -+ { (char *) "aug_clear", py_guestfs_aug_clear, METH_VARARGS, NULL }, - { NULL, NULL, 0, NULL } - }; - -diff -urN libguestfs-1.2.14/ruby/ext/guestfs/_guestfs.c libguestfs-1.2.14.aug-clear/ruby/ext/guestfs/_guestfs.c ---- libguestfs-1.2.14/ruby/ext/guestfs/_guestfs.c 2010-09-16 17:17:36.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/ruby/ext/guestfs/_guestfs.c 2010-10-23 14:51:24.123781399 +0100 -@@ -7393,6 +7393,28 @@ - return Qnil; - } - -+static VALUE ruby_guestfs_aug_clear (VALUE gv, VALUE augpathv) -+{ -+ guestfs_h *g; -+ Data_Get_Struct (gv, guestfs_h, g); -+ if (!g) -+ rb_raise (rb_eArgError, "%s: used handle after closing it", "aug_clear"); -+ -+ Check_Type (augpathv, T_STRING); -+ const char *augpath = StringValueCStr (augpathv); -+ if (!augpath) -+ rb_raise (rb_eTypeError, "expected string for parameter %s of %s", -+ "augpath", "aug_clear"); -+ -+ int r; -+ -+ r = guestfs_aug_clear (g, augpath); -+ if (r == -1) -+ rb_raise (e_Error, "%s", guestfs_last_error (g)); -+ -+ return Qnil; -+} -+ - /* Initialize the module. */ - void Init__guestfs () - { -@@ -7979,4 +8001,6 @@ - ruby_guestfs_part_get_mbr_id, 2); - rb_define_method (c_guestfs, "part_set_mbr_id", - ruby_guestfs_part_set_mbr_id, 3); -+ rb_define_method (c_guestfs, "aug_clear", -+ ruby_guestfs_aug_clear, 1); - } -diff -urN libguestfs-1.2.14/src/generator.ml libguestfs-1.2.14.aug-clear/src/generator.ml ---- libguestfs-1.2.14/src/generator.ml 2010-10-23 13:13:10.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/generator.ml 2010-10-23 14:51:24.131781848 +0100 -@@ -1251,7 +1251,12 @@ - [], (* XXX Augeas code needs tests. *) - "set Augeas path to value", - "\ --Set the value associated with C to C."); -+Set the value associated with C to C. -+ -+In the Augeas API, it is possible to clear a node by setting -+the value to NULL. Due to an oversight in the libguestfs API -+you cannot do that with this call. Instead you must use the -+C call."); - - ("aug_insert", (RErr, [String "augpath"; String "label"; Bool "before"]), 21, [Optional "augeas"], - [], (* XXX Augeas code needs tests. *) -@@ -4509,6 +4514,13 @@ - You will get undefined results for other partition table - types (see C)."); - -+ ("aug_clear", (RErr, [String "augpath"]), 239, [Optional "augeas"], -+ [], (* XXX Augeas code needs tests. *) -+ "clear Augeas path", -+ "\ -+Set the value associated with C to C. This -+is the same as the L C command."); -+ - ] - - let all_functions = non_daemon_functions @ daemon_functions -diff -urN libguestfs-1.2.14/src/guestfs-actions.c libguestfs-1.2.14.aug-clear/src/guestfs-actions.c ---- libguestfs-1.2.14/src/guestfs-actions.c 2010-09-16 17:16:36.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/guestfs-actions.c 2010-10-23 14:51:24.137782186 +0100 -@@ -13696,6 +13696,58 @@ - return 0; - } - -+int guestfs_aug_clear (guestfs_h *g, -+ const char *augpath) -+{ -+ struct guestfs_aug_clear_args args; -+ guestfs_message_header hdr; -+ guestfs_message_error err; -+ int serial; -+ int r; -+ -+ if (guestfs__get_trace (g)) { -+ printf ("aug_clear"); -+ printf (" \"%s\"", augpath); -+ putchar ('\n'); -+ } -+ -+ if (check_state (g, "guestfs_aug_clear") == -1) return -1; -+ guestfs___set_busy (g); -+ -+ args.augpath = (char *) augpath; -+ serial = guestfs___send (g, GUESTFS_PROC_AUG_CLEAR, -+ (xdrproc_t) xdr_guestfs_aug_clear_args, (char *) &args); -+ if (serial == -1) { -+ guestfs___end_busy (g); -+ return -1; -+ } -+ -+ memset (&hdr, 0, sizeof hdr); -+ memset (&err, 0, sizeof err); -+ -+ r = guestfs___recv (g, "aug_clear", &hdr, &err, -+ NULL, NULL); -+ if (r == -1) { -+ guestfs___end_busy (g); -+ return -1; -+ } -+ -+ if (check_reply_header (g, &hdr, GUESTFS_PROC_AUG_CLEAR, serial) == -1) { -+ guestfs___end_busy (g); -+ return -1; -+ } -+ -+ if (hdr.status == GUESTFS_STATUS_ERROR) { -+ error (g, "%s: %s", "aug_clear", err.error_message); -+ free (err.error_message); -+ guestfs___end_busy (g); -+ return -1; -+ } -+ -+ guestfs___end_busy (g); -+ return 0; -+} -+ - /* Structure-freeing functions. These rely on the fact that the - * structure format is identical to the XDR format. See note in - * generator.ml. -diff -urN libguestfs-1.2.14/src/guestfs-actions.h libguestfs-1.2.14.aug-clear/src/guestfs-actions.h ---- libguestfs-1.2.14/src/guestfs-actions.h 2010-09-16 17:16:36.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/guestfs-actions.h 2010-10-23 14:51:24.139782299 +0100 -@@ -308,3 +308,4 @@ - extern int guestfs_part_get_bootable (guestfs_h *g, const char *device, int partnum); - extern int guestfs_part_get_mbr_id (guestfs_h *g, const char *device, int partnum); - extern int guestfs_part_set_mbr_id (guestfs_h *g, const char *device, int partnum, int idbyte); -+extern int guestfs_aug_clear (guestfs_h *g, const char *augpath); -diff -urN libguestfs-1.2.14/src/guestfs-actions.pod libguestfs-1.2.14.aug-clear/src/guestfs-actions.pod ---- libguestfs-1.2.14/src/guestfs-actions.pod 2010-10-23 12:44:25.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/guestfs-actions.pod 2010-10-23 14:51:24.141782410 +0100 -@@ -113,6 +113,16 @@ - - This function returns 0 on success or -1 on error. - -+=head2 guestfs_aug_clear -+ -+ int guestfs_aug_clear (guestfs_h *g, -+ const char *augpath); -+ -+Set the value associated with C to C. This -+is the same as the L C command. -+ -+This function returns 0 on success or -1 on error. -+ - =head2 guestfs_aug_close - - int guestfs_aug_close (guestfs_h *g); -@@ -321,6 +331,11 @@ - - Set the value associated with C to C. - -+In the Augeas API, it is possible to clear a node by setting -+the value to NULL. Due to an oversight in the libguestfs API -+you cannot do that with this call. Instead you must use the -+C call. -+ - This function returns 0 on success or -1 on error. - - =head2 guestfs_available -diff -urN libguestfs-1.2.14/src/guestfs-availability.pod libguestfs-1.2.14.aug-clear/src/guestfs-availability.pod ---- libguestfs-1.2.14/src/guestfs-availability.pod 2010-09-16 17:16:36.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/guestfs-availability.pod 2010-10-23 14:51:24.142782466 +0100 -@@ -3,6 +3,7 @@ - =item B - - The following functions: -+L - L - L - L -diff -urN libguestfs-1.2.14/src/guestfs_protocol.x libguestfs-1.2.14.aug-clear/src/guestfs_protocol.x ---- libguestfs-1.2.14/src/guestfs_protocol.x 2010-09-16 17:16:36.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/guestfs_protocol.x 2010-10-23 14:51:24.143782524 +0100 -@@ -1567,6 +1567,10 @@ - int idbyte; - }; - -+struct guestfs_aug_clear_args { -+ string augpath<>; -+}; -+ - enum guestfs_procedure { - GUESTFS_PROC_MOUNT = 1, - GUESTFS_PROC_SYNC = 2, -@@ -1799,6 +1803,7 @@ - GUESTFS_PROC_PART_GET_BOOTABLE = 234, - GUESTFS_PROC_PART_GET_MBR_ID = 235, - GUESTFS_PROC_PART_SET_MBR_ID = 236, -+ GUESTFS_PROC_AUG_CLEAR = 239, - GUESTFS_PROC_NR_PROCS - }; - -diff -urN libguestfs-1.2.14/src/libguestfs.syms libguestfs-1.2.14.aug-clear/src/libguestfs.syms ---- libguestfs-1.2.14/src/libguestfs.syms 2010-09-16 17:16:36.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/libguestfs.syms 2010-10-23 14:51:24.144782581 +0100 -@@ -26,6 +26,7 @@ - guestfs_add_drive_ro; - guestfs_add_drive_ro_with_if; - guestfs_add_drive_with_if; -+ guestfs_aug_clear; - guestfs_aug_close; - guestfs_aug_defnode; - guestfs_aug_defvar; -diff -urN libguestfs-1.2.14/src/MAX_PROC_NR libguestfs-1.2.14.aug-clear/src/MAX_PROC_NR ---- libguestfs-1.2.14/src/MAX_PROC_NR 2010-09-16 17:16:37.000000000 +0100 -+++ libguestfs-1.2.14.aug-clear/src/MAX_PROC_NR 2010-10-23 14:51:24.145782637 +0100 -@@ -1 +1 @@ --236 -+239 diff --git a/libguestfs-1.2.7-link_local_addresses.patch b/libguestfs-1.2.7-link_local_addresses.patch deleted file mode 100644 index cc6c9c2..0000000 --- a/libguestfs-1.2.7-link_local_addresses.patch +++ /dev/null @@ -1,38 +0,0 @@ -commit 2481eb976219f8e44d82da1ab79c7c52627185bf -Author: Richard Jones -Date: Tue May 4 16:06:58 2010 +0100 - - Use link-local addresses between appliance and host (RHBZ#588763). - -diff --git a/appliance/init b/appliance/init -index 15dab61..98538de 100755 ---- a/appliance/init -+++ b/appliance/init -@@ -52,8 +52,8 @@ hwclock -u -s - - # Set up the network. - ifconfig lo 127.0.0.1 --ifconfig eth0 10.0.2.10 --route add default gw 10.0.2.2 -+ifconfig eth0 169.254.2.10 -+route add default gw 169.254.2.2 - - # Scan for LVM. - modprobe dm_mod ||: -diff --git a/src/guestfs.c b/src/guestfs.c -index d23b9ae..027e08c 100644 ---- a/src/guestfs.c -+++ b/src/guestfs.c -@@ -128,9 +128,9 @@ static int qemu_supports (guestfs_h *g, const char *option); - * typical Linux configurations of libguestfs, guestfwd is not - * actually used any more. - */ --#define NETWORK "10.0.2.0/8" --#define ROUTER "10.0.2.2" --#define GUESTFWD_ADDR "10.0.2.4" -+#define NETWORK "169.254.0.0/16" -+#define ROUTER "169.254.2.2" -+#define GUESTFWD_ADDR "169.254.2.4" - #define GUESTFWD_PORT "6666" - - /* GuestFS handle and connection. */ diff --git a/libguestfs-1.2.7-use_old_slirp_syntax.patch b/libguestfs-1.2.7-use_old_slirp_syntax.patch deleted file mode 100644 index 9c5abd3..0000000 --- a/libguestfs-1.2.7-use_old_slirp_syntax.patch +++ /dev/null @@ -1,26 +0,0 @@ -commit a9985a761c98c7c980d7b9f80a4737a07ae0d21a -Author: Matthew Booth -Date: Mon May 24 10:47:33 2010 +0100 - - RHEL 5: Use old ip= syntax to set slirp network - -diff --git a/src/guestfs.c b/src/guestfs.c -index 027e08c..2aff72b 100644 ---- a/src/guestfs.c -+++ b/src/guestfs.c -@@ -1208,7 +1208,14 @@ guestfs__launch (guestfs_h *g) - */ - if (null_vmchannel_sock) { - add_cmdline (g, "-net"); -- add_cmdline (g, "user,vlan=0,net=" NETWORK); -+ -+ /* The slirp stack in RHEL 5's qemu-kvm only supports an old, undocumented -+ * option, ip=x.x.x.0, to modify the default network configuration. -+ * Despite being called 'ip', it actually refers to the class C network -+ * from which default IP address will be allocated. It must end in .0, or -+ * it will not work predictably. */ -+ add_cmdline (g, "user,vlan=0,ip=169.254.2.0"); -+ /* add_cmdline (g, "user,vlan=0,net=" NETWORK); */ - - snprintf (buf, sizeof buf, - "guestfs_vmchannel=tcp:" ROUTER ":%d",