Re: [PATCH v1 08/22] drop libxml2 checks since libxml is not actually used (for parallels)

2022-01-25 Thread Vladimir Sementsov-Ogievskiy

24.01.2022 23:15, Alex Bennée wrote:

From: Michael Tokarev 

For a long time, we assumed that libxml2 is necessary for parallels
block format support (block/parallels*). However, this format actually
does not use libxml [*]. Since this is the only user of libxml2 in
whole QEMU tree, we can drop all libxml2 checks and dependencies too.

It is even more: --enable-parallels configure option was the only
option which was silently ignored when it's (fake) dependency
(libxml2) isn't installed.

Drop all mentions of libxml2.

[*] Actually the basis for libxml use were introduced in commit
 ed279a06c53 ("configure: add dependency") but the implementation
 was never merged:
 
https://lore.kernel.org/qemu-devel/70227bbd-a517-70e9-714f-e6e0ec431...@openvz.org/

Signed-off-by: Michael Tokarev 
Reviewed-by: Stefan Hajnoczi 
Message-Id: <20220119090423.149315-1-...@msgid.tls.msk.ru>
Tested-by: Philippe Mathieu-Daudé 
Reviewed-by: Philippe Mathieu-Daudé 
[PMD: Updated description and adapted to use lcitool]
Reviewed-by: Thomas Huth 
Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Alex Bennée 
Message-Id: <20220121154134.315047-5-f4...@amsat.org>


Reviewed-by: Vladimir Sementsov-Ogievskiy 

Parallels format includes xml disk descriptor format, which was never merged to 
Qemu. Yes, the introduced dependency was premature, sorry for that :(

The implementation of xml part was sent, but only for someone other who want to 
continue this work, Virtuozzo don't have such plans now:

https://lists.gnu.org/archive/html/qemu-devel/2020-11/msg03601.html

--
Best regards,
Vladimir



[PATCH v1 08/22] drop libxml2 checks since libxml is not actually used (for parallels)

2022-01-24 Thread Alex Bennée
From: Michael Tokarev 

For a long time, we assumed that libxml2 is necessary for parallels
block format support (block/parallels*). However, this format actually
does not use libxml [*]. Since this is the only user of libxml2 in
whole QEMU tree, we can drop all libxml2 checks and dependencies too.

It is even more: --enable-parallels configure option was the only
option which was silently ignored when it's (fake) dependency
(libxml2) isn't installed.

Drop all mentions of libxml2.

[*] Actually the basis for libxml use were introduced in commit
ed279a06c53 ("configure: add dependency") but the implementation
was never merged:

https://lore.kernel.org/qemu-devel/70227bbd-a517-70e9-714f-e6e0ec431...@openvz.org/

Signed-off-by: Michael Tokarev 
Reviewed-by: Stefan Hajnoczi 
Message-Id: <20220119090423.149315-1-...@msgid.tls.msk.ru>
Tested-by: Philippe Mathieu-Daudé 
Reviewed-by: Philippe Mathieu-Daudé 
[PMD: Updated description and adapted to use lcitool]
Reviewed-by: Thomas Huth 
Signed-off-by: Philippe Mathieu-Daudé 
Signed-off-by: Alex Bennée 
Message-Id: <20220121154134.315047-5-f4...@amsat.org>
---
 meson.build | 6 --
 block/meson.build   | 3 +--
 meson_options.txt   | 2 --
 scripts/checkpatch.pl   | 1 -
 scripts/ci/org.centos/stream/8/x86_64/configure | 1 -
 scripts/coverity-scan/coverity-scan.docker  | 1 -
 scripts/coverity-scan/run-coverity-scan | 2 +-
 scripts/meson-buildoptions.sh   | 3 ---
 8 files changed, 2 insertions(+), 17 deletions(-)

diff --git a/meson.build b/meson.build
index 833fd6bc4c..51e3090438 100644
--- a/meson.build
+++ b/meson.build
@@ -451,11 +451,6 @@ if not get_option('linux_io_uring').auto() or have_block
   required: get_option('linux_io_uring'),
   method: 'pkg-config', kwargs: static_kwargs)
 endif
