Skip to contentSkip to conversation

subprojects: add wrap file for libblkio

PATCH In review Paolo Bonzini 2 participants 3 messages Sep 6, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 subprojects: add wrap file for libblkio

This allows building libblkio at the same time as QEMU, if QEMU is configured with --enable-blkio --enable-download.

---
 subprojects/libblkio.wrap | 6 ++++++
 1 file changed, 6 insertions(+)
 create mode 100644 subprojects/libblkio.wrap
subprojects/libblkio.wrap new file +6 -0
new file mode 100644
index 00000000000..f77af72210c
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://gitlab.com/libblkio/libblkio
+revision = f84cc963a444e4cb34813b2dcfc5bf8526947dc0
+
+[provide]
+blkio = libblkio_dep
Signature · 1 line
2.41.0
Tested-by on v1 1/1
#1 lore raw
Quoted 25 lines · Paolo Bonzini

This allows building libblkio at the same time as QEMU, if QEMU is configured with --enable-blkio --enable-download.

---
subprojects/libblkio.wrap | 6 ++++++

1 file changed, 6 insertions(+)

create mode 100644 subprojects/libblkio.wrap

subprojects/libblkio.wrap new file +6 -0
new file mode 100644
index 00000000000..f77af72210c
@@ -0,0 +1,6 @@
+[wrap-git]
+url = https://gitlab.com/libblkio/libblkio
+revision = f84cc963a444e4cb34813b2dcfc5bf8526947dc0
+
+[provide]
+blkio = libblkio_dep
Signature · 1 line
2.41.0

I'm trying it in a clean container and I have this issue:

HEAD is now at f84cc96 allow building libblkio as a subproject

Executing subproject libblkio

../subprojects/libblkio/meson.build:1:0: ERROR: Command /root/qemu/subprojects/libblkio/./package-version.py failed with status 1.

A full log can be found at /root/qemu/build/meson-logs/meson-log.txt

ERROR: meson setup failed

Looking in the meson-log.txt, I have this:

Package 'blkio', required by 'virtual:world', not found
-----------
Run-time dependency blkio found: NO (tried pkgconfig) Looking for a fallback subproject for the dependency blkio

Executing subproject libblkio

Running command: /root/qemu/subprojects/libblkio/./package-version.py --- stdout ---

--- stderr ---
Traceback (most recent call last):

    File "/root/qemu/subprojects/libblkio/./package-version.py", line 5, in <module>
      out = subprocess.check_output(["cargo", "read-manifest"])
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
      return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/subprocess.py", line 548, in run
      with Popen(*popenargs, **kwargs) as process:
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
    File "/usr/lib64/python3.11/subprocess.py", line 1026, in __init__
      self._execute_child(args, executable, preexec_fn, close_fds,
    File "/usr/lib64/python3.11/subprocess.py", line 1950, in _execute_child
      raise child_exception_type(errno_num, err_msg, err_filename)

FileNotFoundError: [Errno 2] No such file or directory: 'cargo'

Installing cargo fixed the issue on my side.
I don't know if it is possible, but can we put some dependecy check in the wrap file?

Anyway, after installing cargo it works pretty well :-)

#2 lore raw
Quoted 12 lines · Stefano Garzarella
       out = subprocess.check_output(["cargo", "read-manifest"])
             ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/lib64/python3.11/subprocess.py", line 466, in check_output
       return run(*popenargs, stdout=PIPE, timeout=timeout, check=True,
              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/lib64/python3.11/subprocess.py", line 548, in run
       with Popen(*popenargs, **kwargs) as process:
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^
     File "/usr/lib64/python3.11/subprocess.py", line 1026, in __init__
       self._execute_child(args, executable, preexec_fn, close_fds,
     File "/usr/lib64/python3.11/subprocess.py", line 1950, in _execute_child
       raise child_exception_type(errno_num, err_msg, err_filename)
Quoted 1 line

FileNotFoundError: [Errno 2] No such file or directory: 'cargo'

I think this can be fixed in libblkio instead. I'll take a look.

Paolo