 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [PATCH] appliance: reorder the steps to search for appliance
                                
                                
                                
                                    
                                        by Pavel Butsykin
                                    
                                
                                
                                        The patch changes the order of the steps to search for fixed/supermin
appliance in accordance with documentation:
"If the fixed appliance is found, libguestfs skips supermin entirely
 and just runs qemu with the kernel, initrd and root disk from the
 fixed appliance."
Signed-off-by: Pavel Butsykin <pbutsykin(a)virtuozzo.com>
---
 lib/appliance.c | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)
diff --git a/lib/appliance.c b/lib/appliance.c
index f12918573..06ee06f71 100644
--- a/lib/appliance.c
+++ b/lib/appliance.c
@@ -137,16 +137,6 @@ build_appliance (guestfs_h *g,
   CLEANUP_FREE char *path = NULL;
 
   /* Step (1). */
-  r = find_path (g, contains_supermin_appliance, NULL, &supermin_path);
-  if (r == -1)
-    return -1;
-
-  if (r == 1)
-    /* Step (2): build supermin appliance. */
-    return build_supermin_appliance (g, supermin_path,
-                                     kernel, initrd, appliance);
-
-  /* Step (3). */
   r = find_path (g, contains_fixed_appliance, NULL, &path);
   if (r == -1)
     return -1;
@@ -162,7 +152,7 @@ build_appliance (guestfs_h *g,
     return 0;
   }
 
-  /* Step (4). */
+  /* Step (2). */
   r = find_path (g, contains_old_style_appliance, NULL, &path);
   if (r == -1)
     return -1;
@@ -177,6 +167,16 @@ build_appliance (guestfs_h *g,
     return 0;
   }
 
+  /* Step (3). */
+  r = find_path (g, contains_supermin_appliance, NULL, &supermin_path);
+  if (r == -1)
+    return -1;
+
+  if (r == 1)
+    /* Step (4): build supermin appliance. */
+    return build_supermin_appliance (g, supermin_path,
+                                     kernel, initrd, appliance);
+
   error (g, _("cannot find any suitable libguestfs supermin, fixed or old-style appliance on LIBGUESTFS_PATH (search path: %s)"),
          g->path);
   return -1;
-- 
2.11.0
                                
                         
                        
                                
                                8 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                        
                                
                                
                                        
                                                
                                        
                                        
                                        [PATCH v6 0/1] v2v bootloaders and augeas
                                
                                
                                
                                    
                                        by Pavel Butsykin
                                    
                                
                                
                                        I dare to raise an old topic :) It seemed to me that this patch already applied,
but recently discovered that it is not. 
As far as I understand we can't do a strict requirement to use Augeas >= 1.7.0.
But initially, the patch solves another problem. If we still can't do a hard
requirement for Augeas, let's use workaround proposed by Pino:
  let () =
    (* Apply the "grub" lens if it is not handling the file
     * already -- Augeas < 1.7.0 will error out otherwise.
     *)
    if g#aug_ls ("/files" ^ grub_config) = [||] then
      g#aug_transform "grub" grub_config in
As a temporary solution looks fine.
Pavel Butsykin (1):
  v2v: bootloaders: search grub config for all  distributions
 v2v/linux_bootloaders.ml | 86 +++++++++++++++++++++++++++++++-----------------
 1 file changed, 55 insertions(+), 31 deletions(-)
-- 
2.11.0
                                
                         
                        
                                
                                8 years, 6 months
                        
                        
                 
         
 
        
            
        
        
        
                
                        
                                
                                 
                                        
                                
                         
                        
                                
                                
                                        
                                                
                                        
                                        
                                         [PATCH v9 0/7] Feature: Yara file scanning
                                
                                
                                
                                    
                                        by Matteo Cafasso
                                    
                                
                                
                                        v9:
- fixes according to comments
Matteo Cafasso (7):
  daemon: expose file upload logic
  appliance: add yara dependency
  New API: yara_load
  New API: yara_destroy
  New API: internal_yara_scan
  New API: yara_scan
  yara_scan: added API tests
 appliance/packagelist.in                 |   4 +
 configure.ac                             |   1 +
 daemon/Makefile.am                       |   4 +-
 daemon/cleanups.c                        |   9 +
 daemon/cleanups.h                        |   2 +
 daemon/daemon.h                          |   3 +
 daemon/upload.c                          |  66 ++++---
 daemon/yara.c                            | 315 +++++++++++++++++++++++++++++++
 docs/guestfs-building.pod                |   4 +
 generator/Makefile.am                    |   3 +
 generator/actions.ml                     |   6 +-
 generator/actions_yara.ml                |  92 +++++++++
 generator/actions_yara.mli               |  22 +++
 generator/proc_nr.ml                     |   3 +
 generator/structs.ml                     |   9 +
 gobject/Makefile.inc                     |   2 +
 java/Makefile.inc                        |   1 +
 java/com/redhat/et/libguestfs/.gitignore |   1 +
 lib/MAX_PROC_NR                          |   2 +-
 lib/Makefile.am                          |   1 +
 lib/yara.c                               | 132 +++++++++++++
 m4/guestfs_daemon.m4                     |  14 ++
 tests/yara/Makefile.am                   |  26 +++
 tests/yara/test-yara-scan.sh             |  61 ++++++
 24 files changed, 750 insertions(+), 33 deletions(-)
 create mode 100644 daemon/yara.c
 create mode 100644 generator/actions_yara.ml
 create mode 100644 generator/actions_yara.mli
 create mode 100644 lib/yara.c
 create mode 100644 tests/yara/Makefile.am
 create mode 100755 tests/yara/test-yara-scan.sh
--
2.11.0
                                
                         
                        
                                
                                8 years, 6 months