[OE-core] [PATCH] classes/license: Respect beginline and endline

2017-02-10 Thread Joshua Watt
Recipes have the option of specifying a 'beginline' and 'endline'
options in LIC_FILES_CHKSUM which will cause the license bbclass to
only extract those specific lines from the license file when generating
the license database.

Signed-off-by: Joshua Watt 
---
 meta/classes/license.bbclass | 34 +++---
 1 file changed, 23 insertions(+), 11 deletions(-)

diff --git a/meta/classes/license.bbclass b/meta/classes/license.bbclass
index 44467d0..9923aac 100644
--- a/meta/classes/license.bbclass
+++ b/meta/classes/license.bbclass
@@ -345,7 +345,7 @@ def copy_license_files(lic_files_paths, destdir):
 import errno
 
 bb.utils.mkdirhier(destdir)
-for (basename, path) in lic_files_paths:
+for (basename, path, beginline, endline) in lic_files_paths:
 try:
 src = path
 dst = os.path.join(destdir, basename)
@@ -353,7 +353,7 @@ def copy_license_files(lic_files_paths, destdir):
 os.remove(dst)
 if os.path.islink(src):
 src = os.path.realpath(src)
-canlink = os.access(src, os.W_OK) and (os.stat(src).st_dev == 
os.stat(destdir).st_dev)
+canlink = os.access(src, os.W_OK) and (os.stat(src).st_dev == 
os.stat(destdir).st_dev) and beginline is None and endline is None
 if canlink:
 try:
 os.link(src, dst)
@@ -377,7 +377,15 @@ def copy_license_files(lic_files_paths, destdir):
 else:
 raise
 if not canlink:
-shutil.copyfile(src, dst)
+begin_idx = int(beginline)-1 if beginline is not None else None
+end_idx = int(endline) if endline is not None else None
+if begin_idx is None and end_idx is None:
+shutil.copyfile(src, dst)
+else:
+with open(src, 'r') as src_f:
+with open(dst, 'w') as dst_f:
+
dst_f.write(''.join(src_f.readlines()[begin_idx:end_idx]))
+
 except Exception as e:
 bb.warn("Could not copy license file %s to %s: %s" % (src, dst, e))
 
@@ -447,7 +455,8 @@ def find_license_files(d):
 # we really should copy to generic_ + spdx_generic, however, that 
ends up messing the manifest
 # audit up. This should be fixed in emit_pkgdata (or, we actually 
got and fix all the recipes)
 
-lic_files_paths.append(("generic_" + license_type, 
os.path.join(license_source, spdx_generic)))
+lic_files_paths.append(("generic_" + license_type, 
os.path.join(license_source, spdx_generic),
+None, None))
 
 # The user may attempt to use NO_GENERIC_LICENSE for a generic 
license which doesn't make sense
 # and should not be allowed, warn the user in this case.
@@ -458,7 +467,7 @@ def find_license_files(d):
 # if NO_GENERIC_LICENSE is set, we copy the license files from the 
fetched source
 # of the package rather than the license_source_dirs.
 lic_files_paths.append(("generic_" + license_type,
-os.path.join(srcdir, non_generic_lic)))
+os.path.join(srcdir, non_generic_lic), 
None, None))
 else:
 # Add explicity avoid of CLOSED license because this isn't generic
 if license_type != 'CLOSED':
@@ -476,7 +485,9 @@ def find_license_files(d):
 bb.fatal("%s: LIC_FILES_CHKSUM contains an invalid URL:  %s" % 
(d.getVar('PF'), url))
 # We want the license filename and path
 chksum = parm['md5'] if 'md5' in parm else parm['sha256']
-lic_chksums[path] = chksum
+beginline = parm.get('beginline')
+endline = parm.get('endline')
+lic_chksums[path] = (chksum, beginline, endline)
 
 v = FindVisitor()
 try:
@@ -488,16 +499,17 @@ def find_license_files(d):
 
 # Add files from LIC_FILES_CHKSUM to list of license files
 lic_chksum_paths = defaultdict(OrderedDict)
-for path, chksum in lic_chksums.items():
-lic_chksum_paths[os.path.basename(path)][chksum] = 
os.path.join(srcdir, path)
+for path, data in lic_chksums.items():
+lic_chksum_paths[os.path.basename(path)][data] = (os.path.join(srcdir, 
path), data[1], data[2])
 for basename, files in lic_chksum_paths.items():
 if len(files) == 1:
-lic_files_paths.append((basename, list(files.values())[0]))
+data = list(files.values())[0]
+lic_files_paths.append(tuple([basename] + list(data)))
 else:
 # If there are multiple different license files with identical
 # basenames we rename them to .0, .1, ...
-for i, path in enumerate(files.values()):
-lic_files_paths.append(("%s.%d" % (basename, i), path))
+for i, data 

Re: [OE-core] Is Krogoth release still maintained?

2017-02-10 Thread akuster808



On 02/10/2017 05:46 AM, Ruslan Bilovol wrote:

Hi Armin,

I see that Krogoth branches in openembedded-core and
meta-openembedded layers were last updated 3 months ago.

 Thats about the run rate between updates.


So is Krogoth release still maintained?

Yes they are.

Openembedded-core  is maintained for one year after release then drops 
to community support. I have a set of changes that have some build 
failures identified via Yocto's autobuilder. I need to look at the failures.


Meta-openbedded is on list to cycle through this weekend. it has an 
informal life cycle.



If yes, when and
how often do you plan do update it?
Openembedded has more of a formal process where we try to do a QA'd 
release 3 - 6 month depending on the number of patches backported.
There is no formal schedule for meta-openembedded. I try align my 
efforts with the oe-core updates.


I hope this clarifies where I am at.

regards,
Armin



Thanks,
Ruslan



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


Re: [OE-core] [PATCH] Revert "flex: upgrade to 2.6.2"

2017-02-10 Thread Khem Raj
On Fri, Feb 10, 2017 at 1:22 PM, Martin Jansa  wrote:
> On Fri, Feb 10, 2017 at 03:13:08PM -0500, Trevor Woerner wrote:
>> This reverts commit 3632abd01abb8dfff230e18f828af705da488f97.
>>
>> Multiple people have expressed issues with flex-2.6.2; personally I had
>> problems compiling libsepol from meta-selinux (for libselinux). I tried
>> upgrading to flex-2.6.3, but that caused binutils-cross_2.27 to fail.
>>
>> The simplest for now is to downgrade to flex-2.6.0.
>
> Acked-by: Martin Jansa 

Acked-by: Khem Raj 

>
>> ---
>>  ...oid-c-comments-in-c-code-fails-with-gcc-6.patch |  64 ++
>>  .../recipes-devtools/flex/flex/CVE-2016-6354.patch |  59 ++
>>  meta/recipes-devtools/flex/flex/crosscompile.patch | 214 
>> -
>>  .../flex/flex/do_not_create_pdf_doc.patch  |  17 ++
>>  .../flex/{flex_2.6.2.bb => flex_2.6.0.bb}  |  11 +-
>>  5 files changed, 146 insertions(+), 219 deletions(-)
>>  create mode 100644 
>> meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
>>  create mode 100644 meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
>>  delete mode 100644 meta/recipes-devtools/flex/flex/crosscompile.patch
>>  create mode 100644 
>> meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
>>  rename meta/recipes-devtools/flex/{flex_2.6.2.bb => flex_2.6.0.bb} (84%)
>>
>> diff --git 
>> a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
>>  
>> b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
>> new file mode 100644
>> index 00..438ca5f527
>> --- /dev/null
>> +++ 
>> b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
>> @@ -0,0 +1,64 @@
>> +From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
>> +From: =?UTF-8?q?Andreas=20M=C3=BCller?= 
>> +Date: Tue, 30 Aug 2016 14:25:32 +0200
>> +Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
>> +MIME-Version: 1.0
>> +Content-Type: text/plain; charset=UTF-8
>> +Content-Transfer-Encoding: 8bit
>> +
>> +fixes:
>> +
>> +| error: C++ style comments are not allowed in ISO C90
>> +| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
>> +
>> +Upstream-Status: Pending
>> +
>> +Signed-off-by: Andreas Müller 
>> +---
>> + src/flex.skl | 2 +-
>> + src/scan.c   | 2 +-
>> + src/skel.c   | 2 +-
>> + 3 files changed, 3 insertions(+), 3 deletions(-)
>> +
>> +diff --git a/src/flex.skl b/src/flex.skl
>> +index 73a0b9e..ed71627 100644
>> +--- a/src/flex.skl
>>  b/src/flex.skl
>> +@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
>> +  * scanner will even need a stack. We use 2 instead of 1 to 
>> avoid an
>> +  * immediate realloc on the next call.
>> +  */
>> +-num_to_alloc = 1; // After all that talk, this was set to 1 
>> anyways...
>> ++num_to_alloc = 1; /* After all that talk, this was set to 1 
>> anyways... */
>> + YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
>> + (num_to_alloc 
>> * sizeof(struct yy_buffer_state*)
>> + 
>> M4_YY_CALL_LAST_ARG);
>> +diff --git a/src/scan.c b/src/scan.c
>> +index b55df2d..f1dce75 100644
>> +--- a/src/scan.c
>>  b/src/scan.c
>> +@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
>> +  * scanner will even need a stack. We use 2 instead of 1 to 
>> avoid an
>> +  * immediate realloc on the next call.
>> +  */
>> +-num_to_alloc = 1; // After all that talk, this was set to 1 
>> anyways...
>> ++num_to_alloc = 1; /* After all that talk, this was set to 1 
>> anyways...*/
>> + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
>> + (num_to_alloc 
>> * sizeof(struct yy_buffer_state*)
>> + );
>> +diff --git a/src/skel.c b/src/skel.c
>> +index ef657d3..26cc889 100644
>> +--- a/src/skel.c
>>  b/src/skel.c
>> +@@ -2561,7 +2561,7 @@ const char *skel[] = {
>> +   "  * scanner will even need a stack. We use 2 instead of 1 to 
>> avoid an",
>> +   "  * immediate realloc on the next call.",
>> +   " */",
>> +-  " num_to_alloc = 1; // After all that talk, this was set to 1 
>> anyways...",
>> ++  " num_to_alloc = 1; /* After all that talk, this was set to 1 
>> anyways... */",
>> +   " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
>> +   " (num_to_alloc 
>> * sizeof(struct yy_buffer_state*)",
>> +   "  

[OE-core] OEDAM Feb 20th - Portland

2017-02-10 Thread akuster808

Hello all,

If you plan on attending the OEDAM in Portland, please ensure you have 
signed up on the wiki. We need a head count.


It is a week from this Monday.

please respond to this email or add your name to the wiki.


kind regards,

Armin

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


[OE-core] [PATCH V2 0/1] remove call to non-existent method

2017-02-10 Thread Stephano Cetola
Changed since V1:
reworded commit message

Stephano Cetola (1):
  insane.bbclass: print QA message correctly

 meta/classes/insane.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

-- 
2.11.1

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


[OE-core] [PATCH V2 1/1] insane.bbclass: print QA message correctly

2017-02-10 Thread Stephano Cetola
Replace call to non-existent method "messages" with call to correct
QA logging method.

Fixes [YOCTO #11014]

introduced in OE-core revision 1dcb38ca9d6

Signed-off-by: Stephano Cetola 
---
 meta/classes/insane.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 3cf86c12c3..ddd58d0875 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -398,7 +398,7 @@ def package_qa_check_dbg(path, name, d, elf, messages):
 
 if not "-dbg" in name and not "-ptest" in name:
 if '.debug' in path.split(os.path.sep):
-messages("debug-files", "non debug package contains .debug 
directory: %s path %s" % \
+package_qa_add_message(messages, "debug-files", "non debug package 
contains .debug directory: %s path %s" % \
  (name, package_qa_clean_path(path,d)))
 
 QAPATHTEST[perms] = "package_qa_check_perm"
-- 
2.11.1

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


[OE-core] [PATCH] scripts/contrib/patchtest: run patchtest on local branch

2017-02-10 Thread leonardo . sandoval . gonzalez
From: Leonardo Sandoval 

The script run patchtest on local branch commits, printing results into
stdout. This script is useful to test patches before sending to the
mailing list.

Examples:

$ git checkout master-next-1.9
Branch master-next-1.9 set up to track remote branch master-next-1.9 from 
origin.
Switched to a new branch 'master-next-1.9'

  $ ~/scripts/contrib/patchtest.sh
  166e70e: Robert Yang: Thu Apr 2 12:01:37 2015 +0100: patch: fix 
CVE-2015-1196: FAIL
   Issue Missing or incorrectly formatted CVE tag in commit message 
[test_cve_presence_in_commit_message]
Suggested fixInclude a "CVE--" tag in the commit message
   Issue Missing or incorrectly formatted CVE tag in included patch 
file [test_cve_tag_format]
Suggested fixCorrect or include the CVE tag on cve patch with format: 
"CVE: CVE--"

  eaa4536: Robert Yang: Thu Apr 2 12:01:37 2015 +0100: wget: 1.16.1 -> 1.16.2: 
OK

  3c29ce3: Robert Yang: Thu Apr 2 12:01:38 2015 +0100: git: 2.3.0 -> 2.3.1: OK

  85491f6: Khem Raj: Thu Apr 2 12:01:38 2015 +0100: gdb: Upgrade 7.8.1 -> 7.9: 
OK

  f701142: Robert Yang: Thu Apr 2 12:01:38 2015 +0100: binutils: upgrade to 
2.25: OK

  385d0b1: Khem Raj: Thu Apr 2 12:01:39 2015 +0100: binutils: Fix ICE in gold: 
OK

[YOCTO #10720]

Signed-off-by: Leonardo Sandoval 
---
 scripts/contrib/patchtest.sh | 118 +++
 1 file changed, 118 insertions(+)
 create mode 100755 scripts/contrib/patchtest.sh

diff --git a/scripts/contrib/patchtest.sh b/scripts/contrib/patchtest.sh
new file mode 100755
index 000..7fe5666
--- /dev/null
+++ b/scripts/contrib/patchtest.sh
@@ -0,0 +1,118 @@
+#!/bin/bash
+# ex:ts=4:sw=4:sts=4:et
+# -*- tab-width: 4; c-basic-offset: 4; indent-tabs-mode: nil -*-
+#
+# patchtest: Run patchtest on commits starting at master
+#
+# Copyright (c) 2017, Intel Corporation.
+# All rights reserved.
+#
+# This program is free software; you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation; either version 2 of the License, or
+# (at your option) any later version.
+#
+# This program is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this program; if not, write to the Free Software
+# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+#
+set -o errexit
+
+# Default values
+pokydir=''
+
+usage() {
+CMD=$(basename $0)
+cat <&2
+exit 1
+}
+
+function clone() {
+local REPOREMOTE=$1
+local REPODIR=$2
+if [ ! -d $REPODIR ]; then
+   git clone $REPOREMOTE $REPODIR --quiet
+else
+   ( cd $REPODIR; git pull --quiet )
+fi
+}
+
+while getopts ":p:h" opt; do
+case $opt in
+   p)
+   pokydir=$OPTARG
+   ;;
+   h)
+   usage
+   ;;
+   \?)
+   echo "Invalid option: -$OPTARG" >&2
+   usage
+   ;;
+   :)
+   echo "Option -$OPTARG requires an argument." >&2
+   usage
+   ;;
+esac
+done
+shift $((OPTIND-1))
+
+CDIR="$PWD"
+
+# default pokydir to current directory if user did not specify one
+if [ -z "$pokydir" ]; then
+pokydir="$CDIR"
+fi
+
+PTENV="$PWD/patchtest"
+PT="$PTENV/patchtest"
+PTOE="$PTENV/patchtest-oe"
+
+if ! which virtualenv > /dev/null; then
+echo "Install virtualenv before proceeding"
+exit 1;
+fi
+
+# activate the virtual env
+virtualenv $PTENV --quiet
+source $PTENV/bin/activate
+
+cd $PTENV
+
+# clone or pull
+clone git://git.yoctoproject.org/patchtest $PT
+clone git://git.yoctoproject.org/patchtest-oe $PTOE
+
+# install requirements
+pip install -r $PT/requirements.txt --quiet
+pip install -r $PTOE/requirements.txt --quiet
+
+PATH="$PT:$PT/scripts:$PATH"
+
+# loop through parent to HEAD and execute patchtest on each commit
+for commit in $(git rev-list master..HEAD --reverse)
+do
+shortlog="$(git log "$commit^1..$commit" --pretty='%h: %aN: %cd: %s')"
+log="$(git format-patch "$commit^1..$commit" --stdout | patchtest - -r 
$pokydir -s $PTOE/tests --base-commit $commit^1 --json 2>/dev/null | 
create-summary --fail --only-results)"
+if [ -z "$log" ]; then
+   shortlog="$shortlog: OK"
+else
+   shortlog="$shortlog: FAIL"
+fi
+echo "$shortlog"
+echo "$log" | sed -n -e '/Issue/p' -e '/Suggested fix/p'
+echo ""
+done
+
+deactivate
+
+cd $CDIR
-- 
2.1.4

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


[OE-core] [PATCH 2/2] oeqa/core/loader.py: Avoid importing tests with built-ins name

2017-02-10 Thread mariano . lopez
From: Mariano Lopez 

If importing a test with the same name as a built-in module,
it will silently import the built-in and check for tests in
built-in module. This happened with syslog module in debian
based machines, so add a raise to avoid this behavior.

