[OE-core] [PATCH 0/1] util-linux: fix CVE-2014-9114

2015-03-10 Thread Chen Qi
The following changes since commit 99f209a49a4390192b95184ff86bd6f973010111:

  layer.conf: bump version as error-report interface changed (2015-03-10 
17:44:56 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib 
ChenQi/util-linux-CVE-2014-9114
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/util-linux-CVE-2014-9114

Chen Qi (1):
  util-linux: fix CVE-2014-9114

 .../util-linux/util-linux/CVE-2014-9114.patch  | 174 +
 meta/recipes-core/util-linux/util-linux_2.25.2.bb  |   1 +
 2 files changed, 175 insertions(+)
 create mode 100644 meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] util-linux: fix CVE-2014-9114

2015-03-10 Thread Chen Qi
Backport a patch to fix CVE-2014-9114.
The patch has been integrated in util-linux-2.26.

[YOCTO #7180]

Signed-off-by: Chen Qi 
---
 .../util-linux/util-linux/CVE-2014-9114.patch  | 174 +
 meta/recipes-core/util-linux/util-linux_2.25.2.bb  |   1 +
 2 files changed, 175 insertions(+)
 create mode 100644 meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch

diff --git a/meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch 
b/meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch
new file mode 100644
index 000..5eaa08d
--- /dev/null
+++ b/meta/recipes-core/util-linux/util-linux/CVE-2014-9114.patch
@@ -0,0 +1,174 @@
+Upstream-Status: Backport
+
+This patch is for CVE-2014-9114.
+This patch should be removed once util-linux is upgraded to 2.26.
+
+Signed-off-by: Chen Qi 
+
+From 89e90ae7b2826110ea28c1c0eb8e7c56c3907bdc Mon Sep 17 00:00:00 2001
+From: Karel Zak 
+Date: Thu, 27 Nov 2014 13:39:35 +0100
+Subject: [PATCH] libblkid: care about unsafe chars in cache
+
+The high-level libblkid API uses /run/blkid/blkid.tab cache to
+store probing results. The cache format is
+
+   devname
+
+and unfortunately the cache code does not escape quotation marks:
+
+   # mkfs.ext4 -L 'AAA"BBB'
+
+   # cat /run/blkid/blkid.tab
+   ...
+   /dev/sdb1
+
+such string is later incorrectly parsed and blkid(8) returns
+nonsenses. And for use-cases like
+
+   # eval $(blkid -o export /dev/sdb1)
+
+it's also insecure.
+
+Note that mount, udevd and blkid -p are based on low-level libblkid
+API, it bypass the cache and directly read data from the devices.
+
+The current udevd upstream does not depend on blkid(8) output at all,
+it's directly linked with the library and all unsafe chars are encoded by
+\x notation.
+
+   # mkfs.ext4 -L 'X"`/tmp/foo` "' /dev/sdb1
+   # udevadm info --export-db | grep LABEL
+   ...
+   E: ID_FS_LABEL=X__/tmp/foo___
+   E: ID_FS_LABEL_ENC=X\x22\x60\x2ftmp\x2ffoo\x60\x20\x22
+
+Signed-off-by: Karel Zak 
+---
+ libblkid/src/read.c | 21 ++---
+ libblkid/src/save.c | 22 +-
+ misc-utils/blkid.8  |  5 -
+ misc-utils/blkid.c  |  4 ++--
+ 4 files changed, 45 insertions(+), 7 deletions(-)
+
+diff --git a/libblkid/src/read.c b/libblkid/src/read.c
+index 0e91c9c..81ab0df 100644
+--- a/libblkid/src/read.c
 b/libblkid/src/read.c
+@@ -252,15 +252,30 @@ static int parse_token(char **name, char **value, char 
**cp)
+   *value = skip_over_blank(*value + 1);
+ 
+   if (**value == '"') {
+-  end = strchr(*value + 1, '"');
+-  if (!end) {
++  char *p = end = *value + 1;
++
++  /* convert 'foo\"bar'  to 'foo"bar' */
++  while (*p) {
++  if (*p == '\\') {
++  p++;
++  *end = *p;
++  } else {
++  *end = *p;
++  if (*p == '"')
++  break;
++  }
++  p++;
++  end++;
++  }
++
++  if (*end != '"') {
+   DBG(READ, ul_debug("unbalanced quotes at: %s", *value));
+   *cp = *value;
+   return -BLKID_ERR_CACHE;
+   }
+   (*value)++;
+   *end = '\0';
+-  end++;
++  end = ++p;
+   } else {
+   end = skip_over_word(*value);
+   if (*end) {
+diff --git a/libblkid/src/save.c b/libblkid/src/save.c
+index 8216f09..5e8bbee 100644
+--- a/libblkid/src/save.c
 b/libblkid/src/save.c
+@@ -26,6 +26,21 @@
+ 
+ #include "blkidP.h"
+ 
++
++static void save_quoted(const char *data, FILE *file)
++{
++  const char *p;
++
++  fputc('"', file);
++  for (p = data; p && *p; p++) {
++  if ((unsigned char) *p == 0x22 ||   /* " */
++  (unsigned char) *p == 0x5c) /* \ */
++  fputc('\\', file);
++
++  fputc(*p, file);
++  }
++  fputc('"', file);
++}
+ static int save_dev(blkid_dev dev, FILE *file)
+ {
+   struct list_head *p;
+@@ -43,9 +58,14 @@ static int save_dev(blkid_dev dev, FILE *file)
+ 
+   if (dev->bid_pri)
+   fprintf(file, " PRI=\"%d\"", dev->bid_pri);
++
+   list_for_each(p, &dev->bid_tags) {
+   blkid_tag tag = list_entry(p, struct blkid_struct_tag, 
bit_tags);
+-  fprintf(file, " %s=\"%s\"", tag->bit_name,tag->bit_val);
++
++  fputc(' ', file);   /* space between tags */
++  fputs(tag->bit_name, file); /* tag NAME */
++  fputc('=', file);   /* separator between 
NAME and VALUE */
++  save_quoted(tag->bit_val, file);/* tag "VALUE" */
+   }
+   fprintf(file, ">%s\n", dev->bid_name);
+ 
+diff --git a/misc-utils/blkid.8 b

[OE-core] [PATCH v2] bootchart2: add dependency for bootchartd

2015-03-10 Thread Jian Liu
bootchartd use the command lsb_release and pidof during running, 
and also the two commands are not installed defaultly.
So add sysvinit-pidof and lsb in the RDEPENDS.

Signed-off-by: Jian Liu 
---
 meta/recipes-devtools/bootchart2/bootchart2_git.bb | 5 +
 1 file changed, 5 insertions(+)

diff --git a/meta/recipes-devtools/bootchart2/bootchart2_git.bb 
b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
index 04fb901..2c6d0ff 100644
--- a/meta/recipes-devtools/bootchart2/bootchart2_git.bb
+++ b/meta/recipes-devtools/bootchart2/bootchart2_git.bb
@@ -136,6 +136,7 @@ do_install () {
 
 PACKAGES =+ "pybootchartgui"
 FILES_pybootchartgui += "${libdir}/python*/site-packages/pybootchartgui 
${bindir}/pybootchartgui"
+RDEPENDS_bootchart2 = "sysvinit-pidof lsb"
 RDEPENDS_pybootchartgui = "python-pycairo python-compression python-image 
python-textutils python-shell python-compression python-codecs"
 DEPENDS_append_class-native = " python-pycairo-native"
 
-- 
1.8.5.2.233.g932f7e4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] systemd: Fix the problem of an empty journal on boot

2015-03-10 Thread Khem Raj

> On Mar 10, 2015, at 9:48 PM, Khem Raj  wrote:
> 
>> 
>> On Mar 7, 2015, at 11:37 AM, Khem Raj  wrote:
>> 
>> On Fri, Mar 6, 2015 at 1:18 AM, Khem Raj  wrote:
>>> 
 On Mar 5, 2015, at 10:01 PM, randy.e.w...@linux.intel.com wrote:
 
> On Mar 5, 2015 6:13 PM, "Randy Witt"  wrote:
>> 
>> systemd by default tries to write the journal to /var/log/journal.
>> But base-files has a symlink /var/log -> /var/volatile/log. And
>> /var/volatile is a tmpfs mount in /etc/fstab.
>> 
>> If the journal service started before /var/volatile was mounted (which
>> was the typical scenario) then the journal would appear empty since
>> the old location was mounted over.
>> 
>> This change fixes the problem by ensuring that the journal doesn't start
>> until after the mount happens.
>> 
> 
> What happens if folks have a different fstab then default? Will it still
> work
 
 Yes, the "After" only changes behavior if something else has caused
 var-volatile.mount to be in the set of services to be started.
 
 I verified that was the case by removing /var/volatile from /etc/fstab and
 the journal still starts with no errors.
>>> 
>>> perfect thanks. I will test it out in few hrs myself.
>> 
>> for some reason, my console never comes up now. I am not sure if this
>> is the patch causing it. I will try to single it out.
> 
> This patch should not be applied, but I see it has been applied anyway 
> meanwhile, So we might have to solve this issue differently. 


Remove mounting of /var/volatile from /etc/fstab

tmpfs/var/volatiletmpfs  defaults  0  0

Then add a mount unit file for it

/lib/systemd/system/var-volatile.mount


#  This file is part of systemd.
#
#  systemd is free software; you can redistribute it and/or modify it
#  under the terms of the GNU Lesser General Public License as published by
#  the Free Software Foundation; either version 2.1 of the License, or
#  (at your option) any later version.

[Unit]
Description=Temporary Directory
Documentation=man:hier(7)
Documentation=http://www.freedesktop.org/wiki/Software/systemd/APIFileSystems
ConditionPathIsSymbolicLink=!/var/volatile
DefaultDependencies=no
Conflicts=umount.target
Before=local-fs.target umount.target

[Mount]
What=tmpfs
Where=/var/volatile
Type=tmpfs
Options=mode=1777,strictatime


solves this use-before-define issue, even when /var/volatile is mounted as 
tmpfs as we do in OE.


Now encode this logic up under DISTRO_FEATURE = “systemd” and we have a 
complete solution :)

Ideally we should mount /var/volatile as tmpfs only when using ro-rfs and do 
this whole orchestration of

if systemd add the above mount service + the service created for holding 
journald start point ( that got added in the patch above )

no changes are required for sysvinit

> 
> This is actually the cause of my console not coming up. It was coming up 
> after 15 minutes
> systemd-analyse blame said systemd-tmpfiles-setup-dev.service is taking 14 
> mins to come up.
> I then traced through it and the problem is evident that its trying to write 
> journal when creating /dev entries but we have delayed the journald starting 
> point and caused a use-before-define situation.
> I deleted /var/volatile symlinks and let /var/log be proper directory and 
> same for /var/tmp. All worked fine, without this patch. We should probably 
> stop doing /var/volatile thing anyway its not in FHS standard either, for 
> ro-rfs do something else ( may be copy-binds into /tmp/) and for general case 
> just leave it alone. 
> 
> 00:04:23 read(4, "#  This file is part of systemd."..., 4096) = 1244
> 00:04:23 sendmsg(3, {msg_name(0)=NULL, 
> msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
> {"Entry \"/run/user\" does not match"..., 62}, {"\n", 1}], msg_controllen=0, 
> msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
> urce temporarily unavailable)
> 00:04:33 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
> {"Entry \"/run/user\" does not match"..., 62}, {"\n", 1}], 5) = 90
> 00:04:33 sendmsg(3, {msg_name(0)=NULL, 
> msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
> {"Entry \"/run/utmp\" does not match"..., 62}, {"\n", 1}], msg_controllen=0, 
> msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
> urce temporarily unavailable)
> 00:04:43 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
> {"Entry \"/run/utmp\" does not match"..., 62}, {"\n", 1}], 5) = 90
> 00:04:43 sendmsg(3, {msg_name(0)=NULL, 
> msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
> {"Entry \"/run/systemd/ask-password"..., 78}, {"\n", 1}], msg_controllen=0, 
> msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Resou
> rce temporarily unavailable)
> 00:04:53 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
> {"Entry \"/run/systemd/ask-password"..., 78}, {"\n", 1}], 5) = 106
> 00:04:53 sendmsg(

Re: [OE-core] [PATCH] systemd: Fix the problem of an empty journal on boot

2015-03-10 Thread Khem Raj

> On Mar 7, 2015, at 11:37 AM, Khem Raj  wrote:
> 
> On Fri, Mar 6, 2015 at 1:18 AM, Khem Raj  wrote:
>> 
>>> On Mar 5, 2015, at 10:01 PM, randy.e.w...@linux.intel.com wrote:
>>> 
 On Mar 5, 2015 6:13 PM, "Randy Witt"  wrote:
> 
> systemd by default tries to write the journal to /var/log/journal.
> But base-files has a symlink /var/log -> /var/volatile/log. And
> /var/volatile is a tmpfs mount in /etc/fstab.
> 
> If the journal service started before /var/volatile was mounted (which
> was the typical scenario) then the journal would appear empty since
> the old location was mounted over.
> 
> This change fixes the problem by ensuring that the journal doesn't start
> until after the mount happens.
> 
 
 What happens if folks have a different fstab then default? Will it still
 work
>>> 
>>> Yes, the "After" only changes behavior if something else has caused
>>> var-volatile.mount to be in the set of services to be started.
>>> 
>>> I verified that was the case by removing /var/volatile from /etc/fstab and
>>> the journal still starts with no errors.
>> 
>> perfect thanks. I will test it out in few hrs myself.
> 
> for some reason, my console never comes up now. I am not sure if this
> is the patch causing it. I will try to single it out.

This patch should not be applied, but I see it has been applied anyway 
meanwhile, So we might have to solve this issue differently. 

This is actually the cause of my console not coming up. It was coming up after 
15 minutes
systemd-analyse blame said systemd-tmpfiles-setup-dev.service is taking 14 mins 
to come up.
I then traced through it and the problem is evident that its trying to write 
journal when creating /dev entries but we have delayed the journald starting 
point and caused a use-before-define situation.
I deleted /var/volatile symlinks and let /var/log be proper directory and same 
for /var/tmp. All worked fine, without this patch. We should probably stop 
doing /var/volatile thing anyway its not in FHS standard either, for ro-rfs do 
something else ( may be copy-binds into /tmp/) and for general case just leave 
it alone. 

00:04:23 read(4, "#  This file is part of systemd."..., 4096) = 1244
00:04:23 sendmsg(3, {msg_name(0)=NULL, 
msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
{"Entry \"/run/user\" does not match"..., 62}, {"\n", 1}], msg_controllen=0, 
msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
urce temporarily unavailable)
00:04:33 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
{"Entry \"/run/user\" does not match"..., 62}, {"\n", 1}], 5) = 90
00:04:33 sendmsg(3, {msg_name(0)=NULL, 
msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
{"Entry \"/run/utmp\" does not match"..., 62}, {"\n", 1}], msg_controllen=0, 
msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
urce temporarily unavailable)
00:04:43 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
{"Entry \"/run/utmp\" does not match"..., 62}, {"\n", 1}], 5) = 90
00:04:43 sendmsg(3, {msg_name(0)=NULL, 
msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
{"Entry \"/run/systemd/ask-password"..., 78}, {"\n", 1}], msg_controllen=0, 
msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Resou
rce temporarily unavailable)
00:04:53 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
{"Entry \"/run/systemd/ask-password"..., 78}, {"\n", 1}], 5) = 106
00:04:53 sendmsg(3, {msg_name(0)=NULL, 
msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
{"Entry \"/run/systemd/seats\" does "..., 71}, {"\n", 1}], msg_controllen=0, 
msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
urce temporarily unavailable)
00:05:03 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
{"Entry \"/run/systemd/seats\" does "..., 71}, {"\n", 1}], 5) = 99
00:05:03 sendmsg(3, {msg_name(0)=NULL, 
msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
{"Entry \"/run/systemd/sessions\" do"..., 74}, {"\n", 1}], msg_controllen=0, 
msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
urce temporarily unavailable)
00:05:13 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
{"Entry \"/run/systemd/sessions\" do"..., 74}, {"\n", 1}], 5) = 102
00:05:13 sendmsg(3, {msg_name(0)=NULL, 
msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
{"Entry \"/run/systemd/users\" does "..., 71}, {"\n", 1}], msg_controllen=0, 
msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
urce temporarily unavailable)
00:05:23 writev(5, [{"<31>", 4}, {"systemd-tmpfiles", 16}, {"[114]: ", 7}, 
{"Entry \"/run/systemd/users\" does "..., 71}, {"\n", 1}], 5) = 99
00:05:23 sendmsg(3, {msg_name(0)=NULL, 
msg_iov(4)=[{"PRIORITY=7\nSYSLOG_FACILITY=3\nCOD"..., 284}, {"MESSAGE=", 8}, 
{"Entry \"/run/systemd/machines\" do"..., 74}, {"\n", 1}], msg_controllen=0, 
msg_flags=0}, MSG_NOSIGNAL) = -1 EAGAIN (Reso
urce temporarily unavaila

Re: [OE-core] [dizzy][PATCH] libunwind: backport patch to link against libgcc_s intead of libgcc

2015-03-10 Thread Jonathan Liu
On 11 March 2015 at 14:19, Khem Raj  wrote:
>
>> On Mar 10, 2015, at 8:05 PM, Jonathan Liu  wrote:
>>
>> On 11 March 2015 at 13:43, Khem Raj  wrote:
>>>
 On Mar 10, 2015, at 7:33 PM, Jonathan Liu  wrote:

 Signed-off-by: Jonathan Liu 
 ---
 ...-libunwind-to-libgcc_s-rather-than-libgcc.patch | 42 
 ++
 meta/recipes-support/libunwind/libunwind_1.1.bb|  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 
 meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch

 diff --git 
 a/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
  
 b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
 new file mode 100644
 index 000..0e55c91
 --- /dev/null
 +++ 
 b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
 @@ -0,0 +1,42 @@
 +From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
 +From: Thierry Reding 
 +Date: Fri, 27 Jun 2014 08:40:33 +0200
 +Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
 +
 +For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
 +example, libgcc_s.so.1 contains some symbols needed by libunwind which
 +are not present in libgcc.
 +
 +This causes the following link error when building the X.Org X server
 +with libunwind support:
 +
 +   CCLD Xorg
 + /usr/lib/libunwind.so: undefined reference to 
 `__aeabi_unwind_cpp_pr0'
 + /usr/lib/libunwind.so: undefined reference to 
 `__aeabi_unwind_cpp_pr1'
 +
 +Linking against libgcc_s explicitly solves this problem.
 +
>>>
>>> have you tried it at runtime too ?
>>>
>> strace 4.9 with libunwind PACKAGECONFIG wouldn't build on master
>> without the patch.
>> If I add strace 4.9 recipe to dizzy branch, using the libunwind
>> PACKAGECONFIG also fails to build without the patch. It gives the same
>> errors during linking.
>>
>> I tested at runtime on master branch which has libunwind 1.1 running
>> strace 4.9 on the target and didn't notice any issues. I haven't
>> tested on dizzy branch at runtime though.
>
> OK thanks, it would be interesting to see if exception handling in some 
> binaries and shared objects is able to unwind through
> to make sure this all works
>

Seems to work on dizzy branch too with strace 4.9 + libunwind 1.1 +
libunwind patch:
# strace -k uname 2>&1 | sed -n '/^write(1/,$p'
write(1, "Linux\n", 6Linux
)  = 6
> /lib/libc-2.20.so(__write+0x1c) [0xbf8cc]
> /lib/libc-2.20.so(_IO_file_write+0x20) [0x69c10]
> /lib/libc-2.20.so(_IO_file_setbuf+0xd0) [0x690b8]
> /lib/libc-2.20.so(_IO_do_write+0x1c) [0x6ab20]
> /lib/libc-2.20.so(_IO_file_sync+0xc0) [0x68fb0]
> /lib/libc-2.20.so(fflush+0x8c) [0x5e1f4]
> /bin/busybox.nosuid(+0x0) [0x67178]
exit_group(0)   = ?
+++ exited with 0 +++
> /lib/libc-2.20.so(_exit+0x10) [0x9a930]
> /lib/libc-2.20.so(__libc_secure_getenv+0xf8) [0x30dc8]
> /bin/busybox.nosuid(+0x0) [0x67194]

Regards,
Jonathan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [dizzy][PATCH] libunwind: backport patch to link against libgcc_s intead of libgcc

2015-03-10 Thread Khem Raj

> On Mar 10, 2015, at 8:05 PM, Jonathan Liu  wrote:
> 
> On 11 March 2015 at 13:43, Khem Raj  wrote:
>> 
>>> On Mar 10, 2015, at 7:33 PM, Jonathan Liu  wrote:
>>> 
>>> Signed-off-by: Jonathan Liu 
>>> ---
>>> ...-libunwind-to-libgcc_s-rather-than-libgcc.patch | 42 
>>> ++
>>> meta/recipes-support/libunwind/libunwind_1.1.bb|  1 +
>>> 2 files changed, 43 insertions(+)
>>> create mode 100644 
>>> meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>> 
>>> diff --git 
>>> a/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>>  
>>> b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>> new file mode 100644
>>> index 000..0e55c91
>>> --- /dev/null
>>> +++ 
>>> b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>> @@ -0,0 +1,42 @@
>>> +From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
>>> +From: Thierry Reding 
>>> +Date: Fri, 27 Jun 2014 08:40:33 +0200
>>> +Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
>>> +
>>> +For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
>>> +example, libgcc_s.so.1 contains some symbols needed by libunwind which
>>> +are not present in libgcc.
>>> +
>>> +This causes the following link error when building the X.Org X server
>>> +with libunwind support:
>>> +
>>> +   CCLD Xorg
>>> + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
>>> + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
>>> +
>>> +Linking against libgcc_s explicitly solves this problem.
>>> +
>> 
>> have you tried it at runtime too ?
>> 
> strace 4.9 with libunwind PACKAGECONFIG wouldn't build on master
> without the patch.
> If I add strace 4.9 recipe to dizzy branch, using the libunwind
> PACKAGECONFIG also fails to build without the patch. It gives the same
> errors during linking.
> 
> I tested at runtime on master branch which has libunwind 1.1 running
> strace 4.9 on the target and didn't notice any issues. I haven't
> tested on dizzy branch at runtime though.

OK thanks, it would be interesting to see if exception handling in some 
binaries and shared objects is able to unwind through
to make sure this all works 

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [dizzy][PATCH] libunwind: backport patch to link against libgcc_s intead of libgcc

2015-03-10 Thread Jonathan Liu
On 11 March 2015 at 13:43, Khem Raj  wrote:
>
>> On Mar 10, 2015, at 7:33 PM, Jonathan Liu  wrote:
>>
>> Signed-off-by: Jonathan Liu 
>> ---
>> ...-libunwind-to-libgcc_s-rather-than-libgcc.patch | 42 
>> ++
>> meta/recipes-support/libunwind/libunwind_1.1.bb|  1 +
>> 2 files changed, 43 insertions(+)
>> create mode 100644 
>> meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>
>> diff --git 
>> a/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>>  
>> b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>> new file mode 100644
>> index 000..0e55c91
>> --- /dev/null
>> +++ 
>> b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>> @@ -0,0 +1,42 @@
>> +From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
>> +From: Thierry Reding 
>> +Date: Fri, 27 Jun 2014 08:40:33 +0200
>> +Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
>> +
>> +For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
>> +example, libgcc_s.so.1 contains some symbols needed by libunwind which
>> +are not present in libgcc.
>> +
>> +This causes the following link error when building the X.Org X server
>> +with libunwind support:
>> +
>> +   CCLD Xorg
>> + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
>> + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
>> +
>> +Linking against libgcc_s explicitly solves this problem.
>> +
>
> have you tried it at runtime too ?
>
strace 4.9 with libunwind PACKAGECONFIG wouldn't build on master
without the patch.
If I add strace 4.9 recipe to dizzy branch, using the libunwind
PACKAGECONFIG also fails to build without the patch. It gives the same
errors during linking.

I tested at runtime on master branch which has libunwind 1.1 running
strace 4.9 on the target and didn't notice any issues. I haven't
tested on dizzy branch at runtime though.

Regards,
Jonathan
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] btrfs-tools: workaround DEBUG_BUILD for arm

