contrib: Add dependency diagram of libguestfs ecosystem.
authorRichard Jones <rjones@redhat.com>
Fri, 30 Apr 2010 11:27:00 +0000 (12:27 +0100)
committerRichard Jones <rjones@redhat.com>
Fri, 30 Apr 2010 11:27:00 +0000 (12:27 +0100)
contrib/README
contrib/dependency-diagram/.gitignore [new file with mode: 0644]
contrib/dependency-diagram/Makefile [new file with mode: 0644]
contrib/dependency-diagram/diagram.dot [new file with mode: 0644]

index b68de2b..7274db5 100644 (file)
@@ -7,6 +7,12 @@ centos5.3-libguestfs.spec
         from EL-5 here:
         http://cvs.fedoraproject.org/viewvc/rpms/libguestfs/EL-5/
 
+dependency-diagram/
+        A "dot" file (for graphviz) which describes the dependencies
+        between the many different components of the libguestfs
+        ecosystem.  Good place to get started if you want to jump
+        into the code.
+
 febootstrap/
         [REMOVED]
         An experimental, non-working attempt to use febootstrap
diff --git a/contrib/dependency-diagram/.gitignore b/contrib/dependency-diagram/.gitignore
new file mode 100644 (file)
index 0000000..cd2913b
--- /dev/null
@@ -0,0 +1 @@
+diagram.png
diff --git a/contrib/dependency-diagram/Makefile b/contrib/dependency-diagram/Makefile
new file mode 100644 (file)
index 0000000..8852346
--- /dev/null
@@ -0,0 +1,21 @@
+# libguestfs ecosystem dependency diagram
+# Copyright (C) 2009-2010 Red Hat Inc.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+
+all:   diagram.png
+
+diagram.png: diagram.dot
+       dot -Tpng -o$@ $<
diff --git a/contrib/dependency-diagram/diagram.dot b/contrib/dependency-diagram/diagram.dot
new file mode 100644 (file)
index 0000000..83da3fe
--- /dev/null
@@ -0,0 +1,100 @@
+/* -*- C -*- */
+/* libguestfs ecosystem dependency diagram
+ * Copyright (C) 2010 Red Hat Inc.
+ *
+ * This program is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation; either version 2 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
+ */
+
+/* LAST UPDATE: 2010-04-30.
+ *
+ * If the current date is significantly later than the date above,
+ * then beware this diagram may be out of date.
+ */
+
+/* Note this diagram is greatly simplified.
+ *
+ * Some direct dependencies are omitted, if they are implied by
+ * indirect dependencies.  eg.  All the tools need perl &
+ * Sys::Guestfs, but if they have a dependency on Sys::Guestfs::Lib we
+ * only show that.
+ *
+ * Perl libraries which are not part of base perl are not shown (eg.
+ * XML::Writer).
+ */
+
+digraph G {
+  /* Top-level libguestfs tools and what they immediately depend on. */
+  "virt-cat" -> "Sys::Guestfs::Lib";
+  "virt-df" -> "Sys::Guestfs::Lib";
+  "virt-edit" -> "Sys::Guestfs::Lib";
+  "virt-list-filesystem" -> "Sys::Guestfs::Lib";
+  "virt-list-partitions" -> "Sys::Guestfs::Lib";
+  "virt-ls" -> "Sys::Guestfs::Lib";
+  "virt-make-fs" -> "Sys::Guestfs::Lib";
+  "virt-rescue" -> "Sys::Guestfs::Lib";
+  "virt-resize" -> "Sys::Guestfs::Lib";
+  "virt-tar" -> "Sys::Guestfs::Lib";
+  "virt-win-reg" -> "Sys::Guestfs::Lib";
+  "virt-win-reg" -> "Win::Hivex";
+  "virt-win-reg" -> "Win::Hivex::Regedit";
+
+  "virt-inspector" -> "Sys::Guestfs::Lib";
+
+  guestfish -> libguestfs;
+  guestfish -> "virt-inspector"; /* to implement -i option */
+
+  guestmount -> libguestfs;
+  guestmount -> libfuse;
+
+  /* virt-v2v (greatly simplified) */
+  "virt-v2v" -> "Sys::Guestfs";
+  "virt-v2v" -> "Sys::Guestfs::Lib";
+  "virt-v2v" -> "Sys::VirtV2V";
+  "Sys::VirtV2V" [label="Sys::VirtV2V\nMany dependencies\nnot shown"];
+
+  /* Perl bindings and libraries for libguestfs. */
+  "Sys::Guestfs" -> libguestfs;
+  "Sys::Guestfs" -> perl;
+  "Sys::Guestfs" [label="Sys::Guestfs\nPerl bindings for libguestfs"];
+  "Sys::Guestfs::Lib" -> "Sys::Guestfs";
+  "Sys::Guestfs::Lib" -> "Sys::Virt";
+  "Sys::Guestfs::Lib" -> "Win::Hivex";
+  "Sys::Guestfs::Lib" [label="Sys::Guestfs::Lib\nImage inspection and\nother useful functions"];
+
+  /* Libguestfs C library. */
+  libguestfs -> appliance -> "qemu or KVM";
+  libguestfs [label="libguestfs\nThe C library"];
+
+  /* Top-level hivex tools. */
+  hivexregedit -> "Win::Hivex";
+  hivexregedit -> "Win::Hivex::Regedit";
+  hivexsh -> libhivex;
+  hivexml -> libhivex;
+  hivexget -> hivexsh; /* This tool is obsolete now. */
+
+  /* Perl bindings and libraries for hivex. */
+  "Win::Hivex" -> libhivex;
+  "Win::Hivex" -> perl;
+  "Win::Hivex" [label="Win::Hivex\nPerl bindings for hivex"];
+  "Win::Hivex::Regedit" [label="Win::Hivex::Regedit\nregedit import/export"];
+
+  /* Hivex C library. */
+  libhivex [label="hivex\nThe C library"];
+
+  /* libvirt. */
+  "Sys::Virt" -> libvirt;
+  "Sys::Virt" -> perl;
+  "Sys::Virt" [label="Sys::Virt\nPerl bindings for libvirt"];
+}