[OE-core] ✗ patchtest: failure for Python3 packaging fixes (rev2)

2017-01-30 Thread Patchwork
== Series Details ==

Series: Python3 packaging fixes (rev2)
Revision: 2
URL   : https://patchwork.openembedded.org/series/5024/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue Series does not apply on top of target branch 
[test_series_merge_on_head] 
  Suggested fixRebase your series on top of targeted branch
  Targeted branch  master (currently at d7d26488f2)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


[OE-core] [PATCH v2 7/7] python-3-manifest: split out typing

2017-01-30 Thread Anders Darander
This allows us to use typing.py without having to add the whole
python3-misc package.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 10 +++---
 scripts/contrib/python/generate-manifest-3.5.py  |  3 +++
 2 files changed, 10 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index d4c7c4d..a53a8d5 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -5,9 +5,9 @@
 
  
 
-PROVIDES+="${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}-dev ${PN}-difflib 
${PN}-distutils ${PN}-distutils-staticdev ${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 "
+PROVIDES+="${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}-dev ${PN}-difflib 
${PN}-distutils ${PN}-distutils-staticdev ${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}-typing ${PN}-unittest 
${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc "
 
-PACKAGES="${PN}-dbg ${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}-dev 
${PN}-difflib ${PN}-distutils-staticdev ${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 ${PN}-modules"
+PACKAGES="${PN}-dbg ${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}-dev 
${PN}-difflib ${PN}-distutils-staticdev ${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}-typing ${PN}-unittest ${PN}-unixadmin ${PN}-xml ${PN}-xmlrpc 
${PN}-modules"
 
 SUMMARY_${PN}-2to3="Python automated Python 2 to 3 code translator"
 RDEPENDS_${PN}-2to3="${PN}-core"
@@ -257,6 +257,10 @@ 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-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}-typing="Python typing support"
+RDEPENDS_${PN}-typing="${PN}-core"

[OE-core] [PATCH v2 6/7] python-3-manifest: add ipaddress to python3-io

2017-01-30 Thread Anders Darander
This allows us to use ipaddress without requiring the add the whole
python3-misc.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 8b64069..d4c7c4d 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -119,7 +119,7 @@ FILES_${PN}-importlib="${libdir}/python3.5/importlib 
${libdir}/python3.5/importl
 
 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/__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.* "
+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/ipaddress.* ${libdir}/python3.5/__pycache__/ipaddress.* 
${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/S
 tringIO.* ${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"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index 1a06896..55bda19 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -289,7 +289,7 @@ if __name__ == "__main__":
 
 m.addPackage( "${PN}-io", "Python low-level I/O", "${PN}-core ${PN}-math",
 "lib-dynload/_socket.*.so lib-dynload/_io.*.so lib-dynload/_ssl.*.so 
lib-dynload/select.*.so lib-dynload/termios.*.so lib-dynload/cStringIO.*.so " +
-"pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
+"ipaddress.* pipes.* socket.* ssl.* tempfile.* StringIO.* io.* _pyio.*" )
 
 m.addPackage( "${PN}-json", "Python JSON support", "${PN}-core ${PN}-math 
${PN}-re",
 "json lib-dynload/_json.*.so" ) # package
-- 
2.10.2

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


[OE-core] [PATCH v2 5/7] python-3-manifest: add _compat_pickle to python3-pickle

2017-01-30 Thread Anders Darander
This allows us to depend on _compat_pickle.* wihtout having to add the whole
python3-misc.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 555ac88..8b64069 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -167,7 +167,7 @@ FILES_${PN}-numbers="${libdir}/python3.5/decimal.* 
${libdir}/python3.5/__pycache
 
 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/__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.* 
"
+FILES_${PN}-pickle="${libdir}/python3.5/_compat_pickle.* 
${libdir}/python3.5/__pycache__/_compat_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"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index 770ef75..1a06896 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -329,7 +329,7 @@ if __name__ == "__main__":
 "decimal.* fractions.* numbers.*" )
 
 m.addPackage( "${PN}-pickle", "Python serialisation/persistence support", 
"${PN}-core ${PN}-codecs ${PN}-io ${PN}-re",
-"pickle.* shelve.* lib-dynload/cPickle.*.so pickletools.*" )
+"_compat_pickle.* pickle.* shelve.* lib-dynload/cPickle.*.so 
pickletools.*" )
 
 m.addPackage( "${PN}-pkgutil", "Python package extension utility support", 
"${PN}-core",
 "pkgutil.*")
-- 
2.10.2

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


[OE-core] [PATCH v2 0/7] Python3 packaging fixes

2017-01-30 Thread Anders Darander
This moves a few python modules to more logical places (thus removing the
need for python3-misc on more systems).

A new package for typing.py is also created.

0001 add imp to importlib in the generator, the earlier commit in oe-core 
that made this move, only patched the generated manifest.

v2: rebased on todays master

The following changes since commit d7d26488f252d60628862ee114a4404e8d6cb6f1:

  staging: Handle stale sysroot rebuild issue (2017-01-28 23:31:18 +)

are available in the git repository at:

  git://github.com/darander/openembedded-core python-splitting-v2
  https://github.com/darander/openembedded-core/tree/python-splitting-v2

Anders Darander (7):
  python-3-manifest: fix adding imp to importlib
  python3-manifest: move htlm.py to python3-html
  python-3-manifest: add argparse to RDEPENDS for netclient
  python-3-manifest: add socketserver to netserver
  python-3-manifest: add _compat_pickle to python3-pickle
  python-3-manifest: add ipaddress to python3-io
  python-3-manifest: split out typing

 meta/recipes-devtools/python/python-3.5-manifest.inc | 20 
 scripts/contrib/python/generate-manifest-3.5.py  | 15 +--
 2 files changed, 21 insertions(+), 14 deletions(-)

-- 
2.10.2

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


[OE-core] [PATCH v2 2/7] python3-manifest: move htlm.py to python3-html

2017-01-30 Thread Anders Darander
This allows us to use html.py without importing misc.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index b92048f..6093c28 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -103,7 +103,7 @@ 
FILES_${PN}-gdbm="${libdir}/python3.5/lib-dynload/_gdbm.*.so ${libdir}/python3.5
 
 SUMMARY_${PN}-html="Python HTML processing support"
 RDEPENDS_${PN}-html="${PN}-core"
-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.* "
+FILES_${PN}-html="${libdir}/python3.5/formatter.* 
${libdir}/python3.5/__pycache__/formatter.* 
${libdir}/python3.5/htmlentitydefs.* 
${libdir}/python3.5/__pycache__/htmlentitydefs.* ${libdir}/python3.5/html 
${libdir}/python3.5/html/__pycache__ ${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"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index cf19f47..cc2e561 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -276,7 +276,7 @@ if __name__ == "__main__":
 "lib-dynload/fcntl.*.so" )
 
 m.addPackage( "${PN}-html", "Python HTML processing support", "${PN}-core",
-"formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* 
HTMLParser.* " )
+"formatter.* htmlentitydefs.* html htmllib.* markupbase.* sgmllib.* 
HTMLParser.* " )
 
 m.addPackage( "${PN}-importlib", "Python import implementation library", 
"${PN}-core ${PN}-lang",
 "importlib imp.*" )
-- 
2.10.2

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


[OE-core] [PATCH v2 1/7] python-3-manifest: fix adding imp to importlib

2017-01-30 Thread Anders Darander
Commit: 512334f102a33833d39af53467894315f0715d07
"python-3.5-manifest: Add imp to importlib"

added imp to importlib in the generated manifest, but not in the generator 
script.

Signed-off-by: Anders Darander 
---
 scripts/contrib/python/generate-manifest-3.5.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index 7259543..cf19f47 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -279,7 +279,7 @@ if __name__ == "__main__":
 "formatter.* htmlentitydefs.* htmllib.* markupbase.* sgmllib.* 
HTMLParser.* " )
 
 m.addPackage( "${PN}-importlib", "Python import implementation library", 
"${PN}-core ${PN}-lang",
-"importlib" )
+"importlib imp.*" )
 
 m.addPackage( "${PN}-gdbm", "Python GNU database support", "${PN}-core",
 "lib-dynload/_gdbm.*.so" )
-- 
2.10.2

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


[OE-core] [PATCH v2 4/7] python-3-manifest: add socketserver to netserver

2017-01-30 Thread Anders Darander
socketserver.* should be part of python3-netserver.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 5c10cd2..555ac88 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -159,7 +159,7 @@ FILES_${PN}-netclient="${libdir}/python3.5/*Cookie*.* 
${libdir}/python3.5/__pyca
 
 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/__pycache__/cgi.* ${libdir}/python3.5/*HTTPServer.* 
${libdir}/python3.5/__pycache__/*HTTPServer.* 
${libdir}/python3.5/SocketServer.* 
${libdir}/python3.5/__pycache__/SocketServer.* "
+FILES_${PN}-netserver="${libdir}/python3.5/cgi.* 
${libdir}/python3.5/__pycache__/cgi.* ${libdir}/python3.5/socketserver.* 
${libdir}/python3.5/__pycache__/socketserver.* 
${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"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index ac95bc8..770ef75 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -323,7 +323,7 @@ if __name__ == "__main__":
 "base64.* cookielib.* ftplib.* gopherlib.* hmac.* http* httplib.* 
mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* 
mimetools.*" )
 
 m.addPackage( "${PN}-netserver", "Python Internet Protocol servers", 
"${PN}-core ${PN}-netclient ${PN}-shell ${PN}-threading",
-"cgi.* *HTTPServer.* SocketServer.*" )
+"cgi.* socketserver.* *HTTPServer.* SocketServer.*" )
 
 m.addPackage( "${PN}-numbers", "Python number APIs", "${PN}-core 
${PN}-lang ${PN}-re",
 "decimal.* fractions.* numbers.*" )
-- 
2.10.2

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


[OE-core] [PATCH v2 3/7] python-3-manifest: add argparse to RDEPENDS for netclient

2017-01-30 Thread Anders Darander
http/server.py requires argparse.

Signed-off-by: Anders Darander 
---
 meta/recipes-devtools/python/python-3.5-manifest.inc | 2 +-
 scripts/contrib/python/generate-manifest-3.5.py  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-devtools/python/python-3.5-manifest.inc 
b/meta/recipes-devtools/python/python-3.5-manifest.inc
index 6093c28..5c10cd2 100644
--- a/meta/recipes-devtools/python/python-3.5-manifest.inc
+++ b/meta/recipes-devtools/python/python-3.5-manifest.inc
@@ -154,7 +154,7 @@ RDEPENDS_${PN}-multiprocessing="${PN}-core ${PN}-io 
${PN}-lang ${PN}-pickle ${PN
 
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"
+RDEPENDS_${PN}-netclient="${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime 
${PN}-io ${PN}-lang ${PN}-logging ${PN}-mime"
 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/http* 
${libdir}/python3.5/http*/__pycache__ ${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 ${lib
 dir}/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"
diff --git a/scripts/contrib/python/generate-manifest-3.5.py 
b/scripts/contrib/python/generate-manifest-3.5.py
index cc2e561..ac95bc8 100755
--- a/scripts/contrib/python/generate-manifest-3.5.py
+++ b/scripts/contrib/python/generate-manifest-3.5.py
@@ -318,7 +318,7 @@ if __name__ == "__main__":
 m.addPackage( "${PN}-multiprocessing", "Python multiprocessing support", 
"${PN}-core ${PN}-io ${PN}-lang ${PN}-pickle ${PN}-threading ${PN}-ctypes 
${PN}-mmap",
 "lib-dynload/_multiprocessing.*.so multiprocessing" ) # package
 
-m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", 
"${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang ${PN}-logging 
${PN}-mime",
+m.addPackage( "${PN}-netclient", "Python Internet Protocol clients", 
"${PN}-argparse ${PN}-core ${PN}-crypt ${PN}-datetime ${PN}-io ${PN}-lang 
${PN}-logging ${PN}-mime",
 "*Cookie*.* " +
 "base64.* cookielib.* ftplib.* gopherlib.* hmac.* http* httplib.* 
mimetypes.* nntplib.* poplib.* smtplib.* telnetlib.* urllib  uuid.* rfc822.* 
mimetools.*" )
 
-- 
2.10.2

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


Re: [OE-core] ✗ patchtest: failure for Python3 packaging fixes

2017-01-30 Thread Anders Darander
* Leonardo Sandoval  [170130 16:00]:



> On 01/27/2017 03:40 AM, Anders Darander wrote:
> > Hi,

> > * Patchwork  [170127 10:23]:

> > > Series: Python3 packaging fixes
> > > Revision: 1
> > > URL   : https://patchwork.openembedded.org/series/5024/
> > > State : failure
> > > * Issue Series does not apply on top of target branch 
> > > [test_series_merge_on_head]
> > >Suggested fixRebase your series on top of targeted branch
> > >Targeted branch  master (currently at a99cca0e8e)
> > This is likely due to issues with the email-patches. One of the patches,
> > 0003, has a line > 998 characters (one line in the patch context, ie not
> > modified by me).

> Anders, I do not think the problem is the patch format because git-am does
> not complain at this stage. This is what I am getting when either git-am or
> git-apply

Have you tried pulling it directly from github?

I can assure you, that the series was created on top of the current
master when it was sent, and when patchwork complained about it.

> git pw mbox 5024 | git am
> Applying: python-3-manifest: fix adding imp to importlib
> Applying: python3-manifest: move htlm.py to python3-html
> Applying: python-3-manifest: add argparse to RDEPENDS for netclient
> error: patch failed:
> meta/recipes-devtools/python/python-3.5-manifest.inc:154
> error: meta/recipes-devtools/python/python-3.5-manifest.inc: patch does not
> apply
> Patch failed at 0003 python-3-manifest: add argparse to RDEPENDS for
> netclient
> The copy of the patch that failed is found in:
>/home/lsandov1/repos/openembedded-core/.git/rebase-apply/patch
> When you have resolved this problem, run "git am --continue".
> If you prefer to skip this patch, run "git am --skip" instead.
> To restore the original branch and stop patching, run "git am --abort".
> lsandov1@lsandov1-mobl2:~/repos/openembedded-core$ git am --abort

Sure, I get the same error, 

git am ~/Downloads/Python3-packaging-fixes.mbox
Applying: python-3-manifest: fix adding imp to importlib
Applying: python3-manifest: move htlm.py to python3-html
Applying: python-3-manifest: add argparse to RDEPENDS for netclient
error: patch failed:
meta/recipes-devtools/python/python-3.5-manifest.inc:154
error: meta/recipes-devtools/python/python-3.5-manifest.inc: patch does
not apply
Patch failed at 0003 python-3-manifest: add argparse to RDEPENDS for
netclient
The copy of the patch that failed is found in: .git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".

However, the issue is a broken line in the 3rd patch.

If I instead do:

git checkout a99cca0e8ee15f7b542986d89b70054ac7cb24be
git merge --ff-only github/python-splitting

It works OK, (which was the master of the time at sending).

However, today it doesn't apply cleanly, thus I'm sending 2nd version.
(Though, I'm sure that patchwork will complain again)...

Hope you'll have better luck applying the 2nd version.

Cheers,
Anders

-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] glib-2.0: native package should not depend on DISTRO_FEATURES

2017-01-30 Thread Gary Thomas

On 2017-01-21 06:02, Gary Thomas wrote:

xxx-native packages should not depend on ${DISTRO} settings.  Doing
so feels inherently wrong and limits the usefulness of sstate-cache.

This patch changes how this package is installed, in particular
removing the dependency on the ${DISTRO_FEATURES} variable in
glib-2.0-native.  This will further improve the ability to share
native packages between builds with differences in ${DISTRO_FEATURES}

Signed-off-by: Gary Thomas 
---
 meta/recipes-core/glib-2.0/glib.inc | 14 +-
 1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/meta/recipes-core/glib-2.0/glib.inc 
b/meta/recipes-core/glib-2.0/glib.inc
index cb6aca7..a5db455 100644
--- a/meta/recipes-core/glib-2.0/glib.inc
+++ b/meta/recipes-core/glib-2.0/glib.inc
@@ -92,16 +92,20 @@ do_install_append () {
sed -i -e '1s,#!.*perl,#! ${USRBINPATH}/env perl,' 
${D}${bindir}/glib-mkenums
fi

+# Make sure gio-querymodules is unique among multilibs
+if test "x${MLPREFIX}" != "x"; then
+mv ${D}${libexecdir}/gio-querymodules 
${D}${libexecdir}/${MLPREFIX}gio-querymodules
+fi
+}
+
+do_install_append_class-target () {
+   # Tests are only installed on targets, not native builds.  Separating 
this out
+   # keeps glib-2.0-native from depending on ${DISTRO_FEATURES}
if [ -f ${D}${datadir}/installed-tests/glib/gdbus-serialization.test ]; 
then
if ${@bb.utils.contains("DISTRO_FEATURES", "x11", "false", 
"true", d)}; then
rm 
${D}${datadir}/installed-tests/glib/gdbus-serialization.test
fi
fi
-
-# Make sure gio-querymodules is unique among multilibs
-if test "x${MLPREFIX}" != "x"; then
-mv ${D}${libexecdir}/gio-querymodules 
${D}${libexecdir}/${MLPREFIX}gio-querymodules
-fi
 }

 do_install_append_libc-musl () {



Ping?


--

Gary Thomas |  Consulting for the
MLB Associates  |Embedded world

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


Re: [OE-core] rootfs build failure

2017-01-30 Thread Paul Eggleton
There seems to be some kind of intermittent issue where the pkgdata file 
either goes missing or is never created - this sounds vaguely familiar though 
I'm not sure where it came up before. Leo, can you file a bug for the 
situation you saw?

Thanks,
Paul

On Monday, 30 January 2017 10:46:38 AM NZDT Leonardo Sandoval wrote:
> workaround: Try using another package manager as first option in the
> PACKAGE_CLASSES variable set on local.conf.
> 
> I have a similar error on a OpenSUSE machine but did not report it. I
> was using the rpm (which is the default) but did the trick mentioned
> above and worked.
> 
> On 01/30/2017 09:44 AM, Andrew Goodbody wrote:
> > Anyone know what the deal is here?
> > 
> > Andrew
> > 
> >> -Original Message-
> >> I now get the following build failure from do_rootfs
> >> 
> >> The stack trace of python calls that resulted in this exception/failure
> >> was: File: 'exec_python_func() autogenerated', lineno: 2, function:
> >> >> 
> >>   0001:
> >>   *** 0002:license_create_manifest(d)
> >>   
> >>   0003:
> >> File: '/home/andrew/src/camol3/camol/layers/openembedded-
> >> core/meta/classes/license.bbclass', lineno: 48, function:
> >> license_create_manifest
> >> 
> >>   0044:pkg_dic = {}
> >>   0045:for pkg in sorted(image_list_installed_packages(d)):
> >>   0046:pkg_info = os.path.join(d.getVar('PKGDATA_DIR'),
> >>   0047:'runtime-reverse', pkg)
> >>   
> >>   *** 0048:pkg_name = os.path.basename(os.readlink(pkg_info))
> >>   
> >>   0049:
> >>   0050:pkg_dic[pkg_name] =
> >> 
> >> oe.packagedata.read_pkgdatafile(pkg_info)
> >> 
> >>   0051:if not "LICENSE" in pkg_dic[pkg_name].keys():
> >>   0052:pkg_lic_name = "LICENSE_" + pkg_name
> >> 
> >> Exception: FileNotFoundError: [Errno 2] No such file or directory:
> >> '/home/andrew/src/camol3/camol/build/tmp-camol-
> >> glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs'
> >> 
> >> ERROR: whippet-internal-image-1.0-r0 do_rootfs: Function failed:
> >> license_create_manifest
> >> 
> >> /home/andrew/src/camol3/camol/build/tmp-camol-
> >> glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs indeed
> >> does not exist but
> >> /home/andrew/src/camol3/camol/build/tmp-camol-
> >> glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs-4.5.1 does
> >> exist.
> >> 
> >> Andrew


-- 

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


Re: [OE-core] [PATCH 1/5] utils: Avoid need to relocate wrapper scripts

2017-01-30 Thread Christopher Larson
On Mon, Jan 30, 2017 at 5:14 PM, Richard Purdie <
richard.pur...@linuxfoundation.org> wrote:

> Whilst the path to the executable is dynamically determined, the passed in
> environment variables or parameters are not relocatable and rely on the
> sstate
> remapping code. In the recipe specific sysroot case this has become more
> costly.
>
> This patch translates such paths into relocatable entries which means that
> a sed replacement at final installation isn't needed.
>
> Signed-off-by: Richard Purdie 
>

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


[OE-core] ✗ patchtest: failure for "utils: Avoid need to relocate ..." and 4 more

2017-01-30 Thread Patchwork
== Series Details ==

Series: "utils: Avoid need to relocate ..." and 4 more
Revision: 1
URL   : https://patchwork.openembedded.org/series/5072/
State : failure

== Summary ==


Thank you for submitting this patch series to OpenEmbedded Core. This is
an automated response. Several tests have been executed on the proposed
series by patchtest resulting in the following failures:



* Issue A patch file has been added, but does not have a 
Signed-off-by tag [test_signed_off_by_presence] 
  Suggested fixSign off the added patch file 
(meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch)



If you believe any of these test results are incorrect, please reply to the
mailing list (openembedded-core@lists.openembedded.org) raising your concerns.
Otherwise we would appreciate you correcting the issues and submitting a new
version of the patchset if applicable. Please ensure you add/increment the
version number when sending the new version (i.e. [PATCH] -> [PATCH v2] ->
[PATCH v3] -> ...).

---
Test framework: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest
Test suite: http://git.yoctoproject.org/cgit/cgit.cgi/patchtest-oe

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


[OE-core] [PATCH 5/5] xmlto: Don't hardcode the path to tail

2017-01-30 Thread Richard Purdie
We don't need to hardcode a path to tail, follow the other tools examples and
don't specify a path since PATH is good enough for us.

Signed-off-by: Richard Purdie 
---
 meta/recipes-devtools/xmlto/xmlto_0.0.28.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb 
b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
index aaaeb6e..ce5d1e0 100644
--- a/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
+++ b/meta/recipes-devtools/xmlto/xmlto_0.0.28.bb
@@ -26,7 +26,7 @@ RDEPENDS_${PN}_append_class-target = " \
   libxslt-bin \
   coreutils \
 "
-CACHED_CONFIGUREVARS += "ac_cv_path_TAIL=${bindir}/tail"
+CACHED_CONFIGUREVARS += "ac_cv_path_TAIL=tail"
 
 BBCLASSEXTEND = "native"
 
-- 
2.7.4

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


[OE-core] [PATCH 1/5] utils: Avoid need to relocate wrapper scripts

2017-01-30 Thread Richard Purdie
Whilst the path to the executable is dynamically determined, the passed in
environment variables or parameters are not relocatable and rely on the sstate
remapping code. In the recipe specific sysroot case this has become more costly.

This patch translates such paths into relocatable entries which means that
a sed replacement at final installation isn't needed.

Signed-off-by: Richard Purdie 
---
 meta/classes/utils.bbclass | 12 ++--
 1 file changed, 10 insertions(+), 2 deletions(-)

diff --git a/meta/classes/utils.bbclass b/meta/classes/utils.bbclass
index 549e4b8..16f42b4 100644
--- a/meta/classes/utils.bbclass
+++ b/meta/classes/utils.bbclass
@@ -264,10 +264,14 @@ create_cmdline_wrapper () {
 
mv $cmd $cmd.real
cmdname=`basename $cmd`
+   dirname=`dirname $cmd`
+   relpath=`python3 -c "import os; 
print(os.path.relpath('${D}${base_prefix}', '$dirname'))"`
+   cmdoptions=`echo $@ | sed -e "s:${base_prefix}:\\$realdir/$relpath:g"`
cat <$cmd
 #!/bin/bash
 realpath=\`readlink -fn \$0\`
-exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real 
$@ "\$@"
+realdir=\`dirname \$realpath\`
+exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real 
$cmdoptions "\$@"
 END
chmod +x $cmd
 }
@@ -287,10 +291,14 @@ create_wrapper () {
 
mv $cmd $cmd.real
cmdname=`basename $cmd`
+   dirname=`dirname $cmd`
+   relpath=`python3 -c "import os; 
print(os.path.relpath('${D}${base_prefix}', '$dirname'))"`
+   exportstring=`echo $@ | sed -e "s:${base_prefix}:\\$realdir/$relpath:g"`
cat <$cmd
 #!/bin/bash
 realpath=\`readlink -fn \$0\`
-export $@
+realdir=\`dirname \$realpath\`
+export $exportstring
 exec -a \`dirname \$realpath\`/$cmdname \`dirname \$realpath\`/$cmdname.real 
"\$@"
 END
chmod +x $cmd
-- 
2.7.4

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


[OE-core] [PATCH 2/5] relocatable: Make native .pc files relocatable

2017-01-30 Thread Richard Purdie
The native .pc files currently have hardcoded paths in them meaning each has
to be relocated at final install time. pkg-config has built in functionality
to avoid this, namely the pcfiledir variable.

This function translates .pc files to use the variable meaning further
relocation later is unnecessary.

Signed-off-by: Richard Purdie 
---
 meta/classes/relocatable.bbclass | 13 -
 1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/meta/classes/relocatable.bbclass b/meta/classes/relocatable.bbclass
index 4ca9981..582812c 100644
--- a/meta/classes/relocatable.bbclass
+++ b/meta/classes/relocatable.bbclass
@@ -1,7 +1,18 @@
 inherit chrpath
 
-SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess"
+SYSROOT_PREPROCESS_FUNCS += "relocatable_binaries_preprocess 
relocatable_native_pcfiles"
 
 python relocatable_binaries_preprocess() {
 rpath_replace(d.expand('${SYSROOT_DESTDIR}'), d)
 }
+
+relocatable_native_pcfiles () {
+   if [ -d ${SYSROOT_DESTDIR}${libdir}/pkgconfig ]; then
+   rel=${@os.path.relpath(d.getVar('base_prefix'), 
d.getVar('libdir') + "/pkgconfig")}
+   sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" 
${SYSROOT_DESTDIR}${libdir}/pkgconfig/*.pc
+   fi
+   if [ -d ${SYSROOT_DESTDIR}${datadir}/pkgconfig ]; then
+   rel=${@os.path.relpath(d.getVar('base_prefix'), 
d.getVar('datadir') + "/pkgconfig")}
+   sed -i -e "s:${base_prefix}:\${pcfiledir}/$rel:g" 
${SYSROOT_DESTDIR}${datadir}/pkgconfig/*.pc
+   fi
+}
-- 
2.7.4

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


[OE-core] [PATCH 3/5] distro/defaultsetup: Enable removal of libtool .la files by default

2017-01-30 Thread Richard Purdie
Relocation of native .la files during recipe specific sysroot relocation
is probably the final straw in just killing these files off.

Change things so this class is inherited by default. If distros don't want to
do this, they can opt out but it seems like the best thing to do now since
.la files aren't needed on Linux.

Signed-off-by: Richard Purdie 
---
 meta/conf/distro/defaultsetup.conf | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/conf/distro/defaultsetup.conf 
b/meta/conf/distro/defaultsetup.conf
index 1055b9b..ca2f917 100644
--- a/meta/conf/distro/defaultsetup.conf
+++ b/meta/conf/distro/defaultsetup.conf
@@ -20,5 +20,5 @@ CACHE = "${TMPDIR}/cache/${TCMODE}-${TCLIBC}${@['', '/' + 
str(d.getVar('MACHINE'
 USER_CLASSES ?= ""
 PACKAGE_CLASSES ?= "package_ipk"
 INHERIT_BLACKLIST = "blacklist"
-INHERIT_DISTRO ?= "debian devshell sstate license"
+INHERIT_DISTRO ?= "debian devshell sstate license remove-libtool"
 INHERIT += "${PACKAGE_CLASSES} ${USER_CLASSES} ${INHERIT_DISTRO} 
${INHERIT_BLACKLIST}"
-- 
2.7.4

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


[OE-core] [PATCH 4/5] binutils-cross: Remove exec_prefix from the linker search path

2017-01-30 Thread Richard Purdie
We don't put target libs into a native/cross ${exec_prefix} but having
this in the default search path means all linker scripts have to be relocated.
This is a considerable chunk of files to create multiple copies of for no good
reason.

Instead, patch out the paths we don't need.

Signed-off-by: Richard Purdie 
---
 meta/recipes-devtools/binutils/binutils-cross.inc  |  5 +++
 .../binutils/binutils/no-tooldirpaths.patch| 47 ++
 2 files changed, 52 insertions(+)
 create mode 100644 
meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch

diff --git a/meta/recipes-devtools/binutils/binutils-cross.inc 
b/meta/recipes-devtools/binutils/binutils-cross.inc
index fd3d801..7ebd7e3 100644
--- a/meta/recipes-devtools/binutils/binutils-cross.inc
+++ b/meta/recipes-devtools/binutils/binutils-cross.inc
@@ -7,9 +7,14 @@ BPN = "binutils"
 INHIBIT_DEFAULT_DEPS = "1"
 INHIBIT_AUTOTOOLS_DEPS = "1"
 
+SRC_URI += "file://no-tooldirpaths.patch"
+
+# Specify lib-path else we use a load of search dirs which we don't use
+# and mean the linker scripts have to be relocated.
 EXTRA_OECONF += "--with-sysroot=${STAGING_DIR_TARGET} \
 --disable-install-libbfd \
 --enable-poison-system-directories \
+--with-lib-path==${target_base_libdir}:=${target_libdir} \
 "
 do_install () {
oe_runmake 'DESTDIR=${D}' install
diff --git a/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch 
b/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch
new file mode 100644
index 000..2bfc8d4
--- /dev/null
+++ b/meta/recipes-devtools/binutils/binutils/no-tooldirpaths.patch
@@ -0,0 +1,47 @@
+We don't place target libraries within ${exec_prefix}, we'd always place these
+within the target sysroot within the standard library directories. Worse, the
+append_to_lib_path code prefixes these paths with the sysroot which makes even
+less sense.
+
+These directories therefore don't make sense in our case and mean we have to 
+relocate all the linker scripts if they're present. Dropping them 
+gives a reasonable performance improvement/simplification.
+
+Upstream-Status: Inappropriate
+
+RP 2017/01/30
+
+Index: git/ld/genscripts.sh
+===
+--- git.orig/ld/genscripts.sh
 git/ld/genscripts.sh
+@@ -189,29 +189,6 @@ append_to_lib_path()
+   fi
+ }
+ 
+-# Always search $(tooldir)/lib, aka /usr/local/TARGET/lib when native
+-# except when LIBPATH=":".
+-if [ "${LIB_PATH}" != ":" ] ; then
+-  libs=
+-  if [ "x${TOOL_LIB}" = "x" ] ; then
+-if [ "x${NATIVE}" = "xyes" ] ; then
+-  libs="${exec_prefix}/${target_alias}/lib"
+-fi
+-  else
+-# For multilib'ed targets, ensure both 
${target_alias}/lib${LIBPATH_SUFFIX}
+-# and ${TOOL_LIB}/lib${LIBPATH_SUFFIX} are in the default search path,
+-# because 64bit libraries may be in both places, depending on
+-# cross-development setup method (e.g.: /usr/s390x-linux/lib64
+-# vs. /usr/s390-linux/lib64)
+-case "${NATIVE}:${LIBPATH_SUFFIX}:${TOOL_LIB}" in
+-  :* | *::* | *:*:*${LIBPATH_SUFFIX}) ;;
+-  *) libs="${exec_prefix}/${target_alias}/lib${LIBPATH_SUFFIX}" ;;
+-esac
+-libs="${exec_prefix}/${TOOL_LIB}/lib ${libs}"
+-  fi
+-  append_to_lib_path ${libs}
+-fi
+-
+ if [ "x${LIB_PATH}" = "x" ] && [ "x${USE_LIBPATH}" = xyes ] ; then
+   libs=${NATIVE_LIB_DIRS}
+   if [ "x${NATIVE}" = "xyes" ] ; then
-- 
2.7.4

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


Re: [OE-core] [PATCH] ffmpeg: disable cpu autodetection

2017-01-30 Thread Andreas Oberritter
On Mon, 30 Jan 2017 18:21:10 -0500
Denys Dmytriyenko  wrote:

> On Mon, Jan 30, 2017 at 10:59:50PM +0100, Andreas Oberritter wrote:
> > Just pass the correct -mcpu= configure switch (fallback to generic).
> > 
> > Avoids warnings like:
> > | warning: switch -mcpu=cortex-a15 conflicts with -march=armv7-a switch  
> 
> That is actually a valid warning - cortex-a15 is armv7ve, not armv7a...

Agreed. That's why I decided to fix it with this patch.

Regards,
Andreas

> > Signed-off-by: Andreas Oberritter 
> > ---
> >  meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb | 7 +++
> >  1 file changed, 7 insertions(+)
> > 
> > diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb 
> > b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
> > index 66718c4..c376d82 100644
> > --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
> > +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
> > @@ -66,6 +66,12 @@ PACKAGECONFIG[xv] = 
> > "--enable-outdev=xv,--disable-outdev=xv,libxv"
> >  # Check codecs that require --enable-nonfree
> >  USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 
> > 'yes', '', d)}"
> >  
> > +def cpu(d):
> > +for arg in (d.getVar('TUNE_CCARGS') or '').split():
> > +if arg.startswith('-mcpu='):
> > +return arg[6:]
> > +return 'generic'
> > +
> >  EXTRA_OECONF = " \
> >  --disable-stripping \
> >  --enable-pic \
> > @@ -90,6 +96,7 @@ EXTRA_OECONF = " \
> >  --shlibdir=${libdir} \
> >  --datadir=${datadir}/ffmpeg \
> >  ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp 
> > --disable-mipsdspr2', d)} \
> > +--cpu=${@cpu(d)} \
> >  "
> >  
> >  EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
> > -- 
> > 2.7.4
> > 
> > -- 
> > ___
> > Openembedded-core mailing list
> > Openembedded-core@lists.openembedded.org
> > http://lists.openembedded.org/mailman/listinfo/openembedded-core  

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


Re: [OE-core] [PATCH] ffmpeg: disable cpu autodetection

2017-01-30 Thread Denys Dmytriyenko
On Mon, Jan 30, 2017 at 10:59:50PM +0100, Andreas Oberritter wrote:
> Just pass the correct -mcpu= configure switch (fallback to generic).
> 
> Avoids warnings like:
> | warning: switch -mcpu=cortex-a15 conflicts with -march=armv7-a switch

That is actually a valid warning - cortex-a15 is armv7ve, not armv7a...


> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb 
> b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
> index 66718c4..c376d82 100644
> --- a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
> +++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
> @@ -66,6 +66,12 @@ PACKAGECONFIG[xv] = 
> "--enable-outdev=xv,--disable-outdev=xv,libxv"
>  # Check codecs that require --enable-nonfree
>  USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 
> 'yes', '', d)}"
>  
> +def cpu(d):
> +for arg in (d.getVar('TUNE_CCARGS') or '').split():
> +if arg.startswith('-mcpu='):
> +return arg[6:]
> +return 'generic'
> +
>  EXTRA_OECONF = " \
>  --disable-stripping \
>  --enable-pic \
> @@ -90,6 +96,7 @@ EXTRA_OECONF = " \
>  --shlibdir=${libdir} \
>  --datadir=${datadir}/ffmpeg \
>  ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp 
> --disable-mipsdspr2', d)} \
> +--cpu=${@cpu(d)} \
>  "
>  
>  EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
> -- 
> 2.7.4
> 
> -- 
> ___
> Openembedded-core mailing list
> Openembedded-core@lists.openembedded.org
> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 1/2] gptfdisk: fix support for 'large' drives

2017-01-30 Thread Andreas Oberritter
Ping.

On Wed, 30 Nov 2016 22:50:45 +0100
Andreas Oberritter  wrote:

> Make's switch '-e' replaced important compiler flags from the
> project's Makefile, i.e. -D_FILE_OFFSET_BITS=64.
> 
> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb 
> b/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
> index 8fab28f..d62a903 100644
> --- a/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
> +++ b/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
> @@ -13,7 +13,7 @@ SRC_URI[sha256sum] = 
> "864c8aee2efdda50346804d7e6230407d5f42a8ae754df70404dd8b2fd
>  UPSTREAM_CHECK_URI = 
> "http://sourceforge.net/projects/gptfdisk/files/gptfdisk/;
>  UPSTREAM_CHECK_REGEX = "/gptfdisk/(?P(\d+[\.\-_]*)+)/"
>  
> -EXTRA_OEMAKE = "-e MAKEFLAGS="
> +EXTRA_OEMAKE = "'CC=${CC}' 'CXX=${CXX}'"
>  
>  do_install() {
>  install -d ${D}${sbindir}

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


Re: [OE-core] [PATCH 2/2] util-linux: create own package for lsblk

2017-01-30 Thread Andreas Oberritter
Ping.

On Wed, 30 Nov 2016 19:50:27 +0100
Andreas Oberritter  wrote:

> Let util-linux-bash-completion depend on it, because it uses it.
> 
> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-core/util-linux/util-linux.inc | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-core/util-linux/util-linux.inc 
> b/meta/recipes-core/util-linux/util-linux.inc
> index 70cba6b..ae85fd1 100644
> --- a/meta/recipes-core/util-linux/util-linux.inc
> +++ b/meta/recipes-core/util-linux/util-linux.inc
> @@ -30,7 +30,7 @@ PACKAGES =+ "util-linux-agetty util-linux-fdisk 
> util-linux-cfdisk util-linux-sfd
>   util-linux-swaponoff util-linux-losetup util-linux-umount \
>   util-linux-mount util-linux-readprofile util-linux-uuidd \
>   util-linux-uuidgen util-linux-lscpu util-linux-fsck 
> util-linux-blkid \
> - util-linux-mkfs util-linux-mcookie util-linux-reset \
> + util-linux-mkfs util-linux-mcookie util-linux-reset 
> util-linux-lsblk \
>   util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim 
> \
>   util-linux-partx util-linux-hwclock util-linux-mountpoint \
>   util-linux-findfs util-linux-getopt util-linux-sulogin 
> util-linux-prlimit"
> @@ -95,6 +95,7 @@ FILES_util-linux-prlimit = "${bindir}/prlimit"
>  FILES_util-linux-pylibmount = 
> "${PYTHON_SITEPACKAGES_DIR}/libmount/pylibmount.so \
> 
> ${PYTHON_SITEPACKAGES_DIR}/libmount/__init__.* \
> 
> ${PYTHON_SITEPACKAGES_DIR}/libmount/__pycache__/*"
> +FILES_util-linux-lsblk = "${bindir}/lsblk"
>  FILES_util-linux-lscpu = "${bindir}/lscpu"
>  
>  FILES_util-linux-fsck = "${base_sbindir}/fsck*"
> @@ -116,7 +117,7 @@ RDEPENDS_util-linux-reset += "ncurses"
>  
>  RDEPENDS_util-linux-runuser += "libpam"
>  
> -RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup 
> util-linux-sulogin"
> +RDEPENDS_${PN} = "util-linux-umount util-linux-swaponoff util-linux-losetup 
> util-linux-sulogin util-linux-lsblk"
>  RDEPENDS_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'pam', 
> 'util-linux-runuser', '', d)}"
>  
>  RRECOMMENDS_${PN} = "util-linux-fdisk util-linux-cfdisk util-linux-sfdisk 
> util-linux-mount util-linux-readprofile util-linux-mkfs util-linux-mountpoint 
> util-linux-prlimit"
> @@ -285,6 +286,7 @@ python populate_packages_prepend() {
>extra_depends='', prepend=True, allow_links=True)
>  }
>  
> +RDEPENDS_${PN}-bash-completion += "util-linux-lsblk"
>  RDEPENDS_${PN}-ptest = "bash grep coreutils"
>  
>  do_compile_ptest() {

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


Re: [OE-core] [PATCH 2/2] gptfdisk: put sgdisk into its own package

2017-01-30 Thread Andreas Oberritter
Ping.

On Wed, 30 Nov 2016 22:50:46 +0100
Andreas Oberritter  wrote:

> This allows to avoid pulling in ncurses if only sgdisk is needed.
> 
> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb | 6 ++
>  1 file changed, 6 insertions(+)
> 
> diff --git a/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb 
> b/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
> index d62a903..047aa97 100644
> --- a/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
> +++ b/meta/recipes-devtools/fdisk/gptfdisk_1.0.1.bb
> @@ -23,4 +23,10 @@ do_install() {
>  install -m 0755 fixparts ${D}${sbindir}
>  }
>  
> +PACKAGES =+ "${PN}-sgdisk"
> +
> +RRECOMMENDS_${PN} = "${PN}-sgdisk"
> +
> +FILES_${PN}-sgdisk = "${sbindir}/sgdisk"
> +
>  BBCLASSEXTEND = "native nativesdk"

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


Re: [OE-core] [PATCH 1/2] bash: use update-alternatives for the bash binary

2017-01-30 Thread Andreas Oberritter
Ping.

On Wed, 30 Nov 2016 19:50:26 +0100
Andreas Oberritter  wrote:

> Busybox may offer a bash applet. If enabled, the alternatives mechanism
> avoids breaking logins if bash gets deinstalled while /bin/bash is configured
> as a login shell.
> 
> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-extended/bash/bash.inc | 6 --
>  1 file changed, 4 insertions(+), 2 deletions(-)
> 
> diff --git a/meta/recipes-extended/bash/bash.inc 
> b/meta/recipes-extended/bash/bash.inc
> index 1d08526..a05b987 100644
> --- a/meta/recipes-extended/bash/bash.inc
> +++ b/meta/recipes-extended/bash/bash.inc
> @@ -14,9 +14,11 @@ EXTRA_OECONF = "--enable-job-control --without-bash-malloc"
>  # This is what other major distros do. And this is what we wanted. See 
> bug#5359 and bug#7137.
>  CFLAGS += "-DNON_INTERACTIVE_LOGIN_SHELLS"
>  
> -ALTERNATIVE_${PN} = "sh"
> +ALTERNATIVE_${PN} = "bash sh"
> +ALTERNATIVE_LINK_NAME[bash] = "${base_bindir}/bash"
> +ALTERNATIVE_TARGET[bash] = "${base_bindir}/bash"
>  ALTERNATIVE_LINK_NAME[sh] = "${base_bindir}/sh"
> -ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash"
> +ALTERNATIVE_TARGET[sh] = "${base_bindir}/bash.${BPN}"
>  ALTERNATIVE_PRIORITY = "100"
>  
>  RDEPENDS_${PN} += "base-files"

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


Re: [OE-core] [PATCH 2/2] connman: enable connman-wait-online.service

2017-01-30 Thread Andreas Oberritter
Ping.

On Wed, 30 Nov 2016 13:22:31 +0100
Andreas Oberritter  wrote:

> Fixes network mounts on boot.
> 
> Signed-off-by: Andreas Oberritter 
> ---
>  meta/recipes-connectivity/connman/connman.inc | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/meta/recipes-connectivity/connman/connman.inc 
> b/meta/recipes-connectivity/connman/connman.inc
> index 091e402..0480257 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -56,7 +56,7 @@ PACKAGECONFIG[wispr] = 
> "--enable-wispr,--disable-wispr,gnutls,"
>  INITSCRIPT_NAME = "connman"
>  INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
>  
> -SYSTEMD_PACKAGES = "${PN} ${PN}-vpn"
> +SYSTEMD_PACKAGES = "${PN} ${PN}-vpn ${PN}-wait-online"
>  SYSTEMD_SERVICE_${PN} = "connman.service"
>  SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
>  SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"

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


Re: [OE-core] [PATCH] connman: Simplify and fix packaging of VPN plug-ins

2017-01-30 Thread Andreas Oberritter
Ping.

On Mon,  5 Dec 2016 23:41:53 +0100
Andreas Oberritter  wrote:

> - Use simple static packaging.
> - Move VPN runtime dependencies from connman to the individual plug-ins.
> - Create a connmann-ppp package containing libppp-plugin.so, which is
>   a shared library needed by l2tp and pptp plug-ins.
> - Let connman suggest VPN packages instead of recommending them, so they
>   don't get installed by default.
> - Remove unknown configure options (--with-pptp --with-l2tp)
> 
> Signed-off-by: Andreas Oberritter 
> ---
>  v2: Made dependencies from meta-networking conditional. Now the reported
>  errors should appear only if meta-network is not available and a
>  packageconfig option related to VPN was enabled.
> 
>  Note: I can't build-test it right now, because python3-native has weird
>conflicts populating sysroot. But this patch doesn't cause parse
>errors, so I guess syntax is fine.
> 
>  meta/recipes-connectivity/connman/connman.inc | 95 
> +--
>  1 file changed, 32 insertions(+), 63 deletions(-)
> 
> diff --git a/meta/recipes-connectivity/connman/connman.inc 
> b/meta/recipes-connectivity/connman/connman.inc
> index 35a7eed..671d533 100644
> --- a/meta/recipes-connectivity/connman/connman.inc
> +++ b/meta/recipes-connectivity/connman/connman.inc
> @@ -46,24 +46,17 @@ PACKAGECONFIG[wifi] = "--enable-wifi, --disable-wifi, 
> wpa-supplicant, wpa-suppli
>  PACKAGECONFIG[bluez] = "--enable-bluetooth, --disable-bluetooth, ${BLUEZ}, 
> ${BLUEZ}"
>  PACKAGECONFIG[3g] = "--enable-ofono, --disable-ofono, ofono, ofono"
>  PACKAGECONFIG[tist] = "--enable-tist,--disable-tist,"
> -PACKAGECONFIG[openvpn] = "--enable-openvpn 
> --with-openvpn=${sbindir}/openvpn,--disable-openvpn,,openvpn"
> -PACKAGECONFIG[vpnc] = "--enable-vpnc 
> --with-vpnc=${sbindir}/vpnc,--disable-vpnc,,vpnc"
> -PACKAGECONFIG[l2tp] = "--enable-l2tp 
> --with-l2tp=${sbindir}/xl2tpd,--disable-l2tp,,xl2tpd"
> -PACKAGECONFIG[pptp] = "--enable-pptp 
> --with-pptp=${sbindir}/pptp,--disable-pptp,,pptp-linux"
> +PACKAGECONFIG[openvpn] = "--enable-openvpn 
> --with-openvpn=${sbindir}/openvpn,--disable-openvpn"
> +PACKAGECONFIG[vpnc] = "--enable-vpnc 
> --with-vpnc=${sbindir}/vpnc,--disable-vpnc"
> +PACKAGECONFIG[l2tp] = "--enable-l2tp,--disable-l2tp"
> +PACKAGECONFIG[pptp] = "--enable-pptp,--disable-pptp"
>  # WISPr support for logging into hotspots, requires TLS
>  PACKAGECONFIG[wispr] = "--enable-wispr,--disable-wispr,gnutls,"
>  
>  INITSCRIPT_NAME = "connman"
>  INITSCRIPT_PARAMS = "start 05 5 2 3 . stop 22 0 1 6 ."
>  
> -python __anonymous () {
> -systemd_packages = "${PN}"
> -pkgconfig = d.getVar('PACKAGECONFIG', True)
> -if ('openvpn' or 'vpnc' or 'l2tp' or 'pptp') in pkgconfig.split():
> -systemd_packages += " ${PN}-vpn"
> -d.setVar('SYSTEMD_PACKAGES', systemd_packages)
> -}
> -
> +SYSTEMD_PACKAGES = "${PN} ${PN}-vpn"
>  SYSTEMD_SERVICE_${PN} = "connman.service"
>  SYSTEMD_SERVICE_${PN}-vpn = "connman-vpn.service"
>  SYSTEMD_SERVICE_${PN}-wait-online = "connman-wait-online.service"
> @@ -103,36 +96,6 @@ RDEPENDS_${PN} = "\
>   dbus \
>   "
>  
> -PACKAGES_DYNAMIC += "^${PN}-plugin-.*"
> -
> -def add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, add_insane_skip):
> -plugintype = pkg.split( '-' )[-1]
> -if plugintype in depmap:
> -rdepends = map(lambda x: multilib_prefix + x, \
> -   depmap[plugintype].split())
> -d.setVar("RDEPENDS_%s" % pkg, " ".join(rdepends))
> -if add_insane_skip:
> -d.appendVar("INSANE_SKIP_%s" % pkg, "dev-so")
> -
> -python populate_packages_prepend() {
> -depmap = dict(pppd="ppp")
> -multilib_prefix = (d.getVar("MLPREFIX", True) or "")
> -
> -hook = lambda file,pkg,x,y,z: \
> -add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, False)
> -plugin_dir = d.expand('${libdir}/connman/plugins/')
> -plugin_name = d.expand('${PN}-plugin-%s')
> -do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \
> -'${PN} plugin for %s', extra_depends='', hook=hook, prepend=True )
> -
> -hook = lambda file,pkg,x,y,z: \
> -add_rdepends(bb, d, file, pkg, depmap, multilib_prefix, True)
> -plugin_dir = d.expand('${libdir}/connman/plugins-vpn/')
> -plugin_name = d.expand('${PN}-plugin-vpn-%s')
> -do_split_packages(d, plugin_dir, '^(.*).so$', plugin_name, \
> -'${PN} VPN plugin for %s', extra_depends='', hook=hook, prepend=True 
> )
> -}
> -
>  PACKAGES =+ "${PN}-tools ${PN}-tests ${PN}-client"
>  
>  FILES_${PN}-tools = "${bindir}/wispr"
> @@ -152,7 +115,12 @@ FILES_${PN} = "${bindir}/* ${sbindir}/* ${libexecdir}/* 
> ${libdir}/lib*.so.* \
>  
>  FILES_${PN}-dev += "${libdir}/connman/*/*.la"
>  
> -PACKAGES =+ "${PN}-vpn ${PN}-wait-online"
> +PACKAGES =+ "${PN}-vpn ${PN}-wait-online \
> + ${PN}-ppp \
> + ${PN}-plugin-vpn-l2tp \
> + 

[OE-core] [PATCH] kernel-module-split: Allow custom suffix for package names

2017-01-30 Thread Andreas Oberritter
This makes it possible to restore the behaviour changed by commit 78cde87
"kernel-module-split: Append KERNEL_VERSION string to kernel module name".

Signed-off-by: Andreas Oberritter 
---
 meta/classes/kernel-module-split.bbclass | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/meta/classes/kernel-module-split.bbclass 
b/meta/classes/kernel-module-split.bbclass
index 49cd8e9..dcc798be 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -33,6 +33,7 @@ PACKAGESPLITFUNCS_prepend = "split_kernel_module_packages "
 KERNEL_MODULES_META_PACKAGE ?= "kernel-modules"
 
 KERNEL_MODULE_PACKAGE_PREFIX ?= ""
+KERNEL_MODULE_PACKAGE_SUFFIX ?= "-${KERNEL_VERSION}"
 KERNEL_MODULE_PROVIDE_VIRTUAL ?= "1"
 
 python split_kernel_module_packages () {
@@ -131,7 +132,8 @@ python split_kernel_module_packages () {
 module_regex = '^(.*)\.k?o$'
 
 module_pattern_prefix = d.getVar('KERNEL_MODULE_PACKAGE_PREFIX')
-module_pattern = module_pattern_prefix + 'kernel-module-%s-' + 
d.getVar("KERNEL_VERSION", True)
+module_pattern_suffix = d.getVar('KERNEL_MODULE_PACKAGE_SUFFIX')
+module_pattern = module_pattern_prefix + 'kernel-module-%s' + 
module_pattern_suffix
 
 postinst = d.getVar('pkg_postinst_modules')
 postrm = d.getVar('pkg_postrm_modules')
-- 
2.7.4

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


[OE-core] [PATCH] ffmpeg: disable cpu autodetection

2017-01-30 Thread Andreas Oberritter
Just pass the correct -mcpu= configure switch (fallback to generic).

Avoids warnings like:
| warning: switch -mcpu=cortex-a15 conflicts with -march=armv7-a switch

Signed-off-by: Andreas Oberritter 
---
 meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb | 7 +++
 1 file changed, 7 insertions(+)

diff --git a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb 
b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
index 66718c4..c376d82 100644
--- a/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
+++ b/meta/recipes-multimedia/ffmpeg/ffmpeg_3.2.2.bb
@@ -66,6 +66,12 @@ PACKAGECONFIG[xv] = 
"--enable-outdev=xv,--disable-outdev=xv,libxv"
 # Check codecs that require --enable-nonfree
 USE_NONFREE = "${@bb.utils.contains_any('PACKAGECONFIG', [ 'openssl' ], 'yes', 
'', d)}"
 
+def cpu(d):
+for arg in (d.getVar('TUNE_CCARGS') or '').split():
+if arg.startswith('-mcpu='):
+return arg[6:]
+return 'generic'
+
 EXTRA_OECONF = " \
 --disable-stripping \
 --enable-pic \
@@ -90,6 +96,7 @@ EXTRA_OECONF = " \
 --shlibdir=${libdir} \
 --datadir=${datadir}/ffmpeg \
 ${@bb.utils.contains('AVAILTUNES', 'mips32r2', '', '--disable-mipsdsp 
--disable-mipsdspr2', d)} \
+--cpu=${@cpu(d)} \
 "
 
 EXTRA_OECONF_append_linux-gnux32 = " --disable-asm"
-- 
2.7.4

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


[OE-core] [PATCH v4 3/3] selftest/containerimage.py: Add container IMAGE_FSTYPES test

2017-01-30 Thread Randy Witt
This test checks to make sure only the files expected exist in a
container image. Currently only ROOTFS_BOOTSTRAP_INSTALL, gets added to
all images without the user specifying it.

But this test should help if a developer in the future ever silently
adds more than just ROOTFS_BOOTSTRAP_INSTALL, and that the developer can
make sure it also gets removed from a container image.

[YOCTO #9502]

Signed-off-by: Randy Witt 
---
 .../container-image/container-image-testpkg.bb |  8 +++
 .../container-image/container-test-image.bb|  8 +++
 meta/lib/oeqa/selftest/containerimage.py   | 83 ++
 3 files changed, 99 insertions(+)
 create mode 100644 
meta-selftest/recipes-test/container-image/container-image-testpkg.bb
 create mode 100644 
meta-selftest/recipes-test/container-image/container-test-image.bb
 create mode 100644 meta/lib/oeqa/selftest/containerimage.py

diff --git 
a/meta-selftest/recipes-test/container-image/container-image-testpkg.bb 
b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
new file mode 100644
index 000..f8dd229
--- /dev/null
+++ b/meta-selftest/recipes-test/container-image/container-image-testpkg.bb
@@ -0,0 +1,8 @@
+LICENSE = "MIT"
+
+INHIBIT_DEFAULT_DEPS = "1"
+
+do_install_append() {
+install -d ${D}${bindir}
+touch ${D}${bindir}/theapp
+}
diff --git a/meta-selftest/recipes-test/container-image/container-test-image.bb 
b/meta-selftest/recipes-test/container-image/container-test-image.bb
new file mode 100644
index 000..d5f939c
--- /dev/null
+++ b/meta-selftest/recipes-test/container-image/container-test-image.bb
@@ -0,0 +1,8 @@
+IMAGE_INSTALL += "container-image-testpkg"
+
+LICENSE = "MIT"
+
+IMAGE_FSTYPES = "container"
+IMAGE_LINGUAS = ""
+
+inherit core-image
diff --git a/meta/lib/oeqa/selftest/containerimage.py 
b/meta/lib/oeqa/selftest/containerimage.py
new file mode 100644
index 000..def481f
--- /dev/null
+++ b/meta/lib/oeqa/selftest/containerimage.py
@@ -0,0 +1,83 @@
+import os
+
+from oeqa.selftest.base import oeSelfTest
+from oeqa.utils.commands import bitbake, get_bb_vars, runCmd
+
+# This test builds an image with using the "container" IMAGE_FSTYPE, and
+# ensures that then files in the image are only the ones expected.
+#
+# The only package added to the image is container_image_testpkg, which
+# contains one file. However, due to some other things not cleaning up during
+# rootfs creation, there is some cruft. Ideally bugs will be filed and the
+# cruft removed, but for now we whitelist some known set.
+#
+# Also for performance reasons we're only checking the cruft when using ipk.
+# When using deb, and rpm it is a bit different and we could test all
+# of them, but this test is more to catch if other packages get added by
+# default other than what is in ROOTFS_BOOTSTRAP_INSTALL.
+#
+class ContainerImageTests(oeSelfTest):
+
+# Verify that when specifying a IMAGE_TYPEDEP_ of the form "foo.bar" that
+# the conversion type bar gets added as a dep as well
+def test_expected_files(self):
+
+def get_each_path_part(path):
+if path:
+part = [ '.' + path + '/' ]
+result = get_each_path_part(path.rsplit('/', 1)[0])
+if result:
+return part + result
+else:
+return part
+else:
+return None
+
+self.write_config("""PREFERRED_PROVIDER_virtual/kernel = "linux-dummy"
+IMAGE_FSTYPES = "container"
+PACKAGE_CLASSES = "package_ipk"
+IMAGE_FEATURES = ""
+""")
+
+bbvars = get_bb_vars(['bindir', 'sysconfdir', 'localstatedir',
+  'DEPLOY_DIR_IMAGE', 'IMAGE_LINK_NAME'],
+  target='container-test-image')
+expected_files = [
+'./',
+'.{bindir}/theapp',
+'.{sysconfdir}/default/',
+'.{sysconfdir}/default/postinst',
+'.{sysconfdir}/ld.so.cache',
+'.{sysconfdir}/timestamp',
+'.{sysconfdir}/version',
+'./run/',
+'.{localstatedir}/cache/',
+'.{localstatedir}/cache/ldconfig/',
+'.{localstatedir}/cache/ldconfig/aux-cache',
+'.{localstatedir}/cache/opkg/',
+'.{localstatedir}/lib/',
+'.{localstatedir}/lib/opkg/'
+]
+
+expected_files = [ x.format(bindir=bbvars['bindir'],
+sysconfdir=bbvars['sysconfdir'],
+localstatedir=bbvars['localstatedir'])
+for x in expected_files ]
+
+# Since tar lists all directories individually, make sure each element
+# from bindir, sysconfdir, etc is added
+expected_files += get_each_path_part(bbvars['bindir'])
+   

Re: [OE-core] [PATCH] systemd: respect USE_LDCONFIG when setting default PACKAGECONFIG

2017-01-30 Thread Andre McCurdy
On Thu, Jan 26, 2017 at 10:18 PM, Khem Raj  wrote:
> On Thu, Jan 26, 2017 at 8:06 PM, Andre McCurdy  wrote:
>> Avoid trying to call ldconfig at run-time in distros which force
>> USE_LDCONFIG to 0 and therefore don't provide it.
>>
>> Signed-off-by: Andre McCurdy 
>> ---
>>  meta/recipes-core/systemd/systemd_232.bb | 4 +++-
>>  1 file changed, 3 insertions(+), 1 deletion(-)
>>
>> diff --git a/meta/recipes-core/systemd/systemd_232.bb 
>> b/meta/recipes-core/systemd/systemd_232.bb
>> index cc8781e..cfe6958 100644
>> --- a/meta/recipes-core/systemd/systemd_232.bb
>> +++ b/meta/recipes-core/systemd/systemd_232.bb
>> @@ -39,8 +39,10 @@ SRC_URI_append_libc-uclibc = "\
>>  "
>>  SRC_URI_append_qemuall = " 
>> file://0001-core-device.c-Change-the-default-device-timeout-to-2.patch"
>>
>> +USE_LDCONFIG ?= "1"
>
> now that we have more recipes using this variables. I think it should
> to global config space. May be have it as a DISTRO_FEATURE is more
> appropriate

Patches for both approaches have now been sent to the list.

>> +
>>  PACKAGECONFIG ??= "xz \
>> -   ldconfig \
>> +   ${@base_conditional('USE_LDCONFIG', '1', 'ldconfig', '', 
>> d)} \
>> ${@bb.utils.contains('DISTRO_FEATURES', 'pam', 'pam', 
>> '', d)} \
>> ${@bb.utils.contains('DISTRO_FEATURES', 'x11', 
>> 'xkbcommon', '', d)} \
>> ${@bb.utils.contains('DISTRO_FEATURES', 'selinux', 
>> 'selinux', '', d)} \
>> --
>> 1.9.1
>>
>> --
>> ___
>> Openembedded-core mailing list
>> Openembedded-core@lists.openembedded.org
>> http://lists.openembedded.org/mailman/listinfo/openembedded-core
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


[OE-core] [PATCH v1] sdkext/cases oeqa/selftest: Updates decorators

2017-01-30 Thread Francisco Pedraza
Updates decorators for eSDK in test cases at:
sdkext/cases/devtool.py and oeqa/selftest/eSDK.py

Signed-off-by: Francisco Pedraza 
---
 meta/lib/oeqa/sdkext/cases/devtool.py | 12 ++--
 meta/lib/oeqa/selftest/eSDK.py|  6 +++---
 2 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/meta/lib/oeqa/sdkext/cases/devtool.py 
b/meta/lib/oeqa/sdkext/cases/devtool.py
index da0050c..43214a5 100644
--- a/meta/lib/oeqa/sdkext/cases/devtool.py
+++ b/meta/lib/oeqa/sdkext/cases/devtool.py
@@ -49,22 +49,22 @@ class DevtoolTest(OESDKExtTestCase):
 self._run('devtool add myapp %s' % self.myapp_dst)
 self._run('devtool reset myapp')
 
-@OETestID(1473)
+@OETestID(1605)
 @OETestDepends(['test_devtool_location'])
 def test_devtool_build_make(self):
 self._test_devtool_build(self.myapp_dst)
 
-@OETestID(1474)
+@OETestID(1606)
 @OETestDepends(['test_devtool_location'])
 def test_devtool_build_esdk_package(self):
 self._test_devtool_build_package(self.myapp_dst)
 
-@OETestID(1479)
+@OETestID(1607)
 @OETestDepends(['test_devtool_location'])
 def test_devtool_build_cmake(self):
 self._test_devtool_build(self.myapp_cmake_dst)
 
-@OETestID(1482)
+@OETestID(1608)
 @OETestDepends(['test_devtool_location'])
 def test_extend_autotools_recipe_creation(self):
 req = 'https://github.com/rdfa/librdfa'
@@ -78,7 +78,7 @@ class DevtoolTest(OESDKExtTestCase):
 raise e
 self._run('devtool reset %s' % recipe)
 
-@OETestID(1484)
+@OETestID(1609)
 @OETestDepends(['test_devtool_location'])
 def test_devtool_kernelmodule(self):
 docfile = 'https://github.com/umlaeute/v4l2loopback.git'
@@ -92,7 +92,7 @@ class DevtoolTest(OESDKExtTestCase):
 raise e
 self._run('devtool reset %s' % recipe)
 
-@OETestID(1478)
+@OETestID(1610)
 @OETestDepends(['test_devtool_location'])
 def test_recipes_for_nodejs(self):
 package_nodejs = "npm://registry.npmjs.org;name=winston;version=2.2.0"
diff --git a/meta/lib/oeqa/selftest/eSDK.py b/meta/lib/oeqa/selftest/eSDK.py
index c95ca6d..ee1ca6a 100644
--- a/meta/lib/oeqa/selftest/eSDK.py
+++ b/meta/lib/oeqa/selftest/eSDK.py
@@ -15,7 +15,7 @@ class oeSDKExtSelfTest(oeSelfTest):
 """
 # Bugzilla Test Plan: 6033
 # This code is planned to be part of the automation for eSDK containig
-# Install libraries and headers, image generation binary feeds.
+# Install libraries and headers, image generation binary feeds, sdk-update.
 """
 
 @staticmethod
@@ -109,14 +109,14 @@ SSTATE_MIRRORS =  "file://.* http://%s/PATH;
 shutil.rmtree(cls.tmpdir_eSDKQA)
 cls.http_service.stop()
 
-@testcase (1471)
+@testcase (1602)
 def test_install_libraries_headers(self):
 pn_sstate = 'bc'
 bitbake(pn_sstate)
 cmd = "devtool sdk-install %s " % pn_sstate
 oeSDKExtSelfTest.run_esdk_cmd(self.env_eSDK, self.tmpdir_eSDKQA, cmd)
 
-@testcase(1472)
+@testcase(1603)
 def test_image_generation_binary_feeds(self):
 image = 'core-image-minimal'
 cmd = "devtool build-image %s" % image
-- 
2.5.0

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


Re: [OE-core] [PATCH 4/7] flex: upgrade to 2.6.2

2017-01-30 Thread Denys Dmytriyenko
On Thu, Jan 26, 2017 at 06:21:48PM -0800, Khem Raj wrote:
> On Thu, Jan 26, 2017 at 6:19 PM, Martin Jansa  wrote:
> > I did try 2.6.3 but it was even worse as reported,
> 
> thats just sad.
> 
>  if anyone wants to use it
> > as starting point here it is:
> > http://git.openembedded.org/openembedded-core-contrib/commit/?h=jansa/master=4590c0145a7ae98e7ff7bbf40ec3e25471484f60
> >
> > but then I've reverted both 2.6.3 and 2.6.2 upgrade and I don't plan to work
> > on it.
> 
> So I think revert it the only option for now.

+1 for the revert here as well!

-- 
Denys


> > On Fri, Jan 27, 2017 at 3:16 AM, Khem Raj  wrote:
> >>
> >>
> >>
> >> On 1/26/17 2:39 PM, Martin Jansa wrote:
> >> > This is breaking number of recipes as discussed in acpica thread:
> >> >
> >> > http://lists.openembedded.org/pipermail/openembedded-core/2017-January/131555.html
> >> >
> >> > in by builds I also see failures in qtwebkit, upstart, libpbnjson, ...
> >> >
> >> > I've tried to upgrade to 2.6.3 as suggested in:
> >> > https://github.com/westes/flex/issues/164
> >> >
> >> > but that brings different set of undefined yy* symbols (e.g. yywrap in
> >> > yylex function when building binutils-crosssdk and in the end it doesn't
> >> > help at all, because even binutils, binutils-cross, dtc-native fail much
> >> > sooner.
> >> >
> >> > Is someone working on flex upgrade or can we revert this 2.6.2 upgrade
> >> > until these issues are resolved?
> >> >
> >>
> >> +1
> >> I have reverted this upgrade locally. Its breaking webkit too. I think
> >> we should either revert this or try out 2.6.3 in short time.
> >>
> >> > On Mon, Dec 26, 2016 at 9:10 AM, Chen Qi  >> > > wrote:
> >> >
> >> > Upgrade flex to 2.6.2.
> >> >
> >> > The following two patches are removed as they have been merged.
> >> >   0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> >> >   CVE-2016-6354.patch
> >> >
> >> > do_not_create_pdf_doc.patch is removed as it's not suitable for the
> >> > new
> >> > version.
> >> >
> >> > 0001-use-stage1flex-from-flex-native-to-fix-cross-compili.patch is
> >> > added
> >> > to fix cross compiling problem.
> >> >
> >> > Signed-off-by: Chen Qi  >> > >
> >> > ---
> >> >  ...lex-from-flex-native-to-fix-cross-compili.patch | 51
> >> > +
> >> >  ...oid-c-comments-in-c-code-fails-with-gcc-6.patch | 64
> >> > --
> >> >  .../recipes-devtools/flex/flex/CVE-2016-6354.patch | 59
> >> > 
> >> >  .../flex/flex/do_not_create_pdf_doc.patch  | 17 --
> >> >  .../flex/{flex_2.6.0.bb  => flex_2.6.2.bb
> >> > }  | 16 +++---
> >> >  5 files changed, 60 insertions(+), 147 deletions(-)
> >> >  create mode 100644
> >> >
> >> > meta/recipes-devtools/flex/flex/0001-use-stage1flex-from-flex-native-to-fix-cross-compili.patch
> >> >  delete mode 100644
> >> >
> >> > meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> >> >  delete mode 100644
> >> > meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
> >> >  delete mode 100644
> >> > meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
> >> >  rename meta/recipes-devtools/flex/{flex_2.6.0.bb
> >> >  => flex_2.6.2.bb }
> >> > (79%)
> >> >
> >> > diff --git
> >> >
> >> > a/meta/recipes-devtools/flex/flex/0001-use-stage1flex-from-flex-native-to-fix-cross-compili.patch
> >> >
> >> > b/meta/recipes-devtools/flex/flex/0001-use-stage1flex-from-flex-native-to-fix-cross-compili.patch
> >> > new file mode 100644
> >> > index 000..08f7688
> >> > --- /dev/null
> >> > +++
> >> >
> >> > b/meta/recipes-devtools/flex/flex/0001-use-stage1flex-from-flex-native-to-fix-cross-compili.patch
> >> > @@ -0,0 +1,51 @@
> >> > +Subject: use stage1flex from flex-native to fix cross compiling
> >> > +
> >> > +When cross compiling, we would have failure because stage1flex
> >> > cannot run on host.
> >> > +Use stage1flex from flex-native to fix this problem.
> >> > +
> >> > +This patch is OE specific as upstream may have other way to fix
> >> > this cross compilation
> >> > +problem.
> >> > +
> >> > +Upstream-Status: Inappropriate [OE specific]
> >> > +
> >> > +Signed-off-by: Chen Qi  >> > >
> >> > +---
> >> > + src/Makefile.am | 11 ++-
> >> > + 1 file changed, 2 insertions(+), 9 deletions(-)
> >> > +
> >> > +diff --git a/src/Makefile.am b/src/Makefile.am
> >> > +index 77ddf4b..09ffddb 100644
> >> > +--- a/src/Makefile.am
> >> >  b/src/Makefile.am
> >> > +@@ -6,17 +6,10 @@ LIBS = @LIBS@
> >> > 

Re: [OE-core] [PATCH v4 02/12] acpica: work around flex 2.6.2 code generation issue

2017-01-30 Thread Khem Raj
On Mon, Jan 30, 2017 at 11:53 AM, Denys Dmytriyenko  wrote:
> On Sat, Jan 21, 2017 at 08:00:13PM -0800, Khem Raj wrote:
>> On Fri, Jan 20, 2017 at 6:54 AM, Patrick Ohly  wrote:
>> > On Fri, 2017-01-20 at 15:12 +0100, Patrick Ohly wrote:
>> >> Without this patch, linking fails with a missing implementation of
>> >> yy_scan_string. This looks like a regression in flex, because 2.6.0 
>> >> generated
>> >> different code that called PrParser_scan_string
>> >> resp. DtParser_scan_string.
>> >>
>> >> Working around that in acpica until this is better understood or fixed
>> >> in flex is the easiest solution for now.
>> >
>> > It turned out that flex 2.6.3 has a fix for the problem. But the github
>> > issue tracker for flex has several people who reported issues with 2.6.3
>> > (affecting gdb, binutils, grub) that we probably should wait a bit
>> > before trying to update to that release.
>>
>> I am seeing issues with qtwebkit as well.
>>
>> error: 'yyset_column' was not declared in
>>  this scope
>>
>> Similar errors for 'yyset_lineno' 'yylex' 'yylex_init_extra'
>> 'yyrestart' 'yylex_destroy'
>>
>> Haven't really dug into details but it seems to be caused by update to 2.6.2
>
> Having issues with flex 2.6.2 and doxygen as well. Supposed to be fixed in
> 2.6.3, but as mentioned above, that one breaks binutils, etc...
>
> Can we temporarily revert back to flex 2.6.0? It seems the update is breaking
> too many things, including numerous other layers, and the fix is not yet
> avaialble.
>

send a revert patch i would say

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


Re: [OE-core] [PATCH v4 02/12] acpica: work around flex 2.6.2 code generation issue

2017-01-30 Thread Denys Dmytriyenko
On Sat, Jan 21, 2017 at 08:00:13PM -0800, Khem Raj wrote:
> On Fri, Jan 20, 2017 at 6:54 AM, Patrick Ohly  wrote:
> > On Fri, 2017-01-20 at 15:12 +0100, Patrick Ohly wrote:
> >> Without this patch, linking fails with a missing implementation of
> >> yy_scan_string. This looks like a regression in flex, because 2.6.0 
> >> generated
> >> different code that called PrParser_scan_string
> >> resp. DtParser_scan_string.
> >>
> >> Working around that in acpica until this is better understood or fixed
> >> in flex is the easiest solution for now.
> >
> > It turned out that flex 2.6.3 has a fix for the problem. But the github
> > issue tracker for flex has several people who reported issues with 2.6.3
> > (affecting gdb, binutils, grub) that we probably should wait a bit
> > before trying to update to that release.
> 
> I am seeing issues with qtwebkit as well.
> 
> error: 'yyset_column' was not declared in
>  this scope
> 
> Similar errors for 'yyset_lineno' 'yylex' 'yylex_init_extra'
> 'yyrestart' 'yylex_destroy'
> 
> Haven't really dug into details but it seems to be caused by update to 2.6.2

Having issues with flex 2.6.2 and doxygen as well. Supposed to be fixed in 
2.6.3, but as mentioned above, that one breaks binutils, etc...

Can we temporarily revert back to flex 2.6.0? It seems the update is breaking 
too many things, including numerous other layers, and the fix is not yet 
avaialble.

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


Re: [OE-core] [opkg-devel] Re: opkg tries to remove package twice

2017-01-30 Thread Alejandro del Castillo


On 01/29/2017 10:17 AM, stefan.seyfr...@googlemail.com wrote:
> Am Samstag, 23. April 2016 22:41:17 UTC+2 schrieb Alejandro del Castillo:
>> it should be backported to krogoth too since the next release of opkg is 
>> scheduled to June (too late for krogoth). I'll reply to your patch on 
>> the openembedded-core developer list to suggest it gets it's way into 
>> krogoth too.
> 
> This fix never landed in krogoth, and keeps making opkg look bad.

Armin: the following opkg patch was submitted for inclusion in krogoth,
but apparently never made it into the branch:

http://lists.openembedded.org/pipermail/openembedded-core/2016-April/120610.html

can you consider it for inclusion in krogoth? In my opinion, it does
meet the urgency bar to merit a backport.

-- 
Cheers,

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


Re: [OE-core] [PATCH v2] libtasn1: Upgrade 4.9 -> 4.10

2017-01-30 Thread Khem Raj


On 1/30/17 3:55 AM, Maxin B. John wrote:
> Removed the following Backported patches:
>  1. 0001-configure-don-t-add-Werror-to-build-flags.patch
>  2. 0002-ASN.y-corrected-compiler-warning.patch
>  3. 0003-parser_aux-corrected-potential-null-pointer-derefere.patch
>  4. 0004-tools-eliminated-compiler-warnings.patch
> 
> fixed the following build error with musl
> ...
> |  from ../../libtasn1-4.10/gl/getopt.c:28:
> | ./stdint.h:89:5: error: #if with no expression
> |  #if
> |  ^
> 

are we missing including wint_t.m4

> Signed-off-by: Maxin B. John 
> ---
>  ...configure-don-t-add-Werror-to-build-flags.patch | 28 -
>  ...reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch | 63 +++
>  .../0002-ASN.y-corrected-compiler-warning.patch| 28 -
>  ...corrected-potential-null-pointer-derefere.patch | 73 
> --
>  .../0004-tools-eliminated-compiler-warnings.patch  | 56 -
>  .../gnutls/{libtasn1_4.9.bb => libtasn1_4.10.bb}   |  9 +--
>  6 files changed, 66 insertions(+), 191 deletions(-)
>  delete mode 100644 
> meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
>  create mode 100644 
> meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
>  delete mode 100644 
> meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch
>  delete mode 100644 
> meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch
>  delete mode 100644 
> meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch
>  rename meta/recipes-support/gnutls/{libtasn1_4.9.bb => libtasn1_4.10.bb} 
> (59%)
> 
> diff --git 
> a/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
>  
> b/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
> deleted file mode 100644
> index ae64394..000
> --- 
> a/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
> +++ /dev/null
> @@ -1,28 +0,0 @@
> -From 908e9fa4c1172f09e0e45420a403dc25ed0a466c Mon Sep 17 00:00:00 2001
> -From: Nikos Mavrogiannopoulos 
> -Date: Tue, 26 Jul 2016 08:45:33 +0200
> -Subject: [PATCH 1/4] configure: don't add -Werror to build flags
> -
> 
> -Upstream-Status: Backport
> -Signed-off-by: Khem Raj 
> -
> - configure.ac | 2 --
> - 1 file changed, 2 deletions(-)
> -
> -diff --git a/configure.ac b/configure.ac
> -index 7a14e04..066f5fe 100644
>  a/configure.ac
> -+++ b/configure.ac
> -@@ -70,8 +70,6 @@ AC_ARG_ENABLE([gcc-warnings],
> - )
> - 
> - if test "$gl_gcc_warnings" = yes; then
> --  gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
> --
> -   nw="$nw -Wsystem-headers" # Don't let system headers trigger 
> warnings
> -   nw="$nw -Wc++-compat" # We don't care strongly about C++ 
> compilers
> -   nw="$nw -Wtraditional"# Warns on #elif which we use often
> --- 
> -1.9.1
> -
> diff --git 
> a/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
>  
> b/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
> new file mode 100644
> index 000..1e52d6a
> --- /dev/null
> +++ 
> b/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
> @@ -0,0 +1,63 @@
> +From b17dbb8d3c5605db3a1d82861fcaeef4636d1117 Mon Sep 17 00:00:00 2001
> +From: "Maxin B. John" 
> +Date: Thu, 26 Jan 2017 18:54:48 +0200
> +Subject: [PATCH] stdint.m4: reintroduce GNULIB_OVERRIDES_WINT_T check
> +
> +Partially revert the gnulib commit: 5a400b3f5a1f5483dbfd75d38bdb7080218a063b
> +to fix the build error with musl library.
> +
> +Upstream-Status: Inappropriate
> +
> +Signed-off-by: Maxin B. John 
> +---
> + gl/m4/stdint.m4 | 27 +++
> + 1 file changed, 27 insertions(+)
> +
> +diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
> +index 4ac854d..3dc3da1 100644
> +--- a/gl/m4/stdint.m4
>  b/gl/m4/stdint.m4
> +@@ -355,6 +355,32 @@ int32_t i32 = INT32_C (0x7fff);
> + gl_STDINT_TYPE_PROPERTIES
> +   fi
> + 
> ++  dnl Determine whether gnulib's  or  would, if present,
> ++  dnl override 'wint_t'.
> ++AC_CACHE_CHECK([whether wint_t is too small],
> ++  [gl_cv_type_wint_t_too_small],
> ++  [AC_COMPILE_IFELSE(
> ++   [AC_LANG_PROGRAM([[
> ++  /* Tru64 with Desktop Toolkit C has a bug:  must be included 
> before
> ++ .
> ++ BSD/OS 4.0.1 has a bug: ,  and  must be
> ++ included before .  */
> ++  #if !(defined __GLIBC__ && !defined __UCLIBC__)
> ++  # include 
> ++  # include 
> ++  # include 
> ++  #endif
> ++  #include 
> ++  int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
> ++  ]])],
> ++   

Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter

2017-01-30 Thread Patrick Ohly
On Mon, 2017-01-30 at 17:12 +, Bystricky, Juro wrote:
> 
> > -Original Message-
> > From: Patrick Ohly [mailto:patrick.o...@intel.com]
> > Sent: Friday, January 27, 2017 11:22 AM
> > To: Bystricky, Juro 
> > Cc: openembedded-core@lists.openembedded.org
> > Subject: Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix
> > for rootfs parameter
> > 
> > On Fri, 2017-01-27 at 16:54 +, Bystricky, Juro wrote:
> > > Just curious: is this test for "image" in file name really necessary?
> > > With qemuboot.conf the relevant files are already spelled out.
> > > I don't see a need to force "compulsory" names for images.
> > > If I comment out this test, everything works just fine. Am I missing
> > something?
> > 
> > Some of the usages when checking for paths might have become obsolete,
> > but at least for distinguishing between machine and image base name
> > parameters it is still relevant:
> > 
> > def check_args(self):
> > ...
> > elif re.search(r'-image-|-image$', arg):
> > # Lazy rootfs
> > self.rootfs = arg
> > elif arg.startswith('ovmf'):
> > self.ovmf_bios.append(arg)
> > else:
> > # At last, assume is it the MACHINE
> > if (not unknown_arg) or unknown_arg == arg:
> > unknown_arg = arg
> > else:
> > raise Exception("Can't handle two unknown args: %s %
> > s" % (unknown_arg, arg))
> > 
> > When removing the "if re.search(r'-image-|-image$', arg)" clause one
> > gets an error for:
> > 
> > $ runqemu core-image-minimal ext4 qemux86
> > runqemu - ERROR - Can't handle two unknown args: core-image-minimal qemux86
> > runqemu - ERROR - Try 'runqemu help' on how to use it
> > 
> 
> I see, the purpose of this test is determine which argument is which,
> as they can be in any order. IMHO to differentiate between MACHINE and image 
> it would 
> make more sense to search for "qemu" instead of "-image-" or "-image" .

The machine is not guaranteed to contain "qemu". I sent a patch to
meta-intel which enables "runqemu core-image-minimal ext4
intel-corei7-64", and other BSPs might want to do the same.

> (BTW do we need both -image- and -image$?)

Yes, for "core-image-minimal" and "foobar-installer-image" (something
that I am currently working on).

> There is also ANOTHER test for '-image-', in "is_deploy_dir_image". 
> This is the one I considered redundant (or not needed in case we have 
> qemuboot.conf).

That might be true. I was trying to be conservative with this patch and
thus extended all existing checks instead of trying to to figure out
which one had become redundant.

-- 
Best Regards, Patrick Ohly

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



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


Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Ed Bartosh
On Mon, Jan 30, 2017 at 10:41:27AM -0800, Rick Altherr wrote:
> Agreed.  What if it was image_types_wic.bbclass and you did something
> similar to build_uboot() in image.bbclass?
>

I can do this for now:
IMAGE_TYPE_wic = "image_type_wic"
inherit ${IMAGE_TYPE_wic}

which is the same as 'inherit image_type_wic', just takes 2 lines, but
looks more consistent.

does this look ok?

> On Mon, Jan 30, 2017 at 10:15 AM, Ed Bartosh 
> wrote:
> 
> > On Mon, Jan 30, 2017 at 10:25:59AM -0800, Rick Altherr wrote:
> > > I'm not clear on which path is the preferred one.  There are lots of bits
> > > and pieces in image_types.bbclass that implement various image types.
> > >  uboot got added as a separate class at some point.  The comments in
> > > local.conf.sample.extended imply IMAGE_CLASSES should be used to load
> > > additional image_types_* classes to add support for additional image
> > > types.  Having the wic image type implemented in a separate
> > > image-wic.bbclass that is directly inherited by image.bbclass adds a 3rd
> > > approach.  Which one do we want contributors to use in the future?
> > >
> >
> > I didn't want to create even more confusion. What I wanted is stated in the
> > commit message - to put existing wic code into a file for better
> > maintenance. If this is more confusing than having wic code in different
> > places of image.class and image_types.class then we can just drop this
> > patch. However, I personally find it more maintainable this way.
> >
> > Suggesting people to change machine configs just because wic code is
> > moved to separate file doesn't look good to me either.
> >
> > > On Mon, Jan 30, 2017 at 9:45 AM, Ed Bartosh 
> > > wrote:
> > >
> > > > On Mon, Jan 30, 2017 at 09:47:42AM -0800, Rick Altherr wrote:
> > > > > Hmm.  In local.conf.sample.extended, I find:
> > > > >
> > > > > # Additional image generation features
> > > > > #
> > > > > # The following is a list of classes to import to use in the
> > generation
> > > > of
> > > > > images
> > > > > # currently an example class is image_types_uboot
> > > > > # IMAGE_CLASSES = " image_types_uboot"
> > > > >
> > > > > Indeed, image_types_uboot isn't part of IMAGE_CLASSES by default.
> > I'd
> > > > > expect a machine config to add wic to IMAGE_CLASSES if it needs wic
> > > > output.
> > > > >
> > > >
> > > > So far all machine configs add wic to IMAGE_TYPES and it works just
> > > > fine. Why to change?
> > > >
> > > > > On Mon, Jan 30, 2017 at 9:18 AM, Ed Bartosh <
> > ed.bart...@linux.intel.com>
> > > > > wrote:
> > > > >
> > > > > > On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:
> > > > > > > Why didn't you make this image_types_wic.bbclass and use
> > > > IMAGE_CLASSES to
> > > > > > > load it?
> > > > > >
> > > > > > Because of the following:
> > > > > > - IMAGE_CLASSES[doc] = "A list of classes that all images should
> > > > > >   inherit." I'm not sure all images should include wic class. I'll
> > > > probably
> > > > > >   make this inheritance conditional.
> > > > > > - so far IMAGE_CLASSES is used for qemuboot, image_types,
> > > > > >   image_types_uboot and testimage,
> > > > > >   so the usage is more or less follows the description. wic is out
> > of
> > > > > >   that usage scenario, I believe.
> > > > > > - 'inherit image_wic' is more explicit than IMAGE_CLASSES +=
> > > > > >   "image_types"\n inherit ${IMAGE_CLASSES}
> > > > > >
> > > > > >
> > > > > > >
> > > > > > > On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh <
> > > > ed.bart...@linux.intel.com
> > > > > > >
> > > > > > > wrote:
> > > > > > >
> > > > > > > > There is a lot of wic code in image.bbclass and
> > image_types.bbclass
> > > > > > > > Having all code separated in one file should make it more
> > readable
> > > > > > > > and easier to maintain.
> > > > > > > >
> > > > > > > > Signed-off-by: Ed Bartosh 
> > > > > > > > ---
> > > > > > > >  meta/classes/image-wic.bbclass   | 120
> > > > ++
> > > > > > > > +
> > > > > > > >  meta/classes/image.bbclass   |  25 +---
> > > > > > > >  meta/classes/image_types.bbclass |  95
> > > > --
> > > > > > -
> > > > > > > >  3 files changed, 122 insertions(+), 118 deletions(-)
> > > > > > > >  create mode 100644 meta/classes/image-wic.bbclass
> > > > > > > >
> > > > > > > > diff --git a/meta/classes/image-wic.bbclass
> > > > b/meta/classes/image-wic.
> > > > > > > > bbclass
> > > > > > > > new file mode 100644
> > > > > > > > index 000..2acfd65
> > > > > > > > --- /dev/null
> > > > > > > > +++ b/meta/classes/image-wic.bbclass
> > > > > > > > @@ -0,0 +1,120 @@
> > > > > > > > +# The WICVARS variable is used to define list of bitbake
> > variables
> > > > > > used
> > > > > > > > in wic code
> > > > > > > > +# variables from this list is written to .env file
> > > > > > > > +WICVARS ?= "\
> > > > > > > > +   BBLAYERS IMGDEPLOYDIR 

Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Ed Bartosh
On Mon, Jan 30, 2017 at 10:25:59AM -0800, Rick Altherr wrote:
> I'm not clear on which path is the preferred one.  There are lots of bits
> and pieces in image_types.bbclass that implement various image types.
>  uboot got added as a separate class at some point.  The comments in
> local.conf.sample.extended imply IMAGE_CLASSES should be used to load
> additional image_types_* classes to add support for additional image
> types.  Having the wic image type implemented in a separate
> image-wic.bbclass that is directly inherited by image.bbclass adds a 3rd
> approach.  Which one do we want contributors to use in the future?
> 

I didn't want to create even more confusion. What I wanted is stated in the
commit message - to put existing wic code into a file for better
maintenance. If this is more confusing than having wic code in different
places of image.class and image_types.class then we can just drop this
patch. However, I personally find it more maintainable this way.

Suggesting people to change machine configs just because wic code is
moved to separate file doesn't look good to me either.

> On Mon, Jan 30, 2017 at 9:45 AM, Ed Bartosh 
> wrote:
> 
> > On Mon, Jan 30, 2017 at 09:47:42AM -0800, Rick Altherr wrote:
> > > Hmm.  In local.conf.sample.extended, I find:
> > >
> > > # Additional image generation features
> > > #
> > > # The following is a list of classes to import to use in the generation
> > of
> > > images
> > > # currently an example class is image_types_uboot
> > > # IMAGE_CLASSES = " image_types_uboot"
> > >
> > > Indeed, image_types_uboot isn't part of IMAGE_CLASSES by default.  I'd
> > > expect a machine config to add wic to IMAGE_CLASSES if it needs wic
> > output.
> > >
> >
> > So far all machine configs add wic to IMAGE_TYPES and it works just
> > fine. Why to change?
> >
> > > On Mon, Jan 30, 2017 at 9:18 AM, Ed Bartosh 
> > > wrote:
> > >
> > > > On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:
> > > > > Why didn't you make this image_types_wic.bbclass and use
> > IMAGE_CLASSES to
> > > > > load it?
> > > >
> > > > Because of the following:
> > > > - IMAGE_CLASSES[doc] = "A list of classes that all images should
> > > >   inherit." I'm not sure all images should include wic class. I'll
> > probably
> > > >   make this inheritance conditional.
> > > > - so far IMAGE_CLASSES is used for qemuboot, image_types,
> > > >   image_types_uboot and testimage,
> > > >   so the usage is more or less follows the description. wic is out of
> > > >   that usage scenario, I believe.
> > > > - 'inherit image_wic' is more explicit than IMAGE_CLASSES +=
> > > >   "image_types"\n inherit ${IMAGE_CLASSES}
> > > >
> > > >
> > > > >
> > > > > On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh <
> > ed.bart...@linux.intel.com
> > > > >
> > > > > wrote:
> > > > >
> > > > > > There is a lot of wic code in image.bbclass and image_types.bbclass
> > > > > > Having all code separated in one file should make it more readable
> > > > > > and easier to maintain.
> > > > > >
> > > > > > Signed-off-by: Ed Bartosh 
> > > > > > ---
> > > > > >  meta/classes/image-wic.bbclass   | 120
> > ++
> > > > > > +
> > > > > >  meta/classes/image.bbclass   |  25 +---
> > > > > >  meta/classes/image_types.bbclass |  95
> > --
> > > > -
> > > > > >  3 files changed, 122 insertions(+), 118 deletions(-)
> > > > > >  create mode 100644 meta/classes/image-wic.bbclass
> > > > > >
> > > > > > diff --git a/meta/classes/image-wic.bbclass
> > b/meta/classes/image-wic.
> > > > > > bbclass
> > > > > > new file mode 100644
> > > > > > index 000..2acfd65
> > > > > > --- /dev/null
> > > > > > +++ b/meta/classes/image-wic.bbclass
> > > > > > @@ -0,0 +1,120 @@
> > > > > > +# The WICVARS variable is used to define list of bitbake variables
> > > > used
> > > > > > in wic code
> > > > > > +# variables from this list is written to .env file
> > > > > > +WICVARS ?= "\
> > > > > > +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD
> > HDDDIR
> > > > > > IMAGE_BASENAME IMAGE_BOOT_FILES \
> > > > > > +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD
> > > > ISODIR
> > > > > > MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> > > > > > +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> > > > > > TARGET_SYS"
> > > > > > +
> > > > > > +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> > > > > > +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> > > > > > +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> > > > > > '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/
> > canned-wks'
> > > > % l
> > > > > > for l in '${BBPATH}:${COREBASE}'.split(':'))}"
> > > > > > +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> > > > > > '${WKS_SEARCH_PATH}') or ''}"
> > > > > > +
> > > > > > +def wks_search(files, search_path):
> > > > > > +

Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Rick Altherr
I'm not clear on which path is the preferred one.  There are lots of bits
and pieces in image_types.bbclass that implement various image types.
 uboot got added as a separate class at some point.  The comments in
local.conf.sample.extended imply IMAGE_CLASSES should be used to load
additional image_types_* classes to add support for additional image
types.  Having the wic image type implemented in a separate
image-wic.bbclass that is directly inherited by image.bbclass adds a 3rd
approach.  Which one do we want contributors to use in the future?

On Mon, Jan 30, 2017 at 9:45 AM, Ed Bartosh 
wrote:

> On Mon, Jan 30, 2017 at 09:47:42AM -0800, Rick Altherr wrote:
> > Hmm.  In local.conf.sample.extended, I find:
> >
> > # Additional image generation features
> > #
> > # The following is a list of classes to import to use in the generation
> of
> > images
> > # currently an example class is image_types_uboot
> > # IMAGE_CLASSES = " image_types_uboot"
> >
> > Indeed, image_types_uboot isn't part of IMAGE_CLASSES by default.  I'd
> > expect a machine config to add wic to IMAGE_CLASSES if it needs wic
> output.
> >
>
> So far all machine configs add wic to IMAGE_TYPES and it works just
> fine. Why to change?
>
> > On Mon, Jan 30, 2017 at 9:18 AM, Ed Bartosh 
> > wrote:
> >
> > > On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:
> > > > Why didn't you make this image_types_wic.bbclass and use
> IMAGE_CLASSES to
> > > > load it?
> > >
> > > Because of the following:
> > > - IMAGE_CLASSES[doc] = "A list of classes that all images should
> > >   inherit." I'm not sure all images should include wic class. I'll
> probably
> > >   make this inheritance conditional.
> > > - so far IMAGE_CLASSES is used for qemuboot, image_types,
> > >   image_types_uboot and testimage,
> > >   so the usage is more or less follows the description. wic is out of
> > >   that usage scenario, I believe.
> > > - 'inherit image_wic' is more explicit than IMAGE_CLASSES +=
> > >   "image_types"\n inherit ${IMAGE_CLASSES}
> > >
> > >
> > > >
> > > > On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh <
> ed.bart...@linux.intel.com
> > > >
> > > > wrote:
> > > >
> > > > > There is a lot of wic code in image.bbclass and image_types.bbclass
> > > > > Having all code separated in one file should make it more readable
> > > > > and easier to maintain.
> > > > >
> > > > > Signed-off-by: Ed Bartosh 
> > > > > ---
> > > > >  meta/classes/image-wic.bbclass   | 120
> ++
> > > > > +
> > > > >  meta/classes/image.bbclass   |  25 +---
> > > > >  meta/classes/image_types.bbclass |  95
> --
> > > -
> > > > >  3 files changed, 122 insertions(+), 118 deletions(-)
> > > > >  create mode 100644 meta/classes/image-wic.bbclass
> > > > >
> > > > > diff --git a/meta/classes/image-wic.bbclass
> b/meta/classes/image-wic.
> > > > > bbclass
> > > > > new file mode 100644
> > > > > index 000..2acfd65
> > > > > --- /dev/null
> > > > > +++ b/meta/classes/image-wic.bbclass
> > > > > @@ -0,0 +1,120 @@
> > > > > +# The WICVARS variable is used to define list of bitbake variables
> > > used
> > > > > in wic code
> > > > > +# variables from this list is written to .env file
> > > > > +WICVARS ?= "\
> > > > > +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD
> HDDDIR
> > > > > IMAGE_BASENAME IMAGE_BOOT_FILES \
> > > > > +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD
> > > ISODIR
> > > > > MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> > > > > +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> > > > > TARGET_SYS"
> > > > > +
> > > > > +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> > > > > +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> > > > > +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> > > > > '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/
> canned-wks'
> > > % l
> > > > > for l in '${BBPATH}:${COREBASE}'.split(':'))}"
> > > > > +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> > > > > '${WKS_SEARCH_PATH}') or ''}"
> > > > > +
> > > > > +def wks_search(files, search_path):
> > > > > +for f in files:
> > > > > +if os.path.isabs(f):
> > > > > +if os.path.exists(f):
> > > > > +return f
> > > > > +else:
> > > > > +searched = bb.utils.which(search_path, f)
> > > > > +if searched:
> > > > > +return searched
> > > > > +
> > > > > +WIC_CREATE_EXTRA_ARGS ?= ""
> > > > > +
> > > > > +IMAGE_CMD_wic () {
> > > > > +   out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
> > > > > +   wks="${WKS_FULL_PATH}"
> > > > > +   if [ -z "$wks" ]; then
> > > > > +   bbfatal "No kickstart files from WKS_FILES were
> found:
> > > > > ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> > > > > +   fi
> > > > > +
> > > > > +   

Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Ed Bartosh
On Mon, Jan 30, 2017 at 09:47:42AM -0800, Rick Altherr wrote:
> Hmm.  In local.conf.sample.extended, I find:
> 
> # Additional image generation features
> #
> # The following is a list of classes to import to use in the generation of
> images
> # currently an example class is image_types_uboot
> # IMAGE_CLASSES = " image_types_uboot"
> 
> Indeed, image_types_uboot isn't part of IMAGE_CLASSES by default.  I'd
> expect a machine config to add wic to IMAGE_CLASSES if it needs wic output.
> 

So far all machine configs add wic to IMAGE_TYPES and it works just
fine. Why to change?

> On Mon, Jan 30, 2017 at 9:18 AM, Ed Bartosh 
> wrote:
> 
> > On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:
> > > Why didn't you make this image_types_wic.bbclass and use IMAGE_CLASSES to
> > > load it?
> >
> > Because of the following:
> > - IMAGE_CLASSES[doc] = "A list of classes that all images should
> >   inherit." I'm not sure all images should include wic class. I'll probably
> >   make this inheritance conditional.
> > - so far IMAGE_CLASSES is used for qemuboot, image_types,
> >   image_types_uboot and testimage,
> >   so the usage is more or less follows the description. wic is out of
> >   that usage scenario, I believe.
> > - 'inherit image_wic' is more explicit than IMAGE_CLASSES +=
> >   "image_types"\n inherit ${IMAGE_CLASSES}
> >
> >
> > >
> > > On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh  > >
> > > wrote:
> > >
> > > > There is a lot of wic code in image.bbclass and image_types.bbclass
> > > > Having all code separated in one file should make it more readable
> > > > and easier to maintain.
> > > >
> > > > Signed-off-by: Ed Bartosh 
> > > > ---
> > > >  meta/classes/image-wic.bbclass   | 120 ++
> > > > +
> > > >  meta/classes/image.bbclass   |  25 +---
> > > >  meta/classes/image_types.bbclass |  95 --
> > -
> > > >  3 files changed, 122 insertions(+), 118 deletions(-)
> > > >  create mode 100644 meta/classes/image-wic.bbclass
> > > >
> > > > diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.
> > > > bbclass
> > > > new file mode 100644
> > > > index 000..2acfd65
> > > > --- /dev/null
> > > > +++ b/meta/classes/image-wic.bbclass
> > > > @@ -0,0 +1,120 @@
> > > > +# The WICVARS variable is used to define list of bitbake variables
> > used
> > > > in wic code
> > > > +# variables from this list is written to .env file
> > > > +WICVARS ?= "\
> > > > +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD HDDDIR
> > > > IMAGE_BASENAME IMAGE_BOOT_FILES \
> > > > +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD
> > ISODIR
> > > > MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> > > > +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> > > > TARGET_SYS"
> > > > +
> > > > +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> > > > +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> > > > +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> > > > '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks'
> > % l
> > > > for l in '${BBPATH}:${COREBASE}'.split(':'))}"
> > > > +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> > > > '${WKS_SEARCH_PATH}') or ''}"
> > > > +
> > > > +def wks_search(files, search_path):
> > > > +for f in files:
> > > > +if os.path.isabs(f):
> > > > +if os.path.exists(f):
> > > > +return f
> > > > +else:
> > > > +searched = bb.utils.which(search_path, f)
> > > > +if searched:
> > > > +return searched
> > > > +
> > > > +WIC_CREATE_EXTRA_ARGS ?= ""
> > > > +
> > > > +IMAGE_CMD_wic () {
> > > > +   out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
> > > > +   wks="${WKS_FULL_PATH}"
> > > > +   if [ -z "$wks" ]; then
> > > > +   bbfatal "No kickstart files from WKS_FILES were found:
> > > > ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> > > > +   fi
> > > > +
> > > > +   BUILDDIR="${TOPDIR}" wic create "$wks" --vars
> > > > "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
> > > > ${WIC_CREATE_EXTRA_ARGS}
> > > > +   mv "$out/$(basename "${wks%.wks}")"*.direct
> > > > "$out${IMAGE_NAME_SUFFIX}.wic"
> > > > +   rm -rf "$out/"
> > > > +}
> > > > +IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
> > > > +
> > > > +# Rebuild when the wks file or vars in WICVARS change
> > > > +USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + '
> > > > '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '',
> > d)}"
> > > > +WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
> > > > os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
> > > > +do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
> > > > +do_image_wic[depends] += "wic-tools:do_build"
> > > > +
> > > > +python 

[OE-core] [PATCH v2 1/1] runqemu: allow bypassing of network setup

2017-01-30 Thread Juro Bystricky
At present it is silently assumed all QEMU machines support networking.
As a consequence, one cannot run QEMUs without network emulation
using "runqemu".
This patch allows bypassing any network setup providing the user
specifies:

QB_NETWORK_DEVICE = "none"

[YOCTO#10661]

Signed-off-by: Juro Bystricky 
---
 meta/classes/qemuboot.bbclass | 3 ++-
 scripts/runqemu   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/classes/qemuboot.bbclass b/meta/classes/qemuboot.bbclass
index 3ca97ca..4deb201 100644
--- a/meta/classes/qemuboot.bbclass
+++ b/meta/classes/qemuboot.bbclass
@@ -36,8 +36,9 @@
 #Note, runqemu will replace @MAC@ with a predefined mac, 
you can set
 #a custom one, but that may cause conflicts when multiple 
qemus are
 #running on the same host.
+#Set to "none" if qemu has no network support.
 #
-# QB_TAP_OPT: netowrk option for 'tap' mode, e.g.,
+# QB_TAP_OPT: network option for 'tap' mode, e.g.,
 # "-netdev tap,id=net0,ifname=@TAP@,script=no,downscript=no"
 #  Note, runqemu will replace "@TAP@" with the one which is used, 
such as tap0, tap1 ...
 #
diff --git a/scripts/runqemu b/scripts/runqemu
index 3d475d3..c846727 100755
--- a/scripts/runqemu
+++ b/scripts/runqemu
@@ -894,6 +894,9 @@ class BaseConfig(object):
 self.set('NETWORK_CMD', '%s %s' % 
(self.network_device.replace('@MAC@', mac), qemu_tap_opt))
 
 def setup_network(self):
+if self.get('QB_NETWORK_DEVICE') == 'none':
+return
+
 cmd = "stty -g"
 self.saved_stty = subprocess.Popen(cmd, shell=True, 
stdout=subprocess.PIPE).stdout.read().decode('utf-8')
 self.network_device = self.get('QB_NETWORK_DEVICE') or 
self.network_device
-- 
2.7.4

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


[OE-core] [PATCH v2 0/1] runqemu: disable network

2017-01-30 Thread Juro Bystricky
Not all QEMU machines support network hardware emulation.
Those machines cannot be run by "runqemu", as network hardware is implicitly
always assumed. Trying to run them using "runqemu" would end up in
raise Exception('Failed to run %s' % cmd)

There is no way to disable network setup using qemuboot.conf nor command line
argument.

The patch for runqemu contains a simple fix that can disable the network using
qemuboot.conf, all that is required is to set the pre-existing variable
QB_NETWORK_DEVICE to "none".

A slightly more complex patch could contain support for command line argument
"nonetwork", similar to "nographic



Juro Bystricky (1):
  runqemu: allow bypassing of network setup

 meta/classes/qemuboot.bbclass | 3 ++-
 scripts/runqemu   | 3 +++
 2 files changed, 5 insertions(+), 1 deletion(-)

-- 
2.7.4

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


Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Rick Altherr
Hmm.  In local.conf.sample.extended, I find:

# Additional image generation features
#
# The following is a list of classes to import to use in the generation of
images
# currently an example class is image_types_uboot
# IMAGE_CLASSES = " image_types_uboot"

Indeed, image_types_uboot isn't part of IMAGE_CLASSES by default.  I'd
expect a machine config to add wic to IMAGE_CLASSES if it needs wic output.

On Mon, Jan 30, 2017 at 9:18 AM, Ed Bartosh 
wrote:

> On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:
> > Why didn't you make this image_types_wic.bbclass and use IMAGE_CLASSES to
> > load it?
>
> Because of the following:
> - IMAGE_CLASSES[doc] = "A list of classes that all images should
>   inherit." I'm not sure all images should include wic class. I'll probably
>   make this inheritance conditional.
> - so far IMAGE_CLASSES is used for qemuboot, image_types,
>   image_types_uboot and testimage,
>   so the usage is more or less follows the description. wic is out of
>   that usage scenario, I believe.
> - 'inherit image_wic' is more explicit than IMAGE_CLASSES +=
>   "image_types"\n inherit ${IMAGE_CLASSES}
>
>
> >
> > On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh  >
> > wrote:
> >
> > > There is a lot of wic code in image.bbclass and image_types.bbclass
> > > Having all code separated in one file should make it more readable
> > > and easier to maintain.
> > >
> > > Signed-off-by: Ed Bartosh 
> > > ---
> > >  meta/classes/image-wic.bbclass   | 120 ++
> > > +
> > >  meta/classes/image.bbclass   |  25 +---
> > >  meta/classes/image_types.bbclass |  95 --
> -
> > >  3 files changed, 122 insertions(+), 118 deletions(-)
> > >  create mode 100644 meta/classes/image-wic.bbclass
> > >
> > > diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.
> > > bbclass
> > > new file mode 100644
> > > index 000..2acfd65
> > > --- /dev/null
> > > +++ b/meta/classes/image-wic.bbclass
> > > @@ -0,0 +1,120 @@
> > > +# The WICVARS variable is used to define list of bitbake variables
> used
> > > in wic code
> > > +# variables from this list is written to .env file
> > > +WICVARS ?= "\
> > > +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD HDDDIR
> > > IMAGE_BASENAME IMAGE_BOOT_FILES \
> > > +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD
> ISODIR
> > > MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> > > +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> > > TARGET_SYS"
> > > +
> > > +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> > > +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> > > +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> > > '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks'
> % l
> > > for l in '${BBPATH}:${COREBASE}'.split(':'))}"
> > > +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> > > '${WKS_SEARCH_PATH}') or ''}"
> > > +
> > > +def wks_search(files, search_path):
> > > +for f in files:
> > > +if os.path.isabs(f):
> > > +if os.path.exists(f):
> > > +return f
> > > +else:
> > > +searched = bb.utils.which(search_path, f)
> > > +if searched:
> > > +return searched
> > > +
> > > +WIC_CREATE_EXTRA_ARGS ?= ""
> > > +
> > > +IMAGE_CMD_wic () {
> > > +   out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
> > > +   wks="${WKS_FULL_PATH}"
> > > +   if [ -z "$wks" ]; then
> > > +   bbfatal "No kickstart files from WKS_FILES were found:
> > > ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> > > +   fi
> > > +
> > > +   BUILDDIR="${TOPDIR}" wic create "$wks" --vars
> > > "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
> > > ${WIC_CREATE_EXTRA_ARGS}
> > > +   mv "$out/$(basename "${wks%.wks}")"*.direct
> > > "$out${IMAGE_NAME_SUFFIX}.wic"
> > > +   rm -rf "$out/"
> > > +}
> > > +IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
> > > +
> > > +# Rebuild when the wks file or vars in WICVARS change
> > > +USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + '
> > > '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '',
> d)}"
> > > +WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
> > > os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
> > > +do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
> > > +do_image_wic[depends] += "wic-tools:do_build"
> > > +
> > > +python () {
> > > +if d.getVar('USING_WIC') and 'do_bootimg' in d:
> > > +bb.build.addtask('do_image_wic', '', 'do_bootimg', d)
> > > +}
> > > +
> > > +python do_write_wks_template () {
> > > +"""Write out expanded template contents to WKS_FULL_PATH."""
> > > +import re
> > > +
> > > +template_body = d.getVar('_WKS_TEMPLATE')
> > > +
> > > +# Remove any remnant 

Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Ed Bartosh
On Mon, Jan 30, 2017 at 09:27:54AM -0800, Rick Altherr wrote:
> Why didn't you make this image_types_wic.bbclass and use IMAGE_CLASSES to
> load it?

Because of the following:
- IMAGE_CLASSES[doc] = "A list of classes that all images should
  inherit." I'm not sure all images should include wic class. I'll probably
  make this inheritance conditional.
- so far IMAGE_CLASSES is used for qemuboot, image_types,
  image_types_uboot and testimage,
  so the usage is more or less follows the description. wic is out of
  that usage scenario, I believe.
- 'inherit image_wic' is more explicit than IMAGE_CLASSES +=
  "image_types"\n inherit ${IMAGE_CLASSES}


> 
> On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh 
> wrote:
> 
> > There is a lot of wic code in image.bbclass and image_types.bbclass
> > Having all code separated in one file should make it more readable
> > and easier to maintain.
> >
> > Signed-off-by: Ed Bartosh 
> > ---
> >  meta/classes/image-wic.bbclass   | 120 ++
> > +
> >  meta/classes/image.bbclass   |  25 +---
> >  meta/classes/image_types.bbclass |  95 ---
> >  3 files changed, 122 insertions(+), 118 deletions(-)
> >  create mode 100644 meta/classes/image-wic.bbclass
> >
> > diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.
> > bbclass
> > new file mode 100644
> > index 000..2acfd65
> > --- /dev/null
> > +++ b/meta/classes/image-wic.bbclass
> > @@ -0,0 +1,120 @@
> > +# The WICVARS variable is used to define list of bitbake variables used
> > in wic code
> > +# variables from this list is written to .env file
> > +WICVARS ?= "\
> > +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD HDDDIR
> > IMAGE_BASENAME IMAGE_BOOT_FILES \
> > +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD ISODIR
> > MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> > +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> > TARGET_SYS"
> > +
> > +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> > +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> > +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> > '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l
> > for l in '${BBPATH}:${COREBASE}'.split(':'))}"
> > +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> > '${WKS_SEARCH_PATH}') or ''}"
> > +
> > +def wks_search(files, search_path):
> > +for f in files:
> > +if os.path.isabs(f):
> > +if os.path.exists(f):
> > +return f
> > +else:
> > +searched = bb.utils.which(search_path, f)
> > +if searched:
> > +return searched
> > +
> > +WIC_CREATE_EXTRA_ARGS ?= ""
> > +
> > +IMAGE_CMD_wic () {
> > +   out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
> > +   wks="${WKS_FULL_PATH}"
> > +   if [ -z "$wks" ]; then
> > +   bbfatal "No kickstart files from WKS_FILES were found:
> > ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> > +   fi
> > +
> > +   BUILDDIR="${TOPDIR}" wic create "$wks" --vars
> > "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
> > ${WIC_CREATE_EXTRA_ARGS}
> > +   mv "$out/$(basename "${wks%.wks}")"*.direct
> > "$out${IMAGE_NAME_SUFFIX}.wic"
> > +   rm -rf "$out/"
> > +}
> > +IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
> > +
> > +# Rebuild when the wks file or vars in WICVARS change
> > +USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + '
> > '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
> > +WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
> > os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
> > +do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
> > +do_image_wic[depends] += "wic-tools:do_build"
> > +
> > +python () {
> > +if d.getVar('USING_WIC') and 'do_bootimg' in d:
> > +bb.build.addtask('do_image_wic', '', 'do_bootimg', d)
> > +}
> > +
> > +python do_write_wks_template () {
> > +"""Write out expanded template contents to WKS_FULL_PATH."""
> > +import re
> > +
> > +template_body = d.getVar('_WKS_TEMPLATE')
> > +
> > +# Remove any remnant variable references left behind by the expansion
> > +# due to undefined variables
> > +expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
> > +while True:
> > +new_body = re.sub(expand_var_regexp, '', template_body)
> > +if new_body == template_body:
> > +break
> > +else:
> > +template_body = new_body
> > +
> > +wks_file = d.getVar('WKS_FULL_PATH')
> > +with open(wks_file, 'w') as f:
> > +f.write(template_body)
> > +}
> > +
> > +python () {
> > +if d.getVar('USING_WIC'):
> > +wks_file_u = d.getVar('WKS_FULL_PATH', False)
> > +wks_file = d.expand(wks_file_u)
> > +base, ext = os.path.splitext(wks_file)
> > 

Re: [OE-core] [PATCH] libbsd: libbsd-overlay.pc: Set Cflags to use -I instead of -isystem

2017-01-30 Thread Otavio Salvador
On Mon, Jan 30, 2017 at 2:27 PM, Fabio Berton
 wrote:
> pkg-config currently only handles -I and -L correctly, but misses
> -isystem, so we need to do this workaround to fix this issue.
>
> There's a open bug in:
> https://bugzilla.freedesktop.org/show_bug.cgi?id=99516
>
> This appears when building lldpd and shows error:
>
> ERROR: lldpd-0.9.6-r0 do_configure: This autoconf log indicates
> errors, it looked at host include and/or library paths while
> determining system capabilities.
> Rerun configure task after fixing this.
> ERROR: lldpd-0.9.6-r0 do_configure: Function failed: do_qa_configure
>
> Change-Id: I83255b5952e19bb2f516b1186276cd03eb67eed3
> Signed-off-by: Fabio Berton 

Acked-by: Otavio Salvador 

Also, this  should be backported to morty as well.

-- 
Otavio Salvador O.S. Systems
http://www.ossystems.com.brhttp://code.ossystems.com.br
Mobile: +55 (53) 9981-7854Mobile: +1 (347) 903-9750
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Rick Altherr
Why didn't you make this image_types_wic.bbclass and use IMAGE_CLASSES to
load it?

On Fri, Jan 27, 2017 at 12:19 PM, Ed Bartosh 
wrote:

> There is a lot of wic code in image.bbclass and image_types.bbclass
> Having all code separated in one file should make it more readable
> and easier to maintain.
>
> Signed-off-by: Ed Bartosh 
> ---
>  meta/classes/image-wic.bbclass   | 120 ++
> +
>  meta/classes/image.bbclass   |  25 +---
>  meta/classes/image_types.bbclass |  95 ---
>  3 files changed, 122 insertions(+), 118 deletions(-)
>  create mode 100644 meta/classes/image-wic.bbclass
>
> diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-wic.
> bbclass
> new file mode 100644
> index 000..2acfd65
> --- /dev/null
> +++ b/meta/classes/image-wic.bbclass
> @@ -0,0 +1,120 @@
> +# The WICVARS variable is used to define list of bitbake variables used
> in wic code
> +# variables from this list is written to .env file
> +WICVARS ?= "\
> +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD HDDDIR
> IMAGE_BASENAME IMAGE_BOOT_FILES \
> +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD ISODIR
> MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> TARGET_SYS"
> +
> +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l
> for l in '${BBPATH}:${COREBASE}'.split(':'))}"
> +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> '${WKS_SEARCH_PATH}') or ''}"
> +
> +def wks_search(files, search_path):
> +for f in files:
> +if os.path.isabs(f):
> +if os.path.exists(f):
> +return f
> +else:
> +searched = bb.utils.which(search_path, f)
> +if searched:
> +return searched
> +
> +WIC_CREATE_EXTRA_ARGS ?= ""
> +
> +IMAGE_CMD_wic () {
> +   out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
> +   wks="${WKS_FULL_PATH}"
> +   if [ -z "$wks" ]; then
> +   bbfatal "No kickstart files from WKS_FILES were found:
> ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> +   fi
> +
> +   BUILDDIR="${TOPDIR}" wic create "$wks" --vars
> "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o "$out/"
> ${WIC_CREATE_EXTRA_ARGS}
> +   mv "$out/$(basename "${wks%.wks}")"*.direct
> "$out${IMAGE_NAME_SUFFIX}.wic"
> +   rm -rf "$out/"
> +}
> +IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
> +
> +# Rebuild when the wks file or vars in WICVARS change
> +USING_WIC = "${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + '
> '.join('wic.%s' % c for c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
> +WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
> os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
> +do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
> +do_image_wic[depends] += "wic-tools:do_build"
> +
> +python () {
> +if d.getVar('USING_WIC') and 'do_bootimg' in d:
> +bb.build.addtask('do_image_wic', '', 'do_bootimg', d)
> +}
> +
> +python do_write_wks_template () {
> +"""Write out expanded template contents to WKS_FULL_PATH."""
> +import re
> +
> +template_body = d.getVar('_WKS_TEMPLATE')
> +
> +# Remove any remnant variable references left behind by the expansion
> +# due to undefined variables
> +expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
> +while True:
> +new_body = re.sub(expand_var_regexp, '', template_body)
> +if new_body == template_body:
> +break
> +else:
> +template_body = new_body
> +
> +wks_file = d.getVar('WKS_FULL_PATH')
> +with open(wks_file, 'w') as f:
> +f.write(template_body)
> +}
> +
> +python () {
> +if d.getVar('USING_WIC'):
> +wks_file_u = d.getVar('WKS_FULL_PATH', False)
> +wks_file = d.expand(wks_file_u)
> +base, ext = os.path.splitext(wks_file)
> +if ext == '.in' and os.path.exists(wks_file):
> +wks_out_file = os.path.join(d.getVar('WORKDIR'),
> os.path.basename(base))
> +d.setVar('WKS_FULL_PATH', wks_out_file)
> +d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
> +d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
> +
> +# We need to re-parse each time the file changes, and bitbake
> +# needs to be told about that explicitly.
> +bb.parse.mark_dependency(d, wks_file)
> +
> +try:
> +with open(wks_file, 'r') as f:
> +body = f.read()
> +except (IOError, OSError) as exc:
> +pass
> +else:
> +# Previously, I used expandWithRefs to get the 

Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Ed Bartosh
On Mon, Jan 30, 2017 at 10:25:12AM +, Ola x Nilsson wrote:
> Please name the class image_wic.bbclass instead.
> 
> As dashes are not allowed in function names, you cannot use 
> the image_wic_do_write_wks_template pattern of function 
> names if you use a class name with a dash in it.
> 

Thanks for pointing out to it. Will fix it in the next versison of this
patchset.

> -- 
> Ola x Nilsson
> 
> > -Original Message-
> > From: openembedded-core-boun...@lists.openembedded.org
> > [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf
> > Of Ed Bartosh
> > Sent: den 27 januari 2017 21:20
> > To: openembedded-core@lists.openembedded.org
> > Subject: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-
> > wic.bbclass
> > 
> > There is a lot of wic code in image.bbclass and image_types.bbclass Having 
> > all
> > code separated in one file should make it more readable and easier to
> > maintain.
> > 
> > Signed-off-by: Ed Bartosh 
> > ---
> >  meta/classes/image-wic.bbclass   | 120
> > +++
> >  meta/classes/image.bbclass   |  25 +---
> >  meta/classes/image_types.bbclass |  95 ---
> >  3 files changed, 122 insertions(+), 118 deletions(-)  create mode 100644
> > meta/classes/image-wic.bbclass
> > 
> > diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-
> > wic.bbclass new file mode 100644 index 000..2acfd65
> > --- /dev/null
> > +++ b/meta/classes/image-wic.bbclass
> > @@ -0,0 +1,120 @@
> > +# The WICVARS variable is used to define list of bitbake variables used
> > +in wic code # variables from this list is written to .env file
> > +WICVARS ?= "\
> > +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD
> > HDDDIR IMAGE_BASENAME IMAGE_BOOT_FILES \
> > +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD
> > ISODIR MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> > +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> > TARGET_SYS"
> > +
> > +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> > +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> > +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> > '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l 
> > for l in
> > '${BBPATH}:${COREBASE}'.split(':'))}"
> > +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> > '${WKS_SEARCH_PATH}') or ''}"
> > +
> > +def wks_search(files, search_path):
> > +for f in files:
> > +if os.path.isabs(f):
> > +if os.path.exists(f):
> > +return f
> > +else:
> > +searched = bb.utils.which(search_path, f)
> > +if searched:
> > +return searched
> > +
> > +WIC_CREATE_EXTRA_ARGS ?= ""
> > +
> > +IMAGE_CMD_wic () {
> > +   out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
> > +   wks="${WKS_FULL_PATH}"
> > +   if [ -z "$wks" ]; then
> > +   bbfatal "No kickstart files from WKS_FILES were
> > found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> > +   fi
> > +
> > +   BUILDDIR="${TOPDIR}" wic create "$wks" --vars
> > "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o
> > "$out/" ${WIC_CREATE_EXTRA_ARGS}
> > +   mv "$out/$(basename "${wks%.wks}")"*.direct
> > "$out${IMAGE_NAME_SUFFIX}.wic"
> > +   rm -rf "$out/"
> > +}
> > +IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
> > +
> > +# Rebuild when the wks file or vars in WICVARS change USING_WIC =
> > +"${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c 
> > for
> > c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
> > +WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
> > os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
> > +do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
> > +do_image_wic[depends] += "wic-tools:do_build"
> > +
> > +python () {
> > +if d.getVar('USING_WIC') and 'do_bootimg' in d:
> > +bb.build.addtask('do_image_wic', '', 'do_bootimg', d) }
> > +
> > +python do_write_wks_template () {
> > +"""Write out expanded template contents to WKS_FULL_PATH."""
> > +import re
> > +
> > +template_body = d.getVar('_WKS_TEMPLATE')
> > +
> > +# Remove any remnant variable references left behind by the expansion
> > +# due to undefined variables
> > +expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
> > +while True:
> > +new_body = re.sub(expand_var_regexp, '', template_body)
> > +if new_body == template_body:
> > +break
> > +else:
> > +template_body = new_body
> > +
> > +wks_file = d.getVar('WKS_FULL_PATH')
> > +with open(wks_file, 'w') as f:
> > +f.write(template_body)
> > +}
> > +
> > +python () {
> > +if d.getVar('USING_WIC'):
> > +wks_file_u = d.getVar('WKS_FULL_PATH', False)
> > +wks_file = d.expand(wks_file_u)
> > +base, ext = os.path.splitext(wks_file)
> > +if ext 

Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix for rootfs parameter

2017-01-30 Thread Bystricky, Juro

> -Original Message-
> From: Patrick Ohly [mailto:patrick.o...@intel.com]
> Sent: Friday, January 27, 2017 11:22 AM
> To: Bystricky, Juro 
> Cc: openembedded-core@lists.openembedded.org
> Subject: Re: [OE-core] [PATCH v5 09/12] runqemu: also accept -image suffix
> for rootfs parameter
> 
> On Fri, 2017-01-27 at 16:54 +, Bystricky, Juro wrote:
> > Just curious: is this test for "image" in file name really necessary?
> > With qemuboot.conf the relevant files are already spelled out.
> > I don't see a need to force "compulsory" names for images.
> > If I comment out this test, everything works just fine. Am I missing
> something?
> 
> Some of the usages when checking for paths might have become obsolete,
> but at least for distinguishing between machine and image base name
> parameters it is still relevant:
> 
> def check_args(self):
> ...
> elif re.search(r'-image-|-image$', arg):
> # Lazy rootfs
> self.rootfs = arg
> elif arg.startswith('ovmf'):
> self.ovmf_bios.append(arg)
> else:
> # At last, assume is it the MACHINE
> if (not unknown_arg) or unknown_arg == arg:
> unknown_arg = arg
> else:
> raise Exception("Can't handle two unknown args: %s %
> s" % (unknown_arg, arg))
> 
> When removing the "if re.search(r'-image-|-image$', arg)" clause one
> gets an error for:
> 
> $ runqemu core-image-minimal ext4 qemux86
> runqemu - ERROR - Can't handle two unknown args: core-image-minimal qemux86
> runqemu - ERROR - Try 'runqemu help' on how to use it
> 

I see, the purpose of this test is determine which argument is which,
as they can be in any order. IMHO to differentiate between MACHINE and image it 
would 
make more sense to search for "qemu" instead of "-image-" or "-image" . 
(BTW do we need both -image- and -image$?)

There is also ANOTHER test for '-image-', in "is_deploy_dir_image". 
This is the one I considered redundant (or not needed in case we have 
qemuboot.conf). 


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

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


Re: [OE-core] rootfs build failure

2017-01-30 Thread Leonardo Sandoval
workaround: Try using another package manager as first option in the 
PACKAGE_CLASSES variable set on local.conf.


I have a similar error on a OpenSUSE machine but did not report it. I 
was using the rpm (which is the default) but did the trick mentioned 
above and worked.



On 01/30/2017 09:44 AM, Andrew Goodbody wrote:

Anyone know what the deal is here?

Andrew


-Original Message-
I now get the following build failure from do_rootfs

The stack trace of python calls that resulted in this exception/failure was:
File: 'exec_python_func() autogenerated', lineno: 2, function: 
  0001:
  *** 0002:license_create_manifest(d)
  0003:
File: '/home/andrew/src/camol3/camol/layers/openembedded-
core/meta/classes/license.bbclass', lineno: 48, function:
license_create_manifest
  0044:pkg_dic = {}
  0045:for pkg in sorted(image_list_installed_packages(d)):
  0046:pkg_info = os.path.join(d.getVar('PKGDATA_DIR'),
  0047:'runtime-reverse', pkg)
  *** 0048:pkg_name = os.path.basename(os.readlink(pkg_info))
  0049:
  0050:pkg_dic[pkg_name] =
oe.packagedata.read_pkgdatafile(pkg_info)
  0051:if not "LICENSE" in pkg_dic[pkg_name].keys():
  0052:pkg_lic_name = "LICENSE_" + pkg_name
Exception: FileNotFoundError: [Errno 2] No such file or directory:
'/home/andrew/src/camol3/camol/build/tmp-camol-
glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs'

ERROR: whippet-internal-image-1.0-r0 do_rootfs: Function failed:
license_create_manifest

/home/andrew/src/camol3/camol/build/tmp-camol-
glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs indeed
does not exist but
/home/andrew/src/camol3/camol/build/tmp-camol-
glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs-4.5.1 does
exist.

Andrew


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


[OE-core] [PATCH] libbsd: libbsd-overlay.pc: Set Cflags to use -I instead of -isystem

2017-01-30 Thread Fabio Berton
pkg-config currently only handles -I and -L correctly, but misses
-isystem, so we need to do this workaround to fix this issue.

There's a open bug in:
https://bugzilla.freedesktop.org/show_bug.cgi?id=99516

This appears when building lldpd and shows error:

ERROR: lldpd-0.9.6-r0 do_configure: This autoconf log indicates
errors, it looked at host include and/or library paths while
determining system capabilities.
Rerun configure task after fixing this.
ERROR: lldpd-0.9.6-r0 do_configure: Function failed: do_qa_configure

Change-Id: I83255b5952e19bb2f516b1186276cd03eb67eed3
Signed-off-by: Fabio Berton 
---
 ...overlay.pc.in-Set-Cflags-to-use-I-instead.patch | 33 ++
 meta/recipes-support/libbsd/libbsd_0.8.3.bb|  1 +
 2 files changed, 34 insertions(+)
 create mode 100644 
meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch

diff --git 
a/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch
 
b/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch
new file mode 100644
index 00..7e3a5b3be4
--- /dev/null
+++ 
b/meta/recipes-support/libbsd/libbsd/0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch
@@ -0,0 +1,33 @@
+From b6972f1c29ebf073cbe19a4a669ee093259792a0 Mon Sep 17 00:00:00 2001
+From: Fabio Berton 
+Date: Mon, 30 Jan 2017 12:00:33 -0200
+Subject: [PATCH] src/libbsd-overlay.pc.in: Set Cflags to use -I instead of
+ -isystem
+Organization: O.S. Systems Software LTDA.
+
+pkg-config currently only handles -I and -L correctly, but misses
+-isystem, so we need to do this workaround to fix this issue.
+
+There's a open bug in:
+https://bugzilla.freedesktop.org/show_bug.cgi?id=99516
+
+Upstream-Status: Pending
+
+Signed-off-by: Fabio Berton 
+---
+ src/libbsd-overlay.pc.in | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/src/libbsd-overlay.pc.in b/src/libbsd-overlay.pc.in
+index ac8bf89..65dc3ae 100644
+--- a/src/libbsd-overlay.pc.in
 b/src/libbsd-overlay.pc.in
+@@ -8,4 +8,4 @@ Description: Utility functions from BSD systems (overlay)
+ Version: @VERSION@
+ URL: https://libbsd.freedesktop.org/
+ Libs: -L${libdir} -lbsd
+-Cflags: -isystem ${includedir}/bsd -DLIBBSD_OVERLAY
++Cflags: -I${includedir}/bsd -DLIBBSD_OVERLAY
+-- 
+2.11.0
+
diff --git a/meta/recipes-support/libbsd/libbsd_0.8.3.bb 
b/meta/recipes-support/libbsd/libbsd_0.8.3.bb
index fadd7886a2..e85ee2153d 100644
--- a/meta/recipes-support/libbsd/libbsd_0.8.3.bb
+++ b/meta/recipes-support/libbsd/libbsd_0.8.3.bb
@@ -35,6 +35,7 @@ SECTION = "libs"
 
 SRC_URI = " \
 http://libbsd.freedesktop.org/releases/${BPN}-${PV}.tar.xz \
+file://0001-src-libbsd-overlay.pc.in-Set-Cflags-to-use-I-instead.patch \
 "
 SRC_URI_append_libc-musl  = " \
 file://0001-Replace-__BEGIN_DECLS-and-__END_DECLS.patch \
-- 
2.11.0

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


[OE-core] [PATCH] at-spi2-atk: Add glib-2.0-native dependency

2017-01-30 Thread Saul Wold
This package needs the glib-compile-schemas native binary, which may have been
provided by host tools previously. The Recipe-Specific Sysroots might have also
uncovered this dependency.

Signed-off-by: Saul Wold 
---
 meta/recipes-support/atk/at-spi2-atk_2.22.0.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/atk/at-spi2-atk_2.22.0.bb 
b/meta/recipes-support/atk/at-spi2-atk_2.22.0.bb
index 80ba642..78798c1 100644
--- a/meta/recipes-support/atk/at-spi2-atk_2.22.0.bb
+++ b/meta/recipes-support/atk/at-spi2-atk_2.22.0.bb
@@ -8,7 +8,7 @@ SRC_URI = 
"${GNOME_MIRROR}/${BPN}/${MAJ_VER}/${BPN}-${PV}.tar.xz"
 SRC_URI[md5sum] = "aa62aed21b8e03dc44ab81ae49d893ca"
 SRC_URI[sha256sum] = 
"e8bdedbeb873eb229eb08c88e11d07713ec25ae175251648ad1a9da6c21113c1"
 
-DEPENDS = "dbus glib-2.0 atk at-spi2-core"
+DEPENDS = "dbus glib-2.0 atk at-spi2-core glib-2.0-native"
 
 inherit autotools pkgconfig distro_features_check upstream-version-is-even
 
-- 
2.7.4

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


[OE-core] [PATCHv3 4/5] oeqa/core/context.py: Add validation for run-tests option

2017-01-30 Thread mariano . lopez
From: Aníbal Limón 

The run-tests option is optional so if isn't specified set
to None instead of crash on split().

Signed-off-by: Aníbal Limón 
---
 meta/lib/oeqa/core/context.py | 6 +-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/core/context.py b/meta/lib/oeqa/core/context.py
index efed4e6..4476750 100644
--- a/meta/lib/oeqa/core/context.py
+++ b/meta/lib/oeqa/core/context.py
@@ -215,7 +215,11 @@ class OETestContextExecutor(object):
 else:
 self.tc_kwargs['init']['td'] = {}
 
-self.tc_kwargs['load']['modules'] = args.run_tests.split()
+
+if args.run_tests:
+self.tc_kwargs['load']['modules'] = args.run_tests.split()
+else:
+self.tc_kwargs['load']['modules'] = None
 
 self.module_paths = args.CASES_PATHS
 
-- 
2.6.6

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


[OE-core] [PATCHv3 5/5] oeqa/runtime/cases: Rename syslog module to oe_syslog

2017-01-30 Thread mariano . lopez
From: Aníbal Limón 

Debian based distros has a builtin syslog module so when
try to load tests using unittest it references the builtin
module instead of runtime/cases.

[YOCTO #10964]

Signed-off-by: Aníbal Limón 
Signed-off-by: Mariano Lopez 
---
 meta/classes/testimage.bbclass  | 2 +-
 meta/lib/oeqa/runtime/cases/{syslog.py => oe_syslog.py} | 6 +++---
 2 files changed, 4 insertions(+), 4 deletions(-)
 rename meta/lib/oeqa/runtime/cases/{syslog.py => oe_syslog.py} (92%)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 7495fe1..c6e4cec 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -38,7 +38,7 @@ TEST_PACKAGED_DIR ?= "${TEST_NEEDED_PACKAGES_DIR}/packaged"
 RPMTESTSUITE = "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'smart rpm', '', 
d)}"
 SYSTEMDSUITE = "${@bb.utils.contains('DISTRO_FEATURES', 'systemd', 'systemd', 
'', d)}"
 MINTESTSUITE = "ping"
-NETTESTSUITE = "${MINTESTSUITE} ssh df date scp syslog ${SYSTEMDSUITE}"
+NETTESTSUITE = "${MINTESTSUITE} ssh df date scp oe_syslog ${SYSTEMDSUITE}"
 DEVTESTSUITE = "gcc kernelmodule ldd"
 
 DEFAULT_TEST_SUITES = "${MINTESTSUITE} auto"
diff --git a/meta/lib/oeqa/runtime/cases/syslog.py 
b/meta/lib/oeqa/runtime/cases/oe_syslog.py
similarity index 92%
rename from meta/lib/oeqa/runtime/cases/syslog.py
rename to meta/lib/oeqa/runtime/cases/oe_syslog.py
index 537c519..005b697 100644
--- a/meta/lib/oeqa/runtime/cases/syslog.py
+++ b/meta/lib/oeqa/runtime/cases/oe_syslog.py
@@ -18,7 +18,7 @@ class SyslogTest(OERuntimeTestCase):
 class SyslogTestConfig(OERuntimeTestCase):
 
 @OETestID(1149)
-@OETestDepends(['syslog.SyslogTest.test_syslog_running'])
+@OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
 def test_syslog_logger(self):
 status, output = self.target.run('logger foobar')
 msg = "Can't log into syslog. Output: %s " % output
@@ -35,7 +35,7 @@ class SyslogTestConfig(OERuntimeTestCase):
 self.assertEqual(status, 0, msg=msg)
 
 @OETestID(1150)
-@OETestDepends(['syslog.SyslogTest.test_syslog_running'])
+@OETestDepends(['oe_syslog.SyslogTest.test_syslog_running'])
 def test_syslog_restart(self):
 if "systemd" != self.tc.td.get("VIRTUAL-RUNTIME_init_manager", ""):
 (_, _) = self.target.run('/etc/init.d/syslog restart')
@@ -44,7 +44,7 @@ class SyslogTestConfig(OERuntimeTestCase):
 
 
 @OETestID(202)
-@OETestDepends(['syslog.SyslogTestConfig.test_syslog_logger'])
+@OETestDepends(['oe_syslog.SyslogTestConfig.test_syslog_logger'])
 @OEHasPackage(["!sysklogd", "busybox"])
 @skipIfDataVar('VIRTUAL-RUNTIME_init_manager', 'systemd',
'Not appropiate for systemd image')
-- 
2.6.6

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


[OE-core] [PATCHv3 2/5] runtime/cases/smart.py: Check for IMAGE_PKGTYPE instead of PACKAGE_CLASSES

2017-01-30 Thread mariano . lopez
From: Mariano Lopez 

smart test requires to build the image using rpm packages, this check was
included, but it checked for PACKAGE_CLASSES=='package_rpm', and this is
not true when building packages for rpm and deb/ipk. So this would check
IMAGE_PKGTYPE instead.

[YOCTO #10964]

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/runtime/cases/smart.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/lib/oeqa/runtime/cases/smart.py 
b/meta/lib/oeqa/runtime/cases/smart.py
index 9b4d0d2..79bd9c8 100644
--- a/meta/lib/oeqa/runtime/cases/smart.py
+++ b/meta/lib/oeqa/runtime/cases/smart.py
@@ -23,7 +23,7 @@ class SmartBasicTest(SmartTest):
 
 @skipIfNotFeature('package-management',
   'Test requires package-management to be in 
IMAGE_FEATURES')
-@skipIfNotDataVar('PACKAGE_CLASSES', 'package_rpm',
+@skipIfNotDataVar('IMAGE_PKGTYPE', 'rpm',
   'RPM is not the primary package manager')
 @OEHasPackage(['smartpm'])
 @OETestID(716)
-- 
2.6.6

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


[OE-core] [PATCHv3 3/5] testimage.bbclass: Allow to run tests on autobuilder's images

2017-01-30 Thread mariano . lopez
From: Mariano Lopez 

With the change to the new framework data store dependecy was
removed, instead a new file is generated and used in testimage.
When testing builds from the autobuilders the test data values
are from the autobuilder, including the paths.

Some tests require paths to current environment in order to run,
this commit will update such paths and fix the error of running
images donwloaded from autobuilders.

[YOCTO #10964]

Signed-off-by: Mariano Lopez 
---
 meta/classes/testimage.bbclass   | 18 +++---
 meta/lib/oeqa/core/utils/misc.py |  7 +++
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/meta/classes/testimage.bbclass b/meta/classes/testimage.bbclass
index 73a5c1a..7495fe1 100644
--- a/meta/classes/testimage.bbclass
+++ b/meta/classes/testimage.bbclass
@@ -49,11 +49,11 @@ DEFAULT_TEST_SUITES_pn-core-image-x11 = "${MINTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-core-image-lsb = "${NETTESTSUITE} pam parselogs 
${RPMTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-core-image-sato = "${NETTESTSUITE} connman xorg 
parselogs ${RPMTESTSUITE} \
 ${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 'python', '', d)}"
-DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} connman xorg 
perl python \
-${DEVTESTSUITE} parselogs ${RPMTESTSUITE}"
+DEFAULT_TEST_SUITES_pn-core-image-sato-sdk = "${NETTESTSUITE} buildcvs 
buildiptables buildgalculator \
+connman ${DEVTESTSUITE} logrotate perl parselogs python ${RPMTESTSUITE} 
xorg"
 DEFAULT_TEST_SUITES_pn-core-image-lsb-dev = "${NETTESTSUITE} pam perl python 
parselogs ${RPMTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-core-image-lsb-sdk = "${NETTESTSUITE} buildcvs 
buildiptables buildgalculator \
-connman ${DEVTESTSUITE} pam perl python parselogs ${RPMTESTSUITE}"
+connman ${DEVTESTSUITE} logrotate pam parselogs perl python 
${RPMTESTSUITE}"
 DEFAULT_TEST_SUITES_pn-meta-toolchain = "auto"
 
 # aarch64 has no graphics
@@ -79,13 +79,15 @@ TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 
'rpm', 'python-smartp
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'ipk', 
'opkg-utils-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'deb', 
'apt-native:do_populate_sysroot', '', d)}"
 TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'python-smartpm-native:do_populate_sysroot', '', d)}"
-
+TESTIMAGEDEPENDS += "${@bb.utils.contains('IMAGE_PKGTYPE', 'rpm', 
'createrepo-native:do_populate_sysroot', '', d)}"
 
 TESTIMAGELOCK = "${TMPDIR}/testimage.lock"
 TESTIMAGELOCK_qemuall = ""
 
 TESTIMAGE_DUMP_DIR ?= "/tmp/oe-saved-tests/"
 
+TESTIMAGE_UPDATE_VARS ?= "DL_DIR WORKDIR DEPLOY_DIR"
+
 testimage_dump_target () {
 top -bn1
 ps
@@ -138,13 +140,12 @@ def testimage_sanity(d):
 
 def testimage_main(d):
 import os
-import signal
 import json
-import sys
+import signal
 import logging
-import time
 
 from bb.utils import export_proxies
+from oeqa.core.utils.misc import updateTestData
 from oeqa.runtime.context import OERuntimeTestContext
 from oeqa.runtime.context import OERuntimeTestContextExecutor
 from oeqa.core.target.qemu import supported_fstypes
@@ -166,6 +167,9 @@ def testimage_main(d):
 
 tdname = "%s.testdata.json" % image_name
 td = json.load(open(tdname, "r"))
+# Some variables need to be updates (mostly paths) with the
+# ones of the current environment because some tests require them.
+updateTestData(d, td, d.getVar('TESTIMAGE_UPDATE_VARS').split())
 
 image_manifest = "%s.manifest" % image_name
 image_packages = 
OERuntimeTestContextExecutor.readPackagesManifest(image_manifest)
diff --git a/meta/lib/oeqa/core/utils/misc.py b/meta/lib/oeqa/core/utils/misc.py
index 6ae58ad..d1eec13 100644
--- a/meta/lib/oeqa/core/utils/misc.py
+++ b/meta/lib/oeqa/core/utils/misc.py
@@ -35,3 +35,10 @@ def dataStoteToDict(d, variables):
 data[v] = d.getVar(v, True)
 
 return data
+
+def updateTestData(d, td, variables):
+"""
+Updates variables with values of data store to test data.
+"""
+for var in variables:
+td[var] = d.getVar(var)
-- 
2.6.6

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


[OE-core] [PATCHv3 1/5] runtime/cases: Fix case numbers, missing cases and unused classes

2017-01-30 Thread mariano . lopez
From: Mariano Lopez 

connman: oeRuntimeTest class is not used anymore as part of runtime
migration, this particular case was missed, so fix it.

gcc: Removed unneded lines.

multilib: fixed case number.

syslog: added a missing test.

[YOCTO #10964]

Signed-off-by: Mariano Lopez 

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/runtime/cases/connman.py  | 2 +-
 meta/lib/oeqa/runtime/cases/gcc.py  | 3 ---
 meta/lib/oeqa/runtime/cases/multilib.py | 2 +-
 meta/lib/oeqa/runtime/cases/syslog.py   | 9 +
 4 files changed, 11 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oeqa/runtime/cases/connman.py 
b/meta/lib/oeqa/runtime/cases/connman.py
index 8b47108..12456b4 100644
--- a/meta/lib/oeqa/runtime/cases/connman.py
+++ b/meta/lib/oeqa/runtime/cases/connman.py
@@ -6,7 +6,7 @@ from oeqa.runtime.decorator.package import OEHasPackage
 class ConnmanTest(OERuntimeTestCase):
 
 def service_status(self, service):
-if oeRuntimeTest.hasFeature("systemd"):
+if 'systemd' in self.tc.td['DISTRO_FEATURES']:
 (_, output) = self.target.run('systemctl status -l %s' % service)
 return output
 else:
diff --git a/meta/lib/oeqa/runtime/cases/gcc.py 
b/meta/lib/oeqa/runtime/cases/gcc.py
index 064fa49..9110831 100644
--- a/meta/lib/oeqa/runtime/cases/gcc.py
+++ b/meta/lib/oeqa/runtime/cases/gcc.py
@@ -11,15 +11,12 @@ class GccCompileTest(OERuntimeTestCase):
 def setUpClass(cls):
 dst = '/tmp/'
 src = os.path.join(cls.tc.files_dir, 'test.c')
-#dst = '/tmp/test.c'
 cls.tc.target.copyTo(src, dst)
 
 src = os.path.join(cls.tc.runtime_files_dir, 'testmakefile')
-#dst = '/tmp/testmakefile'
 cls.tc.target.copyTo(src, dst)
 
 src = os.path.join(cls.tc.files_dir, 'test.cpp')
-#dst = '/tmp/test.cpp'
 cls.tc.target.copyTo(src, dst)
 
 @classmethod
diff --git a/meta/lib/oeqa/runtime/cases/multilib.py 
b/meta/lib/oeqa/runtime/cases/multilib.py
index 8f6d2b2..8c167f1 100644
--- a/meta/lib/oeqa/runtime/cases/multilib.py
+++ b/meta/lib/oeqa/runtime/cases/multilib.py
@@ -23,9 +23,9 @@ class MultilibTest(OERuntimeTestCase):
 msg = "%s isn't %s (is %s)" % (binary, arch, theclass)
 self.assertEqual(theclass, arch, msg=msg)
 
+@OETestID(1593)
 @skipIfNotInDataVar('MULTILIBS', 'multilib:lib32',
 "This isn't a multilib:lib32 image")
-@OETestID(201)
 @OETestDepends(['ssh.SSHTest.test_ssh'])
 def test_check_multilib_libc(self):
 """
diff --git a/meta/lib/oeqa/runtime/cases/syslog.py 
b/meta/lib/oeqa/runtime/cases/syslog.py
index 1016e67..537c519 100644
--- a/meta/lib/oeqa/runtime/cases/syslog.py
+++ b/meta/lib/oeqa/runtime/cases/syslog.py
@@ -34,6 +34,15 @@ class SyslogTestConfig(OERuntimeTestCase):
' Output: %s ' % output)
 self.assertEqual(status, 0, msg=msg)
 
+@OETestID(1150)
+@OETestDepends(['syslog.SyslogTest.test_syslog_running'])
+def test_syslog_restart(self):
+if "systemd" != self.tc.td.get("VIRTUAL-RUNTIME_init_manager", ""):
+(_, _) = self.target.run('/etc/init.d/syslog restart')
+else:
+(_, _) = self.target.run('systemctl restart syslog.service')
+
+
 @OETestID(202)
 @OETestDepends(['syslog.SyslogTestConfig.test_syslog_logger'])
 @OEHasPackage(["!sysklogd", "busybox"])
-- 
2.6.6

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


Re: [OE-core] rootfs build failure

2017-01-30 Thread Andrew Goodbody
Anyone know what the deal is here?

Andrew

> -Original Message-
> I now get the following build failure from do_rootfs
> 
> The stack trace of python calls that resulted in this exception/failure was:
> File: 'exec_python_func() autogenerated', lineno: 2, function: 
>  0001:
>  *** 0002:license_create_manifest(d)
>  0003:
> File: '/home/andrew/src/camol3/camol/layers/openembedded-
> core/meta/classes/license.bbclass', lineno: 48, function:
> license_create_manifest
>  0044:pkg_dic = {}
>  0045:for pkg in sorted(image_list_installed_packages(d)):
>  0046:pkg_info = os.path.join(d.getVar('PKGDATA_DIR'),
>  0047:'runtime-reverse', pkg)
>  *** 0048:pkg_name = os.path.basename(os.readlink(pkg_info))
>  0049:
>  0050:pkg_dic[pkg_name] =
> oe.packagedata.read_pkgdatafile(pkg_info)
>  0051:if not "LICENSE" in pkg_dic[pkg_name].keys():
>  0052:pkg_lic_name = "LICENSE_" + pkg_name
> Exception: FileNotFoundError: [Errno 2] No such file or directory:
> '/home/andrew/src/camol3/camol/build/tmp-camol-
> glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs'
> 
> ERROR: whippet-internal-image-1.0-r0 do_rootfs: Function failed:
> license_create_manifest
> 
> /home/andrew/src/camol3/camol/build/tmp-camol-
> glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs indeed
> does not exist but
> /home/andrew/src/camol3/camol/build/tmp-camol-
> glibc/pkgdata/whippet/runtime-reverse/kernel-module-configfs-4.5.1 does
> exist.
> 
> Andrew

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


[OE-core] Yocto Project Status WW05’17

2017-01-30 Thread Jolley, Stephen K
Current Dev Position: YP 2.3 M3

Next Deadline: YP 2.3 M3 by Feb. 27, 2017


SWAT team rotation: Paul -> Ross on Jan. 27, 2017.

SWAT team rotation: Ross -> Leo on Feb. 3, 2017.

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


Key Status/Updates:

·The recipe specific sysroots changes has caused fallout in various 
areas although given the invasiveness of the change, the fallout so far hasn’t 
been too bad and should be fixable. Master has a number of bug fixes and 
improvements added to help address some of the issues.

·Unfortunately the recipe specific sysroots change does have some 
significant performance implications. Some measures to mitigate these have been 
committed, others are worked on but it seems unlikely we’ll be able to achieve 
the pre-rss performance as the individual sysroots do have some overhead. We’re 
considering disabling/removing .la files as one measure which may gain back 
some performance (since .la files commonly need sed fixups each time a new 
sysroot is generated).

·The 2.2.1 release will now happen after M2.

·Patch merging continues to be slow due to continued failure and 
instability of the ubuntu1404 autobuilder worker (seems to be OS related).

·QA on M2-rc1 is ongoing, nothing blocking has been found as yet but 
the rss fixes in master may be a reason to consider an rc2.


Proposed upcoming dot releases:

YP 2.2.1 Release by Jan. 20, 2017 (Will be after YP 2.3 M2 is out of QA)

YP 2.1.3 Cut off May 8, 2017

YP 2.1.3 Release by May 19, 2017

YP 2.2.2 Cut off May 22, 2017

YP 2.2.2 Release by June 2, 2017


Key YP 2.3 Dates:

YP 2.3 M2 Release is targeted for Feb. 3, 2017

YP 2.3 M3 Cutoff is Feb 27, 2017

YP 2.3 M3 Release is Mar. 10, 2017

YP 2.3 M4 Cutoff is April 3, 2017

YP 2.3 M4 Release is April 28, 2017


Tracking Metrics:

WDD 2630 (last week 2614)

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


Key Status Links for YP:

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

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

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

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

Thanks,

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

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


[OE-core] [PATCH] wic-tools: Do not remove sysroot with rm_work, because wic needs it.

2017-01-30 Thread Kristian Amlie
The sysroot of wic-tools is needed for wic, but if rm_work is enabled,
it will be removed before wic has a chance to use it, hence this fix.

Signed-off-by: Kristian Amlie 
---
 meta/recipes-core/meta/wic-tools.bb | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/recipes-core/meta/wic-tools.bb 
b/meta/recipes-core/meta/wic-tools.bb
index 0a53b73..d8988a4 100644
--- a/meta/recipes-core/meta/wic-tools.bb
+++ b/meta/recipes-core/meta/wic-tools.bb
@@ -9,6 +9,10 @@ DEPENDS_append_x86-64 = " syslinux grub-efi"
 INHIBIT_DEFAULT_DEPS = "1"
 inherit nopackages
 
+# The sysroot of wic-tools is needed for wic, but if rm_work is enabled, it 
will
+# be removed before wic has a chance to use it, hence the exclusion below.
+RM_WORK_EXCLUDE += "${PN}"
+
 python do_build_sysroot () {
 bb.build.exec_func("extend_recipe_sysroot", d)
 
-- 
2.7.4

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


Re: [OE-core] ✗ patchtest: failure for Python3 packaging fixes

2017-01-30 Thread Leonardo Sandoval



On 01/27/2017 03:40 AM, Anders Darander wrote:

Hi,

* Patchwork  [170127 10:23]:


Series: Python3 packaging fixes
Revision: 1
URL   : https://patchwork.openembedded.org/series/5024/
State : failure
* Issue Series does not apply on top of target branch 
[test_series_merge_on_head]
   Suggested fixRebase your series on top of targeted branch
   Targeted branch  master (currently at a99cca0e8e)

This is likely due to issues with the email-patches. One of the patches,
0003, has a line > 998 characters (one line in the patch context, ie not
modified by me).


Anders, I do not think the problem is the patch format because git-am 
does not complain at this stage. This is what I am getting when either 
git-am or git-apply


git pw mbox 5024 | git am
Applying: python-3-manifest: fix adding imp to importlib
Applying: python3-manifest: move htlm.py to python3-html
Applying: python-3-manifest: add argparse to RDEPENDS for netclient
error: patch failed: 
meta/recipes-devtools/python/python-3.5-manifest.inc:154
error: meta/recipes-devtools/python/python-3.5-manifest.inc: patch does 
not apply
Patch failed at 0003 python-3-manifest: add argparse to RDEPENDS for 
netclient

The copy of the patch that failed is found in:
   /home/lsandov1/repos/openembedded-core/.git/rebase-apply/patch
When you have resolved this problem, run "git am --continue".
If you prefer to skip this patch, run "git am --skip" instead.
To restore the original branch and stop patching, run "git am --abort".
lsandov1@lsandov1-mobl2:~/repos/openembedded-core$ git am --abort

lsandov1@lsandov1-mobl2:~/repos/openembedded-core$ git pw mbox 5024 | 
git apply --check
error: patch failed: 
meta/recipes-devtools/python/python-3.5-manifest.inc:154
error: meta/recipes-devtools/python/python-3.5-manifest.inc: patch does 
not apply
error: patch failed: 
meta/recipes-devtools/python/python-3.5-manifest.inc:119
error: meta/recipes-devtools/python/python-3.5-manifest.inc: patch does 
not apply


Meaning that you may need to fix merge failures for the manifest.inc file.

In the other hand, bad formatted patches have their own (patch) test, 
and the report does not include it.




Retrieving the patch series from the branch at github should work, as
it's based on the current master, a99cca0e8e.

Cheers,
Anders



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


[OE-core] [PATCH] selftest/runtime-tests: Modify positins test to reduce execution time

2017-01-30 Thread jose . perez . carranza
From: Jose Perez Carranza 

Currently test_postinst_roofs_and_boot is building a full-cmdline image
this is taking a lot of time to execute the test, so a minimal image
will be build instead.

Signed-off-by: Jose Perez Carranza 
---
 meta/lib/oeqa/selftest/runtime-test.py | 11 ++-
 1 file changed, 6 insertions(+), 5 deletions(-)

diff --git a/meta/lib/oeqa/selftest/runtime-test.py 
b/meta/lib/oeqa/selftest/runtime-test.py
index 9e2ecc6..52e5b27 100644
--- a/meta/lib/oeqa/selftest/runtime-test.py
+++ b/meta/lib/oeqa/selftest/runtime-test.py
@@ -176,7 +176,7 @@ postinst-delayed-t \
 that script can be delayed to run at first boot.
 Dependencies:   NA
 Steps:  1. Add proper configuration to local.conf file
-2. Build a "core-image-full-cmdline" image
+2. Build a "core-image-minimal" image
 3. Verify that file created by postinst_rootfs recipe 
is
present on rootfs dir.
 4. Boot the image created on qemu and verify that the 
file
@@ -195,6 +195,7 @@ postinst-delayed-t \
 #Step 1
 features = 'MACHINE = "qemux86"\n'
 features += 'CORE_IMAGE_EXTRA_INSTALL += "%s %s "\n'% (rootfs_pkg, 
boot_pkg)
+features += 'IMAGE_FEATURES += "ssh-server-openssh"\n'
 for init_manager in ("sysvinit", "systemd"):
 #for sysvinit no extra configuration is needed,
 if (init_manager is "systemd"):
@@ -209,10 +210,10 @@ postinst-delayed-t \
 self.write_config(features)
 
 #Step 2
-bitbake('core-image-full-cmdline')
+bitbake('core-image-minimal')
 
 #Step 3
-file_rootfs_created = 
os.path.join(get_bb_var('IMAGE_ROOTFS',"core-image-full-cmdline"),
+file_rootfs_created = 
os.path.join(get_bb_var('IMAGE_ROOTFS',"core-image-minimal"),
file_rootfs_name)
 found = os.path.isfile(file_rootfs_created)
 self.assertTrue(found, "File %s was not created at rootfs time 
by %s" % \
@@ -220,11 +221,11 @@ postinst-delayed-t \
 
 #Step 4
 testcommand = 'ls /etc/'+fileboot_name
-with runqemu('core-image-full-cmdline') as qemu:
+with runqemu('core-image-minimal') as qemu:
 sshargs = '-o UserKnownHostsFile=/dev/null -o 
StrictHostKeyChecking=no'
 result = runCmd('ssh %s root@%s %s' % (sshargs, qemu.ip, 
testcommand))
 self.assertEqual(result.status, 0, 'File %s was not 
created at firts boot'% fileboot_name)
 
 #Step 5
 bitbake(' %s %s -c cleanall' % (rootfs_pkg, boot_pkg))
-bitbake('core-image-full-cmdline -c cleanall')
+bitbake('core-image-minimal -c cleanall')
-- 
2.1.4

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


Re: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allow grub as EFI_PROVIDER

2017-01-30 Thread Belal, Awais
ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Tuesday, January 10, 2017 5:19 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common:  allow   grub
as  EFI_PROVIDER

ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Tuesday, January 3, 2017 5:34 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allowgrub
as  EFI_PROVIDER

ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Tuesday, December 27, 2016 5:15 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allow grub   
as  EFI_PROVIDER

Ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Friday, December 16, 2016 5:19 PM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH v2 2/2] grub-efi/live-vm-common: allow grub as
EFI_PROVIDER

This allows grub to be used as EFI_PROVIDER and
extends the grub-efi class so it can be used as is
when EFI_PROVIDER is grub.
Currently this can only be leveraged if you are
using the grub_git recipe and GRUBPLATFORM plus
EFI_PROVIDER are set correctly.

Signed-off-by: Awais Belal 
---
 meta/classes/grub-efi.bbclass   | 23 +--
 meta/classes/live-vm-common.bbclass |  2 +-
 2 files changed, 18 insertions(+), 7 deletions(-)

diff --git a/meta/classes/grub-efi.bbclass b/meta/classes/grub-efi.bbclass
index 17417ba..c847645 100644
--- a/meta/classes/grub-efi.bbclass
+++ b/meta/classes/grub-efi.bbclass
@@ -16,8 +16,8 @@
 # ${GRUB_TIMEOUT} - timeout before executing the deault label (optional)
 # ${GRUB_ROOT} - grub's root device.

-do_bootimg[depends] += "${MLPREFIX}grub-efi:do_deploy"
-do_bootdirectdisk[depends] += "${MLPREFIX}grub-efi:do_deploy"
+do_bootimg[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"
+do_bootdirectdisk[depends] += "${MLPREFIX}${EFI_PROVIDER}:do_deploy"

 GRUB_SERIAL ?= "console=ttyS0,115200"
 GRUB_CFG_VM = "${S}/grub_vm.cfg"
@@ -40,10 +40,21 @@ efi_populate() {

install -d ${DEST}${EFIDIR}

-   GRUB_IMAGE="bootia32.efi"
-   if [ "${TARGET_ARCH}" = "x86_64" ]; then
-   GRUB_IMAGE="bootx64.efi"
-   fi
+if [ "${EFI_PROVIDER}" = "grub" ]; then
+   GRUB_IMAGE="bootia32.${GRUBPLATFORM}"
+   if [ "${TARGET_ARCH}" = "x86_64" ]; then
+   GRUB_IMAGE="bootx64.${GRUBPLATFORM}"
+   elif [ "${TARGET_ARCH}" = "arm" ]; then
+grubimage = "bootarm.${GRUBPLATFORM}"
+   elif [ "${TARGET_ARCH}" = "aarch64" ]; then
+grubimage = "bootaa64.${GRUBPLATFORM}"
+fi
+else
+GRUB_IMAGE="bootia32.efi"
+   if [ "${TARGET_ARCH}" = "x86_64" ]; then
+   GRUB_IMAGE="bootx64.efi"
+fi
+fi
install -m 0644 ${DEPLOY_DIR_IMAGE}/${GRUB_IMAGE} ${DEST}${EFIDIR}
EFIPATH=$(echo "${EFIDIR}" | sed 's/\//\\/g')
printf 'fs0:%s\%s\n' "$EFIPATH" "$GRUB_IMAGE" >${DEST}/startup.nsh
diff --git a/meta/classes/live-vm-common.bbclass 
b/meta/classes/live-vm-common.bbclass
index 734697f..0af228b 100644
--- a/meta/classes/live-vm-common.bbclass
+++ b/meta/classes/live-vm-common.bbclass
@@ -13,7 +13,7 @@ def set_live_vm_vars(d, suffix):

 EFI = "${@bb.utils.contains("MACHINE_FEATURES", "efi", "1", "0", d)}"
 EFI_PROVIDER ?= "grub-efi"
-EFI_CLASS = "${@bb.utils.contains("MACHINE_FEATURES", "efi", 
"${EFI_PROVIDER}", "", d)}"
+EFI_CLASS = "${@bb.utils.contains("EFI_PROVIDER", "grub", "grub-efi", 
"${EFI_PROVIDER}", d)}"

 # Include legacy boot if MACHINE_FEATURES includes "pcbios" or if it does not
 # contain "efi". This way legacy is supported by default if neither is
--
1.9.1

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

Re: [OE-core] [PATCH v2 1/2] grub_git: extend recipe for proper target deployment

2017-01-30 Thread Belal, Awais
ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Tuesday, January 10, 2017 3:14 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 1/2] grub_git: extend recipe for proper target 
deployment

ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Tuesday, January 3, 2017 5:34 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 1/2] grub_git: extend recipe for proper target 
deployment

ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Tuesday, December 27, 2016 5:15 PM
To: openembedded-core@lists.openembedded.org
Subject: Re: [OE-core] [PATCH v2 1/2] grub_git: extend recipe for proper target 
deployment

ping!

BR,
Awais


From: openembedded-core-boun...@lists.openembedded.org 
 on behalf of Belal, Awais
Sent: Friday, December 16, 2016 5:19 PM
To: openembedded-core@lists.openembedded.org
Subject: [OE-core] [PATCH v2 1/2] grub_git: extend recipe for proper target 
deployment

This extends the grub_git recipe so it can deploy grub
on the target boot disk just like grub-efi. Mainly
this copies stuff from the grub-efi recipe and then
adjusts some bits accordingly. This would allow
using the latest and greatest versions of grub
on the target.

Signed-off-by: Awais Belal 
---
 meta/recipes-bsp/grub/grub_git.bb | 60 +++
 1 file changed, 54 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-bsp/grub/grub_git.bb 
b/meta/recipes-bsp/grub/grub_git.bb
index eb824cc..13c48c7 100644
--- a/meta/recipes-bsp/grub/grub_git.bb
+++ b/meta/recipes-bsp/grub/grub_git.bb
@@ -3,11 +3,15 @@ require grub2.inc
 DEFAULT_PREFERENCE = "-1"
 DEFAULT_PREFERENCE_arm = "1"

+DEPENDS += "grub-native"
+RDEPENDS_${PN}_class-target = "diffutils freetype"
+
 FILESEXTRAPATHS =. "${FILE_DIRNAME}/grub-git:"

 PV = "2.00+${SRCPV}"
 SRCREV = "7a5b301e3adb8e054288518a325135a1883c1c6c"
 SRC_URI = "git://git.savannah.gnu.org/grub.git \
+   file://cfg \
file://0001-Disable-mfpmath-sse-as-well-when-SSE-is-disabled.patch \
file://autogen.sh-exclude-pc.patch \
file://0001-grub.d-10_linux.in-add-oe-s-kernel-name.patch \
@@ -19,29 +23,73 @@ COMPATIBLE_HOST = 
'(x86_64.*|i.86.*|arm.*|aarch64.*)-(linux.*|freebsd.*)'
 COMPATIBLE_HOST_armv7a = 'null'
 COMPATIBLE_HOST_armv7ve = 'null'

-inherit autotools gettext texinfo
+inherit autotools gettext texinfo deploy

 # configure.ac has code to set this automagically from the target tuple
 # but the OE freeform one (core2-foo-bar-linux) don't work with that.
-
 GRUBPLATFORM_arm = "uboot"
 GRUBPLATFORM_aarch64 = "efi"
 GRUBPLATFORM ??= "pc"

+CACHED_CONFIGUREVARS += "ac_cv_path_HELP2MAN="
 EXTRA_OECONF = "--with-platform=${GRUBPLATFORM} --disable-grub-mkfont 
--program-prefix="" \
 --enable-liblzma=no --enable-device-mapper=no 
--enable-libzfs=no"
-
+EXTRA_OECONF += "${@bb.utils.contains('GRUBPLATFORM', 'efi', 
'--enable-efiemu=no', '', d)}"
 EXTRA_OECONF += "${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 
'--enable-largefile', '--disable-largefile', d)}"

-do_install_append () {
+# Determine the target arch for the grub modules
+python __anonymous () {
+import re
+target = d.getVar('TARGET_ARCH', True)
+platform = d.getVar('GRUBPLATFORM', True)
+if target == "x86_64":
+grubtarget = 'x86_64'
+grubimage = "bootx64." + platform
+elif re.match('i.86', target):
+grubtarget = 'i386'
+grubimage = "bootia32." + platform
+elif re.match('arm', target):
+grubtarget = 'arm'
+grubimage = "bootarm." + platform
+elif re.match('aarch64', target):
+grubtarget = 'arm64'
+grubimage = "bootaa64." + platform
+else:
+raise bb.parse.SkipPackage("grub is incompatible with target %s" % 
target)
+d.setVar("GRUB_TARGET", grubtarget)
+d.setVar("GRUB_IMAGE", grubimage)
+}
+
+do_install_class-native() {
+install -d ${D}${bindir}
+install -m 755 grub-mkimage ${D}${bindir}
+}
+
+do_install_append() {
 install -d ${D}${sysconfdir}/grub.d
 rm -rf ${D}${libdir}/charset.alias
 }

+GRUB_BUILDIN ?= "boot linux ext2 fat serial part_msdos part_gpt normal efi_gop 
iso9660 search"
+do_deploy() {
+# Search for the grub.cfg on the local boot media by using the
+# built in cfg file provided via this recipe
+grub-mkimage -c ../cfg -p /EFI/BOOT -d ./grub-core/ \
+   -O ${GRUB_TARGET}-${GRUBPLATFORM} 

Re: [OE-core] [PATCH v2] libtasn1: Upgrade 4.9 -> 4.10

2017-01-30 Thread Maxin B. John
Hi Ross,

>On Mon, Jan 30, 2017 at 11:59:21AM +, Burton, Ross wrote:
>>On 30 January 2017 at 11:55, Maxin B. John  wrote:
>>
>>+From b17dbb8d3c5605db3a1d82861fcaeef4636d1117 Mon Sep 17 00:00:00 2001
>>+From: "Maxin B. John" 
>>+Date: Thu, 26 Jan 2017 18:54:48 +0200
>>+Subject: [PATCH] stdint.m4: reintroduce GNULIB_OVERRIDES_WINT_T check
>>+
>>+Partially revert the gnulib commit: 5a400b3f5a1f5483dbfd75d38bdb7080218a063b
>>+to fix the build error with musl library.
>>+
>>+Upstream-Status: Inappropriate
>
>This appears to be a genuine problem with gnulib and musl, have you spoken to 
>upstream about this?

Yes, contacted the libtasn1 developers about this error last week and they have
asked me to report this to the gnulib developers. Based on that, I have sent a 
mail
to the gnulib mailing list.

>Ross

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


Re: [OE-core] [PATCH v2] libtasn1: Upgrade 4.9 -> 4.10

2017-01-30 Thread Burton, Ross
On 30 January 2017 at 11:55, Maxin B. John  wrote:

> +From b17dbb8d3c5605db3a1d82861fcaeef4636d1117 Mon Sep 17 00:00:00 2001
> +From: "Maxin B. John" 
> +Date: Thu, 26 Jan 2017 18:54:48 +0200
> +Subject: [PATCH] stdint.m4: reintroduce GNULIB_OVERRIDES_WINT_T check
> +
> +Partially revert the gnulib commit: 5a400b3f5a1f5483dbfd75d38bdb70
> 80218a063b
> +to fix the build error with musl library.
> +
> +Upstream-Status: Inappropriate
>

This appears to be a genuine problem with gnulib and musl, have you spoken
to upstream about this?

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


[OE-core] [PATCH v2] libtasn1: Upgrade 4.9 -> 4.10

2017-01-30 Thread Maxin B. John
Removed the following Backported patches:
 1. 0001-configure-don-t-add-Werror-to-build-flags.patch
 2. 0002-ASN.y-corrected-compiler-warning.patch
 3. 0003-parser_aux-corrected-potential-null-pointer-derefere.patch
 4. 0004-tools-eliminated-compiler-warnings.patch

fixed the following build error with musl
...
|  from ../../libtasn1-4.10/gl/getopt.c:28:
| ./stdint.h:89:5: error: #if with no expression
|  #if
|  ^

Signed-off-by: Maxin B. John 
---
 ...configure-don-t-add-Werror-to-build-flags.patch | 28 -
 ...reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch | 63 +++
 .../0002-ASN.y-corrected-compiler-warning.patch| 28 -
 ...corrected-potential-null-pointer-derefere.patch | 73 --
 .../0004-tools-eliminated-compiler-warnings.patch  | 56 -
 .../gnutls/{libtasn1_4.9.bb => libtasn1_4.10.bb}   |  9 +--
 6 files changed, 66 insertions(+), 191 deletions(-)
 delete mode 100644 
meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
 create mode 100644 
meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
 delete mode 100644 
meta/recipes-support/gnutls/libtasn1/0002-ASN.y-corrected-compiler-warning.patch
 delete mode 100644 
meta/recipes-support/gnutls/libtasn1/0003-parser_aux-corrected-potential-null-pointer-derefere.patch
 delete mode 100644 
meta/recipes-support/gnutls/libtasn1/0004-tools-eliminated-compiler-warnings.patch
 rename meta/recipes-support/gnutls/{libtasn1_4.9.bb => libtasn1_4.10.bb} (59%)

diff --git 
a/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
 
b/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
deleted file mode 100644
index ae64394..000
--- 
a/meta/recipes-support/gnutls/libtasn1/0001-configure-don-t-add-Werror-to-build-flags.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 908e9fa4c1172f09e0e45420a403dc25ed0a466c Mon Sep 17 00:00:00 2001
-From: Nikos Mavrogiannopoulos 
-Date: Tue, 26 Jul 2016 08:45:33 +0200
-Subject: [PATCH 1/4] configure: don't add -Werror to build flags
-

-Upstream-Status: Backport
-Signed-off-by: Khem Raj 
-
- configure.ac | 2 --
- 1 file changed, 2 deletions(-)
-
-diff --git a/configure.ac b/configure.ac
-index 7a14e04..066f5fe 100644
 a/configure.ac
-+++ b/configure.ac
-@@ -70,8 +70,6 @@ AC_ARG_ENABLE([gcc-warnings],
- )
- 
- if test "$gl_gcc_warnings" = yes; then
--  gl_WARN_ADD([-Werror], [WERROR_CFLAGS])
--
-   nw="$nw -Wsystem-headers" # Don't let system headers trigger 
warnings
-   nw="$nw -Wc++-compat" # We don't care strongly about C++ 
compilers
-   nw="$nw -Wtraditional"# Warns on #elif which we use often
--- 
-1.9.1
-
diff --git 
a/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
 
b/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
new file mode 100644
index 000..1e52d6a
--- /dev/null
+++ 
b/meta/recipes-support/gnutls/libtasn1/0001-stdint.m4-reintroduce-GNULIB_OVERRIDES_WINT_T-check.patch
@@ -0,0 +1,63 @@
+From b17dbb8d3c5605db3a1d82861fcaeef4636d1117 Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" 
+Date: Thu, 26 Jan 2017 18:54:48 +0200
+Subject: [PATCH] stdint.m4: reintroduce GNULIB_OVERRIDES_WINT_T check
+
+Partially revert the gnulib commit: 5a400b3f5a1f5483dbfd75d38bdb7080218a063b
+to fix the build error with musl library.
+
+Upstream-Status: Inappropriate
+
+Signed-off-by: Maxin B. John 
+---
+ gl/m4/stdint.m4 | 27 +++
+ 1 file changed, 27 insertions(+)
+
+diff --git a/gl/m4/stdint.m4 b/gl/m4/stdint.m4
+index 4ac854d..3dc3da1 100644
+--- a/gl/m4/stdint.m4
 b/gl/m4/stdint.m4
+@@ -355,6 +355,32 @@ int32_t i32 = INT32_C (0x7fff);
+ gl_STDINT_TYPE_PROPERTIES
+   fi
+ 
++  dnl Determine whether gnulib's  or  would, if present,
++  dnl override 'wint_t'.
++AC_CACHE_CHECK([whether wint_t is too small],
++  [gl_cv_type_wint_t_too_small],
++  [AC_COMPILE_IFELSE(
++   [AC_LANG_PROGRAM([[
++  /* Tru64 with Desktop Toolkit C has a bug:  must be included before
++ .
++ BSD/OS 4.0.1 has a bug: ,  and  must be
++ included before .  */
++  #if !(defined __GLIBC__ && !defined __UCLIBC__)
++  # include 
++  # include 
++  # include 
++  #endif
++  #include 
++  int verify[sizeof (wint_t) < sizeof (int) ? -1 : 1];
++  ]])],
++   [gl_cv_type_wint_t_too_small=no],
++   [gl_cv_type_wint_t_too_small=yes])])
++if test $gl_cv_type_wint_t_too_small = yes; then
++  GNULIB_OVERRIDES_WINT_T=1
++else
++  GNULIB_OVERRIDES_WINT_T=0
++fi
++
+   dnl The substitute stdint.h needs the substitute limit.h's 
_GL_INTEGER_WIDTH.
+   LIMITS_H=limits.h
+   

[OE-core] [PATCH][krogoth 1/2] libX11: CVE-2016-7942

2017-01-30 Thread Sona Sarmadi
The XGetImage function in X.org libX11 before 1.6.4 might allow remote X
servers to gain privileges via vectors involving image type and geometry,
which triggers out-of-bounds read operations.

References
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7942
Upstream patch
https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=8ea762f94f4c942d898fdeb590a1630c83235c17

Signed-off-by: Sona Sarmadi 
---
 .../xorg-lib/libx11/CVE-2016-7942.patch| 69 ++
 meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch 
b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch
new file mode 100644
index 000..f5b4d69
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch
@@ -0,0 +1,69 @@
+From 8ea762f94f4c942d898fdeb590a1630c83235c17 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann 
+Date: Sun, 25 Sep 2016 21:25:25 +0200
+Subject: Validation of server responses in XGetImage()
+
+Check if enough bytes were received for specified image type and
+geometry. Otherwise GetPixel and other functions could trigger an
+out of boundary read later on.
+
+CVE: CVE-2016-7942
+Upstream-Status: Backport
+
+Signed-off-by: Tobias Stoeckmann 
+Reviewed-by: Matthieu Herrb 
+Signed-off-by: Sona Sarmadi 
+
+diff --git a/src/GetImage.c b/src/GetImage.c
+index c461abc..ff32d58 100644
+--- a/src/GetImage.c
 b/src/GetImage.c
+@@ -59,6 +59,7 @@ XImage *XGetImage (
+   char *data;
+   unsigned long nbytes;
+   XImage *image;
++  int planes;
+   LockDisplay(dpy);
+   GetReq (GetImage, req);
+   /*
+@@ -91,18 +92,28 @@ XImage *XGetImage (
+   return (XImage *) NULL;
+   }
+ _XReadPad (dpy, data, nbytes);
+-if (format == XYPixmap)
+- image = XCreateImage(dpy, _XVIDtoVisual(dpy, rep.visual),
+-Ones (plane_mask &
+-  (((unsigned long)0x) >> (32 - rep.depth))),
+-format, 0, data, width, height, dpy->bitmap_pad, 0);
+-  else /* format == ZPixmap */
+-   image = XCreateImage (dpy, _XVIDtoVisual(dpy, rep.visual),
+-   rep.depth, ZPixmap, 0, data, width, height,
+-_XGetScanlinePad(dpy, (int) rep.depth), 0);
++if (format == XYPixmap) {
++  image = XCreateImage(dpy, _XVIDtoVisual(dpy, rep.visual),
++  Ones (plane_mask &
++  (((unsigned long)0x) >> (32 - rep.depth))),
++  format, 0, data, width, height, dpy->bitmap_pad, 0);
++  planes = image->depth;
++  } else { /* format == ZPixmap */
++image = XCreateImage (dpy, _XVIDtoVisual(dpy, rep.visual),
++  rep.depth, ZPixmap, 0, data, width, height,
++  _XGetScanlinePad(dpy, (int) rep.depth), 0);
++  planes = 1;
++  }
+ 
+   if (!image)
+   Xfree(data);
++  if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 ||
++  INT_MAX / image->height <= image->bytes_per_line ||
++  INT_MAX / planes <= image->height * image->bytes_per_line ||
++  nbytes < planes * image->height * image->bytes_per_line) {
++  XDestroyImage(image);
++  image = NULL;
++  }
+   UnlockDisplay(dpy);
+   SyncHandle();
+   return (image);
+-- 
+cgit v0.10.2
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb 
b/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
index 8e531c7..152ccd9 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
@@ -5,6 +5,7 @@ BBCLASSEXTEND = "native nativesdk"
 
 SRC_URI += "file://disable_tests.patch \
 file://libX11-Add-missing-NULL-check.patch \
+file://CVE-2016-7942.patch \
"
 
 SRC_URI[md5sum] = "2e36b73f8a42143142dda8129f02e4e0"
-- 
1.9.1

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


[OE-core] [PATCH][krogoth 2/2] libx11: CVE-2016-7943

2017-01-30 Thread Sona Sarmadi
The XListFonts function in X.org libX11 before 1.6.4 might allow
remote X servers to gain privileges via vectors involving length
fields, which trigger out-of-bounds write operations.

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7943
https://lists.x.org/archives/xorg-announce/2016-October/002720.html

Upstream patch:
https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=8c29f1607a31dac0911e45a0dd3d74173822b3c9

Signed-off-by: Sona Sarmadi 
---
 .../xorg-lib/libx11/CVE-2016-7943.patch| 103 +
 meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb |   1 +
 2 files changed, 104 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch 
b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch
new file mode 100644
index 000..5002423
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch
@@ -0,0 +1,103 @@
+From 8c29f1607a31dac0911e45a0dd3d74173822b3c9 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann 
+Date: Sun, 25 Sep 2016 21:22:57 +0200
+Subject: The validation of server responses avoids out of boundary accesses.
+
+v2: FontNames.c  return a NULL list whenever a single
+length field from the server is incohent.
+
+CVE: CVE-2016-7943
+Upstream-Status: Backport
+
+Signed-off-by: Tobias Stoeckmann 
+Reviewed-by: Matthieu Herrb 
+Signed-off-by: Sona Sarmadi 
+
+diff --git a/src/FontNames.c b/src/FontNames.c
+index 21dcafe..e55f338 100644
+--- a/src/FontNames.c
 b/src/FontNames.c
+@@ -66,7 +66,7 @@ int *actualCount)/* RETURN */
+ 
+ if (rep.nFonts) {
+   flist = Xmalloc (rep.nFonts * sizeof(char *));
+-  if (rep.length < (INT_MAX >> 2)) {
++  if (rep.length > 0 && rep.length < (INT_MAX >> 2)) {
+   rlen = rep.length << 2;
+   ch = Xmalloc(rlen + 1);
+   /* +1 to leave room for last null-terminator */
+@@ -93,11 +93,22 @@ int *actualCount)  /* RETURN */
+   if (ch + length < chend) {
+   flist[i] = ch + 1;  /* skip over length */
+   ch += length + 1;  /* find next length ... */
+-  length = *(unsigned char *)ch;
+-  *ch = '\0';  /* and replace with null-termination */
+-  count++;
+-  } else
+-  flist[i] = NULL;
++  if (ch <= chend) {
++  length = *(unsigned char *)ch;
++  *ch = '\0';  /* and replace with null-termination */
++  count++;
++  } else {
++Xfree(flist);
++flist = NULL;
++count = 0;
++break;
++  }
++  } else {
++Xfree(flist);
++flist = NULL;
++count = 0;
++break;
++}
+   }
+ }
+ *actualCount = count;
+diff --git a/src/ListExt.c b/src/ListExt.c
+index be6b989..0516e45 100644
+--- a/src/ListExt.c
 b/src/ListExt.c
+@@ -55,7 +55,7 @@ char **XListExtensions(
+ 
+   if (rep.nExtensions) {
+   list = Xmalloc (rep.nExtensions * sizeof (char *));
+-  if (rep.length < (INT_MAX >> 2)) {
++  if (rep.length > 0 && rep.length < (INT_MAX >> 2)) {
+   rlen = rep.length << 2;
+   ch = Xmalloc (rlen + 1);
+ /* +1 to leave room for last null-terminator */
+@@ -80,9 +80,13 @@ char **XListExtensions(
+   if (ch + length < chend) {
+   list[i] = ch+1;  /* skip over length */
+   ch += length + 1; /* find next length ... */
+-  length = *ch;
+-  *ch = '\0'; /* and replace with null-termination */
+-  count++;
++  if (ch <= chend) {
++  length = *ch;
++  *ch = '\0'; /* and replace with null-termination */
++  count++;
++  } else {
++  list[i] = NULL;
++  }
+   } else
+   list[i] = NULL;
+   }
+diff --git a/src/ModMap.c b/src/ModMap.c
+index a809aa2..49a5d08 100644
+--- a/src/ModMap.c
 b/src/ModMap.c
+@@ -42,7 +42,8 @@ XGetModifierMapping(register Display *dpy)
+ GetEmptyReq(GetModifierMapping, req);
+ (void) _XReply (dpy, (xReply *), 0, xFalse);
+ 
+-if (rep.length < (INT_MAX >> 2)) {
++if (rep.length < (INT_MAX >> 2) &&
++  (rep.length >> 1) == rep.numKeyPerModifier) {
+   nbytes = (unsigned long)rep.length << 2;
+   res = Xmalloc(sizeof (XModifierKeymap));
+   if (res)
+-- 
+cgit v0.10.2
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb 
b/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
index 152ccd9..23a7789 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
+++ 

[OE-core] [PATCH][morty 2/2] libx11: CVE-2016-7943

2017-01-30 Thread Sona Sarmadi
The XListFonts function in X.org libX11 before 1.6.4 might allow
remote X servers to gain privileges via vectors involving length
fields, which trigger out-of-bounds write operations.

References:
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7943
https://lists.x.org/archives/xorg-announce/2016-October/002720.html

Upstream patch:
https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=8c29f1607a31dac0911e45a0dd3d74173822b3c9

Signed-off-by: Sona Sarmadi 
---
 .../xorg-lib/libx11/CVE-2016-7943.patch| 103 +
 meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb |   1 +
 2 files changed, 104 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch 
b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch
new file mode 100644
index 000..5002423
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7943.patch
@@ -0,0 +1,103 @@
+From 8c29f1607a31dac0911e45a0dd3d74173822b3c9 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann 
+Date: Sun, 25 Sep 2016 21:22:57 +0200
+Subject: The validation of server responses avoids out of boundary accesses.
+
+v2: FontNames.c  return a NULL list whenever a single
+length field from the server is incohent.
+
+CVE: CVE-2016-7943
+Upstream-Status: Backport
+
+Signed-off-by: Tobias Stoeckmann 
+Reviewed-by: Matthieu Herrb 
+Signed-off-by: Sona Sarmadi 
+
+diff --git a/src/FontNames.c b/src/FontNames.c
+index 21dcafe..e55f338 100644
+--- a/src/FontNames.c
 b/src/FontNames.c
+@@ -66,7 +66,7 @@ int *actualCount)/* RETURN */
+ 
+ if (rep.nFonts) {
+   flist = Xmalloc (rep.nFonts * sizeof(char *));
+-  if (rep.length < (INT_MAX >> 2)) {
++  if (rep.length > 0 && rep.length < (INT_MAX >> 2)) {
+   rlen = rep.length << 2;
+   ch = Xmalloc(rlen + 1);
+   /* +1 to leave room for last null-terminator */
+@@ -93,11 +93,22 @@ int *actualCount)  /* RETURN */
+   if (ch + length < chend) {
+   flist[i] = ch + 1;  /* skip over length */
+   ch += length + 1;  /* find next length ... */
+-  length = *(unsigned char *)ch;
+-  *ch = '\0';  /* and replace with null-termination */
+-  count++;
+-  } else
+-  flist[i] = NULL;
++  if (ch <= chend) {
++  length = *(unsigned char *)ch;
++  *ch = '\0';  /* and replace with null-termination */
++  count++;
++  } else {
++Xfree(flist);
++flist = NULL;
++count = 0;
++break;
++  }
++  } else {
++Xfree(flist);
++flist = NULL;
++count = 0;
++break;
++}
+   }
+ }
+ *actualCount = count;
+diff --git a/src/ListExt.c b/src/ListExt.c
+index be6b989..0516e45 100644
+--- a/src/ListExt.c
 b/src/ListExt.c
+@@ -55,7 +55,7 @@ char **XListExtensions(
+ 
+   if (rep.nExtensions) {
+   list = Xmalloc (rep.nExtensions * sizeof (char *));
+-  if (rep.length < (INT_MAX >> 2)) {
++  if (rep.length > 0 && rep.length < (INT_MAX >> 2)) {
+   rlen = rep.length << 2;
+   ch = Xmalloc (rlen + 1);
+ /* +1 to leave room for last null-terminator */
+@@ -80,9 +80,13 @@ char **XListExtensions(
+   if (ch + length < chend) {
+   list[i] = ch+1;  /* skip over length */
+   ch += length + 1; /* find next length ... */
+-  length = *ch;
+-  *ch = '\0'; /* and replace with null-termination */
+-  count++;
++  if (ch <= chend) {
++  length = *ch;
++  *ch = '\0'; /* and replace with null-termination */
++  count++;
++  } else {
++  list[i] = NULL;
++  }
+   } else
+   list[i] = NULL;
+   }
+diff --git a/src/ModMap.c b/src/ModMap.c
+index a809aa2..49a5d08 100644
+--- a/src/ModMap.c
 b/src/ModMap.c
+@@ -42,7 +42,8 @@ XGetModifierMapping(register Display *dpy)
+ GetEmptyReq(GetModifierMapping, req);
+ (void) _XReply (dpy, (xReply *), 0, xFalse);
+ 
+-if (rep.length < (INT_MAX >> 2)) {
++if (rep.length < (INT_MAX >> 2) &&
++  (rep.length >> 1) == rep.numKeyPerModifier) {
+   nbytes = (unsigned long)rep.length << 2;
+   res = Xmalloc(sizeof (XModifierKeymap));
+   if (res)
+-- 
+cgit v0.10.2
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb 
b/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
index 152ccd9..23a7789 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
+++ 

[OE-core] [PATCH][morty 1/2] libX11: CVE-2016-7942

2017-01-30 Thread Sona Sarmadi
The XGetImage function in X.org libX11 before 1.6.4 might allow remote X
servers to gain privileges via vectors involving image type and geometry,
which triggers out-of-bounds read operations.

References
https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-2016-7942
Upstream patch
https://cgit.freedesktop.org/xorg/lib/libX11/commit/?id=8ea762f94f4c942d898fdeb590a1630c83235c17

Signed-off-by: Sona Sarmadi 
---
 .../xorg-lib/libx11/CVE-2016-7942.patch| 69 ++
 meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb |  1 +
 2 files changed, 70 insertions(+)
 create mode 100644 meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch

diff --git a/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch 
b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch
new file mode 100644
index 000..f5b4d69
--- /dev/null
+++ b/meta/recipes-graphics/xorg-lib/libx11/CVE-2016-7942.patch
@@ -0,0 +1,69 @@
+From 8ea762f94f4c942d898fdeb590a1630c83235c17 Mon Sep 17 00:00:00 2001
+From: Tobias Stoeckmann 
+Date: Sun, 25 Sep 2016 21:25:25 +0200
+Subject: Validation of server responses in XGetImage()
+
+Check if enough bytes were received for specified image type and
+geometry. Otherwise GetPixel and other functions could trigger an
+out of boundary read later on.
+
+CVE: CVE-2016-7942
+Upstream-Status: Backport
+
+Signed-off-by: Tobias Stoeckmann 
+Reviewed-by: Matthieu Herrb 
+Signed-off-by: Sona Sarmadi 
+
+diff --git a/src/GetImage.c b/src/GetImage.c
+index c461abc..ff32d58 100644
+--- a/src/GetImage.c
 b/src/GetImage.c
+@@ -59,6 +59,7 @@ XImage *XGetImage (
+   char *data;
+   unsigned long nbytes;
+   XImage *image;
++  int planes;
+   LockDisplay(dpy);
+   GetReq (GetImage, req);
+   /*
+@@ -91,18 +92,28 @@ XImage *XGetImage (
+   return (XImage *) NULL;
+   }
+ _XReadPad (dpy, data, nbytes);
+-if (format == XYPixmap)
+- image = XCreateImage(dpy, _XVIDtoVisual(dpy, rep.visual),
+-Ones (plane_mask &
+-  (((unsigned long)0x) >> (32 - rep.depth))),
+-format, 0, data, width, height, dpy->bitmap_pad, 0);
+-  else /* format == ZPixmap */
+-   image = XCreateImage (dpy, _XVIDtoVisual(dpy, rep.visual),
+-   rep.depth, ZPixmap, 0, data, width, height,
+-_XGetScanlinePad(dpy, (int) rep.depth), 0);
++if (format == XYPixmap) {
++  image = XCreateImage(dpy, _XVIDtoVisual(dpy, rep.visual),
++  Ones (plane_mask &
++  (((unsigned long)0x) >> (32 - rep.depth))),
++  format, 0, data, width, height, dpy->bitmap_pad, 0);
++  planes = image->depth;
++  } else { /* format == ZPixmap */
++image = XCreateImage (dpy, _XVIDtoVisual(dpy, rep.visual),
++  rep.depth, ZPixmap, 0, data, width, height,
++  _XGetScanlinePad(dpy, (int) rep.depth), 0);
++  planes = 1;
++  }
+ 
+   if (!image)
+   Xfree(data);
++  if (planes < 1 || image->height < 1 || image->bytes_per_line < 1 ||
++  INT_MAX / image->height <= image->bytes_per_line ||
++  INT_MAX / planes <= image->height * image->bytes_per_line ||
++  nbytes < planes * image->height * image->bytes_per_line) {
++  XDestroyImage(image);
++  image = NULL;
++  }
+   UnlockDisplay(dpy);
+   SyncHandle();
+   return (image);
+-- 
+cgit v0.10.2
+
diff --git a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb 
b/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
index 8e531c7..152ccd9 100644
--- a/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
+++ b/meta/recipes-graphics/xorg-lib/libx11_1.6.3.bb
@@ -5,6 +5,7 @@ BBCLASSEXTEND = "native nativesdk"
 
 SRC_URI += "file://disable_tests.patch \
 file://libX11-Add-missing-NULL-check.patch \
+file://CVE-2016-7942.patch \
"
 
 SRC_URI[md5sum] = "2e36b73f8a42143142dda8129f02e4e0"
-- 
1.9.1

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


Re: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-wic.bbclass

2017-01-30 Thread Ola x Nilsson
Please name the class image_wic.bbclass instead.

As dashes are not allowed in function names, you cannot use 
the image_wic_do_write_wks_template pattern of function 
names if you use a class name with a dash in it.

-- 
Ola x Nilsson

> -Original Message-
> From: openembedded-core-boun...@lists.openembedded.org
> [mailto:openembedded-core-boun...@lists.openembedded.org] On Behalf
> Of Ed Bartosh
> Sent: den 27 januari 2017 21:20
> To: openembedded-core@lists.openembedded.org
> Subject: [OE-core] [PATCH v3 01/11] image-wic: move wic code to image-
> wic.bbclass
> 
> There is a lot of wic code in image.bbclass and image_types.bbclass Having all
> code separated in one file should make it more readable and easier to
> maintain.
> 
> Signed-off-by: Ed Bartosh 
> ---
>  meta/classes/image-wic.bbclass   | 120
> +++
>  meta/classes/image.bbclass   |  25 +---
>  meta/classes/image_types.bbclass |  95 ---
>  3 files changed, 122 insertions(+), 118 deletions(-)  create mode 100644
> meta/classes/image-wic.bbclass
> 
> diff --git a/meta/classes/image-wic.bbclass b/meta/classes/image-
> wic.bbclass new file mode 100644 index 000..2acfd65
> --- /dev/null
> +++ b/meta/classes/image-wic.bbclass
> @@ -0,0 +1,120 @@
> +# The WICVARS variable is used to define list of bitbake variables used
> +in wic code # variables from this list is written to .env file
> +WICVARS ?= "\
> +   BBLAYERS IMGDEPLOYDIR DEPLOY_DIR_IMAGE FAKEROOTCMD
> HDDDIR IMAGE_BASENAME IMAGE_BOOT_FILES \
> +   IMAGE_LINK_NAME IMAGE_ROOTFS INITRAMFS_FSTYPES INITRD
> ISODIR MACHINE_ARCH RECIPE_SYSROOT_NATIVE \
> +   ROOTFS_SIZE STAGING_DATADIR STAGING_DIR STAGING_LIBDIR
> TARGET_SYS"
> +
> +WKS_FILE ??= "${IMAGE_BASENAME}.${MACHINE}.wks"
> +WKS_FILES ?= "${WKS_FILE} ${IMAGE_BASENAME}.wks"
> +WKS_SEARCH_PATH ?= "${THISDIR}:${@':'.join('%s/wic' % p for p in
> '${BBPATH}'.split(':'))}:${@':'.join('%s/scripts/lib/wic/canned-wks' % l for 
> l in
> '${BBPATH}:${COREBASE}'.split(':'))}"
> +WKS_FULL_PATH = "${@wks_search('${WKS_FILES}'.split(),
> '${WKS_SEARCH_PATH}') or ''}"
> +
> +def wks_search(files, search_path):
> +for f in files:
> +if os.path.isabs(f):
> +if os.path.exists(f):
> +return f
> +else:
> +searched = bb.utils.which(search_path, f)
> +if searched:
> +return searched
> +
> +WIC_CREATE_EXTRA_ARGS ?= ""
> +
> +IMAGE_CMD_wic () {
> + out="${IMGDEPLOYDIR}/${IMAGE_NAME}"
> + wks="${WKS_FULL_PATH}"
> + if [ -z "$wks" ]; then
> + bbfatal "No kickstart files from WKS_FILES were
> found: ${WKS_FILES}. Please set WKS_FILE or WKS_FILES appropriately."
> + fi
> +
> + BUILDDIR="${TOPDIR}" wic create "$wks" --vars
> "${STAGING_DIR}/${MACHINE}/imgdata/" -e "${IMAGE_BASENAME}" -o
> "$out/" ${WIC_CREATE_EXTRA_ARGS}
> + mv "$out/$(basename "${wks%.wks}")"*.direct
> "$out${IMAGE_NAME_SUFFIX}.wic"
> + rm -rf "$out/"
> +}
> +IMAGE_CMD_wic[vardepsexclude] = "WKS_FULL_PATH WKS_FILES"
> +
> +# Rebuild when the wks file or vars in WICVARS change USING_WIC =
> +"${@bb.utils.contains_any('IMAGE_FSTYPES', 'wic ' + ' '.join('wic.%s' % c for
> c in '${CONVERSIONTYPES}'.split()), '1', '', d)}"
> +WKS_FILE_CHECKSUM = "${@'${WKS_FULL_PATH}:%s' %
> os.path.exists('${WKS_FULL_PATH}') if '${USING_WIC}' else ''}"
> +do_image_wic[file-checksums] += "${WKS_FILE_CHECKSUM}"
> +do_image_wic[depends] += "wic-tools:do_build"
> +
> +python () {
> +if d.getVar('USING_WIC') and 'do_bootimg' in d:
> +bb.build.addtask('do_image_wic', '', 'do_bootimg', d) }
> +
> +python do_write_wks_template () {
> +"""Write out expanded template contents to WKS_FULL_PATH."""
> +import re
> +
> +template_body = d.getVar('_WKS_TEMPLATE')
> +
> +# Remove any remnant variable references left behind by the expansion
> +# due to undefined variables
> +expand_var_regexp = re.compile(r"\${[^{}@\n\t :]+}")
> +while True:
> +new_body = re.sub(expand_var_regexp, '', template_body)
> +if new_body == template_body:
> +break
> +else:
> +template_body = new_body
> +
> +wks_file = d.getVar('WKS_FULL_PATH')
> +with open(wks_file, 'w') as f:
> +f.write(template_body)
> +}
> +
> +python () {
> +if d.getVar('USING_WIC'):
> +wks_file_u = d.getVar('WKS_FULL_PATH', False)
> +wks_file = d.expand(wks_file_u)
> +base, ext = os.path.splitext(wks_file)
> +if ext == '.in' and os.path.exists(wks_file):
> +wks_out_file = os.path.join(d.getVar('WORKDIR'),
> os.path.basename(base))
> +d.setVar('WKS_FULL_PATH', wks_out_file)
> +d.setVar('WKS_TEMPLATE_PATH', wks_file_u)
> +d.setVar('WKS_FILE_CHECKSUM', '${WKS_TEMPLATE_PATH}:True')
> +
> +# We need to re-parse each time the file changes, and 

[OE-core] [PATCH 3/3] libgpg-error_1.25.bb: Don't replace the syscfg header for mingw32

2017-01-30 Thread Nathan Rossi
For mingw32 targets do not attempt to replace the
syscfg/lock-obj-pub.*.h as for mingw32 there are no arch specific
headers that are included in the libgpg-error source.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-support/libgpg-error/libgpg-error_1.25.bb | 11 ---
 1 file changed, 8 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb 
b/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb
index 9d402ffbb6..1fb6067eff 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb
@@ -25,7 +25,10 @@ inherit autotools binconfig-disabled pkgconfig gettext
 CPPFLAGS += "-P"
 do_compile_prepend() {
TARGET_FILE=linux-gnu
-   if [ ${TARGET_OS} != "linux" ]; then
+   if [ ${TARGET_OS} = "mingw32" ]; then
+   # There are no arch specific syscfg files for mingw32
+   TARGET_FILE=
+   elif [ ${TARGET_OS} != "linux" ]; then
TARGET_FILE=${TARGET_OS}
fi
 
@@ -40,8 +43,10 @@ do_compile_prepend() {
  *)  TUPLE=${TARGET_ARCH}-unknown-linux-gnu ;; 
esac
 
-   cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
- ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+   if [ -n "$TARGET_FILE" ]; then
+   cp ${S}/src/syscfg/lock-obj-pub.$TUPLE.h \
+   ${S}/src/syscfg/lock-obj-pub.$TARGET_FILE.h
+   fi
 }
 
 do_install_append() {
-- 
2.11.0

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


[OE-core] [PATCH 2/3] package.bbclass: Add SHLIB detection support for mingw targets

2017-01-30 Thread Nathan Rossi
Add support to detect dll files as shared objects as well as process
Windows .dll and .exe files to determine the runtime libraries
dependencies.

This implementation is sufficient to detect and map runtime library
dependencies between packages. And does not implement any version naming
conventions that might apply for .dll files (e.g. lib*-x.dll).

Signed-off-by: Nathan Rossi 
---
 meta/classes/package.bbclass | 21 +
 1 file changed, 21 insertions(+)

diff --git a/meta/classes/package.bbclass b/meta/classes/package.bbclass
index ac2d71cfa4..fe9f7f2eaf 100644
--- a/meta/classes/package.bbclass
+++ b/meta/classes/package.bbclass
@@ -1613,6 +1613,25 @@ python package_do_shlibs() {
 if name and name not in needed[pkg]:
  needed[pkg].append((name, file, []))
 
+def mingw_dll(file, needed, sonames, renames, pkgver):
+if not os.path.exists(file):
+return
+
+if file.endswith(".dll"):
+# assume all dlls are shared objects provided by the package
+sonames.append((os.path.basename(file), 
os.path.dirname(file).replace(pkgdest + "/" + pkg, ''), pkgver))
+
+if (file.endswith(".dll") or file.endswith(".exe")):
+# use objdump to search for "DLL Name: .*\.dll"
+p = sub.Popen([d.expand("${HOST_PREFIX}objdump"), "-p", file], 
stdout = sub.PIPE, stderr= sub.PIPE)
+out, err = p.communicate()
+# process the output, grabbing all .dll names
+if p.returncode == 0:
+for m in re.finditer("DLL Name: (.*?\.dll)$", out.decode(), 
re.MULTILINE | re.IGNORECASE):
+dllname = m.group(1)
+if dllname:
+needed[pkg].append((dllname, file, []))
+
 if d.getVar('PACKAGE_SNAP_LIB_SYMLINKS') == "1":
 snap_symlinks = True
 else:
@@ -1647,6 +1666,8 @@ python package_do_shlibs() {
 continue
 if targetos == "darwin" or targetos == "darwin8":
 darwin_so(file, needed, sonames, renames, pkgver)
+elif targetos.startswith("mingw"):
+mingw_dll(file, needed, sonames, renames, pkgver)
 elif os.access(file, os.X_OK) or lib_re.match(file):
 ldconfig = linux_so(file, needed, sonames, renames, pkgver)
 needs_ldconfig = needs_ldconfig or ldconfig
-- 
2.11.0

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


[OE-core] [PATCH 1/3] update-alternatives.bbclass: Disable for mingw32 targets

2017-01-30 Thread Nathan Rossi
When building for mingw32 targets (e.g. nativesdk cross compiling for
windows), disable the dependency on update-alternatives as the Windows
platform does not support symlinks or package management.

This avoids the complex (partly non-buildable for mingw32) dependency
chain virtual/update-alternatives -> opkg-utils -> python -> ...

Signed-off-by: Nathan Rossi 
---
 meta/classes/update-alternatives.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/update-alternatives.bbclass 
b/meta/classes/update-alternatives.bbclass
index ca7fe43417..4bba76c3ba 100644
--- a/meta/classes/update-alternatives.bbclass
+++ b/meta/classes/update-alternatives.bbclass
@@ -96,6 +96,10 @@ python __anonymous() {
bb.data.inherits_class('cross-canadian', d):
 return
 
+# Disable when targeting mingw32 (no target support)
+if d.getVar("TARGET_OS") == "mingw32":
+return
+
 # compute special vardeps
 gen_updatealternativesvardeps(d)
 
-- 
2.11.0

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


[OE-core] [PATCH 0/3] MinGW specific improvements/fixes

2017-01-30 Thread Nathan Rossi
This series contains a few patches that improve/fix MinGW specific parts
that cannot be easily implemented outside of oe-core/meta.

The first patch disables update-alternatives when TARGET_OS == mingw32,
this is due to Windows not supporting symlinks in the same way as
expected by update-alternatives. This also avoids a dependency chain on
opkg-utils/python.

The second patch adds support to the package bbclass to detect shared
objects (.dll's) and executables use of shared objects. This
implementation allows for auto-detection of packages contents and their
dependencies and allows for the build to generate full sets of
executables with shared object dependencies when targeting mingw32.

The third patch fixes the libgpg-error configure task, preventing it
from clobbering the syscfg for mingw32 targets. This is not easily
overridden from a bbappend.

Nathan Rossi (3):
  update-alternatives.bbclass: Disable for mingw32 targets
  package.bbclass: Add SHLIB detection support for mingw targets
  libgpg-error_1.25.bb: Don't replace the syscfg header for mingw32

 meta/classes/package.bbclass| 21 +
 meta/classes/update-alternatives.bbclass|  4 
 .../libgpg-error/libgpg-error_1.25.bb   | 11 ---
 3 files changed, 33 insertions(+), 3 deletions(-)

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


[OE-core] [PATCH 4/4] qemu: Move recipe version specific patches and features to recipe

2017-01-30 Thread Nathan Rossi
Move all the version specific patches, overrides and configuration that
are in qemu.inc to the versioned QEMU recipe.

This includes moving patches that target the versioned recipe, ptest
configuration (which is not available in QEMU by default) and the
installing of the powerpc_rom.bin.  All these patches/files are also
only located in the FILESEXTRAPATHS that is valid from the recipe file
and not from qemu.inc itself.

The purpose of this change is to make the qemu.inc re-usable for
multiple versions of QEMU as well as forks and recipes that intend to
provide custom patches.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-devtools/qemu/qemu.inc  | 31 +
 meta/recipes-devtools/qemu/qemu_2.7.1.bb | 34 ++--
 2 files changed, 33 insertions(+), 32 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 0a6daf7bc8..3220a56175 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -3,30 +3,14 @@ HOMEPAGE = "http://qemu.org;
 LICENSE = "GPLv2 & LGPLv2.1"
 DEPENDS = "glib-2.0 zlib pixman"
 RDEPENDS_${PN}_class-target += "bash"
-RDEPENDS_${PN}-ptest = "bash make"
 
 require qemu-targets.inc
-inherit autotools ptest bluetooth
+inherit autotools bluetooth
 BBCLASSEXTEND = "native nativesdk"
 
 # QEMU_TARGETS is overridable variable
 QEMU_TARGETS ?= "arm aarch64 i386 mips mipsel mips64 mips64el ppc sh4 x86_64"
 
-SRC_URI = "\
-file://powerpc_rom.bin \
-file://disable-grabs.patch \
-file://exclude-some-arm-EABI-obsolete-syscalls.patch \
-file://wacom.patch \
-file://add-ptest-in-makefile.patch \
-file://run-ptest \
-file://0001-target-mips-add-24KEc-CPU-definition.patch \
-"
-
-SRC_URI_append_class-native = "\
-file://fix-libcap-header-issue-on-some-distro.patch \
-file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
-"
-
 EXTRA_OECONF = " \
 --prefix=${prefix} \
 --bindir=${bindir} \
@@ -70,22 +54,9 @@ do_configure() {
 test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x 
${S}/target-i386/beginend_funcs.sh
 }
 
-do_compile_ptest() {
-   make buildtest-TESTS
-}
-
-do_install_ptest() {
-   cp -rL ${B}/tests ${D}${PTEST_PATH}
-   find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm 
-rf {}
-
-   cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
-}
-
 do_install () {
export STRIP="true"
autotools_do_install
-   install -d ${D}${datadir}/qemu
-   install -m 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
 }
 
 # The following fragment will create a wrapper for qemu-mips user emulation
diff --git a/meta/recipes-devtools/qemu/qemu_2.7.1.bb 
b/meta/recipes-devtools/qemu/qemu_2.7.1.bb
index 8180c5f75a..4026ef159e 100644
--- a/meta/recipes-devtools/qemu/qemu_2.7.1.bb
+++ b/meta/recipes-devtools/qemu/qemu_2.7.1.bb
@@ -1,9 +1,21 @@
 require qemu.inc
 
+inherit ptest
+
+RDEPENDS_${PN}-ptest = "bash make"
+
 LIC_FILES_CHKSUM = "file://COPYING;md5=441c28d2cf86e15a37fa47e15a72fbac \
 
file://COPYING.LIB;endline=24;md5=c04def7ae38850e7d3ef548588159913"
 
-SRC_URI += "file://configure-fix-Darwin-target-detection.patch \
+SRC_URI += " \
+file://powerpc_rom.bin \
+file://disable-grabs.patch \
+file://exclude-some-arm-EABI-obsolete-syscalls.patch \
+file://wacom.patch \
+file://add-ptest-in-makefile.patch \
+file://run-ptest \
+file://0001-target-mips-add-24KEc-CPU-definition.patch \
+file://configure-fix-Darwin-target-detection.patch \
 file://qemu-enlarge-env-entry-size.patch \
 file://Qemu-Arm-versatilepb-Add-memory-size-checking.patch \
 file://no-valgrind.patch \
@@ -11,7 +23,12 @@ SRC_URI += 
"file://configure-fix-Darwin-target-detection.patch \
 file://qemu-2.5.0-cflags.patch \
 file://0003-fix-CVE-2016-7908.patch \
 file://0004-fix-CVE-2016-7909.patch \
-"
+"
+
+SRC_URI_append_class-native = " \
+file://fix-libcap-header-issue-on-some-distro.patch \
+file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
+"
 
 SRC_URI =+ "http://wiki.qemu-project.org/download/${BP}.tar.bz2;
 
@@ -24,4 +41,17 @@ COMPATIBLE_HOST_mipsarchn64 = "null"
 do_install_append() {
 # Prevent QA warnings about installed ${localstatedir}/run
 if [ -d ${D}${localstatedir}/run ]; then rmdir ${D}${localstatedir}/run; fi
+install -Dm 0755 ${WORKDIR}/powerpc_rom.bin ${D}${datadir}/qemu
+}
+
+do_compile_ptest() {
+   make buildtest-TESTS
 }
+
+do_install_ptest() {
+   cp -rL ${B}/tests ${D}${PTEST_PATH}
+   find ${D}${PTEST_PATH}/tests -type f -name "*.[Sshcod]" | xargs -i rm 
-rf {}
+
+   cp ${S}/tests/Makefile.include ${D}${PTEST_PATH}/tests
+}
+
-- 
2.11.0

-- 
___

[OE-core] [PATCH 3/4] qemu: Convert KVMOPTS to PACKAGECONFIG

2017-01-30 Thread Nathan Rossi
Move the KVMOPTS configuration checks and option setting to a
PACKAGECONFIG option.

This also changes the checking of KVM support on the host build machine
so that it is processed as a PACKAGECONFIG _remove for class-native
only. The darwin/mingw32 overrides are kept and applied as _remove
overrides.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-devtools/qemu/qemu.inc | 27 ---
 1 file changed, 12 insertions(+), 15 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index 522f452810..0a6daf7bc8 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -65,19 +65,8 @@ do_configure_prepend_class-native() {
"${S}"/Makefile "${S}"/Makefile.target
 }
 
-KVMENABLE = "--enable-kvm"
-KVMENABLE_darwin = "--disable-kvm"
-KVMENABLE_mingw32 = "--disable-kvm"
-
 do_configure() {
-# Handle distros such as CentOS 5 32-bit that do not have kvm support
-KVMOPTS="--disable-kvm"
-if [ "${PN}" != "qemu-native" -a "${PN}" != "nativesdk-qemu" ] \
-   || [ -f /usr/include/linux/kvm.h ] ; then
-   KVMOPTS="${KVMENABLE}"
-fi
-
-${S}/configure ${EXTRA_OECONF} $KVMOPTS
+${S}/configure ${EXTRA_OECONF}
 test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x 
${S}/target-i386/beginend_funcs.sh
 }
 
@@ -114,12 +103,19 @@ do_install_append() {
 # END of qemu-mips workaround
 
 PACKAGECONFIG ??= " \
-   fdt sdl \
+   fdt sdl kvm \
${@bb.utils.contains('DISTRO_FEATURES', 'alsa', 'alsa', '', d)} \
${@bb.utils.contains('DISTRO_FEATURES', 'xen', 'xen', '', d)} \
"
-PACKAGECONFIG_class-native ??= "fdt alsa uuid"
-PACKAGECONFIG_class-nativesdk ??= "fdt sdl"
+PACKAGECONFIG_class-native ??= "fdt alsa uuid kvm"
+PACKAGECONFIG_class-nativesdk ??= "fdt sdl kvm"
+
+# Handle distros such as CentOS 5 32-bit that do not have kvm support
+PACKAGECONFIG_class-native_remove = "${@'kvm' if not 
os.path.exists('/usr/include/linux/kvm.h') else ''}"
+
+# Disable kvm on targets that do not support it
+PACKAGECONFIG_remove_darwin = "kvm"
+PACKAGECONFIG_remove_mingw32 = "kvm"
 
 PACKAGECONFIG[sdl] = "--enable-sdl,--disable-sdl,libsdl"
 PACKAGECONFIG[virtfs] = "--enable-virtfs --enable-attr,--disable-virtfs,libcap 
attr,"
@@ -148,5 +144,6 @@ PACKAGECONFIG[gnutls] = 
"--enable-gnutls,--disable-gnutls,gnutls"
 PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
 PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
 PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
+PACKAGECONFIG[kvm] = "--enable-kvm,--disable-kvm"
 
 INSANE_SKIP_${PN} = "arch"
-- 
2.11.0

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


[OE-core] [PATCH 2/4] qemu: Consolidate EXTRA_OECONF

2017-01-30 Thread Nathan Rossi
Consolidate the configure options into the EXTRA_OECONF variable,
including merging any native(sdk) specific options.

This consolidation also makes the use of 'system' pixman in the
nativesdk case, this is desirable as the QEMU internal pixman may not be
available (using QEMU git as opposed to tarball) and pixman is already
in DEPENDS. Additionally the QEMU configure recommends to use the system
pixman if available.

Additionally move the options specified in the do_configure into the
EXTRA_OECONF variable. And flesh out all the target directories.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-devtools/qemu/qemu.inc | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index b9912de10b..522f452810 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -27,9 +27,24 @@ SRC_URI_append_class-native = "\
 file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
 "
 
-EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror  
--with-system-pixman --extra-cflags='${CFLAGS}'"
-
-EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} 
--disable-werror"
+EXTRA_OECONF = " \
+--prefix=${prefix} \
+--bindir=${bindir} \
+--includedir=${includedir} \
+--libdir=${libdir} \
+--mandir=${mandir} \
+--datadir=${datadir} \
+--docdir=${docdir}/${BPN} \
+--sysconfdir=${sysconfdir} \
+--libexecdir=${libexecdir} \
+--localstatedir=${localstatedir} \
+--with-confsuffix=/${BPN} \
+--disable-strip \
+--disable-werror \
+--target-list=${@get_qemu_target_list(d)} \
+--with-system-pixman \
+--extra-cflags='${CFLAGS}' \
+"
 
 EXTRA_OEMAKE_append_class-native = " LD='${LD}' AR='${AR}' 
OBJCOPY='${OBJCOPY}' LDFLAGS='${LDFLAGS}'"
 
@@ -62,7 +77,7 @@ do_configure() {
KVMOPTS="${KVMENABLE}"
 fi
 
-${S}/configure --prefix=${prefix} --sysconfdir=${sysconfdir} 
--libexecdir=${libexecdir} --localstatedir=${localstatedir} --disable-strip 
${EXTRA_OECONF} $KVMOPTS
+${S}/configure ${EXTRA_OECONF} $KVMOPTS
 test ! -e ${S}/target-i386/beginend_funcs.sh || chmod a+x 
${S}/target-i386/beginend_funcs.sh
 }
 
-- 
2.11.0

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


[OE-core] [PATCH 1/4] qemu: Improve and add PACKAGECONFIG options

2017-01-30 Thread Nathan Rossi
Move the '--disable-bluez' and '--disable-iscsi' options to
PACKAGECONFIG. And added the ${BLUEZ} dependency.

Fix up the 'gcrypt' option to depend on 'libgcrypt' instead of gcrypt.
This is the expected dependency as noted in the QEMU configure help.

Handle the '--audio-drv-list' option inside the PACKAGECONFIG[alsa]
args. The previous setting uses a ',' to denote the options for the arg
however a space inside quotes is also acceptable and allows the arg to
be used into the PACKAGECONFIG flag.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-devtools/qemu/qemu.inc | 12 ++--
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/meta/recipes-devtools/qemu/qemu.inc 
b/meta/recipes-devtools/qemu/qemu.inc
index ac5fcac83e..b9912de10b 100644
--- a/meta/recipes-devtools/qemu/qemu.inc
+++ b/meta/recipes-devtools/qemu/qemu.inc
@@ -6,7 +6,7 @@ RDEPENDS_${PN}_class-target += "bash"
 RDEPENDS_${PN}-ptest = "bash make"
 
 require qemu-targets.inc
-inherit autotools ptest
+inherit autotools ptest bluetooth
 BBCLASSEXTEND = "native nativesdk"
 
 # QEMU_TARGETS is overridable variable
@@ -27,7 +27,7 @@ SRC_URI_append_class-native = "\
 file://cpus.c-qemu_cpu_kick_thread_debugging.patch \
 "
 
-EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror  
--disable-bluez --disable-libiscsi --with-system-pixman 
--extra-cflags='${CFLAGS}'"
+EXTRA_OECONF += "--target-list=${@get_qemu_target_list(d)} --disable-werror  
--with-system-pixman --extra-cflags='${CFLAGS}'"
 
 EXTRA_OECONF_class-nativesdk = "--target-list=${@get_qemu_target_list(d)} 
--disable-werror"
 
@@ -121,17 +121,17 @@ PACKAGECONFIG[curses] = 
"--enable-curses,--disable-curses,ncurses,"
 PACKAGECONFIG[gtk+] = "--enable-gtk --with-gtkabi=3.0 
--enable-vte,--disable-gtk --disable-vte,gtk+3 vte"
 PACKAGECONFIG[libcap-ng] = "--enable-cap-ng,--disable-cap-ng,libcap-ng,"
 PACKAGECONFIG[ssh2] = "--enable-libssh2,--disable-libssh2,libssh2,"
-PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,gcrypt,"
+PACKAGECONFIG[gcrypt] = "--enable-gcrypt,--disable-gcrypt,libgcrypt,"
 PACKAGECONFIG[nettle] = "--enable-nettle,--disable-nettle,nettle"
 PACKAGECONFIG[libusb] = "--enable-libusb,--disable-libusb,libusb1"
 PACKAGECONFIG[fdt] = "--enable-fdt,--disable-fdt,dtc"
-PACKAGECONFIG[alsa] = ",,alsa-lib"
+PACKAGECONFIG[alsa] = "--audio-drv-list='oss alsa',,alsa-lib"
 PACKAGECONFIG[glx] = "--enable-opengl,--disable-opengl,mesa"
 PACKAGECONFIG[lzo] = "--enable-lzo,--disable-lzo,lzo"
 PACKAGECONFIG[numa] = "--enable-numa,--disable-numa,numactl"
 PACKAGECONFIG[gnutls] = "--enable-gnutls,--disable-gnutls,gnutls"
 PACKAGECONFIG[bzip2] = "--enable-bzip2,--disable-bzip2,bzip2"
-
-EXTRA_OECONF += "${@bb.utils.contains('PACKAGECONFIG', 'alsa', 
'--audio-drv-list=oss,alsa', '', d)}"
+PACKAGECONFIG[bluez] = "--enable-bluez,--disable-bluez,${BLUEZ}"
+PACKAGECONFIG[libiscsi] = "--enable-libiscsi,--disable-libiscsi"
 
 INSANE_SKIP_${PN} = "arch"
-- 
2.11.0

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


[OE-core] [PATCH 0/4] Make qemu.inc useful for generic use

2017-01-30 Thread Nathan Rossi
This series is intended to make the qemu.inc more generic and useful for
other recipes to use. This is achieved by moving version specific
patches, task steps and ptest support into the qemu_*.bb recipe,
additionally improvements are made to the PACKAGECONFIG options and
changes to the configure step are made to allow for the configuration to
be more complete as well as easier to override/modify.

Nathan Rossi (4):
  qemu: Improve and add PACKAGECONFIG options
  qemu: Consolidate EXTRA_OECONF
  qemu: Convert KVMOPTS to PACKAGECONFIG
  qemu: Move recipe version specific patches and features to recipe

 meta/recipes-devtools/qemu/qemu.inc  | 85 +---
 meta/recipes-devtools/qemu/qemu_2.7.1.bb | 34 -
 2 files changed, 66 insertions(+), 53 deletions(-)

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


[OE-core] [PATCH 4/4] libgcrypt.inc: Enable use of binconfig

2017-01-30 Thread Nathan Rossi
Due to pkg-config support for libgcrypt being un-available for upstream
libgcrypt, some packages that depend on libgcrypt rely on the use of
libgcrypt-config (e.g. QEMU).

Signed-off-by: Nathan Rossi 
---
 meta/recipes-support/libgcrypt/libgcrypt.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc 
b/meta/recipes-support/libgcrypt/libgcrypt.inc
index 84c1cc018b..a1a9066097 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -24,7 +24,7 @@ SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
 
 BINCONFIG = "${bindir}/libgcrypt-config"
 
-inherit autotools texinfo binconfig-disabled pkgconfig
+inherit autotools texinfo binconfig pkgconfig
 
 EXTRA_OECONF = "--disable-asm"
 
-- 
2.11.0

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


[OE-core] [PATCH 3/4] libgcrypt.inc: Add PACKAGECONFIG for 'capabilities'

2017-01-30 Thread Nathan Rossi
Add PACKAGECONFIG options for 'capabilities' which enables the libcap
dependency.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-support/libgcrypt/libgcrypt.inc | 7 +--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc 
b/meta/recipes-support/libgcrypt/libgcrypt.inc
index c8a48623b4..84c1cc018b 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -12,7 +12,7 @@ LICENSE_dumpsexp-dev = "GPLv3+"
 LIC_FILES_CHKSUM = "file://COPYING;md5=94d55d512a9ba36caa9b7df079bae19f \
 file://COPYING.LIB;md5=bbb461211a33b134d42ed5ee802b37ff"
 
-DEPENDS = "libgpg-error libcap"
+DEPENDS = "libgpg-error"
 
 UPSTREAM_CHECK_URI = "https://gnupg.org/download/index.html;
 SRC_URI = "${GNUPG_MIRROR}/libgcrypt/libgcrypt-${PV}.tar.gz \
@@ -26,7 +26,10 @@ BINCONFIG = "${bindir}/libgcrypt-config"
 
 inherit autotools texinfo binconfig-disabled pkgconfig
 
-EXTRA_OECONF = "--disable-asm --with-capabilities"
+EXTRA_OECONF = "--disable-asm"
+
+PACKAGECONFIG ??= "capabilities"
+PACKAGECONFIG[capabilities] = 
"--with-capabilities,--without-capabilities,libcap"
 
 do_configure_prepend () {
# Else this could be used in preference to the one in aclocal-copy
-- 
2.11.0

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


[OE-core] [PATCH 2/4] libgcrypt.inc: Enable nativesdk

2017-01-30 Thread Nathan Rossi
Enable nativesdk on this recipe.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-support/libgcrypt/libgcrypt.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/libgcrypt/libgcrypt.inc 
b/meta/recipes-support/libgcrypt/libgcrypt.inc
index 15805cd436..c8a48623b4 100644
--- a/meta/recipes-support/libgcrypt/libgcrypt.inc
+++ b/meta/recipes-support/libgcrypt/libgcrypt.inc
@@ -46,4 +46,4 @@ FILES_dumpsexp-dev += "${bindir}/dumpsexp"
 
 ARM_INSTRUCTION_SET = "arm"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
-- 
2.11.0

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


[OE-core] [PATCH 1/4] libgpg-error_1.25.bb: Enable nativesdk

2017-01-30 Thread Nathan Rossi
Enable nativesdk on this recipe.

Signed-off-by: Nathan Rossi 
---
 meta/recipes-support/libgpg-error/libgpg-error_1.25.bb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb 
b/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb
index 9d402ffbb6..d4ce224948 100644
--- a/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb
+++ b/meta/recipes-support/libgpg-error/libgpg-error_1.25.bb
@@ -51,4 +51,4 @@ do_install_append() {
 
 FILES_${PN}-dev += "${bindir}/gpg-error"
 
-BBCLASSEXTEND = "native"
+BBCLASSEXTEND = "native nativesdk"
-- 
2.11.0

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