2015-03-10 Thread Robert Yang



On 03/11/2015 10:12 AM, Khem Raj wrote:

On Tue, Mar 10, 2015 at 7:05 PM, Robert Yang  wrote:

 [CC] btrfs-show-super.o
{standard input}: Assembler messages:
{standard input}:3368: Error: invalid operands (.text and *UND* sections)
for `-'
{standard input}:3374: Error: invalid operands (.text and *UND* sections)
for `-'
 [AR] libbtrfs.a


I meant detailed. use V=1


Thanks, here it is:

| [CC] cmds-fi-disk_usage.o
| arm-poky-linux-gnueabi-gcc  -march=armv5e -marm  -mthumb-interwork 
--sysroot=/buildarea/lyang1/test_w5/tmp/sysroots/qemuarm -Wall 
-D_FILE_OFFSET_BITS=64 -DBTRFS_FLAT_INCLUDES -D_XOPEN_SOURCE=700 -D_GNU_SOURCE 
-fno-strict-aliasing -fPIC -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=2  -O 
-fno-omit-frame-pointer -g -feliminate-unused-debug-types -pipe -c 
cmds-fi-disk_usage.c

| {standard input}: Assembler messages:
| {standard input}:3383: Error: invalid operands (.text and *UND* sections) for 
`-'
| {standard input}:3389: Error: invalid operands (.text and *UND* sections) for 
`-'
| make: *** [cmds-fi-disk_usage.o] Error 1
| ERROR: oe_runmake failed
| WARNING: exit code 1 from a shell command.

