Openembedded Core Discussions
 help / color / mirror / Atom feed
* [PATCH 0/1] perl: remove plan9 related stuff in perl-ptest package
From: Chen Qi @ 2016-10-26  3:07 UTC (permalink / raw)
  To: openembedded-core

The following changes since commit 1886ab2f1dc1e3b5758a85604998e8deb9198f5e:

  image_types: Use softer setting of WKS_FILE (2016-10-25 17:58:41 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib ChenQi/perl-plan9
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/perl-plan9

Chen Qi (1):
  perl: remove plan9 related stuff in perl-ptest package

 meta/recipes-devtools/perl/perl-ptest.inc | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

-- 
1.9.1



^ permalink raw reply

* [PATCH 1/1] fontcache: fix fonts postinst failed
From: Hongxu Jia @ 2016-10-26  2:31 UTC (permalink / raw)
  To: openembedded-core, ross.burton, richard.purdie
In-Reply-To: <cover.1477448814.git.hongxu.jia@windriver.com>

While instal liberation-fonts to image, the fonts postinst
failed at do_rootfs time:
-----------------------------------------------
|WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstall intercept hook
'update_font_cache' failed (exit code: 139)! See log for details!
|WARNING: core-image-minimal-1.0-r0 do_rootfs: The postinstalls for the
following packages will be postponed for first boot: liberation-fonts
-----------------------------------------------

Since the following commit applied in oe-core
-----------------------------------------------
commit ce1e7fcc60276040477c1d5e3129e029bb9f204b
Author: Richard Purdie <richard.purdie@linuxfoundation.org>
Date:   Fri Sep 30 17:43:23 2016 +0100

    allarch: Fixes to stop rebuilds when change multilibs
-----------------------------------------------
It assignes base_libdir="/none" which caused fonts postinst failed at
do_rootfs.

The fonts postinst invoke qemu to update font cache which requires
base_libdir arch relative(such as base_libdir="/lib64").

We refer what meta/conf/multilib.conf does, assign it with arch relative.

Signed-off-by: Hongxu Jia <hongxu.jia@windriver.com>
---
 meta/classes/fontcache.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/fontcache.bbclass b/meta/classes/fontcache.bbclass
index 8ebdfc4..ce22170 100644
--- a/meta/classes/fontcache.bbclass
+++ b/meta/classes/fontcache.bbclass
@@ -38,6 +38,10 @@ python () {
 }
 
 python add_fontcache_postinsts() {
+    baselib = d.getVar('BASE_LIB_tune-' + (d.getVar('DEFAULTTUNE', True) or 'INVALID'), True) or \
+              d.getVar('BASELIB', True)
+    d.setVar("baselib", baselib)
+
     for pkg in d.getVar('FONT_PACKAGES', True).split():
         bb.note("adding fonts postinst and postrm scripts to %s" % pkg)
         postinst = d.getVar('pkg_postinst_%s' % pkg, True) or d.getVar('pkg_postinst', True)
-- 
2.8.1



^ permalink raw reply related

* [PATCH 0/1] fontcache: fix fonts postinst failed
From: Hongxu Jia @ 2016-10-26  2:31 UTC (permalink / raw)
  To: openembedded-core, ross.burton, richard.purdie

1. Test steps:

1) edit local.conf:
---
IMAGE_INSTALL_append = " liberation-fonts"
---

2) Build image.
bitbake core-image-minimal

2. Expected:
No build warning of "The postinstall intercept hook 'update_font_cache' failed"

//Hongxu

The following changes since commit ef627ab364d52fe19994c94c1a78fbe21620a32c:

  local.conf.sample.extended: remove RM_OLD_IMAGE (2016-10-19 17:07:41 +0100)

are available in the git repository at:

  git://git.openembedded.org/openembedded-core-contrib hongxu/fix-font
  http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=hongxu/fix-font

Hongxu Jia (1):
  fontcache: fix fonts postinst failed

 meta/classes/fontcache.bbclass | 4 ++++
 1 file changed, 4 insertions(+)

-- 
2.8.1



^ permalink raw reply

* Re: [PATCH 0/1] systemd: CVE-2016-7795
From: ChenQi @ 2016-10-26  2:09 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1477381190.git.Qi.Chen@windriver.com>

Hi All,

I just realized that my patch does not conform to the CVE patch 
requirement in the link below.
I'll send out V2.

http://openembedded.org/wiki/Commit_Patch_Message_Guidelines#Example:_CVE_patch_header

Best Regards,
Chen Qi

On 10/25/2016 03:40 PM, Chen Qi wrote:
> The following changes since commit 6e96deb024e4c41d911f590ff2b92b402f672661:
>
>    local.conf.sample.extended: remove RM_OLD_IMAGE (2016-10-19 17:07:14 +0100)
>
> are available in the git repository at:
>
>    git://git.openembedded.org/openembedded-core-contrib ChenQi/CVE-2016-7795
>    http://cgit.openembedded.org/cgit.cgi/openembedded-core-contrib/log/?h=ChenQi/CVE-2016-7795
>
> Chen Qi (1):
>    systemd: CVE-2016-7795
>
>   ...s-zero-length-notification-messages-again.patch | 68 ++++++++++++++++++++++
>   meta/recipes-core/systemd/systemd_230.bb           |  1 +
>   2 files changed, 69 insertions(+)
>   create mode 100644 meta/recipes-core/systemd/systemd/0001-pid1-process-zero-length-notification-messages-again.patch
>



^ permalink raw reply

* [PATCH] wic: Add dosfstools-native mtools-native to dependencies
From: Khem Raj @ 2016-10-26  1:50 UTC (permalink / raw)
  To: openembedded-core

these tools are needed for building wic images for some
boards e.g. overo/gumstix

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 meta/classes/image_types.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/image_types.bbclass b/meta/classes/image_types.bbclass
index a7fffbc..be7e38c 100644
--- a/meta/classes/image_types.bbclass
+++ b/meta/classes/image_types.bbclass
@@ -298,7 +298,7 @@ IMAGE_DEPENDS_elf = "virtual/kernel mkelfimage-native"
 IMAGE_DEPENDS_ubi = "mtd-utils-native"
 IMAGE_DEPENDS_ubifs = "mtd-utils-native"
 IMAGE_DEPENDS_multiubi = "mtd-utils-native"
-IMAGE_DEPENDS_wic = "parted-native"
+IMAGE_DEPENDS_wic = "parted-native dosfstools-native mtools-native"
 
 # This variable is available to request which values are suitable for IMAGE_FSTYPES
 IMAGE_TYPES = " \
-- 
2.10.1



^ permalink raw reply related

* [PATCH 0/1] [Krogoth] base-files: fix tty resize check
From: brian avery @ 2016-10-25 23:59 UTC (permalink / raw)
  To: openembedded-core

This backports the 2 changes to base-files /etc/profile that addressed
problems with the way the tty was being checked to decide whether to run
resize or not.  When the tty check has errors, it prevents Eclipse debugging
from working.

-brian avery


The following changes since commit 40f4a6d075236265086cc79400dea3c14720383a:

  bsp-guide: Updated the yocto-bsp create selections in the example. (2016-10-13 23:16:56 +0100)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib bavery/krogoth/basefiles-tty
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=bavery/krogoth/basefiles-tty

Jussi Kukkonen (1):
  This is a backport from master of 2 consecutive fixes.

 meta/recipes-core/base-files/base-files/profile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

--
1.9.1


^ permalink raw reply

* [PATCH 1/1] This is a backport from master of 2 consecutive fixes.
From: brian avery @ 2016-10-25 23:59 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <cover.1477439714.git.brian.avery@intel.com>

From: Jussi Kukkonen <jussi.kukkonen@intel.com>

First fix commit:
1100af93cb07caf24d568c039d52fb0c80714c30
Second fix commit:
b7b2e348716161deb21c9864ac5caa5f1df1fa9c

The error these commits fix can prevent Eclipse debugging on
certain target configurations.

* base-files: Add shell test quoting

  tty can return "not a tt" which results in warnings when /etc/profile
  is executed.

  (From OE-Core rev: eed586dd238efe859442b21b425f04e262bcdb2b)

  Signed-off-by: Jussi Kukkonen <jussi.kukkonen@intel.com>
  Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

* base-files: fix profile error under < /dev/null

  Previous attempts to constrain execution of `resize` to only TTYs did
  not properly handle situations when `tty` would return the string "not a
  tty". The symptom is "/etc/profile: line 34: test: too many arguments".
  Fix this by utilizing the exit code of `tty`. Also use `case` instead of
  `cut` to eliminate a subshell.

  (From OE-Core rev: e67637e4472ff3a1e2801b84ee3d69d4e14b9efc)

  Signed-off-by: Richard Tollerton <rich.tollerton@ni.com>
  Signed-off-by: Ross Burton <ross.burton@intel.com>
  Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>

Signed-off-by: brian avery <brian.avery@intel.com>
---
 meta/recipes-core/base-files/base-files/profile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files/profile b/meta/recipes-core/base-files/base-files/profile
index ba1b9ba..1f02e52 100644
--- a/meta/recipes-core/base-files/base-files/profile
+++ b/meta/recipes-core/base-files/base-files/profile
@@ -28,10 +28,12 @@ if [ -d /etc/profile.d ]; then
   unset i
 fi
 
-if [ -x /usr/bin/resize ];then
+if [ -x /usr/bin/resize ] && termpath="`tty`"; then
   # Make sure we are on a serial console (i.e. the device used starts with /dev/tty),
   # otherwise we confuse e.g. the eclipse launcher which tries do use ssh
-  test `tty | cut -c1-8` = "/dev/tty" && resize >/dev/null
+  case "$termpath" in
+  /dev/tty*) resize >/dev/null
+  esac
 fi
 
 export PATH PS1 OPIEDIR QPEDIR QTDIR EDITOR TERM
-- 
1.9.1



^ permalink raw reply related

* Re: [master][morty][PATCH] libunwind: add ptest support
From: Tudor Florea @ 2016-10-25 21:43 UTC (permalink / raw)
  To: jkrishnanjanappa@mvista.com,
	openembedded-core@lists.openembedded.org
In-Reply-To: <709988291.930326.1477431788589.ref@mail.yahoo.com>

