[gnome-boxes.wiki] Update libosinfo



commit 54294d32adee6d8e214699d1448c20d6a8d0de02
Author: Felipe Borges <felipeborges gnome org>
Date:   Fri Jul 30 13:52:28 2021 +0000

    Update libosinfo

 tools/libosinfo.md | 31 ++++++++++++++++++++++++++++---
 1 file changed, 28 insertions(+), 3 deletions(-)
---
diff --git a/tools/libosinfo.md b/tools/libosinfo.md
index 30f7e48..eafc226 100644
--- a/tools/libosinfo.md
+++ b/tools/libosinfo.md
@@ -2,8 +2,33 @@ See https://libosinfo.org
 
 Libosinfo provides tools to inspect operating system bootable images and match these to a database of 
recommended configurations for the respective operating system.
 
-# libosinfo
+Libosinfo is actually made of three parts:
 
-# osinfo-db
+## osinfo-db
 
-# osinfo-db-tools
\ No newline at end of file
+Is a database of operating systems in the XML format with entities such as: Os (operating system) and device.
+
+A typical `Os` entity provides information about operating systems that is used by Boxes such as:
+* `<name>`, `<version>`, `<vendor>`, provide user-facing name, version and vendor
+* `<release date>`
+* variants (OS variants such as desktop, server, netinstall, cloud...)
+* medias: OS images with detection information (unique metadata in the media that can be used to identify 
the OS in the media).
+  * `<url>`: publicly available address for downloading the OS image
+  * `<iso>`: has subnodes matching metadata properties used for identifying the OS in the media. These 
subnodes are usually `<volume-id>` and `<system-id>`. A regular expression (regex) can be used.
+* The `<resources>` node describes the `<minimum>` and `<recommended>` resources required for running the 
operating system. Boxes accesses `<n-cpus>` (number of CPUs), `<cpu>`, `<ram>`, `<storage>`.
+
+In RPM based systems the osinfo-db is usually installed in `${_datadir}/osinfo/`. In the Boxes Flatpak, the 
osinfo-db is installed at `/app/share/osinfo-db/`.
+
+## osinfo-db-tools
+
+Provides utility programs to manage the Osinfo database.
+
+## libosinfo
+
+Provides programmatic access to osinfo database. It uses GLib and GObject introspection, which allows Boxes 
to consume it in the Vala programming language. 
+
+libosinfo also provides utilities that are useful in the development and debugging of Boxes.
+
+* osinfo-detect: receives an OS image (usually a .iso file) and matches its metadata to the regex expressed 
in the `<media>` entity node , to identify the operating system contained in the OS image file.
+* osinfo-query: allows for performing search queries in the osinfo database. Some useful queries for 
developing Boxes are:
+  * `$ osinfo-query os`: lists all OSes in the database.
\ No newline at end of file


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]