// Robert






--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [dizzy][PATCH] systemd: fix /var/log/journal ownership

2015-03-10 Thread Jonathan Liu
The ownership needs to be explicitly set otherwise it inherits the user
and group id of the build user.

Signed-off-by: Jonathan Liu 
---
 meta/recipes-core/systemd/systemd_216.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_216.bb 
b/meta/recipes-core/systemd/systemd_216.bb
index 3852841..5df8a1a 100644
--- a/meta/recipes-core/systemd/systemd_216.bb
+++ b/meta/recipes-core/systemd/systemd_216.bb
@@ -136,6 +136,8 @@ do_install() {
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% 
${D}${sysconfdir}/init.d/systemd-udevd
fi
 
+   chown root:root ${D}/${localstatedir}/log/journal
+
 # Delete journal README, as log can be symlinked inside volatile.
 rm -f ${D}/${localstatedir}/log/README
 
-- 
2.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [dizzy][PATCH] libunwind: backport patch to link against libgcc_s intead of libgcc

2015-03-10 Thread Khem Raj

> On Mar 10, 2015, at 7:33 PM, Jonathan Liu  wrote:
> 
> Signed-off-by: Jonathan Liu 
> ---
> ...-libunwind-to-libgcc_s-rather-than-libgcc.patch | 42 ++
> meta/recipes-support/libunwind/libunwind_1.1.bb|  1 +
> 2 files changed, 43 insertions(+)
> create mode 100644 
> meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
> 
> diff --git 
> a/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
>  
> b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
> new file mode 100644
> index 000..0e55c91
> --- /dev/null
> +++ 
> b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
> @@ -0,0 +1,42 @@
> +From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
> +From: Thierry Reding 
> +Date: Fri, 27 Jun 2014 08:40:33 +0200
> +Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
> +
> +For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
> +example, libgcc_s.so.1 contains some symbols needed by libunwind which
> +are not present in libgcc.
> +
> +This causes the following link error when building the X.Org X server
> +with libunwind support:
> +
> +   CCLD Xorg
> + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
> + /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
> +
> +Linking against libgcc_s explicitly solves this problem.
> +

have you tried it at runtime too ?

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [dizzy][PATCH] libunwind: backport patch to link against libgcc_s intead of libgcc

2015-03-10 Thread Jonathan Liu
Signed-off-by: Jonathan Liu 
---
 ...-libunwind-to-libgcc_s-rather-than-libgcc.patch | 42 ++
 meta/recipes-support/libunwind/libunwind_1.1.bb|  1 +
 2 files changed, 43 insertions(+)
 create mode 100644 
meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch

diff --git 
a/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
 
b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
new file mode 100644
index 000..0e55c91
--- /dev/null
+++ 
b/meta/recipes-support/libunwind/libunwind-1.1/Link-libunwind-to-libgcc_s-rather-than-libgcc.patch
@@ -0,0 +1,42 @@
+From 508ca17a7be01d1cc960d9a07d0af4513948fb8d Mon Sep 17 00:00:00 2001
+From: Thierry Reding 
+Date: Fri, 27 Jun 2014 08:40:33 +0200
+Subject: [PATCH] Link libunwind to libgcc_s rather than libgcc
+
+For some architectures, -lgcc and -lgcc_s are not equivalent. On ARM for
+example, libgcc_s.so.1 contains some symbols needed by libunwind which
+are not present in libgcc.
+
+This causes the following link error when building the X.Org X server
+with libunwind support:
+
+ CCLD Xorg
+   /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr0'
+   /usr/lib/libunwind.so: undefined reference to `__aeabi_unwind_cpp_pr1'
+
+Linking against libgcc_s explicitly solves this problem.
+
+Upstream-Status: Backport
+
+Signed-off-by: Thierry Reding 
+Signed-off-by: Jonathan Liu 
+---
+ configure.ac | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/configure.ac b/configure.ac
+index cffe19b..3beb5f2 100644
+--- a/configure.ac
 b/configure.ac
+@@ -258,7 +258,7 @@ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[#ifndef 
__INTEL_COMPILER
+ 
+ if test x$GCC = xyes -a x$intel_compiler != xyes; then
+   CFLAGS="${CFLAGS} -fexceptions -Wall -Wsign-compare"
+-  LIBCRTS="-lgcc"
++  LIBCRTS="-lgcc_s"
+ fi
+ AC_MSG_RESULT([$intel_compiler])
+ 
+-- 
+2.3.2
+
diff --git a/meta/recipes-support/libunwind/libunwind_1.1.bb 
b/meta/recipes-support/libunwind/libunwind_1.1.bb
index 20db132..05dba3b 100644
--- a/meta/recipes-support/libunwind/libunwind_1.1.bb
+++ b/meta/recipes-support/libunwind/libunwind_1.1.bb
@@ -2,6 +2,7 @@ require libunwind.inc
 
 SRC_URI += "\
 file://Fix-test-case-link-failure-on-PowerPC-systems-with-Altivec.patch \
+file://Link-libunwind-to-libgcc_s-rather-than-libgcc.patch \
 "
 
 SRC_URI[md5sum] = "fb4ea2f6fbbe45bf032cd36e586883ce"
-- 
2.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [dizzy][PATCH] fontcache.bbclass: prepend to PACKAGEFUNCS instead of appending

2015-03-10 Thread Jonathan Liu
Appending to PACKAGEFUNCS results in the font packages missing the
postinst/postrm scripts and the fontconfig cache not being generated
in /var/cache/fontconfig when creating images or installing font
packages. This is because the package data has already been emitted
by emit_pkgdata in PACKAGEFUNCS. Prepend to PACKAGEFUNCS to ensure
add_fontcache_postinsts is executed before emit_pkgdata.

[YOCTO #7410]

Signed-off-by: Jonathan Liu 
---
 meta/classes/fontcache.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/fontcache.bbclass b/meta/classes/fontcache.bbclass
index 2bf1e4b..dcd1f04 100644
--- a/meta/classes/fontcache.bbclass
+++ b/meta/classes/fontcache.bbclass
@@ -42,4 +42,4 @@ python add_fontcache_postinsts() {
 d.setVar('pkg_postrm_%s' % pkg, postrm)
 }
 
-PACKAGEFUNCS += "add_fontcache_postinsts"
+PACKAGEFUNCS =+ "add_fontcache_postinsts"
-- 
2.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [daisy][PATCH] systemd: fix /var/log/journal ownership

2015-03-10 Thread Jonathan Liu
The ownership needs to be explicitly set otherwise it inherits the user
and group id of the build user.

Signed-off-by: Jonathan Liu 
---
 meta/recipes-core/systemd/systemd_211.bb | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/systemd/systemd_211.bb 
b/meta/recipes-core/systemd/systemd_211.bb
index 567c323..a808f3f 100644
--- a/meta/recipes-core/systemd/systemd_211.bb
+++ b/meta/recipes-core/systemd/systemd_211.bb
@@ -124,6 +124,8 @@ do_install() {
sed -i s%@UDEVD@%${rootlibexecdir}/systemd/systemd-udevd% 
${D}${sysconfdir}/init.d/systemd-udevd
fi
 
+   chown root:root ${D}/${localstatedir}/log/journal
+
 # Delete journal README, as log can be symlinked inside volatile.
 rm -f ${D}/${localstatedir}/log/README
 }
-- 
2.3.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] btrfs-tools: workaround DEBUG_BUILD for arm

2015-03-10 Thread Khem Raj
On Tue, Mar 10, 2015 at 7:05 PM, Robert Yang  wrote:
> [CC] btrfs-show-super.o
> {standard input}: Assembler messages:
> {standard input}:3368: Error: invalid operands (.text and *UND* sections)
> for `-'
> {standard input}:3374: Error: invalid operands (.text and *UND* sections)
> for `-'
> [AR] libbtrfs.a

I meant detailed. use V=1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] btrfs-tools: workaround DEBUG_BUILD for arm

2015-03-10 Thread Robert Yang



On 03/11/2015 12:28 AM, Khem Raj wrote:

On Tue, Mar 10, 2015 at 2:25 AM, Robert Yang  wrote:

Workaround when:
MACHINE = "qemuarm"
DEBUG_BUILD = "1"

Errors:
{standard input}: Assembler messages:
{standard input}:3383: Error: invalid operands (.text and *UND* sections) for 
`-'
{standard input}:3389: Error: invalid operands (.text and *UND* sections) for 
`-'
make: *** [cmds-fi-disk_usage.o] Error 1



can you post full compiler command ?


Sorry, there is no detailed compile log by default, I will try to print them
later, here is default log:

[CC] cmds-qgroup.o
[CC] cmds-check.o
[CC] cmds-replace.o
[CC] cmds-restore.o
[CC] chunk-recover.o
[CC] cmds-rescue.o
[CC] super-recover.o
[CC] cmds-property.o
[CC] cmds-fi-disk_usage.o
[CC] btrfs-map-logical.o
[CC] btrfs-image.o
[CC] btrfs-zero-log.o
[CC] btrfs-convert.o
[CC] btrfs-find-root.o
[CC] btrfstune.o
[CC] btrfs-show-super.o
{standard input}: Assembler messages:
{standard input}:3368: Error: invalid operands (.text and *UND* sections) for 
`-'
{standard input}:3374: Error: invalid operands (.text and *UND* sections) for 
`-'
[AR] libbtrfs.a
[LD] libbtrfs.so.0.1
Makefile:129: recipe for target 'cmds-fi-disk_usage.o' failed
make: *** [cmds-fi-disk_usage.o] Error 1
make: *** Waiting for unfinished jobs


// RObert




Signed-off-by: Robert Yang 
---
  .../btrfs-tools/btrfs-tools_git.bb |7 +++
  1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb 
b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
index d86075c..382ee7c 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
@@ -28,3 +28,10 @@ do_install () {
  }

  BBCLASSEXTEND = "native"
+
+# Workaround when DEBUG_BUILD:
+# {standard input}: Assembler messages:
+# {standard input}:3383: Error: invalid operands (.text and *UND* sections) 
for `-'
+# {standard input}:3389: Error: invalid operands (.text and *UND* sections) 
for `-'
+# make: *** [cmds-fi-disk_usage.o] Error 1
+CFLAGS_append_arm = " -O2"
--
1.7.9.5

--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core




--
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] chrpath.bbclass: handle RUNPATH as well as RPATH

2015-03-10 Thread Khem Raj

> On Mar 10, 2015, at 5:56 PM, Andre McCurdy  wrote:
> 
> Binaries linked with gold may contain a RUNPATH instead of an RPATH.
> Update chrpath.bbclass process_file_linux() to handle both cases.
> 

This is ok. RPATH is deprecated, gold is forward looking by default, may be we 
should add --enable-new-dtags to binutils configuration in OE


> Signed-off-by: Andre McCurdy 
> ---
> meta/classes/chrpath.bbclass | 2 ++
> 1 file changed, 2 insertions(+)
> 
> diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
> index 77b1937..7a5d960 100644
> --- a/meta/classes/chrpath.bbclass
> +++ b/meta/classes/chrpath.bbclass
> @@ -10,6 +10,8 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, 
> tmpdir, d):
> if p.returncode != 0:
> return
> 
> +# Handle RUNPATH as well as RPATH
> +err = err.replace("RUNPATH=","RPATH=")
> # Throw away everything other than the rpath list
> curr_rpath = err.partition("RPATH=")[2]
> #bb.note("Current rpath for %s is %s" % (fpath, curr_rpath.strip()))
> -- 
> 1.9.1
> 
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] chrpath.bbclass: handle RUNPATH as well as RPATH

2015-03-10 Thread Andre McCurdy
Binaries linked with gold may contain a RUNPATH instead of an RPATH.
Update chrpath.bbclass process_file_linux() to handle both cases.

Signed-off-by: Andre McCurdy 
---
 meta/classes/chrpath.bbclass | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/classes/chrpath.bbclass b/meta/classes/chrpath.bbclass
index 77b1937..7a5d960 100644
--- a/meta/classes/chrpath.bbclass
+++ b/meta/classes/chrpath.bbclass
@@ -10,6 +10,8 @@ def process_file_linux(cmd, fpath, rootdir, baseprefix, 
tmpdir, d):
 if p.returncode != 0:
 return
 
+# Handle RUNPATH as well as RPATH
+err = err.replace("RUNPATH=","RPATH=")
 # Throw away everything other than the rpath list
 curr_rpath = err.partition("RPATH=")[2]
 #bb.note("Current rpath for %s is %s" % (fpath, curr_rpath.strip()))
-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] directfb: Allow native builds of directfb 1.7.6

2015-03-10 Thread Florian Boor
From: Florian Boor 

Required by some DirectFB applications like dfbsee.

Signed-off-by: Florian Boor 
---
 meta/recipes-graphics/directfb/directfb_1.7.6.bb |   14 ++
 1 file changed, 14 insertions(+)

diff --git a/meta/recipes-graphics/directfb/directfb_1.7.6.bb 
b/meta/recipes-graphics/directfb/directfb_1.7.6.bb
index d25d987..7acb7e6 100644
--- a/meta/recipes-graphics/directfb/directfb_1.7.6.bb
+++ b/meta/recipes-graphics/directfb/directfb_1.7.6.bb
@@ -19,3 +19,17 @@ LEAD_SONAME = "libdirectfb-1.7.so.0"
 
 SRC_URI[md5sum] = "8a7bb06b3f58599b230b4cf314004512"
 SRC_URI[sha256sum] = 
"44f32bacfb842ea234599532f8481fe41b5bd2310d2bd101508eb3a5df26c9e1"
+
+BBCLASSEXTEND = "native"
+DEPENDS_class-native = "jpeg-native libpng-native"
+EXTRA_OECONF_class-native = "\
+  --enable-freetype=no \
+  --disable-zlib \
+  --with-gfxdrivers=none \
+  --disable-sdl \
+  --disable-vnc \
+  --disable-x11 \
+  --disable-imlib2 \
+  --disable-mesa \
+  --with-inputdrivers=none \
+"
-- 
1.7.10.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [meta-qt5] hardcoded rpath in Qt 5.4.0 qtbase-native uic binary

2015-03-10 Thread Andre McCurdy
On Thu, Jan 15, 2015 at 9:49 PM, Andre McCurdy  wrote:
> The Qt 5.4.0 qtbase-native uic binary seems to get built with a
> hardcoded RUNPATH, which causes problems when qtbase-native from
> sstate is later reused by a different build. The issue has been
> there since 5.4.0 alpha1 (5.3.2 is OK).
>

I'm still seeing this issue with Qt 5.4.1 and it seems to be related
to using gold as the linker (ie adding ld-is-gold to DISTRO_FEATURES).

With Qt 5.4.x, including ld-is-gold in DISTRO_FEATURES causes uic (and
other qtbase-native binaries) to be linked with "-fuse-ld=gold", which
causes these binaries to have runtime library paths defined via
"RUNPATH" instead of "RPATH".

Since chrpath.bbclass only fixes absolute paths in "RPATH", the
absolute paths specified via "RUNPATH" in the installed binaries don't
get fixed.


> --
>
> Build Configuration:
> BB_VERSION= "1.25.0"
> BUILD_SYS = "x86_64-linux"
> NATIVELSBSTRING   = "LinuxMint-17.1"
> TARGET_SYS= "i586-rdk-linux"
> MACHINE   = "vbox32"
> DISTRO= "rdk"
> DISTRO_VERSION= "2.0"
> TUNE_FEATURES = "m32 core2"
> TARGET_FPU= ""
> meta-bsp-vbox = 
> "(detachedfrom253724d):253724dfeace58edbb40025fa8e4b5ace2c90164"
> meta-rdk  = 
> "(detachedfrom724d5c0):724d5c0030e3d2a53aad1929393ba2c00122ab91"
> meta-qt5  = 
> "(detachedfromec50df6):ec50df68b80f9704f135dd4c9f384a5596ec77cb"
> meta-metrological = "(nobranch):abbd111fee3ae1ade2fc2997ccda0eb9782da761"
> meta-multimedia
> meta-filesystems
> meta-oe
> meta-python
> meta-networking
> meta-ruby = 
> "(detachedfrom7bbacd0):7bbacd0023fada94ba0b2aafd7d872301ffe"
> meta  = 
> "(detachedfromb61a2ac):b61a2acc321489c3427f0afa3059486dc144a13b"
>
>
> $ readelf -d tmp/sysroots/x86_64-linux/usr/bin/qt5/uic
>
> Dynamic section at offset 0x80c60 contains 27 entries:
>   TagType Name/Value
>  0x0003 (PLTGOT) 0x481fe8
>  0x0002 (PLTRELSZ)   4368 (bytes)
>  0x0017 (JMPREL) 0x4033a0
>  0x0014 (PLTREL) RELA
>  0x0007 (RELA)   0x4031a8
>  0x0008 (RELASZ) 504 (bytes)
>  0x0009 (RELAENT)24 (bytes)
>  0x0015 (DEBUG)  0x0
>  0x0006 (SYMTAB) 0x400298
>  0x000b (SYMENT) 24 (bytes)
>  0x0005 (STRTAB) 0x401570
>  0x000a (STRSZ)  6625 (bytes)
>  0x6ef5 (GNU_HASH)   0x402f58
>  0x0001 (NEEDED) Shared library: [libQt5Core.so.5]
>  0x0001 (NEEDED) Shared library: [libstdc++.so.6]
>  0x0001 (NEEDED) Shared library: [libc.so.6]
>  0x000c (INIT)   0x4044b0
>  0x000d (FINI)   0x4571cc
>  0x001a (FINI_ARRAY) 0x480ce8
>  0x001c (FINI_ARRAYSZ)   8 (bytes)
>  0x0019 (INIT_ARRAY) 0x480cf0
>  0x001b (INIT_ARRAYSZ)   8 (bytes)
>  0x001d (RUNPATH)Library runpath: 
> [/home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/x86_64-linux/usr/lib:/home/andre/rdk/rdk-master/build-vbox32/tmp/sysroots/x86_64-linux/lib]
>  0x6ff0 (VERSYM) 0x402f90
>  0x6ffe (VERNEED)0x403124
>  0x6fff (VERNEEDNUM) 2
>  0x (NULL)   0x0
>
>
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] devshell: start in ${B} not ${S}

2015-03-10 Thread Burton, Ross
On 10 March 2015 at 19:53, Otavio Salvador  wrote:

> > Just my opinion, but I'd vote against this change. Running
> > "../temp/run.do_compile" works from either directory but editing
> > sources and running "quilt refresh" etc only works from ${S}.
>
> +1


Clearly I'm the only person who mainly does build testing and not source
patching in a devshell :)

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] devshell: start in ${B} not ${S}

2015-03-10 Thread Andre McCurdy
On Tue, Mar 10, 2015 at 10:50 AM, Ross Burton  wrote:
> When S=B this is a no-op, but when B!=S this means you can run make and so on
> without having to change directory first.

Just my opinion, but I'd vote against this change. Running
"../temp/run.do_compile" works from either directory but editing
sources and running "quilt refresh" etc only works from ${S}.

>
> Signed-off-by: Ross Burton 
> ---
>  meta/classes/devshell.bbclass |2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
> index 41164a3..051ab72 100644
> --- a/meta/classes/devshell.bbclass
> +++ b/meta/classes/devshell.bbclass
> @@ -17,7 +17,7 @@ python do_devshell () {
>
>  addtask devshell after do_patch
>
> -do_devshell[dirs] = "${S}"
> +do_devshell[dirs] = "${B}"
>  do_devshell[nostamp] = "1"
>
>  # devshell and fakeroot/pseudo need careful handling since only the final
> --
> 1.7.10.4
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] devshell: start in ${B} not ${S}

2015-03-10 Thread Ross Burton
When S=B this is a no-op, but when B!=S this means you can run make and so on
without having to change directory first.

Signed-off-by: Ross Burton 
---
 meta/classes/devshell.bbclass |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/devshell.bbclass b/meta/classes/devshell.bbclass
index 41164a3..051ab72 100644
--- a/meta/classes/devshell.bbclass
+++ b/meta/classes/devshell.bbclass
@@ -17,7 +17,7 @@ python do_devshell () {
 
 addtask devshell after do_patch
 
-do_devshell[dirs] = "${S}"
+do_devshell[dirs] = "${B}"
 do_devshell[nostamp] = "1"
 
 # devshell and fakeroot/pseudo need careful handling since only the final
-- 
1.7.10.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 2/3] nfs-utils: Identify CONFFILES

2015-03-10 Thread Rob Woolley

Hi Ross,

My understanding is that they are used to help make NFS state-full. The 
"state" file is part of the extension to add Network Status Monitoring 
(NSM) to NFS.


In the RPM world, they need to label them as configuration files to 
avoid them getting overwritten during an upgrade.


The Debian approach removes them on a "purge" in the postrm stage and 
ignore them when doing an "upgrade" in the prerm stage.


So, technically they are not configuration files.  Would another 
approach such as removing them as packaged files and touching the files 
in a postinstall script be preferred?


Regards,
Rob

On 03/10/2015 12:05 PM, Burton, Ross wrote:


On 9 March 2015 at 23:52, Rob Woolley > wrote:


+CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
+  ${localstatedir}/lib/nfs/rmtab \
+  ${localstatedir}/lib/nfs/xtab \
+  ${localstatedir}/lib/nfs/statd/state \
+  ${sysconfdir}/nfsmount.conf"


NFS puts configuration files in /var/lib?  Are files called "state" 
really configuration files?


Ross


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] btrfs-tools: workaround DEBUG_BUILD for arm

2015-03-10 Thread Khem Raj
On Tue, Mar 10, 2015 at 2:25 AM, Robert Yang  wrote:
> Workaround when:
> MACHINE = "qemuarm"
> DEBUG_BUILD = "1"
>
> Errors:
> {standard input}: Assembler messages:
> {standard input}:3383: Error: invalid operands (.text and *UND* sections) for 
> `-'
> {standard input}:3389: Error: invalid operands (.text and *UND* sections) for 
> `-'
> make: *** [cmds-fi-disk_usage.o] Error 1
>

can you post full compiler command ?

> Signed-off-by: Robert Yang 
> ---
>  .../btrfs-tools/btrfs-tools_git.bb |7 +++
>  1 file changed, 7 insertions(+)
>
> diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb 
> b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
> index d86075c..382ee7c 100644
> --- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
> +++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
> @@ -28,3 +28,10 @@ do_install () {
>  }
>
>  BBCLASSEXTEND = "native"
> +
> +# Workaround when DEBUG_BUILD:
> +# {standard input}: Assembler messages:
> +# {standard input}:3383: Error: invalid operands (.text and *UND* sections) 
> for `-'
> +# {standard input}:3389: Error: invalid operands (.text and *UND* sections) 
> for `-'
> +# make: *** [cmds-fi-disk_usage.o] Error 1
> +CFLAGS_append_arm = " -O2"
> --
> 1.7.9.5
>
> --
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] layer.conf: bump version as error-report interface changed

2015-03-10 Thread Ross Burton
The error-report tooling command-line options were changed and anyone doing
automated builds and using error-reports needs to know what options to parse.

Signed-off-by: Ross Burton 
---
 meta/conf/layer.conf |2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/layer.conf b/meta/conf/layer.conf
index e5e1f06..573579a 100644
--- a/meta/conf/layer.conf
+++ b/meta/conf/layer.conf
@@ -9,7 +9,7 @@ BBFILE_PRIORITY_core = "5"
 
 # This should only be incremented on significant changes that will
 # cause compatibility issues with other layers
-LAYERVERSION_core = "4"
+LAYERVERSION_core = "5"
 
 BBLAYERS_LAYERINDEX_NAME_core = "openembedded-core"
 
-- 
1.7.10.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 2/3] nfs-utils: Identify CONFFILES

2015-03-10 Thread Burton, Ross
On 9 March 2015 at 23:52, Rob Woolley  wrote:

> +CONFFILES_${PN}-client += "${localstatedir}/lib/nfs/etab \
> +  ${localstatedir}/lib/nfs/rmtab \
> +  ${localstatedir}/lib/nfs/xtab \
> +  ${localstatedir}/lib/nfs/statd/state \
> +  ${sysconfdir}/nfsmount.conf"
>

NFS puts configuration files in /var/lib?  Are files called "state" really
configuration files?

Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 0/3] Identify existing configuration files

2015-03-10 Thread Rob Woolley

Hi Ross,

Sure thing.

I applied them to a fresh clone of openembedded-core.git and pushed it 
to the conffiles branch on github:

https://github.com/rcwoolley/openembedded-core/tree/conffiles

Regards,
Rob

On 03/10/2015 09:51 AM, Burton, Ross wrote:

Hi Rob,

On 9 March 2015 at 23:52, Rob Woolley > wrote:


Some package formats explicitly track which files are
configuration files
so that they are not overwritten on updates.

This series explicitly identifies files that were already being
packaged,
but not known as configuration files.


Do you have these patches in a branch?  git am is claiming they're 
corrupted, so something must have happened to them in transit.


Cheers,
Ross


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 00/17] [Dizzy] Next

2015-03-10 Thread Armin Kuster
Please conzider these changes for the next Dizzy release

The following changes since commit 93e3df91aaebd48b9c4af946247f3488681d32b6:

  documenation: Updates to release month for rev history tables. (2015-03-10 
11:07:55 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib akuster/dizzy-next
  http://git.yoctoproject.org/cgit.cgi//log/?h=akuster/dizzy-next

Aníbal Limón (1):
  files/toolchain-shar-template.sh: fix replace target_sdk_dir twice in
environment setup file

Bian Naimeng (1):
  gcc-4.9: fix bug of 0056-top-level-reorder_gcc-bug-61144.patch

Bruce Ashfield (3):
  linux-yocto/3.10: update to v3.10.65
  linux-yocto/3.14: update to 3.14.29
  linux-yocto/3.17: update to v3.17.8

Chen Qi (1):
  package_manager.py: fix rootfs failure with multilib enabled

Enrico Scholz (1):
  serf: fix 'ccache' builds

Martin Jansa (2):
  xorg-driver: add x11 to required DISTRO_FEATURES
  piglit: add x11 to required DISTRO_FEATURES

Patrick Ohly (2):
  binconfig-disabled: try harder to prevent usage of config scripts
  binconfig-disabled: install config scripts in sysroot

Richard Purdie (1):
  gcc-target: Don't install target gcc libdir files

Robert Yang (2):
  dpkg: add perl to RDEPENDS
  which 2.18: fix SRC_URI

Ross Burton (2):
  bitbake: tests/data: add test for incorrect remove behaviour
  bitbake: data_smart: split expanded removal values when handling
_remove

Saul Wold (1):
  linux-yocto-tiny_3.17: Update to actually use 3.17 git repo

 bitbake/lib/bb/data_smart.py   |  3 +-
 bitbake/lib/bb/tests/data.py   |  7 
 meta/classes/binconfig-disabled.bbclass| 13 +++
 meta/files/toolchain-shar-template.sh  |  1 +
 meta/lib/oe/package_manager.py |  5 ++-
 meta/recipes-devtools/dpkg/dpkg.inc|  2 +-
 .../0056-top-level-reorder_gcc-bug-61144.patch | 42 ++
 meta/recipes-devtools/gcc/gcc-target.inc   |  9 +
 meta/recipes-extended/which/which_2.18.bb  |  2 +-
 meta/recipes-graphics/piglit/piglit_git.bb |  4 ++-
 .../xorg-driver/xorg-driver-common.inc |  4 ++-
 meta/recipes-kernel/linux/linux-yocto-rt_3.10.bb   |  8 ++---
 meta/recipes-kernel/linux/linux-yocto-rt_3.14.bb   |  8 ++---
 meta/recipes-kernel/linux/linux-yocto-tiny_3.10.bb |  6 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_3.14.bb |  6 ++--
 meta/recipes-kernel/linux/linux-yocto-tiny_3.17.bb |  8 ++---
 meta/recipes-kernel/linux/linux-yocto_3.10.bb  | 18 +-
 meta/recipes-kernel/linux/linux-yocto_3.14.bb  | 18 +-
 meta/recipes-kernel/linux/linux-yocto_3.17.bb  | 18 +-
 meta/recipes-support/serf/serf/env.patch   | 28 +++
 meta/recipes-support/serf/serf_1.3.7.bb|  8 ++---
 21 files changed, 139 insertions(+), 79 deletions(-)
 create mode 100644 meta/recipes-support/serf/serf/env.patch

-- 
1.9.1

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] oeqa/parselogs: Skip hda opcode errors

2015-03-10 Thread Richard Purdie
These occur when running images under virtualisation on machines with
high load which sometimes trigger timeouts in the kernel DMA code.
They're harmless to ignore in these cases.

Adding this since "failing" the build due to this is more annoying
thank useful.

[YOCTO #7387]

Signed-off-by: Richard Purdie 

diff --git a/meta/lib/oeqa/runtime/parselogs.py 
b/meta/lib/oeqa/runtime/parselogs.py
index b1dcc1e..cf0f67c 100644
--- a/meta/lib/oeqa/runtime/parselogs.py
+++ b/meta/lib/oeqa/runtime/parselogs.py
@@ -22,7 +22,8 @@ common_errors = [
 "Failed to load module modesetting",
 "Failed to load module \"glx\"",
 "Failed to load module glx",
-"[drm] Cannot find any crtc or sizes - going 1024x768"
+"[drm] Cannot find any crtc or sizes - going 1024x768",
+"hd.: possibly failed opcode"
 ]
 
 x86_common = [


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 0/3] Identify existing configuration files

2015-03-10 Thread Burton, Ross
Hi Rob,

On 9 March 2015 at 23:52, Rob Woolley  wrote:

> Some package formats explicitly track which files are configuration files
> so that they are not overwritten on updates.
>
> This series explicitly identifies files that were already being packaged,
> but not known as configuration files.
>

Do you have these patches in a branch?  git am is claiming they're
corrupted, so something must have happened to them in transit.

Cheers,
Ross
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] liberation-fonts: inherit allarch as fonts are arch-independent

2015-03-10 Thread Martin Jansa
On Mon, Mar 09, 2015 at 01:42:14PM -0300, Otavio Salvador wrote:
> On Mon, Mar 9, 2015 at 1:38 PM, Ross Burton  wrote:
> > Signed-off-by: Ross Burton 
> 
> Acked-by: Otavio Salvador 

It fontcache adds dependency on TUNE_PKGARCH fontconfig-utils so
technically they aren't independent (from sstate signatures point of
view).

> Once this is merged, please backport it to Dizzy as well

Please don't, especially with issues when recipes are moved between
PACKAGE_ARCHs https://bugzilla.yoctoproject.org/show_bug.cgi?id=4102

-- 
Martin 'JaMa' Jansa jabber: martin.ja...@gmail.com


signature.asc
Description: Digital signature
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCHv6 1/1] recipes: add x11 to required DISTRO_FEATURES

2015-03-10 Thread Richard Purdie
On Tue, 2015-03-03 at 08:05 +0100, Martin Jansa wrote:
> On Fri, Feb 27, 2015 at 10:23:22AM +0100, Martin Jansa wrote:
> > On Mon, Feb 09, 2015 at 01:25:15PM +0100, Martin Jansa wrote:
> > > * it's not complete, but recipes depending on virtual/libx11 are easiest
> > >   to spot, I've long list of PNBLACKLIST for all recipes which cannot
> > >   be built in distro without x11 in DISTRO_FEATURES
> > 
> > PING
> > 
> > This was first sent 8 months ago, it's trivial change, please merge it
> > in 1.8.
> 
> Ping!
> 
> This is very disappointing and probably one of my last patches to
> oe-core.

I did already talk and apologise to Martin about this, and there is a
thread about this on the TSC list. This kind of delay is unacceptable,
there were some reasons for it related to wanting to ideally do this
better in bitbake. No such work has been forthcoming, nor is it likely
to any time soon so I've taken this patch.

Sorry about the delay. Hopefully this is an exception rather than the
way things tend to work.

I also do realise patches have been slow over the past week or two.
Feature freeze caused a stampede of build breaking patches and its taken
us a while to weed out the problematic ones and fix various bits of
breakage :(. Hopefully we're back to "normal" now (keeping in mind this
is now bug fixing for release in April). There are some upgrades that
won't make it in, there was just too much too late to get everything in
and maintain quality.

Cheers,

Richard


-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/1] btrfs-tools: workaround DEBUG_BUILD for arm

2015-03-10 Thread Richard Purdie
On Tue, 2015-03-10 at 02:25 -0700, Robert Yang wrote:
> Workaround when:
> MACHINE = "qemuarm"
> DEBUG_BUILD = "1"
> 
> Errors:
> {standard input}: Assembler messages:
> {standard input}:3383: Error: invalid operands (.text and *UND* sections) for 
> `-'
> {standard input}:3389: Error: invalid operands (.text and *UND* sections) for 
> `-'
> make: *** [cmds-fi-disk_usage.o] Error 1
> 
> Signed-off-by: Robert Yang 
> ---
>  .../btrfs-tools/btrfs-tools_git.bb |7 +++
>  1 file changed, 7 insertions(+)

I really don't like workarounds like this. They tend to get left in the
recipes for ever more and never get fixed properly. Please just use
something like

DEBUG_BUILD_pn-btrfs-tools = "0"

or similar.

Cheers,

Richard

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] combo-layer: runcmd() with separate output

2015-03-10 Thread Patrick Ohly
Allow the caller to specify a separate output stream. stderr is always
a temporary file opened by runcmd(), so read from that to capture
output for error reporting *and* the return value.

The reasoning for the latter is a) that this preserves the traditional
behavior when out=None and b) if the caller wants the content of
stdout, it can read from the stream itself, which is not possible for
the temporary stderr.

Signed-off-by: Patrick Ohly 
---
 scripts/combo-layer | 18 +++---
 1 file changed, 11 insertions(+), 7 deletions(-)

diff --git a/scripts/combo-layer b/scripts/combo-layer
index 5f10e83..fb3fb50 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -149,23 +149,27 @@ class Configuration(object):
 logger.error("ERROR: patchutils package is missing, please install 
it (e.g. # apt-get install patchutils)")
 sys.exit(1)
 
-def runcmd(cmd,destdir=None,printerr=True):
+def runcmd(cmd,destdir=None,printerr=True,out=None):
 """
 execute command, raise CalledProcessError if fail
 return output if succeed
 """
 logger.debug("run cmd '%s' in %s" % (cmd, os.getcwd() if destdir is None 
else destdir))
-out = os.tmpfile()
+if not out:
+out = os.tmpfile()
+err = out
+else:
+err = os.tmpfile()
 try:
-subprocess.check_call(cmd, stdout=out, stderr=out, cwd=destdir, 
shell=True)
+subprocess.check_call(cmd, stdout=out, stderr=err, cwd=destdir, 
shell=isinstance(cmd, str))
 except subprocess.CalledProcessError,e:
-out.seek(0)
+err.seek(0)
 if printerr:
-logger.error("%s" % out.read())
+logger.error("%s" % err.read())
 raise e
 
-out.seek(0)
-output = out.read()
+err.seek(0)
+output = err.read()
 logger.debug("output: %s" % output )
 return output
 
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] combo-layer: exclude files

2015-03-10 Thread Patrick Ohly
Some combined repos intentionally do not include certain files.
For example, Poky does not include bitbake's setup files and
OE-core's sample files under meta/conf.

When these files get modified in the upstream repository, applying the
patches fails and requires manual intervention. That is merely a
nuisance for someone familiar with the problem, but a real show
stopper when having the import run automatically or by someone less
experienced.

Therefore this change introduces "file_exclude", a new per-repo list
of file patterns which removes all matching files when initializing or
updating a combined repository. Because fnmatch is used under the hood
to match full path strings, removing entire directories must be done
with a pattern ending in a '/*' (in contrast to file_filter).

For Poky, the additional configuration looks like this:

[bitbake]
...
file_exclude = classes/base.bbclass
conf/bitbake.conf
.gitignore
MANIFEST.in
setup.py
TODO

[openembedded-core]
...
file_exclude = meta/conf/bblayers.conf.sample
meta/conf/local.conf.sample
meta/conf/local.conf.sample.extended
meta/conf/site.conf.sample
---
 scripts/combo-layer  | 41 +++-
 scripts/combo-layer.conf.example | 14 ++
 2 files changed, 54 insertions(+), 1 deletion(-)

diff --git a/scripts/combo-layer b/scripts/combo-layer
index fb3fb50..b121c99 100755
--- a/scripts/combo-layer
+++ b/scripts/combo-layer
@@ -20,6 +20,7 @@
 # with this program; if not, write to the Free Software Foundation, Inc.,
 # 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
 
+import fnmatch
 import os, sys
 import optparse
 import logging
@@ -208,7 +209,18 @@ def action_init(conf, args):
 else:
 extract_dir = os.getcwd()
 file_filter = repo.get('file_filter', "")
-runcmd("git archive %s | tar -x -C %s %s" % (initialrev, 
extract_dir, file_filter), ldir)
+files = runcmd("git archive %s | tar -x -v -C %s %s" % 
(initialrev, extract_dir, file_filter), ldir)
+exclude_patterns = repo.get('file_exclude', '').split()
+if exclude_patterns:
+# Implement file removal by letting tar create the
+# file and then deleting it in the file system
+# again. Uses the list of files created by tar (easier
+# than walking the tree).
+for file in files.split('\n'):
+for pattern in exclude_patterns:
+if fnmatch.fnmatch(file, pattern):
+os.unlink(os.path.join(extract_dir, file))
+break
 if not lastrev:
 lastrev = runcmd("git rev-parse %s" % initialrev, ldir).strip()
 conf.update(name, "last_revision", lastrev, initmode=True)
@@ -423,6 +435,33 @@ def action_update(conf, args):
 runcmd("%s %s %s %s" % (repo['hook'], patch, revlist[count], 
name))
 count=count-1
 
+# Step 3a: Filter out unwanted files and patches.
+exclude = repo.get('file_exclude', '')
+if exclude:
+filter = ['filterdiff', '-p1']
+for path in exclude.split():
+filter.append('-x')
+filter.append(path)
+for patch in patchlist[:]:
+filtered = patch + '.tmp'
+with open(filtered, 'w') as f:
+runcmd(filter + [patch], out=f)
+# Now check for empty patches.
+if runcmd(['filterdiff', '--list', filtered]):
+# Possibly modified.
+os.unlink(patch)
+os.rename(filtered, patch)
+else:
+# Empty, ignore it. Must also remove from revlist.
+fromline = open(patch, 'r').readline()
+m = re.match(r'''^From ([0-9a-fA-F]+) .*\n''', fromline)
+rev = m.group(1)
+logger.debug('skipping empty patch %s = %s' % (patch, rev))
+os.unlink(patch)
+os.unlink(filtered)
+patchlist.remove(patch)
+revlist.remove(rev)
+
 # Step 4: write patch list and revision list to file, for user to edit 
later
 patchlist_file = os.path.join(os.getcwd(), patch_dir, "patchlist-%s" % 
name)
 repo['patchlist'] = patchlist_file
diff --git a/scripts/combo-layer.conf.example b/scripts/combo-layer.conf.example
index 8ad8615..0ef80cb 100644
--- a/scripts/combo-layer.conf.example
+++ b/scripts/combo-layer.conf.example
@@ -38,6 +38,20 @@ last_revision =
 #   file_filter = src/*.c : only include the src *.c file
 #   file_filter = src/main.c src/Makefile.am : only include these two files
 
+# file_exclude: filter out these file(s)
+# file_exclude = [path] [path] ...
+#
+# Each entry mu

[OE-core] [PATCH 0/2] combo-layer: exclude files

2015-03-10 Thread Patrick Ohly
I ran into the merge conflicts described in the second patch recently
due to changes in OE-core's conf sample files. Richard told me that he
is aware of the issue and just deals with it manually because he never
had time to automate it; I hope these patches do that sufficiently
well to be included.

They worked for me when I re-imported all patches in OE-core and
bitbake since Dizzy was branched off. I also tested "combo-layer init"
with files excluded.

Note that these patches may apply directly to master, but I haven't
tested that because in my tree I have them on top of the other two,
independent patches to combo-layer that I posted yesterday. I can
resend as a single patch series if that's preferred.

Patrick Ohly (2):
  combo-layer: runcmd() with separate output
  combo-layer: exclude files

 scripts/combo-layer  | 59 ++--
 scripts/combo-layer.conf.example | 14 ++
 2 files changed, 65 insertions(+), 8 deletions(-)

-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] btrfs-tools: workaround DEBUG_BUILD for arm

2015-03-10 Thread Robert Yang
The following changes since commit 0542472969d0eb28fd44da97e4e01d69d864d157:

  scripts/runqemu: clarify help text (2015-03-05 17:47:10 +)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib rbt/btrfs-tools
  
http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=rbt/btrfs-tools

Robert Yang (1):
  btrfs-tools: workaround DEBUG_BUILD for arm

 .../btrfs-tools/btrfs-tools_git.bb |7 +++
 1 file changed, 7 insertions(+)

-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/1] btrfs-tools: workaround DEBUG_BUILD for arm

2015-03-10 Thread Robert Yang
Workaround when:
MACHINE = "qemuarm"
DEBUG_BUILD = "1"

Errors:
{standard input}: Assembler messages:
{standard input}:3383: Error: invalid operands (.text and *UND* sections) for 
`-'
{standard input}:3389: Error: invalid operands (.text and *UND* sections) for 
`-'
make: *** [cmds-fi-disk_usage.o] Error 1

Signed-off-by: Robert Yang 
---
 .../btrfs-tools/btrfs-tools_git.bb |7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb 
b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
index d86075c..382ee7c 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_git.bb
@@ -28,3 +28,10 @@ do_install () {
 }
 
 BBCLASSEXTEND = "native"
+
+# Workaround when DEBUG_BUILD:
+# {standard input}: Assembler messages:
+# {standard input}:3383: Error: invalid operands (.text and *UND* sections) 
for `-'
+# {standard input}:3389: Error: invalid operands (.text and *UND* sections) 
for `-'
+# make: *** [cmds-fi-disk_usage.o] Error 1
+CFLAGS_append_arm = " -O2"
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-core Yocto PATCH 3/4] bootimg: Skip build iso image for aarch64

2015-03-10 Thread Naresh Bhat
On 10 March 2015 at 14:42, Bernhard Reutner-Fischer 
wrote:

> On March 9, 2015 9:11:29 AM GMT+01:00, Naresh Bhat 
> wrote:
>
> >today/tomorrow.  Can we please continue the discussion on my next
> >series.  Probably you can give me few more points on my next patch
> >series.
>
> Please CC me so i do not overlook the new series, TIA.
>
Oops my apologies I forgot to CC you..:(  I have already posted the v1
series @oe-core.  I will keep in mind while posting next series.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/2] disable parallel build for mtd-utils and blktrace

2015-03-10 Thread Robert Yang
The following changes since commit 0542472969d0eb28fd44da97e4e01d69d864d157:

  scripts/runqemu: clarify help text (2015-03-05 17:47:10 +)

are available in the git repository at:

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

Robert Yang (2):
  mtd-utils: disable parallel build
  Revert "blktrace: fix and enable parallel build"

 meta/recipes-devtools/mtd/mtd-utils_git.bb |4 ++
 .../blktrace/blktrace/makefile-fix-parallel.patch  |   41 
 meta/recipes-kernel/blktrace/blktrace_git.bb   |   17 ++--
 3 files changed, 18 insertions(+), 44 deletions(-)
 delete mode 100644 
meta/recipes-kernel/blktrace/blktrace/makefile-fix-parallel.patch

-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2] Revert "blktrace: fix and enable parallel build"

2015-03-10 Thread Robert Yang
This reverts commit 2d9763a1c8685e9bd3a6b0aa0995eec5112dc4a7.

There are a few parallel issues:
1)
../rbtree.o: error adding symbols: Invalid operation
collect2: error: ld returned 1 exit status
Makefile:42: recipe for target 'btt' failed

2)
git/blkiomon.c:216: undefined reference to `rb_insert_color'
collect2: error: ld returned 1 exit status
Makefile:27: recipe for target 'blkparse' failed

3)
ld: rbtree.o: invalid string offset 128 >= 125 for section `.strtab'

4)
btreplay.o: file not recognized: File truncated
collect2: error: ld returned 1 exit status

btreplay/btreplay.c:47:18: fatal error: list.h: No such file or directory

Signed-off-by: Robert Yang 
---
 .../blktrace/blktrace/makefile-fix-parallel.patch  |   41 
 meta/recipes-kernel/blktrace/blktrace_git.bb   |   17 ++--
 2 files changed, 14 insertions(+), 44 deletions(-)
 delete mode 100644 
meta/recipes-kernel/blktrace/blktrace/makefile-fix-parallel.patch

diff --git a/meta/recipes-kernel/blktrace/blktrace/makefile-fix-parallel.patch 
b/meta/recipes-kernel/blktrace/blktrace/makefile-fix-parallel.patch
deleted file mode 100644
index df08770..000
--- a/meta/recipes-kernel/blktrace/blktrace/makefile-fix-parallel.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From 98cb9a95ce536d21be390934bd42dc2abde5959f Mon Sep 17 00:00:00 2001
-From: Robert Yang 
-Date: Thu, 29 Jan 2015 22:18:06 -0800
-Subject: [PATCH] Makefile: fix for parallel build
-
-Fixed parallel issue:
-* btreplay.o: file not recognized: File truncated
-  collect2: error: ld returned 1 exit status
-
-* btreplay/btreplay.c:47:18: fatal error: list.h: No such file or directory
-  #include "list.h"
-  ^
-  compilation terminated.
-
-  Don't make btreplay twice will fix the problem
-
-Upstream-Status: Pending
-
-Signed-off-by: Robert Yang 

- Makefile |4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
-diff --git a/Makefile b/Makefile
-index fe35d02..e7b1e94 100644
 a/Makefile
-+++ b/Makefile
-@@ -17,8 +17,8 @@ btt/btt:
- btreplay/btrecord:
-   $(MAKE) -C btreplay
- 
--btreplay/btreplay:
--  $(MAKE) -C btreplay
-+btreplay/btreplay: btreplay/btrecord
-+  echo Building $@
- 
- %.o: %.c
-   $(CC) -o $*.o -c $(ALL_CFLAGS) $<
--- 
-1.7.9.5
-
diff --git a/meta/recipes-kernel/blktrace/blktrace_git.bb 
b/meta/recipes-kernel/blktrace/blktrace_git.bb
index 29186fc..ef9f737 100644
--- a/meta/recipes-kernel/blktrace/blktrace_git.bb
+++ b/meta/recipes-kernel/blktrace/blktrace_git.bb
@@ -10,9 +10,7 @@ PR = "r6"
 PV = "1.0.5+git${SRCPV}"
 
 SRC_URI = "git://git.kernel.dk/blktrace.git \
-   file://ldflags.patch \
-   file://makefile-fix-parallel.patch \
-   "
+   file://ldflags.patch"
 
 S = "${WORKDIR}/git"
 
@@ -22,6 +20,19 @@ EXTRA_OEMAKE = "\
 'LDFLAGS=${LDFLAGS}' \
 "
 
+# There are a few parallel issues:
+# 1) ../rbtree.o: error adding symbols: Invalid operation
+# collect2: error: ld returned 1 exit status
+# Makefile:42: recipe for target 'btt' failed
+# 2) git/blkiomon.c:216: undefined reference to `rb_insert_color'
+# collect2: error: ld returned 1 exit status
+# Makefile:27: recipe for target 'blkparse' failed
+# 3) ld: rbtree.o: invalid string offset 128 >= 125 for section `.strtab'
+# 4) btreplay.o: file not recognized: File truncated
+# collect2: error: ld returned 1 exit status
+# btreplay/btreplay.c:47:18: fatal error: list.h: No such file or directory
+PARALLEL_MAKE = ""
+
 do_install() {
oe_runmake ARCH="${ARCH}" prefix=${prefix} \
mandir=${mandir} DESTDIR=${D} install
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 1/2] mtd-utils: disable parallel build

