Skip to contentSkip to conversation

drop libxml2 checks since libxml is not actually used (for parallels)

PATCH In review Michael Tokarev 4 participants 4 messages Jan 19, 2022

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drop libxml2 checks since libxml is not actually used (for parallels)

[This is a trivial patch, but due to the number of files it touches I'm not using qemu-trivial@ route.]

For a long time, we assumed that libxml2 is neecessary for parallels block format support (block/parallels*). However, this format actually does not use libxml. Since this is the only user of libxml2 in while 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.

---
 .cirrus.yml                                     | 1 -
 .gitlab-ci.d/cirrus/freebsd-12.vars             | 2 +-
 .gitlab-ci.d/cirrus/freebsd-13.vars             | 2 +-
 .gitlab-ci.d/cirrus/macos-11.vars               | 2 +-
 .gitlab-ci.d/windows.yml                        | 2 --
 block/meson.build                               | 3 +--
 meson.build                                     | 6 ------
 meson_options.txt                               | 2 --
 scripts/ci/org.centos/stream/8/x86_64/configure | 1 -
 scripts/coverity-scan/coverity-scan.docker      | 1 -
 scripts/coverity-scan/run-coverity-scan         | 2 +-
 tests/docker/dockerfiles/alpine.docker          | 1 -
 tests/docker/dockerfiles/centos8.docker         | 1 -
 tests/docker/dockerfiles/fedora.docker          | 1 -
 tests/docker/dockerfiles/opensuse-leap.docker   | 1 -
 tests/docker/dockerfiles/ubuntu1804.docker      | 1 -
 tests/docker/dockerfiles/ubuntu2004.docker      | 1 -
 17 files changed, 5 insertions(+), 25 deletions(-)
.cirrus.yml +0 -1
index 02c43a074a..7552d70974 100644
@@ -32,7 +32,6 @@ windows_msys2_task:
       mingw-w64-x86_64-libgcrypt
       mingw-w64-x86_64-libpng
       mingw-w64-x86_64-libssh
-      mingw-w64-x86_64-libxml2
       mingw-w64-x86_64-snappy
       mingw-w64-x86_64-libusb
       mingw-w64-x86_64-usbredir
.gitlab-ci.d/cirrus/freebsd-12.vars +1 -1
index 2099b21354..ebb3205b7b 100644
@@ -10,4 +10,4 @@ MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
 PYTHON='/usr/local/bin/python3'
 PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
.gitlab-ci.d/cirrus/freebsd-13.vars +1 -1
index 323fe806d5..5189a5c720 100644
@@ -10,4 +10,4 @@ MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
 PYTHON='/usr/local/bin/python3'
 PIP3='/usr/local/bin/pip-3.8'
-PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 libxml2 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
+PKGS='alsa-lib bash bzip2 ca_root_nss capstone4 ccache cdrkit-genisoimage ctags curl cyrus-sasl dbus diffutils gettext git glib gmake gnutls gsed gtk3 libepoxy libffi libgcrypt libjpeg-turbo libnfs libspice-server libssh libtasn1 llvm lttng-ust lzo2 meson ncurses nettle ninja opencv p5-Test-Harness perl5 pixman pkgconf png py38-numpy py38-pillow py38-pip py38-sphinx py38-sphinx_rtd_theme py38-virtualenv py38-yaml python3 rpm2cpio sdl2 sdl2_image snappy spice-protocol tesseract texinfo usbredir virglrenderer vte3 zstd'
.gitlab-ci.d/cirrus/macos-11.vars +1 -1
index cbec8a44a3..a387ec4a6f 100644
@@ -10,6 +10,6 @@ MAKE='/usr/local/bin/gmake'
 NINJA='/usr/local/bin/ninja'
 PYTHON='/usr/local/bin/python3'
 PIP3='/usr/local/bin/pip3'
-PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb libxml2 llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
+PKGS='bash bc bzip2 capstone ccache cpanminus ctags curl dbus diffutils gcovr gettext git glib gnu-sed gnutls gtk+3 jemalloc jpeg-turbo libepoxy libffi libgcrypt libiscsi libnfs libpng libslirp libssh libtasn1 libusb llvm lzo make meson ncurses nettle ninja perl pixman pkg-config python3 rpm2cpio sdl2 sdl2_image snappy sparse spice-protocol tesseract texinfo usbredir vde vte3 zlib zstd'
 PYPI_PKGS='PyYAML numpy pillow sphinx sphinx-rtd-theme virtualenv'
 CPAN_PKGS='Test::Harness'
.gitlab-ci.d/windows.yml +0 -2
index 62dd9ed832..1df1630349 100644
@@ -44,7 +44,6 @@ msys2-64bit:
       mingw-w64-x86_64-libssh
       mingw-w64-x86_64-libtasn1
       mingw-w64-x86_64-libusb
-      mingw-w64-x86_64-libxml2
       mingw-w64-x86_64-nettle
       mingw-w64-x86_64-ninja
       mingw-w64-x86_64-pixman
@@ -80,7 +79,6 @@ msys2-32bit:
       mingw-w64-i686-libssh
       mingw-w64-i686-libtasn1
       mingw-w64-i686-libusb
-      mingw-w64-i686-libxml2
       mingw-w64-i686-lzo2
       mingw-w64-i686-ninja
       mingw-w64-i686-pixman
block/meson.build +1 -2
index deb73ca389..90dc9983e5 100644
@@ -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'))
meson.build +0 -6
index 762d7cee85..730163b62e 100644
@@ -448,11 +448,6 @@ if not get_option('linux_io_uring').auto() or have_block
   linux_io_uring = dependency('liburing', 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',
@@ -3488,7 +3483,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}
meson_options.txt +0 -2
index 921967eddb..95d527f773 100644
@@ -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',
scripts/ci/org.centos/stream/8/x86_64/configure +0 -1
index e05f2fddcc..9850dd4444 100755
@@ -81,7 +81,6 @@
 --disable-libssh \
 --disable-libudev \
 --disable-libusb \
---disable-libxml2 \
 --disable-linux-aio \
 --disable-linux-io-uring \
 --disable-linux-user \
scripts/coverity-scan/coverity-scan.docker +0 -1
index ecff6ac5b4..6f60a52d23 100644
@@ -59,7 +59,6 @@ ENV PACKAGES \
     libubsan \
     libudev-devel \
     libusbx-devel \
-    libxml2-devel \
     libzstd-devel \
     llvm \
     lzo-devel \
scripts/coverity-scan/run-coverity-scan +1 -1
index 6d443250a9..181bdcb263 100755
@@ -402,7 +402,7 @@ echo "Configuring..."
     --enable-libiscsi --enable-libnfs --enable-seccomp \
     --enable-tpm --enable-libssh --enable-lzo --enable-snappy --enable-bzip2 \
     --enable-numa --enable-rdma --enable-smartcard --enable-virglrenderer \
-    --enable-mpath --enable-libxml2 --enable-glusterfs \
+    --enable-mpath --enable-glusterfs \
     --enable-virtfs --enable-zstd
 
 echo "Running cov-build..."
tests/docker/dockerfiles/alpine.docker +0 -1
index 7e6997e301..36a8e31edb 100644
@@ -29,7 +29,6 @@ ENV PACKAGES \
 	libseccomp-dev \
 	libssh-dev \
 	libusb-dev \
-	libxml2-dev \
 	lzo-dev \
 	make \
 	mesa-dev \
tests/docker/dockerfiles/centos8.docker +0 -1
index 7f135f8e8c..ff86d0a90d 100644
@@ -58,7 +58,6 @@ ENV PACKAGES \
     libubsan \
     libudev-devel \
     libusbx-devel \
-    libxml2-devel \
     libzstd-devel \
     llvm \
     lzo-devel \
tests/docker/dockerfiles/fedora.docker +0 -1
index c6fd7e1113..2d7ea10d01 100644
@@ -61,7 +61,6 @@ ENV PACKAGES \
     libudev-devel \
     liburing-devel \
     libusbx-devel \
-    libxml2-devel \
     libzstd-devel \
     llvm \
     lttng-ust-devel \
tests/docker/dockerfiles/opensuse-leap.docker +0 -1
index 3bbdb67f4f..080400c505 100644
@@ -62,7 +62,6 @@ ENV PACKAGES \
     libubsan1 \
     libudev-devel \
     libusb-1_0-devel \
-    libxml2-devel \
     libzstd-devel \
     llvm \
     lttng-ust-devel \
tests/docker/dockerfiles/ubuntu1804.docker +0 -1
index 450fd06d0d..bc287e588a 100644
@@ -76,7 +76,6 @@ ENV PACKAGES \
     libvirglrenderer-dev \
     libvte-2.91-dev \
     libxen-dev \
-    libxml2-dev \
     libzstd-dev \
     llvm \
     locales \
tests/docker/dockerfiles/ubuntu2004.docker +0 -1
index 15a026be09..fb832e3401 100644
@@ -77,7 +77,6 @@ ENV PACKAGES \
     libvirglrenderer-dev \
     libvte-2.91-dev \
     libxen-dev \
-    libxml2-dev \
     libzstd-dev \
     llvm \
     locales \
Signature · 1 line
2.30.2
#1 lore raw

Copying the maintainers for block/parallels.c

Quoted 11 lines · Michael Tokarev

[This is a trivial patch, but due to the number of files it touches I'm not using qemu-trivial@ route.]

For a long time, we assumed that libxml2 is neecessary for parallels block format support (block/parallels*). However, this format actually does not use libxml. Since this is the only user of libxml2 in while 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.

This option was added in this PULL request;

commit 25bfd5a75fa3e8f5796656c7634e26193f7bedc1 (HEAD)
Merge: 238e2d93c9 bcbb3866da
Author: Peter Maydell <[email protected]>
Date: Wed Jan 24 15:28:36 2018 +0000

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Pull request

v2:
* Drop merge failure from a previous pull request that broke virtio-blk on ARM guests
* Add Parallels XML patch series

* remotes/stefanha/tags/block-pull-request:
block/parallels: add backing support to readv/writev block/parallels: replace some magic numbers block/parallels: move some structures into header
configure: add dependency
docs/interop/prl-xml: description of Parallels Disk format
block: add block_set_io_throttle virtio-blk-pci QMP example

If i look back at the mailing list archives I find

v1: https://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg03440.html
v2: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg01870.html
v3: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg02443.html

which says

[quote]
This series contains very basic
description of this XML files and makes preparations for actual implementation to be followed.
[/quote]

but obviously the actual implementation never merged. I'm not sure if it was even posted, I didn't see anything in the mail archives forthe next couple of months, but didn't look beyond that.

Denis: can you explain the status of XML support for the parallels block driver. Is this something you are carrying out of tree, or has the need for it gone away entirely ? Is there any reason why QEMU should keep this logic for probing for libxml2 for parallels ?

Quoted 10 lines
 .cirrus.yml                                     | 1 -
 .gitlab-ci.d/cirrus/freebsd-12.vars             | 2 +-
 .gitlab-ci.d/cirrus/freebsd-13.vars             | 2 +-
 .gitlab-ci.d/cirrus/macos-11.vars               | 2 +-
 .gitlab-ci.d/windows.yml                        | 2 --
 block/meson.build                               | 3 +--
 meson.build                                     | 6 ------
 meson_options.txt                               | 2 --
 scripts/ci/org.centos/stream/8/x86_64/configure | 1 -
 scripts/coverity-scan/coverity-scan.docker      | 1 -
Quoted 8 lines
 scripts/coverity-scan/run-coverity-scan         | 2 +-
 tests/docker/dockerfiles/alpine.docker          | 1 -
 tests/docker/dockerfiles/centos8.docker         | 1 -
 tests/docker/dockerfiles/fedora.docker          | 1 -
 tests/docker/dockerfiles/opensuse-leap.docker   | 1 -
 tests/docker/dockerfiles/ubuntu1804.docker      | 1 -
 tests/docker/dockerfiles/ubuntu2004.docker      | 1 -
 17 files changed, 5 insertions(+), 25 deletions(-)

Note, this will conflict with pending PULL request that changes most of those dockerfiles and cirrus CI configs to be auto-generated

https://lists.nongnu.org/archive/html/qemu-devel/2022-01/msg02585.html

Regards,
Daniel

Signature · 3 lines
|: https://berrange.com      -o-    https://www.flickr.com/photos/dberrange :|
|: https://libvirt.org         -o-            https://fstop138.berrange.com :|
|: https://entangle-photo.org    -o-    https://www.instagram.com/dberrange :|
#2 lore raw
Quoted 85 lines · Daniel P. Berrangé

Copying the maintainers for block/parallels.c

Quoted 11 lines · Michael Tokarev

[This is a trivial patch, but due to the number of files it touches I'm not using qemu-trivial@ route.]

For a long time, we assumed that libxml2 is neecessary for parallels block format support (block/parallels*). However, this format actually does not use libxml. Since this is the only user of libxml2 in while 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.

This option was added in this PULL request;

commit 25bfd5a75fa3e8f5796656c7634e26193f7bedc1 (HEAD)
Merge: 238e2d93c9 bcbb3866da
Author: Peter Maydell <[email protected]>
Date: Wed Jan 24 15:28:36 2018 +0000

Merge remote-tracking branch 'remotes/stefanha/tags/block-pull-request' into staging

Pull request

v2:
* Drop merge failure from a previous pull request that broke virtio-blk on ARM guests
* Add Parallels XML patch series

* remotes/stefanha/tags/block-pull-request:
block/parallels: add backing support to readv/writev block/parallels: replace some magic numbers block/parallels: move some structures into header
configure: add dependency
docs/interop/prl-xml: description of Parallels Disk format
block: add block_set_io_throttle virtio-blk-pci QMP example

If i look back at the mailing list archives I find

v1: https://lists.nongnu.org/archive/html/qemu-devel/2017-12/msg03440.html
v2: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg01870.html
v3: https://lists.nongnu.org/archive/html/qemu-devel/2018-01/msg02443.html

which says

[quote]
This series contains very basic
description of this XML files and makes preparations for actual implementation to be followed.
[/quote]

but obviously the actual implementation never merged. I'm not sure if it was even posted, I didn't see anything in the mail archives forthe next couple of months, but didn't look beyond that.

Denis: can you explain the status of XML support for the parallels block driver. Is this something you are carrying out of tree, or has the need for it gone away entirely ? Is there any reason why QEMU should keep this logic for probing for libxml2 for parallels ?

Quoted 10 lines
 .cirrus.yml                                     | 1 -
 .gitlab-ci.d/cirrus/freebsd-12.vars             | 2 +-
 .gitlab-ci.d/cirrus/freebsd-13.vars             | 2 +-
 .gitlab-ci.d/cirrus/macos-11.vars               | 2 +-
 .gitlab-ci.d/windows.yml                        | 2 --
 block/meson.build                               | 3 +--
 meson.build                                     | 6 ------
 meson_options.txt                               | 2 --
 scripts/ci/org.centos/stream/8/x86_64/configure | 1 -
 scripts/coverity-scan/coverity-scan.docker      | 1 -
Quoted 8 lines
 scripts/coverity-scan/run-coverity-scan         | 2 +-
 tests/docker/dockerfiles/alpine.docker          | 1 -
 tests/docker/dockerfiles/centos8.docker         | 1 -
 tests/docker/dockerfiles/fedora.docker          | 1 -
 tests/docker/dockerfiles/opensuse-leap.docker   | 1 -
 tests/docker/dockerfiles/ubuntu1804.docker      | 1 -
 tests/docker/dockerfiles/ubuntu2004.docker      | 1 -
 17 files changed, 5 insertions(+), 25 deletions(-)

Note, this will conflict with pending PULL request that changes most of those dockerfiles and cirrus CI configs to be auto-generated

Quoted 5 lines

https://lists.nongnu.org/archive/html/qemu-devel/2022-01/msg02585.html

Regards,
Daniel

I think we can drop this. If that will be needed again - we will simply add.

Den

Reviewed-by on v1 1/1
#3 lore raw
In reply to Michael Tokarev
Quoted 26 lines · Michael Tokarev

[This is a trivial patch, but due to the number of files it touches I'm not using qemu-trivial@ route.]

For a long time, we assumed that libxml2 is neecessary for parallels block format support (block/parallels*). However, this format actually does not use libxml. Since this is the only user of libxml2 in while 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.

---
 .cirrus.yml                                     | 1 -
 .gitlab-ci.d/cirrus/freebsd-12.vars             | 2 +-
 .gitlab-ci.d/cirrus/freebsd-13.vars             | 2 +-
 .gitlab-ci.d/cirrus/macos-11.vars               | 2 +-
 .gitlab-ci.d/windows.yml                        | 2 --
 block/meson.build                               | 3 +--
 meson.build                                     | 6 ------
 meson_options.txt                               | 2 --
 scripts/ci/org.centos/stream/8/x86_64/configure | 1 -
 scripts/coverity-scan/coverity-scan.docker      | 1 -
Quoted 8 lines
 scripts/coverity-scan/run-coverity-scan         | 2 +-
 tests/docker/dockerfiles/alpine.docker          | 1 -
 tests/docker/dockerfiles/centos8.docker         | 1 -
 tests/docker/dockerfiles/fedora.docker          | 1 -
 tests/docker/dockerfiles/opensuse-leap.docker   | 1 -
 tests/docker/dockerfiles/ubuntu1804.docker      | 1 -
 tests/docker/dockerfiles/ubuntu2004.docker      | 1 -
 17 files changed, 5 insertions(+), 25 deletions(-)

Nice cleanup.