Re: [OE-core] ✗ patchtest: failure for Fixes for eSDK and testsdkext

2016-11-28 Thread Robert Yang



On 11/17/2016 05:02 PM, Burton, Ross wrote:


On 17 November 2016 at 06:55, Patchwork > wrote:

* Patch[7/8] oeqa/sdkext/devtool.py: skip
test_extend_autotools_recipe_creation when no libxml2
  IssueCommit shortlog is too long [test_shortlog_length]
  Suggested fixEdit shortlog so that it is 80 characters or less
(currently 82 characters)


I'm not sure we've ever been super-strict on this, so I'm wondering if warning
over 90 is sensible so that we allow an extra two characters when function names
are long but still detect when someone has put an essay in the first line (which
does happen if the submitter isn't aware of the git convention).


Ping, do I have to make the subject line shorter and resend the patches, please 
?

// Robert



Ross



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


Re: [OE-core] [PATCH] devtool: execute associated functions while preparing the source tree

2016-11-28 Thread Jiajie Hu
On Monday, November 28, 2016 11:04:40 PM Christopher Larson wrote:
> This will do the commit after the first postfunc is done, so won’t the
> changes from the main func and the first postfunc both be included in that
> commit?

I suppose all changes from the main func have already been committed in 
exec_func. As an example, `devtool modify x11vnc`, where x11vnc comes from 
meta-oe, seems to work as expected.

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


[OE-core] [PATCH 4/5] runqemu: support mutiple qemus running when nfs

2016-11-28 Thread Robert Yang
Fixed:
* In build1:
  $ runqemu nfs qemux86-64
  In build2:
  $ runqemu nfs qemux86-64

  It would fail before since the port numerbs and conf files are
  conflicted, now make runqemu-export-rootfs work together with runqemu to
  fix the problem.

* And we don't need export PSEUDO_LOCALSTATEDIR in runqemu, the
  runqemu-export-rootfs can handle it well based on NFS_EXPORT_DIR.

* Remove "async" option from unfsd to fix warning in syslog:
  Warning: unknown exports option `async' ignored

* Fixed typos

Both slirp and tap can work.

Signed-off-by: Robert Yang 
---
 scripts/runqemu   | 55 ---
 scripts/runqemu-export-rootfs | 10 
 2 files changed, 41 insertions(+), 24 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index c737eb2..a10270c 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -690,17 +690,33 @@ class BaseConfig(object):
 else:
 self.nfs_server = '192.168.7.1'
 
-nfs_instance = int(self.nfs_instance)
-
-mountd_rpcport = 2 + nfs_instance
-nfsd_rpcport = 1 + nfs_instance
-nfsd_port = 3049 + 2 * nfs_instance
-mountd_port = 3048 + 2 * nfs_instance
-unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" 
% (nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
-self.unfs_opts = unfs_opts
+# Figure out a new nfs_instance to allow multiple qemus running.
+cmd = "ps aux"
+ps = subprocess.Popen(cmd, shell=True, 
stdout=subprocess.PIPE).stdout.read().decode('utf-8')
+pattern = '/bin/unfsd .* -i .*\.pid -e .*/exports([0-9]+) '
+all_instances = re.findall(pattern, ps, re.M)
+if all_instances:
+all_instances.sort(key=int)
+self.nfs_instance = int(all_instances.pop()) + 1
+
+mountd_rpcport = 2 + self.nfs_instance
+nfsd_rpcport = 1 + self.nfs_instance
+nfsd_port = 3049 + 2 * self.nfs_instance
+mountd_port = 3048 + 2 * self.nfs_instance
+
+# Export vars for runqemu-export-rootfs
+export_dict = {
+'NFS_INSTANCE': self.nfs_instance,
+'MOUNTD_RPCPORT': mountd_rpcport,
+'NFSD_RPCPORT': nfsd_rpcport,
+'NFSD_PORT': nfsd_port,
+'MOUNTD_PORT': mountd_port,
+}
+for k, v in export_dict.items():
+# Use '%s' since they are integers
+os.putenv(k, '%s' % v)
 
-p = '%s/.runqemu-sdk/pseudo' % os.getenv('HOME')
-os.putenv('PSEUDO_LOCALSTATEDIR', p)
+
self.unfs_opts="nfsvers=3,port=%s,mountprog=%s,nfsprog=%s,udp,mountport=%s" % 
(nfsd_port, mountd_rpcport, nfsd_rpcport, mountd_port)
 
 # Extract .tar.bz2 or .tar.bz if no self.nfs_dir
 if not self.nfs_dir:
@@ -728,7 +744,7 @@ class BaseConfig(object):
 self.nfs_dir = dest
 
 # Start the userspace NFS server
-cmd = 'runqemu-export-rootfs restart %s' % self.nfs_dir
+cmd = 'runqemu-export-rootfs start %s' % self.nfs_dir
 logger.info('Running %s...' % cmd)
 if subprocess.call(cmd, shell=True) != 0:
 raise Exception('Failed to run %s' % cmd)
@@ -737,6 +753,8 @@ class BaseConfig(object):
 
 
 def setup_slirp(self):
+"""Setup user networking"""
+
 if self.fstype == 'nfs':
 self.setup_nfs()
 self.kernel_cmdline_script += ' ip=dhcp'
@@ -804,14 +822,13 @@ class BaseConfig(object):
 logger.error("Failed to setup tap device. Run runqemu-gen-tapdevs 
to manually create.")
 return 1
 self.tap = tap
-n0 = tap[3:]
-n1 = int(n0) * 2 + 1
-n2 = n1 + 1
-self.nfs_instance = n0
+tapnum = int(tap[3:])
+gateway = tapnum * 2 + 1
+client = gateway + 1
 if self.fstype == 'nfs':
 self.setup_nfs()
-self.kernel_cmdline_script += " 
ip=192.168.7.%s::192.168.7.%s:255.255.255.0" % (n2, n1)
-mac = "52:54:00:12:34:%02x" % n2
+self.kernel_cmdline_script += " 
ip=192.168.7.%s::192.168.7.%s:255.255.255.0" % (client, gateway)
+mac = "52:54:00:12:34:%02x" % client
 qb_tap_opt = self.get('QB_TAP_OPT')
 if qb_tap_opt:
 qemu_tap_opt = qb_tap_opt.replace('@TAP@', tap).replace('@MAC@', 
mac)
@@ -854,11 +871,11 @@ class BaseConfig(object):
 vm_drive = '-drive if=none,id=hd,file=%s,format=%s 
-device virtio-scsi-pci,id=scsi -device scsi-hd,drive=hd' \
% (self.rootfs, rootfs_format)
 elif subprocess.call(cmd2, shell=True) == 0:
-logger.info('Using scsi drive')
+logger.info('Using ide drive')
 vm_drive = "%s,format=%s" % (self.rootfs, 
rootfs_format)
 else:
 logger.warn("Can't detect drive 

[OE-core] [PATCH 5/5] runqemu: set default device and hostfwd for slirp

2016-11-28 Thread Robert Yang
There is no network rather than lo whitout set device, so set it by
default. And set hostfwd:  -> 22, 2323 -> 23

[YOCTO #7887]

Signed-off-by: Robert Yang 
---
 meta/conf/machine/include/qemuboot-x86.inc |  1 -
 meta/conf/machine/qemuarm64.conf   |  1 -
 scripts/runqemu| 34 --
 3 files changed, 32 insertions(+), 4 deletions(-)

diff --git a/meta/conf/machine/include/qemuboot-x86.inc 
b/meta/conf/machine/include/qemuboot-x86.inc
index 0870294..06ac983 100644
--- a/meta/conf/machine/include/qemuboot-x86.inc
+++ b/meta/conf/machine/include/qemuboot-x86.inc
@@ -13,4 +13,3 @@ QB_AUDIO_OPT = "-soundhw ac97,es1370"
 QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 
oprofile.timer=1 uvesafb.task_timeout=-1"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device 
virtio-rng-pci"
-QB_SLIRP_OPT = "-net nic,model=e1000 -net user,hostfwd=tcp::-:22"
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
index df2010c..7a5570c 100644
--- a/meta/conf/machine/qemuarm64.conf
+++ b/meta/conf/machine/qemuarm64.conf
@@ -18,7 +18,6 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci -monitor null"
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device 
virtio-net-device,netdev=net0,mac=@MAC@"
-QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
 QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device 
virtio-blk-device,drive=disk0"
 QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device 
virtconsole,chardev=virtcon"
 QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev 
socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device 
virtconsole,chardev=virtcon"
diff --git a/scripts/runqemu b/scripts/runqemu
index a10270c..7123b8f 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -147,6 +147,19 @@ def get_first_file(cmds):
 return f
 return ''
 
+def check_free_port(host, port):
+""" Check whether the port is free or not """
+import socket
+from contextlib import closing
+
+with closing(socket.socket(socket.AF_INET, socket.SOCK_STREAM)) as sock:
+if sock.connect_ex((host, port)) == 0:
+# Port is open, so not free
+return False
+else:
+# Port is not open, so free
+return True
+
 class BaseConfig(object):
 def __init__(self):
 # Vars can be merged with .qemuboot.conf, use a dict to manage them.
@@ -751,14 +764,31 @@ class BaseConfig(object):
 
 self.nfs_running = True
 
-
 def setup_slirp(self):
 """Setup user networking"""
 
 if self.fstype == 'nfs':
 self.setup_nfs()
 self.kernel_cmdline_script += ' ip=dhcp'
-self.set('NETWORK_CMD', self.get('QB_SLIRP_OPT'))
+# Port mapping
+hostfwd = ",hostfwd=tcp::-:22,hostfwd=tcp::2323-:23"
+qb_slirp_opt_default = "-netdev user,id=net0%s -device 
virtio-net-pci,netdev=net0" % hostfwd
+qb_slirp_opt = self.get('QB_SLIRP_OPT') or qb_slirp_opt_default
+# Figure out the port
+ports = re.findall('hostfwd=[^-]*:([0-9]+)-[^,-]*', qb_slirp_opt)
+ports = [int(i) for i in ports]
+# Find a free port to avoid conflicts
+for p in ports[:]:
+p_new = p
+while not check_free_port('127.0.0.1', p_new):
+p_new += 1
+while p_new in ports:
+p_new += 1
+if p != p_new:
+ports.append(p_new)
+qb_slirp_opt = re.sub(':%s-' % p, ':%s-' % p_new, qb_slirp_opt)
+logger.info("Port forward changed: %s -> %s" % (p, p_new))
+self.set('NETWORK_CMD', qb_slirp_opt)
 
 def setup_tap(self):
 """Setup tap"""
-- 
2.9.0

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


[OE-core] [PATCH 2/5] qemuboot.bbclass: use IMGDEPLOYDIR

2016-11-28 Thread Robert Yang
So that "bitbake  -ccleansstate" can remove qemuboot.conf

Signed-off-by: Robert Yang 
---
 meta/classes/qemuboot.bbclass | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 39df3ad..eb0ee57 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -43,6 +43,7 @@ QB_OPT_APPEND ?= "-show-cursor"
 
 # Create qemuboot.conf
 ROOTFS_POSTPROCESS_COMMAND += "write_qemuboot_conf; "
+IMGDEPLOYDIR ?= "${WORKDIR}/deploy-${PN}-image-complete"
 
 def qemuboot_vars(d):
 build_vars = ['MACHINE', 'TUNE_ARCH', 'DEPLOY_DIR_IMAGE',
@@ -55,8 +56,8 @@ write_qemuboot_conf[vardeps] += "${@' 
'.join(qemuboot_vars(d))}"
 python write_qemuboot_conf() {
 import configparser
 
-qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', True), 
d.getVar('IMAGE_NAME', True))
-qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('DEPLOY_DIR_IMAGE', 
True), d.getVar('IMAGE_LINK_NAME', True))
+qemuboot = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR', True), 
d.getVar('IMAGE_NAME', True))
+qemuboot_link = "%s/%s.qemuboot.conf" % (d.getVar('IMGDEPLOYDIR', True), 
d.getVar('IMAGE_LINK_NAME', True))
 cf = configparser.ConfigParser()
 cf.add_section('config_bsp')
 for k in qemuboot_vars(d):
-- 
2.9.0

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


[OE-core] [PATCH 0/5] runqemu: fixes for cpio.gz, nfs and slirp

2016-11-28 Thread Robert Yang
The following changes since commit af280990bff4a484fd8a18e3442b56a0a39b7611:

  Revert "classes/populate_sdk_ext: require uninative" (2016-11-28 14:49:37 
+)

are available in the git repository at:

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

Robert Yang (5):
  runqemu: fix checking for .cpio.gz
  qemuboot.bbclass: use IMGDEPLOYDIR
  runqemu-export-rootfs: fix inconsistent var names
  runqemu: support mutiple qemus running when nfs
  runqemu: set default device and hostfwd for slirp

 meta/classes/qemuboot.bbclass  |   5 +-
 meta/conf/machine/include/qemuboot-x86.inc |   1 -
 meta/conf/machine/qemuarm64.conf   |   1 -
 scripts/runqemu| 111 ++---
 scripts/runqemu-export-rootfs  |  21 +++---
 5 files changed, 96 insertions(+), 43 deletions(-)

-- 
2.9.0

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


[OE-core] [PATCH 3/5] runqemu-export-rootfs: fix inconsistent var names

2016-11-28 Thread Robert Yang
Fixed:
$ runqemu nfs qemux86-64
[snip]
On your target please remember to add the following options for NFS
nfsroot=IP_ADDRESS:/path/to/nfsroot,nfsvers=3,port=,mountprog=,nfsprog=,udp,mountport=
[snip]

Note that the values are null, this is because their var names are
inconsistent.

[YOCTO #10519]

Signed-off-by: Robert Yang 
---
 scripts/runqemu-export-rootfs | 21 +
 1 file changed, 9 insertions(+), 12 deletions(-)

diff --git a/scripts/runqemu-export-rootfs b/scripts/runqemu-export-rootfs
index 3dee131..0dd3eba 100755
--- a/scripts/runqemu-export-rootfs
+++ b/scripts/runqemu-export-rootfs
@@ -78,23 +78,17 @@ if [ ! -d "$PSEUDO_LOCALSTATEDIR" ]; then
 fi
 
 # rpc.mountd RPC port
-NFS_MOUNTPROG=$[ 2 + $NFS_INSTANCE ]
+MOUNTD_RPCPORT=$[ 2 + $NFS_INSTANCE ]
 # rpc.nfsd RPC port
-NFS_NFSPROG=$[ 1 + $NFS_INSTANCE ]
-# NFS port number
-NFS_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
+NFSD_RPCPORT=$[ 1 + $NFS_INSTANCE ]
+# NFS server port number
+NFSD_PORT=$[ 3049 + 2 * $NFS_INSTANCE ]
 # mountd port number
-MOUNT_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
+MOUNTD_PORT=$[ 3048 + 2 * $NFS_INSTANCE ]
 
 ## For debugging you would additionally add
 ## --debug all
-UNFSD_OPTS="-p -N -i $NFSPID -e $EXPORTS -x $NFS_NFSPROG -n $NFS_PORT -y 
$NFS_MOUNTPROG -m $MOUNT_PORT"
-
-# Setup the exports file
-if [ "$1" = "start" ]; then
-   echo "Creating exports file..."
-   echo "$NFS_EXPORT_DIR (rw,async,no_root_squash,no_all_squash,insecure)" 
> $EXPORTS
-fi
+UNFSD_OPTS="-p -N -i $NFSPID -e $EXPORTS -x $NFSD_RPCPORT -n $NFSD_PORT -y 
$MOUNTD_RPCPORT -m $MOUNTD_PORT"
 
 # See how we were called.
 case "$1" in
@@ -114,6 +108,9 @@ case "$1" in
exit 1
fi
 
+   echo "Creating exports file..."
+   echo "$NFS_EXPORT_DIR (rw,async,no_root_squash,no_all_squash,insecure)" 
> $EXPORTS
+
echo "Starting User Mode nfsd"
echo "  $PSEUDO $PSEUDO_OPTS $OECORE_NATIVE_SYSROOT/usr/bin/unfsd 
$UNFSD_OPTS"
$PSEUDO $PSEUDO_OPTS $OECORE_NATIVE_SYSROOT/usr/bin/unfsd $UNFSD_OPTS
-- 
2.9.0

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


[OE-core] [PATCH 1/5] runqemu: fix checking for .cpio.gz

2016-11-28 Thread Robert Yang
When "runqemu /path/to/.cpio.gz", it used the last suffix "gz" as
the fstype which was wrong. Check filename against self.fstypes firstly
can fix the problem.

Signed-off-by: Robert Yang 
---
 scripts/runqemu | 22 --
 1 file changed, 16 insertions(+), 6 deletions(-)

diff --git a/scripts/runqemu b/scripts/runqemu
index af25423..c737eb2 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -269,19 +269,29 @@ class BaseConfig(object):
 self.kernel =  p
 elif os.path.exists(p) and (not os.path.isdir(p)) and 
re.search('-image-', os.path.basename(p)):
 self.rootfs = p
-dirpath = os.path.dirname(p)
-m = re.search('(.*)\.(.*)$', p)
-if m:
-qb = '%s%s' % (re.sub('\.rootfs$', '', m.group(1)), 
'.qemuboot.conf')
+# Check filename against self.fstypes can hanlde .cpio.gz,
+# otherwise, its type would be "gz", which is incorrect.
+fst = ""
+for t in self.fstypes:
+if p.endswith(t):
+fst = t
+break
+if not fst:
+m = re.search('.*\.(.*)$', self.rootfs)
+if m:
+fst =  m.group(1)
+if fst:
+self.check_arg_fstype(fst)
+qb = re.sub('\.' + fst + "$", '', self.rootfs)
+qb = '%s%s' % (re.sub('\.rootfs$', '', qb), '.qemuboot.conf')
 if os.path.exists(qb):
 self.qemuboot = qb
 self.qbconfload = True
 else:
 logger.warn("%s doesn't exist" % qb)
-fst = m.group(2)
-self.check_arg_fstype(fst)
 else:
 raise Exception("Can't find FSTYPE from: %s" % p)
+
 elif os.path.isdir(p) or re.search(':', arg) and re.search('/', arg):
 if self.is_deploy_dir_image(p):
 logger.info('DEPLOY_DIR_IMAGE: %s' % p)
-- 
2.9.0

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


Re: [OE-core] [PATCH 2/2] base-passwd: set root's default password to 'root'

2016-11-28 Thread Paul Eggleton
On Tue, 29 Nov 2016 13:36:58 Robert Yang wrote:
> On 11/29/2016 11:45 AM, Paul Eggleton wrote:
> > On Tue, 29 Nov 2016 10:45:51 Robert Yang wrote:
> >> We may also need something like IMAGE_FEATURES += "test" to make it can
> >> work with -ctestimage.
> > 
> > Not sure I follow your reasoning here - can you explain what this feature
> > would do?
> 
> For example, the "bitbake  -ctestimage" requires a few pkgs
> installed, such as psplash-default, see the testcase in
> meta/lib/oeqa/runtime/smart.py:
> 
>  def test_smart_install(self):
>  self.smart('remove -y psplash-default')
>  self.smart('install -y psplash-default')
> 
> The test would fail without psplash-default installed, and also it requires
> sshd installed on the target. When IMAGE_FETURES += "test", we can install
> these required packages, I'm not sure this is a good idea, or maybe we can
> enhance testimge.bbclass to do it. Another way to fix the problem might be
> not hardcode the package name.

We have other means of dealing with that specifically - i.e. have the test 
skip itself if a package required for the test is not in the image. I think we 
already have examples of that.

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] qemu*.conf: Add slirp support for all qemu machines

2016-11-28 Thread Robert Yang



On 11/29/2016 04:11 AM, Randy Witt wrote:

This patch also moves the "-net user" part out of the config and
into runqemu. This is done because the "-net user" portion isn't
machine specific, and it contains what ports to forward.

[ YOCTO #7887 ]

Signed-off-by: Randy Witt 
---
 meta/conf/machine/include/qemuboot-mips.inc | 1 +
 meta/conf/machine/include/qemuboot-x86.inc  | 2 +-
 meta/conf/machine/qemuarm.conf  | 1 +
 meta/conf/machine/qemuarm64.conf| 2 +-
 meta/conf/machine/qemuppc.conf  | 1 +
 scripts/runqemu | 7 ++-
 6 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/meta/conf/machine/include/qemuboot-mips.inc 
b/meta/conf/machine/include/qemuboot-mips.inc
index 0c60cf2..c85dc86 100644
--- a/meta/conf/machine/include/qemuboot-mips.inc
+++ b/meta/conf/machine/include/qemuboot-mips.inc
@@ -6,3 +6,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet -device 
virtio-rng-pci"
 QB_SYSTEM_NAME = "qemu-system-${TUNE_ARCH}"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/meta/conf/machine/include/qemuboot-x86.inc 
b/meta/conf/machine/include/qemuboot-x86.inc
index 0870294..cc31dab 100644
--- a/meta/conf/machine/include/qemuboot-x86.inc
+++ b/meta/conf/machine/include/qemuboot-x86.inc
@@ -13,4 +13,4 @@ QB_AUDIO_OPT = "-soundhw ac97,es1370"
 QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 oprofile.timer=1 
uvesafb.task_timeout=-1"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device 
virtio-rng-pci"
-QB_SLIRP_OPT = "-net nic,model=e1000 -net user,hostfwd=tcp::-:22"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
index 17402ef..974657b 100644
--- a/meta/conf/machine/qemuarm.conf
+++ b/meta/conf/machine/qemuarm.conf
@@ -18,3 +18,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 
console=tty"
 QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
 PREFERRED_VERSION_linux-yocto ??= "4.8%"
 QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', '4.7', '', 
'zImage-versatile-pb.dtb', d)}"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
index df2010c..ebd360e 100644
--- a/meta/conf/machine/qemuarm64.conf
+++ b/meta/conf/machine/qemuarm64.conf
@@ -18,7 +18,7 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci -monitor null"
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device 
virtio-net-device,netdev=net0,mac=@MAC@"
-QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
+QB_SLIRP_OPT = "-device virtio-net-device,netdev=net0"
 QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device 
virtio-blk-device,drive=disk0"
 QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device 
virtconsole,chardev=virtcon"
 QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev 
socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device virtconsole,chardev=virtcon"
diff --git a/meta/conf/machine/qemuppc.conf b/meta/conf/machine/qemuppc.conf
index 8703c20..4711751 100644
--- a/meta/conf/machine/qemuppc.conf
+++ b/meta/conf/machine/qemuppc.conf
@@ -19,3 +19,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=tty console=ttyS0"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device 
virtio-net-pci,netdev=net0,mac=@MAC@"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/scripts/runqemu b/scripts/runqemu
index af25423..faab522 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -730,7 +730,12 @@ class BaseConfig(object):
 if self.fstype == 'nfs':
 self.setup_nfs()
 self.kernel_cmdline_script += ' ip=dhcp'
-self.set('NETWORK_CMD', self.get('QB_SLIRP_OPT'))
+network_cmd = self.get('QB_SLIRP_OPT')
+
+# The network device created in qemuboot.conf is expected to be
+# id=net0
+network_cmd += ' -netdev user,id=net0,hostfwd=tcp::-:22'


Hi Randy,

This doesn't work when more than one qemu is running since the port
will be conflicted. And since all of the QB_SLIRP_OPT are the same,
so I'd like to set it as a default value in runqemu, just like
what we do for QB_TAP_OPT. And if we break them into two parts:

"-device virtio-net-device,netdev=net0" and
"-netdev 

Re: [OE-core] [PATCH] devtool: execute associated functions while preparing the source tree

2016-11-28 Thread Christopher Larson
On Mon, Nov 28, 2016 at 7:59 PM, Jiajie Hu  wrote:

> Execute prefuncs and postfuncs associated with the task while preparing
> the source tree. If any changes are made to the source tree by these
> prefuncs or postfuncs, a separate commit will be created so that the
> changes won't get incorporated with other patches.
>
> Signed-off-by: Jiajie Hu 
> ---
>  scripts/lib/devtool/standard.py | 23 ---
>  1 file changed, 20 insertions(+), 3 deletions(-)
>
> diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/
> standard.py
> index e4d2a57..8302112 100644
> --- a/scripts/lib/devtool/standard.py
> +++ b/scripts/lib/devtool/standard.py
> @@ -424,8 +424,7 @@ class BbTaskExecutor(object):
>  self.rdata = rdata
>  self.executed = []
>
> -def exec_func(self, func, report):
> -"""Run bitbake task function"""
> +def _exec_func(self, func, report):
>  if not func in self.executed:
>  deps = self.rdata.getVarFlag(func, 'deps', False)
>  if deps:
> @@ -435,12 +434,25 @@ class BbTaskExecutor(object):
>  logger.info('Executing %s...' % func)
>  fn = self.rdata.getVar('FILE', True)
>  localdata = bb.build._task_data(fn, func, self.rdata)
> +prefuncs = localdata.getVarFlag(func, 'prefuncs', True)
> +postfuncs = localdata.getVarFlag(func, 'postfuncs', True)
>  try:
> +for prefunc in (prefuncs or '').split():
> +bb.build.exec_func(prefunc, localdata)
> +yield prefunc
>  bb.build.exec_func(func, localdata)
> +for postfunc in (postfuncs or '').split():
> +bb.build.exec_func(postfunc, localdata)
> +yield postfunc
>  except bb.build.FuncFailed as e:
>  raise DevtoolError(str(e))
>  self.executed.append(func)
>
> +def exec_func(self, func, report):
> +"""Run bitbake task function"""
> +for step in self._exec_func(func, report):
> +pass
> +
>
>  class PatchTaskExecutor(BbTaskExecutor):
>  def __init__(self, rdata):
> @@ -462,7 +474,12 @@ class PatchTaskExecutor(BbTaskExecutor):
>  else:
>  os.rmdir(patchdir)
>
> -super(PatchTaskExecutor, self).exec_func(func, report)
> +for step in super(PatchTaskExecutor, self)._exec_func(func,
> report):
> +if self.check_git and os.path.exists(srcsubdir):
> +stdout, _ = bb.process.run('git status --porcelain',
> cwd=srcsubdir)
> +if stdout:
> +bb.process.run('git add .; git %s commit -a -m
> "Committing changes from %s\n\n%s"' % (' '.join(self.useroptions), step,
> GitApplyTree.ignore_commit_prefix + ' - from %s' % step), cwd=srcsubdir)
>

This will do the commit after the first postfunc is done, so won’t the
changes from the main func and the first postfunc both be included in that
commit?
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 2/2] base-passwd: set root's default password to 'root'

2016-11-28 Thread Robert Yang



On 11/29/2016 11:45 AM, Paul Eggleton wrote:

On Tue, 29 Nov 2016 10:45:51 Robert Yang wrote:

On 11/29/2016 09:57 AM, Khem Raj wrote:

On Nov 24, 2016, at 10:59 AM, Paul Eggleton
 wrote:>>
On Thu, 24 Nov 2016 08:46:29 Patrick Ohly wrote:

On Thu, 2016-11-24 at 11:38 +0800, Robert Yang wrote:

Currently, debug-tweaks is in EXTRA_IMAGE_FEATURES by default for poky,
and
there is no passwd, so that user can login easily without a passwd, I
think
that current status is more unsafe ?


Both well-known password and no password are unsafe. User "root" with
password "root" is not even "more" safe already now, because tools that
brute-force logins try that. Choosing something else would be a bit
safer for a short while until the tools add it to their dictionary.

Poky is also targeting a different audience than OE-core. Poky can
assume to be used in a secure environment, OE-core can't (because it
might be used for all kinds of devices).


I don't think that's part of the design goals on either side, it's simply
about making development easier. The feature is clearly labelled "debug-
tweaks" because it's for debugging not for production. It could be that
we
should make it do other things like append a notice to /etc/issue to
avoid
people leaving it on for production, if that is a concern.


Sometimes such goals can lead to problems. Making development easier by
all means if you can ensure a hard error on production e.g. debug-tweaks
can then never be part of production images. Otherwise someone will
forget it and it will be discovered on millions of devices in field along
with the user project will be red-faced.


Right. FWIW in mitigation I did write the raw material for the following
section of the YP manuals, though I don't know how many people have ended
up reading it:

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#making-images-more-secure

In there there is an explicit mention of disabling debug-tweaks. Looking
around the place it could be that we need more warnings about this being
on by default though.


Will something like IMAGE_FEATURES += "production" help here ?


I'd like to see something like this - at least give the user some way of
saying "I really am in production now, so error out on anything that I
shouldn't be doing there". I wonder if it potentially goes further than
just conflicting with things like debug-tweaks and empty-root-password.


We may also need something like IMAGE_FEATURES += "test" to make it can work
with -ctestimage.


Not sure I follow your reasoning here - can you explain what this feature
would do?


For example, the "bitbake  -ctestimage" requires a few pkgs installed,
such as psplash-default, see the testcase in meta/lib/oeqa/runtime/smart.py:

def test_smart_install(self):
self.smart('remove -y psplash-default')
self.smart('install -y psplash-default')

The test would fail without psplash-default installed, and also it requires
sshd installed on the target. When IMAGE_FETURES += "test", we can install
these required packages, I'm not sure this is a good idea, or maybe we can
enhance testimge.bbclass to do it. Another way to fix the problem might be
not hardcode the package name.

// Robert



Cheers,
Paul


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


Re: [OE-core] [PATCH 2/2] base-passwd: set root's default password to 'root'

2016-11-28 Thread Paul Eggleton
On Tue, 29 Nov 2016 10:45:51 Robert Yang wrote:
> On 11/29/2016 09:57 AM, Khem Raj wrote:
> >> On Nov 24, 2016, at 10:59 AM, Paul Eggleton
> >>  wrote:>> 
> >> On Thu, 24 Nov 2016 08:46:29 Patrick Ohly wrote:
> >>> On Thu, 2016-11-24 at 11:38 +0800, Robert Yang wrote:
>  Currently, debug-tweaks is in EXTRA_IMAGE_FEATURES by default for poky,
>  and
>  there is no passwd, so that user can login easily without a passwd, I
>  think
>  that current status is more unsafe ?
> >>> 
> >>> Both well-known password and no password are unsafe. User "root" with
> >>> password "root" is not even "more" safe already now, because tools that
> >>> brute-force logins try that. Choosing something else would be a bit
> >>> safer for a short while until the tools add it to their dictionary.
> >>> 
> >>> Poky is also targeting a different audience than OE-core. Poky can
> >>> assume to be used in a secure environment, OE-core can't (because it
> >>> might be used for all kinds of devices).
> >> 
> >> I don't think that's part of the design goals on either side, it's simply
> >> about making development easier. The feature is clearly labelled "debug-
> >> tweaks" because it's for debugging not for production. It could be that
> >> we
> >> should make it do other things like append a notice to /etc/issue to
> >> avoid
> >> people leaving it on for production, if that is a concern.
> > 
> > Sometimes such goals can lead to problems. Making development easier by
> > all means if you can ensure a hard error on production e.g. debug-tweaks
> > can then never be part of production images. Otherwise someone will
> > forget it and it will be discovered on millions of devices in field along
> > with the user project will be red-faced.

Right. FWIW in mitigation I did write the raw material for the following
section of the YP manuals, though I don't know how many people have ended
up reading it:

http://www.yoctoproject.org/docs/current/dev-manual/dev-manual.html#making-images-more-secure

In there there is an explicit mention of disabling debug-tweaks. Looking
around the place it could be that we need more warnings about this being
on by default though.

> Will something like IMAGE_FEATURES += "production" help here ? 

I'd like to see something like this - at least give the user some way of
saying "I really am in production now, so error out on anything that I
shouldn't be doing there". I wonder if it potentially goes further than
just conflicting with things like debug-tweaks and empty-root-password.

> We may also need something like IMAGE_FEATURES += "test" to make it can work
> with -ctestimage.

Not sure I follow your reasoning here - can you explain what this feature
would do?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] devtool: execute associated functions while preparing the source tree

2016-11-28 Thread Jiajie Hu
Execute prefuncs and postfuncs associated with the task while preparing
the source tree. If any changes are made to the source tree by these
prefuncs or postfuncs, a separate commit will be created so that the
changes won't get incorporated with other patches.

Signed-off-by: Jiajie Hu 
---
 scripts/lib/devtool/standard.py | 23 ---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/scripts/lib/devtool/standard.py b/scripts/lib/devtool/standard.py
index e4d2a57..8302112 100644
--- a/scripts/lib/devtool/standard.py
+++ b/scripts/lib/devtool/standard.py
@@ -424,8 +424,7 @@ class BbTaskExecutor(object):
 self.rdata = rdata
 self.executed = []
 
-def exec_func(self, func, report):
-"""Run bitbake task function"""
+def _exec_func(self, func, report):
 if not func in self.executed:
 deps = self.rdata.getVarFlag(func, 'deps', False)
 if deps:
@@ -435,12 +434,25 @@ class BbTaskExecutor(object):
 logger.info('Executing %s...' % func)
 fn = self.rdata.getVar('FILE', True)
 localdata = bb.build._task_data(fn, func, self.rdata)
+prefuncs = localdata.getVarFlag(func, 'prefuncs', True)
+postfuncs = localdata.getVarFlag(func, 'postfuncs', True)
 try:
+for prefunc in (prefuncs or '').split():
+bb.build.exec_func(prefunc, localdata)
+yield prefunc
 bb.build.exec_func(func, localdata)
+for postfunc in (postfuncs or '').split():
+bb.build.exec_func(postfunc, localdata)
+yield postfunc
 except bb.build.FuncFailed as e:
 raise DevtoolError(str(e))
 self.executed.append(func)
 
+def exec_func(self, func, report):
+"""Run bitbake task function"""
+for step in self._exec_func(func, report):
+pass
+
 
 class PatchTaskExecutor(BbTaskExecutor):
 def __init__(self, rdata):
@@ -462,7 +474,12 @@ class PatchTaskExecutor(BbTaskExecutor):
 else:
 os.rmdir(patchdir)
 
-super(PatchTaskExecutor, self).exec_func(func, report)
+for step in super(PatchTaskExecutor, self)._exec_func(func, report):
+if self.check_git and os.path.exists(srcsubdir):
+stdout, _ = bb.process.run('git status --porcelain', 
cwd=srcsubdir)
+if stdout:
+bb.process.run('git add .; git %s commit -a -m "Committing 
changes from %s\n\n%s"' % (' '.join(self.useroptions), step, 
GitApplyTree.ignore_commit_prefix + ' - from %s' % step), cwd=srcsubdir)
+
 if self.check_git and os.path.exists(srcsubdir):
 if func == 'do_patch':
 if os.path.exists(patchdir):
-- 
1.9.1

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


Re: [OE-core] [PATCH 2/2] base-passwd: set root's default password to 'root'

2016-11-28 Thread Robert Yang



On 11/29/2016 09:57 AM, Khem Raj wrote:



On Nov 24, 2016, at 10:59 AM, Paul Eggleton  
wrote:

On Thu, 24 Nov 2016 08:46:29 Patrick Ohly wrote:

On Thu, 2016-11-24 at 11:38 +0800, Robert Yang wrote:

Currently, debug-tweaks is in EXTRA_IMAGE_FEATURES by default for poky,
and
there is no passwd, so that user can login easily without a passwd, I
think
that current status is more unsafe ?


Both well-known password and no password are unsafe. User "root" with
password "root" is not even "more" safe already now, because tools that
brute-force logins try that. Choosing something else would be a bit
safer for a short while until the tools add it to their dictionary.

Poky is also targeting a different audience than OE-core. Poky can
assume to be used in a secure environment, OE-core can't (because it
might be used for all kinds of devices).


I don't think that's part of the design goals on either side, it's simply
about making development easier. The feature is clearly labelled "debug-
tweaks" because it's for debugging not for production. It could be that we
should make it do other things like append a notice to /etc/issue to avoid
people leaving it on for production, if that is a concern.



Sometimes such goals can lead to problems. Making development easier by
all means if you can ensure a hard error on production e.g. debug-tweaks can
then never be part of production images. Otherwise someone will forget it
and it will be discovered on millions of devices in field along with the user
project will be red-faced.


Will something like IMAGE_FEATURES += "production" help here ? We may also
need something like IMAGE_FEATURES += "test" to make it can work with
-ctestimage.

// Robert




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


Re: [OE-core] Kernel: Builds use old version of defconfig

2016-11-28 Thread Khem Raj

> On Nov 24, 2016, at 5:55 AM, Bruce Ashfield  wrote:
> 
> 
> 
> On Thu, Nov 24, 2016 at 5:32 AM, Mike Looijmans  > wrote:
> On 24-11-16 11:10, Mike Looijmans wrote:
> I'm currently experiencing a problem with "defconfig" files and the kernel.
> 
> In short, when I make a change to the "defconfig" file, the kernel is rebuilt
> (which is correct), but the resulting kernel has been built using the old
> defconfig from a previous build, instead of the new one.
> 
> The kernel recipe just contains "file://defconfig" in its SRC_URI. The
> defconfig file is in the project's overlay.
> 
> For example, I have a kernel with "CONFIG_DEVMEM" disabled:
> 
> # gunzip < /proc/config.gz | grep DEVMEM
> # CONFIG_DEVMEM is not set
> 
> Now, I change the defconfig to contain CONFIG_DEVMEM=y and build the image.
> The result:
> 
> # gunzip < /proc/config.gz | grep DEVMEM
> # CONFIG_DEVMEM is not set
> 
> So the change did not make it into the actual kernel, even though the kernel
> was rebuild as a result of the change.
> 
> I run "bitbake -c cleansstate virtual/kernel" and build the image again:
> 
> # gunzip < /proc/config.gz | grep DEVMEM
> CONFIG_DEVMEM=y
> 
> After cleaning, the result is correct and the new defconfig is active.
> 
> I'm trying to figure out how this can happen, any help is welcome...
> 
> What seems to be the problem is this code in kernel.bbclass:
> 
> # Copy defconfig to .config if .config does not exist. This allows
> # recipes to manage the .config themselves in do_configure_prepend().
> if [ -f "${WORKDIR}/defconfig" ] && [ ! -f "${B}/.config" ]; then
> cp "${WORKDIR}/defconfig" "${B}/.config"
> fi
> 
> This keeps any existing ".config" file if it happens to still be in the $B 
> path, which is the case if you're rebuilding a kernel.
> 
> I see two possible ways to fix this.
> 
> 1) During "cleanup" also remove the .config file in the build dir. However, 
> the build dir is probably kept alive for a reason? I also can't figure out 
> how that "cleanup" is being done.
> 
> 
> 2) Remove the second part of the "if" statement, so it becomes:
> 
> # Copy defconfig to .config if "defconfig" exists. This allows
> # recipes to manage the .config themselves in do_configure_prepend().
> if [ -f "${WORKDIR}/defconfig" ]; then
> cp "${WORKDIR}/defconfig" "${B}/.config"
> fi
> 
> I've tested that, and it solves my problem. However, it will probably break 
> other people's config mangling?
> 
> 
> Yep, in particular all the fragment processing which has the capability of 
> starting
> with a defconfig and then apply fragments from any number of other places. 
> When
> that task completes, a full .config is in ${B}.  If that statement comes 
> along and
> clobbers the .config …

so you either assume that .config is valid once generated or you dont. When a 
configure task
is triggered it should recreate .config everytime. 

> 
> I'm actually working in the 2.3 release cycle to make the fragment processing
> be available to all kernels, which will likely solve this problem .. but we 
> can't 
> wait for that.
> 
> So I'm hoping that there's a way to make the behaviour cover both use cases.
> 
> Maybe someone with more bitbake knowledge can point out a way that can
> detect if the task is being run due to a change in the task signature. 
> 
> Since if you've modified the defconfig, the task is being re-run for that 
> change
> and at that point we could safely remove the .config (versus forcing it on the
> clean step).
> 
> Bruce
> 
> 
>  
> 
> 
> Kind regards,
> 
> Mike Looijmans
> System Expert
> 
> TOPIC Products
> Materiaalweg 4, NL-5681 RJ Best
> Postbus 440, NL-5680 AK Best
> Telefoon: +31 (0) 499 33 69 79 
> E-mail: mike.looijm...@topicproducts.com 
> 
> Website: www.topicproducts.com 
> 
> Please consider the environment before printing this e-mail
> 
> 
> 
> 
> 
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org 
> 
> http://lists.openembedded.org/mailman/listinfo/openembedded-core 
> 
> 
> 
> 
> -- 
> "Thou shalt not follow the NULL pointer, for chaos and madness await thee at 
> its end"
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org 
> 
> http://lists.openembedded.org/mailman/listinfo/openembedded-core 
> 
-- 
___
Openembedded-core mailing list

Re: [OE-core] [PATCH 2/2] base-passwd: set root's default password to 'root'

2016-11-28 Thread Khem Raj

> On Nov 24, 2016, at 10:59 AM, Paul Eggleton  
> wrote:
> 
> On Thu, 24 Nov 2016 08:46:29 Patrick Ohly wrote:
>> On Thu, 2016-11-24 at 11:38 +0800, Robert Yang wrote:
>>> Currently, debug-tweaks is in EXTRA_IMAGE_FEATURES by default for poky,
>>> and
>>> there is no passwd, so that user can login easily without a passwd, I
>>> think
>>> that current status is more unsafe ?
>> 
>> Both well-known password and no password are unsafe. User "root" with
>> password "root" is not even "more" safe already now, because tools that
>> brute-force logins try that. Choosing something else would be a bit
>> safer for a short while until the tools add it to their dictionary.
>> 
>> Poky is also targeting a different audience than OE-core. Poky can
>> assume to be used in a secure environment, OE-core can't (because it
>> might be used for all kinds of devices).
> 
> I don't think that's part of the design goals on either side, it's simply 
> about making development easier. The feature is clearly labelled "debug-
> tweaks" because it's for debugging not for production. It could be that we 
> should make it do other things like append a notice to /etc/issue to avoid 
> people leaving it on for production, if that is a concern.
> 

Sometimes such goals can lead to problems. Making development easier by
all means if you can ensure a hard error on production e.g. debug-tweaks can
then never be part of production images. Otherwise someone will forget it
and it will be discovered on millions of devices in field along with the user
project will be red-faced.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 0/1] multilib.bbclass: update DEFAULTTUNE for image recipe

2016-11-28 Thread Robert Yang
The following changes since commit af280990bff4a484fd8a18e3442b56a0a39b7611:

  Revert "classes/populate_sdk_ext: require uninative" (2016-11-28 14:49:37 
+)

are available in the git repository at:

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

Robert Yang (1):
  multilib.bbclass: update DEFAULTTUNE for image recipe

 meta/classes/multilib.bbclass | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

-- 
2.9.0

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


[OE-core] [PATCH 1/1] multilib.bbclass: update DEFAULTTUNE for image recipe

2016-11-28 Thread Robert Yang
Fixed:
MACHINE = "qemux86-64"
require conf/multilib.conf
MULTILIBS = "multilib:lib32"
DEFAULTTUNE_virtclass-multilib-lib32 = "x86"

$ bitbake -e lib32-core-image-minimal | grep ^TUNE_ARCH=
TUNE_ARCH="x86_64"

This is incorrect, it should be i686 (or other 32 bit tunes), this makes
we can't conditionlly install some packages, for example, the recipe-A
sets:
COMPATIBLE_HOST = "x86_64.*-linux"

Then it only can be installed when TARGET_ARCH is x86_64:
IMAGE_INSTALL_x86-64 += "package-A"

But it would be error when "bitbake lib32-core-image-minimal":
ERROR: lib32-recipe-A was skipped: incompatible with host 
i686-pokymllib32-linux (not in COMPATIBLE_HOST)

This is because TARGET_ARCH is not updated to "i686" when multilib, this
patch can fix the problem.

Signed-off-by: Robert Yang 
---
 meta/classes/multilib.bbclass | 16 +++-
 1 file changed, 11 insertions(+), 5 deletions(-)

diff --git a/meta/classes/multilib.bbclass b/meta/classes/multilib.bbclass
index d5a3128..5d2d048 100644
--- a/meta/classes/multilib.bbclass
+++ b/meta/classes/multilib.bbclass
@@ -23,6 +23,13 @@ python multilib_virtclass_handler () {
 overrides = overrides.replace("pn-${PN}", "pn-${PN}:pn-" + pn)
 e.data.setVar("OVERRIDES", overrides)
 
+def multilib_set_default_tune():
+# DEFAULTTUNE can change TARGET_ARCH override so expand this now 
before update_data
+newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + 
variant, False)
+if newtune:
+e.data.setVar("DEFAULTTUNE", newtune)
+e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
+
 if bb.data.inherits_class('image', e.data):
 e.data.setVar("MLPREFIX", variant + "-")
 e.data.setVar("PN", variant + "-" + e.data.getVar("PN", False))
@@ -30,6 +37,9 @@ python multilib_virtclass_handler () {
 target_vendor = e.data.getVar("TARGET_VENDOR_" + "virtclass-multilib-" 
+ variant, False)
 if target_vendor:
 e.data.setVar("TARGET_VENDOR", target_vendor)
+
+multilib_set_default_tune()
+
 return
 
 if bb.data.inherits_class('cross-canadian', e.data):
@@ -65,11 +75,7 @@ python multilib_virtclass_handler () {
 pkgs += " " + variant + "-" + pkg
 e.data.setVar(whitelist, pkgs)
 
-# DEFAULTTUNE can change TARGET_ARCH override so expand this now before 
update_data
-newtune = e.data.getVar("DEFAULTTUNE_" + "virtclass-multilib-" + variant, 
False)
-if newtune:
-e.data.setVar("DEFAULTTUNE", newtune)
-e.data.setVar('DEFAULTTUNE_ML_%s' % variant, newtune)
+multilib_set_default_tune()
 }
 
 addhandler multilib_virtclass_handler
-- 
2.9.0

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


Re: [OE-core] [PATCH] base.bbclass: squash whitespace when printing BUILDCFG_VARS

2016-11-28 Thread Richard Purdie
On Mon, 2016-11-28 at 16:53 -0700, Christopher Larson wrote:
> 
> On Mon, Nov 28, 2016 at 3:23 PM, Andre McCurdy 
> wrote:
> > TUNE_FEATURES for ARM targets typically contains a lot of
> > whitespace
> > due to refactoring in OE 2.1:
> > 
> >   http://git.openembedded.org/openembedded-core/commit/?id=f774b44f
> > a007a2a756ada892ede832b1251d940c

I'm wondering if we should take back some of the whitespace changes
that commit made...

Cheers,

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


Re: [OE-core] [PATCH] base.bbclass: squash whitespace when printing BUILDCFG_VARS

2016-11-28 Thread Andre McCurdy
On Mon, Nov 28, 2016 at 3:53 PM, Christopher Larson  wrote:
>
> On Mon, Nov 28, 2016 at 3:23 PM, Andre McCurdy  wrote:
>>
>> TUNE_FEATURES for ARM targets typically contains a lot of whitespace
>> due to refactoring in OE 2.1:
>>
>> http://git.openembedded.org/openembedded-core/commit/?id=f774b44fa007a2a756ada892ede832b1251d940c
>>
>> Squash whitespace when displaying BUILDCFG_VARS in buildcfg_vars().
>>
>> Signed-off-by: Andre McCurdy 
>> ---
>>  meta/classes/base.bbclass | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
>> index 024fe43..c36c5ed 100644
>> --- a/meta/classes/base.bbclass
>> +++ b/meta/classes/base.bbclass
>> @@ -191,7 +191,7 @@ def buildcfg_vars(d):
>>  for var in statusvars:
>>  value = d.getVar(var, True)
>>  if value is not None:
>> -yield '%-17s = "%s"' % (var, value)
>> +yield '%-17s = "%s"' % (var, " ".join(value.split()))
>>
>>  def buildcfg_neededvars(d):
>>  needed_vars = oe.data.typed_value("BUILDCFG_NEEDEDVARS", d)
>
> This will result in inaccurate values displayed for non-list variables.

I didn't notice any changes in the other fields. Do you have an
example of a value which wouldn't display correctly?

> --
> Christopher Larson
> clarson at kergoth dot com
> Founder - BitBake, OpenEmbedded, OpenZaurus
> Maintainer - Tslib
> Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] base.bbclass: squash whitespace when printing BUILDCFG_VARS

2016-11-28 Thread Christopher Larson
On Mon, Nov 28, 2016 at 3:23 PM, Andre McCurdy  wrote:

> TUNE_FEATURES for ARM targets typically contains a lot of whitespace
> due to refactoring in OE 2.1:
>
>   http://git.openembedded.org/openembedded-core/commit/?id=
> f774b44fa007a2a756ada892ede832b1251d940c
>
> Squash whitespace when displaying BUILDCFG_VARS in buildcfg_vars().
>
> Signed-off-by: Andre McCurdy 
> ---
>  meta/classes/base.bbclass | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
> index 024fe43..c36c5ed 100644
> --- a/meta/classes/base.bbclass
> +++ b/meta/classes/base.bbclass
> @@ -191,7 +191,7 @@ def buildcfg_vars(d):
>  for var in statusvars:
>  value = d.getVar(var, True)
>  if value is not None:
> -yield '%-17s = "%s"' % (var, value)
> +yield '%-17s = "%s"' % (var, " ".join(value.split()))
>
>  def buildcfg_neededvars(d):
>  needed_vars = oe.data.typed_value("BUILDCFG_NEEDEDVARS", d)
>

This will result in inaccurate values displayed for non-list variables.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 06/18] cmake: update to 3.7.0

2016-11-28 Thread Khem Raj

> On Nov 28, 2016, at 5:34 AM, Alexander Kanavin 
>  wrote:
> 
> License is still 3-clause BSD.

OK. what triggered the checksum change then ?

> 
> Signed-off-by: Alexander Kanavin 
> ---
> .../cmake/{cmake-native_3.6.2.bb => cmake-native_3.7.0.bb}| 1 +
> meta/recipes-devtools/cmake/cmake.inc | 8 
> meta/recipes-devtools/cmake/{cmake_3.6.2.bb => cmake_3.7.0.bb}| 1 +
> 3 files changed, 6 insertions(+), 4 deletions(-)
> rename meta/recipes-devtools/cmake/{cmake-native_3.6.2.bb => 
> cmake-native_3.7.0.bb} (95%)
> rename meta/recipes-devtools/cmake/{cmake_3.6.2.bb => cmake_3.7.0.bb} (97%)
> 
> diff --git a/meta/recipes-devtools/cmake/cmake-native_3.6.2.bb 
> b/meta/recipes-devtools/cmake/cmake-native_3.7.0.bb
> similarity index 95%
> rename from meta/recipes-devtools/cmake/cmake-native_3.6.2.bb
> rename to meta/recipes-devtools/cmake/cmake-native_3.7.0.bb
> index aec0d64..7ad4345 100644
> --- a/meta/recipes-devtools/cmake/cmake-native_3.6.2.bb
> +++ b/meta/recipes-devtools/cmake/cmake-native_3.7.0.bb
> @@ -17,6 +17,7 @@ CMAKE_EXTRACONF = "\
> -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
> -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
> -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
> +-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
> -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
> -DHAVE_SYS_ACL_H=0 \
> "
> diff --git a/meta/recipes-devtools/cmake/cmake.inc 
> b/meta/recipes-devtools/cmake/cmake.inc
> index fee511f..9ae2890 100644
> --- a/meta/recipes-devtools/cmake/cmake.inc
> +++ b/meta/recipes-devtools/cmake/cmake.inc
> @@ -6,8 +6,8 @@ HOMEPAGE = "http://www.cmake.org/;
> BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php;
> SECTION = "console/utils"
> LICENSE = "BSD"
> -LIC_FILES_CHKSUM = 
> "file://Copyright.txt;md5=052f86c15bbde68af55c7f7b340ab639 \
> -
> file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
> +LIC_FILES_CHKSUM = 
> "file://Copyright.txt;md5=7a64bc564202bf7401d9a8ef33c9564d \
> +
> file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14"
> 
> CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV', True).split('.')[0:2])}"
> 
> @@ -17,8 +17,8 @@ SRC_URI = 
> "https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
>file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \
>"
> 
> -SRC_URI[md5sum] = "139d7affdd4e8ab1edfc9f4322d69e43"
> -SRC_URI[sha256sum] = 
> "189ae32a6ac398bb2f523ae77f70d463a6549926cde1544cd9cc7c6609f8b346"
> +SRC_URI[md5sum] = "3801dc4e54c1c957a7378d8b0d4254ba"
> +SRC_URI[sha256sum] = 
> "ed63e05c41aeb6c036e503114ab15847f29c312f9f21f5f1a7060a4b4ec2fb31"
> 
> UPSTREAM_CHECK_REGEX = "cmake-(?P\d+(\.\d+)+)\.tar"
> 
> diff --git a/meta/recipes-devtools/cmake/cmake_3.6.2.bb 
> b/meta/recipes-devtools/cmake/cmake_3.7.0.bb
> similarity index 97%
> rename from meta/recipes-devtools/cmake/cmake_3.6.2.bb
> rename to meta/recipes-devtools/cmake/cmake_3.7.0.bb
> index 850d6de..58c6615 100644
> --- a/meta/recipes-devtools/cmake/cmake_3.6.2.bb
> +++ b/meta/recipes-devtools/cmake/cmake_3.7.0.bb
> @@ -27,6 +27,7 @@ EXTRA_OECMAKE=" \
> -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
> -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
> -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
> +-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
> -DKWSYS_CHAR_IS_SIGNED=1 \
> -DBUILD_CursesDialog=0 \
> ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 
> '-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
> -- 
> 2.10.2
> 
> -- 
> ___
> 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 V2] scripts.send-pull-request: Avoid multiple chain headers

2016-11-28 Thread Jose Lamego


On 11/28/2016 03:34 PM, Patrick Ohly wrote:
> On Mon, 2016-11-28 at 14:28 -0600, Jose Lamego wrote:
>> Agree. Please provide feedback about below comments and I will submit a
>> v3 patch.
>>
>> On 11/28/2016 01:47 PM, Patrick Ohly wrote:
>>> On Mon, 2016-11-28 at 10:23 -0600, Jose Lamego wrote:
>> More than 1 "In-Reply-To" and "References" message headers are in
>> violation of rfc2822 [1] and may cause that some email-related
>> applications do not point to the appropriate root message in a
>> conversation/series.
> 
> Fixing that makes sense. Just add it as reason and the "why" part is
> covered.
> 
>>> And I don't understand why this proposed change has the described
>>> effect. Does changing the threading parameters change the output of "git
>>> send-email" and thus indirectly the mail headers of the following
>>> patches?
> 
> The "how" part still isn't clear to me. Perhaps I'm just dumb, but would
> you bear with me and explain a bit more how changing the sending of the
> cover letter affects sending of the patches?
> 
The script is duplicating the headers because it contains two individual
calls to git-send-email, one for the cover letter (when available) and
one for the rest of the series patches, both using the --no-chain-reply
option that includes a reference to the first message. What I'm doing
here is to include no reference to any root message at the first call,
then including a reference at the second call to the very first message
in the chain, which is either the cover letter or the patch #1.
This change is currently implemented/tested at [2] and complements a
change in patchwork [3] that handles messages including repeated headers
(created before this change gets implemented).

So the comment I would add to patch is:
This change appends only one header pointing to very first patch
in series or to cover letter if available by calling send-email
with thread history option only once, instead of the original twice.

[2] patchwork-staging.openembedded.org
[3] https://lists.yoctoproject.org/pipermail/yocto/2016-November/033200.html
> As it isn't obvious, perhaps even add a comment to the script explaining
> it.
> 

-- 
Jose Lamego | OTC Embedded Platforms & Tools | GDC



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


[OE-core] [PATCH] base.bbclass: squash whitespace when printing BUILDCFG_VARS

2016-11-28 Thread Andre McCurdy
TUNE_FEATURES for ARM targets typically contains a lot of whitespace
due to refactoring in OE 2.1:

  
http://git.openembedded.org/openembedded-core/commit/?id=f774b44fa007a2a756ada892ede832b1251d940c

Squash whitespace when displaying BUILDCFG_VARS in buildcfg_vars().

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

diff --git a/meta/classes/base.bbclass b/meta/classes/base.bbclass
index 024fe43..c36c5ed 100644
--- a/meta/classes/base.bbclass
+++ b/meta/classes/base.bbclass
@@ -191,7 +191,7 @@ def buildcfg_vars(d):
 for var in statusvars:
 value = d.getVar(var, True)
 if value is not None:
-yield '%-17s = "%s"' % (var, value)
+yield '%-17s = "%s"' % (var, " ".join(value.split()))
 
 def buildcfg_neededvars(d):
 needed_vars = oe.data.typed_value("BUILDCFG_NEEDEDVARS", d)
-- 
1.9.1

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


Re: [OE-core] [PATCH V2] scripts.send-pull-request: Avoid multiple chain headers

2016-11-28 Thread Patrick Ohly
On Mon, 2016-11-28 at 14:28 -0600, Jose Lamego wrote:
> Agree. Please provide feedback about below comments and I will submit a
> v3 patch.
> 
> On 11/28/2016 01:47 PM, Patrick Ohly wrote:
> > On Mon, 2016-11-28 at 10:23 -0600, Jose Lamego wrote:
> More than 1 "In-Reply-To" and "References" message headers are in
> violation of rfc2822 [1] and may cause that some email-related
> applications do not point to the appropriate root message in a
> conversation/series.

Fixing that makes sense. Just add it as reason and the "why" part is
covered.

> > And I don't understand why this proposed change has the described
> > effect. Does changing the threading parameters change the output of "git
> > send-email" and thus indirectly the mail headers of the following
> > patches?

The "how" part still isn't clear to me. Perhaps I'm just dumb, but would
you bear with me and explain a bit more how changing the sending of the
cover letter affects sending of the patches?

As it isn't obvious, perhaps even add a comment to the script explaining
it.

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


[OE-core] [PATCH 2/2 V5] systemd: Upgrade to 232

2016-11-28 Thread Khem Raj
* Drop support for rcS.d SysV init scripts.
  These are prone to cause dependency loops, and almost all packages with
  rcS scripts now ship a native systemd service.

* Drop mount propagation patch, it only happens with libseccomp, OE doesnt
  enable it

* kdbus option has disappeared from configure

* Ignore dev-so for PN now since systemd introduced private .so see
  https://github.com/systemd/systemd/issues/3810

* Add libnss* to PACKAGES_DYNAMIC for libnss-resolve to work correctly

* Forward port systemd-boot patches to systemd-232

Signed-off-by: Khem Raj 
---
 ...pper-instead-of-looking-for-relative-opti.patch |  55 +++--
 meta/recipes-core/systemd/systemd.inc  |   4 +-
 c-Change-the-default-device-timeout-to-2.patch |   8 +-
 ...r-getty-to-agetty-in-console-setup-system.patch |  10 +-
 .../systemd/0003-define-exp10-if-missing.patch |  12 +-
 ...nv-when-secure-versions-are-not-available.patch |  21 ++--
 ...t-install-dependency-links-at-install-tim.patch |  10 +-
 ...heck-for-additional-features-that-uclibc-.patch |  10 +-
 ...pper-instead-of-looking-for-relative-opti.patch |  38 ++
 ...wn-Use-execvpe-only-when-libc-supports-it.patch |  16 +--
 ...-unimplemented-_SC_PHYS_PAGES-system-conf.patch |  27 +++--
 ...0010-implment-systemd-sysv-install-for-OE.patch |   6 +-
 ...nes-Build-conditionally-when-HAVE_MYHOSTN.patch |  12 +-
 .../systemd/0012-rules-whitelist-hd-devices.patch  |  21 ++--
 ...-Make-root-s-home-directory-configurable.patch} |  90 +-
 ...tor-add-support-for-executing-scripts-und.patch | 133 -
 ...vert-rules-remove-firmware-loading-rules.patch} |   6 +-
 ...remove-userspace-firmware-loading-suppor.patch} |  58 +
 ...0015-systemd-user-avoid-using-system-auth.patch |  35 --
 ...patch => 0016-make-test-dir-configurable.patch} |  21 ++--
 ...=> 0017-remove-duplicate-include-uchar.h.patch} |  10 +-
 ...h => 0018-check-for-uchar.h-in-configure.patch} |  16 ++-
 ...l-don-t-fail-if-libc-doesn-t-support-IDN.patch} |  20 ++--
 ...sing.h-for-getting-secure_getenv-definiti.patch |  27 -
 .../systemd/systemd/CVE-2016-7795.patch|  69 ---
 ...dev-re-enable-mount-propagation-for-udevd.patch |  31 -
 .../systemd/{systemd_230.bb => systemd_232.bb} |  24 ++--
 27 files changed, 213 insertions(+), 577 deletions(-)
 rename 
meta/recipes-core/systemd/systemd/{0014-Make-root-s-home-directory-configurable.patch
 => 0013-Make-root-s-home-directory-configurable.patch} (66%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch
 rename 
meta/recipes-core/systemd/systemd/{0016-Revert-rules-remove-firmware-loading-rules.patch
 => 0014-Revert-rules-remove-firmware-loading-rules.patch} (84%)
 rename 
meta/recipes-core/systemd/systemd/{0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
 => 0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch} (89%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
 rename 
meta/recipes-core/systemd/systemd/{0018-make-test-dir-configurable.patch => 
0016-make-test-dir-configurable.patch} (77%)
 rename 
meta/recipes-core/systemd/systemd/{0019-remove-duplicate-include-uchar.h.patch 
=> 0017-remove-duplicate-include-uchar.h.patch} (81%)
 rename 
meta/recipes-core/systemd/systemd/{0020-check-for-uchar.h-in-configure.patch => 
0018-check-for-uchar.h-in-configure.patch} (76%)
 rename 
meta/recipes-core/systemd/systemd/{0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
 => 0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch} (69%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/CVE-2016-7795.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch
 rename meta/recipes-core/systemd/{systemd_230.bb => systemd_232.bb} (96%)

diff --git 
a/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
 
b/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
index 103d286..bc92db7 100644
--- 
a/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ 
b/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -1,31 +1,22 @@
-From 9dcd2c80347493f73800d8c1cb539f1daef14394 Mon Sep 17 00:00:00 2001
-From: Jackie Huang 
-Date: Tue, 26 Jul 2016 03:54:42 -0400
-Subject: [PATCH] use lnr wrapper instead of looking for --relative option for 
ln
+From a3482c91642cf568b3ac27fa6c0cb3c6b30669b7 Mon Sep 17 00:00:00 2001
+From: Khem Raj 
+Date: Wed, 9 Nov 2016 19:32:14 -0800
+Subject: [PATCH 07/19] use lnr wrapper instead of looking 

Re: [OE-core] [PATCH V2] scripts.send-pull-request: Avoid multiple chain headers

2016-11-28 Thread Jose Lamego
Agree. Please provide feedback about below comments and I will submit a
v3 patch.

On 11/28/2016 01:47 PM, Patrick Ohly wrote:
> On Mon, 2016-11-28 at 10:23 -0600, Jose Lamego wrote:
More than 1 "In-Reply-To" and "References" message headers are in
violation of rfc2822 [1] and may cause that some email-related
applications do not point to the appropriate root message in a
conversation/series.

>> When creating a patch set with cover letter using the
>> send-pull-request script, both the "In-Reply-To" and "References"
>> headers are appended twice in patch 2 and subsequent.
> 
> The "why" part is missing in the commit header. "Why" is appending those
> twice a problem? Is it a bug in the script (because it violates some
> RFC) or is it merely a workaround for a problem in other software (mail
> programs or Patchwork)?
> 
> I know that this change is related to the issues that Patchwork has with
> identifying a patch series, but even with that background knowledge it
> is not clear why this fix is the right solution.
> 
This change appends only one header pointing to very first patch
in series (patch #1) or to cover letter if available, which results in an
appropriate message-chain.

[1] https://tools.ietf.org/html/rfc2822#section-3.6
>>
>> [YOCTO #10718]
>>
>> Signed-off-by: Jose Lamego 
>> ---
>>  scripts/send-pull-request | 2 +-
>>  1 file changed, 1 insertion(+), 1 deletion(-)
>>
>> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
>> index 575549d..a660c37 100755
>> --- a/scripts/send-pull-request
>> +++ b/scripts/send-pull-request
>> @@ -162,7 +162,7 @@ PATCHES=$(echo $PDIR/*.patch)
>>  if [ $AUTO_CL -eq 1 ]; then
>>  # Send the cover letter to every recipient, both specified as well as
>>  # harvested. Then remove it from the patches list.
>> -eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always 
>> --no-chain-reply-to --suppress-cc=all $CL"
>> +eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always 
>> --no-thread --suppress-cc=all $CL"
>>  if [ $? -eq 1 ]; then
>>  echo "ERROR: failed to send cover-letter with automatic 
>> recipients."
>>  exit 1
> 
> 
> And I don't understand why this proposed change has the described
> effect. Does changing the threading parameters change the output of "git
> send-email" and thus indirectly the mail headers of the following
> patches?
> 

-- 
Jose Lamego | OTC Embedded Platforms & Tools | GDC



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


[OE-core] [PATCH] qemu*.conf: Add slirp support for all qemu machines

2016-11-28 Thread Randy Witt
This patch also moves the "-net user" part out of the config and
into runqemu. This is done because the "-net user" portion isn't
machine specific, and it contains what ports to forward.

[ YOCTO #7887 ]

Signed-off-by: Randy Witt 
---
 meta/conf/machine/include/qemuboot-mips.inc | 1 +
 meta/conf/machine/include/qemuboot-x86.inc  | 2 +-
 meta/conf/machine/qemuarm.conf  | 1 +
 meta/conf/machine/qemuarm64.conf| 2 +-
 meta/conf/machine/qemuppc.conf  | 1 +
 scripts/runqemu | 7 ++-
 6 files changed, 11 insertions(+), 3 deletions(-)

diff --git a/meta/conf/machine/include/qemuboot-mips.inc 
b/meta/conf/machine/include/qemuboot-mips.inc
index 0c60cf2..c85dc86 100644
--- a/meta/conf/machine/include/qemuboot-mips.inc
+++ b/meta/conf/machine/include/qemuboot-mips.inc
@@ -6,3 +6,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyS0 console=tty"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-vga cirrus -show-cursor -usb -usbdevice tablet -device 
virtio-rng-pci"
 QB_SYSTEM_NAME = "qemu-system-${TUNE_ARCH}"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/meta/conf/machine/include/qemuboot-x86.inc 
b/meta/conf/machine/include/qemuboot-x86.inc
index 0870294..cc31dab 100644
--- a/meta/conf/machine/include/qemuboot-x86.inc
+++ b/meta/conf/machine/include/qemuboot-x86.inc
@@ -13,4 +13,4 @@ QB_AUDIO_OPT = "-soundhw ac97,es1370"
 QB_KERNEL_CMDLINE_APPEND = "vga=0 uvesafb.mode_option=640x480-32 
oprofile.timer=1 uvesafb.task_timeout=-1"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-vga vmware -show-cursor -usb -usbdevice tablet -device 
virtio-rng-pci"
-QB_SLIRP_OPT = "-net nic,model=e1000 -net user,hostfwd=tcp::-:22"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/meta/conf/machine/qemuarm.conf b/meta/conf/machine/qemuarm.conf
index 17402ef..974657b 100644
--- a/meta/conf/machine/qemuarm.conf
+++ b/meta/conf/machine/qemuarm.conf
@@ -18,3 +18,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,115200 
console=tty"
 QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
 PREFERRED_VERSION_linux-yocto ??= "4.8%"
 QB_DTB = "${@base_version_less_or_equal('PREFERRED_VERSION_linux-yocto', 
'4.7', '', 'zImage-versatile-pb.dtb', d)}"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/meta/conf/machine/qemuarm64.conf b/meta/conf/machine/qemuarm64.conf
index df2010c..ebd360e 100644
--- a/meta/conf/machine/qemuarm64.conf
+++ b/meta/conf/machine/qemuarm64.conf
@@ -18,7 +18,7 @@ QB_KERNEL_CMDLINE_APPEND = "console=ttyAMA0,38400"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-show-cursor -device virtio-rng-pci -monitor null"
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device 
virtio-net-device,netdev=net0,mac=@MAC@"
-QB_SLIRP_OPT = "-netdev user,id=net0 -device virtio-net-device,netdev=net0"
+QB_SLIRP_OPT = "-device virtio-net-device,netdev=net0"
 QB_ROOTFS_OPT = "-drive id=disk0,file=@ROOTFS@,if=none,format=raw -device 
virtio-blk-device,drive=disk0"
 QB_SERIAL_OPT = "-device virtio-serial-device -chardev null,id=virtcon -device 
virtconsole,chardev=virtcon"
 QB_TCPSERIAL_OPT = " -device virtio-serial-device -chardev 
socket,id=virtcon,port=@PORT@,host=127.0.0.1 -device 
virtconsole,chardev=virtcon"
diff --git a/meta/conf/machine/qemuppc.conf b/meta/conf/machine/qemuppc.conf
index 8703c20..4711751 100644
--- a/meta/conf/machine/qemuppc.conf
+++ b/meta/conf/machine/qemuppc.conf
@@ -19,3 +19,4 @@ QB_KERNEL_CMDLINE_APPEND = "console=tty console=ttyS0"
 # Add the 'virtio-rng-pci' device otherwise the guest may run out of entropy
 QB_OPT_APPEND = "-show-cursor -usb -usbdevice tablet -device virtio-rng-pci"
 QB_TAP_OPT = "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no -device 
virtio-net-pci,netdev=net0,mac=@MAC@"
+QB_SLIRP_OPT = "-device virtio-net-pci,netdev=net0"
diff --git a/scripts/runqemu b/scripts/runqemu
index af25423..faab522 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -730,7 +730,12 @@ class BaseConfig(object):
 if self.fstype == 'nfs':
 self.setup_nfs()
 self.kernel_cmdline_script += ' ip=dhcp'
-self.set('NETWORK_CMD', self.get('QB_SLIRP_OPT'))
+network_cmd = self.get('QB_SLIRP_OPT')
+
+# The network device created in qemuboot.conf is expected to be
+# id=net0
+network_cmd += ' -netdev user,id=net0,hostfwd=tcp::-:22'
+self.set('NETWORK_CMD', network_cmd)
 
 def setup_tap(self):
 """Setup tap"""
-- 
2.7.4

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


Re: [OE-core] [PATCH V2] scripts.send-pull-request: Avoid multiple chain headers

2016-11-28 Thread Patrick Ohly
On Mon, 2016-11-28 at 10:23 -0600, Jose Lamego wrote:
> When creating a patch set with cover letter using the
> send-pull-request script, both the "In-Reply-To" and "References"
> headers are appended twice in patch 2 and subsequent.

The "why" part is missing in the commit header. "Why" is appending those
twice a problem? Is it a bug in the script (because it violates some
RFC) or is it merely a workaround for a problem in other software (mail
programs or Patchwork)?

I know that this change is related to the issues that Patchwork has with
identifying a patch series, but even with that background knowledge it
is not clear why this fix is the right solution.

> This change appends only one header pointing to very first patch
> in series or to cover letter if available.
>
> [YOCTO #10718]
> 
> Signed-off-by: Jose Lamego 
> ---
>  scripts/send-pull-request | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/scripts/send-pull-request b/scripts/send-pull-request
> index 575549d..a660c37 100755
> --- a/scripts/send-pull-request
> +++ b/scripts/send-pull-request
> @@ -162,7 +162,7 @@ PATCHES=$(echo $PDIR/*.patch)
>  if [ $AUTO_CL -eq 1 ]; then
>   # Send the cover letter to every recipient, both specified as well as
>   # harvested. Then remove it from the patches list.
> - eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always 
> --no-chain-reply-to --suppress-cc=all $CL"
> + eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always 
> --no-thread --suppress-cc=all $CL"
>   if [ $? -eq 1 ]; then
>   echo "ERROR: failed to send cover-letter with automatic 
> recipients."
>   exit 1


And I don't understand why this proposed change has the described
effect. Does changing the threading parameters change the output of "git
send-email" and thus indirectly the mail headers of the following
patches?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] [PATCH V3 2/2] systemd: Upgrade to 232

2016-11-28 Thread Khem Raj
On Mon, Nov 28, 2016 at 2:12 AM, Burton, Ross  wrote:
> 0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch

I synced this patch with systemd-232 and sent out V4. I did bitbake systemd-boot
on turbot and it surprisingly build without seeing these patch
failures. I must have done something wrong.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH 2/2 V4] systemd: Upgrade to 232

2016-11-28 Thread Khem Raj
* Drop support for rcS.d SysV init scripts.
  These are prone to cause dependency loops, and almost all packages with
  rcS scripts now ship a native systemd service.

* Drop mount propagation patch, it only happens with libseccomp, OE doesnt
  enable it

* kdbus option has disappeared from configure

* Ignore dev-so for PN now since systemd introduced private .so see
  https://github.com/systemd/systemd/issues/3810

* Add libnss* to PACKAGES_DYNAMIC for libnss-resolve to work correctly

* Forward port systemd-boot patches to systemd-232

Signed-off-by: Khem Raj 
---
 ...pper-instead-of-looking-for-relative-opti.patch |  46 +++
 meta/recipes-core/systemd/systemd.inc  |   4 +-
 c-Change-the-default-device-timeout-to-2.patch |   8 +-
 ...r-getty-to-agetty-in-console-setup-system.patch |  10 +-
 .../systemd/0003-define-exp10-if-missing.patch |  12 +-
 ...nv-when-secure-versions-are-not-available.patch |  21 ++--
 ...t-install-dependency-links-at-install-tim.patch |  10 +-
 ...heck-for-additional-features-that-uclibc-.patch |  10 +-
 ...pper-instead-of-looking-for-relative-opti.patch |  38 ++
 ...wn-Use-execvpe-only-when-libc-supports-it.patch |  16 +--
 ...-unimplemented-_SC_PHYS_PAGES-system-conf.patch |  27 +++--
 ...0010-implment-systemd-sysv-install-for-OE.patch |   6 +-
 ...nes-Build-conditionally-when-HAVE_MYHOSTN.patch |  12 +-
 .../systemd/0012-rules-whitelist-hd-devices.patch  |  21 ++--
 ...-Make-root-s-home-directory-configurable.patch} |  90 +-
 ...tor-add-support-for-executing-scripts-und.patch | 133 -
 ...vert-rules-remove-firmware-loading-rules.patch} |   6 +-
 ...remove-userspace-firmware-loading-suppor.patch} |  58 +
 ...0015-systemd-user-avoid-using-system-auth.patch |  35 --
 ...patch => 0016-make-test-dir-configurable.patch} |  21 ++--
 ...=> 0017-remove-duplicate-include-uchar.h.patch} |  10 +-
 ...h => 0018-check-for-uchar.h-in-configure.patch} |  16 ++-
 ...l-don-t-fail-if-libc-doesn-t-support-IDN.patch} |  20 ++--
 ...sing.h-for-getting-secure_getenv-definiti.patch |  27 -
 .../systemd/systemd/CVE-2016-7795.patch|  69 ---
 ...dev-re-enable-mount-propagation-for-udevd.patch |  31 -
 .../systemd/{systemd_230.bb => systemd_232.bb} |  24 ++--
 27 files changed, 210 insertions(+), 571 deletions(-)
 rename 
meta/recipes-core/systemd/systemd/{0014-Make-root-s-home-directory-configurable.patch
 => 0013-Make-root-s-home-directory-configurable.patch} (66%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0013-sysv-generator-add-support-for-executing-scripts-und.patch
 rename 
meta/recipes-core/systemd/systemd/{0016-Revert-rules-remove-firmware-loading-rules.patch
 => 0014-Revert-rules-remove-firmware-loading-rules.patch} (84%)
 rename 
meta/recipes-core/systemd/systemd/{0017-Revert-udev-remove-userspace-firmware-loading-suppor.patch
 => 0015-Revert-udev-remove-userspace-firmware-loading-suppor.patch} (89%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0015-systemd-user-avoid-using-system-auth.patch
 rename 
meta/recipes-core/systemd/systemd/{0018-make-test-dir-configurable.patch => 
0016-make-test-dir-configurable.patch} (77%)
 rename 
meta/recipes-core/systemd/systemd/{0019-remove-duplicate-include-uchar.h.patch 
=> 0017-remove-duplicate-include-uchar.h.patch} (81%)
 rename 
meta/recipes-core/systemd/systemd/{0020-check-for-uchar.h-in-configure.patch => 
0018-check-for-uchar.h-in-configure.patch} (76%)
 rename 
meta/recipes-core/systemd/systemd/{0022-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch
 => 0019-socket-util-don-t-fail-if-libc-doesn-t-support-IDN.patch} (69%)
 delete mode 100644 
meta/recipes-core/systemd/systemd/0021-include-missing.h-for-getting-secure_getenv-definiti.patch
 delete mode 100644 meta/recipes-core/systemd/systemd/CVE-2016-7795.patch
 delete mode 100644 
meta/recipes-core/systemd/systemd/udev-re-enable-mount-propagation-for-udevd.patch
 rename meta/recipes-core/systemd/{systemd_230.bb => systemd_232.bb} (96%)

diff --git 
a/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
 
b/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
index 103d286..fad69a5 100644
--- 
a/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
+++ 
b/meta/recipes-bsp/systemd-boot/files/0001-use-lnr-wrapper-instead-of-looking-for-relative-opti.patch
@@ -1,31 +1,22 @@
-From 9dcd2c80347493f73800d8c1cb539f1daef14394 Mon Sep 17 00:00:00 2001
-From: Jackie Huang 
-Date: Tue, 26 Jul 2016 03:54:42 -0400
-Subject: [PATCH] use lnr wrapper instead of looking for --relative option for 
ln
+From a3482c91642cf568b3ac27fa6c0cb3c6b30669b7 Mon Sep 17 00:00:00 2001
+From: Khem Raj 
+Date: Wed, 9 Nov 2016 19:32:14 -0800
+Subject: [PATCH 07/19] use lnr wrapper instead of looking 

[OE-core] [PATCH] buildhistory-diff: report directory renames

2016-11-28 Thread Ed Bartosh
The script detects directory renaming if two different
directories with the same set of files are added and removed.

[YOCTO #10691]

Signed-off-by: Ed Bartosh 
---
 meta/lib/oe/buildhistory_analysis.py | 34 +++---
 1 file changed, 31 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oe/buildhistory_analysis.py 
b/meta/lib/oe/buildhistory_analysis.py
index b6c0265..19b3bc4 100644
--- a/meta/lib/oe/buildhistory_analysis.py
+++ b/meta/lib/oe/buildhistory_analysis.py
@@ -69,7 +69,22 @@ class ChangeRecord:
 pkglist.append(k)
 return pkglist
 
+def detect_renamed_dirs(aitems, bitems):
+adirs = set(map(os.path.dirname, aitems))
+bdirs = set(map(os.path.dirname, bitems))
+files_ab = [(name, sorted(os.path.basename(item) for item in 
aitems if os.path.dirname(item) == name)) \
+for name in adirs - bdirs]
+files_ba = [(name, sorted(os.path.basename(item) for item in 
bitems if os.path.dirname(item) == name)) \
+for name in bdirs - adirs]
+renamed_dirs = [(dir1, dir2) for dir1, files1 in files_ab for 
dir2, files2 in files_ba if files1 == files2]
+# remove files that belong to renamed dirs from aitems and bitems
+for dir1, dir2 in renamed_dirs:
+aitems = [item for item in aitems if os.path.dirname(item) not 
in (dir1, dir2)]
+bitems = [item for item in bitems if os.path.dirname(item) not 
in (dir1, dir2)]
+return renamed_dirs, aitems, bitems
+
 if self.fieldname in list_fields or self.fieldname in 
list_order_fields:
+renamed_dirs = []
 if self.fieldname in ['RPROVIDES', 'RDEPENDS', 'RRECOMMENDS', 
'RSUGGESTS', 'RREPLACES', 'RCONFLICTS']:
 (depvera, depverb) = compare_pkg_lists(self.oldvalue, 
self.newvalue)
 aitems = pkglist_combine(depvera)
@@ -77,16 +92,29 @@ class ChangeRecord:
 else:
 aitems = self.oldvalue.split()
 bitems = self.newvalue.split()
+if self.fieldname == 'FILELIST':
+renamed_dirs, aitems, bitems = detect_renamed_dirs(aitems, 
bitems)
+
 removed = list(set(aitems) - set(bitems))
 added = list(set(bitems) - set(aitems))
 
+lines = []
+if renamed_dirs:
+for dfrom, dto in renamed_dirs:
+lines.append('directory renamed %s -> %s' % (dfrom, dto))
 if removed or added:
 if removed and not bitems:
-out = '%s: removed all items "%s"' % (self.fieldname, ' 
'.join(removed))
+lines.append('removed all items "%s"' % ' '.join(removed))
 else:
-out = '%s:%s%s' % (self.fieldname, ' removed "%s"' % ' 
'.join(removed) if removed else '', ' added "%s"' % ' '.join(added) if added 
else '')
+if removed:
+lines.append('removed "%s"' % ' '.join(removed))
+if added:
+lines.append('added "%s"' % ' '.join(added))
 else:
-out = '%s changed order' % self.fieldname
+lines.append('changed order')
+
+out = '%s: %s' % (self.fieldname, ', '.join(lines))
+
 elif self.fieldname in numeric_fields:
 aval = int(self.oldvalue or 0)
 bval = int(self.newvalue or 0)
-- 
2.1.4

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


[OE-core] [PATCH V2] scripts.send-pull-request: Avoid multiple chain headers

2016-11-28 Thread Jose Lamego
When creating a patch set with cover letter using the
send-pull-request script, both the "In-Reply-To" and "References"
headers are appended twice in patch 2 and subsequent.

This change appends only one header pointing to very first patch
in series or to cover letter if available.

[YOCTO #10718]

Signed-off-by: Jose Lamego 
---
 scripts/send-pull-request | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/send-pull-request b/scripts/send-pull-request
index 575549d..a660c37 100755
--- a/scripts/send-pull-request
+++ b/scripts/send-pull-request
@@ -162,7 +162,7 @@ PATCHES=$(echo $PDIR/*.patch)
 if [ $AUTO_CL -eq 1 ]; then
# Send the cover letter to every recipient, both specified as well as
# harvested. Then remove it from the patches list.
-   eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always 
--no-chain-reply-to --suppress-cc=all $CL"
+   eval "git send-email $GIT_TO $GIT_CC $GIT_EXTRA_CC --confirm=always 
--no-thread --suppress-cc=all $CL"
if [ $? -eq 1 ]; then
echo "ERROR: failed to send cover-letter with automatic 
recipients."
exit 1
-- 
1.9.1

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


[OE-core] [PATCH v4] classes: Fix alternatives and rc.d ordering

2016-11-28 Thread David Vincent

Changes since v3:
* Count the number of lines produced by update-alternatives to detect if
  lines were inserted. Failing to do so introduced bugs in native
  packages (e.g. binutils-cross-canadian-arm)
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH] classes: Fix alternatives and rc.d ordering

2016-11-28 Thread David Vincent
When using an alternative as an initscript, the ordering between
update-rc.d and update-alternatives tasks during prerm and postinst
tasks must always be the following in order to work:
  * prerm:
- stop daemon
- remove alternative

  * postinst:
- add alternative
- start daemon

This patchset adds comments to the scripts generated by both classes and
organize the generated sections based on those comments.

[YOCTO #10433]

Signed-off-by: David Vincent 
---
 meta/classes/update-alternatives.bbclass | 29 ++---
 meta/classes/update-rc.d.bbclass | 20 ++--
 2 files changed, 40 insertions(+), 9 deletions(-)

diff --git a/meta/classes/update-alternatives.bbclass 
b/meta/classes/update-alternatives.bbclass
index 1fdd681..65929e5 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -195,8 +195,8 @@ python populate_packages_updatealternatives () {
 pkgdest = d.getVar('PKGD', True)
 for pkg in (d.getVar('PACKAGES', True) or "").split():
 # Create post install/removal scripts
-alt_setup_links = ""
-alt_remove_links = ""
+alt_setup_links = "# Begin section update-alternatives\n"
+alt_remove_links = "# Begin section update-alternatives\n"
 for alt_name in (d.getVar('ALTERNATIVE_%s' % pkg, True) or "").split():
 alt_link = d.getVarFlag('ALTERNATIVE_LINK_NAME', alt_name, 
True)
 alt_target   = d.getVarFlag('ALTERNATIVE_TARGET_%s' % pkg, 
alt_name, True) or d.getVarFlag('ALTERNATIVE_TARGET', alt_name, True)
@@ -219,10 +219,13 @@ python populate_packages_updatealternatives () {
 # Default to generate shell script.. eventually we may want to 
change this...
 alt_target = os.path.normpath(alt_target)
 
-alt_setup_links  += '\tupdate-alternatives --install %s %s %s 
%s\n' % (alt_link, alt_name, alt_target, alt_priority)
-alt_remove_links += '\tupdate-alternatives --remove  %s %s\n' % 
(alt_name, alt_target)
+alt_setup_links  += 'update-alternatives --install %s %s %s %s\n' 
% (alt_link, alt_name, alt_target, alt_priority)
+alt_remove_links += 'update-alternatives --remove  %s %s\n' % 
(alt_name, alt_target)
 
-if alt_setup_links:
+alt_setup_links += "# End section update-alternatives\n"
+alt_remove_links += "# End section update-alternatives\n"
+
+if len(alt_setup_links.splitlines()) > 2:
 # RDEPENDS setup
 provider = d.getVar('VIRTUAL-RUNTIME_update-alternatives', True)
 if provider:
@@ -232,12 +235,24 @@ python populate_packages_updatealternatives () {
 bb.note('adding update-alternatives calls to postinst/prerm for 
%s' % pkg)
 bb.note('%s' % alt_setup_links)
 postinst = d.getVar('pkg_postinst_%s' % pkg, True) or '#!/bin/sh\n'
-postinst += alt_setup_links
+postinst = postinst.splitlines(True)
+try:
+index = postinst.index('# Begin section update-rc.d\n')
+postinst.insert(index, alt_setup_links)
+except ValueError:
+postinst.append(alt_setup_links)
+postinst = ''.join(postinst)
 d.setVar('pkg_postinst_%s' % pkg, postinst)
 
 bb.note('%s' % alt_remove_links)
 prerm = d.getVar('pkg_prerm_%s' % pkg, True) or '#!/bin/sh\n'
-prerm += alt_remove_links
+prerm = prerm.splitlines(True)
+try:
+index = prerm.index('# End section update-rc.d\n')
+prerm.insert(index + 1, alt_remove_links)
+except ValueError:
+prerm.append(alt_remove_links)
+prerm = ''.join(prerm)
 d.setVar('pkg_prerm_%s' % pkg, prerm)
 }
 
diff --git a/meta/classes/update-rc.d.bbclass b/meta/classes/update-rc.d.bbclass
index 321924b..18df2dc 100644
--- a/meta/classes/update-rc.d.bbclass
+++ b/meta/classes/update-rc.d.bbclass
@@ -26,6 +26,7 @@ fi
 }
 
 updatercd_postinst() {
+# Begin section update-rc.d
 if type update-rc.d >/dev/null 2>/dev/null; then
if [ -n "$D" ]; then
OPT="-r $D"
@@ -34,12 +35,15 @@ if type update-rc.d >/dev/null 2>/dev/null; then
fi
update-rc.d $OPT ${INITSCRIPT_NAME} ${INITSCRIPT_PARAMS}
 fi
+# End section update-rc.d
 }
 
 updatercd_prerm() {
+# Begin section update-rc.d
 if [ -z "$D" -a -x "${INIT_D_DIR}/${INITSCRIPT_NAME}" ]; then
${INIT_D_DIR}/${INITSCRIPT_NAME} stop || :
 fi
+# End section update-rc.d
 }
 
 updatercd_postrm() {
@@ -102,13 +106,25 @@ python populate_packages_updatercd () {
 postinst = d.getVar('pkg_postinst_%s' % pkg, True)
 if not postinst:
 postinst = '#!/bin/sh\n'
-postinst += localdata.getVar('updatercd_postinst', True)
+postinst = postinst.splitlines(True)
+try:
+   

[OE-core] Yocto Project Status WW49

2016-11-28 Thread Jolley, Stephen K
Current Dev Position: YP 2.3 M1

Next Deadline: YP 2.3 M1 by Dec. 12, 2016


SWAT team rotation: Juro -> Anibal

https://wiki.yoctoproject.org/wiki/Yocto_Build_Failure_Swat_Team


Key Status/Updates:

*We are switching these reports to Monday instead of Friday, at least 
for the next month or so for various reasons.

*2.1.2 was released last week.

*We're now part way through M1 and are making good progress in a number 
of key areas.

*Mark Hatle has shared an interesting setup tool for 
managing/adding/removing layers. It requires use of a layer index to guide it 
but it may be a way forward for distros wanting to guide their users in setting 
up build environments. A number of projects are evaluating its usage. There is 
discussion about this on the architecture mailing list.

*The changes to the default expansion parameter of getVar/getVarFlag 
have merged. We are now in the process of removing the obsolete "True" 
parameters to clean up the codebase.

*Work on recipe specific sysroots now has a proof of concept and there 
will be discussion about this on the architecture mailing list.

*Rather than make uninative the default for OE-Core, we've agreed to 
enable the native compiler options globally which should allow eSDK to work 
with OE-Core.


Proposed upcoming dot releases:

YP 2.0.3 Release by Dec. 9, 2016

YP 2.2.1 Release by Jan. 20, 2017

YP 2.1.3 Release by May. 19, 2017


Key YP 2.3 Dates:

YP 2.3 M1 Cutoff is Dec. 12, 2016

YP 2.3 M1 Release is Dec. 23, 2016

YP 2.3 M2 Cutoff is Jan. 23, 2017

YP 2.3 M2 Release is Feb. 3, 2017

YP 2.3 M3 Cutoff is Feb 27, 2017

YP 2.3 M3 Release is Mar. 10, 2017

YP 2.3 M4 Cutoff is April 3, 2017

YP 2.3 M4 Release is April 28, 2017


Tracking Metrics:

WDD 2552 (last week 2514)

(https://wiki.yoctoproject.org/charts/combo.html)


Key Status Links for YP:

https://wiki.yoctoproject.org/wiki/Yocto_Project_v2.3_Status

https://wiki.yoctoproject.org/wiki/Yocto_2.3_Schedule

https://wiki.yoctoproject.org/wiki/Yocto_2.3_Features

[If anyone has suggestions for other information you'd like to see on this 
weekly status update, let us know!]

Thanks,

Stephen K. Jolley
Yocto Project Program Manager
INTEL, MS JF1-255, 2111 N.E. 25th Avenue, Hillsboro, OR 97124
*   Work Telephone:(503) 712-0534
*Cell:(208) 244-4460
* Email:stephen.k.jol...@intel.com

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


[OE-core] [PATCH 08/11] pybootchartgui: render disk space usage

2016-11-28 Thread Patrick Ohly
This adds a new, separate chart showing the amount of disk space used
over time for each volume monitored during the build. The hight of the
graph entries represents the delta between current usage and minimal
usage during the build.

That's more useful than showing just the current usage, because then a
graph showing changes in the order of MBs in a volume that is several
GB large would be just flat.

The legend shows the maximum of those deltas, i.e. maximum amount of
space needed for the build. Minor caveat: sampling of disk space usage
starts a bit later than the initial task, so the displayed value may
be slightly lower than the actual amount of space needed because
sampling does not record the actual initial state.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/draw.py| 62 
 scripts/pybootchartgui/pybootchartgui/parsing.py | 26 ++
 scripts/pybootchartgui/pybootchartgui/samples.py | 11 +
 3 files changed, 99 insertions(+)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py 
b/scripts/pybootchartgui/pybootchartgui/draw.py
index ec5dd33..f0143ad 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -133,6 +133,16 @@ TASK_COLOR_PACKAGE = (0.0, 1.00, 1.00, 1.0)
 # Package Write RPM/DEB/IPK task color
 TASK_COLOR_PACKAGE_WRITE = (0.0, 0.50, 0.50, 1.0)
 
+# Distinct colors used for different disk volumnes.
+# If we have more volumns, colors get re-used.
+VOLUME_COLORS = [
+   (1.0, 1.0, 0.00, 1.0),
+   (0.0, 1.00, 0.00, 1.0),
+   (1.0, 0.00, 1.00, 1.0),
+   (0.0, 0.00, 1.00, 1.0),
+   (0.0, 1.00, 1.00, 1.0),
+]
+
 # Process states
 STATE_UNDEFINED = 0
 STATE_RUNNING   = 1
@@ -397,6 +407,58 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, 
sec_w):
 
curr_y = curr_y + 30 + bar_h
 
+   # render disk space usage
+   #
+   # Draws the amount of disk space used on each volume relative to the
+   # lowest recorded amount. The graphs for each volume are stacked above
+   # each other so that total disk usage is visible.
+   if trace.monitor_disk:
+   ctx.set_font_size(LEGEND_FONT_SIZE)
+   # Determine set of volumes for which we have
+   # information and the minimal amount of used disk
+   # space for each. Currently samples are allowed to
+   # not have a values for all volumes; drawing could be
+   # made more efficient if that wasn't the case.
+   volumes = set()
+   min_used = {}
+   for sample in trace.monitor_disk:
+   for volume, used in sample.records.items():
+   volumes.add(volume)
+   if volume not in min_used or min_used[volume] > 
used:
+   min_used[volume] = used
+   volumes = sorted(list(volumes))
+   disk_scale = 0
+   for i, volume in enumerate(volumes):
+   volume_scale = max([sample.records[volume] - 
min_used[volume]
+   for sample in trace.monitor_disk
+   if volume in sample.records])
+   # Does not take length of volume name into account, but 
fixed offset
+   # works okay in practice.
+   draw_legend_box(ctx, '%s (max: %u MiB)' % (volume, 
volume_scale / 1024 / 1024),
+   VOLUME_COLORS[i % len(VOLUME_COLORS)],
+   off_x + i * 250, curr_y+20, leg_s)
+   disk_scale += volume_scale
+
+   # render used amount of disk space
+   chart_rect = (off_x, curr_y+30, w, bar_h)
+   if clip_visible (clip, chart_rect):
+   draw_box_ticks (ctx, chart_rect, sec_w)
+   draw_annotations (ctx, proc_tree, trace.times, 
chart_rect)
+   for i in range(len(volumes), 0, -1):
+   draw_chart (ctx, VOLUME_COLORS[(i - 1) % 
len(VOLUME_COLORS)], True, chart_rect, \
+   [(sample.time,
+ # Sum up used space of all 
volumes including the current one
+ # so that the graphs appear as 
stacked on top of each other.
+ reduce(lambda x,y: x+y,
+[sample.records[volume] - 
min_used[volume]
+ for volume in volumes[0:i]
+ if volume in 
sample.records],
+0))
+for sample 

[OE-core] [PATCH 07/11] pybootchartgui/parsing.py: fix error handling in meminfo parser

2016-11-28 Thread Patrick Ohly
When matching fails, m.group(0) is invalid and can't be used in the
error message.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py 
b/scripts/pybootchartgui/pybootchartgui/parsing.py
index af68435..48eb048 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -498,7 +498,7 @@ def _parse_proc_meminfo_log(file):
 for line in lines:
 match = meminfo_re.match(line)
 if not match:
-raise ParseError("Invalid meminfo line \"%s\"" % 
match.groups(0))
+raise ParseError("Invalid meminfo line \"%s\"" % line)
 sample.add_value(match.group(1), int(match.group(2)))
 
 if sample.valid():
-- 
2.1.4

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


[OE-core] [PATCH 10/11] buildstats: reduce amount of data stored for system utilization

2016-11-28 Thread Patrick Ohly
Pre-processing /proc data during the build considerably reduces the
amount of data written to disk: 176KB instead of 4.7MB for a 20
minuted build. Parsing also becomes faster.

The disk monitor log added another 16KB in that example build. The
overall buildstat was 20MB, so the overhead for monitoring system
utilization is small enough that it can be enabled by default.

Signed-off-by: Patrick Ohly 
---
 meta/lib/buildstats.py | 114 -
 1 file changed, 104 insertions(+), 10 deletions(-)

diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 2499fb1..3cd333c 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -3,6 +3,7 @@
 # like open log files and the time of the last sampling.
 
 import time
+import re
 import bb.event
 
 class SystemStats:
@@ -12,14 +13,18 @@ class SystemStats:
 bb.utils.mkdirhier(bsdir)
 
 self.proc_files = []
-for filename in ('diskstats', 'meminfo', 'stat'):
+for filename, handler in (
+('diskstats', self._reduce_diskstats),
+('meminfo', self._reduce_meminfo),
+('stat', self._reduce_stat),
+):
 # In practice, this class gets instantiated only once in
 # the bitbake cooker process.  Therefore 'append' mode is
 # not strictly necessary, but using it makes the class
 # more robust should two processes ever write
 # concurrently.
-self.proc_files.append((filename,
-open(os.path.join(bsdir, 'proc_%s.log' % 
filename), 'ab')))
+destfile = os.path.join(bsdir, '%sproc_%s.log' % ('reduced_' if 
handler else '', filename))
+self.proc_files.append((filename, open(destfile, 'ab'), handler))
 self.monitor_disk = open(os.path.join(bsdir, 'monitor_disk.log'), 'ab')
 # Last time that we sampled /proc data resp. recorded disk monitoring 
data.
 self.last_proc = 0
@@ -30,18 +35,107 @@ class SystemStats:
 # depends on the heartbeat event, which fires less often.
 self.min_seconds = 1
 
+self.meminfo_regex = 
re.compile(b'^(MemTotal|MemFree|Buffers|Cached|SwapTotal|SwapFree):\s*(\d+)')
+self.diskstats_regex = 
re.compile(b'^([hsv]d.|mtdblock\d|mmcblk\d|cciss/c\d+d\d+.*)$')
+self.diskstats_ltime = None
+self.diskstats_data = None
+self.stat_ltimes = None
+
+def _reduce_meminfo(self, time, data):
+"""
+Extracts 'MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 
'SwapFree'
+and writes their values into a single line, in that order.
+"""
+values = {}
+for line in data.split(b'\n'):
+m = self.meminfo_regex.match(line)
+if m:
+values[m.group(1)] = m.group(2)
+if len(values) == 6:
+return (time,
+b' '.join([values[x] for x in
+   (b'MemTotal', b'MemFree', b'Buffers', 
b'Cached', b'SwapTotal', b'SwapFree')]) + b'\n')
+
+def _diskstats_is_relevant_line(self, linetokens):
+if len(linetokens) != 14:
+return False
+disk = linetokens[2]
+return self.diskstats_regex.match(disk)
+
+def _reduce_diskstats(self, time, data):
+relevant_tokens = filter(self._diskstats_is_relevant_line, map(lambda 
x: x.split(), data.split(b'\n')))
+diskdata = [0] * 3
+reduced = None
+for tokens in relevant_tokens:
+# rsect
+diskdata[0] += int(tokens[5])
+# wsect
+diskdata[1] += int(tokens[9])
+# use
+diskdata[2] += int(tokens[12])
+if self.diskstats_ltime:
+# We need to compute information about the time interval
+# since the last sampling and record the result as sample
+# for that point in the past.
+interval = time - self.diskstats_ltime
+if interval > 0:
+sums = [ a - b for a, b in zip(diskdata, self.diskstats_data) ]
+readTput = sums[0] / 2.0 * 100.0 / interval
+writeTput = sums[1] / 2.0 * 100.0 / interval
+util = float( sums[2] ) / 10 / interval
+util = max(0.0, min(1.0, util))
+reduced = (self.diskstats_ltime, (readTput, writeTput, util))
+
+self.diskstats_ltime = time
+self.diskstats_data = diskdata
+return reduced
+
+
+def _reduce_nop(self, time, data):
+return (time, data)
+
+def _reduce_stat(self, time, data):
+if not data:
+return None
+# CPU times {user, nice, system, idle, io_wait, irq, softirq} from 
first line
+tokens = data.split(b'\n', 1)[0].split()
+times = [ int(token) for token in tokens[1:] ]
+reduced = None
+if self.stat_ltimes:
+user = 

[OE-core] [PATCH 09/11] pybootchartgui: simplify drawing of memory usage

2016-11-28 Thread Patrick Ohly
The internal representation after parsing now matches exactly
what the drawing code needs, thus speeding up drawing a bit.
However, the main motivation is to store exactly that required
information in a more compact file.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/draw.py| 12 ++--
 scripts/pybootchartgui/pybootchartgui/parsing.py |  2 +-
 scripts/pybootchartgui/pybootchartgui/samples.py | 16 
 3 files changed, 23 insertions(+), 7 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py 
b/scripts/pybootchartgui/pybootchartgui/draw.py
index f0143ad..201ce45 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -463,25 +463,25 @@ def render_charts(ctx, options, clip, trace, curr_y, w, 
h, sec_w):
chart_rect = (off_x, curr_y+30, w, meminfo_bar_h)
mem_stats = trace.mem_stats
if mem_stats and clip_visible (clip, chart_rect):
-   mem_scale = max(sample.records['MemTotal'] - 
sample.records['MemFree'] for sample in mem_stats)
+   mem_scale = max(sample.buffers for sample in mem_stats)
draw_legend_box(ctx, "Mem cached (scale: %u MiB)" % 
(float(mem_scale) / 1024), MEM_CACHED_COLOR, off_x, curr_y+20, leg_s)
draw_legend_box(ctx, "Used", MEM_USED_COLOR, off_x + 240, 
curr_y+20, leg_s)
draw_legend_box(ctx, "Buffers", MEM_BUFFERS_COLOR, off_x + 360, 
curr_y+20, leg_s)
-   draw_legend_line(ctx, "Swap (scale: %u MiB)" % 
max([(sample.records['SwapTotal'] - sample.records['SwapFree'])/1024 for sample 
in mem_stats]), \
+   draw_legend_line(ctx, "Swap (scale: %u MiB)" % 
max([(sample.swap)/1024 for sample in mem_stats]), \
 MEM_SWAP_COLOR, off_x + 480, curr_y+20, leg_s)
draw_box_ticks(ctx, chart_rect, sec_w)
draw_annotations(ctx, proc_tree, trace.times, chart_rect)
draw_chart(ctx, MEM_BUFFERS_COLOR, True, chart_rect, \
-  [(sample.time, sample.records['MemTotal'] - 
sample.records['MemFree']) for sample in trace.mem_stats], \
+  [(sample.time, sample.buffers) for sample in 
trace.mem_stats], \
   proc_tree, [0, mem_scale])
draw_chart(ctx, MEM_USED_COLOR, True, chart_rect, \
-  [(sample.time, sample.records['MemTotal'] - 
sample.records['MemFree'] - sample.records['Buffers']) for sample in 
mem_stats], \
+  [(sample.time, sample.used) for sample in 
mem_stats], \
   proc_tree, [0, mem_scale])
draw_chart(ctx, MEM_CACHED_COLOR, True, chart_rect, \
-  [(sample.time, sample.records['Cached']) for sample 
in mem_stats], \
+  [(sample.time, sample.cached) for sample in 
mem_stats], \
   proc_tree, [0, mem_scale])
draw_chart(ctx, MEM_SWAP_COLOR, False, chart_rect, \
-  [(sample.time, float(sample.records['SwapTotal'] - 
sample.records['SwapFree'])) for sample in mem_stats], \
+  [(sample.time, float(sample.swap)) for sample in 
mem_stats], \
   proc_tree, None)
 
curr_y = curr_y + meminfo_bar_h
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py 
b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 301145a..1c8d8ef 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -503,7 +503,7 @@ def _parse_proc_meminfo_log(file):
 sample.add_value(match.group(1), int(match.group(2)))
 
 if sample.valid():
-mem_stats.append(sample)
+mem_stats.append(DrawMemSample(sample))
 
 return mem_stats
 
diff --git a/scripts/pybootchartgui/pybootchartgui/samples.py 
b/scripts/pybootchartgui/pybootchartgui/samples.py
index bedca41..9fc309b 100644
--- a/scripts/pybootchartgui/pybootchartgui/samples.py
+++ b/scripts/pybootchartgui/pybootchartgui/samples.py
@@ -53,6 +53,22 @@ class MemSample:
 # discard incomplete samples
 return [v for v in MemSample.used_values if v not in keys] == []
 
+class DrawMemSample:
+"""
+Condensed version of a MemSample with exactly the values used by the 
drawing code.
+Initialized either from a valid MemSample or
+a tuple/list of buffer/used/cached/swap values.
+"""
+def __init__(self, mem_sample):
+self.time = mem_sample.time
+if isinstance(mem_sample, MemSample):
+self.buffers = mem_sample.records['MemTotal'] - 
mem_sample.records['MemFree']
+self.used = mem_sample.records['MemTotal'] - 
mem_sample.records['MemFree'] - mem_sample.records['Buffers']
+self.cached = mem_sample.records['Cached']
+

[OE-core] [PATCH 11/11] pybootchartgui: support reading reduced /proc logs

2016-11-28 Thread Patrick Ohly
Pre-processing /proc data during the build considerably reduces the
amount of data written to disk: 176KB instead of 4.7MB for a 20
minuted build. Parsing also becomes faster.

buildstats.bbclass only writes the reduced logs now, but support for
the full /proc files is kept around as reference.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 31 
 1 file changed, 31 insertions(+)

diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py 
b/scripts/pybootchartgui/pybootchartgui/parsing.py
index 1c8d8ef..bcfb2da 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -442,6 +442,12 @@ def _parse_proc_stat_log(file):
 # skip the rest of statistics lines
 return samples
 
+def _parse_reduced_log(file, sample_class):
+samples = []
+for time, lines in _parse_timed_blocks(file):
+samples.append(sample_class(time, *[float(x) for x in 
lines[0].split()]))
+return samples
+
 def _parse_proc_disk_stat_log(file):
 """
 Parse file for disk stats, but only look at the whole device, eg. sda,
@@ -483,6 +489,25 @@ def _parse_proc_disk_stat_log(file):
 
 return disk_stats
 
+def _parse_reduced_proc_meminfo_log(file):
+"""
+Parse file for global memory statistics with
+'MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 'SwapFree' values
+(in that order) directly stored on one line.
+"""
+used_values = ('MemTotal', 'MemFree', 'Buffers', 'Cached', 'SwapTotal', 
'SwapFree',)
+
+mem_stats = []
+for time, lines in _parse_timed_blocks(file):
+sample = MemSample(time)
+for name, value in zip(used_values, lines[0].split()):
+sample.add_value(name, int(value))
+
+if sample.valid():
+mem_stats.append(DrawMemSample(sample))
+
+return mem_stats
+
 def _parse_proc_meminfo_log(file):
 """
 Parse file for global memory statistics.
@@ -702,10 +727,16 @@ def _do_parse(writer, state, filename, file):
 name = os.path.basename(filename)
 if name == "proc_diskstats.log":
 state.disk_stats = _parse_proc_disk_stat_log(file)
+elif name == "reduced_proc_diskstats.log":
+state.disk_stats = _parse_reduced_log(file, DiskSample)
 elif name == "proc_stat.log":
 state.cpu_stats = _parse_proc_stat_log(file)
+elif name == "reduced_proc_stat.log":
+state.cpu_stats = _parse_reduced_log(file, CPUSample)
 elif name == "proc_meminfo.log":
 state.mem_stats = _parse_proc_meminfo_log(file)
+elif name == "reduced_proc_meminfo.log":
+state.mem_stats = _parse_reduced_proc_meminfo_log(file)
 elif name == "cmdline2.log":
 state.cmdline = _parse_cmdline_log(writer, file)
 elif name == "monitor_disk.log":
-- 
2.1.4

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


[OE-core] [PATCH 06/11] buildstats: record disk space usage

2016-11-28 Thread Patrick Ohly
Hooks into the new monitordisk.py event and records the used space for
each volume. That is probably the only relevant value when it comes to
visualizing the build and recording more would only increase disk
usage.

Signed-off-by: Patrick Ohly 
---
 meta/classes/buildstats.bbclass |  4 ++--
 meta/lib/buildstats.py  | 22 +-
 2 files changed, 19 insertions(+), 7 deletions(-)

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 2abc1a7..113a246 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -199,8 +199,8 @@ python runqueue_stats () {
 system_stats = buildstats.get_system_stats(d, init=init)
 if system_stats:
 # Ensure that we sample at important events.
-system_stats.sample(force=isinstance(e, bb.event.BuildCompleted))
+system_stats.sample(e, force=isinstance(e, bb.event.BuildCompleted))
 }
 
 addhandler runqueue_stats
-runqueue_stats[eventmask] = "bb.runqueue.runQueueTaskStarted 
bb.event.HeartbeatEvent bb.event.BuildCompleted"
+runqueue_stats[eventmask] = "bb.runqueue.runQueueTaskStarted 
bb.event.HeartbeatEvent bb.event.BuildCompleted bb.event.MonitorDiskEvent"
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
index 1664c52..2499fb1 100644
--- a/meta/lib/buildstats.py
+++ b/meta/lib/buildstats.py
@@ -3,6 +3,7 @@
 # like open log files and the time of the last sampling.
 
 import time
+import bb.event
 
 class SystemStats:
 def __init__(self, d):
@@ -19,17 +20,19 @@ class SystemStats:
 # concurrently.
 self.proc_files.append((filename,
 open(os.path.join(bsdir, 'proc_%s.log' % 
filename), 'ab')))
-# Last time that we sampled data.
-self.last = 0
+self.monitor_disk = open(os.path.join(bsdir, 'monitor_disk.log'), 'ab')
+# Last time that we sampled /proc data resp. recorded disk monitoring 
data.
+self.last_proc = 0
+self.last_disk_monitor = 0
 # Minimum number of seconds between recording a sample. This
 # becames relevant when we get called very often while many
 # short tasks get started. Sampling during quiet periods
 # depends on the heartbeat event, which fires less often.
 self.min_seconds = 1
 
-def sample(self, force):
+def sample(self, event, force):
 now = time.time()
-if (now - self.last > self.min_seconds) or force:
+if (now - self.last_proc > self.min_seconds) or force:
 for filename, output in self.proc_files:
 with open(os.path.join('/proc', filename), 'rb') as input:
 data = input.read()
@@ -39,7 +42,16 @@ class SystemStats:
  ('%.0f\n' % now).encode('ascii') +
  data +
  b'\n')
-self.last = now
+self.last_proc = now
+
+if isinstance(event, bb.event.MonitorDiskEvent) and \
+   ((now - self.last_disk_monitor > self.min_seconds) or force):
+os.write(self.monitor_disk.fileno(),
+ ('%.0f\n' % now).encode('ascii') +
+ ''.join(['%s: %d\n' % (dev, sample.total_bytes - 
sample.free_bytes)
+  for dev, sample in 
event.disk_usage.items()]).encode('ascii') +
+ b'\n')
+self.last_disk_monitor = now
 
 _system_stats = None
 
-- 
2.1.4

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


[OE-core] [PATCH 04/11] pybootchartgui: show system utilization

2016-11-28 Thread Patrick Ohly
This enables rendering of the original bootchart charts for CPU, disk
and memory usage. It depends on the /proc samples recorded by the
updated buildstats.bbclass. Currently, empty charts CPU and disk usage
charts are drawn if that data is not present; the memory chart already
gets skipped when there's no data, which will also have to be added
for the other two.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/draw.py| 16 +--
 scripts/pybootchartgui/pybootchartgui/parsing.py | 61 +---
 2 files changed, 57 insertions(+), 20 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py 
b/scripts/pybootchartgui/pybootchartgui/draw.py
index 925002d..bddd804 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -321,6 +321,16 @@ def extents(options, xscale, trace):
w = int ((end - start) * sec_w_base * xscale) + 2 * off_x
h = proc_h * processes + header_h + 2 * off_y
 
+   if options.charts:
+   if trace.cpu_stats:
+   h += 30 + bar_h
+   if trace.disk_stats:
+   h += 30 + bar_h
+   if trace.monitor_disk:
+   h += 30 + bar_h
+   if trace.mem_stats:
+   h += meminfo_bar_h
+
return (w, h)
 
 def clip_visible(clip, rect):
@@ -496,6 +506,9 @@ def render(ctx, options, xscale, trace):
w -= 2*off_x
curr_y = off_y;
 
+   if options.charts:
+   curr_y = render_charts (ctx, options, clip, trace, curr_y, w, 
h, sec_w)
+
curr_y = render_processes_chart (ctx, options, trace, curr_y, w, h, 
sec_w)
 
return
@@ -513,9 +526,6 @@ def render(ctx, options, xscale, trace):
else:
curr_y = off_y;
 
-   if options.charts:
-   curr_y = render_charts (ctx, options, clip, trace, curr_y, w, 
h, sec_w)
-
# draw process boxes
proc_height = h
if proc_tree.taskstats and options.cumulative:
diff --git a/scripts/pybootchartgui/pybootchartgui/parsing.py 
b/scripts/pybootchartgui/pybootchartgui/parsing.py
index a3a0b0b..af68435 100644
--- a/scripts/pybootchartgui/pybootchartgui/parsing.py
+++ b/scripts/pybootchartgui/pybootchartgui/parsing.py
@@ -38,16 +38,17 @@ class Trace:
 self.min = None
 self.max = None
 self.headers = None
-self.disk_stats = None
+self.disk_stats =  []
 self.ps_stats = None
 self.taskstats = None
-self.cpu_stats = None
+self.cpu_stats = []
 self.cmdline = None
 self.kernel = None
 self.kernel_tree = None
 self.filename = None
 self.parent_map = None
-self.mem_stats = None
+self.mem_stats = []
+self.times = [] # Always empty, but expected by draw.py when drawing 
system charts.
 
 if len(paths):
 parse_paths (writer, self, paths)
@@ -58,6 +59,19 @@ class Trace:
 self.min = min(self.start.keys())
 self.max = max(self.end.keys())
 
+
+# Rendering system charts depends on start and end
+# time. Provide them where the original drawing code expects
+# them, i.e. in proc_tree.
+class BitbakeProcessTree:
+def __init__(self, start_time, end_time):
+self.start_time = start_time
+self.end_time = end_time
+self.duration = self.end_time - self.start_time
+self.proc_tree = BitbakeProcessTree(min(self.start.keys()),
+max(self.end.keys()))
+
+
 return
 
 # Turn that parsed information into something more useful
@@ -427,7 +441,7 @@ def _parse_proc_stat_log(file):
 # skip the rest of statistics lines
 return samples
 
-def _parse_proc_disk_stat_log(file, numCpu):
+def _parse_proc_disk_stat_log(file):
 """
 Parse file for disk stats, but only look at the whole device, eg. sda,
 not sda1, sda2 etc. The format of relevant lines should be:
@@ -462,7 +476,7 @@ def _parse_proc_disk_stat_log(file, numCpu):
 sums = [ a - b for a, b in zip(sample1.diskdata, sample2.diskdata) ]
 readTput = sums[0] / 2.0 * 100.0 / interval
 writeTput = sums[1] / 2.0 * 100.0 / interval
-util = float( sums[2] ) / 10 / interval / numCpu
+util = float( sums[2] ) / 10 / interval
 util = max(0.0, min(1.0, util))
 disk_stats.append(DiskSample(sample2.time, readTput, writeTput, util))
 
@@ -628,6 +642,20 @@ def _parse_cmdline_log(writer, file):
 cmdLines[pid] = values
 return cmdLines
 
+def _parse_bitbake_buildstats(writer, state, filename, file):
+paths = filename.split("/")
+task = paths[-1]
+pn = paths[-2]
+start = None
+end = None
+for line in file:
+if line.startswith("Started:"):
+

[OE-core] [PATCH 05/11] pybootchartgui/draw.py: skip empty CPU and disk usage charts

2016-11-28 Thread Patrick Ohly
The only real change is the addition of two if checks that skips the
corresponding drawing code when there is no data.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 98 ++-
 1 file changed, 50 insertions(+), 48 deletions(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py 
b/scripts/pybootchartgui/pybootchartgui/draw.py
index bddd804..ec5dd33 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -344,56 +344,58 @@ def render_charts(ctx, options, clip, trace, curr_y, w, 
h, sec_w):
proc_tree = options.proc_tree(trace)
 
# render bar legend
-   ctx.set_font_size(LEGEND_FONT_SIZE)
-
-   draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, curr_y+20, 
leg_s)
-   draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, curr_y+20, 
leg_s)
-
-   # render I/O wait
-   chart_rect = (off_x, curr_y+30, w, bar_h)
-   if clip_visible (clip, chart_rect):
-   draw_box_ticks (ctx, chart_rect, sec_w)
-   draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-   draw_chart (ctx, IO_COLOR, True, chart_rect, \
-   [(sample.time, sample.user + sample.sys + 
sample.io) for sample in trace.cpu_stats], \
-   proc_tree, None)
-   # render CPU load
-   draw_chart (ctx, CPU_COLOR, True, chart_rect, \
-   [(sample.time, sample.user + sample.sys) for sample 
in trace.cpu_stats], \
-   proc_tree, None)
-
-   curr_y = curr_y + 30 + bar_h
+   if trace.cpu_stats:
+   ctx.set_font_size(LEGEND_FONT_SIZE)
+
+   draw_legend_box(ctx, "CPU (user+sys)", CPU_COLOR, off_x, 
curr_y+20, leg_s)
+   draw_legend_box(ctx, "I/O (wait)", IO_COLOR, off_x + 120, 
curr_y+20, leg_s)
+
+   # render I/O wait
+   chart_rect = (off_x, curr_y+30, w, bar_h)
+   if clip_visible (clip, chart_rect):
+   draw_box_ticks (ctx, chart_rect, sec_w)
+   draw_annotations (ctx, proc_tree, trace.times, 
chart_rect)
+   draw_chart (ctx, IO_COLOR, True, chart_rect, \
+   [(sample.time, sample.user + sample.sys + 
sample.io) for sample in trace.cpu_stats], \
+   proc_tree, None)
+   # render CPU load
+   draw_chart (ctx, CPU_COLOR, True, chart_rect, \
+   [(sample.time, sample.user + sample.sys) 
for sample in trace.cpu_stats], \
+   proc_tree, None)
+
+   curr_y = curr_y + 30 + bar_h
 
# render second chart
-   draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, off_x, 
curr_y+20, leg_s)
-   draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, 
curr_y+20, leg_s)
-
-# render I/O utilization
-   chart_rect = (off_x, curr_y+30, w, bar_h)
-   if clip_visible (clip, chart_rect):
-   draw_box_ticks (ctx, chart_rect, sec_w)
-   draw_annotations (ctx, proc_tree, trace.times, chart_rect)
-   draw_chart (ctx, IO_COLOR, True, chart_rect, \
-   [(sample.time, sample.util) for sample in 
trace.disk_stats], \
-   proc_tree, None)
-
-   # render disk throughput
-   max_sample = max (trace.disk_stats, key = lambda s: s.tput)
-   if clip_visible (clip, chart_rect):
-   draw_chart (ctx, DISK_TPUT_COLOR, False, chart_rect, \
-   [(sample.time, sample.tput) for sample in 
trace.disk_stats], \
-   proc_tree, None)
-
-   pos_x = off_x + ((max_sample.time - proc_tree.start_time) * w / 
proc_tree.duration)
-
-   shift_x, shift_y = -20, 20
-   if (pos_x < off_x + 245):
-   shift_x, shift_y = 5, 40
-
-   label = "%dMB/s" % round ((max_sample.tput) / 1024.0)
-   draw_text (ctx, label, DISK_TPUT_COLOR, pos_x + shift_x, curr_y + 
shift_y)
-
-   curr_y = curr_y + 30 + bar_h
+   if trace.disk_stats:
+   draw_legend_line(ctx, "Disk throughput", DISK_TPUT_COLOR, 
off_x, curr_y+20, leg_s)
+   draw_legend_box(ctx, "Disk utilization", IO_COLOR, off_x + 120, 
curr_y+20, leg_s)
+
+   # render I/O utilization
+   chart_rect = (off_x, curr_y+30, w, bar_h)
+   if clip_visible (clip, chart_rect):
+   draw_box_ticks (ctx, chart_rect, sec_w)
+   draw_annotations (ctx, proc_tree, trace.times, 
chart_rect)
+   draw_chart (ctx, IO_COLOR, True, chart_rect, \
+   [(sample.time, sample.util) for sample in 
trace.disk_stats], \
+   

[OE-core] [PATCH 00/11] system statistics sampling

2016-11-28 Thread Patrick Ohly
These patches depend on the corresponding patches to bitbake.

buildstats.bbclass gets extended so that disk bandwidth and capacity,
CPU and memory usage get sampled at regular time intervals by
default. pybootchart had code for most of that data, which gets
restored and re-enabled. The disk capacity graph is new.

The original pybootchart just stored raw dumps of the special files
under /proc. bitbake builds run longer, so a more compact ("reduced")
format is used.

Logging disk capacity was mostly motivated by some work on enhancing
rm_work.bbclass behavior, but could also be useful for others ("how
much free space did my build need").

The following changes since commit 9f1fe76727e98e58fc9e46ea2b49cf5c0cb48e6c:

  libpcap: Fix build when PACKAGECONFIG ipv6 is not enable (2016-11-23 11:02:33 
+)

are available in the git repository at:

  git://github.com/pohly/openembedded-core buildstats
  https://github.com/pohly/openembedded-core/tree/buildstats

Patrick Ohly (11):
  buildstats: add system state sampling
  pybootchartgui/draw.py: allow moving process chart up and down
  pybootchartgui/draw.py: fix drawing of samples not starting at zero
  pybootchartgui: show system utilization
  pybootchartgui/draw.py: skip empty CPU and disk usage charts
  buildstats: record disk space usage
  pybootchartgui/parsing.py: fix error handling in meminfo parser
  pybootchartgui: render disk space usage
  pybootchartgui: simplify drawing of memory usage
  buildstats: reduce amount of data stored for system utilization
  pybootchartgui: support reading reduced /proc logs

 meta/classes/buildstats.bbclass  |  16 ++
 meta/lib/buildstats.py   | 156 ++
 scripts/pybootchartgui/pybootchartgui/draw.py| 192 ---
 scripts/pybootchartgui/pybootchartgui/parsing.py | 122 +++---
 scripts/pybootchartgui/pybootchartgui/samples.py |  27 
 5 files changed, 435 insertions(+), 78 deletions(-)
 create mode 100644 meta/lib/buildstats.py

-- 
2.1.4

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


[OE-core] [PATCH 03/11] pybootchartgui/draw.py: fix drawing of samples not starting at zero

2016-11-28 Thread Patrick Ohly
The code did not handle x scaling correctly when drawing starts at
some time larger than zero, i.e. it worked for normal bootchart data,
but not for the system statistics recorded by buildstats.bbclass.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py 
b/scripts/pybootchartgui/pybootchartgui/draw.py
index 2b5907b..925002d 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -256,7 +256,7 @@ def draw_chart(ctx, color, fill, chart_bounds, data, 
proc_tree, data_range):
# avoid divide by zero
if max_y == 0:
max_y = 1.0
-   xscale = float (chart_bounds[2]) / max_x
+   xscale = float (chart_bounds[2]) / (max_x - x_shift)
# If data_range is given, scale the chart so that the value range in
# data_range matches the chart bounds exactly.
# Otherwise, scale so that the actual data matches the chart bounds.
-- 
2.1.4

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


[OE-core] [PATCH 01/11] buildstats: add system state sampling

2016-11-28 Thread Patrick Ohly
/proc/[diskstats|meminfo|stat] get sampled and written to the same
proc_.log files as during normal bootchat logging. This will
allow rendering the CPU, disk and memory usage charts.

Right now sampling happens once a second, triggered by the heartbeat
event.That produces quite a bit of data for long builds, which will be
addressed in a separate commit by storing the data in a more compact
form.

Signed-off-by: Patrick Ohly 
---
 meta/classes/buildstats.bbclass | 16 +
 meta/lib/buildstats.py  | 50 +
 2 files changed, 66 insertions(+)
 create mode 100644 meta/lib/buildstats.py

diff --git a/meta/classes/buildstats.bbclass b/meta/classes/buildstats.bbclass
index 57ecc8f..2abc1a7 100644
--- a/meta/classes/buildstats.bbclass
+++ b/meta/classes/buildstats.bbclass
@@ -188,3 +188,19 @@ python run_buildstats () {
 addhandler run_buildstats
 run_buildstats[eventmask] = "bb.event.BuildStarted bb.event.BuildCompleted 
bb.build.TaskStarted bb.build.TaskSucceeded bb.build.TaskFailed"
 
+python runqueue_stats () {
+import buildstats
+from bb import event, runqueue
+# We should not record any samples before the first task has started,
+# because that's the first activity shown in the process chart.
+# Besides, at that point we are sure that the build variables
+# are available that we need to find the output directory.
+init = isinstance(e, bb.runqueue.runQueueTaskStarted)
+system_stats = buildstats.get_system_stats(d, init=init)
+if system_stats:
+# Ensure that we sample at important events.
+system_stats.sample(force=isinstance(e, bb.event.BuildCompleted))
+}
+
+addhandler runqueue_stats
+runqueue_stats[eventmask] = "bb.runqueue.runQueueTaskStarted 
bb.event.HeartbeatEvent bb.event.BuildCompleted"
diff --git a/meta/lib/buildstats.py b/meta/lib/buildstats.py
new file mode 100644
index 000..1664c52
--- /dev/null
+++ b/meta/lib/buildstats.py
@@ -0,0 +1,50 @@
+# Implements system state sampling. Called by buildstats.bbclass.
+# Because it is a real Python module, it can hold persistent state,
+# like open log files and the time of the last sampling.
+
+import time
+
+class SystemStats:
+def __init__(self, d):
+bn = d.getVar('BUILDNAME', True)
+bsdir = os.path.join(d.getVar('BUILDSTATS_BASE', True), bn)
+bb.utils.mkdirhier(bsdir)
+
+self.proc_files = []
+for filename in ('diskstats', 'meminfo', 'stat'):
+# In practice, this class gets instantiated only once in
+# the bitbake cooker process.  Therefore 'append' mode is
+# not strictly necessary, but using it makes the class
+# more robust should two processes ever write
+# concurrently.
+self.proc_files.append((filename,
+open(os.path.join(bsdir, 'proc_%s.log' % 
filename), 'ab')))
+# Last time that we sampled data.
+self.last = 0
+# Minimum number of seconds between recording a sample. This
+# becames relevant when we get called very often while many
+# short tasks get started. Sampling during quiet periods
+# depends on the heartbeat event, which fires less often.
+self.min_seconds = 1
+
+def sample(self, force):
+now = time.time()
+if (now - self.last > self.min_seconds) or force:
+for filename, output in self.proc_files:
+with open(os.path.join('/proc', filename), 'rb') as input:
+data = input.read()
+# Unbuffered raw write, less overhead and useful
+# in case that we end up with concurrent writes.
+os.write(output.fileno(),
+ ('%.0f\n' % now).encode('ascii') +
+ data +
+ b'\n')
+self.last = now
+
+_system_stats = None
+
+def get_system_stats(d, init):
+global _system_stats
+if not _system_stats and init:
+_system_stats = SystemStats(d)
+return _system_stats
-- 
2.1.4

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


[OE-core] [PATCH 02/11] pybootchartgui/draw.py: allow moving process chart up and down

2016-11-28 Thread Patrick Ohly
Substracting curr_y when determining the hight of the process chart is
wrong because the height is independent of the position where the
chart is about to be drawn. It happens to work at the moment because
curr_y is always 10 when render_processes_chart() gets called. But it
leads to a negative height when other charts are drawn above it, and
then the grid gets drawn on top of those other charts.

Substracting some constant is relevant because otherwise the box is
slightly larger than the process bars. Not sure exactly where that
comes from (text height?); leg_s seems a suitable constant and happens
to be 10, so everything still gets rendered exactly as before.

Signed-off-by: Patrick Ohly 
---
 scripts/pybootchartgui/pybootchartgui/draw.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/pybootchartgui/pybootchartgui/draw.py 
b/scripts/pybootchartgui/pybootchartgui/draw.py
index 8c574be..2b5907b 100644
--- a/scripts/pybootchartgui/pybootchartgui/draw.py
+++ b/scripts/pybootchartgui/pybootchartgui/draw.py
@@ -415,7 +415,7 @@ def render_charts(ctx, options, clip, trace, curr_y, w, h, 
sec_w):
return curr_y
 
 def render_processes_chart(ctx, options, trace, curr_y, w, h, sec_w):
-chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - 
(curr_y+header_h) + proc_h]
+chart_rect = [off_x, curr_y+header_h, w, h - 2 * off_y - header_h - 
leg_s + proc_h]
 
draw_legend_box (ctx, "Configure", \
 TASK_COLOR_CONFIGURE, off_x  , curr_y + 45, leg_s)
-- 
2.1.4

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


Re: [OE-core] ASSUME_PROVIDED versus SANITY_REQUIRED_UTILITIES versus "The Build Host Packages"

2016-11-28 Thread Burton, Ross
On 28 November 2016 at 13:17, Patrick Ohly  wrote:

> I recently ran into a third usage of "file-native": swupd-server links
> against libmagic from file and therefore has a DEPENDS = "file". But
> building swupd-server-native didn't actually build file because of
> ASSUME_PROVIDED and because I hadn't installed libmagic-dev on my build
> host, the build was failing.
>

For this case you can use file-replacement-native to get a full file-native
built.

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


Re: [OE-core] ASSUME_PROVIDED versus SANITY_REQUIRED_UTILITIES versus "The Build Host Packages"

2016-11-28 Thread Richard Purdie
On Mon, 2016-11-28 at 14:17 +0100, Patrick Ohly wrote:
> I recently ran into a third usage of "file-native": swupd-server
> links against libmagic from file and therefore has a DEPENDS =
> "file". But building swupd-server-native didn't actually build file
> because of ASSUME_PROVIDED and because I hadn't installed libmagic-
> dev on my build host, the build was failing.
> 
> Is there a way to declare that ASSUME_PROVIDED does not apply to this
> case? It sounds like there is a way (based on your comments about
> building file-native when building file and the libbz2-devel
> example), but it did not become clear to me how that works in
> practice.

If you look at the file recipe, you'll see:

DEPENDS = "zlib file-replacement-native"


> Or is it just a case of educating the developer that libmagic-dev
> needs to be installed on the build host in addition to the file
> command?

No, DEPENDS on file-replacement-native.

Cheers,

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


[OE-core] [PATCH 18/18] ffmpeg: update to 3.2.1

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-multimedia/ffmpeg/{ffmpeg_3.2.bb => ffmpeg_3.2.1.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-multimedia/ffmpeg/{ffmpeg_3.2.bb => ffmpeg_3.2.1.bb} (97%)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.1.bb
similarity index 97%
rename from meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.bb
rename to meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.1.bb
index 1091952..86279f2 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.1.bb
@@ -16,8 +16,8 @@ LIC_FILES_CHKSUM = 
"file://COPYING.GPLv2;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 SRC_URI = "https://www.ffmpeg.org/releases/${BP}.tar.xz \
file://mips64_cpu_detection.patch \
   "
-SRC_URI[md5sum] = "3c065fb5baae1aeb1494a09ac984b2de"
-SRC_URI[sha256sum] = 
"88f70c1b8cab108f494ecbab5ba302cdb35d59a84cea88008b5fe49be068d5da"
+SRC_URI[md5sum] = "10eaee7cca7d1e745eec6e4217772361"
+SRC_URI[sha256sum] = 
"1ecf93da5d601e6fb3096c65cbe33fdaf042d690a3c50c4efadb0a9b74f2badf"
 
 # Build fails when thumb is enabled: 
https://bugzilla.yoctoproject.org/show_bug.cgi?id=7717
 ARM_INSTRUCTION_SET = "arm"
-- 
2.10.2

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


[OE-core] [PATCH 15/18] rng-tools: use SOURCEFORGE_MIRROR in SRC_URI

2016-11-28 Thread Alexander Kanavin
This also fixes upstream version check.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/rng-tools/rng-tools_5.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/rng-tools/rng-tools_5.bb 
b/meta/recipes-support/rng-tools/rng-tools_5.bb
index 913a092..9329e8a 100644
--- a/meta/recipes-support/rng-tools/rng-tools_5.bb
+++ b/meta/recipes-support/rng-tools/rng-tools_5.bb
@@ -2,7 +2,7 @@ SUMMARY = "Random number generator daemon"
 LICENSE = "GPLv2"
 LIC_FILES_CHKSUM = "file://COPYING;md5=0b6f033afe6db235e559456585dc8cdc"
 
-SRC_URI = "http://heanet.dl.sourceforge.net/sourceforge/gkernel/${BP}.tar.gz \
+SRC_URI = "${SOURCEFORGE_MIRROR}/gkernel/${BP}.tar.gz \
file://0001-If-the-libc-is-lacking-argp-use-libargp.patch \
file://0002-Add-argument-to-control-the-libargp-dependency.patch \
file://underquote.patch \
-- 
2.10.2

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


[OE-core] [PATCH 17/18] epiphany: update to 3.22.3

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 .../recipes-gnome/epiphany/{epiphany_3.22.1.bb => epiphany_3.22.3.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-gnome/epiphany/{epiphany_3.22.1.bb => epiphany_3.22.3.bb} 
(82%)

diff --git a/meta/recipes-gnome/epiphany/epiphany_3.22.1.bb 
b/meta/recipes-gnome/epiphany/epiphany_3.22.3.bb
similarity index 82%
rename from meta/recipes-gnome/epiphany/epiphany_3.22.1.bb
rename to meta/recipes-gnome/epiphany/epiphany_3.22.3.bb
index 2a9d200..9803a16 100644
--- a/meta/recipes-gnome/epiphany/epiphany_3.22.1.bb
+++ b/meta/recipes-gnome/epiphany/epiphany_3.22.3.bb
@@ -9,8 +9,8 @@ inherit gnomebase gsettings distro_features_check 
upstream-version-is-even
 REQUIRED_DISTRO_FEATURES = "x11"
 
 SRC_URI += "file://0001-yelp.m4-drop-the-check-for-itstool.patch"
-SRC_URI[archive.md5sum] = "9b9b73601a32f5b11c02411952cec27a"
-SRC_URI[archive.sha256sum] = 
"aab162ede54d71e583e382ab5e3567f28d81e0cd42719a11cad8008b56c5cc0e"
+SRC_URI[archive.md5sum] = "bfb6347acb91163aec3883bb3397372f"
+SRC_URI[archive.sha256sum] = 
"a11fe3495009f776e354bcafac3ab8fc52788f5bdb9d5ee2c2f1f2f021fb49c2"
 
 EXTRA_OECONF += " --with-distributor-name=${DISTRO}"
 
-- 
2.10.2

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


[OE-core] [PATCH 16/18] webkitgtk: update to 2.14.2

2016-11-28 Thread Alexander Kanavin
From: Carlos Alberto Lopez Perez 

Signed-off-by: Carlos Alberto Lopez Perez 
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-sato/webkit/{webkitgtk_2.14.1.bb => webkitgtk_2.14.2.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-sato/webkit/{webkitgtk_2.14.1.bb => webkitgtk_2.14.2.bb} 
(97%)

diff --git a/meta/recipes-sato/webkit/webkitgtk_2.14.1.bb 
b/meta/recipes-sato/webkit/webkitgtk_2.14.2.bb
similarity index 97%
rename from meta/recipes-sato/webkit/webkitgtk_2.14.1.bb
rename to meta/recipes-sato/webkit/webkitgtk_2.14.2.bb
index 1f2166c..373df17 100644
--- a/meta/recipes-sato/webkit/webkitgtk_2.14.1.bb
+++ b/meta/recipes-sato/webkit/webkitgtk_2.14.2.bb
@@ -20,8 +20,8 @@ SRC_URI = 
"http://www.webkitgtk.org/releases/${BPN}-${PV}.tar.xz \

file://0001-Tweak-gtkdoc-settings-so-that-gtkdoc-generation-work.patch \
"
 
-SRC_URI[md5sum] = "8d6c60dc41604d3bbd43165a674c07e5"
-SRC_URI[sha256sum] = 
"2e2d76c328de65bed6e0e4f096b2720a366654b27fc1af0830ece90bc4b7ceb5"
+SRC_URI[md5sum] = "2fe3cadbc546d93ca68a13756c2be015"
+SRC_URI[sha256sum] = 
"2edbcbd5105046aea55af9671c4de8deedb5b0e3567c618034d440a760675556"
 
 inherit cmake pkgconfig gobject-introspection perlnative distro_features_check 
upstream-version-is-even gtk-doc
 
-- 
2.10.2

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


[OE-core] [PATCH 11/18] iso-codes: update to 3.71

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 .../iso-codes/{iso-codes_3.70.bb => iso-codes_3.71.bb}| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/iso-codes/{iso-codes_3.70.bb => iso-codes_3.71.bb} 
(76%)

diff --git a/meta/recipes-support/iso-codes/iso-codes_3.70.bb 
b/meta/recipes-support/iso-codes/iso-codes_3.71.bb
similarity index 76%
rename from meta/recipes-support/iso-codes/iso-codes_3.70.bb
rename to meta/recipes-support/iso-codes/iso-codes_3.71.bb
index 7edd8b7..6ff7e59 100644
--- a/meta/recipes-support/iso-codes/iso-codes_3.70.bb
+++ b/meta/recipes-support/iso-codes/iso-codes_3.71.bb
@@ -3,8 +3,8 @@ LICENSE = "LGPLv2.1"
 LIC_FILES_CHKSUM = "file://COPYING;md5=4fbd65380cdd255951079008b364516c"
 
 SRC_URI = 
"https://pkg-isocodes.alioth.debian.org/downloads/iso-codes-${PV}.tar.xz;
-SRC_URI[md5sum] = "c61f8f02eecf978d3710ff594e43ca7e"
-SRC_URI[sha256sum] = 
"41e2fbaec2ed57e767b94f175d0dcd31b627aeb23b75cd604605a6fb6109d61f"
+SRC_URI[md5sum] = "7401964329590ed5890006614b774651"
+SRC_URI[sha256sum] = 
"013df6ac35fb0b9e3244c6a4f13a1090d61cb4478f7cd468bbf46be983ba1f74"
 
 # inherit gettext cannot be used, because it adds gettext-native to 
BASEDEPENDS which
 # are inhibited by allarch
-- 
2.10.2

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


[OE-core] [PATCH 14/18] vala: update to 0.34.3

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-devtools/vala/{vala_0.34.2.bb => vala_0.34.3.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-devtools/vala/{vala_0.34.2.bb => vala_0.34.3.bb} (56%)

diff --git a/meta/recipes-devtools/vala/vala_0.34.2.bb 
b/meta/recipes-devtools/vala/vala_0.34.3.bb
similarity index 56%
rename from meta/recipes-devtools/vala/vala_0.34.2.bb
rename to meta/recipes-devtools/vala/vala_0.34.3.bb
index 8b77e57..a1c290a 100644
--- a/meta/recipes-devtools/vala/vala_0.34.2.bb
+++ b/meta/recipes-devtools/vala/vala_0.34.3.bb
@@ -4,5 +4,5 @@ SRC_URI += " 
file://0001-git-version-gen-don-t-append-dirty-if-we-re-not-in-g.pa
  file://0001-vapigen.m4-use-PKG_CONFIG_SYSROOT_DIR.patch \
 "
 
-SRC_URI[md5sum] = "f9b4a0a10b76b56b0b6e914c506a6828"
-SRC_URI[sha256sum] = 
"765e9c2b429a66db93247940f8588319b43f35c173d057bcae5717a97d765c41"
+SRC_URI[md5sum] = "71181dd25d06b0bedd378dc8fa7d6310"
+SRC_URI[sha256sum] = 
"f0fad71aca03cdeadf749ca47f56296a4ddd1a25f4e2f09f0ff9e1e3afbcac3f"
-- 
2.10.2

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


[OE-core] [PATCH 10/18] gobject-introspection: update to 1.50.0

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 ...ject-introspection_1.48.0.bb => gobject-introspection_1.50.0.bb} | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
 rename 
meta/recipes-gnome/gobject-introspection/{gobject-introspection_1.48.0.bb => 
gobject-introspection_1.50.0.bb} (97%)

diff --git 
a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb 
b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.50.0.bb
similarity index 97%
rename from 
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb
rename to 
meta/recipes-gnome/gobject-introspection/gobject-introspection_1.50.0.bb
index abaa485..b6d296a 100644
--- a/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.48.0.bb
+++ b/meta/recipes-gnome/gobject-introspection/gobject-introspection_1.50.0.bb
@@ -8,15 +8,15 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=90d577535a3898e1ae5dbf0ae3509a8c \
 
file://giscanner/sourcescanner.c;endline=22;md5=194d6e0c1d00662f32d030ce44de8d39
 \
 
file://girepository/giregisteredtypeinfo.c;endline=21;md5=661847611ae6979465415f31a759ba27"
 
-SRC_URI = "${GNOME_MIRROR}/${BPN}/1.48/${BPN}-${PV}.tar.xz \
+SRC_URI = "${GNOME_MIRROR}/${BPN}/1.50/${BPN}-${PV}.tar.xz \

file://0001-Revert-an-incomplete-upstream-attempt-at-cross-compi.patch \

file://0002-configure.ac-add-host-gi-gi-cross-wrapper-gi-ldd-wra.patch \
file://0003-giscanner-add-use-binary-wrapper-option.patch \
file://0004-giscanner-add-a-use-ldd-wrapper-option.patch \

file://0005-Prefix-pkg-config-paths-with-PKG_CONFIG_SYSROOT_DIR-.patch \
"
-SRC_URI[md5sum] = "01301fa9019667d48e927353e08bc218"
-SRC_URI[sha256sum] = 
"fa275aaccdbfc91ec0bc9a6fd0562051acdba731e7d584b64a277fec60e75877"
+SRC_URI[md5sum] = "5af8d724f25d0c9cfbe6df41b77e5dc0"
+SRC_URI[sha256sum] = 
"1c6597c666f543c70ef3d7c893ab052968afae620efdc080c36657f4226337c5"
 
 inherit autotools pkgconfig gtk-doc python3native qemu 
gobject-introspection-data upstream-version-is-even
 BBCLASSEXTEND = "native"
-- 
2.10.2

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


[OE-core] [PATCH 13/18] npth: update to 1.3

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/npth/{npth_1.2.bb => npth_1.3.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/npth/{npth_1.2.bb => npth_1.3.bb} (81%)

diff --git a/meta/recipes-support/npth/npth_1.2.bb 
b/meta/recipes-support/npth/npth_1.3.bb
similarity index 81%
rename from meta/recipes-support/npth/npth_1.2.bb
rename to meta/recipes-support/npth/npth_1.3.bb
index 66aa347..d4fc064 100644
--- a/meta/recipes-support/npth/npth_1.2.bb
+++ b/meta/recipes-support/npth/npth_1.3.bb
@@ -11,8 +11,8 @@ SRC_URI = "${GNUPG_MIRROR}/npth/npth-${PV}.tar.bz2 \
file://pkgconfig.patch \
   "
 
-SRC_URI[md5sum] = "226bac7374b9466c6ec26b1c34dab844"
-SRC_URI[sha256sum] = 
"6ddbdddb2cf49a4723f9d1ad6563c480d6760dcb63cb7726b8fc3bc2e1b6c08a"
+SRC_URI[md5sum] = "efe1524c53670b5755dc27893d2d68a0"
+SRC_URI[sha256sum] = 
"bca81940436aed0734eb8d0ff8b179e04cc8c087f5625204419f5f45d736a82a"
 
 BINCONFIG = "${bindir}/npth-config"
 
-- 
2.10.2

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


[OE-core] [PATCH 12/18] msmtp: update to 1.6.6

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-extended/msmtp/{msmtp_1.6.5.bb => msmtp_1.6.6.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/msmtp/{msmtp_1.6.5.bb => msmtp_1.6.6.bb} (86%)

diff --git a/meta/recipes-extended/msmtp/msmtp_1.6.5.bb 
b/meta/recipes-extended/msmtp/msmtp_1.6.6.bb
similarity index 86%
rename from meta/recipes-extended/msmtp/msmtp_1.6.5.bb
rename to meta/recipes-extended/msmtp/msmtp_1.6.6.bb
index d0c39eb..e172193 100644
--- a/meta/recipes-extended/msmtp/msmtp_1.6.5.bb
+++ b/meta/recipes-extended/msmtp/msmtp_1.6.6.bb
@@ -12,8 +12,8 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=d32239bcb673463ab874e80d47fae504"
 SRC_URI = 
"http://sourceforge.net/projects/msmtp/files/msmtp/${PV}/${BPN}-${PV}.tar.xz \
   "
 
-SRC_URI[md5sum] = "50a8c9bb72f8222779db6b4aae2965e0"
-SRC_URI[sha256sum] = 
"76a0d60693c7e65d0c7a12f01d300882d280b1e1be0202f54730ae44d44a5006"
+SRC_URI[md5sum] = "82b0520b57db4b2cf05333d11fb5974d"
+SRC_URI[sha256sum] = 
"da15db1f62bd0201fce5310adb89c86188be91cd745b7cb3b62b81a501e7fb5e"
 
 inherit gettext autotools update-alternatives pkgconfig
 
-- 
2.10.2

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


[OE-core] [PATCH 09/18] gnutls: update to 3.5.6

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/gnutls/{gnutls_3.5.5.bb => gnutls_3.5.6.bb} | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-support/gnutls/{gnutls_3.5.5.bb => gnutls_3.5.6.bb} (60%)

diff --git a/meta/recipes-support/gnutls/gnutls_3.5.5.bb 
b/meta/recipes-support/gnutls/gnutls_3.5.6.bb
similarity index 60%
rename from meta/recipes-support/gnutls/gnutls_3.5.5.bb
rename to meta/recipes-support/gnutls/gnutls_3.5.6.bb
index d255959..2e70734 100644
--- a/meta/recipes-support/gnutls/gnutls_3.5.5.bb
+++ b/meta/recipes-support/gnutls/gnutls_3.5.6.bb
@@ -4,6 +4,6 @@ SRC_URI += "file://correct_rpl_gettimeofday_signature.patch \
 file://0001-configure.ac-fix-sed-command.patch \
 file://use-pkg-config-to-locate-zlib.patch \
"
-SRC_URI[md5sum] = "fb84c4d7922c1545da8dda4dcb9487d4"
-SRC_URI[sha256sum] = 
"86994fe7804ee16d2811e366b9bf2f75304f8e470ae0e3716d60ffeedac0e529"
+SRC_URI[md5sum] = "7a38b23757aae009c3eb5bb12fb0afda"
+SRC_URI[sha256sum] = 
"6338b715bf31c758606ffa489c7f87ee1beab947114fbd2ffefd73170a8c6b9a"
 
-- 
2.10.2

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


[OE-core] [PATCH 08/18] upstream-version-is-even.bbclass: ensure that the full version is matched.

2016-11-28 Thread Alexander Kanavin
Previously 4.3.2.1 would match as 3.2.1.

Signed-off-by: Alexander Kanavin 
---
 meta/classes/upstream-version-is-even.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/upstream-version-is-even.bbclass 
b/meta/classes/upstream-version-is-even.bbclass
index 89556ed..99714cb 100644
--- a/meta/classes/upstream-version-is-even.bbclass
+++ b/meta/classes/upstream-version-is-even.bbclass
@@ -2,4 +2,4 @@
 # accepts even minor versions (i.e. 3.0.x, 3.2.x, 3.4.x, etc.)
 # This scheme is used by Gnome and a number of other projects
 # to signify stable releases vs development releases.
-UPSTREAM_CHECK_REGEX = "(?P\d+\.(\d*[02468])+(\.\d+)+)"
+UPSTREAM_CHECK_REGEX = "[^\d\.](?P\d+\.(\d*[02468])+(\.\d+)+)"
-- 
2.10.2

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


[OE-core] [PATCH 07/18] gnome-desktop3: update to 3.22.2

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 .../{gnome-desktop3_3.22.1.bb => gnome-desktop3_3.22.2.bb}| 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-gnome/gnome-desktop/{gnome-desktop3_3.22.1.bb => 
gnome-desktop3_3.22.2.bb} (83%)

diff --git a/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.1.bb 
b/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.2.bb
similarity index 83%
rename from meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.1.bb
rename to meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.2.bb
index 59b1c4f..8dfd782 100644
--- a/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.1.bb
+++ b/meta/recipes-gnome/gnome-desktop/gnome-desktop3_3.22.2.bb
@@ -7,8 +7,8 @@ LIC_FILES_CHKSUM = 
"file://COPYING;md5=b234ee4d69f5fce4486a80fdaf4a4263 \
 BPN = "gnome-desktop"
 
 inherit gnome pkgconfig upstream-version-is-even gobject-introspection
-SRC_URI[archive.md5sum] = "bc09d58d7870d6464f20803850cdb90f"
-SRC_URI[archive.sha256sum] = 
"6458add4fc3a81fbd9a63db90de22a1e3a62644c1bfd1aca042c43836195aab2"
+SRC_URI[archive.md5sum] = "3d7222d5305f3db022eca31d8108e02d"
+SRC_URI[archive.sha256sum] = 
"51d7ebf7a6c359be14c3dd7a022213e931484653815eb10b0131bef4c8979e1c"
 
 DEPENDS += "intltool-native gsettings-desktop-schemas gconf virtual/libx11 
gtk+3 glib-2.0 startup-notification xkeyboard-config iso-codes udev"
 
-- 
2.10.2

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


[OE-core] [PATCH 05/18] lighttpd: upgrade to 1.4.43

2016-11-28 Thread Alexander Kanavin
lighttpd no longer builds modules for which dependencies are not present,
so some previously available modules are no more.

Signed-off-by: Alexander Kanavin 
---
 .../lighttpd/{lighttpd_1.4.42.bb => lighttpd_1.4.43.bb}   | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
 rename meta/recipes-extended/lighttpd/{lighttpd_1.4.42.bb => 
lighttpd_1.4.43.bb} (94%)

diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.42.bb 
b/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
similarity index 94%
rename from meta/recipes-extended/lighttpd/lighttpd_1.4.42.bb
rename to meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
index 43856ca..322f212 100644
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.42.bb
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
@@ -23,8 +23,8 @@ SRC_URI = 
"http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.t
 file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch 
\
 "
 
-SRC_URI[md5sum] = "53c55d7e1dac7adec161cd5490491f6d"
-SRC_URI[sha256sum] = 
"b2c9069ed0bade9362c27b469a9b884641786aea1c3d686f9fd9f01d15e2a15f"
+SRC_URI[md5sum] = "95eda531c27b161ef8fa2b9bf4948caf"
+SRC_URI[sha256sum] = 
"fe0c4a06dd2408a83ee7a2bfedc45e09597f3313cbda82485507573ae8fa948a"
 
 PACKAGECONFIG ??= "openssl \
 ${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-- 
2.10.2

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


[OE-core] [PATCH 02/18] sysprof: update to 3.22.2

2016-11-28 Thread Alexander Kanavin
Drop 0001-Forward-port-mips-arm-memory-barrier-patches.patch; upstream
is using standard C11 facilities for this now.

Drop 0001-callgraph-Use-U64_TO_POINTER.patch; it has been merged upstream.

Signed-off-by: Alexander Kanavin 
---
 ...ward-port-mips-arm-memory-barrier-patches.patch | 38 --
 .../files/0001-callgraph-Use-U64_TO_POINTER.patch  | 29 -
 .../sysprof/{sysprof_git.bb => sysprof_3.22.2.bb}  | 12 ++-
 3 files changed, 3 insertions(+), 76 deletions(-)
 delete mode 100644 
meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
 delete mode 100644 
meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
 rename meta/recipes-kernel/sysprof/{sysprof_git.bb => sysprof_3.22.2.bb} (71%)

diff --git 
a/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
 
b/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
deleted file mode 100644
index 92e804f..000
--- 
a/meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From a2d385e504323641b1127821833c61e77301c90b Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen 
-Date: Sat, 11 Jun 2016 22:45:37 +0300
-Subject: [PATCH] Forward port mips & arm memory barrier patches
-
-Upstream-Status: Pending
-Signed-off-by: Jussi Kukkonen 

- lib/util/util.h | 15 +++
- 1 file changed, 15 insertions(+)
-
-diff --git a/lib/util/util.h b/lib/util/util.h
-index 591722d..0768056 100644
 a/lib/util/util.h
-+++ b/lib/util/util.h
-@@ -29,4 +29,19 @@
- #define read_barrier()   asm volatile("" ::: "memory")
- #endif
- 
-+#ifdef __arm__
-+/*
-+ * Use the __kuser_memory_barrier helper in the CPU helper page. See
-+ * arch/arm/kernel/entry-armv.S in the kernel source for details.
-+ */
-+#define read_barrier() ((void(*)(void))0x0fa0)()
-+#endif
-+
-+#ifdef __mips__
-+#define read_barrier() asm volatile(".set   mips2\n\t" \
-+"sync\n\t" \
-+".set   mips0" ::: "memory")
-+#endif
-+
-+
- #endif /* SP_UTIL_H */
--- 
-2.1.4
-
diff --git 
a/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch 
b/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
deleted file mode 100644
index ac1384c..000
--- a/meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From 05816e6f9cd65b2624bb04de65fdf61031c7017f Mon Sep 17 00:00:00 2001
-From: Jussi Kukkonen 
-Date: Fri, 10 Jun 2016 14:01:54 +0300
-Subject: [PATCH] callgraph: Use U64_TO_POINTER
-
-This fixes a "cast to pointer from integer of different size" on i586.
-
-Signed-off-by: Jussi Kukkonen 
-Upstream-Status: Pending

- lib/sp-callgraph-view.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lib/sp-callgraph-view.c b/lib/sp-callgraph-view.c
-index 02cc17b..58315b0 100644
 a/lib/sp-callgraph-view.c
-+++ b/lib/sp-callgraph-view.c
-@@ -135,7 +135,7 @@ build_functions_store (StackNode *node,
- 
-   gtk_list_store_append (state->store, );
-   gtk_list_store_set (state->store, ,
--  COLUMN_NAME, (const gchar *)node->data,
-+  COLUMN_NAME, U64_TO_POINTER(node->data),
-   COLUMN_SELF, 100.0 * size / state->profile_size,
-   COLUMN_TOTAL, 100.0 * total / state->profile_size,
-   COLUMN_POINTER, node,
--- 
-2.1.4
-
diff --git a/meta/recipes-kernel/sysprof/sysprof_git.bb 
b/meta/recipes-kernel/sysprof/sysprof_3.22.2.bb
similarity index 71%
rename from meta/recipes-kernel/sysprof/sysprof_git.bb
rename to meta/recipes-kernel/sysprof/sysprof_3.22.2.bb
index 8d8b626..a1ed7c8 100644
--- a/meta/recipes-kernel/sysprof/sysprof_git.bb
+++ b/meta/recipes-kernel/sysprof/sysprof_3.22.2.bb
@@ -7,20 +7,14 @@ inherit gnomebase gettext systemd
 
 DEPENDS = "glib-2.0"
 
-S = "${WORKDIR}/git"
-SRCREV = "9c6cec9b49766bf77c1713bc5a7c6d651e628068"
-PV = "3.20.0+git${SRCPV}"
-
-SRC_URI = "git://git.gnome.org/sysprof \
+SRC_URI += " \
file://define-NT_GNU_BUILD_ID.patch \
file://0001-configure-Add-option-to-enable-disable-polkit.patch \
file://0001-Disable-check-for-polkit-for-UI.patch \
file://0001-Avoid-building-docs.patch \
-   file://0001-callgraph-Use-U64_TO_POINTER.patch \
-   file://0001-Forward-port-mips-arm-memory-barrier-patches.patch \
   "
-SRC_URI[archive.md5sum] = "d56e8492033b60e247634731e7f760b9"
-SRC_URI[archive.sha256sum] = 
"4a338ad41bfffae87ef281f6e75c9660b3e0c6671bf5233be0c3f55a5e5b1ce5"
+SRC_URI[archive.md5sum] = "2634bf35f5592e5e4520ccaba87e909e"

[OE-core] [PATCH 06/18] cmake: update to 3.7.0

2016-11-28 Thread Alexander Kanavin
License is still 3-clause BSD.

Signed-off-by: Alexander Kanavin 
---
 .../cmake/{cmake-native_3.6.2.bb => cmake-native_3.7.0.bb}| 1 +
 meta/recipes-devtools/cmake/cmake.inc | 8 
 meta/recipes-devtools/cmake/{cmake_3.6.2.bb => cmake_3.7.0.bb}| 1 +
 3 files changed, 6 insertions(+), 4 deletions(-)
 rename meta/recipes-devtools/cmake/{cmake-native_3.6.2.bb => 
cmake-native_3.7.0.bb} (95%)
 rename meta/recipes-devtools/cmake/{cmake_3.6.2.bb => cmake_3.7.0.bb} (97%)

diff --git a/meta/recipes-devtools/cmake/cmake-native_3.6.2.bb 
b/meta/recipes-devtools/cmake/cmake-native_3.7.0.bb
similarity index 95%
rename from meta/recipes-devtools/cmake/cmake-native_3.6.2.bb
rename to meta/recipes-devtools/cmake/cmake-native_3.7.0.bb
index aec0d64..7ad4345 100644
--- a/meta/recipes-devtools/cmake/cmake-native_3.6.2.bb
+++ b/meta/recipes-devtools/cmake/cmake-native_3.7.0.bb
@@ -17,6 +17,7 @@ CMAKE_EXTRACONF = "\
 -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
 -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
 -DCMAKE_USE_SYSTEM_LIBRARY_LIBARCHIVE=0 \
+-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
 -DENABLE_ACL=0 -DHAVE_ACL_LIBACL_H=0 \
 -DHAVE_SYS_ACL_H=0 \
 "
diff --git a/meta/recipes-devtools/cmake/cmake.inc 
b/meta/recipes-devtools/cmake/cmake.inc
index fee511f..9ae2890 100644
--- a/meta/recipes-devtools/cmake/cmake.inc
+++ b/meta/recipes-devtools/cmake/cmake.inc
@@ -6,8 +6,8 @@ HOMEPAGE = "http://www.cmake.org/;
 BUGTRACKER = "http://public.kitware.com/Bug/my_view_page.php;
 SECTION = "console/utils"
 LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://Copyright.txt;md5=052f86c15bbde68af55c7f7b340ab639 \
-
file://Source/cmake.h;beginline=1;endline=10;md5=341736dae83c9e344b53eeb1bc7d7bc2"
+LIC_FILES_CHKSUM = "file://Copyright.txt;md5=7a64bc564202bf7401d9a8ef33c9564d \
+
file://Source/cmake.h;beginline=1;endline=3;md5=4494dee184212fc89c469c3acd555a14"
 
 CMAKE_MAJOR_VERSION = "${@'.'.join(d.getVar('PV', True).split('.')[0:2])}"
 
@@ -17,8 +17,8 @@ SRC_URI = 
"https://cmake.org/files/v${CMAKE_MAJOR_VERSION}/cmake-${PV}.tar.gz \
file://avoid-gcc-warnings-with-Wstrict-prototypes.patch \
"
 
-SRC_URI[md5sum] = "139d7affdd4e8ab1edfc9f4322d69e43"
-SRC_URI[sha256sum] = 
"189ae32a6ac398bb2f523ae77f70d463a6549926cde1544cd9cc7c6609f8b346"
+SRC_URI[md5sum] = "3801dc4e54c1c957a7378d8b0d4254ba"
+SRC_URI[sha256sum] = 
"ed63e05c41aeb6c036e503114ab15847f29c312f9f21f5f1a7060a4b4ec2fb31"
 
 UPSTREAM_CHECK_REGEX = "cmake-(?P\d+(\.\d+)+)\.tar"
 
diff --git a/meta/recipes-devtools/cmake/cmake_3.6.2.bb 
b/meta/recipes-devtools/cmake/cmake_3.7.0.bb
similarity index 97%
rename from meta/recipes-devtools/cmake/cmake_3.6.2.bb
rename to meta/recipes-devtools/cmake/cmake_3.7.0.bb
index 850d6de..58c6615 100644
--- a/meta/recipes-devtools/cmake/cmake_3.6.2.bb
+++ b/meta/recipes-devtools/cmake/cmake_3.7.0.bb
@@ -27,6 +27,7 @@ EXTRA_OECMAKE=" \
 -DCMAKE_DOC_DIR=${docdir_stripped}/cmake-${CMAKE_MAJOR_VERSION} \
 -DCMAKE_USE_SYSTEM_LIBRARIES=1 \
 -DCMAKE_USE_SYSTEM_LIBRARY_JSONCPP=0 \
+-DCMAKE_USE_SYSTEM_LIBRARY_LIBUV=0 \
 -DKWSYS_CHAR_IS_SIGNED=1 \
 -DBUILD_CursesDialog=0 \
 ${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 
'-DKWSYS_LFS_WORKS=1', '-DKWSYS_LFS_DISABLE=1', d)} \
-- 
2.10.2

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


[OE-core] [PATCH 00/18] Recipe version updates

2016-11-28 Thread Alexander Kanavin
Various stuff that has piled up over the past few weeks.
Epiphany update requires also webkitgtk update,
so that patch is included, just in case.

The following changes since commit 12a0ee049e453b6d0d2ce2f3fa981d1b6e02bd78:

  dev-manual: Added note about RPM not dealing with post-install (2016-11-23 
11:10:35 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib akanavin/package-version-updates
  
http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=akanavin/package-version-updates

Alexander Kanavin (17):
  icu: update to 58.1
  sysprof: update to 3.22.2
  btrfs-tools: update to 4.8.4
  ca-certificates: upgrade to 20161102
  lighttpd: upgrade to 1.4.43
  cmake: update to 3.7.0
  gnome-desktop3: update to 3.22.2
  upstream-version-is-even.bbclass: ensure that the full version is
matched.
  gnutls: update to 3.5.6
  gobject-introspection: update to 1.50.0
  iso-codes: update to 3.71
  msmtp: update to 1.6.6
  npth: update to 1.3
  vala: update to 0.34.3
  rng-tools: use SOURCEFORGE_MIRROR in SRC_URI
  epiphany: update to 3.22.3
  ffmpeg: update to 3.2.1

Carlos Alberto Lopez Perez (1):
  webkitgtk: update to 2.14.2

 meta/classes/upstream-version-is-even.bbclass  |  2 +-
 .../{btrfs-tools_4.8.2.bb => btrfs-tools_4.8.4.bb} |  2 +-
 ...cmake-native_3.6.2.bb => cmake-native_3.7.0.bb} |  1 +
 meta/recipes-devtools/cmake/cmake.inc  |  8 ++---
 .../cmake/{cmake_3.6.2.bb => cmake_3.7.0.bb}   |  1 +
 .../vala/{vala_0.34.2.bb => vala_0.34.3.bb}|  4 +--
 .../{lighttpd_1.4.42.bb => lighttpd_1.4.43.bb} |  4 +--
 .../msmtp/{msmtp_1.6.5.bb => msmtp_1.6.6.bb}   |  4 +--
 .../{epiphany_3.22.1.bb => epiphany_3.22.3.bb} |  4 +--
 ...desktop3_3.22.1.bb => gnome-desktop3_3.22.2.bb} |  4 +--
 ...n_1.48.0.bb => gobject-introspection_1.50.0.bb} |  6 ++--
 ...ward-port-mips-arm-memory-barrier-patches.patch | 38 --
 .../files/0001-callgraph-Use-U64_TO_POINTER.patch  | 29 -
 .../sysprof/{sysprof_git.bb => sysprof_3.22.2.bb}  | 12 ++-
 .../ffmpeg/{ffmpeg_3.2.bb => ffmpeg_3.2.1.bb}  |  4 +--
 .../{webkitgtk_2.14.1.bb => webkitgtk_2.14.2.bb}   |  4 +--
 ...tes_20160104.bb => ca-certificates_20161102.bb} |  2 +-
 .../gnutls/{gnutls_3.5.5.bb => gnutls_3.5.6.bb}|  4 +--
 meta/recipes-support/icu/icu.inc   | 12 +--
 .../icu/{icu_57.1.bb => icu_58.1.bb}   |  6 ++--
 .../{iso-codes_3.70.bb => iso-codes_3.71.bb}   |  4 +--
 .../npth/{npth_1.2.bb => npth_1.3.bb}  |  4 +--
 meta/recipes-support/rng-tools/rng-tools_5.bb  |  2 +-
 23 files changed, 48 insertions(+), 113 deletions(-)
 rename meta/recipes-devtools/btrfs-tools/{btrfs-tools_4.8.2.bb => 
btrfs-tools_4.8.4.bb} (95%)
 rename meta/recipes-devtools/cmake/{cmake-native_3.6.2.bb => 
cmake-native_3.7.0.bb} (95%)
 rename meta/recipes-devtools/cmake/{cmake_3.6.2.bb => cmake_3.7.0.bb} (97%)
 rename meta/recipes-devtools/vala/{vala_0.34.2.bb => vala_0.34.3.bb} (56%)
 rename meta/recipes-extended/lighttpd/{lighttpd_1.4.42.bb => 
lighttpd_1.4.43.bb} (94%)
 rename meta/recipes-extended/msmtp/{msmtp_1.6.5.bb => msmtp_1.6.6.bb} (86%)
 rename meta/recipes-gnome/epiphany/{epiphany_3.22.1.bb => epiphany_3.22.3.bb} 
(82%)
 rename meta/recipes-gnome/gnome-desktop/{gnome-desktop3_3.22.1.bb => 
gnome-desktop3_3.22.2.bb} (83%)
 rename 
meta/recipes-gnome/gobject-introspection/{gobject-introspection_1.48.0.bb => 
gobject-introspection_1.50.0.bb} (97%)
 delete mode 100644 
meta/recipes-kernel/sysprof/files/0001-Forward-port-mips-arm-memory-barrier-patches.patch
 delete mode 100644 
meta/recipes-kernel/sysprof/files/0001-callgraph-Use-U64_TO_POINTER.patch
 rename meta/recipes-kernel/sysprof/{sysprof_git.bb => sysprof_3.22.2.bb} (71%)
 rename meta/recipes-multimedia/ffmpeg/{ffmpeg_3.2.bb => ffmpeg_3.2.1.bb} (97%)
 rename meta/recipes-sato/webkit/{webkitgtk_2.14.1.bb => webkitgtk_2.14.2.bb} 
(97%)
 rename meta/recipes-support/ca-certificates/{ca-certificates_20160104.bb => 
ca-certificates_20161102.bb} (98%)
 rename meta/recipes-support/gnutls/{gnutls_3.5.5.bb => gnutls_3.5.6.bb} (60%)
 rename meta/recipes-support/icu/{icu_57.1.bb => icu_58.1.bb} (77%)
 rename meta/recipes-support/iso-codes/{iso-codes_3.70.bb => iso-codes_3.71.bb} 
(76%)
 rename meta/recipes-support/npth/{npth_1.2.bb => npth_1.3.bb} (81%)

-- 
2.10.2

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


[OE-core] [PATCH 03/18] btrfs-tools: update to 4.8.4

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 .../btrfs-tools/{btrfs-tools_4.8.2.bb => btrfs-tools_4.8.4.bb}  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-devtools/btrfs-tools/{btrfs-tools_4.8.2.bb => 
btrfs-tools_4.8.4.bb} (95%)

diff --git a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.2.bb 
b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.4.bb
similarity index 95%
rename from meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.2.bb
rename to meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.4.bb
index 818951c..a15fcf2 100644
--- a/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.2.bb
+++ b/meta/recipes-devtools/btrfs-tools/btrfs-tools_4.8.4.bb
@@ -13,7 +13,7 @@ SECTION = "base"
 DEPENDS = "util-linux attr e2fsprogs lzo acl udev"
 RDEPENDS_${PN} = "libgcc"
 
-SRCREV = "08d31c1c7ca5a6bb4e6485fa118c552c938e9efb"
+SRCREV = "3ae37eaad1f1ef3f46838da57d8616126fdaffd8"
 SRC_URI = "git://git.kernel.org/pub/scm/linux/kernel/git/kdave/btrfs-progs.git 
\
 "
 
-- 
2.10.2

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


[OE-core] [PATCH 01/18] icu: update to 58.1

2016-11-28 Thread Alexander Kanavin
The copyright for the software has been transferred to Unicode Inc from IBM,
but the terms are same.

libiculx and libicule are no longer produced as they depend on an external
package icu-le-hb (previous versions had an option of using an internal
implementation which now has been dropped). I have verified that icu
dependencies in oe-core and meta-oe still build.

Signed-off-by: Alexander Kanavin 
---
 meta/recipes-support/icu/icu.inc  | 12 +---
 meta/recipes-support/icu/{icu_57.1.bb => icu_58.1.bb} |  6 +++---
 2 files changed, 12 insertions(+), 6 deletions(-)
 rename meta/recipes-support/icu/{icu_57.1.bb => icu_58.1.bb} (77%)

diff --git a/meta/recipes-support/icu/icu.inc b/meta/recipes-support/icu/icu.inc
index cc6f222..f3dc1e0 100644
--- a/meta/recipes-support/icu/icu.inc
+++ b/meta/recipes-support/icu/icu.inc
@@ -26,6 +26,14 @@ EXTRA_OECONF = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 EXTRA_OECONF_class-native = ""
 EXTRA_OECONF_class-nativesdk = "--with-cross-build=${STAGING_ICU_DIR_NATIVE}"
 
+
+# strtod_l() is not supported by musl; also xlocale.h is missing
+# It is not possible to disable its use via configure switches or env vars
+# so monkey patching is needed.
+do_configure_prepend_libc-musl () {
+sed -i -e 's,DU_HAVE_STRTOD_L=1,DU_HAVE_STRTOD_L=0,' ${S}/configure.ac
+}
+
 PREPROCESS_RELOCATE_DIRS = "${datadir}/${BPN}/${PV}"
 do_install_append_class-native() {
mkdir -p ${D}/${STAGING_ICU_DIR_NATIVE}/config
@@ -36,15 +44,13 @@ do_install_append_class-native() {
cp -r ${B}/tools ${D}/${STAGING_ICU_DIR_NATIVE}
 }
 
-PACKAGES =+ "libicudata libicuuc libicui18n libicule libiculx libicutu 
libicuio"
+PACKAGES =+ "libicudata libicuuc libicui18n libicutu libicuio"
 
 FILES_${PN}-dev += "${libdir}/${BPN}/"
 
 FILES_libicudata = "${libdir}/libicudata.so.*"
 FILES_libicuuc = "${libdir}/libicuuc.so.*"
 FILES_libicui18n = "${libdir}/libicui18n.so.*"
-FILES_libicule = "${libdir}/libicule.so.*"
-FILES_libiculx = "${libdir}/libiculx.so.*"
 FILES_libicutu = "${libdir}/libicutu.so.*"
 FILES_libicuio = "${libdir}/libicuio.so.*"
 
diff --git a/meta/recipes-support/icu/icu_57.1.bb 
b/meta/recipes-support/icu/icu_58.1.bb
similarity index 77%
rename from meta/recipes-support/icu/icu_57.1.bb
rename to meta/recipes-support/icu/icu_58.1.bb
index 90c2b82..cc7c947 100644
--- a/meta/recipes-support/icu/icu_57.1.bb
+++ b/meta/recipes-support/icu/icu_58.1.bb
@@ -1,6 +1,6 @@
 require icu.inc
 
-LIC_FILES_CHKSUM = "file://../LICENSE;md5=787d3b37867445c1cdd6f6167bd0e347"
+LIC_FILES_CHKSUM = "file://../LICENSE;md5=1b3b75c1777cd49ad5c6a24cd338cfc9"
 
 def icu_download_version(d):
 pvsplit = d.getVar('PV', True).split('.')
@@ -21,8 +21,8 @@ SRC_URI = "${BASE_SRC_URI} \
 SRC_URI_append_class-target = "\
file://0001-Disable-LDFLAGSICUDT-for-Linux.patch \
   "
-SRC_URI[md5sum] = "976734806026a4ef8bdd17937c8898b9"
-SRC_URI[sha256sum] = 
"ff8c67cb65949b1e7808f2359f2b80f722697048e90e7cfc382ec1fe229e9581"
+SRC_URI[md5sum] = "1901302aaff1c1633ef81862663d2917"
+SRC_URI[sha256sum] = 
"0eb46ba3746a9c2092c8ad347a29b1a1b4941144772d13a88667a7b11ea30309"
 
 UPSTREAM_CHECK_REGEX = "(?P\d+(\.\d+)+)/"
 UPSTREAM_CHECK_URI = "http://download.icu-project.org/files/icu4c/;
-- 
2.10.2

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


[OE-core] [PATCH 04/18] ca-certificates: upgrade to 20161102

2016-11-28 Thread Alexander Kanavin
Signed-off-by: Alexander Kanavin 
---
 .../{ca-certificates_20160104.bb => ca-certificates_20161102.bb}| 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
 rename meta/recipes-support/ca-certificates/{ca-certificates_20160104.bb => 
ca-certificates_20161102.bb} (98%)

diff --git a/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb 
b/meta/recipes-support/ca-certificates/ca-certificates_20161102.bb
similarity index 98%
rename from meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
rename to meta/recipes-support/ca-certificates/ca-certificates_20161102.bb
index 1bea067..350b266 100644
--- a/meta/recipes-support/ca-certificates/ca-certificates_20160104.bb
+++ b/meta/recipes-support/ca-certificates/ca-certificates_20161102.bb
@@ -12,7 +12,7 @@ DEPENDS = "ca-certificates-native"
 DEPENDS_class-native = "openssl-native"
 DEPENDS_class-nativesdk = "ca-certificates-native openssl-native"
 
-SRCREV = "f54715702c5c0581c9461f78fd84e2c8d2ec243c"
+SRCREV = "c6a4c8182eda2527eecda90ba0aebc73d8c07d62"
 
 SRC_URI = "git://anonscm.debian.org/collab-maint/ca-certificates.git \
file://0002-update-ca-certificates-use-SYSROOT.patch \
-- 
2.10.2

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


Re: [OE-core] ASSUME_PROVIDED versus SANITY_REQUIRED_UTILITIES versus "The Build Host Packages"

2016-11-28 Thread Patrick Ohly
On Mon, 2016-11-28 at 12:04 +, Richard Purdie wrote:
> On Mon, 2016-11-28 at 06:20 -0500, Robert P. J. Day wrote:
> >   a bit confused by what i'm seeing in a recent
> > qemuppc/core-image-minimal build on my fedora system regarding which
> > native packages are built, despite what's in bitbake.conf (using
> > current poky layer checkout).
> > 
> >   first, here's a snippet from bitbake.conf:
> > 
> >   ASSUME_PROVIDED = "\
> > bzip2-native \  <---
> > chrpath-native \
> > file-native \   <---
> > findutils-native \
> > git-native \
> > grep-native \
> > diffstat-native \
> > ... snip ...
> > 
> > suggesting that (among other things) bzip2-native and file-native
> > shouldn't be built -- it's the developer's responsibility to install
> > them, yes? but if i peek under tmp/work/x86_64-linux, i can see:
> 
> There are two ways "file-native" can be used in a build. It can be used
> as the host provided "file" command and it is also needed by the file
> recipe to build file for the target.

I recently ran into a third usage of "file-native": swupd-server links
against libmagic from file and therefore has a DEPENDS = "file". But
building swupd-server-native didn't actually build file because of
ASSUME_PROVIDED and because I hadn't installed libmagic-dev on my build
host, the build was failing.

Is there a way to declare that ASSUME_PROVIDED does not apply to this
case? It sounds like there is a way (based on your comments about
building file-native when building file and the libbz2-devel example),
but it did not become clear to me how that works in practice.

Or is it just a case of educating the developer that libmagic-dev needs
to be installed on the build host in addition to the file command?

-- 
Best Regards, Patrick Ohly

The content of this message is my personal opinion only and although
I am an employee of Intel, the statements I make here in no way
represent Intel's position on the issue, nor am I authorized to speak
on behalf of Intel on this matter.



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


Re: [OE-core] ASSUME_PROVIDED versus SANITY_REQUIRED_UTILITIES versus "The Build Host Packages"

2016-11-28 Thread Richard Purdie
On Mon, 2016-11-28 at 06:20 -0500, Robert P. J. Day wrote:
>   a bit confused by what i'm seeing in a recent
> qemuppc/core-image-minimal build on my fedora system regarding which
> native packages are built, despite what's in bitbake.conf (using
> current poky layer checkout).
> 
>   first, here's a snippet from bitbake.conf:
> 
>   ASSUME_PROVIDED = "\
> bzip2-native \  <---
> chrpath-native \
> file-native \   <---
> findutils-native \
> git-native \
> grep-native \
> diffstat-native \
> ... snip ...
> 
> suggesting that (among other things) bzip2-native and file-native
> shouldn't be built -- it's the developer's responsibility to install
> them, yes? but if i peek under tmp/work/x86_64-linux, i can see:

There are two ways "file-native" can be used in a build. It can be used
as the host provided "file" command and it is also needed by the file
recipe to build file for the target. We need to build file-native in
order for the build for the target file command to build/work. This is
why it gets built.

With bzip2, we need libbz2 (native) during the build process and we
don't ASSUME_PROVIDED libbz2-devel, hence it builds bzip2-native only
for that piece. Confusing perhaps but necessary unfortunately.

Cheers,

Richard

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


Re: [OE-core] npm.bbclass support for deep native modules?

2016-11-28 Thread Jack Mitchell



On 28/11/16 10:35, Peter A. Bigot wrote:

On 11/28/2016 04:11 AM, Paul Eggleton wrote:

Hi Peter,

On Sat, 26 Nov 2016 18:17:48 Peter A. Bigot wrote:

I'm using the current head of morty and trying to get a handle on the
new nodejs support in OE.

I'm failing to build a recipe for statsd.  Starting with this:

  devtool add 'npm://registry.npmjs.org;name=statsd;version=0.8.0'
  bitbake statsd

produces an error related to the modern-syslog dependency:

   DEBUG: Executing shell function do_compile

| npm ERR! Linux 4.4.0-47-generic
| npm ERR! argv

"/mnt/devel/oe/omap/build-bb-morty-master/tmp/sysroots/x86_64-linux/usr/bin/

node"
"/mnt/devel/oe/omap/build-bb-morty-master/tmp/sysroots/x86_64-linux/usr/bin

/npm" "--arch=arm" "--target_arch=arm" "--production" "--no-registry"
"install"
| npm ERR! node v4.6.1
| npm ERR! npm  v2.15.9

| npm ERR! Registry not defined and registry files not found:
"/mnt/devel/oe/omap/build-bb-morty-master/tmp/work/cortexa8hf-neon-poky-linu

x-gnueabi/statsd/0.8.0-r0/npm_cache/noregistry/modern-syslog/.cache.json",

"/mnt/devel/oe/omap/build-bb-morty-master/tmp/work/cortexa8hf-neon-poky-lin

ux-gnueabi/statsd/0.8.0-r0/npm_cache/modern-syslog/.cache.json".

modern-syslog 1.1.2 needs node-gyp to build a native component and
https://wiki.yoctoproject.org/wiki/TipsAndTricks/NPM notes that devtool
can't detect such things.  Doing this works fine to build that package:

  devtool add
'npm://registry.npmjs.org;name=modern-syslog;version=1.1.2'
bitbake modern-syslog

but I'm having no luck getting "bitbake statsd" to find the result.
I've added:

  DEPENDS = "modern-syslog"

to statsd_0.8.0.bb but that isn't helping.  It looks like I need some
way to have the recipe install the prepared modern-syslog into the cache
(or globally?) before baking statsd, but since the cache gets cleared in
npm_do_compile() it's not clear how to make that happen.

I'm very rusty with OE (two years away), so am I missing something or is
this just beyond what the bitbake infrastructure can currently handle?
If so, can somebody suggest a way to hand-patch the recipe, or outline
how npm.bbclass might be extended to support this?

Disclaimer - I'm the one who has been doing most of the recent work
with npm
support (aside from the node.js recipe and the original npm fetcher
plugin,
which were the work of others) however my knowledge of node.js is pretty
limited - most of it has been picked up along the way. So unfortunately I
can't immediately see why this isn't working. The thing that puzzles
me in
particular about the error you're seeing though is that we're explicitly
telling npm not to look for a registry, so why is it complaining about
the
lack of a registry?


Sorry, that wasn't clear.  statsd depends on modern-syslog but the
lockdown and shrinkwrap files generated by devtool don't include it.
From the Wiki:

"Devtool cannot detect native libraries in module dependencies, you
you'll need to manually add packages to recipe"

The Wiki doesn't go into detail of how that's supposed to be done. Is
the existing infrastructure supposed to be able to find
globally-installed modules?

I'm wondering whether https://yarnpkg.com/ or one of the other nodejs
dependency managers might be an alternative, as I believe npm's approach
to dependencies is not suited to level of lockdown needed by Yocto and
many other production systems.

Peter


Hi Peter,

I'm in a similar boat packaging a custom project with a very large 
dependency tree. After looking at the available options and our current 
struggles with npm, yarn was our next point of call. We haven't done 
anything with it yet, but probably plan to in the near future.


Not very helpful, but just a heads up that you're not the only one 
fighting npm ;)


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


[OE-core] ASSUME_PROVIDED versus SANITY_REQUIRED_UTILITIES versus "The Build Host Packages"

2016-11-28 Thread Robert P. J. Day

  a bit confused by what i'm seeing in a recent
qemuppc/core-image-minimal build on my fedora system regarding which
native packages are built, despite what's in bitbake.conf (using
current poky layer checkout).

  first, here's a snippet from bitbake.conf:

  ASSUME_PROVIDED = "\
bzip2-native \  <---
chrpath-native \
file-native \   <---
findutils-native \
git-native \
grep-native \
diffstat-native \
... snip ...

suggesting that (among other things) bzip2-native and file-native
shouldn't be built -- it's the developer's responsibility to install
them, yes? but if i peek under tmp/work/x86_64-linux, i can see:

  ...
  byacc-native/
  bzip2-native/ <---
  createrepo-native/
  cross-localedef-native/
  cryptodev-linux-native/
  db-native/
  dtc-native/
  e2fsprogs-native/
  elfutils-native/
  expat-native/
  file-native/  <---
  flex-native/
  ...

so that's ... confusing.

  add to that this bit in the YP Quick Start Guide at
http://www.yoctoproject.org/docs/2.1/yocto-project-qs/yocto-project-qs.html:

  "Build Host Packages
  ...
  Fedora

 $ sudo dnf install gawk make wget tar bzip2 gzip python unzip perl patch \
 diffutils diffstat git cpp gcc gcc-c++ glibc-devel texinfo chrpath \
 ccache perl-Data-Dumper perl-Text-ParseWords perl-Thread-Queue perl-bignum 
socat \
 findutils which SDL-devel xterm

my understanding was that that list represented what the developer was
required to install on his build host *manually* before going any
further, so you can see "bzip2" in that list, but you don't see
"file". given that the "file" command comes in its own package, should
that list of allegedly mandatory Build Host Packages not include
*everything* listed in ASSUME_PROVIDED?

  finally, in sanity.bbclass, one reads:

  SANITY_REQUIRED_UTILITIES ?= "patch diffstat makeinfo git bzip2 tar \
  gzip gawk chrpath wget cpio perl file"

which oddly *does* list the "file" command, but says nothing about
"sed", which *is* mentioned in ASSUME_PROVIDED, but is also not
mentioned in the "Build Host Packages" in the YP Quick Start Guide.

  is it just me, or does some of this seem out of sync?

rday

-- 


Robert P. J. Day Ottawa, Ontario, CANADA
http://crashcourse.ca

Twitter:   http://twitter.com/rpjday
LinkedIn:   http://ca.linkedin.com/in/rpjday



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


Re: [OE-core] [PATCH v1] wic: Add --exclude-path option to rootfs source plugin.

2016-11-28 Thread Ed Bartosh
On Mon, Nov 28, 2016 at 12:01:09PM +0100, Kristian Amlie wrote:
> On 28/11/16 11:52, Ed Bartosh wrote:
> > On Mon, Nov 28, 2016 at 08:15:26AM +0100, Kristian Amlie wrote:
> >>>
> >>> What's the reason of insisting that path must be absolute?
> >>> May be it's just me, but I find it a bit scaring to use absolute path in 
> >>> .wks
> >>> The patch is relative to the rootfs directory from my point of view.
> >>>
> >>> It also looks quite strange in the code to insist on absolute path
> >>> +if not os.path.isabs(path):
> >>> +msger.error("Must be absolute: --exclude-path=%s" %
> >>>
> >>> and then immediately making it relative:
> >>> +
> >>> +while os.path.isabs(path):
> >>> +path = path[1:]
> >>
> >> Not really any strong reason. I just thought it was a logical thing to
> >> do from a user perspective: When you're making an image you're thinking
> >> about paths in the final image, and the path after "part" is absolute,
> >> so I thought this one should be too.
> >>
> >> The fact that it's made relative in the code is just an implementation
> >> detail to make join() work correctly.
> >>
> >> I'm fine either way, so just let me know which you prefer.
> >>
> > I'd prefer relative path as I think about --exclude-path as a path in
> > the source rootfs directory that we want to exclude from copying to
> > the target partition. However, I agree that that it can be also treated
> > as a path to the target directory.
> 
> Ok!
> 
> I will get a new patchset up soon.
> 

Great!

I'd appreciate if you also do the following before sending v2:
 - check that your code doesn't regress pylint checks
 - add test case for your code to meta/lib/oeqa/selftest/wic.py
 - check that your code doesn't break oe-selftest --coverage -r wic and
   doesn't regress test coverage

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


Re: [OE-core] [PATCH v1] wic: Add --exclude-path option to rootfs source plugin.

2016-11-28 Thread Kristian Amlie
On 28/11/16 11:52, Ed Bartosh wrote:
> On Mon, Nov 28, 2016 at 08:15:26AM +0100, Kristian Amlie wrote:
>>>
>>> What's the reason of insisting that path must be absolute?
>>> May be it's just me, but I find it a bit scaring to use absolute path in 
>>> .wks
>>> The patch is relative to the rootfs directory from my point of view.
>>>
>>> It also looks quite strange in the code to insist on absolute path
>>> +if not os.path.isabs(path):
>>> +msger.error("Must be absolute: --exclude-path=%s" %
>>>
>>> and then immediately making it relative:
>>> +
>>> +while os.path.isabs(path):
>>> +path = path[1:]
>>
>> Not really any strong reason. I just thought it was a logical thing to
>> do from a user perspective: When you're making an image you're thinking
>> about paths in the final image, and the path after "part" is absolute,
>> so I thought this one should be too.
>>
>> The fact that it's made relative in the code is just an implementation
>> detail to make join() work correctly.
>>
>> I'm fine either way, so just let me know which you prefer.
>>
> I'd prefer relative path as I think about --exclude-path as a path in
> the source rootfs directory that we want to exclude from copying to
> the target partition. However, I agree that that it can be also treated
> as a path to the target directory.

Ok!

I will get a new patchset up soon.

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


Re: [OE-core] [PATCH v1] wic: Add --exclude-path option to rootfs source plugin.

2016-11-28 Thread Kristian Amlie
On 28/11/16 11:46, Ed Bartosh wrote:
> On Mon, Nov 28, 2016 at 08:07:05AM +0100, Kristian Amlie wrote:
>> On 25/11/16 17:33, Ed Bartosh wrote:
>>> On Fri, Nov 25, 2016 at 01:35:53PM +0100, Kristian Amlie wrote:
 On 25/11/16 13:28, Maciej Borzęcki wrote:
> On Fri, Nov 25, 2016 at 11:15 AM, Kristian Amlie
>> +# Disallow '..', because doing so could be quite 
>> disastrous
>> +# (we will delete the directory).
>> +remaining = path
>> +while True:
>> +(head, tail) = os.path.split(remaining)
>> +if tail == '..':
>> +msger.error("'..' not allowed: 
>> --exclude-path=%s" % orig_path)
>> +elif head == "":
>> +break
>> +remaining = head
>
> Why not do this instead?
>
> if '..' in path:
> msger.error("'..' not allowed: --exclude-path=%s" % orig_path)
>
>>> would "'/..' in path" or something similar work?
>>
>> '/..my-file' is a valid file name, so no, it wouldn't work. I realize
>> that this would be uncommon, and it makes the check more complex, so I'm
>> ok with making it simpler if you want me to, but we have to trade
>> simplicity for correctness in that case.
>>
> OK, makes sense.
> 
> Would something like this work for you?
> 
>> mkdir -p /tmp/rootfs/bla/bla/bla/bla
>> python -c "import os;print 
>> os.path.realpath('/tmp/rootfs/bla/../bla/../bla/../bla/../').startswith('/tmp/rootfs/')"
> False
>> python -c "import os;print 
>> os.path.realpath('/tmp/rootfs/bla/../bla/../bla/bla/../').startswith('/tmp/rootfs/')"
> True

Ah, that's a good idea, makes it much simpler, and is still correct. I
will change to that.

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


Re: [OE-core] [PATCH v3] rootfs: Modify RPM installation

2016-11-28 Thread David Vincent
On vendredi 25 novembre 2016 13:09:30 CET Mark Hatle wrote:
> On 11/25/16 12:17 PM, Burton, Ross wrote:
> > On 24 November 2016 at 10:49, David Vincent  > 
> > > wrote:
> > -self._setup_dbg_rootfs(['/etc/rpm', '/var/lib/rpm',
> > '/var/lib/smart']) +self._setup_dbg_rootfs(['/etc/rpm',
> > rpm_libdir, '/var/lib/smart'])> 
> > Can we extend the un-hardcoding so this uses ${localstatedir}/lib/smart,
> > and rpmlibdir also uses ${localstatedir}?
> 
> The value for the rpm directory is hard coded into the configuration file.
> Anything we do outside of that MUST match.  Inspect the rpm macros file for
> the matching value.  (This is why /var/lib/rpm was hard coded in the past.)

And that was the root cause of the problem when rpmlibdir is modified from its 
default value. Maybe the rpmlibdir variable should be documented in the ref-
manual for those who wants to tinker with it.

> 
> As for smart, I don't remember the rules offhand, so someone will need to
> figure out if it's variable (compile time) or hard coded.
> 
> --Mark
> 
> > Also current master lets you not bother passing True to d.getVar() as that
> > is the default now.

So should I send a v4 ?

> > 
> > Ross


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


Re: [OE-core] [PATCH v1] wic: Add --exclude-path option to rootfs source plugin.

2016-11-28 Thread Ed Bartosh
On Mon, Nov 28, 2016 at 08:15:26AM +0100, Kristian Amlie wrote:
> > 
> > What's the reason of insisting that path must be absolute?
> > May be it's just me, but I find it a bit scaring to use absolute path in 
> > .wks
> > The patch is relative to the rootfs directory from my point of view.
> > 
> > It also looks quite strange in the code to insist on absolute path
> > +if not os.path.isabs(path):
> > +msger.error("Must be absolute: --exclude-path=%s" %
> > 
> > and then immediately making it relative:
> > +
> > +while os.path.isabs(path):
> > +path = path[1:]
> 
> Not really any strong reason. I just thought it was a logical thing to
> do from a user perspective: When you're making an image you're thinking
> about paths in the final image, and the path after "part" is absolute,
> so I thought this one should be too.
> 
> The fact that it's made relative in the code is just an implementation
> detail to make join() work correctly.
> 
> I'm fine either way, so just let me know which you prefer.
> 
I'd prefer relative path as I think about --exclude-path as a path in
the source rootfs directory that we want to exclude from copying to
the target partition. However, I agree that that it can be also treated
as a path to the target directory.

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


Re: [OE-core] [PATCH v1] wic: Add --exclude-path option to rootfs source plugin.

2016-11-28 Thread Ed Bartosh
On Mon, Nov 28, 2016 at 08:07:05AM +0100, Kristian Amlie wrote:
> On 25/11/16 17:33, Ed Bartosh wrote:
> > On Fri, Nov 25, 2016 at 01:35:53PM +0100, Kristian Amlie wrote:
> >> On 25/11/16 13:28, Maciej Borzęcki wrote:
> >>> On Fri, Nov 25, 2016 at 11:15 AM, Kristian Amlie
>  +# Disallow '..', because doing so could be quite 
>  disastrous
>  +# (we will delete the directory).
>  +remaining = path
>  +while True:
>  +(head, tail) = os.path.split(remaining)
>  +if tail == '..':
>  +msger.error("'..' not allowed: 
>  --exclude-path=%s" % orig_path)
>  +elif head == "":
>  +break
>  +remaining = head
> >>>
> >>> Why not do this instead?
> >>>
> >>> if '..' in path:
> >>> msger.error("'..' not allowed: --exclude-path=%s" % orig_path)
> >>>
> > would "'/..' in path" or something similar work?
> 
> '/..my-file' is a valid file name, so no, it wouldn't work. I realize
> that this would be uncommon, and it makes the check more complex, so I'm
> ok with making it simpler if you want me to, but we have to trade
> simplicity for correctness in that case.
>
OK, makes sense.

Would something like this work for you?

> mkdir -p /tmp/rootfs/bla/bla/bla/bla
> python -c "import os;print 
> os.path.realpath('/tmp/rootfs/bla/../bla/../bla/../bla/../').startswith('/tmp/rootfs/')"
False
> python -c "import os;print 
> os.path.realpath('/tmp/rootfs/bla/../bla/../bla/bla/../').startswith('/tmp/rootfs/')"
True

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


Re: [OE-core] npm.bbclass support for deep native modules?

2016-11-28 Thread Peter A. Bigot

On 11/28/2016 04:11 AM, Paul Eggleton wrote:

Hi Peter,

On Sat, 26 Nov 2016 18:17:48 Peter A. Bigot wrote:

I'm using the current head of morty and trying to get a handle on the
new nodejs support in OE.

I'm failing to build a recipe for statsd.  Starting with this:

  devtool add 'npm://registry.npmjs.org;name=statsd;version=0.8.0'
  bitbake statsd

produces an error related to the modern-syslog dependency:

   DEBUG: Executing shell function do_compile

| npm ERR! Linux 4.4.0-47-generic
| npm ERR! argv

"/mnt/devel/oe/omap/build-bb-morty-master/tmp/sysroots/x86_64-linux/usr/bin/
node"
"/mnt/devel/oe/omap/build-bb-morty-master/tmp/sysroots/x86_64-linux/usr/bin
/npm" "--arch=arm" "--target_arch=arm" "--production" "--no-registry"
"install"
| npm ERR! node v4.6.1
| npm ERR! npm  v2.15.9

| npm ERR! Registry not defined and registry files not found:
"/mnt/devel/oe/omap/build-bb-morty-master/tmp/work/cortexa8hf-neon-poky-linu
x-gnueabi/statsd/0.8.0-r0/npm_cache/noregistry/modern-syslog/.cache.json",
"/mnt/devel/oe/omap/build-bb-morty-master/tmp/work/cortexa8hf-neon-poky-lin
ux-gnueabi/statsd/0.8.0-r0/npm_cache/modern-syslog/.cache.json".

modern-syslog 1.1.2 needs node-gyp to build a native component and
https://wiki.yoctoproject.org/wiki/TipsAndTricks/NPM notes that devtool
can't detect such things.  Doing this works fine to build that package:

  devtool add 'npm://registry.npmjs.org;name=modern-syslog;version=1.1.2'
bitbake modern-syslog

but I'm having no luck getting "bitbake statsd" to find the result.
I've added:

  DEPENDS = "modern-syslog"

to statsd_0.8.0.bb but that isn't helping.  It looks like I need some
way to have the recipe install the prepared modern-syslog into the cache
(or globally?) before baking statsd, but since the cache gets cleared in
npm_do_compile() it's not clear how to make that happen.

I'm very rusty with OE (two years away), so am I missing something or is
this just beyond what the bitbake infrastructure can currently handle?
If so, can somebody suggest a way to hand-patch the recipe, or outline
how npm.bbclass might be extended to support this?

Disclaimer - I'm the one who has been doing most of the recent work with npm
support (aside from the node.js recipe and the original npm fetcher plugin,
which were the work of others) however my knowledge of node.js is pretty
limited - most of it has been picked up along the way. So unfortunately I
can't immediately see why this isn't working. The thing that puzzles me in
particular about the error you're seeing though is that we're explicitly
telling npm not to look for a registry, so why is it complaining about the
lack of a registry?


Sorry, that wasn't clear.  statsd depends on modern-syslog but the 
lockdown and shrinkwrap files generated by devtool don't include it.  
From the Wiki:


"Devtool cannot detect native libraries in module dependencies, you 
you'll need to manually add packages to recipe"


The Wiki doesn't go into detail of how that's supposed to be done. Is 
the existing infrastructure supposed to be able to find 
globally-installed modules?


I'm wondering whether https://yarnpkg.com/ or one of the other nodejs 
dependency managers might be an alternative, as I believe npm's approach 
to dependencies is not suited to level of lockdown needed by Yocto and 
many other production systems.


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


Re: [OE-core] npm.bbclass support for deep native modules?

2016-11-28 Thread Paul Eggleton
Hi Peter,

On Sat, 26 Nov 2016 18:17:48 Peter A. Bigot wrote:
> I'm using the current head of morty and trying to get a handle on the
> new nodejs support in OE.
> 
> I'm failing to build a recipe for statsd.  Starting with this:
> 
>  devtool add 'npm://registry.npmjs.org;name=statsd;version=0.8.0'
>  bitbake statsd
> 
> produces an error related to the modern-syslog dependency:
> 
>   DEBUG: Executing shell function do_compile
> 
> | npm ERR! Linux 4.4.0-47-generic
> | npm ERR! argv
> 
> "/mnt/devel/oe/omap/build-bb-morty-master/tmp/sysroots/x86_64-linux/usr/bin/
> node"
> "/mnt/devel/oe/omap/build-bb-morty-master/tmp/sysroots/x86_64-linux/usr/bin
> /npm" "--arch=arm" "--target_arch=arm" "--production" "--no-registry"
> "install"
> | npm ERR! node v4.6.1
> | npm ERR! npm  v2.15.9
> 
> | npm ERR! Registry not defined and registry files not found:
> "/mnt/devel/oe/omap/build-bb-morty-master/tmp/work/cortexa8hf-neon-poky-linu
> x-gnueabi/statsd/0.8.0-r0/npm_cache/noregistry/modern-syslog/.cache.json",
> "/mnt/devel/oe/omap/build-bb-morty-master/tmp/work/cortexa8hf-neon-poky-lin
> ux-gnueabi/statsd/0.8.0-r0/npm_cache/modern-syslog/.cache.json".
> 
> modern-syslog 1.1.2 needs node-gyp to build a native component and
> https://wiki.yoctoproject.org/wiki/TipsAndTricks/NPM notes that devtool
> can't detect such things.  Doing this works fine to build that package:
> 
>  devtool add 'npm://registry.npmjs.org;name=modern-syslog;version=1.1.2'
> bitbake modern-syslog
> 
> but I'm having no luck getting "bitbake statsd" to find the result.
> I've added:
> 
>  DEPENDS = "modern-syslog"
> 
> to statsd_0.8.0.bb but that isn't helping.  It looks like I need some
> way to have the recipe install the prepared modern-syslog into the cache
> (or globally?) before baking statsd, but since the cache gets cleared in
> npm_do_compile() it's not clear how to make that happen.
> 
> I'm very rusty with OE (two years away), so am I missing something or is
> this just beyond what the bitbake infrastructure can currently handle?
> If so, can somebody suggest a way to hand-patch the recipe, or outline
> how npm.bbclass might be extended to support this?

Disclaimer - I'm the one who has been doing most of the recent work with npm 
support (aside from the node.js recipe and the original npm fetcher plugin, 
which were the work of others) however my knowledge of node.js is pretty 
limited - most of it has been picked up along the way. So unfortunately I 
can't immediately see why this isn't working. The thing that puzzles me in 
particular about the error you're seeing though is that we're explicitly 
telling npm not to look for a registry, so why is it complaining about the 
lack of a registry?

Henry / Brendan - any suggestions?

Cheers,
Paul

-- 

Paul Eggleton
Intel Open Source Technology Centre
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v2] ltp: 20160126 -> 20160920

2016-11-28 Thread huangqy
From: Huang Qiyu 

1)Upgrade ltp from 20160126 to 20160920.
2)Delete some patches, since they are integrated upstream.
 0001-ltp-Don-t-link-against-libfl.patch
 0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
 0007-replace-SIGCLD-with-SIGCHLD.patch
 0009-Guard-error.h-with-__GLIBC__.patch
 0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
 0013-include-fcntl.h-for-getting-O_-definitions.patch
 0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
 0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
 0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
 0017-replace-sigval_t-with-union-sigval.patch
 0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
 0022-include-sys-types.h.patch
 0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
 0029-trace_shed-Fix-build-with-musl.patch
 0030-lib-Use-PTHREAD_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch
 0031-vma03-fix-page-size-offset-as-per-page-size-alignmen.patch
 0032-regen.sh-Include-asm-unistd.h-explicitly.patch
3)Modify one patch, since the data has been changed.
 0011-Rename-sigset-variable-to-sigset1.patch
 0035-fix-test_proc_kill-hang.patch
4)Add some new patches.
 0001-Define-__SIGRTMIN-and-__SIGRTMAX-on-musl.patch
 0002-initialize-recursive-mutex-in-a-portable-way.patch
 0004-rt_sigaction-rt_sigprocmark-Replace-SA_NOMASK-with-S.patch
 0006-Remove-unused-__BEGIN_DECLS-and-__END_DECLS.patch

Signed-off-by: Wang Xin 
Signed-off-by: Huang Qiyu 
---
 ...-Define-__SIGRTMIN-and-__SIGRTMAX-on-musl.patch |  32 ++
 .../ltp/0001-ltp-Don-t-link-against-libfl.patch|  30 --
 ...tialize-recursive-mutex-in-a-portable-way.patch | 167 +
 ...n-rt_sigprocmark-Replace-SA_NOMASK-with-S.patch | 120 +++
 ...move-unused-__BEGIN_DECLS-and-__END_DECLS.patch |  48 +++
 ...sendfile-Use-off64_t-instead-of-__off64_t.patch |  31 --
 .../ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch | 394 -
 .../ltp/0009-Guard-error.h-with-__GLIBC__.patch| 270 --
 .../0011-Rename-sigset-variable-to-sigset1.patch   |  60 ++--
 ...fsstress.c-Replace-__int64_t-with-int64_t.patch | 351 --
 ...nclude-fcntl.h-for-getting-O_-definitions.patch |  67 
 ...ing-Include-sys-types.h-for-pid_t-definit.patch |  56 ---
 ...015-mincore01-Rename-PAGESIZE-to-pagesize.patch |  64 
 ...Change-header-from-ustat.h-to-sys-ustat.h.patch |  45 ---
 .../0017-replace-sigval_t-with-union-sigval.patch  |  88 -
 ...lace-canonicalize_file_name-with-realpath.patch |  32 --
 .../ltp/ltp/0022-include-sys-types.h.patch |  29 --
 ...sconf01-Use-_SC_2_C_VERSION-conditionally.patch |  29 --
 .../ltp/0029-trace_shed-Fix-build-with-musl.patch  |  32 --
 ...READ_MUTEX_RECURSIVE-in-place-of-PTHREAD_.patch |  33 --
 ...age-size-offset-as-per-page-size-alignmen.patch |  33 --
 ...-regen.sh-Include-asm-unistd.h-explicitly.patch |  30 --
 .../ltp/ltp/0035-fix-test_proc_kill-hang.patch |  25 +-
 .../ltp/{ltp_20160126.bb => ltp_20160920.bb}   |  23 +-
 24 files changed, 418 insertions(+), 1671 deletions(-)
 create mode 100644 
meta/recipes-extended/ltp/ltp/0001-Define-__SIGRTMIN-and-__SIGRTMAX-on-musl.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0001-ltp-Don-t-link-against-libfl.patch
 create mode 100644 
meta/recipes-extended/ltp/ltp/0002-initialize-recursive-mutex-in-a-portable-way.patch
 create mode 100644 
meta/recipes-extended/ltp/ltp/0004-rt_sigaction-rt_sigprocmark-Replace-SA_NOMASK-with-S.patch
 create mode 100644 
meta/recipes-extended/ltp/ltp/0006-Remove-unused-__BEGIN_DECLS-and-__END_DECLS.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0006-sendfile-Use-off64_t-instead-of-__off64_t.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0007-replace-SIGCLD-with-SIGCHLD.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0009-Guard-error.h-with-__GLIBC__.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0012-fsstress.c-Replace-__int64_t-with-int64_t.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0013-include-fcntl.h-for-getting-O_-definitions.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0014-hyperthreading-Include-sys-types.h-for-pid_t-definit.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0015-mincore01-Rename-PAGESIZE-to-pagesize.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0016-ustat-Change-header-from-ustat.h-to-sys-ustat.h.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0017-replace-sigval_t-with-union-sigval.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0019-tomoyo-Replace-canonicalize_file_name-with-realpath.patch
 delete mode 100644 meta/recipes-extended/ltp/ltp/0022-include-sys-types.h.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0027-sysconf01-Use-_SC_2_C_VERSION-conditionally.patch
 delete mode 100644 
meta/recipes-extended/ltp/ltp/0029-trace_shed-Fix-build-with-musl.patch
 delete mode 100644 

[OE-core] [PATCH] libxml2: Security fix CVE-2016-5131

2016-11-28 Thread Yi Zhao
CVE-2016-5131 libxml2: Use-after-free vulnerability in libxml2 through
2.9.4, as used in Google Chrome before 52.0.2743.82, allows remote
attackers to cause a denial of service or possibly have unspecified
other impact via vectors related to the XPointer range-to function.

External References:
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-5131

Patch from:
https://git.gnome.org/browse/libxml2/commit/?id=9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e

Signed-off-by: Yi Zhao 
---
 .../libxml/libxml2/libxml2-CVE-2016-5131.patch | 180 +
 meta/recipes-core/libxml/libxml2_2.9.4.bb  |   1 +
 2 files changed, 181 insertions(+)
 create mode 100644 meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch

diff --git a/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch 
b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
new file mode 100644
index 000..9d47d02
--- /dev/null
+++ b/meta/recipes-core/libxml/libxml2/libxml2-CVE-2016-5131.patch
@@ -0,0 +1,180 @@
+From 9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e Mon Sep 17 00:00:00 2001
+From: Nick Wellnhofer 
+Date: Tue, 28 Jun 2016 14:22:23 +0200
+Subject: [PATCH] Fix XPointer paths beginning with range-to
+
+The old code would invoke the broken xmlXPtrRangeToFunction. range-to
+isn't really a function but a special kind of location step. Remove
+this function and always handle range-to in the XPath code.
+
+The old xmlXPtrRangeToFunction could also be abused to trigger a
+use-after-free error with the potential for remote code execution.
+
+Found with afl-fuzz.
+
+Fixes CVE-2016-5131.
+
+CVE: CVE-2016-5131
+Upstream-Status: Backport
+https://git.gnome.org/browse/libxml2/commit/?id=9ab01a277d71f54d3143c2cf333c5c2e9aaedd9e
+
+Signed-off-by: Yi Zhao 
+---
+ result/XPath/xptr/vidbase | 13 
+ test/XPath/xptr/vidbase   |  1 +
+ xpath.c   |  7 -
+ xpointer.c| 76 ---
+ 4 files changed, 26 insertions(+), 71 deletions(-)
+
+diff --git a/result/XPath/xptr/vidbase b/result/XPath/xptr/vidbase
+index 8b9e92d..f19193e 100644
+--- a/result/XPath/xptr/vidbase
 b/result/XPath/xptr/vidbase
+@@ -17,3 +17,16 @@ Object is a Location Set:
+   To node
+ ELEMENT p
+ 
++
++
++Expression: xpointer(range-to(id('chapter2')))
++Object is a Location Set:
++1 :   Object is a range :
++  From node
++ /
++  To node
++ELEMENT chapter
++  ATTRIBUTE id
++TEXT
++  content=chapter2
++
+diff --git a/test/XPath/xptr/vidbase b/test/XPath/xptr/vidbase
+index b146383..884b106 100644
+--- a/test/XPath/xptr/vidbase
 b/test/XPath/xptr/vidbase
+@@ -1,2 +1,3 @@
+ xpointer(id('chapter1')/p)
+ xpointer(id('chapter1')/p[1]/range-to(following-sibling::p[2]))
++xpointer(range-to(id('chapter2')))
+diff --git a/xpath.c b/xpath.c
+index d992841..5a01b1b 100644
+--- a/xpath.c
 b/xpath.c
+@@ -10691,13 +10691,18 @@ xmlXPathCompPathExpr(xmlXPathParserContextPtr ctxt) {
+   lc = 1;
+   break;
+   } else if ((NXT(len) == '(')) {
+-  /* Note Type or Function */
++  /* Node Type or Function */
+   if (xmlXPathIsNodeType(name)) {
+ #ifdef DEBUG_STEP
+   xmlGenericError(xmlGenericErrorContext,
+   "PathExpr: Type search\n");
+ #endif
+   lc = 1;
++#ifdef LIBXML_XPTR_ENABLED
++} else if (ctxt->xptr &&
++   xmlStrEqual(name, BAD_CAST "range-to")) {
++lc = 1;
++#endif
+   } else {
+ #ifdef DEBUG_STEP
+   xmlGenericError(xmlGenericErrorContext,
+diff --git a/xpointer.c b/xpointer.c
+index 676c510..d74174a 100644
+--- a/xpointer.c
 b/xpointer.c
+@@ -1332,8 +1332,6 @@ xmlXPtrNewContext(xmlDocPtr doc, xmlNodePtr here, 
xmlNodePtr origin) {
+ ret->here = here;
+ ret->origin = origin;
+ 
+-xmlXPathRegisterFunc(ret, (xmlChar *)"range-to",
+-   xmlXPtrRangeToFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"range",
+xmlXPtrRangeFunction);
+ xmlXPathRegisterFunc(ret, (xmlChar *)"range-inside",
+@@ -2243,76 +2241,14 @@ xmlXPtrRangeInsideFunction(xmlXPathParserContextPtr 
ctxt, int nargs) {
+  * @nargs:  the number of args
+  *
+  * Implement the range-to() XPointer function
++ *
++ * Obsolete. range-to is not a real function but a special type of location
++ * step which is handled in xpath.c.
+  */
+ void
+-xmlXPtrRangeToFunction(xmlXPathParserContextPtr ctxt, int nargs) {
+-xmlXPathObjectPtr range;
+-const xmlChar *cur;
+-xmlXPathObjectPtr res, obj;
+-xmlXPathObjectPtr tmp;
+-xmlLocationSetPtr newset = NULL;
+-xmlNodeSetPtr oldset;
+-int i;
+-
+-if (ctxt == NULL) return;
+-CHECK_ARITY(1);
+-/*

[OE-core] [PATCH] tiff: Security fix CVE-2016-9539

2016-11-28 Thread Zhixiong Chi
tools/tiffcrop.c in libtiff 4.0.6 has an out-of-bounds read in
readContigTilesIntoBuffer(). Reported as MSVR 35092.

External References:
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9539

Patch from:
https://github.com/vadz/libtiff/commit/ae9365db1b271b62b35ce018eac8799b1d5e8a53

Signed-off-by: Zhixiong Chi 
---
 .../libtiff/files/CVE-2016-9539.patch  | 60 ++
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb  |  1 +
 2 files changed, 61 insertions(+)
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9539.patch

diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-9539.patch 
b/meta/recipes-multimedia/libtiff/files/CVE-2016-9539.patch
new file mode 100644
index 000..1d9be42
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-9539.patch
@@ -0,0 +1,60 @@
+From ae9365db1b271b62b35ce018eac8799b1d5e8a53 Mon Sep 17 00:00:00 2001
+From: erouault 
+Date: Fri, 14 Oct 2016 19:13:20 +
+Subject: [PATCH ] * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes
+ in readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet
+ & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.
+
+CVE: CVE-2016-9539
+
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/ae9365db1b271b62b35ce018eac8799b1d5e8a53
+
+Signed-off-by: Zhixiong Chi 
+
+---
+ ChangeLog|  6 ++
+ tools/tiffcrop.c | 11 ++-
+ 2 files changed, 16 insertions(+), 1 deletion(-)
+
+Index: tiff-4.0.6/ChangeLog
+===
+--- tiff-4.0.6.orig/ChangeLog  2016-11-28 14:56:32.109283913 +0800
 tiff-4.0.6/ChangeLog   2016-11-28 16:36:01.805325534 +0800
+@@ -17,6 +17,12 @@
+   Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
+   (CVE-2014-8127, duplicate: CVE-2016-3658)
+ 
++2016-10-14 Even Rouault 
++
++  * tools/tiffcrop.c: fix out-of-bound read of up to 3 bytes in
++  readContigTilesIntoBuffer(). Reported as MSVR 35092 by Axel Souchet
++  & Vishal Chauhan from the MSRC Vulnerabilities & Mitigations team.
++
+ 2016-10-08 Even Rouault 
+ 
+   * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
+Index: tiff-4.0.6/tools/tiffcrop.c
+===
+--- tiff-4.0.6.orig/tools/tiffcrop.c   2016-11-28 14:56:31.433283908 +0800
 tiff-4.0.6/tools/tiffcrop.c2016-11-28 16:42:13.793328128 +0800
+@@ -819,9 +819,18 @@
+ }
+ }
+ 
+-  tilebuf = _TIFFmalloc(tile_buffsize);
++  /* Add 3 padding bytes for extractContigSamplesShifted32bits */
++  if( tile_buffsize > 0xU - 3 )
++  {
++  TIFFError("readContigTilesIntoBuffer", "Integer overflow when 
calculating buffer size.");
++  exit(-1);
++  }
++  tilebuf = _TIFFmalloc(tile_buffsize + 3);
+   if (tilebuf == 0)
+ return 0;
++  tilebuf[tile_buffsize] = 0;
++  tilebuf[tile_buffsize+1] = 0;
++  tilebuf[tile_buffsize+2] = 0;
+ 
+   dst_rowsize = ((imagewidth * bps * spp) + 7) / 8;  
+   for (row = 0; row < imagelength; row += tl)
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb 
b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
index 3057121..3a7906a 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -18,6 +18,7 @@ SRC_URI = 
"http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://CVE-2016-3658.patch \
file://CVE-2016-3632.patch \
file://CVE-2016-9540.patch \
+   file://CVE-2016-9539.patch \
   "
 
 SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
-- 
1.9.1

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


[OE-core] [PATCH] tiff: Security fix CVE-2016-9540

2016-11-28 Thread Zhixiong Chi
tools/tiffcp.c in libtiff 4.0.6 has an out-of-bounds write on tiled
images with odd tile width versus image width. Reported as MSVR 35103,
aka "cpStripToTile heap-buffer-overflow."

External References:
https://web.nvd.nist.gov/view/vuln/detail?vulnId=CVE-2016-9540

Patch from:
https://github.com/vadz/libtiff/commit/5ad9d8016fbb60109302d558f7edb2cb2a3bb8e3

Signed-off-by: Zhixiong Chi 
---
 .../libtiff/files/CVE-2016-9540.patch  | 60 ++
 meta/recipes-multimedia/libtiff/tiff_4.0.6.bb  |  1 +
 2 files changed, 61 insertions(+)
 create mode 100644 meta/recipes-multimedia/libtiff/files/CVE-2016-9540.patch

diff --git a/meta/recipes-multimedia/libtiff/files/CVE-2016-9540.patch 
b/meta/recipes-multimedia/libtiff/files/CVE-2016-9540.patch
new file mode 100644
index 000..dddaa0c
--- /dev/null
+++ b/meta/recipes-multimedia/libtiff/files/CVE-2016-9540.patch
@@ -0,0 +1,60 @@
+From 5ad9d8016fbb60109302d558f7edb2cb2a3bb8e3 Mon Sep 17 00:00:00 2001
+From: erouault 
+Date: Sat, 8 Oct 2016 15:54:56 +
+Subject: [PATCH] fix CVE-2016-9540
+ * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
+ tile width vs image width. Reported as MSVR 35103
+ by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
+ Mitigations team.
+
+CVE: CVE-2016-9540
+
+Upstream-Status: Backport
+https://github.com/vadz/libtiff/commit/5ad9d8016fbb60109302d558f7edb2cb2a3bb8e3
+
+Signed-off-by: Zhixiong Chi 
+---
+ ChangeLog  | 7 +++
+ tools/tiffcp.c | 4 ++--
+ 2 files changed, 9 insertions(+), 2 deletions(-)
+
+Index: tiff-4.0.4/ChangeLog
+===
+--- tiff-4.0.4.orig/ChangeLog  2016-11-24 14:40:43.046867737 +0800
 tiff-4.0.4/ChangeLog   2016-11-28 14:38:01.681276171 +0800
+@@ -17,6 +17,13 @@
+   Fixes http://bugzilla.maptools.org/show_bug.cgi?id=2500
+   (CVE-2014-8127, duplicate: CVE-2016-3658)
+ 
++2016-10-08 Even Rouault 
++
++  * tools/tiffcp.c: fix out-of-bounds write on tiled images with odd
++  tile width vs image width. Reported as MSVR 35103
++  by Axel Souchet and Vishal Chauhan from the MSRC Vulnerabilities &
++  Mitigations team.
++
+ 2016-09-24  Bob Friesenhahn  
+
+   * libtiff/tif_getimage.c (TIFFRGBAImageOK): Reject attempts to
+Index: tiff-4.0.4/tools/tiffcp.c
+===
+--- tiff-4.0.4.orig/tools/tiffcp.c 2015-06-21 09:09:10.0 +0800
 tiff-4.0.4/tools/tiffcp.c  2016-11-28 14:41:02.221277430 +0800
+@@ -1338,7 +1338,7 @@
+   uint32 colb = 0;
+   uint32 col;
+ 
+-  for (col = 0; col < imagewidth; col += tw) {
++  for (col = 0; col < imagewidth && colb < imagew; col += tw) {
+   if (TIFFReadTile(in, tilebuf, col, row, 0, 0) < 0
+   && !ignore) {
+   TIFFError(TIFFFileName(in),
+@@ -1523,7 +1523,7 @@
+   uint32 colb = 0;
+   uint32 col;
+ 
+-  for (col = 0; col < imagewidth; col += tw) {
++  for (col = 0; col < imagewidth && colb < imagew; col += tw) {
+   /*
+* Tile is clipped horizontally.  Calculate
+* visible portion and skewing factors.
diff --git a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb 
b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
index 9b4aff3..3057121 100644
--- a/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
+++ b/meta/recipes-multimedia/libtiff/tiff_4.0.6.bb
@@ -17,6 +17,7 @@ SRC_URI = 
"http://download.osgeo.org/libtiff/tiff-${PV}.tar.gz \
file://CVE-2016-3622.patch \
file://CVE-2016-3658.patch \
file://CVE-2016-3632.patch \
+   file://CVE-2016-9540.patch \
   "
 
 SRC_URI[md5sum] = "d1d2e940dea0b5ad435f21f03d96dd72"
-- 
1.9.1

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