Skip to contentSkip to conversation

Misc fixes from Mentor

PATCH In review Christopher Larson 2 participants 16 messages Nov 12, 2015 – Nov 16, 2015

lore
Share & tools
lore
#0 lore raw

cover Misc fixes from Mentor

From: Christopher Larson <[email protected]>

This is the first of three pull requests / patch series from Mentor's queue of changes destined for oe-core master (not jethro). This series is misc fixes.

The following changes since commit e44ed8c18e395b9c055aefee113b90708e8a8a2f:

build-appliance-image: Update to jethro head revision (2015-11-03 14:02:57 +0000)

are available in the git repository at:

git://github.com/kergoth/openembedded-core mentor-misc-fixes-after-jethro
https://github.com/kergoth/openembedded-core/tree/mentor-misc-fixes-after-jethro

Christopher Larson (11):
recipetool.append: don't choke on a trailing ; in a url qemu.bbclass: correct the fsl ppc QEMU_EXTRAOPTIONS qemu.bbclass: fix vardeps of QEMU_OPTIONS
blkspace: fix ldflags for iowatcher
tcf-agent: obey LDFLAGS
latencytop: obey LDFLAGS
systemd: chown hwdb.bin to root:root for do_rootfs
systemd: drop unneeded $D check in prerm
connman: depend on readline
sysklogd: inhibit updatercd for non-sysvinit
openjade-native: statically link local libs

 meta/classes/qemu.bbclass                          | 18 +++++++++-----
 meta/recipes-connectivity/connman/connman.inc      |  2 +-
 meta/recipes-core/systemd/systemd_225.bb           |  7 ++----
 .../openjade/openjade-native_1.3.2.bb              | 22 ++++++++++++-----
 .../tcf-agent/tcf-agent/ldflags.patch              | 28 ++++++++++++++++++++++
 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb   |  1 +
 meta/recipes-extended/sysklogd/sysklogd.inc        |  5 ++++
 .../recipes-kernel/blktrace/blktrace/ldflags.patch | 23 ++++++++++++++----
 .../latencytop-0.5/latencytop-makefile.patch       |  2 +-
 scripts/lib/recipetool/append.py                   |  2 ++
 10 files changed, 86 insertions(+), 24 deletions(-)
 create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
Signature · 1 line
2.2.1
#1 lore raw

PATCH 1/11 recipetool.append: don't choke on a trailing ; in a url

From: Christopher Larson <[email protected]>

Apparently bb.fetch.URI can't handle this at the moment.

---
 scripts/lib/recipetool/append.py | 2 ++
 1 file changed, 2 insertions(+)
scripts/lib/recipetool/append.py +2 -0
index 7fe4115..867d55a 100644
@@ -343,6 +343,8 @@ def appendsrc(args, files, rd, extralines=None):
     simplified = {}
     src_uri = rd.getVar('SRC_URI', True).split()
     for uri in src_uri:
+        if uri.endswith(';'):
+            uri = uri[:-1]
         simple_uri = bb.fetch.URI(uri)
         simple_uri.params = {}
         simplified[str(simple_uri)] = uri
Signature · 1 line
2.2.1
#2 lore raw

PATCH 2/11 qemu.bbclass: correct the fsl ppc QEMU_EXTRAOPTIONS

From: Christopher Larson <[email protected]>

These need to be based on PACKAGE_ARCH rather than TARGET_ARCH, as we aren't using overrides for this.

---
 meta/classes/qemu.bbclass | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)
meta/classes/qemu.bbclass +6 -6
index 601f587..064b57e 100644
@@ -42,10 +42,10 @@ QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVa
 QEMU_EXTRAOPTIONS_iwmmxt    = " -cpu pxa270-c5"
 QEMU_EXTRAOPTIONS_armv6     = " -cpu arm1136"
 QEMU_EXTRAOPTIONS_armv7a    = " -cpu cortex-a8"
