libvirt: convert more WORKDIR references to UNPACKDIR
PATCH v2 1/1 libvirt: convert more WORKDIR references to UNPACKDIR
From: Hieu Van Nguyen <[email protected]>
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 :).
--- recipes-extended/libvirt/libvirt-python.inc | 8 +++++--- recipes-extended/libvirt/libvirt_10.0.0.bb | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-)
recipes-extended/libvirt/libvirt-python.inc +5 -3
@@ -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 }
recipes-extended/libvirt/libvirt_10.0.0.bb +10 -11
@@ -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
Signature · 1 line
2.45.1
In message: [meta-virtualization] [master-next][PATCH v2] libvirt: convert more WORKDIR references to UNPACKDIR
Quoted 8 lines · on 30/05/2024 Martin Jansa via lists.yoctoproject.org wrote:
From: Hieu Van Nguyen <[email protected]>
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.
Quoted 7 lines
Use BP subdir for python, to build it inside ${S}.
Need cd - to go back to $${B} so that
gnutls-helper.pyis executed there instead of python subdirectory.Use mix of tabs and spaces for indentation like other lines around :).
It depends on the weather and day of the week whether spaces or tabs are used!
Quoted 22 lines
Signed-off-by Hieu Van Nguyen <[email protected]>Signed-off-by Martin Jansa <[email protected]>--- recipes-extended/libvirt/libvirt-python.inc | 8 +++++--- recipes-extended/libvirt/libvirt_10.0.0.bb | 21 ++++++++++----------- 2 files changed, 15 insertions(+), 14 deletions(-)recipes-extended/libvirt/libvirt-python.inc +1
-1@@ -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"
recipes-extended/libvirt/libvirt-python.inc do_compile:append() { · line 51
Quoted 7 lines
recipes-extended/libvirt/libvirt-python.inc +2
-1@@ -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 -
Alternatively we could wrap this in a subshell (), which is what I normally do to avoid needing to change back.
But that's something I can tweak after this patch if any issues pop up.
I've got this under test now, and expect to push it shortly.
Bruce
Quoted 76 lines
recipes-extended/libvirt/libvirt-python.inc +2
-1fi }@@ -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 }recipes-extended/libvirt/libvirt_10.0.0.bb +10
-11@@ -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.confSignature · 11 lines
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/1050810 Group Owner: [email protected] Unsubscribe: https://lists.yoctoproject.org/g/meta-virtualization/unsub [[email protected]] -=-=-=-=-=-=-=-=-=-=-=-