Blame SOURCES/0017-o-libvirt-Add-correct-xmlns-libosinfo-for-Rocky-Linu.patch

b85204
From a9630d3981cbf7f6083e82f4e22cff981d11a8b3 Mon Sep 17 00:00:00 2001
b85204
From: "Richard W.M. Jones" <rjones@redhat.com>
b85204
Date: Thu, 2 Feb 2023 12:29:00 +0000
b85204
Subject: [PATCH] -o libvirt: Add correct xmlns:libosinfo for Rocky Linux
b85204
b85204
Also a small whitespace fix and improve the warning message.
b85204
b85204
Updates: commit db831c167b7bf757aa79dbe3db5fa8c5fd8cfc99
b85204
Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=2166618
b85204
Reported-by: Ming Xie
b85204
(cherry picked from commit ebfdca56bca69284f289e3db8a6e6baf6bc617f0)
b85204
---
b85204
 output/create_libvirt_xml.ml | 8 ++++++--
b85204
 1 file changed, 6 insertions(+), 2 deletions(-)
b85204
b85204
diff --git a/output/create_libvirt_xml.ml b/output/create_libvirt_xml.ml
b85204
index e1c1f616..388fae5b 100644
b85204
--- a/output/create_libvirt_xml.ml
b85204
+++ b/output/create_libvirt_xml.ml
b85204
@@ -47,6 +47,10 @@ let get_osinfo_id = function
b85204
     when major >= 8 ->
b85204
     Some (sprintf "http://centos.org/centos/%d" major)
b85204
 
b85204
+  | { i_type = "linux"; i_distro = "rocky";
b85204
+      i_major_version = major; i_minor_version = minor } ->
b85204
+    Some (sprintf "http://rockylinux.org/rocky/%d.%d" major minor)
b85204
+
b85204
   | { i_type = "linux"; i_distro = "sles";
b85204
       i_major_version = major; i_minor_version = 0;
b85204
       i_product_name = product } when String.find product "Desktop" >= 0 ->
b85204
@@ -140,7 +144,8 @@ let get_osinfo_id = function
b85204
   | { i_type = typ; i_distro = distro;
b85204
       i_major_version = major; i_minor_version = minor; i_arch = arch;
b85204
       i_product_name = product } ->
b85204
-    warning (f_"unknown guest operating system: %s %s %d.%d %s (%s)")
b85204
+    warning (f_"get_osinfo_id: unknown guest operating system: \
b85204
+                %s %s %d.%d %s (%s)")
b85204
       typ distro major minor arch product;
b85204
     None
b85204
 
b85204
@@ -160,7 +165,6 @@ let create_libvirt_xml ?pool source inspect
b85204
    | Some genid -> List.push_back body (e "genid" [] [PCData genid])
b85204
   );
b85204
 
b85204
-
b85204
   (match get_osinfo_id inspect with
b85204
    | None -> ()
b85204
    | Some osinfo_id ->