-QEMU_EXTRAOPTIONS_e500v2    = " -cpu e500v2"
-QEMU_EXTRAOPTIONS_e500mc    = " -cpu e500mc"
-QEMU_EXTRAOPTIONS_e5500     = " -cpu e5500"
-QEMU_EXTRAOPTIONS_e5500-64b = " -cpu e5500"
-QEMU_EXTRAOPTIONS_e6500     = " -cpu e6500"
-QEMU_EXTRAOPTIONS_e6500-64b = " -cpu e6500"
+QEMU_EXTRAOPTIONS_ppce500v2 = " -cpu e500v2"
+QEMU_EXTRAOPTIONS_ppce500mc = " -cpu e500mc"
+QEMU_EXTRAOPTIONS_ppce5500 = " -cpu e5500"
+QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e5500"
+QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e6500"
+QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e6500"
 QEMU_EXTRAOPTIONS_ppc7400   = " -cpu 7400"
Signature · 1 line
2.2.1
#3 lore raw

PATCH 3/11 qemu.bbclass: fix vardeps of QEMU_OPTIONS

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

The variable name for QEMU_EXTRAOPTIONS is constructed programmatically, so we need an explicit variable dependency, otherwise changes to it won't cause e.g. qemuwrapper-cross to be rebuilt.

---
 meta/classes/qemu.bbclass | 1 +
 1 file changed, 1 insertion(+)
meta/classes/qemu.bbclass +1 -0
index 064b57e..315c17f 100644
@@ -39,6 +39,7 @@ def qemu_run_binary(data, rootfs_path, binary):
 # PACKAGE_ARCH, not overrides and hence have to do this dance. Simply being arch 
 # specific isn't good enough.
 QEMU_OPTIONS = "-r ${OLDEST_KERNEL} ${@d.getVar("QEMU_EXTRAOPTIONS_%s" % d.getVar('PACKAGE_ARCH', True), True) or ""}"
+QEMU_OPTIONS[vardeps] += "QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}"
 QEMU_EXTRAOPTIONS_iwmmxt    = " -cpu pxa270-c5"
 QEMU_EXTRAOPTIONS_armv6     = " -cpu arm1136"
 QEMU_EXTRAOPTIONS_armv7a    = " -cpu cortex-a8"
Signature · 1 line
2.2.1
#4 lore raw

PATCH 4/11 blkspace: fix ldflags for iowatcher

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

This quiets a GNU_HASH warning.

---
 .../recipes-kernel/blktrace/blktrace/ldflags.patch | 23 +++++++++++++++++-----
 1 file changed, 18 insertions(+), 5 deletions(-)
meta/recipes-kernel/blktrace/blktrace/ldflags.patch +18 -5
index 037d161..dea1aa2 100644
@@ -9,11 +9,6 @@ http://git.yoctoproject.org/cgit/cgit.cgi/meta-mentor as of commit id
 aed463414e2e2bf8ca44ba54ee5973e7ed599e57
 
 Signed-off-by: Fahad Usman <[email protected]>
----
- Makefile          |   11 ++++++-----
- btreplay/Makefile |    3 ++-
- btt/Makefile      |    3 ++-
- 3 files changed, 10 insertions(+), 7 deletions(-)
 
 --- git.orig/Makefile
 +++ git/Makefile
@@ -91,3 +86,21 @@ Signed-off-by: Fahad Usman <[email protected]>
  
  ifneq ($(wildcard .depend),)
  include .depend
+--- git.orig/iowatcher/Makefile
++++ git/iowatcher/Makefile
+@@ -1,5 +1,6 @@
+ C      = gcc
+ CFLAGS  = -Wall -O0 -g -W
++LDFLAGS =
+ ALL_CFLAGS = $(CFLAGS) -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D_FILE_OFFSET_BITS=64
+ 
+ PROGS = iowatcher
+@@ -19,7 +20,7 @@ all: $(ALL)
+ 	$(CC) -o $*.o -c $(ALL_CFLAGS) $<
+ 
+ iowatcher: blkparse.o plot.o main.o tracers.o mpstat.o fio.o
+-	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm
++	$(CC) $(ALL_CFLAGS) -o $@ $(filter %.o,$^) -lm $(LDFLAGS)
+ 
+ depend:
+ 	@$(CC) -MM $(ALL_CFLAGS) *.c 1> .depend
Signature · 1 line
2.2.1
#5 lore raw

PATCH 5/11 tcf-agent: obey LDFLAGS

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

This silences a GNU_HASH warning when using external toolchains. The patch is courtesy Abdur Rehman <[email protected]>.

