Skip to contentSkip to conversation

A few miscellaneous improvements from Mentor

PATCH Superseded Christopher Larson 4 participants 11 messages Jun 10, 2013 – Jun 18, 2013

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover A few miscellaneous improvements from Mentor

From: Christopher Larson <[email protected]>

The following changes since commit b4f208f418d18f2a4e78a56bebacef481061d917:

tar: don't mv tar for nativesdk (2013-06-10 18:06:33 +0100)

are available in the git repository at:

https://github.com/kergoth/oe-core.git misc-improvements

Christopher Larson (4):
connman: use PACKAGECONFIG for WISPr support
libnewt: split python module into libnewt-python
packagegroup-base-vfat: include dosfsprogs insane.bbclass: quiet package errors not in *_QA

 meta/classes/insane.bbclass                        |  6 +++--
 meta/recipes-connectivity/connman/connman.inc      | 10 ++++++---
 .../packagegroups/packagegroup-base.bb             |  3 ++-
 .../newt/libnewt-python_0.52.14.bb                 | 26 ++++++++++++++++++++++
 meta/recipes-extended/newt/libnewt_0.52.14.bb      | 15 +++++--------
 5 files changed, 44 insertions(+), 16 deletions(-)
 create mode 100644 meta/recipes-extended/newt/libnewt-python_0.52.14.bb
Signature · 1 line
1.8.3
#1 lore raw

PATCH 1/4 connman: use PACKAGECONFIG for WISPr support

From: Christopher Larson <[email protected]>

---
 meta/recipes-connectivity/connman/connman.inc | 10 +++++++---
 1 file changed, 7 insertions(+), 3 deletions(-)
meta/recipes-connectivity/connman/connman.inc +7 -3
index 0eb5865..f250d78 100644
@@ -13,7 +13,7 @@ LICENSE  = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
                     file://src/main.c;beginline=1;endline=20;md5=d6a1ac98a6791c5294e8a7f176ecd66d"
 
-DEPENDS  = "dbus glib-2.0 ppp iptables gnutls"
+DEPENDS  = "dbus glib-2.0 ppp iptables"
 
 INC_PR = "r20"
 
@@ -32,7 +32,7 @@ EXTRA_OECONF += "\
     ${@base_contains('DISTRO_FEATURES', 'systemd', '--with-systemdunitdir=${systemd_unitdir}/system/', '--with-systemdunitdir=', d)} \
 "
 
-PACKAGECONFIG ??= "\
+PACKAGECONFIG ??= "wispr \
                    ${@base_contains('DISTRO_FEATURES', 'wifi','wifi', '', d)} \
                    ${@base_contains('DISTRO_FEATURES', 'bluetooth','bluetooth', '', d)} \
                    ${@base_contains('DISTRO_FEATURES', '3g','3g', '', d)} \
@@ -50,6 +50,8 @@ PACKAGECONFIG[openvpn] = "--enable-openvpn,--disable-openvpn,,openvpn"
 PACKAGECONFIG[vpnc] = "--enable-vpnc,--disable-vpnc,,vpnc"
 PACKAGECONFIG[l2tp] = "--enable-l2tp,--disable-l2tp,,xl2tpd"
 PACKAGECONFIG[pptp] = "--enable-pptp,--disable-pptp,,pptp-linux"
+# WISPr support for logging into hotspots, requires TLS
+PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
 
 INITSCRIPT_NAME = "connman"
 INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