2015-03-10 Thread Robert Yang
Disable parallel build because of:
git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
git/.compr.c.dep:47: *** missing separator.  Stop.

Because both mkfs.jffs2 and mkfs.ubifs depend on compr.c, and
.compr.c.dep may generate twice at the same time.

Signed-off-by: Robert Yang 
---
 meta/recipes-devtools/mtd/mtd-utils_git.bb |4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-devtools/mtd/mtd-utils_git.bb 
b/meta/recipes-devtools/mtd/mtd-utils_git.bb
index 267d1e9..f934b17 100644
--- a/meta/recipes-devtools/mtd/mtd-utils_git.bb
+++ b/meta/recipes-devtools/mtd/mtd-utils_git.bb
@@ -30,3 +30,7 @@ FILES_mtd-utils-ubifs = "${sbindir}/mkfs.ubifs 
${sbindir}/ubi*"
 FILES_mtd-utils-misc = "${sbindir}/nftl* ${sbindir}/ftl* ${sbindir}/rfd* 
${sbindir}/doc* ${sbindir}/serve_image ${sbindir}/recv_image"
 
 BBCLASSEXTEND = "native"
+
+# git/.compr.c.dep:46: warning: NUL character seen; rest of line ignored
+# git/.compr.c.dep:47: *** missing separator.  Stop.
+PARALLEL_MAKE = ""
-- 
1.7.9.5

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-core Yocto PATCH 3/4] bootimg: Skip build iso image for aarch64

2015-03-10 Thread Bernhard Reutner-Fischer
On March 9, 2015 9:11:29 AM GMT+01:00, Naresh Bhat  
wrote:

>today/tomorrow.  Can we please continue the discussion on my next
>series.  Probably you can give me few more points on my next patch
>series.

Please CC me so i do not overlook the new series, TIA.

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core