diff options
author | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-07-10 03:45:58 +0000 |
---|---|---|
committer | Bruce Ashfield <bruce.ashfield@gmail.com> | 2024-07-10 15:59:26 +0000 |
commit | 61cec3e210f58e0c6d05cde1012d0cf6ea072795 (patch) | |
tree | 38adf6664cb0dd9f86a5c9e780ed1500fa6173b9 /recipes-extended | |
parent | 7d0768c428517ed91d589ffd3ec5956e9704e20b (diff) | |
download | meta-virtualization-61cec3e210f58e0c6d05cde1012d0cf6ea072795.tar.gz |
libvirt: update to v10.5.0 and convert to git
Rather than waiting for release tarballs for the main libvirt
release, we can just use the git repository directory and
avoid patch backporting for CVEs, etc.
As part of this change, we adjust to git, refresh our
meson build patch, and add a new meson patch for the
tests.
We also split out LIBVIRT_VERSION, so that nested builds
can use it to locate tarballs.
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
Diffstat (limited to 'recipes-extended')
-rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 8 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch | 31 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch | 38 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt_git.bb (renamed from recipes-extended/libvirt/libvirt_10.0.0.bb) | 15 |
4 files changed, 84 insertions, 8 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index 40c362d6..471d33d6 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc | |||
@@ -18,9 +18,9 @@ FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" | |||
18 | # Currently the libvirt-python debug libraries contain buildpaths | 18 | # Currently the libvirt-python debug libraries contain buildpaths |
19 | INSANE_SKIP:${PN}-dbg += "buildpaths" | 19 | INSANE_SKIP:${PN}-dbg += "buildpaths" |
20 | 20 | ||
21 | SRC_URI += "http://libvirt.org/sources/python/${BPN}-python-${PV}.tar.gz;name=libvirt_python;subdir=${BP}" | 21 | SRC_URI += "http://libvirt.org/sources/python/${BPN}-python-${LIBVIRT_VERSION}.tar.gz;name=libvirt_python;subdir=${BP}" |
22 | 22 | ||
23 | SRC_URI[libvirt_python.sha256sum] = "a82588f0e7db53eda7b7dbcbc448b0ec43e00a8c77cac69644495299b410c20d" | 23 | SRC_URI[libvirt_python.sha256sum] = "785023500f58d3e8e829af98647d43eee97e517aacc9d9e7ded43594ea52d032" |
24 | 24 | ||
25 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" | 25 | export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" |
26 | export LIBVIRT_CFLAGS = "-I${S}/include" | 26 | export LIBVIRT_CFLAGS = "-I${S}/include" |
@@ -46,7 +46,7 @@ do_compile:append() { | |||
46 | # the syroot staged pkgconfig entries. So we clear the sysroot | 46 | # the syroot staged pkgconfig entries. So we clear the sysroot |
47 | # for just this portion. | 47 | # for just this portion. |
48 | export PKG_CONFIG_SYSROOT_DIR= | 48 | export PKG_CONFIG_SYSROOT_DIR= |
49 | cd ${S}/${BPN}-python-${PV} && \ | 49 | cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \ |
50 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build | 50 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build |
51 | cd - | 51 | cd - |
52 | fi | 52 | fi |
@@ -58,7 +58,7 @@ do_install:append() { | |||
58 | # the syroot staged pkgconfig entries. So we clear the sysroot | 58 | # the syroot staged pkgconfig entries. So we clear the sysroot |
59 | # for just this portion. | 59 | # for just this portion. |
60 | export PKG_CONFIG_SYSROOT_DIR= | 60 | export PKG_CONFIG_SYSROOT_DIR= |
61 | cd ${S}/${BPN}-python-${PV} && \ | 61 | cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \ |
62 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \ | 62 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \ |
63 | --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS} | 63 | --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS} |
64 | cd - | 64 | cd - |
diff --git a/recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch b/recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch new file mode 100644 index 00000000..04db24d0 --- /dev/null +++ b/recipes-extended/libvirt/libvirt/0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch | |||
@@ -0,0 +1,31 @@ | |||
1 | From d06f0795cfd097c373c7b9824ce59f17c9194520 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Tue, 9 Jul 2024 21:23:47 +0000 | ||
4 | Subject: [PATCH] meson.build: clear abs_top_builddir to avoid QA warnings | ||
5 | |||
6 | If we don't clear the absolute directories from the build, | ||
7 | we'll get QA warnings on packaging. | ||
8 | |||
9 | Upstream-Status: Inappropriate [oe specific] | ||
10 | |||
11 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
12 | --- | ||
13 | src/meson.build | 2 -- | ||
14 | 1 file changed, 2 deletions(-) | ||
15 | |||
16 | diff --git a/src/meson.build b/src/meson.build | ||
17 | index 8cce42c7ad..dc7a81c980 100644 | ||
18 | --- a/src/meson.build | ||
19 | +++ b/src/meson.build | ||
20 | @@ -3,8 +3,6 @@ src_inc_dir = include_directories('.') | ||
21 | src_dep = declare_dependency( | ||
22 | compile_args: [ | ||
23 | '-DIN_LIBVIRT', | ||
24 | - '-Dabs_top_builddir="@0@"'.format(meson.project_build_root()), | ||
25 | - '-Dabs_top_srcdir="@0@"'.format(meson.project_source_root()), | ||
26 | ] + coverage_flags + win32_flags, | ||
27 | dependencies: [ | ||
28 | glib_dep, | ||
29 | -- | ||
30 | 2.39.2 | ||
31 | |||
diff --git a/recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch b/recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch new file mode 100644 index 00000000..4cbe4913 --- /dev/null +++ b/recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch | |||
@@ -0,0 +1,38 @@ | |||
1 | From 05ef0d41895a355601333b5caa413754272fce03 Mon Sep 17 00:00:00 2001 | ||
2 | From: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
3 | Date: Tue, 9 Jul 2024 23:06:39 +0000 | ||
4 | Subject: [PATCH] tests/meson: clear absolute directory paths | ||
5 | |||
6 | Ensure that the abs_* directory definitions are cleared, so | ||
7 | they'll be consistent with the top level definitions and so | ||
8 | we won't hav QA warnings due to tmpdir references in the | ||
9 | resulting binaries. | ||
10 | |||
11 | Upstream-Status: Inappropriate [oe specific] | ||
12 | |||
13 | Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com> | ||
14 | --- | ||
15 | tests/meson.build | 8 ++++---- | ||
16 | 1 file changed, 4 insertions(+), 4 deletions(-) | ||
17 | |||
18 | diff --git a/tests/meson.build b/tests/meson.build | ||
19 | index 2f1eda1f95..6fa8308385 100644 | ||
20 | --- a/tests/meson.build | ||
21 | +++ b/tests/meson.build | ||
22 | @@ -1,9 +1,9 @@ | ||
23 | tests_dep = declare_dependency( | ||
24 | compile_args: [ | ||
25 | - '-Dabs_builddir="@0@"'.format(meson.current_build_dir()), | ||
26 | - '-Dabs_top_builddir="@0@"'.format(meson.project_build_root()), | ||
27 | - '-Dabs_srcdir="@0@"'.format(meson.current_source_dir()), | ||
28 | - '-Dabs_top_srcdir="@0@"'.format(meson.project_source_root()), | ||
29 | + '-Dabs_builddir="@0@"'.format(' '), | ||
30 | + '-Dabs_top_builddir="@0@"'.format(' '), | ||
31 | + '-Dabs_srcdir="@0@"'.format(' '), | ||
32 | + '-Dabs_top_srcdir="@0@"'.format(' '), | ||
33 | ] + coverage_flags + cc_flags_relaxed_frame_limit, | ||
34 | dependencies: [ | ||
35 | apparmor_dep, | ||
36 | -- | ||
37 | 2.39.2 | ||
38 | |||
diff --git a/recipes-extended/libvirt/libvirt_10.0.0.bb b/recipes-extended/libvirt/libvirt_git.bb index 8e54406a..20203ec2 100644 --- a/recipes-extended/libvirt/libvirt_10.0.0.bb +++ b/recipes-extended/libvirt/libvirt_git.bb | |||
@@ -24,7 +24,12 @@ RDEPENDS:libvirt-libvirtd:append:aarch64 = " dmidecode" | |||
24 | #connman blocks the 53 port and libvirtd can't start its DNS service | 24 | #connman blocks the 53 port and libvirtd can't start its DNS service |
25 | RCONFLICTS:${PN}_libvirtd = "connman" | 25 | RCONFLICTS:${PN}_libvirtd = "connman" |
26 | 26 | ||
27 | SRC_URI = "http://libvirt.org/sources/${BP}.tar.xz;name=libvirt \ | 27 | SRCREV_libvirt = "0d3e962d47470165b28f742704385acefd70327e" |
28 | |||
29 | LIBVIRT_VERSION = "10.5.0" | ||
30 | PV = "v${LIBVIRT_VERSION}+git" | ||
31 | |||
32 | SRC_URI = "gitsm://github.com/libvirt/libvirt.git;name=libvirt;protocol=https;branch=master \ | ||
28 | file://libvirtd.sh \ | 33 | file://libvirtd.sh \ |
29 | file://libvirtd.conf \ | 34 | file://libvirtd.conf \ |
30 | file://dnsmasq.conf \ | 35 | file://dnsmasq.conf \ |
@@ -32,9 +37,11 @@ SRC_URI = "http://libvirt.org/sources/${BP}.tar.xz;name=libvirt \ | |||
32 | file://gnutls-helper.py;subdir=${BP} \ | 37 | file://gnutls-helper.py;subdir=${BP} \ |
33 | file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \ | 38 | file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \ |
34 | file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ | 39 | file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ |
40 | file://0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch \ | ||
41 | file://0001-tests-meson-clear-absolute-directory-paths.patch \ | ||
35 | " | 42 | " |
36 | 43 | ||
37 | SRC_URI[libvirt.sha256sum] = "8ba2e72ec8bdd2418554a1474c42c35704c30174b7611eaf9a16544b71bcf00a" | 44 | S = "${WORKDIR}/git" |
38 | 45 | ||
39 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative | 46 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative |
40 | USERADD_PACKAGES = "${PN}" | 47 | USERADD_PACKAGES = "${PN}" |
@@ -286,14 +293,14 @@ do_install:append() { | |||
286 | 293 | ||
287 | if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then | 294 | if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then |
288 | # Generate sample keys and certificates. | 295 | # Generate sample keys and certificates. |
289 | ${S}/gnutls-helper.py -y | 296 | ${UNPACKDIR}/${BP}/gnutls-helper.py -y |
290 | 297 | ||
291 | # Deploy all sample keys and certificates of CA, server and client | 298 | # Deploy all sample keys and certificates of CA, server and client |
292 | # to target so that libvirtd is able to boot successfully and local | 299 | # to target so that libvirtd is able to boot successfully and local |
293 | # connection via 127.0.0.1 is available out of box. | 300 | # connection via 127.0.0.1 is available out of box. |
294 | install -d ${D}/etc/pki/CA | 301 | install -d ${D}/etc/pki/CA |
295 | install -d ${D}/etc/pki/libvirt/private | 302 | install -d ${D}/etc/pki/libvirt/private |
296 | install -m 0755 ${S}/gnutls-helper.py ${D}/${bindir} | 303 | install -m 0755 ${UNPACKDIR}/${BP}/gnutls-helper.py ${D}/${bindir} |
297 | install -m 0644 cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem | 304 | install -m 0644 cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem |
298 | install -m 0644 cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem | 305 | install -m 0644 cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem |
299 | install -m 0644 serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem | 306 | install -m 0644 serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem |