libvirt: convert more WORKDIR references to UNPACKDIR

unpacked source files are now in UNPACKDIR, so we adjust our
operations to match.

Some references were missed in previous commit as they
are behind conditional.

Use BP subdir for python, to build it inside ${S}.

Need cd - to go back to $${B} so that gnutls-helper.py
is executed there instead of python subdirectory.

Use mix of tabs and spaces for indentation like other lines
around :).

Signed-off-by: Hieu Van Nguyen <hieu2.nguyen@lge.com>
Signed-off-by: Martin Jansa <martin.jansa@gmail.com>
Signed-off-by: Bruce Ashfield <bruce.ashfield@gmail.com>
This commit is contained in:
Hieu Van Nguyen 2024-05-30 16:28:45 +02:00 committed by Bruce Ashfield
parent 79a282078f
commit 6ab94f2c68
2 changed files with 15 additions and 14 deletions

View File

@ -18,7 +18,7 @@ FILES:${PN}-python = "${bindir}/* ${libdir}/* ${libdir}/${PYTHON_DIR}/*"
# Currently the libvirt-python debug libraries contain buildpaths
INSANE_SKIP:${PN}-dbg += "buildpaths"
SRC_URI += "http://libvirt.org/sources/python/libvirt-python-${PV}.tar.gz;name=libvirt_python"
SRC_URI += "http://libvirt.org/sources/python/${BPN}-python-${PV}.tar.gz;name=libvirt_python;subdir=${BP}"
SRC_URI[libvirt_python.sha256sum] = "a82588f0e7db53eda7b7dbcbc448b0ec43e00a8c77cac69644495299b410c20d"
@ -46,8 +46,9 @@ do_compile:append() {
# the syroot staged pkgconfig entries. So we clear the sysroot
# for just this portion.
export PKG_CONFIG_SYSROOT_DIR=
cd ${WORKDIR}/${BPN}-python-${PV} && \
cd ${S}/${BPN}-python-${PV} && \
${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py build
cd -
fi
}
@ -57,8 +58,9 @@ do_install:append() {
# the syroot staged pkgconfig entries. So we clear the sysroot
# for just this portion.
export PKG_CONFIG_SYSROOT_DIR=
cd ${WORKDIR}/${BPN}-python-${PV} && \
cd ${S}/${BPN}-python-${PV} && \
${STAGING_BINDIR_NATIVE}/python3-native/python3 setup.py install \
--install-lib=${D}/${PYTHON_SITEPACKAGES_DIR} ${LIBVIRT_INSTALL_ARGS}
cd -
fi
}

View File

@ -24,12 +24,12 @@ RDEPENDS:libvirt-libvirtd:append:aarch64 = " 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.xz;name=libvirt \
SRC_URI = "http://libvirt.org/sources/${BP}.tar.xz;name=libvirt \
file://libvirtd.sh \
file://libvirtd.conf \
file://dnsmasq.conf \
file://hook_support.py \
file://gnutls-helper.py \
file://gnutls-helper.py;subdir=${BP} \
file://0001-prevent-gendispatch.pl-generating-build-path-in-code.patch \
file://0001-messon.build-remove-build-path-information-to-avoid-.patch \
"
@ -286,21 +286,20 @@ do_install:append() {
if ${@bb.utils.contains('PACKAGECONFIG','gnutls','true','false',d)}; then
# Generate sample keys and certificates.
cd ${WORKDIR}
${WORKDIR}/gnutls-helper.py -y
${S}/gnutls-helper.py -y
# Deploy all sample keys and certificates of CA, server and client
# to target so that libvirtd is able to boot successfully and local
# connection via 127.0.0.1 is available out of box.
install -d ${D}/etc/pki/CA
install -d ${D}/etc/pki/libvirt/private
install -m 0755 ${WORKDIR}/gnutls-helper.py ${D}/${bindir}
install -m 0644 ${WORKDIR}/cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem
install -m 0644 ${WORKDIR}/cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem
install -m 0644 ${WORKDIR}/serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem
install -m 0644 ${WORKDIR}/servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem
install -m 0644 ${WORKDIR}/clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem
install -m 0644 ${WORKDIR}/clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem
install -m 0755 ${S}/gnutls-helper.py ${D}/${bindir}
install -m 0644 cakey.pem ${D}/${sysconfdir}/pki/libvirt/private/cakey.pem
install -m 0644 cacert.pem ${D}/${sysconfdir}/pki/CA/cacert.pem
install -m 0644 serverkey.pem ${D}/${sysconfdir}/pki/libvirt/private/serverkey.pem
install -m 0644 servercert.pem ${D}/${sysconfdir}/pki/libvirt/servercert.pem
install -m 0644 clientkey.pem ${D}/${sysconfdir}/pki/libvirt/private/clientkey.pem
install -m 0644 clientcert.pem ${D}/${sysconfdir}/pki/libvirt/clientcert.pem
# Force the connection to be tls.
sed -i -e 's/^\(listen_tls\ =\ .*\)/#\1/' -e 's/^\(listen_tcp\ =\ .*\)/#\1/' ${D}/etc/libvirt/libvirtd.conf