@@ -89,7 +91,9 @@ do_install_append() {
 
 	install -d ${D}${bindir}
 	install -m 0755 ${S}/tools/*-test ${D}${bindir}
-	install -m 0755 ${S}/tools/wispr ${D}${bindir}
+	if [ -e ${S}/tools/wispr ]; then
+		install -m 0755 ${S}/tools/wispr ${D}${bindir}
+	fi
 	install -m 0755 ${B}/client/connmanctl ${D}${bindir}
 
 	# We don't need to package an empty directory
Signature · 1 line
1.8.3
Reviewed-by on v1 1/4
#2 lore raw

Re: [PATCH 1/4] connman: use PACKAGECONFIG for WISPr support

Quoted 4 lines · Christopher Larson

From: Christopher Larson <[email protected]>

This seems safe for backporting to 1.4.2 and would allow for more control on connman build; Paul?

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#3 lore raw

Re: [PATCH 1/4] connman: use PACKAGECONFIG for WISPr support

Quoted 2 lines · On Monday 10 June 2013 18:06:19 Otavio Salvador wrote:

This seems safe for backporting to 1.4.2 and would allow for more control on connman build; Paul?

At the moment we don't seem to have the other PACKAGECONFIG options for connman in dylan so this patch doesn't apply cleanly. If people are especially keen to have them I can backport these options, but I'd rather not just take them on a whim as these are more of an optimisation than a bug fix.

Cheers,
Paul

Signature · 2 lines
Paul Eggleton
Intel Open Source Technology Centre
#4 lore raw

PATCH 2/4 libnewt: split python module into libnewt-python

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

This is useful as it avoids pulling python into a build just to build chkconfig. The python recipe uses the libnewt installed in the sysroot by the main package, so there's little loss of build time, other than the additional unpack/patch.

---
 .../newt/libnewt-python_0.52.14.bb                 | 26 ++++++++++++++++++++++
 meta/recipes-extended/newt/libnewt_0.52.14.bb      | 15 +++++--------
 2 files changed, 31 insertions(+), 10 deletions(-)
 create mode 100644 meta/recipes-extended/newt/libnewt-python_0.52.14.bb
meta/recipes-extended/newt/libnewt-python_0.52.14.bb new file +26 -0
new file mode 100644
index 0000000..9af2d5d
@@ -0,0 +1,26 @@
+require recipes-extended/newt/libnewt_${PV}.bb
+
+SUMMARY .= " - python"
+DEPENDS = "libnewt python"
+RDEPENDS_${PN} += "python-core"
+
+inherit pythonnative python-dir
+
+EXTRA_OECONF += "--with-python"
+EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
+
+
+do_compile () {
+	VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
+	oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snackmodule.so
+}
+
+do_install () {
+	install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+	install -m 0755 ${PYTHON_DIR}/_snackmodule.so ${D}${PYTHON_SITEPACKAGES_DIR}/
+	install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
+}
+
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
meta/recipes-extended/newt/libnewt_0.52.14.bb +5 -10
index 54da15d..ee8206e 100644
@@ -15,7 +15,7 @@ LICENSE = "LGPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
 # slang needs to be >= 2.2
-DEPENDS = "slang popt python"
+DEPENDS = "slang popt"
 
 PR = "r2"
 
@@ -30,11 +30,9 @@ SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b
 
 S = "${WORKDIR}/newt-${PV}"
 
-EXTRA_OECONF = "--without-tcl"
+EXTRA_OECONF = "--without-tcl --without-python"
 
-inherit autotools pythonnative python-dir
-
-EXTRA_OEMAKE = "PYTHONVERS=${PYTHON_DIR}"
+inherit autotools
 
 export STAGING_INCDIR
 export STAGING_LIBDIR
@@ -42,13 +40,10 @@ export STAGING_LIBDIR
 export BUILD_SYS
 export HOST_SYS
 
-PACKAGES_prepend = "whiptail ${PN}-python "
+PACKAGES_prepend = "whiptail "
 
 do_configure_prepend() {
-    ( cd ${S}; sh autogen.sh )
+    sh autogen.sh
 }
 
 FILES_whiptail = "${bindir}/whiptail"
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-staticdev = "${libdir}/*.a"
Signature · 1 line
1.8.3
#5 lore raw

Re: [PATCH 2/4] libnewt: split python module into libnewt-python

Quoted 7 lines · Christopher Larson

From: Christopher Larson <[email protected]>

This is useful as it avoids pulling python into a build just to build chkconfig. The python recipe uses the libnewt installed in the sysroot by the main package, so there's little loss of build time, other than the additional unpack/patch.

This one seems to introduce a new warning, this was from a populated build dir with sstate available

Quoted 1 line

WARNING: The recipe libnewt-python is trying to install files into a shared area when those files already exist.

Those files and their manifest location are:

/srv/ssd/sgw/builds/world/tmp/pkgdata/x86_64-poky-linux/runtime/whiptail

Matched in manifest-x86_64-libnewt.packagedata

/srv/ssd/sgw/builds/world/tmp/pkgdata/x86_64-poky-linux/runtime-reverse/whiptail
Matched in manifest-x86_64-libnewt.packagedata

Please verify which package should provide the above files.

Sau!

Quoted 83 lines
---
  .../newt/libnewt-python_0.52.14.bb                 | 26 ++++++++++++++++++++++
  meta/recipes-extended/newt/libnewt_0.52.14.bb      | 15 +++++--------
  2 files changed, 31 insertions(+), 10 deletions(-)

create mode 100644 meta/recipes-extended/newt/libnewt-python_0.52.14.bb

meta/recipes-extended/newt/libnewt-python_0.52.14.bb new file +26 -0
new file mode 100644
index 0000000..9af2d5d
@@ -0,0 +1,26 @@
+require recipes-extended/newt/libnewt_${PV}.bb
+
+SUMMARY .= " - python"
+DEPENDS = "libnewt python"
+RDEPENDS_${PN} += "python-core"
+
+inherit pythonnative python-dir
+
+EXTRA_OECONF += "--with-python"
+EXTRA_OEMAKE += "PYTHONVERS=${PYTHON_DIR}"
+
+
+do_compile () {
+	VERSION="$(sed -n 's/^VERSION = //p' Makefile)"
+	oe_runmake "LIBNEWTSH=${STAGING_LIBDIR}/libnewt.so.$VERSION" _snackmodule.so
+}
+
+do_install () {
+	install -d ${D}${PYTHON_SITEPACKAGES_DIR}
+	install -m 0755 ${PYTHON_DIR}/_snackmodule.so ${D}${PYTHON_SITEPACKAGES_DIR}/
+	install -m 0644 snack.py ${D}${PYTHON_SITEPACKAGES_DIR}/
+}
+
+
+FILES_${PN} = "${PYTHON_SITEPACKAGES_DIR}/*"
+FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
meta/recipes-extended/newt/libnewt_0.52.14.bb +5 -10
index 54da15d..ee8206e 100644
@@ -15,7 +15,7 @@ LICENSE = "LGPLv2"
  LIC_FILES_CHKSUM = "file://COPYING;md5=55ca817ccb7d5b5b66355690e9abc605"
 
  # slang needs to be >= 2.2
-DEPENDS = "slang popt python"
+DEPENDS = "slang popt"
 
  PR = "r2"
 
@@ -30,11 +30,9 @@ SRC_URI[sha256sum] = "f70f4f58baa60388ddf2e39249ffb00898fb40f2b2767e42e2ab51fe4b
 
  S = "${WORKDIR}/newt-${PV}"
 
-EXTRA_OECONF = "--without-tcl"
+EXTRA_OECONF = "--without-tcl --without-python"
 
-inherit autotools pythonnative python-dir
-
-EXTRA_OEMAKE = "PYTHONVERS=${PYTHON_DIR}"
+inherit autotools
 
  export STAGING_INCDIR
  export STAGING_LIBDIR
@@ -42,13 +40,10 @@ export STAGING_LIBDIR
  export BUILD_SYS
  export HOST_SYS
 
-PACKAGES_prepend = "whiptail ${PN}-python "
+PACKAGES_prepend = "whiptail "
 
  do_configure_prepend() {
-    ( cd ${S}; sh autogen.sh )
+    sh autogen.sh
  }
 
  FILES_whiptail = "${bindir}/whiptail"
-FILES_${PN}-dbg += "${PYTHON_SITEPACKAGES_DIR}/.debug/"
-FILES_${PN}-python = "${PYTHON_SITEPACKAGES_DIR}/*"
-FILES_${PN}-staticdev = "${libdir}/*.a"
#6 lore raw

Re: [PATCH 2/4] libnewt: split python module into libnewt-python

Quoted 19 lines · Saul Wold
Quoted 10 lines · Christopher Larson

From: Christopher Larson <[email protected]>

This is useful as it avoids pulling python into a build just to build chkconfig. The python recipe uses the libnewt installed in the sysroot by the
main package, so there's little loss of build time, other than the additional
unpack/patch.

This one seems to introduce a new warning, this was from a populated

build dir with sstate available

WARNING: The recipe libnewt-python is trying to install files into a

Quoted 2 lines

shared area when those files already exist.

Those files and their manifest location are:

Quoted 8 lines

/srv/ssd/sgw/builds/world/tmp/**pkgdata/x86_64-poky-linux/**runtime/whiptail

Matched in manifest-x86_64-libnewt.**packagedata

/srv/ssd/sgw/builds/world/tmp/**pkgdata/x86_64-poky-linux/** runtime-reverse/whiptail
Matched in manifest-x86_64-libnewt.**packagedata
Please verify which package should provide the above files.

Oops, sorry about that. I'll submit a v2 patch series with this fixed. Thanks.

Signature · 5 lines
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
#7 lore raw

PATCH 3/4 packagegroup-base-vfat: include dosfsprogs

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

The ext2 group includes e2fsprogs, so this is consistent and should be appropriate, I think.

---
 meta/recipes-core/packagegroups/packagegroup-base.bb | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
meta/recipes-core/packagegroups/packagegroup-base.bb +2 -1
index 799e12a..061c1a7 100644
@@ -179,7 +179,8 @@ RRECOMMENDS_packagegroup-base-vfat = "\
     kernel-module-msdos \
     kernel-module-vfat \
     kernel-module-nls-iso8859-1 \
-    kernel-module-nls-cp437"
+    kernel-module-nls-cp437 \
+    dosfsprogs"
 
 SUMMARY_packagegroup-base-alsa = "ALSA sound support"
 RDEPENDS_packagegroup-base-alsa = "\
Signature · 1 line
1.8.3
Reviewed-by on v1 3/4
#8 lore raw

Re: [PATCH 3/4] packagegroup-base-vfat: include dosfsprogs

Quoted 7 lines · Christopher Larson

From: Christopher Larson <[email protected]>

The ext2 group includes e2fsprogs, so this is consistent and should be appropriate, I think.

Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750
#9 lore raw

PATCH 4/4 insane.bbclass: quiet package errors not in *_QA

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

Currently, if a package QA type from package.bbclass is not listed in ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This differs from the behavior of the rest of the QA handling (which doesn't call package_qa_handle_error at all if it's in neither _QA variable), and is nonintuitive. Change this to use bb.note() if it's listed neither in ERROR_QA nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the user's output.

---
 meta/classes/insane.bbclass | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
meta/classes/insane.bbclass +4 -2
index c091005..2b30538 100644
@@ -143,9 +143,11 @@ def package_qa_handle_error(error_class, error_msg, d):
         bb.error("QA Issue: %s" % error_msg)
         d.setVar("QA_SANE", False)
         return False
-    else:
+    elif error_class in (d.getVar("WARN_QA", True) or "").split():
         bb.warn("QA Issue: %s" % error_msg)
-        return True
+    else:
+        bb.note("QA Issue: %s" % error_msg)
+    return True
 
 QAPATHTEST[libexec] = "package_qa_check_libexec"
 def package_qa_check_libexec(path,name, d, elf, messages):
Signature · 1 line
1.8.3
Reviewed-by on v1 4/4
#10 lore raw

Re: [PATCH 4/4] insane.bbclass: quiet package errors not in *_QA

Quoted 13 lines · Christopher Larson

From: Christopher Larson <[email protected]>

Currently, if a package QA type from package.bbclass is not listed in ERROR_QA, it gets shown, regardless of whether it's in WARN_QA. This differs
from the behavior of the rest of the QA handling (which doesn't call package_qa_handle_error at all if it's in neither _QA variable), and is nonintuitive. Change this to use bb.note() if it's listed neither in ERROR_QA
nor WARN_QA, so it ends up in the task logs, but doesn't clutter up the user's
output.

Quoted 2 lines
Signature · 3 lines
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://projetos.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750