diff options
Diffstat (limited to 'recipes-extended/libvirt')
-rw-r--r-- | recipes-extended/libvirt/libvirt-python.inc | 12 | ||||
-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-messon.build-remove-build-path-information-to-avoid-.patch | 14 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch | 76 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/0001-tests-meson-clear-absolute-directory-paths.patch | 38 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt/libvirt-qemu.conf | 0 | ||||
-rw-r--r-- | recipes-extended/libvirt/libvirt_git.bb (renamed from recipes-extended/libvirt/libvirt_10.0.0.bb) | 61 |
7 files changed, 191 insertions, 41 deletions
diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index 6fb2b68c..20c9f69b 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc | |||
@@ -18,14 +18,14 @@ 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/libvirt-python-${PV}.tar.gz;name=libvirt_python" | 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] = "00efb9a781087668512d6a002eb9cd136e44ff8701ac6793cc13b6fdc6d9ef8f" |
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" |
27 | export LIBVIRT_LIBS = "-L${B}/src/.libs -lvirt -ldl" | 27 | export LIBVIRT_LIBS = "-L${B}/src/.libs -lvirt -ldl" |
28 | export LDFLAGS="-L${B}/src/.libs" | 28 | export LDFLAGS = "-L${B}/src/.libs" |
29 | 29 | ||
30 | LIBVIRT_INSTALL_ARGS = "--root=${D} \ | 30 | LIBVIRT_INSTALL_ARGS = "--root=${D} \ |
31 | --prefix=${prefix} \ | 31 | --prefix=${prefix} \ |
@@ -46,8 +46,9 @@ 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 ${WORKDIR}/${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 | fi | 52 | fi |
52 | } | 53 | } |
53 | 54 | ||
@@ -57,8 +58,9 @@ do_install:append() { | |||
57 | # the syroot staged pkgconfig entries. So we clear the sysroot | 58 | # the syroot staged pkgconfig entries. So we clear the sysroot |
58 | # for just this portion. | 59 | # for just this portion. |
59 | export PKG_CONFIG_SYSROOT_DIR= | 60 | export PKG_CONFIG_SYSROOT_DIR= |
60 | cd ${WORKDIR}/${BPN}-python-${PV} && \ | 61 | cd ${UNPACKDIR}/${BP}/${BPN}-python-${LIBVIRT_VERSION} && \ |
61 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \ | 62 | ${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \ |
62 | --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS} | 63 | --install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS} |
64 | cd - | ||
63 | fi | 65 | fi |
64 | } | 66 | } |
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-messon.build-remove-build-path-information-to-avoid-.patch b/recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch index d9bcef0b..c68e05b9 100644 --- a/recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch +++ b/recipes-extended/libvirt/libvirt/0001-messon.build-remove-build-path-information-to-avoid-.patch | |||
@@ -25,11 +25,11 @@ Signed-off-by: Xiangyu Chen <xiangyu.chen@windriver.com> | |||
25 | meson.build | 10 +++++----- | 25 | meson.build | 10 +++++----- |
26 | 1 file changed, 5 insertions(+), 5 deletions(-) | 26 | 1 file changed, 5 insertions(+), 5 deletions(-) |
27 | 27 | ||
28 | Index: libvirt-9.2.0/meson.build | 28 | Index: git/meson.build |
29 | =================================================================== | 29 | =================================================================== |
30 | --- libvirt-9.2.0.orig/meson.build | 30 | --- git.orig/meson.build |
31 | +++ libvirt-9.2.0/meson.build | 31 | +++ git/meson.build |
32 | @@ -26,8 +26,8 @@ | 32 | @@ -38,8 +38,8 @@ |
33 | conf = configuration_data() | 33 | conf = configuration_data() |
34 | 34 | ||
35 | conf.set('_GNU_SOURCE', 1) | 35 | conf.set('_GNU_SOURCE', 1) |
@@ -40,7 +40,7 @@ Index: libvirt-9.2.0/meson.build | |||
40 | conf.set_quoted('PACKAGE', meson.project_name()) | 40 | conf.set_quoted('PACKAGE', meson.project_name()) |
41 | conf.set_quoted('PACKAGE_NAME', meson.project_name()) | 41 | conf.set_quoted('PACKAGE_NAME', meson.project_name()) |
42 | conf.set_quoted('PACKAGE_VERSION', meson.project_version()) | 42 | conf.set_quoted('PACKAGE_VERSION', meson.project_version()) |
43 | @@ -1770,9 +1770,9 @@ | 43 | @@ -1830,9 +1830,9 @@ |
44 | use_storage = true | 44 | use_storage = true |
45 | 45 | ||
46 | conf.set('WITH_STORAGE_FS', 1) | 46 | conf.set('WITH_STORAGE_FS', 1) |
@@ -50,6 +50,6 @@ Index: libvirt-9.2.0/meson.build | |||
50 | + conf.set_quoted('MOUNT', '/usr/bin/mount') | 50 | + conf.set_quoted('MOUNT', '/usr/bin/mount') |
51 | + conf.set_quoted('UMOUNT', '/usr/bin/umount') | 51 | + conf.set_quoted('UMOUNT', '/usr/bin/umount') |
52 | + conf.set_quoted('MKFS', '/usr/sbin/mkfs') | 52 | + conf.set_quoted('MKFS', '/usr/sbin/mkfs') |
53 | endif | ||
54 | endif | ||
53 | 55 | ||
54 | showmount_prog = find_program('showmount', required: false, dirs: libvirt_sbin_path) | ||
55 | showmount_path = '' | ||
diff --git a/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch b/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch new file mode 100644 index 00000000..7263666a --- /dev/null +++ b/recipes-extended/libvirt/libvirt/0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch | |||
@@ -0,0 +1,76 @@ | |||
1 | From c4636402c06ab5ae436176daf0ef17005346e27d Mon Sep 17 00:00:00 2001 | ||
2 | From: Chen Qi <Qi.Chen@windriver.com> | ||
3 | Date: Mon, 2 Sep 2024 22:15:51 -0700 | ||
4 | Subject: [PATCH] qemu_nbdkit.c: use %llu to print time_t | ||
5 | |||
6 | Use %lu to print time_t will give use the following error: | ||
7 | |||
8 | error: format '%lu' expects argument of type 'long unsigned int', | ||
9 | but argument 10 has type 'time_t' {aka 'long long int'} [-Werror=format=] | ||
10 | |||
11 | So use %llu to print time_t. | ||
12 | |||
13 | Upstream-Status: Submitted [https://lists.libvirt.org/archives/list/devel@lists.libvirt.org/thread/FQSQMML6VWMHNWBYP67OLCUTJY5LJQST/] | ||
14 | |||
15 | Signed-off-by: Chen Qi <Qi.Chen@windriver.com> | ||
16 | --- | ||
17 | src/qemu/qemu_nbdkit.c | 24 ++++++++++++------------ | ||
18 | 1 file changed, 12 insertions(+), 12 deletions(-) | ||
19 | |||
20 | diff --git a/src/qemu/qemu_nbdkit.c b/src/qemu/qemu_nbdkit.c | ||
21 | index f099f35e1e..fe660c78e5 100644 | ||
22 | --- a/src/qemu/qemu_nbdkit.c | ||
23 | +++ b/src/qemu/qemu_nbdkit.c | ||
24 | @@ -544,18 +544,18 @@ qemuNbdkitCapsFormatCache(qemuNbdkitCaps *nbdkitCaps) | ||
25 | |||
26 | virBufferEscapeString(&buf, "<path>%s</path>\n", | ||
27 | nbdkitCaps->path); | ||
28 | - virBufferAsprintf(&buf, "<nbdkitctime>%lu</nbdkitctime>\n", | ||
29 | - nbdkitCaps->ctime); | ||
30 | + virBufferAsprintf(&buf, "<nbdkitctime>%llu</nbdkitctime>\n", | ||
31 | + (long long)nbdkitCaps->ctime); | ||
32 | virBufferEscapeString(&buf, "<plugindir>%s</plugindir>\n", | ||
33 | nbdkitCaps->pluginDir); | ||
34 | - virBufferAsprintf(&buf, "<plugindirmtime>%lu</plugindirmtime>\n", | ||
35 | - nbdkitCaps->pluginDirMtime); | ||
36 | + virBufferAsprintf(&buf, "<plugindirmtime>%llu</plugindirmtime>\n", | ||
37 | + (long long)nbdkitCaps->pluginDirMtime); | ||
38 | virBufferEscapeString(&buf, "<filterdir>%s</filterdir>\n", | ||
39 | nbdkitCaps->filterDir); | ||
40 | - virBufferAsprintf(&buf, "<filterdirmtime>%lu</filterdirmtime>\n", | ||
41 | - nbdkitCaps->filterDirMtime); | ||
42 | - virBufferAsprintf(&buf, "<selfctime>%lu</selfctime>\n", | ||
43 | - nbdkitCaps->libvirtCtime); | ||
44 | + virBufferAsprintf(&buf, "<filterdirmtime>%llu</filterdirmtime>\n", | ||
45 | + (long long)nbdkitCaps->filterDirMtime); | ||
46 | + virBufferAsprintf(&buf, "<selfctime>%llu</selfctime>\n", | ||
47 | + (long long)nbdkitCaps->libvirtCtime); | ||
48 | virBufferAsprintf(&buf, "<selfvers>%u</selfvers>\n", | ||
49 | nbdkitCaps->libvirtVersion); | ||
50 | |||
51 | @@ -593,10 +593,10 @@ virNbdkitCapsSaveFile(void *data, | ||
52 | return -1; | ||
53 | } | ||
54 | |||
55 | - VIR_DEBUG("Saved caps '%s' for '%s' with (%lu, %lu)", | ||
56 | + VIR_DEBUG("Saved caps '%s' for '%s' with (%llu, %llu)", | ||
57 | filename, nbdkitCaps->path, | ||
58 | - nbdkitCaps->ctime, | ||
59 | - nbdkitCaps->libvirtCtime); | ||
60 | + (long long)nbdkitCaps->ctime, | ||
61 | + (long long)nbdkitCaps->libvirtCtime); | ||
62 | |||
63 | return 0; | ||
64 | } | ||
65 | @@ -1054,7 +1054,7 @@ qemuNbdkitProcessBuildCommandCurl(qemuNbdkitProcess *proc, | ||
66 | } | ||
67 | |||
68 | if (proc->source->timeout > 0) { | ||
69 | - g_autofree char *timeout = g_strdup_printf("%llu", proc->source->timeout); | ||
70 | + g_autofree char *timeout = g_strdup_printf("%llu", (long long)proc->source->timeout); | ||
71 | virCommandAddArgPair(cmd, "timeout", timeout); | ||
72 | } | ||
73 | |||
74 | -- | ||
75 | 2.25.1 | ||
76 | |||
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/libvirt-qemu.conf b/recipes-extended/libvirt/libvirt/libvirt-qemu.conf new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/recipes-extended/libvirt/libvirt/libvirt-qemu.conf | |||
diff --git a/recipes-extended/libvirt/libvirt_10.0.0.bb b/recipes-extended/libvirt/libvirt_git.bb index 6b19b700..7ed708f5 100644 --- a/recipes-extended/libvirt/libvirt_10.0.0.bb +++ b/recipes-extended/libvirt/libvirt_git.bb | |||
@@ -24,23 +24,33 @@ 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/libvirt-${PV}.tar.xz;name=libvirt \ | 27 | SRCREV_libvirt = "9cd06737487c8ee311f71b7288c46a5cc70a700a" |
28 | |||
29 | LIBVIRT_VERSION = "11.1.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 \ |
31 | file://hook_support.py \ | 36 | file://hook_support.py \ |
32 | file://gnutls-helper.py \ | 37 | file://gnutls-helper.py;subdir=${BP} \ |
38 | file://libvirt-qemu.conf \ | ||
33 | file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \ | 39 | file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \ |
34 | file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ | 40 | file://0001-messon.build-remove-build-path-information-to-avoid-.patch \ |
41 | file://0001-meson.build-clear-abs_top_builddir-to-avoid-QA-warni.patch \ | ||
42 | file://0001-tests-meson-clear-absolute-directory-paths.patch \ | ||
43 | file://0001-qemu_nbdkit.c-use-llu-to-print-time_t.patch \ | ||
35 | " | 44 | " |
36 | 45 | ||
37 | SRC_URI[libvirt.sha256sum] = "8ba2e72ec8bdd2418554a1474c42c35704c30174b7611eaf9a16544b71bcf00a" | 46 | S = "${WORKDIR}/git" |
38 | 47 | ||
39 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative | 48 | inherit meson gettext update-rc.d pkgconfig systemd useradd perlnative |
40 | USERADD_PACKAGES = "${PN}" | 49 | USERADD_PACKAGES = "${PN}" |
41 | GROUPADD_PARAM:${PN} = "-r qemu; -r kvm" | 50 | GROUPADD_PARAM:${PN} = "-r qemu; -r kvm; -r libvirt; -r virtlogin" |
42 | USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu" | 51 | USERADD_PARAM:${PN} = "-r -g qemu -G kvm qemu" |
43 | 52 | ||
53 | CFLAGS += "${@oe.utils.vartrue('DEBUG_BUILD', '-Wno-error=inline', '', d)}" | ||
44 | 54 | ||
45 | EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" | 55 | EXTRA_OEMESON += "--cross-file ${WORKDIR}/meson-${PN}.cross" |
46 | do_write_config:append() { | 56 | do_write_config:append() { |
@@ -78,6 +88,7 @@ FILES:${PN}-virsh = " \ | |||
78 | ${bindir}/virsh \ | 88 | ${bindir}/virsh \ |
79 | ${datadir}/bash-completion/completions/virsh \ | 89 | ${datadir}/bash-completion/completions/virsh \ |
80 | " | 90 | " |
91 | RDEPENDS:${PN}-virsh = "${PN}-libvirtd" | ||
81 | 92 | ||
82 | FILES:${PN} += "${libdir}/libvirt/connection-driver \ | 93 | FILES:${PN} += "${libdir}/libvirt/connection-driver \ |
83 | ${datadir}/augeas \ | 94 | ${datadir}/augeas \ |
@@ -85,6 +96,7 @@ FILES:${PN} += "${libdir}/libvirt/connection-driver \ | |||
85 | ${datadir}/bash-completion/completions/vsh \ | 96 | ${datadir}/bash-completion/completions/vsh \ |
86 | ${datadir}/bash-completion/completions/virt-admin \ | 97 | ${datadir}/bash-completion/completions/virt-admin \ |
87 | /usr/lib/firewalld/ \ | 98 | /usr/lib/firewalld/ \ |
99 | ${nonarch_libdir}/sysusers.d/ \ | ||
88 | " | 100 | " |
89 | 101 | ||
90 | FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" | 102 | FILES:${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" |
@@ -118,7 +130,7 @@ SYSTEMD_SERVICE:${PN}-libvirtd = " \ | |||
118 | #PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" | 130 | #PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" |
119 | 131 | ||
120 | # full config | 132 | # full config |
121 | PACKAGECONFIG ??= "gnutls qemu yajl openvz vmware vbox esx lxc test remote \ | 133 | PACKAGECONFIG ??= "gnutls qemu openvz vmware vbox esx lxc test remote \ |
122 | libvirtd netcf udev python fuse firewalld libpcap \ | 134 | libvirtd netcf udev python fuse firewalld libpcap \ |
123 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ | 135 | ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ |
124 | ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \ | 136 | ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'libxl', '', d)} \ |
@@ -138,8 +150,7 @@ PACKAGECONFIG:remove:armeb = "numactl" | |||
138 | # enable,disable,depends,rdepends | 150 | # enable,disable,depends,rdepends |
139 | # | 151 | # |
140 | PACKAGECONFIG[gnutls] = ",,,gnutls-bin" | 152 | PACKAGECONFIG[gnutls] = ",,,gnutls-bin" |
141 | PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu," | 153 | PACKAGECONFIG[qemu] = "-Ddriver_qemu=enabled -Dqemu_user=qemu -Dqemu_group=qemu,-Ddriver_qemu=disabled,qemu json-c," |
142 | PACKAGECONFIG[yajl] = "-Dyajl=enabled,-Dyajl=disabled,yajl,yajl" | ||
143 | PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen," | 154 | PACKAGECONFIG[libxl] = "-Ddriver_libxl=enabled,-Ddriver_libxl=disabled,xen," |
144 | PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,," | 155 | PACKAGECONFIG[openvz] = "-Ddriver_openvz=enabled,-Ddriver_openvz=disabled,," |
145 | PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,," | 156 | PACKAGECONFIG[vmware] = "-Ddriver_vmware=enabled,-Ddriver_vmware=disabled,," |
@@ -194,9 +205,11 @@ do_install:append() { | |||
194 | install -d ${D}/etc/init.d | 205 | install -d ${D}/etc/init.d |
195 | install -d ${D}/etc/libvirt | 206 | install -d ${D}/etc/libvirt |
196 | install -d ${D}/etc/dnsmasq.d | 207 | install -d ${D}/etc/dnsmasq.d |
208 | install -d ${D}${nonarch_libdir}/sysusers.d/ | ||
197 | 209 | ||
198 | install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd | 210 | install -m 0755 ${UNPACKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd |
199 | install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf | 211 | install -m 0644 ${UNPACKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf |
212 | install -m 0644 ${UNPACKDIR}/libvirt-qemu.conf ${D}${nonarch_libdir}/sysusers.d/libvirt-qemu.conf | ||
200 | 213 | ||
201 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then | 214 | if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then |
202 | # This will wind up in the libvirtd package, but will NOT be invoked by default. | 215 | # This will wind up in the libvirtd package, but will NOT be invoked by default. |
@@ -236,15 +249,6 @@ do_install:append() { | |||
236 | echo "d root root 0755 /run/libvirt/qemu none" \ | 249 | echo "d root root 0755 /run/libvirt/qemu none" \ |
237 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt | 250 | >> ${D}${sysconfdir}/default/volatiles/99_libvirt |
238 | 251 | ||
239 | # Manually set permissions and ownership to match polkit recipe | ||
240 | if ${@bb.utils.contains('PACKAGECONFIG', 'polkit', 'true', 'false', d)}; then | ||
241 | install -d -m 0700 ${D}/${datadir}/polkit-1/rules.d | ||
242 | chown polkitd ${D}/${datadir}/polkit-1/rules.d | ||
243 | chgrp root ${D}/${datadir}/polkit-1/rules.d | ||
244 | else | ||
245 | rm -rf ${D}/${datadir}/polkit-1 | ||
246 | fi | ||
247 | |||
248 | # disable seccomp_sandbox | 252 | # disable seccomp_sandbox |
249 | if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then | 253 | if [ -e ${D}${sysconfdir}/libvirt/qemu.conf ] ; then |
250 | sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \ | 254 | sed -i '/^#seccomp_sandbox = 1/aseccomp_sandbox = 0' \ |
@@ -255,12 +259,12 @@ do_install:append() { | |||
255 | mkdir -p ${D}/etc/libvirt/hooks | 259 | mkdir -p ${D}/etc/libvirt/hooks |
256 | for hook in "daemon" "lxc" "network" "qemu" | 260 | for hook in "daemon" "lxc" "network" "qemu" |
257 | do | 261 | do |
258 | install -m 0755 ${WORKDIR}/hook_support.py ${D}/etc/libvirt/hooks/${hook} | 262 | install -m 0755 ${UNPACKDIR}/hook_support.py ${D}/etc/libvirt/hooks/${hook} |
259 | done | 263 | done |
260 | 264 | ||
261 | # Force the main dnsmasq instance to bind only to specified interfaces and | 265 | # Force the main dnsmasq instance to bind only to specified interfaces and |
262 | # to not bind to virbr0. Libvirt will run its own instance on this interface. | 266 | # to not bind to virbr0. Libvirt will run its own instance on this interface. |
263 | install -m 644 ${WORKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon | 267 | install -m 644 ${UNPACKDIR}/dnsmasq.conf ${D}/${sysconfdir}/dnsmasq.d/libvirt-daemon |
264 | 268 | ||
265 | # remove .la references to our working diretory | 269 | # remove .la references to our working diretory |
266 | for i in `find ${D}${libdir} -type f -name *.la`; do | 270 | for i in `find ${D}${libdir} -type f -name *.la`; do |
@@ -286,21 +290,20 @@ do_install:append() { | |||
286 | 290 | ||
287 | if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then | 291 | if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then |
288 | # Generate sample keys and certificates. | 292 | # Generate sample keys and certificates. |
289 | cd ${WORKDIR} | 293 | ${UNPACKDIR}/${BP}/gnutls-helper.py -y |
290 | ${WORKDIR}/gnutls-helper.py -y | ||
291 | 294 | ||
292 | # Deploy all sample keys and certificates of CA, server and client | 295 | # Deploy all sample keys and certificates of CA, server and client |
293 | # to target so that libvirtd is able to boot successfully and local | 296 | # to target so that libvirtd is able to boot successfully and local |
294 | # connection via 127.0.0.1 is available out of box. | 297 | # connection via 127.0.0.1 is available out of box. |
295 | install -d ${D}/etc/pki/CA | 298 | install -d ${D}/etc/pki/CA |
296 | install -d ${D}/etc/pki/libvirt/private | 299 | install -d ${D}/etc/pki/libvirt/private |
297 | install -m 0755 ${WORKDIR}/gnutls-helper.py ${D}/${bindir} | 300 | install -m 0755 ${UNPACKDIR}/${BP}/gnutls-helper.py ${D}/${bindir} |
298 | install -m 0644 ${WORKDIR}/cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem | 301 | install -m 0644 cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem |
299 | install -m 0644 ${WORKDIR}/cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem | 302 | install -m 0644 cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem |
300 | install -m 0644 ${WORKDIR}/serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem | 303 | install -m 0644 serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem |
301 | install -m 0644 ${WORKDIR}/servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem | 304 | install -m 0644 servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem |
302 | install -m 0644 ${WORKDIR}/clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem | 305 | install -m 0644 clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem |
303 | install -m 0644 ${WORKDIR}/clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem | 306 | install -m 0644 clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem |
304 | 307 | ||
305 | # Force the connection to be tls. | 308 | # Force the connection to be tls. |
306 | sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf | 309 | sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf |