From af2948e0483c56abf191d65e0e2d412974c21357 Mon Sep 17 00:00:00 2001 From: Kai Kang Date: Thu, 4 Aug 2016 17:38:02 +0800 Subject: libvirt: upgrade 1.3.2 -> 1.3.5 Upgrade libvirt from 1.3.2 to 1.3.5. * update checksums and remove PR * remove trailing whitespace * remove backport patch 0001-fix-crash-in-getAllDomainStats.patch * update context of patches * remove libvirtd.socket from SYSTEMD_SERVICE which doesn't exist anymore * install test data which ptest requires Signed-off-by: Kai Kang Signed-off-by: Bruce Ashfield --- .../libvirt-1.3.2/0001-to-fix-build-error.patch | 46 ---- .../libvirt-1.3.5/0001-to-fix-build-error.patch | 46 ++++ recipes-extended/libvirt/libvirt-python.inc | 5 +- .../0001-fix-crash-in-getAllDomainStats.patch | 57 ---- ...vert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch | 16 +- .../libvirt/libvirt/install-missing-file.patch | 12 +- recipes-extended/libvirt/libvirt/runptest.patch | 34 +-- recipes-extended/libvirt/libvirt_1.3.2.bb | 288 --------------------- recipes-extended/libvirt/libvirt_1.3.5.bb | 288 +++++++++++++++++++++ 9 files changed, 376 insertions(+), 416 deletions(-) delete mode 100644 recipes-extended/libvirt/libvirt-1.3.2/0001-to-fix-build-error.patch create mode 100644 recipes-extended/libvirt/libvirt-1.3.5/0001-to-fix-build-error.patch delete mode 100644 recipes-extended/libvirt/libvirt/0001-fix-crash-in-getAllDomainStats.patch delete mode 100644 recipes-extended/libvirt/libvirt_1.3.2.bb create mode 100644 recipes-extended/libvirt/libvirt_1.3.5.bb diff --git a/recipes-extended/libvirt/libvirt-1.3.2/0001-to-fix-build-error.patch b/recipes-extended/libvirt/libvirt-1.3.2/0001-to-fix-build-error.patch deleted file mode 100644 index 089ee330..00000000 --- a/recipes-extended/libvirt/libvirt-1.3.2/0001-to-fix-build-error.patch +++ /dev/null @@ -1,46 +0,0 @@ -From 8353dc1e642011199c3b3ba057d51d8768e4cd54 Mon Sep 17 00:00:00 2001 -From: Lei Maohui -Date: Fri, 31 Jul 2015 03:17:07 +0900 -Subject: [PATCH] to fix build error - -The error likes as following - -| Generating internals/command.html.tmp -| /bin/sh: line 3: internals/command.html.tmp: No such file or directory -| rm: Generating internals/locking.html.tmp -| cannot remove `internals/command.html.tmp': No such file or directory -| make[3]: *** [internals/command.html.tmp] Error 1 -| make[3]: *** Waiting for unfinished jobs.... - -Signed-off-by: Lei Maohui -[ywei: rebased to libvirt-1.3.2] -Signed-off-by: Yunguo Wei ---- - docs/Makefile.am | 4 ++-- - 1 file changed, 2 insertions(+), 2 deletions(-) - -diff --git a/docs/Makefile.am b/docs/Makefile.am -index 1b4353b..c199551 100644 ---- a/docs/Makefile.am -+++ b/docs/Makefile.am -@@ -164,7 +164,7 @@ EXTRA_DIST= \ - todo.pl hvsupport.pl todo.cfg-example \ - $(schema_DATA) - --acl_generated = aclperms.htmlinc -+acl.html:: $(srcdir)/aclperms.htmlinc - - $(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \ - $(srcdir)/genaclperms.pl Makefile.am -@@ -221,7 +221,7 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \ - convert -rotate 90 $< $@ - - %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \ -- sitemap.html.in $(acl_generated) -+ sitemap.html.in - @if [ -x $(XSLTPROC) ] ; then \ - echo "Generating $@"; \ - name=`echo $@ | sed -e 's/.tmp//'`; \ --- -1.9.1 - diff --git a/recipes-extended/libvirt/libvirt-1.3.5/0001-to-fix-build-error.patch b/recipes-extended/libvirt/libvirt-1.3.5/0001-to-fix-build-error.patch new file mode 100644 index 00000000..089ee330 --- /dev/null +++ b/recipes-extended/libvirt/libvirt-1.3.5/0001-to-fix-build-error.patch @@ -0,0 +1,46 @@ +From 8353dc1e642011199c3b3ba057d51d8768e4cd54 Mon Sep 17 00:00:00 2001 +From: Lei Maohui +Date: Fri, 31 Jul 2015 03:17:07 +0900 +Subject: [PATCH] to fix build error + +The error likes as following + +| Generating internals/command.html.tmp +| /bin/sh: line 3: internals/command.html.tmp: No such file or directory +| rm: Generating internals/locking.html.tmp +| cannot remove `internals/command.html.tmp': No such file or directory +| make[3]: *** [internals/command.html.tmp] Error 1 +| make[3]: *** Waiting for unfinished jobs.... + +Signed-off-by: Lei Maohui +[ywei: rebased to libvirt-1.3.2] +Signed-off-by: Yunguo Wei +--- + docs/Makefile.am | 4 ++-- + 1 file changed, 2 insertions(+), 2 deletions(-) + +diff --git a/docs/Makefile.am b/docs/Makefile.am +index 1b4353b..c199551 100644 +--- a/docs/Makefile.am ++++ b/docs/Makefile.am +@@ -164,7 +164,7 @@ EXTRA_DIST= \ + todo.pl hvsupport.pl todo.cfg-example \ + $(schema_DATA) + +-acl_generated = aclperms.htmlinc ++acl.html:: $(srcdir)/aclperms.htmlinc + + $(srcdir)/aclperms.htmlinc: $(top_srcdir)/src/access/viraccessperm.h \ + $(srcdir)/genaclperms.pl Makefile.am +@@ -221,7 +221,7 @@ $(srcdir)/hvsupport.html.in: $(srcdir)/hvsupport.pl $(api_DATA) \ + convert -rotate 90 $< $@ + + %.html.tmp: %.html.in site.xsl subsite.xsl page.xsl \ +- sitemap.html.in $(acl_generated) ++ sitemap.html.in + @if [ -x $(XSLTPROC) ] ; then \ + echo "Generating $@"; \ + name=`echo $@ | sed -e 's/.tmp//'`; \ +-- +1.9.1 + diff --git a/recipes-extended/libvirt/libvirt-python.inc b/recipes-extended/libvirt/libvirt-python.inc index 7a7a4cc5..bc2f1de2 100644 --- a/recipes-extended/libvirt/libvirt-python.inc +++ b/recipes-extended/libvirt/libvirt-python.inc @@ -17,10 +17,9 @@ FILES_${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*" SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python" SRC_URI += "file://libvirt_api_xml_path.patch;patchdir=../libvirt-python-${PV}" -SRC_URI += "file://0001-fix-crash-in-getAllDomainStats.patch;patchdir=../libvirt-python-${PV}" -SRC_URI[libvirt_python.md5sum] = "ed018c714d7ddbe93221c796dff283ed" -SRC_URI[libvirt_python.sha256sum] = "6d35ae9e7801573393b9c92471f39e6700d479f10b641df81d041b469f160bf8" +SRC_URI[libvirt_python.md5sum] = "4dbd7ef9ee9c4dea5887b5b31eb04529" +SRC_URI[libvirt_python.sha256sum] = "a0508a57637fd18a3584fb9d2322fb172f65708c9db16e0438a70eb0f36fa5c2" export LIBVIRT_API_PATH = "${S}/docs/libvirt-api.xml" export LIBVIRT_CFLAGS = "-I${S}/include" diff --git a/recipes-extended/libvirt/libvirt/0001-fix-crash-in-getAllDomainStats.patch b/recipes-extended/libvirt/libvirt/0001-fix-crash-in-getAllDomainStats.patch deleted file mode 100644 index 0583a940..00000000 --- a/recipes-extended/libvirt/libvirt/0001-fix-crash-in-getAllDomainStats.patch +++ /dev/null @@ -1,57 +0,0 @@ -From e9c4e2abffef007a28112ebb40a9586b0128f10b Mon Sep 17 00:00:00 2001 -From: Pavel Hrdina -Date: Mon, 18 Apr 2016 16:53:50 +0200 -Subject: [PATCH] fix crash in getAllDomainStats - -Upstream-Status: Backport - -Commits 1d39dbaf and 827ed9b4 broke the libvirt-python API by removing -virDomainRef() and virDomainFree(). virDomainStatsRecordListFree() will -free that domain pointer and later when virDomain (python object) call -its destructor and tries to free that same pointer again. - -Resolves: https://bugzilla.redhat.com/show_bug.cgi?id=1326839 - -Signed-off-by: Pavel Hrdina ---- - libvirt-override.c | 8 +++++++- - 1 file changed, 7 insertions(+), 1 deletion(-) - -diff --git a/libvirt-override.c b/libvirt-override.c -index 4640ed5..2de95ce 100644 ---- a/libvirt-override.c -+++ b/libvirt-override.c -@@ -8381,6 +8381,7 @@ convertDomainStatsRecord(virDomainStatsRecordPtr *records, - PyObject *py_retval; - PyObject *py_record; - PyObject *py_record_stats = NULL; -+ virDomainPtr dom = NULL; - size_t i; - - if (!(py_retval = PyList_New(nrecords))) -@@ -8392,9 +8393,12 @@ convertDomainStatsRecord(virDomainStatsRecordPtr *records, - - VIR_PY_LIST_SET_GOTO(py_retval, i, py_record, error); - -+ dom = records[i]->dom; -+ virDomainRef(dom); - VIR_PY_TUPLE_SET_GOTO(py_record, 0, -- libvirt_virDomainPtrWrap(records[i]->dom), -+ libvirt_virDomainPtrWrap(dom), - error); -+ dom = NULL; - - if (!(py_record_stats = getPyVirTypedParameter(records[i]->params, - records[i]->nparams))) -@@ -8406,6 +8410,8 @@ convertDomainStatsRecord(virDomainStatsRecordPtr *records, - return py_retval; - - error: -+ if (dom) -+ virDomainFree(dom); - Py_XDECREF(py_retval); - return NULL; - } --- -2.8.1 - diff --git a/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch b/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch index 16c3a16b..02ddf68e 100644 --- a/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch +++ b/recipes-extended/libvirt/libvirt/Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch @@ -1,3 +1,9 @@ +Upstream-Status: Inappropriate [configuration] + +Update context for version 1.3.5. + +Signed-off-by: Kai Kang +--- From dd915e7f70e676aea93f750c75d16ce646e71e4b Mon Sep 17 00:00:00 2001 From: Mark Asselstine Date: Wed, 9 Sep 2015 11:52:44 -0400 @@ -24,20 +30,20 @@ diff --git a/daemon/Makefile.am b/daemon/Makefile.am index 2dbe81b..41ea2db 100644 --- a/daemon/Makefile.am +++ b/daemon/Makefile.am -@@ -445,7 +445,7 @@ endif ! LIBVIRT_INIT_SCRIPT_UPSTART +@@ -449,7 +449,7 @@ endif ! LIBVIRT_INIT_SCRIPT_UPSTART if LIBVIRT_INIT_SCRIPT_SYSTEMD -SYSTEMD_UNIT_DIR = $(prefix)/lib/systemd/system +SYSTEMD_UNIT_DIR = /lib/systemd/system - BUILT_SOURCES += libvirtd.service libvirtd.socket + BUILT_SOURCES += libvirtd.service - install-init-systemd: install-sysconfig libvirtd.service libvirtd.socket + install-init-systemd: install-sysconfig libvirtd.service diff --git a/src/Makefile.am b/src/Makefile.am index a316b4d..d271291 100644 --- a/src/Makefile.am +++ b/src/Makefile.am -@@ -2594,7 +2594,7 @@ EXTRA_DIST += \ +@@ -2633,7 +2633,7 @@ EXTRA_DIST += \ if WITH_LIBVIRTD if LIBVIRT_INIT_SCRIPT_SYSTEMD @@ -50,7 +56,7 @@ diff --git a/tools/Makefile.am b/tools/Makefile.am index b3227a7..0e58f73 100644 --- a/tools/Makefile.am +++ b/tools/Makefile.am -@@ -356,7 +356,7 @@ libvirt-guests.init: libvirt-guests.init.in libvirt-guests.sh +@@ -380,7 +380,7 @@ libvirt-guests.init: libvirt-guests.init.in libvirt-guests.sh EXTRA_DIST += libvirt-guests.service.in diff --git a/recipes-extended/libvirt/libvirt/install-missing-file.patch b/recipes-extended/libvirt/libvirt/install-missing-file.patch index f6f6e256..ecd4a87b 100644 --- a/recipes-extended/libvirt/libvirt/install-missing-file.patch +++ b/recipes-extended/libvirt/libvirt/install-missing-file.patch @@ -1,3 +1,11 @@ +Upstream-Status: Inapproriate + +This patch is for ptest, so it is inapproriate to send to upstream. + +Update context for 1.3.5. + +Signed-off-by: Kai Kang +--- From 0780181a3285511f166487a54ebc231fc657edfe Mon Sep 17 00:00:00 2001 From: Catalin Enache Date: Mon, 25 Jul 2016 16:38:51 +0300 @@ -14,10 +22,10 @@ diff --git a/tests/Makefile.am b/tests/Makefile.am index 02e0dd8..187fbca 100644 --- a/tests/Makefile.am +++ b/tests/Makefile.am -@@ -155,6 +155,7 @@ EXTRA_DIST = \ +@@ -170,6 +170,7 @@ EXTRA_DIST = \ xml2vmxdata - test_helpers = commandhelper ssh test_conf + test_helpers = commandhelper ssh virconftest +test_misc = test_programs = virshtest sockettest \ nodeinfotest virbuftest \ diff --git a/recipes-extended/libvirt/libvirt/runptest.patch b/recipes-extended/libvirt/libvirt/runptest.patch index a33f5695..b7609a81 100644 --- a/recipes-extended/libvirt/libvirt/runptest.patch +++ b/recipes-extended/libvirt/libvirt/runptest.patch @@ -1,14 +1,18 @@ +Update context for 1.3.5. + +Signed-off-by: Kai Kang +--- Add 'install-ptest' rule. Change TESTS_ENVIRONMENT to allow running outside build dir. Signed-off-by: Mihaela Sendrea Upstream-status: Pending - -Index: libvirt-1.2.4/tests/Makefile.am -=================================================================== ---- libvirt-1.2.4.orig/tests/Makefile.am -+++ libvirt-1.2.4/tests/Makefile.am -@@ -31,9 +31,11 @@ +--- +diff --git a/tests/Makefile.am b/tests/Makefile.am +index 0c4ad3c..bb4e31a 100644 +--- a/tests/Makefile.am ++++ b/tests/Makefile.am +@@ -33,11 +33,13 @@ INCLUDES = \ -I$(top_srcdir)/src/conf \ $(GETTEXT_CPPFLAGS) @@ -16,13 +20,17 @@ Index: libvirt-1.2.4/tests/Makefile.am + AM_CFLAGS = \ - -Dabs_builddir="\"$(abs_builddir)\"" \ +- -Dabs_topbuilddir="\"$(abs_topbuilddir)\"" \ - -Dabs_srcdir="\"$(abs_srcdir)\"" \ +- -Dabs_topsrcdir="\"$(abs_topsrcdir)\"" \ + -Dabs_builddir="\"$(PTEST_DIR)/tests\"" \ ++ -Dabs_topbuilddir="\"$(PTEST_DIR)\"" \ + -Dabs_srcdir="\"$(PTEST_DIR)/tests\"" \ ++ -Dabs_topsrcdir="\"$(PTEST_DIR)\"" \ $(LIBXML_CFLAGS) \ - $(LIBNL_CFLAGS) \ + $(LIBNL_CFLAGS) \ $(GNUTLS_CFLAGS) \ -@@ -48,7 +50,7 @@ +@@ -62,7 +64,7 @@ QEMULIB_LDFLAGS = \ if WITH_DRIVER_MODULES INCLUDES += \ @@ -31,15 +39,12 @@ Index: libvirt-1.2.4/tests/Makefile.am endif WITH_DRIVER_MODULES PROBES_O = -@@ -409,20 +411,19 @@ +@@ -483,17 +485,15 @@ TESTS = $(test_programs) \ # Also, BSD sh doesn't like 'a=b b=$$a', so we can't use an # intermediate shell variable, but must do all the expansion in make -lv_abs_top_builddir=$(shell cd '$(top_builddir)' && pwd) - path_add = $(subst :,$(PATH_SEPARATOR),\ -- $(subst !,$(lv_abs_top_builddir)/,!daemon:!tools:!tests)) -+ $(subst !,$(PTEST_DIR)/,!daemon:!tools:!tests)) - +- VIR_TEST_EXPENSIVE ?= $(VIR_TEST_EXPENSIVE_DEFAULT) TESTS_ENVIRONMENT = \ - abs_top_builddir=$(lv_abs_top_builddir) \ @@ -52,14 +57,13 @@ Index: libvirt-1.2.4/tests/Makefile.am + abs_builddir="$(PTEST_DIR)/tests" \ + abs_srcdir="$(PTEST_DIR)/tests" \ + CONFIG_HEADER="$(PTEST_DIR)/config.h" \ - PATH="$(path_add)$(PATH_SEPARATOR)$$PATH" \ SHELL="$(SHELL)" \ - LIBVIRT_DRIVER_DIR="$(lv_abs_top_builddir)/src/.libs" \ + LIBVIRT_DRIVER_DIR="$(PTEST_DIR)/src/.libs" \ LIBVIRT_AUTOSTART=0 \ LC_ALL=C \ VIR_TEST_EXPENSIVE=$(VIR_TEST_EXPENSIVE) \ -@@ -1137,5 +1138,51 @@ +@@ -1388,5 +1388,51 @@ else ! WITH_CIL EXTRA_DIST += objectlocking.ml endif ! WITH_CIL diff --git a/recipes-extended/libvirt/libvirt_1.3.2.bb b/recipes-extended/libvirt/libvirt_1.3.2.bb deleted file mode 100644 index b11f514a..00000000 --- a/recipes-extended/libvirt/libvirt_1.3.2.bb +++ /dev/null @@ -1,288 +0,0 @@ -DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." -HOMEPAGE = "http://libvirt.org" -LICENSE = "LGPLv2.1+" -LICENSE_${PN}-ptest = "GPLv2+ & LGPLv2.1" -LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ - file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d" -SECTION = "console/tools" -PR = "r1" - -DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \ - iptables dnsmasq readline libtasn1 libxslt-native" - -# libvirt-guests.sh needs gettext.sh -# -RDEPENDS_${PN} = "gettext-runtime" - -RDEPENDS_${PN}-ptest += "make gawk" - -RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd" -RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" -RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" - -#connman blocks the 53 port and libvirtd can't start its DNS service -RCONFLICTS_${PN}_libvirtd = "connman" - -SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \ - file://tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch \ - file://libvirtd.sh \ - file://libvirtd.conf \ - file://runptest.patch \ - file://run-ptest \ - file://tests-allow-separated-src-and-build-dirs.patch \ - file://libvirt-use-pkg-config-to-locate-libcap.patch \ - file://0001-to-fix-build-error.patch \ - file://Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch \ - file://install-missing-file.patch \ - " - -SRC_URI[libvirt.md5sum] = "b48b06bbc7efbe9973ed0f3f223d6da2" -SRC_URI[libvirt.sha256sum] = "e3c6fc2683178660b371efb3ac7a1103a3f4b78efac7ffe560bc5917974ccf05" - -inherit autotools gettext update-rc.d pkgconfig ptest systemd - -CACHED_CONFIGUREVARS += "\ -ac_cv_path_XMLLINT=/usr/bin/xmllint \ -ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ -ac_cv_path_AUGPARSE=/usr/bin/augparse \ -ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ -ac_cv_path_BRCTL=/usr/sbin/brctl \ -ac_cv_path_TC=/sbin/tc \ -ac_cv_path_UDEVADM=/sbin/udevadm \ -ac_cv_path_MODPROBE=/sbin/modprobe \ -ac_cv_path_IP_PATH=/bin/ip \ -ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ -ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ -ac_cv_path_MOUNT=/bin/mount \ -ac_cv_path_UMOUNT=/bin/umount \ -ac_cv_path_MKFS=/usr/sbin/mkfs \ -ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ -ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ -ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ -ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ -ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ -ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ -ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ -ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ -ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ -ac_cv_path_VGSCAN=/usr/sbin/vgscan \ -ac_cv_path_PVS=/usr/sbin/pvs \ -ac_cv_path_VGS=/usr/sbin/vgs \ -ac_cv_path_LVS=/usr/sbin/lvs \ -ac_cv_path_PARTED=/usr/sbin/parted \ -ac_cv_path_DMSETUP=/usr/sbin/dmsetup" - -# Ensure that libvirt uses polkit rather than policykit, whether the host has -# pkcheck installed or not, and ensure the path is correct per our config. -CACHED_CONFIGUREVARS += "ac_cv_path_PKCHECK_PATH=${bindir}/pkcheck" - -# Some other possible paths we are not yet setting -#ac_cv_path_RPCGEN= -#ac_cv_path_XSLTPROC= -#ac_cv_path_RADVD= -#ac_cv_path_UDEVSETTLE= -#ac_cv_path_EBTABLES_PATH= -#ac_cv_path_PKG_CONFIG= -#ac_cv_path_ac_pt_PKG_CONFIG -#ac_cv_path_POLKIT_AUTH= -#ac_cv_path_DTRACE= -#ac_cv_path_ISCSIADM= -#ac_cv_path_MSGFMT= -#ac_cv_path_GMSGFMT= -#ac_cv_path_XGETTEXT= -#ac_cv_path_MSGMERGE= -#ac_cv_path_SCRUB= -#ac_cv_path_PYTHON= - -ALLOW_EMPTY_${PN} = "1" - -PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" - -ALLOW_EMPTY_${PN}-libvirtd = "1" - -FILES_${PN}-libvirtd = " \ - ${sysconfdir}/init.d \ - ${sysconfdir}/sysctl.d \ - ${sysconfdir}/logrotate.d \ - ${sysconfdir}/libvirt/libvirtd.conf \ - /usr/lib/sysctl.d/60-libvirtd.conf \ - ${sbindir}/libvirtd \ - ${systemd_unitdir}/system/* \ - ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', '${libexecdir}/libvirt-guests.sh', d)} \ - " - -FILES_${PN}-virsh = "${bindir}/virsh" -FILES_${PN} += "${libdir}/libvirt/connection-driver \ - ${datadir}/augeas \ - ${datadir}/polkit-1" - -FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" -FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a" - -CONFFILES_${PN} += "${sysconfdir}/libvirt/libvirt.conf \ - ${sysconfdir}/libvirt/lxc.conf \ - ${sysconfdir}/libvirt/qemu-lockd.conf \ - ${sysconfdir}/libvirt/qemu.conf \ - ${sysconfdir}/libvirt/virt-login-shell.conf \ - ${sysconfdir}/libvirt/virtlockd.conf" - -CONFFILES_${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \ - ${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \ - ${sysconfdir}/libvirt/libvirtd.conf \ - /usr/lib/sysctl.d/libvirtd.conf" - -INITSCRIPT_PACKAGES = "${PN}-libvirtd" -INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" -INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" - -SYSTEMD_PACKAGES = "${PN}-libvirtd" -SYSTEMD_SERVICE_${PN}-libvirtd = " \ - libvirtd.socket \ - libvirtd.service \ - virtlockd.service \ - libvirt-guests.service \ - virtlockd.socket \ - " - - -PRIVATE_LIBS_${PN}-ptest = " \ - libvirt-lxc.so.0 \ - libvirt.so.0 \ - libvirt-qemu.so.0 \ - lockd.so \ - libvirt_driver_secret.so \ - libvirt_driver_nodedev.so \ - libvirt_driver_vbox.so \ - libvirt_driver_interface.so \ - libvirt_driver_uml.so \ - libvirt_driver_network.so \ - libvirt_driver_nwfilter.so \ - libvirt_driver_qemu.so \ - libvirt_driver_storage.so \ - libvirt_driver_lxc.so \ - " - -# xen-minimal config -#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" - -# full config -PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \ - remote macvtap libvirtd netcf udev python ebtables \ - ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen libxl xen-inotify', '', d)} \ - ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'polkit', '', d)} \ - " - -# enable,disable,depends,rdepends -# -PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu," -PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" -PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen," -PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi,," -PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,libxl," -PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen," -PACKAGECONFIG[uml] = "--with-uml, --without-uml,," -PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,," -PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,," -PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp,," -PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox,," -PACKAGECONFIG[esx] = "--with-esx,--without-esx,," -PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv,," -PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" -PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc," -PACKAGECONFIG[test] = "--with-test=yes,--with-test=no,," -PACKAGECONFIG[remote] = "--with-remote,--without-remote,," -PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl" -PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd,," -PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf" -PACKAGECONFIG[dtrace] = "--with-dtrace,--without-dtrace,," -PACKAGECONFIG[udev] = "--with-udev --with-pciaccess,--without-udev,udev libpciaccess," -PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," -PACKAGECONFIG[ebtables] = "ac_cv_path_EBTABLES_PATH=/sbin/ebtables,ac_cv_path_EBTABLES_PATH=,ebtables,ebtables" -PACKAGECONFIG[python] = ",,python," -PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,cyrus-sasl" -PACKAGECONFIG[iproute2] = "ac_cv_path_IP_PATH=/sbin/ip,ac_cv_path_IP_PATH=,iproute2,iproute2" -PACKAGECONFIG[numactl] = "--with-numactl,--without-numactl,numactl," -PACKAGECONFIG[fuse] = "--with-fuse,--without-fuse,fuse," -PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," -PACKAGECONFIG[libcap-ng] = "--with-capng,--without-capng,libcap-ng," - -# Enable the Python tool support -require libvirt-python.inc - -do_install_append() { - install -d ${D}/etc/init.d - install -d ${D}/etc/libvirt - - install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd - install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf - - if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then - # This will wind up in the libvirtd package, but will NOT be invoked by default. - # - mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d - fi - - if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then - # This variable is used by libvirtd.service to start libvirtd in the right mode - sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd - - # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. - sed -i -e 's/Type=notify/Type=forking/' \ - -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \ - ${D}/${systemd_unitdir}/system/libvirtd.service - fi - - # The /var/run/libvirt directories created by the Makefile - # are wiped out in volatile, we need to create these at boot. - rm -rf ${D}${localstatedir}/run - install -d ${D}${sysconfdir}/default/volatiles - echo "d root root 0755 ${localstatedir}/run/libvirt none" \ - > ${D}${sysconfdir}/default/volatiles/99_libvirt - echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \ - >> ${D}${sysconfdir}/default/volatiles/99_libvirt - echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \ - >> ${D}${sysconfdir}/default/volatiles/99_libvirt - echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \ - >> ${D}${sysconfdir}/default/volatiles/99_libvirt - echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \ - >> ${D}${sysconfdir}/default/volatiles/99_libvirt - - # Add hook support for libvirt - mkdir -p ${D}/etc/libvirt/hooks - - # remove .la references to our working diretory - for i in `find ${D}${libdir} -type f -name *.la`; do - sed -i -e 's#-L${B}/src/.libs##g' $i - done -} - -EXTRA_OECONF += " \ - --with-init-script=systemd \ - " - -EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH}" - -do_compile_ptest() { - oe_runmake -C tests buildtest-TESTS -} - -do_install_ptest() { - oe_runmake -C tests install-ptest - - # remove .la files for ptest, they aren't required and can trigger QA errors - for i in `find ${D}${PTEST_PATH} -type f -name *.la`; do - rm -f $i - done -} - -pkg_postinst_libvirt() { - if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then - /etc/init.d/populate-volatile.sh update - fi -} - -python () { - if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): - d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") -} diff --git a/recipes-extended/libvirt/libvirt_1.3.5.bb b/recipes-extended/libvirt/libvirt_1.3.5.bb new file mode 100644 index 00000000..f4a8f387 --- /dev/null +++ b/recipes-extended/libvirt/libvirt_1.3.5.bb @@ -0,0 +1,288 @@ +DESCRIPTION = "A toolkit to interact with the virtualization capabilities of recent versions of Linux." +HOMEPAGE = "http://libvirt.org" +LICENSE = "LGPLv2.1+" +LICENSE_${PN}-ptest = "GPLv2+ & LGPLv2.1" +LIC_FILES_CHKSUM = "file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \ + file://COPYING.LESSER;md5=4b54a1fd55a448865a0b32d41598759d" +SECTION = "console/tools" + +DEPENDS = "bridge-utils gnutls libxml2 lvm2 avahi parted curl libpcap util-linux e2fsprogs pm-utils \ + iptables dnsmasq readline libtasn1 libxslt-native" + +# libvirt-guests.sh needs gettext.sh +# +RDEPENDS_${PN} = "gettext-runtime" + +RDEPENDS_${PN}-ptest += "make gawk" + +RDEPENDS_libvirt-libvirtd += "bridge-utils iptables pm-utils dnsmasq netcat-openbsd" +RDEPENDS_libvirt-libvirtd_append_x86-64 = " dmidecode" +RDEPENDS_libvirt-libvirtd_append_x86 = " dmidecode" + +#connman blocks the 53 port and libvirtd can't start its DNS service +RCONFLICTS_${PN}_libvirtd = "connman" + +SRC_URI = "http://libvirt.org/sources/libvirt-${PV}.tar.gz;name=libvirt \ + file://tools-add-libvirt-net-rpc-to-virt-host-validate-when.patch \ + file://libvirtd.sh \ + file://libvirtd.conf \ + file://runptest.patch \ + file://run-ptest \ + file://tests-allow-separated-src-and-build-dirs.patch \ + file://libvirt-use-pkg-config-to-locate-libcap.patch \ + file://0001-to-fix-build-error.patch \ + file://Revert-build-add-prefix-to-SYSTEMD_UNIT_DIR.patch \ + file://install-missing-file.patch \ + " + +SRC_URI[libvirt.md5sum] = "f9dc1e63d559eca50ae0ee798a4c6c6d" +SRC_URI[libvirt.sha256sum] = "93a23c44eb431da46c9458f95a66e29c9b98e37515d44b6be09e75b35ec94ac8" + +inherit autotools gettext update-rc.d pkgconfig ptest systemd + +CACHED_CONFIGUREVARS += "\ +ac_cv_path_XMLLINT=/usr/bin/xmllint \ +ac_cv_path_XMLCATLOG=/usr/bin/xmlcatalog \ +ac_cv_path_AUGPARSE=/usr/bin/augparse \ +ac_cv_path_DNSMASQ=/usr/bin/dnsmasq \ +ac_cv_path_BRCTL=/usr/sbin/brctl \ +ac_cv_path_TC=/sbin/tc \ +ac_cv_path_UDEVADM=/sbin/udevadm \ +ac_cv_path_MODPROBE=/sbin/modprobe \ +ac_cv_path_IP_PATH=/bin/ip \ +ac_cv_path_IPTABLES_PATH=/usr/sbin/iptables \ +ac_cv_path_IP6TABLES_PATH=/usr/sbin/ip6tables \ +ac_cv_path_MOUNT=/bin/mount \ +ac_cv_path_UMOUNT=/bin/umount \ +ac_cv_path_MKFS=/usr/sbin/mkfs \ +ac_cv_path_SHOWMOUNT=/usr/sbin/showmount \ +ac_cv_path_PVCREATE=/usr/sbin/pvcreate \ +ac_cv_path_VGCREATE=/usr/sbin/vgcreate \ +ac_cv_path_LVCREATE=/usr/sbin/lvcreate \ +ac_cv_path_PVREMOVE=/usr/sbin/pvremove \ +ac_cv_path_VGREMOVE=/usr/sbin/vgremove \ +ac_cv_path_LVREMOVE=/usr/sbin/lvremove \ +ac_cv_path_LVCHANGE=/usr/sbin/lvchange \ +ac_cv_path_VGCHANGE=/usr/sbin/vgchange \ +ac_cv_path_VGSCAN=/usr/sbin/vgscan \ +ac_cv_path_PVS=/usr/sbin/pvs \ +ac_cv_path_VGS=/usr/sbin/vgs \ +ac_cv_path_LVS=/usr/sbin/lvs \ +ac_cv_path_PARTED=/usr/sbin/parted \ +ac_cv_path_DMSETUP=/usr/sbin/dmsetup" + +# Ensure that libvirt uses polkit rather than policykit, whether the host has +# pkcheck installed or not, and ensure the path is correct per our config. +CACHED_CONFIGUREVARS += "ac_cv_path_PKCHECK_PATH=${bindir}/pkcheck" + +# Some other possible paths we are not yet setting +#ac_cv_path_RPCGEN= +#ac_cv_path_XSLTPROC= +#ac_cv_path_RADVD= +#ac_cv_path_UDEVSETTLE= +#ac_cv_path_EBTABLES_PATH= +#ac_cv_path_PKG_CONFIG= +#ac_cv_path_ac_pt_PKG_CONFIG +#ac_cv_path_POLKIT_AUTH= +#ac_cv_path_DTRACE= +#ac_cv_path_ISCSIADM= +#ac_cv_path_MSGFMT= +#ac_cv_path_GMSGFMT= +#ac_cv_path_XGETTEXT= +#ac_cv_path_MSGMERGE= +#ac_cv_path_SCRUB= +#ac_cv_path_PYTHON= + +ALLOW_EMPTY_${PN} = "1" + +PACKAGES =+ "${PN}-libvirtd ${PN}-virsh" + +ALLOW_EMPTY_${PN}-libvirtd = "1" + +FILES_${PN}-libvirtd = " \ + ${sysconfdir}/init.d \ + ${sysconfdir}/sysctl.d \ + ${sysconfdir}/logrotate.d \ + ${sysconfdir}/libvirt/libvirtd.conf \ + /usr/lib/sysctl.d/60-libvirtd.conf \ + ${sbindir}/libvirtd \ + ${systemd_unitdir}/system/* \ + ${@bb.utils.contains('DISTRO_FEATURES', 'sysvinit', '', '${libexecdir}/libvirt-guests.sh', d)} \ + " + +FILES_${PN}-virsh = "${bindir}/virsh" +FILES_${PN} += "${libdir}/libvirt/connection-driver \ + ${datadir}/augeas \ + ${datadir}/polkit-1" + +FILES_${PN}-dbg += "${libdir}/libvirt/connection-driver/.debug ${libdir}/libvirt/lock-driver/.debug" +FILES_${PN}-staticdev += "${libdir}/*.a ${libdir}/libvirt/connection-driver/*.a ${libdir}/libvirt/lock-driver/*.a" + +CONFFILES_${PN} += "${sysconfdir}/libvirt/libvirt.conf \ + ${sysconfdir}/libvirt/lxc.conf \ + ${sysconfdir}/libvirt/qemu-lockd.conf \ + ${sysconfdir}/libvirt/qemu.conf \ + ${sysconfdir}/libvirt/virt-login-shell.conf \ + ${sysconfdir}/libvirt/virtlockd.conf" + +CONFFILES_${PN}-libvirtd = "${sysconfdir}/logrotate.d/libvirt ${sysconfdir}/logrotate.d/libvirt.lxc \ + ${sysconfdir}/logrotate.d/libvirt.qemu ${sysconfdir}/logrotate.d/libvirt.uml \ + ${sysconfdir}/libvirt/libvirtd.conf \ + /usr/lib/sysctl.d/libvirtd.conf" + +INITSCRIPT_PACKAGES = "${PN}-libvirtd" +INITSCRIPT_NAME_${PN}-libvirtd = "libvirtd" +INITSCRIPT_PARAMS_${PN}-libvirtd = "defaults 72" + +SYSTEMD_PACKAGES = "${PN}-libvirtd" +SYSTEMD_SERVICE_${PN}-libvirtd = " \ + libvirtd.service \ + virtlockd.service \ + libvirt-guests.service \ + virtlockd.socket \ + " + + +PRIVATE_LIBS_${PN}-ptest = " \ + libvirt-lxc.so.0 \ + libvirt.so.0 \ + libvirt-qemu.so.0 \ + lockd.so \ + libvirt_driver_secret.so \ + libvirt_driver_nodedev.so \ + libvirt_driver_vbox.so \ + libvirt_driver_interface.so \ + libvirt_driver_uml.so \ + libvirt_driver_network.so \ + libvirt_driver_nwfilter.so \ + libvirt_driver_qemu.so \ + libvirt_driver_storage.so \ + libvirt_driver_lxc.so \ + " + +# xen-minimal config +#PACKAGECONFIG ??= "xen libxl xen-inotify test remote libvirtd" + +# full config +PACKAGECONFIG ??= "qemu yajl uml openvz vmware vbox esx iproute2 lxc test \ + remote macvtap libvirtd netcf udev python ebtables \ + ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 'selinux audit libcap-ng', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen libxl xen-inotify', '', d)} \ + ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 'polkit', '', d)} \ + " + +# enable,disable,depends,rdepends +# +PACKAGECONFIG[qemu] = "--with-qemu,--without-qemu,qemu," +PACKAGECONFIG[yajl] = "--with-yajl,--without-yajl,yajl,yajl" +PACKAGECONFIG[xen] = "--with-xen,--without-xen,xen," +PACKAGECONFIG[xenapi] = "--with-xenapi,--without-xenapi,," +PACKAGECONFIG[libxl] = "--with-libxl=${STAGING_DIR_TARGET}/lib,--without-libxl,libxl," +PACKAGECONFIG[xen-inotify] = "--with-xen-inotify,--without-xen-inotify,xen," +PACKAGECONFIG[uml] = "--with-uml, --without-uml,," +PACKAGECONFIG[openvz] = "--with-openvz,--without-openvz,," +PACKAGECONFIG[vmware] = "--with-vmware,--without-vmware,," +PACKAGECONFIG[phyp] = "--with-phyp,--without-phyp,," +PACKAGECONFIG[vbox] = "--with-vbox,--without-vbox,," +PACKAGECONFIG[esx] = "--with-esx,--without-esx,," +PACKAGECONFIG[hyperv] = "--with-hyperv,--without-hyperv,," +PACKAGECONFIG[polkit] = "--with-polkit,--without-polkit,polkit,polkit" +PACKAGECONFIG[lxc] = "--with-lxc,--without-lxc, lxc," +PACKAGECONFIG[test] = "--with-test=yes,--with-test=no,," +PACKAGECONFIG[remote] = "--with-remote,--without-remote,," +PACKAGECONFIG[macvtap] = "--with-macvtap=yes,--with-macvtap=no,libnl,libnl" +PACKAGECONFIG[libvirtd] = "--with-libvirtd,--without-libvirtd,," +PACKAGECONFIG[netcf] = "--with-netcf,--without-netcf,netcf,netcf" +PACKAGECONFIG[dtrace] = "--with-dtrace,--without-dtrace,," +PACKAGECONFIG[udev] = "--with-udev --with-pciaccess,--without-udev,udev libpciaccess," +PACKAGECONFIG[selinux] = "--with-selinux,--without-selinux,libselinux," +PACKAGECONFIG[ebtables] = "ac_cv_path_EBTABLES_PATH=/sbin/ebtables,ac_cv_path_EBTABLES_PATH=,ebtables,ebtables" +PACKAGECONFIG[python] = ",,python," +PACKAGECONFIG[sasl] = "--with-sasl,--without-sasl,cyrus-sasl,cyrus-sasl" +PACKAGECONFIG[iproute2] = "ac_cv_path_IP_PATH=/sbin/ip,ac_cv_path_IP_PATH=,iproute2,iproute2" +PACKAGECONFIG[numactl] = "--with-numactl,--without-numactl,numactl," +PACKAGECONFIG[fuse] = "--with-fuse,--without-fuse,fuse," +PACKAGECONFIG[audit] = "--with-audit,--without-audit,audit," +PACKAGECONFIG[libcap-ng] = "--with-capng,--without-capng,libcap-ng," + +# Enable the Python tool support +require libvirt-python.inc + +do_install_append() { + install -d ${D}/etc/init.d + install -d ${D}/etc/libvirt + + install -m 0755 ${WORKDIR}/libvirtd.sh ${D}/etc/init.d/libvirtd + install -m 0644 ${WORKDIR}/libvirtd.conf ${D}/etc/libvirt/libvirtd.conf + + if ${@bb.utils.contains('DISTRO_FEATURES','sysvinit','true','false',d)}; then + # This will wind up in the libvirtd package, but will NOT be invoked by default. + # + mv ${D}/${libexecdir}/libvirt-guests.sh ${D}/${sysconfdir}/init.d + fi + + if ${@bb.utils.contains('DISTRO_FEATURES','systemd','true','false',d)}; then + # This variable is used by libvirtd.service to start libvirtd in the right mode + sed -i '/#LIBVIRTD_ARGS="--listen"/a LIBVIRTD_ARGS="--listen --daemon"' ${D}/${sysconfdir}/sysconfig/libvirtd + + # We can't use 'notify' when we don't support 'sd_notify' dbus capabilities. + sed -i -e 's/Type=notify/Type=forking/' \ + -e '/Type=forking/a PIDFile=${localstatedir}/run/libvirtd.pid' \ + ${D}/${systemd_unitdir}/system/libvirtd.service + fi + + # The /var/run/libvirt directories created by the Makefile + # are wiped out in volatile, we need to create these at boot. + rm -rf ${D}${localstatedir}/run + install -d ${D}${sysconfdir}/default/volatiles + echo "d root root 0755 ${localstatedir}/run/libvirt none" \ + > ${D}${sysconfdir}/default/volatiles/99_libvirt + echo "d root root 0755 ${localstatedir}/run/libvirt/lockd none" \ + >> ${D}${sysconfdir}/default/volatiles/99_libvirt + echo "d root root 0755 ${localstatedir}/run/libvirt/lxc none" \ + >> ${D}${sysconfdir}/default/volatiles/99_libvirt + echo "d root root 0755 ${localstatedir}/run/libvirt/network none" \ + >> ${D}${sysconfdir}/default/volatiles/99_libvirt + echo "d root root 0755 ${localstatedir}/run/libvirt/qemu none" \ + >> ${D}${sysconfdir}/default/volatiles/99_libvirt + + # Add hook support for libvirt + mkdir -p ${D}/etc/libvirt/hooks + + # remove .la references to our working diretory + for i in `find ${D}${libdir} -type f -name *.la`; do + sed -i -e 's#-L${B}/src/.libs##g' $i + done +} + +EXTRA_OECONF += " \ + --with-init-script=systemd \ + " + +EXTRA_OEMAKE = "BUILD_DIR=${B} DEST_DIR=${D}${PTEST_PATH} PTEST_DIR=${PTEST_PATH}" + +do_compile_ptest() { + oe_runmake -C tests buildtest-TESTS +} + +do_install_ptest() { + oe_runmake -C tests install-ptest + + find ${S}/tests -maxdepth 1 -type d -exec cp -r {} ${D}${PTEST_PATH}/tests/ \; + + # remove .la files for ptest, they aren't required and can trigger QA errors + for i in `find ${D}${PTEST_PATH} -type f -name *.la`; do + rm -f $i + done +} + +pkg_postinst_libvirt() { + if [ -z "$D" ] && [ -e /etc/init.d/populate-volatile.sh ] ; then + /etc/init.d/populate-volatile.sh update + fi +} + +python () { + if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d): + d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1") +} -- cgit v1.2.3-54-g00ecf