---
 .../tcf-agent/tcf-agent/ldflags.patch              | 28 ++++++++++++++++++++++
 meta/recipes-devtools/tcf-agent/tcf-agent_git.bb   |  1 +
 2 files changed, 29 insertions(+)
 create mode 100644 meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch
meta/recipes-devtools/tcf-agent/tcf-agent/ldflags.patch new file +28 -0
new file mode 100644
index 0000000..c03c55d
@@ -0,0 +1,28 @@
+Upstream-Status: Pending
+
+From d92af0483c20365fd0af740d0baef8870b4aa374 Mon Sep 17 00:00:00 2001
+From: Abdur Rehman <[email protected]>
+Date: Wed, 26 Aug 2015 19:18:11 +0500
+Subject: [PATCH] tcf-agent: obey LDFLAGS
+
+Signed-off-by: Abdur Rehman <[email protected]>
+---
+ Makefile.inc |    2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/Makefile.inc b/Makefile.inc
+index 959028f..3148942 100644
+--- a/Makefile.inc
++++ b/Makefile.inc
+@@ -96,7 +96,7 @@ NO_LINK_F	?= -c
+ # Linker definition and flags
+ 
+ LINK		?= $(CC)
+-LINK_FLAGS	?= $(CFLAGS)
++LINK_FLAGS	?= $(LDFLAGS) $(CFLAGS)
+ LINK_OUT_F	?= $(OUT_OBJ_F)
+ 
+ # Archiver definition and flags
+-- 
+1.7.9.5
+
meta/recipes-devtools/tcf-agent/tcf-agent_git.bb +1 -0
index f8fd390..1337da9 100644
@@ -10,6 +10,7 @@ PV = "1.3.0+git${SRCPV}"
 
 SRC_URI = "git://git.eclipse.org/gitroot/tcf/org.eclipse.tcf.agent.git;branch=1.3_mars_bugfix \
            file://fix_ranlib.patch \
+           file://ldflags.patch \
            file://tcf-agent.init \
            file://tcf-agent.service \
           "
Signature · 1 line
2.2.1
#6 lore raw

PATCH 6/11 latencytop: obey LDFLAGS

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

Patch update courtesy Abdur Rehman <[email protected]>.

---
 meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-kernel/latencytop/latencytop-0.5/latencytop-makefile.patch +1 -1
index 0cf217f..af19b37 100644
@@ -12,7 +12,7 @@ index 16a2369..fa797a2 100644
  SBINDIR = /usr/sbin
  XCFLAGS = -W  -g `pkg-config --cflags glib-2.0` -D_FORTIFY_SOURCE=2 -Wno-sign-compare
 -LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncursesw 
-+LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncurses
++LDF = -Wl,--as-needed `pkg-config --libs glib-2.0`   -lncurses $(LDFLAGS)
 +CC ?= gcc
  
  OBJS= latencytop.o text_display.o translate.o fsync.o
Signature · 1 line
2.2.1
#7 lore raw

PATCH 7/11 systemd: chown hwdb.bin to root:root for do_rootfs

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

This is created by qemu for the do_rootfs case, which bypasses pseudo, so we need to correct the ownership. This fixes a warning issued by rootfs_check_host_user_contaminated.

---
 meta/recipes-core/systemd/systemd_225.bb | 1 +
 1 file changed, 1 insertion(+)
