From: Hieu Van Nguyen <hieu2.ngu...@lge.com>

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.ngu...@lge.com>
Signed-off-by: Martin Jansa <martin.ja...@gmail.com>
---
 recipes-extended/libvirt/libvirt-python.inc |  8 +++++---
 recipes-extended/libvirt/libvirt_10.0.0.bb  | 21 ++++++++++-----------
 2 files changed, 15 insertions(+), 14 deletions(-)

diff --git a/recipes-extended/libvirt/libvirt-python.inc 
b/recipes-extended/libvirt/libvirt-python.inc
index 6fb2b68c..40c362d6 100644
--- a/recipes-extended/libvirt/libvirt-python.inc
+++ b/recipes-extended/libvirt/libvirt-python.inc
@@ -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
 }
diff --git a/recipes-extended/libvirt/libvirt_10.0.0.bb 
b/recipes-extended/libvirt/libvirt_10.0.0.bb
index 9ad1f798..8e54406a 100644
--- a/recipes-extended/libvirt/libvirt_10.0.0.bb
+++ b/recipes-extended/libvirt/libvirt_10.0.0.bb
@@ -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
-- 
2.45.1

-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#8788): 
https://lists.yoctoproject.org/g/meta-virtualization/message/8788
Mute This Topic: https://lists.yoctoproject.org/mt/106389420/21656
Group Owner: meta-virtualization+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to