-libxml2 = not_found
-if not get_option('libxml2').auto() or have_block
-  libxml2 = dependency('libxml-2.0', required: get_option('libxml2'),
-   method: 'pkg-config', kwargs: static_kwargs)
-endif
 libnfs = not_found
 if not get_option('libnfs').auto() or have_block
   libnfs = dependency('libnfs', version: '>=1.9.3',
@@ -3491,7 +3486,6 @@ summary_info += {'bzip2 support': libbzip2}
 summary_info += {'lzfse support': liblzfse}
 summary_info += {'zstd support':  zstd}
 summary_info += {'NUMA host support': config_host.has_key('CONFIG_NUMA')}
-summary_info += {'libxml2':   libxml2}
 summary_info += {'capstone':  capstone_opt == 'internal' ? 
capstone_opt : capstone}
 summary_info += {'libpmem support':   libpmem}
 summary_info += {'libdaxctl support': libdaxctl}
diff --git a/block/meson.build b/block/meson.build
index deb73ca389..90dc9983e5 100644
--- a/block/meson.build
+++ b/block/meson.build
@@ -58,8 +58,7 @@ block_ss.add(when: 'CONFIG_QED', if_true: files(
   'qed-table.c',
   'qed.c',
 ))
-block_ss.add(when: [libxml2, 'CONFIG_PARALLELS'],
- if_true: files('parallels.c', 'parallels-ext.c'))
+block_ss.add(when: 'CONFIG_PARALLELS', if_true: files('parallels.c', 
'parallels-ext.c'))
 block_ss.add(when: 'CONFIG_WIN32', if_true: files('file-win32.c', 
'win32-aio.c'))
 block_ss.add(when: 'CONFIG_POSIX', if_true: [files('file-posix.c'), coref, 
iokit])
 block_ss.add(when: libiscsi, if_true: files('iscsi-opts.c'))
diff --git a/meson_options.txt b/meson_options.txt
index 921967eddb..95d527f773 100644
--- a/meson_options.txt
+++ b/meson_options.txt
@@ -113,8 +113,6 @@ option('libudev', type : 'feature', value : 'auto',
description: 'Use libudev to enumerate host devices')
 option('libusb', type : 'feature', value : 'auto',
description: 'libusb support for USB passthrough')
-option('libxml2', type : 'feature', value : 'auto',
-   description: 'libxml2 support for Parallels image format')
 option('linux_aio', type : 'feature', value : 'auto',
description: 'Linux AIO support')
 option('linux_io_uring', type : 'feature', value : 'auto',
diff --git a/scripts/checkpatch.pl b/scripts/checkpatch.pl
index 5caa739db4..5e50111060 100755
--- a/scripts/checkpatch.pl
+++ b/scripts/checkpatch.pl
@@ -307,7 +307,6 @@ our @typeList = (
qr{target_(?:u)?long},
qr{hwaddr},
 # external libraries
-   qr{xml${Ident}},
qr{xen\w+_handle},
# Glib definitions
qr{gchar},
diff --git a/scripts/ci/org.centos/stream/8/x86_64/configure 
b/scripts/ci/org.centos/stream/8/x86_64/configure
index e05f2fddcc..9850dd 100755
--- a/scripts/ci/org.centos/stream/8/x86_64/configure
+++ b/scripts/ci/org.centos/stream/8/x86_64/configure
@@ -81,7 +81,6 @@
 --disable-libssh \
 --disable-libudev \
 --disable-libusb \
---disable-libxml2 \
 --disable-linux-aio \
 --disable-linux-io-uring \
 --disable-linux-user \
diff --git a/scripts/coverity-scan/coverity-scan.docker 
b/scripts/cover