[-- Attachment #1: Type: text/plain, Size: 913 bytes --]

Hi Jagadeesh,

> The patch include below changes:
...
> 2. Some of the libunwind test cases such as run-check-namespace,
>    run-coredump-unwind require debug symbols to be present in
>    libunwind library. So set INHIBIT_PACKAGE_STRIP to "1".
> --- a/meta/recipes-support/libunwind/libunwind_git.bb
> +++ b/meta/recipes-support/libunwind/libunwind_git.bb
...
> +INHIBIT_PACKAGE_STRIP = "1"
> +

The change above have the effect of inhibiting the package strip even if ptest  is not enabled at all. I think this have to be something specific to ptest.
You may consider using INSANE_SKIP_${PN}-ptest [1] and add unstripped binaries needed for ptest in {PN}-ptest (along with the original - stripped - ones) or simply consider the appropriate tests as XFAIL for openembedded.
Regards,
  Tudor.

[1] http://www.yoctoproject.org/docs/2.1/ref-manual/ref-manual.html#ref-classes-insane



[-- Attachment #2: Type: text/html, Size: 2261 bytes --]

^ permalink raw reply

* Re: [PATCH][krogoth] dropbear: Fix multiple CVEs
From: akuster808 @ 2016-10-25 21:11 UTC (permalink / raw)
  To: openembedded-core
In-Reply-To: <1476987951-61774-1-git-send-email-sona.sarmadi@enea.com>

[-- Attachment #1: Type: text/plain, Size: 92135 bytes --]



On 10/20/2016 11:25 AM, Sona Sarmadi wrote:
> CVE-2016-7406
> CVE-2016-7407
> CVE-2016-7408
> CVE-2016-7409

merged to staging.

- armin
>
> Reference:
> https://matt.ucc.asn.au/dropbear/CHANGES
>
> [YOCTO #10443]
>
> Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
> ---
>   meta/recipes-core/dropbear/dropbear.inc            |    4 +
>   .../dropbear/dropbear/CVE-2016-7406.patch          |  104 +
>   .../dropbear/dropbear/CVE-2016-7407.patch          | 2485 ++++++++++++++++++++
>   .../dropbear/dropbear/CVE-2016-7408.patch          |  101 +
>   .../dropbear/dropbear/CVE-2016-7409.patch          |   26 +
>   5 files changed, 2720 insertions(+)
>   create mode 100644 meta/recipes-core/dropbear/dropbear/CVE-2016-7406.patch
>   create mode 100644 meta/recipes-core/dropbear/dropbear/CVE-2016-7407.patch
>   create mode 100644 meta/recipes-core/dropbear/dropbear/CVE-2016-7408.patch
>   create mode 100644 meta/recipes-core/dropbear/dropbear/CVE-2016-7409.patch
>
> diff --git a/meta/recipes-core/dropbear/dropbear.inc b/meta/recipes-core/dropbear/dropbear.inc
> index 923d31c..ee2cd98 100644
> --- a/meta/recipes-core/dropbear/dropbear.inc
> +++ b/meta/recipes-core/dropbear/dropbear.inc
> @@ -17,6 +17,10 @@ SRC_URI = "http://matt.ucc.asn.au/dropbear/releases/dropbear-${PV}.tar.bz2 \
>              file://0003-configure.patch \
>              file://0004-fix-2kb-keys.patch \
>              file://0007-dropbear-fix-for-x32-abi.patch \
> +           file://CVE-2016-7406.patch \
> +           file://CVE-2016-7407.patch \
> +           file://CVE-2016-7408.patch \
> +           file://CVE-2016-7409.patch \
>              file://init \
>              file://dropbearkey.service \
>              file://dropbear@.service \
> diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2016-7406.patch b/meta/recipes-core/dropbear/dropbear/CVE-2016-7406.patch
> new file mode 100644
> index 0000000..22b494c
> --- /dev/null
> +++ b/meta/recipes-core/dropbear/dropbear/CVE-2016-7406.patch
> @@ -0,0 +1,104 @@
> +# HG changeset patch
> +# User Matt Johnston <matt@ucc.asn.au>
> +# Date 1468249773 -28800
> +# Node ID b66a483f3dcb66a70341845dd36e922ddaee4c5a
> +# Parent  eed9376a4ad68e3ae7f17d154dbf126ee66c54bc
> +Improve exit message formatting
> +
> +Patch is backported from:
> +https://secure.ucc.asn.au/hg/dropbear/rev/b66a483f3dcb
> +
> +CVE: CVE-2016-7406
> +Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
> +
> +diff -ruN a/cli-main.c b/cli-main.c
> +--- a/cli-main.c	2016-03-09 15:54:53.000000000 +0100
> ++++ b/cli-main.c	2016-10-20 12:49:00.323501119 +0200
> +@@ -85,29 +85,30 @@
> + #endif /* DBMULTI stuff */
> +
> + static void cli_dropbear_exit(int exitcode, const char* format, va_list param) {
> ++	char exitmsg[150];
> ++	char fullmsg[300];
> +
> +-	char fmtbuf[300];
> +-	char exitmsg[500];
> ++	/* Note that exit message must be rendered before session cleanup */
> +
> ++	/* Render the formatted exit message */
> ++	vsnprintf(exitmsg, sizeof(exitmsg), format, param);
> ++
> ++	/* Add the prefix depending on session/auth state */
> + 	if (!sessinitdone) {
> +-		snprintf(fmtbuf, sizeof(fmtbuf), "Exited: %s",
> +-				format);
> ++		snprintf(fullmsg, sizeof(fullmsg), "Exited: %s", exitmsg);
> + 	} else {
> +-		snprintf(fmtbuf, sizeof(fmtbuf),
> ++		snprintf(fullmsg, sizeof(fullmsg),
> + 				"Connection to %s@%s:%s exited: %s",
> + 				cli_opts.username, cli_opts.remotehost,
> +-				cli_opts.remoteport, format);
> ++				cli_opts.remoteport, exitmsg);
> + 	}
> +
> +-	/* Arguments to the exit printout may be unsafe to use after session_cleanup() */
> +-	vsnprintf(exitmsg, sizeof(exitmsg), fmtbuf, param);
> +-
> + 	/* Do the cleanup first, since then the terminal will be reset */
> + 	session_cleanup();
> + 	/* Avoid printing onwards from terminal cruft */
> + 	fprintf(stderr, "\n");
> +
> +-	dropbear_log(LOG_INFO, "%s", exitmsg);;
> ++	dropbear_log(LOG_INFO, "%s", fullmsg);
> + 	exit(exitcode);
> + }
> +
> +diff -ruN a/svr-session.c b/svr-session.c
> +--- a/svr-session.c	2016-03-09 15:54:54.000000000 +0100
> ++++ b/svr-session.c	2016-10-20 13:27:20.629628336 +0200
> +@@ -145,30 +145,33 @@
> + /* failure exit - format must be <= 100 chars */
> + void svr_dropbear_exit(int exitcode, const char* format, va_list param) {
> +
> +-	char fmtbuf[300];
> ++	char exitmsg[150];
> ++	char fullmsg[300];
> + 	int i;
> +
> ++	/* Render the formatted exit message */
> ++	vsnprintf(exitmsg, sizeof(exitmsg), format, param);
> ++
> ++	/* Add the prefix depending on session/auth state */
> + 	if (!sessinitdone) {
> + 		/* before session init */
> +-		snprintf(fmtbuf, sizeof(fmtbuf),
> +-				"Early exit: %s", format);
> ++                snprintf(fullmsg, sizeof(fullmsg), "Early exit: %s", exitmsg);
> + 	} else if (ses.authstate.authdone) {
> + 		/* user has authenticated */
> +-		snprintf(fmtbuf, sizeof(fmtbuf),
> ++		snprintf(fullmsg, sizeof(fullmsg),
> + 				"Exit (%s): %s",
> +-				ses.authstate.pw_name, format);
> ++				ses.authstate.pw_name, exitmsg);
> + 	} else if (ses.authstate.pw_name) {
> + 		/* we have a potential user */
> +-		snprintf(fmtbuf, sizeof(fmtbuf),
> ++		snprintf(fullmsg, sizeof(fullmsg),
> + 				"Exit before auth (user '%s', %d fails): %s",
> +-				ses.authstate.pw_name, ses.authstate.failcount, format);
> ++				ses.authstate.pw_name, ses.authstate.failcount, exitmsg);
> + 	} else {
> + 		/* before userauth */
> +-		snprintf(fmtbuf, sizeof(fmtbuf),
> +-				"Exit before auth: %s", format);
> ++		snprintf(fullmsg, sizeof(fullmsg), "Exit before auth: %s", exitmsg);
> + 	}
> +
> +-	_dropbear_log(LOG_INFO, fmtbuf, param);
> ++	dropbear_log(LOG_INFO, "%s", fullmsg);
> +
> + #ifdef USE_VFORK
> + 	/* For uclinux only the main server process should cleanup - we don't want
> diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2016-7407.patch b/meta/recipes-core/dropbear/dropbear/CVE-2016-7407.patch
> new file mode 100644
> index 0000000..6cfc3f5
> --- /dev/null
> +++ b/meta/recipes-core/dropbear/dropbear/CVE-2016-7407.patch
> @@ -0,0 +1,2485 @@
> +
> +# HG changeset patch
> +# User Matt Johnston <matt@ucc.asn.au>
> +# Date 1468335601 -28800
> +# Node ID 34e6127ef02eb52d1f1f9494b9cbfe89bec0e925
> +# Parent  6914eedb10721db4833c8f005b4acd37f71fb975
> +merge fixes from PuTTY import.c
> +
> +toint() from misc.c
> +
> +(revids are from hggit conversion)
> +
> +changeset:   4620:60a336a6c85c
> +user:        Simon Tatham <anakin@pobox.com>
> +date:        Thu Feb 25 20:26:33 2016 +0000
> +files:       import.c
> +description:
> +Fix potential segfaults in reading OpenSSH's ASN.1 key format.
> +
> +The length coming back from ber_read_id_len might have overflowed, so
> +treat it as potentially negative. Also, while I'm here, accumulate it
> +inside ber_read_id_len as an unsigned, so as to avoid undefined
> +behaviour on integer overflow, and toint() it before return.
> +
> +Thanks to Hanno Böck for spotting this, with the aid of AFL.
> +
> +(cherry picked from commit 5b7833cd474a24ec098654dcba8cb9509f3bf2c1)
> +
> +Conflicts:
> +	import.c
> +
> +(cherry-picker's note: resolving the conflict involved removing an
> +entire section of the original commit which fixed ECDSA code not
> +present on this branch)
> +
> +
> +changeset:   4619:9c6c638d98d8
> +user:        Simon Tatham <anakin@pobox.com>
> +date:        Sun Jul 14 10:45:54 2013 +0000
> +files:       import.c ssh.c sshdss.c sshpubk.c sshrsa.c
> +description:
> +Tighten up a lot of casts from unsigned to int which are read by one
> +of the GET_32BIT macros and then used as length fields. Missing bounds
> +checks against zero have been added, and also I've introduced a helper
> +function toint() which casts from unsigned to int in such a way as to
> +avoid C undefined behaviour, since I'm not sure I trust compilers any
> +more to do the obviously sensible thing.
> +
> +[originally from svn r9918]
> +
> +
> +changeset:   4618:3957829f24d3
> +user:        Simon Tatham <anakin@pobox.com>
> +date:        Mon Jul 08 22:36:04 2013 +0000
> +files:       import.c sshdss.c sshrsa.c
> +description:
> +Add an assortment of extra safety checks.
> +
> +[originally from svn r9896]
> +
> +
> +changeset:   4617:2cddee0bce12
> +user:        Jacob Nevins <jacobn@chiark.greenend.org.uk>
> +date:        Wed Dec 07 00:24:45 2005 +0000
> +files:       import.c
> +description:
> +Institutional failure to memset() things pointed at rather than pointers.
> +Things should now be zeroed and memory not leaked. Spotted by Brant Thomsen.
> +
> +[originally from svn r6476]
> +
> +
> +changeset:   4616:24ac78a9c71d
> +user:        Simon Tatham <anakin@pobox.com>
> +date:        Wed Feb 11 13:58:27 2004 +0000
> +files:       import.c
> +description:
> +Jacob's last-minute testing found a couple of trivial bugs in
> +import.c, and my attempts to reproduce them in cmdgen found another
> +one there :-)
> +
> +[originally from svn r3847]
> +
> +
> +changeset:   4615:088d39a73db0
> +user:        Simon Tatham <anakin@pobox.com>
> +date:        Thu Jan 22 18:52:49 2004 +0000
> +files:       import.c
> +description:
> +Placate some gcc warnings.
> +
> +[originally from svn r3761]
> +
> +
> +changeset:   4614:e4288bad4d93
> +parent:      1758:108b8924593d
> +user:        Simon Tatham <anakin@pobox.com>
> +date:        Fri Oct 03 21:21:23 2003 +0000
> +files:       import.c
> +description:
> +My ASN.1 decoder returned wrong IDs for anything above 0x1E! Good
> +job it's never had to yet. Ahem.
> +
> +[originally from svn r3479]
> +
> +Patch is backported from:
> +https://secure.ucc.asn.au/hg/dropbear/rev/34e6127ef02e
> +
> +CVE: CVE-2016-7407
> +Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
> +
> +diff -r 6914eedb1072 -r 34e6127ef02e keyimport.c
> +--- a/keyimport.c	Mon Jul 11 23:34:18 2016 +0800
> ++++ b/keyimport.c	Tue Jul 12 23:00:01 2016 +0800
> +@@ -47,65 +47,67 @@
> +   (cp)[0] = (unsigned char)((value) >> 24); } while (0)
> +
> + #define GET_32BIT(cp) \
> +-	(((unsigned long)(unsigned char)(cp)[0] << 24) | \
> +-	((unsigned long)(unsigned char)(cp)[1] << 16) | \
> +-	((unsigned long)(unsigned char)(cp)[2] << 8) | \
> +-	((unsigned long)(unsigned char)(cp)[3]))
> ++    (((unsigned long)(unsigned char)(cp)[0] << 24) | \
> ++    ((unsigned long)(unsigned char)(cp)[1] << 16) | \
> ++    ((unsigned long)(unsigned char)(cp)[2] << 8) | \
> ++    ((unsigned long)(unsigned char)(cp)[3]))
> +
> + static int openssh_encrypted(const char *filename);
> + static sign_key *openssh_read(const char *filename, char *passphrase);
> + static int openssh_write(const char *filename, sign_key *key,
> +-				  char *passphrase);
> ++		  char *passphrase);
> +
> + static int dropbear_write(const char*filename, sign_key * key);
> + static sign_key *dropbear_read(const char* filename);
> +
> ++static int toint(unsigned u);
> ++
> + #if 0
> + static int sshcom_encrypted(const char *filename, char **comment);
> + static struct ssh2_userkey *sshcom_read(const char *filename, char *passphrase);
> + static int sshcom_write(const char *filename, struct ssh2_userkey *key,
> +-				 char *passphrase);
> ++		 char *passphrase);
> + #endif
> +
> + int import_encrypted(const char* filename, int filetype) {
> +
> + 	if (filetype == KEYFILE_OPENSSH) {
> +-		return openssh_encrypted(filename);
> ++	return openssh_encrypted(filename);
> + #if 0
> + 	} else if (filetype == KEYFILE_SSHCOM) {
> + 		return sshcom_encrypted(filename, NULL);
> + #endif
> +-	}
> +-	return 0;
> ++    }
> ++    return 0;
> + }
> +
> + sign_key *import_read(const char *filename, char *passphrase, int filetype) {
> +
> + 	if (filetype == KEYFILE_OPENSSH) {
> +-		return openssh_read(filename, passphrase);
> ++	return openssh_read(filename, passphrase);
> + 	} else if (filetype == KEYFILE_DROPBEAR) {
> + 		return dropbear_read(filename);
> + #if 0
> + 	} else if (filetype == KEYFILE_SSHCOM) {
> +-		return sshcom_read(filename, passphrase);
> ++	return sshcom_read(filename, passphrase);
> + #endif
> + 	}
> +-	return NULL;
> ++    return NULL;
> + }
> +
> + int import_write(const char *filename, sign_key *key, char *passphrase,
> + 		int filetype) {
> +
> + 	if (filetype == KEYFILE_OPENSSH) {
> +-		return openssh_write(filename, key, passphrase);
> ++	return openssh_write(filename, key, passphrase);
> + 	} else if (filetype == KEYFILE_DROPBEAR) {
> + 		return dropbear_write(filename, key);
> + #if 0
> + 	} else if (filetype == KEYFILE_SSHCOM) {
> +-		return sshcom_write(filename, key, passphrase);
> ++	return sshcom_write(filename, key, passphrase);
> + #endif
> + 	}
> +-	return 0;
> ++    return 0;
> + }
> +
> + static sign_key *dropbear_read(const char* filename) {
> +@@ -183,11 +185,11 @@
> +  * Helper routines. (The base64 ones are defined in sshpubk.c.)
> +  */
> +
> +-#define isbase64(c) (	((c) >= 'A' && (c) <= 'Z') || \
> +-						 ((c) >= 'a' && (c) <= 'z') || \
> +-						 ((c) >= '0' && (c) <= '9') || \
> +-						 (c) == '+' || (c) == '/' || (c) == '=' \
> +-						 )
> ++#define isbase64(c) (    ((c) >= 'A' && (c) <= 'Z') || \
> ++                         ((c) >= 'a' && (c) <= 'z') || \
> ++                         ((c) >= '0' && (c) <= '9') || \
> ++                         (c) == '+' || (c) == '/' || (c) == '=' \
> ++                         )
> +
> + /* cpl has to be less than 100 */
> + static void base64_encode_fp(FILE * fp, unsigned char *data,
> +@@ -220,57 +222,58 @@
> +  */
> +
> + /* ASN.1 tag classes. */
> +-#define ASN1_CLASS_UNIVERSAL		(0 << 6)
> +-#define ASN1_CLASS_APPLICATION	  (1 << 6)
> ++#define ASN1_CLASS_UNIVERSAL        (0 << 6)
> ++#define ASN1_CLASS_APPLICATION      (1 << 6)
> + #define ASN1_CLASS_CONTEXT_SPECIFIC (2 << 6)
> +-#define ASN1_CLASS_PRIVATE		  (3 << 6)
> +-#define ASN1_CLASS_MASK			 (3 << 6)
> ++#define ASN1_CLASS_PRIVATE          (3 << 6)
> ++#define ASN1_CLASS_MASK             (3 << 6)
> +
> + /* Primitive versus constructed bit. */
> +-#define ASN1_CONSTRUCTED			(1 << 5)
> ++#define ASN1_CONSTRUCTED            (1 << 5)
> +
> + static int ber_read_id_len(void *source, int sourcelen,
> +-						   int *id, int *length, int *flags)
> ++			   int *id, int *length, int *flags)
> + {
> +-	unsigned char *p = (unsigned char *) source;
> ++    unsigned char *p = (unsigned char *) source;
> +
> +-	if (sourcelen == 0)
> ++    if (sourcelen == 0)
> ++	return -1;
> ++
> ++    *flags = (*p & 0xE0);
> ++    if ((*p & 0x1F) == 0x1F) {
> ++	*id = 0;
> ++	while (*p & 0x80) {
> ++	    p++, sourcelen--;
> ++	    if (sourcelen == 0)
> + 		return -1;
> ++	    *id = (*id << 7) | (*p & 0x7F);
> ++	}
> ++	p++, sourcelen--;
> ++    } else {
> ++	*id = *p & 0x1F;
> ++	p++, sourcelen--;
> ++    }
> +
> +-	*flags = (*p & 0xE0);
> +-	if ((*p & 0x1F) == 0x1F) {
> +-		*id = 0;
> +-		while (*p & 0x80) {
> +-			*id = (*id << 7) | (*p & 0x7F);
> +-			p++, sourcelen--;
> +-			if (sourcelen == 0)
> +-				return -1;
> +-		}
> +-		*id = (*id << 7) | (*p & 0x7F);
> +-		p++, sourcelen--;
> +-	} else {
> +-		*id = *p & 0x1F;
> +-		p++, sourcelen--;
> +-	}
> ++    if (sourcelen == 0)
> ++	return -1;
> +
> +-	if (sourcelen == 0)
> +-		return -1;
> ++    if (*p & 0x80) {
> ++        unsigned len;
> ++	int n = *p & 0x7F;
> ++	p++, sourcelen--;
> ++	if (sourcelen < n)
> ++	    return -1;
> ++	len = 0;
> ++	while (n--)
> ++	    len = (len << 8) | (*p++);
> ++	sourcelen -= n;
> ++        *length = toint(len);
> ++    } else {
> ++	*length = *p;
> ++	p++, sourcelen--;
> ++    }
> +
> +-	if (*p & 0x80) {
> +-		int n = *p & 0x7F;
> +-		p++, sourcelen--;
> +-		if (sourcelen < n)
> +-			return -1;
> +-		*length = 0;
> +-		while (n--)
> +-			*length = (*length << 8) | (*p++);
> +-		sourcelen -= n;
> +-	} else {
> +-		*length = *p;
> +-		p++, sourcelen--;
> +-	}
> +-
> +-	return p - (unsigned char *) source;
> ++    return p - (unsigned char *) source;
> + }
> +
> + /*
> +@@ -281,57 +284,57 @@
> +  */
> + static int ber_write_id_len(void *dest, int id, int length, int flags)
> + {
> +-	unsigned char *d = (unsigned char *)dest;
> +-	int len = 0;
> ++    unsigned char *d = (unsigned char *)dest;
> ++    int len = 0;
> +
> +-	if (id <= 30) {
> +-		/*
> +-		 * Identifier is one byte.
> +-		 */
> +-		len++;
> +-		if (d) *d++ = id | flags;
> +-	} else {
> +-		int n;
> +-		/*
> +-		 * Identifier is multiple bytes: the first byte is 11111
> +-		 * plus the flags, and subsequent bytes encode the value of
> +-		 * the identifier, 7 bits at a time, with the top bit of
> +-		 * each byte 1 except the last one which is 0.
> +-		 */
> +-		len++;
> +-		if (d) *d++ = 0x1F | flags;
> +-		for (n = 1; (id >> (7*n)) > 0; n++)
> +-			continue;					   /* count the bytes */
> +-		while (n--) {
> +-			len++;
> +-			if (d) *d++ = (n ? 0x80 : 0) | ((id >> (7*n)) & 0x7F);
> +-		}
> ++    if (id <= 30) {
> ++	/*
> ++	 * Identifier is one byte.
> ++	 */
> ++	len++;
> ++	if (d) *d++ = id | flags;
> ++    } else {
> ++	int n;
> ++	/*
> ++	 * Identifier is multiple bytes: the first byte is 11111
> ++	 * plus the flags, and subsequent bytes encode the value of
> ++	 * the identifier, 7 bits at a time, with the top bit of
> ++	 * each byte 1 except the last one which is 0.
> ++	 */
> ++	len++;
> ++	if (d) *d++ = 0x1F | flags;
> ++	for (n = 1; (id >> (7*n)) > 0; n++)
> ++	    continue;		       /* count the bytes */
> ++	while (n--) {
> ++	    len++;
> ++	    if (d) *d++ = (n ? 0x80 : 0) | ((id >> (7*n)) & 0x7F);
> + 	}
> ++    }
> +
> +-	if (length < 128) {
> +-		/*
> +-		 * Length is one byte.
> +-		 */
> +-		len++;
> +-		if (d) *d++ = length;
> +-	} else {
> +-		int n;
> +-		/*
> +-		 * Length is multiple bytes. The first is 0x80 plus the
> +-		 * number of subsequent bytes, and the subsequent bytes
> +-		 * encode the actual length.
> +-		 */
> +-		for (n = 1; (length >> (8*n)) > 0; n++)
> +-			continue;					   /* count the bytes */
> +-		len++;
> +-		if (d) *d++ = 0x80 | n;
> +-		while (n--) {
> +-			len++;
> +-			if (d) *d++ = (length >> (8*n)) & 0xFF;
> +-		}
> ++    if (length < 128) {
> ++	/*
> ++	 * Length is one byte.
> ++	 */
> ++	len++;
> ++	if (d) *d++ = length;
> ++    } else {
> ++	int n;
> ++	/*
> ++	 * Length is multiple bytes. The first is 0x80 plus the
> ++	 * number of subsequent bytes, and the subsequent bytes
> ++	 * encode the actual length.
> ++	 */
> ++	for (n = 1; (length >> (8*n)) > 0; n++)
> ++	    continue;		       /* count the bytes */
> ++	len++;
> ++	if (d) *d++ = 0x80 | n;
> ++	while (n--) {
> ++	    len++;
> ++	    if (d) *d++ = (length >> (8*n)) & 0xFF;
> + 	}
> ++    }
> +
> +-	return len;
> ++    return len;
> + }
> +
> +
> +@@ -344,99 +347,99 @@
> +
> + enum { OSSH_DSA, OSSH_RSA, OSSH_EC };
> + struct openssh_key {
> +-	int type;
> +-	int encrypted;
> +-	char iv[32];
> +-	unsigned char *keyblob;
> ++    int type;
> ++    int encrypted;
> ++    char iv[32];
> ++    unsigned char *keyblob;
> + 	unsigned int keyblob_len, keyblob_size;
> + };
> +
> + static struct openssh_key *load_openssh_key(const char *filename)
> + {
> +-	struct openssh_key *ret;
> ++    struct openssh_key *ret;
> + 	FILE *fp = NULL;
> +-	char buffer[256];
> ++    char buffer[256];
> + 	char *errmsg = NULL, *p = NULL;
> +-	int headers_done;
> ++    int headers_done;
> + 	unsigned long len, outlen;
> +
> + 	ret = (struct openssh_key*)m_malloc(sizeof(struct openssh_key));
> +-	ret->keyblob = NULL;
> +-	ret->keyblob_len = ret->keyblob_size = 0;
> +-	ret->encrypted = 0;
> +-	memset(ret->iv, 0, sizeof(ret->iv));
> ++    ret->keyblob = NULL;
> ++    ret->keyblob_len = ret->keyblob_size = 0;
> ++    ret->encrypted = 0;
> ++    memset(ret->iv, 0, sizeof(ret->iv));
> +
> + 	if (strlen(filename) == 1 && filename[0] == '-') {
> + 		fp = stdin;
> + 	} else {
> + 		fp = fopen(filename, "r");
> + 	}
> +-	if (!fp) {
> +-		errmsg = "Unable to open key file";
> +-		goto error;
> +-	}
> +-	if (!fgets(buffer, sizeof(buffer), fp) ||
> +-		0 != strncmp(buffer, "-----BEGIN ", 11) ||
> +-		0 != strcmp(buffer+strlen(buffer)-17, "PRIVATE KEY-----\n")) {
> +-		errmsg = "File does not begin with OpenSSH key header";
> +-		goto error;
> +-	}
> +-	if (!strcmp(buffer, "-----BEGIN RSA PRIVATE KEY-----\n"))
> +-		ret->type = OSSH_RSA;
> +-	else if (!strcmp(buffer, "-----BEGIN DSA PRIVATE KEY-----\n"))
> +-		ret->type = OSSH_DSA;
> ++    if (!fp) {
> ++	errmsg = "Unable to open key file";
> ++	goto error;
> ++    }
> ++    if (!fgets(buffer, sizeof(buffer), fp) ||
> ++	0 != strncmp(buffer, "-----BEGIN ", 11) ||
> ++	0 != strcmp(buffer+strlen(buffer)-17, "PRIVATE KEY-----\n")) {
> ++	errmsg = "File does not begin with OpenSSH key header";
> ++	goto error;
> ++    }
> ++    if (!strcmp(buffer, "-----BEGIN RSA PRIVATE KEY-----\n"))
> ++	ret->type = OSSH_RSA;
> ++    else if (!strcmp(buffer, "-----BEGIN DSA PRIVATE KEY-----\n"))
> ++	ret->type = OSSH_DSA;
> + 	else if (!strcmp(buffer, "-----BEGIN EC PRIVATE KEY-----\n"))
> + 		ret->type = OSSH_EC;
> +-	else {
> +-		errmsg = "Unrecognised key type";
> ++    else {
> ++	errmsg = "Unrecognised key type";
> ++	goto error;
> ++    }
> ++
> ++    headers_done = 0;
> ++    while (1) {
> ++	if (!fgets(buffer, sizeof(buffer), fp)) {
> ++	    errmsg = "Unexpected end of file";
> ++	    goto error;
> ++	}
> ++	if (0 == strncmp(buffer, "-----END ", 9) &&
> ++	    0 == strcmp(buffer+strlen(buffer)-17, "PRIVATE KEY-----\n"))
> ++	    break;		       /* done */
> ++	if ((p = strchr(buffer, ':')) != NULL) {
> ++	    if (headers_done) {
> ++		errmsg = "Header found in body of key data";
> + 		goto error;
> +-	}
> ++	    }
> ++	    *p++ = '\0';
> ++	    while (*p && isspace((unsigned char)*p)) p++;
> ++	    if (!strcmp(buffer, "Proc-Type")) {
> ++		if (p[0] != '4' || p[1] != ',') {
> ++		    errmsg = "Proc-Type is not 4 (only 4 is supported)";
> ++		    goto error;
> ++		}
> ++		p += 2;
> ++		if (!strcmp(p, "ENCRYPTED\n"))
> ++		    ret->encrypted = 1;
> ++	    } else if (!strcmp(buffer, "DEK-Info")) {
> ++		int i, j;
> +
> +-	headers_done = 0;
> +-	while (1) {
> +-		if (!fgets(buffer, sizeof(buffer), fp)) {
> +-			errmsg = "Unexpected end of file";
> +-			goto error;
> ++		if (strncmp(p, "DES-EDE3-CBC,", 13)) {
> ++		    errmsg = "Ciphers other than DES-EDE3-CBC not supported";
> ++		    goto error;
> + 		}
> +-		if (0 == strncmp(buffer, "-----END ", 9) &&
> +-			0 == strcmp(buffer+strlen(buffer)-17, "PRIVATE KEY-----\n"))
> +-			break;					   /* done */
> +-		if ((p = strchr(buffer, ':')) != NULL) {
> +-			if (headers_done) {
> +-				errmsg = "Header found in body of key data";
> +-				goto error;
> +-			}
> +-			*p++ = '\0';
> +-			while (*p && isspace((unsigned char)*p)) p++;
> +-			if (!strcmp(buffer, "Proc-Type")) {
> +-				if (p[0] != '4' || p[1] != ',') {
> +-					errmsg = "Proc-Type is not 4 (only 4 is supported)";
> +-					goto error;
> +-				}
> +-				p += 2;
> +-				if (!strcmp(p, "ENCRYPTED\n"))
> +-					ret->encrypted = 1;
> +-			} else if (!strcmp(buffer, "DEK-Info")) {
> +-				int i, j;
> +-
> +-				if (strncmp(p, "DES-EDE3-CBC,", 13)) {
> +-					errmsg = "Ciphers other than DES-EDE3-CBC not supported";
> +-					goto error;
> +-				}
> +-				p += 13;
> +-				for (i = 0; i < 8; i++) {
> +-					if (1 != sscanf(p, "%2x", &j))
> +-						break;
> +-					ret->iv[i] = j;
> +-					p += 2;
> +-				}
> +-				if (i < 8) {
> +-					errmsg = "Expected 16-digit iv in DEK-Info";
> +-					goto error;
> +-				}
> +-			}
> +-		} else {
> +-			headers_done = 1;
> ++		p += 13;
> ++		for (i = 0; i < 8; i++) {
> ++		    if (1 != sscanf(p, "%2x", &j))
> ++			break;
> ++		    ret->iv[i] = j;
> ++		    p += 2;
> ++		}
> ++		if (i < 8) {
> ++		    errmsg = "Expected 16-digit iv in DEK-Info";
> ++		    goto error;
> ++		}
> ++	    }
> ++	} else {
> ++	    headers_done = 1;
> + 			len = strlen(buffer);
> + 			outlen = len*4/3;
> + 			if (ret->keyblob_len + outlen > ret->keyblob_size) {
> +@@ -448,65 +451,65 @@
> + 			if (base64_decode((const unsigned char *)buffer, len,
> + 						ret->keyblob + ret->keyblob_len, &outlen) != CRYPT_OK){
> + 				errmsg = "Error decoding base64";
> +-				goto error;
> +-			}
> ++                        goto error;
> ++                    }
> + 			ret->keyblob_len += outlen;
> +-		}
> ++                }
> + 	}
> +
> +-	if (ret->keyblob_len == 0 || !ret->keyblob) {
> +-		errmsg = "Key body not present";
> +-		goto error;
> +-	}
> ++    if (ret->keyblob_len == 0 || !ret->keyblob) {
> ++	errmsg = "Key body not present";
> ++	goto error;
> ++    }
> +
> +-	if (ret->encrypted && ret->keyblob_len % 8 != 0) {
> +-		errmsg = "Encrypted key blob is not a multiple of cipher block size";
> +-		goto error;
> +-	}
> ++    if (ret->encrypted && ret->keyblob_len % 8 != 0) {
> ++	errmsg = "Encrypted key blob is not a multiple of cipher block size";
> ++	goto error;
> ++    }
> +
> + 	m_burn(buffer, sizeof(buffer));
> +-	return ret;
> ++    return ret;
> +
> +-	error:
> ++    error:
> + 	m_burn(buffer, sizeof(buffer));
> +-	if (ret) {
> +-		if (ret->keyblob) {
> ++    if (ret) {
> ++	if (ret->keyblob) {
> + 			m_burn(ret->keyblob, ret->keyblob_size);
> + 			m_free(ret->keyblob);
> +-		}
> ++        }
> + 		m_free(ret);
> + 	}
> + 	if (fp) {
> + 		fclose(fp);
> +-	}
> ++    }
> + 	if (errmsg) {
> + 		fprintf(stderr, "Error: %s\n", errmsg);
> + 	}
> +-	return NULL;
> ++    return NULL;
> + }
> +
> + static int openssh_encrypted(const char *filename)
> + {
> +-	struct openssh_key *key = load_openssh_key(filename);
> +-	int ret;
> ++    struct openssh_key *key = load_openssh_key(filename);
> ++    int ret;
> +
> +-	if (!key)
> +-		return 0;
> +-	ret = key->encrypted;
> ++    if (!key)
> ++	return 0;
> ++    ret = key->encrypted;
> + 	m_burn(key->keyblob, key->keyblob_size);
> + 	m_free(key->keyblob);
> + 	m_free(key);
> +-	return ret;
> ++    return ret;
> + }
> +
> + static sign_key *openssh_read(const char *filename, char * UNUSED(passphrase))
> + {
> + 	struct openssh_key *key;
> +-	unsigned char *p;
> +-	int ret, id, len, flags;
> ++    unsigned char *p;
> ++    int ret, id, len, flags;
> + 	int i, num_integers = 0;
> + 	sign_key *retval = NULL;
> +-	char *errmsg;
> ++    char *errmsg;
> + 	unsigned char *modptr = NULL;
> + 	int modlen = -9999;
> + 	enum signkey_type type;
> +@@ -518,86 +521,87 @@
> +
> + 	key = load_openssh_key(filename);
> +
> +-	if (!key)
> +-		return NULL;
> ++    if (!key)
> ++	return NULL;
> +
> +-	if (key->encrypted) {
> ++    if (key->encrypted) {
> + 		errmsg = "encrypted keys not supported currently";
> + 		goto error;
> + #if 0
> + 		/* matt TODO */
> +-		/*
> +-		 * Derive encryption key from passphrase and iv/salt:
> +-		 *
> +-		 *  - let block A equal MD5(passphrase || iv)
> +-		 *  - let block B equal MD5(A || passphrase || iv)
> +-		 *  - block C would be MD5(B || passphrase || iv) and so on
> +-		 *  - encryption key is the first N bytes of A || B
> +-		 */
> +-		struct MD5Context md5c;
> +-		unsigned char keybuf[32];
> ++	/*
> ++	 * Derive encryption key from passphrase and iv/salt:
> ++	 *
> ++	 *  - let block A equal MD5(passphrase || iv)
> ++	 *  - let block B equal MD5(A || passphrase || iv)
> ++	 *  - block C would be MD5(B || passphrase || iv) and so on
> ++	 *  - encryption key is the first N bytes of A || B
> ++	 */
> ++	struct MD5Context md5c;
> ++	unsigned char keybuf[32];
> +
> +-		MD5Init(&md5c);
> +-		MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> +-		MD5Update(&md5c, (unsigned char *)key->iv, 8);
> +-		MD5Final(keybuf, &md5c);
> ++	MD5Init(&md5c);
> ++	MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> ++	MD5Update(&md5c, (unsigned char *)key->iv, 8);
> ++	MD5Final(keybuf, &md5c);
> +
> +-		MD5Init(&md5c);
> +-		MD5Update(&md5c, keybuf, 16);
> +-		MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> +-		MD5Update(&md5c, (unsigned char *)key->iv, 8);
> +-		MD5Final(keybuf+16, &md5c);
> +-
> +-		/*
> +-		 * Now decrypt the key blob.
> +-		 */
> +-		des3_decrypt_pubkey_ossh(keybuf, (unsigned char *)key->iv,
> +-								 key->keyblob, key->keyblob_len);
> +-
> +-		memset(&md5c, 0, sizeof(md5c));
> +-		memset(keybuf, 0, sizeof(keybuf));
> +-#endif
> +-	}
> ++	MD5Init(&md5c);
> ++	MD5Update(&md5c, keybuf, 16);
> ++	MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> ++	MD5Update(&md5c, (unsigned char *)key->iv, 8);
> ++	MD5Final(keybuf+16, &md5c);
> +
> + 	/*
> +-	 * Now we have a decrypted key blob, which contains an ASN.1
> +-	 * encoded private key. We must now untangle the ASN.1.
> +-	 *
> +-	 * We expect the whole key blob to be formatted as a SEQUENCE
> +-	 * (0x30 followed by a length code indicating that the rest of
> +-	 * the blob is part of the sequence). Within that SEQUENCE we
> +-	 * expect to see a bunch of INTEGERs. What those integers mean
> +-	 * depends on the key type:
> +-	 *
> +-	 *  - For RSA, we expect the integers to be 0, n, e, d, p, q,
> +-	 *	dmp1, dmq1, iqmp in that order. (The last three are d mod
> +-	 *	(p-1), d mod (q-1), inverse of q mod p respectively.)
> +-	 *
> +-	 *  - For DSA, we expect them to be 0, p, q, g, y, x in that
> +-	 *	order.
> ++	 * Now decrypt the key blob.
> + 	 */
> +-	
> +-	p = key->keyblob;
> ++	des3_decrypt_pubkey_ossh(keybuf, (unsigned char *)key->iv,
> ++				 key->keyblob, key->keyblob_len);
> +
> +-	/* Expect the SEQUENCE header. Take its absence as a failure to decrypt. */
> +-	ret = ber_read_id_len(p, key->keyblob_len, &id, &len, &flags);
> +-	p += ret;
> +-	if (ret < 0 || id != 16) {
> ++        memset(&md5c, 0, sizeof(md5c));
> ++        memset(keybuf, 0, sizeof(keybuf));
> ++#endif
> ++    }
> ++
> ++    /*
> ++     * Now we have a decrypted key blob, which contains an ASN.1
> ++     * encoded private key. We must now untangle the ASN.1.
> ++     *
> ++     * We expect the whole key blob to be formatted as a SEQUENCE
> ++     * (0x30 followed by a length code indicating that the rest of
> ++     * the blob is part of the sequence). Within that SEQUENCE we
> ++     * expect to see a bunch of INTEGERs. What those integers mean
> ++     * depends on the key type:
> ++     *
> ++     *  - For RSA, we expect the integers to be 0, n, e, d, p, q,
> ++     *    dmp1, dmq1, iqmp in that order. (The last three are d mod
> ++     *    (p-1), d mod (q-1), inverse of q mod p respectively.)
> ++     *
> ++     *  - For DSA, we expect them to be 0, p, q, g, y, x in that
> ++     *    order.
> ++     */
> ++
> ++    p = key->keyblob;
> ++
> ++    /* Expect the SEQUENCE header. Take its absence as a failure to decrypt. */
> ++    ret = ber_read_id_len(p, key->keyblob_len, &id, &len, &flags);
> ++    p += ret;
> ++    if (ret < 0 || id != 16 || len < 0 ||
> ++        key->keyblob+key->keyblob_len-p < len) {
> + 		errmsg = "ASN.1 decoding failure - wrong password?";
> +-		goto error;
> +-	}
> ++	goto error;
> ++    }
> +
> +-	/* Expect a load of INTEGERs. */
> +-	if (key->type == OSSH_RSA)
> +-		num_integers = 9;
> +-	else if (key->type == OSSH_DSA)
> +-		num_integers = 6;
> ++    /* Expect a load of INTEGERs. */
> ++    if (key->type == OSSH_RSA)
> ++	num_integers = 9;
> ++    else if (key->type == OSSH_DSA)
> ++	num_integers = 6;
> + 	else if (key->type == OSSH_EC)
> + 		num_integers = 1;
> +
> +-	/*
> +-	 * Space to create key blob in.
> +-	 */
> ++    /*
> ++     * Space to create key blob in.
> ++     */
> + 	blobbuf = buf_new(3000);
> +
> + #ifdef DROPBEAR_DSS
> +@@ -613,17 +617,17 @@
> + 	}
> + #endif
> +
> +-	for (i = 0; i < num_integers; i++) {
> +-		ret = ber_read_id_len(p, key->keyblob+key->keyblob_len-p,
> +-							  &id, &len, &flags);
> +-		p += ret;
> +-		if (ret < 0 || id != 2 ||
> +-			key->keyblob+key->keyblob_len-p < len) {
> +-			errmsg = "ASN.1 decoding failure";
> +-			goto error;
> +-		}
> ++    for (i = 0; i < num_integers; i++) {
> ++	ret = ber_read_id_len(p, key->keyblob+key->keyblob_len-p,
> ++			      &id, &len, &flags);
> ++	p += ret;
> ++	if (ret < 0 || id != 2 || len < 0 ||
> ++	    key->keyblob+key->keyblob_len-p < len) {
> ++	    errmsg = "ASN.1 decoding failure";
> ++	    goto error;
> ++	}
> +
> +-		if (i == 0) {
> ++	if (i == 0) {
> + 			/* First integer is a version indicator */
> + 			int expected = -1;
> + 			switch (key->type) {
> +@@ -636,35 +640,35 @@
> + 					break;
> + 			}
> + 			if (len != 1 || p[0] != expected) {
> +-				errmsg = "Version number mismatch";
> +-				goto error;
> +-			}
> +-		} else if (key->type == OSSH_RSA) {
> +-			/*
> ++		errmsg = "Version number mismatch";
> ++		goto error;
> ++	    }
> ++	} else if (key->type == OSSH_RSA) {
> ++	    /*
> + 			 * OpenSSH key order is n, e, d, p, q, dmp1, dmq1, iqmp
> + 			 * but we want e, n, d, p, q
> +-			 */
> +-			if (i == 1) {
> +-				/* Save the details for after we deal with number 2. */
> ++	     */
> ++	    if (i == 1) {
> ++		/* Save the details for after we deal with number 2. */
> + 				modptr = p;
> +-				modlen = len;
> ++		modlen = len;
> + 			} else if (i >= 2 && i <= 5) {
> + 				buf_putstring(blobbuf, (const char*)p, len);
> +-				if (i == 2) {
> ++		if (i == 2) {
> + 					buf_putstring(blobbuf, (const char*)modptr, modlen);
> +-				}
> +-			}
> +-		} else if (key->type == OSSH_DSA) {
> +-			/*
> ++		}
> ++	    }
> ++	} else if (key->type == OSSH_DSA) {
> ++	    /*
> + 			 * OpenSSH key order is p, q, g, y, x,
> + 			 * we want the same.
> +-			 */
> ++	     */
> + 			buf_putstring(blobbuf, (const char*)p, len);
> +-		}
> ++	}
> +
> +-		/* Skip past the number. */
> +-		p += len;
> +-	}
> ++	/* Skip past the number. */
> ++	p += len;
> ++    }
> +
> + #ifdef DROPBEAR_ECDSA
> + 	if (key->type == OSSH_EC) {
> +@@ -780,12 +784,12 @@
> + 	}
> + #endif /* DROPBEAR_ECDSA */
> +
> +-	/*
> +-	 * Now put together the actual key. Simplest way to do this is
> +-	 * to assemble our own key blobs and feed them to the createkey
> +-	 * functions; this is a bit faffy but it does mean we get all
> +-	 * the sanity checks for free.
> +-	 */
> ++    /*
> ++     * Now put together the actual key. Simplest way to do this is
> ++     * to assemble our own key blobs and feed them to the createkey
> ++     * functions; this is a bit faffy but it does mean we get all
> ++     * the sanity checks for free.
> ++     */
> + 	if (key->type == OSSH_RSA || key->type == OSSH_DSA) {
> + 		buf_setpos(blobbuf, 0);
> + 		type = DROPBEAR_SIGNKEY_ANY;
> +@@ -794,18 +798,18 @@
> + 			errmsg = "unable to create key structure";
> + 			sign_key_free(retkey);
> + 			retkey = NULL;
> +-			goto error;
> +-		}
> ++	goto error;
> ++    }
> + 	}
> +
> +-	errmsg = NULL;					 /* no error */
> +-	retval = retkey;
> ++    errmsg = NULL;                     /* no error */
> ++    retval = retkey;
> +
> +-	error:
> ++    error:
> + 	if (blobbuf) {
> + 		buf_burn(blobbuf);
> + 		buf_free(blobbuf);
> +-	}
> ++    }
> + 	m_burn(key->keyblob, key->keyblob_size);
> + 	m_free(key->keyblob);
> + 	m_burn(key, sizeof(*key));
> +@@ -813,22 +817,22 @@
> + 	if (errmsg) {
> + 		fprintf(stderr, "Error: %s\n", errmsg);
> + 	}
> +-	return retval;
> ++    return retval;
> + }
> +
> + static int openssh_write(const char *filename, sign_key *key,
> +-				  char *passphrase)
> ++		  char *passphrase)
> + {
> + 	buffer * keyblob = NULL;
> + 	buffer * extrablob = NULL; /* used for calculated values to write */
> + 	unsigned char *outblob = NULL;
> + 	int outlen = -9999;
> +-	struct mpint_pos numbers[9];
> ++    struct mpint_pos numbers[9];
> + 	int nnumbers = -1, pos = 0, len = 0, seqlen, i;
> + 	char *header = NULL, *footer = NULL;
> +-	char zero[1];
> +-	int ret = 0;
> +-	FILE *fp;
> ++    char zero[1];
> ++    int ret = 0;
> ++    FILE *fp;
> +
> + #ifdef DROPBEAR_RSA
> + 	mp_int dmp1, dmq1, iqmp, tmpval; /* for rsa */
> +@@ -843,9 +847,9 @@
> + #endif
> + 			0)
> + 	{
> +-		/*
> +-		 * Fetch the key blobs.
> +-		 */
> ++    /*
> ++     * Fetch the key blobs.
> ++     */
> + 		keyblob = buf_new(3000);
> + 		buf_put_priv_key(keyblob, key, key->type);
> +
> +@@ -853,10 +857,10 @@
> + 		/* skip the "ssh-rsa" or "ssh-dss" header */
> + 		buf_incrpos(keyblob, buf_getint(keyblob));
> +
> +-		/*
> +-		 * Find the sequence of integers to be encoded into the OpenSSH
> +-		 * key blob, and also decide on the header line.
> +-		 */
> ++    /*
> ++     * Find the sequence of integers to be encoded into the OpenSSH
> ++     * key blob, and also decide on the header line.
> ++     */
> + 		numbers[0].start = zero; numbers[0].bytes = 1; zero[0] = '\0';
> +
> + 	#ifdef DROPBEAR_RSA
> +@@ -871,17 +875,17 @@
> + 			numbers[2].bytes = buf_getint(keyblob);
> + 			numbers[2].start = buf_getptr(keyblob, numbers[2].bytes);
> + 			buf_incrpos(keyblob, numbers[2].bytes);
> +-			
> ++
> + 			/* n */
> + 			numbers[1].bytes = buf_getint(keyblob);
> + 			numbers[1].start = buf_getptr(keyblob, numbers[1].bytes);
> + 			buf_incrpos(keyblob, numbers[1].bytes);
> +-			
> ++
> + 			/* d */
> + 			numbers[3].bytes = buf_getint(keyblob);
> + 			numbers[3].start = buf_getptr(keyblob, numbers[3].bytes);
> + 			buf_incrpos(keyblob, numbers[3].bytes);
> +-			
> ++
> + 			/* p */
> + 			numbers[4].bytes = buf_getint(keyblob);
> + 			numbers[4].start = buf_getptr(keyblob, numbers[4].bytes);
> +@@ -949,9 +953,9 @@
> + 			numbers[8].start = buf_getptr(extrablob, numbers[8].bytes);
> + 			buf_incrpos(extrablob, numbers[8].bytes);
> +
> +-			nnumbers = 9;
> +-			header = "-----BEGIN RSA PRIVATE KEY-----\n";
> +-			footer = "-----END RSA PRIVATE KEY-----\n";
> ++        nnumbers = 9;
> ++        header = "-----BEGIN RSA PRIVATE KEY-----\n";
> ++        footer = "-----END RSA PRIVATE KEY-----\n";
> + 		}
> + 	#endif /* DROPBEAR_RSA */
> +
> +@@ -983,45 +987,45 @@
> + 			numbers[5].start = buf_getptr(keyblob, numbers[5].bytes);
> + 			buf_incrpos(keyblob, numbers[5].bytes);
> +
> +-			nnumbers = 6;
> +-			header = "-----BEGIN DSA PRIVATE KEY-----\n";
> +-			footer = "-----END DSA PRIVATE KEY-----\n";
> +-		}
> ++        nnumbers = 6;
> ++        header = "-----BEGIN DSA PRIVATE KEY-----\n";
> ++        footer = "-----END DSA PRIVATE KEY-----\n";
> ++    }
> + 	#endif /* DROPBEAR_DSS */
> +
> +-		/*
> +-		 * Now count up the total size of the ASN.1 encoded integers,
> +-		 * so as to determine the length of the containing SEQUENCE.
> +-		 */
> +-		len = 0;
> +-		for (i = 0; i < nnumbers; i++) {
> +-			len += ber_write_id_len(NULL, 2, numbers[i].bytes, 0);
> +-			len += numbers[i].bytes;
> +-		}
> +-		seqlen = len;
> +-		/* Now add on the SEQUENCE header. */
> +-		len += ber_write_id_len(NULL, 16, seqlen, ASN1_CONSTRUCTED);
> +-		/* Round up to the cipher block size, ensuring we have at least one
> +-		 * byte of padding (see below). */
> +-		outlen = len;
> +-		if (passphrase)
> +-			outlen = (outlen+8) &~ 7;
> ++    /*
> ++     * Now count up the total size of the ASN.1 encoded integers,
> ++     * so as to determine the length of the containing SEQUENCE.
> ++     */
> ++    len = 0;
> ++    for (i = 0; i < nnumbers; i++) {
> ++	len += ber_write_id_len(NULL, 2, numbers[i].bytes, 0);
> ++	len += numbers[i].bytes;
> ++    }
> ++    seqlen = len;
> ++    /* Now add on the SEQUENCE header. */
> ++    len += ber_write_id_len(NULL, 16, seqlen, ASN1_CONSTRUCTED);
> ++    /* Round up to the cipher block size, ensuring we have at least one
> ++     * byte of padding (see below). */
> ++    outlen = len;
> ++    if (passphrase)
> ++	outlen = (outlen+8) &~ 7;
> +
> +-		/*
> +-		 * Now we know how big outblob needs to be. Allocate it.
> +-		 */
> ++    /*
> ++     * Now we know how big outblob needs to be. Allocate it.
> ++     */
> + 		outblob = (unsigned char*)m_malloc(outlen);
> +
> +-		/*
> +-		 * And write the data into it.
> +-		 */
> +-		pos = 0;
> +-		pos += ber_write_id_len(outblob+pos, 16, seqlen, ASN1_CONSTRUCTED);
> +-		for (i = 0; i < nnumbers; i++) {
> +-			pos += ber_write_id_len(outblob+pos, 2, numbers[i].bytes, 0);
> +-			memcpy(outblob+pos, numbers[i].start, numbers[i].bytes);
> +-			pos += numbers[i].bytes;
> +-		}
> ++    /*
> ++     * And write the data into it.
> ++     */
> ++    pos = 0;
> ++    pos += ber_write_id_len(outblob+pos, 16, seqlen, ASN1_CONSTRUCTED);
> ++    for (i = 0; i < nnumbers; i++) {
> ++	pos += ber_write_id_len(outblob+pos, 2, numbers[i].bytes, 0);
> ++	memcpy(outblob+pos, numbers[i].start, numbers[i].bytes);
> ++	pos += numbers[i].bytes;
> ++    }
> + 	} /* end RSA and DSS handling */
> +
> + #ifdef DROPBEAR_ECDSA
> +@@ -1116,40 +1120,40 @@
> + 	}
> + #endif
> +
> +-	/*
> +-	 * Padding on OpenSSH keys is deterministic. The number of
> +-	 * padding bytes is always more than zero, and always at most
> +-	 * the cipher block length. The value of each padding byte is
> +-	 * equal to the number of padding bytes. So a plaintext that's
> +-	 * an exact multiple of the block size will be padded with 08
> +-	 * 08 08 08 08 08 08 08 (assuming a 64-bit block cipher); a
> +-	 * plaintext one byte less than a multiple of the block size
> +-	 * will be padded with just 01.
> +-	 *
> +-	 * This enables the OpenSSL key decryption function to strip
> +-	 * off the padding algorithmically and return the unpadded
> +-	 * plaintext to the next layer: it looks at the final byte, and
> +-	 * then expects to find that many bytes at the end of the data
> +-	 * with the same value. Those are all removed and the rest is
> +-	 * returned.
> +-	 */
> ++    /*
> ++     * Padding on OpenSSH keys is deterministic. The number of
> ++     * padding bytes is always more than zero, and always at most
> ++     * the cipher block length. The value of each padding byte is
> ++     * equal to the number of padding bytes. So a plaintext that's
> ++     * an exact multiple of the block size will be padded with 08
> ++     * 08 08 08 08 08 08 08 (assuming a 64-bit block cipher); a
> ++     * plaintext one byte less than a multiple of the block size
> ++     * will be padded with just 01.
> ++     *
> ++     * This enables the OpenSSL key decryption function to strip
> ++     * off the padding algorithmically and return the unpadded
> ++     * plaintext to the next layer: it looks at the final byte, and
> ++     * then expects to find that many bytes at the end of the data
> ++     * with the same value. Those are all removed and the rest is
> ++     * returned.
> ++     */
> + 	dropbear_assert(pos == len);
> +-	while (pos < outlen) {
> +-		outblob[pos++] = outlen - len;
> +-	}
> ++    while (pos < outlen) {
> ++        outblob[pos++] = outlen - len;
> ++    }
> +
> +-	/*
> +-	 * Encrypt the key.
> +-	 */
> +-	if (passphrase) {
> ++    /*
> ++     * Encrypt the key.
> ++     */
> ++    if (passphrase) {
> + 		fprintf(stderr, "Encrypted keys aren't supported currently\n");
> + 		goto error;
> +-	}
> ++    }
> +
> +-	/*
> +-	 * And save it. We'll use Unix line endings just in case it's
> +-	 * subsequently transferred in binary mode.
> +-	 */
> ++    /*
> ++     * And save it. We'll use Unix line endings just in case it's
> ++     * subsequently transferred in binary mode.
> ++     */
> + 	if (strlen(filename) == 1 && filename[0] == '-') {
> + 		fp = stdout;
> + 	} else {
> +@@ -1157,28 +1161,28 @@
> + 	}
> + 	if (!fp) {
> + 		fprintf(stderr, "Failed opening output file\n");
> +-		goto error;
> ++	goto error;
> + 	}
> +-	fputs(header, fp);
> ++    fputs(header, fp);
> + 	base64_encode_fp(fp, outblob, outlen, 64);
> +-	fputs(footer, fp);
> +-	fclose(fp);
> +-	ret = 1;
> ++    fputs(footer, fp);
> ++    fclose(fp);
> ++    ret = 1;
> +
> +-	error:
> +-	if (outblob) {
> +-		memset(outblob, 0, outlen);
> ++    error:
> ++    if (outblob) {
> ++        memset(outblob, 0, outlen);
> + 		m_free(outblob);
> +-	}
> ++    }
> + 	if (keyblob) {
> + 		buf_burn(keyblob);
> + 		buf_free(keyblob);
> +-	}
> ++    }
> + 	if (extrablob) {
> + 		buf_burn(extrablob);
> + 		buf_free(extrablob);
> +-	}
> +-	return ret;
> ++    }
> ++    return ret;
> + }
> +
> + #if 0
> +@@ -1196,10 +1200,10 @@
> +  *
> +  * So. The blob contains:
> +  *
> +- *  - uint32 0x3f6ff9eb	   (magic number)
> +- *  - uint32 size			 (total blob size)
> +- *  - string key-type		 (see below)
> +- *  - string cipher-type	  (tells you if key is encrypted)
> ++ *  - uint32 0x3f6ff9eb       (magic number)
> ++ *  - uint32 size             (total blob size)
> ++ *  - string key-type         (see below)
> ++ *  - string cipher-type      (tells you if key is encrypted)
> +  *  - string encrypted-blob
> +  *
> +  * (The first size field includes the size field itself and the
> +@@ -1255,654 +1259,679 @@
> +  *  - first 16 bytes are MD5(passphrase)
> +  *  - next 16 bytes are MD5(passphrase || first 16 bytes)
> +  *  - if there were more, they'd be MD5(passphrase || first 32),
> +- *	and so on.
> ++ *    and so on.
> +  */
> +
> + #define SSHCOM_MAGIC_NUMBER 0x3f6ff9eb
> +
> + struct sshcom_key {
> +-	char comment[256];				 /* allowing any length is overkill */
> +-	unsigned char *keyblob;
> +-	int keyblob_len, keyblob_size;
> ++    char comment[256];                 /* allowing any length is overkill */
> ++    unsigned char *keyblob;
> ++    int keyblob_len, keyblob_size;
> + };
> +
> + static struct sshcom_key *load_sshcom_key(const char *filename)
> + {
> +-	struct sshcom_key *ret;
> +-	FILE *fp;
> +-	char buffer[256];
> +-	int len;
> +-	char *errmsg, *p;
> +-	int headers_done;
> +-	char base64_bit[4];
> +-	int base64_chars = 0;
> ++    struct sshcom_key *ret;
> ++    FILE *fp;
> ++    char buffer[256];
> ++    int len;
> ++    char *errmsg, *p;
> ++    int headers_done;
> ++    char base64_bit[4];
> ++    int base64_chars = 0;
> +
> +-	ret = snew(struct sshcom_key);
> +-	ret->comment[0] = '\0';
> +-	ret->keyblob = NULL;
> +-	ret->keyblob_len = ret->keyblob_size = 0;
> ++    ret = snew(struct sshcom_key);
> ++    ret->comment[0] = '\0';
> ++    ret->keyblob = NULL;
> ++    ret->keyblob_len = ret->keyblob_size = 0;
> +
> + 	fp = fopen(filename, "r");
> +-	if (!fp) {
> +-		errmsg = "Unable to open key file";
> ++    if (!fp) {
> ++	errmsg = "Unable to open key file";
> ++	goto error;
> ++    }
> ++    if (!fgets(buffer, sizeof(buffer), fp) ||
> ++	0 != strcmp(buffer, "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----\n")) {
> ++	errmsg = "File does not begin with ssh.com key header";
> ++	goto error;
> ++    }
> ++
> ++    headers_done = 0;
> ++    while (1) {
> ++	if (!fgets(buffer, sizeof(buffer), fp)) {
> ++	    errmsg = "Unexpected end of file";
> ++	    goto error;
> ++	}
> ++        if (!strcmp(buffer, "---- END SSH2 ENCRYPTED PRIVATE KEY ----\n"))
> ++            break;                     /* done */
> ++	if ((p = strchr(buffer, ':')) != NULL) {
> ++	    if (headers_done) {
> ++		errmsg = "Header found in body of key data";
> + 		goto error;
> ++	    }
> ++	    *p++ = '\0';
> ++	    while (*p && isspace((unsigned char)*p)) p++;
> ++            /*
> ++             * Header lines can end in a trailing backslash for
> ++             * continuation.
> ++             */
> ++            while ((len = strlen(p)) > (int)(sizeof(buffer) - (p-buffer) -1) ||
> ++                   p[len-1] != '\n' || p[len-2] == '\\') {
> ++                if (len > (int)((p-buffer) + sizeof(buffer)-2)) {
> ++                    errmsg = "Header line too long to deal with";
> ++                    goto error;
> ++                }
> ++                if (!fgets(p+len-2, sizeof(buffer)-(p-buffer)-(len-2), fp)) {
> ++                    errmsg = "Unexpected end of file";
> ++                    goto error;
> ++                }
> ++            }
> ++            p[strcspn(p, "\n")] = '\0';
> ++            if (!strcmp(buffer, "Comment")) {
> ++                /* Strip quotes in comment if present. */
> ++                if (p[0] == '"' && p[strlen(p)-1] == '"') {
> ++                    p++;
> ++                    p[strlen(p)-1] = '\0';
> ++                }
> ++                strncpy(ret->comment, p, sizeof(ret->comment));
> ++                ret->comment[sizeof(ret->comment)-1] = '\0';
> ++            }
> ++	} else {
> ++	    headers_done = 1;
> ++
> ++	    p = buffer;
> ++	    while (isbase64(*p)) {
> ++                base64_bit[base64_chars++] = *p;
> ++                if (base64_chars == 4) {
> ++                    unsigned char out[3];
> ++
> ++                    base64_chars = 0;
> ++
> ++                    len = base64_decode_atom(base64_bit, out);
> ++
> ++                    if (len <= 0) {
> ++                        errmsg = "Invalid base64 encoding";
> ++                        goto error;
> ++                    }
> ++
> ++                    if (ret->keyblob_len + len > ret->keyblob_size) {
> ++                        ret->keyblob_size = ret->keyblob_len + len + 256;
> ++                        ret->keyblob = sresize(ret->keyblob, ret->keyblob_size,
> ++					       unsigned char);
> ++                    }
> ++
> ++                    memcpy(ret->keyblob + ret->keyblob_len, out, len);
> ++                    ret->keyblob_len += len;
> ++                }
> ++
> ++		p++;
> ++	    }
> + 	}
> +-	if (!fgets(buffer, sizeof(buffer), fp) ||
> +-		0 != strcmp(buffer, "---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----\n")) {
> +-		errmsg = "File does not begin with ssh.com key header";
> +-		goto error;
> +-	}
> ++    }
> +
> +-	headers_done = 0;
> +-	while (1) {
> +-		if (!fgets(buffer, sizeof(buffer), fp)) {
> +-			errmsg = "Unexpected end of file";
> +-			goto error;
> +-		}
> +-		if (!strcmp(buffer, "---- END SSH2 ENCRYPTED PRIVATE KEY ----\n"))
> +-			break;					 /* done */
> +-		if ((p = strchr(buffer, ':')) != NULL) {
> +-			if (headers_done) {
> +-				errmsg = "Header found in body of key data";
> +-				goto error;
> +-			}
> +-			*p++ = '\0';
> +-			while (*p && isspace((unsigned char)*p)) p++;
> +-			/*
> +-			 * Header lines can end in a trailing backslash for
> +-			 * continuation.
> +-			 */
> +-			while ((len = strlen(p)) > (int)(sizeof(buffer) - (p-buffer) -1) ||
> +-				   p[len-1] != '\n' || p[len-2] == '\\') {
> +-				if (len > (int)((p-buffer) + sizeof(buffer)-2)) {
> +-					errmsg = "Header line too long to deal with";
> +-					goto error;
> +-				}
> +-				if (!fgets(p+len-2, sizeof(buffer)-(p-buffer)-(len-2), fp)) {
> +-					errmsg = "Unexpected end of file";
> +-					goto error;
> +-				}
> +-			}
> +-			p[strcspn(p, "\n")] = '\0';
> +-			if (!strcmp(buffer, "Comment")) {
> +-				/* Strip quotes in comment if present. */
> +-				if (p[0] == '"' && p[strlen(p)-1] == '"') {
> +-					p++;
> +-					p[strlen(p)-1] = '\0';
> +-				}
> +-				strncpy(ret->comment, p, sizeof(ret->comment));
> +-				ret->comment[sizeof(ret->comment)-1] = '\0';
> +-			}
> +-		} else {
> +-			headers_done = 1;
> ++    if (ret->keyblob_len == 0 || !ret->keyblob) {
> ++	errmsg = "Key body not present";
> ++	goto error;
> ++    }
> +
> +-			p = buffer;
> +-			while (isbase64(*p)) {
> +-				base64_bit[base64_chars++] = *p;
> +-				if (base64_chars == 4) {
> +-					unsigned char out[3];
> ++    return ret;
> +
> +-					base64_chars = 0;
> +-
> +-					len = base64_decode_atom(base64_bit, out);
> +-
> +-					if (len <= 0) {
> +-						errmsg = "Invalid base64 encoding";
> +-						goto error;
> +-					}
> +-
> +-					if (ret->keyblob_len + len > ret->keyblob_size) {
> +-						ret->keyblob_size = ret->keyblob_len + len + 256;
> +-						ret->keyblob = sresize(ret->keyblob, ret->keyblob_size,
> +-											   unsigned char);
> +-					}
> +-
> +-					memcpy(ret->keyblob + ret->keyblob_len, out, len);
> +-					ret->keyblob_len += len;
> +-				}
> +-
> +-				p++;
> +-			}
> +-		}
> +-	}
> +-
> +-	if (ret->keyblob_len == 0 || !ret->keyblob) {
> +-		errmsg = "Key body not present";
> +-		goto error;
> +-	}
> +-
> +-	return ret;
> +-
> +-	error:
> +-	if (ret) {
> +-		if (ret->keyblob) {
> +-			memset(ret->keyblob, 0, ret->keyblob_size);
> ++    error:
> ++    if (ret) {
> ++	if (ret->keyblob) {
> ++            memset(ret->keyblob, 0, ret->keyblob_size);
> + 			m_free(ret->keyblob);
> +-		}
> +-		memset(&ret, 0, sizeof(ret));
> ++        }
> ++        memset(ret, 0, sizeof(*ret));
> + 		m_free(ret);
> +-	}
> +-	return NULL;
> ++    }
> ++    return NULL;
> + }
> +
> + int sshcom_encrypted(const char *filename, char **comment)
> + {
> +-	struct sshcom_key *key = load_sshcom_key(filename);
> +-	int pos, len, answer;
> ++    struct sshcom_key *key = load_sshcom_key(filename);
> ++    int pos, len, answer;
> +
> +-	*comment = NULL;
> +-	if (!key)
> +-		return 0;
> ++    *comment = NULL;
> ++    if (!key)
> ++        return 0;
> +
> +-	/*
> +-	 * Check magic number.
> +-	 */
> +-	if (GET_32BIT(key->keyblob) != 0x3f6ff9eb)
> +-		return 0;					  /* key is invalid */
> ++    /*
> ++     * Check magic number.
> ++     */
> ++    if (GET_32BIT(key->keyblob) != 0x3f6ff9eb)
> ++        return 0;                      /* key is invalid */
> +
> +-	/*
> +-	 * Find the cipher-type string.
> +-	 */
> +-	answer = 0;
> +-	pos = 8;
> +-	if (key->keyblob_len < pos+4)
> +-		goto done;					 /* key is far too short */
> +-	pos += 4 + GET_32BIT(key->keyblob + pos);   /* skip key type */
> +-	if (key->keyblob_len < pos+4)
> +-		goto done;					 /* key is far too short */
> +-	len = GET_32BIT(key->keyblob + pos);   /* find cipher-type length */
> +-	if (key->keyblob_len < pos+4+len)
> +-		goto done;					 /* cipher type string is incomplete */
> +-	if (len != 4 || 0 != memcmp(key->keyblob + pos + 4, "none", 4))
> +-		answer = 1;
> ++    /*
> ++     * Find the cipher-type string.
> ++     */
> ++    answer = 0;
> ++    pos = 8;
> ++    if (key->keyblob_len < pos+4)
> ++        goto done;                     /* key is far too short */
> ++    len = toint(GET_32BIT(key->keyblob + pos));
> ++    if (len < 0 || len > key->keyblob_len - pos - 4)
> ++        goto done;                     /* key is far too short */
> ++    pos += 4 + len;                    /* skip key type */
> ++    len = toint(GET_32BIT(key->keyblob + pos)); /* find cipher-type length */
> ++    if (len < 0 || len > key->keyblob_len - pos - 4)
> ++        goto done;                     /* cipher type string is incomplete */
> ++    if (len != 4 || 0 != memcmp(key->keyblob + pos + 4, "none", 4))
> ++        answer = 1;
> +
> +-	done:
> +-	*comment = dupstr(key->comment);
> +-	memset(key->keyblob, 0, key->keyblob_size);
> ++    done:
> ++    *comment = dupstr(key->comment);
> ++    memset(key->keyblob, 0, key->keyblob_size);
> + 	m_free(key->keyblob);
> +-	memset(&key, 0, sizeof(key));
> ++    memset(key, 0, sizeof(*key));
> + 	m_free(key);
> +-	return answer;
> ++    return answer;
> + }
> +
> + static int sshcom_read_mpint(void *data, int len, struct mpint_pos *ret)
> + {
> +-	int bits;
> +-	int bytes;
> +-	unsigned char *d = (unsigned char *) data;
> ++    unsigned bits, bytes;
> ++    unsigned char *d = (unsigned char *) data;
> +
> +-	if (len < 4)
> +-		goto error;
> +-	bits = GET_32BIT(d);
> ++    if (len < 4)
> ++        goto error;
> ++    bits = GET_32BIT(d);
> +
> +-	bytes = (bits + 7) / 8;
> +-	if (len < 4+bytes)
> +-		goto error;
> ++    bytes = (bits + 7) / 8;
> ++    if (len < 4+bytes)
> ++        goto error;
> +
> +-	ret->start = d + 4;
> +-	ret->bytes = bytes;
> +-	return bytes+4;
> ++    ret->start = d + 4;
> ++    ret->bytes = bytes;
> ++    return bytes+4;
> +
> +-	error:
> +-	ret->start = NULL;
> +-	ret->bytes = -1;
> +-	return len;						/* ensure further calls fail as well */
> ++    error:
> ++    ret->start = NULL;
> ++    ret->bytes = -1;
> ++    return len;                        /* ensure further calls fail as well */
> + }
> +
> + static int sshcom_put_mpint(void *target, void *data, int len)
> + {
> +-	unsigned char *d = (unsigned char *)target;
> +-	unsigned char *i = (unsigned char *)data;
> +-	int bits = len * 8 - 1;
> ++    unsigned char *d = (unsigned char *)target;
> ++    unsigned char *i = (unsigned char *)data;
> ++    int bits = len * 8 - 1;
> +
> +-	while (bits > 0) {
> +-		if (*i & (1 << (bits & 7)))
> +-			break;
> +-		if (!(bits-- & 7))
> +-			i++, len--;
> +-	}
> ++    while (bits > 0) {
> ++	if (*i & (1 << (bits & 7)))
> ++	    break;
> ++	if (!(bits-- & 7))
> ++	    i++, len--;
> ++    }
> +
> +-	PUT_32BIT(d, bits+1);
> +-	memcpy(d+4, i, len);
> +-	return len+4;
> ++    PUT_32BIT(d, bits+1);
> ++    memcpy(d+4, i, len);
> ++    return len+4;
> + }
> +
> + sign_key *sshcom_read(const char *filename, char *passphrase)
> + {
> +-	struct sshcom_key *key = load_sshcom_key(filename);
> +-	char *errmsg;
> +-	int pos, len;
> +-	const char prefix_rsa[] = "if-modn{sign{rsa";
> +-	const char prefix_dsa[] = "dl-modp{sign{dsa";
> +-	enum { RSA, DSA } type;
> +-	int encrypted;
> +-	char *ciphertext;
> +-	int cipherlen;
> +-	struct ssh2_userkey *ret = NULL, *retkey;
> +-	const struct ssh_signkey *alg;
> +-	unsigned char *blob = NULL;
> +-	int blobsize, publen, privlen;
> ++    struct sshcom_key *key = load_sshcom_key(filename);
> ++    char *errmsg;
> ++    int pos, len;
> ++    const char prefix_rsa[] = "if-modn{sign{rsa";
> ++    const char prefix_dsa[] = "dl-modp{sign{dsa";
> ++    enum { RSA, DSA } type;
> ++    int encrypted;
> ++    char *ciphertext;
> ++    int cipherlen;
> ++    struct ssh2_userkey *ret = NULL, *retkey;
> ++    const struct ssh_signkey *alg;
> ++    unsigned char *blob = NULL;
> ++    int blobsize = 0, publen, privlen;
> +
> +-	if (!key)
> +-		return NULL;
> ++    if (!key)
> ++        return NULL;
> ++
> ++    /*
> ++     * Check magic number.
> ++     */
> ++    if (GET_32BIT(key->keyblob) != SSHCOM_MAGIC_NUMBER) {
> ++        errmsg = "Key does not begin with magic number";
> ++        goto error;
> ++    }
> ++
> ++    /*
> ++     * Determine the key type.
> ++     */
> ++    pos = 8;
> ++    if (key->keyblob_len < pos+4 ||
> ++        (len = GET_32BIT(key->keyblob + pos)) > key->keyblob_len - pos - 4) {
> ++        errmsg = "Key blob does not contain a key type string";
> ++        goto error;
> ++    }
> ++    if (len > sizeof(prefix_rsa) - 1 &&
> ++        !memcmp(key->keyblob+pos+4, prefix_rsa, sizeof(prefix_rsa) - 1)) {
> ++        type = RSA;
> ++    } else if (len > sizeof(prefix_dsa) - 1 &&
> ++        !memcmp(key->keyblob+pos+4, prefix_dsa, sizeof(prefix_dsa) - 1)) {
> ++        type = DSA;
> ++    } else {
> ++        errmsg = "Key is of unknown type";
> ++        goto error;
> ++    }
> ++    pos += 4+len;
> ++
> ++    /*
> ++     * Determine the cipher type.
> ++     */
> ++    if (key->keyblob_len < pos+4 ||
> ++        (len = GET_32BIT(key->keyblob + pos)) > key->keyblob_len - pos - 4) {
> ++        errmsg = "Key blob does not contain a cipher type string";
> ++        goto error;
> ++    }
> ++    if (len == 4 && !memcmp(key->keyblob+pos+4, "none", 4))
> ++        encrypted = 0;
> ++    else if (len == 8 && !memcmp(key->keyblob+pos+4, "3des-cbc", 8))
> ++        encrypted = 1;
> ++    else {
> ++        errmsg = "Key encryption is of unknown type";
> ++        goto error;
> ++    }
> ++    pos += 4+len;
> ++
> ++    /*
> ++     * Get hold of the encrypted part of the key.
> ++     */
> ++    if (key->keyblob_len < pos+4 ||
> ++        (len = GET_32BIT(key->keyblob + pos)) > key->keyblob_len - pos - 4) {
> ++        errmsg = "Key blob does not contain actual key data";
> ++        goto error;
> ++    }
> ++    ciphertext = (char *)key->keyblob + pos + 4;
> ++    cipherlen = len;
> ++    if (cipherlen == 0) {
> ++        errmsg = "Length of key data is zero";
> ++        goto error;
> ++    }
> ++
> ++    /*
> ++     * Decrypt it if necessary.
> ++     */
> ++    if (encrypted) {
> ++	/*
> ++	 * Derive encryption key from passphrase and iv/salt:
> ++	 *
> ++	 *  - let block A equal MD5(passphrase)
> ++	 *  - let block B equal MD5(passphrase || A)
> ++	 *  - block C would be MD5(passphrase || A || B) and so on
> ++	 *  - encryption key is the first N bytes of A || B
> ++	 */
> ++	struct MD5Context md5c;
> ++	unsigned char keybuf[32], iv[8];
> ++
> ++        if (cipherlen % 8 != 0) {
> ++            errmsg = "Encrypted part of key is not a multiple of cipher block"
> ++                " size";
> ++            goto error;
> ++        }
> ++
> ++	MD5Init(&md5c);
> ++	MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> ++	MD5Final(keybuf, &md5c);
> ++
> ++	MD5Init(&md5c);
> ++	MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> ++	MD5Update(&md5c, keybuf, 16);
> ++	MD5Final(keybuf+16, &md5c);
> +
> + 	/*
> +-	 * Check magic number.
> ++	 * Now decrypt the key blob.
> + 	 */
> +-	if (GET_32BIT(key->keyblob) != SSHCOM_MAGIC_NUMBER) {
> +-		errmsg = "Key does not begin with magic number";
> +-		goto error;
> +-	}
> ++        memset(iv, 0, sizeof(iv));
> ++	des3_decrypt_pubkey_ossh(keybuf, iv, (unsigned char *)ciphertext,
> ++				 cipherlen);
> +
> +-	/*
> +-	 * Determine the key type.
> +-	 */
> +-	pos = 8;
> +-	if (key->keyblob_len < pos+4 ||
> +-		(len = GET_32BIT(key->keyblob + pos)) > key->keyblob_len - pos - 4) {
> +-		errmsg = "Key blob does not contain a key type string";
> +-		goto error;
> +-	}
> +-	if (len > sizeof(prefix_rsa) - 1 &&
> +-		!memcmp(key->keyblob+pos+4, prefix_rsa, sizeof(prefix_rsa) - 1)) {
> +-		type = RSA;
> +-	} else if (len > sizeof(prefix_dsa) - 1 &&
> +-		!memcmp(key->keyblob+pos+4, prefix_dsa, sizeof(prefix_dsa) - 1)) {
> +-		type = DSA;
> +-	} else {
> +-		errmsg = "Key is of unknown type";
> +-		goto error;
> +-	}
> +-	pos += 4+len;
> ++        memset(&md5c, 0, sizeof(md5c));
> ++        memset(keybuf, 0, sizeof(keybuf));
> +
> +-	/*
> +-	 * Determine the cipher type.
> +-	 */
> +-	if (key->keyblob_len < pos+4 ||
> +-		(len = GET_32BIT(key->keyblob + pos)) > key->keyblob_len - pos - 4) {
> +-		errmsg = "Key blob does not contain a cipher type string";
> +-		goto error;
> +-	}
> +-	if (len == 4 && !memcmp(key->keyblob+pos+4, "none", 4))
> +-		encrypted = 0;
> +-	else if (len == 8 && !memcmp(key->keyblob+pos+4, "3des-cbc", 8))
> +-		encrypted = 1;
> +-	else {
> +-		errmsg = "Key encryption is of unknown type";
> +-		goto error;
> +-	}
> +-	pos += 4+len;
> ++        /*
> ++         * Hereafter we return WRONG_PASSPHRASE for any parsing
> ++         * error. (But only if we've just tried to decrypt it!
> ++         * Returning WRONG_PASSPHRASE for an unencrypted key is
> ++         * automatic doom.)
> ++         */
> ++        if (encrypted)
> ++            ret = SSH2_WRONG_PASSPHRASE;
> ++    }
> +
> +-	/*
> +-	 * Get hold of the encrypted part of the key.
> +-	 */
> +-	if (key->keyblob_len < pos+4 ||
> +-		(len = GET_32BIT(key->keyblob + pos)) > key->keyblob_len - pos - 4) {
> +-		errmsg = "Key blob does not contain actual key data";
> +-		goto error;
> +-	}
> +-	ciphertext = (char *)key->keyblob + pos + 4;
> +-	cipherlen = len;
> +-	if (cipherlen == 0) {
> +-		errmsg = "Length of key data is zero";
> +-		goto error;
> +-	}
> ++    /*
> ++     * Strip away the containing string to get to the real meat.
> ++     */
> ++    len = toint(GET_32BIT(ciphertext));
> ++    if (len < 0 || len > cipherlen-4) {
> ++        errmsg = "containing string was ill-formed";
> ++        goto error;
> ++    }
> ++    ciphertext += 4;
> ++    cipherlen = len;
> +
> +-	/*
> +-	 * Decrypt it if necessary.
> +-	 */
> +-	if (encrypted) {
> +-		/*
> +-		 * Derive encryption key from passphrase and iv/salt:
> +-		 *
> +-		 *  - let block A equal MD5(passphrase)
> +-		 *  - let block B equal MD5(passphrase || A)
> +-		 *  - block C would be MD5(passphrase || A || B) and so on
> +-		 *  - encryption key is the first N bytes of A || B
> +-		 */
> +-		struct MD5Context md5c;
> +-		unsigned char keybuf[32], iv[8];
> ++    /*
> ++     * Now we break down into RSA versus DSA. In either case we'll
> ++     * construct public and private blobs in our own format, and
> ++     * end up feeding them to alg->createkey().
> ++     */
> ++    blobsize = cipherlen + 256;
> ++    blob = snewn(blobsize, unsigned char);
> ++    privlen = 0;
> ++    if (type == RSA) {
> ++        struct mpint_pos n, e, d, u, p, q;
> ++        int pos = 0;
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &e);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &d);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &n);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &u);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &p);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &q);
> ++        if (!q.start) {
> ++            errmsg = "key data did not contain six integers";
> ++            goto error;
> ++        }
> +
> +-		if (cipherlen % 8 != 0) {
> +-			errmsg = "Encrypted part of key is not a multiple of cipher block"
> +-				" size";
> +-			goto error;
> +-		}
> ++        alg = &ssh_rsa;
> ++        pos = 0;
> ++        pos += put_string(blob+pos, "ssh-rsa", 7);
> ++        pos += put_mp(blob+pos, e.start, e.bytes);
> ++        pos += put_mp(blob+pos, n.start, n.bytes);
> ++        publen = pos;
> ++        pos += put_string(blob+pos, d.start, d.bytes);
> ++        pos += put_mp(blob+pos, q.start, q.bytes);
> ++        pos += put_mp(blob+pos, p.start, p.bytes);
> ++        pos += put_mp(blob+pos, u.start, u.bytes);
> ++        privlen = pos - publen;
> ++    } else if (type == DSA) {
> ++        struct mpint_pos p, q, g, x, y;
> ++        int pos = 4;
> ++        if (GET_32BIT(ciphertext) != 0) {
> ++            errmsg = "predefined DSA parameters not supported";
> ++            goto error;
> ++        }
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &p);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &g);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &q);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &y);
> ++        pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &x);
> ++        if (!x.start) {
> ++            errmsg = "key data did not contain five integers";
> ++            goto error;
> ++        }
> +
> +-		MD5Init(&md5c);
> +-		MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> +-		MD5Final(keybuf, &md5c);
> +-
> +-		MD5Init(&md5c);
> +-		MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> +-		MD5Update(&md5c, keybuf, 16);
> +-		MD5Final(keybuf+16, &md5c);
> +-
> +-		/*
> +-		 * Now decrypt the key blob.
> +-		 */
> +-		memset(iv, 0, sizeof(iv));
> +-		des3_decrypt_pubkey_ossh(keybuf, iv, (unsigned char *)ciphertext,
> +-								 cipherlen);
> +-
> +-		memset(&md5c, 0, sizeof(md5c));
> +-		memset(keybuf, 0, sizeof(keybuf));
> +-
> +-		/*
> +-		 * Hereafter we return WRONG_PASSPHRASE for any parsing
> +-		 * error. (But only if we've just tried to decrypt it!
> +-		 * Returning WRONG_PASSPHRASE for an unencrypted key is
> +-		 * automatic doom.)
> +-		 */
> +-		if (encrypted)
> +-			ret = SSH2_WRONG_PASSPHRASE;
> +-	}
> +-
> +-	/*
> +-	 * Strip away the containing string to get to the real meat.
> +-	 */
> +-	len = GET_32BIT(ciphertext);
> +-	if (len > cipherlen-4) {
> +-		errmsg = "containing string was ill-formed";
> +-		goto error;
> +-	}
> +-	ciphertext += 4;
> +-	cipherlen = len;
> +-
> +-	/*
> +-	 * Now we break down into RSA versus DSA. In either case we'll
> +-	 * construct public and private blobs in our own format, and
> +-	 * end up feeding them to alg->createkey().
> +-	 */
> +-	blobsize = cipherlen + 256;
> +-	blob = snewn(blobsize, unsigned char);
> +-	privlen = 0;
> +-	if (type == RSA) {
> +-		struct mpint_pos n, e, d, u, p, q;
> +-		int pos = 0;
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &e);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &d);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &n);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &u);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &p);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &q);
> +-		if (!q.start) {
> +-			errmsg = "key data did not contain six integers";
> +-			goto error;
> +-		}
> +-
> +-		alg = &ssh_rsa;
> +-		pos = 0;
> +-		pos += put_string(blob+pos, "ssh-rsa", 7);
> +-		pos += put_mp(blob+pos, e.start, e.bytes);
> +-		pos += put_mp(blob+pos, n.start, n.bytes);
> +-		publen = pos;
> +-		pos += put_string(blob+pos, d.start, d.bytes);
> +-		pos += put_mp(blob+pos, q.start, q.bytes);
> +-		pos += put_mp(blob+pos, p.start, p.bytes);
> +-		pos += put_mp(blob+pos, u.start, u.bytes);
> +-		privlen = pos - publen;
> +-	} else if (type == DSA) {
> +-		struct mpint_pos p, q, g, x, y;
> +-		int pos = 4;
> +-		if (GET_32BIT(ciphertext) != 0) {
> +-			errmsg = "predefined DSA parameters not supported";
> +-			goto error;
> +-		}
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &p);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &g);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &q);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &y);
> +-		pos += sshcom_read_mpint(ciphertext+pos, cipherlen-pos, &x);
> +-		if (!x.start) {
> +-			errmsg = "key data did not contain five integers";
> +-			goto error;
> +-		}
> +-
> +-		alg = &ssh_dss;
> +-		pos = 0;
> +-		pos += put_string(blob+pos, "ssh-dss", 7);
> +-		pos += put_mp(blob+pos, p.start, p.bytes);
> +-		pos += put_mp(blob+pos, q.start, q.bytes);
> +-		pos += put_mp(blob+pos, g.start, g.bytes);
> +-		pos += put_mp(blob+pos, y.start, y.bytes);
> +-		publen = pos;
> +-		pos += put_mp(blob+pos, x.start, x.bytes);
> +-		privlen = pos - publen;
> +-	}
> ++        alg = &ssh_dss;
> ++        pos = 0;
> ++        pos += put_string(blob+pos, "ssh-dss", 7);
> ++        pos += put_mp(blob+pos, p.start, p.bytes);
> ++        pos += put_mp(blob+pos, q.start, q.bytes);
> ++        pos += put_mp(blob+pos, g.start, g.bytes);
> ++        pos += put_mp(blob+pos, y.start, y.bytes);
> ++        publen = pos;
> ++        pos += put_mp(blob+pos, x.start, x.bytes);
> ++        privlen = pos - publen;
> ++    } else
> ++	return NULL;
> +
> + 	dropbear_assert(privlen > 0);			   /* should have bombed by now if not */
> +
> +-	retkey = snew(struct ssh2_userkey);
> +-	retkey->alg = alg;
> +-	retkey->data = alg->createkey(blob, publen, blob+publen, privlen);
> +-	if (!retkey->data) {
> ++    retkey = snew(struct ssh2_userkey);
> ++    retkey->alg = alg;
> ++    retkey->data = alg->createkey(blob, publen, blob+publen, privlen);
> ++    if (!retkey->data) {
> + 		m_free(retkey);
> +-		errmsg = "unable to create key data structure";
> +-		goto error;
> +-	}
> +-	retkey->comment = dupstr(key->comment);
> ++	errmsg = "unable to create key data structure";
> ++	goto error;
> ++    }
> ++    retkey->comment = dupstr(key->comment);
> +
> +-	errmsg = NULL; /* no error */
> +-	ret = retkey;
> ++    errmsg = NULL; /* no error */
> ++    ret = retkey;
> +
> +-	error:
> +-	if (blob) {
> +-		memset(blob, 0, blobsize);
> ++    error:
> ++    if (blob) {
> ++        memset(blob, 0, blobsize);
> + 		m_free(blob);
> +-	}
> +-	memset(key->keyblob, 0, key->keyblob_size);
> ++    }
> ++    memset(key->keyblob, 0, key->keyblob_size);
> + 	m_free(key->keyblob);
> +-	memset(&key, 0, sizeof(key));
> ++    memset(key, 0, sizeof(*key));
> + 	m_free(key);
> +-	return ret;
> ++    return ret;
> + }
> +
> + int sshcom_write(const char *filename, sign_key *key,
> +-				 char *passphrase)
> ++		 char *passphrase)
> + {
> +-	unsigned char *pubblob, *privblob;
> +-	int publen, privlen;
> +-	unsigned char *outblob;
> +-	int outlen;
> +-	struct mpint_pos numbers[6];
> +-	int nnumbers, initial_zero, pos, lenpos, i;
> +-	char *type;
> +-	char *ciphertext;
> +-	int cipherlen;
> +-	int ret = 0;
> +-	FILE *fp;
> ++    unsigned char *pubblob, *privblob;
> ++    int publen, privlen;
> ++    unsigned char *outblob;
> ++    int outlen;
> ++    struct mpint_pos numbers[6];
> ++    int nnumbers, initial_zero, pos, lenpos, i;
> ++    char *type;
> ++    char *ciphertext;
> ++    int cipherlen;
> ++    int ret = 0;
> ++    FILE *fp;
> +
> +-	/*
> +-	 * Fetch the key blobs.
> +-	 */
> +-	pubblob = key->alg->public_blob(key->data, &publen);
> +-	privblob = key->alg->private_blob(key->data, &privlen);
> +-	outblob = NULL;
> ++    /*
> ++     * Fetch the key blobs.
> ++     */
> ++    pubblob = key->alg->public_blob(key->data, &publen);
> ++    privblob = key->alg->private_blob(key->data, &privlen);
> ++    outblob = NULL;
> +
> +-	/*
> +-	 * Find the sequence of integers to be encoded into the OpenSSH
> +-	 * key blob, and also decide on the header line.
> +-	 */
> +-	if (key->alg == &ssh_rsa) {
> +-		int pos;
> +-		struct mpint_pos n, e, d, p, q, iqmp;
> ++    /*
> ++     * Find the sequence of integers to be encoded into the OpenSSH
> ++     * key blob, and also decide on the header line.
> ++     */
> ++    if (key->alg == &ssh_rsa) {
> ++        int pos;
> ++        struct mpint_pos n, e, d, p, q, iqmp;
> +
> +-		pos = 4 + GET_32BIT(pubblob);
> +-		pos += ssh2_read_mpint(pubblob+pos, publen-pos, &e);
> +-		pos += ssh2_read_mpint(pubblob+pos, publen-pos, &n);
> +-		pos = 0;
> +-		pos += ssh2_read_mpint(privblob+pos, privlen-pos, &d);
> +-		pos += ssh2_read_mpint(privblob+pos, privlen-pos, &p);
> +-		pos += ssh2_read_mpint(privblob+pos, privlen-pos, &q);
> +-		pos += ssh2_read_mpint(privblob+pos, privlen-pos, &iqmp);
> ++        pos = 4 + GET_32BIT(pubblob);
> ++        pos += ssh2_read_mpint(pubblob+pos, publen-pos, &e);
> ++        pos += ssh2_read_mpint(pubblob+pos, publen-pos, &n);
> ++        pos = 0;
> ++        pos += ssh2_read_mpint(privblob+pos, privlen-pos, &d);
> ++        pos += ssh2_read_mpint(privblob+pos, privlen-pos, &p);
> ++        pos += ssh2_read_mpint(privblob+pos, privlen-pos, &q);
> ++        pos += ssh2_read_mpint(privblob+pos, privlen-pos, &iqmp);
> +
> + 		dropbear_assert(e.start && iqmp.start); /* can't go wrong */
> +
> +-		numbers[0] = e;
> +-		numbers[1] = d;
> +-		numbers[2] = n;
> +-		numbers[3] = iqmp;
> +-		numbers[4] = q;
> +-		numbers[5] = p;
> ++        numbers[0] = e;
> ++        numbers[1] = d;
> ++        numbers[2] = n;
> ++        numbers[3] = iqmp;
> ++        numbers[4] = q;
> ++        numbers[5] = p;
> +
> +-		nnumbers = 6;
> +-		initial_zero = 0;
> +-		type = "if-modn{sign{rsa-pkcs1-sha1},encrypt{rsa-pkcs1v2-oaep}}";
> +-	} else if (key->alg == &ssh_dss) {
> +-		int pos;
> +-		struct mpint_pos p, q, g, y, x;
> ++        nnumbers = 6;
> ++	initial_zero = 0;
> ++	type = "if-modn{sign{rsa-pkcs1-sha1},encrypt{rsa-pkcs1v2-oaep}}";
> ++    } else if (key->alg == &ssh_dss) {
> ++        int pos;
> ++        struct mpint_pos p, q, g, y, x;
> +
> +-		pos = 4 + GET_32BIT(pubblob);
> +-		pos += ssh2_read_mpint(pubblob+pos, publen-pos, &p);
> +-		pos += ssh2_read_mpint(pubblob+pos, publen-pos, &q);
> +-		pos += ssh2_read_mpint(pubblob+pos, publen-pos, &g);
> +-		pos += ssh2_read_mpint(pubblob+pos, publen-pos, &y);
> +-		pos = 0;
> +-		pos += ssh2_read_mpint(privblob+pos, privlen-pos, &x);
> ++        pos = 4 + GET_32BIT(pubblob);
> ++        pos += ssh2_read_mpint(pubblob+pos, publen-pos, &p);
> ++        pos += ssh2_read_mpint(pubblob+pos, publen-pos, &q);
> ++        pos += ssh2_read_mpint(pubblob+pos, publen-pos, &g);
> ++        pos += ssh2_read_mpint(pubblob+pos, publen-pos, &y);
> ++        pos = 0;
> ++        pos += ssh2_read_mpint(privblob+pos, privlen-pos, &x);
> +
> + 		dropbear_assert(y.start && x.start); /* can't go wrong */
> +
> +-		numbers[0] = p;
> +-		numbers[1] = g;
> +-		numbers[2] = q;
> +-		numbers[3] = y;
> +-		numbers[4] = x;
> ++        numbers[0] = p;
> ++        numbers[1] = g;
> ++        numbers[2] = q;
> ++        numbers[3] = y;
> ++        numbers[4] = x;
> +
> +-		nnumbers = 5;
> +-		initial_zero = 1;
> +-		type = "dl-modp{sign{dsa-nist-sha1},dh{plain}}";
> +-	} else {
> ++        nnumbers = 5;
> ++	initial_zero = 1;
> ++	type = "dl-modp{sign{dsa-nist-sha1},dh{plain}}";
> ++    } else {
> + 		dropbear_assert(0);					 /* zoinks! */
> +-	}
> ++    }
> +
> +-	/*
> +-	 * Total size of key blob will be somewhere under 512 plus
> +-	 * combined length of integers. We'll calculate the more
> +-	 * precise size as we construct the blob.
> +-	 */
> +-	outlen = 512;
> +-	for (i = 0; i < nnumbers; i++)
> +-		outlen += 4 + numbers[i].bytes;
> +-	outblob = snewn(outlen, unsigned char);
> ++    /*
> ++     * Total size of key blob will be somewhere under 512 plus
> ++     * combined length of integers. We'll calculate the more
> ++     * precise size as we construct the blob.
> ++     */
> ++    outlen = 512;
> ++    for (i = 0; i < nnumbers; i++)
> ++	outlen += 4 + numbers[i].bytes;
> ++    outblob = snewn(outlen, unsigned char);
> +
> +-	/*
> +-	 * Create the unencrypted key blob.
> +-	 */
> +-	pos = 0;
> +-	PUT_32BIT(outblob+pos, SSHCOM_MAGIC_NUMBER); pos += 4;
> +-	pos += 4;							   /* length field, fill in later */
> +-	pos += put_string(outblob+pos, type, strlen(type));
> +-	{
> +-		char *ciphertype = passphrase ? "3des-cbc" : "none";
> +-		pos += put_string(outblob+pos, ciphertype, strlen(ciphertype));
> +-	}
> +-	lenpos = pos;					   /* remember this position */
> +-	pos += 4;							   /* encrypted-blob size */
> +-	pos += 4;							   /* encrypted-payload size */
> +-	if (initial_zero) {
> +-		PUT_32BIT(outblob+pos, 0);
> +-		pos += 4;
> +-	}
> +-	for (i = 0; i < nnumbers; i++)
> +-		pos += sshcom_put_mpint(outblob+pos,
> +-								numbers[i].start, numbers[i].bytes);
> +-	/* Now wrap up the encrypted payload. */
> +-	PUT_32BIT(outblob+lenpos+4, pos - (lenpos+8));
> +-	/* Pad encrypted blob to a multiple of cipher block size. */
> +-	if (passphrase) {
> +-		int padding = -(pos - (lenpos+4)) & 7;
> +-		while (padding--)
> +-			outblob[pos++] = random_byte();
> +-	}
> +-	ciphertext = (char *)outblob+lenpos+4;
> +-	cipherlen = pos - (lenpos+4);
> ++    /*
> ++     * Create the unencrypted key blob.
> ++     */
> ++    pos = 0;
> ++    PUT_32BIT(outblob+pos, SSHCOM_MAGIC_NUMBER); pos += 4;
> ++    pos += 4;			       /* length field, fill in later */
> ++    pos += put_string(outblob+pos, type, strlen(type));
> ++    {
> ++	char *ciphertype = passphrase ? "3des-cbc" : "none";
> ++	pos += put_string(outblob+pos, ciphertype, strlen(ciphertype));
> ++    }
> ++    lenpos = pos;		       /* remember this position */
> ++    pos += 4;			       /* encrypted-blob size */
> ++    pos += 4;			       /* encrypted-payload size */
> ++    if (initial_zero) {
> ++	PUT_32BIT(outblob+pos, 0);
> ++	pos += 4;
> ++    }
> ++    for (i = 0; i < nnumbers; i++)
> ++	pos += sshcom_put_mpint(outblob+pos,
> ++				numbers[i].start, numbers[i].bytes);
> ++    /* Now wrap up the encrypted payload. */
> ++    PUT_32BIT(outblob+lenpos+4, pos - (lenpos+8));
> ++    /* Pad encrypted blob to a multiple of cipher block size. */
> ++    if (passphrase) {
> ++	int padding = -(pos - (lenpos+4)) & 7;
> ++	while (padding--)
> ++	    outblob[pos++] = random_byte();
> ++    }
> ++    ciphertext = (char *)outblob+lenpos+4;
> ++    cipherlen = pos - (lenpos+4);
> + 	dropbear_assert(!passphrase || cipherlen % 8 == 0);
> +-	/* Wrap up the encrypted blob string. */
> +-	PUT_32BIT(outblob+lenpos, cipherlen);
> +-	/* And finally fill in the total length field. */
> +-	PUT_32BIT(outblob+4, pos);
> ++    /* Wrap up the encrypted blob string. */
> ++    PUT_32BIT(outblob+lenpos, cipherlen);
> ++    /* And finally fill in the total length field. */
> ++    PUT_32BIT(outblob+4, pos);
> +
> + 	dropbear_assert(pos < outlen);
> +
> ++    /*
> ++     * Encrypt the key.
> ++     */
> ++    if (passphrase) {
> + 	/*
> +-	 * Encrypt the key.
> ++	 * Derive encryption key from passphrase and iv/salt:
> ++	 *
> ++	 *  - let block A equal MD5(passphrase)
> ++	 *  - let block B equal MD5(passphrase || A)
> ++	 *  - block C would be MD5(passphrase || A || B) and so on
> ++	 *  - encryption key is the first N bytes of A || B
> + 	 */
> +-	if (passphrase) {
> +-		/*
> +-		 * Derive encryption key from passphrase and iv/salt:
> +-		 *
> +-		 *  - let block A equal MD5(passphrase)
> +-		 *  - let block B equal MD5(passphrase || A)
> +-		 *  - block C would be MD5(passphrase || A || B) and so on
> +-		 *  - encryption key is the first N bytes of A || B
> +-		 */
> +-		struct MD5Context md5c;
> +-		unsigned char keybuf[32], iv[8];
> ++	struct MD5Context md5c;
> ++	unsigned char keybuf[32], iv[8];
> +
> +-		MD5Init(&md5c);
> +-		MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> +-		MD5Final(keybuf, &md5c);
> ++	MD5Init(&md5c);
> ++	MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> ++	MD5Final(keybuf, &md5c);
> +
> +-		MD5Init(&md5c);
> +-		MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> +-		MD5Update(&md5c, keybuf, 16);
> +-		MD5Final(keybuf+16, &md5c);
> +-
> +-		/*
> +-		 * Now decrypt the key blob.
> +-		 */
> +-		memset(iv, 0, sizeof(iv));
> +-		des3_encrypt_pubkey_ossh(keybuf, iv, (unsigned char *)ciphertext,
> +-								 cipherlen);
> +-
> +-		memset(&md5c, 0, sizeof(md5c));
> +-		memset(keybuf, 0, sizeof(keybuf));
> +-	}
> ++	MD5Init(&md5c);
> ++	MD5Update(&md5c, (unsigned char *)passphrase, strlen(passphrase));
> ++	MD5Update(&md5c, keybuf, 16);
> ++	MD5Final(keybuf+16, &md5c);
> +
> + 	/*
> +-	 * And save it. We'll use Unix line endings just in case it's
> +-	 * subsequently transferred in binary mode.
> ++	 * Now decrypt the key blob.
> + 	 */
> ++        memset(iv, 0, sizeof(iv));
> ++	des3_encrypt_pubkey_ossh(keybuf, iv, (unsigned char *)ciphertext,
> ++				 cipherlen);
> ++
> ++        memset(&md5c, 0, sizeof(md5c));
> ++        memset(keybuf, 0, sizeof(keybuf));
> ++    }
> ++
> ++    /*
> ++     * And save it. We'll use Unix line endings just in case it's
> ++     * subsequently transferred in binary mode.
> ++     */
> + 	fp = fopen(filename, "wb");	  /* ensure Unix line endings */
> +-	if (!fp)
> +-		goto error;
> +-	fputs("---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----\n", fp);
> +-	fprintf(fp, "Comment: \"");
> +-	/*
> +-	 * Comment header is broken with backslash-newline if it goes
> +-	 * over 70 chars. Although it's surrounded by quotes, it
> +-	 * _doesn't_ escape backslashes or quotes within the string.
> +-	 * Don't ask me, I didn't design it.
> +-	 */
> +-	{
> +-		int slen = 60;					   /* starts at 60 due to "Comment: " */
> +-		char *c = key->comment;
> +-		while ((int)strlen(c) > slen) {
> +-			fprintf(fp, "%.*s\\\n", slen, c);
> +-			c += slen;
> +-			slen = 70;					   /* allow 70 chars on subsequent lines */
> +-		}
> +-		fprintf(fp, "%s\"\n", c);
> ++    if (!fp)
> ++	goto error;
> ++    fputs("---- BEGIN SSH2 ENCRYPTED PRIVATE KEY ----\n", fp);
> ++    fprintf(fp, "Comment: \"");
> ++    /*
> ++     * Comment header is broken with backslash-newline if it goes
> ++     * over 70 chars. Although it's surrounded by quotes, it
> ++     * _doesn't_ escape backslashes or quotes within the string.
> ++     * Don't ask me, I didn't design it.
> ++     */
> ++    {
> ++	int slen = 60;		       /* starts at 60 due to "Comment: " */
> ++	char *c = key->comment;
> ++	while ((int)strlen(c) > slen) {
> ++	    fprintf(fp, "%.*s\\\n", slen, c);
> ++	    c += slen;
> ++	    slen = 70;		       /* allow 70 chars on subsequent lines */
> + 	}
> ++	fprintf(fp, "%s\"\n", c);
> ++    }
> + 	base64_encode_fp(fp, outblob, pos, 70);
> +-	fputs("---- END SSH2 ENCRYPTED PRIVATE KEY ----\n", fp);
> +-	fclose(fp);
> +-	ret = 1;
> ++    fputs("---- END SSH2 ENCRYPTED PRIVATE KEY ----\n", fp);
> ++    fclose(fp);
> ++    ret = 1;
> +
> +-	error:
> +-	if (outblob) {
> +-		memset(outblob, 0, outlen);
> ++    error:
> ++    if (outblob) {
> ++        memset(outblob, 0, outlen);
> + 		m_free(outblob);
> +-	}
> +-	if (privblob) {
> +-		memset(privblob, 0, privlen);
> ++    }
> ++    if (privblob) {
> ++        memset(privblob, 0, privlen);
> + 		m_free(privblob);
> +-	}
> +-	if (pubblob) {
> +-		memset(pubblob, 0, publen);
> ++    }
> ++    if (pubblob) {
> ++        memset(pubblob, 0, publen);
> + 		m_free(pubblob);
> +-	}
> +-	return ret;
> ++    }
> ++    return ret;
> + }
> + #endif /* ssh.com stuff disabled */
> ++
> ++/* From PuTTY misc.c */
> ++static int toint(unsigned u)
> ++{
> ++    /*
> ++     * Convert an unsigned to an int, without running into the
> ++     * undefined behaviour which happens by the strict C standard if
> ++     * the value overflows. You'd hope that sensible compilers would
> ++     * do the sensible thing in response to a cast, but actually I
> ++     * don't trust modern compilers not to do silly things like
> ++     * assuming that _obviously_ you wouldn't have caused an overflow
> ++     * and so they can elide an 'if (i < 0)' test immediately after
> ++     * the cast.
> ++     *
> ++     * Sensible compilers ought of course to optimise this entire
> ++     * function into 'just return the input value'!
> ++     */
> ++    if (u <= (unsigned)INT_MAX)
> ++        return (int)u;
> ++    else if (u >= (unsigned)INT_MIN)   /* wrap in cast _to_ unsigned is OK */
> ++        return INT_MIN + (int)(u - (unsigned)INT_MIN);
> ++    else
> ++        return INT_MIN; /* fallback; should never occur on binary machines */
> ++}
> +
> diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2016-7408.patch b/meta/recipes-core/dropbear/dropbear/CVE-2016-7408.patch
> new file mode 100644
> index 0000000..995eec5
> --- /dev/null
> +++ b/meta/recipes-core/dropbear/dropbear/CVE-2016-7408.patch
> @@ -0,0 +1,101 @@
> +
> +# HG changeset patch
> +# User Matt Johnston <matt@ucc.asn.au>
> +# Date 1468248038 -28800
> +# Node ID eed9376a4ad68e3ae7f17d154dbf126ee66c54bc
> +# Parent  6a14b1f6dc04e70933c49ea335184e68c1deeb94
> +improve algorithm list parsing
> +
> +Patch is backported from:
> +https://secure.ucc.asn.au/hg/dropbear/rev/eed9376a4ad6
> +
> +CVE: CVE-2016-7408
> +Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
> +
> +diff -r 6a14b1f6dc04 -r eed9376a4ad6 common-algo.c
> +--- a/common-algo.c	Mon Jul 11 21:51:25 2016 +0800
> ++++ b/common-algo.c	Mon Jul 11 22:40:38 2016 +0800
> +@@ -531,21 +531,6 @@
> + 	return NULL;
> + }
> +
> +-static void
> +-try_add_algo(const char *algo_name, algo_type *algos,
> +-		const char *algo_desc, algo_type * new_algos, int *num_ret)
> +-{
> +-	algo_type *match_algo = check_algo(algo_name, algos);
> +-	if (!match_algo)
> +-	{
> +-		dropbear_log(LOG_WARNING, "This Dropbear program does not support '%s' %s algorithm", algo_name, algo_desc);
> +-		return;
> +-	}
> +-
> +-	new_algos[*num_ret] = *match_algo;
> +-	(*num_ret)++;
> +-}
> +-
> + /* Checks a user provided comma-separated algorithm list for available
> +  * options. Any that are not acceptable are removed in-place. Returns the
> +  * number of valid algorithms. */
> +@@ -553,30 +538,43 @@
> + check_user_algos(const char* user_algo_list, algo_type * algos,
> + 		const char *algo_desc)
> + {
> +-	algo_type new_algos[MAX_PROPOSED_ALGO];
> +-	/* this has two passes. first we sweep through the given list of
> +-	 * algorithms and mark them as usable=2 in the algo_type[] array... */
> +-	int num_ret = 0;
> ++	algo_type new_algos[MAX_PROPOSED_ALGO+1];
> + 	char *work_list = m_strdup(user_algo_list);
> +-	char *last_name = work_list;
> ++	char *start = work_list;
> + 	char *c;
> +-	for (c = work_list; *c; c++)
> ++	int n;
> ++	/* So we can iterate and look for null terminator */
> ++	memset(new_algos, 0x0, sizeof(new_algos));
> ++	for (c = work_list, n = 0; ; c++)
> + 	{
> +-		if (*c == ',')
> +-		{
> ++		char oc = *c;
> ++		if (n >= MAX_PROPOSED_ALGO) {
> ++			dropbear_exit("Too many algorithms '%s'", user_algo_list);
> ++		}
> ++		if (*c == ',' || *c == '\0') {
> ++			algo_type *match_algo = NULL;
> + 			*c = '\0';
> +-			try_add_algo(last_name, algos, algo_desc, new_algos, &num_ret);
> ++			match_algo = check_algo(start, algos);
> ++			if (match_algo) {
> ++				if (check_algo(start, new_algos)) {
> ++					TRACE(("Skip repeated algorithm '%s'", start))
> ++				} else {
> ++					new_algos[n] = *match_algo;
> ++					n++;
> ++				}
> ++			} else {
> ++				dropbear_log(LOG_WARNING, "This Dropbear program does not support '%s' %s algorithm", start, algo_desc);
> ++			}
> + 			c++;
> +-			last_name = c;
> ++			start = c;
> ++		}
> ++		if (oc == '\0') {
> ++			break;
> + 		}
> + 	}
> +-	try_add_algo(last_name, algos, algo_desc, new_algos, &num_ret);
> + 	m_free(work_list);
> +-
> +-	new_algos[num_ret].name = NULL;
> +-
> +-	/* Copy one more as a blank delimiter */
> +-	memcpy(algos, new_algos, sizeof(*new_algos) * (num_ret+1));
> +-	return num_ret;
> ++	/* n+1 to include a null terminator */
> ++	memcpy(algos, new_algos, sizeof(*new_algos) * (n+1));
> ++	return n;
> + }
> + #endif /* ENABLE_USER_ALGO_LIST */
> +
> diff --git a/meta/recipes-core/dropbear/dropbear/CVE-2016-7409.patch b/meta/recipes-core/dropbear/dropbear/CVE-2016-7409.patch
> new file mode 100644
> index 0000000..fc4762d
> --- /dev/null
> +++ b/meta/recipes-core/dropbear/dropbear/CVE-2016-7409.patch
> @@ -0,0 +1,26 @@
> +# HG changeset patch
> +# User Matt Johnston <matt@ucc.asn.au>
> +# Date 1468245085 -28800
> +# Node ID 6a14b1f6dc04e70933c49ea335184e68c1deeb94
> +# Parent  309e1c4a87682b6ca7d80b8555a1db416c3cb7ac
> +better TRACE of failed remote ident
> +
> +Patch is backported from:
> +https://secure.ucc.asn.au/hg/dropbear/rev/6a14b1f6dc04
> +
> +CVE: CVE-2016-7409
> +Signed-off-by: Sona Sarmadi <sona.sarmadi@enea.com>
> +
> +diff -r 309e1c4a8768 -r 6a14b1f6dc04 common-session.c
> +--- a/common-session.c	Fri Mar 18 22:44:36 2016 +0800
> ++++ b/common-session.c	Mon Jul 11 21:51:25 2016 +0800
> +@@ -361,7 +361,7 @@
> + 	}
> +
> + 	if (!done) {
> +-		TRACE(("err: %s for '%s'\n", strerror(errno), linebuf))
> ++		TRACE(("error reading remote ident: %s\n", strerror(errno)))
> + 		ses.remoteclosed();
> + 	} else {
> + 		/* linebuf is already null terminated */
> +
>
>


[-- Attachment #2: Type: text/html, Size: 91586 bytes --]

^ permalink raw reply

* Re: [PATCH 1/4] u-boot: Update to 2016.09.01 release
From: Marek Vasut @ 2016-10-25 19:24 UTC (permalink / raw)
  To: Denys Dmytriyenko; +Cc: OE-core
In-Reply-To: <20161025183239.GF2494@denix.org>

On 10/25/2016 08:32 PM, Denys Dmytriyenko wrote:
> On Sat, Oct 22, 2016 at 10:32:12PM +0200, Marek Vasut wrote:
>> On 10/21/2016 09:47 AM, Burton, Ross wrote:
>>
>> Hi!
>>
>>> On 20 October 2016 at 14:35, Marek Vasut <marex@denx.de
>>> <mailto:marex@denx.de>> wrote:
>>>
>>>     Upgrade U-Boot to the latest version.
>>>
>>>
>>> As usual, u-boot-mkimage broke again:
>>
>> That's weird, I successfully built it for nios2 during my tests.
>> Can you tell me how I can replicate the issue , so I can test for it to
>> prevent regression and roll out a patch ?
> 
> Marek, Ross,
> 
> Any progress on this? Need any help testing?
> 
Yeah, how do you replicate this issue ?

-- 
Best regards,
Marek Vasut


^ permalink raw reply

* Re: [PATCH 1/4] u-boot: Update to 2016.09.01 release
From: Denys Dmytriyenko @ 2016-10-25 18:32 UTC (permalink / raw)
  To: Marek Vasut; +Cc: OE-core
In-Reply-To: <016763e0-b2cb-0c2c-f0d0-219da1c1faa3@denx.de>

On Sat, Oct 22, 2016 at 10:32:12PM +0200, Marek Vasut wrote:
> On 10/21/2016 09:47 AM, Burton, Ross wrote:
> 
> Hi!
> 
> > On 20 October 2016 at 14:35, Marek Vasut <marex@denx.de
> > <mailto:marex@denx.de>> wrote:
> > 
> >     Upgrade U-Boot to the latest version.
> > 
> > 
> > As usual, u-boot-mkimage broke again:
> 
> That's weird, I successfully built it for nios2 during my tests.
> Can you tell me how I can replicate the issue , so I can test for it to
> prevent regression and roll out a patch ?

Marek, Ross,

Any progress on this? Need any help testing?

-- 
Denys


> > | DEBUG: Executing shell function do_compile
> > |   x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3
> > -mfpmath=sse
> > --sysroot=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/sysroots/qemux86-64
> >  -O2 -pipe -g -feliminate-unused-debug-types
> > -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/work/core2-64-poky-linux/u-boot-mkimage/1_2016.09.01-r0=/usr/src/debug/u-boot-mkimage/1_2016.09.01-r0
> > -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/sysroots/x86_64-linux=
> > -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/sysroots/qemux86-64=
> >  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> > -Wp,-MD,tools/.bin2header.d -Wall -Wstrict-prototypes -O2
> > -fomit-frame-pointer    -DCONFIG_FIT_SIGNATURE -include
> > ./include/libfdt_env.h -idirafterinclude
> > -idirafter./arch/sandbox/include -I./lib/libfdt -I./tools
> > -DCONFIG_SYS_TEXT_BASE=0 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES
> > -D_GNU_SOURCE  -o tools/bin2header tools/bin2header.c
> > | cat ./Licenses/gpl-2.0.txt | gzip -9 -c | \
> > | tools/bin2header license_gzip > ./include/license.h
> > |   x86_64-poky-linux-gcc  -m64 -march=core2 -mtune=core2 -msse3
> > -mfpmath=sse
> > --sysroot=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/sysroots/qemux86-64
> >  -O2 -pipe -g -feliminate-unused-debug-types
> > -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/work/core2-64-poky-linux/u-boot-mkimage/1_2016.09.01-r0=/usr/src/debug/u-boot-mkimage/1_2016.09.01-r0
> > -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/sysroots/x86_64-linux=
> > -fdebug-prefix-map=/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/build/tmp/sysroots/qemux86-64=
> >  -Wl,-O1 -Wl,--hash-style=gnu -Wl,--as-needed
> > -Wp,-MD,tools/lib/.crc32.o.d -Wall -Wstrict-prototypes -O2
> > -fomit-frame-pointer    -DCONFIG_FIT_SIGNATURE -include
> > ./include/libfdt_env.h -idirafterinclude
> > -idirafter./arch/sandbox/include -I./lib/libfdt -I./tools
> > -DCONFIG_SYS_TEXT_BASE=0 -DUSE_HOSTCC -D__KERNEL_STRICT_NAMES
> > -D_GNU_SOURCE -pedantic -c -o tools/lib/crc32.o tools/lib/crc32.c
> > | /bin/sh: tools/bin2header: /lib/ld-linux-x86-64.so.2: bad ELF
> > interpreter: No such file or directory
> > | ERROR: oe_runmake failed
> > | make[1]: *** [include/license.h] Error 126
> > NOTE: recipe u-boot-mkimage-1_2016.09.01-r0: task do_compile: Failed
> > ERROR: Task
> > (/home/pokybuild/yocto-autobuilder/yocto-worker/nightly-no-x11/build/meta/recipes-bsp/u-boot/u-boot-mkimage_2016.09.01.bb:do_compile)
> > failed with exit code '1'
> > 
> > It's using the target compiler/sysroot/options to build a runtime tool
> > (so should use BUILD_CC instead of CC, etc).
> > 
> > Ross
> 
> 
> -- 
> Best regards,
> Marek Vasut
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply

* Re: basic bitbake commands to create an SDK?
From: Denys Dmytriyenko @ 2016-10-25 18:29 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1610221251550.7526@localhost.localdomain>

On Sat, Oct 22, 2016 at 12:53:24PM -0400, Robert P. J. Day wrote:
> On Sat, 22 Oct 2016, Khem Raj wrote:
> 
> > generally meta-toolchain is prior art. You want to use image
> > specific SDKs so -cpopulate_sdk <image> is fine. In this case it
> > will include the needed dev headers/libs in your SDK for that given
> > image automatically it can be any image
> 
>   ah, good to know, i was starting to get that impression from the
> readings. (is there any mention in the docs that meta-toolchain is
> deprecated? if that's the correct word.)

It's not really depricated! It's still useful in cases when you need a 
standalone toolchain that is not based on any specific image recipe.
It's prone to errors and more complicated for beginners, hence the new "-c 
populate_sdk" method is recommended by default, unless you know what you 
are doing...


> > I would recommend to try using eSDK, which can be generated using
> > -cpopulate_sdk_ext see
> >
> > https://wiki.yoctoproject.org/wiki/Application_Development_with_Extensible_SDK
> 
>   i was just perusing the testsdk.bbclass file, where i read at the
> top:
> 
>   # testsdk.bbclass enables testing for SDK and Extensible SDK
>   #
>   # For run SDK tests you need to do,
>   # - bitbake core-image-sato -c populate_sdk
>   # - bitbake core-image-sato -c testsdk
>   #
>   # For run eSDK tests you need to do,
>   # - bitbake core-image-sato -c populate_sdk_ext
>   # - bitbake core-image-sato -c testsdkext
> 
> does that testing actually require the core-image-sato image? that's
> certainly what those comments seem to suggest.
> 
> 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


^ permalink raw reply

* Re: [meta-oe][krogoth][PATCH] pcsc-lite: Seperate GPLV3 portions from BSD
From: Denys Dmytriyenko @ 2016-10-25 18:24 UTC (permalink / raw)
  To: Davis, Michael; +Cc: openembedded-core@lists.openembedded.org
In-Reply-To: <1477405943-3543-1-git-send-email-michael.davis@essvote.com>

meta-oe patches should be submitted to openembedded-devel mailing list. Thanks.

-- 
Denys


On Tue, Oct 25, 2016 at 02:32:55PM +0000, Davis, Michael wrote:
> From: "Davis, Michael" <michael.davis@essvote.com>
> 
> GPLV3 and BSD portions were originally placed in the same package.
> The GPLv3 portion has been seperated into pcsc-lite-spy and
> pcsc-lite-spy-dev so the package can be used with GPLv3 blacklisted.
> 
> Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
> (cherry picked from commit 54c7e784c7689d8cff4173db716bb7913c65315f)
> Signed-off-by: Michael Davis <michael.davis@essvote.com>
> ---
>  .../recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb  | 24 ++++++++++++++++++----
>  1 file changed, 20 insertions(+), 4 deletions(-)
> 
> diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb
> index cc72549..0d2cb33 100644
> --- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb
> +++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb
> @@ -1,7 +1,13 @@
>  SUMMARY = "PC/SC Lite smart card framework and applications"
>  HOMEPAGE = "http://pcsclite.alioth.debian.org/"
>  LICENSE = "BSD & GPLv3+"
> -LICENSE_${PN}-dev = "GPLv3+"
> +LICENSE_${PN} = "BSD"
> +LICENSE_${PN}-lib = "BSD"
> +LICENSE_${PN}-doc = "BSD"
> +LICENSE_${PN}-dev = "BSD"
> +LICENSE_${PN}-dbg = "BSD & GPLv3+"
> +LICENSE_${PN}-spy = "GPLv3+"
> +LICENSE_${PN}-spy-dev = "GPLv3+"
>  LIC_FILES_CHKSUM = "file://COPYING;md5=bcfbd85230ac3c586fb294c8b627cf32"
>  DEPENDS = "udev"
>  
> @@ -20,14 +26,24 @@ EXTRA_OECONF = " \
>  
>  S = "${WORKDIR}/pcsc-lite-${PV}"
>  
> -PACKAGES =+ "${PN}-lib"
> +PACKAGES = "${PN} ${PN}-dbg ${PN}-dev ${PN}-lib ${PN}-doc ${PN}-spy ${PN}-spy-dev"
>  
>  RRECOMMENDS_${PN} = "ccid"
>  
> -FILES_${PN}-lib = "${libdir}/lib*${SOLIBS}"
> +FILES_${PN} = "${sbindir}/pcscd"
> +FILES_${PN}-lib = "${libdir}/libpcsclite*${SOLIBS}"
> +FILES_${PN}-dev = "${includedir} \
> +                   ${libdir}/pkgconfig \
> +                   ${libdir}/libpcsclite.la \
> +                   ${libdir}/libpcsclite.so"
> +                   
> +FILES_${PN}-spy = "${bindir}/pcsc-spy \
> +                   ${libdir}/libpcscspy*${SOLIBS}"
> +FILES_${PN}-spy-dev = "${libdir}/libpcscspy.la \
> +                       ${libdir}/libpcscspy.so "
>  
>  RPROVIDES_${PN} += "${PN}-systemd"
>  RREPLACES_${PN} += "${PN}-systemd"
>  RCONFLICTS_${PN} += "${PN}-systemd"
>  SYSTEMD_SERVICE_${PN} = "pcscd.socket"
> -RDEPENDS_${PN} +="python"
> +RDEPENDS_${PN}-spy +="python"
> -- 
> 2.5.5
> -- 
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core


^ permalink raw reply

* [PATCH][krogoth] weston: Add no-input-device patch to 1.9.0.
From: Daniel Díaz @ 2016-10-25 18:09 UTC (permalink / raw)
  To: openembedded-core

The included patch, backported from Weston master, allows
it to run without any input device at launch. An ini option
is introduced for this purpose, so there is no behavioral
change.

Related change in weston.ini:
  [core]
  require-input=true

Default is true; setting it false allows Weston to run
without a keyboard or mouse, which is handy for automated
environments.

Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
---
 .../add-config-option-for-no-input-device.patch    | 125 +++++++++++++++++++++
 meta/recipes-graphics/wayland/weston_1.9.0.bb      |   1 +
 2 files changed, 126 insertions(+)
 create mode 100644 meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch

diff --git a/meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch b/meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch
new file mode 100644
index 0000000..93376ef
--- /dev/null
+++ b/meta/recipes-graphics/wayland/weston/add-config-option-for-no-input-device.patch
@@ -0,0 +1,125 @@
+From 6c89292024cc08d4499916dc153c354175bd81c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Daniel=20D=C3=ADaz?= <daniel.diaz@linaro.org>
+Date: Fri, 21 Oct 2016 14:03:13 -0500
+Subject: [PATCH] Add configuration option for no input device.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[Backported from master, 75b7197.)
+
+As it has been discussed in the past [1], running Weston
+without any input device at launch might be beneficial for
+some use cases.
+
+Certainly, it's best for the vast majority of users (and
+the project) to require an input device to be present, as
+to avoid frustration and hassle, but for those brave souls
+that so prefer, this patch lets them run without any input
+device at all.
+
+This introduces a simple configuration in weston.ini:
+  [core]
+  require-input=true
+
+True is the default, so no behavioral change is introduced.
+
+[1] https://lists.freedesktop.org/archives/wayland-devel/2015-November/025193.html
+
+Signed-off-by: Daniel Díaz <daniel.diaz@linaro.org>
+Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net>
+Reviewed-by: Daniel Stone <daniels@collabora.com>
+---
+ man/weston.ini.man  | 5 +++++
+ src/compositor.h    | 4 ++++
+ src/libinput-seat.c | 6 ++++++
+ src/main.c          | 5 +++++
+ weston.ini.in       | 1 +
+ 5 files changed, 21 insertions(+)
+
+diff --git a/man/weston.ini.man b/man/weston.ini.man
+index a9b6026..668b16f 100644
+--- a/man/weston.ini.man
++++ b/man/weston.ini.man
+@@ -169,6 +169,11 @@ time, the one specified in the command-line will be used. On the other
+ hand, if none of these sets the value, default idle timeout will be
+ set to 300 seconds.
+ .RS
++.PP
++.RE
++.TP 7
++.BI "require-input=" true
++require an input device for launch
+ 
+ .SH "LIBINPUT SECTION"
+ The
+diff --git a/src/compositor.h b/src/compositor.h
+index c4c81f0..292a412 100644
+--- a/src/compositor.h
++++ b/src/compositor.h
+@@ -701,6 +701,10 @@ struct weston_compositor {
+ 
+ 	void *user_data;
+ 	void (*exit)(struct weston_compositor *c);
++
++	/* Whether to let the compositor run without any input device. */
++	bool require_input;
++
+ };
+ 
+ struct weston_buffer {
+diff --git a/src/libinput-seat.c b/src/libinput-seat.c
+index c9f9ed2..1c4c358 100644
+--- a/src/libinput-seat.c
++++ b/src/libinput-seat.c
+@@ -250,6 +250,12 @@ udev_input_enable(struct udev_input *input)
+ 			devices_found = 1;
+ 	}
+ 
++	if (devices_found == 0 && !c->require_input) {
++		weston_log("warning: no input devices found, but none required "
++			   "as per configuration.\n");
++		return 0;
++	}
++
+ 	if (devices_found == 0) {
+ 		weston_log(
+ 			"warning: no input devices on entering Weston. "
+diff --git a/src/main.c b/src/main.c
+index a98570e..b8632e9 100644
+--- a/src/main.c
++++ b/src/main.c
+@@ -658,6 +658,7 @@ int main(int argc, char *argv[])
+ 	struct wl_client *primary_client;
+ 	struct wl_listener primary_client_destroyed;
+ 	struct weston_seat *seat;
++	int require_input;
+ 
+ 	const struct weston_option core_options[] = {
+ 		{ WESTON_OPTION_STRING, "backend", 'B', &backend },
+@@ -737,6 +738,10 @@ int main(int argc, char *argv[])
+ 	if (weston_compositor_init_config(ec, config) < 0)
+ 		goto out_signals;
+ 
++	weston_config_section_get_bool(section, "require-input",
++				       &require_input, true);
++	ec->require_input = require_input;
++
+ 	if (backend_init(ec, &argc, argv, config) < 0) {
+ 		weston_log("fatal: failed to create compositor backend\n");
+ 		goto out_signals;
+diff --git a/weston.ini.in b/weston.ini.in
+index 06b51df..e9ef992 100644
+--- a/weston.ini.in
++++ b/weston.ini.in
+@@ -2,6 +2,7 @@
+ #modules=xwayland.so,cms-colord.so
+ #shell=desktop-shell.so
+ #gbm-format=xrgb2101010
++#require-input=true
+ 
+ [shell]
+ background-image=/usr/share/backgrounds/gnome/Aqua.jpg
+-- 
+1.9.1
+
diff --git a/meta/recipes-graphics/wayland/weston_1.9.0.bb b/meta/recipes-graphics/wayland/weston_1.9.0.bb
index 16a788d..8a619b5 100644
--- a/meta/recipes-graphics/wayland/weston_1.9.0.bb
+++ b/meta/recipes-graphics/wayland/weston_1.9.0.bb
@@ -13,6 +13,7 @@ SRC_URI = "http://wayland.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
            file://0001-make-error-portable.patch \
            file://libsystemd.patch \
            file://explicit-enable-disable-systemd.patch \
+           file://add-config-option-for-no-input-device.patch \
 "
 SRC_URI[md5sum] = "66bbba12f546570b4d97f676bc79a28e"
 SRC_URI[sha256sum] = "9c1b03f3184fa0b0dfdf67e215048085156e1a2ca344af6613fed36794ac48cf"
-- 
1.9.1



^ permalink raw reply related

* [PATCH] python3: Build and package precompiled modules
From: Dominic Sacré @ 2016-10-25 17:20 UTC (permalink / raw)
  To: openembedded-core

Remove the patch that was applied in the python3 and python3-native
recipes to skip compilation of python modules.

Modify generate-manifest-3.5.py to match '__pycache__' directories in
FILES_*.
This is necessary because Python3 puts .pyc files in '__pycache__'
subdirectories one level below the corresponding .py files, whereas in
Python2 they used to be right next to the sources.

This change significantly reduces the startup overhead of Python3
scripts. For example, on a Cortex-A9, "python3 -c pass" took 0.40s
before, and 0.19s after.

Signed-off-by: Dominic Sacré <dominic.sacre@gmx.de>
---
 .../python/python-3.5-manifest.inc                 | 130 ++++++++++-----------
 .../python/python3-native_3.5.2.bb                 |   1 -
 .../python3/020-dont-compile-python-files.patch    |  48 --------
 meta/recipes-devtools/python/python3_3.5.2.bb      |   1 -
 scripts/contrib/python/generate-manifest-3.5.py    |  10 ++
 5 files changed, 75 insertions(+), 115 deletions(-)
 delete mode 100644 meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 3046114..851f12e 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -11,59 +11,59 @@ PACKAGES="${PN}-dbg ${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-co
 
 SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
 RDEPENDS_${PN}-2to3="${PN}-core"
-FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 "
+FILES_${PN}-2to3="${libdir}/python3.5/lib2to3 ${libdir}/python3.5/lib2to3/__pycache__ "
 
 SUMMARY_${PN}-argparse="Python command line argument parser"
 RDEPENDS_${PN}-argparse="${PN}-core ${PN}-codecs ${PN}-textutils"
-FILES_${PN}-argparse="${libdir}/python3.5/argparse.* "
+FILES_${PN}-argparse="${libdir}/python3.5/argparse.* ${libdir}/python3.5/__pycache__/argparse.* "
 
 SUMMARY_${PN}-asyncio="Python Asynchronous I/O, event loop, coroutines and tasks"
 RDEPENDS_${PN}-asyncio="${PN}-core"
-FILES_${PN}-asyncio="${libdir}/python3.5/asyncio "
+FILES_${PN}-asyncio="${libdir}/python3.5/asyncio ${libdir}/python3.5/asyncio/__pycache__ "
 
 SUMMARY_${PN}-audio="Python Audio Handling"
 RDEPENDS_${PN}-audio="${PN}-core"
-FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/toaiff.* "
+FILES_${PN}-audio="${libdir}/python3.5/wave.* ${libdir}/python3.5/__pycache__/wave.* ${libdir}/python3.5/chunk.* ${libdir}/python3.5/__pycache__/chunk.* ${libdir}/python3.5/sndhdr.* ${libdir}/python3.5/__pycache__/sndhdr.* ${libdir}/python3.5/lib-dynload/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/__pycache__/ossaudiodev.*.so ${libdir}/python3.5/lib-dynload/audioop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/audioop.*.so ${libdir}/python3.5/audiodev.* ${libdir}/python3.5/__pycache__/audiodev.* ${libdir}/python3.5/sunaudio.* ${libdir}/python3.5/__pycache__/sunaudio.* ${libdir}/python3.5/sunau.* ${libdir}/python3.5/__pycache__/sunau.* ${libdir}/python3.5/toaiff.* ${libdir}/python3.5/__pycache__/toaiff.* "
 
 SUMMARY_${PN}-codecs="Python codecs, encodings & i18n support"
 RDEPENDS_${PN}-codecs="${PN}-core ${PN}-lang"
-FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/xdrlib.* "
+FILES_${PN}-codecs="${libdir}/python3.5/codecs.* ${libdir}/python3.5/__pycache__/codecs.* ${libdir}/python3.5/encodings ${libdir}/python3.5/encodings/__pycache__ ${libdir}/python3.5/gettext.* ${libdir}/python3.5/__pycache__/gettext.* ${libdir}/python3.5/locale.* ${libdir}/python3.5/__pycache__/locale.* ${libdir}/python3.5/lib-dynload/_locale.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_locale.*.so ${libdir}/python3.5/lib-dynload/_codecs* ${libdir}/python3.5/lib-dynload/_codecs*/__pycache__ ${libdir}/python3.5/lib-dynload/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multibytecodec.*.so ${libdir}/python3.5/lib-dynload/unicodedata.*.so ${libdir}/python3.5/lib-dynload/__pycache__/unicodedata.*.so ${libdir}/python3.5/stringprep.* ${libdir}/python3.5/__pycache__/stringprep.* ${libdir}/python3.5/xdrlib.* ${libdir}/python3.5/__pycache__/xdrlib.* "
 
 SUMMARY_${PN}-compile="Python bytecode compilation support"
 RDEPENDS_${PN}-compile="${PN}-core"
-FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/compileall.* "
+FILES_${PN}-compile="${libdir}/python3.5/py_compile.* ${libdir}/python3.5/__pycache__/py_compile.* ${libdir}/python3.5/compileall.* ${libdir}/python3.5/__pycache__/compileall.* "
 
 SUMMARY_${PN}-compression="Python high-level compression support"
 RDEPENDS_${PN}-compression="${PN}-core ${PN}-codecs ${PN}-importlib ${PN}-threading ${PN}-shell"
-FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so "
+FILES_${PN}-compression="${libdir}/python3.5/gzip.* ${libdir}/python3.5/__pycache__/gzip.* ${libdir}/python3.5/zipfile.* ${libdir}/python3.5/__pycache__/zipfile.* ${libdir}/python3.5/tarfile.* ${libdir}/python3.5/__pycache__/tarfile.* ${libdir}/python3.5/lib-dynload/bz2.*.so ${libdir}/python3.5/lib-dynload/__pycache__/bz2.*.so ${libdir}/python3.5/lib-dynload/zlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/zlib.*.so "
 
 SUMMARY_${PN}-core="Python interpreter and core modules"
 RDEPENDS_${PN}-core="${PN}-lang ${PN}-re ${PN}-reprlib ${PN}-codecs ${PN}-io ${PN}-math"
-FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/config/Makefile ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
+FILES_${PN}-core="${libdir}/python3.5/__future__.* ${libdir}/python3.5/__pycache__/__future__.* ${libdir}/python3.5/_abcoll.* ${libdir}/python3.5/__pycache__/_abcoll.* ${libdir}/python3.5/abc.* ${libdir}/python3.5/__pycache__/abc.* ${libdir}/python3.5/ast.* ${libdir}/python3.5/__pycache__/ast.* ${libdir}/python3.5/copy.* ${libdir}/python3.5/__pycache__/copy.* ${libdir}/python3.5/copyreg.* ${libdir}/python3.5/__pycache__/copyreg.* ${libdir}/python3.5/configparser.* ${libdir}/python3.5/__pycache__/configparser.* ${libdir}/python3.5/genericpath.* ${libdir}/python3.5/__pycache__/genericpath.* ${libdir}/python3.5/getopt.* ${libdir}/python3.5/__pycache__/getopt.* ${libdir}/python3.5/linecache.* ${libdir}/python3.5/__pycache__/linecache.* ${libdir}/python3.5/new.* ${libdir}/python3.5/__pycache__/new.* ${libdir}/python3.5/os.* ${libdir}/python3.5/__pycache__/os.* ${libdir}/python3.5/posixpath.* ${libdir}/python3.5/__pycache__/posixpath.* ${libdir}/python3.5/struct.* ${libdir}/python3.5/__pycache__/struct.* ${libdir}/python3.5/warnings.* ${libdir}/python3.5/__pycache__/warnings.* ${libdir}/python3.5/site.* ${libdir}/python3.5/__pycache__/site.* ${libdir}/python3.5/stat.* ${libdir}/python3.5/__pycache__/stat.* ${libdir}/python3.5/UserDict.* ${libdir}/python3.5/__pycache__/UserDict.* ${libdir}/python3.5/UserList.* ${libdir}/python3.5/__pycache__/UserList.* ${libdir}/python3.5/UserString.* ${libdir}/python3.5/__pycache__/UserString.* ${libdir}/python3.5/lib-dynload/binascii.*.so ${libdir}/python3.5/lib-dynload/__pycache__/binascii.*.so ${libdir}/python3.5/lib-dynload/_struct.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_struct.*.so ${libdir}/python3.5/lib-dynload/time.*.so ${libdir}/python3.5/lib-dynload/__pycache__/time.*.so ${libdir}/python3.5/lib-dynload/xreadlines.*.so ${libdir}/python3.5/lib-dynload/__pycache__/xreadlines.*.so ${libdir}/python3.5/types.* ${libdir}/python3.5/__pycache__/types.* ${libdir}/python3.5/platform.* ${libdir}/python3.5/__pycache__/platform.* ${bindir}/python* ${libdir}/python3.5/_weakrefset.* ${libdir}/python3.5/__pycache__/_weakrefset.* ${libdir}/python3.5/sysconfig.* ${libdir}/python3.5/__pycache__/sysconfig.* ${libdir}/python3.5/_sysconfigdata.* ${libdir}/python3.5/__pycache__/_sysconfigdata.* ${libdir}/python3.5/config/Makefile ${libdir}/python3.5/config/Makefile/__pycache__ ${includedir}/python${PYTHON_BINABI}/pyconfig*.h ${libdir}/python${PYTHON_MAJMIN}/collections ${libdir}/python${PYTHON_MAJMIN}/_collections_abc.* ${libdir}/python${PYTHON_MAJMIN}/_sitebuiltins.* ${libdir}/python${PYTHON_MAJMIN}/sitecustomize.py "
 
 SUMMARY_${PN}-crypt="Python basic cryptographic and hashing support"
 RDEPENDS_${PN}-crypt="${PN}-core"
-FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so "
+FILES_${PN}-crypt="${libdir}/python3.5/hashlib.* ${libdir}/python3.5/__pycache__/hashlib.* ${libdir}/python3.5/md5.* ${libdir}/python3.5/__pycache__/md5.* ${libdir}/python3.5/sha.* ${libdir}/python3.5/__pycache__/sha.* ${libdir}/python3.5/lib-dynload/crypt.*.so ${libdir}/python3.5/lib-dynload/__pycache__/crypt.*.so ${libdir}/python3.5/lib-dynload/_hashlib.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_hashlib.*.so ${libdir}/python3.5/lib-dynload/_sha256.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha256.*.so ${libdir}/python3.5/lib-dynload/_sha512.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sha512.*.so "
 
 SUMMARY_${PN}-ctypes="Python C types support"
 RDEPENDS_${PN}-ctypes="${PN}-core ${PN}-subprocess"
-FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so "
+FILES_${PN}-ctypes="${libdir}/python3.5/ctypes ${libdir}/python3.5/ctypes/__pycache__ ${libdir}/python3.5/lib-dynload/_ctypes.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes.*.so ${libdir}/python3.5/lib-dynload/_ctypes_test.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ctypes_test.*.so "
 
 SUMMARY_${PN}-curses="Python curses support"
 RDEPENDS_${PN}-curses="${PN}-core"
-FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so "
+FILES_${PN}-curses="${libdir}/python3.5/curses ${libdir}/python3.5/curses/__pycache__ ${libdir}/python3.5/lib-dynload/_curses.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses.*.so ${libdir}/python3.5/lib-dynload/_curses_panel.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_curses_panel.*.so "
 
 SUMMARY_${PN}-datetime="Python calendar and time support"
 RDEPENDS_${PN}-datetime="${PN}-core ${PN}-codecs"
-FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so "
+FILES_${PN}-datetime="${libdir}/python3.5/_strptime.* ${libdir}/python3.5/__pycache__/_strptime.* ${libdir}/python3.5/calendar.* ${libdir}/python3.5/__pycache__/calendar.* ${libdir}/python3.5/datetime.* ${libdir}/python3.5/__pycache__/datetime.* ${libdir}/python3.5/lib-dynload/_datetime.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_datetime.*.so "
 
 SUMMARY_${PN}-db="Python file-based database support"
 RDEPENDS_${PN}-db="${PN}-core"
-FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/lib-dynload/_dbm.*.so "
+FILES_${PN}-db="${libdir}/python3.5/anydbm.* ${libdir}/python3.5/__pycache__/anydbm.* ${libdir}/python3.5/dumbdbm.* ${libdir}/python3.5/__pycache__/dumbdbm.* ${libdir}/python3.5/whichdb.* ${libdir}/python3.5/__pycache__/whichdb.* ${libdir}/python3.5/dbm ${libdir}/python3.5/dbm/__pycache__ ${libdir}/python3.5/lib-dynload/_dbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_dbm.*.so "
 
 SUMMARY_${PN}-debugger="Python debugger"
 RDEPENDS_${PN}-debugger="${PN}-core ${PN}-io ${PN}-lang ${PN}-re ${PN}-stringold ${PN}-shell ${PN}-pprint ${PN}-importlib ${PN}-pkgutil"
-FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/pdb.* "
+FILES_${PN}-debugger="${libdir}/python3.5/bdb.* ${libdir}/python3.5/__pycache__/bdb.* ${libdir}/python3.5/pdb.* ${libdir}/python3.5/__pycache__/pdb.* "
 
 SUMMARY_${PN}-dev="Python development package"
 RDEPENDS_${PN}-dev="${PN}-core"
@@ -71,207 +71,207 @@ FILES_${PN}-dev="${includedir} ${libdir}/lib*${SOLIBSDEV} ${libdir}/*.la ${libdi
 
 SUMMARY_${PN}-difflib="Python helpers for computing deltas between objects"
 RDEPENDS_${PN}-difflib="${PN}-lang ${PN}-re"
-FILES_${PN}-difflib="${libdir}/python3.5/difflib.* "
+FILES_${PN}-difflib="${libdir}/python3.5/difflib.* ${libdir}/python3.5/__pycache__/difflib.* "
 
 SUMMARY_${PN}-distutils="Python Distribution Utilities"
 RDEPENDS_${PN}-distutils="${PN}-core ${PN}-email"
-FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/distutils "
+FILES_${PN}-distutils="${libdir}/python3.5/config ${libdir}/python3.5/config/__pycache__ ${libdir}/python3.5/distutils ${libdir}/python3.5/distutils/__pycache__ "
 
 SUMMARY_${PN}-distutils-staticdev="Python distribution utilities (static libraries)"
 RDEPENDS_${PN}-distutils-staticdev="${PN}-distutils"
-FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a "
+FILES_${PN}-distutils-staticdev="${libdir}/python3.5/config/lib*.a ${libdir}/python3.5/config/__pycache__/lib*.a "
 
 SUMMARY_${PN}-doctest="Python framework for running examples in docstrings"
 RDEPENDS_${PN}-doctest="${PN}-core ${PN}-lang ${PN}-io ${PN}-re ${PN}-unittest ${PN}-debugger ${PN}-difflib"
-FILES_${PN}-doctest="${libdir}/python3.5/doctest.* "
+FILES_${PN}-doctest="${libdir}/python3.5/doctest.* ${libdir}/python3.5/__pycache__/doctest.* "
 
 SUMMARY_${PN}-email="Python email support"
 RDEPENDS_${PN}-email="${PN}-core ${PN}-io ${PN}-re ${PN}-mime ${PN}-audio ${PN}-image ${PN}-netclient"
-FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/email "
+FILES_${PN}-email="${libdir}/python3.5/imaplib.* ${libdir}/python3.5/__pycache__/imaplib.* ${libdir}/python3.5/email ${libdir}/python3.5/email/__pycache__ "
 
 SUMMARY_${PN}-enum="Python support for enumerations"
 RDEPENDS_${PN}-enum="${PN}-core"
-FILES_${PN}-enum="${libdir}/python3.5/enum.* "
+FILES_${PN}-enum="${libdir}/python3.5/enum.* ${libdir}/python3.5/__pycache__/enum.* "
 
 SUMMARY_${PN}-fcntl="Python's fcntl interface"
 RDEPENDS_${PN}-fcntl="${PN}-core"
-FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so "
+FILES_${PN}-fcntl="${libdir}/python3.5/lib-dynload/fcntl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/fcntl.*.so "
 
 SUMMARY_${PN}-gdbm="Python GNU database support"
 RDEPENDS_${PN}-gdbm="${PN}-core"
-FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so "
+FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_gdbm.*.so "
 
 SUMMARY_${PN}-html="Python HTML processing support"
 RDEPENDS_${PN}-html="${PN}-core"
-FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/HTMLParser.* "
+FILES_${PN}-html="${libdir}/python3.5/formatter.* ${libdir}/python3.5/__pycache__/formatter.* ${libdir}/python3.5/htmlentitydefs.* ${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/htmllib.* ${libdir}/python3.5/__pycache__/htmllib.* ${libdir}/python3.5/markupbase.* ${libdir}/python3.5/__pycache__/markupbase.* ${libdir}/python3.5/sgmllib.* ${libdir}/python3.5/__pycache__/sgmllib.* ${libdir}/python3.5/HTMLParser.* ${libdir}/python3.5/__pycache__/HTMLParser.* "
 
 SUMMARY_${PN}-idle="Python Integrated Development Environment"
 RDEPENDS_${PN}-idle="${PN}-core ${PN}-tkinter"
-FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib "
+FILES_${PN}-idle="${bindir}/idle ${libdir}/python3.5/idlelib ${libdir}/python3.5/idlelib/__pycache__ "
 
 SUMMARY_${PN}-image="Python graphical image handling"
 RDEPENDS_${PN}-image="${PN}-core"
-FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so "
+FILES_${PN}-image="${libdir}/python3.5/colorsys.* ${libdir}/python3.5/__pycache__/colorsys.* ${libdir}/python3.5/imghdr.* ${libdir}/python3.5/__pycache__/imghdr.* ${libdir}/python3.5/lib-dynload/imageop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/imageop.*.so ${libdir}/python3.5/lib-dynload/rgbimg.*.so ${libdir}/python3.5/lib-dynload/__pycache__/rgbimg.*.so "
 
 SUMMARY_${PN}-importlib="Python import implementation library"
 RDEPENDS_${PN}-importlib="${PN}-core ${PN}-lang"
-FILES_${PN}-importlib="${libdir}/python3.5/importlib "
+FILES_${PN}-importlib="${libdir}/python3.5/importlib ${libdir}/python3.5/importlib/__pycache__ "
 
 SUMMARY_${PN}-io="Python low-level I/O"
 RDEPENDS_${PN}-io="${PN}-core ${PN}-math"
-FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/_pyio.* "
+FILES_${PN}-io="${libdir}/python3.5/lib-dynload/_socket.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_socket.*.so ${libdir}/python3.5/lib-dynload/_io.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_io.*.so ${libdir}/python3.5/lib-dynload/_ssl.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_ssl.*.so ${libdir}/python3.5/lib-dynload/select.*.so ${libdir}/python3.5/lib-dynload/__pycache__/select.*.so ${libdir}/python3.5/lib-dynload/termios.*.so ${libdir}/python3.5/lib-dynload/__pycache__/termios.*.so ${libdir}/python3.5/lib-dynload/cStringIO.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cStringIO.*.so ${libdir}/python3.5/pipes.* ${libdir}/python3.5/__pycache__/pipes.* ${libdir}/python3.5/socket.* ${libdir}/python3.5/__pycache__/socket.* ${libdir}/python3.5/ssl.* ${libdir}/python3.5/__pycache__/ssl.* ${libdir}/python3.5/tempfile.* ${libdir}/python3.5/__pycache__/tempfile.* ${libdir}/python3.5/StringIO.* ${libdir}/python3.5/__pycache__/StringIO.* ${libdir}/python3.5/io.* ${libdir}/python3.5/__pycache__/io.* ${libdir}/python3.5/_pyio.* ${libdir}/python3.5/__pycache__/_pyio.* "
 
 SUMMARY_${PN}-json="Python JSON support"
 RDEPENDS_${PN}-json="${PN}-core ${PN}-math ${PN}-re"
-FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/lib-dynload/_json.*.so "
+FILES_${PN}-json="${libdir}/python3.5/json ${libdir}/python3.5/json/__pycache__ ${libdir}/python3.5/lib-dynload/_json.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_json.*.so "
 
 SUMMARY_${PN}-lang="Python low-level language support"
 RDEPENDS_${PN}-lang="${PN}-core ${PN}-importlib"
-FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/weakref.* "
+FILES_${PN}-lang="${libdir}/python3.5/lib-dynload/_bisect.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_bisect.*.so ${libdir}/python3.5/lib-dynload/_collections.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_collections.*.so ${libdir}/python3.5/lib-dynload/_heapq.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_heapq.*.so ${libdir}/python3.5/lib-dynload/_weakref.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_weakref.*.so ${libdir}/python3.5/lib-dynload/_functools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_functools.*.so ${libdir}/python3.5/lib-dynload/array.*.so ${libdir}/python3.5/lib-dynload/__pycache__/array.*.so ${libdir}/python3.5/lib-dynload/itertools.*.so ${libdir}/python3.5/lib-dynload/__pycache__/itertools.*.so ${libdir}/python3.5/lib-dynload/operator.*.so ${libdir}/python3.5/lib-dynload/__pycache__/operator.*.so ${libdir}/python3.5/lib-dynload/parser.*.so ${libdir}/python3.5/lib-dynload/__pycache__/parser.*.so ${libdir}/python3.5/atexit.* ${libdir}/python3.5/__pycache__/atexit.* ${libdir}/python3.5/bisect.* ${libdir}/python3.5/__pycache__/bisect.* ${libdir}/python3.5/code.* ${libdir}/python3.5/__pycache__/code.* ${libdir}/python3.5/codeop.* ${libdir}/python3.5/__pycache__/codeop.* ${libdir}/python3.5/collections.* ${libdir}/python3.5/__pycache__/collections.* ${libdir}/python3.5/_collections_abc.* ${libdir}/python3.5/__pycache__/_collections_abc.* ${libdir}/python3.5/contextlib.* ${libdir}/python3.5/__pycache__/contextlib.* ${libdir}/python3.5/dis.* ${libdir}/python3.5/__pycache__/dis.* ${libdir}/python3.5/functools.* ${libdir}/python3.5/__pycache__/functools.* ${libdir}/python3.5/heapq.* ${libdir}/python3.5/__pycache__/heapq.* ${libdir}/python3.5/inspect.* ${libdir}/python3.5/__pycache__/inspect.* ${libdir}/python3.5/keyword.* ${libdir}/python3.5/__pycache__/keyword.* ${libdir}/python3.5/opcode.* ${libdir}/python3.5/__pycache__/opcode.* ${libdir}/python3.5/operator.* ${libdir}/python3.5/__pycache__/operator.* ${libdir}/python3.5/symbol.* ${libdir}/python3.5/__pycache__/symbol.* ${libdir}/python3.5/repr.* ${libdir}/python3.5/__pycache__/repr.* ${libdir}/python3.5/token.* ${libdir}/python3.5/__pycache__/token.* ${libdir}/python3.5/tokenize.* ${libdir}/python3.5/__pycache__/tokenize.* ${libdir}/python3.5/traceback.* ${libdir}/python3.5/__pycache__/traceback.* ${libdir}/python3.5/weakref.* ${libdir}/python3.5/__pycache__/weakref.* "
 
 SUMMARY_${PN}-logging="Python logging support"
 RDEPENDS_${PN}-logging="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-stringold"
-FILES_${PN}-logging="${libdir}/python3.5/logging "
+FILES_${PN}-logging="${libdir}/python3.5/logging ${libdir}/python3.5/logging/__pycache__ "
 
 SUMMARY_${PN}-mailbox="Python mailbox format support"
 RDEPENDS_${PN}-mailbox="${PN}-core ${PN}-mime"
-FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* "
+FILES_${PN}-mailbox="${libdir}/python3.5/mailbox.* ${libdir}/python3.5/__pycache__/mailbox.* "
 
 SUMMARY_${PN}-math="Python math support"
 RDEPENDS_${PN}-math="${PN}-core ${PN}-crypt"
-FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/sets.* "
+FILES_${PN}-math="${libdir}/python3.5/lib-dynload/cmath.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cmath.*.so ${libdir}/python3.5/lib-dynload/math.*.so ${libdir}/python3.5/lib-dynload/__pycache__/math.*.so ${libdir}/python3.5/lib-dynload/_random.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_random.*.so ${libdir}/python3.5/random.* ${libdir}/python3.5/__pycache__/random.* ${libdir}/python3.5/sets.* ${libdir}/python3.5/__pycache__/sets.* "
 
 SUMMARY_${PN}-mime="Python MIME handling APIs"
 RDEPENDS_${PN}-mime="${PN}-core ${PN}-io"
-FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/MimeWriter.* "
+FILES_${PN}-mime="${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* ${libdir}/python3.5/uu.* ${libdir}/python3.5/__pycache__/uu.* ${libdir}/python3.5/quopri.* ${libdir}/python3.5/__pycache__/quopri.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/MimeWriter.* ${libdir}/python3.5/__pycache__/MimeWriter.* "
 
 SUMMARY_${PN}-mmap="Python memory-mapped file support"
 RDEPENDS_${PN}-mmap="${PN}-core ${PN}-io"
-FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so "
+FILES_${PN}-mmap="${libdir}/python3.5/lib-dynload/mmap.*.so ${libdir}/python3.5/lib-dynload/__pycache__/mmap.*.so "
 
 SUMMARY_${PN}-multiprocessing="Python multiprocessing support"
 RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes ${PN}-mmap"
-FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing "
+FILES_${PN}-multiprocessing="${libdir}/python3.5/lib-dynload/_multiprocessing.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_multiprocessing.*.so ${libdir}/python3.5/multiprocessing ${libdir}/python3.5/multiprocessing/__pycache__ "
 
 SUMMARY_${PN}-netclient="Python Internet Protocol clients"
 RDEPENDS_${PN}-netclient="${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
-FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/mimetools.* "
+FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* ${libdir}/python3.5/__pycache__/*Cookie*.* ${libdir}/python3.5/base64.* ${libdir}/python3.5/__pycache__/base64.* ${libdir}/python3.5/cookielib.* ${libdir}/python3.5/__pycache__/cookielib.* ${libdir}/python3.5/ftplib.* ${libdir}/python3.5/__pycache__/ftplib.* ${libdir}/python3.5/gopherlib.* ${libdir}/python3.5/__pycache__/gopherlib.* ${libdir}/python3.5/hmac.* ${libdir}/python3.5/__pycache__/hmac.* ${libdir}/python3.5/httplib.* ${libdir}/python3.5/__pycache__/httplib.* ${libdir}/python3.5/mimetypes.* ${libdir}/python3.5/__pycache__/mimetypes.* ${libdir}/python3.5/nntplib.* ${libdir}/python3.5/__pycache__/nntplib.* ${libdir}/python3.5/poplib.* ${libdir}/python3.5/__pycache__/poplib.* ${libdir}/python3.5/smtplib.* ${libdir}/python3.5/__pycache__/smtplib.* ${libdir}/python3.5/telnetlib.* ${libdir}/python3.5/__pycache__/telnetlib.* ${libdir}/python3.5/urllib ${libdir}/python3.5/urllib/__pycache__ ${libdir}/python3.5/uuid.* ${libdir}/python3.5/__pycache__/uuid.* ${libdir}/python3.5/rfc822.* ${libdir}/python3.5/__pycache__/rfc822.* ${libdir}/python3.5/mimetools.* ${libdir}/python3.5/__pycache__/mimetools.* "
 
 SUMMARY_${PN}-netserver="Python Internet Protocol servers"
 RDEPENDS_${PN}-netserver="${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading"
-FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/SocketServer.* "
+FILES_${PN}-netserver="${libdir}/python3.5/cgi.* ${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/*HTTPServer.* ${libdir}/python3.5/__pycache__/*HTTPServer.* ${libdir}/python3.5/SocketServer.* ${libdir}/python3.5/__pycache__/SocketServer.* "
 
 SUMMARY_${PN}-numbers="Python number APIs"
 RDEPENDS_${PN}-numbers="${PN}-core ${PN}-lang ${PN}-re"
-FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/numbers.* "
+FILES_${PN}-numbers="${libdir}/python3.5/decimal.* ${libdir}/python3.5/__pycache__/decimal.* ${libdir}/python3.5/fractions.* ${libdir}/python3.5/__pycache__/fractions.* ${libdir}/python3.5/numbers.* ${libdir}/python3.5/__pycache__/numbers.* "
 
 SUMMARY_${PN}-pickle="Python serialisation/persistence support"
 RDEPENDS_${PN}-pickle="${PN}-core ${PN}-codecs ${PN}-io ${PN}-re"
-FILES_${PN}-pickle="${libdir}/python3.5/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/pickletools.* "
+FILES_${PN}-pickle="${libdir}/python3.5/pickle.* ${libdir}/python3.5/__pycache__/pickle.* ${libdir}/python3.5/shelve.* ${libdir}/python3.5/__pycache__/shelve.* ${libdir}/python3.5/lib-dynload/cPickle.*.so ${libdir}/python3.5/lib-dynload/__pycache__/cPickle.*.so ${libdir}/python3.5/pickletools.* ${libdir}/python3.5/__pycache__/pickletools.* "
 
 SUMMARY_${PN}-pkgutil="Python package extension utility support"
 RDEPENDS_${PN}-pkgutil="${PN}-core"
-FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* "
+FILES_${PN}-pkgutil="${libdir}/python3.5/pkgutil.* ${libdir}/python3.5/__pycache__/pkgutil.* "
 
 SUMMARY_${PN}-pprint="Python pretty-print support"
 RDEPENDS_${PN}-pprint="${PN}-core ${PN}-io"
-FILES_${PN}-pprint="${libdir}/python3.5/pprint.* "
+FILES_${PN}-pprint="${libdir}/python3.5/pprint.* ${libdir}/python3.5/__pycache__/pprint.* "
 
 SUMMARY_${PN}-profile="Python basic performance profiling support"
 RDEPENDS_${PN}-profile="${PN}-core ${PN}-textutils"
-FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so "
+FILES_${PN}-profile="${libdir}/python3.5/profile.* ${libdir}/python3.5/__pycache__/profile.* ${libdir}/python3.5/pstats.* ${libdir}/python3.5/__pycache__/pstats.* ${libdir}/python3.5/cProfile.* ${libdir}/python3.5/__pycache__/cProfile.* ${libdir}/python3.5/lib-dynload/_lsprof.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_lsprof.*.so "
 
 SUMMARY_${PN}-pydoc="Python interactive help support"
 RDEPENDS_${PN}-pydoc="${PN}-core ${PN}-lang ${PN}-stringold ${PN}-re"
-FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/pydoc_data "
+FILES_${PN}-pydoc="${bindir}/pydoc ${libdir}/python3.5/pydoc.* ${libdir}/python3.5/__pycache__/pydoc.* ${libdir}/python3.5/pydoc_data ${libdir}/python3.5/pydoc_data/__pycache__ "
 
 SUMMARY_${PN}-re="Python Regular Expression APIs"
 RDEPENDS_${PN}-re="${PN}-core"
-FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_parse.* "
+FILES_${PN}-re="${libdir}/python3.5/re.* ${libdir}/python3.5/__pycache__/re.* ${libdir}/python3.5/sre.* ${libdir}/python3.5/__pycache__/sre.* ${libdir}/python3.5/sre_compile.* ${libdir}/python3.5/__pycache__/sre_compile.* ${libdir}/python3.5/sre_constants* ${libdir}/python3.5/sre_constants*/__pycache__ ${libdir}/python3.5/sre_parse.* ${libdir}/python3.5/__pycache__/sre_parse.* "
 
 SUMMARY_${PN}-readline="Python readline support"
 RDEPENDS_${PN}-readline="${PN}-core"
-FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/rlcompleter.* "
+FILES_${PN}-readline="${libdir}/python3.5/lib-dynload/readline.*.so ${libdir}/python3.5/lib-dynload/__pycache__/readline.*.so ${libdir}/python3.5/rlcompleter.* ${libdir}/python3.5/__pycache__/rlcompleter.* "
 
 SUMMARY_${PN}-reprlib="Python alternate repr() implementation"
 RDEPENDS_${PN}-reprlib="${PN}-core"
-FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py "
+FILES_${PN}-reprlib="${libdir}/python3.5/reprlib.py ${libdir}/python3.5/__pycache__/reprlib.py "
 
 SUMMARY_${PN}-resource="Python resource control interface"
 RDEPENDS_${PN}-resource="${PN}-core"
-FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so "
+FILES_${PN}-resource="${libdir}/python3.5/lib-dynload/resource.*.so ${libdir}/python3.5/lib-dynload/__pycache__/resource.*.so "
 
 SUMMARY_${PN}-selectors="Python High-level I/O multiplexing"
 RDEPENDS_${PN}-selectors="${PN}-core"
-FILES_${PN}-selectors="${libdir}/python3.5/selectors.* "
+FILES_${PN}-selectors="${libdir}/python3.5/selectors.* ${libdir}/python3.5/__pycache__/selectors.* "
 
 SUMMARY_${PN}-shell="Python shell-like functionality"
 RDEPENDS_${PN}-shell="${PN}-core ${PN}-re ${PN}-compression"
-FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/shutil.* "
+FILES_${PN}-shell="${libdir}/python3.5/cmd.* ${libdir}/python3.5/__pycache__/cmd.* ${libdir}/python3.5/commands.* ${libdir}/python3.5/__pycache__/commands.* ${libdir}/python3.5/dircache.* ${libdir}/python3.5/__pycache__/dircache.* ${libdir}/python3.5/fnmatch.* ${libdir}/python3.5/__pycache__/fnmatch.* ${libdir}/python3.5/glob.* ${libdir}/python3.5/__pycache__/glob.* ${libdir}/python3.5/popen2.* ${libdir}/python3.5/__pycache__/popen2.* ${libdir}/python3.5/shlex.* ${libdir}/python3.5/__pycache__/shlex.* ${libdir}/python3.5/shutil.* ${libdir}/python3.5/__pycache__/shutil.* "
 
 SUMMARY_${PN}-signal="Python set handlers for asynchronous events support"
 RDEPENDS_${PN}-signal="${PN}-core ${PN}-enum"
-FILES_${PN}-signal="${libdir}/python3.5/signal.* "
+FILES_${PN}-signal="${libdir}/python3.5/signal.* ${libdir}/python3.5/__pycache__/signal.* "
 
 SUMMARY_${PN}-smtpd="Python Simple Mail Transport Daemon"
 RDEPENDS_${PN}-smtpd="${PN}-core ${PN}-netserver ${PN}-email ${PN}-mime"
-FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* "
+FILES_${PN}-smtpd="${bindir}/smtpd.* ${libdir}/python3.5/smtpd.* ${libdir}/python3.5/__pycache__/smtpd.* "
 
 SUMMARY_${PN}-sqlite3="Python Sqlite3 database support"
 RDEPENDS_${PN}-sqlite3="${PN}-core ${PN}-datetime ${PN}-lang ${PN}-crypt ${PN}-io ${PN}-threading"
-FILES_${PN}-sqlite3="${libdir}/python3.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/dump.* "
+FILES_${PN}-sqlite3="${libdir}/python3.5/lib-dynload/_sqlite3.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_sqlite3.*.so ${libdir}/python3.5/sqlite3/dbapi2.* ${libdir}/python3.5/sqlite3/__pycache__/dbapi2.* ${libdir}/python3.5/sqlite3/__init__.* ${libdir}/python3.5/sqlite3/__pycache__/__init__.* ${libdir}/python3.5/sqlite3/dump.* ${libdir}/python3.5/sqlite3/__pycache__/dump.* "
 
 SUMMARY_${PN}-sqlite3-tests="Python Sqlite3 database support tests"
 RDEPENDS_${PN}-sqlite3-tests="${PN}-core ${PN}-sqlite3"
-FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test "
+FILES_${PN}-sqlite3-tests="${libdir}/python3.5/sqlite3/test ${libdir}/python3.5/sqlite3/test/__pycache__ "
 
 SUMMARY_${PN}-stringold="Python string APIs [deprecated]"
 RDEPENDS_${PN}-stringold="${PN}-core ${PN}-re"
-FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/stringold.* "
+FILES_${PN}-stringold="${libdir}/python3.5/lib-dynload/strop.*.so ${libdir}/python3.5/lib-dynload/__pycache__/strop.*.so ${libdir}/python3.5/string.* ${libdir}/python3.5/__pycache__/string.* ${libdir}/python3.5/stringold.* ${libdir}/python3.5/__pycache__/stringold.* "
 
 SUMMARY_${PN}-subprocess="Python subprocess support"
 RDEPENDS_${PN}-subprocess="${PN}-core ${PN}-io ${PN}-re ${PN}-fcntl ${PN}-pickle ${PN}-threading ${PN}-signal ${PN}-selectors"
-FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so "
+FILES_${PN}-subprocess="${libdir}/python3.5/subprocess.* ${libdir}/python3.5/__pycache__/subprocess.* ${libdir}/python3.5/lib-dynload/_posixsubprocess.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_posixsubprocess.*.so "
 
 SUMMARY_${PN}-syslog="Python syslog interface"
 RDEPENDS_${PN}-syslog="${PN}-core"
-FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so "
+FILES_${PN}-syslog="${libdir}/python3.5/lib-dynload/syslog.*.so ${libdir}/python3.5/lib-dynload/__pycache__/syslog.*.so "
 
 SUMMARY_${PN}-terminal="Python terminal controlling support"
 RDEPENDS_${PN}-terminal="${PN}-core ${PN}-io"
-FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/tty.* "
+FILES_${PN}-terminal="${libdir}/python3.5/pty.* ${libdir}/python3.5/__pycache__/pty.* ${libdir}/python3.5/tty.* ${libdir}/python3.5/__pycache__/tty.* "
 
 SUMMARY_${PN}-tests="Python tests"
 RDEPENDS_${PN}-tests="${PN}-core"
-FILES_${PN}-tests="${libdir}/python3.5/test "
+FILES_${PN}-tests="${libdir}/python3.5/test ${libdir}/python3.5/test/__pycache__ "
 
 SUMMARY_${PN}-textutils="Python option parsing, text wrapping and CSV support"
 RDEPENDS_${PN}-textutils="${PN}-core ${PN}-io ${PN}-re ${PN}-stringold"
-FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/textwrap.* "
+FILES_${PN}-textutils="${libdir}/python3.5/lib-dynload/_csv.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_csv.*.so ${libdir}/python3.5/csv.* ${libdir}/python3.5/__pycache__/csv.* ${libdir}/python3.5/optparse.* ${libdir}/python3.5/__pycache__/optparse.* ${libdir}/python3.5/textwrap.* ${libdir}/python3.5/__pycache__/textwrap.* "
 
 SUMMARY_${PN}-threading="Python threading & synchronization support"
 RDEPENDS_${PN}-threading="${PN}-core ${PN}-lang"
-FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/queue.* "
+FILES_${PN}-threading="${libdir}/python3.5/_threading_local.* ${libdir}/python3.5/__pycache__/_threading_local.* ${libdir}/python3.5/dummy_thread.* ${libdir}/python3.5/__pycache__/dummy_thread.* ${libdir}/python3.5/dummy_threading.* ${libdir}/python3.5/__pycache__/dummy_threading.* ${libdir}/python3.5/mutex.* ${libdir}/python3.5/__pycache__/mutex.* ${libdir}/python3.5/threading.* ${libdir}/python3.5/__pycache__/threading.* ${libdir}/python3.5/queue.* ${libdir}/python3.5/__pycache__/queue.* "
 
 SUMMARY_${PN}-tkinter="Python Tcl/Tk bindings"
 RDEPENDS_${PN}-tkinter="${PN}-core"
-FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/tkinter "
+FILES_${PN}-tkinter="${libdir}/python3.5/lib-dynload/_tkinter.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_tkinter.*.so ${libdir}/python3.5/lib-tk ${libdir}/python3.5/lib-tk/__pycache__ ${libdir}/python3.5/tkinter ${libdir}/python3.5/tkinter/__pycache__ "
 
 SUMMARY_${PN}-unittest="Python unit testing framework"
 RDEPENDS_${PN}-unittest="${PN}-core ${PN}-stringold ${PN}-lang ${PN}-io ${PN}-difflib ${PN}-pprint ${PN}-shell"
-FILES_${PN}-unittest="${libdir}/python3.5/unittest/ "
+FILES_${PN}-unittest="${libdir}/python3.5/unittest/ ${libdir}/python3.5/unittest/__pycache__ "
 
 SUMMARY_${PN}-unixadmin="Python Unix administration support"
 RDEPENDS_${PN}-unixadmin="${PN}-core"
-FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/getpass.* "
+FILES_${PN}-unixadmin="${libdir}/python3.5/lib-dynload/nis.*.so ${libdir}/python3.5/lib-dynload/__pycache__/nis.*.so ${libdir}/python3.5/lib-dynload/grp.*.so ${libdir}/python3.5/lib-dynload/__pycache__/grp.*.so ${libdir}/python3.5/lib-dynload/pwd.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pwd.*.so ${libdir}/python3.5/getpass.* ${libdir}/python3.5/__pycache__/getpass.* "
 
 SUMMARY_${PN}-xml="Python basic XML support"
 RDEPENDS_${PN}-xml="${PN}-core ${PN}-re"
-FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xmllib.* "
+FILES_${PN}-xml="${libdir}/python3.5/lib-dynload/_elementtree.*.so ${libdir}/python3.5/lib-dynload/__pycache__/_elementtree.*.so ${libdir}/python3.5/lib-dynload/pyexpat.*.so ${libdir}/python3.5/lib-dynload/__pycache__/pyexpat.*.so ${libdir}/python3.5/xml ${libdir}/python3.5/xml/__pycache__ ${libdir}/python3.5/xmllib.* ${libdir}/python3.5/__pycache__/xmllib.* "
 
 SUMMARY_${PN}-xmlrpc="Python XML-RPC support"
 RDEPENDS_${PN}-xmlrpc="${PN}-core ${PN}-xml ${PN}-netserver ${PN}-lang"
-FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc "
+FILES_${PN}-xmlrpc="${libdir}/python3.5/xmlrpclib.* ${libdir}/python3.5/__pycache__/xmlrpclib.* ${libdir}/python3.5/SimpleXMLRPCServer.* ${libdir}/python3.5/__pycache__/SimpleXMLRPCServer.* ${libdir}/python3.5/DocXMLRPCServer.* ${libdir}/python3.5/__pycache__/DocXMLRPCServer.* ${libdir}/python3.5/xmlrpc ${libdir}/python3.5/xmlrpc/__pycache__ "
 
 SUMMARY_${PN}-modules="All Python modules"
 RDEPENDS_${PN}-modules="${PN}-2to3 ${PN}-argparse ${PN}-asyncio ${PN}-audio ${PN}-codecs ${PN}-compile ${PN}-compression ${PN}-core ${PN}-crypt ${PN}-ctypes ${PN}-curses ${PN}-datetime ${PN}-db ${PN}-debugger ${PN}-difflib ${PN}-distutils ${PN}-doctest ${PN}-email ${PN}-enum ${PN}-fcntl ${PN}-gdbm ${PN}-html ${PN}-idle ${PN}-image ${PN}-importlib ${PN}-io ${PN}-json ${PN}-lang ${PN}-logging ${PN}-mailbox ${PN}-math ${PN}-mime ${PN}-mmap ${PN}-multiprocessing ${PN}-netclient ${PN}-netserver ${PN}-numbers ${PN}-pickle ${PN}-pkgutil ${PN}-pprint ${PN}-profile ${PN}-pydoc ${PN}-re ${PN}-readline ${PN}-reprlib ${PN}-resource ${PN}-selectors ${PN}-shell ${PN}-signal ${PN}-smtpd ${PN}-sqlite3 ${PN}-sqlite3-tests ${PN}-stringold ${PN}-subprocess ${PN}-syslog ${PN}-terminal ${PN}-tests ${PN}-textutils ${PN}-threading ${PN}-tkinter ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc  "
diff --git a/meta/recipes-devtools/python/python3-native_3.5.2.bb b/meta/recipes-devtools/python/python3-native_3.5.2.bb
index 594f15c..4498454 100644
--- a/meta/recipes-devtools/python/python3-native_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3-native_3.5.2.bb
@@ -8,7 +8,6 @@ SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
 file://12-distutils-prefix-is-inside-staging-area.patch \
 file://python-config.patch \
 file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
 file://030-fixup-include-dirs.patch \
 file://070-dont-clean-ipkg-install.patch \
 file://080-distutils-dont_adjust_files.patch \
diff --git a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch b/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
deleted file mode 100644
index 819ba69..0000000
--- a/meta/recipes-devtools/python/python3/020-dont-compile-python-files.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-Dont cross compile site packages
-
--Khem
-
-Upstream-Status: Inappropriate[Embedded-Specific]
-
----
- Makefile.pre.in |   16 ----------------
- 1 file changed, 16 deletions(-)
-
-Index: Python-3.5.0/Makefile.pre.in
-===================================================================
---- Python-3.5.0.orig/Makefile.pre.in
-+++ Python-3.5.0/Makefile.pre.in
-@@ -1262,33 +1262,6 @@ libinstall:	build_all $(srcdir)/Lib/$(PL
- 		$(INSTALL_DATA) $(srcdir)/Modules/xxmodule.c \
- 			$(DESTDIR)$(LIBDEST)/distutils/tests ; \
- 	fi
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST)  $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
--		-d $(LIBDEST) -f \
--		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
--		$(DESTDIR)$(LIBDEST)
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
--		-d $(LIBDEST) -f \
--		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
--		$(DESTDIR)$(LIBDEST)
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
--		-d $(LIBDEST) -f \
--		-x 'bad_coding|badsyntax|site-packages|lib2to3/tests/data' \
--		$(DESTDIR)$(LIBDEST)
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi $(DESTDIR)$(LIBDEST)/compileall.py \
--		-d $(LIBDEST)/site-packages -f \
--		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -O $(DESTDIR)$(LIBDEST)/compileall.py \
--		-d $(LIBDEST)/site-packages -f \
--		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
--	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
--		$(PYTHON_FOR_BUILD) -Wi -OO $(DESTDIR)$(LIBDEST)/compileall.py \
--		-d $(LIBDEST)/site-packages -f \
--		-x badsyntax $(DESTDIR)$(LIBDEST)/site-packages
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
- 		$(PYTHON_FOR_BUILD) -m lib2to3.pgen2.driver $(DESTDIR)$(LIBDEST)/lib2to3/Grammar.txt
- 	-PYTHONPATH=$(DESTDIR)$(LIBDEST) $(RUNSHARED) \
diff --git a/meta/recipes-devtools/python/python3_3.5.2.bb b/meta/recipes-devtools/python/python3_3.5.2.bb
index e6cbb9c..bde9c95 100644
--- a/meta/recipes-devtools/python/python3_3.5.2.bb
+++ b/meta/recipes-devtools/python/python3_3.5.2.bb
@@ -9,7 +9,6 @@ DISTRO_SRC_URI_linuxstdbase = ""
 SRC_URI = "http://www.python.org/ftp/python/${PV}/Python-${PV}.tar.xz \
 file://python-config.patch \
 file://000-cross-compile.patch \
-file://020-dont-compile-python-files.patch \
 file://030-fixup-include-dirs.patch \
 file://070-dont-clean-ipkg-install.patch \
 file://080-distutils-dont_adjust_files.patch \
diff --git a/scripts/contrib/python/generate-manifest-3.5.py b/scripts/contrib/python/generate-manifest-3.5.py
index 2906cc6..897768f 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -59,10 +59,20 @@ class MakefileMaker:
         for filename in filenames:
             if filename[0] != "$":
                 fullFilenames.append( "%s%s" % ( self.targetPrefix, filename ) )
+                fullFilenames.append( "%s%s" % ( self.targetPrefix,
+                                                 self.pycachePath( filename ) ) )
             else:
                 fullFilenames.append( filename )
         self.packages[name] = description, dependencies, fullFilenames
 
+    def pycachePath( self, filename ):
+        dirname = os.path.dirname( filename )
+        basename = os.path.basename( filename )
+        if '.' in basename:
+            return os.path.join( dirname, '__pycache__', basename )
+        else:
+            return os.path.join( dirname, basename, '__pycache__' )
+
     def doBody( self ):
         """generate body of Makefile"""
 
-- 
2.10.1



^ permalink raw reply related

* Re: most efficient way to map perl RH rpms to OE package names?
From: Christopher Larson @ 2016-10-25 15:07 UTC (permalink / raw)
  To: Robert P. J. Day; +Cc: OE Core mailing list
In-Reply-To: <alpine.LFD.2.20.1610250303460.20837@localhost.localdomain>

[-- Attachment #1: Type: text/plain, Size: 2513 bytes --]

On Tue, Oct 25, 2016 at 12:05 AM, Robert P. J. Day <rpjday@crashcourse.ca>
wrote:

> On Tue, 25 Oct 2016, Robert P. J. Day wrote:
>
> > On Mon, 24 Oct 2016, Christopher Larson wrote:
> >
> > >
> > > On Mon, Oct 24, 2016 at 1:53 PM, Robert P. J. Day <
> rpjday@crashcourse.ca> wrote:
> > >         i've just been handed a list of about 200 perl packages by
> their
> > >       centos rpm names, and i want to map most, if not all, of them to
> their
> > >       equivalent OE package names.
> > >
> > >        my first instinct (based on not having used a lot of perl OE
> > >       packages) is to add both "perl" and "perl-modules" to
> IMAGE_INSTALL,
> > >       just to fetch and build every possible module available through
> the OE
> > >       perl recipe -- that will at least give me an idea of what's
> available.
> > >
> > >         next, i can see the pattern in some OE package names -- i've
> > >       verified that the Time::HiRes package is available in OE as
> > >       perl-module-time-hires, which i assume is part of the dynamic
> naming
> > >       being done in perl_5.22.1.bb.
> > >
> > >        am i approaching this the right way?
> > >
> > >
> > > Could also bitbake perl, then use oe-pkgdata-util to locate the
> > > actual perl modules in the packages, i.e. */Time/HiRes.pm.
> >
> >   i once wrote a wiki page on "bb", distinguishing between queries
> > you could make before you did a build, versus queries that needed a
> > build. it seems like oe-pkgdata-util needs a completed build for
> > pretty much everything, do i have that right?
>
>   never mind, i just read this snippet from the YP ref manual:
>
> "You can use the oe-pkgdata-util command-line utility to query
> PKGDATA_DIR and display various package-related information. When you
> use the utility, you must use it to view information on packages that
> have already been built."
>
> so i'm assuming that means for *all* oe-pkgdata subcommands, no
> exceptions.


Right, oe-pkgdata-util is about inspecting build output via pkgdata,
whereas most of bb is inspection tools about the metadata — before the
build. The only exception is bb-contents, which is a convenience, just
wraps oe-pkgdata-util under the hood and tells the user the oe-pkgdata-util
command in case they want to run it directly.
-- 
Christopher Larson
clarson at kergoth dot com
Founder - BitBake, OpenEmbedded, OpenZaurus
Maintainer - Tslib
Senior Software Engineer, Mentor Graphics

[-- Attachment #2: Type: text/html, Size: 3334 bytes --]

^ permalink raw reply

* [meta-oe][krogoth][PATCH] pcsc-lite: Seperate GPLV3 portions from BSD
From: Davis, Michael @ 2016-10-25 14:32 UTC (permalink / raw)
  To: openembedded-core@lists.openembedded.org

From: "Davis, Michael" <michael.davis@essvote.com>

GPLV3 and BSD portions were originally placed in the same package.
The GPLv3 portion has been seperated into pcsc-lite-spy and
pcsc-lite-spy-dev so the package can be used with GPLv3 blacklisted.

Signed-off-by: Martin Jansa <Martin.Jansa@gmail.com>
(cherry picked from commit 54c7e784c7689d8cff4173db716bb7913c65315f)
Signed-off-by: Michael Davis <michael.davis@essvote.com>
---
 .../recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb  | 24 ++++++++++++++++++----
 1 file changed, 20 insertions(+), 4 deletions(-)

diff --git a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb
index cc72549..0d2cb33 100644
--- a/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb
+++ b/meta-oe/recipes-support/pcsc-lite/pcsc-lite_1.8.13.bb
@@ -1,7 +1,13 @@
 SUMMARY = "PC/SC Lite smart card framework and applications"
 HOMEPAGE = "http://pcsclite.alioth.debian.org/"
 LICENSE = "BSD & GPLv3+"
-LICENSE_${PN}-dev = "GPLv3+"
+LICENSE_${PN} = "BSD"
+LICENSE_${PN}-lib = "BSD"
+LICENSE_${PN}-doc = "BSD"
+LICENSE_${PN}-dev = "BSD"
+LICENSE_${PN}-dbg = "BSD & GPLv3+"
+LICENSE_${PN}-spy = "GPLv3+"
+LICENSE_${PN}-spy-dev = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=bcfbd85230ac3c586fb294c8b627cf32"
 DEPENDS = "udev"
 
@@ -20,14 +26,24 @@ EXTRA_OECONF = " \
 
 S = "${WORKDIR}/pcsc-lite-${PV}"
 
-PACKAGES =+ "${PN}-lib"
+PACKAGES = "${PN} ${PN}-dbg ${PN}-dev ${PN}-lib ${PN}-doc ${PN}-spy ${PN}-spy-dev"
 
 RRECOMMENDS_${PN} = "ccid"
 
-FILES_${PN}-lib = "${libdir}/lib*${SOLIBS}"
+FILES_${PN} = "${sbindir}/pcscd"
+FILES_${PN}-lib = "${libdir}/libpcsclite*${SOLIBS}"
+FILES_${PN}-dev = "${includedir} \
+                   ${libdir}/pkgconfig \
+                   ${libdir}/libpcsclite.la \
+                   ${libdir}/libpcsclite.so"
+                   
+FILES_${PN}-spy = "${bindir}/pcsc-spy \
+                   ${libdir}/libpcscspy*${SOLIBS}"
+FILES_${PN}-spy-dev = "${libdir}/libpcscspy.la \
+                       ${libdir}/libpcscspy.so "
 
 RPROVIDES_${PN} += "${PN}-systemd"
 RREPLACES_${PN} += "${PN}-systemd"
 RCONFLICTS_${PN} += "${PN}-systemd"
 SYSTEMD_SERVICE_${PN} = "pcscd.socket"
-RDEPENDS_${PN} +="python"
+RDEPENDS_${PN}-spy +="python"
-- 
2.5.5


^ permalink raw reply related

* State of bitbake world 2016-10-24
From: Martin Jansa @ 2016-10-25 13:37 UTC (permalink / raw)
  To: openembedded-core, openembedded-devel

[-- Attachment #1: Type: text/plain, Size: 27723 bytes --]

== Number of issues - stats ==
{| class='wikitable'
!|Date		     !!colspan='3'|Failed tasks			    !!colspan='6'|Failed depencencies			 !!|Signatures		  !!colspan='12'|QA !!Comment
|-
||		||qemuarm	||qemux86	||qemux86_64	||qemuarm||max||min	||qemux86||max||min	||all 	||already-stripped	||libdir	||textrel	||build-deps	||file-rdeps	||version-going-backwards	||host-user-contaminated	||installed-vs-shipped	||unknown-configure-option	||symlink-to-sysroot	||invalid-pkgconfig	||pkgname	||	
|-
||2016-10-24	||2	||2	||1	||8	||3	||2	||4	||2	||1	||0	||0		||0		||0		||3		||0		||0		||0		||1		||0		||0		||0		||0		||	
|}

http://www.openembedded.org/wiki/Bitbake_World_Status

== Failed tasks 2016-10-24 ==

INFO: jenkins-job.sh-1.8.11 Complete log available at http://logs.nslu2-linux.org/buildlogs/oe/world/log.report.20161025_033627.log

=== common (1) ===
    * meta-openembedded/meta-oe/recipes-extended/gnuplot/gnuplot_5.0.5.bb:do_compile

=== common-x86 (0) ===

=== qemuarm (1) ===
    * meta-openembedded/meta-oe/recipes-test/fwts/fwts_git.bb:do_compile

=== qemux86 (1) ===
    * meta-browser/recipes-browser/chromium/chromium_52.0.2743.76.bb:do_compile

=== qemux86_64 (0) ===

=== Number of failed tasks (5) ===
{| class=wikitable
|-
|| qemuarm 	|| 2	 || http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemuarm.20161024_075014.log/ || http://errors.yoctoproject.org/Errors/Build/23443/
|-
|| qemux86 	|| 2	 || http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86.20161024_075019.log/ || http://errors.yoctoproject.org/Errors/Build/23444/
|-
|| qemux86_64 	|| 1	 || http://logs.nslu2-linux.org/buildlogs/oe/world/log.world.qemux86-64.20161024_104559.log/ || http://errors.yoctoproject.org/Errors/Build/23449/
|}

=== PNBLACKLISTs (118) ===

=== QA issues (4) ===
{| class=wikitable
!| Count		||Issue
|-
||0	||already-stripped
|-
||0	||file-rdeps
|-
||0	||host-user-contaminated
|-
||0	||invalid-pkgconfig
|-
||0	||libdir
|-
||0	||pkgname
|-
||0	||symlink-to-sysroot
|-
||0	||textrel
|-
||0	||unknown-configure-option
|-
||0	||version-going-backwards
|-
||1	||installed-vs-shipped
|-
||3	||build-deps
|}



=== Failed dependencies for qemuarm (8) ===

Complete log: http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20161024_103614.log/
Found differences: 
Found errors: 
    * ERROR: 8 issues were found in these recipes: fwts gnuplot xfsprogs

=== Recipes failing with maximal dependencies for qemuarm (3) ===
    * fwts -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20161024_103614.log//2_max/failed/fwts.log
    * gnuplot -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20161024_103614.log//2_max/failed/gnuplot.log
    * xfsprogs -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20161024_103614.log//2_max/failed/xfsprogs.log

=== Recipes failing with minimal dependencies for qemuarm (2) ===
    * fwts -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20161024_103614.log//3_min/failed/fwts.log
    * xfsprogs -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemuarm.20161024_103614.log//3_min/failed/xfsprogs.log

=== Failed dependencies for qemux86 (4) ===

Complete log: http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20161024_133746.log/
Found differences: 
Found errors: 
    * ERROR: 4 issues were found in these recipes: chromium gnuplot

=== Recipes failing with maximal dependencies for qemux86 (2) ===
    * chromium -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20161024_133746.log//2_max/failed/chromium.log
    * gnuplot -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20161024_133746.log//2_max/failed/gnuplot.log

=== Recipes failing with minimal dependencies for qemux86 (1) ===
    * chromium -- http://logs.nslu2-linux.org/buildlogs/oe/world/log.dependencies.qemux86.20161024_133746.log//3_min/failed/chromium.log

=== Incorrect PACKAGE_ARCH or sstate signatures (0) ===

Complete log: http://logs.nslu2-linux.org/buildlogs/oe/world/log.signatures.20161024_130243.log/

No issues detected


PNBLACKLISTs:
openembedded-core/:
meta-browser:
recipes-browser/chromium/cef3_280796.bb:PNBLACKLIST[cef3] ?= "BROKEN: fails to build with gcc-6"
meta-openembedded:
meta-efl/recipes-efl/e17/diskio_svn.bb:PNBLACKLIST[diskio] ?= "broken: switch to https://git.enlightenment.org/enlightenment/modules/diskio.git/ and fix 0.0.1+svnr82070-r0.0/E-MODULES-EXTRA/diskio/e-module-diskio.edc:58. invalid state name: 'off'. "default" state must always be first."
meta-efl/recipes-efl/e17/elbow_git.bb:PNBLACKLIST[elbow] ?= "Depends on blacklisted webkit-efl"
meta-efl/recipes-efl/e17/elmdentica_svn.bb:PNBLACKLIST[elmdentica] ?= "OLD and depends on broken azy"
meta-efl/recipes-efl/e17/emprint_svn.bb:PNBLACKLIST[emprint] ?= "if you want to use these modules with E18, then you need to update it to git recipe fetching newer sources from http://git.enlightenment.org/apps/emprint.git/"
meta-efl/recipes-efl/e17/news_svn.bb:PNBLACKLIST[news] ?= "if you want to use these modules with E18, then you need to update it to git recipe fetching newer sources from http://git.enlightenment.org/enlightenment/modules/news.git/"
meta-efl/recipes-efl/e17/rage_svn.bb:PNBLACKLIST[rage] ?= "if you want to use these modules with E18, then you need to update it to git recipe fetching newer sources from  http://git.enlightenment.org/apps/rage.git/"
meta-efl/recipes-efl/e17/screenshot_svn.bb:PNBLACKLIST[screenshot] ?= "depends on blacklisted emprint"
meta-efl/recipes-efl/efl/azy_svn.bb:PNBLACKLIST[azy] ?= "OLD and doesn't build with gcc-5"
meta-efl/recipes-efl/efl/engrave_svn.bb:PNBLACKLIST[engrave] ?= "BROKEN: fails to build with latest oe-core"
meta-efl/recipes-efl/efl/entrance_svn.bb:PNBLACKLIST[entrance] ?= "broken: switch to https://git.enlightenment.org/misc/entrance.git and fix 0.0.4+svnr82070-r7/entrance/data/themes/old/default.edc:678. invalid state name: 'defaault'. "default" state must always be first."
meta-efl/recipes-efl/webkit/webkit-efl.inc:PNBLACKLIST[webkit-efl] ?= "Old and unmaintaned fork with many security issues"
meta-efl/recipes-navigation/mcnavi/mcnavi_0.3.4.bb:PNBLACKLIST[mcnavi] ?= "BROKEN: latest version 0.3.4 is 3 years old and now broken with more strict ejde_cc from efl-1.13"
meta-filesystems/recipes-utils/dmapi/dmapi_2.2.12.bb:PNBLACKLIST[dmapi] ?= "Depends on broken xfsprogs"
meta-filesystems/recipes-utils/xfsdump/xfsdump_3.1.4.bb:PNBLACKLIST[xfsdump] ?= "Depends on broken xfsprogs"
meta-filesystems/recipes-utils/xfsprogs/xfsprogs_3.2.3.bb:PNBLACKLIST[xfsprogs] ?= "BROKEN: Needs upgrade to 4.5.0 version to be compatible with Kernel uapi changes from 4.5"
meta-gnome/recipes-apps/epdfview/epdfview_0.1.8.bb:PNBLACKLIST[epdfview] ?= "BROKEN: images are not displayed anymore"
meta-gnome/recipes-apps/gnome-mplayer/gnome-mplayer_1.0.5.bb:PNBLACKLIST[gnome-mplayer] ?= "rdepends on blacklisted mplayer"
meta-gnome/recipes-extended/gtk-theme-torturer/gtk-theme-torturer_git.bb:PNBLACKLIST[gtk-theme-torturer] ?= "BROKEN: gmacros.h:182:53: error: size of array '_GStaticAssertCompileTimeAssertion_2' is negative"
meta-gnome/recipes-gnome/gcalctool/gcalctool_5.32.0.bb:PNBLACKLIST[gcalctool] ?= "broken at least since April 2013 http://permalink.gmane.org/gmane.comp.handhelds.openembedded/57920 and nobody complained, it's also replaced by gnome calculator"
meta-gnome/recipes-gnome/gdm/gdm_2.32.2.bb:PNBLACKLIST[gdm] ?= "Depends on broken gnome-panel"
meta-gnome/recipes-gnome/gnome-control-center/gnome-control-center_2.32.1.bb:PNBLACKLIST[gnome-control-center] ?= "Depends on broken gnome-menus"
meta-gnome/recipes-gnome/gnome-keyring/gnome-keyring_2.32.1.bb:PNBLACKLIST[gnome-keyring] ?= "This version conflicts with gcr from oe-core"
meta-gnome/recipes-gnome/gnome-menus/gnome-menus3_3.10.1.bb:PNBLACKLIST[gnome-menus3] ?= "CONFLICT: 24 files are conflicting with gnome-menus"
meta-gnome/recipes-gnome/gnome-menus/gnome-menus_2.30.5.bb:PNBLACKLIST[gnome-menus] ?= "BROKEN: fails to build because of python"
meta-gnome/recipes-gnome/gnome-panel/gnome-panel3_3.0.2.bb:PNBLACKLIST[gnome-panel3] ?= "CONFLICT: depends on libgweather3 which conflicts with libgweather"
meta-gnome/recipes-gnome/gnome-panel/gnome-panel3_3.0.2.bb:PNBLACKLIST[gnome-panel3] ?= "Depends on broken gnome-menus"
meta-gnome/recipes-gnome/gnome-panel/gnome-panel_2.32.1.bb:PNBLACKLIST[gnome-panel] ?= "Depends on broken libgweather"
meta-gnome/recipes-gnome/gnome-power-manager/gnome-power-manager_2.32.0.bb:PNBLACKLIST[gnome-power-manager] ?= "BROKEN: not compatible with current libnotify"
meta-gnome/recipes-gnome/gnome-session/gnome-session_2.32.1.bb:PNBLACKLIST[gnome-session] ?= "BROKEN: fails to build with gcc-6"
meta-gnome/recipes-gnome/gnome/gnome-terminal_2.30.2.bb:PNBLACKLIST[gnome-terminal] ?= "BROKEN: fails to build with gcc-6"
meta-gnome/recipes-gnome/gnome/libgnomecups_0.2.3.bb:PNBLACKLIST[libgnomecups] ?= "Depends on broken libgnomeui"
meta-gnome/recipes-gnome/gnome/libgnomeprint_2.18.8.bb:PNBLACKLIST[libgnomeprint] ?= "Depends on broken libgnomecups"
meta-gnome/recipes-gnome/gnumeric/gnumeric_1.12.0.bb:PNBLACKLIST[gnumeric] ?= "Depends on broken libgnomeprint"
meta-gnome/recipes-gnome/gweather/libgweather3_3.0.2.bb:PNBLACKLIST[libgweather3] ?= "CONFLICT: 876 files are conflicting with libgweather"
meta-gnome/recipes-gnome/gweather/libgweather_2.30.3.bb:PNBLACKLIST[libgweather] ?= "BROKEN: fails to build with gcc-6"
meta-gnome/recipes-gnome/nautilus/nautilus3_3.2.1.bb:PNBLACKLIST[nautilus3] ?= "BROKEN: fails to build, maybe missing dependency on gnome-desktop-utils.h provider"
meta-gnome/recipes-gnome/pimlico/tasks_0.19.bb:PNBLACKLIST[tasks] ?= "Fails to build with gcc-6"
meta-gnome/recipes-gnome/pimlico/tasks_git.bb:PNBLACKLIST[tasks] ?= "Fails to build with gcc-6"
meta-gnome/recipes-gnome/system-tools/system-tools-backends_2.10.2.bb:PNBLACKLIST[system-tools-backends] ?= "does not build with distroless qemuarm as reported in 'State of bitbake world' thread, nobody volunteered to fix them"
meta-gnome/recipes-gnome/zenity/zenity_2.32.1.bb:PNBLACKLIST[zenity] ?= "BROKEN: doesn't build with B!=S"
meta-gnome/recipes-support/goffice/goffice_0.10.1.bb:PNBLACKLIST[goffice] ?= "BROKEN: fails to build with gcc-6"
meta-gnome/recipes-support/tracker/tracker_0.14.2.bb:PNBLACKLIST[tracker] ?= "BROKEN: fails to build with new binutils-2.27"
meta-gpe/recipes-support/fbreader/fbreader_git.bb:PNBLACKLIST[fbreader] ?= "BROKEN: fails to build with gcc-6"
meta-multimedia/recipes-mediacentre/xbmc/xbmc_git.bb:PNBLACKLIST[xbmc] ?= "/usr/include/c++/ctime:70:11: error: '::gmtime' has not been declared"
meta-multimedia/recipes-mkv/mkvtoolnix/mkvtoolnix_git.bb:PNBLACKLIST[mkvtoolnix] ?= "BROKEN: Failx to build with gcc-5"
meta-multimedia/recipes-multimedia/coriander/coriander_2.0.2.bb:PNBLACKLIST[coriander] ?= "BROKEN: fails to use SDL probably because libsdl-config was removed, error: unknown type name 'SDL_Overlay'"
meta-multimedia/recipes-multimedia/dleyna/renderer-service-upnp_0.3.0.bb:PNBLACKLIST[renderer-service-upnp] ?= "BROKEN: doesn't build with B!=S (trying to install rendererconsole.py from ${B} instead of ${S})"
meta-multimedia/recipes-multimedia/gstreamer-0.10/gst-ffmpeg_0.10.13.bb:PNBLACKLIST[gst-ffmpeg] ?= "Not compatible with currently used ffmpeg 3"
meta-multimedia/recipes-multimedia/gstreamer/gst123_0.3.1.bb:PNBLACKLIST[gst123] ?= "gst123 is still "sometimes" using wrong sysroot"
meta-networking/recipes-daemons/dnrd/dnrd_2.20.3.bb:PNBLACKLIST[dnrd] ?= "BROKEN: dnrd-2.20.3-r0 do_package: QA Issue: dnrd: Files/directories were installed but not shipped in any package:"
meta-networking/recipes-kernel/netmap/netmap-modules_git.bb:PNBLACKLIST[netmap-modules] ?= "BROKEN: not compatible with default kernel version 4.8"
meta-networking/recipes-kernel/netmap/netmap_git.bb:PNBLACKLIST[netmap] ?= "BROKEN: Tries to build kernel module and fails, either it should be disabled or there should be dependency on kernel like in netmap-modules"
meta-networking/recipes-protocols/accel-ppp/accel-ppp_git.bb:PNBLACKLIST[accel-ppp] ?= "BROKEN: fails to build with new binutils-2.27"
meta-networking/recipes-support/lksctp-tools/lksctp-tools_1.0.17.bb:PNBLACKLIST[lksctp-tools] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'ld-is-gold', "BROKEN: fails to link against sctp_connectx symbol", '', d)}"
meta-networking/recipes-support/nis/ypbind-mt_2.2.bb:PNBLACKLIST[ypbind-mt] ?= "BROKEN: Depends on broken yp-tools"
meta-oe/recipes-connectivity/bluez/bluez-hcidump_2.5.bb:PNBLACKLIST[bluez-hcidump] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-connectivity/bluez/bluez4_4.101.bb:PNBLACKLIST[bluez4] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-connectivity/bluez/gst-plugin-bluetooth_4.101.bb:PNBLACKLIST[gst-plugin-bluetooth] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-connectivity/soft66/soft66_git.bb:PNBLACKLIST[soft66] ?= "BROKEN: depends on broken libftdi"
meta-oe/recipes-connectivity/wvdial/wvdial_1.61.bb:PNBLACKLIST[wvdial] ?= "Depends on broken wvstreams"
meta-oe/recipes-connectivity/wvdial/wvstreams_4.6.1.bb:PNBLACKLIST[wvstreams] ?= "BROKEN: fails to build with gcc-6"
meta-oe/recipes-connectivity/zeroc-ice/zeroc-ice_3.5.1.bb:PNBLACKLIST[zeroc-ice] ?= "BROKEN: not compatible with default db version"
meta-oe/recipes-core/fakeroot/fakeroot_1.18.4.bb:PNBLACKLIST[fakeroot] ?= "BROKEN: QA Issue: -dev package contains non-symlink .so"
meta-oe/recipes-devtools/cloud9/cloud9_0.6.bb:PNBLACKLIST[cloud9] ?= "Not comatible with current nodejs 0.12, but upstream is working on it for v3"
meta-oe/recipes-devtools/ltp-ddt/ltp-ddt_1.0.0.bb:PNBLACKLIST[ltp-ddt] ?= "BROKEN: fails since last autotools.bbclass changes"
meta-oe/recipes-devtools/packagekit/packagekit_0.5.6.bb:PNBLACKLIST[packagekit] ?= "BROKEN: depends on old deprecated libopkg which is currently disabled and will be removed soon"
meta-oe/recipes-extended/subsurface/subsurface_git.bb:PNBLACKLIST[subsurface] ?= "Needs to be upgraded for compatibility with new libdivecomputer"
meta-oe/recipes-gnome/gtkextra/gtkextra_3.0.5.bb:PNBLACKLIST[gtkextra] ?= "BROKEN: Fails to build with gcc-5"
meta-oe/recipes-graphics/clutter/clutter-box2d_git.bb:PNBLACKLIST[clutter-box2d] ?= "BROKEN: doesn't build with B!=S"
meta-oe/recipes-graphics/fim/fim_0.4-rc1.bb:PNBLACKLIST[fim] ?= "BROKEN: doesn't build with B!=S (flex: can't open lex.lex)"
meta-oe/recipes-graphics/slim/slim_1.3.2.bb:PNBLACKLIST[slim] ?= "does not build with distroless qemuarm as reported in 'State of bitbake world' thread, nobody volunteered to fix them"
meta-oe/recipes-graphics/xorg-driver/xf86-input-mtev_git.bb:PNBLACKLIST[xf86-input-mtev] ?= "BROKEN: doesn't build with B!=S (Makefile without ${S} in sed call)"
meta-oe/recipes-graphics/xorg-driver/xf86-video-geode_2.11.16.bb:PNBLACKLIST[xf86-video-geode] ?= "BROKEN, fails to build"
meta-oe/recipes-kernel/ktap/ktap-module_git.bb:PNBLACKLIST[ktap-module] ?= "Not compatible with 3.19 kernel"
meta-oe/recipes-kernel/ktap/ktap_git.bb:PNBLACKLIST[ktap] ?= "Depends on blacklisted kernel-module-ktapvm"
meta-oe/recipes-multimedia/mplayer/mplayer2_git.bb:PNBLACKLIST[mplayer2] ?= "Not compatible with currently used ffmpeg 3"
meta-oe/recipes-navigation/foxtrotgps/foxtrotgps_1.1.1.bb:PNBLACKLIST[foxtrotgps] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-navigation/gdal/gdal_1.11.1.bb:PNBLACKLIST[gdal] ?= "BROKEN: fails to build with gcc-5"
meta-oe/recipes-navigation/gypsy/gypsy.inc:PNBLACKLIST[gypsy] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-navigation/navit/navit.inc:PNBLACKLIST[navit] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-sato/claws-mail/claws-mail_3.9.0.bb:PNBLACKLIST[claws-mail] ?= "depends on blacklisted libetpan"
meta-oe/recipes-sato/claws-mail/claws-plugin-gtkhtml2-viewer_0.31.bb:PNBLACKLIST[claws-plugin-gtkhtml2-viewer] ?= "depends on blacklisted claws-mail"
meta-oe/recipes-sato/claws-mail/claws-plugin-mailmbox_1.15.bb:PNBLACKLIST[claws-plugin-mailmbox] ?= "depends on blacklisted claws-mail"
meta-oe/recipes-sato/claws-mail/claws-plugin-rssyl_0.34.bb:PNBLACKLIST[claws-plugin-rssyl] ?= "depends on blacklisted claws-mail"
meta-oe/recipes-support/apcupsd/apcupsd_3.14.10.bb:PNBLACKLIST[apcupsd] ?= "BROKEN: doesn't build with B!=S"
meta-oe/recipes-support/emacs/emacs_23.4.bb:PNBLACKLIST[emacs] ?= "qemu: uncaught target signal 11 (Segmentation fault) - core dumped"
meta-oe/recipes-support/fftw/benchfft_3.1.bb:PNBLACKLIST[benchfft] ?= "does not build with distroless qemuarm as reported in 'State of bitbake world' thread, nobody volunteered to fix them"
meta-oe/recipes-support/iksemel/iksemel_1.4.bb:PNBLACKLIST[iksemel] ?= "Not compatible with gnutls version 3.4 currently in oe-core"
meta-oe/recipes-support/libdbi/libdbi-drivers_0.8.3-1.bb:PNBLACKLIST[libdbi-drivers] ?= "BROKEN: fails to build with gcc-5"
meta-oe/recipes-support/libetpan/libetpan_0.57.bb:PNBLACKLIST[libetpan] ?= "Not compatible with gnutls version 3.4 currently in oe-core"
meta-oe/recipes-support/open-vcdiff/open-vcdiff_0.8.4.bb:PNBLACKLIST[open-vcdiff] ?= "BROKEN: fails to build with gcc-6"
meta-oe/recipes-support/opencv/opencv-samples_2.4.bb:PNBLACKLIST[opencv-samples] ?= "Depends on blacklisted opencv"
meta-oe/recipes-support/opencv/opencv_2.4.bb:PNBLACKLIST[opencv] ?= "Not compatible with currently used ffmpeg 3"
meta-oe/recipes-support/openmotif/openmotif_2.3.3.bb:PNBLACKLIST[openmotif] ?= "BROKEN: doesn't build with B!=S"
meta-oe/recipes-support/opensync/libsyncml_0.5.4.bb:PNBLACKLIST[libsyncml] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-oe/recipes-support/openwbem/openwbem_3.2.3.bb:PNBLACKLIST[openwbem] ?= "BROKEN: fails to build with gcc-6"
meta-oe/recipes-support/pidgin/pidgin-otr_4.0.0.bb:PNBLACKLIST[pidgin-otr] ?= "depends on blacklisted pidgin"
meta-oe/recipes-support/vala-terminal/vala-terminal_git.bb:PNBLACKLIST[vala-terminal] ?= "BROKEN: Doesn't work with B!=S, touch: cannot touch `src/.stamp': No such file or directory"
meta-oe/recipes-support/vboxguestdrivers/vboxguestdrivers_4.3.36.bb:PNBLACKLIST[vboxguestdrivers] ?= "BROKEN: not compatible with default kernel version 4.8"
meta-qt5:
meta-smartphone:
meta-fso/recipes-freesmartphone/freesmartphone/libframeworkd-glib_git.bb:PNBLACKLIST[libframeworkd-glib] ?= "BROKEN: many errors when building with gcc-6"
meta-fso/recipes-freesmartphone/freesmartphone/zhone_git.bb:PNBLACKLIST[zhone] ?= "rdepends on python-pycairo which was removed"
meta-shr/recipes-shr/3rdparty/advancedcaching_git.bb:PNBLACKLIST[advancedcaching] ?= "RDEPENDS on python-pygtk was removed from oe-core"
meta-shr/recipes-shr/3rdparty/emtooth2_svn.bb:PNBLACKLIST[emtooth2] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-shr/recipes-shr/3rdparty/ffalarms_git.bb:PNBLACKLIST[ffalarms] = "Doesn't build after vala upgrade from 0.24.0 to 0.26.1"
meta-shr/recipes-shr/3rdparty/gwaterpas_0.3.bb:PNBLACKLIST[gwaterpas] ?= "broken: depends on blacklisted fltk"
meta-shr/recipes-shr/3rdparty/iliwi_git.bb:PNBLACKLIST[iliwi] = "Doesn't build after vala upgrade from 0.24.0 to 0.26.1"
meta-shr/recipes-shr/3rdparty/intone_git.bb:PNBLACKLIST[intone] = "rdepends on blacklisted mplayer2"
meta-shr/recipes-shr/3rdparty/jefliks_git.bb:PNBLACKLIST[jefliks] ?= "depends on blacklisted iksemel"
meta-shr/recipes-shr/3rdparty/openmoko-gps_svn.bb:PNBLACKLIST[openmoko-gps] ?= "RDEPENDS on python-pygtk which was removed from oe-core"
meta-shr/recipes-shr/3rdparty/pisi_0.5.3.bb:PNBLACKLIST[pisi] ?= "RDEPENDS on python-pygtk which was removed from oe-core"
meta-shr/recipes-shr/3rdparty/podboy_svn.bb:PNBLACKLIST[podboy] ?= "${@bb.utils.contains('DISTRO_FEATURES', 'bluez5', 'bluez5 conflicts with bluez4 and bluez5 is selected in DISTRO_FEATURES', '', d)}"
meta-shr/recipes-shr/3rdparty/sensmon_git.bb:PNBLACKLIST[sensmon] = "Doesn't build after vala upgrade from 0.24.0 to 0.26.1"
meta-shr/recipes-shr/3rdparty/valacompass_git.bb:PNBLACKLIST[valacompass] = "Doesn't build after vala upgrade from 0.24.0 to 0.26.1"
meta-shr/recipes-shr/games/aceofpenguins_1.4.bb:PNBLACKLIST[aceofpenguins] ?= "BROKEN: fails to build with new binutils-2.27"
meta-shr/recipes-shr/shr/shr-installer_git.bb:PNBLACKLIST[shr-installer] ?= "Depends on blacklisted packagekit"
meta-webos-ports:
meta-luneos/recipes-luneos/luna-webappmanager/luna-webappmanager.bb:PNBLACKLIST[luna-webappmanager] ?= "BROKEN: needs to be adapted to new qt-5.7"
meta-luneui/recipes-luneui/luna-next/luna-next.bb:PNBLACKLIST[luna-next] ?= "BROKEN: needs to be adapted to new qtwayland-5.7"
PNBLACKLIST[android-system] = "depends on lxc from meta-virtualiazation which isn't included in my world builds"
PNBLACKLIST[bigbuckbunny-1080p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[bigbuckbunny-480p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[bigbuckbunny-720p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[bigbuckbunny-720p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[tearsofsteel-1080p] = "big and doesn't really need to be tested so much"
PNBLACKLIST[build-appliance-image] = "tries to include whole downloads directory in /home/builder/poky :/"
PNBLACKLIST[linux-yocto-tiny-kexecboot] = "does weird sh!t breaking other kernels and modules - broken for years"
PNBLACKLIST[linux-yocto-tiny] = "does weird sh!t breaking other kernels and modules - broken for years"


QA issues by type:
count: 0	issue: already-stripped


count: 0	issue: libdir


count: 0	issue: textrel


count: 3	issue: build-deps
boinc-client-7.6.33: boinc-client rdepends on libxscrnsaver, but it isn't a build dependency, missing libxscrnsaver in DEPENDS or PACKAGECONFIG? [build-deps]
fwts-16.09.00: fwts rdepends on dtc, but it isn't a build dependency, missing dtc in DEPENDS or PACKAGECONFIG? [build-deps]
wireshark-2.2.1: wireshark rdepends on libssh, but it isn't a build dependency, missing libssh in DEPENDS or PACKAGECONFIG? [build-deps]


count: 0	issue: file-rdeps


count: 0	issue: version-going-backwards


count: 0	issue: host-user-contaminated


count: 1	issue: installed-vs-shipped
wireshark: 45 installed and not shipped files. [installed-vs-shipped]


count: 0	issue: unknown-configure-option


count: 0	issue: symlink-to-sysroot


count: 0	issue: invalid-pkgconfig


count: 0	issue: pkgname



== Tested changes (not included in master yet) - bitbake ==
latest upstream commit: 
00f7909 toaster: Update default release to Morty
not included in master yet: 
ab9076a world-image: add extra target

== Tested changes (not included in master yet) - openembedded-core ==
latest upstream commit: 
327e4bf build-appliance-image: Update to master head revision
not included in master yet: 
4a72ee0 qemux86: Add identical qemux86copy variant for tests
71e62cf sstate-sysroot-cruft.sh: Extend the whitelist
c134ac8 recipes: Replace "cp -a" with "cp -R --no-dereference --preserve=mode,links"
a1805b3 buildhistory.bbclass: metadata-revs show repo parent
a98aaca metadata-revs: provide more information
2c24123 report-error: Allow to upload reports automatically
5243800 test-dependencies.sh: Strip also '\.bb: .*' before adding failed recipe to list of failed
8977ef2 sstate-sysroot-cruft: Add /etc/ld.so.conf to whitelist

== Tested changes (not included in master yet) - meta-openembedded ==
latest upstream commit: 
8ba31c9 gpsd, mongodb: use PACKAGECONFIG_CONFARGS instead of now empty EXTRA_OECONF
not included in master yet: 
2acaa8f tipcutils: upgrade to 2.2.0
85cb3c7 gnuplot: upgrade to 5.0.5
0756ada libsocketcan: upgrade to 0.0.10
17b6d33 python-certifi: update to version 2016.9.26
94c1528 python-cffi: update to version 1.8.3
311334b python-lxml: update to version 3.6.4
901c6c7 python-prompt-toolkit: update to version 1.0.7
b822709 python-pymisp: update to version 2.4.51.1
a231726 python-pymongo: update to version 3.3.0
c5a6a84 python-pyopenssl: update to version 16.1.0
a0c9a28 nginx: update to version 1.11.5
bba05c6 python-pytest: update to version 3.0.1
c9fd910 python-rfc3987: update to version 1.3.7
1b181fd python-urllib3: update to version 1.18
5c23279 python-werkzeug: update to version 0.11.11
f4856d3 python-bcrypt: update to version 3.1.1
c4d4c79 python-cmd2: update to version 0.6.9
56f30f3 python-dbusmock: update to version 0.16.7
2013428 python-evdev:uild with clang
2951547 libmbim: Fix build with clang
612b2bb libplist: Squash warnings found by clang
d8e9117 frame: Fix build with clang
5e0dc68 python-greenlet: Rename register from rX to xX for aarch64
acdaaee libdc1394: Upgrade to 2.2.4
9446302 lowpan-tools: Fix errors found with clang
83fec86 gpm: Remove nested functions
0004410 flashrom: Fix build with clang and aarch64
2084473 openl2tp: Fix build with clang
b9cd81c glcompbench: Demand c++11 explicitly
1be8a35 joe: Fix build with clang
50491e4 fwts: Update to 16.09 release
8ea7a26 libmnl, nftables: Update versions
19eb49f mg: Update to 20161005
965d028 python-unidiff: python module for parsing diff data
b9967c3 rsnapshot: update to 1.4.2
d2902a3 dhcp_%.bbappend: fix replaces original key warning
64ebc30 android-tools: fix native build
4a138c3 c-ares: update 1.11.0 -> 1.12.0
c51e824 c-ares: fix metadata
197336b glmark2: Enabling c++ 11 features
4b54ff4 vim: Update to v8.0.0022
9380f2a libfastjson: add recipe
6204c28 librelp: add recipe
79a8d7b rsyslog: upgrade to 8.22.0
ec0fb46 openldap: use recommended backend mdb
9e16c14 nodejs: update to 4.6.1
801fb7f lksctp-tools: 1.0.16 -> 1.0.17
bfa5840 drbd-utils: 8.9.3 -> 8.9.6

== Tested changes (not included in master yet) - meta-qt5 ==
latest upstream commit: 
9aa870e qtbase: avoid qmake errors due to missing oe-device-extra.pri
not included in master yet: 

== Tested changes (not included in master yet) - meta-browser ==
latest upstream commit: 
ec4459a Merge pull request #14 from raymanfx/master
not included in master yet: 
ad9b1ce firefox: Fix build using gcc 6
338b100 chromium: install all pak files plus resources and blob.bin files.
f36a731 chromium-wayland: include 0006-Remove-GBM-support-from-wayland.gyp.patch only with CHROMIUM_ENABLE_WAYLAND
036a8ce chromium-wayland: add wayland to REQUIRED_DISTRO_FEATURES
31c0708 chromium.inc: export also CFLAGS_host

== Tested changes (not included in master yet) - meta-webos-ports ==
latest upstream commit: 
8637511 libqofono: use the recipe from meta-qt5
not included in master yet: 

== Tested changes (not included in master yet) - meta-smartphone ==
latest upstream commit: 
fbc50f8 linux-samsung-tuna: bump SRCREV to fix build with gcc6
not included in master yet: 


[-- Attachment #2: Digital signature --]
[-- Type: application/pgp-signature, Size: 169 bytes --]

^ permalink raw reply

* Re: most efficient way to map perl RH rpms to OE package names?
From: Robert P. J. Day @ 2016-10-25 12:11 UTC (permalink / raw)
  To: Christopher Larson; +Cc: OE Core mailing list
In-Reply-To: <CABcZANnYLS0pfSpdzf3NVV4KEg_88b9mPark9gpstJUFHZTzxQ@mail.gmail.com>


  one more question on this topic before i dive back in ... it seems
that some perl modules are available as both a perl recipe-generated
module, and from meta-cpan.

  generated module:
	perl-module-compress-raw-bzip2
  meta-cpan recipe:
	compress-raw-bzip2-perl_2.069.bb

am i reading correctly that those should represent the same thing, and
that (theoretically) i could include either equivalently?

  ok, back to work ...

rday

-- 

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

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



^ permalink raw reply

* Re: most efficient way to map perl RH rpms to OE package names?
From: Robert P. J. Day @ 2016-10-25 11:51 UTC (permalink / raw)
  To: Christopher Larson; +Cc: OE Core mailing list
In-Reply-To: <CABcZANnYLS0pfSpdzf3NVV4KEg_88b9mPark9gpstJUFHZTzxQ@mail.gmail.com>


  following up on my original query, i'm now in the process of
"mapping" a couple hundred CentOS perl rpms to their OE equivalents,
and here's the process so far; just want to check that i'm going about
this in a sane way.

  first, as chris larson suggested, use "oe-pkgdata-util" to see which
generated perl modules appear to match up to equivalent rpms, and
quite a number of them seem to be direct equivalents, such as:

 * perl-HTTP-Tiny-0.033-3.el7.noarch
 * perl-module-http-tiny

so examples like that appear pretty straightforward.

  next, i noticed that there are a few perl recipes under OE,
recipes-devtools and recipes-extended, a couple *apparent*
equivalents:

 * perl-XML-LibXML-2.0018-5.el7.x86_64
 * libxml-perl_0.08.bb

 * perl-XML-NamespaceSupport-1.11-10.el7.noarch
 * libxml-namespacesupport-perl_1.11.bb

and so on. not so many of those but still, that took care of a few
more matches.

  finally, i figure i'm going to have to dive into meta-cpan for the
rest, and here's something puzzling.

  one of the RH rpms to be matched was
perl-IO-Compress-2.061-2.el7.noarch, but the generated modules were:

  perl-module-io-compress-deflate
  perl-module-io-compress-adapter-bzip2
  perl-module-io-compress-zlib-extra
  perl-module-io-compress-zip-constants
  perl-module-io-compress-bzip2
  perl-module-io-compress-adapter-identity
  perl-module-io-compress-zlib-constants
  perl-module-io-compress-base-common
  perl-module-io-compress-adapter-deflate
  perl-module-io-compress-gzip
  perl-module-io-compress-zip
  perl-module-io-compress-gzip-constants
  perl-module-io-compress-base
  perl-module-io-compress-rawdeflate

but no "perl-module-io-compress", which is what i would have expected.

  however, if i pop over to meta-cpan, there *is* a recipe file
"io-compress-perl_2.069.bb". can anyone explain how i should interpret
this?

  it seems (and i am not a perl expert) that the foundation
IO::Compress recipe is at meta-cpan, but the more specific sub-modules
are built from the base OE perl recipe. or is it that these modules:

  perl-module-io-compress-base-common
  perl-module-io-compress-base

represent the base class? i'm just trying to figure out the standard
OE packaging for perl modules.

rday

-- 

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

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



^ permalink raw reply

* Re: [PATCH v2] package.py: New EXTRA_STRIPFLAGS variable
From: Blaettler, Michael @ 2016-10-25 11:46 UTC (permalink / raw)
  To: Ulf Magnusson; +Cc: OE-core
In-Reply-To: <CAFkk2KTg=et1wgtoHMhPdidNQ0iiGeJ95_2APkkQdj1=2yRd3Q@mail.gmail.com>

Hi Ulf

Thanks for your feedback.
I see no problem in using "d.getVar('EXTRA_STRIPFLAGS', True)". I'll apply the changes and send another revision of the patch.

Kind regards

Michael

-----Ursprüngliche Nachricht-----
Von: Ulf Magnusson [mailto:ulfalizer@gmail.com] 
Gesendet: Dienstag, 25. Oktober 2016 13:30
An: Blaettler, Michael (BT CPS R&D ZG FW ITW)
Cc: OE-core
Betreff: Re: [OE-core] [PATCH v2] package.py: New EXTRA_STRIPFLAGS variable

On Tue, Oct 25, 2016 at 1:18 PM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
> On Tue, Oct 25, 2016 at 12:23 PM, Michael Blättler 
> <michael.blaettler@siemens.com> wrote:
>> The EXTRA_STRIPFLAGS variable can be used to pass additional parameters to the strip command.
>> This can be used to remove additional sections or to keep symbols.
>> The removal of additional sections can be useful to enable reproducible builds.
>> Sections which contain paths or md5sums of the debug binaries (like 
>> gnu_debuglink) can be eliminated with this flag.
>>
>> Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
>> Signed-off-by: Michael Blättler <michael.blaettler@siemens.com>
>> ---
>>  meta/classes/package.bbclass |  5 +++--
>>  meta/lib/oe/package.py       | 13 ++++++-------
>>  2 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/meta/classes/package.bbclass 
>> b/meta/classes/package.bbclass index a6f0a7a..05b92a8 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -1055,14 +1055,15 @@ python split_and_strip_files () {
>>      # Now lets go back over things and strip them
>>      #
>>      if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
>> +        extraflags = d.getVar('EXTRA_STRIPFLAGS', False)
>
> Why False? That means you can't do e.g.
>
>   EXTRA_STRIPFLAGS = "${EXTRA_STRIPSFLAGS_HELPER}"
>
> or
>
>   EXTRA_STRIPFLAGS = "${@calculate_extra_stripflags()}"
>
>>          strip = d.getVar("STRIP", True)
>>          sfiles = []
>>          for file in elffiles:
>>              elf_file = int(elffiles[file])
>>              #bb.note("Strip %s" % file)
>> -            sfiles.append((file, elf_file, strip))
>> +            sfiles.append((file, elf_file, strip, extraflags))
>>          for f in kernmods:
>> -            sfiles.append((f, 16, strip))
>> +            sfiles.append((f, 16, strip, extraflags))
>>
>>          oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
>>
>> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py index 
>> 02642f2..757044a 100644
>> --- a/meta/lib/oe/package.py
>> +++ b/meta/lib/oe/package.py
>> @@ -10,7 +10,7 @@ def runstrip(arg):
>>
>>      import stat, subprocess
>>
>> -    (file, elftype, strip) = arg
>> +    (file, elftype, strip, extraflags) = arg
>>
>>      newmode = None
>>      if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
>> @@ -18,17 +18,16 @@ def runstrip(arg):
>>          newmode = origmode | stat.S_IWRITE | stat.S_IREAD
>>          os.chmod(file, newmode)
>>
>> -    extraflags = ""
>> -
>> -    # kernel module
>> +    extraflags += ' '
>
> I'd remove this line and add an extra space to the beginning of the += 
> values below, but no biggie.
>
>> +    # kernel module
>>      if elftype & 16:
>> -        extraflags = "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
>> +        extraflags += "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
>>      # .so and shared library
>>      elif ".so" in file and elftype & 8:
>> -        extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
>> +        extraflags += "--remove-section=.comment --remove-section=.note --strip-unneeded"
>>      # shared or executable:
>>      elif elftype & 8 or elftype & 4:
>> -        extraflags = "--remove-section=.comment --remove-section=.note"
>> +        extraflags += "--remove-section=.comment --remove-section=.note"
>>
>>      stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
>>      bb.debug(1, "runstrip: %s" % stripcmd)
>> --
>> 2.1.4
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
> Cheers,
> Ulf

This might still have issues if EXTRA_STRIPFLAGS is unset by the way.
Maybe you want the following, to avoid extraflags becoming None:

  extraflags = d.getVar('EXTRA_STRIPFLAGS', True) or ""

Cheers,
Ulf

^ permalink raw reply

* Re: [PATCH v2] package.py: New EXTRA_STRIPFLAGS variable
From: Ulf Magnusson @ 2016-10-25 11:29 UTC (permalink / raw)
  To: Michael Blättler; +Cc: OE-core
In-Reply-To: <CAFkk2KRg0eC98kRU=vAbdCG8zLAaB6B9_H2tBiY-bweoNfLSsA@mail.gmail.com>

On Tue, Oct 25, 2016 at 1:18 PM, Ulf Magnusson <ulfalizer@gmail.com> wrote:
> On Tue, Oct 25, 2016 at 12:23 PM, Michael Blättler
> <michael.blaettler@siemens.com> wrote:
>> The EXTRA_STRIPFLAGS variable can be used to pass additional parameters to the strip command.
>> This can be used to remove additional sections or to keep symbols.
>> The removal of additional sections can be useful to enable reproducible builds.
>> Sections which contain paths or md5sums of the debug binaries (like gnu_debuglink)
>> can be eliminated with this flag.
>>
>> Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
>> Signed-off-by: Michael Blättler <michael.blaettler@siemens.com>
>> ---
>>  meta/classes/package.bbclass |  5 +++--
>>  meta/lib/oe/package.py       | 13 ++++++-------
>>  2 files changed, 9 insertions(+), 9 deletions(-)
>>
>> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
>> index a6f0a7a..05b92a8 100644
>> --- a/meta/classes/package.bbclass
>> +++ b/meta/classes/package.bbclass
>> @@ -1055,14 +1055,15 @@ python split_and_strip_files () {
>>      # Now lets go back over things and strip them
>>      #
>>      if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
>> +        extraflags = d.getVar('EXTRA_STRIPFLAGS', False)
>
> Why False? That means you can't do e.g.
>
>   EXTRA_STRIPFLAGS = "${EXTRA_STRIPSFLAGS_HELPER}"
>
> or
>
>   EXTRA_STRIPFLAGS = "${@calculate_extra_stripflags()}"
>
>>          strip = d.getVar("STRIP", True)
>>          sfiles = []
>>          for file in elffiles:
>>              elf_file = int(elffiles[file])
>>              #bb.note("Strip %s" % file)
>> -            sfiles.append((file, elf_file, strip))
>> +            sfiles.append((file, elf_file, strip, extraflags))
>>          for f in kernmods:
>> -            sfiles.append((f, 16, strip))
>> +            sfiles.append((f, 16, strip, extraflags))
>>
>>          oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
>>
>> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
>> index 02642f2..757044a 100644
>> --- a/meta/lib/oe/package.py
>> +++ b/meta/lib/oe/package.py
>> @@ -10,7 +10,7 @@ def runstrip(arg):
>>
>>      import stat, subprocess
>>
>> -    (file, elftype, strip) = arg
>> +    (file, elftype, strip, extraflags) = arg
>>
>>      newmode = None
>>      if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
>> @@ -18,17 +18,16 @@ def runstrip(arg):
>>          newmode = origmode | stat.S_IWRITE | stat.S_IREAD
>>          os.chmod(file, newmode)
>>
>> -    extraflags = ""
>> -
>> -    # kernel module
>> +    extraflags += ' '
>
> I'd remove this line and add an extra space to the beginning of the +=
> values below, but no biggie.
>
>> +    # kernel module
>>      if elftype & 16:
>> -        extraflags = "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
>> +        extraflags += "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
>>      # .so and shared library
>>      elif ".so" in file and elftype & 8:
>> -        extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
>> +        extraflags += "--remove-section=.comment --remove-section=.note --strip-unneeded"
>>      # shared or executable:
>>      elif elftype & 8 or elftype & 4:
>> -        extraflags = "--remove-section=.comment --remove-section=.note"
>> +        extraflags += "--remove-section=.comment --remove-section=.note"
>>
>>      stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
>>      bb.debug(1, "runstrip: %s" % stripcmd)
>> --
>> 2.1.4
>>
>> --
>> _______________________________________________
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>
> Cheers,
> Ulf

This might still have issues if EXTRA_STRIPFLAGS is unset by the way.
Maybe you want the following, to avoid extraflags becoming None:

  extraflags = d.getVar('EXTRA_STRIPFLAGS', True) or ""

Cheers,
Ulf


^ permalink raw reply

* Re: Howto find the providing recipe for a specific package?
From: Ulf Magnusson @ 2016-10-25 11:26 UTC (permalink / raw)
  To: thilo.cestonaro@ts.fujitsu.com; +Cc: openembedded-core@lists.openembedded.org
In-Reply-To: <1477393407.20929.2.camel@ts.fujitsu.com>

On Tue, Oct 25, 2016 at 1:03 PM, thilo.cestonaro@ts.fujitsu.com
<thilo.cestonaro@ts.fujitsu.com> wrote:
>
>> $ oe-pkgdata-util lookup-recipe kernel-module-xfrm6-mode-transport
>>
> Thanks! That is what I was looking for!
>
> Cheers,
> Thilo
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
>

Hello,

oe-pkgdata-util has some newly added documentation in the 2.2 version
of the reference manual by the way:
http://www.yoctoproject.org/docs/2.2/ref-manual/ref-manual.html#viewing-package-information-with-oe-pkgdata-util

Cheers,
Ulf


^ permalink raw reply

* Re: [PATCH v2] package.py: New EXTRA_STRIPFLAGS variable
From: Ulf Magnusson @ 2016-10-25 11:18 UTC (permalink / raw)
  To: Michael Blättler; +Cc: OE-core
In-Reply-To: <1477390980-16319-1-git-send-email-michael.blaettler@siemens.com>

On Tue, Oct 25, 2016 at 12:23 PM, Michael Blättler
<michael.blaettler@siemens.com> wrote:
> The EXTRA_STRIPFLAGS variable can be used to pass additional parameters to the strip command.
> This can be used to remove additional sections or to keep symbols.
> The removal of additional sections can be useful to enable reproducible builds.
> Sections which contain paths or md5sums of the debug binaries (like gnu_debuglink)
> can be eliminated with this flag.
>
> Signed-off-by: Pascal Bach <pascal.bach@siemens.com>
> Signed-off-by: Michael Blättler <michael.blaettler@siemens.com>
> ---
>  meta/classes/package.bbclass |  5 +++--
>  meta/lib/oe/package.py       | 13 ++++++-------
>  2 files changed, 9 insertions(+), 9 deletions(-)
>
> diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
> index a6f0a7a..05b92a8 100644
> --- a/meta/classes/package.bbclass
> +++ b/meta/classes/package.bbclass
> @@ -1055,14 +1055,15 @@ python split_and_strip_files () {
>      # Now lets go back over things and strip them
>      #
>      if (d.getVar('INHIBIT_PACKAGE_STRIP', True) != '1'):
> +        extraflags = d.getVar('EXTRA_STRIPFLAGS', False)

Why False? That means you can't do e.g.

  EXTRA_STRIPFLAGS = "${EXTRA_STRIPSFLAGS_HELPER}"

or

  EXTRA_STRIPFLAGS = "${@calculate_extra_stripflags()}"

>          strip = d.getVar("STRIP", True)
>          sfiles = []
>          for file in elffiles:
>              elf_file = int(elffiles[file])
>              #bb.note("Strip %s" % file)
> -            sfiles.append((file, elf_file, strip))
> +            sfiles.append((file, elf_file, strip, extraflags))
>          for f in kernmods:
> -            sfiles.append((f, 16, strip))
> +            sfiles.append((f, 16, strip, extraflags))
>
>          oe.utils.multiprocess_exec(sfiles, oe.package.runstrip)
>
> diff --git a/meta/lib/oe/package.py b/meta/lib/oe/package.py
> index 02642f2..757044a 100644
> --- a/meta/lib/oe/package.py
> +++ b/meta/lib/oe/package.py
> @@ -10,7 +10,7 @@ def runstrip(arg):
>
>      import stat, subprocess
>
> -    (file, elftype, strip) = arg
> +    (file, elftype, strip, extraflags) = arg
>
>      newmode = None
>      if not os.access(file, os.W_OK) or os.access(file, os.R_OK):
> @@ -18,17 +18,16 @@ def runstrip(arg):
>          newmode = origmode | stat.S_IWRITE | stat.S_IREAD
>          os.chmod(file, newmode)
>
> -    extraflags = ""
> -
> -    # kernel module
> +    extraflags += ' '

I'd remove this line and add an extra space to the beginning of the +=
values below, but no biggie.

> +    # kernel module
>      if elftype & 16:
> -        extraflags = "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
> +        extraflags += "--strip-debug --remove-section=.comment --remove-section=.note --preserve-dates"
>      # .so and shared library
>      elif ".so" in file and elftype & 8:
> -        extraflags = "--remove-section=.comment --remove-section=.note --strip-unneeded"
> +        extraflags += "--remove-section=.comment --remove-section=.note --strip-unneeded"
>      # shared or executable:
>      elif elftype & 8 or elftype & 4:
> -        extraflags = "--remove-section=.comment --remove-section=.note"
> +        extraflags += "--remove-section=.comment --remove-section=.note"
>
>      stripcmd = "'%s' %s '%s'" % (strip, extraflags, file)
>      bb.debug(1, "runstrip: %s" % stripcmd)
> --
> 2.1.4
>
> --
> _______________________________________________
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core

Cheers,
Ulf


^ permalink raw reply

* Re: meta-toolchain and meta-toolchain-qt for specific image
From: thilo.cestonaro @ 2016-10-25 11:03 UTC (permalink / raw)
  To: anders@chargestorm.se; +Cc: openembedded-core@lists.openembedded.org
In-Reply-To: <20161025074921.sqpe3dup4jqkcqe5@ad.chargestorm.se>

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]


> Yes, `bitbake <my-image>` does only build your image and `bitbake
> <my-image> -c populate_sdk` does only build the SDK. 
> 
Then I will give it a try!
Thanks!

Cheers,
Thilo

[-- Attachment #2: smime.p7s --]
[-- Type: application/x-pkcs7-signature, Size: 3847 bytes --]

^ permalink raw reply


This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox