Fix detection of Kylin Desktop

resolves: rhbz#2025950
This commit is contained in:
Richard W.M. Jones 2021-11-23 13:30:20 +00:00
parent be02cdb240
commit 2c114113a6
6 changed files with 155 additions and 9 deletions

View File

@ -1,7 +1,7 @@
From 83de85e717ad525423b0eabe153b48ff8af90bd1 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Mon, 17 May 2021 15:18:04 +0100
Subject: [PATCH] win-reg: Fix output of virt-win-reg --version
Subject: [PATCH 1/5] win-reg: Fix output of virt-win-reg --version
Before we split libguestfs and guestfs-tools the version of programs
was exactly the same as the version of libguestfs. This was
@ -33,7 +33,7 @@ Fixes: https://bugzilla.redhat.com/show_bug.cgi?id=1961160
rename win-reg/{virt-win-reg => virt-win-reg.in} (99%)
diff --git a/.gitignore b/.gitignore
index 006042a8b5..6bc509faba 100644
index 006042a8..6bc509fa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -163,3 +163,4 @@ Makefile.in
@ -42,7 +42,7 @@ index 006042a8b5..6bc509faba 100644
/website/*.html
+/win-reg/virt-win-reg
diff --git a/configure.ac b/configure.ac
index 56cfef57c9..ef412670ba 100644
index 56cfef57..ef412670 100644
--- a/configure.ac
+++ b/configure.ac
@@ -99,6 +99,8 @@ AC_CONFIG_FILES([podwrapper.pl],
@ -55,7 +55,7 @@ index 56cfef57c9..ef412670ba 100644
AC_CONFIG_FILES([Makefile
align/Makefile
diff --git a/po-docs/podfiles b/po-docs/podfiles
index d7ef138938..6b0c481f3d 100644
index d7ef1389..6b0c481f 100644
--- a/po-docs/podfiles
+++ b/po-docs/podfiles
@@ -26,4 +26,4 @@ sparsify/virt-sparsify.pod
@ -65,14 +65,14 @@ index d7ef138938..6b0c481f3d 100644
-win-reg/virt-win-reg
+win-reg/virt-win-reg.in
diff --git a/po/POTFILES-pl b/po/POTFILES-pl
index 47d30fc8a5..c6520ceabf 100644
index 47d30fc8..c6520cea 100644
--- a/po/POTFILES-pl
+++ b/po/POTFILES-pl
@@ -1 +1 @@
-win-reg/virt-win-reg
+win-reg/virt-win-reg.in
diff --git a/po/guestfs-tools.pot b/po/guestfs-tools.pot
index a3be1b9521..d7e9a3a73b 100644
index a3be1b95..d7e9a3a7 100644
--- a/po/guestfs-tools.pot
+++ b/po/guestfs-tools.pot
@@ -9,7 +9,7 @@ msgstr ""
@ -139,7 +139,7 @@ index a3be1b9521..d7e9a3a73b 100644
msgid "virt-win-reg: {p}: could not upload registry file: {err}\n"
msgstr ""
diff --git a/win-reg/Makefile.am b/win-reg/Makefile.am
index 22a22db46a..61ec066add 100644
index 22a22db4..61ec066a 100644
--- a/win-reg/Makefile.am
+++ b/win-reg/Makefile.am
@@ -17,8 +17,6 @@
@ -163,7 +163,7 @@ diff --git a/win-reg/virt-win-reg b/win-reg/virt-win-reg.in
similarity index 99%
rename from win-reg/virt-win-reg
rename to win-reg/virt-win-reg.in
index 1a936c5d07..6d9d0a28be 100755
index 1a936c5d..6d9d0a28 100755
--- a/win-reg/virt-win-reg
+++ b/win-reg/virt-win-reg.in
@@ -1,6 +1,6 @@

View File

@ -0,0 +1,32 @@
From 662e12ba1a2c2f06151b0f06814e6da0025cff2d Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Oct 2021 20:51:19 +0100
Subject: [PATCH 2/5] m4/guestfs-ocaml.m4: Fix deprecated warning format
In OCaml 4.13:
Alert ocaml_deprecated_cli: Setting a warning with a sequence of lowercase or uppercase letters,
like 'CDEFLMPSUVYZX', is deprecated.
Use the equivalent signed form: +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3.
(cherry picked from commit fa4f59e1d99c08d7e0bae2a7cb54f254a6506d67)
---
m4/guestfs-ocaml.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4
index f5ac7eff..d2b3804a 100644
--- a/m4/guestfs-ocaml.m4
+++ b/m4/guestfs-ocaml.m4
@@ -166,7 +166,7 @@ EOF
])
dnl Flags we want to pass to every OCaml compiler call.
-OCAML_WARN_ERROR="-warn-error CDEFLMPSUVYZX+52-3"
+OCAML_WARN_ERROR="-warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3"
AC_SUBST([OCAML_WARN_ERROR])
OCAML_FLAGS="-g -annot $safe_string_option"
AC_SUBST([OCAML_FLAGS])
--
2.31.1

View File

@ -0,0 +1,33 @@
From 89617fbe8867254b8c5a77c7fd28ab7746338751 Mon Sep 17 00:00:00 2001
From: "Richard W.M. Jones" <rjones@redhat.com>
Date: Tue, 5 Oct 2021 20:53:25 +0100
Subject: [PATCH 3/5] customize: Suppress OCaml warning
In OCaml 4.13:
File "perl_edit.ml", line 30, characters 2-13:
30 | c_edit_file (verbose ()) g (Guestfs.c_pointer g) file expr
^^^^^^^^^^^
Error (warning 6 [labels-omitted]): label verbose was omitted in the application of this function.
(cherry picked from commit a4930f5fad82e5358d565b8cf3610970e9646259)
---
m4/guestfs-ocaml.m4 | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/m4/guestfs-ocaml.m4 b/m4/guestfs-ocaml.m4
index d2b3804a..8a23877c 100644
--- a/m4/guestfs-ocaml.m4
+++ b/m4/guestfs-ocaml.m4
@@ -166,7 +166,7 @@ EOF
])
dnl Flags we want to pass to every OCaml compiler call.
-OCAML_WARN_ERROR="-warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3"
+OCAML_WARN_ERROR="-warn-error +C+D+E+F+L+M+P+S+U+V+Y+Z+X+52-3-6"
AC_SUBST([OCAML_WARN_ERROR])
OCAML_FLAGS="-g -annot $safe_string_option"
AC_SUBST([OCAML_FLAGS])
--
2.31.1

View File

@ -0,0 +1,39 @@
From e8148241cfd6019e493269580c7fe74d62e0fbdc Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 13 Oct 2021 18:30:42 +0200
Subject: [PATCH 4/5] virt-inspector.rng: recognize "kalilinux" and "msdos"
distros
As of libguestfs @ e597fc5317e0, the "string_of_distro" function
[daemon/inspect_types.ml] may output "kalilinux" and "msdos" beyond what
"virt-inspector.rng" currently accepts. Add these distro identifiers to
"virt-inspector.rng" now.
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20211013163043.21837-2-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
(cherry picked from commit aefdf0dcd4954b822e6a098f7258899f1b6a72b7)
---
inspector/virt-inspector.rng | 2 ++
1 file changed, 2 insertions(+)
diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng
index 7807e4d7..0a81538e 100644
--- a/inspector/virt-inspector.rng
+++ b/inspector/virt-inspector.rng
@@ -87,10 +87,12 @@
<value>freedos</value>
<value>frugalware</value>
<value>gentoo</value>
+ <value>kalilinux</value>
<value>linuxmint</value>
<value>mageia</value>
<value>mandriva</value>
<value>meego</value>
+ <value>msdos</value>
<value>neokylin</value>
<value>netbsd</value>
<value>openbsd</value>
--
2.31.1

View File

@ -0,0 +1,29 @@
From 8dad474829a8f6874c01a6d85749d8fd66d192ae Mon Sep 17 00:00:00 2001
From: Laszlo Ersek <lersek@redhat.com>
Date: Wed, 13 Oct 2021 18:30:43 +0200
Subject: [PATCH 5/5] virt-inspector.rng: Add support for Kylin (RHBZ#1995391).
Similar-to: b8bc491ff59cc1cc24a1935be99cee0c5edfb5be
Signed-off-by: Laszlo Ersek <lersek@redhat.com>
Message-Id: <20211013163043.21837-3-lersek@redhat.com>
Acked-by: Richard W.M. Jones <rjones@redhat.com>
(cherry picked from commit f041a5e24d8c5850daf7ad8f8e1a284e0445266b)
---
inspector/virt-inspector.rng | 1 +
1 file changed, 1 insertion(+)
diff --git a/inspector/virt-inspector.rng b/inspector/virt-inspector.rng
index 0a81538e..5b460b36 100644
--- a/inspector/virt-inspector.rng
+++ b/inspector/virt-inspector.rng
@@ -88,6 +88,7 @@
<value>frugalware</value>
<value>gentoo</value>
<value>kalilinux</value>
+ <value>kylin</value>
<value>linuxmint</value>
<value>mageia</value>
<value>mandriva</value>
--
2.31.1

View File

@ -26,7 +26,7 @@
Summary: Tools to access and modify virtual machine disk images
Name: guestfs-tools
Version: 1.46.1
Release: 4%{?dist}.1
Release: 5%{?dist}
License: GPLv2+
# Build only for architectures that have a kernel
@ -48,9 +48,18 @@ Source1: http://download.libguestfs.org/guestfs-tools/%{source_directory}/
Source2: libguestfs.keyring
%endif
# Patches are maintained in the following repository:
# https://github.com/rwmjones/guestfs-tools/commits/rhel-9.0.0
# Fix virt-win-reg --version (RHBZ#1961160)
Patch0001: 0001-win-reg-Fix-output-of-virt-win-reg-version.patch
# Fix detection of Kylin Desktop (RHBZ#2025950)
Patch0002: 0002-m4-guestfs-ocaml.m4-Fix-deprecated-warning-format.patch
Patch0003: 0003-customize-Suppress-OCaml-warning.patch
Patch0004: 0004-virt-inspector.rng-recognize-kalilinux-and-msdos-dis.patch
Patch0005: 0005-virt-inspector.rng-Add-support-for-Kylin-RHBZ-199539.patch
%if 0%{patches_touch_autotools}
BuildRequires: autoconf, automake, libtool, gettext-devel
%endif
@ -416,6 +425,10 @@ end
%changelog
* Tue Nov 23 2021 Richard W.M. Jones <rjones@redhat.com> - 1.46.1-5
- Fix detection of Kylin Desktop
resolves: rhbz#2025950
* Mon Aug 09 2021 Mohan Boddu <mboddu@redhat.com> - 1.46.1-4.1
- Rebuilt for IMA sigs, glibc 2.34, aarch64 flags
Related: rhbz#1991688