meta/recipes-core/systemd/systemd_225.bb +1 -0
index 18c2448..9b0503d 100644
@@ -401,6 +401,7 @@ pkg_postinst_udev-hwdb () {
 	if test -n "$D"; then
 		${@qemu_run_binary(d, '$D', '${base_bindir}/udevadm')} hwdb --update \
 			--root $D
+		chown root:root $D${sysconfdir}/udev/hwdb.bin
 	else
 		udevadm hwdb --update
 	fi
Signature · 1 line
2.2.1
#8 lore raw

PATCH 8/11 systemd: drop unneeded $D check in prerm

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

---
 meta/classes/qemu.bbclass                | 5 +++++
 meta/recipes-core/systemd/systemd_225.bb | 6 +-----
 2 files changed, 6 insertions(+), 5 deletions(-)
meta/classes/qemu.bbclass +5 -0
index 315c17f..1f5bbcc 100644
@@ -50,3 +50,8 @@ QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e5500"
 QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e6500"
 QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e6500"
 QEMU_EXTRAOPTIONS_ppc7400   = " -cpu 7400"
+
+python () {
+    if "QEMU_EXTRAOPTIONS" in d and d.expand("QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}") not in d and d.getVar("PACKAGE_ARCH", True) != "all":
+        bb.fatal("Incorrect use of overrides rather than PACKAGE_ARCH for QEMU_EXTRAOPTIONS")
+}
meta/recipes-core/systemd/systemd_225.bb +1 -5
index 9b0503d..6bd9adc 100644
@@ -408,11 +408,7 @@ pkg_postinst_udev-hwdb () {
 }
 
 pkg_prerm_udev-hwdb () {
-	if test -n "$D"; then
-		exit 1
-	fi
-
-	rm -f ${sysconfdir}/udev/hwdb.bin
+	rm -f $D${sysconfdir}/udev/hwdb.bin
 }
 
 # As this recipe builds udev, respect systemd being in DISTRO_FEATURES so
Signature · 1 line
2.2.1
#9 lore raw

Re: [PATCH 08/11] systemd: drop unneeded $D check in prerm

Quoted 11 lines · Christopher Larson
meta/classes/qemu.bbclass +3 -0
index 315c17f..1f5bbcc 100644
@@ -50,3 +50,8 @@ QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e5500"
 QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e6500"
 QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e6500"
 QEMU_EXTRAOPTIONS_ppc7400   = " -cpu 7400"
+
+python () {
+    if "QEMU_EXTRAOPTIONS" in d and
Quoted 6 lines

d.expand("QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}") not in d and d.getVar("PACKAGE_ARCH", True) != "all":
+ bb.fatal("Incorrect use of overrides rather than PACKAGE_ARCH for
QEMU_EXTRAOPTIONS")
+}

I think you meant to split this out.

Ross

#10 lore raw

Re: [PATCH 08/11] systemd: drop unneeded $D check in prerm

Quoted 14 lines · Ross
Quoted 11 lines · Christopher Larson
meta/classes/qemu.bbclass +3 -0
index 315c17f..1f5bbcc 100644
@@ -50,3 +50,8 @@ QEMU_EXTRAOPTIONS_ppc64e5500 = " -cpu e5500"
 QEMU_EXTRAOPTIONS_ppce6500 = " -cpu e6500"
 QEMU_EXTRAOPTIONS_ppc64e6500 = " -cpu e6500"
 QEMU_EXTRAOPTIONS_ppc7400   = " -cpu 7400"
+
+python () {
+    if "QEMU_EXTRAOPTIONS" in d and
Quoted 9 lines
Quoted 6 lines

d.expand("QEMU_EXTRAOPTIONS_${PACKAGE_ARCH}") not in d and d.getVar("PACKAGE_ARCH", True) != "all":
+ bb.fatal("Incorrect use of overrides rather than PACKAGE_ARCH
for QEMU_EXTRAOPTIONS")
+}

I think you meant to split this out.

Er, yes, no idea how I missed that when reviewing the diffs. That was meant to stay local. Sorry about that.

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

Re: [PATCH 08/11] systemd: drop unneeded $D check in prerm

Quoted 3 lines · Christopher Larson

Er, yes, no idea how I missed that when reviewing the diffs. That was meant to stay local. Sorry about that.

Don't bother with a v2 by the way, I dropped that chunk when merging to mut.

Ross

#12 lore raw

Re: [PATCH 08/11] systemd: drop unneeded $D check in prerm

Quoted 10 lines · Ross
Quoted 3 lines · Christopher Larson

Er, yes, no idea how I missed that when reviewing the diffs. That was meant to stay local. Sorry about that.

Don't bother with a v2 by the way, I dropped that chunk when merging to mut.

Ah, thanks.

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

PATCH 9/11 connman: depend on readline

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

When the client is enabled, which we do by default, readline is required. Currently it gets pulled in by other dependencies of connman, indirectly, but we should be explicit rather than relying on this.

---
 meta/recipes-connectivity/connman/connman.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
meta/recipes-connectivity/connman/connman.inc +1 -1
index afdb3f2..6324d7a 100644
@@ -15,7 +15,7 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e \
 
 inherit autotools pkgconfig systemd update-rc.d bluetooth
 
-DEPENDS  = "dbus glib-2.0 ppp iptables"
+DEPENDS  = "dbus glib-2.0 ppp iptables readline"
 
 INC_PR = "r20"
 
Signature · 1 line
2.2.1
#14 lore raw

PATCH 10/11 sysklogd: inhibit updatercd for non-sysvinit

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

This recipe doesn't inherit systemd, so we need to take care of it ourselves.

---
 meta/recipes-extended/sysklogd/sysklogd.inc | 5 +++++
 1 file changed, 5 insertions(+)
meta/recipes-extended/sysklogd/sysklogd.inc +5 -0
index bcf8aa7..85b3cdc 100644
@@ -56,3 +56,8 @@ pkg_prerm_${PN} () {
 	fi
 	fi
 }
+
+python () {
+    if not bb.utils.contains('DISTRO_FEATURES', 'sysvinit', True, False, d):
+        d.setVar("INHIBIT_UPDATERCD_BBCLASS", "1")
+}
Signature · 1 line
2.2.1
#15 lore raw

PATCH 11/11 openjade-native: statically link local libs

In reply to Christopher Larson

From: Christopher Larson <[email protected]>

Statically link local libs to avoid gold link issue. This is clearly a workaround, but does get us past the failures with systems using gold by default until we find a better solution.

[YOCTO #2972]

---
 .../openjade/openjade-native_1.3.2.bb              | 22 ++++++++++++++++------
 1 file changed, 16 insertions(+), 6 deletions(-)
meta/recipes-devtools/openjade/openjade-native_1.3.2.bb +16 -6
index fa7aa62..355ed6a 100644
@@ -24,6 +24,10 @@ SRC_URI[sha256sum] = "1d2d7996cc94f9b87d0c51cf0e028070ac177c4123ecbfd7ac1cb8d0b7
 
 inherit autotools-brokensep native
 
+# Statically link local libs to avoid gold link issue [YOCTO #2972]
+PACKAGECONFIG ?= "static-only-libs"
+PACKAGECONFIG[static-only-libs] = "--enable-static --disable-shared,--enable-static --enable-shared,,"
+
 EXTRA_OECONF = "--enable-spincludedir=${STAGING_INCDIR}/OpenSP \
                 --enable-splibdir=${STAGING_LIBDIR}"
 
@@ -57,14 +61,20 @@ do_compile_prepend () {
 do_install() {
 	# Refer to http://www.linuxfromscratch.org/blfs/view/stable/pst/openjade.html
 	# for details.
-	install -d ${D}${bindir}	
-	install -m 0755 ${S}/jade/.libs/openjade ${D}${bindir}/openjade
+	install -d ${D}${bindir} ${D}${libdir}
+	if ${@bb.utils.contains('PACKAGECONFIG', 'static-only-libs', 'true', 'false', d)}; then
+		install -m 0755 jade/openjade ${D}${bindir}/openjade
+		oe_libinstall -a -C style libostyle ${D}${libdir}
+		oe_libinstall -a -C spgrove libospgrove ${D}${libdir}
+		oe_libinstall -a -C grove libogrove ${D}${libdir}
+	else
+		install -m 0755 jade/.libs/openjade ${D}${bindir}/openjade
+		oe_libinstall -a -so -C style libostyle ${D}${libdir}
+		oe_libinstall -a -so -C spgrove libospgrove ${D}${libdir}
+		oe_libinstall -a -so -C grove libogrove ${D}${libdir}
+	fi
 	ln -sf openjade ${D}${bindir}/jade
 
-	oe_libinstall -a -so -C style libostyle ${D}${libdir}
-	oe_libinstall -a -so -C spgrove libospgrove ${D}${libdir}
-	oe_libinstall -a -so -C grove libogrove ${D}${libdir}
-
 	install -d ${D}${datadir}/sgml/openjade-${PV}
 	install -m 644 dsssl/catalog ${D}${datadir}/sgml/openjade-${PV}
 	install -m 644 dsssl/*.dtd ${D}${datadir}/sgml/openjade-${PV}
Signature · 1 line
2.2.1