[YOCTO #10978]

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/loader.py | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index bf13a5a..a28512b 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -217,6 +217,13 @@ class OETestLoader(unittest.TestLoader):
 # use_load_tests deprecation via *args and **kws.  See issue 16662.
 if sys.version_info >= (3,5):
 def loadTestsFromModule(self, module, *args, pattern=None, **kws):
+"""
+Returns a suite of all tests cases contained in module.
+"""
+if module.__name__ in sys.builtin_module_names:
+msg = 'Tried to import %s test module but is a built-in'
+raise ImportError(msg % module.__name__)
+
 if not self.modules or "all" in self.modules or \
 module.__name__ in self.modules:
 return super(OETestLoader, self).loadTestsFromModule(
@@ -228,6 +235,10 @@ class OETestLoader(unittest.TestLoader):
 """
 Returns a suite of all tests cases contained in module.
 """
+if module.__name__ in sys.builtin_module_names:
+msg = 'Tried to import %s test module but is a built-in'
+raise ImportError(msg % module.__name__)
+
 if not self.modules or "all" in self.modules or \
 module.__name__ in self.modules:
 return super(OETestLoader, self).loadTestsFromModule(
-- 
2.6.6

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


[OE-core] [PATCH 1/2] oeqa/core/loader.py: Give meaningful error when failed to load classes

2017-02-10 Thread mariano . lopez
From: Mariano Lopez 

With this we get the class that is actually having the problem,
not just a TypeError with an unknown class causing the error.

Signed-off-by: Mariano Lopez 
---
 meta/lib/oeqa/core/loader.py | 7 ---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/meta/lib/oeqa/core/loader.py b/meta/lib/oeqa/core/loader.py
index c73ef9a..bf13a5a 100644
--- a/meta/lib/oeqa/core/loader.py
+++ b/meta/lib/oeqa/core/loader.py
@@ -171,10 +171,11 @@ class OETestLoader(unittest.TestLoader):
 """
 if issubclass(testCaseClass, unittest.suite.TestSuite):
 raise TypeError("Test cases should not be derived from TestSuite." 
\
-" Maybe you meant to derive from TestCase?")
+" Maybe you meant to derive %s from TestCase?" 
\
+% testCaseClass.__name__)
 if not issubclass(testCaseClass, self.caseClass):
-raise TypeError("Test cases need to be derived from %s" % \
-caseClass.__name__)
+raise TypeError("Test %s is not derived from %s" % \
+(testCaseClass.__name__, self.caseClass.__name__))
 
 
 testCaseNames = self.getTestCaseNames(testCaseClass)
-- 
2.6.6

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


[OE-core] [PATCH 0/2] OEQA loader improvement

2017-02-10 Thread mariano . lopez
From: Mariano Lopez 

The first adds more verbosity when a class doesn't inherit
from the expected test class.

The second patch raises an error when trying to import a test
with the same module name as a built-in module.

The following changes since commit e758547db9048d4aa1c1415d6af8072f519fae24:

  nss: Fix nss-native so the checksum doesn't change with BUILD_ARCH 
(2017-02-09 10:52:03 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib mariano/bug10978
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/bug10978

Mariano Lopez (2):
  oeqa/core/loader.py: Give meaningful error when failed to load classes
  oeqa/core/loader.py: Avoid importing tests with built-ins name

 meta/lib/oeqa/core/loader.py | 18 +++---
 1 file changed, 15 insertions(+), 3 deletions(-)

-- 
2.6.6

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


Re: [OE-core] [PATCH] Revert "flex: upgrade to 2.6.2"

2017-02-10 Thread Martin Jansa
On Fri, Feb 10, 2017 at 03:13:08PM -0500, Trevor Woerner wrote:
> This reverts commit 3632abd01abb8dfff230e18f828af705da488f97.
> 
> Multiple people have expressed issues with flex-2.6.2; personally I had
> problems compiling libsepol from meta-selinux (for libselinux). I tried
> upgrading to flex-2.6.3, but that caused binutils-cross_2.27 to fail.
> 
> The simplest for now is to downgrade to flex-2.6.0.

Acked-by: Martin Jansa 

> ---
>  ...oid-c-comments-in-c-code-fails-with-gcc-6.patch |  64 ++
>  .../recipes-devtools/flex/flex/CVE-2016-6354.patch |  59 ++
>  meta/recipes-devtools/flex/flex/crosscompile.patch | 214 
> -
>  .../flex/flex/do_not_create_pdf_doc.patch  |  17 ++
>  .../flex/{flex_2.6.2.bb => flex_2.6.0.bb}  |  11 +-
>  5 files changed, 146 insertions(+), 219 deletions(-)
>  create mode 100644 
> meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
>  create mode 100644 meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
>  delete mode 100644 meta/recipes-devtools/flex/flex/crosscompile.patch
>  create mode 100644 
> meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
>  rename meta/recipes-devtools/flex/{flex_2.6.2.bb => flex_2.6.0.bb} (84%)
> 
> diff --git 
> a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
>  
> b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> new file mode 100644
> index 00..438ca5f527
> --- /dev/null
> +++ 
> b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
> @@ -0,0 +1,64 @@
> +From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
> +From: =?UTF-8?q?Andreas=20M=C3=BCller?= 
> +Date: Tue, 30 Aug 2016 14:25:32 +0200
> +Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
> +MIME-Version: 1.0
> +Content-Type: text/plain; charset=UTF-8
> +Content-Transfer-Encoding: 8bit
> +
> +fixes:
> +
> +| error: C++ style comments are not allowed in ISO C90
> +| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
> +
> +Upstream-Status: Pending
> +
> +Signed-off-by: Andreas Müller 
> +---
> + src/flex.skl | 2 +-
> + src/scan.c   | 2 +-
> + src/skel.c   | 2 +-
> + 3 files changed, 3 insertions(+), 3 deletions(-)
> +
> +diff --git a/src/flex.skl b/src/flex.skl
> +index 73a0b9e..ed71627 100644
> +--- a/src/flex.skl
>  b/src/flex.skl
> +@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
> +  * scanner will even need a stack. We use 2 instead of 1 to 
> avoid an
> +  * immediate realloc on the next call.
> +  */
> +-num_to_alloc = 1; // After all that talk, this was set to 1 
> anyways...
> ++num_to_alloc = 1; /* After all that talk, this was set to 1 
> anyways... */
> + YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
> + (num_to_alloc * 
> sizeof(struct yy_buffer_state*)
> + 
> M4_YY_CALL_LAST_ARG);
> +diff --git a/src/scan.c b/src/scan.c
> +index b55df2d..f1dce75 100644
> +--- a/src/scan.c
>  b/src/scan.c
> +@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
> +  * scanner will even need a stack. We use 2 instead of 1 to 
> avoid an
> +  * immediate realloc on the next call.
> +  */
> +-num_to_alloc = 1; // After all that talk, this was set to 1 
> anyways...
> ++num_to_alloc = 1; /* After all that talk, this was set to 1 
> anyways...*/
> + (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
> + (num_to_alloc * 
> sizeof(struct yy_buffer_state*)
> + );
> +diff --git a/src/skel.c b/src/skel.c
> +index ef657d3..26cc889 100644
> +--- a/src/skel.c
>  b/src/skel.c
> +@@ -2561,7 +2561,7 @@ const char *skel[] = {
> +   "  * scanner will even need a stack. We use 2 instead of 1 to 
> avoid an",
> +   "  * immediate realloc on the next call.",
> +   " */",
> +-  " num_to_alloc = 1; // After all that talk, this was set to 1 
> anyways...",
> ++  " num_to_alloc = 1; /* After all that talk, this was set to 1 
> anyways... */",
> +   " YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
> +   " (num_to_alloc * 
> sizeof(struct yy_buffer_state*)",
> +   " 
> M4_YY_CALL_LAST_ARG);",
> +-- 
> +2.5.5
> +
> diff --git a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch 
> b/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
> new file mode 100644
> index 

Re: [OE-core] State of bitbake world, Failed tasks 2017-02-08

2017-02-10 Thread Andreas Müller
On Fri, Feb 10, 2017 at 5:26 PM, Martin Jansa  wrote:
> On Fri, Feb 10, 2017 at 09:28:11AM +0100, Martin Jansa wrote:
>> == Number of issues - stats ==
>> {| class='wikitable'
>> !|Date !!colspan='3'|Failed tasks 
>> !!colspan='6'|Failed depencencies!!|Signatures   
>>  !!colspan='12'|QA !!Comment
>> |-
>> ||||qemuarm   ||qemux86   ||qemux86_64
>> ||qemuarm||max||min ||qemux86||max||min ||all   ||already-stripped   
>>||libdir||textrel   ||build-deps||file-rdeps
>> ||version-going-backwards   ||host-user-contaminated
>> ||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot 
>>||invalid-pkgconfig ||pkgname   ||
>> |-
>> ||2017-02-08  ||96||100   ||100   ||N/A   ||N/A   ||N/A   ||N/A   ||N/A  
>>  ||N/A   ||0 ||0 ||0 ||2 ||0 
>> ||6 ||36||0 ||0 ||0  
>>||0 ||0 ||0 ||
>> |}
>
> During this weekend I plan to start adding PNBLACKLISTs to failed recipes.
>
> With this number of failures the builds don't help to spot new issues.
>
> If you care about some of the listed recipes, please send patches or at
> least send e-mail saying that you plan to fix them soonish.
>
> Many of these failures aren't hard to fix, I have already fixed all
> recipes I care about (which are included in some images I'm building),
> but I don't want to spend more time fixing (or even building) recipes
> nobody uses (or cares about).
>
> If you don't send the fixes before Sunday evening, than no big deal,
> you will just need to update commit with the fix to also remove the
> PNBLACKLIST from the recipe before sending it to ML.
>
OK I'll give my images a try this weekend.

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


[OE-core] [PATCHv2 1/1] insane.bbclass: Add missing dependencies

2017-02-10 Thread mariano . lopez
From: Mariano Lopez 

package_qa task requires some tools installed in sysroot; with
the introduction of recipe specific sysroot this task won't
have such tools installed if it's forced to run.

Signed-off-by: Mariano Lopez 
---
 meta/classes/insane.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/meta/classes/insane.bbclass b/meta/classes/insane.bbclass
index 3cf86c1..0167b14 100644
--- a/meta/classes/insane.bbclass
+++ b/meta/classes/insane.bbclass
@@ -1223,9 +1223,12 @@ python do_package_qa () {
 bb.note("DONE with PACKAGE QA")
 }
 
+# binutils is used for most checks, so need to set as dependency
+# POPULATESYSROOTDEPS is defined in staging class.
+do_package_qa[depends] += "${POPULATESYSROOTDEPS}"
 do_package_qa[vardepsexclude] = "BB_TASKDEPDATA"
 do_package_qa[rdeptask] = "do_packagedata"
-addtask do_package_qa after do_packagedata do_package before do_build
+addtask do_package_qa after do_prepare_recipe_sysroot do_packagedata 
do_package before do_build
 
 SSTATETASKS += "do_package_qa"
 do_package_qa[sstate-inputdirs] = ""
-- 
2.10.2

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


[OE-core] [PATCHv2 0/1] insane.bbclass: Add missing dependencies

2017-02-10 Thread mariano . lopez
From: Mariano Lopez 

Changes in v2:

- Add binutils as dependency too

The following changes since commit a624cf7f95c8cf4ff764cc997fd1db4601b97dcc:

  oeqa/selftest/pkgdata: use m4 instead of bash (2017-02-07 14:50:10 +)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib mariano/insane_fix
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=mariano/insane_fix

Mariano Lopez (1):
  insane.bbclass: Add missing dependencies

 meta/classes/insane.bbclass | 5 -
 1 file changed, 4 insertions(+), 1 deletion(-)

-- 
2.10.2

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


[OE-core] [PATCH] Revert "flex: upgrade to 2.6.2"

2017-02-10 Thread Trevor Woerner
This reverts commit 3632abd01abb8dfff230e18f828af705da488f97.

Multiple people have expressed issues with flex-2.6.2; personally I had
problems compiling libsepol from meta-selinux (for libselinux). I tried
upgrading to flex-2.6.3, but that caused binutils-cross_2.27 to fail.

The simplest for now is to downgrade to flex-2.6.0.
---
 ...oid-c-comments-in-c-code-fails-with-gcc-6.patch |  64 ++
 .../recipes-devtools/flex/flex/CVE-2016-6354.patch |  59 ++
 meta/recipes-devtools/flex/flex/crosscompile.patch | 214 -
 .../flex/flex/do_not_create_pdf_doc.patch  |  17 ++
 .../flex/{flex_2.6.2.bb => flex_2.6.0.bb}  |  11 +-
 5 files changed, 146 insertions(+), 219 deletions(-)
 create mode 100644 
meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
 create mode 100644 meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
 delete mode 100644 meta/recipes-devtools/flex/flex/crosscompile.patch
 create mode 100644 meta/recipes-devtools/flex/flex/do_not_create_pdf_doc.patch
 rename meta/recipes-devtools/flex/{flex_2.6.2.bb => flex_2.6.0.bb} (84%)

diff --git 
a/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
 
b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
new file mode 100644
index 00..438ca5f527
--- /dev/null
+++ 
b/meta/recipes-devtools/flex/flex/0002-avoid-c-comments-in-c-code-fails-with-gcc-6.patch
@@ -0,0 +1,64 @@
+From 7072befe1397af4eb01c3ff7edf99f0cd5076089 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20M=C3=BCller?= 
+Date: Tue, 30 Aug 2016 14:25:32 +0200
+Subject: [PATCH] avoid c++ comments in c-code - fails with gcc-6
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+fixes:
+
+| error: C++ style comments are not allowed in ISO C90
+| num_to_alloc = 1; // After all that talk, this was set to 1 anyways...
+
+Upstream-Status: Pending
+
+Signed-off-by: Andreas Müller 
+---
+ src/flex.skl | 2 +-
+ src/scan.c   | 2 +-
+ src/skel.c   | 2 +-
+ 3 files changed, 3 insertions(+), 3 deletions(-)
+
+diff --git a/src/flex.skl b/src/flex.skl
+index 73a0b9e..ed71627 100644
+--- a/src/flex.skl
 b/src/flex.skl
+@@ -2350,7 +2350,7 @@ void yyFlexLexer::yyensure_buffer_stack(void)
+* scanner will even need a stack. We use 2 instead of 1 to 
avoid an
+* immediate realloc on the next call.
+  */
+-  num_to_alloc = 1; // After all that talk, this was set to 1 
anyways...
++  num_to_alloc = 1; /* After all that talk, this was set to 1 
anyways... */
+   YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+   (num_to_alloc * 
sizeof(struct yy_buffer_state*)
+   
M4_YY_CALL_LAST_ARG);
+diff --git a/src/scan.c b/src/scan.c
+index b55df2d..f1dce75 100644
+--- a/src/scan.c
 b/src/scan.c
+@@ -4672,7 +4672,7 @@ static void yyensure_buffer_stack (void)
+* scanner will even need a stack. We use 2 instead of 1 to 
avoid an
+* immediate realloc on the next call.
+  */
+-  num_to_alloc = 1; // After all that talk, this was set to 1 
anyways...
++  num_to_alloc = 1; /* After all that talk, this was set to 1 
anyways...*/
+   (yy_buffer_stack) = (struct yy_buffer_state**)yyalloc
+   (num_to_alloc * 
sizeof(struct yy_buffer_state*)
+   );
+diff --git a/src/skel.c b/src/skel.c
+index ef657d3..26cc889 100644
+--- a/src/skel.c
 b/src/skel.c
+@@ -2561,7 +2561,7 @@ const char *skel[] = {
+   "* scanner will even need a stack. We use 2 instead of 1 to 
avoid an",
+   "* immediate realloc on the next call.",
+   " */",
+-  "   num_to_alloc = 1; // After all that talk, this was set to 1 
anyways...",
++  "   num_to_alloc = 1; /* After all that talk, this was set to 1 
anyways... */",
+   "   YY_G(yy_buffer_stack) = (struct yy_buffer_state**)yyalloc",
+   "   (num_to_alloc * 
sizeof(struct yy_buffer_state*)",
+   "   
M4_YY_CALL_LAST_ARG);",
+-- 
+2.5.5
+
diff --git a/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch 
b/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
new file mode 100644
index 00..216ac7ae1c
--- /dev/null
+++ b/meta/recipes-devtools/flex/flex/CVE-2016-6354.patch
@@ -0,0 +1,59 @@
+From 3939eccdff598f47e5b37b05d58bf1b44d3796e7 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen 
+Date: Fri, 7 Oct 2016 14:15:38 +0300
+Subject: [PATCH] Prevent buffer overflow in 

Re: [OE-core] libcurl vs. libcurl5 vs. libcurl4

2017-02-10 Thread Martin Jansa
On Fri, Feb 10, 2017 at 03:41:44PM +, Bryan Evenson wrote:
> I'm on the dizzy branch and I'm working on updating my build tools to use a 
> more recent branch.  I have an image built using fido and I'm doing some 
> firmware upgrade testing.  I have a package that depends on libcurl and I'm 
> getting some strange version dependencies that I'm trying to sort out.
> 
> In my package recipe I have "RDEPENDS_${PN} =  
> libcurl" to pull in the runtime depenency on curl.  When I build my image 
> using the dizzy branch, libcurl gets built as libcurl5-7.37.1, but when I 
> build my image using the fido branch libcurl gets built as libcurl4-7.40.0.  
> As a result, by checking my package dependencies with "opkg info 
> " I see that the package dependency has changed from 
> "libcurl5 (>=7.37.1)" to "libcurl4 (>=7.40.1)".
> 
> Any ideas why the package name dropped from libcurl5 to libcurl4?  Is this 
> something that has been fixed in a more recent branch?  If I'm reading the 
> dependencies correctly, opkg should still install libcurl-7.40.0 since my 
> package depends on libcurl4, correct?

See --enable-soname-bump option in curl.

This change in oe-core:
  commit 49c848018484827c433e1bcf9c63416640456f3e
  Author: Khem Raj 
  Date:   Tue Apr 28 22:34:22 2015 -0700
  Subject:  curl: Fix wrong assumption about sizeof off_t on largefile
systems

This issue was reported on poky ml as well see
https://lists.yoctoproject.org/pipermail/poky/2013-December/009435.html

Causes this difference in curl_config.h between Dizzy and Fido:
diff 7.40.0-r0-dizzy/build/lib/curl_config.h
 7.40.0-r0-fido/build/lib/curl_config.h
878c877
< #define SIZEOF_OFF_T 4
---
> #define SIZEOF_OFF_T 8
Which in turn causes curl's configure script to stop bumping the SONAME
version.

That's why newer curl 7.40.1 produces libcurl4 while older 7.37.1
produced libcurl5.

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


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


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

2017-02-10 Thread Khem Raj


On 2/10/17 10:32 AM, Trevor Woerner wrote:
> On Mon, Jan 30, 2017 at 2:56 PM, Denys Dmytriyenko  wrote:
>> 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.
> 
> Has anyone made a decision on this? I wasn't able to compile libsepol
> from meta-security due to flex-2.6.2. I also tried upgrading to 2.6.3
> but that caused binutils to fail. Reverting to 2.6.0 seems to fix the
> issues I'm seeing.
> 

Can you help by sending a revert request and lets close it
-- 
___
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-02-10 Thread Trevor Woerner
On Mon, Jan 30, 2017 at 2:56 PM, Denys Dmytriyenko  wrote:
> 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.

Has anyone made a decision on this? I wasn't able to compile libsepol
from meta-security due to flex-2.6.2. I also tried upgrading to 2.6.3
but that caused binutils to fail. Reverting to 2.6.0 seems to fix the
issues I'm seeing.
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH v2 3/3] rm_work.bbclass: clean up sooner

2017-02-10 Thread Mike Crowe
On Thursday 09 February 2017 at 17:24:39 +0100, Patrick Ohly wrote:
> On Wed, 2017-02-08 at 13:48 +, Mike Crowe wrote:
> > On Wednesday 08 February 2017 at 14:04:42 +0100, Patrick Ohly wrote:
> > > On Wed, 2017-02-08 at 11:50 +, Mike Crowe wrote:
> > > > On Friday 13 January 2017 at 15:52:33 +0100, Patrick Ohly wrote:
> > > > > The right solution is to inject do_rm_work before do_build and after
> > > > > all tasks of the recipe. Achieving that depends on the new bitbake
> > > > > bb.event.RecipeTaskPreProcess and bb.build.preceedtask().
> > > > 
> > > > We've run into trouble with this change. We have a number of custom
> > > > ancillary tasks that are used to generate source release files and run
> > > > package tests. No other tasks (including do_build) depend on these tasks
> > > > since they are run explicitly when required using bitbake -c; either
> > > > directly or via a recrdeptask.
> > > > 
> > > > Running a single task continues to work correctly - presumably this is
> > > > because the do_build task is not being run, so its dependencies 
> > > > (including
> > > > rm_work) aren't run either.
> > > > 
> > > > Running via the recrdeptask fails. This is because for any particular
> > > > recipe we end up depending on both do_build and the source release 
> > > > tasks.
> > > > There's nothing to stop do_rm_work running before (or even during!) one 
> > > > of
> > > > the source release tasks.
> > > 
> > > Can you show how you use recrdeptask and how you call bitbake to trigger
> > > those extra tasks, just for my understanding?
> > 
> > Certainly, we have a bbclass globally in INHERIT that contains:
> > 
> >  addtask source_release # potential fix here
> >  do_source_release() {
> >  :
> >  }
> > 
> >  addtask all_source_releases
> >  xx_do_all_source_releases() {
> >  :
> >  }
> > 
> >  do_all_source_releases[nostamp] = "1"
> >  do_all_source_releases[recrdeptask] += "do_all_source_releases 
> > do_source_release"
> > 
> >  addtask husk_recipe before do_source_release
> >  python xx_do_husk_recipe() {
> > ...
> >  }
> > 
> >  (there's also another task similar to do_husk_recipe)
> > 
> > and in the particular recipe that has trouble with racing against rm_work:
> > 
> >  do_husk_recipe() {
> > # do stuff in ${WORKDIR}
> >  }
> >  addtask husk_recipe after do_populate_sysroot before do_source_release
> > 
> > there's also a source-release-world recipe that contains:
> > 
> >  DEPENDS = "our-image"
> > 
> > and we run:
> > 
> >  bitbake -c all_source_releases source-release-world
> 
> I tried to replicate that with Poky master (= 226a508da), but without
> luck:
> 
> /work/poky$ cat meta/classes/release-source.bbclass 
> addtask source_release # potential fix here
> do_source_release() {
> :
> }
> 
> addtask all_source_releases
> do_all_source_releases() {
> :
> }
> 
> do_all_source_releases[nostamp] = "1"
> do_all_source_releases[recrdeptask] += "do_all_source_releases 
> do_source_release"
> 
> addtask husk_recipe before do_source_release
> python do_husk_recipe() {
> pass
> }
> 
> /work/poky$ cat meta/recipes-core/husk/husk.bb 
> LICENSE = "custom"
> 
> do_husk_recipe() {
> # do stuff in ${WORKDIR}
> :
> }
> addtask husk_recipe after do_populate_sysroot before do_source_release
> 
> /work/poky$ cat meta/recipes-core/husk/source-release-world.bb
> LICENSE = "custom"
> DEPENDS = "core-image-sato"
> 
> /work/poky/build$ tail -1 conf/local.conf
> INHERIT += "rm_work release-source"

The part I'd missed is the all-important line in source-release-world.bb:

 do_source_release[depends] += "core-image-sato:do_build"

We have this to ensure that the source release includes everything that is
required to build the rootfs itself. (For example, elfutils-native is only
included if this line is present.)

> /work/poky/build$ bitbake --dry-run -c all_source_releases 
> source-release-world
> ...
> 
> That last command does not trigger the do_rm_work task and thus there is
> also no race.

That was my experience without the magic extra line too. Sorry I omitted
that.

> It seems unsafe to have tasks that are not properly ordered and just
> rely on not activating them in the same build, but without understanding
> the problem better it is too early to look for a solution.

Thanks for investigating. If you're still having trouble then I have a
single patch on top of current oe-core master that reproduces it for me
that I can send.

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


[OE-core] libcurl vs. libcurl5 vs. libcurl4

2017-02-10 Thread Bryan Evenson
I'm on the dizzy branch and I'm working on updating my build tools to use a 
more recent branch.  I have an image built using fido and I'm doing some 
firmware upgrade testing.  I have a package that depends on libcurl and I'm 
getting some strange version dependencies that I'm trying to sort out.

In my package recipe I have "RDEPENDS_${PN} =  
libcurl" to pull in the runtime depenency on curl.  When I build my image using 
the dizzy branch, libcurl gets built as libcurl5-7.37.1, but when I build my 
image using the fido branch libcurl gets built as libcurl4-7.40.0.  As a 
result, by checking my package dependencies with "opkg info " 
I see that the package dependency has changed from "libcurl5 (>=7.37.1)" to 
"libcurl4 (>=7.40.1)".

Any ideas why the package name dropped from libcurl5 to libcurl4?  Is this 
something that has been fixed in a more recent branch?  If I'm reading the 
dependencies correctly, opkg should still install libcurl-7.40.0 since my 
package depends on libcurl4, correct?

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


Re: [OE-core] [PATCH] lighttpd: Upgrade 1.4.43 -> 1.4.45

2017-02-10 Thread Khem Raj


On 2/10/17 4:42 AM, Andrej Valek wrote:
> Signed-off-by: Andrej Valek 
> Signed-off-by: Pascal Bach 
> ---
>  meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb | 84 
> ---
>  meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb | 84 
> +++
>  2 files changed, 84 insertions(+), 84 deletions(-)
>  delete mode 100644 meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
>  create mode 100644 meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb
> 

its hard to look at what might have changed along with upgrade unless
you let git detect copies and moves a bit harder when generating patches


> diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb 
> b/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
> deleted file mode 100644
> index f70f9b7..000
> --- a/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
> +++ /dev/null
> @@ -1,84 +0,0 @@
> -SUMMARY = "Lightweight high-performance web server"
> -HOMEPAGE = "http://www.lighttpd.net/;
> -BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues;
> -
> -LICENSE = "BSD"
> -LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
> -
> -SECTION = "net"
> -RDEPENDS_${PN} = "lighttpd-module-dirlisting \
> -  lighttpd-module-indexfile \
> -  lighttpd-module-staticfile"
> -RRECOMMENDS_${PN} = "lighttpd-module-access \
> - lighttpd-module-accesslog"
> -
> -SRC_URI = 
> "http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
> -file://index.html.lighttpd \
> -file://lighttpd.conf \
> -file://lighttpd \
> -file://lighttpd.service \
> -
> file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch \
> -"
> -
> -SRC_URI[md5sum] = "95eda531c27b161ef8fa2b9bf4948caf"
> -SRC_URI[sha256sum] = 
> "fe0c4a06dd2408a83ee7a2bfedc45e09597f3313cbda82485507573ae8fa948a"
> -
> -PACKAGECONFIG ??= "openssl pcre zlib \
> -${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
> -${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'lfs', '', d)} \
> -${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
> -"
> -PACKAGECONFIG[lfs] = "--enable-lfs,--disable-lfs"
> -PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
> -PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
> -PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
> -PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
> -PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
> -PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
> -PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
> -PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
> -PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
> -PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
> -PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
> -PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
> -PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
> -PACKAGECONFIG[webdav-props] = 
> "--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
> -PACKAGECONFIG[webdav-locks] = 
> "--with-webdav-locks,--without-webdav-locks,util-linux"
> -PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
> -PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
> -PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
> -
> -inherit autotools pkgconfig update-rc.d gettext systemd
> -
> -INITSCRIPT_NAME = "lighttpd"
> -INITSCRIPT_PARAMS = "defaults 70"
> -
> -SYSTEMD_SERVICE_${PN} = "lighttpd.service"
> -
> -do_install_append() {
> - install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d 
> ${D}/www/pages/dav
> - install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
> - install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
> - install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
> -
> - install -d ${D}${systemd_unitdir}/system
> - install -m 0644 ${WORKDIR}/lighttpd.service 
> ${D}${systemd_unitdir}/system
> - sed -i -e 's,@SBINDIR@,${sbindir},g' \
> - -e 's,@SYSCONFDIR@,${sysconfdir},g' \
> - -e 's,@BASE_BINDIR@,${base_bindir},g' \
> - ${D}${systemd_unitdir}/system/lighttpd.service
> - #For FHS compliance, create symbolic links to /var/log and /var/tmp for 
> logs and temporary data
> - ln -sf ${localstatedir}/log ${D}/www/logs
> - ln -sf ${localstatedir}/tmp ${D}/www/var
> -}
> -
> -FILES_${PN} += "${sysconfdir} /www"
> -
> -CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
> -
> -PACKAGES_DYNAMIC += "^lighttpd-module-.*"
> -
> -python populate_packages_prepend () {
> -lighttpd_libdir = d.expand('${libdir}')
> -do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 
> 'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
> -}
> diff --git 

Re: [OE-core] [PATCH 04/13] ncurses: 6.0+20160625 -> 6.0+20161126

2017-02-10 Thread Khem Raj


On 2/10/17 2:57 AM, Burton, Ross wrote:
> 
> On 9 February 2017 at 06:45, Hongxu Jia  > wrote:
> 
> Signed-off-by: Hongxu Jia  >
> 
> 
> This upgrade is failing all over the autobuilder.  I'm guessing it's due
> to this new warning in the configure log:
> 
> checking $CC variable... broken
> configure: WARNING: your environment misuses the CC variable to hold
> CFLAGS/CPPFLAGS options

this is being too picky, why does it prefer to have a bare compiler
binary only for CC

> 
> 
> Because later on:
> 
> checking for getcwd... no
> checking for getegid... no
> checking for geteuid... no
> checking for getopt... no
> checking for poll... no
> checking for putenv... no
> checking for select... no
> ...
> configure: error: getopt is required for building programs
> 
> 
> I'm pretty sure those failures are not accurate!
> 
> Ross
> 
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [OE-Core][PATCH v2] uboot-extlinux-config.bbclass: add support for timeout & default

2017-02-10 Thread Khem Raj


On 2/9/17 5:06 PM, Dalon Westergreen wrote:
> When multible targets are defined it is useful to allow for
> a default target along with a timeout.  After timeout, the
> default target will be selected.
> 
> Signed-off-by: Dalon Westergreen 
> 

this looks good to me.

> --
> v2:
>  - fixed UnboundLocalError
> ---
>  meta/classes/uboot-extlinux-config.bbclass | 17 +
>  1 file changed, 17 insertions(+)
> 
> diff --git a/meta/classes/uboot-extlinux-config.bbclass 
> b/meta/classes/uboot-extlinux-config.bbclass
> index ec5fffb..f075a37 100644
> --- a/meta/classes/uboot-extlinux-config.bbclass
> +++ b/meta/classes/uboot-extlinux-config.bbclass
> @@ -16,6 +16,10 @@
>  #concatenate and use as an initrd 
> (optional).
>  # UBOOT_EXTLINUX_MENU_DESCRIPTION  - Name to use as description.
>  # UBOOT_EXTLINUX_ROOT  - Root kernel cmdline.
> +# UBOOT_EXTLINUX_TIMEOUT   - Timeout before DEFAULT selection is 
> made.
> +#Measured in 1/10 of a second.
> +# UBOOT_EXTLINUX_DEFAULT_LABEL - Target to be selected by default after
> +#the timeout period
>  #
>  # If there's only one label system will boot automatically and menu won't be
>  # created. If you want to use more than one labels, e.g linux and alternate,
> @@ -25,6 +29,9 @@
>  #
>  # UBOOT_EXTLINUX_LABELS ??= "default fallback"
>  #
> +# UBOOT_EXTLINUX_DEFAULT_LABEL ??= "Linux Default"
> +# UBOOT_EXTLINUX_TIMEOUT ??= "30"
> +#
>  # UBOOT_EXTLINUX_KERNEL_IMAGE_default ??= "../zImage"
>  # UBOOT_EXTLINUX_MENU_DESCRIPTION_default ??= "Linux Default"
>  #
> @@ -34,6 +41,8 @@
>  # Results:
>  #
>  # menu title Select the boot mode
> +# TIMEOUT 30
> +# DEFAULT Linux Default
>  # LABEL Linux Default
>  #   KERNEL ../zImage
>  #   FDTDIR ../
> @@ -82,6 +91,14 @@ python create_extlinux_config() {
>  if len(labels.split()) > 1:
>  cfgfile.write('menu title Select the boot mode\n')
>  
> +timeout =  d.getVar('UBOOT_EXTLINUX_TIMEOUT')
> +if timeout:
> +cfgfile.write('TIMEOUT %s\n' % (timeout))
> +
> +default = d.getVar('UBOOT_EXTLINUX_DEFAULT_LABEL')
> +if default:
> +cfgfile.write('DEFAULT %s\n' % (default))
> +
>  for label in labels.split():
>  localdata = bb.data.createCopy(d)
>  
> 
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH] insane.bbclass: print QA message correctly

2017-02-10 Thread Christopher Larson
On Thu, Feb 9, 2017 at 9:01 AM, Stephano Cetola <
stephano.cet...@linux.intel.com> wrote:

> When checking for ".debug" files, print QA message correctly.
>
> Fixes [YOCTO #11014]
>
> introduced in OE-core revision 1dcb38ca9d6
>
> Signed-off-by: Stephano Cetola 
>

Just a note that nowhere in this commit message does it actually say what
the problem is. It’s now correct, so what was it doing before? It’s not
ideal to have to go check the bug tracking system to find out exactly what
problem a commit is fixing.
-- 
Christopher Larson
kergoth at gmail 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


Re: [OE-core] [PATCH 01/23] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge

2017-02-10 Thread Christopher Larson
On Fri, Feb 10, 2017 at 6:42 AM, Amarnath Valluri <
amarnath.vall...@intel.com> wrote:

> From: Joshua Lock 
>
> Modify bindir, libdir and sbindir to be exec_prefix/$d, rather than
> base_prefix/$d, when the usrmerge DISTRO_FEATURE is enabled.
>
> Signed-off-by: Joshua Lock 
>

This looks interesting, but worth noting that this will invalidate all
sstates everywhere, as sstate uses unexpanded variables. So even if the
feature is gone, it’ll change the checksums anyway. That’s probably okay,
just something to keep in mind.
-- 
Christopher Larson
kergoth at gmail 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


Re: [OE-core] State of bitbake world, Failed tasks 2017-02-08

2017-02-10 Thread Martin Jansa
On Fri, Feb 10, 2017 at 09:28:11AM +0100, Martin Jansa wrote:
> == Number of issues - stats ==
> {| class='wikitable'
> !|Date !!colspan='3'|Failed tasks 
> !!colspan='6'|Failed depencencies!!|Signatures
> !!colspan='12'|QA !!Comment
> |-
> ||||qemuarm   ||qemux86   ||qemux86_64
> ||qemuarm||max||min ||qemux86||max||min ||all   ||already-stripped
>   ||libdir||textrel   ||build-deps||file-rdeps
> ||version-going-backwards   ||host-user-contaminated
> ||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot  
>   ||invalid-pkgconfig ||pkgname   ||  
> |-
> ||2017-02-08  ||96||100   ||100   ||N/A   ||N/A   ||N/A   ||N/A   ||N/A   
> ||N/A   ||0 ||0 ||0 ||2 ||0   
>   ||6 ||36||0 ||0 ||0 
> ||0 ||0 ||0 ||  
> |}

During this weekend I plan to start adding PNBLACKLISTs to failed recipes.

With this number of failures the builds don't help to spot new issues.

If you care about some of the listed recipes, please send patches or at
least send e-mail saying that you plan to fix them soonish.

Many of these failures aren't hard to fix, I have already fixed all
recipes I care about (which are included in some images I'm building),
but I don't want to spend more time fixing (or even building) recipes
nobody uses (or cares about).

If you don't send the fixes before Sunday evening, than no big deal,
you will just need to update commit with the fix to also remove the
PNBLACKLIST from the recipe before sending it to ML.

Regards,


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


[OE-core] ✗ patchtest: failure for #10619: refactor wic codebase. Part 3

2017-02-10 Thread Patchwork
== Series Details ==

Series: #10619: refactor wic codebase. Part 3
Revision: 1
URL   : https://patchwork.openembedded.org/series/5263/
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 d1109378d7)



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 08/13] wic: direct: add 'realnum' attribute to partition

2017-02-10 Thread Ed Bartosh
Replaced call of _get_part_num method with an attribute.
This eliminates the need to call the method and loop over
partitions every time we need to know realnum for partition.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 46 ++--
 1 file changed, 20 insertions(+), 26 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index d0a1cad..ffe6c84 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -74,6 +74,19 @@ class DirectPlugin(ImagerPlugin):
 self.ptable_format = self.ks.bootloader.ptable
 self.parts = self.ks.partitions
 
+# calculate the real partition number, accounting for partitions not
+# in the partition table and logical partitions
+realnum = 0
+for part in self.parts:
+if part.no_table:
+part.realnum = 0
+else:
+realnum += 1
+if self.ptable_format == 'msdos' and realnum > 3:
+part.realnum = realnum + 1
+continue
+part.realnum = realnum
+
 def do_create(self):
 """
 Plugin entry point.
@@ -86,22 +99,6 @@ class DirectPlugin(ImagerPlugin):
 finally:
 self.cleanup()
 
-def _get_part_num(self, num, parts):
-"""calculate the real partition number, accounting for partitions not
-in the partition table and logical partitions
-"""
-realnum = 0
-for pnum, part in enumerate(parts, 1):
-if not part.no_table:
-realnum += 1
-if pnum == num:
-if  part.no_table:
-return 0
-if self.ptable_format == 'msdos' and realnum > 3:
-# account for logical partition numbering, ex. sda5..
-return realnum + 1
-return realnum
-
 def _write_fstab(self, image_rootfs):
 """overriden to generate fstab (temporarily) in rootfs. This is called
 from _create, make sure it doesn't get called from
@@ -128,15 +125,14 @@ class DirectPlugin(ImagerPlugin):
 def _update_fstab(self, fstab_lines, parts):
 """Assume partition order same as in wks"""
 updated = False
-for num, part in enumerate(parts, 1):
-pnum = self._get_part_num(num, parts)
-if not pnum or not part.mountpoint \
+for part in parts:
+if not part.realnum or not part.mountpoint \
or part.mountpoint in ("/", "/boot"):
 continue
 
 # mmc device partitions are named mmcblk0p1, mmcblk0p2..
 prefix = 'p' if  part.disk.startswith('mmcblk') else ''
-device_name = "/dev/%s%s%d" % (part.disk, prefix, pnum)
+device_name = "/dev/%s%s%d" % (part.disk, prefix, part.realnum)
 
 opts = part.fsopts if part.fsopts else "defaults"
 line = "\t".join([device_name, part.mountpoint, part.fstype,
@@ -164,7 +160,7 @@ class DirectPlugin(ImagerPlugin):
 self._image = PartitionedImage(image_path, self.ptable_format,
self.native_sysroot)
 
-for num, part in enumerate(self.parts, 1):
+for part in self.parts:
 # as a convenience, set source to the boot partition source
 # instead of forcing it to be set via bootloader --source
 if not self.ks.bootloader.source and part.mountpoint == "/boot":
@@ -175,8 +171,7 @@ class DirectPlugin(ImagerPlugin):
 if self.ptable_format == 'gpt':
 part.uuid = str(uuid.uuid4())
 else: # msdos partition table
-part.uuid = '%0x-%02d' % (self._image.identifier,
-  self._get_part_num(num, 
self.parts))
+part.uuid = '%0x-%02d' % (self._image.identifier, 
part.realnum)
 
 fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
@@ -277,14 +272,13 @@ class DirectPlugin(ImagerPlugin):
 
 Assume partition order same as in wks
 """
-for num, part in enumerate(self.parts, 1):
+for part in self.parts:
 if part.mountpoint == "/":
 if part.uuid:
 return "PARTUUID=%s" % part.uuid
 else:
 suffix = 'p' if part.disk.startswith('mmcblk') else ''
-pnum = self._get_part_num(num, self.parts)
-return "/dev/%s%s%-d" % (part.disk, suffix, pnum)
+return "/dev/%s%s%-d" % (part.disk, suffix, part.realnum)
 
 def cleanup(self):
 if self._image:
-- 
2.1.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org

[OE-core] [PATCH 04/13] wic: ksparser: set default disk to 'sda'

2017-02-10 Thread Ed Bartosh
Set default value of --ondisk to 'sda' to ensure
we always have disk name for the partition.

This is a first step of replacing --ondisk with
disk  attribute of .wks. This is better as
all partitions share the same disk.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/ksparser.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/lib/wic/ksparser.py b/scripts/lib/wic/ksparser.py
index 41d3cc6..d9fa805 100644
--- a/scripts/lib/wic/ksparser.py
+++ b/scripts/lib/wic/ksparser.py
@@ -135,7 +135,7 @@ class KickStart():
 part.add_argument('--fstype')
 part.add_argument('--label')
 part.add_argument('--no-table', action='store_true')
-part.add_argument('--ondisk', '--ondrive', dest='disk')
+part.add_argument('--ondisk', '--ondrive', dest='disk', default='sda')
 part.add_argument("--overhead-factor", type=overheadtype)
 part.add_argument('--part-type')
 part.add_argument('--rootfs-dir')
-- 
2.1.4

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


[OE-core] [PATCH 07/13] wic: direct: remove useless code

2017-02-10 Thread Ed Bartosh
Removed catching CreatorError and raising it again.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index 9bcccb3..d0a1cad 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -35,7 +35,7 @@ from wic.filemap import sparse_copy
 from wic.ksparser import KickStart, KickStartError
 from wic.plugin import pluginmgr
 from wic.pluginbase import ImagerPlugin
-from wic.utils.errors import CreatorError, ImageError
+from wic.utils.errors import ImageError
 from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
 
 class DirectPlugin(ImagerPlugin):
@@ -83,8 +83,6 @@ class DirectPlugin(ImagerPlugin):
 self.assemble()
 self.finalize()
 self.print_info()
-except CreatorError:
-raise
 finally:
 self.cleanup()
 
-- 
2.1.4

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


[OE-core] [PATCH 13/13] wic: direct: move creation of PartitionedImage to __init__

2017-02-10 Thread Ed Bartosh
Moved creation of PartitionedImage object from DirectPlugin.create
method to init. It makes the code a bit more readable and logical.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index c517904..481d24d 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -81,6 +81,10 @@ class DirectPlugin(ImagerPlugin):
 self.ks.bootloader.source = part.source
 break
 
+image_path = self._full_path(self.workdir, self.parts[0].disk, 
"direct")
+self._image = PartitionedImage(image_path, self.ptable_format,
+   self.parts, self.native_sysroot)
+
 def do_create(self):
 """
 Plugin entry point.
@@ -150,10 +154,6 @@ class DirectPlugin(ImagerPlugin):
 filesystems from the artifacts directly and combine them into
 a partitioned image.
 """
-image_path = self._full_path(self.workdir, self.parts[0].disk, 
"direct")
-self._image = PartitionedImage(image_path, self.ptable_format,
-   self.parts, self.native_sysroot)
-
 fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
 for part in self.parts:
-- 
2.1.4

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


[OE-core] [PATCH 12/13] wic: direct: move generation of part.realnum to PartitionedImage

2017-02-10 Thread Ed Bartosh
Moved the code that generates real partition numbers from DirectPlugin
to PartitionedImage.

The idea is to have all code that works with partitions
in PartitionedImage class.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 26 +-
 1 file changed, 13 insertions(+), 13 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index 9c4109e..c517904 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -74,19 +74,6 @@ class DirectPlugin(ImagerPlugin):
 self.ptable_format = self.ks.bootloader.ptable
 self.parts = self.ks.partitions
 
-# calculate the real partition number, accounting for partitions not
-# in the partition table and logical partitions
-realnum = 0
-for part in self.parts:
-if part.no_table:
-part.realnum = 0
-else:
-realnum += 1
-if self.ptable_format == 'msdos' and realnum > 3:
-part.realnum = realnum + 1
-continue
-part.realnum = realnum
-
 # as a convenience, set source to the boot partition source
 # instead of forcing it to be set via bootloader --source
 for part in self.parts:
@@ -317,6 +304,19 @@ class PartitionedImage():
 self.sector_size = SECTOR_SIZE
 self.native_sysroot = native_sysroot
 
+# calculate the real partition number, accounting for partitions not
+# in the partition table and logical partitions
+realnum = 0
+for part in self.partitions:
+if part.no_table:
+part.realnum = 0
+else:
+realnum += 1
+if self.ptable_format == 'msdos' and realnum > 3:
+part.realnum = realnum + 1
+continue
+part.realnum = realnum
+
 # generate parition UUIDs
 for part in self.partitions:
 if not part.uuid and part.use_uuid:
-- 
2.1.4

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


[OE-core] [PATCH 10/13] wic: direct: set bootloader.source in the __init__

2017-02-10 Thread Ed Bartosh
Moved setting of bootloader source from do_create method
to __init__ as it doesn't have anything to do with image
creation.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 13 +++--
 1 file changed, 7 insertions(+), 6 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index 18cd277..64a3368 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -87,6 +87,13 @@ class DirectPlugin(ImagerPlugin):
 continue
 part.realnum = realnum
 
+# as a convenience, set source to the boot partition source
+# instead of forcing it to be set via bootloader --source
+for part in self.parts:
+if not self.ks.bootloader.source and part.mountpoint == "/boot":
+self.ks.bootloader.source = part.source
+break
+
 def do_create(self):
 """
 Plugin entry point.
@@ -160,12 +167,6 @@ class DirectPlugin(ImagerPlugin):
 self._image = PartitionedImage(image_path, self.ptable_format,
self.parts, self.native_sysroot)
 
-for part in self.parts:
-# as a convenience, set source to the boot partition source
-# instead of forcing it to be set via bootloader --source
-if not self.ks.bootloader.source and part.mountpoint == "/boot":
-self.ks.bootloader.source = part.source
-
 fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
 for part in self.parts:
-- 
2.1.4

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


[OE-core] [PATCH 11/13] wic: direct: add PartitionedImage.prepare method

2017-02-10 Thread Ed Bartosh
Moved code that calls prepare method of Partition objects
from DirectPlugin to PartitionedImage.prepare.

The idea is to have all code that works with partitions
in PartitionedImage class.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 24 +++-
 1 file changed, 11 insertions(+), 13 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index 64a3368..9c4109e 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -182,12 +182,8 @@ class DirectPlugin(ImagerPlugin):
 rsize_bb = get_bitbake_var('ROOTFS_SIZE', image_name)
 if rsize_bb:
 part.size = int(round(float(rsize_bb)))
-# need to create the filesystems in order to get their
-# sizes before we can add them and do the layout.
-part.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
- self.bootimg_dir, self.kernel_dir, 
self.native_sysroot)
 
-self._image.add_partition(part)
+self._image.prepare(self)
 
 if fstab_path:
 shutil.move(fstab_path + ".orig", fstab_path)
@@ -329,15 +325,17 @@ class PartitionedImage():
 else: # msdos partition table
 part.uuid = '%0x-%02d' % (self.identifier, part.realnum)
 
-def add_partition(self, part):
-"""
-Add the next partition. Partitions have to be added in the
-first-to-last order.
-"""
-part.ks_pnum = len(self.partitions)
+def prepare(self, imager):
+"""Prepare an image. Call prepare method of all image partitions."""
+for part in self.partitions:
+# need to create the filesystems in order to get their
+# sizes before we can add them and do the layout.
+part.prepare(imager, imager.workdir, imager.oe_builddir,
+ imager.rootfs_dir, imager.bootimg_dir,
+ imager.kernel_dir, imager.native_sysroot)
 
-# Converting kB to sectors for parted
-part.size_sec = part.disk_size * 1024 // self.sector_size
+# Converting kB to sectors for parted
+part.size_sec = part.disk_size * 1024 // self.sector_size
 
 def layout_partitions(self):
 """ Layout the partitions, meaning calculate the position of every
-- 
2.1.4

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


[OE-core] [PATCH 09/13] wic: direct: move UUID generation to PartitionedImage

2017-02-10 Thread Ed Bartosh
Moved code that generates partition UUIDs from DirectPlugin to
PartitionedImage class as it's more logical to have it there.
This allows the code to be reused by other imager plugins.

Got rid of having yet another list of partitions in PartitionedImage.
Reused the list passed from DirectPlugin.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 23 +++
 1 file changed, 11 insertions(+), 12 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index ffe6c84..18cd277 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -158,7 +158,7 @@ class DirectPlugin(ImagerPlugin):
 """
 image_path = self._full_path(self.workdir, self.parts[0].disk, 
"direct")
 self._image = PartitionedImage(image_path, self.ptable_format,
-   self.native_sysroot)
+   self.parts, self.native_sysroot)
 
 for part in self.parts:
 # as a convenience, set source to the boot partition source
@@ -166,13 +166,6 @@ class DirectPlugin(ImagerPlugin):
 if not self.ks.bootloader.source and part.mountpoint == "/boot":
 self.ks.bootloader.source = part.source
 
-# generate parition UUIDs
-if not part.uuid and part.use_uuid:
-if self.ptable_format == 'gpt':
-part.uuid = str(uuid.uuid4())
-else: # msdos partition table
-part.uuid = '%0x-%02d' % (self._image.identifier, 
part.realnum)
-
 fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
 for part in self.parts:
@@ -310,7 +303,7 @@ class PartitionedImage():
 Partitioned image in a file.
 """
 
-def __init__(self, path, ptable_format, native_sysroot=None):
+def __init__(self, path, ptable_format, partitions, native_sysroot=None):
 self.path = path  # Path to the image file
 self.numpart = 0  # Number of allocated partitions
 self.realpart = 0 # Number of partitions in the partition table
@@ -321,12 +314,20 @@ class PartitionedImage():
 # Disk system identifier
 self.identifier = int.from_bytes(os.urandom(4), 'little')
 
-self.partitions = []
+self.partitions = partitions
 self.partimages = []
 # Size of a sector used in calculations
 self.sector_size = SECTOR_SIZE
 self.native_sysroot = native_sysroot
 
+# generate parition UUIDs
+for part in self.partitions:
+if not part.uuid and part.use_uuid:
+if self.ptable_format == 'gpt':
+part.uuid = str(uuid.uuid4())
+else: # msdos partition table
+part.uuid = '%0x-%02d' % (self.identifier, part.realnum)
+
 def add_partition(self, part):
 """
 Add the next partition. Partitions have to be added in the
@@ -337,8 +338,6 @@ class PartitionedImage():
 # Converting kB to sectors for parted
 part.size_sec = part.disk_size * 1024 // self.sector_size
 
-self.partitions.append(part)
-
 def layout_partitions(self):
 """ Layout the partitions, meaning calculate the position of every
 partition on the disk. The 'ptable_format' parameter defines the
-- 
2.1.4

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


[OE-core] [PATCH 06/13] wic: direct: don't catch ImagerError

2017-02-10 Thread Ed Bartosh
Don't transform ImagerError exception into warning.
Let wic to catch it on the upper level.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 5 +
 1 file changed, 1 insertion(+), 4 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index a2bc4c4..9bcccb3 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -290,10 +290,7 @@ class DirectPlugin(ImagerPlugin):
 
 def cleanup(self):
 if self._image:
-try:
-self._image.cleanup()
-except ImageError as err:
-msger.warning("%s" % err)
+self._image.cleanup()
 
 # Move results to the output dir
 if not os.path.exists(self.outdir):
-- 
2.1.4

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


[OE-core] [PATCH 03/13] wic: remove utils/oe/__init__.py

2017-02-10 Thread Ed Bartosh
This file and utils/oe folder are not needed anymore as
all modules were removed or moved out of this directory.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/utils/oe/__init__.py | 22 --
 1 file changed, 22 deletions(-)
 delete mode 100644 scripts/lib/wic/utils/oe/__init__.py

diff --git a/scripts/lib/wic/utils/oe/__init__.py 
b/scripts/lib/wic/utils/oe/__init__.py
deleted file mode 100644
index 0a81575..000
--- a/scripts/lib/wic/utils/oe/__init__.py
+++ /dev/null
@@ -1,22 +0,0 @@
-#
-# OpenEmbedded wic utils library
-#
-# Copyright (c) 2013, Intel Corporation.
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License version 2 as
-# published by the Free Software Foundation.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License along
-# with this program; if not, write to the Free Software Foundation, Inc.,
-# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-#
-# AUTHORS
-# Tom Zanussi 
-#
-- 
2.1.4

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


[OE-core] [PATCH 05/13] wic: direct: remove set_bootimg_dir setter

2017-02-10 Thread Ed Bartosh
Removed java-like setter set_bootimg_dir. It's more pythonic
to access public attributes directly.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 9 -
 scripts/lib/wic/plugins/source/bootimg-efi.py| 2 +-
 scripts/lib/wic/plugins/source/bootimg-pcbios.py | 2 +-
 3 files changed, 2 insertions(+), 11 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index 1204431..a2bc4c4 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -149,15 +149,6 @@ class DirectPlugin(ImagerPlugin):
 
 return updated
 
-def set_bootimg_dir(self, bootimg_dir):
-"""
-Accessor for bootimg_dir, the actual location used for the source
-of the bootimg.  Should be set by source plugins (only if they
-change the default bootimg source) so the correct info gets
-displayed for print_outimage_info().
-"""
-self.bootimg_dir = bootimg_dir
-
 def _full_path(self, path, name, extention):
 """ Construct full file path to a file we generate. """
 return os.path.join(path, "%s-%s.%s" % (self.name, name, extention))
diff --git a/scripts/lib/wic/plugins/source/bootimg-efi.py 
b/scripts/lib/wic/plugins/source/bootimg-efi.py
index dd6c920..95316c8 100644
--- a/scripts/lib/wic/plugins/source/bootimg-efi.py
+++ b/scripts/lib/wic/plugins/source/bootimg-efi.py
@@ -187,7 +187,7 @@ class BootimgEFIPlugin(SourcePlugin):
 if not bootimg_dir:
 msger.error("Couldn't find DEPLOY_DIR_IMAGE, exiting\n")
 # just so the result notes display it
-creator.set_bootimg_dir(bootimg_dir)
+creator.bootimg_dir = bootimg_dir
 
 staging_kernel_dir = kernel_dir
 
diff --git a/scripts/lib/wic/plugins/source/bootimg-pcbios.py 
b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
index 0be2b78..e5f6a32 100644
--- a/scripts/lib/wic/plugins/source/bootimg-pcbios.py
+++ b/scripts/lib/wic/plugins/source/bootimg-pcbios.py
@@ -151,7 +151,7 @@ class BootimgPcbiosPlugin(SourcePlugin):
 if not _has_syslinux(bootimg_dir):
 msger.error("Please build syslinux first\n")
 # just so the result notes display it
-creator.set_bootimg_dir(bootimg_dir)
+creator.bootimg_dir = bootimg_dir
 
 staging_kernel_dir = kernel_dir
 
-- 
2.1.4

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


[OE-core] [PATCH 02/13] wic: move PartitionedImage class to direct.py

2017-02-10 Thread Ed Bartosh
As PartitionedImage is only used in direct.py it makes sense
to move it there. It's easier to maintain (and refactor) it
this way.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py | 278 +++-
 scripts/lib/wic/utils/partitionedfs.py   | 301 ---
 2 files changed, 276 insertions(+), 303 deletions(-)
 delete mode 100644 scripts/lib/wic/utils/partitionedfs.py

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index fefe88e..1204431 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -31,13 +31,12 @@ import tempfile
 from time import strftime
 
 from wic import msger
+from wic.filemap import sparse_copy
 from wic.ksparser import KickStart, KickStartError
 from wic.plugin import pluginmgr
 from wic.pluginbase import ImagerPlugin
 from wic.utils.errors import CreatorError, ImageError
 from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
-from wic.utils.partitionedfs import PartitionedImage
-
 
 class DirectPlugin(ImagerPlugin):
 """
@@ -316,3 +315,278 @@ class DirectPlugin(ImagerPlugin):
 
 # remove work directory
 shutil.rmtree(self.workdir, ignore_errors=True)
+
+# Overhead of the MBR partitioning scheme (just one sector)
+MBR_OVERHEAD = 1
+
+# Overhead of the GPT partitioning scheme
+GPT_OVERHEAD = 34
+
+# Size of a sector in bytes
+SECTOR_SIZE = 512
+
+class PartitionedImage():
+"""
+Partitioned image in a file.
+"""
+
+def __init__(self, path, ptable_format, native_sysroot=None):
+self.path = path  # Path to the image file
+self.numpart = 0  # Number of allocated partitions
+self.realpart = 0 # Number of partitions in the partition table
+self.offset = 0   # Offset of next partition (in sectors)
+self.min_size = 0 # Minimum required disk size to fit
+  # all partitions (in bytes)
+self.ptable_format = ptable_format  # Partition table format
+# Disk system identifier
+self.identifier = int.from_bytes(os.urandom(4), 'little')
+
+self.partitions = []
+self.partimages = []
+# Size of a sector used in calculations
+self.sector_size = SECTOR_SIZE
+self.native_sysroot = native_sysroot
+
+def add_partition(self, part):
+"""
+Add the next partition. Partitions have to be added in the
+first-to-last order.
+"""
+part.ks_pnum = len(self.partitions)
+
+# Converting kB to sectors for parted
+part.size_sec = part.disk_size * 1024 // self.sector_size
+
+self.partitions.append(part)
+
+def layout_partitions(self):
+""" Layout the partitions, meaning calculate the position of every
+partition on the disk. The 'ptable_format' parameter defines the
+partition table format and may be "msdos". """
+
+msger.debug("Assigning %s partitions to disks" % self.ptable_format)
+
+# Go through partitions in the order they are added in .ks file
+for num in range(len(self.partitions)):
+part = self.partitions[num]
+
+if self.ptable_format == 'msdos' and part.part_type:
+# The --part-type can also be implemented for MBR partitions,
+# in which case it would map to the 1-byte "partition type"
+# filed at offset 3 of the partition entry.
+raise ImageError("setting custom partition type is not " \
+ "implemented for msdos partitions")
+
+# Get the disk where the partition is located
+self.numpart += 1
+if not part.no_table:
+self.realpart += 1
+
+if self.numpart == 1:
+if self.ptable_format == "msdos":
+overhead = MBR_OVERHEAD
+elif self.ptable_format == "gpt":
+overhead = GPT_OVERHEAD
+
+# Skip one sector required for the partitioning scheme overhead
+self.offset += overhead
+
+if self.realpart > 3:
+# Reserve a sector for EBR for every logical partition
+# before alignment is performed.
+if self.ptable_format == "msdos":
+self.offset += 1
+
+if part.align:
+# If not first partition and we do have alignment set we need
+# to align the partition.
+# FIXME: This leaves a empty spaces to the disk. To fill the
+# gaps we could enlargea the previous partition?
+
+# Calc how much the alignment is off.
+align_sectors = self.offset % (part.align * 1024 // 
self.sector_size)
+
+if align_sectors:
+# If partition is not aligned as required, we need
+

[OE-core] [PATCH 01/13] wic: move disk operations to PartitionImage class

2017-02-10 Thread Ed Bartosh
Disk operations were spread over DirectPlugin, DiskImage and Image
code making the code hard to understand.

Renamed Image class to PartitionedImage.
Removed DiskImage class.
Moved disk operations to PartitionedImage.

There was an implicit support for multiple disks: if different devices
were specified in .wks file (e.g. --ondisk sda and --ondisk sdb), wic
would theoretically generate multiple images. This is quite confusing
option and the code supporting it was broken for a long time. The same
effect (multiple output images) can be achieved in obvious and clear
way - by using multiple .wks files.

This functionality was removed. PartitionedImage works only with
one image. This makes the code less complex and easier to maintain.

Signed-off-by: Ed Bartosh 
---
 scripts/lib/wic/plugins/imager/direct.py   |  97 ---
 scripts/lib/wic/plugins/source/bootimg-pcbios.py   |   2 +-
 .../lib/wic/plugins/source/isoimage-isohybrid.py   |  10 +-
 .../lib/wic/plugins/source/rootfs_pcbios_ext.py|   4 +-
 scripts/lib/wic/utils/partitionedfs.py | 194 -
 5 files changed, 111 insertions(+), 196 deletions(-)

diff --git a/scripts/lib/wic/plugins/imager/direct.py 
b/scripts/lib/wic/plugins/imager/direct.py
index a9144e2..fefe88e 100644
--- a/scripts/lib/wic/plugins/imager/direct.py
+++ b/scripts/lib/wic/plugins/imager/direct.py
@@ -36,25 +36,8 @@ from wic.plugin import pluginmgr
 from wic.pluginbase import ImagerPlugin
 from wic.utils.errors import CreatorError, ImageError
 from wic.utils.misc import get_bitbake_var, exec_cmd, exec_native_cmd
-from wic.utils.partitionedfs import Image
+from wic.utils.partitionedfs import PartitionedImage
 
-class DiskImage():
-"""
-A Disk backed by a file.
-"""
-def __init__(self, device, size):
-self.size = size
-self.device = device
-self.created = False
-
-def create(self):
-if self.created:
-return
-# create sparse disk image
-with open(self.device, 'w') as sparse:
-os.ftruncate(sparse.fileno(), self.size)
-
-self.created = True
 
 class DirectPlugin(ImagerPlugin):
 """
@@ -189,9 +172,10 @@ class DirectPlugin(ImagerPlugin):
 filesystems from the artifacts directly and combine them into
 a partitioned image.
 """
-self._image = Image(self.native_sysroot)
+image_path = self._full_path(self.workdir, self.parts[0].disk, 
"direct")
+self._image = PartitionedImage(image_path, self.ptable_format,
+   self.native_sysroot)
 
-disk_ids = {}
 for num, part in enumerate(self.parts, 1):
 # as a convenience, set source to the boot partition source
 # instead of forcing it to be set via bootloader --source
@@ -203,10 +187,8 @@ class DirectPlugin(ImagerPlugin):
 if self.ptable_format == 'gpt':
 part.uuid = str(uuid.uuid4())
 else: # msdos partition table
-if part.disk not in disk_ids:
-disk_ids[part.disk] = int.from_bytes(os.urandom(4), 
'little')
-disk_id = disk_ids[part.disk]
-part.uuid = '%0x-%02d' % (disk_id, self._get_part_num(num, 
self.parts))
+part.uuid = '%0x-%02d' % (self._image.identifier,
+  self._get_part_num(num, 
self.parts))
 
 fstab_path = self._write_fstab(self.rootfs_dir.get("ROOTFS_DIR"))
 
@@ -225,11 +207,6 @@ class DirectPlugin(ImagerPlugin):
 part.size = int(round(float(rsize_bb)))
 # need to create the filesystems in order to get their
 # sizes before we can add them and do the layout.
-# Image.create() actually calls __format_disks() to create
-# the disk images and carve out the partitions, then
-# self.assemble() calls Image.assemble() which calls
-# __write_partitition() for each partition to dd the fs
-# into the partitions.
 part.prepare(self, self.workdir, self.oe_builddir, self.rootfs_dir,
  self.bootimg_dir, self.kernel_dir, 
self.native_sysroot)
 
@@ -238,26 +215,14 @@ class DirectPlugin(ImagerPlugin):
 if fstab_path:
 shutil.move(fstab_path + ".orig", fstab_path)
 
-self._image.layout_partitions(self.ptable_format)
-
-for disk_name, disk in self._image.disks.items():
-full_path = self._full_path(self.workdir, disk_name, "direct")
-msger.debug("Adding disk %s as %s with size %s bytes" \
-% (disk_name, full_path, disk['min_size']))
-disk_obj = DiskImage(full_path, disk['min_size'])
-self._image.add_disk(disk_name, disk_obj, disk_ids.get(disk_name))
-
+self._image.layout_partitions()
 

[OE-core] [PATCH 00/13] #10619: refactor wic codebase. Part 3

2017-02-10 Thread Ed Bartosh
Hi,

This patchset introduces PartitionedImage class and moves partition
operations to it. This should simplify the API and make it easier
to understand and maintain.

The following changes since commit 5ea229d46a6ef4a197564815c51ee4c5d23a00c9:

  wic: remove unused argument scripts_path (2017-02-09 16:10:56 +0200)

are available in the git repository at:

  git://git.yoctoproject.org/poky-contrib ed/wic/wip
  http://git.yoctoproject.org/cgit.cgi/poky-contrib/log/?h=ed/wic/wip

Ed Bartosh (13):
  wic: move disk operations to PartitionImage class
  wic: move PartitionedImage class to direct.py
  wic: remove utils/oe/__init__.py
  wic: ksparser: set default disk to 'sda'
  wic: direct: remove set_bootimg_dir setter
  wic: direct: don't catch ImagerError
  wic: direct: remove useless code
  wic: direct: add 'realnum' attribute to partition
  wic: direct: move UUID generation to PartitionedImage
  wic: direct: set bootloader.source in the __init__
  wic: direct: add PartitionedImage.prepare method
  wic: direct: move generation of part.realnum to PartitionedImage
  wic: direct: move creation of PartitionedImage to __init__

 scripts/lib/wic/ksparser.py|   2 +-
 scripts/lib/wic/plugins/imager/direct.py   | 465 +++--
 scripts/lib/wic/plugins/source/bootimg-efi.py  |   2 +-
 scripts/lib/wic/plugins/source/bootimg-pcbios.py   |   4 +-
 .../lib/wic/plugins/source/isoimage-isohybrid.py   |  10 +-
 .../lib/wic/plugins/source/rootfs_pcbios_ext.py|   4 +-
 scripts/lib/wic/utils/oe/__init__.py   |  22 -
 scripts/lib/wic/utils/partitionedfs.py | 345 ---
 8 files changed, 349 insertions(+), 505 deletions(-)
 delete mode 100644 scripts/lib/wic/utils/oe/__init__.py
 delete mode 100644 scripts/lib/wic/utils/partitionedfs.py

--
Regards,
Ed

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


[OE-core] [PATCH v2 17/23] libarchive: Backport upstream fixes.

2017-02-10 Thread Amarnath Valluri
These set of patches backported from upstream, which fixes the issues in
extracting hardlinks over softlinks while etracting packages by opkg.

Signed-off-by: Amarnath Valluri 
---
 ...te_disk_posix.c-make-_fsobj-functions-mor.patch | 245 +
 ...02-Fix-extracting-hardlinks-over-symlinks.patch | 120 ++
 .../libarchive/libarchive_3.2.2.bb |   2 +
 3 files changed, 367 insertions(+)
 create mode 100644 
meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
 create mode 100644 
meta/recipes-extended/libarchive/files/0002-Fix-extracting-hardlinks-over-symlinks.patch

diff --git 
a/meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
 
b/meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
new file mode 100644
index 000..e911a7c
--- /dev/null
+++ 
b/meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
@@ -0,0 +1,245 @@
+From 90881d24d3f6d5fb207e97df3b91bbea8598e84e Mon Sep 17 00:00:00 2001
+From: Martin Matuska 
+Date: Tue, 29 Nov 2016 16:47:37 +0100
+Subject: [PATCH 1/2] archive_write_disk_posix.c: make *_fsobj functions more
+ readable
+
+Upstream-Status: Backported
+
+Signed-off-by: Amarnath Valluri 
+---
+ libarchive/archive_write_disk_posix.c | 121 +-
+ 1 file changed, 61 insertions(+), 60 deletions(-)
+
+diff --git a/libarchive/archive_write_disk_posix.c 
b/libarchive/archive_write_disk_posix.c
+index 17c23b0..d786bc2 100644
+--- a/libarchive/archive_write_disk_posix.c
 b/libarchive/archive_write_disk_posix.c
+@@ -336,6 +336,8 @@ struct archive_write_disk {
+ 
+ #define HFS_BLOCKS(s) ((s) >> 12)
+ 
++static void   fsobj_error(int *, struct archive_string *, int, const char *,
++  const char *);
+ static intcheck_symlinks_fsobj(char *path, int *error_number, struct 
archive_string *error_string, int flags);
+ static intcheck_symlinks(struct archive_write_disk *);
+ static intcreate_filesystem_object(struct archive_write_disk *);
+@@ -2005,8 +2007,9 @@ restore_entry(struct archive_write_disk *a)
+ 
+   if (en) {
+   /* Everything failed; give up here. */
+-  archive_set_error(>archive, en, "Can't create '%s'",
+-  a->name);
++  if ((>archive)->error == NULL)
++  archive_set_error(>archive, en, "Can't create '%s'",
++  a->name);
+   return (ARCHIVE_FAILED);
+   }
+ 
+@@ -2388,6 +2391,17 @@ current_fixup(struct archive_write_disk *a, const char 
*pathname)
+   return (a->current_fixup);
+ }
+ 
++/* Error helper for new *_fsobj functions */
++static void
++fsobj_error(int *a_eno, struct archive_string *a_estr,
++int err, const char *errstr, const char *path)
++{
++  if (a_eno)
++  *a_eno = err;
++  if (a_estr)
++  archive_string_sprintf(a_estr, errstr, path);
++}
++
+ /*
+  * TODO: Someday, integrate this with the deep dir support; they both
+  * scan the path and both can be optimized by comparing against other
+@@ -2400,7 +2414,7 @@ current_fixup(struct archive_write_disk *a, const char 
*pathname)
+  * ARCHIVE_OK if there are none, otherwise puts an error in errmsg.
+  */
+ static int
+-check_symlinks_fsobj(char *path, int *error_number, struct archive_string 
*error_string, int flags)
++check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, 
int flags)
+ {
+ #if !defined(HAVE_LSTAT)
+   /* Platform doesn't have lstat, so we can't look for symlinks. */
+@@ -2474,19 +2488,20 @@ check_symlinks_fsobj(char *path, int *error_number, 
struct archive_string *error
+   if (errno == ENOENT) {
+   break;
+   } else {
+-  /* Treat any other error as fatal - best to be 
paranoid here
+-   * Note: This effectively disables deep 
directory
+-   * support when security checks are enabled.
+-   * Otherwise, very long pathnames that trigger
+-   * an error here could evade the sandbox.
+-   * TODO: We could do better, but it would 
probably
+-   * require merging the symlink checks with the
+-   * deep-directory editing. */
+-  if (error_number) *error_number = errno;
+-  if (error_string)
+-  archive_string_sprintf(error_string,
+-  "Could not stat %s",
+-  path);
++   

[OE-core] [PATCH] libxslt: Add build fix (with ld-is-gold)

2017-02-10 Thread Jussi Kukkonen
Libraries must be linked with "-lm", otherwise gold fails to link
binaries with those libraries.

Signed-off-by: Jussi Kukkonen 
---
 .../libxslt/0001-Link-libraries-with-libm.patch| 48 ++
 meta/recipes-support/libxslt/libxslt_1.1.29.bb |  1 +
 2 files changed, 49 insertions(+)
 create mode 100644 
meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch

diff --git 
a/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch 
b/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch
new file mode 100644
index 000..16ffeba
--- /dev/null
+++ b/meta/recipes-support/libxslt/libxslt/0001-Link-libraries-with-libm.patch
@@ -0,0 +1,48 @@
+From 487e2f7e35dad3deec7978ce4478a3d4ea5070e7 Mon Sep 17 00:00:00 2001
+From: Jussi Kukkonen 
+Date: Fri, 10 Feb 2017 14:26:59 +0200
+Subject: [PATCH] Link libraries with libm
+
+Otherwise linking the resulting libraries to a binary (e.g. xsltproc)
+fails when using gold linker:
+| ../libxslt/.libs/libxslt.so: error: undefined reference to 'fmod'
+| ../libxslt/.libs/libxslt.so: error: undefined reference to 'pow'
+| ../libexslt/.libs/libexslt.so: error: undefined reference to 'floor'
+| collect2: error: ld returned 1 exit status
+
+Upstream-Status: Submitted [mailing list, Feb 10 2017]
+Signed-off-by: Jussi Kukkonen 
+---
+ libexslt/Makefile.am | 2 +-
+ libxslt/Makefile.am  | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/libexslt/Makefile.am b/libexslt/Makefile.am
+index 1cf5138..5449524 100644
+--- a/libexslt/Makefile.am
 b/libexslt/Makefile.am
+@@ -27,7 +27,7 @@ libexslt_la_SOURCES =   \
+   libexslt.h  \
+   dynamic.c
+ 
+-libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) 
$(LIBGCRYPT_LIBS)
++libexslt_la_LIBADD = $(top_builddir)/libxslt/libxslt.la $(EXTRA_LIBS) 
$(LIBGCRYPT_LIBS) $(M_LIBS)
+ libexslt_la_LDFLAGS = $(WIN32_EXTRA_LDFLAGS) -version-info 
$(LIBEXSLT_VERSION_INFO)
+ 
+ man_MANS = libexslt.3
+diff --git a/libxslt/Makefile.am b/libxslt/Makefile.am
+index d9fed68..9d44c3d 100644
+--- a/libxslt/Makefile.am
 b/libxslt/Makefile.am
+@@ -62,7 +62,7 @@ else
+ LIBXSLT_VERSION_SCRIPT =
+ endif
+ 
+-libxslt_la_LIBADD = $(LIBXML_LIBS) $(EXTRA_LIBS)
++libxslt_la_LIBADD = $(LIBXML_LIBS) $(M_LIBS) $(EXTRA_LIBS)
+ libxslt_la_LDFLAGS =  \
+   $(WIN32_EXTRA_LDFLAGS)  \
+   $(LIBXSLT_VERSION_SCRIPT)   \
+-- 
+2.1.4
+
diff --git a/meta/recipes-support/libxslt/libxslt_1.1.29.bb 
b/meta/recipes-support/libxslt/libxslt_1.1.29.bb
index be747e6..2946a74 100644
--- a/meta/recipes-support/libxslt/libxslt_1.1.29.bb
+++ b/meta/recipes-support/libxslt/libxslt_1.1.29.bb
@@ -11,6 +11,7 @@ DEPENDS = "libxml2"
 SRC_URI = "ftp://xmlsoft.org/libxslt/libxslt-${PV}.tar.gz \
file://pkgconfig_fix.patch \
file://0001-Use-pkg-config-to-find-gcrypt-and-libxml2.patch \
+   file://0001-Link-libraries-with-libm.patch \
"
 
 SRC_URI[md5sum] = "a129d3c44c022de3b9dcf6d6f288d72e"
-- 
2.1.4

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


[OE-core] [PATCH v2] curl: add ptest

2017-02-10 Thread Maxin B. John
Add ptest support to curl

Signed-off-by: Cristian Iorga 
Signed-off-by: Maxin B. John 
---
Changes in v2:
Make dependency on openssh optional

 .../curl/0001-runtests.pl-remove-warning.patch | 31 ++
 meta/recipes-support/curl/curl/run-ptest   |  8 ++
 meta/recipes-support/curl/curl_7.52.1.bb   | 23 +++-
 3 files changed, 61 insertions(+), 1 deletion(-)
 create mode 100644 
meta/recipes-support/curl/curl/0001-runtests.pl-remove-warning.patch
 create mode 100644 meta/recipes-support/curl/curl/run-ptest

diff --git 
a/meta/recipes-support/curl/curl/0001-runtests.pl-remove-warning.patch 
b/meta/recipes-support/curl/curl/0001-runtests.pl-remove-warning.patch
new file mode 100644
index 000..283aa20
--- /dev/null
+++ b/meta/recipes-support/curl/curl/0001-runtests.pl-remove-warning.patch
@@ -0,0 +1,31 @@
+From c1d3bf13567909395715e441bc329793a5d2566b Mon Sep 17 00:00:00 2001
+From: "Maxin B. John" 
+Date: Mon, 12 Dec 2016 12:49:46 +0200
+Subject: [PATCH] runtests.pl: remove warning
+
+Remove the warning which floods the console while executing tests.
+
+Upstream-Status: Inappropriate [oe specific]
+
+Signed-off-by: Maxin B. John 
+---
+ tests/runtests.pl | 3 ---
+ 1 file changed, 3 deletions(-)
+
+diff --git a/tests/runtests.pl b/tests/runtests.pl
+index b8497f9..3cc6415 100755
+--- a/tests/runtests.pl
 b/tests/runtests.pl
+@@ -2879,9 +2879,6 @@ sub singletest {
+ # timestamp test preparation start
+ $timeprepini{$testnum} = Time::HiRes::time() if($timestats);
+ 
+-if($disttests !~ /test$testnum\W/ ) {
+-logmsg "Warning: test$testnum not present in 
tests/data/Makefile.inc\n";
+-}
+ if($disabled{$testnum}) {
+ logmsg "Warning: test$testnum is explicitly disabled\n";
+ }
+-- 
+2.4.0
+
diff --git a/meta/recipes-support/curl/curl/run-ptest 
b/meta/recipes-support/curl/curl/run-ptest
new file mode 100644
index 000..d22e6f7
--- /dev/null
+++ b/meta/recipes-support/curl/curl/run-ptest
@@ -0,0 +1,8 @@
+#!/bin/sh
+useradd curl-test
+chown -R curl-test:curl-test .
+cd tests
+su curl-test -c "./runtests.pl -a -n -s | sed \
+-e 's|\([^ ]* *\) \([^ ]* *\)...OK|PASS: \1 \2|' \
+-e 's|\([^ ]* *\) \([^ ]* *\)...FAILED|FAIL: \1 \2|'"
+userdel curl-test
diff --git a/meta/recipes-support/curl/curl_7.52.1.bb 
b/meta/recipes-support/curl/curl_7.52.1.bb
index 2882bc0..b7c08f1 100644
--- a/meta/recipes-support/curl/curl_7.52.1.bb
+++ b/meta/recipes-support/curl/curl_7.52.1.bb
@@ -7,6 +7,8 @@ LIC_FILES_CHKSUM = 
"file://COPYING;beginline=8;md5=3a34942f4ae3fbf1a303160714e66
 
 SRC_URI = "http://curl.haxx.se/download/curl-${PV}.tar.bz2 \
file://0001-replace-krb5-config-with-pkg-config.patch \
+   file://0001-runtests.pl-remove-warning.patch \
+   file://run-ptest \
 "
 
 # curl likes to set -g0 in CFLAGS, so we stop it
@@ -18,7 +20,7 @@ SRC_URI[md5sum] = "dd014df06ff1d12e173de86873f9f77a"
 SRC_URI[sha256sum] = 
"d16185a767cb2c1ba3d5b9096ec54e5ec198b213f45864a38b3bda4bbf87389b"
 
 CVE_PRODUCT = "libcurl"
-inherit autotools pkgconfig binconfig multilib_header
+inherit autotools pkgconfig binconfig multilib_header ptest
 
 PACKAGECONFIG ??= "${@bb.utils.contains("DISTRO_FEATURES", "ipv6", "ipv6", "", 
d)} gnutls proxy zlib"
 PACKAGECONFIG_class-native = "ipv6 proxy ssl zlib"
@@ -62,11 +64,30 @@ do_install_append_class-target() {
sed -i -e 's,${STAGING_DIR_HOST},,g' ${D}${bindir}/curl-config
 }
 
+do_compile_ptest() {
+oe_runmake test
+oe_runmake -C ${B}/tests/data/ show
+oe_runmake -C ${B}/tests/server
+}
+
+do_install_ptest() {
+cp -rf ${B}/tests ${D}${PTEST_PATH}
+cp -rf ${S}/tests ${D}${PTEST_PATH}
+install -d ${D}${PTEST_PATH}/src
+ln -sf ${bindir}/curl   ${D}${PTEST_PATH}/src/curl
+}
+
 PACKAGES =+ "lib${BPN}"
 
 FILES_lib${BPN} = "${libdir}/lib*.so.*"
 RRECOMMENDS_lib${BPN} += "ca-certificates"
 
+RDEPENDS_${PN}-ptest += "make bash sudo perl perl-module-cwd 
perl-module-ipc-open2 \
+${@bb.utils.contains("IMAGE_FEATURES", "ssh-server-openssh", "openssh ", 
"",d)}\
+perl-module-digest-md5  perl-module-file-basename perl-module-posix 
diffutils \
+perl-module-errno python python-netserver python-argparse python-pprint \
+"
+
 FILES_${PN} += "${datadir}/zsh"
 
 BBCLASSEXTEND = "native nativesdk"
-- 
2.4.0

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


[OE-core] ✗ patchtest: failure for Fix for #7040 - Support for /usr merge

2017-02-10 Thread Patchwork
== Series Details ==

Series: Fix for #7040 - Support for /usr merge
Revision: 1
URL   : https://patchwork.openembedded.org/series/5259/
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 Added patch file is missing Upstream-Status in the header 
[test_upstream_status_presence] 
  Suggested fixAdd Upstream-Status:  to the header of 
meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
 (possible values: Pending, Submitted, Accepted, Backport, Denied, 
Inappropriate)

* 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-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.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] Is Krogoth release still maintained?

2017-02-10 Thread Ruslan Bilovol

Hi Armin,

I see that Krogoth branches in openembedded-core and
meta-openembedded layers were last updated 3 months ago.

So is Krogoth release still maintained? If yes, when and
how often do you plan do update it?

Thanks,
Ruslan

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


[OE-core] [PATCH 23/23] lsb: Make use of appropriate bitbake variables.

2017-02-10 Thread Amarnath Valluri
Using of bitbake environment variables in-place of hardcoded strings makes this
recipe portable to all environments.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-extended/lsb/lsb_4.1.bb | 40 +---
 1 file changed, 19 insertions(+), 21 deletions(-)

diff --git a/meta/recipes-extended/lsb/lsb_4.1.bb 
b/meta/recipes-extended/lsb/lsb_4.1.bb
index ece0eab..77ea365 100644
--- a/meta/recipes-extended/lsb/lsb_4.1.bb
+++ b/meta/recipes-extended/lsb/lsb_4.1.bb
@@ -33,14 +33,14 @@ S = "${WORKDIR}/lsb-release-1.4"
 CLEANBROKEN = "1"
 
 do_install(){
-   oe_runmake install prefix=${D}  mandir=${D}/${datadir}/man/ DESTDIR=${D}
+   oe_runmake install prefix=${D}/${prefix}  mandir=${D}/${datadir}/man/ 
DESTDIR=${D}
 
# this 2 dirs are needed by package lsb-dist-checker
mkdir -p ${D}${sysconfdir}/opt
mkdir -p ${D}${localstatedir}/opt
 
mkdir -p ${D}${base_bindir}
-   mkdir -p ${D}/${baselib}
+   mkdir -p ${D}${base_libdir}
mkdir -p ${D}${sysconfdir}/lsb-release.d
printf "LSB_VERSION=\"core-4.1-noarch:" > ${D}${sysconfdir}/lsb-release
 
@@ -86,47 +86,45 @@ do_install_append(){
install -m 0755 ${WORKDIR}/${i} ${D}${sysconfdir}/core-lsb
done
 
-   install -d ${D}/lib/lsb
-   install -m 0755 ${WORKDIR}/init-functions ${D}/lib/lsb
+   install -d ${D}/${nonarch_base_libdir}/lsb
+   install -m 0755 ${WORKDIR}/init-functions 
${D}/${nonarch_base_libdir}/lsb
 
# creat links for LSB test
-   install -d ${D}/usr/lib/lsb
-   ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/install_initd
-   ln -sf ${sbindir}/chkconfig ${D}/usr/lib/lsb/remove_initd
+   if [ "${nonarch_base_libdir}" != "${nonarch_libdir}" ; then
+   install -d ${D}/${nonarch_libdir}/lsb
+   fi
+   ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/install_initd
+   ln -sf ${sbindir}/chkconfig ${D}/${nonarch_libdir}/lsb/remove_initd
 
if [ "${TARGET_ARCH}" = "x86_64" ];then
-  cd ${D}
if [ "${baselib}" != "lib64" ]; then
-   ln -sf ${baselib} lib64
+   lnr ${D}${base_libdir} ${D}/lib64
fi
-  cd ${D}/${baselib}
+  cd ${D}/${base_libdir}
ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.2
ln -sf ld-linux-x86-64.so.2 ld-lsb-x86-64.so.3
fi
if [ "${TARGET_ARCH}" = "i586" ] || [ "${TARGET_ARCH}" = "i686" ];then
-  cd ${D}/${baselib}
+  cd ${D}/${base_libdir}
ln -sf ld-linux.so.2 ld-lsb.so.2
ln -sf ld-linux.so.2 ld-lsb.so.3
fi
 
if [ "${TARGET_ARCH}" = "powerpc64" ];then
-   cd ${D}
if [ "${baselib}" != "lib64" ]; then
-   ln -sf ${baselib} lib64
+   lnr  ${D}${base_libdir} ${D}/lib64
fi
-   cd ${D}/${baselib}
+   cd ${D}/${base_libdir}
ln -sf ld64.so.1 ld-lsb-ppc64.so.2
ln -sf ld64.so.1 ld-lsb-ppc64.so.3
fi
if [ "${TARGET_ARCH}" = "powerpc" ];then
-  cd ${D}/${baselib}
+  cd ${D}/${base_libdir}
ln -sf ld.so.1 ld-lsb-ppc32.so.2
ln -sf ld.so.1 ld-lsb-ppc32.so.3
fi
 }
-FILES_${PN} += "/lib64 \
-${base_libdir} \
-/usr/lib/lsb \
-${base_libdir}/lsb/* \
-/lib/lsb/* \
-   "
+FILES_${PN} += "${base_libdir} \
+${nonarch_base_libdir}/lsb \
+${nonarch_libdir}/lsb/* \
+${@'/lib64' if d.getVar('TARGET_ARCH')  == ('x86_64' or 
'powerpc64') and '${baselib}' != 'lib64' else ''}"
-- 
2.7.4

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


[OE-core] [PATCH 22/23] net-tools: Place package content as per bitbake environment.

2017-02-10 Thread Amarnath Valluri
net-tools Makefile was hardcoded sbin, bin installation paths to /bin and /sbin
respectively.  This change moves the installed files to appropriate location as
per configured bitbake environment.

This might be solved much better way by patching Makefile, but that causing
build issues, as net-tools recipe is using pre-generated config.{h/status}.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-extended/net-tools/net-tools_1.60-26.bb | 11 +++
 1 file changed, 11 insertions(+)

diff --git a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb 
b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
index 49a65f8..c4af7ef 100644
--- a/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
+++ b/meta/recipes-extended/net-tools/net-tools_1.60-26.bb
@@ -93,6 +93,17 @@ do_install() {
unset CFLAGS
unset LDFLAGS
oe_runmake 'BASEDIR=${D}' install
+
+   if [ "${base_bindir}" != "/bin" ]; then
+   mkdir -p ${D}/${base_bindir}
+   mv ${D}/bin/* ${D}/${base_bindir}/
+   rmdir ${D}/bin
+   fi
+   if [ "${base_sbindir}" != "/sbin" ]; then
+   mkdir ${D}/${base_sbindir}
+   mv ${D}/sbin/* ${D}/${base_sbindir}/
+   rmdir ${D}/sbin
+   fi
 }
 
 inherit update-alternatives
-- 
2.7.4

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


[OE-core] [PATCH 21/23] mktemp: Move installed files only when needed

2017-02-10 Thread Amarnath Valluri
Move binary(ies) only when ${base_bindir} != ${bindir}.

When usrmerge distro feature is enabled they both might point to same location.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-extended/mktemp/mktemp_1.7.bb | 8 +---
 1 file changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-extended/mktemp/mktemp_1.7.bb 
b/meta/recipes-extended/mktemp/mktemp_1.7.bb
index 9accc6e..e8ae5c6 100644
--- a/meta/recipes-extended/mktemp/mktemp_1.7.bb
+++ b/meta/recipes-extended/mktemp/mktemp_1.7.bb
@@ -20,9 +20,11 @@ inherit autotools update-alternatives
 EXTRA_OECONF = "--with-libc"
 
 do_install_append () {
-   install -d ${D}${base_bindir}
-   mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp
-   rmdir ${D}${bindir}
+   if [ "${base_bindir}" != "${bindir}" ] ; then
+   install -d ${D}${base_bindir}
+   mv ${D}${bindir}/mktemp ${D}${base_bindir}/mktemp
+   rmdir ${D}${bindir}
+   fi
 }
 
 ALTERNATIVE_${PN} = "mktemp"
-- 
2.7.4

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


[OE-core] [PATCH 19/23] firmware: use ${nonarch_base_libdir} for firmware installation.

2017-02-10 Thread Amarnath Valluri
Replace hardcoded '/lib' in kernel firmware installation path with
${nonarch_base_libdir}.

Signed-off-by: Amarnath Valluri 
---
 .../linux-firmware/linux-firmware_git.bb   | 168 ++---
 1 file changed, 84 insertions(+), 84 deletions(-)

diff --git a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb 
b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
index 0aba740..5a74a57 100644
--- a/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
+++ b/meta/recipes-kernel/linux-firmware/linux-firmware_git.bb
@@ -195,27 +195,27 @@ do_compile() {
 }
 
 do_install() {
-   install -d  ${D}/lib/firmware/
-   cp -r * ${D}/lib/firmware/
+   install -d  ${D}${nonarch_base_libdir}/firmware/
+   cp -r * ${D}${nonarch_base_libdir}/firmware/
 
# Avoid Makefile to be deployed
-   rm ${D}/lib/firmware/Makefile
+   rm ${D}${nonarch_base_libdir}/firmware/Makefile
 
# Remove unbuild firmware which needs cmake and bash
-   rm ${D}/lib/firmware/carl9170fw -rf
+   rm ${D}${nonarch_base_libdir}/firmware/carl9170fw -rf
 
# Remove pointless bash script
-   rm ${D}/lib/firmware/configure
+   rm ${D}${nonarch_base_libdir}/firmware/configure
 
# Libertas sd8686
-   ln -sf libertas/sd8686_v9.bin ${D}/lib/firmware/sd8686.bin
-   ln -sf libertas/sd8686_v9_helper.bin ${D}/lib/firmware/sd8686_helper.bin
+   ln -sf libertas/sd8686_v9.bin 
${D}${nonarch_base_libdir}/firmware/sd8686.bin
+   ln -sf libertas/sd8686_v9_helper.bin 
${D}${nonarch_base_libdir}/firmware/sd8686_helper.bin
 
# fixup wl12xx location, after 2.6.37 the kernel searches a different 
location for it
-   ( cd ${D}/lib/firmware ; ln -sf ti-connectivity/* . )
+   ( cd ${D}${nonarch_base_libdir}/firmware ; ln -sf ti-connectivity/* . )
 
 # Copy the iwlwifi ucode
-cp ${WORKDIR}/iwlwifi-8000C-19.ucode ${D}/lib/firmware/
+cp ${WORKDIR}/iwlwifi-8000C-19.ucode 
${D}${nonarch_base_libdir}/firmware/
 }
 
 
@@ -252,23 +252,23 @@ LICENSE_${PN}-ath6k = "Firmware-atheros_firmware"
 LICENSE_${PN}-ath9k = "Firmware-atheros_firmware"
 LICENSE_${PN}-atheros-license = "Firmware-atheros_firmware"
 
-FILES_${PN}-atheros-license = "/lib/firmware/LICENCE.atheros_firmware"
+FILES_${PN}-atheros-license = 
"${nonarch_base_libdir}/firmware/LICENCE.atheros_firmware"
 FILES_${PN}-ar9170 = " \
-  /lib/firmware/ar9170*.fw \
+  ${nonarch_base_libdir}/firmware/ar9170*.fw \
 "
 FILES_${PN}-carl9170 = " \
-  /lib/firmware/carl9170*.fw \
+  ${nonarch_base_libdir}/firmware/carl9170*.fw \
 "
 FILES_${PN}-ath6k = " \
-  /lib/firmware/ath6k \
+  ${nonarch_base_libdir}/firmware/ath6k \
 "
 FILES_${PN}-ath9k = " \
-  /lib/firmware/ar9271.fw \
-  /lib/firmware/ar7010*.fw \
-  /lib/firmware/htc_9271.fw \
-  /lib/firmware/htc_7010.fw \
-  /lib/firmware/ath9k_htc/htc_7010-1.4.0.fw \
-  /lib/firmware/ath9k_htc/htc_9271-1.4.0.fw \
+  ${nonarch_base_libdir}/firmware/ar9271.fw \
+  ${nonarch_base_libdir}/firmware/ar7010*.fw \
+  ${nonarch_base_libdir}/firmware/htc_9271.fw \
+  ${nonarch_base_libdir}/firmware/htc_7010.fw \
+  ${nonarch_base_libdir}/firmware/ath9k_htc/htc_7010-1.4.0.fw \
+  ${nonarch_base_libdir}/firmware/ath9k_htc/htc_9271-1.4.0.fw \
 "
 
 RDEPENDS_${PN}-ar9170 += "${PN}-atheros-license"
@@ -282,14 +282,14 @@ LICENSE_${PN}-ar3k-license = "Firmware-qualcommAthos_ar3k"
 LICENSE_${PN}-ath10k = "Firmware-qualcommAthos_ath10k"
 LICENSE_${PN}-ath10k-license = "Firmware-qualcommAthos_ath10k"
 
-FILES_${PN}-ar3k-license = "/lib/firmware/LICENSE.QualcommAtheros_ar3k"
+FILES_${PN}-ar3k-license = 
"${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ar3k"
 FILES_${PN}-ar3k = " \
-  /lib/firmware/ar3k \
+  ${nonarch_base_libdir}/firmware/ar3k \
 "
 
-FILES_${PN}-ath10k-license = "/lib/firmware/LICENSE.QualcommAtheros_ath10k"
+FILES_${PN}-ath10k-license = 
"${nonarch_base_libdir}/firmware/LICENSE.QualcommAtheros_ath10k"
 FILES_${PN}-ath10k = " \
-  /lib/firmware/ath10k \
+  ${nonarch_base_libdir}/firmware/ath10k \
 "
 
 RDEPENDS_${PN}-ar3k += "${PN}-ar3k-license"
@@ -299,9 +299,9 @@ RDEPENDS_${PN}-ath10k += "${PN}-ath10k-license"
 LICENSE_${PN}-ralink = "Firmware-ralink-firmware"
 LICENSE_${PN}-ralink-license = "Firmware-ralink-firmware"
 
-FILES_${PN}-ralink-license = "/lib/firmware/LICENCE.ralink-firmware.txt"
+FILES_${PN}-ralink-license = 
"${nonarch_base_libdir}/firmware/LICENCE.ralink-firmware.txt"
 FILES_${PN}-ralink = " \
-  /lib/firmware/rt*.bin \
+  ${nonarch_base_libdir}/firmware/rt*.bin \
 "
 
 RDEPENDS_${PN}-ralink += "${PN}-ralink-license"
@@ -310,9 +310,9 @@ RDEPENDS_${PN}-ralink += "${PN}-ralink-license"
 LICENSE_${PN}-radeon = "Firmware-radeon"
 LICENSE_${PN}-radeon-license = "Firmware-radeon"
 
-FILES_${PN}-radeon-license = "/lib/firmware/LICENSE.radeon"
+FILES_${PN}-radeon-license = "${nonarch_base_libdir}/firmware/LICENSE.radeon"
 FILES_${PN}-radeon = " \
-  /lib/firmware/radeon \
+  

[OE-core] [PATCH 20/23] mdadm: Avoid using hardocded udev, sbin paths

2017-02-10 Thread Amarnath Valluri
Use appropriate bitbake variables inplace of below hardcoded locations:
  /sbin -> ${base_sbindir}
  /lib/udev -> ${nonarch_base_libdir}/udev

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-extended/mdadm/mdadm_4.0.bb | 6 --
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-extended/mdadm/mdadm_4.0.bb 
b/meta/recipes-extended/mdadm/mdadm_4.0.bb
index c228899..8a77204 100644
--- a/meta/recipes-extended/mdadm/mdadm_4.0.bb
+++ b/meta/recipes-extended/mdadm/mdadm_4.0.bb
@@ -33,7 +33,9 @@ CFLAGS_append_mipsarchn64 = ' -D__SANE_USERSPACE_TYPES__'
 CFLAGS_append_mipsarchn32 = ' -D__SANE_USERSPACE_TYPES__'
 
 do_compile() {
-   oe_runmake SYSROOT="${STAGING_DIR_TARGET}"
+   # Point to right sbindir
+   sed -i -e 's;BINDIR  = /sbin;BINDIR = $base_sbindir;' ${S}/Makefile
+   oe_runmake SYSROOT="${STAGING_DIR_TARGET}" 
UDEVDIR="${nonarch_libdir}/udev"
 }
 
 do_install() {
@@ -51,7 +53,7 @@ do_install_ptest() {
cp -a ${S}/tests ${D}${PTEST_PATH}/tests
cp ${S}/test ${D}${PTEST_PATH}
sed -e 's!sleep 0.*!sleep 1!g; s!/var/tmp!/!g' -i ${D}${PTEST_PATH}/test
-   ln -s /sbin/mdadm ${D}${PTEST_PATH}/mdadm
+   ln -s ${base_sbindir}/mdadm ${D}${PTEST_PATH}/mdadm
for prg in test_stripe swap_super raid6check
do
install -D -m 755 $prg ${D}${PTEST_PATH}/
-- 
2.7.4

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


[OE-core] [PATCH 17/23] libarchive: Backport upstream fixes.

2017-02-10 Thread Amarnath Valluri
These set of patches backported from upstream, which fixes the issues in
extracting hardlinks over softlinks while etracting packages by opkg.

Signed-off-by: Amarnath Valluri 
---
 ...te_disk_posix.c-make-_fsobj-functions-mor.patch | 242 +
 ...02-Fix-extracting-hardlinks-over-symlinks.patch | 116 ++
 .../libarchive/libarchive_3.2.2.bb |   2 +
 3 files changed, 360 insertions(+)
 create mode 100644 
meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
 create mode 100644 
meta/recipes-extended/libarchive/files/0002-Fix-extracting-hardlinks-over-symlinks.patch

diff --git 
a/meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
 
b/meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
new file mode 100644
index 000..6e2fd7b
--- /dev/null
+++ 
b/meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
@@ -0,0 +1,242 @@
+From 90881d24d3f6d5fb207e97df3b91bbea8598e84e Mon Sep 17 00:00:00 2001
+From: Martin Matuska 
+Date: Tue, 29 Nov 2016 16:47:37 +0100
+Subject: [PATCH 1/2] archive_write_disk_posix.c: make *_fsobj functions more
+ readable
+
+---
+ libarchive/archive_write_disk_posix.c | 121 +-
+ 1 file changed, 61 insertions(+), 60 deletions(-)
+
+diff --git a/libarchive/archive_write_disk_posix.c 
b/libarchive/archive_write_disk_posix.c
+index 17c23b0..d786bc2 100644
+--- a/libarchive/archive_write_disk_posix.c
 b/libarchive/archive_write_disk_posix.c
+@@ -336,6 +336,8 @@ struct archive_write_disk {
+ 
+ #define HFS_BLOCKS(s) ((s) >> 12)
+ 
++static void   fsobj_error(int *, struct archive_string *, int, const char *,
++  const char *);
+ static intcheck_symlinks_fsobj(char *path, int *error_number, struct 
archive_string *error_string, int flags);
+ static intcheck_symlinks(struct archive_write_disk *);
+ static intcreate_filesystem_object(struct archive_write_disk *);
+@@ -2005,8 +2007,9 @@ restore_entry(struct archive_write_disk *a)
+ 
+   if (en) {
+   /* Everything failed; give up here. */
+-  archive_set_error(>archive, en, "Can't create '%s'",
+-  a->name);
++  if ((>archive)->error == NULL)
++  archive_set_error(>archive, en, "Can't create '%s'",
++  a->name);
+   return (ARCHIVE_FAILED);
+   }
+ 
+@@ -2388,6 +2391,17 @@ current_fixup(struct archive_write_disk *a, const char 
*pathname)
+   return (a->current_fixup);
+ }
+ 
++/* Error helper for new *_fsobj functions */
++static void
++fsobj_error(int *a_eno, struct archive_string *a_estr,
++int err, const char *errstr, const char *path)
++{
++  if (a_eno)
++  *a_eno = err;
++  if (a_estr)
++  archive_string_sprintf(a_estr, errstr, path);
++}
++
+ /*
+  * TODO: Someday, integrate this with the deep dir support; they both
+  * scan the path and both can be optimized by comparing against other
+@@ -2400,7 +2414,7 @@ current_fixup(struct archive_write_disk *a, const char 
*pathname)
+  * ARCHIVE_OK if there are none, otherwise puts an error in errmsg.
+  */
+ static int
+-check_symlinks_fsobj(char *path, int *error_number, struct archive_string 
*error_string, int flags)
++check_symlinks_fsobj(char *path, int *a_eno, struct archive_string *a_estr, 
int flags)
+ {
+ #if !defined(HAVE_LSTAT)
+   /* Platform doesn't have lstat, so we can't look for symlinks. */
+@@ -2474,19 +2488,20 @@ check_symlinks_fsobj(char *path, int *error_number, 
struct archive_string *error
+   if (errno == ENOENT) {
+   break;
+   } else {
+-  /* Treat any other error as fatal - best to be 
paranoid here
+-   * Note: This effectively disables deep 
directory
+-   * support when security checks are enabled.
+-   * Otherwise, very long pathnames that trigger
+-   * an error here could evade the sandbox.
+-   * TODO: We could do better, but it would 
probably
+-   * require merging the symlink checks with the
+-   * deep-directory editing. */
+-  if (error_number) *error_number = errno;
+-  if (error_string)
+-  archive_string_sprintf(error_string,
+-  "Could not stat %s",
+-  path);
++  /*
++   * Treat any other error as fatal - best to be
++  

[OE-core] [PATCH 18/23] kernel: use ${nonarch_base_libdir} for kernel modules installation.

2017-02-10 Thread Amarnath Valluri
Replace hardcoded '/lib' in kernel modules installation path with
${nonarch_base_libdir}, which is ment exactly for this.

Signed-off-by: Amarnath Valluri 
---
 meta/classes/kernel-module-split.bbclass |  2 +-
 meta/classes/kernel.bbclass  | 14 +++---
 meta/classes/module.bbclass  |  2 +-
 3 files changed, 9 insertions(+), 9 deletions(-)

diff --git a/meta/classes/kernel-module-split.bbclass 
b/meta/classes/kernel-module-split.bbclass
index db332e5..858d3ec 100644
--- a/meta/classes/kernel-module-split.bbclass
+++ b/meta/classes/kernel-module-split.bbclass
@@ -136,7 +136,7 @@ python split_kernel_module_packages () {
 postinst = d.getVar('pkg_postinst_modules')
 postrm = d.getVar('pkg_postrm_modules')
 
-modules = do_split_packages(d, root='/lib/modules', 
file_regex=module_regex, output_pattern=module_pattern, description='%s kernel 
module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, 
extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION")))
+modules = do_split_packages(d, root='${nonarch_base_libdir}/modules', 
file_regex=module_regex, output_pattern=module_pattern, description='%s kernel 
module', postinst=postinst, postrm=postrm, recursive=True, hook=frob_metadata, 
extra_depends='kernel-%s' % (d.getVar("KERNEL_VERSION")))
 if modules:
 metapkg = d.getVar('KERNEL_MODULES_META_PACKAGE')
 d.appendVar('RDEPENDS_' + metapkg, ' '+' '.join(modules))
diff --git a/meta/classes/kernel.bbclass b/meta/classes/kernel.bbclass
index f462b2f..447e9f3 100644
--- a/meta/classes/kernel.bbclass
+++ b/meta/classes/kernel.bbclass
@@ -297,11 +297,11 @@ kernel_do_install() {
#
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS MACHINE
if (grep -q -i -e '^CONFIG_MODULES=y$' .config); then
-   oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" modules_install
-   rm "${D}/lib/modules/${KERNEL_VERSION}/build"
-   rm "${D}/lib/modules/${KERNEL_VERSION}/source"
+   oe_runmake DEPMOD=echo 
MODLIB=${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION} 
INSTALL_FW_PATH=${D}${nonarch_base_libdir}/firmware modules_install
+   rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
+   rm "${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/source"
# If the kernel/ directory is empty remove it to prevent QA 
issues
-   rmdir --ignore-fail-on-non-empty 
"${D}/lib/modules/${KERNEL_VERSION}/kernel"
+   rmdir --ignore-fail-on-non-empty 
"${D}${nonarch_base_libdir}/modules/${KERNEL_VERSION}/kernel"
else
bbnote "no modules to install"
fi
@@ -479,9 +479,9 @@ EXPORT_FUNCTIONS do_compile do_install do_configure
 # kernel-image becomes kernel-image-${KERNEL_VERSION}
 PACKAGES = "kernel kernel-base kernel-vmlinux kernel-image kernel-dev 
kernel-modules"
 FILES_${PN} = ""
-FILES_kernel-base = "/lib/modules/${KERNEL_VERSION}/modules.order 
/lib/modules/${KERNEL_VERSION}/modules.builtin"
+FILES_kernel-base = 
"${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.order 
${nonarch_base_libdir}/modules/${KERNEL_VERSION}/modules.builtin"
 FILES_kernel-image = ""
-FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* 
${KERNEL_SRC_PATH} /lib/modules/${KERNEL_VERSION}/build"
+FILES_kernel-dev = "/boot/System.map* /boot/Module.symvers* /boot/config* 
${KERNEL_SRC_PATH} ${nonarch_base_libdir}/modules/${KERNEL_VERSION}/build"
 FILES_kernel-vmlinux = "/boot/vmlinux-${KERNEL_VERSION_NAME}"
 FILES_kernel-modules = ""
 RDEPENDS_kernel = "kernel-base"
@@ -512,7 +512,7 @@ pkg_postinst_kernel-base () {
 PACKAGESPLITFUNCS_prepend = "split_kernel_packages "
 
 python split_kernel_packages () {
-do_split_packages(d, root='/lib/firmware', 
file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', 
description='Firmware for %s', recursive=True, extra_depends='')
+do_split_packages(d, root='${nonarch_base_libdir}/firmware', 
file_regex='^(.*)\.(bin|fw|cis|csp|dsp)$', output_pattern='kernel-firmware-%s', 
description='Firmware for %s', recursive=True, extra_depends='')
 }
 
 # Many scripts want to look in arch/$arch/boot for the bootable
diff --git a/meta/classes/module.bbclass b/meta/classes/module.bbclass
index a588873..a0491af 100644
--- a/meta/classes/module.bbclass
+++ b/meta/classes/module.bbclass
@@ -31,7 +31,7 @@ module_do_compile() {
 
 module_do_install() {
unset CFLAGS CPPFLAGS CXXFLAGS LDFLAGS
-   oe_runmake DEPMOD=echo INSTALL_MOD_PATH="${D}" \
+   oe_runmake DEPMOD=echo 
MODLIB="${D}${kernel_libdir}/modules/${KERNEL_VERSION}" \
   CC="${KERNEL_CC}" LD="${KERNEL_LD}" \
   O=${STAGING_KERNEL_BUILDDIR} \
   ${MODULES_INSTALL_TARGET}
-- 
2.7.4

-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org

[OE-core] [PATCH 16/23] util-linux, shadow: Make 'nologin' alternative command

2017-02-10 Thread Amarnath Valluri
Both shadow and util-linux packages provides 'nologin' binary in ${base_sbindir}
and ${sbindir} respectively, this leads to conflict when 'usrmerge' feature is
enabled, where ${sbindir} == ${base_sbindir}. Hance, handle this to alternative
system to resolve the conflict.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-core/util-linux/util-linux.inc | 5 +++--
 meta/recipes-extended/shadow/shadow.inc | 3 ++-
 2 files changed, 5 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 691b4e6..bd59b5a 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -187,14 +187,14 @@ do_install () {
 # reset and nologin causes a conflict with ncurses-native and shadow-native
 do_install_append_class-native () {
rm -f ${D}${base_bindir}/reset
-   rm -f ${D}${base_sbindir}/nologin
+   rm -f ${D}${sbindir}/nologin
 }
 
 ALTERNATIVE_PRIORITY = "80"
 
 ALTERNATIVE_${PN}  = "dmesg kill more mkswap blockdev pivot_root switch_root"
 ALTERNATIVE_${PN} += "hexdump last lastb logger mesg renice wall"
-ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject"
+ALTERNATIVE_${PN} += "setsid chrt flock utmpdump eject nologin"
 
 ALTERNATIVE_LINK_NAME[dmesg] = "${base_bindir}/dmesg"
 ALTERNATIVE_LINK_NAME[kill] = "${base_bindir}/kill"
@@ -204,6 +204,7 @@ ALTERNATIVE_LINK_NAME[blockdev] = "${base_sbindir}/blockdev"
 ALTERNATIVE_LINK_NAME[pivot_root] = "${base_sbindir}/pivot_root"
 ALTERNATIVE_LINK_NAME[switch_root] = "${base_sbindir}/switch_root"
 ALTERNATIVE_LINK_NAME[eject] = "${bindir}/eject"
+ALTERNATIVE_LINK_NAME[nologin] = "${sbindir}/nologin"
 
 ALTERNATIVE_${PN}-doc = "mountpoint.1 last.1 lastb.1 mesg.1 wall.1 nologin.8 
sulogin.8 utmpdump.1 reset.1 kill.1 libblkid.3 blkid.8 findfs.8 fsck.8 uuid.3"
 
diff --git a/meta/recipes-extended/shadow/shadow.inc 
b/meta/recipes-extended/shadow/shadow.inc
index 4c4db00..91b6f46 100644
--- a/meta/recipes-extended/shadow/shadow.inc
+++ b/meta/recipes-extended/shadow/shadow.inc
@@ -170,10 +170,11 @@ inherit update-alternatives
 
 ALTERNATIVE_PRIORITY = "200"
 
-ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr"
+ALTERNATIVE_${PN} = "passwd chfn chsh chpasswd vipw vigr nologin"
 ALTERNATIVE_LINK_NAME[chpasswd] = "${sbindir}/chpasswd"
 ALTERNATIVE_LINK_NAME[vipw] = "${base_sbindir}/vipw"
 ALTERNATIVE_LINK_NAME[vigr] = "${base_sbindir}/vigr"
+ALTERNATIVE_LINK_NAME[nologin] = "${base_sbindir}/nologin"
 
 ALTERNATIVE_${PN}-base = "newgrp groups login su"
 ALTERNATIVE_LINK_NAME[login] = "${base_bindir}/login"
-- 
2.7.4

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


[OE-core] [PATCH 15/23] util-linux: Make sure '${base_bindir}/reset' is part of util-linux-reset package.

2017-02-10 Thread Amarnath Valluri
update-alternative.bbclass might rename the 'reset' binary when LINK_NAME ==
TARGET, This is true(${base_bindir} == ${bindir}) when 'usrmerge' distro feature
is enabled.  Hence, suffix with * to properly package the renamed binary.

Took the opportunity to make 'reset' alternative available only for target.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-core/util-linux/util-linux.inc | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index ae60b0a..691b4e6 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -84,7 +84,7 @@ FILES_util-linux-umount = "${base_bindir}/umount.${BPN}"
 FILES_util-linux-readprofile = "${sbindir}/readprofile.${BPN}"
 FILES_util-linux-uuidgen = "${bindir}/uuidgen"
 FILES_util-linux-uuidd = "${sbindir}/uuidd"
-FILES_util-linux-reset = "${base_bindir}/reset"
+FILES_util-linux-reset = "${base_bindir}/reset*"
 FILES_util-linux-partx = "${sbindir}/partx"
 FILES_util-linux-hwclock = "${base_sbindir}/hwclock.${BPN}"
 FILES_util-linux-findfs = "${sbindir}/findfs"
@@ -255,7 +255,7 @@ ALTERNATIVE_LINK_NAME[fsck] = "${base_sbindir}/fsck"
 ALTERNATIVE_util-linux-blkid = "blkid"
 ALTERNATIVE_LINK_NAME[blkid] = "${base_sbindir}/blkid"
 
-ALTERNATIVE_util-linux-reset = "reset"
+ALTERNATIVE_util-linux-reset_class-target = "reset"
 ALTERNATIVE_LINK_NAME[reset] = "${bindir}/reset"
 ALTERNATIVE_TARGET[reset] = "${base_bindir}/reset"
 
-- 
2.7.4

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


[OE-core] [PATCH 13/23] attr/acl: Do not create broken static library link when not needed

2017-02-10 Thread Amarnath Valluri
Stop creating the static library archieve(liba(ttr|cl).a) when --disable-static
configure option used.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-support/attr/ea-acl.inc   |  2 +
 ...gure-option-to-enable-disable-static-libr.patch | 70 ++
 2 files changed, 72 insertions(+)
 create mode 100644 
meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch

diff --git a/meta/recipes-support/attr/ea-acl.inc 
b/meta/recipes-support/attr/ea-acl.inc
index a88ce90..c587b3c 100644
--- a/meta/recipes-support/attr/ea-acl.inc
+++ b/meta/recipes-support/attr/ea-acl.inc
@@ -2,6 +2,8 @@
 
 SRC_URI += "file://relative-libdir.patch;striplevel=0 \
"
+# This patch should be applied after '(attr\|acl)-Missing-configure.ac.patch' 
+SRC_URI_append = " 
file://0001-Added-configure-option-to-enable-disable-static-libr.patch"
 
 inherit autotools-brokensep gettext
 
diff --git 
a/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
 
b/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
new file mode 100644
index 000..b7f4f19
--- /dev/null
+++ 
b/meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch
@@ -0,0 +1,70 @@
+From 01256c61ba126449c46dd4ab5d5e145488b981fa Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri 
+Date: Mon, 23 Jan 2017 13:25:13 +0200
+Subject: [PATCH] Added configure option to enable/disable static library
+
+Create static library archieve only in case of --enable-static.
+
+Upstream-Status: Pending
+
+Signed-off-by: Amarnath Valluri 
+---
+ configure.ac | 6 ++
+ include/builddefs.in | 1 +
+ include/buildmacros  | 3 +++
+ 3 files changed, 10 insertions(+)
+
+diff --git a/configure.ac b/configure.ac
+index b966d0e..e48268b 100644
+--- a/configure.ac
 b/configure.ac
+@@ -26,6 +26,12 @@ AC_ARG_ENABLE(shared,
+   enable_shared=yes)
+ AC_SUBST(enable_shared)
+ 
++AC_ARG_ENABLE(static,
++[ --enable-static=[yes/no] Enable use of static libraries [default=yes]],,
++  enable_static=yes)
++AC_SUBST(enable_static)
++
++
+ AC_ARG_ENABLE(gettext,
+ [ --enable-gettext=[yes/no] Enable alternate language support [default=yes]],,
+   enable_gettext=yes)
+diff --git a/include/builddefs.in b/include/builddefs.in
+index d9931db..3b3dbd2 100644
+--- a/include/builddefs.in
 b/include/builddefs.in
+@@ -71,6 +71,7 @@ RPMBUILD = @rpmbuild@
+ RPM_VERSION   = @rpm_version@
+ 
+ ENABLE_SHARED = @enable_shared@
++ENABLE_STATIC = @enable_static@
+ ENABLE_GETTEXT= @enable_gettext@
+ 
+ HAVE_ZIPPED_MANPAGES = @have_zipped_manpages@
+diff --git a/include/buildmacros b/include/buildmacros
+index 39fa7e2..b0f25c5 100644
+--- a/include/buildmacros
 b/include/buildmacros
+@@ -80,6 +80,7 @@ endif
+ # /usr/lib.
+ ifeq ($(ENABLE_SHARED),yes)
+ INSTALL_LTLIB_DEV = \
++  set -x; \
+   cd $(TOPDIR)/$(LIBNAME)/.libs; \
+   ../$(INSTALL) -m 755 -d $(PKG_DEVLIB_DIR); \
+   ../$(INSTALL) -m 644 -T old_lib $(LIBNAME).lai $(PKG_DEVLIB_DIR); \
+@@ -88,7 +89,9 @@ INSTALL_LTLIB_DEV = \
+   ../$(INSTALL) -T so_base $(LIBNAME).lai $(PKG_LIB_DIR); \
+   if test "x$(PKG_DEVLIB_DIR)" != "x$(PKG_LIB_DIR)" ; then \
+   rel_lib_prefix=$$(echo $(PKG_LIB_DIR) | sed 
's,\(^/\|\)[^/][^/]*,..,g'); \
++  if test "$(ENABLE_STATIC)" = "yes" ; then \
+   ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).a 
$(PKG_LIB_DIR)/$(LIBNAME).a; \
++  fi ;\
+   ../$(INSTALL) -S $$rel_lib_prefix$(PKG_DEVLIB_DIR)/$(LIBNAME).la 
$(PKG_LIB_DIR)/$(LIBNAME).la; \
+   rel_devlib_prefix=$$(echo $(PKG_DEVLIB_DIR) | sed 
's,\(^/\|\)[^/][^/]*,..,g'); \
+   ../$(INSTALL) -S $$rel_devlib_prefix$(PKG_LIB_DIR)/$(LIBNAME).so 
$(PKG_DEVLIB_DIR)/$(LIBNAME).so; \
+-- 
+2.7.4
+
-- 
2.7.4

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


[OE-core] [PATCH 14/23] systemd: Do not add libnss_* to systemd package

2017-02-10 Thread Amarnath Valluri
libnss_* files should be part of corresponding sub-packages, the split happens
by do_package_split(). By adding ${libdir}/libnss_* to FILES_${PN}, those files
endup in systemd package when ${libdir} == ${base_libdir}.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-core/systemd/systemd_232.bb | 1 -
 1 file changed, 1 deletion(-)

diff --git a/meta/recipes-core/systemd/systemd_232.bb 
b/meta/recipes-core/systemd/systemd_232.bb
index bf0fadc..a18907a 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -451,7 +451,6 @@ FILES_${PN} = " ${base_bindir}/* \
 ${rootlibexecdir}/systemd/* \
 ${systemd_unitdir}/* \
 ${base_libdir}/security/*.so \
-${libdir}/libnss_* \
 /cgroup \
 ${bindir}/systemd* \
 ${bindir}/busctl \
-- 
2.7.4

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


[OE-core] [PATCH 12/23] util-linux: Fix packaging with "usrmerge"

2017-02-10 Thread Amarnath Valluri
From: Jussi Kukkonen 

Make sure fsck.cramfs is packaged before fsck so the latter
does not steal the fsck.cramfs binary when building with usrmerge
DISTRO_FEATURE.

Signed-off-by: Jussi Kukkonen 
---
 meta/recipes-core/util-linux/util-linux.inc | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/util-linux/util-linux.inc 
b/meta/recipes-core/util-linux/util-linux.inc
index 7d948bf..ae60b0a 100644
--- a/meta/recipes-core/util-linux/util-linux.inc
+++ b/meta/recipes-core/util-linux/util-linux.inc
@@ -29,9 +29,9 @@ SRC_URI = 
"${KERNELORG_MIRROR}/linux/utils/util-linux/v${MAJOR_VERSION}/util-lin
 PACKAGES =+ "util-linux-agetty util-linux-fdisk util-linux-cfdisk 
util-linux-sfdisk \
  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-lsblk \
- util-linux-mkfs.cramfs util-linux-fsck.cramfs util-linux-fstrim \
+ util-linux-uuidgen util-linux-lscpu util-linux-fsck.cramfs 
util-linux-fsck \
+ util-linux-blkid util-linux-mkfs util-linux-mcookie 
util-linux-reset \
+ util-linux-lsblk util-linux-mkfs.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"
 PACKAGES += "${@bb.utils.contains('PACKAGECONFIG', 'pylibmount', 
'util-linux-pylibmount', '', d)}"
-- 
2.7.4

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


[OE-core] [PATCH 10/23] musl: Fix issues in relative symlink creation

2017-02-10 Thread Amarnath Valluri
Make use of lnr/ln -r while creating relative symlinks than guessing the
relalive path.

Signed-off-by: Amarnath Valluri 
---
 ...dynamic-linker-a-relative-symlink-to-libc.patch | 58 ++
 meta/recipes-core/musl/musl_git.bb |  2 +-
 2 files changed, 49 insertions(+), 11 deletions(-)

diff --git 
a/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
 
b/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
index 5490b1c..5161c09 100644
--- 
a/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
+++ 
b/meta/recipes-core/musl/files/0001-Make-dynamic-linker-a-relative-symlink-to-libc.patch
@@ -1,6 +1,6 @@
-From 94c0b97b62125d8bbc92dce0694e387d5b2ad181 Mon Sep 17 00:00:00 2001
-From: Khem Raj 
-Date: Sun, 10 Jan 2016 12:14:02 -0800
+From 0ec74744a4cba7c5fdfaa2685995119a4fca0260 Mon Sep 17 00:00:00 2001
+From: Amarnath Valluri 
+Date: Wed, 18 Jan 2017 16:14:37 +0200
 Subject: [PATCH] Make dynamic linker a relative symlink to libc
 
 absolute symlink into $(libdir) fails to load in a cross build
@@ -10,25 +10,63 @@ can be computed during cross builds, qemu in usermode often 
comes to aid
 in such situations to feed into cross builds.
 
 Signed-off-by: Khem Raj 
+Signed-off-by: Amarnath Valluri 
 ---
 Upstream-Status: Pending
-
- Makefile | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
+---
+ Makefile | 2 +-
+ tools/install.sh | 8 +---
+ 2 files changed, 6 insertions(+), 4 deletions(-)
 
 diff --git a/Makefile b/Makefile
-index b2226fa..0d71f7f 100644
+index 8246b78..d1dbe39 100644
 --- a/Makefile
 +++ b/Makefile
-@@ -189,7 +189,7 @@ $(DESTDIR)$(includedir)/%: include/%
+@@ -215,7 +215,7 @@ $(DESTDIR)$(includedir)/%: $(srcdir)/include/%
$(INSTALL) -D -m 644 $< $@
  
  $(DESTDIR)$(LDSO_PATHNAME): $(DESTDIR)$(libdir)/libc.so
 -  $(INSTALL) -D -l $(libdir)/libc.so $@ || true
-+  $(INSTALL) -D -l ..$(libdir)/libc.so $@ || true
++  $(INSTALL) -D -r $(DESTDIR)$(libdir)/libc.so $@ || true
  
  install-libs: $(ALL_LIBS:lib/%=$(DESTDIR)$(libdir)/%) $(if 
$(SHARED_LIBS),$(DESTDIR)$(LDSO_PATHNAME),)
  
+diff --git a/tools/install.sh b/tools/install.sh
+index d913b60..b6a7f79 100755
+--- a/tools/install.sh
 b/tools/install.sh
+@@ -6,18 +6,20 @@
+ #
+ 
+ usage() {
+-printf "usage: %s [-D] [-l] [-m mode] src dest\n" "$0" 1>&2
++printf "usage: %s [-D] [-l] [-r] [-m mode] src dest\n" "$0" 1>&2
+ exit 1
+ }
+ 
+ mkdirp=
+ symlink=
++symlinkflags="-s"
+ mode=755
+ 
+-while getopts Dlm: name ; do
++while getopts Dlrm: name ; do
+ case "$name" in
+ D) mkdirp=yes ;;
+ l) symlink=yes ;;
++r) symlink=yes; symlinkflags="$symlinkflags -r" ;;
+ m) mode=$OPTARG ;;
+ ?) usage ;;
+ esac
+@@ -48,7 +50,7 @@ trap 'rm -f "$tmp"' EXIT INT QUIT TERM HUP
+ umask 077
+ 
+ if test "$symlink" ; then
+-ln -s "$1" "$tmp"
++ln $symlinkflags "$1" "$tmp"
+ else
+ cat < "$1" > "$tmp"
+ chmod "$mode" "$tmp"
 -- 
-2.7.0
+2.7.4
 
diff --git a/meta/recipes-core/musl/musl_git.bb 
b/meta/recipes-core/musl/musl_git.bb
index e9b9fef..5775184 100644
--- a/meta/recipes-core/musl/musl_git.bb
+++ b/meta/recipes-core/musl/musl_git.bb
@@ -49,7 +49,7 @@ do_install() {
oe_runmake install DESTDIR='${D}'
 
install -d ${D}${bindir}
-   ln -s ../../${libdir}/libc.so ${D}${bindir}/ldd
+   lnr ${D}${libdir}/libc.so ${D}${bindir}/ldd
for l in crypt dl m pthread resolv rt util xnet
do
ln -s libc.so ${D}${libdir}/lib$l.so
-- 
2.7.4

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


[OE-core] [PATCH 09/23] package_deb.bbclass: Ignore file paths in RPROVIDES

2017-02-10 Thread Amarnath Valluri
Unlike rpm, debian packaging does not allow file paths in 'Provides:' field.
When 'usrmerge' distro feature enabled bash/busybox packages adds '/bin/sh' to
it's RPROVIDES to satisfy build dependencies, this entry should be filtered out.

Signed-off-by: Amarnath Valluri 
---
 meta/classes/package_deb.bbclass | 4 
 1 file changed, 4 insertions(+)

diff --git a/meta/classes/package_deb.bbclass b/meta/classes/package_deb.bbclass
index eb549ca..e1bc078 100644
--- a/meta/classes/package_deb.bbclass
+++ b/meta/classes/package_deb.bbclass
@@ -237,6 +237,10 @@ python do_package_deb () {
 debian_cmp_remap(rsuggests)
 # Deliberately drop version information here, not wanted/supported by 
deb
 rprovides = 
dict.fromkeys(bb.utils.explode_dep_versions2(localdata.getVar("RPROVIDES") or 
""), [])
+# Remove file paths if any from rprovides, debian does not support 
custom providers
+for key in list(rprovides.keys()):
+if key.startswith('/'):
+del rprovides[key]
 rprovides = collections.OrderedDict(sorted(rprovides.items(), 
key=lambda x: x[0]))
 debian_cmp_remap(rprovides)
 rreplaces = 
bb.utils.explode_dep_versions2(localdata.getVar("RREPLACES") or "")
-- 
2.7.4

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


[OE-core] [PATCH 11/23] glibc: Ensure ldconfig is packaged into glibc

2017-02-10 Thread Amarnath Valluri
From: Jussi Kukkonen 

If "usrmerge" feature is used, /usr/sbin/ldconfig gets packaged into
glibc-utils instead of glibc: Switch PACKAGES order to prevent this.

Signed-off-by: Jussi Kukkonen 
---
 meta/recipes-core/glibc/glibc-package.inc | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/recipes-core/glibc/glibc-package.inc 
b/meta/recipes-core/glibc/glibc-package.inc
index 481a00e..d9b9f52 100644
--- a/meta/recipes-core/glibc/glibc-package.inc
+++ b/meta/recipes-core/glibc/glibc-package.inc
@@ -19,7 +19,7 @@ USE_LDCONFIG ?= "1"
 
 INHIBIT_SYSROOT_STRIP = "1"
 
-PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode ${PN}-utils 
glibc-thread-db ${PN}-pic libcidn libmemusage libsegfault ${PN}-pcprofile 
libsotruss ${PN} glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
+PACKAGES = "${PN}-dbg catchsegv sln nscd ldd tzcode glibc-thread-db ${PN}-pic 
libcidn libmemusage libsegfault ${PN}-pcprofile libsotruss ${PN} ${PN}-utils 
glibc-extra-nss ${PN}-dev ${PN}-staticdev ${PN}-doc"
 
 # The ld.so in this glibc supports the GNU_HASH
 RPROVIDES_${PN} = "eglibc rtld(GNU_HASH)"
-- 
2.7.4

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


[OE-core] [PATCH 08/23] sed: changes to support merged /usr

2017-02-10 Thread Amarnath Valluri
Few of the perl scripts referring '#!/bin/sed' inside the script. But when
'usrmerge' feature is enabled this path would be /usr/bin/sed. So to satisfy
build dependency add '/bin/sed' to it's providers list.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-extended/sed/sed_4.2.2.bb | 1 +
 1 file changed, 1 insertion(+)

diff --git a/meta/recipes-extended/sed/sed_4.2.2.bb 
b/meta/recipes-extended/sed/sed_4.2.2.bb
index 5aa7d8a..e31bec2 100644
--- a/meta/recipes-extended/sed/sed_4.2.2.bb
+++ b/meta/recipes-extended/sed/sed_4.2.2.bb
@@ -44,3 +44,4 @@ do_install_ptest() {
oe_runmake -C ${TESTDIR} install-ptest BUILDDIR=${B} 
DESTDIR=${D}${PTEST_PATH} TESTDIR=${TESTDIR}
 }
 
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'/bin/sed', '', d)}"
-- 
2.7.4

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


[OE-core] [PATCH 07/23] busybox: changes to support merged /usr

2017-02-10 Thread Amarnath Valluri
Most of the shell scripts refer to /bin/sh inside the script. When 'usrmege'
feature is enabled, this path would be /usr/bin/sh. Hence, to satisfy build
dependency add '/bin/sh' to it's providers list.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-core/busybox/busybox.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-core/busybox/busybox.inc 
b/meta/recipes-core/busybox/busybox.inc
index 34f4e25..61d17e4 100644
--- a/meta/recipes-core/busybox/busybox.inc
+++ b/meta/recipes-core/busybox/busybox.inc
@@ -431,3 +431,5 @@ pkg_prerm_${PN}-syslog () {
fi
fi
 }
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'/bin/sh', '', d)}"
-- 
2.7.4

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


[OE-core] [PATCH 04/23] base-files: support merged /usr

2017-02-10 Thread Amarnath Valluri
From: Joshua Lock 

When the usrmerge DISTRO_FEATURE is enabled don't create /bin, /lib{32,64}
and /sbin. Instead, link them to the equivalent directories in /usr

Signed-off-by: Joshua Lock 
Signed-off-by: Amarnath Valluri 
---
 meta/recipes-core/base-files/base-files_3.0.14.bb | 23 +++
 1 file changed, 19 insertions(+), 4 deletions(-)

diff --git a/meta/recipes-core/base-files/base-files_3.0.14.bb 
b/meta/recipes-core/base-files/base-files_3.0.14.bb
index d138005..9e2c0b7 100644
--- a/meta/recipes-core/base-files/base-files_3.0.14.bb
+++ b/meta/recipes-core/base-files/base-files_3.0.14.bb
@@ -32,8 +32,8 @@ INHIBIT_DEFAULT_DEPS = "1"
 docdir_append = "/${P}"
 dirs1777 = "/tmp ${localstatedir}/volatile/tmp"
 dirs2775 = ""
-dirs755 = "/bin /boot /dev ${sysconfdir} ${sysconfdir}/default \
-   ${sysconfdir}/skel /lib /mnt /proc ${ROOT_HOME} /run /sbin \
+dirs755 = "/boot /dev ${sysconfdir} ${sysconfdir}/default \
+   ${sysconfdir}/skel /mnt /proc ${ROOT_HOME} /run \
${prefix} ${bindir} ${docdir} /usr/games ${includedir} \
${libdir} ${sbindir} ${datadir} \
${datadir}/common-licenses ${datadir}/dict ${infodir} \
@@ -42,8 +42,8 @@ dirs755 = "/bin /boot /dev ${sysconfdir} 
${sysconfdir}/default \
/sys ${localstatedir}/lib/misc ${localstatedir}/spool \
${localstatedir}/volatile \
${localstatedir}/volatile/log \
-   /home ${prefix}/src ${localstatedir}/local \
-   /media"
+   /home ${prefix}/src ${localstatedir}/local /media \
+   ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '', '/bin /lib 
/sbin', d)}"
 
 dirs755-lsb = "/srv  \
${prefix}/local ${prefix}/local/bin ${prefix}/local/games \
@@ -105,6 +105,21 @@ do_install () {
ln -sf volatile/$d ${D}${localstatedir}/$d
done
 
+   if [ "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', '1', '0', 
d)}" = "1" ] ; then
+   lnr ${D}${base_bindir} ${D}/bin
+   lnr ${D}${base_sbindir} ${D}/sbin
+   lnr ${D}${base_libdir} ${D}/${baselib}
+   if [ "${baselib}" != "lib" ]; then
+   lnr ${D}${nonarch_base_libdir} ${D}/lib
+   fi
+# create base links for multilibs
+   multi_libdirs="${@d.getVar('MULTILIB_VARIANTS')}"
+   for d in $multi_libdirs; do
+   install -m 0755 -d ${D}/${exec_prefix}/$d
+   lnr ${D}/${exec_prefix}/$d ${D}/$d
+   done
+   fi
+
ln -snf ../run ${D}${localstatedir}/run
ln -snf ../run/lock ${D}${localstatedir}/lock
 
-- 
2.7.4

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


[OE-core] [PATCH 06/23] bash: changes to support merged /usr

2017-02-10 Thread Amarnath Valluri
Most of shell scripts refer to '#!/bin/{sh,bash}' inside the script. But when
'usrmege' feature is enbaled this path will be /usr/bin/{sh, bash}.

so to satisify build dependency add '/bin/{sh,bash}' to its providers list.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-extended/bash/bash.inc | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/meta/recipes-extended/bash/bash.inc 
b/meta/recipes-extended/bash/bash.inc
index 1d08526..6525d64 100644
--- a/meta/recipes-extended/bash/bash.inc
+++ b/meta/recipes-extended/bash/bash.inc
@@ -63,3 +63,5 @@ pkg_postinst_${PN} () {
 pkg_postrm_${PN} () {
printf "$(grep -v "^${base_bindir}/bash$" $D${sysconfdir}/shells)\n" > 
$D${sysconfdir}/shells
 }
+
+RPROVIDES_${PN} += "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'/bin/sh /bin/bash', '', d)}"
-- 
2.7.4

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


[OE-core] [PATCH 03/23] cross.bbclass: merged /usr support

2017-02-10 Thread Amarnath Valluri
When 'usrmerge' distro feature enabled match target_base_libdir to 
${target_libdir}.

Signed-off-by: Amarnath Valluri 
---
 meta/classes/cross.bbclass | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/meta/classes/cross.bbclass b/meta/classes/cross.bbclass
index 2602153..c8ef3a5 100644
--- a/meta/classes/cross.bbclass
+++ b/meta/classes/cross.bbclass
@@ -48,8 +48,8 @@ SSTATE_SCAN_CMD ?= "${SSTATE_SCAN_CMD_NATIVE}"
 target_base_prefix := "${base_prefix}"
 target_prefix := "${prefix}"
 target_exec_prefix := "${exec_prefix}"
-target_base_libdir = "${target_base_prefix}/${baselib}"
 target_libdir = "${target_exec_prefix}/${baselib}"
+target_base_libdir = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${target_libdir}', '${target_base_prefix}/${baselib}', d)}"
 target_includedir := "${includedir}"
 
 # Overrides for paths
-- 
2.7.4

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


[OE-core] [PATCH 05/23] systemd: chagnes to support merged /usr

2017-02-10 Thread Amarnath Valluri
When the usrmerge DISTRO_FEATURE is selected disable the split-usr
support and modify rootprefix to be exec_prefix, rather than base_prefix.

Signed-off-by: Amarnath Valluri 
---
 meta/recipes-core/systemd/systemd_232.bb | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/meta/recipes-core/systemd/systemd_232.bb 
b/meta/recipes-core/systemd/systemd_232.bb
index cc8781e..bf0fadc 100644
--- a/meta/recipes-core/systemd/systemd_232.bb
+++ b/meta/recipes-core/systemd/systemd_232.bb
@@ -131,7 +131,7 @@ CACHED_CONFIGUREVARS += 
"ac_cv_path_SULOGIN=${base_sbindir}/sulogin"
 
 # Helper variables to clarify locations.  This mirrors the logic in systemd's
 # build system.
-rootprefix ?= "${base_prefix}"
+rootprefix ?= "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${exec_prefix}', '${base_prefix}', d)}"
 rootlibdir ?= "${base_libdir}"
 rootlibexecdir = "${rootprefix}/lib"
 
@@ -149,10 +149,10 @@ CACHED_CONFIGUREVARS_class-target = "\
 EXTRA_OECONF = " --with-rootprefix=${rootprefix} \
  --with-rootlibdir=${rootlibdir} \
  --with-roothomedir=${ROOT_HOME} \
- --enable-split-usr \
+ ${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'--disable-split-usr', '--enable-split-usr', d)} \
  --without-python \
  --with-sysvrcnd-path=${sysconfdir} \
- --with-firmware-path=/lib/firmware \
+ --with-firmware-path=${nonarch_base_libdir}/firmware \
  --with-testdir=${PTEST_PATH} \
"
 # per the systemd README, define VALGRIND=1 to run under valgrind
-- 
2.7.4

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


[OE-core] [PATCH 02/23] bitbake.conf: Modify nativesdk variables to support 'usrmerge' DISTRO_FEATURE

2017-02-10 Thread Amarnath Valluri
Modify base bin, sbin, and lib nativesdk variables to be ${prefix_nativesdk}/$d,
when the usrmerge DISTRO_FEATURE is enabled.

Signed-off-by: Amarnath Valluri 
---
 meta/conf/bitbake.conf | 8 
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index c5beb77..ecff034 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -67,11 +67,11 @@ bindir_crossscripts = "${bindir}/crossscripts"
 prefix_nativesdk = "/usr"
 bindir_nativesdk = "${prefix_nativesdk}/bin"
 sbindir_nativesdk = "${prefix_nativesdk}/sbin"
-base_bindir_nativesdk = "/bin"
-base_sbindir_nativesdk = "/sbin"
-includedir_nativesdk = "${prefix_nativesdk}/include"
 libdir_nativesdk = "${prefix_nativesdk}/lib"
-base_libdir_nativesdk = "/lib"
+base_bindir_nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${bindir_nativesdk}', '/bin', d)}"
+base_sbindir_nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${sbindir_nativesdk}', '/sbin', d)}"
+base_libdir_nativesdk = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${libdir_nativesdk}', '/lib', d)}"
+includedir_nativesdk = "${prefix_nativesdk}/include"
 localstatedir_nativesdk = "/var"
 
 #
-- 
2.7.4

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


[OE-core] [PATCH 00/23] Fix for #7040 - Support for /usr merge

2017-02-10 Thread Amarnath Valluri
This set of patches implements the long-standing feature - merging of /bin,
/sbin, /libs to their /usr counterparts.

It introduces a 'usrmerge' DISTRO_FEATURE, when it's enabled:
  - other than native all base paths(base_{bin,sbin,lib}dir) points to 
${exec_prefix}/{bin,sbin,lib}
  - base-files package adds the needed root links(/bin, /sbin, /lib{32,64}) 
points to /usr counterparts
  - As most of shell scripts refer "#!/bin/{sh,bash}" inside script, so makes 
sure that get added to RPROVIDES_ list by those packages to satisfy the build 
dependencies.

The assumption is that no recipe uses hard coded paths in recipes where 
pre-defined bitbake configuration variables are available. I have fixed quite 
many recipes that i found which violates this assumption.

I have tested this change on core-minimal, sato, windriver cube-desktop and 
intel-iot-refkit image builds. And i would prefer to run autobuilder tests 
prior to merging.

Amarnath Valluri (19):
  bitbake.conf: Modify nativesdk variables to support 'usrmerge' DISTRO_FEATURE
  cross.bbclass: merged /usr support
  systemd: chagnes to support merged /usr
  bash: changes to support merged /usr
  busybox: changes to support merged /usr
  sed: changes to support merged /usr
  package_deb.bbclass: Ignore file paths in RPROVIDES
  musl: Fix issues in relative symlink creation
  attr/acl: Do not create broken static library link when not needed
  systemd: Do not add libnss_* to systemd package
  util-linux: Make sure '${base_bindir}/reset' is part of util-linux-reset 
package.
  util-linux,shadow: Make 'nologin' alternative command
  libarchive: Backport upstream fixes.
  kernel: use ${nonarch_base_libdir} for kernel modules installation.
  firmware: use ${nonarch_base_libdir} for firmware installation.
  mdadm: Avoid using hardocded udev, sbin paths
  mktemp: Move installed files only when needed
  net-tools: Place package content as per bitbake environment.
  lsb: Make use of appropriate bitbake variables.

Joshua Lock (2):
  bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge
  base-files: support merged /usr

Jussi Kukkonen (2):
  glibc: Ensure ldconfig is packaged into glibc
  util-linux: Fix packaging with "usrmerge"

 meta/classes/cross.bbclass |   2 +-
 meta/classes/kernel-module-split.bbclass   |   2 +-
 meta/classes/kernel.bbclass|  14 +-
 meta/classes/module.bbclass|   2 +-
 meta/classes/package_deb.bbclass   |   4 +
 meta/conf/bitbake.conf |  20 +-
 meta/recipes-core/base-files/base-files_3.0.14.bb  |  23 +-
 meta/recipes-core/busybox/busybox.inc  |   2 +
 meta/recipes-core/glibc/glibc-package.inc  |   2 +-
 ...dynamic-linker-a-relative-symlink-to-libc.patch |  58 -
 meta/recipes-core/musl/musl_git.bb |   2 +-
 meta/recipes-core/systemd/systemd_232.bb   |   7 +-
 meta/recipes-core/util-linux/util-linux.inc|  15 +-
 meta/recipes-extended/bash/bash.inc|   2 +
 ...te_disk_posix.c-make-_fsobj-functions-mor.patch | 242 +
 ...02-Fix-extracting-hardlinks-over-symlinks.patch | 116 ++
 .../libarchive/libarchive_3.2.2.bb |   2 +
 meta/recipes-extended/lsb/lsb_4.1.bb   |  40 ++--
 meta/recipes-extended/mdadm/mdadm_4.0.bb   |   6 +-
 meta/recipes-extended/mktemp/mktemp_1.7.bb |   8 +-
 .../net-tools/net-tools_1.60-26.bb |  11 +
 meta/recipes-extended/sed/sed_4.2.2.bb |   1 +
 meta/recipes-extended/shadow/shadow.inc|   3 +-
 .../linux-firmware/linux-firmware_git.bb   | 168 +++---
 meta/recipes-support/attr/ea-acl.inc   |   2 +
 ...gure-option-to-enable-disable-static-libr.patch |  70 ++
 26 files changed, 668 insertions(+), 156 deletions(-)
 create mode 100644 
meta/recipes-extended/libarchive/files/0001-archive_write_disk_posix.c-make-_fsobj-functions-mor.patch
 create mode 100644 
meta/recipes-extended/libarchive/files/0002-Fix-extracting-hardlinks-over-symlinks.patch
 create mode 100644 
meta/recipes-support/attr/files/0001-Added-configure-option-to-enable-disable-static-libr.patch

-- 
2.7.4

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


[OE-core] [PATCH 01/23] bitbake.conf: support for merged usr with DISTRO_FEATURE usrmerge

2017-02-10 Thread Amarnath Valluri
From: Joshua Lock 

Modify bindir, libdir and sbindir to be exec_prefix/$d, rather than
base_prefix/$d, when the usrmerge DISTRO_FEATURE is enabled.

Signed-off-by: Joshua Lock 
---
 meta/conf/bitbake.conf | 12 
 1 file changed, 8 insertions(+), 4 deletions(-)

diff --git a/meta/conf/bitbake.conf b/meta/conf/bitbake.conf
index e421650..c5beb77 100644
--- a/meta/conf/bitbake.conf
+++ b/meta/conf/bitbake.conf
@@ -18,10 +18,14 @@ export prefix = "/usr"
 export exec_prefix = "${prefix}"
 
 # Base paths
-export base_bindir = "${base_prefix}/bin"
-export base_sbindir = "${base_prefix}/sbin"
-export base_libdir = "${base_prefix}/${baselib}"
-export nonarch_base_libdir = "${base_prefix}/lib"
+bin = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${exec_prefix}/bin', '${base_prefix}/bin', d)}"
+sbin = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${exec_prefix}/sbin', '${base_prefix}/sbin', d)}"
+lib = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${exec_prefix}/${baselib}', '${base_prefix}/${baselib}', d)}"
+nonarch_lib = "${@bb.utils.contains('DISTRO_FEATURES', 'usrmerge', 
'${exec_prefix}/lib', '${base_prefix}/lib', d)}"
+export base_bindir = "${bin}"
+export base_sbindir = "${sbin}"
+export base_libdir = "${lib}"
+export nonarch_base_libdir = "${nonarch_lib}"
 
 # Architecture independent paths
 export sysconfdir = "${base_prefix}/etc"
-- 
2.7.4

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


Re: [OE-core] [PATCH 0/3] Fix cve-check (for recipe sysroots)

2017-02-10 Thread Alexander Kanavin

On 02/10/2017 03:04 PM, Burton, Ross wrote:


Abandoned may be a strong word, but I'm not sure how much development is
being done.  I do plan on looking at this and dedicating some actual
engineering time towards it soon.


https://github.com/ikeydoherty/cve-check-tool/commits/master
Last commit on Sep 1 2016.

https://github.com/ikeydoherty/cve-check-tool/commits/rewrite-snapshot
Last commit on Aug 8 2016.

Same story with open issues and pull requests: no activity in months.


Alex

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


Re: [OE-core] [PATCH 0/3] Fix cve-check (for recipe sysroots)

2017-02-10 Thread Burton, Ross
On 10 February 2017 at 11:55, Alexander Kanavin <
alexander.kana...@linux.intel.com> wrote:

> I mentioned error output improvements in email  but did not implement
>> as that requires more upstream changes: I'll talk to the maintainer
>> about them.
>>
>
> Isn't it so that the upstream maintainer has abandoned this tool (and the
> Big Rewrite of it too)? Then we need to find an alternative approach, or
> roll our own.
>

Abandoned may be a strong word, but I'm not sure how much development is
being done.  I do plan on looking at this and dedicating some actual
engineering time towards it soon.

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


[OE-core] [PATCH] lighttpd: Upgrade 1.4.43 -> 1.4.45

2017-02-10 Thread Andrej Valek
Signed-off-by: Andrej Valek 
Signed-off-by: Pascal Bach 
---
 meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb | 84 ---
 meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb | 84 +++
 2 files changed, 84 insertions(+), 84 deletions(-)
 delete mode 100644 meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
 create mode 100644 meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb

diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb 
b/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
deleted file mode 100644
index f70f9b7..000
--- a/meta/recipes-extended/lighttpd/lighttpd_1.4.43.bb
+++ /dev/null
@@ -1,84 +0,0 @@
-SUMMARY = "Lightweight high-performance web server"
-HOMEPAGE = "http://www.lighttpd.net/;
-BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues;
-
-LICENSE = "BSD"
-LIC_FILES_CHKSUM = "file://COPYING;md5=e4dac5c6ab169aa212feb5028853a579"
-
-SECTION = "net"
-RDEPENDS_${PN} = "lighttpd-module-dirlisting \
-  lighttpd-module-indexfile \
-  lighttpd-module-staticfile"
-RRECOMMENDS_${PN} = "lighttpd-module-access \
- lighttpd-module-accesslog"
-
-SRC_URI = 
"http://download.lighttpd.net/lighttpd/releases-1.4.x/lighttpd-${PV}.tar.xz \
-file://index.html.lighttpd \
-file://lighttpd.conf \
-file://lighttpd \
-file://lighttpd.service \
-file://0001-Use-pkg-config-for-pcre-dependency-instead-of-config.patch 
\
-"
-
-SRC_URI[md5sum] = "95eda531c27b161ef8fa2b9bf4948caf"
-SRC_URI[sha256sum] = 
"fe0c4a06dd2408a83ee7a2bfedc45e09597f3313cbda82485507573ae8fa948a"
-
-PACKAGECONFIG ??= "openssl pcre zlib \
-${@bb.utils.contains('DISTRO_FEATURES', 'ipv6', 'ipv6', '', d)} \
-${@bb.utils.contains('DISTRO_FEATURES', 'largefile', 'lfs', '', d)} \
-${@bb.utils.contains('DISTRO_FEATURES', 'xattr', 'attr', '', d)} \
-"
-PACKAGECONFIG[lfs] = "--enable-lfs,--disable-lfs"
-PACKAGECONFIG[ipv6] = "--enable-ipv6,--disable-ipv6"
-PACKAGECONFIG[mmap] = "--enable-mmap,--disable-mmap"
-PACKAGECONFIG[libev] = "--with-libev,--without-libev,libev"
-PACKAGECONFIG[mysql] = "--with-mysql,--without-mysql,mariadb"
-PACKAGECONFIG[ldap] = "--with-ldap,--without-ldap,openldap"
-PACKAGECONFIG[attr] = "--with-attr,--without-attr,attr"
-PACKAGECONFIG[valgrind] = "--with-valgrind,--without-valgrind,valgrind"
-PACKAGECONFIG[openssl] = "--with-openssl,--without-openssl,openssl"
-PACKAGECONFIG[krb5] = "--with-krb5,--without-krb5,krb5"
-PACKAGECONFIG[pcre] = "--with-pcre,--without-pcre,libpcre"
-PACKAGECONFIG[zlib] = "--with-zlib,--without-zlib,zlib"
-PACKAGECONFIG[bzip2] = "--with-bzip2,--without-bzip2,bzip2"
-PACKAGECONFIG[fam] = "--with-fam,--without-fam,gamin"
-PACKAGECONFIG[webdav-props] = 
"--with-webdav-props,--without-webdav-props,libxml2 sqlite3"
-PACKAGECONFIG[webdav-locks] = 
"--with-webdav-locks,--without-webdav-locks,util-linux"
-PACKAGECONFIG[gdbm] = "--with-gdbm,--without-gdbm,gdbm"
-PACKAGECONFIG[memcache] = "--with-memcached,--without-memcached,libmemcached"
-PACKAGECONFIG[lua] = "--with-lua,--without-lua,lua5.1"
-
-inherit autotools pkgconfig update-rc.d gettext systemd
-
-INITSCRIPT_NAME = "lighttpd"
-INITSCRIPT_PARAMS = "defaults 70"
-
-SYSTEMD_SERVICE_${PN} = "lighttpd.service"
-
-do_install_append() {
-   install -d ${D}${sysconfdir}/init.d ${D}${sysconfdir}/lighttpd.d 
${D}/www/pages/dav
-   install -m 0755 ${WORKDIR}/lighttpd ${D}${sysconfdir}/init.d
-   install -m 0644 ${WORKDIR}/lighttpd.conf ${D}${sysconfdir}
-   install -m 0644 ${WORKDIR}/index.html.lighttpd ${D}/www/pages/index.html
-
-   install -d ${D}${systemd_unitdir}/system
-   install -m 0644 ${WORKDIR}/lighttpd.service 
${D}${systemd_unitdir}/system
-   sed -i -e 's,@SBINDIR@,${sbindir},g' \
-   -e 's,@SYSCONFDIR@,${sysconfdir},g' \
-   -e 's,@BASE_BINDIR@,${base_bindir},g' \
-   ${D}${systemd_unitdir}/system/lighttpd.service
-   #For FHS compliance, create symbolic links to /var/log and /var/tmp for 
logs and temporary data
-   ln -sf ${localstatedir}/log ${D}/www/logs
-   ln -sf ${localstatedir}/tmp ${D}/www/var
-}
-
-FILES_${PN} += "${sysconfdir} /www"
-
-CONFFILES_${PN} = "${sysconfdir}/lighttpd.conf"
-
-PACKAGES_DYNAMIC += "^lighttpd-module-.*"
-
-python populate_packages_prepend () {
-lighttpd_libdir = d.expand('${libdir}')
-do_split_packages(d, lighttpd_libdir, '^mod_(.*)\.so$', 
'lighttpd-module-%s', 'Lighttpd module for %s', extra_depends='')
-}
diff --git a/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb 
b/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb
new file mode 100644
index 000..c82d93b
--- /dev/null
+++ b/meta/recipes-extended/lighttpd/lighttpd_1.4.45.bb
@@ -0,0 +1,84 @@
+SUMMARY = "Lightweight high-performance web server"
+HOMEPAGE = "http://www.lighttpd.net/;
+BUGTRACKER = "http://redmine.lighttpd.net/projects/lighttpd/issues;
+
+LICENSE 

[OE-core] [PATCH] rootfspostcommands: remove shadow backup files instead of trying to sort

2017-02-10 Thread Patrick Ohly
Backup are files sometimes are inconsistent and then cannot be
sorted (YOCTO #11043), and more importantly, are not needed in
the initial rootfs, so they get deleted.

Fixes: [YOCTO #11007]

Signed-off-by: Patrick Ohly 
---
 meta/lib/rootfspostcommands.py | 28 
 1 file changed, 20 insertions(+), 8 deletions(-)

diff --git a/meta/lib/rootfspostcommands.py b/meta/lib/rootfspostcommands.py
index 6a9b8b4..4742e06 100644
--- a/meta/lib/rootfspostcommands.py
+++ b/meta/lib/rootfspostcommands.py
@@ -29,16 +29,28 @@ def sort_file(filename, mapping):
 f.write(b''.join(lines))
 return new_mapping
 
+def remove_backup(filename):
+"""
+Removes the backup file for files like /etc/passwd.
+"""
+backup_filename = filename + '-'
+if os.path.exists(backup_filename):
+os.unlink(backup_filename)
+
 def sort_passwd(sysconfdir):
 """
 Sorts passwd and group files in a rootfs /etc directory by ID.
+Backup files are sometimes are inconsistent and then cannot be
+sorted (YOCTO #11043), and more importantly, are not needed in
+the initial rootfs, so they get deleted.
 """
-for suffix in '', '-':
-for main, shadow in (('passwd', 'shadow'),
- ('group', 'gshadow')):
-filename = os.path.join(sysconfdir, main + suffix)
+for main, shadow in (('passwd', 'shadow'),
+ ('group', 'gshadow')):
+filename = os.path.join(sysconfdir, main)
+remove_backup(filename)
+if os.path.exists(filename):
+mapping = sort_file(filename, None)
+filename = os.path.join(sysconfdir, shadow)
+remove_backup(filename)
 if os.path.exists(filename):
-mapping = sort_file(filename, None)
-filename = os.path.join(sysconfdir, shadow + suffix)
-if os.path.exists(filename):
-sort_file(filename, mapping)
+ sort_file(filename, mapping)

base-commit: 652f7245ac95fd11c72f4ad62e0b99234a7e59c5
-- 
git-series 0.9.1
-- 
___
Openembedded-core mailing list
Openembedded-core@lists.openembedded.org
http://lists.openembedded.org/mailman/listinfo/openembedded-core


Re: [OE-core] [PATCH 0/3] Fix cve-check (for recipe sysroots)

2017-02-10 Thread Alexander Kanavin

On 02/09/2017 09:38 PM, Jussi Kukkonen wrote:


I mentioned error output improvements in email  but did not implement
as that requires more upstream changes: I'll talk to the maintainer
about them.


Isn't it so that the upstream maintainer has abandoned this tool (and 
the Big Rewrite of it too)? Then we need to find an alternative 
approach, or roll our own.


Alex

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


Re: [OE-core] [PATCH 04/13] ncurses: 6.0+20160625 -> 6.0+20161126

2017-02-10 Thread Burton, Ross
On 9 February 2017 at 06:45, Hongxu Jia  wrote:

> Signed-off-by: Hongxu Jia 
>

This upgrade is failing all over the autobuilder.  I'm guessing it's due to
this new warning in the configure log:

checking $CC variable... broken
> configure: WARNING: your environment misuses the CC variable to hold
> CFLAGS/CPPFLAGS options


Because later on:

checking for getcwd... no
> checking for getegid... no
> checking for geteuid... no
> checking for getopt... no
> checking for poll... no
> checking for putenv... no
> checking for select... no
> ...
> configure: error: getopt is required for building programs


I'm pretty sure those failures are not accurate!

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


Re: [OE-core] [PATCH V2 11/13] bash: update patches for 4.4

2017-02-10 Thread Burton, Ross
On 9 February 2017 at 06:45, Hongxu Jia  wrote:

> +do_install_append_class-target () {
> +   # Workaround do_package_write_rpm failure
> +   rm ${D}${libdir}/bash/uname
> +}
>

This isn't target specific as it also breaks nativesdk builds (
http://errors.yoctoproject.org/Errors/Details/131136/).  To be honest I'd
prefer to fix the problem in rpm (or the build of this binary) than work
around it.

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


Re: [OE-core] [PATCH] qemu: Inherit pythonnative

2017-02-10 Thread Burton, Ross
On 10 February 2017 at 04:58, Khem Raj  wrote:

> On buildhosts where default python has switched to using python3
> qemu-native fails configure like this
>
> | ERROR: Cannot use 'python', Python 2.6 or later is required.
> |Note that Python 3 or later is not yet supported.
> |Use --python=/path/to/python to specify a supported Python.
>

Build hosts where /usr/bin/python is Python3 are Doing It Wrong, and Python
upstream says don't do that.

Many other recipes depend on /usr/bin/python existing, so I'm not sure we
want to start building our own Python so early in the build just yet,
especially as we're trying to move away from Py2.  Can we not just list
python2 as a host dependency (to be honest, I thought it already was).

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


[OE-core] State of bitbake world, Failed tasks 2017-02-08

2017-02-10 Thread Martin Jansa
== Number of issues - stats ==
{| class='wikitable'
!|Date   !!colspan='3'|Failed tasks 
!!colspan='6'|Failed depencencies!!|Signatures
!!colspan='12'|QA !!Comment
|-
||  ||qemuarm   ||qemux86   ||qemux86_64
||qemuarm||max||min ||qemux86||max||min ||all   ||already-stripped  
||libdir||textrel   ||build-deps||file-rdeps
||version-going-backwards   ||host-user-contaminated
||installed-vs-shipped  ||unknown-configure-option  ||symlink-to-sysroot
||invalid-pkgconfig ||pkgname   ||  
|-
||2017-02-08||96||100   ||100   ||N/A   ||N/A   ||N/A   ||N/A   ||N/A   
||N/A   ||0 ||0 ||0 ||2 ||0 
||6 ||36||0 ||0 ||0 
||0 ||0 ||0 ||  
|}

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

== Failed tasks 2017-02-08 ==

INFO: jenkins-job.sh-1.8.15 Complete log available at 
http://logs.nslu2-linux.org/buildlogs/oe/world/pyro/log.report.20170209_155817.log

=== common (93) ===
* 
meta-browser/recipes-mozilla/firefox-addon/firefox-addon-webconverger_git.bb:do_install
* 
meta-openembedded/meta-efl/recipes-devtools/python/python-edbus_1.7.0.bb:do_configure
* meta-openembedded/meta-efl/recipes-efl/e17/exquisite_svn.bb:do_compile
* meta-openembedded/meta-efl/recipes-efl/efl/elementary_1.15.1.bb:do_compile
* meta-openembedded/meta-efl/recipes-efl/efl/libeweather_svn.bb:do_compile
* 
meta-openembedded/meta-filesystems/recipes-filesystems/unionfs-fuse/unionfs-fuse_0.26.bb:do_compile
* 
meta-openembedded/meta-filesystems/recipes-utils/xfsprogs/xfsprogs_4.8.0.bb:do_compile
* 
meta-openembedded/meta-gnome/recipes-apps/gnome-mplayer/gmtk_1.0.5.bb:do_configure
* 
meta-openembedded/meta-gnome/recipes-gnome/devilspie/devilspie2_0.33.bb:do_compile
* 
meta-openembedded/meta-gnome/recipes-gnome/gnome-backgrounds/gnome-backgrounds_2.32.0.bb:do_configure
* 
meta-openembedded/meta-gnome/recipes-gnome/gnome-desktop/gnome-desktop_2.32.1.bb:do_compile
* 
meta-openembedded/meta-gnome/recipes-gnome/gnome-mime-data/gnome-mime-data_2.18.0.bb:do_configure
* 
meta-openembedded/meta-gnome/recipes-gnome/gtk-engines/gtk-engines_2.20.2.bb:do_configure
* 
meta-openembedded/meta-gnome/recipes-gnome/gtksourceview/gtksourceview2_2.10.5.bb:do_configure
* 
meta-openembedded/meta-gnome/recipes-gnome/libgnome/libgnomekbd_2.32.0.bb:do_configure
* 
meta-openembedded/meta-gnome/recipes-gnome/libidl/libidl-native_0.8.14.bb:do_configure
* 
meta-openembedded/meta-gnome/recipes-support/onboard/onboard_1.3.0.bb:do_compile
* 
meta-openembedded/meta-gpe/recipes-graphics/libgpewidget/libgpewidget_0.117.bb:do_compile
* 
meta-openembedded/meta-initramfs/recipes-devtools/mtd/ubi-utils-klibc_1.5.1.bb:do_compile
* 
meta-openembedded/meta-initramfs/recipes-kernel/kexec/kexec-tools-klibc_2.0.2.bb:do_configure
* 
meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-igd_0.2.2.bb:do_compile
* 
meta-openembedded/meta-multimedia/recipes-connectivity/gupnp/gupnp-tools_0.8.10.bb:do_configure
* 
meta-openembedded/meta-multimedia/recipes-dvb/dvb-apps/dvb-apps_1.1.1.bb:do_fetch
* 
meta-openembedded/meta-multimedia/recipes-multimedia/gstreamer-0.10/gstreamer_0.10.36.bb:do_compile
* 
meta-openembedded/meta-multimedia/recipes-multimedia/musicpd/mpd_0.19.21.bb:do_configure
* 
meta-openembedded/meta-networking/recipes-connectivity/crda/crda_3.18.bb:do_compile
* 
meta-openembedded/meta-networking/recipes-connectivity/openconnect/openconnect_git.bb:do_configure
* 
meta-openembedded/meta-networking/recipes-protocols/openflow/openflow_git.bb:do_configure
* 
meta-openembedded/meta-networking/recipes-support/netcat/netcat-openbsd_1.105.bb:do_compile
* 
meta-openembedded/meta-networking/recipes-support/wireshark/wireshark_2.2.4.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-connectivity/gnokii/gnokii_0.6.31.bb:do_configure
* 
meta-openembedded/meta-oe/recipes-connectivity/libmbim/libmbim_1.14.0.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-connectivity/mosh/mosh_1.2.4.bb:do_configure
* 
meta-openembedded/meta-oe/recipes-connectivity/networkmanager/networkmanager-openvpn_1.2.6.bb:do_configure
* 
meta-openembedded/meta-oe/recipes-connectivity/telepathy/libtelepathy_0.3.3.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-core/dbus/dbus-daemon-proxy_git.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-core/dbus/libdbus-c++_0.9.0.bb:do_compile
* 
meta-openembedded/meta-oe/recipes-core/glib-2.0/glibmm_2.50.0.bb:do_configure
* 
meta-openembedded/meta-oe/recipes-devtools/geany/geany_1.29.bb:do_configure
* meta-openembedded/meta-oe/recipes-devtools/php/php_7.1.0.bb:do_install
*