Skip to contentSkip to conversation

fixes for nativesdk, tcl and binconfig.bbclass

PATCH In review Robert Yang 3 participants 11 messages Feb 15, 2017 – Feb 20, 2017

lore
Share & tools
lore
#0 lore raw

cover fixes for nativesdk, tcl and binconfig.bbclass

The following changes since commit d1109378d730c5cf50240c4d1a468e3aef5208ea:

nss: Fix nss-native so the checksum doesn't change with BUILD_ARCH (2017-02-09 10:50:54 +0000)

are available in the git repository at:

git://git.openembedded.org/openembedded-core-contrib rbt/6fixes
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/6fixes

Robert Yang (6):
python-native: PROVIDES python-io-native
btrfs-tools: remove udev from DEPENDS
tcl: extend to nativesdk
gawk/json-glib/libcheck: extend to nativesdk
tcl: fix sed in do_install()
binconfig.bbclass: fix get_binconfig_mangle()

 meta/classes/binconfig.bbclass                         | 4 ++--
 meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.5.bb | 2 +-
 meta/recipes-devtools/python/python-native_2.7.12.bb   | 9 ++++++++-
 meta/recipes-devtools/tcltk/tcl_8.6.6.bb               | 6 +++---
 meta/recipes-extended/gawk/gawk_4.1.4.bb               | 2 ++
 meta/recipes-gnome/json-glib/json-glib_1.2.2.bb        | 2 +-
 meta/recipes-support/libcheck/libcheck_0.10.0.bb       | 2 +-
 7 files changed, 18 insertions(+), 9 deletions(-)
Signature · 1 line
2.10.2
#1 lore raw

PATCH 1/6 python-native: PROVIDES python-io-native

python-six-native depends on it.

---
 meta/recipes-devtools/python/python-native_2.7.12.bb | 9 ++++++++-
 1 file changed, 8 insertions(+), 1 deletion(-)
meta/recipes-devtools/python/python-native_2.7.12.bb +8 -1
index de83cbd..9a6430d 100644
@@ -25,7 +25,14 @@ FILESEXTRAPATHS =. "${FILE_DIRNAME}/${PN}:"
 
 inherit native
 
-RPROVIDES += "python-distutils-native python-compression-native python-textutils-native python-codecs-native python-core-native python-unittest-native"
+RPROVIDES += "python-distutils-native \
+    python-compression-native \
+    python-textutils-native \
+    python-codecs-native \
+    python-core-native \
+    python-unittest-native \
+    python-io-native \
+"
 
 EXTRA_OECONF_append = " --bindir=${bindir}/${PN} --with-system-expat=${STAGING_DIR_HOST}"
 
Signature · 1 line
2.10.2
#2 lore raw

PATCH 2/6 btrfs-tools: remove udev from DEPENDS

In reply to Robert Yang

The log said that udev was added to DEPENDS because btrfs-tools installs a udev rule, this was incorrect, and it caused a side effect:

$ bitbake btrfs-tools-native

ERROR: Nothing PROVIDES 'udev-native' (but virtual:native:btrfs-tools_4.8.5.bb DEPENDS on or otherwise requires it). Close matches:
[snip]

---
 meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.5.bb +1 -1
index 7047c43..ab6aacb 100644
@@ -10,7 +10,7 @@ HOMEPAGE = "https://btrfs.wiki.kernel.org"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
 SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl udev"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
 RDEPENDS_${PN} = "libgcc"
 
 SRCREV = "144a19145e248513c7a676defad59836830535c6"
Signature · 1 line
2.10.2
#3 lore raw

Re: [PATCH 2/6] btrfs-tools: remove udev from DEPENDS

Quoted 9 lines · Robert Yang

The log said that udev was added to DEPENDS because btrfs-tools installs a udev rule, this was incorrect, and it caused a side effect:

$ bitbake btrfs-tools-native

ERROR: Nothing PROVIDES 'udev-native' (but virtual:native:btrfs-tools_4. 8.5.bb DEPENDS on or otherwise requires it). Close matches:
[snip]

Are you sure? The configure.ac does this:

UDEVDIR=
if pkg-config udev --atleast-version 190; then

        UDEVDIR="$(pkg-config udev --variable=udevdir)"

fi
AC_SUBST(UDEVDIR)

Ross

#4 lore raw

Re: [PATCH 2/6] btrfs-tools: remove udev from DEPENDS

Quoted 9 lines · Ross

On 15 February 2017 at 06:25, Robert Yang <[email protected] <mailto:[email protected]>> wrote:

The log said that udev was added to DEPENDS because btrfs-tools installs a udev rule, this was incorrect, and it caused a side effect:

$ bitbake btrfs-tools-native

Quoted 7 lines

ERROR: Nothing PROVIDES 'udev-native' (but virtual:native:btrfs-tools_4.8.5.bb <http://btrfs-tools_4.8.5.bb> DEPENDS on or otherwise requires it). Close matches:
[snip]

Are you sure? The configure.ac <http://configure.ac> does this:

Sorry, I only looked at the log, now updated in the repo:

git://git.openembedded.org/openembedded-core-contrib rbt/6fixes
http://cgit.openembedded.org/openembedded-core-contrib/log/?h=rbt/6fixes

Robert Yang (6):
python-native: PROVIDES python-io-native
btrfs-tools: remove udev from DEPENDS
tcl: extend to nativesdk
gawk/json-glib/libcheck: extend to nativesdk
tcl: fix sed in do_install()
binconfig.bbclass: fix get_binconfig_mangle()

Author: Robert Yang <[email protected]>
Date:   Wed Feb 8 19:30:30 2017 -0800

btrfs-tools: only target requires udev

The native doesn't have to depend on udev, fixed:

$ bitbake btrfs-tools-native

ERROR: Nothing PROVIDES 'udev-native' (but
virtual:native:btrfs-tools_4.8.5.bb DEPENDS on or otherwise requires it). Close matches:
[snip]

meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.5.bb +2 -1
index 7047c434024..8a85933fe5b 100644
@@ -10,7 +10,8 @@ HOMEPAGE = "https://btrfs.wiki.kernel.org"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=fcb02dc552a041dee27e4b85c7396067"
 SECTION = "base"
-DEPENDS = "util-linux attr e2fsprogs lzo acl udev"
+DEPENDS = "util-linux attr e2fsprogs lzo acl"
+DEPENDS_append_class-target = " udev"
 RDEPENDS_${PN} = "libgcc"
 
 SRCREV = "144a19145e248513c7a676defad59836830535c6"

// Robert

Quoted 8 lines

UDEVDIR=
if pkg-config udev --atleast-version 190; then

        UDEVDIR="$(pkg-config udev --variable=udevdir)"

fi
AC_SUBST(UDEVDIR)

Ross

#5 lore raw

PATCH 3/6 tcl: extend to nativesdk

In reply to Robert Yang

Fixed:

$ bitbake nativesdk-expect
ERROR: Nothing PROVIDES 'nativesdk-tcl' (but virtual:nativesdk:expect_5.45.bb DEPENDS on or otherwise requires it). Close matches:
[snip]
---
 meta/recipes-devtools/tcltk/tcl_8.6.6.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
meta/recipes-devtools/tcltk/tcl_8.6.6.bb +3 -3
index 2dd0a7a..c828b38 100644
@@ -54,8 +54,8 @@ do_install() {
 	autotools_do_install install-private-headers
 	ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
 	ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
-	sed -i "s+-L${B}+-L${STAGING_LIBDIR}+g" tclConfig.sh
-	sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh
+	sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
+	sed -i "s;${WORKDIR};${STAGING_INCDIR};g" tclConfig.sh
 	install -d ${D}${bindir_crossscripts}
 	install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
 	install -m 0755 tclConfig.sh ${D}${libdir}
@@ -78,7 +78,7 @@ RDEPENDS_${PN} += "tcl-lib"
 RDEPENDS_${PN}_class-native = ""
 RDEPENDS_${PN}-ptest += "libgcc"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
 
 do_compile_ptest() {
 	oe_runmake tcltest
Signature · 1 line
2.10.2
#6 lore raw

PATCH 4/6 gawk/json-glib/libcheck: extend to nativesdk

In reply to Robert Yang

They are required by nativesdk-cve-check-tool.

---
 meta/recipes-extended/gawk/gawk_4.1.4.bb         | 2 ++
 meta/recipes-gnome/json-glib/json-glib_1.2.2.bb  | 2 +-
 meta/recipes-support/libcheck/libcheck_0.10.0.bb | 2 +-
 3 files changed, 4 insertions(+), 2 deletions(-)
meta/recipes-extended/gawk/gawk_4.1.4.bb +2 -0
index b888df1..dda38ef 100644
@@ -45,3 +45,5 @@ do_install_ptest() {
 	  do cp ${S}/test/$i* ${D}${PTEST_PATH}/test; \
 	done
 }
+
+BBCLASSEXTEND = "nativesdk"
meta/recipes-gnome/json-glib/json-glib_1.2.2.bb +1 -1
index 4e272be..6869ba9 100644
@@ -17,4 +17,4 @@ inherit gnomebase gettext lib_package gobject-introspection gtk-doc manpages
 
 PACKAGECONFIG[manpages] = "--enable-man --with-xml-catalog=${STAGING_ETCDIR_NATIVE}/xml/catalog.xml, --disable-man, libxslt-native xmlto-native"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
meta/recipes-support/libcheck/libcheck_0.10.0.bb +1 -1
index c0b459f..9d34198 100644
@@ -21,4 +21,4 @@ RREPLACES_${PN} = "check (<= 0.9.5)"
 RDEPENDS_${PN} += "gawk"
 RDEPENDS_${PN}_class-native = ""
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
Signature · 1 line
2.10.2
#7 lore raw

PATCH 5/6 tcl: fix sed in do_install()

In reply to Robert Yang

The command:
sed -i "s+${WORKDIR}+${STAGING_INCDIR}+g" tclConfig.sh

was used for replacing "${WORKDIR}", but it also replaced "-L${WORKDIR}", but binconfig.bbclass would replace "-L${WORKDIR}", too, which caused incorrect result, use "'${WORKDIR}" to fix the problem.

---
 meta/recipes-devtools/tcltk/tcl_8.6.6.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-devtools/tcltk/tcl_8.6.6.bb +1 -1
index c828b38..40cd18f 100644
@@ -55,7 +55,7 @@ do_install() {
 	ln -sf ./tclsh${VER} ${D}${bindir}/tclsh
 	ln -sf tclsh8.6 ${D}${bindir}/tclsh${VER}
 	sed -i "s;-L${B};-L${STAGING_LIBDIR};g" tclConfig.sh
-	sed -i "s;${WORKDIR};${STAGING_INCDIR};g" tclConfig.sh
+	sed -i "s;'${WORKDIR};'${STAGING_INCDIR};g" tclConfig.sh
 	install -d ${D}${bindir_crossscripts}
 	install -m 0755 tclConfig.sh ${D}${bindir_crossscripts}
 	install -m 0755 tclConfig.sh ${D}${libdir}
Signature · 1 line
2.10.2
#8 lore raw

PATCH 6/6 binconfig.bbclass: fix get_binconfig_mangle()

In reply to Robert Yang

The command was:
s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"

The STAGING_LIBDIR and STAGING_INCDIR now contains WORKDIR, so the
result would be incorrect like:
TCL_INCLUDE_SPEC='-IFIXMESTAGINGDIRTARGET/usr/include/recipe-sysroot/usr/include/tcl8.6'

Note, the "/usr/include/recipe-sysroot" is not needed. Move the last two sed commands ahead will fix the problem.

---
 meta/classes/binconfig.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/binconfig.bbclass +2 -2
index 5372294..1be5fc4 100644
@@ -13,14 +13,14 @@ def get_binconfig_mangle(d):
         s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
         s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
         s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
+        s += " -e 's:-L${WORKDIR}:-LOELIBDIR:'"
+        s += " -e 's:-I${WORKDIR}:-I-IOEINCDIR:'"
         s += " -e 's:OEBASELIBDIR:${STAGING_BASELIBDIR}:;'"
         s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
         s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
         s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
         s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${prefix}:'"
         s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${exec_prefix}:'"
-        s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
-        s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"
         if d.getVar("OE_BINCONFIG_EXTRA_MANGLE", False):
             s += d.getVar("OE_BINCONFIG_EXTRA_MANGLE")
 
Signature · 1 line
2.10.2
#9 lore raw

Re: [PATCH 6/6] binconfig.bbclass: fix get_binconfig_mangle()

Quoted 25 lines · Robert Yang

The command was:
s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"

The STAGING_LIBDIR and STAGING_INCDIR now contains WORKDIR, so the
result would be incorrect like:
TCL_INCLUDE_SPEC='-IFIXMESTAGINGDIRTARGET/usr/include/recipe-sysroot/usr/include/tcl8.6'

Note, the "/usr/include/recipe-sysroot" is not needed. Move the last two sed commands ahead will fix the problem.

---
 meta/classes/binconfig.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
meta/classes/binconfig.bbclass +0 -0
index 5372294..1be5fc4 100644

meta/classes/binconfig.bbclass def get_binconfig_mangle(d): · line 17

Quoted 5 lines
meta/classes/binconfig.bbclass +2 -0
@@ -13,14 +13,14 @@ def get_binconfig_mangle(d):
         s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
         s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
         s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
+        s += " -e 's:-L${WORKDIR}:-LOELIBDIR:'"
+        s += " -e 's:-I${WORKDIR}:-I-IOEINCDIR:'"

Is the "-I-I" intentional?

Quoted 19 lines
meta/classes/binconfig.bbclass +0 -2
         s += " -e 's:OEBASELIBDIR:${STAGING_BASELIBDIR}:;'"
         s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
         s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
         s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
         s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${prefix}:'"
         s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${exec_prefix}:'"
-        s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
-        s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"
         if d.getVar("OE_BINCONFIG_EXTRA_MANGLE", False):
             s += d.getVar("OE_BINCONFIG_EXTRA_MANGLE")
 
Signature · 7 lines
2.10.2

-- 
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core
Signature · 1 line
Martin 'JaMa' Jansa     jabber: [email protected]
#10 lore raw

Re: [PATCH 6/6] binconfig.bbclass: fix get_binconfig_mangle()

Quoted 21 lines · Martin Jansa
Quoted 20 lines · Robert Yang

The command was:
s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"

The STAGING_LIBDIR and STAGING_INCDIR now contains WORKDIR, so the
result would be incorrect like:
TCL_INCLUDE_SPEC='-IFIXMESTAGINGDIRTARGET/usr/include/recipe-sysroot/usr/include/tcl8.6'

Note, the "/usr/include/recipe-sysroot" is not needed. Move the last two sed commands ahead will fix the problem.

---
 meta/classes/binconfig.bbclass | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
Quoted 12 lines

meta/classes/binconfig.bbclass def get_binconfig_mangle(d): · line 17

Quoted 10 lines
meta/classes/binconfig.bbclass +2 -0
index 5372294..1be5fc4 100644
@@ -13,14 +13,14 @@ def get_binconfig_mangle(d):
         s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
         s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
         s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
+        s += " -e 's:-L${WORKDIR}:-LOELIBDIR:'"
+        s += " -e 's:-I${WORKDIR}:-I-IOEINCDIR:'"

Is the "-I-I" intentional?

Sorry, it's a typo, updated in the repo:

meta/classes/binconfig.bbclass +2 -2
index 5372294..39c3e2b 100644
@@ -13,14 +13,14 @@ def get_binconfig_mangle(d):
         s += " -e 's:=%s${exec_prefix}/:=\\1OEEXECPREFIX/:'" % optional_quote
         s += " -e 's:-L${libdir}:-LOELIBDIR:;'"
         s += " -e 's:-I${includedir}:-IOEINCDIR:;'"
+        s += " -e 's:-L${WORKDIR}:-LOELIBDIR:'"
+        s += " -e 's:-I${WORKDIR}:-IOEINCDIR:'"
         s += " -e 's:OEBASELIBDIR:${STAGING_BASELIBDIR}:;'"
         s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
         s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
         s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
         s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${prefix}:'"
         s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${exec_prefix}:'"
-        s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
-        s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"
         if d.getVar("OE_BINCONFIG_EXTRA_MANGLE", False):
             s += d.getVar("OE_BINCONFIG_EXTRA_MANGLE")
 

// Robert

Quoted 21 lines
Quoted 20 lines
meta/classes/binconfig.bbclass +0 -3
         s += " -e 's:OEBASELIBDIR:${STAGING_BASELIBDIR}:;'"
         s += " -e 's:OELIBDIR:${STAGING_LIBDIR}:;'"
         s += " -e 's:OEINCDIR:${STAGING_INCDIR}:;'"
         s += " -e 's:OEDATADIR:${STAGING_DATADIR}:'"
         s += " -e 's:OEPREFIX:${STAGING_DIR_HOST}${prefix}:'"
         s += " -e 's:OEEXECPREFIX:${STAGING_DIR_HOST}${exec_prefix}:'"
-        s += " -e 's:-I${WORKDIR}:-I${STAGING_INCDIR}:'"
-        s += " -e 's:-L${WORKDIR}:-L${STAGING_LIBDIR}:'"
         if d.getVar("OE_BINCONFIG_EXTRA_MANGLE", False):
             s += d.getVar("OE_BINCONFIG_EXTRA_MANGLE")
 
--

2.10.2

--
_______________________________________________
Openembedded-core mailing list
[email protected]
http://lists.openembedded.org/mailman/listinfo/openembedded-core